utils module
Auxiliary module with simple utility and informative functions.
Link to project repository
- utils.dict_to_str(d, indent=0)[source]
Returns a vertically formatted string representation of a dictionary.
- utils.list_to_str(l, indent=0)[source]
Returns a vertically formatted string representation of a list.
- utils.hash_function(s)[source]
Returns a hash code (integer) for given string as a base 31 expansion.
- class utils.Logger(fname)[source]
Bases:
objectClass for simultaneous logging to console and a log file (for purposes of experiments).
- __module__ = 'utils'