subgrounds.utils module
Utility module for Subgrounds
- subgrounds.utils.flatten(t)
- subgrounds.utils.identity(x)
- subgrounds.utils.fst(tup)
- subgrounds.utils.snd(tup)
- subgrounds.utils.intersection(l1, l2, key=<function identity>, combine=<function <lambda>>)
- subgrounds.utils.rel_complement(l1, l2, key=<function identity>)
- subgrounds.utils.sym_diff(l1, l2, key=<function identity>)
- subgrounds.utils.union(l1, l2, key=<function identity>, combine=<function <lambda>>)
- subgrounds.utils.filter_none(items)
- subgrounds.utils.loop_generator(items)
- subgrounds.utils.repeat(value, n)
- subgrounds.utils.extract_data(keys, data)
- subgrounds.utils.flatten_dict(data, keys=[])
Takes a dictionary containing key-value pairs where all values are of type other than list and flattens it such that all key-value pairs in nested dictionaries are now at depth 1.