[DEPRECATED] Compute the maximum number of record pairs possible.
260
def max_pairs(shape):
    """"""

    if not isinstance(shape, (tuple, list)):
        x = get_length(shape)
        n = int(x * (x - 1) / 2)

    elif (isinstance(shape, (tuple, list)) and len(shape) == 1):
        x = get_length(shape[0])
        n = int(x * (x - 1) / 2)

    else:
        n = numpy.prod([get_length(xi) for xi in shape])

    return n
902195
def maxBoundSize(self):
        """"""
        b = self.polydata(True).GetBounds()
        return max(abs(b[1] - b[0]), abs(b[3] - b[2]), abs(b[5] - b[4]))
156875
def _get_max_name_len(instances):
    """"""
    # FIXME: ec2.instanceCollection doesn't have __len__
    for i in instances:
        return max([len(get_tag_value(i.tags, 'Name')) for i in instances])
    return 0
532406
public long numRecords() {
        if (numRecords == null) {
            try {
                numRecords = indexToKey.getNumRecords();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return numRecords;
    }
1335530
private DoubleMinMax exactMinMax(Relation<O> relation, DistanceQuery<O> distFunc) {
    final FiniteProgress progress = LOG.isVerbose() ? new FiniteProgress("Exact fitting distance computations", relation.size(), LOG) : null;
    DoubleMinMax minmax = new DoubleMinMax();
    // find exact minimum and maximum first.
    for(DBIDIter iditer = relation.iterDBIDs(); iditer.valid(); iditer.advance()) {
      for(DBIDIter iditer2 = relation.iterDBIDs(); iditer2.valid(); iditer2.advance()) {
        // skip the point itself.
        if(DBIDUtil.equal(iditer, iditer2)) {
          continue;
        }
        double d = distFunc.distance(iditer, iditer2);
        minmax.put(d);
      }
      LOG.incrementProcessed(progress);
    }
    LOG.ensureCompleted(progress);
    return minmax;
  }
129389
def list_records(self, limit=None, offset=None):
        
        return self.manager.list_records(self, limit=limit, offset=offset)
796057
private void computeMaximumContextLength() {
        int max = 0;
        for (int i=0; i<trans.length; ++i) {
            int len = trans[i].getMaximumContextLength();
            if (len > max) {
                max = len;
            }
        }
        setMaximumContextLength(max);
    }
1140976
def query(recordings)
      @num += 1 if @num.zero?
      recordings.select! { |r| r[:user] == @user } unless @everyone
      limit = @all ? recordings.length : [@num, recordings.length].min
      recordings.reverse! unless @inorder
      recordings.take(limit)
    end
575594
def max(self):
        
        if len(self._data) == 0:
            return 600
        return next(iter(reversed(sorted(self._data.keys()))))
915170
def count_by(records: Sequence[Dict], field_name: str) -> defaultdict:
    

    counter = defaultdict(int)

    for record in records:
        name = record[field_name]
        counter[name] += 1

    return counter
74234
def _maxlength(X):
    
    N = 0
    for x in X:
        if len(x) > N:
            N = len(x)
    return N
581900
function normalizeLimit (options) {
  const limit = options.limit || options.resultRecordCount || options.count || options.maxFeatures
  // If there is a limit, add 1 to it so we can later calculate a limitExceeded. The result set will be resized accordingly, post SQL
  if (limit) return limit + 1
}
937337
def nRows(self):
        """"""
        if self.nCols: return max([len(x) for x in self.colData])
        else: return 0
1291257
def MaximumLikelihood(self):
        
        prob, val = max((prob, val) for val, prob in self.Items())
        return val
881353
def min_length_discard(records, min_length):
    
    logging.info('Applying _min_length_discard generator: '
                 'discarding records shorter than %d.', min_length)
    for record in records:
        if len(record) < min_length:
            logging.debug('Discarding short sequence: %s, length=%d',
                record.id, len(record))
        else:
            yield record
491611
def __restrictIndex(self, i):
        """"""
        if self.numRecords:
            rmax = self.numRecords - 1
            if abs(i) > rmax:
                raise IndexError("Shape or Record index out of range.")
            if i < 0: i = range(self.numRecords)[i]
        return i
48760
def maximum_syscall_number(self, abi):
        
        if abi not in self.syscall_number_mapping or \
                not self.syscall_number_mapping[abi]:
            return 0
        return max(self.syscall_number_mapping[abi])