def entropy(data):

    if len(data) == 0:
        return None

    n = sum(data)

    _op = lambda f: f * math.log(f)
    return - sum(_op(float(i) / n) for i in data)
Content is only valid for the next 45 seconds.
dataset/ETHPy150Open yvesalexandre/bandicoot/bandicoot/helper/tools.py/entropy--crossover with--dataset/ETHPy150Open divio/django-cms/cms/test_utils/project/pluginapp/plugins/caching/cms_plugins.py/TimeDeltaCacheExpirationPlugin.get_cache_expiration