find lowest place not taken
502142
function getPlace() {
      var place = 0;
      while (takenPlaces.indexOf(place) !== -1) {
        place++;
      }
      takenPlaces.push(place);
      return place;
    }
753895
def downto(min)
      if block_given?
        super {|dt| yield dt.clear_timezone_offset }
      else
        enum = super
        enum.each {|dt| dt.clear_timezone_offset }
        enum
      end
    end
961106
def __findRange(self, excelLib, start, end):
        '''  '''
        inc = 1
        low = 0
        high = 0
        dates = excelLib.readCol(0, 1)

        for index, date in enumerate(dates):
            if int(start) <= int(date):
                low = index + inc
                break

        if low:
            for index, date in reversed(list(enumerate(dates))):
                if int(date) <= int(end):
                    high = index + inc
                    break

        return low, high
1101354
def min(self, default=None):
        
        return numpy.asscalar(numpy.min(self.values)) if self.values else default
251406
def get_all_lower(self):
        """"""
        all_lower = set()
        for lower in self.get_goterms_lower():
            all_lower.add(lower.item_id)
            all_lower |= lower.get_all_lower()
        return all_lower
741630
def get_minimum(self, other):
        """"""
        return Point(min(self.x, other.x), min(self.y, other.y))
518830
def wherenot(self, fieldname, value):
        
        return self.where(fieldname, value, negate=True)
832030
def smallest(self):
        

        heap = self._heap
        v, k = heap[0]
        while k not in self or self[k] != v:
            heappop(heap)
            v, k = heap[0]

        return k
391862
private int binarySlotSearch() {

        int low     = 0;
        int high    = count;
        int mid     = 0;
        int compare = 0;

        while (low < high) {
            mid     = (low + high) / 2;
            compare = compare(mid);

            if (compare <= 0) {
                high = mid;
            } else {
                low = mid + 1;
            }
        }

        return low;
    }
868045
def min_or_none(val1, val2):
    """"""
    return min(val1, val2, key=lambda x: sys.maxint if x is None else x)
793812
def find_stop(self, query, direction=""):
        
        _directions = ["inbound", "outbound", ""]
        direction = direction.lower()
        if direction == "inbound":
            stops = self.inbound_stops
        elif direction == "outbound":
            stops = self.outbound_stops
        else:
            stops = self.inbound_stops + self.outbound_stops
        
        found = []
        for stop in stops:
            q = str(query).lower()
            if q in stop.name.lower() or q in str(stop.id).lower():
                found.append(stop)
        return found
131704
def low(self):
        """"""
        with self.lock:
            try:
                return self.data[-1][1]
            except IndexError as ex:
                ex.args = ('DEPQ is empty',)
                raise
727706
def find_location(rows, element_to_find):
    ''''''
    for ir, row in enumerate(rows):
        for ic, element in enumerate(row):
            if element == element_to_find:
                return ir, ic
476887
def nearest(self, idx):
        """"""
        hi = self.after(idx)
        lo = self.before(idx)
        if hi is None:
            return lo
        if lo is None:
            return hi
        if abs(hi - idx) < abs(lo - idx):
            return hi
        return lo
934463
def low(self, fun, low):
        '''
        
        '''
        l_fun = getattr(self, fun)
        f_call = salt.utils.args.format_call(l_fun, low)
        return l_fun(*f_call.get('args', ()), **f_call.get('kwargs', {}))
170877
function locationInRangeLoc(loc, start, end) {
    if (loc.line < start.line || end.line < loc.line) {
        return false
    }
    if (loc.line === start.line) {
        if (start.column > loc.column) {
            return false
        }
    }
    if (loc.line === end.line) {
        if (loc.column >= end.column) {
            return false
        }
    }
    return true
}
891371
function filterInPlace (arr, pred) {
  var idx = 0;
  for (var ii = 0; ii < arr.length; ++ii) {
    if (pred(arr[ii])) {
      arr[idx] = arr[ii];
      ++idx;
    }
  }
  arr.length = idx;
}