Find the maximum item in this RDD.

        :param key: A function used to generate key for comparing

        >>> rdd = sc.parallelize([1.0, 5.0, 43.0, 10.0])
        >>> rdd.max()
        43.0
        >>> rdd.max(key=str)
        5.0
547805
def max(self, key=None):
        
        if key is None:
            return self.reduce(max)
        return self.reduce(lambda a, b: max(a, b, key=key))
141844
public static <T> T max(Iterable<T> items) {
        T answer = null;
        for (T value : items) {
            if (value != null) {
                if (answer == null || ScriptBytecodeAdapter.compareGreaterThan(value, answer)) {
                    answer = value;
                }
            }
        }
        return answer;
    }
1291257
def MaximumLikelihood(self):
        
        prob, val = max((prob, val) for val, prob in self.Items())
        return val
789776
def max(self, property):
        
        self.__prepare()
        try:
            return max(self._json_data, key=lambda x: x[property]).get(property)
        except KeyError:
            raise KeyError("Key is not exists")
235972
def split_key(key, max = Float::INFINITY)
      parts = []
      pos   = 0
      return [key] if max == 1
      key_parts(key) do |part|
        parts << part
        pos += part.length + 1
        if parts.length + 1 >= max
          parts << key[pos..-1] unless pos == key.length
          break
        end
      end
      parts
    end
1353288
def get_index(self, key: Hashable) -> pd.Index:
        
        if key not in self.dims:
            raise KeyError(key)

        try:
            return self.indexes[key]
        except KeyError:
            # need to ensure dtype=int64 in case range is empty on Python 2
            return pd.Index(range(self.sizes[key]), name=key, dtype=np.int64)
171385
public function max($key)
    {
        return $this->reduce(function($result, $item) use ($key)
        {
            return (is_null($result) || $item->{$key} > $result) ? $item->{$key} : $result;
        });
    }
43143
def getitem_row_array(self, key):
        
        # Convert to list for type checking
        key = list(key)

        def getitem(df, internal_indices=[]):
            return df.iloc[internal_indices]

        result = self.data.apply_func_to_select_indices(
            1, getitem, key, keep_remaining=False
        )
        # We can't just set the index to key here because there may be multiple
        # instances of a key.
        new_index = self.index[key]
        return self.__constructor__(result, new_index, self.columns, self._dtype_cache)
992483
def maxId(self):
        """"""
        if len(self.model.db) == 0:
            return 0

        return max(map(lambda obj: obj["id"], self.model.db))
479182
def nlargest(n, iterable, key=None):
    

    # Short-cut for n==1 is to use max()
    if n == 1:
        it = iter(iterable)
        sentinel = object()
        if key is None:
            result = max(it, default=sentinel)
        else:
            result = max(it, default=sentinel, key=key)
        return [] if result is sentinel else [result]

    # When n>=size, it's faster to use sorted()
    try:
        size = len(iterable)
    except (TypeError, AttributeError):
        pass
    else:
        if n >= size:
            return sorted(iterable, key=key, reverse=True)[:n]

    # When key is none, use simpler decoration
    if key is None:
        it = iter(iterable)
        result = [(elem, i) for i, elem in zip(range(0, -n, -1), it)]
        if not result:
            return result
        heapify(result)
        top = result[0][0]
        order = -n
        _heapreplace = heapreplace
        for elem in it:
            if top < elem:
                _heapreplace(result, (elem, order))
                top = result[0][0]
                order -= 1
        result.sort(reverse=True)
        return [r[0] for r in result]

    # General case, slowest method
    it = iter(iterable)
    result = [(key(elem), i, elem) for i, elem in zip(range(0, -n, -1), it)]
    if not result:
        return result
    heapify(result)
    top = result[0][0]
    order = -n
    _heapreplace = heapreplace
    for elem in it:
        k = key(elem)
        if top < k:
            _heapreplace(result, (k, order, elem))
            top = result[0][0]
            order -= 1
    result.sort(reverse=True)
    return [r[2] for r in result]
223242
private RedBlackTreeNode<Key, Value> max(RedBlackTreeNode<Key, Value> x) {
	// assert x != null;
	if (x.getRight() == null)
	    return x;
	else
	    return max(x.getRight());
    }
1194518
def _parse_canonical_maxkey(doc):
    """"""
    if doc['$maxKey'] is not 1:
        raise TypeError('$maxKey value must be 1: %s', (doc,))
    if len(doc) != 1:
        raise TypeError('Bad $minKey, extra field(s): %s' % (doc,))
    return MaxKey()
1368811
def get_range_by_effective_partition_key(self, effective_partition_key_value):
        
        if _CollectionRoutingMap.MinimumInclusiveEffectivePartitionKey == effective_partition_key_value:
            return self._orderedPartitionKeyRanges[0]
        
        if _CollectionRoutingMap.MaximumExclusiveEffectivePartitionKey == effective_partition_key_value:
            return None
        
        sortedLow = [(r.min, not r.isMinInclusive) for r in self._orderedRanges]

        index = bisect.bisect_right(sortedLow, (effective_partition_key_value, True))
        if (index > 0):
            index = index -1
        return self._orderedPartitionKeyRanges[index]
1367235
def get(key, options = {})
    options[:min] ||= 0.0
    options[:max] ||= options[:min] + 1.0
    (get_unit(key) * (options[:max] - options[:min])) + options[:min]
  end
1355048
def max(cls):
        """"""
        max_recid = db.session.query(func.max(cls.recid)).scalar()
        return max_recid if max_recid else 0
923049
def _validate_key(self, key):
        
        if key == () and len(self.kdims) == 0: return ()
        key = util.wrap_tuple(key)
        assert len(key) == len(self.kdims)
        for ind, val in enumerate(key):
            kdim = self.kdims[ind]
            low, high = util.max_range([kdim.range, kdim.soft_range])
            if util.is_number(low) and util.isfinite(low):
                if val < low:
                    raise KeyError("Key value %s below lower bound %s"
                                   % (val, low))
            if util.is_number(high) and util.isfinite(high):
                if val > high:
                    raise KeyError("Key value %s above upper bound %s"
                                   % (val, high))
753926
def _GetContainingRange(self, partition_key):
        
        for keyrange in self.partition_map.keys():
            if keyrange.Contains(partition_key):
                return keyrange

        return None