oats.utils package¶
Submodules¶
oats.utils.constants module¶
oats.utils.utils module¶
-
flatten(l)¶
-
function_wrapper(function, args)¶
-
function_wrapper_with_duration(function, args)¶ Call a function and return the result plus duration in seconds. Args:
function (function): Any arbitrary method. args (list): The arguments to be sent to the function.- Returns:
- tuple: The output of the function and runtime in seconds.
-
load_from_pickle(path)¶
-
remove_duplicates_retain_order(seq)¶ Code credited to https://stackoverflow.com/a/480227.
- Args:
- seq (list): Any list of any datatype.
- Returns:
- list: The list in same order but only first occurence of all duplicates retained.
-
save_to_pickle(obj, path)¶
-
to_hms(num_seconds)¶