query_id
stringlengths
32
32
query
stringlengths
9
4.01k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
1c5a069be26f7f0e91e59148c802ad17
Create a new DomainAssociation on an App
[ { "docid": "81b9f2113a1ba457c6dd65ad42b485cc", "score": "0.54804415", "text": "def update_domain_association(self, appId: str, domainName: str, subDomainSettings: List, enableAutoSubDomain: bool = None) -> Dict:\n pass", "title": "" } ]
[ { "docid": "87f84e2f292e546be471ab59a0b01eab", "score": "0.7183197", "text": "def create_domain_association(self, appId: str, domainName: str, subDomainSettings: List, enableAutoSubDomain: bool = None) -> Dict:\n pass", "title": "" }, { "docid": "cbcd1d9b3813db060204d9dc0571a2c4", ...
f3ff2c7a040e8c2ebd09411de0fa3bd1
Creates box and classification targets for a batch.
[ { "docid": "e0e7fa272de84ab3bea994b25e41282e", "score": "0.53381574", "text": "def encode_batch(self, batch_images, gt_boxes, cls_ids):\n # print(\"================== LabelEncoder.encode_batch() ================\")\n images_shape = tf.shape(batch_images) # Tensor(\"Shape:0\", shape=(4,),...
[ { "docid": "d7326264dd15f2259f4ae7b4bd19fc21", "score": "0.6387346", "text": "def multi_gt_creator(input_size, strides, scale_thresholds, num_classes, label_lists=[], use_anchor=False, name='VOC'):\n if not use_anchor:\n assert len(strides) == len(scale_thresholds)\n # prepare the all empty...
97d70b040208a5510b0aed2813ef30e1
Removes the given tag from this function. name the tag name to be removed.
[ { "docid": "c21b0a0f5fb1cbebd40502d60c80d8f1", "score": "0.8454357", "text": "def removeTag(self, name: unicode) -> None:\n ...", "title": "" } ]
[ { "docid": "9c673493ead30e0c899b0d2d8223be54", "score": "0.7143746", "text": "def remove_tag(self, tag_name):\n if self.id is None:\n raise Exception(\"Missing id: This API requires a load test ID be supplied.\")\n tag_name = urllib.quote_plus(tag_name)\n return self.conn...
a8cbd374234aac6ec71d5b9d14526065
Manipulate command aliases. An Alias is an alternative invocation for a command. If a command is not found under the invocation given, the list of aliases is checked, and if the invocation is found to be an alias, the request is instead forwarded to the command word set under the alias. Due to this approach to resoluti...
[ { "docid": "fed54708c6d83e86e57e4804052f98a4", "score": "0.6096765", "text": "async def cmd_calias(self, args, **_):\n if not args:\n raise CommandInputError(\"This command requires a subcommand.\")\n\n # The first argument passed is a subcommand; What action should be taken.\n ...
[ { "docid": "1afb14ecd0a128b0ac2149e8925c1284", "score": "0.6841163", "text": "def register_alias(self, alias_name=None, command_name=None):\n\n if alias_name == command_name or None in [alias_name, command_name]:\n raise ValueError(\n \"alias_name and command_name must b...
e51c91ba31411065e95abd67208532b6
Return the percentiles of a datasets
[ { "docid": "73b2683454887099baf3ef5ded9d38ff", "score": "0.5939454", "text": "def api_get_percentile(id=None):\n auth_func()\n if not id:\n return jsonify({})\n query = db.session.query(Percentile).filter_by(dataset_id=id)\n result = []\n for elem in query:\n result.append(e...
[ { "docid": "934fc11abbcd3d6495741e96b93a1737", "score": "0.7504458", "text": "def percentiles(self):\n return self._percentiles", "title": "" }, { "docid": "89e6cab31adfad66b50252e6fd021668", "score": "0.72433335", "text": "def Percentile(data, percentile=(25.0, 75.0), N=100):...
f2cb9dfa96ebc1153e4e828b62bbdcf7
Read ahead a number of buffers to fill the window.
[ { "docid": "8a63e3e8fd1a648a83a73810cd461cc7", "score": "0.6799353", "text": "def FetchWindow(self):\n # Read the first lot of chunks to save on round trips\n number_of_chunks_to_readahead = min(\n self.state.file_size/self.CHUNK_SIZE + 1 -\n self.state.current_chunk_number,\n ...
[ { "docid": "ad4889c8e2f38472c9fae868bca9b2d9", "score": "0.71676314", "text": "def read_next_buffer(self, n):\n\t\tx = 0\n\t\td = 0\n\t\tif self.seekable:\n\t\t\tself.rw.seek(self.r_pointer)\n\t\twhile n > x:\n\n\t\t\tbuff = self.rw.read(n)\n\t\t\td = len(buff)\n\t\t\tif d == 0:\n\t\t\t\tif self.wait_fu...
71db05b56e300b005ff3604e4c59f280
Retuens Proxy list assocaited witht hat VSInstance . Read only attribute
[ { "docid": "b739ea08821c6e0d0353cbcaf007c9f8", "score": "0.0", "text": "def co_ordinator(self):\n if self.vsa_co_ordinator is None:\n self.vsa_co_ordinator = self.vsa_instance.co_ordinator\n\n return self.vsa_co_ordinator", "title": "" } ]
[ { "docid": "5f7589fc1c973fc158a7f1720636077b", "score": "0.71082884", "text": "def proxy_list(self):\n return self.vsa_proxy_list", "title": "" }, { "docid": "7313e1bcdc6e0e3de7c4ad2018a24dfb", "score": "0.6473861", "text": "def get_instances(self):", "title": "" }, { ...
29e766762c19e733d8f684006d27abe1
Sets the active item to the one indicated by index if the tablelist"s state is not disabled. If index is outside the range of items in the tablelist then the closest item is activated. The active item is drawn as specified by the activestyle configuration option when the widget has the input focus and the selection typ...
[ { "docid": "597b90e1e2cc25ad2c0f484241fb8c67", "score": "0.61238855", "text": "def activate(self, index):\n return self.tk.call((self._w, \"activate\", index))", "title": "" } ]
[ { "docid": "c9951b1416f1748c2969436c80feda19", "score": "0.6596948", "text": "def set_active(self, index):\n self.combo.set_active(index)", "title": "" }, { "docid": "b59bdd3098a686a0168448851a506590", "score": "0.6454382", "text": "def activatecell(self, index):\n retu...
a6f1c8cd804a84d928070259bcb3a192
Function for getting data from MySQL Database Output url/ when you not provide id, it will fetch all the data url// when id provided, it will fetch specific data
[ { "docid": "d619e072b5d11a9ce8d6a07e098ad576", "score": "0.5017003", "text": "def get(self, data_id = False):\n sql_builder = SQLBuilder()\n\n if not data_id:\n sql_builder.select(\"*\", self.database_name)\n self.internal_data = self.query(sql_builder.build()).data()...
[ { "docid": "b9eda5d1433bf345ca146e7ebf0f5c96", "score": "0.60246813", "text": "def get(id, destination):\n api = rest.DataSetApi(configuration.get_api_client())\n if destination is None:\n result = api.get_dataset(id)\n pprint.pp_dict(util.to_dict(result))\n else:\n with ut...
d60a3077a56ef51bef938d323f601b54
Installs all Dependencies and Setups the Backend
[ { "docid": "1bed93428431c5668c3afeeafe32e04c", "score": "0.0", "text": "def setup_everything():\n pass", "title": "" } ]
[ { "docid": "20714e5f274a6fe34871e4edfa530399", "score": "0.72239935", "text": "def init():\r\n _install_requirements()\r\n _install_django()\r\n _install_starspan()", "title": "" }, { "docid": "cce4e97f681a2fa643cfef2d66aa3410", "score": "0.7172018", "text": "def setup():\n ...
5c43fb9bb7c259cb18dc032d80ed94c1
Player is created with no inventory (empty list).
[ { "docid": "ded207afbbd6fe4c9af648104b52cca1", "score": "0.7656606", "text": "def test_player_created_with_empty_inventory(self):\n player = Player('Dennis')\n\n self.assertEqual([], player.inventory)", "title": "" } ]
[ { "docid": "87120eb5ae3137ee50b695b13bf75881", "score": "0.7164654", "text": "def test_create_player_no_name(self):\n player = PlayerFactory.create_player()\n\n self.assertTrue(player.name in DEFAULT_NAMES)\n self.assertEqual(0, player.points)\n self.assertEqual([], player.in...
3d9ff75d718750b89e118d43a4cbf264
Returns list of article text where each element is the concatenation of 3 sentences.
[ { "docid": "2fdb8966bf888c26bf717b209ff6c780", "score": "0.71108973", "text": "def get_article_text(url: str) -> List[str]:\n try:\n article = art.Article(url, language=\"en\")\n article.download()\n article.parse()\n article.nlp()\n text = a...
[ { "docid": "10e5d7cc19acdb06053acdab7934bf7f", "score": "0.7031593", "text": "def get_articles(self, text):\n articles = []\n \n if self.re_abstract.search(text):\n reduced_text = self.re_abstract.search(text).group(1)\n else:\n reduced_text = text\n\n ...
e42f8484c01ca9b17e042e09e1c3b9af
Construct. Should only be called through derived class.
[ { "docid": "994d27841eeaba4574e25e282331ccef", "score": "0.0", "text": "def __init__(self, domain, range_, dual_to_range, parameters):\n self._domain = domain\n self._range = range_\n self._dual_to_range = dual_to_range\n self._parameters = parameters\n self._cached = ...
[ { "docid": "f030941ab920cb6ca92c5d65c14e1318", "score": "0.8816562", "text": "def construct(self):\n pass # override this method", "title": "" }, { "docid": "d62d9fb8a3dca691fa04ad99f64d23e1", "score": "0.87089986", "text": "def construct(self):\r\n\r\n raise NotImpleme...
d33952a7ecceaab9cc3e3a3670f0f12d
Set up the tag action table to send spikes to an individual synapse
[ { "docid": "ac673a6fbce0743d0e66cf6b78a34c75", "score": "0.0", "text": "def set_tat(syn_idx):\n addr = HAL.driver.BDPars.GetSynAERAddr(syn_idx)\n tat_entry = bd.PackWord([\n (bd.TATSpikeWord.STOP, TAT_STOP_BIT),\n (bd.TATSpikeWord.SYNAPSE_ADDRESS_0, addr),\n (bd.TATSpikeWord.S...
[ { "docid": "3e7b161710444eb0d60dcd7c9e8017af", "score": "0.51474947", "text": "def tagAPost( self, action_param ):\n self.doc['tags'] = self.doc.get('tags', [])\n self.doc['tags'].append(action_param)", "title": "" }, { "docid": "d23c952b327ee8c2d9d7573c8e36d212", "score": ...
14d8ecb64bee6c136662b3029e9fe8bb
Delete the current course and create a new equivalent course with no content, but all sections and users moved over.
[ { "docid": "02f8924edfaaeec21afe3edac0779b1c", "score": "0.5319089", "text": "def reset(self, **kwargs):\n response = self._requester.request(\n \"POST\",\n \"courses/{}/reset_content\".format(self.id),\n _kwargs=combine_kwargs(**kwargs),\n )\n retur...
[ { "docid": "5647f898e66f87e4087e8025ea2b9524", "score": "0.6613592", "text": "def delete_test_course(self):\n self.cursor = self.connection.cursor()\n self.sql = \"DELETE FROM appsrc_courses WHERE coursename = 'Test_subscribe_course'\"\n self.cursor.execute(self.sql)\n self.c...
f2fa33105a44384f4608b7b25e01ec20
Deployment request that is HTTP Triggered.
[ { "docid": "7b4b7adaf44775b566e9a5bf58591485", "score": "0.5673682", "text": "def main(req: func.HttpRequest):\n\n # Get the POST request body\n req_body = req.get_json()\n\n configuration = ubiops.Configuration()\n configuration.api_key['Authorization'] = f\"Token {TOKEN}\"\n\n client = ...
[ { "docid": "b6c13dd6c464f078f32c85e45bc38b6b", "score": "0.61837566", "text": "def post(self):\n super(DeployAPI, self).post()\n\n task_id = request.form['task_id']\n if not task_id or not task_id.isdigit():\n return self.render_json(code=-1)\n wi = Deployer(task_i...
96f3e068d750211eadc1772475c691a2
CVSpilsGetWorkSpace returns the CVSpils real and integer workspaces as a tuple (integer, real) cvodememobj (CVodeMemObj)a CVodeMemObj as returned by CVodeCreate()
[ { "docid": "29568da17da9d6a10df7a2b55bf47a6e", "score": "0.8580142", "text": "def CVSpilsGetWorkSpace(cvodememobj):\n\tlenrwLS = ctypes.c_long(0)\n\tleniwLS = ctypes.c_long(0)\n\tret = cvode.CVSpilsGetWorkSpace(cvodememobj.obj, ctypes.byref(lenrwLS), ctypes.byref(leniwLS))\n\tif ret < 0:\n\t\traise Asse...
[ { "docid": "84328137a3311d7968e4c2af33e19086", "score": "0.81833005", "text": "def CVodeGetWorkSpace(cvodememobj):\n\tlenrw = ctypes.c_long()\n\tleniw = ctypes.c_long()\n\tret = cvode.CVodeGetWorkSpace(cvodememobj.obj, ctypes.byref(lenrw), ctypes.byref(leniw))\n\tif ret < 0:\n\t\traise AssertionError(\"...
edf4a47c644b2e1bdc817dc25a924fda
Creating an AgentChannelKind with a wrong value should result in an exception being raised.
[ { "docid": "186328c92ae9cf2b9a3ec32f768967c6", "score": "0.6798634", "text": "def test_agentchannelkind_value_error():\n # Value error exceptions\n with pytest.raises(ValueError):\n AgentChannelKind('FOO')", "title": "" } ]
[ { "docid": "cf3d3c03e05e19f8736891fceb76c2ee", "score": "0.560062", "text": "def test_kind_value_error():\n # Value error exceptions\n with pytest.raises(ValueError):\n AgentAddressKind('FOO')", "title": "" }, { "docid": "9188f9fc335a55df40baf605db363c9f", "score": "0.537666...
1617a027acaff9b58729d8fd3e8bd6da
Given 2 endpoints, return the (new or cached) LineSegment3D inst.
[ { "docid": "d55ccdf361945f1ea8cb09f80f5cd51b", "score": "0.67938554", "text": "def add(self, p1, p2):\n key = (p1, p2) if p1 < p2 else (p2, p1)\n if key in self.seghash:\n seg = self.seghash[key]\n seg.count += 1\n return seg\n seg = LineSegment3D(p1...
[ { "docid": "7e0a3749191aea6fe61f399996bc0efb", "score": "0.6908455", "text": "def line(self):\n vector = Vector3D.by_points(self.first_point, self.second_point)\n return Line3D(self.first_point, vector)", "title": "" }, { "docid": "c150647dcdd6f08a05156c08e67c9120", "score": "0.584...
44a75547c75bf3c2f54ec3dff87b2b93
Sentence Segmentation using the Punkt Tokenizer
[ { "docid": "4cce3030a6a05ba5a0fce9131556aa1b", "score": "0.78199977", "text": "def punkt(self, text):\n self.tokenizer = nltk.tokenize.punkt.PunktSentenceTokenizer()\n segmentedText = self.tokenizer.tokenize(text)\n\n return segmentedText", "title": "" } ]
[ { "docid": "f58079d75f5e0f212c388fc5f29bbb48", "score": "0.80314946", "text": "def punkt(self, text):\n\n\t\tsegmentedText = None\n\t\ttokenizer = nltk.tokenize.punkt.PunktSentenceTokenizer()\n\t\tsegmentedText = tokenizer.tokenize(text)\n\t\t#Fill in code here\n\t\t\n\t\treturn segmentedText", "tit...
d5a74d8de3c200a4dfc410fd620f4b41
Get/set linkage limit for LG parser
[ { "docid": "71eadf45a99b85fa9e54b254d3ef2816", "score": "0.7665177", "text": "def linkage_limit(self):\n return self._linkage_limit", "title": "" } ]
[ { "docid": "eb9d2f669a3ec84c05d32b99c8ba844e", "score": "0.57999986", "text": "def get_limit(self):\n return # cardinal", "title": "" }, { "docid": "1bb55988decf005466e0f44c966fca62", "score": "0.5763379", "text": "def set_cvar_limit(_name, _value, _min, _max, _flags):", ...
d997c3fbd7a65c69194ab3c5bd023ee5
Turns the User entity into a ProtoRPC object. This is necessary so the entity can be returned in an API request.
[ { "docid": "e01b7cc434be849d9a2c38310d06914b", "score": "0.0", "text": "def to_message(self):\n return TokenResponseMessage(status='ok')", "title": "" } ]
[ { "docid": "4b4f2fe2559cc629ce9e25319fba2353", "score": "0.68809533", "text": "def get_user(self):\n user_dict = MessageToDict(\n self.user,\n use_integers_for_enums=True,\n preserving_proto_field_name=True,\n including_default_value_fields=True\n ...
756ef74f66ba95bb89e1df7f8960ac7a
Multiplies a polynomial to a polynomial or an integer.
[ { "docid": "b6a58afb898515fe72686f1120cb0f1c", "score": "0.68666255", "text": "def __mul__(self, other):\n\n # if self == 0, return it\n if not self.__terms:\n return self\n\n # if other is an integer, create a constant polynomial\n if isinstance(other, int):\n ...
[ { "docid": "e4b3c28709fdf72f5a2aed4a0ebb6e9d", "score": "0.70012236", "text": "def multiply(self,poly):\n new_p = []\n for value in poly.__polynom:\n for p in self.__polynom:\n base = value[0] * p[0]\n exponent = value[1] + p[1]\n new...
52b82a137c060fcb03409346c9bbe686
delete() deletes an existing model from the database
[ { "docid": "191def5ec5d98a9e78473ece48080770", "score": "0.75252324", "text": "def delete(self):\n db.session.delete(self)\n db.session.commit()", "title": "" } ]
[ { "docid": "28448c747b76f0b517b3d8efa3ac4bdf", "score": "0.85271007", "text": "def model_delete(self, db):\n db.session.delete(self)\n db.session.commit()", "title": "" }, { "docid": "e4a20f3817b6c4b23893d63060d78974", "score": "0.84566283", "text": "def delete(self, mo...
a324f530edbacc6422d4021593f8edf0
Random Noise from Power Spectrum Returns a noised array where the instrinsic distribution follows that of the input power spectrum. The output has an instrinsic standard deviation scaled to 1.0.
[ { "docid": "2776518dad6b4f04f2c0a4367c4516ab", "score": "0.6511499", "text": "def fft_noise(pow_spec, nstep_out=None, fmin=None, f=None, \n pad_mode='edge', rand_seed=None, **kwargs):\n \n rng = np.random.default_rng(rand_seed)\n\n if nstep_out is None:\n nstep_out = 2 * (le...
[ { "docid": "c783546059e5eaf25438ae96ca38a13b", "score": "0.7136442", "text": "def samples_noise(self, n_samples):\n\t\treturn np.random.lognormal(mean=0.,\n\t\t\t\t\t\t\t sigma=1,\n\t\t\t\t\t\t\t size=n_samples)", "title": "" }, { "docid": "fd9b7b563f8bf572ea5a8075c38057e3", "score":...
8a817b83009d6a9ab018750064a042b3
Calculate the optimal control input for the given state.
[ { "docid": "69414488f76f30f8cd4ef4a947d1e906", "score": "0.0", "text": "def calc_ilqr_input(env, sim_env, tN=50, max_iter=1e6, U=None):\n\n #start state\n x_0 = env.state.copy()\n\n #we start with an empty control\n #U = U[:tN,:].T\n\n U = np.zeros((env.DOF,tN)) if U is None else U\n c...
[ { "docid": "82645842ed0150115cd4c022fdcb6ef1", "score": "0.6532401", "text": "def greedy_action(self, state):\n return np.argmax(self.get_value(state), axis=0)", "title": "" }, { "docid": "578bc02054104fdbcdd646be189a6066", "score": "0.63869345", "text": "def computeValueFromQ...
4fe192de26196cca0dc92ca1e5a03b13
Remove an observer from the observer list
[ { "docid": "d23894dac0e7cb5ee4bd1fd13867efbe", "score": "0.8020863", "text": "def unsubscribe(self, observer):\n self._observers.remove(observer)", "title": "" } ]
[ { "docid": "b2b62f02e39cb4807e9c5f46955d6eec", "score": "0.8981121", "text": "def removeObserver(self, observer):\n self._observers.remove(observer)", "title": "" }, { "docid": "8ca6223313c73e1b83fa2769c0c2c315", "score": "0.8769711", "text": "def remove_observer(self, observer):\...
807b42158f62214474c044ef1ad31dbd
Builds environment variables for master IP hooks.
[ { "docid": "fa319050f111d9ac4f6b041fa2f2e55d", "score": "0.7472541", "text": "def _BuildMasterIpEnv(master_params, use_external_mip_script=None):\n # pylint: disable=W0613\n ver = netutils.IPAddress.GetVersionFromAddressFamily(master_params.ip_family)\n env = {\n \"MASTER_NETDEV\": master_params.n...
[ { "docid": "1c6a21abb5752927f8c3a854bd78bb1b", "score": "0.6393331", "text": "def export_env_vars(_):\n data = {}\n data[\"DJANGO_BASE_URL\"] = os.environ[\"DJANGO_BASE_URL\"]\n data[\"FLOWER_URL\"] = os.environ[\"FLOWER_URL\"]\n data[\"PROJECT_NAME\"] = os.environ[\"PROJECT_NAME\"]\n dat...
fadecfb0046adaed16a466d19bdf8190
Get the given environment in the given project. The authenticated user should have access to the project.
[ { "docid": "3db610a1833cfced8564174161772e1d", "score": "0.7150934", "text": "def retrieve(self, env, options={}):\n body = options['query'] if 'query' in options else {}\n\n response = self.client.get('/orgs/' + self.org + '/projects/' + self.project + '/envs/' + env + '', body, options)\...
[ { "docid": "27c98452d3e7f676662ebb70eb40b756", "score": "0.6868601", "text": "def get_environment():\n return settings.environment", "title": "" }, { "docid": "b090213696c9188f1346fd8bed55ca13", "score": "0.6650112", "text": "def user_project_env_show(api_token, app_token, project...
76c34ef3df353bcbfffad738239eef93
We'll create the translators dynamically as needed for this class. This is probably woefully inefficient, but we'll try to fix that later.
[ { "docid": "1b3b7d8622852cd88016ba0a8b66928a", "score": "0.57577264", "text": "def _getTranslator(self, idx):\n if idx >= self._count:\n raise IndexError('Index {0} be less than {1}'.format(idx, self._count))\n offset = self._elementsize * idx\n return _Translator(self._b...
[ { "docid": "0717655d6203d83032f037c905b3d146", "score": "0.7184714", "text": "def get_translations():", "title": "" }, { "docid": "ed720aac3763ade0fbb29b9ae54ea1fd", "score": "0.68003803", "text": "def translate():", "title": "" }, { "docid": "567c635345b37f77623871dda2a3...
4621d7fdb70ffa3a63c0c811750402e3
Takes a list and converts it to a dictionary using the specified column, the column is not included in the values and the entries must be unique
[ { "docid": "767c7450c6e4338e0166559c4c44deef", "score": "0.7129954", "text": "def list2dict(l, key_col):\n d = OrderedDict()\n for row in l: \n d[row[key_col]] = row[:key_col] + row[key_col+1:]\n return d", "title": "" } ]
[ { "docid": "79469bd52f773ef161ef1767f0abe3fb", "score": "0.6960906", "text": "def getUniqueValuesDictionary(inputDataFrame, colslist = []):\n\n dictUniqueValues = {}\n\n try:\n \n if len(colslist) != 0:\n for i in range(len(colslist)):\n dictUniqueValues[col...
3eeabde4d695507ea878f0f3eca102d2
Perform a check to see if an [equals[ multiline comment or [equals[ longform string has been closed as it should have been We do this by adding a comment of the form [other[ ]equals] ]other] (where "other" is some other amount of equals) If [equals[ had been properly closed, this is a perfectly valid comment. If not, i...
[ { "docid": "6abdf3d0c21f710ef5c369b66aa6893a", "score": "0.65845835", "text": "def check_closed(equals):\n other = '==' if equals == '====' else '===='\n return f' --[{other}[ ]{equals}] ]{other}]'", "title": "" } ]
[ { "docid": "37278526b120da9e1c5c701a300cb69f", "score": "0.7052073", "text": "def helper_test_multiline_comment_or_long_string(prefix):\n\n def check_closed(equals):\n \"\"\"\n Perform a check to see if an --[equals[ multiline comment or\n [equals[ long-form string has been close...
6a26762df83dc122d294ac2a17f2d969
sum hours from time string
[ { "docid": "1f316d8ee7355da24bfd54f1c1a1ade4", "score": "0.8299522", "text": "def parse_and_sum_hours(self, time_string: str) -> int:\n hours_string_list = re.findall(self.HOUR_REGEX, time_string)\n\n if hours_string_list:\n hours_string = \" \".join(hours_string_list)\n ...
[ { "docid": "c130e8a9f684564af44e2b9d9f5139a1", "score": "0.7645484", "text": "def get_hours(time_str : str) -> float:\n h, m, s = time_str.split(':')\n s = s.split('.')[0]\n return int(h) + int(m) / 60 + int(s) / 3600", "title": "" }, { "docid": "de1d7f34b8d5834254ef18c8179a6cb9", ...
2c79b41f304666ec8fd6fdacd7db5870
Moves the blank tile one row down.
[ { "docid": "c355719f5edd67f840e75c0ffff1f34b", "score": "0.5803637", "text": "def move_down(self):\n pos = self.config.index(0)\n if pos in (6, 7, 8):\n return None\n else:\n new_config = list(self.config)\n new_config[pos], new_config[pos + 3] = new...
[ { "docid": "d68516748ff56650d1ea24895c73bb97", "score": "0.6547004", "text": "def __down(self):\n new_board = self.copy()\n for i in range(4):\n col = self.__get_column(i)\n\n col.reverse()\n col = fold_4_list(col)\n col = col + [None] * (4 - len...
269dcae555b3c86c05f20e0f7a788c6c
Sets the data and name members.
[ { "docid": "98775ef650cae3f5bf7dfb26ae19b78c", "score": "0.0", "text": "def __init__(self, v=None, n=None):\n self._values = v\n self._name = n", "title": "" } ]
[ { "docid": "5cffa65cd0eaf151ce496d65e1f082f6", "score": "0.766992", "text": "def set_data(self, data):\n\t\tself.data.update(data)\n\t\tif 'name' in data:\n\t\t\tself.set_name(self.data.get('name'))\n\t\tif 'tags' in data:\n\t\t\tself.set_tags(self.data.get('tags'))", "title": "" }, { "docid...
5101562e2122b4eac207fee6728cd909
TODO 1. open and read question_file and response_file, make them as response dictionary 2. read conversation_file and make all pairs of lines in a row as reasponse dictionary 1 and 2 must be one dictionary
[ { "docid": "93e5f59d6b6672676324b42ad777862e", "score": "0.784545", "text": "def load_canned_responses(question_file, response_file, conversation_file):\n #IMPLEMENT YOUR CODE\n canned_response_dic = {}\n A = []\n B = []\n C = []\n \n with open(question_file , 'r') as question:\n ...
[ { "docid": "6f0a941a2d580a5373bc6b930c7fa6eb", "score": "0.6792521", "text": "def readAnswers(answerFile):\n \"\"\"\n Load answers into dict for analysis\n \"\"\"\n \n AllInfo, AllData = None, None\n CurrentInfo, CurrentData = None, None\n lineNum = 0\n \n with open(answerFile, 'r') as fIn:\n ...
3babe2b28bf0a51664a48d7230909d13
Show message in main window's status bar
[ { "docid": "abc0a15688601a7d7d8e37f0e41b4900", "score": "0.7901596", "text": "def show_message(self, message, timeout=0):\r\n self.main.statusBar().showMessage(message, timeout)", "title": "" } ]
[ { "docid": "7bbf89293bee7c4ee486613b33fbbf6e", "score": "0.7645076", "text": "def setStatusBarText(self,text=\"\"):\n self.statusBar().showMessage(text)\n QtCore.QCoreApplication.processEvents()", "title": "" }, { "docid": "54c32148033c5612a713fdf45a4ac750", "score": "0.761...
5b95947e83a6fab636254a73d11bdd7c
Filters all the tweets and retains only the data that is required and puts it to the file with the name TWEETS_FILE_NAME
[ { "docid": "c387c47a6ec5424a0f543cbff7c8fb30", "score": "0.5975242", "text": "def saveData(tweetLst, tweetFileName=TWEETS_FILE_NAME,userFileName=USER_FILE_NAME):\n\tglobal unique_userCounts, tweet_count\n\n\tunique_users = []\n\tunique_users_set = set()\n\tnewTweets = []\n\ttweetIds = []\n\n\tfor tweet ...
[ { "docid": "a9b33e3176f36f9e0dc0585793f20670", "score": "0.7059614", "text": "def write_tweets(tweets, filename):\n \n with open(filename, 'w') as out_file:\n for tweet in tweets:\n out_file.write('TEXT: ' + tweet.text.with_headings() + '\\n')\n out_file.write('HASHTAG...
0d3336988d64e1171efcbd30bfbedac9
dumps the local bloom to a hexadicimal string representation
[ { "docid": "a72b82789697303bfd0d6a09404287f7", "score": "0.69733566", "text": "def saveBF(bloom=LOCAL_BLOOM):\n try:\n hex_string = bfs[bloom].export_hex()\n return hex_string\n except KeyError:\n # if we have no bloom of this name we create an empty one\n # and we log ...
[ { "docid": "3fb79fe622116980443a47259ffd713e", "score": "0.64312583", "text": "def hex(self):\r\n # A possible faster, all-python, implementation:\r\n # str(self.wkb).encode('hex')\r\n return wkb_w(3 if self.hasz else 2).write_hex(self)", "title": "" }, { "docid": "3e00...
0689b84d286d733d35154c149f4f8fd4
return the number of elements in the forest
[ { "docid": "a37d8703cc967ddaa817d9771484f315", "score": "0.0", "text": "def __len__(self):\n return self.__size", "title": "" } ]
[ { "docid": "4a5532527fc756908a881034eb4a9e9f", "score": "0.7763599", "text": "def num_trees(self):\n return _regression.fanova_forest_prototype_num_trees(self)", "title": "" }, { "docid": "e0b3cac74e7db2576d35ed8e83f63546", "score": "0.7652106", "text": "def num_trees(self):\n...
85297c5b92a17ef0a8da05bee13c3a86
Get an attribute from this object
[ { "docid": "07234598e0cb5ec3ccb82881534f4c81", "score": "0.0", "text": "def __getattr__(self, name):\n self.assert_valid()\n value = _swig_getattr(self, self.__class__, name)\n try:\n old_dict = self.__dict__[\"_member_dicts\"][name]\n value.__dict__[\"_parent_pool\"] = old_...
[ { "docid": "aecaddc4a907dedb31781e4dd4e85003", "score": "0.84407556", "text": "def get_attribute(self, attr):\n if attr in self.data:\n return self.data[attr]", "title": "" }, { "docid": "d7c746763914fc80f0de465b83f4a3a9", "score": "0.83231586", "text": "def __getat...
a2df1d797974e0e897cf86a44160f463
Return a first estimation on the parameter from the data.
[ { "docid": "270e7c275de89d288b9c8ed7dbc076ba", "score": "0.0", "text": "def calc_estimate(data):\n xc0, yc0 = data.x.mean(axis=1)\n r0 = np.sqrt((data.x[0] - xc0) ** 2 + (data.x[1] - yc0) ** 2).mean()\n return xc0, yc0, r0", "title": "" } ]
[ { "docid": "9f1dc23f54c0c1297937925da7af35c9", "score": "0.64182067", "text": "def first_parameter(self, singular_value):\n self.log(\"calc first term parameter @\" + str(singular_value))\n first_term = self.I_minus_R(singular_value) * self.parcov * \\\n self.I_minus_R(...
62a4e85e6afa8226c2691f6462640c97
Select one individual according to the Birth Fitness.
[ { "docid": "8b935000557a23489c345a19f20f9852", "score": "0.54387355", "text": "def _roulette_wheel_selection_Birth(self):\n return self.__roulette_wheel_selection(attr=\"BirthFitness\")", "title": "" } ]
[ { "docid": "f19d256d620b1aff0896345f08a7d6e0", "score": "0.5910112", "text": "def Selection(self):\n fitness_1, individual_1 = self.pb.Load_from_Disk()\n fitness_2, individual_2 = self.pb.Load_from_Disk()\n if fitness_1>fitness_2:\n self.pb.Killer(individual_2.ID)\n ...
76280cf3e4e7da292043754d4c2071c3
Called when a job is submitted
[ { "docid": "54698137952fc695fdb32ce9901ba2ed", "score": "0.6712782", "text": "def submit(self, job_parameters):\n # FIX: Don't pass through the real job name. Bilby outputs the job files by whatever this parameter is, that\n # means that names containing special characters will break. Uniq...
[ { "docid": "1999990f3e23260083a967d5cd9a493a", "score": "0.7461958", "text": "def submit(self):\n self.keep_data = False\n ManagedJob.submit(self)", "title": "" }, { "docid": "2eb00eaf94ac2887b81a0a999c7949c8", "score": "0.7376575", "text": "def submit(self, data):\n ...
77fad2190741e52ffa31c26da0f81972
Test album route status code.
[ { "docid": "8c64338a5c0c2163366393c3e6736031", "score": "0.74703544", "text": "def test_album_status(self):\n response = self.client.get('/images/albums/')\n self.assertEqual(response.status_code, 200)", "title": "" } ]
[ { "docid": "aa6d6d3c967cd9242dd3db84704ed00f", "score": "0.7424221", "text": "def test_album_detail_status(self):\n response = self.client.get('/images/albums/1')\n self.assertEqual(response.status_code, 200)", "title": "" }, { "docid": "7d35a43eba9ba797374522532f9497b1", "...
30a4bec1e3ac0001499b43d62e0f941d
Wait up to max_delay seconds then returns length of delay
[ { "docid": "ebe7bb23570ee99e9b9d6d9ae3507d30", "score": "0.7474672", "text": "async def wait_random(max_delay: int = 10) -> float:\n delay = random.uniform(0, max_delay)\n await asyncio.sleep(delay)\n return delay", "title": "" } ]
[ { "docid": "89ad7c7d0920fadb4f3b3f4e065a63d3", "score": "0.7511554", "text": "async def wait_random(max_delay: int = 10) -> float:\n actual_delay: float = random.uniform(0, max_delay)\n await asyncio.sleep(actual_delay)\n return actual_delay", "title": "" }, { "docid": "ef17c0468ed6...
ed70989948b0a3528da56a469822b590
Load data from filename into table
[ { "docid": "9695f359edda9e0b866746ab9f3f96cc", "score": "0.0", "text": "def bcpin (table, filename):\n\n # disable indices for performance\n db.disableIndices(table)\n\n filepath = os.path.join(OUTPUTDIR, filename)\n db.bcp(filepath, table)\n\n # re-enable indices\n ...
[ { "docid": "de2fc79571e851605b3687f4a3c9b4b9", "score": "0.7550051", "text": "def read_file(file_name, table):\r\n table.clear() # this clears existing data and allows to load data from file\r\n try:\r\n objFile = open(file_name, 'r')\r\n except FileNotFoundError as e:\r...
823eb8f1f331790e5fc7385c2a75b535
Linear regression loss without regularization terms; 0.5 to be consistent with sklearn Lasso (the global problem we try to solve)
[ { "docid": "237d65d75610d1befc37d1b67f8c1947", "score": "0.60907257", "text": "def loss(self,X,y,beta):\n ret = ''\n for k,v in X.items():\n ret += 'y = %s \\n v = %s \\n beta = %s \\n SparseDotProduct(v,beta) = %s \\n'%\\\n (str(y),str(v),str(beta),str(Sparse...
[ { "docid": "16086d5b054f53ccd1f915771c34db93", "score": "0.75056636", "text": "def linearSquaredLoss(x, y, w):\n # Sum along the features and take average across data points\n ypred = np.dot(x, w)\n L = 0.\n L = ((ypred - y)**2).sum(1).mean()\n return L", "title": "" }, { "doc...
3e8567946eb860f67fc1370a8afcf82e
Cancel a running query
[ { "docid": "7ed588b91b25e39a5df6533abff1a773", "score": "0.8155592", "text": "def cancel(self):\n if self.status not in RUNNING_STATUSES:\n raise QueryError(\"Query is not running\")\n self.session.delete(self.url)", "title": "" } ]
[ { "docid": "35e3e66f16f88935b41110e9d6cfd275", "score": "0.78888893", "text": "def cancel_job(self,query_data):\n self.cur.execute(query_data)\n self.conn.commit()", "title": "" }, { "docid": "37fb0fe263dfb1afbb22fc2a9435dec8", "score": "0.78090525", "text": "def cancel...
9e9e231dbd214ba2bb9cfa24d480c12b
Initialize the mnist data set as a one hot vector and labelled data
[ { "docid": "e94c76edf8d65a50e0f25605a39a16b9", "score": "0.66478354", "text": "def __init__(self):\n self.mnist = input_data.read_data_sets(\"/tmp/data/\", one_hot=True)\n self.mnist_model = MNISTNeuralModel()\n self.mnist_model.setup_layers()", "title": "" } ]
[ { "docid": "3448d31cef8cfa9526a14a13a479adac", "score": "0.7462869", "text": "def one_hot(labels):\n nClasses = 10\n oneHot_labs = np.zeros((labels.shape[0], nClasses))\n for i in range(len(labels)):\n oneHot_labs[i][labels[i]] = 1.\n return oneHot_labs", "title": "" }, { ...
c6d17ee64b7116af6e4d0130f849f3aa
Get all clusters with Cloud Run enabled.
[ { "docid": "57658d2d7d22bba45237347a77f9819e", "score": "0.65372664", "text": "def ListClusters(location=None):\n container_api = container_api_adapter.NewAPIAdapter(CONTAINER_API_VERSION)\n project = properties.VALUES.core.project.Get(required=True)\n\n response = container_api.ListClusters(project,...
[ { "docid": "a171c4ee0820b69c03240fa1040c32be", "score": "0.6965474", "text": "def get_all_clusters(self):\n if self.mInitialized:\n return self.mApi.get_all_clusters(view='full')\n else:\n raise Exception(\"this CmApi instance isn't properly initialized\")", "titl...
f04ccaef60ed4799232cfde8be87d7d9
Store a single response to the survey
[ { "docid": "6965ba1af4bf2b23f38fee618a881e76", "score": "0.6810325", "text": "def storeResponse(self, newResponse):\n self.responses.append(newResponse)", "title": "" } ]
[ { "docid": "2c488367bcfc28e49f1b9186e3fd6da2", "score": "0.7780322", "text": "def test_store_single_response(self):\n\t\tself.my_survey.store_response(self.responses[0])\n\t\tself.assertIn(self.responses[0], self.my_survey.responses)", "title": "" }, { "docid": "a1352f01764da735d6caa4a732072...
47c5c6a4cd55fdc0687357fadfa35227
plot current playfield into a surface with given 'dim'ensions. If dim is (0,0) zoom = 1 (16x12 each block) will be used. Resulting surface may exceed screen or dim, Draw a 'border' (scaled as well). Draw playfield with at least 'minsize' blocks size and center it in dim. If floatzoom is false, only integer zoomlevels a...
[ { "docid": "c9323c06859d7672c77093f5b1ca52e8", "score": "0.68816406", "text": "def plot(self, dim=(0,0), minfield=(20,17), border=2, floatzoom=False):\n # grid size\n gw = self.soko.currentgrid.width\n gh = self.soko.currentgrid.height\n # border offset left and top\n ...
[ { "docid": "d5b91ce8bbe9e797b816b8fc8f91e28f", "score": "0.54572695", "text": "def drawGrid(surface,playfieldWidth,playfieldHeight,camera):\r\n GRIDSIZE = 50\r\n BLACK = (0,0,0)\r\n H_Start = 0\r\n H_End = playfieldWidth\r\n V_Start = 0\r\n V_End = playfieldHeight\r\n for i in range...
646cd874a9a7ce1085e9b2d50404b7c9
Greps last pressure from OUTCAR
[ { "docid": "38e3f0e410fcc87bf62341683e24b6a3", "score": "0.6180783", "text": "def pressure(self):\n if not self.is_dft: raise AttributeError('not a DFT calculation.')\n from quantities import kbar as kB\n regex = r\"\"\"external\\s+pressure\\s*=\\s*(\\S+)\\s*kB\\s+Pullay\\s+stress\\s*=\\s*(\\S+...
[ { "docid": "3dbee71bc4fb43e68e95a434192cca33", "score": "0.6321372", "text": "def pulay_pressure(self):\n if not self.is_dft: raise AttributeError('not a DFT calculation.')\n from quantities import kbar as kB\n regex = r\"external\\s+pressure\\s*=\\s*(\\S+)\\s*kB\\s+\" \\...
eb048e99621e54472dc93b34ae43ba4d
Put code that handles mouse events here.
[ { "docid": "ec42501ba8b03f232c4b2d4bc085afba", "score": "0.0", "text": "def process_mouse_event(self, pos, down, double_click):\n if down and self.deck.is_clicked(pos):\n card_ = self.deck.pop_top_card()\n if isinstance(card_, card.Card):\n card_.flip()\n ...
[ { "docid": "0724e508b45727794ef2255b06046ca7", "score": "0.79453975", "text": "def handle_event(self, event):\n self.mouse.handle_event(event)", "title": "" }, { "docid": "aa8cf9eb98802b97682e63f392e1705f", "score": "0.70289916", "text": "def on_mouse_over(self):\n pass...
859bab55c50e10538a32b4d02375e395
Query the SLURM host for all jobs in /[controldir]/processing with ``squeue``. If the job has stopped running, more detailed information is fetched with ``scontrol``, and the diagnostics and comments files are updated. Finally ``gmkick`` is executed on all jobs with an exit code.
[ { "docid": "a81619da127c58014d34b0d13367b136", "score": "0.64918053", "text": "def Scan(config, ctr_dirs):\n \n configure(config, set_slurm)\n if cconfig.Config.scanscriptlog:\n scanlogfile = arc.common.LogFile(cconfig.Config.scanscriptlog)\n arc.common.Logger.getRootLogger().addD...
[ { "docid": "bf5f5609e07e6a6a386c7ed8929ff8a0", "score": "0.6614079", "text": "def jobs(self, status=None):\n #TODO: list completed but not deactivated as well as completed\n #print \"queue\"\n output,_ = _slurm_exec('squeue','-o', '%i %M %j')\n #print \"output\",output\n ...
68e042ee1dc76e2e2d26046d63f7ec94
Gets scalar, vector and tensor information from the given data (either cell or point data).
[ { "docid": "6a811de2fefe8fe89ec07d752fe488b7", "score": "0.0", "text": "def get_attribute_list(data):\r\n attr = {'scalars':[], 'vectors':[], 'tensors':[]}\r\n if data is not None:\r\n n = data.number_of_arrays\r\n for i in range(n):\r\n name = data.get_array_name(i)\r\n ...
[ { "docid": "97cb70485abb8f4c4c5c795aac78857d", "score": "0.68607485", "text": "def get_data_tensor(self, data: Any) -> Any:\n pass # noqa", "title": "" }, { "docid": "95e5f66b992ebe1010f039f5b4de8e26", "score": "0.6672319", "text": "def get_data_tensor(self, data: np.ndarray ...
e05ee522a1f9eff4ea434a6863b27081
Parses a firebase_link path into its component segments.
[ { "docid": "caba7b409b528d06516c3b3b6559c4e6", "score": "0.73900986", "text": "def parse_firebase_link_path(path: str) -> Dict[str, str]:\n m = re.match(\n r\"^properties/(?P<property>.+?)/firebaseLinks/(?P<firebase_link>.+?)$\", path\n )\n return m.groupdict() if m else ...
[ { "docid": "1a69cb30c3dd4d7ddd77501094ceeb06", "score": "0.58743846", "text": "def parse_google_ads_link_path(path: str) -> Dict[str, str]:\n m = re.match(\n r\"^properties/(?P<property>.+?)/googleAdsLinks/(?P<google_ads_link>.+?)$\",\n path,\n )\n return m.gro...
1ab7be6dbc7809d5fe7aff85d6449907
Parse and apply coordinate related keywords from the FITS header.
[ { "docid": "d5be3d4f5071bc8a1993d5cfaeb960aa", "score": "0.0", "text": "def parse_astrometry(self):\n options = self.options\n if options is None:\n return\n if \"EQUINOX\" in options:\n self.epoch = Epoch.get_epoch(options.get_float(\"EQUINOX\"))\n\n if...
[ { "docid": "37e08d9dad3596d043812179c1fa26a2", "score": "0.61663365", "text": "def parseheader(self, s):\n\n i = s.find('rEL3X')\n if i>0:\n xy = 'x'\n i = s.find('rEL3Y')\n if i>0:\n xy = 'y'\n\n i1 = s.find('Freq=')\n i2 = s.find('Phi=')\...
fbb18c1ee65dd63e7ffed74958fd0b78
This function is responsible to parsing the users file
[ { "docid": "bf7dc5ce4bebed91c7c84ba5782cfec7", "score": "0.678132", "text": "def get_users(users_file):\n if not os.path.exists(users_file):\n LOGGER.info(\"Users file not found\")\n return\n with open(users_file) as users:\n for f in users:\n yield f.strip()", ...
[ { "docid": "21d1b3383c40c6641131db6239e179e7", "score": "0.7200983", "text": "def parseUserDataFile(_userFile):\n users = {}\n f = open(_userFile, 'r')\n lines = f.readlines()\n for line in lines:\n features = []\n tokens = line.split(\"::\")\n\n # Encode gender variable, 1 is female, 0 is ...
2bb187a8f728d50e37e56ddc3e5b4b94
return the string representation of the minheap
[ { "docid": "51ae14e7ed7d005e727a0638c6001487", "score": "0.0", "text": "def __str__(self):\n\t\treturn str (self.__h[:self.__len])", "title": "" } ]
[ { "docid": "4cbc3a7fa477e7e4d787b8f31495e158", "score": "0.7949308", "text": "def __str__(self) -> str:\r\n return str(self._heap)", "title": "" }, { "docid": "71cbb90c8cdec1e025fb2cf874820806", "score": "0.78326654", "text": "def __repr__(self):\n return 'BinaryMinHeap...
2e5e76f8c98a86efe13e21d7d08333a3
Computes the precision for the specified values of k
[ { "docid": "95eaf79f5561e4f222a41d35de98e8dd", "score": "0.0", "text": "def accuracy(output, target, topk=(1,)):\n maxk = max(topk)\n batch_size = target.size(0)\n\n _, pred = output.topk(maxk, 1, True, True)\n pred = pred.t()\n correct = pred.eq(target.view(1, -1).expand_as(pred))\n\n ...
[ { "docid": "15d8595b17755acee4fd1baadb8ec6e4", "score": "0.82579345", "text": "def precision_at_k(scores, expected, k):\n first_k = reorder(scores, expected)[0:k]\n targets = [t for s, t in first_k]\n return sum(targets) / len(targets)", "title": "" }, { "docid": "a594b0ff377cc7e98b...
7040654ca84b61d83e211eedb657fb1d
Create dictionary of transient variables for carbon pools.
[ { "docid": "8713d37db3a67417f2d96e0e66dd6b67", "score": "0.702766", "text": "def _create_transient_dict(carbon_pool_transient_uri):\n transient_dict = utils.build_lookup_from_csv(\n carbon_pool_transient_uri, 'code')\n\n def _filter_dict_by_header(header_prefix):\n \"\"\"Retrieve soi...
[ { "docid": "4225b5576ad60e2d7f5af9cb7bf73256", "score": "0.64676", "text": "def variable_map(self):\n return {}", "title": "" }, { "docid": "233fb855217e799f74cb30083bcaa293", "score": "0.64284384", "text": "def getCarbonDict(self):\n transDict = self.getTransitionDict(...
28bb051accd2de56c55363aa402655f1
This function asserts that the answers positions is correct.
[ { "docid": "ac2df4cda3f04ed77003e0cb83de7268", "score": "0.7074101", "text": "def assert_answer_position(track_variables, group):\n\n ans = track_variables['answers'][0].tolist()\n x = track_variables['x'][0].tolist()\n ans = array(ans)\n x = array(x)\n unknown_error = 0\n file_error =...
[ { "docid": "99902007de83b22b4643e44d94cfcc42", "score": "0.6440867", "text": "def test_anyOfTheAbove(self):\n qns = [x for x in self.createSource(\"\"\"\n%ID\tq1\n%title\tQuestion with no right answer\n%format\tlatex\n\nWhat is the winning move?\n\na) LEFT 5\nb) FORWARD 10\nc) Jump!\nd.true) None...
74857d7a0373d6a7d36b123660da00b5
Adds text strings to an existing plot and returns a PlotId representing the text strings added. txt = Ngl.add_text(wks, plot, text, x, y, res=None) wks The identifier returned from calling Ngl.open_wks. plot The id of the plot which you want to add the text strings to. text An array of text strings to add. x, y Onedime...
[ { "docid": "22421d8ce2e322d93209955441385101", "score": "0.72810423", "text": "def add_text(wks,plot,text,x,y,rlistc=None):\n rlist = _crt_dict(rlistc)\n \n#\n# Separate the resource dictionary into those resources\n# that apply to am or tx.\n#\n am_rlist = {}\n tx_rlist = {}\n for key in list(r...
[ { "docid": "b39a879f7a39566b5b58bfcf887d41e6", "score": "0.68749857", "text": "def addText(self, text, x_coord, y_coord):\n label = self.font.render(text, True, self.font_color)\n self.stuff_to_draw.append((x_coord, y_coord, label))\n self.render()", "title": "" }, { "do...
85a5ac847daea2bdbfb48d5de2f0a377
Extract the way (w) if its type matches extract_type (highway, footway, or cycleway).
[ { "docid": "c0a3fec820b17b88432841a4a86e27a4", "score": "0.81712985", "text": "def extract_way_type(self, w):\n should_extract = False\n way_type = None\n for tag in w.tags:\n if tag.k == self.extract_type:\n way_type = tag.v\n should_extract...
[ { "docid": "1ed8c0a4d8bbd070e680b3435b77f234", "score": "0.8201045", "text": "def way(self, w):\n if self.extract_type == 'tennis':\n self.extract_if_tennis_court(w)\n else:\n self.extract_way_type(w)", "title": "" }, { "docid": "4fe44326e76870c0e345d867ce...
10f01af8b17147195aef087efee5ef1b
Retrieves the trophy groups for a title and their respective trophy count. This is most commonly seen in games which have expansions where additional trophies are added.
[ { "docid": "8491b643a9cd4ccb1c69a313985129f6", "score": "0.6149653", "text": "def trophy_groups_summary(self, platform: Literal[\"PS Vita\", \"PS3\", \"PS4\", \"PS5\"]) -> TrophyGroupsSummary:\n return TrophyGroupsSummaryBuilder(\n request_builder=self._request_builder,\n np...
[ { "docid": "8ea6aeae0e267090522c225821af6510", "score": "0.5491638", "text": "def tgroups():", "title": "" }, { "docid": "b20ff0f1eee8541dd9b22e0708e29e3e", "score": "0.5440492", "text": "async def get_groups():\n ont_r = OntologyResource(url=get_sparql_endpoint())\n si = Sparq...
078cdbb2f2bead0530a4915070b27e86
enable workflow interrupt handler while solver is running
[ { "docid": "80a620060d8ce8c30389ddc42c2dbfc3", "score": "0.5286894", "text": "def enable_signal_handler(self):#, callback='*'):\n \"\"\" #XXX: disabled, as would add state to solver\ninput::\n - if a callback function is provided, generate a new handler with\n the given callback. If call...
[ { "docid": "0d9537b29c780fcf5340a6f9e2e91cd8", "score": "0.687691", "text": "def interrupt_handler(self):\n pass", "title": "" }, { "docid": "27d87ac90a5a3cd21ac1c4f8afd24551", "score": "0.6475221", "text": "def setup_interrupt(self):\n raise NotImplementedError", "...
3ee2a6fc478543dde1367c6055626fdf
SetGamma(itkHessianToObjectnessMeasureImageFilterISSRTD33IUS3 self, double const _arg)
[ { "docid": "5b0306420ecbc948e7a7b75aa631eac2", "score": "0.90032715", "text": "def SetGamma(self, _arg: 'double const') -> \"void\":\n return _itkHessianToObjectnessMeasureImageFilterPython.itkHessianToObjectnessMeasureImageFilterISSRTD33IUS3_SetGamma(self, _arg)", "title": "" } ]
[ { "docid": "996a04245fc6dd2dad4b828b2542ba67", "score": "0.8934521", "text": "def SetGamma(self, _arg: 'double const') -> \"void\":\n return _itkHessianToObjectnessMeasureImageFilterPython.itkHessianToObjectnessMeasureImageFilterISSRTD33ISS3_SetGamma(self, _arg)", "title": "" }, { "do...
ba48b334b541d2f8be19506ea61d883c
Retrieve all the interfaces of the system including bridges, virtual ethernet, and loopback.
[ { "docid": "bc4350f75f02416745267599b3905812", "score": "0.7531896", "text": "def GetInterfaces(\n self, request: core_pb2.GetInterfacesRequest, context: ServicerContext\n ) -> core_pb2.GetInterfacesResponse:\n ifaces = []\n for iface in os.listdir(\"/sys/class/net\"):\n ...
[ { "docid": "96d45b924bdcad9a2543f83c0ff865cc", "score": "0.7642081", "text": "def show_all_interfaces(self):\n result = self.run_show_command(\"show interface brief\")\n interfaces = result['ins_api']['outputs']['output']['body']['TABLE_interface']['ROW_interface']\n return {interfa...
5198b2fd1d8f4891fc48693cee1a4477
Computes the source term in a humidity equation. Supported types of humidity are `q_t` and `q_r`.
[ { "docid": "c96e153456289cb12ad78bd35c8a39ac", "score": "0.6919277", "text": "def humidity_source_fn(\n self,\n varname: str,\n states: water.FlowFieldMap,\n additional_states: water.FlowFieldMap,\n thermo_states: water.FlowFieldMap,\n ) -> water.FlowFieldVal:\n q_r = thermo...
[ { "docid": "9b3fc5d30208f07def27adc16b99b686", "score": "0.61881125", "text": "def potential_temperature_source_fn(\n self,\n varname: str,\n states: water.FlowFieldMap,\n additional_states: water.FlowFieldMap,\n thermo_states: water.FlowFieldMap,\n ) -> water.FlowFieldVal:\n ...
bbf63c3e14cc1fabd30e0ca2b5e7c3b2
Performs ising updates on the array.
[ { "docid": "683bd0a856dc0f019ade9292aae39b51", "score": "0.0", "text": "def ising(updates, universe):\n if updates == 0:\n return\n cost = np.zeros(3, np.float32)\n cost[1] = np.exp(-4 * universe.beta)\n cost[2] = cost[1] ** 2\n N = universe.size\n D = universe.width\n univer...
[ { "docid": "9ad33f32f0601f4d846df57b664a452a", "score": "0.6835648", "text": "def update_array ( self, value ):\r\n self._busy = True\r\n self.value = value\r\n self._busy = False", "title": "" }, { "docid": "07e970d206b1518e4d307cc25073789f", "score": "0.6616204", ...
6bced873298c752c936a265b7ea06cc1
Set pixel clock in MHz.
[ { "docid": "edec358d929831671f9a869a877d7a6a", "score": "0.6940596", "text": "def set_pixelclock(self, exp):\n pParam = ctypes.c_uint(exp)\n self.call(\"is_PixelClock\", self._camID, IS_PIXELCLOCK_CMD_SET, ptr(pParam), ctypes.sizeof(pParam))", "title": "" } ]
[ { "docid": "3e25385c47590f689921102fd5770292", "score": "0.6754697", "text": "def set_clock(self, freq, line_rate):\n self._set_clock(IDT_8T49N24X_XTAL_FREQ, freq, True)", "title": "" }, { "docid": "31fbac39a43be59b8a8603efe939e90f", "score": "0.6615966", "text": "def set_SpiC...
be7e5a54a675afab9e94b3f62743efc6
Triplet loss for speaker identification.
[ { "docid": "7c14f98e72171ee08a67b8145f319676", "score": "0.0", "text": "def triplet_loss_tf(y_true: tf.Tensor, y_pred: tf.Tensor, **kwargs) -> tf.Tensor:\n \n # get hyperparameters from kwargs\n alpha = float(kwargs['alpha'])\n batch_size = int(kwargs['batch_size'])\n \n # compute simi...
[ { "docid": "8e190672059a1d2b6f01a6ccbd1700e8", "score": "0.6371815", "text": "def TripletLoss(anchor, positive, negatives):", "title": "" }, { "docid": "814f384d3b954a793c0a58101d0b99c9", "score": "0.6268254", "text": "def loss(self):\n pass", "title": "" }, { "doc...
8a5ef99b34473b9e864db1e6058b3504
Check to see if provided argument is a depth
[ { "docid": "21ac04e5564d16d78dc6bcdc124319e7", "score": "0.8345771", "text": "def is_depth(arg):\n depth = False\n if re.search(r'depth:', str(arg).lower()):\n depth = True\n return depth", "title": "" } ]
[ { "docid": "df7d5622d4a3a3db8b577fd643a968dd", "score": "0.70123684", "text": "def presentDepth(*args, **kwargs):\n \n pass", "title": "" }, { "docid": "2edf15ed9a0f53d0cafa9578b50a945a", "score": "0.66973084", "text": "def get_depth(arg):\n depth = re.sub(r'depth:', \"\...
bb9bb62a21295d38d36dbdbe233393cc
Get the initial blocks file for a leaf genome.
[ { "docid": "d87e1c538d85d84f639e718dc9a97195", "score": "0.643224", "text": "def get_leaf_blocks(hal_path, genome, output_path):\n seqs = get_sequence(hal_path, genome)\n lengths = get_chrom_sizes(hal_path, genome)\n with open(output_path, 'w') as out:\n for chrom in sorted(lengths.keys(...
[ { "docid": "358aba9b0407df8c4fb14b8ea5ad3082", "score": "0.5765065", "text": "def genesis():\n\n prevHash = \"0\"*64\n data = \"genesis\"\n return createBlock(data, prevHash)", "title": "" }, { "docid": "fd966cfa011bcfe6b8fec217d50269c1", "score": "0.5304925", "text": "def g...
e983f086a6c8457f2aa4f7c71ce5a80e
Getter method for id, mapped from YANG variable /nsd_catalog/nsd/vnffgd/rsp/id (string)
[ { "docid": "ab07dcca5ad0b1c5092479172174bc3d", "score": "0.0", "text": "def _get_id(self):\n return self.__id", "title": "" } ]
[ { "docid": "ffcfa10b0baa4a9a52f8f9152b406e45", "score": "0.55626786", "text": "def get_id(cls, id): # pragma: no cover\n pass", "title": "" }, { "docid": "e1c4d7b0e0aae331586a0eb8d350a3c3", "score": "0.55282295", "text": "def _get_rsp_id_ref(self):\n return self.__rsp_id_r...
6cc2da6071e59ac67a2940771fb643a7
Create a handle to a Krigrid object
[ { "docid": "c171116e2c69b716018a212379b0b73b", "score": "0.0", "text": "def create(cls):\n ret_val = gxapi_cy.WrapKGRD._create(GXContext._get_tls_geo())\n return GXKGRD(ret_val)", "title": "" } ]
[ { "docid": "b9939eb5b27343ff163039b76c2f9bbb", "score": "0.53088", "text": "def New(*args, **kargs):\n obj = itkPathDCID33.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj", "title": "" }, { "docid": "1c06c617c5ba50115c5e1b2c...
b07b44514ff12511414c931c30f2022c
Populates self.ch and returns either the character or None for end of input.
[ { "docid": "9b5acf22aacc91bfe894293a3907eb0d", "score": "0.76046914", "text": "def next_char(self):\n if not self.at_end:\n try:\n self.ch = self.gen.next()\n except StopIteration:\n self.at_end = True\n self.ch = None\n re...
[ { "docid": "f497451072452ec8561d2cb2d2e41c59", "score": "0.7178319", "text": "def __call__(self, raw=False):\n # get one or more char here.\n first_char = self._do_getch()\n # future logic for encoding issues here.\n # future logic for remapping to appropriate keypress here.\...
95e0f3b83797c1c161d790712e94615d
Gets the subsystems of this EdgeMetrics.
[ { "docid": "6fa33d5326e7907c3571d876f737692b", "score": "0.79742545", "text": "def subsystems(self):\n return self._subsystems", "title": "" } ]
[ { "docid": "e2d74396aa001f9d735412ba0be4f14a", "score": "0.58958477", "text": "def subsystems(self):\n ret = set()\n for task_type in self.task_types():\n ret.update([dep.subsystem_cls for dep in task_type.subsystem_dependencies_iter()])\n return ret", "title": "" }, { "docid":...
360354efab565d834b96e5e642b3d6eb
Try to find the a value in a sorted list of elements
[ { "docid": "79924a620c605bafc44c545129d55c3e", "score": "0.608462", "text": "def dichotomic_find(l,v):\n indexm = None\n begin = 0\n end = len(l) -1\n found = False\n\n while not(found) and begin <= end:\n indexm = (begin + end) // 2\n if l[indexm] == v:\n found =...
[ { "docid": "5d7ff3b4315ad0735d531aa4ba56c7d2", "score": "0.70573443", "text": "def find(elements, value, key=lambda x: x):\r\n index = find_index(elements, value, key)\r\n return None if index is None else elements[index]", "title": "" }, { "docid": "3d4923d0893d1a30cad0f31a0627c05d", ...
4f86189bb7386881d786f306e02ce5b2
transcription of DNA strand to RNA
[ { "docid": "0070f3fd22b44d1c9799469fc7dac1d8", "score": "0.7223157", "text": "def DNA_to_RNA(input_DNA):\n for letter in input_DNA:\n if letter == \"T\":\n RNA_seq = input_DNA.replace (\"T\", \"U\")\n return RNA_seq", "title": "" } ]
[ { "docid": "c9b8a07b198e4d9e47e06f135b70874e", "score": "0.8091711", "text": "def to_rna(dna_strand):\n\n return dna_strand.translate(DNA_TO_RNA)", "title": "" }, { "docid": "96effa74679c587ea2ba5cfe061e2dff", "score": "0.8041995", "text": "def to_rna(dna_strand: str) -> str:\n ...
af09ec2c0e41760d99edb500f65bfbb8
Conducts ONE TOO FEW iterations of BellmanFord
[ { "docid": "5f292681be62640ae1f5a7fe4e42e67e", "score": "0.5418772", "text": "def defective_bellman_ford(G, src):\n from ch07.single_source_sp import WEIGHT\n inf = float('inf')\n dist_to = {v:inf for v in G.nodes()}\n dist_to[src] = 0\n edge_to = {}\n\n def relax(e):\n u, v, we...
[ { "docid": "af3a903b1142e01732e6a898e55d4ef1", "score": "0.6557465", "text": "def challenge_bellman_ford():\n from ch07.single_source_sp import bellman_ford\n DG = nx.DiGraph()\n DG.add_edge('d', 'e', weight=1)\n DG.add_edge('c', 'd', weight=1)\n DG.add_edge('b', 'c', weight=1)\n DG.ad...
260535276547a50ec4d4b9c711855ac5
Pads a sequences of sequences so that they're all the same length. Inplace.
[ { "docid": "f84708de8511a0ff35a99d7162a72692", "score": "0.6910745", "text": "def pad_sequences(sequences, token=0, max_length=None):\n\n if max_length is not None:\n for s in sequences:\n while len(s) > max_length:\n s.pop()\n\n mx = max([len(s) for s in sequences...
[ { "docid": "eed944a1d27bddfe7f93a8af99bfc0bc", "score": "0.7702567", "text": "def _pad_sequences(sequences, max_steps):\n if isinstance(sequences, np.ndarray): return sequences\n assert isinstance(sequences, list)\n checker.check_positive_integer(max_steps)\n checker.check_type(sequences, np...
6aa881b9a2f30de1ffe583b1ffce1eb5
Put relevant metrics data of class into dict
[ { "docid": "5afb20a90d6603e24821ab4cd00afd40", "score": "0.64603966", "text": "def metrics_dict(self):\n return {\"num_msgs\" : self.num_msg,\n \"throughput\" : self.throughput, \n \"queue_length\" : self.qlength,\n \"latency\" : self.latency,\n ...
[ { "docid": "6d0d663c48cf8e46387df0b963c73172", "score": "0.69854665", "text": "def stats_by_class(dataset):\n\n splitted = split_by_class(dataset)\n stats = {}\n for c, values in splitted.items():\n stats[c] = get_stats(values)\n return stats", "title": "" }, { "docid": "f...
112830f08bad1cb2397356518037ea65
Stop EC2 instance by ID
[ { "docid": "a2b50f25f8f1f38e24fc4166ab3f75f9", "score": "0.77420604", "text": "def stop_instance(self, arg_instance_id):\n try:\n print(f'Instance \"{arg_instance_id}\" stopping begins.')\n instance = self.ec2_resource.Instance(arg_instance_id)\n instance.stop()\n...
[ { "docid": "cd1761b40bdc3960e6b73585e5a48752", "score": "0.8403922", "text": "def aws_stop(self, msg, args):\n id = args\n instance = self._get_instance_by_id(id)\n response = \"\"\n if self._is_instance_permitted(id):\n i = self.ec2.instances.filter(InstanceIds=[i...
3595cadc708f0a78b7a0b73784621f8f
Ensures correctness of _primary_and_secondary_sources_to_table.
[ { "docid": "216133a72349cc172d2720c5c0bac587", "score": "0.78826684", "text": "def test_primary_and_secondary_sources_to_table(self):\n\n this_actual_table = raw_wind_io._primary_and_secondary_sources_to_table()\n\n this_actual_table.sort_values(\n raw_wind_io.PRIMARY_SOURCE_COL...
[ { "docid": "899c520089ce88e397c2dfe17e9130c9", "score": "0.5935422", "text": "def test_check_data_sources_fake_secondary(self):\n\n with self.assertRaises(ValueError):\n raw_wind_io.check_data_sources(\n primary_source=raw_wind_io.MADIS_DATA_SOURCE,\n seco...
35cdb17813597bb09f951742cda5a40e
Return the type a pointer points to.
[ { "docid": "dcfc041fc41b2a95998a5c16d6c490ab", "score": "0.692451", "text": "def get_ptr_type(structure, member):\n if len(member) > 1:\n _, tp = get_obj_offset(types, [structure, member[0]])\n if tp == 'array':\n return types[structure][1][member[0]][1][2][1]\n else:\...
[ { "docid": "4230d3cdb70d0eae25061363bec4071a", "score": "0.8147374", "text": "def get_pointer_type(self):\n return self.get_c_type() + ' *'", "title": "" }, { "docid": "26bfe339aabfbf2261fa45d63d1e0261", "score": "0.6892176", "text": "def get_type_declaration(self):\n c...
321b679eff58416edcbfb834701f2f07
Return a dict of keyword arguments.
[ { "docid": "e04521da7751862a8690f24947faa438", "score": "0.60982734", "text": "def get_kwd_args(func):\n try:\n sig = inspect.signature(func)\n except AttributeError:\n args, _, _, defaults = inspect.getargspec(func)\n if defaults:\n kwonlyargs = args[-len(defaults)...
[ { "docid": "a8bb33e673ce46d959e05908a59bb319", "score": "0.76821774", "text": "def get_kwargs(self):\n return {}", "title": "" }, { "docid": "b212d19548ebe4a7d81bd1ead37b7578", "score": "0.7656699", "text": "def as_kwargs(self) -> Dict[str, Any]:\n ret = {}\n for...
b212fc884b3873a73d7366dea6bc607c
Create 'Submit' tab and add to UI frame.
[ { "docid": "1003d833f4bf399f5e9c94f583707d2a", "score": "0.5240085", "text": "def __init__(self, base, frame):\n self.base = base\n self.label = \"Submit\"\n self.page = maya.form_layout(enableBackground=True) \n self.select_pool_type = 1\n self.select_instances = 1\n ...
[ { "docid": "49a8b321adaf67148f61d57eef97bcc1", "score": "0.62406707", "text": "def create_new_tab(self, page=-1):\n new_tab = STATDotWindow.Tab()\n tab_label_box = gtk.EventBox()\n tab_label_box.add(new_tab.label)\n tab_label_box.connect('event', self.on_tab_clicked, new_tab....
a17cbb0188b345190034c00e7d3bf5c9
Boolean indicating if the share is pending.
[ { "docid": "a2afe99d58c91477255e17e25d0b592d", "score": "0.77301145", "text": "def is_pending(self):\n return self.status == Status.PENDING", "title": "" } ]
[ { "docid": "98c322aa75b28d401d968997b511a834", "score": "0.7388369", "text": "def has_pending(self):\n return self._pending_count > 0", "title": "" }, { "docid": "523f2808a5cb4de9818b788829d25604", "score": "0.71935004", "text": "def is_pending(self):\n\n return self._s...
de54d78ec6bc27371d496d58a3050204
Get the dictionary of a dataclass
[ { "docid": "8b8293686f3040d330353c83f7839383", "score": "0.0", "text": "def default(self, o: Any) -> Any:\n if dataclassy.functions.is_dataclass_instance(o):\n return dataclassy.asdict(o)\n if isinstance(o, set):\n return list(o)\n return dataclassy.asdict(o)",...
[ { "docid": "14f4e99b24c54dbbdea1cfb5357aa462", "score": "0.8139149", "text": "def dataclass_to_dict(dataklass: C) -> Dict[str, Any]:\n data = {}\n if is_dataclass(dataklass):\n for field in fields(dataklass):\n value = getattr(dataklass, field.name)\n if is_dataclass(v...
4960b8336d863a9cccb69e67c9ac431c
Calculate the covariance matrix between orbital elements, and initial state vector using all Monte Carlo trajectories. The covariance matrix is weighted by the timing residuals. The orbital covariance matrix is calculated for radians and the inital state vector matrix in meters and meters per second.
[ { "docid": "6a93c0efd13f0123b7c5d3e5e7e2d430", "score": "0.70054585", "text": "def calcCovMatrices(mc_traj_list):\n\n # Filter out those trajectories for which the last perihelion time could not be estimated\n mc_traj_list = [traj for traj in mc_traj_list if traj.orbit.last_perihelion is not None]...
[ { "docid": "bc9b754996a3685fcb12d5c38d26cd34", "score": "0.6350269", "text": "def covariance(self):\n c,r = self.size(); float(c); float(r)\n mean_vector = self.mean()\n covariance_mat = mmatrix((c,r))\n for index_c in range(c):\n tally = float(0)\n for ...
e61d5d6da4a061cda9ed8338be837c73
This function will post a message to the room based on provided room ID
[ { "docid": "b8b411438b860ac6461f8d82518cf229", "score": "0.7153023", "text": "def post_message(room_id):\n text = input(\"test from Sam Tian \")\n URL = \"https://api.ciscospark.com/v1/messages\"\n PAYLOAD = {\"roomId\": room_id, \"text\": text}\n\n response = requests.post(url=URL, json=PAY...
[ { "docid": "c926d331d105eb3c95f82d1c5ff3d7e5", "score": "0.7540419", "text": "def on_post(self, req, resp, room_id, message_id=None):\n\n room = Room.objects.get(id=room_id)\n\n message = Message(message=req.json[\"message\"])\n message.room = room\n message.author = req.sess...
5fb0fc04c86be50925b545dac8c3f637
Creates an acceptor from a string. This function creates a FST which accepts its input with a fixed weight (defaulting to semiring One).
[ { "docid": "64c1810bd7aac41df103f0b285e4ece3", "score": "0.76613843", "text": "def acceptor(\n astring: str, symbol_table: SymbolTable, weight: Optional[float] = None\n) -> VectorFst:\n if weight is None:\n weight = weight_one()\n\n acceptor_fst_ptr = ctypes.pointer(ctypes.c_void_p())\n ...
[ { "docid": "3a11123790342656c29964c9455581a1", "score": "0.5958145", "text": "def from_string(factory, str_graph):\n\n builder = Builder(factory)\n node_sequences = [s.split('->') for s in str_graph.split(\",\")]\n\n for seq in node_sequences:\n last_id = None\n for s in seq:\n ...
cc834995374349d6489a52ff4e17e95b
Private slot to show the contents of a table. table name of the table for which to show the contents (string)
[ { "docid": "7071ae00f36e28ee0871ca3d2f085a5b", "score": "0.62225384", "text": "def on_connections_tableActivated(self, table):\n self.showTable(table)", "title": "" } ]
[ { "docid": "3f313076ed2959f209cda71176c10ca1", "score": "0.7463752", "text": "def show_table(table):\n ui.print_table(table, table_structure)", "title": "" }, { "docid": "fa6e6a9c9248556684c25af17ed59ffc", "score": "0.74433726", "text": "def show_table(table):\n ui.clear_scr()\...
cd3a0cfa9f2722cf570fbbfd381ffaff
Uniform log prior for the 2D Rosenbrock likelihood following Wang & Li (2017) where the prior pi(x) is a uniform distribution over [5, 5] x [5, 5] x ... for however many dimensions (dim = x.shape[1])
[ { "docid": "c95cb3578239edfe8a7cd908978e8fd8", "score": "0.0", "text": "def rosenbrockLnprior(theta):\n\n if np.any(np.fabs(theta) > 5):\n return -np.inf\n else:\n return 0.0", "title": "" } ]
[ { "docid": "3c5b98dc9d700b0e2e1aa1542cf74ec7", "score": "0.7165135", "text": "def log_prior(mu, log_sigma):\n return 0.5 * T.sum(1 + 2 * log_sigma - mu ** 2 - T.exp(2 * log_sigma))", "title": "" }, { "docid": "0f64d33d9ca8e1c719d82e088ca4cd88", "score": "0.7152979", "text": "def l...
8b57b40b506a65569c2bf2211d30b5ce
Deletes a specified link.
[ { "docid": "817159d0d23e3ebac410c02f312e746c", "score": "0.6469105", "text": "def delete_link(\n self, drawer, id, custom_headers=None, raw=False, **operation_config):\n # Construct URL\n url = '/v1/content/links/{drawer}/{id}'\n path_format_arguments = {\n 'dr...
[ { "docid": "75d04a8e3c7382b57f67bc652bebb46f", "score": "0.8691151", "text": "def delete_link(self, link):", "title": "" }, { "docid": "330e382b80fa4d675a239b8fc57303d7", "score": "0.7785142", "text": "async def delete_link(self, player_tag: str):\n return await self._request(...
a7b1a69abe3a81bef0ab8c3bf77ea64d
Test that the check ran as expected.
[ { "docid": "24c0a765979399b2f26022a1bca2dcce", "score": "0.0", "text": "async def test_did_run(coresys: CoreSys):\n core_security = CheckCoreSecurity(coresys)\n should_run = core_security.states\n should_not_run = [state for state in CoreState if state not in should_run]\n assert len(should_...
[ { "docid": "b0de60d9fa8572424d4f0dea91ee446f", "score": "0.76596487", "text": "def test_check():\n res, _ = ToolTester().check(None)\n assert res", "title": "" }, { "docid": "0be4e31b3b916dfdca641c459ba608fd", "score": "0.7338686", "text": "def test_succeed():\n assert True", ...
43641906006d47b53e6119d47812eb63
Tests scrap_for_posts returns valid post urls using a regular expression. This particular page has a content warning and needs a cookie to access to it.
[ { "docid": "50ce4bdf9a8fad2c1cdac3d8208a6f12", "score": "0.73245084", "text": "def test_scrap_for_posts_cookie(self):\n \n url = \"https://e-hentai.org/g/1263299/a42ce2eb95/\"\n \n response = self.ehen.scrap_for_posts(url, 1, 1, 1)\n \n pat = re.compile(r'https:...
[ { "docid": "c743b4bc0e88dbd83d3d095a408f05c2", "score": "0.67279756", "text": "def test_scrap_for_posts(self):\n \n url = \"https://e-hentai.org/g/1087428/b240f1a9ab/\"\n \n response = self.ehen.scrap_for_posts(url, 1, 1, 1)\n \n pat = re.compile(r'https:\\/\\/e...