Utilz
Convenient helper functions, decorators, and data analysis tools to make life easier with minimal dependencies:
from utilz import mapcat, pmap
# Combine function results into a list, array, or dataframe
mapcat(myfunc, myiterable)
# Syntactic sugar for joblib.Parallel
pmap(myfunc, myiterable, n_jobs=4)
from utilz import log, maybe
# Print the shape of args and outputs before and after execute
@log
def myfunc(args):
return out
# Only run myfunc if results.csv doesn't eist
@maybe('results.csv')
def myfunc(args):
return out
Checkout the overview page for more!