Copy data from another shard state entity to self.
491099
def copy_from(self, other_state):
    """"""
    for prop in self.properties().values():
      setattr(self, prop.name, getattr(other_state, prop.name))
1061976
def create_new(cls, mapreduce_id, shard_number):
    
    shard_id = cls.shard_id_from_number(mapreduce_id, shard_number)
    state = cls(key_name=shard_id,
                mapreduce_id=mapreduce_id)
    return state
1172823
def copy(self):
        """"""
        other = ConcurrentMeanStdFilter(self.shape)
        other.sync(self)
        return other
1162666
def transfer_all(cls, field_mappings, sources, destination_factory=None):
    """"""
    for index, source in enumerate(sources):
      try:
        yield cls.transfer(field_mappings, source, destination_factory or (lambda x: x))
      except Exception as ex:
        raise Exception("Error with source #{0}: {1}".format(index, ex)) from ex
122133
def copy(self):
        """"""
        return _TimeAnchor(self.reading_id, self.uptime, self.utc, self.is_break, self.exact)
1337805
def copy(self):
        """"""
        other = MeanStdFilter(self.shape)
        other.sync(self)
        return other
906408
def copy(self):
        """"""
        return self.__class__(self._key, self._load, self._iteritems())
1262998
def copy(self):
        """"""
        rv = self.__class__(self.capacity)
        rv._mapping.update(self._mapping)
        rv._queue = deque(self._queue)
        return rv
1221876
def copy(self):
        """"""
        return self.__class__(self, key=self._key, load=self._load)
56640
def initialize_copy(other)
      @fields = {}

      self.type = other.type
      self.key = other.key

      add(other.fields)
    end
1125874
def copy(self, overrides=None, locked=False):
        """"""
        other = copy.copy(self)

        if overrides is not None:
            other.overrides = overrides

        other.locked = locked

        other._uncache()
        return other
643657
def copy(self, key=None):
        
        other = self.__class__(redis=self.redis, key=key)
        other.update(self)

        return other
739159
def Copy(From, To):
    
    from benchbuild.utils.cmd import cp
    cp("-ar", "--reflink=auto", From, To)
1255531
def _copy(self):
        
        table = {}
        for existingState, existingOutputs in self.table.items():
            table[existingState] = {}
            for (existingInput, existingTransition) in existingOutputs.items():
                table[existingState][existingInput] = existingTransition
        return TransitionTable(table)
65508
def duplicate(cls, other):
        """"""
        return cls(other.soil_type, other.thickness, other.shear_vel)
1141825
def copy(self, contents=True):
        ''''''
        cp = connection(self._baseiri, self._attr_cls, self._logger)
        if contents: cp.add_many(self._relationships)

        return cp
635376
def shard(items, num_shards):
  """"""
  sharded = []
  num_per_shard = len(items) // num_shards
  start = 0
  for _ in range(num_shards):
    sharded.append(items[start:start + num_per_shard])
    start += num_per_shard

  remainder = len(items) % num_shards
  start = len(items) - remainder
  for i in range(remainder):
    sharded[i].append(items[start + i])

  assert sum([len(fs) for fs in sharded]) == len(items)
  return sharded