100+ results results for 'deepcopy' (13 ms)
13from allhadronic.golden_cff import * 14from copy import deepcopy 15 21 22default_ntuple = deepcopy(defaultConfig.Ntuple) 23 26 27default_cc = deepcopy(defaultConfig.XCleaning) 28default_cc.Verbose=False 36 37default_common = deepcopy(defaultConfig.Common) 38default_common.ApplyXCleaning=False 42 43conf = deepcopy(defaultConfig) 44conf.Ntuple = deepcopy(ak5_calo)auto_step_size.py https://github.com/jaberg/asgd.git | Python | 142 lines
40 pass 41 other = copy.deepcopy(model) 42 current_step_size = 2 ** log2_size0test_trustregion.py https://github.com/matthew-brett/scipy.git | Python | 108 lines
8import itertools 9from copy import deepcopy 10import numpy as npcommand.py https://github.com/kylebittinger/flactrac.git | Python | 178 lines
117 def set_converted_tags(self, converted_fp, tags): 118 tags = copy.deepcopy(tags) 119 f = mutagen.easyid3.EasyID3(converted_fp)test_key.py https://gitlab.com/hyingzhi/idem-vault | Python | 116 lines
22 value = "secret-value" 23 test_ctx = copy.deepcopy(ctx) 24 test_ctx["test"] = Truetest_metricspace.py https://gitlab.com/tadh/zhang-shasha | Python | 215 lines
201 for A in (randtree(5, repeat=3, width=2) for x in range(N*4)): 202 B = copy.deepcopy(A) 203 node = random.choice([n for n in B.iter()])fake.py https://github.com/santhoshkumartw/openstack-nova.git | Python | 187 lines
103 """Returns list of images.""" 104 return copy.deepcopy(self.images.values()) 105 107 """Return list of detailed image information.""" 108 return copy.deepcopy(self.images.values()) 109 117 if image: 118 return copy.deepcopy(image) 119 LOG.warn('Unable to find image id %s. Have images: %s', 124 """Returns a dict containing image data for the given name.""" 125 images = copy.deepcopy(self.images.values()) 126 for image in images: 150 metadata['id'] = image_id 151 self.images[image_id] = copy.deepcopy(metadata) 152 return self.images[image_id]associations.py https://github.com/terrasea/oauth-2.0-provider.git | Python | 166 lines
9#import transaction 10from copy import deepcopy 11 83 if db.contains(key): 84 return deepcopy(db.get(key)) 85 except Exception, e:__init__.py https://gitlab.com/JigmeDatse/synapse | Python | 182 lines
138 # Signatures is a dict of dicts, and this is faster than doing a 139 # copy.deepcopy 140 signatures = {mine.py https://bitbucket.org/dtim/icfpc2012.git | Python | 186 lines
54 def clone(self): 55 return copy.deepcopy(self) 56__init__.py https://github.com/Drakkar-Software/OctoBot.git | Python | 140 lines
55 matrix_history.append({ 56 "matrix": copy.deepcopy(matrix.get_matrix()), 57 "timestamp": time.time()views.py https://github.com/pythonzm/Ops.git | Python | 132 lines
8 def __init__(self): 9 self.perms_map = copy.deepcopy(self.perms_map) # you need deepcopy when you inherit a dictionary type 10 self.perms_map['GET'] = ['%(app_label)s.add_%(model_name)s']tilequadtree.py https://github.com/totycro/unknown-horizons-quadtree.git | Python | 166 lines
82 self._fillTree(tree) 83 coords = copy.deepcopy(self.default_fill_coords) 84 for tile in tree:test_extended_hypervisors.py git://github.com/openstack/nova.git | Python | 117 lines
48class ExtendedHypervisorsTestV21(test.NoDBTestCase): 49 DETAIL_HYPERS_DICTS = copy.deepcopy(test_hypervisors.TEST_HYPERS) 50 del DETAIL_HYPERS_DICTS[0]['service_id'] 103class ExtendedHypervisorsTestV2(ExtendedHypervisorsTestV21): 104 DETAIL_HYPERS_DICTS = copy.deepcopy(test_hypervisors.TEST_HYPERS) 105 del DETAIL_HYPERS_DICTS[0]['service_id']options.py https://github.com/markmc/nova.git | Python | 171 lines
170 """ 171 return [('database', copy.deepcopy(database_opts))] 172figure_compare_differences.py https://github.com/wafels/eitwave.git | Python | 121 lines
5import os 6from copy import deepcopy 7import numpy as np 58 mc_rd = mapcube_tools.running_difference(mc) 59 new = deepcopy(mc_rd[index]) 60 new.plot_settings['cmap'] = cm.RdGy 65 mc_pbd = mapcube_tools.base_difference(mc, fraction=True) 66 new = deepcopy(mc_pbd[index+1]) 67 new.plot_settings['norm'].vmax = 0.5 74 mc_rdp = mapcube_tools.running_difference(mapcube_tools.persistence(mc)) 75 new = deepcopy(mc_rdp[index]) 76 new.plot_settings['cmap'] = cm.gray_rdelete_model.py https://github.com/abstract-open-solutions/ScrumDo.git | Python | 131 lines
42# Delete a Model 43>>> end_sig = copy.deepcopy(start_sig) 44>>> _ = end_sig['tests'].pop('BasicModel') 44>>> _ = end_sig['tests'].pop('BasicModel') 45>>> end = copy.deepcopy(start) 46>>> _ = end.pop('basicmodel') 51 52>>> test_sig = copy.deepcopy(start_sig) 53>>> test_sql = [] 64# Delete a model with an m2m field 65>>> end_sig = copy.deepcopy(start_sig) 66>>> _ = end_sig['tests'].pop('BasicWithM2MModel') 66>>> _ = end_sig['tests'].pop('BasicWithM2MModel') 67>>> end = copy.deepcopy(start) 68>>> _ = end.pop('basicwithm2mmodel')tests.py https://bitbucket.org/Liosan/gizapi.git | Python | 194 lines
111 # with the flush operation in other tests. 112 old_app_models = copy.deepcopy(cache.app_models) 113 old_app_store = copy.deepcopy(cache.app_store) 138 # with the flush operation in other tests. 139 old_app_models = copy.deepcopy(cache.app_models) 140 old_app_store = copy.deepcopy(cache.app_store) 169 # with the flush operation in other tests. 170 old_app_models = copy.deepcopy(cache.app_models) 171 old_app_store = copy.deepcopy(cache.app_store)hooks.py https://github.com/WXinlong/SOLO.git | Python | 127 lines
40 # keep a copy of fp32 weights 41 runner.optimizer.param_groups = copy.deepcopy( 42 runner.optimizer.param_groups)archive.py https://gitlab.com/sunny94/mailman | Python | 105 lines
90 continue 91 msg_copy = copy.deepcopy(msg) 92 if _should_clobber(msg, msgdata, archiver.name):018_modify_links.py https://github.com/mobyle2-legacy/mobyle2.core.git | Python | 144 lines
13) 14from copy import deepcopy 15import sqlalchemy as sPickleJar.py https://github.com/davidmorrison/indico.git | Python | 263 lines
27def functional_append(list, element): 28 newlist = copy.deepcopy(list) 29 newlist.append(element)tree.py https://github.com/TerrorBite/Mediasnak.git | Python | 153 lines
5 6from django.utils.copycompat import deepcopy 7 54 55 def __deepcopy__(self, memodict): 56 """ 56 """ 57 Utility method used by copy.deepcopy(). 58 """ 60 obj.__class__ = self.__class__ 61 obj.children = deepcopy(self.children, memodict) 62 obj.subtree_parents = deepcopy(self.subtree_parents, memodict)inference_single_image.py https://github.com/supervisely/supervisely.git | Python | 106 lines
1# coding: utf-8 2from copy import deepcopy 3import json 25 logger.info('Starting base single image inference applier init.') 26 task_model_config = self._load_task_model_config() if task_model_config is None else deepcopy(task_model_config) 27 self._config = update_recursively(self.get_default_config(), task_model_config)MockDbsApi.py https://github.com/dmwm/WMCore.git | Python | 143 lines
65 if 'logical_file_name' in kwargs and len(kwargs['logical_file_name']) > 1: 66 origArgs = copy.deepcopy(kwargs) 67 returnDicts = [] 88 if 'logical_file_name' in kwargs and len(kwargs['logical_file_name']) > 1: 89 origArgs = copy.deepcopy(kwargs) 90 returnDicts = []python_test_sharder.py https://github.com/rillian/firefox.git | Python | 203 lines
180 # runnable which it will use to actually execute the tests. 181 test_options = copy.deepcopy(self.options) 182 test_options.ensure_value('device_id', device)font.py https://github.com/pib/enable.git | Python | 161 lines
138 """ 139 return copy.deepcopy(self) 140predict_product.py https://github.com/jnwei/neural_reaction_fingerprint.git | Python | 124 lines
50 # Labeling mark Alkene: 51 alk2 = copy.deepcopy(alk) 52 double_bond_list = GetDoubleBondAtoms(alk2)choices.py https://github.com/openhatch/oh-mainline.git | Python | 153 lines
151 152 def __deepcopy__(self, memo): 153 return self.__class__(*copy.deepcopy(self._triples, memo))migration_2_7_1.py https://github.com/reactiveops/pentagon.git | Python | 119 lines
1from copy import deepcopy 2test_contour.py https://github.com/fspaolo/code.git | Python | 183 lines
167 168 # Now deepcopy the source and replace the existing one with 169 # the copy. This basically simulates cutting/copying the 171 # view, and pasting the copy back. 172 source1 = copy.deepcopy(source) 173 s.children[0] = source1optimizer_wrapper.py https://github.com/Randl/MobileNetV3-pytorch.git | Python | 120 lines
2 3from copy import deepcopy 4 28 self.original_module = module 29 self.float_module = deepcopy(module) 30 self.float_module.to(dtype=torch.float32) 82 """ 83 # deepcopy, to be consistent with module API 84 optimizer_state_dict = state_dict['state']test_multigraph.py https://github.com/eidus/polarbear.git | Python | 230 lines
129 130 def deepcopy_edge_attr(self,H,G): 131 assert_equal(G[1][2][0]['foo'],H[1][2][0]['foo']) 179 H=G.to_undirected() 180 self.is_deepcopy(H,G) 181 187 H=G.to_directed() 188 self.is_deepcopy(H,G) 189driver.py https://github.com/bmiro/carmageddon.git | Python | 243 lines
1# -*- coding: utf-8 -*- 2from copy import deepcopy, copy 3trial_adapter.py https://github.com/dataloop-ai/ZazuML.git | Python | 106 lines
5 6from copy import deepcopy 7import random 39 if 'model' in trial_checkpoint: 40 checkpoint = deepcopy(trial_checkpoint) 41 for x in ['model_fn', 'training_configs', 'data', 'hp_values', 'epoch']:dataset.py https://github.com/DenisVorotyntsev/AutoSeries.git | Python | 145 lines
59 join(self.dataset_dir_, TRAIN_FILE)) 60 return copy.deepcopy(self.train_dataset) 61 66 join(self.dataset_dir_, TEST_FILE)) 67 return copy.deepcopy(self.test_dataset) 68 70 """get metadata""" 71 return copy.deepcopy(self.metadata_) 72 91 ret = self._get_period(None, idx) 92 return copy.deepcopy(ret) 93 99 self.metadata_[LABEL_NAME], axis=1) 100 return copy.deepcopy(data) 101__init__.py https://github.com/sajty/atlas-cpp.git | Python | 191 lines
24import atlas.analyse 25from copy import deepcopy 26from atlas.util.minmax import MinMaxVector 135 if hasattr(obj, "polyline"): 136 obj._polyline = deepcopy(obj.polyline) 137 resolve_list_position(obj, obj._polyline) 138 if hasattr(obj, "area"): 139 obj._area = deepcopy(obj.area) 140 resolve_list_position2(obj, obj._area) 147 limits = MinMaxVector() 148## last_limits = deepcopy(limits) 149 for obj in self.objects.values(): 159## print "area", obj.id, limits 160## last_limits = deepcopy(limits) 161 elif obj._polyline:test_copy.py https://gitlab.com/doublebits/waterbutler | Python | 187 lines
110 111 copy.copy(cp.deepcopy(src_bundle), cp.deepcopy(dest_bundle), '', {'auth': {}}) 112 128 with pytest.raises(Exception): 129 copy.copy(cp.deepcopy(src_bundle), cp.deepcopy(dest_bundle), '', {'auth': {}}) 130 146 147 ret1, ret2 = copy.copy(cp.deepcopy(src_bundle), cp.deepcopy(dest_bundle), 'Test.com', {'auth': {'user': 'name'}}) 148 175 stamp = FAKE_TIME 176 copy.copy(cp.deepcopy(src_bundle), cp.deepcopy(dest_bundle), '', {'auth': {}}, start_time=stamp-100) 177 copy.copy(cp.deepcopy(src_bundle), cp.deepcopy(dest_bundle), '', {'auth': {}}, start_time=stamp+100)test_xml_dom_minicompat.py https://github.com/albertz/CPython.git | Python | 138 lines
119 120 def test_nodelist_deepcopy(self): 121 # Empty NodeList. 122 node_list = NodeList() 123 copied = copy.deepcopy(node_list) 124 self.assertIsNot(copied, node_list) 129 node_list.append([2]) 130 copied = copy.deepcopy(node_list) 131 self.assertIsNot(copied, node_list)smoothing.py https://github.com/adrn/specutils.git | Python | 251 lines
56 # Propagate the uncertainty if it exists... 57 uncertainty = copy.deepcopy(spectrum.uncertainty) 58 if uncertainty is not None:zone.py https://github.com/thearn/OpenMDAO-Framework.git | Python | 278 lines
47 """ Returns a deep copy of self. """ 48 return copy.deepcopy(self) 49test_update_restricted.py https://gitlab.com/unofficial-mirrors/openstack-heat | Python | 168 lines
60 61 update_template = copy.deepcopy(test_template) 62 props = update_template['resources']['bar']['properties'] 97 98 update_template = copy.deepcopy(test_template) 99 props = update_template['resources']['bar']['properties'] 135 136 update_template = copy.deepcopy(test_template) 137 rsrc = update_template['resources']['bar']ak47wiimote.py https://github.com/vranki/wiishooter.git | Python | 333 lines
136 self.center_point() 137 temp_pos = copy.deepcopy(self.cpoint) 138permissionadmin.py https://github.com/conrado/django-cms.git | Python | 181 lines
1# -*- coding: utf-8 -*- 2from copy import deepcopy 3 137 """ 138 fieldsets = deepcopy(self.fieldsets) 139 perm_models = (win_auditpol.py https://github.com/HubbleStack/Nova.git | Python | 177 lines
134 if isinstance(tag, dict): 135 tag_data = copy.deepcopy(tag) 136 tag = tag_data.pop('tag')tempeval2.py https://github.com/cnorthwood/ternip.git | Python | 178 lines
82 """ 83 return copy.deepcopy(self._sents) 84 100 """ 101 self._sents = copy.deepcopy(sents) 102data.py https://github.com/compas-dev/compas.git | Python | 290 lines
7from uuid import uuid4 8from copy import deepcopy 9 247 cls = type(self) 248 return cls.from_data(deepcopy(self.data)) 249Styles.py https://github.com/goldenboy/skiheilw2p.git | Python | 93 lines
17 def Copy( self ) : 18 return deepcopy( self ) 19 52 def Copy( self ) : 53 return deepcopy( self ) 54compat.py https://bitbucket.org/pyinstaller/pyinstaller-cleanup.git | Python | 189 lines
164 165 def __deepcopy__(self, memo={}): 166 from copy import deepcopy 168 memo[id(self)] = result 169 result.__init__(deepcopy(tuple(self), memo)) 170 return resultstdlib.py https://bitbucket.org/tetonedge/linux.git | Python | 131 lines
124 'copy': _return_first_param, 125 'deepcopy': _return_first_param, 126 },lane.py git://github.com/chapmanb/bcbb.git | Python | 92 lines
81 "SNP calling": ["SNP calling", "variant"]} 82 config = copy.deepcopy(config) 83 base_name = lane_info.get("analysis")orderedpersistentmapping.py https://github.com/socialplanning/topp.utils.git | Python | 201 lines
109 110 def __deepcopy__(self, memo): 111 from copy import deepcopy 111 from copy import deepcopy 112 return self.__class__([(key, deepcopy(value, memo)) 113 for key, value in self.iteritems()])transforms.py https://github.com/mluessi/mne-python.git | Python | 235 lines
12 """ 13 itrans = copy.deepcopy(trans) 14 aux = itrans['from'] 178# 179# res = copy.deepcopy(chs) 180# 211# """ 212# res = copy.deepcopy(chs) 213#odict.py https://github.com/straup/recipes.git | Python | 189 lines
4 5from copy import deepcopy 6 33 34 def __deepcopy__(self, memo): 35 return self.__class__([(key, deepcopy(value, memo))update_perf_expectations_unittest.py https://bitbucket.org/peixuan/chromium_r197479_base.git | Python | 204 lines
24 # Work with a copy of the set of tests. 25 all_tests_copy = copy.deepcopy(all_tests) 26 upe_mod.PrepareTestsForUpdate(tests_to_update, all_tests_copy, reva, revb)fake.py https://github.com/gagupta/nova.git | Python | 205 lines
125 """Return list of detailed image information.""" 126 return copy.deepcopy(self.images.values()) 127 135 if image: 136 return copy.deepcopy(image) 137 LOG.warn('Unable to find image id %s. Have images: %s', 142 """Returns a dict containing image data for the given name.""" 143 images = copy.deepcopy(self.images.values()) 144 for image in images: 168 metadata['id'] = image_id 169 self.images[image_id] = copy.deepcopy(metadata) 170 return self.images[image_id] 179 raise exception.ImageNotFound(image_id=image_id) 180 self.images[image_id] = copy.deepcopy(metadata) 181anon_user.py https://github.com/goswami/askbot-devel.git | Python | 75 lines
5To allow anonymous users accept messages, a special 6message manager is defined here, and :meth:`__deepcopy__()` method 7added to the :class:`AnonymousUser` so that user could be pickled. 28 29def dummy_deepcopy(*arg): 30 """this is necessary to prevent deepcopy() on anonymous user object 47 #plug on deepcopy which may be called by django db "driver" 48 request.user.__deepcopy__ = dummy_deepcopy 49 #here request is linked to anon userpolicy_attachment.py https://gitlab.com/pgeorgiev_vmw/idem-aws | Python | 266 lines
96 result["old_state"] = before_ret["ret"] 97 result["new_state"] = copy.deepcopy(before_ret["ret"]) 98 result["comment"] = f"'{name}' already exists"iptvmoviemetadata.py https://gitlab.com/kamoula77/iptvplayer-for-e2 | Python | 296 lines
15except: import simplejson as json 16from copy import deepcopy 17################################################### 60 self.filePath = GetMovieMetaDataDir( RemoveDisallowedFilenameChars( fileName ) ) 61 self.data = deepcopy( self.META_DATA ) 62 self.data.update( {"host":host, "title":title, "file_path":filePath} ) 159 for item in self.data['tracks']['subtitles']['tracks']: 160 track = deepcopy( self.SUBTITLE_TRACK ) 161 track.update(item) 223 try: 224 track = deepcopy( self.SUBTITLE_TRACK ) 225 track.update(subtitlesTrack)rock.py https://bitbucket.org/geordiemhall/fishy.git | Python | 141 lines
91 92 renderShape = copy.deepcopy(self.rockShape) 93 matrix = Matrix33()domain.py https://github.com/thearn/OpenMDAO-Framework.git | Python | 284 lines
71 if make_copy: 72 zone = copy.deepcopy(zone) 73 setattr(self, name, zone) 121 """ Returns a deep copy of self. """ 122 return copy.deepcopy(self) 123delete_field.py https://github.com/abstract-open-solutions/ScrumDo.git | Python | 268 lines
86 87>>> test_sig = copy.deepcopy(start_sig) 88>>> test_sql = [] 114 115>>> test_sig = copy.deepcopy(start_sig) 116>>> test_sql = [] 144 145>>> test_sig = copy.deepcopy(start_sig) 146>>> test_sql = [] 172 173>>> test_sig = copy.deepcopy(start_sig) 174>>> test_sql = [] 200 201>>> test_sig = copy.deepcopy(start_sig) 202>>> test_sql = []menu_pool.py https://github.com/daonb/django-cms.git | Python | 162 lines
123 nodes = self._build_nodes(request, site_id) 124 nodes = copy.deepcopy(nodes) 125 nodes = self.apply_modifiers(nodes, request, namespace, root_id, post_cut=False, breadcrumb=breadcrumb)densesolve.py https://github.com/ArchKaine/sympy.git | Python | 448 lines
43 """ 44 result_matlist = copy.deepcopy(matlist) 45 nrow = len(result_matlist) 75 """ 76 result_matlist = copy.deepcopy(matlist) 77 result_matlist = row_echelon(result_matlist, K) 109 nrow = len(matlist) 110 new_matlist1, new_matlist2 = eye(nrow, K), copy.deepcopy(matlist) 111 for i in range(nrow): 136 """ 137 new_matlist = copy.deepcopy(matlist) 138 nrow = len(new_matlist) 170 """ 171 new_matlist = copy.deepcopy(matlist) 172 nrow = len(new_matlist)test_simple-agenda.py https://github.com/bhutley/PyOrgMode.git | Python | 57 lines
19 # This element is scheduled, we are creating a copy of it 20 data.append(copy.deepcopy(child.parent)) 21 Get_Scheduled_Elements(child,data)appender.py https://github.com/geo-data/medin-rdbms-tool.git | Python | 310 lines
27from suds.sax.text import Text 28from copy import deepcopy 29baserules.py https://gitlab.com/JigmeDatse/synapse | Python | 328 lines
88 # Copy the rules before modifying them 89 rules = copy.deepcopy(rules) 90 for r in rules: 105 # Copy the rules before modifying them 106 rules = copy.deepcopy(rules) 107 for r in rules:Rubik2.py https://github.com/chetmancini/Rubik-s-Cube.git | Python | 415 lines
70 toReturn = [] 71 TopCounter = copy.deepcopy(self) 72 topCounter(TopCounter) 75 76 TopClock = copy.deepcopy(self) 77 topClock(TopClock) 80 81# LeftForward = copy.deepcopy(self) 82# LeftForward.leftForward() 85# 86# LeftBackward = copy.deepcopy(self) 87# LeftBackward.leftBackward() 90# 91# RightForward = copy.deepcopy(self) 92# RightForward.rightForward()test_service.py https://gitlab.com/syjulian/poc-heat-mversion | Python | 288 lines
61 def _setup_service_resource(self, stack_name, use_default=False): 62 tmpl_data = copy.deepcopy(keystone_service_template) 63 if use_default:gaussian.py https://gitlab.com/asod/ase | Python | 138 lines
52 calc_old = self.atoms.calc 53 params_old = copy.deepcopy(self.calc.parameters) 54sidenav_data_source.py https://bitbucket.org/peixuan/chromium_r197479_base.git | Python | 63 lines
59 def get(self, key): 60 sidenav = copy.deepcopy(self._cache.GetFromFile( 61 '%s/%s_sidenav.json' % (self._json_path, key)))test_metric_alarm.py https://gitlab.com/pgeorgiev_vmw/idem-aws | Python | 319 lines
33 # Create metric alarm with test flag 34 test_ctx = copy.deepcopy(ctx) 35 test_ctx["test"] = Trueutils.py https://github.com/kenthauser/django-cms.git | Python | 134 lines
99 # immediately. 100 yield current, copy.deepcopy(structure) 101store_orthomcl_clusters.py https://github.com/tolotos/tfactors.git | Python | 80 lines
63 cluster.add_proteins(hmmout) 64 cluster.counts = copy.deepcopy(species.all()) 65 cluster.add_counts()test_image_plane_widget.py https://github.com/fspaolo/code.git | Python | 153 lines
136 137 # Now deepcopy the source and replace the existing one with 138 # the copy. This basically simulates cutting/copying the 140 # view, and pasting the copy back. 141 sources1 = copy.deepcopy(sources) 142 s.children[:] = sourcesattention_budget.py https://github.com/rte-france/Grid2Op.git | Python | 168 lines
157 self._last_successful_alarm_raised[action.raise_alarm] = env.nb_time_step 158 self._all_successful_alarms.append((env.nb_time_step, copy.deepcopy(action.raise_alarm))) 159 else:train_utils.py https://github.com/TropComplique/image-classification-caltech-256.git | Python | 192 lines
141 model.cpu() 142 clone = copy.deepcopy(model) 143 all_models += [clone.state_dict()]TexasHoldemStatePublic.py https://github.com/roomai/RoomAI.git | Python | 177 lines
116 117 def __deepcopy__(self, memodict={}, newinstance = None): 118 if newinstance is None: 119 newinstance = TexasHoldemStatePublic() 120 newinstance = super(TexasHoldemStatePublic, self).__deepcopy__(newinstance=newinstance) 121 131 else: 132 newinstance.__public_cards__ = [self.public_cards[i].__deepcopy__() for i in range(len(self.public_cards))] 133MB_EditButton.py https://bitbucket.org/codefirex/external_madbutterfly.git | Python | 158 lines
4import gtk 5from copy import deepcopy 6from lxml import etree 63 for n in node: 64 svg.append(deepcopy(n)) 65 fd,fname = tempfile.mkstemp(suffix='.svg') 94 newnode = self.EditFrame(frame) 95 oldframe = deepcopy(frame) 96 frame.clear()datafeeding.py https://github.com/hausdorf/vn.git | Python | 97 lines
67 68def convert_keys(data_dict, alternate_key_map, deepcopy=False): 69 """Convert keys takes a python dictionary, representing a lucene document, 73 74 Deepcopy is supported, but off by default to favor speed. 75 """ 75 """ 76 if deepcopy: 77 data_dict = copy.deepcopy(data_dict)comedycentral_api.py https://github.com/JackOfMostTrades/mythtv.git | Python | 134 lines
35import os, sys, re, time, datetime, shutil, urllib, string 36from copy import deepcopy 37pose_extractor_utils.py https://gitlab.com/jsanch/udom | Python | 265 lines
67 else: 68 mesh_out = copy.deepcopy(mesh) 69 for ii, _ in enumerate(mesh_out.vertices): 239 240 pose_out = copy.deepcopy(pose) 241 orientation_in = (PropertySets.py https://github.com/kaiquewdev/pyrtf.git | Python | 488 lines
12from types import StringType 13from copy import deepcopy 14 40 41 def __deepcopy__( self, memo ) : 42 result = self.__class__() 199 200 def __deepcopy__( self, memo ) : 201 return ShadingPropertySet( self.Shading, 341 def Copy( self ) : 342 return deepcopy( self ) 343 343 344 def __deepcopy__( self, memo ) : 345 # the font must remain a reference to the same font that we are looking atnpda.py https://github.com/caleb531/automata.git | Python | 119 lines
21 self.stack_symbols = stack_symbols.copy() 22 self.transitions = copy.deepcopy(transitions) 23 self.initial_state = initial_stateinput.py https://github.com/TuSimple/simpledet.git | Python | 194 lines
113 self.pyramid_levels = len(self.p.generate.stride) 114 self.p_list = [copy.deepcopy(self.p) for _ in range(self.pyramid_levels)] 115plot_topo.py https://bitbucket.org/hilfialkaff/tomography.git | Python | 62 lines
41 topo = JellyfishTopology(BANDWIDTH, num_host, num_switch, num_port) 42 mgr = Manager(topo, algorithm, Algorithm.K_PATH, deepcopy(jobs), 1, 1) 43 mgr.graph.plot("jf_" + str(num_port)) 48 topo = Jellyfish2Topology(BANDWIDTH, num_host, num_switch, num_port) 49 mgr = Manager(topo, algorithm, Algorithm.K_PATH, deepcopy(jobs), 1, 1) 50 mgr.graph.plot("jf2_" + str(num_port)) 55 topo = FatTreeTopology(BANDWIDTH, i) 56 mgr = Manager(topo, algorithm, Algorithm.FLOYD_WARSHALL, deepcopy(jobs), 1, 1) 57 mgr.graph.plot("ft_" + str(i))tests.py https://github.com/StackOps/horizon.git | Python | 110 lines
20 21from copy import deepcopy 22from django import http 50 def test_edit_attachments_attached_volume(self): 51 servers = deepcopy(self.servers) 52 active_server = deepcopy(self.servers.first()) 55 servers.add(active_server) 56 volumes = deepcopy(self.volumes) 57 volume = deepcopy(self.volumes.first())create_msg.py https://github.com/JimB16/PokePlat.git | Python | 227 lines
7import sys 8from copy import copy, deepcopy 9from ctypes import c_int8trail.py https://gitlab.com/pgeorgiev_vmw/idem-aws | Python | 334 lines
30 old_tags_map = {tag.get("Key"): tag for tag in old_tags or []} 31 tags_result = copy.deepcopy(old_tags_map) 32 if new_tags is not None:test_least_cost_scheduler.py https://github.com/basak/nova.git | Python | 146 lines
136 for idx, (hostname, services) in enumerate(hosts): 137 caps = copy.deepcopy(services) 138 # Costs are normalized so over 10 hosts, each host with increasingadmin.py https://github.com/Tmr/mezzanine.git | Python | 90 lines
1 2from copy import deepcopy 3 12 13form_fieldsets = deepcopy(DisplayableAdmin.fieldsets) 14form_fieldsets[0][1]["fields"] += (("in_navigation", "in_footer"),backtracking.py https://github.com/1000timesdead/portage-funtoo.git | Python | 197 lines
21 22 def __deepcopy__(self, memo=None): 23 if memo is None: 99 self._current_node = node 100 return copy.deepcopy(node.parameter) 101 else: 110 for pkg, parent_atoms in conflict_data: 111 new_node = copy.deepcopy(self._current_node) 112 new_node.depth += 1 120 def _feedback_missing_dep(self, dep): 121 new_node = copy.deepcopy(self._current_node) 122 new_node.depth += 1 136 """ 137 new_node = copy.deepcopy(self._current_node) 138 new_node.depth += 1transformations.py https://github.com/woutersmet/Molmodsummer.git | Python | 145 lines
45 for tt2 in self.test_transformations: 46 temp = copy.deepcopy(tt1) 47 temp.apply_after(tt2) 57 for tt2 in self.test_transformations: 58 temp = copy.deepcopy(tt1) 59 temp.apply_before(tt2) 69 for tt2 in self.test_transformations: 70 temp = copy.deepcopy(tt1) 71 temp.apply_inverse_after(tt2) 81 for tt2 in self.test_transformations: 82 temp = copy.deepcopy(tt1) 83 temp.apply_inverse_before(tt2)test_response.py https://gitlab.com/czm1129/pyspider | Python | 90 lines
43 url = self.httpbin + url 44 request = copy.deepcopy(self.sample_task_http) 45 request['url'] = urlvectorDatasets.py https://github.com/cathywu/Sentiment-Analysis.git | Python | 262 lines
16 17 def copy(self, other, patterns, deepcopy) : 18 """ 23 - `patternsToCopy` - a list of patterns to copy 24 - `deepcopy` - a 0/1 flag telling whether to do deepcopy or not 25 """row.py https://github.com/astrofrog/astropy.git | Python | 148 lines
64 65 meta = defaultdict(dict, copy.deepcopy(row.meta)) 66 # Now need to add the Columnar metadata. This is only available on thetest_modulestore_settings.py https://gitlab.com/unofficial-mirrors/edx-platform | Python | 207 lines
132 # pass a copy of the old setting since the migration modifies the given setting 133 new_mixed_setting = convert_module_store_setting_if_needed(copy.deepcopy(old_setting)) 134description.py https://gitlab.com/pooja043/Globus_Docker_4 | Python | 246 lines
133 @rus.returns ('Description') 134 def __deepcopy__ (self, other) : 135 """dbref.py https://github.com/thearn/OpenMDAO-Framework.git | Python | 147 lines
16 17from copy import deepcopy 18 138 139 def __deepcopy__(self, memo): 140 """Support function for `copy.deepcopy()`. 143 """ 144 return DBRef(deepcopy(self.__collection, memo), 145 deepcopy(self.__id, memo), 145 deepcopy(self.__id, memo), 146 deepcopy(self.__database, memo), 147 deepcopy(self.__kwargs, memo))move_std.py https://github.com/fhal/bottleneck.git | Python | 396 lines
2 3from copy import deepcopy 4import bottleneck as bn 164 165ints = deepcopy(floats) 166ints['force_output_dtype'] = 'float64'test_pickleable.py https://github.com/albertz/CPython.git | Python | 76 lines
25 26 def header_as_deepcopy(self, name, value): 27 header = self.header_factory(name, value) 27 header = self.header_factory(name, value) 28 h = copy.deepcopy(header) 29 self.assertEqual(str(h), str(header)) 63 64 def msg_as_deepcopy(self, msg): 65 msg2 = copy.deepcopy(msg)interaction_rdm.py https://github.com/quantumlib/OpenFermion.git | Python | 147 lines
111 normal_ordered) 112 qubit_operator_expectations = copy.deepcopy(qubit_operator) 113 for qubit_term in qubit_operator_expectations.terms:desc.py https://github.com/facebookresearch/open_lth.git | Python | 158 lines
108 elif 'rewinding_steps' in args and args.rewinding_steps and not Step.str_is_zero(args.rewinding_steps): 109 desc.pretrain_dataset_hparams = copy.deepcopy(dataset_hparams) 110 desc.pretrain_dataset_hparams._name = 'Pretraining ' + desc.pretrain_dataset_hparams._name 110 desc.pretrain_dataset_hparams._name = 'Pretraining ' + desc.pretrain_dataset_hparams._name 111 desc.pretrain_training_hparams = copy.deepcopy(training_hparams) 112 desc.pretrain_training_hparams._name = 'Pretraining ' + desc.pretrain_training_hparams._namearmygroup.py https://github.com/joskid/bellum.git | Python | 156 lines
3from bellum.landarmy.defcon.specials import Tarpit 4from copy import deepcopy 5from random import uniform 112 if rootGarrisonObject[i] > 0: 113 # we need it copied along with all of its weapon, so we use deepcopy 114 # append a list(unit id, Unit object, amount of units) 114 # append a list(unit id, Unit object, amount of units) 115 self.units[agh[i].type].append([i, deepcopy(agh[i]), rootGarrisonObject[i]]) 116 self.aou[agh[i].type] += rootGarrisonObject[i]video_gan_model.py https://github.com/xinntao/EDVR.git | Python | 142 lines
3from collections import OrderedDict 4from copy import deepcopy 5 18 # define network net_d 19 self.net_d = define_network(deepcopy(self.opt['network_d'])) 20 self.net_d = self.model_to_device(self.net_d)test_voting.py https://gitlab.com/hugxbox955/tezos | Python | 249 lines
12 proto_params = dict(protocol.PARAMETERS) 13 parameters = copy.deepcopy(proto_params) 14 parameters["blocks_per_voting_period"] = 4max_ent.py https://bitbucket.org/Ayuei/viterbi.git | Python | 186 lines
6from itertools import combinations 7from copy import deepcopy 8 132 133 temp = deepcopy(keys) 134 baseline_score = main(keys_to_drop=temp, ret_score=True) 147 for key in keys: 148 temp = deepcopy(keys) 149 temp.remove(key) 163 for group in groups: 164 temp = deepcopy(keys) # Runs clf for key specified 165 for key in group: 178 for comb_key in combinations(keys, i): 179 temp = deepcopy(keys) 180 for k in comb_key:move_nanstd.py https://github.com/fhal/bottleneck.git | Python | 306 lines
2 3from copy import deepcopy 4import bottleneck as bn 164 165ints = deepcopy(floats) 166ints['reuse_non_nan_func'] = Truemiddleware.py https://github.com/swax/WebSocket-for-Python.git | Python | 136 lines
37 def received_message(self, m): 38 self._messages.put(copy.deepcopy(m)) 39work_manager.py https://github.com/igorbonadio/carbono.git | Python | 156 lines
22from threading import Thread 23from copy import deepcopy 24 123 try: 124 self._input_buffer.put((deepcopy(self._block_number), data), 125 timeout=1)layout.py https://github.com/sumeetsk/aiclass.git | Python | 155 lines
84 85 def deepCopy(self): 86 return Layout(self.layoutText[:])test_postgres.py https://github.com/harvard-lil/capstone.git | Python | 116 lines
1from copy import deepcopy 2 18 versioned_instance = request.getfixturevalue(versioned_fixture_name) 19 original_instance = deepcopy(versioned_instance) 20iptvmoviemetadata.py https://gitlab.com/nunigaia/iptvplayer-for-e2 | Python | 296 lines
15except Exception: import simplejson as json 16from copy import deepcopy 17################################################### 60 self.filePath = GetMovieMetaDataDir( RemoveDisallowedFilenameChars( fileName ) ) 61 self.data = deepcopy( self.META_DATA ) 62 self.data.update( {"host":host, "title":title, "file_path":filePath} ) 159 for item in self.data['tracks']['subtitles']['tracks']: 160 track = deepcopy( self.SUBTITLE_TRACK ) 161 track.update(item) 223 try: 224 track = deepcopy( self.SUBTITLE_TRACK ) 225 track.update(subtitlesTrack)checkpoint_test.py https://github.com/cybertronai/transformer-xl.git | Python | 442 lines
24def test_checkpoint(): 25 g.args = copy.deepcopy(simple_args) 26 50def test_checkpoint_dropout(): 51 g.args = copy.deepcopy(simple_args) 52 g.args.dropout = 0.5 77def test_checkpoint_lamb(): 78 g.args = copy.deepcopy(simple_args) 79 g.args.dropout = 0.5 107def test_checkpoint_fp16_lamb(): 108 g.args = copy.deepcopy(simple_args) 109 g.args.dropout = 0.5 142 os.system('rm data/wikiextracted/cache.pt.bpe') 143 g.args = copy.deepcopy(simple_args) 144 g.args.test = 'yes'oidutil.py https://bitbucket.org/jonasteuwen/python-openid.git | Python | 188 lines
73 d = {s: 1} 74 d_prime = copy.deepcopy(d) 75 self.failUnless(s in d_prime, "%r isn't in %r" % (s, d_prime))ops.py https://github.com/yosinski/Theano.git | Python | 278 lines
108def register_deep_copy_op_c_code(typ, code, version=()): 109 """ Tell DeepCopyOp how to generate C code for a Theano Type 110 117 """ 118 DeepCopyOp.c_code_and_version[typ] = (code, version) 119 120 121class DeepCopyOp(gof.Op): 122 # Mapping from Type to C code (and version) to use. 149 else: 150 outs[0][0] = copy.deepcopy(args[0]) 151 157 if not v: 158 warnings.warn("Type %s has C code for DeepCopyOp, but it has " 159 "no version. You should add a 'version' keyword arg "lrn_op_test.py https://gitlab.com/github-cloud-corporation/tensorflow | Python | 142 lines
31 """Compute expected result.""" 32 output = copy.deepcopy(input_image) 33 batch_size = input_image.shape[0]todo.py https://github.com/kumaryu/IronLanguages-main.git | Python | 157 lines
52 'lineno': self.lineno, 53 'todo': ad[0].deepcopy(), 54 'target': targetnode,conftest.py https://gitlab.com/Rockyspade/astropy | Python | 169 lines
16""" 17from copy import deepcopy 18 160 cols = OrderedDict() 161 mixin_cols = deepcopy(MIXIN_COLS) 162 if HAS_PANDAS:test_utils.py https://gitlab.com/Guy1394/django | Python | 167 lines
153 154 e_deepcopy = copy.deepcopy(e) 155 self.assertEqual(e, e_deepcopy)bench_join.py https://github.com/dieterv77/pandas-1.git | Python | 211 lines
4from pandas import * 5from copy import deepcopy 6import timescript.py https://github.com/KDAB/kuesa.git | Python | 278 lines
229 gl3_rule = next((rule for rule in prototype['rules'] if rule['format']['api'] == 'OpenGLCoreProfile')) 230 rhi_rule = copy.deepcopy(gl3_rule) 231 rhi_rule['format'] = {gradients.py https://github.com/norbusan/calibre-debian.git | Python | 155 lines
107 reflect = False 108 base_stops = copy.deepcopy(stops) 109 reversed_stops = list(reversed(stops)) 118 estops = reversed_stops if (reflect and do_reflect) else base_stops 119 stops = copy.deepcopy(estops) + stops 120 127 estops = reversed_stops if (reflect and do_reflect) else base_stops 128 stops = stops + copy.deepcopy(estops) 129