def perSecond(requestContext, seriesList, maxValue=None):
    results = []
    for series in seriesList:
        newValues = []
        prev = None
        for val in series:
            step = series.step
            if None in (prev, val):
                newValues.append(None)
                prev = val
                continue

            diff = val - prev
            if diff >= 0:
                newValues.append(diff / step)
            elif maxValue is not None and maxValue >= val:
                newValues.append(((maxValue - prev) + val + 1) / step)
            else:
                newValues.append(None)

            prev = val
        newName = "perSecond(%s)" % series.name
        newSeries = TimeSeries(newName, series.start, series.end, series.step,
                               newValues)
        newSeries.pathExpression = newName
        results.append(newSeries)
    return results
Extract an embedded file from the target file, if it matches an extract rule.
dataset/ETHPy150Open brutasse/graphite-api/graphite_api/functions.py/perSecond--crossover with--dataset/ETHPy150Open devttys0/binwalk/src/binwalk/modules/extractor.py/Extractor.extract