curver.kernel.utilities module

A module of useful, generic functions; including input and output formatting.

curver.kernel.utilities.alphanum_key(strn)[source]

Return a list of string and number chunks from a string.

curver.kernel.utilities.b64decode(strn)[source]

Return the integer with base 64 encoding strn.

curver.kernel.utilities.b64encode(n)[source]

Return n in base 64.

curver.kernel.utilities.cyclic_slice(L, x, y)[source]

Return the sublist of L from x (inclusive) to y (exclusive).

L may be cyclically permuted if needed.

curver.kernel.utilities.matrix_vector(M, v)[source]

Return M*v where v is interpreted as a column vector.

curver.kernel.utilities.maximum(iterable, key=<function <lambda>>, upper_bound=None)[source]

Return the maximum of iterable but terminate early when given an upper_bound.

curver.kernel.utilities.name_objects(objects, skip=None)[source]

Return a list of pairs (name, object).

curver.kernel.utilities.string_generator(n, skip=None)[source]

Return a list of n usable names, none of which are in skip.