Create a shallow copy.
438508
def copy(self):
        """"""
        return self.__class__(self.record.copy(),
                              self.variables,  # a new one is made in all cases
                              self.info.copy(),
                              self.vartype)
72130
def clone(self, config, **kwargs):
        """"""
        gta = GTAnalysis(config, **kwargs)
        gta._roi = copy.deepcopy(self.roi)
        return gta
1018040
def _copy_new_parent(self, parent):
        """"""
        if self.parent == "undefined":
            param = copy.copy(self)
            param.parent = parent.uid
            return param
        else:
            raise ValueError("Cannot copy from non-dummy parent %s." % parent)
1297498
def copy(self):
        """"""
        attrs = {k: self.__dict__[k].copy() for k in self.containers}
        attrs.update({k: cp.deepcopy(self.__dict__[k]) for k in self.shared})
        return self.__class__(**attrs)
1046983
def copy(self):
        """"""
        return self._fromset(set(self._set), key=self._key)
90165
@Override
    public final Archive<T> shallowCopy(Filter<ArchivePath> filter) {
        Validate.notNull(filter, "Filter must be specified");
        // Use existing configuration
        final Configuration configuration = this.getConfiguration();

        // Create a new archive to which we'll shallow copy all assets
        final Archive<T> from = this;

        //TODO SHRINKWRAP-362
        /*
         * The design of this particular hack is particularly offensive:
         *
         * First off, we're binding this abstract parent to use a specific
         * implementation in creating new instances.
         *
         * Second, there's the unchecked casting.
         *
         * Mostly, however, is that this "shallowCopy" issue
         * denoted by SHRINKWRAP-353 calls into question
         * the whole design of having ArchiveBase implement
         * the full contract set defined by Archive.  Archive is
         * targeted to be an end-user view; and ArchiveBase is really
         * a set of operations for the underlying storage mechanism.  What
         * would be much more appropriate is a contract set for Archive, and
         * a separate contract for the underlying storage (ie. file system).
         * To be addressed in SHRINKWRAP-362.
         *
         */
        @SuppressWarnings("unchecked")
        final Archive<T> to = Archive.class.cast(new MemoryMapArchiveImpl(configuration));

        // Now loop through and add all content
        for (final ArchivePath path : from.getContent().keySet()) {
            Asset asset = from.get(path).getAsset();
            if (asset != null) {
                if(!filter.include(path)) {
                    continue;
                }
                to.add(asset, path);
            }
        }

        // Return
        return to;
    }
482813
def copy(self, deep=True):
        
        return self.__constructor__(query_compiler=self._query_compiler.copy())
885148
def copy(self):
        """"""
        new_dict = IDict(std=self._std)
        new_dict.update(self.store)
        return new_dict
1265680
def copy(self):
        """"""
        missing = object()
        result = object.__new__(self.__class__)
        for name in self.__slots__:
            val = getattr(self, name, missing)
            if val is not missing:
                setattr(result, name, val)
        return result
562966
function shallowClone(obj) {
    let result = {};
    for (let p in obj) {
        if (obj.hasOwnProperty(p)) {
            result[p] = obj[p];
        }
    }
    return result;
}
1152652
def _copy(self):
        """"""

        items = self.items()
        subs = {}
        for f in (self.getall("CHAP") + self.getall("CTOC")):
            subs[f.HashKey] = f.sub_frames._copy()
        return (items, subs)
286067
@Override
    public Archive<T> shallowCopy(Filter<ArchivePath> filter) {
        Validate.notNull(filter, "Filter must be specified");

        // Get the actual class type and make a shallow copy of the the underlying archive,
        // using the same underlying configuration
        final Class<T> actualClass = this.getActualClass();
        final Archive<?> underlyingArchive = this.getArchive();
        final Configuration existingConfig = ((Configurable) underlyingArchive).getConfiguration();
        final Domain domain = ShrinkWrap.createDomain(existingConfig);
        final ArchiveFactory factory = domain.getArchiveFactory();
        final Archive<T> newArchive = factory.create(actualClass, this.getName());
        final Map<ArchivePath, Node> contents = underlyingArchive.getContent();
        for (final ArchivePath path : contents.keySet()) {
            Asset asset = contents.get(path).getAsset();
            if (asset != null) {
                if(!filter.include(path)) {
                    continue;
                }
                newArchive.add(asset, path);
            }
        }
        return newArchive;
    }
886873
def deep_copy(item_original):
    """"""
    item = copy.copy(item_original)
    item._id = uuid.uuid4().hex
    if hasattr(item, '_children') and len(item._children) > 0:
        children_new = collections.OrderedDict()
        for subitem_original in item._children.values():
            subitem = deep_copy(subitem_original)
            subitem._parent = item
            children_new[subitem.get_name()] = subitem
        item._children = children_new
    return item
211980
def clone(self):
    """"""
    return type(self)(self.__cmp, self.__key, self.__reverse, name = self.name, dataFormat = self._dataFormat)
171013
def copy(self):
        """"""
        return Poly(self.A.copy(), self.dim, self.shape,
            self.dtype)
883947
def clone(self):
        """"""
        clone_copy = copy.deepcopy(self)
        clone_copy.state_ = EntityState()

        return clone_copy
103610
function copy (src, dst) {
  return new Promise((resolve, reject) => {
    fs.createReadStream(src)
      .on('error', reject)
      .pipe(fs.createWriteStream(dst)
              .on('error', reject)
              .on('close', resolve)
      )
  })
}