Assimilate a new value from the stream.
174953
public void add(float datum) {
        sorted = false;
        if (n < k) {
            heap[n++] = datum;
            if (n == k) {
                heapify(heap);
            }
        } else {
            n++;
            if (datum < heap[0]) {
                heap[0] = datum;
                SortUtils.siftDown(heap, 0, k-1);
            }
        }
    }
827779
def addValue(self, _, value):
    """"""
    self.total += self._dataFormat.getValue(value)
108313
public void setValue(Object value) {
    if (value instanceof Iterable<?>) {
      this.value = stream((Iterable<?>) value).map(this::toValue).collect(toList());
    } else {
      this.value = toValue(value);
    }
  }
133017
def parse_value(self, stream):
        
        if self.has_sequence(stream):
            value = self.parse_sequence(stream)
        elif self.has_set(stream):
            value = self.parse_set(stream)
        else:
            value = self.parse_simple_value(stream)

        self.skip_whitespace_or_comment(stream)

        if self.has_units(stream):
            return Units(value, self.parse_units(stream))

        return value
1083724
def translate(cls, val):
        """"""
        if val is None:
            return cls.translate_none(val)
        elif isinstance(val, string_types):
            return cls.translate_str(val)
        # Needs to be before integer checks
        elif isinstance(val, bool):
            return cls.translate_bool(val)
        elif isinstance(val, integer_types):
            return cls.translate_int(val)
        elif isinstance(val, float):
            return cls.translate_float(val)
        elif isinstance(val, dict):
            return cls.translate_dict(val)
        elif isinstance(val, list):
            return cls.translate_list(val)
        # Use this generic translation as a last resort
        return cls.translate_escaped_str(val)
843515
def append(self, value):
        """"""
        len_self = self.redis.rpush(self.key, self._pickle(value))

        if self.writeback:
            self.cache[len_self - 1] = value
157975
private V putImpl(K key, V value)
  {
    V item = null;

    int hash = key.hashCode() & _mask;
    int count = _values.length;

    for (; count > 0; count--) {
      item = _values[hash];

      // No matching item, so create one
      if (item == null) {
        _keys[hash] = key;
        _values[hash] = value;
        _size++;

        return null;
      }

      // matching item gets replaced
      if (_keys[hash].equals(key)) {
        _values[hash] = value;

        return item;
      }

      hash = (hash + 1) & _mask;
    }

    throw new IllegalStateException();
  }
703216
private void putForCreate(K key, V value)
        throws java.io.StreamCorruptedException
    {
        Object k = maskNull(key);
        Object[] tab = table;
        int len = tab.length;
        int i = hash(k, len);

        Object item;
        while ( (item = tab[i]) != null) {
            if (item == k)
                throw new java.io.StreamCorruptedException();
            i = nextKeyIndex(i, len);
        }
        tab[i] = k;
        tab[i + 1] = value;
    }
1335604
def apply(self, mapping):
        """"""
        self.output.seek(0)
        self.output.truncate(0)
        self.interpreter.string(self.template, locals=mapping)
        return self.output.getvalue()
27793
def parse_stream(stream):
    """"""
    code = []

    for (line, col, (token, value)) in Tokenizer(stream).tokenize():
        if token == Tokenizer.STRING:
            value = '"' + value + '"'
        code.append(value)

    return code
558478
def append_string(self, value):
        
        self._stream.append_var_uint32(len(value))
        self._stream.append_raw_bytes(value)
334823
private Item newLong(final long value) {
        Item result = get(key.set(LONG, value));
        if (result == null) {
            pool.putByte(LONG).putLong(value);
            result = new Item(poolIndex, key);
            put(result);
            poolIndex += 2;
        }
        return result;
    }
1103859
def _cast_float(self, value):
        """"""
        try:
            return float(value)
        except ValueError:
            msg.err("Cannot convert {} to float for line {}.".format(value, self.identifier))
            exit(1)
31544
function object (input, value) {
  if (value instanceof Stream) stream(input, value)
  else stringify(input, value)
}
6902
def insert(self, value):
        ""
        key = str(uuid4())
        self.set(key, value)
        return key
38817
def _make_value(self, value):
        """"""
        member = self.__new__(self, value)
        member.__init__(value)
        return member
1116414
def encode(self, value):
        """"""
        if isinstance(value, bytes):
            return value
        elif isinstance(value, int):
            value = b(str(value))
        elif isinstance(value, float):
            value = b(repr(value))
        elif not isinstance(value, str):
            value = str(value)
        if isinstance(value, str):
            value = value.encode()
        return value