return the beginning of the range at the first accumulated value and the end of the range at the last accumulated value;
185152
function() {
	var _findYear = function(years) {
		return _.toInt( _.reduce(years, function(res, year) {
			return res || ((this._years[year].sum() > 0) ? year : undefined);
		}, undefined, this) );
	};
	
	if (!_findYear.call(this, _.keys(this._years))) {
		return [];
	}
	return _.range( _findYear.call(this, _.keys(this._years)), (_findYear.call(this, _.keys(this._years).reverse() )+1) );
}
1202303
def range(start, stop):
    

    length = stop - start

    out = list(length=length)

    index = 0

    orig_start = start

    while start < stop:
        val = index + orig_start
        out[index] = val
        index = index + 1
        start = orig_start + index

    return out
50292
def sort_ranges(inranges):
  
  return sorted(inranges,key=lambda x: (x.chr,x.start,x.end,x.direction))
288879
function iterRanges(min, max, padding) {
  let index = min;

  return {
    reset: () => { index = min; },
    next: () => {
      if (index <= max) {
        let value = index;
        if (padding) {
          value = padNumber(index, padding);
        }
        index += 1;

        return {
          value,
          done: false,
        };
      }
      return { done: true };
    },
  };
}
912709
def append(self, first, count):
        

        self.__range.append(IdRange(first, count))
509489
function(start, end, query) {
				//console.log("deep.store.Collection.range : ", start, end, query);
				var res = null;
				var total = 0;
				query = query || "";
				return deep.when(this.get(query))
					.done(function(res) {
						total = res.length;
						if (typeof start === 'string')
							start = parseInt(start);
						if (typeof end === 'string')
							end = parseInt(end);
						start = Math.min(start, total);
						res = res.slice(start, end + 1);
						end = start + res.length - 1;
						query += "&limit(" + (res.length) + "," + start + ")";
						return ranger.createRangeObject(start, end, total, res.length, deep.utils.copy(res), query);
					});
			}
230404
def range( initial = nil )
      min( initial ? initial.min : nil ) .. max( initial ? initial.max : nil )
    end
473033
def range(self, start='-', stop='+', count=None):
        
        return self.database.xrange(self.key, start, stop, count)
742455
function rangeExtents(ranges) {
  var start = Number.MAX_VALUE;
  var end = Number.MIN_VALUE;
  ranges.map(function (_ref) {
    var rs = _ref.start,
        re = _ref.end;

    start = Math.min(start, rs);
    end = Math.max(end, re);
  });
  return { start: start, end: end };
}
632152
def aggregate(self, start, end):
        '''
        
        '''
        last = self.objects(
            level='daily', date__lte=self.iso(end),
            date__gte=self.iso(start)).order_by('-date').first()
        return last.values[self.name]
840335
function range(begin, end) {
  var interval = arguments.length <= 2 || arguments[2] === undefined ? 1 : arguments[2];

  var a = [];

  for (var i = begin; i < begin + end; i += interval) {
    a.push(i);
  }

  return a;
}
57116
def getrange(self, key, start, end, *, encoding=_NOTSET):
        
        if not isinstance(start, int):
            raise TypeError("start argument must be int")
        if not isinstance(end, int):
            raise TypeError("end argument must be int")
        return self.execute(b'GETRANGE', key, start, end, encoding=encoding)
644038
function rangesIntersect(rangeA, rangeB) {
  return rangeA.compareBoundaryPoints(Range.END_TO_START, rangeB) === -1 &&
    rangeA.compareBoundaryPoints(Range.START_TO_END, rangeB) === 1
}
86781
def _get_content_range(start: Optional[int], end: Optional[int], total: int) -> str:
    
    start = start or 0
    end = (end or total) - 1
    return "bytes %s-%s/%s" % (start, end, total)
313909
function (start, end) {
    var offsetStart;
    var offsetEnd;

    loadBufferIfRequired(start, end);

    offsetStart = start - currentRange.start;
    offsetEnd = offsetStart + (end - start);

    return buffer.slice(offsetStart, offsetEnd);
  }
361616
def lrange(self, name, start, end):
        
        return self.execute_command('LRANGE', name, start, end)
1113154
def _make_elastic_range(begin, end):
    
    # Limit growth for huge numbers of pages.
    starting_factor = max(1, (end - begin) // 100)
    factor = _iter_factors(starting_factor)
    left_half, right_half = [], []
    left_val, right_val = begin, end
    right_val = end
    while left_val < right_val:
        left_half.append(left_val)
        right_half.append(right_val)
        next_factor = next(factor)
        left_val = begin + next_factor
        right_val = end - next_factor
    # If the trends happen to meet exactly at one point, retain it.
    if left_val == right_val:
        left_half.append(left_val)
    right_half.reverse()
    return left_half + right_half