Create a fresh (unique) value number.
547996
public ValueNumber createFreshValue() {
        ValueNumber result = ValueNumber.createValueNumber(getNumValuesAllocated());
        allocatedValueList.add(result);
        return result;
    }
670491
def new(cls, num_id, abstractNum_id):
        
        num = OxmlElement('w:num')
        num.numId = num_id
        abstractNumId = CT_DecimalNumber.new(
            'w:abstractNumId', abstractNum_id
        )
        num.append(abstractNumId)
        return num
715989
public void renumberUniqueIDs()
   {
      int uid = firstUniqueID();
      for (T entity : this)
      {
         entity.setUniqueID(Integer.valueOf(uid++));
      }
   }
710173
def write(self, value):
        """"""
        assert self.num_write_waits > 0, self
        self.num_write_waits -= 1
        self.values.append(value)
        if self.readable:
            LOG.debug('%s is now readable', self.name)
1218106
def unique(self, values):
        """"""
        _, count = self.count()
        if not np.array_equiv(count, 1):
            raise ValueError("Not every entry in the table is assigned a unique value")
        return self.sum(values)
645874
def add_unique_id(self):
        
        
        uid = 0
        for feature in self._data["features"]:
            if feature["properties"].get("id"):
                raise Exception("one of the features already had an id field")
            feature["properties"]["id"] = uid
            uid += 1
1051015
def _simple_new(cls, values, name=None, dtype=None, **kwargs):
        
        if not hasattr(values, 'dtype'):
            if (values is None or not len(values)) and dtype is not None:
                values = np.empty(0, dtype=dtype)
            else:
                values = np.array(values, copy=False)
                if is_object_dtype(values):
                    values = cls(values, name=name, dtype=dtype,
                                 **kwargs)._ndarray_values

        if isinstance(values, (ABCSeries, ABCIndexClass)):
            # Index._data must always be an ndarray.
            # This is no-copy for when _values is an ndarray,
            # which should be always at this point.
            values = np.asarray(values._values)

        result = object.__new__(cls)
        result._data = values
        # _index_data is a (temporary?) fix to ensure that the direct data
        # manipulation we do in `_libs/reduction.pyx` continues to work.
        # We need access to the actual ndarray, since we're messing with
        # data buffers and strides. We don't re-use `_ndarray_values`, since
        # we actually set this value too.
        result._index_data = values
        result.name = name
        for k, v in kwargs.items():
            setattr(result, k, v)
        return result._reset_identity()
923773
def new(cls, password, rounds):
        """"""
        if isinstance(password, str):
            password = password.encode('utf8')
        value = bcrypt.hashpw(password, bcrypt.gensalt(rounds))
        return cls(value)
1330106
def new_record(self, key, value):
    
    new_record = self.get('new_record', {})
    ids = self.get('ids', [])

    for value in force_list(value):
        for id_ in force_list(value.get('a')):
            ids.append({
                'schema': 'SPIRES',
                'value': id_,
            })

        new_recid = force_single_element(value.get('d', ''))
        if new_recid:
            new_record = get_record_ref(new_recid, 'authors')

    self['ids'] = ids
    return new_record
1263102
protected void setValue(int newPosition, T1 valueSum, long valueN,
      boolean currentExisting) {
    if (valueN > 0) {
      if (currentExisting) {
        newBasicValueSumList[newPosition] = operations
            .add11(newBasicValueSumList[newPosition], valueSum);
        newBasicValueNList[newPosition] += valueN;
      } else {
        newBasicValueSumList[newPosition] = valueSum;
        newBasicValueNList[newPosition] = valueN;
      }
    }
  }
94664
def new_value(self, name, value):
        """"""
        try:
            # We need to enclose values in a list to be able to send
            # them to the kernel in Python 2
            svalue = [cloudpickle.dumps(value, protocol=PICKLE_PROTOCOL)]

            # Needed to prevent memory leaks. See issue 7158
            if len(svalue) < MAX_SERIALIZED_LENGHT:
                self.shellwidget.set_value(name, svalue)
            else:
                QMessageBox.warning(self, _("Warning"),
                                    _("The object you are trying to modify is "
                                      "too big to be sent back to the kernel. "
                                      "Therefore, your modifications won't "
                                      "take place."))
        except TypeError as e:
            QMessageBox.critical(self, _("Error"),
                                 "TypeError: %s" % to_text_string(e))
        self.shellwidget.refresh_namespacebrowser()
664116
def new_run(self):
        """"""
        self.current_run += 1
        self.runs.append(RunData(self.current_run + 1))
37232
def iuniq(ible):
    """"""
    items = set()
    for item in ible:
        if item not in items:
            items.add(item)
            yield item
1340025
protected void setValue(int newPosition, T1[] values, int number,
      boolean currentExisting) {
    if (number > 0) {
      T1 valueSum = null;
      for (int i = 0; i < number; i++) {
        valueSum = (i == 0) ? values[i] : operations.add11(valueSum, values[i]);
      }
      if (currentExisting) {
        newBasicValueSumList[newPosition] = operations
            .add11(newBasicValueSumList[newPosition], valueSum);
        newBasicValueNList[newPosition] += number;
      } else {
        newBasicValueSumList[newPosition] = valueSum;
        newBasicValueNList[newPosition] = number;
      }
    }
  }
676548
def create_new(cls, oldvalue, *args):
    ""
    if oldvalue is not None:
        raise AlreadyExistsException('%r already exists' % (oldvalue,))
    return cls.create_instance(*args)
1160232
function initializeUnique() {
  uniquecoll = db.addCollection('uniquecoll', {
    unique: ['customId']
  });

  for (var idx = 0; idx < arraySize; idx++) {
    var v1 = genRandomVal();
    var v2 = genRandomVal();

    uniquecoll.insert({
      customId: (arraySize - idx),
      val: v1,
      val2: v2,
      val3: "more data 1234567890"
    });
  }
}
298387
def make_unique_ngrams(s, n):
    """"""
    return set(s[i:i + n] for i in range(len(s) - n + 1))