Get the biggest of all the things
192722
function MaxFunction(win) { 
  var self = this, r;
  self.win = win;
  self.name = "max";
  self.type = "ordered_reverse";
  self.init = function() { r = null; };
  self.accumulate = function(v) { if (v == null) { return; } if (r == null) { r = v; return; } r = (v > r) ? v : r; };
  self.compensate = function(v) { r = self.win.max(); };
  self.emit = function()  { return r; };
  self.make = function(win) { return new MaxFunction(win); };
}
476011
def fetch(self):
    """"""
    length = np.random.randint(1, self._max_length + 1)
    nesting = np.random.randint(1, self._max_length + 1)
    return length, nesting
990462
private V getBest(int t, byte[] b, int offset, int len) {
        for (int i = 0; i < len; i++) {
            byte c = b[offset + i];
            int index = __lookup[c & 0x7f];
            if (index >= 0) {
                int idx = t * ROW_SIZE + index;
                int nt = _rowIndex[idx];
                if (nt == 0)
                    break;
                t = nt;
            } else {
                char[] big = _bigIndex == null ? null : _bigIndex[t];
                if (big == null)
                    return null;
                int nt = big[c];
                if (nt == 0)
                    break;
                t = nt;
            }

            // Is the next Trie is a match
            if (_key[t] != null) {
                // Recurse so we can remember this possibility
                V best = getBest(t, b, offset + i + 1, len - i - 1);
                if (best != null)
                    return best;
                break;
            }
        }
        return (V) _value[t];
    }
1084273
def global_items(self):
        """"""
        for (k, v) in self.sql('global_dump'):
            yield (self.unpack(k), self.unpack(v))
203843
def get(self, **kwargs):
        ""
        kwargs.setdefault('limit', 1)
        return self._first(self.gather(**kwargs))
660261
function findBiggestUtxo(utxos) {
  var largestAmount = 0;
  var largestIndex = 0;

  for (var i = 0; i < utxos.length; i++) {
    var thisUtxo = utxos[i];

    if (thisUtxo.satoshis > largestAmount) {
      largestAmount = thisUtxo.satoshis;
      largestIndex = i;
    }
  }

  return utxos[largestIndex];
}
177027
def upload_large_items(self):
        
        for local_file, parent in self.large_items:
            if local_file.need_to_send:
                self.process_large_file(local_file, parent)
737017
def max(self):
        
        if(self._clean.isDict()):
            return self._wrap(list())
        return self._wrap(max(self.obj))
1225118
def _get_best_indexes(logits, n_best_size):
    """"""
    index_and_score = sorted(enumerate(logits), key=lambda x: x[1], reverse=True)

    best_indexes = []
    for i in range(len(index_and_score)):
        if i >= n_best_size:
            break
        best_indexes.append(index_and_score[i][0])
    return best_indexes
866079
def get_all(kind='2'):
        '''
        
        '''
        return TabPost.select().where(
            (TabPost.kind == kind) &
            (TabPost.valid == 1)
        ).order_by(
            TabPost.time_update.desc()
        )
596042
def getsize(store, path=None):
    """"""
    path = normalize_storage_path(path)
    if hasattr(store, 'getsize'):
        # pass through
        return store.getsize(path)
    elif isinstance(store, dict):
        # compute from size of values
        if path in store:
            v = store[path]
            size = buffer_size(v)
        else:
            members = listdir(store, path)
            prefix = _path_to_prefix(path)
            size = 0
            for k in members:
                try:
                    v = store[prefix + k]
                except KeyError:
                    pass
                else:
                    try:
                        size += buffer_size(v)
                    except TypeError:
                        return -1
        return size
    else:
        return -1
902379
def all(self, data={}, **kwargs):
        "
        return super(Payment, self).all(data, **kwargs)
137310
def get_all(self):
        """"""
        url = build_url(self.api_key, self.spot_id, self.fields,
                        self.unit, None, None)
        return get_msw(url)
1117379
def get_max_item(self):
        
        suburl = "v0/maxitem.json"
        try:
            max_item = self._make_request(suburl)
        except requests.HTTPError as e:
            hn_logger.exception('Faulted on get max item, with status {}'.format(e.errno))
            raise e
        return max_item
797144
def _move_to_end(self, objects):
        """"""
        max_obj = objects.all().aggregate(models.Max('sort_order'))['sort_order__max']
        self.sort_order = max_obj + 1 if max_obj else 1
978560
def all(self, data={}, **kwargs):
        "
        return super(Invoice, self).all(data, **kwargs)
1028682
def items(self):
        """"""
        l = []
        for e in self.data:
            l += e.items()
        return l