Helper function to restore index information after collection. Doesn't
    use self so we can serialize this.
482228
def _update_index_on_df(df, index_names):
    """"""
    if index_names:
        df = df.set_index(index_names)
        # Remove names from unnamed indexes
        index_names = _denormalize_index_names(index_names)
        df.index.names = index_names
    return df
121127
def reindex():
    ''''''
    header('Reindexing all advices')
    echo('Deleting index {0}', white(es.index_name))
    if es.indices.exists(es.index_name):
        es.indices.delete(index=es.index_name)
    es.initialize()

    idx = 0
    for idx, advice in enumerate(Advice.objects, 1):
        index(advice)
        echo('.' if idx % 50 else white(idx), nl=False)
    echo(white(idx) if idx % 50 else '')
    es.indices.refresh(index=es.index_name)
    success('Indexed {0} advices', idx)
26353
def saveCopy(self) :
        ""
        old_key = self._key
        self.reset(self.collection)
        self.save()
        return (old_key, self._key)
737847
@Override
    public void upgrade() {
        this.indexSetService.findAll()
            .stream()
            .map(mongoIndexSetFactory::create)
            .flatMap(indexSet -> getReopenedIndices(indexSet).stream())
            .map(indexName -> { LOG.debug("Marking index {} to be reopened using alias.", indexName); return indexName; })
            .forEach(indices::markIndexReopened);
    }
419351
def reindex(report):
    """"""
    index = list(report.index)
    i = index.index('TOTAL')
    return report.reindex(index[:i] + index[i+1:] + ['TOTAL'])
547417
def indices_removed(lst, idxs):
    ''''''
    ret = [item for k,item in enumerate(lst) if k not in idxs]
    return type(lst)(ret)
639790
def reset_index(self, inplace=True, drop=True):
        
        if len(self.column_types) == 1:
            vectype = self.column_types[0]
            if isinstance(vectype, WeldVec):
                elem_type = vectype.elemType
                if isinstance(elem_type, WeldStruct):
                    self.column_types = elem_type.field_types
                    value_type = WeldStruct(self.column_types)
                else:
                    self.column_types = elem_type
                    value_type = elem_type
                if len(self.grouping_column_types) == 1:
                    group_type = self.grouping_column_types[0]
                else:
                    group_type = WeldStruct(self.grouping_column_types)

                self.weld_type = WeldStruct([group_type, value_type])
                self.expr = grizzly_impl.flatten_group(
                    self.expr,
                    self.column_types,
                    self.grouping_column_types
                )
964580
def clean_indexes(self):
        
        self.sort()
        for index, item in enumerate(self):
            item.index = index + 1
699110
def _reset_non_empty(self, indices):
    
    observ = tf.py_func(
        self._batch_env.reset, [indices], self.observ_dtype, name="reset")
    observ.set_shape(indices.get_shape().concatenate(self.observ_shape))
    with tf.control_dependencies([
        tf.scatter_update(self._observ, indices, observ)]):
      return tf.identity(observ)
1135682
def restore_collection(backup):
    
    for k, v in six.iteritems(backup):
        del tf.get_collection_ref(k)[:]
        tf.get_collection_ref(k).extend(v)
74738
def restore(self, x):
    
    with tf.name_scope("pad_reduce/restore"):
      x = tf.scatter_nd(
          indices=self.nonpad_ids,
          updates=x,
          shape=tf.concat([self.dim_origin, tf.shape(x)[1:]], axis=0),
      )
    return x
883147
private synchronized void freeIndexInformation() {
    while (totalMemoryUsed.get() > totalMemoryAllowed) {
      String s = queue.remove();
      IndexInformation info = cache.remove(s);
      if (info != null) {
        totalMemoryUsed.addAndGet(-info.getSize());
      }
    }
  }
469189
def remove(self):
        """"""
        if self._own_index is not None and self.parent:
            self.parent.pop(self._own_index)
        return self
257150
public function reindex()
    {
        if ($this->index_field !== null) {
            $this->objects_by_index = array();
            $index_field = $this->index_field;
            foreach ($this->objects as $object) {
                if (isset($object->$index_field)) {
                    $this->objects_by_index[$object->$index_field] = $object;
                }
            }
        }
    }
27839
function refreshIndex () {
    ctrl.selectedIndex = getNearestSafeIndex(ctrl.selectedIndex);
    ctrl.focusIndex    = getNearestSafeIndex(ctrl.focusIndex);
  }
738119
public function rebuildIndex()
    {
        $this->rowsIndexByLabel = array();
        $this->rebuildIndexContinuously = true;

        foreach ($this->rows as $id => $row) {
            $label = $row->getColumn('label');
            if ($label !== false) {
                $this->rowsIndexByLabel[$label] = $id;
            }
        }

        if ($this->summaryRow) {
            $label = $this->summaryRow->getColumn('label');
            if ($label !== false) {
                $this->rowsIndexByLabel[$label] = DataTable::ID_SUMMARY_ROW;
            }
        }

        $this->indexNotUpToDate = false;
    }
928198
function(index)
  {
    var key = this.keys[ index ];
    var lastValue = AP.pop.apply( this.values );
    var lastKey = AP.pop.apply( this.keys );

    if ( index < this.values.length )
    {
      this.values[ index ] = lastValue;
      this.keys[ index ] = lastKey;
      this.indices[ lastKey ] = index;
    }

    delete this.indices[ key ];

    return this;
  }