ajustador.utilities

ajustador.utilities.arange_values(values, func, order=None)[source]
ajustador.utilities.cached(function)[source]

A decorator to store the return values of a function in a cache

ajustador.utilities.chdir(dir)[source]

A contextmanager to temporarily change the working directory

ajustador.utilities.find_missing(values)[source]
ajustador.utilities.mkdir_p(dirname)[source]
ajustador.utilities.once(function)[source]

A decorator which only allows a function to run once

ajustador.utilities.permutations_to_achieve_order(src, dst)[source]
ajustador.utilities.reorder_array(x, order)[source]
ajustador.utilities.reorder_list(x, order)[source]

ajustador.compat

class ajustador.compat.TemporaryDirectory(suffix='', prefix='tmp', dir=None)[source]

Create and return a temporary directory. This has the same behavior as mkdtemp but can be used as a context manager. For example:

with TemporaryDirectory() as tmpdir:

Upon exiting the context, the directory and everything contained in it are removed.

cleanup()[source]
name = None