helper module
Define misc helper functions.
Todo
Clean this, check what is still used.
- recursive_getter(wanted_key, dictionary, **kwargs)[source]
Get first key in a possibly nested dictionary.
- chunks(lst, n_size)[source]
Yield successive
n_size-ed chunks fromlst.https://stackoverflow.com/questions/312443/how-do-i-split-a-list-into-equal ly-sized-chunks
- remove_duplicates(iterable)[source]
Create an iterator without duplicates.
Taken from: https://stackoverflow.com/questions/32012878/iterator-object-for-removing-duplicates-in-python
- pascal_case(message)[source]
Convert a string to Pascal case (as class names).
Examples
>>> pascal_case("bonjoure sa_vA") "BonjoureSaVa" >>> pascal_case("BonjoureSaVa") "BonjoureSaVa"
- get_constructor(name, constructors)[source]
Get the proper class from a string and dict of classes.
- resample(x_1, y_1, x_2, y_2)[source]
Downsample y_highres(olution) to x_1 or x_2 (the one with low res).