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:
object
Class for simultaneous logging to console and a log file (for purposes of experiments).
- __module__ = 'utils'
- utils.experiment_hash_str(matchup_info, c_props, g_props, main_hs_digits=10, matchup_hs_digits=5, env_hs_digits=3)[source]
Returns a hash string for an experiment, based on its settings and properties.