query_id
stringlengths
32
32
query
stringlengths
9
4.01k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
e27485c88cc537c34fa20450ccaaf1de
Return the last used timestamp for the given key.
[ { "docid": "e96f39853e92cb20cb0ea2093da76300", "score": "0.9002394", "text": "def get_last_used_timestamp(self, key):\n return self._last_used_time.get(key)", "title": "" } ]
[ { "docid": "38ae52b0ac3fb3bf6532694212d73bf8", "score": "0.6671453", "text": "def touch(self, key):\n self._last_used_time[key] = datetime.datetime.utcnow()", "title": "" }, { "docid": "4312e80b02cced927f55b5da24a4d82b", "score": "0.6450842", "text": "def ts_last_seen(self) ->...
ebc216b1b46e9d33e36eeb35234fac34
Initialize local Electric Kiwi auth implementation.
[ { "docid": "165ccd164be6941e10239ccdd1fc09dd", "score": "0.0", "text": "async def async_resolve_external_data(self, external_data: Any) -> dict:\n data = {\n \"grant_type\": \"authorization_code\",\n \"code\": external_data[\"code\"],\n \"redirect_uri\": external_...
[ { "docid": "e99c2e8d550cd93f264017d018e76779", "score": "0.6848689", "text": "def __init__(self):\n default_credentials_file = (\n \"%s/.config/mincer/credentials.yaml\" % os.environ['HOME'])\n if CONF.credentials_file:\n raw = self._get_from_file(CONF.credentials_fil...
cb0ddeca3dc7638e06e9b469917ee008
Returns the string representation of the model
[ { "docid": "0f283634439620e9ecd215d87804ec00", "score": "0.0", "text": "def to_str(self):\n return pprint.pformat(self.to_dict())", "title": "" } ]
[ { "docid": "aa510b1d67cd504f00d31d7600881756", "score": "0.860173", "text": "def _repr_model_(self):\n return str(self)", "title": "" }, { "docid": "ade3a9362342e8a6cfb9797910bc27b2", "score": "0.7877549", "text": "def __str__(self):\n return str(self.save())", "tit...
39dac090929c00b61fb38c244bd1cce5
Closes the underlying HDF5 file, if one is associated with the `MODDataset` object. Note that associated HDF5 files are closed by default when the `MODDataset` object is deleted.
[ { "docid": "3d07e1a4f56f4d62f4ffc630b5b2917f", "score": "0.0", "text": "def close(self):\n\n if hasattr(self, '_hf'):\n self._hf.close()", "title": "" } ]
[ { "docid": "ed7438f77267cd1234f8b21d006a2481", "score": "0.71574867", "text": "def close_hdf(self):\n self.h5file.close()\n self._hdf_open_for_reading = False\n logging.info(f\"{self.hdf_filename} closed.\")", "title": "" }, { "docid": "5a6f59baddc1da89797c906a6aeb1e9f",...
40374eaf82fe9ca653a42807f62bdffb
Returns the object used to fold the feature vectors.
[ { "docid": "75ce5d0b9b26c4a28a92a6641ed2a2f0", "score": "0.0", "text": "def fingerprint_folder(self):\n folder_file = op.join(self.data_dir, 'folder.pkl')\n return joblib.load(folder_file) if op.isfile(folder_file) else None", "title": "" } ]
[ { "docid": "7f2870ae80df541714378701d7aa4a06", "score": "0.6042251", "text": "def create_fold_feature(fold_x_train, fold_y_train, feature):\n\n # create vocabulary (i.e., for baseline model from James)\n if feature == 'vocab':\n\n vocabularies = create_vocabularies(fold_x_train, fold_y_trai...
d7e5c800043f4b416bd8e4fc3d0a049b
Longest ORF of a sequence.
[ { "docid": "07780d6d159ad2c335bd947c8c9ff737", "score": "0.7650298", "text": "def longest_orf(seq, n = 1):\n orfs = all_orfs(seq)\n\n if len(orfs) == 0:\n return ''\n elif n == 1 or len(orfs) == 1:\n return seq[orfs[0][0]:orfs[0][1]]\n else:\n return_list = []\n f...
[ { "docid": "ec3fc318c81325cc42696c342bbe4e88", "score": "0.8518749", "text": "def longest_orf(seq):\n orfs = all_orfs(seq)\n\n if len(orfs) == 0:\n return ''\n else:\n return seq[orfs[0][0]:orfs[0][1]]", "title": "" }, { "docid": "c5426894bb3d1ca95d491cfdd99de953", ...
09081b9e0ee32c2dc635db0b2c5832b8
Add a new contact for the alter. A contact is composed of a timestamp of a direct message sent by ego to the alter and the text of the message.
[ { "docid": "51a63ed33d384c6d3a9e6bb6b6bdcbab", "score": "0.81476605", "text": "def add_contact(self, alter_id: Hashable, timestamp: int, contact_type: Hashable = \"__default__\", text: str = None,\n num_contacted_alters: int = 1, additional_info: ContactAdditionalInfo = None) ->FullCo...
[ { "docid": "fa3ffc7c0a4f0a7e2c17cf85c2f7a500", "score": "0.7900511", "text": "def add_contact(self, timestamp: int, alter_id: Hashable, contact_type: Hashable = \"__default__\", text: str = None,\n num_contacted_alters: int = 1, additional_info: ContactAdditionalInfo = None):\n ...
53b17545f9caea1aedec25b14087fbbb
Copy the files from Ubuntu packages installed on bare metal to the conainer's filesystem.
[ { "docid": "6e2d007510919a6d6aa4da5ccae984c0", "score": "0.5821541", "text": "def copy_packages(self, *pkgnames):\n if self.prefix == '':\n return\n for pkgname in pkgnames:\n for f in sprepo.list_package_files(pkgname):\n if os.path.isfile(f):\n ...
[ { "docid": "fe91febe1e85989e919ef028b17b022b", "score": "0.69753873", "text": "def copy_packages(c: Connection):\n # Build a list of package metadata were each row looks like:\n #\n # pkg_name version deb_name\n c.run('rm -rf /tmp/packages')\n c.run('rm -rf /tmp/packages.txt')\n c.ru...
336162e5368378370b33225e963fe4dc
Name of the broker
[ { "docid": "5b19ae13149cfad7ca0abfd8b63c181f", "score": "0.0", "text": "def get_name(self):\n raise NotImplementedError", "title": "" } ]
[ { "docid": "9d93b4cfbf550da6f80558ca1231e830", "score": "0.85580945", "text": "def brokerName(self):\r\n raise NotImplementedError(self.name)", "title": "" }, { "docid": "5f1755300940335a946a8bec4029c73b", "score": "0.7313525", "text": "def broker(self):\n return self.c...
311c9678abfc712b3775be9438a3b9f3
Computes normal component of vorticity in spherical coordinates
[ { "docid": "e1334f70d17bd0c82a0b5b2852c83194", "score": "0.6482742", "text": "def vorticity_spher(u,v,theta,dtheta,dlamb):\n term1 = 1./(Re*np.cos(theta)) * d_dlamb(v,dlamb)\n term2 = 1./(Re*np.cos(theta)) * d_dtheta(u*np.cos(theta),dtheta)\n return term1 - term2", "title": "" } ]
[ { "docid": "acdcd0df6db91f52a4c4ef0d64b3fc79", "score": "0.70356363", "text": "def vnorm(x1, y1, z1, x2, y2, z2):\n vx = x1 - x2\n vy = y1 - y2\n vz = z1 - z2\n \n mag = np.sqrt(vx * vx + vy * vy + vz * vz)\n return vx / mag, vy / mag, vz / mag", "title": "" }, { "docid": "...
19deb3a65eb4033d58da5a49833076f0
Get environment variable and convert it.
[ { "docid": "e2dd523920c1c4776f00af8fa13cf1bd", "score": "0.7324171", "text": "def get_env(env_name, default_val=None, conv_func=str):\n val = getenv(env_name, default_val)\n if val is not None:\n val = conv_func(val)\n return val", "title": "" } ]
[ { "docid": "cb8a24078dcc5d1af3cad7dbaaa1fa89", "score": "0.7759673", "text": "def get_from_env(self, key):\n return os.environ[key]", "title": "" }, { "docid": "2ffcb107456a2b5bd9dc7c9ad0f1913b", "score": "0.7716886", "text": "def _get_env(self, env_var):\n value = os.e...
687ab02a9afa2ea964cebcb680c6a912
reads a message from remote device
[ { "docid": "9fd3d45178b322056ef3701dbf633514", "score": "0.0", "text": "def read(self):\n pass", "title": "" } ]
[ { "docid": "8ca10efdf833f9840f8b117fb3e1f4f0", "score": "0.7706736", "text": "def read(self, message):", "title": "" }, { "docid": "65ce0135e106133b3c503055c9ddbfd6", "score": "0.7271204", "text": "def readMessage(self):\n pass", "title": "" }, { "docid": "251ef113...
42189bd7c6f15631ededdcb5ec6c854b
Site = (;{NP_PP_63}Ser{/NP_PP_63};UNK) ({NP_PP_63}6{/NP_PP_63};{NP_PP_63}Ser{/NP_PP_63};UNK)
[ { "docid": "3daf68b5c6b63f09eb346c7da6b3c161", "score": "0.0", "text": "def fix_std_site(cls, annotation):\n # when using method line to extracted the position of a site,\n # we may match the wrong annotation with the method line.\n # e.g., 10026262. In reindex(), the second site an...
[ { "docid": "a99db169d03f8a51694b56be4cdecad7", "score": "0.5823867", "text": "def site():\n\n arlen = Site(\"College Track Arlen\", \"Arlen\")\n return arlen", "title": "" }, { "docid": "2d0775f099097872ca16f71a5ea696af", "score": "0.5358703", "text": "def identify_site(self, *...
2692b9ad0d9ab0bfcd04f695f44aa2de
Sets the advanced of this PromotionExecutionInfo.
[ { "docid": "4682959b0303083cfc4925648cfe2093", "score": "0.65633017", "text": "def advanced(self, advanced):\n\n self._advanced = advanced", "title": "" } ]
[ { "docid": "f0951060f92b23af25a8222dd28fb199", "score": "0.49700913", "text": "def set_advanced_var(self, name, values):\n if not self._sim_package:\n if self._child_type == \"array\" and values.size == self.model.size:\n values = values[self.model.nodetouser]\n\n ...
b3eb2757e64054d1c9a35a06432cd978
IDs of east, horizontal link neighbor.
[ { "docid": "27d03e31428d10469e5794036d4fcd80", "score": "0.67702675", "text": "def horizontal_east_link_neighbor(shape, horizontal_ids,\n bad_index_value=-1):\n # First, we find the shape of the horizontal link array given the shape\n # of the raster model grid. In...
[ { "docid": "e2c0aefb669b83b802540a8317c85587", "score": "0.6813953", "text": "def list_of_neighbors(self):\n ci,ne,we = self.to_neighb()\n ln = [[ne[ci[i]:ci[i+1]]] for i in range(self.V)]\n return ln", "title": "" }, { "docid": "9417536fec13ca098104860960f1d58a", "s...
d8a352b981de1e979d6476cb3f2a8b43
Convenience method for adding just an errback. See L{addCallbacks}.
[ { "docid": "659dff91505542412966fafa1b402230", "score": "0.78562236", "text": "def addErrback(self, errback, *args, **kw):\n return self.addCallbacks(passthru, errback,\n errbackArgs=args,\n errbackKeywords=kw)", "title": "" } ...
[ { "docid": "d83f5dba16b50232a252f90ca584ec15", "score": "0.6833719", "text": "def on_failure(self, callback):\r\n self.failure_callbacks.append(callback)", "title": "" }, { "docid": "3a6a6132e1ba2a0656a23fb1f481d25f", "score": "0.6811721", "text": "def addCallbacks(self, callb...
98089d82955af4bb3c4335bd0d71a868
Apply user related filters to the queryset.
[ { "docid": "41ca5f5edd654f302322aab732b08e32", "score": "0.7535608", "text": "def apply_user_related_qsets_filters(user, queryset):\n if not check_user_has_groups(user, 'admin'):\n queryset = queryset.filter(top_qset__users=user.id)\n\n return queryset", "title": "" } ]
[ { "docid": "ac97a15041e55d174afe302822472e12", "score": "0.7289657", "text": "def apply_user_related_questions_filters(user, queryset):\n if not check_user_has_groups(user, 'admin'):\n queryset = queryset.filter(qset__top_qset__users=user.id)\n\n return queryset", "title": "...
4c2488b99bba076985c22fb06b7aabea
In the master process, read from the pipe and store the data read in the ``messages`` attribute.
[ { "docid": "62ce237e6cc9c22aec26e3b8bcd26302", "score": "0.6897093", "text": "def read_messages(self):\n # It's absolutely important to execute only one read() system\n # call, more might block. Assuming that we used pselect()\n # correctly, one read() will not block.\n if se...
[ { "docid": "461593e8ab0312ce49e03310ef753790", "score": "0.6321657", "text": "async def reader(self):\n try: \n while True:\n line = await self.subproc.stdout.readline()\n await alog.log(INFO, f\"{self.pid}>{line.decode().strip()}\")\n if no...
b25bdccf8435170ab0e16f4a0752214d
The ``check connection`` subcommand method.
[ { "docid": "09e34dff59de4eff7f58b1c46b70b07a", "score": "0.62133867", "text": "def check_connection(\n self,\n stdout: typing.Optional[bytes] = None,\n ) -> bool:\n if stdout is None:\n # call certgrinderd ping command\n stdout = self.run_certgrinderd(stdin=...
[ { "docid": "654d074f47233818c5a8a034f6e790a0", "score": "0.7333854", "text": "def check_connection(self):\n return True", "title": "" }, { "docid": "b4bc45c2595acf6af04258951212040e", "score": "0.7121899", "text": "def checkConnection(self):\n return self.xmlrpc.checkCo...
c551ee82cc7bdc2a4f5d85c53fbc8bbf
Start instances and stop them before they are running, increase time to terminate on each iteration
[ { "docid": "bfbb940ad630ea5c1c816c4c3d374169", "score": "0.0", "text": "def ChurnBFEBS(self):\n if self.reservation:\n self.tester.terminate_instances(self.reservation)\n self.image = self.tester.get_emi(root_device_type=\"ebs\")\n self.Churn()", "title": "" } ]
[ { "docid": "0462467bae3e474dcb3402c3f3abce24", "score": "0.75088894", "text": "def stop_instances():\n pass", "title": "" }, { "docid": "1e813929bf3576fb2eef0814d4c9b73c", "score": "0.64349276", "text": "def terminate_workers(self):\n instances = self.conn.get_only_instance...
4f19a9c726442567766cb8e8c410c078
Perform a statistical test on a PointPattern, based on the distribution of a PointPattern attribute over the patterns in this collection.
[ { "docid": "0866a8d18096f0e4626d6ab953f8b112", "score": "0.70142114", "text": "def _pp_attr_test(self, attr, pattern, **kwargs):\n tsdist = self._pp_attr_series(attr, **kwargs).dropna()\n teststat = getattr(pattern, attr)(**kwargs)\n return 1.0 - 0.01 * percentileofscore(tsdist, tes...
[ { "docid": "78481b5e6317ccde76cbf9ee5a6ae18b", "score": "0.57883215", "text": "def computePatternScore(self,pattern):\n fScore = 0\n #terminal\n if not isinstance(pattern, list):\n fScore += pattern.getCanonical().getWeight()\n else:\n for child in patt...
891ee1cce5e0a4581e8b8cd6afde7ad5
Callback for apply VOI set button.
[ { "docid": "f740c393d4f7e650ced656f224339661", "score": "0.67368996", "text": "def applyVOISetButtonOnButtonClick( self, event ):\r\n if self.currentNIfTIFile is None: # No loaded image file\r\n mes = \"Please load extracted VOI file before applying VOI set!\"\r\n dlg = wx...
[ { "docid": "7bb713c1f287c01327126ad8fece1de5", "score": "0.6189505", "text": "def set_iso_button_handler(self, func: classmethod) -> None:\n self.iso_button.clicked.connect(func)", "title": "" }, { "docid": "941eda4108a30a4d6cf72d28c949171e", "score": "0.61075985", "text": "de...
05aa7b56c87f19f6a2aaa4d7dfdb3687
Testing the plotting of wind barbs
[ { "docid": "c09cbf308ea5c29c318d266621a80e9b", "score": "0.7092604", "text": "def test_barbs():\n mp = MapPlot(continentalcolor='white', nocaption=True)\n data = [\n dict(lat=41.5, lon=-96, tmpf=50, dwpf=30, sknt=10, drct=100),\n dict(lat=42.0, lon=-95.5, tmpf=50, dwpf=30, sknt=20, d...
[ { "docid": "04afd452cfabcac8a97642377935604f", "score": "0.6511004", "text": "def detection_rate_bin_plot_by_wind_speed(ax1,ax2,ax3, data, n_bins = 5, threshold = 25,\n wind_to_use = \"WS_windGust_logged_mps\"):\n\n detection, detection_prob, detection_prob_highwind, detection_prob_lowwind...
bb87171357e923a4b22eb58d40033bbe
Extract the qubit from the computing host given the qubit id.
[ { "docid": "26727ed0681e0091e9d40ff9b39fca7d", "score": "0.7352578", "text": "def _get_stored_qubit(self, qubit_id: str) -> Qubit:\n if qubit_id in self._qubits:\n return self._qubits[qubit_id]\n if qubit_id in self._pre_allocated_qubits:\n return self._pre_allocated_...
[ { "docid": "089914a42f44b9ef3b1370e5c771b091", "score": "0.61521566", "text": "def unpack_qubit(qubit):\n if isinstance(qubit, integer_types):\n return Qubit(qubit)\n elif isinstance(qubit, Qubit):\n return qubit\n elif isinstance(qubit, QubitPlaceholder):\n return qubit\n ...
ae49247d0bbb87ac7fb54ea86127569d
Format structured fields for the host.
[ { "docid": "532eae5e3c9c1c170c7318b3b925f7ca", "score": "0.50925964", "text": "def format_inbound_structured_fields(structured_fields):\n bytes_ = bytearray([AID.STRUCTURED_FIELD.value])\n\n for (id_, data) in structured_fields:\n length = len(data) + 3\n\n bytes_.extend([(length >> ...
[ { "docid": "8e353a8947863dc4aeb6fdc5bc037a42", "score": "0.61566275", "text": "def format(self, record):\n data = record.__dict__.copy()\n\n if record.args:\n msg = record.msg % record.args\n else:\n msg = record.msg\n\n data.update(\n usernam...
5a69c5401cae7817f088ad2a755dd806
move_iter will move iter relative to sibling or parent. Direction (before or after) tells us whether to insert_before or insert_after (with a sib) or to prepend or append (with a parent).
[ { "docid": "656dcbe668d85651d3ec183983a4bb06", "score": "0.77750164", "text": "def move_iter (mod, iter, sibling=None, parent=None, direction=\"before\"):\r\n if direction != \"after\":\r\n direction = \"before\"\r\n path = mod.get_path(iter)\r\n if sibling:\r\n dpath = mod.get_pa...
[ { "docid": "64bba7517875dfc168251ef587680c31", "score": "0.5765652", "text": "def move(self, direction):\r\n iterations = 0\r\n row_list = []\r\n merge_values = []\r\n merged_list = []\r\n if (direction == UP) or (direction == DOWN):\r\n iterations = self.ge...
feda7cb8aae4b9467dcce25145a7bd1c
Updates prediction with respect to guessing paramter.
[ { "docid": "c734ed45de23b636a8808e41306963c7", "score": "0.5966786", "text": "def respect_guess(self, prediction, options):\n if options:\n val = 1 / len(options)\n return val + (1 - val) * prediction\n else:\n return prediction", "title": "" } ]
[ { "docid": "e20cb2ca91f19b8542b030b5dbe6592a", "score": "0.73624593", "text": "def setPrediction(self,new_predition):\r\n \r\n \tself.prediction=new_predition", "title": "" }, { "docid": "fd411cda9031c16e6e829da09d90ee35", "score": "0.6656664", "text": "def update(self, ans...
94f9a2326290a7a8e1a2648816c87bba
This function will get all the details associated to a path.
[ { "docid": "4222c0dd9dbb39285853b10c7585386b", "score": "0.0", "text": "def getFull(self, name):\n\n if Paths.__PATHS__.get(name):\n return Paths.__PATHS__[name]\n return None", "title": "" } ]
[ { "docid": "5ef1d25c309f86f184e1ade6cfb82220", "score": "0.7070504", "text": "def getdetails(self, path):\n # type: (Text) -> Info\n return self.getinfo(path, namespaces=[\"details\"])", "title": "" }, { "docid": "ecc93235db727f7a5936061eb256d31b", "score": "0.6697386", ...
88c444a94be533e2bcdb4ff2e3eaed74
Hacky placeholder. Modify if need custom directory etc
[ { "docid": "cc102b9973ac23478af02938d7573f6c", "score": "0.0", "text": "def make_save_path(load_path):\n return load_path.replace('.sents', '.copr') # conll input format", "title": "" } ]
[ { "docid": "a24a252db511065866f14d27445f13a2", "score": "0.6812693", "text": "def dir_path(self):", "title": "" }, { "docid": "46ecc2d77e045544c92ed52dcb223569", "score": "0.66484755", "text": "def home_directory(self):", "title": "" }, { "docid": "1be25fd7e776c0470b26bf8...
2bd9abb9e5e6981c5488650fd9fa7d6f
Returns the default site instance if Django settings defines SITE_ID, else None
[ { "docid": "4aace95249b08664caac8eacd3ea4e68", "score": "0.9090551", "text": "def default_site():\n if getattr(settings, 'SITE_ID', ''):\n return Site.objects.get(pk=settings.SITE_ID)", "title": "" } ]
[ { "docid": "ece70d1f60a8c59bd50cfea285f9bd14", "score": "0.76525426", "text": "def get_current_site():\n return Site.objects.get(id=settings.SITE_ID)", "title": "" }, { "docid": "a510296d91861d1f247248bbf84ce2f2", "score": "0.74339956", "text": "def site(self):\r\n if self....
4627071a6042ef80198cae2bfa4fff3d
Init registration client by phone.
[ { "docid": "c7b4e079977c8f938c61c1af91a90268", "score": "0.5142294", "text": "def SendRegistrationCodeToPhone(self, request, context):\n context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n context.set_details('Method not implemented!')\n raise NotImplementedError('Method not implemented!')", ...
[ { "docid": "b28cbbb74ab31b2c2f5f2652c31de3f4", "score": "0.67799324", "text": "def RegisterClientByPhone(self, request, context):\n context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n context.set_details('Method not implemented!')\n raise NotImplementedError('Method not implemented!')", "titl...
75fd02b3896272b5b944a9f88846358c
This function runs the neural style transfer algorithm. This is not to be used eternally outside the ML library
[ { "docid": "81ee35ace130370d9a8c7b8136b304d9", "score": "0.6481593", "text": "def run_style_transfer(\n cnn,\n normalization_mean,\n normalization_std,\n content_img,\n style_img,\n input_img,\n num_steps=300,\n style_weight=1000000,\n content_weight=1,\n):\n print(\"Buildi...
[ { "docid": "df380ec8af79ccc63b97d940fb0ad375", "score": "0.6913298", "text": "def transfer_learning():\n\n # 1. Load data, Cifar10 and Preprocess for adapting Inception v3 network.\n dataset = load_cifar10()\n preprocessor = PreprocessAdaptingCifer10toInception3(dataset)\n X_train, Y_train, ...
1b371472a7aff42beae171d2e3cbbb0c
This function echoes back the value of a specific request header while allowing caching for 10 hours.
[ { "docid": "fe2cbdc397c1090a3d4aede89ec99842", "score": "0.67426294", "text": "def EchoHeaderCache(self):\n\n return self.EchoHeaderHelper(\"/echoheadercache\")", "title": "" } ]
[ { "docid": "64206d09ecc5c7bc3a93a504f86ea09d", "score": "0.65378183", "text": "def do_header(self, args):\n mem_key = 'header_%s_%d' % (args['base_url'], self.get_year(args))\n header = memcache.get(mem_key)\n #header = None\t# Uncomment when flushing the cached header in production...
3377567ab150a2ea6aeb02aa63b35598
M and M transpose required for differential equations
[ { "docid": "f4673750c81c3c05b1baa6b871c5f84c", "score": "0.57042927", "text": "def get_mmt():\r\n # M^T\r\n MT = np.array([[-1, 0, 0, 0, 0, 0, 0, 0, 0],\r\n [1, -1, 0, 0, 0, 0, 0, 0, 0],\r\n [0, 1, -1, 0, 0, 0, 0, 0, 0],\r\n [0, 0, 1, -1, 0, 0,...
[ { "docid": "df1cadd996013506d20c59066f32db71", "score": "0.6352941", "text": "def T(self):\n # TODO - your code here\n trans=[]\n for i in range(len(self.h)):\n t_column=[]\n for j in range(len(self.w)):\n t_column.append(self.g[self.w][self.h]) ...
d518090bca6278e72aa53cd63f19b766
Create a ValidResponse from a Swagger response.
[ { "docid": "345f4bc9c084135b0af20007a5e2cdf4", "score": "0.6405929", "text": "def _create_valid_response(self, response, endpoint, kwargs):\n body, status, headers = response\n continuation_token = getattr(body, \"continuation_token\", None)\n total_item_count = getattr(body, \"tota...
[ { "docid": "63e49095eac1db7215e16ecc817e8111", "score": "0.68187684", "text": "def validate_response(cls, response):\n if not hasattr(response, \"status_code\"):\n raise Exception(\"invalid response object\")\n if response.status_code != 200:\n raise Exception(\"elast...
1d3faf96d7d8f66f85179b2a997ee865
Test function that tests the in_board() method contained in the Piece class.
[ { "docid": "5bee908b7695ff282fb2787956299fd3", "score": "0.8882027", "text": "def test_in_board():\r\n\tfor row in range(8):\r\n\t\tfor col in range(8):\r\n\t\t\tassert(test_piece.in_board(row,col))\r\n\r\n\tassert(not test_piece.in_board(-1,0))\r\n\tassert(not test_piece.in_board(0,8))\r\n\tassert(not ...
[ { "docid": "3553e6d93b4ab464d3951cf0d89e8aff", "score": "0.71696293", "text": "def test_drawTileOnBoard(self):\n # this is tested graphically by running the program\n pass", "title": "" }, { "docid": "3730d6821a7d30d92da32d4d3e47ccd2", "score": "0.71515757", "text": "de...
0cb9a360ce0763c9560aa38928ce57ff
Setter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/graceful_restart (container)
[ { "docid": "d41fb83bbffb1d446242221228531463", "score": "0.79115885", "text": "def _set_graceful_restart(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(\n v,\n base=graceful_restart.graceful...
[ { "docid": "0c0ccfe49dbdc100b6e3f346acf03321", "score": "0.6150033", "text": "def _get_graceful_restart(self):\n return self.__graceful_restart", "title": "" }, { "docid": "0c0ccfe49dbdc100b6e3f346acf03321", "score": "0.6150033", "text": "def _get_graceful_restart(self):\n ...
bcb38aa07bf9a44c3c55e2ac81c0bfd0
Return the corresponding FileMap or None. >>> find_file('notestation.js')
[ { "docid": "e6203a3be7f9492a7444e2b043ae72c6", "score": "0.7818548", "text": "def find_file(filename):\n return maps.find_file(filename)", "title": "" } ]
[ { "docid": "ca17e789130dd28b17238d5d3c6d56a8", "score": "0.61601883", "text": "def get_file(self, file_name):\n\n exploded_name = file_name[len(self.name) + 1:].split('/')\n desired_name = exploded_name[-1]\n node = self.get_node('/'.join(exploded_name[:-1]))\n\n for file_inf...
bb950707955b1aeaf7acce83a20dd34c
/sell[POST] The name of the ticket is no longer than 60 characters negative error case
[ { "docid": "d46efe971ba70e0703a6d9728ee2fe11", "score": "0.6784815", "text": "def test_nameLength_Negative(self): # Test case R4.2.1\n self.refresh()\n\n self.click(\"#btn-add-ticket\")\n self.type(\"#sell-ticket-name\", \"validName2\")\n self.type(\"#sell-ticket-quantity\", ...
[ { "docid": "8b5a75dcc36d60828d29d1a6bd276501", "score": "0.6867265", "text": "def test_name_length(self, *_):\n # open logout page to invalid any logged-in sessions that may exist, then open login page\n self.open(base_url + '/logout')\n self.open(base_url + '/')\n\n # test t...
2d7ff2588e7ca463c1be4f6e1bd3b1fe
Finds the positionon the last header item line This is then used by numpy.loadtxt thats wrides items to np.array
[ { "docid": "e2d32de4ca8dfb0bbcaa3229f4e3fb4e", "score": "0.54721785", "text": "def FindHeaderLength():\n\n lookup = '#------------------------------'\n \n with open(filename) as myFile:\n for FoundPosition, line in enumerate(myFile, 1):\n if lookup in line:\n #p...
[ { "docid": "e87e35ab286ace8506354f7b1364236e", "score": "0.59801245", "text": "def _last_index(self):\n return len(self.items) - 1", "title": "" }, { "docid": "c157ca3726dea1722007c42d103fa987", "score": "0.5859204", "text": "def get_last_position(self):\n if self.posit...
0346c74110e9004de352aeb59e4097b5
Expands a verse series (list) into its constituent verses as a string.
[ { "docid": "1a5103cc8bfc764b101d1d4a4f27cf5a", "score": "0.6429531", "text": "def expandSeries(vSeries):\n\n vSeries = re.findall(r'\\d+', vSeries)\n osisID = list()\n for n in vSeries:\n osisID.append('$BOOK$.$CHAP$.'+str(n))\n return ' '.join(...
[ { "docid": "c6d26767684e484357f2c2bc144f8929", "score": "0.5957183", "text": "def AlgoSeqListToString(AlgoSequense):\n assert isinstance(AlgoSequense, list)\n AlgoSequenseString = str(AlgoSequense)\n return AlgoSequenseString", "title": "" }, { "docid": "2feec3ef47c2eaa91f8c8c34aa19...
a708e551738fc9930e0279dd30a37901
Create a color array to store colors assigned to all veritces. Vertex number is used as index in this array. The value '1' of colorArr[i] is used to indicate that no color is assigned to vertex 'i'. The value 1 is used to indicate first color is assigned and value 0 indicates second color is assigned.
[ { "docid": "3ccbea5164b8550be63accdd1496e097", "score": "0.0", "text": "def isBipartite(self, src):\n colorArr = [-1] * self.V \n \n # Assign first color to source \n colorArr[src] = 1\n \n # Create a queue of vertex numbers and enqueue source vertex for BFS traversal \n ...
[ { "docid": "5b17d83ac7fc29dbeede94ed3d76d508", "score": "0.6323064", "text": "def gen_color(self, num):\n PHI = 0.618033988749895\n s = 0.5\n v = 0.95\n h = random()\n colorList = []\n for i in range(num):\n h += PHI\n h %= 1\n r...
6ec7aaef55fd531188e47fe3a4679528
Deletes the current index freeing all the momory it uses. The memory used by the dataset that was indexed is not freed.
[ { "docid": "594435b2221d086ea0a32f2d8aa25714", "score": "0.70329934", "text": "def delete_index(self, **kwargs):\n\n self.__flann_parameters.update(kwargs)\n\n if self.__curindex is not None:\n flann.free_index[self.__curindex_type](\n self.__curindex, pointer(sel...
[ { "docid": "c217e92ae6b4a1aa241c525ae8f5f88e", "score": "0.7036752", "text": "def clear(self):\n try:\n # Remove the cached reference to the lexicon\n # So that it is refreshed\n del self._v_lexicon\n except (AttributeError, KeyError):\n pass\n ...
76fd7374b4e7794e72d96aa4126367ed
Print some info about the context in which the simulatotion was performed.
[ { "docid": "dba651296beb40e2f54f02e90779df6f", "score": "0.7098086", "text": "def _print_sim_context(dataset):\n print \"Command line was:\", \" \".join(sys.argv)\n print \"Process ID is: %d\" % os.getpid()\n sys.stdout.write(\"hg identify: \")\n sys.stdout.flush()\n os.system(\"hg identi...
[ { "docid": "cfe10f2ec84b47131d1720997fda9fbc", "score": "0.6998889", "text": "def info(ctx):", "title": "" }, { "docid": "c42fd18df64cd6260a7a745d4fcc7e92", "score": "0.6983037", "text": "def info(self):\n print(\"Grrrr..I am an Orc Wolf Rider. Don't mess with me.\")", "ti...
c8aa07b18df4527da3fcd2593342a0d8
Frequency Distirbution of a Bscan
[ { "docid": "7546a4cae37963e590f3a0c0366edefd", "score": "0.6529375", "text": "def frequency_bscan(outputdata):\n spects = []\n freqs = []\n times = []\n\n for i in range(len(outputdata[0, :])):\n f, t, zxx = stft(outputdata, i)\n freqs.append(f)\n times.append(t)\n ...
[ { "docid": "2ae7a55bd649f9f37b62c65dcb651aaa", "score": "0.62273216", "text": "def likelihood_per_bin(self):", "title": "" }, { "docid": "7e14e65b1e03d3dcc85f1201cb61c9aa", "score": "0.61921173", "text": "def GetFrequency():\n return getfreq(DZERO)", "title": "" }, { "...
69c370ade6a042c33028e6acb2242268
Update display. Dispatches display update to correct driver.
[ { "docid": "1585eef1b9485bd999283248aa2604dc", "score": "0.0", "text": "def _update(self, buf):\n self.setup()\n\n self._send_command(UC8159_DTM1, buf)\n\n self._send_command(UC8159_PON)\n self._busy_wait(0.2)\n\n self._send_command(UC8159_DRF)\n self._busy_wait...
[ { "docid": "1c3be0adf4f55a8bc659ad03076a7f1c", "score": "0.72705704", "text": "def update_display(self):\r\n self.update_slaves()", "title": "" }, { "docid": "8d898d2b2abd521e3bc423b022389bb0", "score": "0.7244171", "text": "def update(self) -> None:\n self.command(_IL9...
0aeaef8fe75cbb358e4b32b2170b64a2
Semantic segmentation PointNet, input is BxNx3, output Bxnum_class
[ { "docid": "cbb63303791e7580a7f37dc2f2d71cd8", "score": "0.53639525", "text": "def get_model_decoder(point_cloud, is_training, num_class, bn_decay=None):\n if isinstance(num_class, int):\n num_class = [num_class]\n batch_size = point_cloud.get_shape()[0].value\n num_point = point_cloud.g...
[ { "docid": "908836ac918506243446e197e69c195a", "score": "0.63908523", "text": "def class_shape():\n\n return 0", "title": "" }, { "docid": "41ddf838380e3c5f2fd6629f62ebb942", "score": "0.6256854", "text": "def class_predictor(num_anchors, num_classes):\n return nn.Conv2D(nu...
af72df6c64e194192b02c31f2ed2cfb7
Gather beams from nested structure of tensors. Each tensor in nested represents a batch of beams, where beam refers to a single search state (beam search involves searching through multiple states in parallel). This function is used to gather the top beams, specified by beam_indices, from the nested tensors.
[ { "docid": "316a8ad574fe33266533529dee462087", "score": "0.7261795", "text": "def _gather_beams(nested, beam_indices, batch_size, new_beam_size):\n # Computes the i'th coodinate that contains the batch index for gather_nd.\n # Batch pos is a tensor like [[0,0,0,0,],[1,1,1,1],..].\n batch_pos = ...
[ { "docid": "7390362172fcd093fff92c0241d3a6f4", "score": "0.7263369", "text": "def _gather_beams(nested, beam_indices, batch_size, new_beam_size):\n # Computes the i'th coodinate that contains the batch index for gather_nd.\n # Batch pos is a tensor like [[0,0,0,0,],[1,1,1,1],..].\n batch_pos = ...
87f79b856add3fa9ef4ec525bb94de39
we define our inputs that can be accessed by all methods
[ { "docid": "33945de30f948fa075e8311fb8c5b628", "score": "0.0", "text": "def setUp(self):\n super(ModelTest, self).setUp()\n self.vggspa = VGGSPA(CFG)", "title": "" } ]
[ { "docid": "16337ee04ec23171481e5c0243e52047", "score": "0.8017303", "text": "def inputs(self, **kwargs):\n \n pass", "title": "" }, { "docid": "cf7f1df4a844595c91f0b7ad6517f4dd", "score": "0.7612797", "text": "def input(self):\n pass", "title": "" }, { "...
9aabf93e79bc7c779bb0dbd4f3a412cd
Filter trace markers to remove certain file names.
[ { "docid": "1755aab8c6fccfed9412ab99ad77ec6d", "score": "0.6129329", "text": "def filterTrace(mlist):\n assert (type(mlist) == list)\n if len(mlist) == 0:\n return mlist\n mlist = mlist[-1] #The last stack trace will be a super set.\n mlist = e...
[ { "docid": "3e8dfbd9274e58d202beea3fab40a79d", "score": "0.6482564", "text": "def remove_trace(lines):\n f = None\n for sloc in lines or []:\n if sloc.file() != f:\n f = sloc.file()\n buf = GPS.EditorBuffer.get(f, open=False)\n if buf:\n overl...
c376375a2c21359275a19f13621f818d
Returns context_lines before and after lineno from file. Returns (pre_context_lineno, pre_context, context_line, post_context).
[ { "docid": "2ca0c1ae1dc2e56b361992622cfa969b", "score": "0.7646606", "text": "def _get_lines_from_file(filename, lineno, context_lines):\r\n try:\r\n source = open(filename).readlines()\r\n lower_bound = max(0, lineno - context_lines)\r\n upper_bound = lineno + co...
[ { "docid": "280ff2b5366a81c7ef05f25b26ee29e8", "score": "0.6324767", "text": "def context(self):\n return (self.filename, self.lineno)", "title": "" }, { "docid": "26e67b102ef95eeac957245cc82510ad", "score": "0.5848709", "text": "def get_lineno_uncommented(self):\n\n li...
17c2814189a22ebe77b6326c60d6127d
Process received entity lists
[ { "docid": "7a0177407fac53ce1a76aa3fd88c6508", "score": "0.70364696", "text": "def _recv_entity_list(self, msg):\n OpEnum = pyimc.EntityList.OperationEnum\n if msg.op == OpEnum.REPORT:\n try:\n node = self.resolve_node_id(msg)\n node.update_entity_l...
[ { "docid": "366fa6d33ca97c3c3551d353c85998dc", "score": "0.64658636", "text": "def process(self):\r\n for entity_list in self.partition_dict.values():\r\n self._process_batch(entity_list)", "title": "" }, { "docid": "364ec06d9c1fec9a79652d74410ccf73", "score": "0.617647...
e6735eddfe47a863f66df13c59671fc4
the data_move process when UB can put not in N1 N0 X0 data
[ { "docid": "1bfeccd255add2006cf8e15f1f56f394", "score": "0.5550848", "text": "def data_move_case_two(self, tik_instance, ub_ori, ub_trans, is_last,\n num_x0, loop_time, loop_n, loop_len):\n ori_hwc = self.src_shape[0] * self.src_shape[1] * C0\n src_gm_index = num_...
[ { "docid": "8943af20b4bd092cad18df7199e9c53e", "score": "0.57849103", "text": "def data_move_case_one(self, tik_instance, ub_ori, ub_trans, core_loop,\n sum_core, align_loop, remainder, num_data_one_loop):\n is_x_padding = tik_instance.Scalar(\"uint64\", init_value=0)\n ...
24f8e87a6db55525649cd6fa190c01e5
The motor's electrical pitch. float with units of mm It gives the spacing between two magnets (full magnetic cycle) on a linear motor. Velocities and accelerations are in units of pitches/s and pitches/s^2, so it is important. Setting it sends an immediate command to the drive to change the electrical pitch. Notes This...
[ { "docid": "30a8e7ea7fcb89be45fb915922f8cfcf", "score": "0.76393646", "text": "def electrical_pitch(self):\n return self._get_parameter('DMEPIT', float)", "title": "" } ]
[ { "docid": "16e5e5c63a60e47e772a3bcb4f782b13", "score": "0.60981715", "text": "def pitch(self, direction):\n if self.heli.mainRotor.start:\n self.heli.speed += 0.0001 * direction", "title": "" }, { "docid": "113eb2870ef38b970a5d1a11133d07b1", "score": "0.60102075", ...
4b16dbd47cf65225b7e0e3738dbd884c
Dataframe from namedtuple list
[ { "docid": "f6cbc04c3997192a6b52987dfcf74b00", "score": "0.74547327", "text": "def df_from_nt(nt_list):\n cols = [x for x in nt_list[0]._fields] # List of Name Tuple element names\n data = {column: [] for column in cols} # Dict with list per tuple element\n\n for entry in nt_list:\n fo...
[ { "docid": "304c1ff54cf967a3422eb6f90553fdcf", "score": "0.73435163", "text": "def create_dataframe(tuple_data):\n return pd.DataFrame.from_records(tuple_data[1:], columns=tuple_data[0])", "title": "" }, { "docid": "4e01975757c2cfb2ab859e311eb12ea1", "score": "0.7110491", "text": ...
d0c37e6d335b41ee62f31ad93736719e
Function that performs the instantiation of the class "Provincia" to create the provinces objects. Invokes the function "listaProvincia" and scrolls through the list , so that each item in the list will be the name of the object, and declares a counter initialised at 1 and incremented by 1, to assign an identifier to e...
[ { "docid": "95aa1ff8dbb90f0bff1028377241de02", "score": "0.8064755", "text": "def creaObjetoProvincia():\r\n lista = []\r\n Provincias = listaProvincia()\r\n contador=1\r\n for provincia in Provincias:\r\n p = Provincia()\r\n p.set_nombre(provincia)\r\n p.set_identificad...
[ { "docid": "a46b8f5fb62470f5abfde9434f0b8198", "score": "0.6254899", "text": "def creaObjetoAccesorio():\r\n lista = []\r\n accesorios = listaAccesorios()\r\n contador=1\r\n for accesorio in accesorios:\r\n a = Accesorio()\r\n a.set_nombre(accesorio)\r\n a.set_identifica...
e3b9dd5a51ecf4a59fdeeb1a4825ebc7
Creates a new guild user chunk event from the given data.
[ { "docid": "f6090d0b7e97fddf6be5d56bddf6ec60", "score": "0.7571761", "text": "def from_data(cls, data):\n self = object.__new__(GuildUserChunkEvent)\n self.chunk_index = parse_chunk_index(data)\n self.chunk_count = parse_chunk_count(data)\n self.guild_id = guild_id = parse_gu...
[ { "docid": "71990f7b65b7d22b952221aa09c8d973", "score": "0.61346686", "text": "def create_object(self, data, **kwargs):\n return UserEvents(**data)", "title": "" }, { "docid": "748a5642eed20d597bb6d9fc46141961", "score": "0.56513685", "text": "async def on_chunk(self, data):\n...
a9350568ba18537fb51b7eff12dea6a2
Check global import / binary availability
[ { "docid": "58c494fdf4330e2a836e983f846d45f5", "score": "0.6543548", "text": "def checkup():\n\n if gtk is None:\n error('Unable to import python GTK module, aborting', True)\n\n if YubiController is None:\n error('Unable to import python yubioath module. Is it installed?',\n ...
[ { "docid": "fc7816f6d62ff5408f223c4afbf68418", "score": "0.70505756", "text": "def check_module_available(env, module):\n return execute_python_expr(env, 'import %s' % module) == 0", "title": "" }, { "docid": "536bf5a641fedb2a53821482d3d533fa", "score": "0.6998137", "text": "def b...
5f3d5bdcaeb0aaac9d82264861ad8b5a
Test if event was created for string description, functionbasedview with args, without logged in user.
[ { "docid": "86655b6f6b3ce675cbaf4392c111794e", "score": "0.6201935", "text": "def test_audit_trail_string_not_logged_function_view_with_argument(self):\n @audit_trail(description=\"Test\")\n def with_url_argument_view(request, pk):\n return HttpResponse()\n\n events_befor...
[ { "docid": "fe192525a56aace703867ebd265008be", "score": "0.6047266", "text": "def create_event(request):\n pass", "title": "" }, { "docid": "1753b57ca8e1f1fa575d3d3cc8b7f15f", "score": "0.5944244", "text": "def test_audit_trail_lambda_logged_user_function_view(self):\n user...
6a670641b117aeb2164a77f6dcbf25fe
Make variable `x` arc consistent with variable `y`. To do so, remove values from `self.domains[x]` for which there is no possible corresponding value for `y` in `self.domains[y]`. Return True if a revision was made to the domain of `x`; return False if no revision was made.
[ { "docid": "2e068df78422e1b02b5208470fad0021", "score": "0.6188503", "text": "def revise(self, x, y):\n revised=False\n overl=self.crossword.overlaps[x,y]\n \n #Based on the function shown in the lecture\n #First find the variables with overlap, and identify the overla...
[ { "docid": "e473e7185b5271ac809fdadadc08f7b5", "score": "0.6721664", "text": "def revise(self, x, y):\n flag = False\n overlap = self.crossword.overlaps[x,y]\n # If there is no point of overlap then the variables are arc consistent and there is no point of conflict\n if overl...
b59495343a0e1d5439d12b8608c8bed0
Test multiple executions of the same task.
[ { "docid": "261399b87f08db1e381ff5359778cf73", "score": "0.5937325", "text": "def test_double_execution(nworkers: int) -> None:\n # This test will fail if a job is re-executed multiple times.\n # external\n from rq.job import get_current_job\n\n def track_runs(inp: bytes) -> bytes:\n ...
[ { "docid": "a11a668122111160bc332671c3468d4d", "score": "0.70503175", "text": "def testTask(self):\n pass", "title": "" }, { "docid": "adf6ae40e4acbc55d4faf53185e9595a", "score": "0.6859597", "text": "def test_task_based(self):\n\n # Using the dummy scheduler to test th...
cad3fd9bd74c6d2d35193eaf55471060
Take a quantity string and return a decimal. Handles one hundred, two hundred, three hundred twenty five, 1, 1 1/4, 1 and 1/4, 1.25, .25. Negative values should have the negative sign first, such as 1/4 or 1 1/4
[ { "docid": "64125d04a6795dfd9024eac25f9f9b15", "score": "0.765134", "text": "def quantity_to_decimal(quantity_string: str) -> Decimal:\n\n # get actual fraction-like strings to be N/N with no spaces\n quantity_string = quantity_string.strip()\n quantity_string = re.sub(r\"\\b(\\d+)\\s+/\\s+(\\d...
[ { "docid": "e51deab5842154b50e00615d91f9b2f8", "score": "0.68759644", "text": "def parse_moneyline(string):\n if string.lower() in [\"ev\", \"even\", \"100\", \"+100\"]:\n return 1.0\n elif re.match(\"[+-][0-9]+?\", string):\n line = float(string[1:])\n if string[0] == '+':\n ...
8e4a08dc063469d103cfda26e7cbe95e
``dockerpty.pty`` PseudoTerminal '_hijack_tty' can handle some SSL errors
[ { "docid": "1e1aa5f27bcb3069248f14c6e9ce9d48", "score": "0.6853129", "text": "def test_hijack_tty_ok_ssl_error(self, fake_Terminal, fake_get_stdin_pump, fake_select):\n fake_select.return_value = ([], [])\n fake_client = MagicMock()\n fake_run_operation = MagicMock()\n fake_p...
[ { "docid": "56c965de0a73264b9a4f9dfe41c417c6", "score": "0.67390096", "text": "def test_hijack_tty_bad_ssl_error(self, fake_Terminal, fake_get_stdin_pump, fake_select):\n fake_select.return_value = ([], [])\n fake_client = MagicMock()\n fake_run_operation = MagicMock()\n fake...
b2f51586cf2125f2c5b5fa60597b8535
The purpose is to generate a pair of XY Maps for the specified alpha, beta and zoom parameters, the result XY Maps can be used later to remap the original fisheye image to the target angle image.
[ { "docid": "040f366585ccd84d974df3c080865f19", "score": "0.6853466", "text": "def create_anypoint_maps(self, alpha, beta, zoom, mode=1):\n if mode == 1:\n if beta < 0:\n beta = beta + 360\n if alpha < -90 or alpha > 90 or beta < 0 or beta > 360:\n ...
[ { "docid": "9c560f76911f7c9c8175fb5ea2835633", "score": "0.6331403", "text": "def create_panorama_maps(self, alpha_min, alpha_max):\n self.__moildev.Panorama(self.__map_x, self.__map_y, alpha_min, alpha_max)\n return self.__map_x, self.__map_y", "title": "" }, { "docid": "c1e14...
c6672f6c6a0371d7e88c2ae6712f1f81
Chop a string up into k mers of given length
[ { "docid": "d1541a8888b8786b200a4ea22c2a29a8", "score": "0.619577", "text": "def chop(st, k):\n for i in xrange(0, len(st)-(k-1)):\n yield (st[i:i+k], st[i:i+k-1], st[i+1:i+k])", "title": "" } ]
[ { "docid": "0db958df6e725ab6efe6f7f50077bcc6", "score": "0.6994418", "text": "def kmer_list(s, k):\n kmer = []\n for i in range(0,len(s)):\n string = s[i:i+k]\n if len(string) == k:\n kmer.append(string)\n return kmer", "title": "" }, { "docid": "6337a974ebf...
a5ecab4932699ebc6db733bd522b39b9
Get a bit from a shuffled key.
[ { "docid": "6cf8c0d418c0d56f18339943a3d695b8", "score": "0.8303021", "text": "def get_bit(self, key, shuffle_index):\n key_index = self._shuffle_index_to_key_index[shuffle_index]\n return key.get_bit(key_index)", "title": "" } ]
[ { "docid": "9ef8323bfc76dbd41921419d3627f652", "score": "0.73012364", "text": "def getbit(self, key, offset):\n return self.execute_command(\"GETBIT\", key, offset)", "title": "" }, { "docid": "24c9ca61d2375971833a57867f46c307", "score": "0.70907825", "text": "def getbit(self,...
5fc98f12a4c8288c371b6daf030bc732
The fasta file aligned with muscle.
[ { "docid": "151b68736fbed15de97786492bab40f7", "score": "0.6559242", "text": "def alignment(self):\n alignment = AlignedFASTA(self.p.muscle)\n if not alignment:\n assert self.fasta\n print \"-> Making alignment.\"\n self.fasta.align(alignment)\n retu...
[ { "docid": "3e3ea8cbd1c4ed441a1cf89fa9255cf2", "score": "0.7138664", "text": "def __muscle_align(self, in_file):\n\n #Align sequences with MUSCLE\n muscle_exe = f\"{self.files_path}/muscle.exe\"\n out_file = f'{in_file[:-4]}_aligned.fas'\n # Creating the command line\n ...
872391643242cf132c4a2350a51432e1
Construct a classifier VMR optinally supplying entries.
[ { "docid": "4545568340713a83348a17e1eabfb3bc", "score": "0.52344483", "text": "def __init__(self, table, vmr=None):\n\n self._table = table\n self._vmr = []\n self._default_entry = None\n\n if vmr is None:\n return\n for entry in vmr:\n if self._t...
[ { "docid": "be647706d72a44f8a4f74915f18282ea", "score": "0.6275436", "text": "def __init__(self, labels=3, tnorm=\"product\", rw=\"pcf\", frm=\"wr\"):\n print(\"Initializing classifier:\\n\")\n \"\"\"\n self.labels = labels\n self.tnorm = tnorm\n self.rw = rw\n ...
a5fe3cfd2beb9722ed020bfce764e3b9
Return the vertex with highest degree.
[ { "docid": "33b57282217aaf672ceb206014eb9eb3", "score": "0.8553951", "text": "def highest_degreevertex(self):\r\n hd = -1\r\n hdv = None\r\n for v in self._vertices:\r\n if self.degree(v) > hd:\r\n hd = self.degree(v)\r\n hdv = v\r\n r...
[ { "docid": "34efc8ddd04697dadcadf909cb657b27", "score": "0.84826887", "text": "def highest_inDegreevertex(self):\r\n hd = -1\r\n hdv = None\r\n for v in self._inedges: #_vertices would also work for the loop\r\n if self.inDegree(v) > hd:\r\n hd = self.inDe...
af8c5d32807710392910806686573551
The epoch timestamp for the overlapping checkin
[ { "docid": "ae327feb09b28b35359cf8f77e16aad5", "score": "0.0", "text": "def getCreatedAt(self):\n return self.base.get(\"createdAt\", [])", "title": "" } ]
[ { "docid": "c05d1339b961ac05e5fc29130bf1b798", "score": "0.6936067", "text": "def epoch_time(self):\n return time.time() - self._begin_time", "title": "" }, { "docid": "98133f60f02de6e5ae9059f9cd822443", "score": "0.6546636", "text": "def _get_epoch(self):\n\n return se...
0b02cf4b3d10cf04f8e63d0eb009280f
Check int limits information. Get information from ``sys`` library.
[ { "docid": "f7114b15bf5c1e211774f1b174e16720", "score": "0.52950776", "text": "def check_int():\n info = {'INTEGER': {}}\n\n if sys.version_info >= (3, 1):\n info['INTEGER'].update(\n {'Bits per Digit': sys.int_info.bits_per_digit,\n 'Size of Digit': sys.int_info.size...
[ { "docid": "79c9cdd92a1ce3082a80fe3986ddf841", "score": "0.71252376", "text": "def describe_limits():\n pass", "title": "" }, { "docid": "3583ad4d767da787be8af56ee8c44547", "score": "0.7047186", "text": "def _CheckLimit(self, limit):\n return _CheckInteger(limit, 'limit', upper...
ff69d8a2c046d534a92753ba6a9968c7
Display a slice of a 3D pseudocolor plot of radial velocity generated by VisIt for this timestep. If the plot image isn't available, then generate it with VisIt on lens.
[ { "docid": "717c9b612a29688bddce04ff40c87db3", "score": "0.65592563", "text": "def plotRVSlice(self, step, poll=False):\n self._out.plotRVSlice(step, poll, self._initmod._mycut.an_cut, self._initmod._mycut.sp_cen_den, self._initmod._mycut.sp_st_fac)", "title": "" } ]
[ { "docid": "483ef13168e0ea0e989781594bddbb38", "score": "0.6781416", "text": "def plotRV3D(self, step, min_rv, poll, anelastic_cutoff, sp_cen_den, sp_st_fac):\n for s in self._slices:\n if s.timestamp[0] == step:\n s.plotRV3D(min_rv, poll, anelastic_cutoff, sp_cen_den, sp_st_fac)...
a7a86ceb47f4ea496fef90aeea676d9f
QR code detection return a list of dictionaries, which contain 'hypothesis_bounding_rect' as bounding box of qrcode hypothesis, 'finder_patterns' as finder pattern contours, 'is_containing_qr_code' as the indicator of true, false, or probable qrcodes
[ { "docid": "156f2f7c905eee0f6a02ebc2d6e73322", "score": "0.7080438", "text": "def detect_qr_code(img, is_pop_display):\r\n\r\n img_blur, img_blur_gray, img_blur_binarize = pre_process_img(img)\r\n img_integral = integrate_img(img_blur, img_blur_binarize)\r\n block_mask, block_mask_raw = get_blo...
[ { "docid": "4f87db3d9222b554f769a239c45222ab", "score": "0.76213753", "text": "def get_finder_patterns_in_hypotheses(img, bounding_rects_hypotheses, is_pop_display):\r\n qr_code_hypothesis_detections = []\r\n\r\n \"\"\" Process the hypotheses ONE-BY-ONE \"\"\"\r\n for br in bounding_rects_hypot...
b6aa43fb28b96ebce5ab8a1a7121c6b9
The contacts are sorted here and displayed in the gui window for the user to view
[ { "docid": "dfbf9fc8ecc04218c96886edcbafd704", "score": "0.6409214", "text": "def selF():\n\tcontacts.sort()\n\tselect.delete(0,END)\n\tfor fname,lname,phone,address,email in contacts :\n\t\tselect.insert(END,fname+\",\"+lname)", "title": "" } ]
[ { "docid": "49341738e82647fa1972faf8cdbee629", "score": "0.70360625", "text": "def contact_list_update(self):\n cntcts = self.client_db.get_contacts()\n self.contacts_model = QStandardItemModel()\n for cnt in sorted(cntcts):\n itm = QStandardItem(cnt)\n itm.set...
c585ae41ab51e2548c2bb5e58a18990c
Used as GIT_AUTHOR_NAME and GIT_COMMITTER_NAME environment variables
[ { "docid": "3237c40882c51a589d7559a266716f81", "score": "0.0", "text": "def generate_user_name(spawner):\n return spawner.user.name", "title": "" } ]
[ { "docid": "91535ca3321b8a6da14aa75ded759c7d", "score": "0.7018517", "text": "def add_author(context_dict: dict) -> dict:\n result = sp.run(\n [\"git\", \"config\", \"user.name\"],\n text=True,\n capture_output=True,\n check=False,\n )\n author = result.stdout.strip(...
8f3291a84e6c0e3fa8369c4ab540a6b4
Configures the Naaya Site for the Naaya Survey Product
[ { "docid": "c6813efd2ff1d565592ea13407db75ca", "score": "0.6621894", "text": "def manage_configureSite(self, REQUEST=None):\n self.manage_configureCatalog()\n self.manage_configureEmailNotifications()\n self.manage_configureSecurity()\n #self.manage_updatePortlets() # disable...
[ { "docid": "3eba6b65f16ea0a4a4737e22011f3594", "score": "0.58864015", "text": "def test_com_adobe_cq_social_site_impl_site_configurator_impl(self):\n pass", "title": "" }, { "docid": "d8a10b37dc069aa4d5a8f2345c084fdd", "score": "0.5704494", "text": "def setup_blog(self):\n ...
4a44748cebac2d3abfbd07691a73eca0
r""" Finds a linear relation between the given list of OMSs. If they are LI, returns a list of all 0's.
[ { "docid": "bd0dbbe42ede2a778913aa43010ca117", "score": "0.6331311", "text": "def linear_relation(self, List):\n for Phi in List:\n assert Phi.valuation() >= 0, \"Symbols must be integral\"\n \n R = self.base()\n ## NEED A COMMAND FOR RELATIVE PRECISION OF OMS\n ...
[ { "docid": "703cf4c945aa3009e5d58dd9816096f2", "score": "0.59615", "text": "def eltL0(strEle,nodCoo):\n mesDat = []\n for elt in strEle:\n nodI = np.int(elt[0])\n nodJ = np.int(elt[1])\n dX = nodCoo[nodJ][0]-nodCoo[nodI][0]\n dY = nodCoo[nodJ][1]-nodCoo[nodI][1]\n ...
36ca1ab1014ba94a94116668d7f0dc5e
Checks if it's rush hour or not based on the time given
[ { "docid": "f5df4086e10a9c87b01c0088cf704504", "score": "0.74231344", "text": "def is_rush_hour(hour, minute):\n rush_hour = []\n\n if (5 <= hour <= 9) or (16 <= hour <= 18):\n if (hour == 5 and 45 <= minute < 60) or (5 < hour < 9):\n rush_hour = [1]\n ...
[ { "docid": "f33219fe39e54f981037f15652125072", "score": "0.7023107", "text": "def isPossibleHour(self, hour):\n if hour > 23 and self.isPossibleHour(0):\n hour = int(hour)\n if not self.overnight:\n return self.stTime.hour <= hour <= self.endTime.hour\n else:\n...
e2cf7445300fa4d7adccac4df0887b30
Returns a string containing n random words from wordlist
[ { "docid": "22c166d3d90d1a348cc5f226f779dcc0", "score": "0.8835607", "text": "def random_string(wordlist, n):\n return \" \".join([random_word(wordlist) for _ in range(n)])", "title": "" } ]
[ { "docid": "17466e947506faa4e0135d8c2c04f89a", "score": "0.7959614", "text": "def get_random_words(chars, start, stop, n):\n results = []\n for i in range(int(n)):\n len = random.randrange(int(start), int(stop))\n results.append(''.join(random.choice(chars) for _ in range(len)))\n ...
954c4409a1ba7017f3b740af5b2d9f48
Accepts a weekday and tests if today is that weekday.
[ { "docid": "2e3dfcebad664d7447ebdf26e1ef2dce", "score": "0.7773084", "text": "def test_for_day(target_day):\n import time\n # Get the date object of today's date:\n todays_date = time.localtime().tm_wday\n # Form a dictionary of the days of the week, starting on Monday\n # since this is t...
[ { "docid": "9f211aa22ce1299f4f4f6bb340a47ae8", "score": "0.7757462", "text": "def is_dayofweek(day, today):\n if isinstance(today, datetime):\n int_day = int(day)\n if today.weekday() == int_day - 1:\n return True\n return False\n else:\n raise Exception(\"{}...
3562d3dd13e277d752083a277071d3cb
Starts reading the file in file_handle, populating the reactions and atomic_relaxation members.
[ { "docid": "5bad6f63fa863c4b72bcec2806f2bf1a", "score": "0.7447146", "text": "def __init__(self, file_handle):\n\t\tself._file = file_handle\n\t\tself.reactions = {}\n\t\tself.atomic_relaxation = {}\n\n\t\t# Determine MAT number for this file,\n\t\t# while skipping ahead to start of first header\n\t\tMF...
[ { "docid": "711d7934c80dc5febb6f5fa7ddea8f39", "score": "0.5626557", "text": "def _open_file(self):\n\n with open(self.filename) as file:\n self.file_data = file.readlines()\n\n self.file_length = len(self.file_data)\n self.line_index = 0", "title": "" }, { "d...
9b3360467e6d9f991c4590a7f3bc1070
.timeof() calculate the whole time of the file
[ { "docid": "a77fd1bc51a17819331082ad160b622b", "score": "0.7086473", "text": "def timeof(self):\r\n time = self.mtr[-1,4] - self.mtr[0,4]\r\n if time < 0:\r\n time += 65536\r\n time += ( self.mtr[-1,3] - self.mtr[0,3] )*65536\r\n time_hours = (time / 1000000)/3600\...
[ { "docid": "7ae5ad7bc2d33e48e90728fc6be4c0bf", "score": "0.69575024", "text": "def time():", "title": "" }, { "docid": "7a0b826d66927ef4fcb590f59bc4d1ac", "score": "0.6760677", "text": "def _measure_timing(self, header):\n return (rospy.get_rostime() - header.stamp).to_sec()",...
d2aeec4836cdf76336be24b910aab608
Create our initial stream and write to it over SMB1 protocol. Start with offset 0.
[ { "docid": "72044df7bab733678cb137f8235a48e3", "score": "0.68725437", "text": "def test_065_create_and_write_stream_smb1(request):\n depends(request, [\"STREAM_TESTFILE_CREATED\"])\n c = SMB()\n c.connect(host=ip, share=SMB_NAME, username=SMB_USER, password=SMB_PWD, smb1=True)\n fd = c.creat...
[ { "docid": "bddce7b71ffc0e39fb548f3b8fd0246f", "score": "0.65759665", "text": "def test_061_create_and_write_stream_smb2(request):\n depends(request, [\"STREAM_TESTFILE_CREATED\"])\n c = SMB()\n c.connect(host=ip, share=SMB_NAME, username=SMB_USER, password=SMB_PWD, smb1=False)\n fd = c.crea...
46adae9c98fd6026efdea1d766439e66
Test select multiples choices are split within repeats in CSV exports.
[ { "docid": "0d47b608d9ef2a061cc986110dfcf3d6", "score": "0.72824013", "text": "def test_split_select_multiples_within_repeats(self):\n self.maxDiff = None\n record = {\n \"name\": \"Tom\",\n \"age\": 23,\n \"browser_use\": [\n {\"browser_use/...
[ { "docid": "2d5cb44cdb85d97c0343e4af60eea444", "score": "0.73833954", "text": "def test_split_select_multiples_with_randomize(self):\n md_xform = \"\"\"\n | survey |\n | | type | name | label | parameters |\n | | text ...
292a4ae4224521db4e5539e2fe40e59b
Displays the icon according to the operating system
[ { "docid": "410c25c1b09950d9e108c44cfe05ced7", "score": "0.6957155", "text": "def icones(self):\r\n if \"nt\" == name:\r\n self.root.iconbitmap(\"icons/icon.ico\")\r\n else:\r\n img = Image(\"photo\", file=\"icons/icon.png\")\r\n self.root.tk.call(\"wm\", \...
[ { "docid": "9e388977a27612c28387556e97934387", "score": "0.68452096", "text": "def icon():\n return \"icon.png\"", "title": "" }, { "docid": "5e69561bb995b86026c5057fc57ea017", "score": "0.6736521", "text": "def icon(self):\n return \"as_ico_command.png\"", "title": "" ...
ea709676884608c4eb7bd6ba186f8058
Return last average price by date for address
[ { "docid": "d64de475c378b783adcea981e8df5951", "score": "0.7730563", "text": "def last_avg_price(address: str, end_date: dt.date) -> Union[AvgPriceModel, None]:\n\n try:\n return (\n AvgPriceModel.select()\n .where(\n AvgPriceModel.addre...
[ { "docid": "6fe6595bf749d4be707df8a261ccf555", "score": "0.64064676", "text": "def get_avg_prices_rows(offers: List[Dict[str, Any]]) -> List[Any]:\n avg_prices = []\n grouper = lambda x: x['address']\n for address, items in groupby(sorted(offers, key=grouper), key=grouper):\n items = lis...
42b9d9569f4770cbb15dac1a978a2cb4
Test the calls to assert_equal_msg for the positional arguments.
[ { "docid": "914cce41d87c6d6d68557a26d81ed1ac", "score": "0.7829213", "text": "def test_assert_equal_msg_calls_for_positional_arguments():\n\n with mock.patch(target=\"tubular.testing.helpers.assert_equal_msg\") as mocked_method:\n\n expected_args = [\"obj\", \"expected_method\", \"msg\"]\n\n ...
[ { "docid": "6ae70b8bb010cd704e9fce7bf977453e", "score": "0.7293037", "text": "def test_call_eq(self):\n self.assertCallEqual(\n 1,\n 2,\n func=str,\n args=[1],\n otherargs=[2],\n kwargs={'testing': True},\n otherkwargs={...
bc7378cf1929426a0488ca80370047de
Provides the 3D genomic data corresponding to disease, chromosome
[ { "docid": "f01d911f63f4a85007244dd3506baff4", "score": "0.5612504", "text": "def real_genomic_data():\n def real_data_(disease, chrom):\n return scipy.io.loadmat(os.path.join(REAL_DATA_DIR, disease, 'chromo_{}_processed.mat'.format(chrom)))['X']\n\n return real_data_", "title": "" } ...
[ { "docid": "0b2b3e8f30a2655c858c3706f8711d0f", "score": "0.5864309", "text": "def read_3d_file(filename):\n return read_nd_file(filename, 3)", "title": "" }, { "docid": "83ce175b10ea080bff84a3dd1ba9aafd", "score": "0.58423555", "text": "def geo_meta(dicomfile):\n\n # rows a...
efe4945b4bc959e32bc42da664ac3db0
Overridden parent class destruction method method that adds additional logic to destroy the underlying toolkit widget. The destruction happens in dual pass topdown, then bottomup. On the topdown pass, the traits listeners for the abstract obj are unhooked so that no events get fired during destruction. On the bottom up...
[ { "docid": "56720abac1924d3ce7798466f7a7bfb7", "score": "0.84241104", "text": "def destroy(self):\n # Remove the abstract object as a trait listener so that it\n # does not try to update after destroying its internal widget.\n self.remove_trait_listener(self.abstract_obj, 'shell')\n...
[ { "docid": "a53dd6a3c3388b044499111a8d792796", "score": "0.6808209", "text": "def destroy(self):\n del self.widget", "title": "" }, { "docid": "90cc71eb89daca368a6bd631d5cba017", "score": "0.65991217", "text": "def cleanup_callback(self, obj, event):\n self.parent.rend....
583f4036233277798d30891d0491a2b2
Query or edit the camera in a gl render panel. Derived from mel command `maya.cmds.hardwareRenderPanel`
[ { "docid": "02eb3dea994300a093267912afb97e41", "score": "0.6226707", "text": "def getCamera(self, **kwargs):\n \n pass", "title": "" } ]
[ { "docid": "e1769c5d20baf8236d54fe6e955c1ac8", "score": "0.6627869", "text": "def GetRenderingCamera(self):\n pass", "title": "" }, { "docid": "9db2bdb3b4eddcbdf4a5fd461d9e143e", "score": "0.63430506", "text": "def camera(self, camera):\n self.renderer.camera = camera",...
283f38a36cb317c6e166ea440bad40d8
Stop and then start the daemon.
[ { "docid": "511a9b1031de48879200e6d9c4222065", "score": "0.0", "text": "def restart(self):\n self.stop()\n self.start()", "title": "" } ]
[ { "docid": "24fdea183ea66334ccc720419bfc7b08", "score": "0.7850297", "text": "def start(self):\r\n if self.go_daemon:\r\n if not self.pidfile:\r\n self.log.error(\"Daemon needs pidfile\")\r\n sys.exit(1)\r\n self.run_func_safely(self._boot_daemon)",...
09f40ecffd6b941aa945901d297b2fa9
u"""Przetwarzanie slowa, sprawdzenie jego typu i dodanie go do odpowiedniej listy.
[ { "docid": "da2691c3ddbacfd0456af75842c22981", "score": "0.0", "text": "def __processWord(word):\n if len(word) == 3 or word.isupper():\n if __isRome(word):\n utility.add_to_dict(__rome, word)\n else:\n utility.add_to_dict(__shortcuts, word)\n else:\n uti...
[ { "docid": "4f87fe47e49d703ab17987bcba1aea1a", "score": "0.6794209", "text": "def slow() -> None:", "title": "" }, { "docid": "4780e645539e45c292c4aeed12fc3a85", "score": "0.595264", "text": "def slower(self):\n pass", "title": "" }, { "docid": "d3a3f11a4c3460c2ca6...
9ec31a22baae13c15bd0065bbda4d531
Send a command to merlin and wait to return the results. Raise an exception if merlin returned an error message.
[ { "docid": "0c7b2cf58e741cbf8df78b90b05bbfcb", "score": "0.65415144", "text": "def send_command(self, *cmd):\n\n if self.mainpipe is None or self.mainpipe.returncode is not None:\n self.restart()\n self.mainpipe.stdin.write(json.dumps(cmd).encode('utf-8'))\n line = self.m...
[ { "docid": "4afe59d1d095254a35c8a9e1b65e4894", "score": "0.62831205", "text": "def _doCommand(self, msg, ret_type = str):\n msg = msg + '\\n'\n ret = ERROR\n self._lock.acquire()\n try: \n self._client.send(msg)\n ret = self._client.recv(1024)\n ...
8799ea90a06e49ddb628f103a556e4da
Request stored feedback for this result from RTX
[ { "docid": "c412767fbe77f9d8b29dc58a479c952a", "score": "0.0", "text": "def get_result_feedback(response_id, result_id): # noqa: E501\n rtxFeedback = RTXFeedback()\n return rtxFeedback.getResultFeedback(response_id, result_id)", "title": "" } ]
[ { "docid": "9909e25386eb757d88738d6797469601", "score": "0.60022223", "text": "def estimate(self):\r\n self.store()\r\n # Validate Data Request\r\n # Send to queue\r\n # Return scheudle\r", "title": "" }, { "docid": "6d3e70c19d7a64997aacfe7ce35ea546", "score":...
fd9095af87de0d8f52177c1b88881c4e
Setup some initial variables
[ { "docid": "8c2cf3b7a4cb399e343ce6af003017d0", "score": "0.0", "text": "def initialize2D(self, todraw, xtitle, xbins, ytitle, ybins, cuts):\n print \"============ initialize2D ==================================\"\n print \"2D shape systematics \", todraw, \" x \",xtitle, \" y \",ytitle...
[ { "docid": "cbcd256d2ab8970061afb0326dd780c5", "score": "0.72661275", "text": "def pre_initialize(self):\n pass", "title": "" }, { "docid": "c92637668a066945e6c1624fbc4d1976", "score": "0.7254438", "text": "def initialize():", "title": "" }, { "docid": "9b30fc65b0b...
52b2df338463293f04d969d487031b7d
Runs the CollectionCost module and populates the IO dictionaries with calculated values.
[ { "docid": "9af86f1781a4bd9c28a491fe7216f674", "score": "0.62023646", "text": "def run_module(self):\n\n try:\n self.create_ArraySystem()\n self.calculate_trench_properties(self.input_dict, self.output_dict)\n operation_data = self.estimate_construction_time(self....
[ { "docid": "f9dfb65556c23d60c4b78e4d649e6ebe", "score": "0.64189136", "text": "def main():\n cost = Costs()\n cost.update_total_costs(5000000, turn=1)\n cost.update_total_costs(4000000, turn=2)\n cost.update_total_costs(3000000, turn=3)\n cost.update_total_costs(2000000, turn=4)\n cost...
982bead9450d57c40ef7b3fd8fad98e4
Returns the operation's result data set, which is always an iterable. The difference with L{working_set} is that it returns the data B{after} all filters and ordering (not slicing) are applied.
[ { "docid": "0e86eb69c7757314b480957eb0cbb11f", "score": "0.0", "text": "def data_set(self, request, *args, **kwargs):\n data = self.working_set(request, *args, **kwargs)\n\n filters = self.filters or {}\n if filters:\n for name, definition in filters.iteritems():\n ...
[ { "docid": "ef49803b3e27b1fec23e275587dea74f", "score": "0.70770305", "text": "def result_set(self):\n if self.status != ExecutionStatus.RUNNING and self._result_set is None:\n response = self._temboo_session.get_content(self.get_session_path(), {'view':'outputs'})\n self._r...
dcb1b8bf0fcce2f33fbceabbafe3e645
Return a new slide based on slide and having partname, created from scratch.
[ { "docid": "2159840511c60dfa1b051c38d56ff5bc", "score": "0.6649468", "text": "def new(cls, slide, partname, package):\n element = CT_NotesSlide.new()\n notes_slide = cls(partname, CT.PML_NOTES_SLIDE, element, package)\n return notes_slide", "title": "" } ]
[ { "docid": "4a340950d41017958ca74388058fd5ee", "score": "0.7599987", "text": "def new(cls, slide_layout, partname, package):\n slide_elm = CT_Slide.new()\n slide = cls(partname, CT.PML_SLIDE, slide_elm, package)\n slide.shapes.clone_layout_placeholders(slide_layout)\n slide.r...
588d72d8e087dcd6d745b56320578dba
Renders a given dictionary to a string using the given template fname.
[ { "docid": "56e9e14f3b7681543a306823965edeb6", "score": "0.6991874", "text": "def renderDict(d, tmpl):\n import web.template as template\n renfunc = template.frender(tmpl, globals=RENDER_GLOBALS)\n s = str(renfunc(d))\n return s", "title": "" } ]
[ { "docid": "d701eaab31a42e6f92eb89d722014168", "score": "0.70578563", "text": "def render(template_string, context, *filepath):\n for key, value in context.items():\n template_string = template_string.replace('{{ %s }}' % key, value)\n template_file = open(os.path.join(*filepath), 'w')\n ...
2e685c8cb86050cc606e80b6aaf1cfc4
Create s3 volume using IAM Role auth.
[ { "docid": "feb91429653a7b28081ec37c69b34a51", "score": "0.7573797", "text": "def create_s3_volume_role_auth(cls, name, bucket, role_arn, external_id,\n access_mode, description=None, prefix=None,\n properties=None, api=None):\n ...
[ { "docid": "819226986a465f5a16f920a1aad2294b", "score": "0.64687634", "text": "def create_iam():\r\n iam = boto3.client('iam', region_name='us-east-1', aws_access_key_id=KEY,\r\n aws_secret_access_key=SECRET)\r\n try:\r\n iam.create_role(Path='/',\r\n ...