def _get_historic_means(self, timeSeries):
        # calculate the history values
        historyLength = self._historyLength
        historicMeans = []
        append        = historicMeans.append

        # not most optimized loop in case of calculation operations
        for startIdx in xrange(len(timeSeries) - historyLength - 1):
            value = 0
            for idx in xrange(startIdx, startIdx + historyLength):
                value += abs(timeSeries[idx+1][1] - timeSeries[idx][1])

            append(value / float(historyLength))

        return historicMeans
Ensures a request has permission to access the given project.
dataset/ETHPy150Open T-002/pycast/pycast/errors/meanabsolutescalederror.py/MeanAbsoluteScaledError._get_historic_means--crossover with--dataset/ETHPy150Open openstack/rack/rack/context.py/authorize_project_context