Examines the list and computes the range from it
182544
public void computeRange( SortableParameter_F32 input[] , int start , int length ) {
		if( length == 0 ) {
			divisor = 0;
			return;
		}

		float min,max;

		min = max = input[start].sortValue;

		for( int i = 1; i < length; i++ ) {
			float val = input[start+i].sortValue;
			if( val < min )
				min = val;
			else if( val > max )
				max = val;
		}

		setRange(min,max);
	}
62948
def parse_range_pairs(s, range_separator = '-', convert_to_tuple = True):
    ''' 
    '''
    result = map(sorted,
       map(lambda r:
            (int(r.split(range_separator)[0]), int(r.split(range_separator)[1])) if range_separator in r
            else (int(r), int(r)),
            s.split(',')))
    if convert_to_tuple:
        return tuple(map(tuple, result))
    return result
578543
def search_range(nums, target):
    
    low = 0
    high = len(nums) - 1
    while low <= high:
        mid = low + (high - low) // 2
        if target < nums[mid]:
            high = mid - 1
        elif target > nums[mid]:
            low = mid + 1
        else:
            break

    for j in range(len(nums) - 1, -1, -1):
        if nums[j] == target:
            return [mid, j]

    return [-1, -1]
480525
def range(start, finish, step):
        """"""
        value = start
        while value <= finish:
            yield value
            value += step
1258756
def parse_range_list(ranges):
    
    if not ranges:
        return []
    parts = ranges.split(',')
    out = []
    for part in parts:
        fields = part.split('-', 1)
        if len(fields) == 2:
            start = int(fields[0])
            end = int(fields[1])
            out.extend(range(start, end + 1))
        else:
            out.append(int(fields[0]))
    return out
563408
function getRange(start, limit, raw, store) {
      // Monitor values
      start = start || start === 0 ? parseInt(start) : null;
      limit = limit || limit === 0 ? parseInt(limit) : null;

      var data = raw == false ? store.data.asObject() : Object.assign({}, store.rootData.asObject());
      var rangeData = {};
      var isArray = store.data.__sorted && !raw;
      
      if (isArray) {
        data = raw == false ? store.data.asArray() : Object.assign({}, store.rootData.asObject());
        rangeData = [];
      }
      
      var size = Object.keys(data).length;

      if (
        start &&
        typeof start == "number" &&
        (limit || typeof limit == "number")
      ) {
        var index = 1;

        function rangeLoop(item) {
          // Check start item key
          if (index >= start && index <= limit) {
            if (isArray) {
              rangeData.push(data[item]);
            } else {
              rangeData[item] = data[item];
            }
          }
          index++;
        }
        // Loop through data object items
        if (isArray) {
          for (var i = 0; i < data.length; i++) {
            rangeLoop(i);
            if (index > limit) {
              break;
            }
          }
        } else {
          for (var key in data) {
            rangeLoop(key);
            if (index > limit) {
              break;
            }
          }
        }
      } else {
        vcomet.error.log("store", "Incorrect range values format");
      }
      // Update store data object
      store.rangeData = new Result(rangeData, store, store.data.__sorted);
      store.size = size;

    }
957404
function(_list,_low,_high){
            if (_low>_high) return -1;
            var _middle = Math.ceil((_low+_high)/2),
                _result = _docheck(_list[_middle],_middle,_list);
            if (_result==0)
                return _middle;
            if (_result<0)
                return _doSearch(_list,_low,_middle-1);
            return _doSearch(_list,_middle+1,_high);
        }
449404
def range_piles(ranges):
    
    endpoints = _make_endpoints(ranges)

    for seqid, ends in groupby(endpoints, lambda x: x[0]):
        active = []
        depth = 0
        for seqid, pos, leftright, i, score in ends:
            if leftright == LEFT:
                active.append(i)
                depth += 1
            else:
                depth -= 1

            if depth == 0 and active:
                yield active
                active = []
78203
private int[] range(int start, int end) {
        if (rangeList == null) {
            rangeList = new int[] { start, end+1, HIGH };
        } else {
            rangeList[0] = start;
            rangeList[1] = end+1;
        }
        return rangeList;
    }
511730
function range(start, end) {
  return Array(end - start + 1).fill().map(function (_, index) {
    return start + index;
  });
}
286106
def __cal_continue(cls, list_data):
        
        diff_data = []
        for i in range(1, len(list_data)):
            if list_data[-i] > list_data[-i - 1]:
                diff_data.append(1)
            else:
                diff_data.append(-1)
        cont = 0
        for value in diff_data:
            if value == diff_data[0]:
                cont += 1
            else:
                break
        return cont * diff_data[0]
422713
def ranges(self, start=None, stop=None):
		
		_check_start_stop(start, stop)
		start_loc = self._bisect_right(start)
		if stop is None:
			stop_loc = len(self._keys)
		else:
			stop_loc = self._bisect_left(stop)
		start_val = self._values[start_loc - 1]
		candidate_keys = [start] + self._keys[start_loc:stop_loc] + [stop]
		candidate_values = [start_val] + self._values[start_loc:stop_loc]
		for i, value in enumerate(candidate_values):
			if value is not NOT_SET:
				start_key = candidate_keys[i]
				stop_key = candidate_keys[i + 1]
				yield MappedRange(start_key, stop_key, value)
894043
def find_range(coeffs):
    '''
    
    '''

    coeffs = [float(x) != 0 for x in coeffs]
    first = coeffs.index(True)
    coeffs.reverse()
    last = len(coeffs) - coeffs.index(True) - 1
    return first, last
1050226
public List<?> range(Value begin, Value end) {
		List<Object> results = new ArrayList<Object>();
		Key[] elementKeys = getElementKeys();
		if (elementKeys != null && elementKeys.length > 0) {
			List<Record> records = fetchSubRecords(elementKeys);
			for (Record record : records) {
				if (record != null && filterBinByRange(record, ListElementBinName, begin, end)) {
					results.add(record.getValue(ListElementBinName));
				}
			}
		}
		return results;
	}
367583
def parse_range_header(range):
    '''
    
    '''
    match = re.match('^items=([0-9]+)-([0-9]+)$', range)
    if match:
        start = int(match.group(1))
        finish = int(match.group(2))
        if finish < start:
            finish = start
        return {
            'start': start,
            'finish': finish,
            'number': finish - start + 1
        }
    else:
        return False
1297417
def get_range(self, start=None, stop=None):
		
		return self.from_iterable(self.ranges(start, stop))
90209
def _findrange(parlist,roots=['JUMP','DMXR1_','DMXR2_','DMX_','efac','log10_efac']):
    """"""

    rootdict = {root: [] for root in roots}

    res = []
    for par in parlist:
        found = False
        for root in roots:
            if len(par) > len(root) and par[:len(root)] == root:
                rootdict[root].append(int(par[len(root):]))
                found = True
        if not found:
            res.append(par)

    for root in roots:
        if rootdict[root]:
            if len(rootdict[root]) > 1:
                rmin, rmax = min(rootdict[root]), max(rootdict[root])
                res.append('{0}{{{1}-{2}}}{3}'.format(root,rmin,rmax,
                                                  '(incomplete)' if rmax - rmin != len(rootdict[root]) - 1 else ''))
            else:
                res.append('{0}{1}'.format(root,rootdict[root][0]))
    return res