query
stringlengths
10
2k
document
stringlengths
20
51.2k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Convert string value to byte. Converts the specified string value to a bit array (byte).
def convert_string_to_byte(strn): result = [] for _key, val in enumerate(strn): string_array = [] char = ord(val) while char: string_array.append(char & 0xFF) char >>= 8 result += reversed(string_array) return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bit_string_to_bytearray(bit_string):\n ret = []\n for idx in range(int(len(bit_string) / 8)):\n v = 0\n for idx0, bit in enumerate(bit_string[idx * 8:idx * 8 + 8]):\n v = v | (bit << (7 - idx0))\n ret.append(v)\n return bytearray(ret)", "def binary(message: str) -> bi...
[ "0.735724", "0.70556974", "0.69461215", "0.67144966", "0.6687662", "0.6534402", "0.65262514", "0.6481837", "0.6466433", "0.6450332", "0.64402205", "0.6428214", "0.64264303", "0.64182895", "0.6411446", "0.64003825", "0.63780254", "0.63543427", "0.6338239", "0.63243836", "0.631...
0.6257734
25
updates the post upvote and downvote in the post table and ensures user can only have one vote per post to ensure 1 vote/post > if a user has not voted they will be added to a vote table and their vote recorded, if a user has already voted if their vote has changed it will adjust in the vote table. vote(1 = downvote, +...
def votePost(votePostEvent): userID = votePostEvent["data"]["user_id"] postID = votePostEvent["data"]["post_id"] vote = int(votePostEvent["data"]["vote"]) query = ('SELECT * FROM vote WHERE post_id = \"{}\" AND user_id = \"{}\"'.format(postID, userID)) with conn.cursor() as cur: affectedRow ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def up_vote2(self, uid, pid):\n vid = self.id_generator(self.votes)\n vote = {'$setOnInsert': [{'Id' : vid}, {'PostId': pid}, {'VoteTypeId': \"2\"}, {'CreationDate': datetime.now()}]}\n if uid != '':\n vote['$setOnInsert'].append({'UserId':uid})\n result = self.votes.update_o...
[ "0.7218788", "0.6854043", "0.67863184", "0.66011673", "0.6512304", "0.6466202", "0.638388", "0.6331997", "0.62478775", "0.62341535", "0.61560833", "0.61194676", "0.60795665", "0.6027186", "0.6015632", "0.59645677", "0.59184176", "0.5880611", "0.5857837", "0.57319665", "0.5724...
0.7793883
0
Tests that the `BLOBHASH` opcode returns a zeroed `bytes32` value for invalid indexes. Includes cases where the index is negative (`index < 0`) or
def test_blobhash_invalid_blob_index( pre, template_tx, blocks, post, blockchain_test: BlockchainTestFiller, scenario, ): TOTAL_BLOCKS = 5 blobhash_calls = BlobhashScenario.generate_blobhash_bytecode(scenario) for i in range(TOTAL_BLOCKS): address = to_address(0x100 + i * 0x1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def badhash(x):\n x = (((x >> 16) ^ x) * 0x045d9f3b) & 0xFFFFFFFF\n x = (((x >> 16) ^ x) * 0x045d9f3b) & 0xFFFFFFFF\n x = ((x >> 16) ^ x) & 0xFFFFFFFF\n return x", "def test_pre_upload_invalid_hash(self):\n bad_collection = handlers_endpoints_v1.DigestCollection(\n namespace=handlers_endpoi...
[ "0.59866565", "0.5953137", "0.5915391", "0.5772657", "0.57497126", "0.5733505", "0.56476206", "0.56316006", "0.56028616", "0.5513016", "0.5491407", "0.5427697", "0.5417333", "0.54131013", "0.53967893", "0.5380317", "0.53680545", "0.5339167", "0.53349435", "0.53177655", "0.531...
0.67383265
0
Tests that the `BLOBHASH` opcode returns the appropriate values when there is more than 1 blob tx type within a block (for tx types 2 and 3). Scenarios involve tx type 3 followed by tx type 2 running the same code within a block, including the opposite.
def test_blobhash_multiple_txs_in_block( pre, blob_tx, post, blockchain_test: BlockchainTestFiller, ): blobhash_bytecode = BlobhashScenario.generate_blobhash_bytecode("single_valid") pre = { **pre, **{ to_address(address): Account(code=blobhash_bytecode) f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_blobhash_gas_cost(\n pre,\n template_tx,\n blocks,\n post,\n tx_type,\n blockchain_test: BlockchainTestFiller,\n):\n assert (\n Op.BLOBHASH.int() == Spec.HASH_OPCODE_BYTE\n ), \"Opcodes blobhash byte doesn't match that defined in the spec\"\n gas_measures_code = [\n ...
[ "0.70469403", "0.6965005", "0.64365447", "0.5741738", "0.57172143", "0.56923527", "0.56923527", "0.5617199", "0.55882573", "0.5406628", "0.5373095", "0.5355136", "0.53238565", "0.53141373", "0.5301294", "0.52834105", "0.52635336", "0.52419806", "0.520868", "0.51906013", "0.51...
0.6974401
1
Renders about page. This is the html version of REAMDE.md
def about(): return render_template("about.html")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def about():\n return render_template('about.html', title='About')", "def about():\n\n return render_template('about_page.html', title='About')", "def about():\n\n\treturn render_template(\"about.html\")", "def about():\n return render_template('about.html', title='About')", "def about():\n\n ...
[ "0.8474223", "0.8470069", "0.84387165", "0.83507687", "0.8326001", "0.8322761", "0.83114654", "0.8261314", "0.8261314", "0.8261314", "0.8261314", "0.8261314", "0.8261314", "0.8261314", "0.8261314", "0.8261314", "0.8256604", "0.82462674", "0.8235995", "0.8195705", "0.81810296"...
0.8196032
19
Test the setting of a SpinBox's minimum attribute
def test_set_minimum(self): self.server_widget.minimum = 10 assert self.client_widget.minimum == self.server_widget.minimum
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_minimum(self):\n self._level_gen.minimum_length = self._minimum_length_spinbox.value()\n self._refresh_view()", "def set_min(self, min):\n self.set_val((min, self.val[1]))", "def set_minVal(self, val):\n self.minVal = val", "def setMinValue(self, min_value):\r\n\t\tself.M...
[ "0.7293646", "0.6848211", "0.67437655", "0.67139983", "0.67139983", "0.6629437", "0.6524797", "0.6414689", "0.6350383", "0.6350383", "0.6350383", "0.6303773", "0.6256288", "0.6256288", "0.6199463", "0.6186399", "0.61817485", "0.615925", "0.615925", "0.6148639", "0.61402243", ...
0.7201333
1
Position the window on the center of a monitor.
def center(self): geometry = self.frameGeometry() center_p = QDesktopWidget().availableGeometry().center() geometry.moveCenter(center_p) self.move(geometry.topLeft())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def center(window):\n window.update_idletasks()\n\n # Find the screen resolution\n screen_width = window.winfo_screenwidth()\n screen_height = window.winfo_screenheight()\n\n # Find new (x, y) coordinates\n size = tuple(int(_) for _ in window.geometry().split('+')[0].split('x'))\n x = screen_w...
[ "0.85110587", "0.818734", "0.8184007", "0.8033648", "0.8033648", "0.7920156", "0.79143345", "0.7880898", "0.7794136", "0.7783326", "0.776749", "0.7754843", "0.7746054", "0.7679315", "0.76314026", "0.76287526", "0.7498968", "0.7409756", "0.73910856", "0.727597", "0.72195196", ...
0.69781727
27
The time at which this CryptoKeyVersion was created.
def create_time(self) -> str: return pulumi.get(self, "create_time")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def creation_timestamp(self):\n\n return self.get_signingTime()", "def creation_timestamp(self) -> str:\n return pulumi.get(self, \"creation_timestamp\")", "def creation_timestamp(self) -> str:\n return pulumi.get(self, \"creation_timestamp\")", "def creation_timestamp(self) -> str:\n ...
[ "0.80261946", "0.78647226", "0.78647226", "0.78647226", "0.7772531", "0.7772531", "0.7772531", "0.76039886", "0.75695133", "0.75291616", "0.75291616", "0.75291616", "0.74760157", "0.7457474", "0.7457474", "0.7413939", "0.7303893", "0.7292175", "0.72788703", "0.72484875", "0.7...
0.74684674
21
The time this CryptoKeyVersion's key material was destroyed. Only present if state is DESTROYED.
def destroy_event_time(self) -> str: return pulumi.get(self, "destroy_event_time")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy_time(self) -> str:\n return pulumi.get(self, \"destroy_time\")", "def deleted_time(self) -> str:\n return pulumi.get(self, \"deleted_time\")", "def keep_clean_time(self):\n time = ct.c_float()\n self.lib.GetKeepCleanTime(ct.pointer(time))\n return time.value", "...
[ "0.6830975", "0.6463371", "0.5760308", "0.57304496", "0.5699834", "0.5699834", "0.5611823", "0.5611349", "0.5534176", "0.5513968", "0.5511433", "0.5489028", "0.54666215", "0.54494023", "0.54239666", "0.5417291", "0.54081917", "0.5406636", "0.5405073", "0.53884304", "0.5384763...
0.6288345
2
The time this CryptoKeyVersion's key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.
def destroy_time(self) -> str: return pulumi.get(self, "destroy_time")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy_event_time(self) -> str:\n return pulumi.get(self, \"destroy_event_time\")", "def scheduled_reset_at(self):\n return self._scheduled_reset_at", "def finalize_time(self) -> str:\n return pulumi.get(self, \"finalize_time\")", "def DeclineReserveTime(self):\n if self.forc...
[ "0.6133494", "0.5902737", "0.5843555", "0.5788813", "0.57851744", "0.5732808", "0.5705735", "0.5625458", "0.556628", "0.55577034", "0.5553357", "0.5525591", "0.54893434", "0.54853827", "0.54633397", "0.54595447", "0.54551935", "0.54551935", "0.5445916", "0.5404035", "0.538614...
0.6380998
0
The time this CryptoKeyVersion's key material was generated.
def generate_time(self) -> str: return pulumi.get(self, "generate_time")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def creation_timestamp(self):\n\n return self.get_signingTime()", "def generation_timestamp(self):\n return self._generation_timestamp", "def get_time(self):\n return self.block.create_time", "def get_signingTime(self):\n\n return self.get_POW().signingTime()", "def timestamp(se...
[ "0.7496169", "0.7467577", "0.7264956", "0.71813613", "0.7136805", "0.71171856", "0.70676696", "0.70046216", "0.70046216", "0.70046216", "0.6954261", "0.6942229", "0.6887747", "0.6887747", "0.6887747", "0.6867497", "0.6824386", "0.6824386", "0.6824386", "0.6824386", "0.6824386...
0.65683186
68
The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.
def import_job(self) -> str: return pulumi.get(self, "import_job")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n return self._job", "def job_name(self) -> str:\n return self._step_execution_context.job_name", "def job_name(self) -> str:\n return pulumi.get(self, \"job_name\")", "def job_name(self):\n return self._stub.List(self._message).job_name", "def job_name(self) -> ...
[ "0.6876074", "0.68353987", "0.677785", "0.676269", "0.67342603", "0.6690829", "0.652404", "0.652404", "0.63041997", "0.6131057", "0.60194635", "0.5979917", "0.5974057", "0.59725434", "0.5794736", "0.57908785", "0.57792825", "0.5775857", "0.5728996", "0.57074064", "0.5682145",...
0.77147174
0
The time at which this CryptoKeyVersion's key material was most recently imported.
def import_time(self) -> str: return pulumi.get(self, "import_time")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def timestamp(self):\n return self.__timestamp", "def timestamp(self):\n return self._timestamp", "def timestamp(self):\n return self._timestamp", "def timestamp(self):\n return self._timestamp", "def timestamp(self):\n return self._timestamp", "def timestamp(self):\n ...
[ "0.6745257", "0.6733468", "0.6733468", "0.6733468", "0.6733468", "0.6733468", "0.6733468", "0.6733468", "0.657328", "0.6563672", "0.6554574", "0.6547454", "0.6448375", "0.6439454", "0.64254993", "0.64023787", "0.640231", "0.6389278", "0.6382242", "0.63795733", "0.6373758", ...
0.6764638
0
The resource name for this CryptoKeyVersion in the format `projects//locations//keyRings//cryptoKeys//cryptoKeyVersions/`.
def name(self) -> str: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kms_key_version_name(self) -> str:\n return pulumi.get(self, \"kms_key_version_name\")", "def version_name(self) -> str:\n return pulumi.get(self, \"version_name\")", "def key_vault_cert_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"key_vault_cert_name\")", "def comput...
[ "0.7254649", "0.6391902", "0.6276782", "0.6255558", "0.6230013", "0.6108833", "0.6088337", "0.6042543", "0.5991076", "0.5991076", "0.5991076", "0.5949111", "0.59434", "0.59233934", "0.59135425", "0.59065205", "0.5885532", "0.58718014", "0.58705276", "0.5848057", "0.5847943", ...
0.0
-1
The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.
def protection_level(self) -> str: return pulumi.get(self, "protection_level")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_encryption_level(self):\n return self.__encryption_level", "def priv_level(self):\n return self._priv_level", "def protection_status(self) -> 'outputs.ProtectionStatusDetailsResponse':\n return pulumi.get(self, \"protection_status\")", "def level(self):\n return self.__level"...
[ "0.64862454", "0.6189559", "0.60973895", "0.56339437", "0.56339437", "0.56186926", "0.5615625", "0.5615625", "0.5615625", "0.5615625", "0.5554196", "0.55172426", "0.5448809", "0.5448809", "0.5428539", "0.5425874", "0.53975004", "0.53973687", "0.53925675", "0.53378767", "0.530...
0.757068
0
The current state of the CryptoKeyVersion.
def state(self) -> str: return pulumi.get(self, "state")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def state(self):\n return self._product.get_key(self._key)", "def get_key_state(self, key):\n\n\t\treturn self._interface.get_key_state(key)", "def state(self) -> Mapping[str, Any]:\n return dict(\n key=self._key,\n iv=self._context.iv,\n context=self....
[ "0.72309923", "0.69921744", "0.6694404", "0.6550197", "0.6518132", "0.6383872", "0.63636917", "0.6300457", "0.62844086", "0.62832487", "0.6273647", "0.6231058", "0.6231058", "0.622936", "0.6226557", "0.6205265", "0.6205265", "0.6205265", "0.6193331", "0.6190707", "0.61848164"...
0.0
-1
ProtectionLevel to use when creating a CryptoKeyVersion based on this template. Immutable. Defaults to SOFTWARE.
def protection_level(self) -> str: return pulumi.get(self, "protection_level")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def version_template(self) -> Optional[pulumi.Input['CryptoKeyVersionTemplateArgs']]:\n return pulumi.get(self, \"version_template\")", "def encryption_settings_version(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"encryption_settings_version\")", "def version_template(self) -...
[ "0.5319044", "0.52108157", "0.5092645", "0.5011421", "0.49963337", "0.4974631", "0.49669603", "0.4904686", "0.4848659", "0.48109496", "0.47990912", "0.47850725", "0.47089234", "0.47029164", "0.4680356", "0.4677786", "0.46725252", "0.4662219", "0.4643539", "0.46326753", "0.460...
0.6442147
1
Using tearDown instance method here for visibility on utility. No real purpose beyond creating namespace and viewing print output.
def tearDown(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tearDown(self):\n print('Calling \\'tearDown\\'')", "def tearDown(self) -> None:\n pass", "def tearDown(self) -> None:\n pass", "def tearDown(self) -> None:\n pass", "def tearDown(self):\n \n return" ]
[ "0.73807776", "0.7368398", "0.7368398", "0.7368398", "0.73367167" ]
0.72970414
60
Creates an instance of this model from a dictionary
def from_dictionary(cls, dictionary): if dictionary is None: return None # Extract variables from the dictionary alternate_restore_base_directory = dictionary.get('alternateRestoreBaseDirectory') continue_on_error = dictionary.get('continueOnError') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_dictionary(cls,\n dictionary):\n if dictionary is None:\n return None\n\n # Extract variables from the dictionary\n id = dictionary.get('id')\n name = dictionary.get('name')\n mtype = dictionary.get('type')\n usage_bytes = diction...
[ "0.83181584", "0.8168118", "0.8168118", "0.8118749", "0.8089047", "0.79787344", "0.7949278", "0.79231393", "0.7898951", "0.78923255", "0.788838", "0.7882321", "0.7882212", "0.7876749", "0.78585315", "0.7836853", "0.7801407", "0.7801407", "0.7801407", "0.7801407", "0.7801407",...
0.0
-1
Returns the unitary for this gate, see Unitary for more info.
def get_unitary(self, params: Sequence[float] = []) -> UnitaryMatrix: self.check_parameters(params) ct = np.cos(params[0] / 2) st = np.sin(params[0] / 2) cp = np.cos(params[1]) sp = np.sin(params[1]) cl = np.cos(params[2]) sl = np.sin(params[2]) el = cl +...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_unitary(self, params: Sequence[float] = []) -> UnitaryMatrix:\n self.check_parameters(params)\n if hasattr(self, 'utry'):\n return self.utry\n\n return self.gate.get_unitary(params)", "def get_unit(self):\n return self.unit", "def unit(self):\n return self._...
[ "0.73070484", "0.6853475", "0.6797272", "0.678746", "0.67089546", "0.67089546", "0.6410169", "0.63641715", "0.63526225", "0.63102067", "0.630534", "0.6299652", "0.6256462", "0.6236322", "0.6236322", "0.6236322", "0.6236322", "0.6236322", "0.6236322", "0.6236322", "0.6236322",...
0.5928923
56
Returns the gradient for this gate, see Gate for more info.
def get_grad(self, params: Sequence[float] = []) -> np.ndarray: self.check_parameters(params) ct = np.cos(params[0] / 2) st = np.sin(params[0] / 2) cp = np.cos(params[1]) sp = np.sin(params[1]) cl = np.cos(params[2]) sl = np.sin(params[2]) el = cl + 1j * ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_gradient(self):\n # Fast path\n if self._gradient is not None:\n return self._gradient\n # Flatten (make if necessary)\n gradient = tools.flatten(tools.grads_of(self._model.parameters()))\n self._gradient = gradient\n return gradient", "def get_grad(self):\n\n return self._g...
[ "0.80847025", "0.80045277", "0.7777252", "0.77445745", "0.7719205", "0.7674507", "0.7669326", "0.7668192", "0.7537828", "0.75051373", "0.7476827", "0.74767655", "0.7301071", "0.72883075", "0.7257964", "0.7253234", "0.71923363", "0.71761215", "0.71516424", "0.7144081", "0.7116...
0.0
-1
Generates the first page, the welcome page of an experiment.
def informationPage(request, experiment_id): experiment = get_object_or_404(Experiment, pk=experiment_id) t = Template(experiment.information_page_tpl) c = RequestContext(request, {'experiment':experiment}) return HttpResponse(t.render(c))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def intro_page():\n logger.info('At introductory app page.')\n return render_template('first.html')", "def initialPage():\n\treturn header() + footer()", "def homepage():\n\treturn render_template(\"home/a_homepage.html\", title=\"Welcome\")", "def homepage():\n \n return render_template(\"coursePag...
[ "0.76146525", "0.69781417", "0.6811181", "0.66953194", "0.6681813", "0.6605282", "0.66007644", "0.66007644", "0.65557206", "0.652701", "0.6445801", "0.64408255", "0.6385903", "0.63631856", "0.6358961", "0.6354543", "0.635213", "0.6328514", "0.6322412", "0.63211256", "0.631901...
0.0
-1
Generates the thank you / end page of an experiment.
def experimentEnd(request, run_uuid): subject_data = get_object_or_404(SubjectData, pk=run_uuid) experiment = get_object_or_404(Experiment, pk=subject_data.experiment.pk) t = Template(experiment.thank_you_page_tpl) c = RequestContext(request, {'experiment':experiment, 'subject_id': run_uuid}) i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def finish_survey():\n return render_template(\"thanks.html\")", "def say_thanks():\n return render_template(\"completion.html\")", "def add_thankyou():\n\n final_thanks = \"Thank you for taking our survey\"\n\n return render_template(\n \"thankyou.html\",\n thanks=final_thanks\n ...
[ "0.67162424", "0.66402036", "0.65186864", "0.6020355", "0.59742033", "0.59120816", "0.58978045", "0.58887464", "0.5657598", "0.5654959", "0.5633666", "0.562172", "0.5619129", "0.56174856", "0.55785084", "0.55517554", "0.55486363", "0.55172986", "0.55132544", "0.54968274", "0....
0.6481132
3
Generates the homepage, i.e.,
def index(request): return render(request, settings.MEDIA_ROOT + '/uploads/templates/index.html')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def homepage():\n return render_template('home/index.html', \n title=\"Bem vindo!\")", "def homepage():\n\n return render_template('rosemead_homepage.html')", "def homepage():\n\treturn render_template(\"home/a_homepage.html\", title=\"Welcome\")", "def homepage():\n return ...
[ "0.8338239", "0.83258826", "0.8320778", "0.8228185", "0.8220453", "0.81836396", "0.8178671", "0.81598324", "0.81598324", "0.8031149", "0.7916905", "0.7881078", "0.78201354", "0.7789886", "0.7789886", "0.7789886", "0.7789886", "0.7789886", "0.7789886", "0.7789886", "0.7789886"...
0.0
-1
Return a tzinfo instance with a fixed offset from UTC.
def get_fixed_timezone(offset): if isinstance(offset, timedelta): offset = offset.total_seconds() // 60 sign = "-" if offset < 0 else "+" hhmm = "%02d%02d" % divmod(abs(offset), 60) name = sign + hhmm return timezone(timedelta(minutes=offset), name)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fixed_timezone(offset: int) -> FixedTimezone:\n if offset in _tz_cache:\n return _tz_cache[offset]\n\n tz = FixedTimezone(offset)\n _tz_cache[offset] = tz\n\n return tz", "def get_fixed_timezone(offset):\n\n if isinstance(offset, timedelta):\n offset = offset.total_seconds() // 6...
[ "0.77566963", "0.7423032", "0.68658185", "0.67821604", "0.6709978", "0.65811116", "0.64922434", "0.646681", "0.6438731", "0.62775165", "0.62616634", "0.6253832", "0.6246789", "0.62336427", "0.61945605", "0.61433315", "0.61431324", "0.6133735", "0.61289686", "0.6112954", "0.60...
0.74129945
2
Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix inorder arguments and keyword arguments.
def __init__(self, *args, **kwds): if args or kwds: super(EncounterV, self).__init__(*args, **kwds) #message fields cannot be None, assign default values for those that are if self.cnt is None: self.cnt = [] else: self.cnt = []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, *args, **kwds):\n if args or kwds:\n super(KomodoSpeechRecCommand, self).__init__(*args, **kwds)\n #message fields cannot be None, assign default values for those that are\n if self.header is None:\n self.header = std_msgs.msg.Header()\n if self.cmd is None:\n ...
[ "0.77938056", "0.77205795", "0.77205795", "0.76868427", "0.7626071", "0.75641125", "0.74400353", "0.7417306", "0.73512256", "0.7308259", "0.7279964", "0.7237508", "0.7226711", "0.7224395", "0.7224395", "0.721927", "0.72118485", "0.72118485", "0.72118485", "0.72118485", "0.721...
0.6521542
91
Square the y portion of the dataset. Operates on self.y in place.
def squareY(self): ## square the y portion element-wise ## self.y = [yElement**2 for yElement in self.y]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def square(self):\n return self.x * self.x + self.y * self.y", "def y(self, y):\n if y is None:\n raise ValueError(\"Invalid value for `y`, must not be `None`\") # noqa: E501\n\n self._y = y", "def y(self, y):\n if y is None:\n raise ValueError(\"Invalid value...
[ "0.68746537", "0.6395992", "0.6395992", "0.63871086", "0.6346675", "0.63408583", "0.63408583", "0.63408583", "0.63408583", "0.63408583", "0.63408583", "0.63408583", "0.63408583", "0.63408583", "0.63408583", "0.634008", "0.63385856", "0.6325907", "0.6311365", "0.6295584", "0.6...
0.8518901
0
range [0, 255] to range [1, 1]
def _255_to_tanh(x): return (x - 127.5) / 127.5
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def normalize_01(x):\n return x / 255.0", "def scale_to_255(a, min, max, dtype=np.uint8):\n return (((a - min) / float(max - min)) * 255).astype(dtype)", "def change( p ):\n red = p[0]\n green = p[1]\n blue = p[2]\n return [ 255-red, 255-green, 255-blue ]", "def is_0to255(value):\n retur...
[ "0.6870537", "0.6756236", "0.6590137", "0.6460519", "0.63429767", "0.6333879", "0.63207763", "0.6320514", "0.62979156", "0.6283701", "0.6261048", "0.62177134", "0.621716", "0.6213805", "0.6208568", "0.620047", "0.6196979", "0.6196852", "0.61694276", "0.6132035", "0.61228436",...
0.0
-1
Consolidates ingredients from a single Recipe object into a list of lists, each sublist containing ingredient name, quantity in grams, and unit
def get_single_shopping_list(recipe): total_ingredients = [] for key, value in recipe.ingredient_amounts.items(): if key in recipe.ingredient_units: unit = recipe.ingredient_units[key] total_ingredients.append([key, round((float(value)/gram_conversions[unit]), 2), unit]) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _parse_ingredients(recipe):\n ingredients = []\n group_counter = 1\n counter = 0\n\n filtered_dict = {k: v for k, v in recipe.items() if \"ingredient\" in k}\n ingredient = {}\n\n for key, value in filtered_dict.items():\n if not value:\n continue\n\n elif key == f\"i...
[ "0.7084555", "0.6771165", "0.66990256", "0.6571345", "0.652071", "0.64212155", "0.6402312", "0.6290653", "0.6275608", "0.6204342", "0.61023897", "0.5952924", "0.5871995", "0.5868939", "0.58654654", "0.5855293", "0.5759218", "0.57277805", "0.5694916", "0.5608151", "0.5601867",...
0.7343247
0
Deletes this model after deleting its relatives.
def delete(self, *args, **kwargs): self.delete_relatives() old_content = self.content super().delete(*args, **kwargs) if old_content.isOrphaned(): old_content.delete()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete(self):\n _unset_related_objects_relations(self)\n self.deleted = now()\n self.save()\n\n return self", "def delete(self):\n for obj in self:\n _unset_related_objects_relations(obj)\n\n self.update(deleted=now())", "def delete(self):\n self....
[ "0.7788662", "0.73562545", "0.7112095", "0.70091414", "0.6952467", "0.69205576", "0.6893429", "0.6893429", "0.6773194", "0.6699445", "0.6697453", "0.66924596", "0.6682236", "0.6659123", "0.66254437", "0.6614761", "0.659857", "0.659857", "0.65711296", "0.6556577", "0.653526", ...
0.7082319
3
Retrieves the CategoryRatings for this Category.
def get_category_ratings(self): category_ratings = dict() for cat_rating in self.category_ratings.all(): category_ratings[cat_rating.category.name] = cat_rating.rating return category_ratings
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_ratings(self):\n return self.ratings", "def get_ratings(self):\n return self.ratings", "def get_ratings(self):\n df = pd.read_csv(IoManager.CARD_RATINGS_FILE_PATH)\n df = IoManager.scale_ratings(df)\n df = IoManager.normalize_ratings_per_archetype(df)\n df = se...
[ "0.6063649", "0.6063649", "0.6018974", "0.5906118", "0.5812298", "0.57344085", "0.5733067", "0.5597386", "0.5573285", "0.5559987", "0.55014175", "0.5449165", "0.5410516", "0.53615236", "0.5275727", "0.5239959", "0.5198655", "0.5147376", "0.5119241", "0.50322884", "0.5025578",...
0.8022105
0
returns the number of vertices of the graph
def size(self): return self._size
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def num_vertices(self):\r\n return len(self.__graph_dict.keys())", "def get_num_vertices(self):\n\n return self._graph_state.get_num_vertices()", "def num_vertices(self):\n return self._top_exp.number_of_vertices()", "def num_vertices(self):\n return len(self.vertices)", "def nu...
[ "0.8841512", "0.8720834", "0.8656196", "0.8562784", "0.8562784", "0.8523891", "0.8504819", "0.8488164", "0.8486033", "0.8469269", "0.83358103", "0.832605", "0.831664", "0.8267627", "0.8048918", "0.79936755", "0.7841566", "0.7654622", "0.7640347", "0.7516568", "0.74813", "0....
0.0
-1
returns the number of vertices of the graph given by adj_mat
def size(adj_mat): return adj_mat.shape[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def degree(adj_mat, vertex):\n return np.sum(adj_mat[vertex][:])", "def num_vertices(self):\r\n return len(self.__graph_dict.keys())", "def return_num_edges(self):\n return sum(map(lambda x: len(x),self.__adj))", "def num_vertices(self):\n return self._top_exp.number_of_vertices()", ...
[ "0.7043553", "0.69618475", "0.6557534", "0.6514204", "0.64965534", "0.64328086", "0.64328", "0.64264154", "0.6415915", "0.6415915", "0.6387607", "0.6384282", "0.6369019", "0.6340357", "0.63392216", "0.6281276", "0.62501633", "0.6232764", "0.62142855", "0.62043333", "0.6184236...
0.7534527
0
returns the set of vertices of a graph given by adj_mat
def vertices(size): return set(range(size))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def edges(adj_mat, vertices):\n return [(i,j) for i,j in\n vertices if (i < j and adj_mat[i][j] == 1)]", "def get_vertices(self) -> []:\n return [i for i in self.adj_list]", "def get_vertices(self):\n return self.graph.keys()", "def vertices(self):\n return list(self.graph_...
[ "0.734127", "0.6825331", "0.6706638", "0.66996664", "0.6652601", "0.6651012", "0.663429", "0.65535116", "0.6538752", "0.6538752", "0.6538752", "0.64803374", "0.64792514", "0.64513755", "0.6382572", "0.6382572", "0.6379491", "0.6335066", "0.62136143", "0.61795574", "0.6136897"...
0.5820996
43
Return if a line is a member of the set.
def __contains__(self, line): # First check for an entry in _lines. specific = self._lines.get(line) if specific is not None: return specific # Find the position in _ranges for line. The polarity of this position # determines whether we are inside a range (odd) or outside (even). pos = bi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def intersects(self, line):\n\t\treturn self.intersection(lint) != None", "def contains(self, point):\n return point in self.console", "def check_line(self, line):\n return int(line) in self.__bus_dict", "def check(self, line):\n if not isinstance(line, str):\n raise TypeError...
[ "0.65043205", "0.6480574", "0.6443248", "0.64431673", "0.6364599", "0.6281815", "0.6256454", "0.6256454", "0.6231018", "0.61902237", "0.61691624", "0.6122346", "0.6102325", "0.6065386", "0.6065386", "0.60440683", "0.59914106", "0.59647644", "0.59472626", "0.59472626", "0.5932...
0.7132382
0
Get an unclosed disable, if any, that starts after lineno.
def get_disable_after(self, lineno): if len(self._transitions) % 2 == 1 and self._transitions[-1] >= lineno: return self._transitions[-1] return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_disable(self, btn):\n return self._disabled_buttons[btn]", "def get_line(self, lnum):\n return self._get_line(lnum - self.LINE_NUM_BASE)", "def getDisabledChannel(self):\n for c in self.channels:\n if c.role == channel_pb2.Channel.Role.DISABLED:\n return c...
[ "0.52473474", "0.50252956", "0.4824667", "0.47700012", "0.46974805", "0.46836522", "0.46836522", "0.46726447", "0.46656647", "0.46615887", "0.46435264", "0.46262807", "0.4605571", "0.458634", "0.45837957", "0.45793763", "0.4558876", "0.45134988", "0.44951", "0.44786796", "0.4...
0.7302706
0
Modifies the Rectangle by adding to its width and height.
def grow_rectangle(self, dwidth, dheight): self.width += dwidth self.height += dheight return(self.width, self.height)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update(self):\n self.rect = (self.x, self.y, self.width, self.height)", "def grow(self, delta_width, delta_height):\r\n self.width += delta_width\r\n self.height += delta_height", "def grow(self, delta_width, delta_height):\n self.width += delta_width\n self.height += del...
[ "0.74572814", "0.71528685", "0.70977014", "0.70977014", "0.70977014", "0.7084498", "0.7034695", "0.69575536", "0.6915024", "0.67287475", "0.67040485", "0.66814923", "0.66814923", "0.6669063", "0.6629318", "0.6624175", "0.6554861", "0.6495819", "0.64948386", "0.6464636", "0.64...
0.7594611
0
Helper to create an initialized Variable with weight decay. Note that the Variable is initialized with a truncated normal distribution. A weight decay is added only if one is specified.
def _get_W_b(wshape, bshape, use_xavier=True, dtype=tf.float32): if use_xavier: initializer = tf.contrib.layers.xavier_initializer() else: initializer = tf.variance_scaling_initializer(mode='fan_in') if isinstance(bshape, int): bshape = [bshape] W = _get_variable('weights', ws...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _variable_with_weight_decay(name, shape, stddev, wd):\n var = variable(\n name,\n shape,\n initializer=tf.truncated_normal_initializer(stddev=stddev, dtype=tf.float32))\n if wd is not None:\n weight_decay = tf.multiply(tf.nn.l2_loss(var), wd, name='weight_loss')\n tf.ad...
[ "0.751358", "0.7428755", "0.74258184", "0.7330876", "0.7330876", "0.73155546", "0.73154926", "0.72743744", "0.7272825", "0.726425", "0.72539645", "0.7236652", "0.71945465", "0.71027267", "0.69690984", "0.6798318", "0.6731344", "0.67162347", "0.66748744", "0.65618306", "0.6549...
0.0
-1
Fully connected layer with nonlinear operation.
def fully_connected(inputs, num_outputs, scope, use_xavier=True, use_bias=True): with tf.variable_scope(scope) as sc: num_input_units = inputs.get_shape()[-1].value wshape = [num_input_units, num_outputs] bsha...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fully_connected(self, input_layer, num_outputs, activation=None):\n num_inputs = input_layer.get_shape().as_list()[1]\n kernel_size = [num_inputs, num_outputs]\n with tf.variable_scope(self._count_layer('fully_connected')):\n kernel = self._get_variable('weights', kernel_size,\n...
[ "0.6634726", "0.6505296", "0.64434445", "0.6384216", "0.6242329", "0.6194659", "0.61824775", "0.61737007", "0.61217743", "0.60512674", "0.60469973", "0.60380805", "0.6013922", "0.600882", "0.60029185", "0.5945352", "0.59403753", "0.59160084", "0.59054434", "0.58876723", "0.58...
0.55424124
57
Fully connected layer with nonlinear operation.
def fully_connected_custom(inputs, num_outputs, scope, W_initializer, b_initializer ): with tf.variable_scope(scope) as sc: num_input_units = inputs.get_shape()[-1].value if hasattr(W_initializer, '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fully_connected(self, input_layer, num_outputs, activation=None):\n num_inputs = input_layer.get_shape().as_list()[1]\n kernel_size = [num_inputs, num_outputs]\n with tf.variable_scope(self._count_layer('fully_connected')):\n kernel = self._get_variable('weights', kernel_size,\n...
[ "0.6634726", "0.6505296", "0.64434445", "0.6384216", "0.6242329", "0.6194659", "0.61824775", "0.61737007", "0.61217743", "0.60512674", "0.60469973", "0.60380805", "0.6013922", "0.600882", "0.60029185", "0.5945352", "0.59403753", "0.59160084", "0.59054434", "0.58876723", "0.58...
0.0
-1
Return whether n is prime.
def is_prime(n): return mr_prime(n)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isprime(n):\n\treturn is_prime(n)", "def isprime(n):\r\n\treturn is_prime(n)", "def if_prime(cls, n):\n\n if (n <= 1):\n return False\n if (n <= 3):\n return True\n\n if (n % 2 == 0 or n % 3 == 0):\n return False\n\n i = 5\n while(i * i <=...
[ "0.85931945", "0.8585822", "0.8462918", "0.83860576", "0.8355825", "0.8351484", "0.8351484", "0.8348745", "0.83144575", "0.8310288", "0.8301856", "0.82919806", "0.8291436", "0.8289432", "0.82804275", "0.8246378", "0.8236075", "0.8227592", "0.822011", "0.8218768", "0.8209711",...
0.8433947
3
Return a function yielding the kth power of its argument.
def power_gen(k): if k == 0: return constant if k == 1: return identity @natural_input def power_k(n): return n ** k return power_k
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pow_better(x, k):\n if k == 1:\n return x\n if k == 0:\n return 1\n\n if k % 2 == 1:\n return x * pow_better(x, k - 1)\n else:\n return pow_better(x * x, k / 2)", "def pow_derpy(x, k):\n if k == 1:\n return x\n if k == 0:\n return 1\n\n return x ...
[ "0.7139", "0.7060932", "0.6944091", "0.6780886", "0.65451026", "0.6506851", "0.64987344", "0.64876604", "0.6471405", "0.64361554", "0.6434871", "0.6428212", "0.64263034", "0.6412759", "0.64014554", "0.6392637", "0.63426584", "0.63318074", "0.63264316", "0.63061064", "0.630517...
0.7453338
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, RemoveAgentPathResponse): return False return self.__dict__ == other.__dict__
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): return not self == other
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748" ]
0.0
-1
Useful function to view plot of loss values & accuracies across the various epochs
def show_plots(history): loss_vals = history['loss'] val_loss_vals = history['val_loss'] epochs = range(1, len(history['accuracy'])+1) f, ax = plt.subplots(nrows=1,ncols=2,figsize=(16,4)) # plot losses on ax[0] ax[0].plot(epochs, loss_vals, color='navy',marker='o', linestyle=' ', label...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plot_observations():\n plt.plot(history.history['loss'], label='training_loss')\n plt.plot(history.history['val_loss'], label='val_loss ')\n plt.xlabel('Epoch')\n plt.ylabel('Loss')\n plt.show()\n\n plt.plot(history.history['acc'], label='accuracy')\n plt.plot(history.history['val_acc'], l...
[ "0.7955931", "0.771494", "0.76987517", "0.7696198", "0.7677697", "0.76708585", "0.7575111", "0.75546145", "0.75453275", "0.7507602", "0.7492763", "0.7489783", "0.74350035", "0.74331427", "0.7425118", "0.7409142", "0.74059933", "0.7388497", "0.7386047", "0.7377215", "0.7358911...
0.711726
39
Uploads a presentation inside of a MediaSource object to the Document List feed with the given title.
def UploadPresentation(self, media_source, title): category = atom.Category(scheme=DATA_KIND_SCHEME, term=PRESENTATION_KIND_TERM) return self._UploadFile(media_source, title, category)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UploadDocument(self, media_source, title):\n category = atom.Category(scheme=DATA_KIND_SCHEME,\n term=DOCUMENT_KIND_TERM)\n return self._UploadFile(media_source, title, category)", "def _UploadFile(self, media_source, title, category):\n media_entry = gdata.GDataEntry()\n media_entry.title...
[ "0.6793786", "0.61376643", "0.60247254", "0.57565", "0.5372475", "0.5348349", "0.5301972", "0.52933085", "0.5079888", "0.5024483", "0.4981464", "0.48839614", "0.4845777", "0.4833376", "0.48084462", "0.48008373", "0.47911274", "0.4744102", "0.47370344", "0.47065476", "0.468901...
0.7927847
0
Generates a URI from the query parameters set in the object.
def ToUri(self): old_feed = self.feed self.feed = '/'.join([old_feed, self.visibility, self.projection]) new_feed = gdata.service.Query.ToUri(self) self.feed = old_feed return new_feed
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def construct_url(self):\n path = [self.path]\n path.extend([str(x) for x in self.params])\n\n url = self.client.base_url + '/'.join(x for x in path if x)\n query = self.kwargs.get('query')\n\n if query:\n # Dict -> List\n if type(query) is dict:\n ...
[ "0.7389545", "0.6797421", "0.65429366", "0.64272225", "0.6421231", "0.63739663", "0.63718164", "0.6348572", "0.6348572", "0.6312346", "0.6301882", "0.62925935", "0.6229215", "0.6216028", "0.61783725", "0.61600405", "0.6156775", "0.61559296", "0.61482966", "0.6141649", "0.6121...
0.5630897
66
Returns the number of choices in this room.
def get_num_of_choices(self) -> int: return len(self._choices)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def choices(self):\n self._choices = self.getChoices()\n return len(self._choices)", "def num_rooms(self) -> int:\n return self._num_rooms", "def rooms(self):\n count = self.db.query('select count(*) as room_count from rooms')\n return count.all()[0]['room_count']", "def co...
[ "0.7884166", "0.7269888", "0.69998723", "0.68118393", "0.66936296", "0.6680474", "0.6630076", "0.66097367", "0.6553212", "0.6552399", "0.6552399", "0.64802265", "0.64415044", "0.64289796", "0.6423698", "0.64170337", "0.64135754", "0.64119434", "0.64006597", "0.6384839", "0.63...
0.85915786
0
Set requires_grad=False for each of model.parameters()
def freeze_params(model: nn.Module): for par in model.parameters(): par.requires_grad = False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def freeze_params(m):\r\n for p in m.parameters():\r\n p.requires_grad = False", "def freeze_model(model):\n for param in model.parameters():\n param.requires_grad = False", "def freeze_params(m):\n for p in m.parameters():\n p.requires_grad = False", "def freeze_parameters(modu...
[ "0.8191775", "0.81715095", "0.8126447", "0.79484046", "0.78946775", "0.7870948", "0.78572583", "0.78546613", "0.77095217", "0.75214404", "0.73980856", "0.73750174", "0.73036224", "0.7273331", "0.72494656", "0.7191426", "0.7161741", "0.7158487", "0.71513474", "0.7137524", "0.7...
0.85454583
0
Yield successive nsized chunks from lst.
def chunks(lst, n): for i in range(0, len(lst), n): yield lst[i : i + n]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def chunks(self, lst, n):\n for i in range(0, len(lst), n):\n yield lst[i:i + n]", "def chunks(lst: list, n: int):\n for i in range(0, len(lst), n):\n yield lst[i : i + n]", "def chunks(lst, n):\n for i in range(0, len(lst), n):\n yield lst[i:i + n]", "de...
[ "0.83071756", "0.81939614", "0.81910837", "0.81910837", "0.8190213", "0.81267184", "0.81218547", "0.81218547", "0.80773693", "0.80533457", "0.80533457", "0.80533457", "0.80533457", "0.80533457", "0.80533457", "0.80533457", "0.80533457", "0.80533457", "0.80533457", "0.80533457",...
0.80526286
33
Gets E (Young's Modulus) for a given strain.
def E(self, strain): msg = "E (Young's Modulus) not implemented for MATS1" raise NotImplementedError(msg) #if self.tid: #E = self.tid.Value(strain) #return E
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_E(self):\r\n return self.E", "def get_E(self):\n return self.E", "def E(self):\n return self.generic_getter(get_energy, \"E\", \"convert_energy\")", "def E(self):\n return self._E", "def E(self):\n return self._E", "def get_e(self):\n return self.e_min + ...
[ "0.6300337", "0.6273893", "0.6133728", "0.59311485", "0.59311485", "0.58938676", "0.5851983", "0.5755492", "0.5722885", "0.5719389", "0.5683338", "0.56513655", "0.56513655", "0.5589917", "0.5562146", "0.5553228", "0.55522513", "0.555109", "0.5537341", "0.5453163", "0.54510003...
0.82478255
0
Get the latest datetime in a sequence of them. None values will be ignored, and None will be returned if the sequence is empty.
def get_latest(sequence): pruned_sequence = [i for i in sequence if i is not None] if not pruned_sequence: return None return max(pruned_sequence)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_next_timestamp(self) -> Optional[dt.datetime]:\n try:\n return parser.parse(self.events[1]['timestamp'])\n except IndexError: # No more events to consume\n return None", "def get_by_date(sequence, date):\r\n item = filter_by_date(sequence, date, date)\r\n return...
[ "0.6322736", "0.61053866", "0.60949737", "0.6011773", "0.58830106", "0.58466196", "0.576836", "0.57508504", "0.57288706", "0.57078904", "0.5619639", "0.56002134", "0.5465841", "0.5440728", "0.541036", "0.5407046", "0.5405685", "0.5391665", "0.53773725", "0.5359746", "0.534965...
0.68384075
0
Merging the provided dict with other kvs
def merge_dict(d: dict, overwrite=False, inplace=False, **kwargs): nd = dict([(k, v) for k, v in d.items()] + [(k, v) for k, v in kwargs.items() if overwrite or k not in d]) if inplace: d.update(nd) return d return nd
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _merge(old_dict, new_dict):\n dict3 = old_dict.copy()\n for k, v in new_dict.items():\n if k in dict3:\n dict3[k].append(v)\n else:\n dict3[k] = [v]\n return dict3", "def _update_default_dict(main, other):\r\n for k, v in other.items():\r\n main[k] += v"...
[ "0.74212134", "0.7195335", "0.7020242", "0.69563854", "0.6948194", "0.6912116", "0.69119376", "0.6848308", "0.6848308", "0.68323433", "0.6830405", "0.67875427", "0.6774642", "0.67546076", "0.67546076", "0.67546076", "0.67524475", "0.67217565", "0.6713449", "0.67060864", "0.67...
0.62723756
85
Return the set of all variables that are used before being defined in the program. Available only after a call to check()
def get_undefs(self): return self._undefvars
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def variables_used (self) :\r\n\t\treturn []", "def free_variables(self):\n\n free_vars = set()\n self.free_variables_helper(free_vars)\n return free_vars\n # Task 7.6", "def unusedVars(self):\n fullcode = self.code_cfg\n variables = set([x[1:] for x in codeconfig_getv...
[ "0.7966569", "0.7356758", "0.7192911", "0.71760845", "0.71756697", "0.7072129", "0.70645785", "0.7024532", "0.69846576", "0.67966497", "0.6757968", "0.67353976", "0.6695233", "0.6641099", "0.6610705", "0.65883887", "0.6526217", "0.65227383", "0.65208715", "0.64715433", "0.645...
0.5863679
83
Utility function to return the image net label for the final `dense` layer output index.
def get_imagenet_label(index): global _CLASS_INDEX if _CLASS_INDEX is None: with open(os.path.join(os.path.dirname(__file__), '../resources/imagenet_class_index.json')) as f: _CLASS_INDEX = json.load(f) return _CLASS_INDEX[str(index)][1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_label_name(label):\n\tindex = np.argmax(label)\n\tlabels = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']\n\treturn labels[int(index)]", "def label_index(self):\n return self._label_index", "def label_index(self):\n return self._label_index", ...
[ "0.69775635", "0.6234361", "0.6234361", "0.6146257", "0.6144513", "0.61380273", "0.6130573", "0.61282897", "0.6085405", "0.6080146", "0.6080146", "0.6080146", "0.6009916", "0.5994927", "0.5922996", "0.59121746", "0.5910232", "0.58829194", "0.58748204", "0.58688766", "0.585380...
0.6296411
1
Calculate the euclidean distance between two vectors.
def euclidean(x,y): return np.sqrt(np.sum((x-y)**2))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def euclidean_distance(vec1, vec2):\n return numpy.linalg.norm(vec1 - vec2)", "def euclidean_distance(vector_1: Vector, vector_2: Vector) -> VectorOut:\n return np.sqrt(np.sum((np.asarray(vector_1) - np.asarray(vector_2)) ** 2))", "def euclidean_distance(vector1, vector2):\n e_dist = [(v1 - v2) ** 2 f...
[ "0.84141546", "0.8383043", "0.8367486", "0.83444107", "0.827155", "0.8269206", "0.82594043", "0.80739975", "0.80592597", "0.8057442", "0.80272365", "0.7924906", "0.7917632", "0.79071224", "0.7907079", "0.7894911", "0.7874237", "0.78451055", "0.7821282", "0.78046054", "0.77682...
0.73222595
50
Test that a 404 is returned when a device is not found.
def test_404_is_returned_when_device_not_found(self): data = { 'sip_user_id': '987654321', } response = self.client.post(self.check_in_url, data) self.assertEquals(response.status_code, 404) self.device.refresh_from_db() self.assertEquals(self.device.last_see...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_not_found(self):\n self._error_test(fitbit_exceptions.HTTPNotFound)", "def test_errors(self):\n rc = self.app.get('/this_should_not_exist', follow_redirects=True)\n assert b'404 error :(' in rc.data", "def test_request_returns_404(client):\n assert client.get(\"/url_que_nao_exi...
[ "0.7445074", "0.7376754", "0.73725593", "0.7366791", "0.7361007", "0.733715", "0.73256713", "0.7309583", "0.72646844", "0.72621804", "0.72471106", "0.7239864", "0.72277737", "0.7202156", "0.71885806", "0.7182557", "0.71646595", "0.7160241", "0.7157245", "0.71505415", "0.71496...
0.7627245
0
This function returns an export csv action 'fields' and 'exclude' work like in django ModelForm 'header' is whether or not to output the column names as the first row
def export_as_csv_action(description="Export selected objects as CSV file", fields=None, exclude=None, header=True): def export_as_csv(modeladmin, request, queryset): """ Generic csv export admin action. based on http://djangosnippets.org/snippets/1697/ """ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def export_csv_action(description=\"Export as CSV\",\n fields=None,\n exclude=None,\n header=True,\n manyToManySep=';'):\n def export_as_csv(modeladmin, request, queryset):\n \"\"\" Generic csv export admin action.\n ...
[ "0.7396361", "0.7214949", "0.7141314", "0.7081763", "0.68924093", "0.6835412", "0.678442", "0.67562306", "0.67246413", "0.6665461", "0.6551303", "0.6493593", "0.6483552", "0.647645", "0.6327856", "0.6249327", "0.62466246", "0.62439704", "0.61969227", "0.61242825", "0.6083471"...
0.73509043
1
Test constructor with line value
def test_constructor_with_value(self): line = C2Line(self.good_line) self.assertEqual((line.addr_name, line.addr, line.addr_city, line.addr_state, line.addr_zip, line.addr_co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_constructor_with_value(self):\n line = D1Line(self.test_line)\n self.assertEqual((line.gender,\n line.event_swimmer_id,\n line.last_name,\n line.first_name,\n line.nick_name,\n ...
[ "0.78696173", "0.77815175", "0.7699274", "0.7680709", "0.7665436", "0.74811625", "0.74482614", "0.6975289", "0.6960921", "0.6905078", "0.6808007", "0.6713319", "0.66310644", "0.65846926", "0.6577896", "0.6553447", "0.65309525", "0.6527652", "0.65118575", "0.6462248", "0.64315...
0.81154877
0
Convert a 4D array of independent 3D inputs into a single 2D array where each column is a receptive field of one of the inputs. The input x has shape (N, C, H, W); this should be interpreted as N independent inputs, each with height H, width H, and C channels. A receptive field of a single input is a rectangular block ...
def im2col_naive(x, field_height=3, field_width=3, padding=1, stride=1): # First figure out what the size of the output should be N, C, H, W = x.shape HH, WW = get_num_fields(x.shape, field_height, field_width, padding, stride) # Next we zero-pad the input p = padding x_padded = np.pad(x, ((0, 0), (0, 0), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def im2col_indices(x: ndarray, field_height: int, field_width: int, padding: int, stride: int) -> ndarray:\n # Zero-pad the input\n p = padding\n x_padded = np.pad(x, ((0, 0), (0, 0), (p, p), (p, p)), mode='constant')\n\n k, i, j = get_im2col_indices(x.shape, field_height, field_width, padding,\n ...
[ "0.66544116", "0.6494751", "0.6401281", "0.6251418", "0.6123847", "0.6048659", "0.5996058", "0.59912384", "0.59711033", "0.5958386", "0.5953996", "0.5926362", "0.5886834", "0.58718127", "0.5726525", "0.5725734", "0.56992865", "0.5696175", "0.565706", "0.5655203", "0.5653984",...
0.7478544
0
Setter for start_date. Converts start_date to a tz aware ``TimeStamp``
def start_date(self, start_date): if start_date is None: start_date = datetime.now() - timedelta(days=365) self._start_date = dt_utils.parse_date(start_date)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start_date(self, start_date):\n \n self._start_date = start_date", "def set_start_date(self, date):\n pass", "def start_date(self, start_date):\n self._start_date = start_date", "def start_date(self, start_date):\n if start_date is None:\n raise ValueError(\"...
[ "0.76318645", "0.7629957", "0.7519223", "0.75144887", "0.74754214", "0.74754214", "0.74754214", "0.74754214", "0.74754214", "0.74754214", "0.74754214", "0.74754214", "0.74754214", "0.73497105", "0.7259109", "0.71600705", "0.69817936", "0.69499755", "0.6734147", "0.67218673", ...
0.7097902
16
Setter for end_date. Converts end_date to a tz aware ``TimeStamp``
def end_date(self, end_date): if end_date is None: end_date = datetime.utcnow() self._end_date = dt_utils.parse_date(end_date)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def end_date_time(self, end_date_time):\n\n self._end_date_time = end_date_time", "def end_date(self, value):\n\n if not isinstance(value, datetime):\n raise TypeError(_pretty_message(\n '''\n end_date must be an instance of datetime.datetime, not %s\n ...
[ "0.78345525", "0.78205615", "0.780767", "0.77921635", "0.7775232", "0.7775232", "0.7775232", "0.7775232", "0.7775232", "0.7775232", "0.7775232", "0.7775232", "0.7552042", "0.7549301", "0.7506802", "0.7444757", "0.7242255", "0.7201881", "0.7027408", "0.68875974", "0.6866151", ...
0.80739766
0
Looks at the priority queue to see which has the lowest value and returns that nodes name. That node will be the next to be searched
def __get_next_visit_node(self) -> str: node = None for visit in self.__priority_queue: # We can't visit the start node if visit.node_name == self.__fr: continue # Finds the lowest value node if node is None or visit.cost < node....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _find_lowest_cost_node(self) -> str:\n lowest_cost = float(\"inf\")\n lowest_cost_node = None\n for node in self.costs:\n cost = self.costs[node]\n if cost < lowest_cost and node not in self.closed_nodes:\n lowest_cost = cost\n lowest_cos...
[ "0.7017852", "0.6801722", "0.6695341", "0.669047", "0.661108", "0.6443351", "0.6373981", "0.633364", "0.6333235", "0.63086075", "0.63086075", "0.62942314", "0.6241475", "0.6227415", "0.62173665", "0.61794436", "0.61790365", "0.61769444", "0.6165788", "0.6148609", "0.6123339",...
0.78325546
0
Test the API cannot post a question to a nonexistent meetup
def test_ask_question_non_existent_meetup(self): access_token = self.get_access_token(USER_REGISTRATION, USER_LOGIN) res = self.client().post( '/api/v2/meetups/3/questions', headers=self.get_authentication_headers(access_token), data=json.dumps(QUESTION) ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_unsuccessful_post_answer_to_wrong_meetup(self):\n self.is_authenticated(self.user1)\n response = self.post_answer_with_no_meetup()\n self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)", "def test_getting_one_question_with_no_meetup(self):\n response = self.get_...
[ "0.83236146", "0.8171654", "0.812511", "0.79230416", "0.78694797", "0.7522908", "0.75139594", "0.7321609", "0.73121643", "0.72905993", "0.7162299", "0.7158093", "0.71543473", "0.71431535", "0.7135002", "0.7133432", "0.7127966", "0.7085207", "0.70643204", "0.6991045", "0.69677...
0.84796536
0
Set up the window for the VLC viewer
def createUI(self): self.widget = QWidget(self) self.setCentralWidget(self.widget) # In this widget, the video will be drawn if sys.platform == "darwin": # for MacOS from PyQt5.QtWidgets import QMacCocoaViewContainer self.videoframe = QMacCocoaViewContainer(0) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __create_windows(self, url):\n\n #\n # 1. Load Selenium\n link_m3u8 = getStreamFile.getStreamFile.getStreamFile(url)\n print(link_m3u8)\n # 2. Get m3u8 link\n #\n SM = SegmentManager(link_m3u8)\n \n root1 = Tk()\n root1.protocol(\"WM_DELETE_...
[ "0.70480955", "0.69724166", "0.6966775", "0.6903356", "0.6878234", "0.6868216", "0.6845271", "0.68392444", "0.6820362", "0.6815338", "0.6803675", "0.6763855", "0.6744684", "0.661722", "0.6599201", "0.6536138", "0.6526774", "0.65241224", "0.65126556", "0.64717996", "0.6469306"...
0.648662
19
Returns the ISO Format 'yyyyMMddThhmmss
def getvalue(self): if self._value: _d,_t=self._value.strip(' ').replace('"', '').split(',') _d=_d.split('/') _t=_t.split(':') return '%s%s%sT%s%s%s'%(_d[0].zfill(4), _d[1].zfill(2), _d[2].zfill(2), _t[0].zfill(2), _t[1].zfill(2...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isoformat(dt):\n return dt.isoformat().replace(\"+00:00\", \"Z\")", "def ISO(self):\n return \"%.4d-%.2d-%.2d %.2d:%.2d:%.2d\" % (\n self._year, self._month, self._day,\n self._hour, self._minute, self._second)", "def isoformat(self):\n s = '{0:04}'.format(self._year)...
[ "0.72536486", "0.71818644", "0.71507585", "0.71192956", "0.70299095", "0.69660085", "0.67055506", "0.6657495", "0.659046", "0.6558143", "0.65553516", "0.6540716", "0.65356463", "0.65262854", "0.6510803", "0.6497966", "0.6454507", "0.6429259", "0.6410671", "0.64051807", "0.640...
0.0
-1
Parse the version string to return a version.
def _parse_version(version_string: str) -> Version: #  First split the prerelease number if any : match = _JAVA_REGEX.match(version_string) if match is None: raise InvalidVersionFormatError( version_string, "It is not valid Java version string." ) parts = match.groupdict() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _parse_version(version):\n return version.split(\".\")[0]", "def parse_version(vstring):\n try:\n version = StrictVersion(vstring)\n except ValueError:\n logging.getLogger('ipvs.common.debug').info('Strict parsing failed, falling back to LooseVersion instead')\n version = Lo...
[ "0.7674515", "0.7655266", "0.7288375", "0.72288716", "0.7184863", "0.6962339", "0.6915037", "0.6889095", "0.68795276", "0.68112767", "0.67627907", "0.6672889", "0.6632268", "0.66017723", "0.66017723", "0.6586931", "0.64450604", "0.64427763", "0.6438094", "0.6423059", "0.62993...
0.7885201
0
Parse the command result into a string.
def _parse_version_string(cmd_result: str) -> str: lines = cmd_result.splitlines() split_lines = [line.split(" ") for line in lines] version_line = [ line for line in split_lines if len(line) > 0 and line[1] == "version" ][0] version_string = version_line[2].replace('"', "") return versi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_cmd_output(self, cmd_out):\n output_lines = cmd_out.splitlines()\n res = output_lines[1].strip() if output_lines else \"\"\n return res", "def parse_output(result):\n output = result['output']\n parsed = output.split('\\n')\n output = []\n for _line in parsed:\n ...
[ "0.70377946", "0.6761181", "0.6700342", "0.6467041", "0.6391006", "0.6358306", "0.62092966", "0.61854595", "0.6157894", "0.613283", "0.6125399", "0.60550505", "0.596524", "0.5920517", "0.59122425", "0.58949983", "0.5865026", "0.5841878", "0.5837267", "0.5825094", "0.58244514"...
0.6539889
3
Convert string to UTF8 if it is unicode
def to_utf8(self, _string): if isinstance(_string, unicode): _string = _string.encode("UTF-8") return _string
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unicode2utf8(s):\n return s.encode(encoding='utf-8', errors='ignore')", "def utf8(unicode_str):\n if six.PY2 and isinstance(unicode_str, __unicode__):\n return unicode_str.encode('utf-8')\n\n return unicode_str", "def _encode_to_utf8(s):\n return s.encode('utf-8')", "def encode_utf8(st...
[ "0.8325638", "0.81253564", "0.8112319", "0.79049784", "0.7820006", "0.778444", "0.7770003", "0.77211505", "0.77021885", "0.76895887", "0.7642291", "0.763418", "0.7623898", "0.76120734", "0.75356036", "0.752842", "0.7527049", "0.75050956", "0.7493136", "0.74736625", "0.7445252...
0.84733367
0
Convert string to UTF8 if it is unicode
def to_unicode(self, _string): if not isinstance(_string, unicode): try: _string = unicode(_string) except: try: _string = _string.decode("utf-8") except: _string = _string.decode("iso-8859-1") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_utf8(self, _string):\n if isinstance(_string, unicode):\n _string = _string.encode(\"UTF-8\")\n return _string", "def unicode2utf8(s):\n return s.encode(encoding='utf-8', errors='ignore')", "def utf8(unicode_str):\n if six.PY2 and isinstance(unicode_str, __unicode__):\n ...
[ "0.8473608", "0.8326711", "0.8126513", "0.8113546", "0.7905762", "0.78213054", "0.7784562", "0.77699", "0.77036893", "0.7690263", "0.7643195", "0.7635028", "0.76237005", "0.76134205", "0.75358355", "0.75285447", "0.75275165", "0.7504596", "0.7494031", "0.74740106", "0.7447017...
0.7722131
8
Similar to keras.preprocessing.sequence.pad_sequence but using Sample as higher level abstraction. pad_func is a pad class generator.
def pad_sequences(self,sequences, pad_func, maxlen = None): ret = [] # Determine the maxlen max_value = max(map(len, sequences)) if maxlen is None: maxlen = max_value # Pad / truncate (done this way to deal with np.array) for sequence in sequences: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pad(seq, n):\n return", "def pad(input, pad_size):\n if not pad_size:\n return input\n return tf.pad(input, [[0,0],[pad_size, pad_size],[pad_size, pad_size],[0,0]], 'REFLECT')", "def pad(input, pad, mode='constant', value=0):\n ndim = input.ndimension()\n pads_begin, pads_end = [0] * ...
[ "0.6565192", "0.6345297", "0.63375664", "0.627223", "0.610019", "0.60843563", "0.60824937", "0.60767436", "0.60576737", "0.6018839", "0.60067797", "0.600246", "0.59256184", "0.5868434", "0.5841209", "0.5815273", "0.58138293", "0.58072275", "0.57999575", "0.5789089", "0.578740...
0.63635427
1
Sets these callbacks as a class member. X is the encoded dataset used to print a sample of the output.
def get_callbacks(self, X): class LossHistory(Callback): def __init__(self,save_dir): self.save_dir=save_dir def on_train_begin(self, logs={}): self.train_acc=[] self.val_acc=[] def on_epoch_end(self, epoch, logs={}): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gen_x(self, x_func):\n self.x_title, self.x = x_func(self.sample_size, self.generator)", "def create_data_callback(self):\n self.x_values = None\n \n # ======================================\n # generating random integer data points\n # ==============================...
[ "0.6208902", "0.618572", "0.6158294", "0.58485615", "0.57469136", "0.57469136", "0.5598331", "0.5593578", "0.5573344", "0.5560488", "0.5493433", "0.54651284", "0.5408598", "0.53803706", "0.5357623", "0.53441536", "0.5341665", "0.53405184", "0.5313999", "0.5285437", "0.5272076...
0.56116307
6
Get a sense of how labels in y look like
def sample_labels(self, y, num_of_sents = 5, num_of_samples = 10, num_of_classes = 3, start_index = 5, get_prob = True): classes = self.classes_() ret = [] am = lambda myList: [i[0] for i in sorted(enumerate(myList), key=lambda x:x[1], reverse= True)] for sent in y...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def labels(self):\n return self.label(self.p_y_given_x)", "def y_to_label(self, data, Y):\n pass", "def labelingLVQ(self):\n numLabels = len(np.unique(self.y))\n for i, x in enumerate(self.x):\n w = self.find_closest(x)[0]\n for nl in range(numLabels):\n ...
[ "0.7553013", "0.7298702", "0.69065535", "0.6898405", "0.6881339", "0.6756955", "0.6737743", "0.67267495", "0.66175693", "0.66019154", "0.65689385", "0.65584385", "0.6556116", "0.6490107", "0.64706033", "0.6449437", "0.6420916", "0.64028734", "0.6395868", "0.6375159", "0.63699...
0.0
-1
If str fits whitelist pattern, return True
def import_whitelist(str): pat = re.compile('[^\s]*((from|import)\s+)+(%s)+' % '|'.join(settings.IMPORT_WHITELIST)) if pat.search(str): return True else: return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stringcheck(self, rule, string):\n if not \"*\" in rule:\n return rule in string\n elif rule[0] == \"*\":\n return string.endswith(rule[1:])\n elif rule[-1] == \"*\":\n return string.startswith(rule[:-1])\n else:\n start, end = rule.split(...
[ "0.675808", "0.65372145", "0.6511656", "0.64727074", "0.6431064", "0.6415223", "0.6329452", "0.6298491", "0.62493753", "0.6239147", "0.6225064", "0.6221444", "0.6220963", "0.62189126", "0.6194114", "0.61923766", "0.61878675", "0.6165918", "0.61643034", "0.6163833", "0.6163833...
0.64094424
6
Forward call of module. Returns a single scalar indicating the MMCE for the current batch.
def forward(self, input: torch.Tensor, target: torch.Tensor, **ig_kwargs): # assume logits as input probs, labels = torch.max(torch.softmax(input, dim=1), dim=1) probs = torch.clamp(probs, min=self.epsilon, max=1. - self.epsilon) matched = torch.where(labels == target, torch.ones_like(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_mc(self) -> int:\r\n return self.mc\r\n raise NotImplementedError", "def get_mc(self) -> int:\n return self.MC", "def fm(self):\n return None if self.accumulation is None else self.accumulation[\"fm\"]", "def M(self) -> int:\n return self.params.M", "def mcc(self)...
[ "0.598938", "0.59008616", "0.55142635", "0.5330661", "0.5227257", "0.52182496", "0.52168494", "0.52138275", "0.5191742", "0.5140059", "0.5094596", "0.5069415", "0.50553465", "0.5022273", "0.50160974", "0.50137204", "0.5012188", "0.4993949", "0.49868044", "0.49854806", "0.4984...
0.497215
23
Create a building with 0 floors.
def __init__(self, floor=0): self._floor = floor
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zero(self):\n return self.create()", "def empty_room():\n\troom_material = pra.Material(energy_absorption=0.6, scattering=None)\n\troom_faces = make_polygon(\n\t\tcentre=[0,0,2.5],\n\t\tradius=10,\n\t\theight=5,\n\t\tN=4,\n\t\trpy=[0,0,np.pi/4]\n\t)\n\n\t# create room\n\twalls = []\n\twalls.extend(cre...
[ "0.59469837", "0.58629066", "0.584134", "0.57383865", "0.5715767", "0.5698483", "0.569333", "0.5691736", "0.5667046", "0.56561327", "0.5650279", "0.5642269", "0.56346637", "0.5622668", "0.5608369", "0.5580871", "0.5579443", "0.5571832", "0.549505", "0.5487374", "0.5476468", ...
0.59591264
0
Return the player the worker belongs to.
def player(self): return self._player
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def player(self):\n return self.current.player", "def get_player(self):\n return self.player", "def get_player(self):\n return self.player", "def getPlayer(self):\n return self.currentPlayer", "def get_player(self):\r\n return self.player_control.get_player()", "def get...
[ "0.79652697", "0.7908242", "0.7908242", "0.7869171", "0.78515035", "0.7805708", "0.77777076", "0.7680538", "0.7668619", "0.7635424", "0.7626973", "0.7623583", "0.7553058", "0.7542234", "0.75201", "0.74648553", "0.74301064", "0.7388975", "0.7345874", "0.72865033", "0.72690654"...
0.7778827
6
Gives a string representation of a worker in json.
def dump_with_name(self, id_to_name): return str(id_to_name[self.player]) + str(self._num)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_str(self) -> str:\n\n return json.dumps(\n {\n \"job_id\": self.job_id,\n \"creation_time\": self.creation_time.isoformat(),\n \"orbit_ids\": self.orbit_ids,\n \"task_ids\": self.task_ids,\n }\n )", "def to_jso...
[ "0.6362371", "0.6233416", "0.6087986", "0.6052623", "0.6028814", "0.60086954", "0.5926693", "0.59215784", "0.59096795", "0.590528", "0.58827466", "0.58585256", "0.58520925", "0.58162284", "0.5783356", "0.5774666", "0.5765263", "0.5765263", "0.57383984", "0.5731378", "0.570115...
0.0
-1
Return the vector representation of the direction as (x, y).
def vector(self): return (self.row, self.col)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xy2vec(self, x, y=None, direct=False):\n pass", "def direction(self):\n len = self.length()\n if len == 0.0:\n uvec = pos.Pos(np.transpose(np.array([0, 0, 0])))\n else:\n uvec = pos.Pos(np.transpose(np.array([(self.end.x - self.start.x) / len,\n ...
[ "0.7444153", "0.7271004", "0.7070392", "0.6902297", "0.68903995", "0.6793629", "0.6737614", "0.6735592", "0.6697828", "0.6628992", "0.65964645", "0.65831494", "0.656807", "0.6533286", "0.6526093", "0.65158176", "0.651328", "0.6513226", "0.6502197", "0.64905113", "0.6445597", ...
0.7184132
2
Runs computational graph to get the Numpy values of the tensor.
def run_tf_tensor(self, tensor, samples): # TODO: rewrite it as a concatenation of all the batches per each activation data = np.expand_dims(samples, axis=2) size = data.shape[0] # activations = [] # np.empty([size, len(self.activations) - 2]) # TODO: adjust the number of tensors ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _evaluate(tensor):\n if context.executing_eagerly():\n return tensor.numpy()\n return ops.get_default_session().run(tensor)", "def GraphFn(self, inp):\n tensor = inp * 2.0\n tensor = array_ops.reshape(tensor, self.tensor_shapes[1])\n tensor = tensor + 3.0\n tensor = array_ops.reshape...
[ "0.68424153", "0.6093609", "0.5976245", "0.59712416", "0.59338295", "0.58939874", "0.58570814", "0.5834455", "0.57933617", "0.5750384", "0.57452464", "0.57297385", "0.57173157", "0.5693339", "0.56740916", "0.56646866", "0.5654747", "0.56246257", "0.5598025", "0.55806196", "0....
0.0
-1
Get an account or the default wallet balance of Aer or any token on a given network.
def get_balance( account_addr: str, asset_addr: str, aergo: herapy.Aergo, ) -> int: if not is_aergo_address(account_addr): raise InvalidArgumentsError( "Account {} must be an Aergo address".format(account_addr) ) balance = 0 if asset_addr == "aergo": # query a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def get_balance(sochain_url:str, network:str, address:str):\n try:\n balance = await sochain_api.get_balance(sochain_url, network, address)\n if balance == None:\n raise Exception(\"Invalid Address\")\n return balance\n except Exception as err:\n raise Exception(s...
[ "0.7149257", "0.6621187", "0.6454162", "0.6354679", "0.6269684", "0.62129307", "0.6195613", "0.6191922", "0.61895686", "0.61082065", "0.6101474", "0.6098254", "0.6096817", "0.60751027", "0.6042378", "0.600981", "0.6000426", "0.5944942", "0.59416133", "0.59114677", "0.5875592"...
0.5722469
28
Retrieve the indexes of items.
def get_indexes(self, items: Iterable[_T]) -> List[int]: return [self.get_index(item) for item in items]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_items_to_index(self):\n\t\treturn []", "def indexes(self) -> list:\n return self._indexes", "def get_indexes(self):\n indexes = []\n for c in self.components:\n indexes.extend(c.get_indexes())\n return indexes", "def getIndices(self):\r\n return self._ind...
[ "0.7775086", "0.7528876", "0.7489329", "0.7464993", "0.74584794", "0.7425455", "0.7316261", "0.72287303", "0.7218745", "0.71334076", "0.70995414", "0.7072015", "0.70254475", "0.69898885", "0.69820243", "0.69476205", "0.69393134", "0.693311", "0.6893833", "0.6886493", "0.68683...
0.81704074
0
Retrieve the item at the given index.
def get_item(self, index: int) -> _T: return self.index_to_item[index]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(self, index):\n self.__validate_index(index)\n return self.__list[index]", "def get_by_index(self, index):\n if index > self.length - 1:\n return None\n else:\n return self.items[index]", "def get_item(self, index):\n if index == 0:\n ...
[ "0.85007095", "0.84606695", "0.8387358", "0.8309292", "0.82508665", "0.8235532", "0.819861", "0.80894804", "0.79970783", "0.7979854", "0.77946913", "0.7787414", "0.7787414", "0.77580506", "0.77526045", "0.7680739", "0.76625", "0.7655199", "0.7648257", "0.7648257", "0.7617422"...
0.8922373
0
Sets the auth_pass_phrase of this SnmpTransportWhereInput.
def auth_pass_phrase(self, auth_pass_phrase): self._auth_pass_phrase = auth_pass_phrase
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auth_pass_phrase_in(self, auth_pass_phrase_in):\n\n self._auth_pass_phrase_in = auth_pass_phrase_in", "def auth_pass_phrase_gt(self, auth_pass_phrase_gt):\n\n self._auth_pass_phrase_gt = auth_pass_phrase_gt", "def auth_pass_phrase_lte(self, auth_pass_phrase_lte):\n\n self._auth_pass_ph...
[ "0.781114", "0.7559498", "0.7523328", "0.73635566", "0.72696495", "0.702141", "0.6867728", "0.6586663", "0.64199317", "0.608618", "0.60732085", "0.5962719", "0.5921906", "0.5888259", "0.58616227", "0.5850888", "0.5769163", "0.5697053", "0.56873345", "0.56873345", "0.56873345"...
0.7854516
0
Sets the auth_pass_phrase_contains of this SnmpTransportWhereInput.
def auth_pass_phrase_contains(self, auth_pass_phrase_contains): self._auth_pass_phrase_contains = auth_pass_phrase_contains
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auth_pass_phrase_in(self, auth_pass_phrase_in):\n\n self._auth_pass_phrase_in = auth_pass_phrase_in", "def privacy_pass_phrase_contains(self, privacy_pass_phrase_contains):\n\n self._privacy_pass_phrase_contains = privacy_pass_phrase_contains", "def auth_pass_phrase_starts_with(self, auth_pas...
[ "0.7431693", "0.7116085", "0.70672405", "0.68859017", "0.687822", "0.68509144", "0.68177617", "0.6599361", "0.6448992", "0.64436525", "0.62796223", "0.6053932", "0.59515876", "0.59086794", "0.584875", "0.5739316", "0.5712198", "0.5686387", "0.538989", "0.5354996", "0.52060974...
0.8569577
0
Sets the auth_pass_phrase_gt of this SnmpTransportWhereInput.
def auth_pass_phrase_gt(self, auth_pass_phrase_gt): self._auth_pass_phrase_gt = auth_pass_phrase_gt
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auth_pass_phrase_lt(self, auth_pass_phrase_lt):\n\n self._auth_pass_phrase_lt = auth_pass_phrase_lt", "def auth_pass_phrase_lte(self, auth_pass_phrase_lte):\n\n self._auth_pass_phrase_lte = auth_pass_phrase_lte", "def auth_pass_phrase_gte(self, auth_pass_phrase_gte):\n\n self._auth_pas...
[ "0.7781181", "0.7488721", "0.7207588", "0.7038858", "0.6835662", "0.6797311", "0.66949695", "0.66770655", "0.63519335", "0.63044417", "0.5919278", "0.5918295", "0.5807656", "0.5746963", "0.561138", "0.55917805", "0.5580253", "0.5538414", "0.54917306", "0.5275805", "0.52505034...
0.85922396
0
Sets the auth_pass_phrase_gte of this SnmpTransportWhereInput.
def auth_pass_phrase_gte(self, auth_pass_phrase_gte): self._auth_pass_phrase_gte = auth_pass_phrase_gte
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auth_pass_phrase_gt(self, auth_pass_phrase_gt):\n\n self._auth_pass_phrase_gt = auth_pass_phrase_gt", "def auth_pass_phrase_lte(self, auth_pass_phrase_lte):\n\n self._auth_pass_phrase_lte = auth_pass_phrase_lte", "def privacy_pass_phrase_gte(self, privacy_pass_phrase_gte):\n\n self._pr...
[ "0.77314377", "0.7589521", "0.7348123", "0.7085805", "0.6752581", "0.6523378", "0.64435166", "0.64407814", "0.6334739", "0.6329932", "0.6069041", "0.57792276", "0.5649616", "0.5606727", "0.5588168", "0.52555424", "0.5231286", "0.5127523", "0.5127523", "0.49527985", "0.4823095...
0.86952925
0
Sets the auth_pass_phrase_in of this SnmpTransportWhereInput.
def auth_pass_phrase_in(self, auth_pass_phrase_in): self._auth_pass_phrase_in = auth_pass_phrase_in
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auth_pass_phrase_lte(self, auth_pass_phrase_lte):\n\n self._auth_pass_phrase_lte = auth_pass_phrase_lte", "def auth_pass_phrase(self, auth_pass_phrase):\n\n self._auth_pass_phrase = auth_pass_phrase", "def auth_pass_phrase_contains(self, auth_pass_phrase_contains):\n\n self._auth_pass_...
[ "0.73474747", "0.7203547", "0.7163105", "0.70268905", "0.6981761", "0.68725914", "0.6753297", "0.6745892", "0.6659286", "0.661184", "0.597716", "0.59300953", "0.59090245", "0.5741149", "0.56182384", "0.5592453", "0.53776133", "0.5301883", "0.5279408", "0.52768177", "0.5246016...
0.8580808
0
Sets the auth_pass_phrase_lt of this SnmpTransportWhereInput.
def auth_pass_phrase_lt(self, auth_pass_phrase_lt): self._auth_pass_phrase_lt = auth_pass_phrase_lt
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auth_pass_phrase_lte(self, auth_pass_phrase_lte):\n\n self._auth_pass_phrase_lte = auth_pass_phrase_lte", "def auth_pass_phrase_gt(self, auth_pass_phrase_gt):\n\n self._auth_pass_phrase_gt = auth_pass_phrase_gt", "def auth_pass_phrase_in(self, auth_pass_phrase_in):\n\n self._auth_pass_...
[ "0.7885804", "0.78757674", "0.72538865", "0.71195245", "0.7047997", "0.6836225", "0.6782459", "0.6763776", "0.66093177", "0.6281565", "0.61391824", "0.5858661", "0.58412445", "0.5826242", "0.57762665", "0.5738013", "0.5678211", "0.56069523", "0.5604845", "0.54662365", "0.5352...
0.85894096
0
Sets the auth_pass_phrase_lte of this SnmpTransportWhereInput.
def auth_pass_phrase_lte(self, auth_pass_phrase_lte): self._auth_pass_phrase_lte = auth_pass_phrase_lte
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auth_pass_phrase_lt(self, auth_pass_phrase_lt):\n\n self._auth_pass_phrase_lt = auth_pass_phrase_lt", "def privacy_pass_phrase_lte(self, privacy_pass_phrase_lte):\n\n self._privacy_pass_phrase_lte = privacy_pass_phrase_lte", "def auth_pass_phrase_gt(self, auth_pass_phrase_gt):\n\n self...
[ "0.8028399", "0.77357954", "0.7511399", "0.6917123", "0.6842178", "0.6685858", "0.6590843", "0.64714855", "0.62504584", "0.5883415", "0.5757428", "0.5753308", "0.56354564", "0.5618215", "0.55505353", "0.55505353", "0.5508688", "0.5457066", "0.54199463", "0.539048", "0.5335114...
0.88425034
0
Sets the auth_pass_phrase_not of this SnmpTransportWhereInput.
def auth_pass_phrase_not(self, auth_pass_phrase_not): self._auth_pass_phrase_not = auth_pass_phrase_not
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auth_pass_phrase_not_in(self, auth_pass_phrase_not_in):\n\n self._auth_pass_phrase_not_in = auth_pass_phrase_not_in", "def auth_pass_phrase_not_contains(self, auth_pass_phrase_not_contains):\n\n self._auth_pass_phrase_not_contains = auth_pass_phrase_not_contains", "def auth_pass_phrase_in(sel...
[ "0.752454", "0.7468319", "0.7346373", "0.7292952", "0.7265822", "0.71727866", "0.71205926", "0.71117574", "0.7029825", "0.6940506", "0.67158896", "0.6549791", "0.62057585", "0.61486393", "0.61246127", "0.6096943", "0.593907", "0.592669", "0.57615715", "0.5760164", "0.5691332"...
0.8412279
0
Sets the auth_pass_phrase_not_contains of this SnmpTransportWhereInput.
def auth_pass_phrase_not_contains(self, auth_pass_phrase_not_contains): self._auth_pass_phrase_not_contains = auth_pass_phrase_not_contains
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auth_pass_phrase_not(self, auth_pass_phrase_not):\n\n self._auth_pass_phrase_not = auth_pass_phrase_not", "def auth_pass_phrase_not_in(self, auth_pass_phrase_not_in):\n\n self._auth_pass_phrase_not_in = auth_pass_phrase_not_in", "def auth_pass_phrase_not_starts_with(self, auth_pass_phrase_not...
[ "0.8209693", "0.79880464", "0.76798034", "0.7576385", "0.7498638", "0.741894", "0.6932796", "0.6907163", "0.656471", "0.6563753", "0.6537045", "0.64699817", "0.63088673", "0.6280631", "0.6247787", "0.61156756", "0.6031316", "0.6031316", "0.5955789", "0.5880914", "0.58487445",...
0.8761179
0
Sets the auth_pass_phrase_not_in of this SnmpTransportWhereInput.
def auth_pass_phrase_not_in(self, auth_pass_phrase_not_in): self._auth_pass_phrase_not_in = auth_pass_phrase_not_in
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auth_pass_phrase_not(self, auth_pass_phrase_not):\n\n self._auth_pass_phrase_not = auth_pass_phrase_not", "def privacy_pass_phrase_not_in(self, privacy_pass_phrase_not_in):\n\n self._privacy_pass_phrase_not_in = privacy_pass_phrase_not_in", "def auth_pass_phrase_not_contains(self, auth_pass_p...
[ "0.78603196", "0.78347", "0.7683869", "0.72214127", "0.7173968", "0.6916312", "0.6584374", "0.65441394", "0.6470595", "0.64667845", "0.635172", "0.635172", "0.62284774", "0.6069534", "0.60610056", "0.6032769", "0.6027786", "0.59947455", "0.59947455", "0.59947455", "0.59947455...
0.8883113
0
Sets the auth_pass_phrase_not_starts_with of this SnmpTransportWhereInput.
def auth_pass_phrase_not_starts_with(self, auth_pass_phrase_not_starts_with): self._auth_pass_phrase_not_starts_with = auth_pass_phrase_not_starts_with
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auth_pass_phrase_starts_with(self, auth_pass_phrase_starts_with):\n\n self._auth_pass_phrase_starts_with = auth_pass_phrase_starts_with", "def auth_pass_phrase_not(self, auth_pass_phrase_not):\n\n self._auth_pass_phrase_not = auth_pass_phrase_not", "def auth_pass_phrase_not_contains(self, aut...
[ "0.7838732", "0.7734629", "0.7587478", "0.75425184", "0.7326338", "0.72983", "0.6786595", "0.67239726", "0.65661025", "0.65315014", "0.64992905", "0.6442643", "0.63095814", "0.63095814", "0.6242652", "0.62361693", "0.61034375", "0.6073068", "0.60304064", "0.5863959", "0.58242...
0.8679558
0
Sets the auth_protocol of this SnmpTransportWhereInput.
def auth_protocol(self, auth_protocol): self._auth_protocol = auth_protocol
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auth_protocol_in(self, auth_protocol_in):\n\n self._auth_protocol_in = auth_protocol_in", "def auth_protocol_not(self, auth_protocol_not):\n\n self._auth_protocol_not = auth_protocol_not", "def auth_protocol_not_in(self, auth_protocol_not_in):\n\n self._auth_protocol_not_in = auth_prot...
[ "0.70807064", "0.67652357", "0.58684945", "0.58580065", "0.58580065", "0.58580065", "0.58580065", "0.564377", "0.54557496", "0.5074052", "0.50593364", "0.50593364", "0.50172764", "0.48871255", "0.48869604", "0.48869604", "0.48869604", "0.48869604", "0.48869604", "0.4864586", ...
0.72429603
0
Sets the auth_protocol_in of this SnmpTransportWhereInput.
def auth_protocol_in(self, auth_protocol_in): self._auth_protocol_in = auth_protocol_in
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def protocol_in(self, protocol_in):\n\n self._protocol_in = protocol_in", "def auth_protocol_not_in(self, auth_protocol_not_in):\n\n self._auth_protocol_not_in = auth_protocol_not_in", "def privacy_protocol_in(self, privacy_protocol_in):\n\n self._privacy_protocol_in = privacy_protocol_in"...
[ "0.6885054", "0.6677446", "0.63203174", "0.62550765", "0.6047897", "0.5381356", "0.53768516", "0.5003982", "0.47929305", "0.47722635", "0.47722635", "0.47722635", "0.47722635", "0.46545923", "0.4575064", "0.44683123", "0.44381884", "0.44032484", "0.43971953", "0.43662435", "0...
0.8140534
0
Sets the auth_protocol_not of this SnmpTransportWhereInput.
def auth_protocol_not(self, auth_protocol_not): self._auth_protocol_not = auth_protocol_not
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auth_protocol_not_in(self, auth_protocol_not_in):\n\n self._auth_protocol_not_in = auth_protocol_not_in", "def protocol_not(self, protocol_not):\n\n self._protocol_not = protocol_not", "def auth_protocol_in(self, auth_protocol_in):\n\n self._auth_protocol_in = auth_protocol_in", "def...
[ "0.71809804", "0.66980857", "0.66159177", "0.63066816", "0.6266004", "0.6175271", "0.5650357", "0.55397147", "0.5488123", "0.5223189", "0.5223189", "0.5223189", "0.5223189", "0.5129376", "0.5103923", "0.5043808", "0.49838006", "0.4981507", "0.49137226", "0.49053764", "0.48836...
0.7924234
0
Sets the auth_protocol_not_in of this SnmpTransportWhereInput.
def auth_protocol_not_in(self, auth_protocol_not_in): self._auth_protocol_not_in = auth_protocol_not_in
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def protocol_not_in(self, protocol_not_in):\n\n self._protocol_not_in = protocol_not_in", "def privacy_protocol_not_in(self, privacy_protocol_not_in):\n\n self._privacy_protocol_not_in = privacy_protocol_not_in", "def auth_protocol_not(self, auth_protocol_not):\n\n self._auth_protocol_not ...
[ "0.7668768", "0.73375297", "0.7273119", "0.69356006", "0.6882995", "0.6349374", "0.626789", "0.6109902", "0.60869145", "0.6081788", "0.6014916", "0.59286404", "0.58941525", "0.58941287", "0.5843037", "0.5843037", "0.58416605", "0.58334637", "0.5759445", "0.5759445", "0.575759...
0.8491971
0
Sets the cluster of this SnmpTransportWhereInput.
def cluster(self, cluster): self._cluster = cluster
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cluster(self, cluster):\n if self.local_vars_configuration.client_side_validation and cluster is None: # noqa: E501\n raise ValueError(\"Invalid value for `cluster`, must not be `None`\") # noqa: E501\n\n self._cluster = cluster", "def update_cluster(self, cluster, params, *args, *...
[ "0.66914797", "0.5961687", "0.5939074", "0.59018654", "0.5835293", "0.57938474", "0.57844645", "0.5689278", "0.5672492", "0.5638842", "0.5611124", "0.55618924", "0.55618924", "0.5521165", "0.55151445", "0.54711205", "0.5468352", "0.5468352", "0.5468352", "0.54638517", "0.5463...
0.67236936
4
Sets the community_gt of this SnmpTransportWhereInput.
def community_gt(self, community_gt): self._community_gt = community_gt
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def community_gte(self, community_gte):\n\n self._community_gte = community_gte", "def community_lte(self, community_lte):\n\n self._community_lte = community_lte", "def community_lt(self, community_lt):\n\n self._community_lt = community_lt", "def community_not(self, community_not):\n\n...
[ "0.7180549", "0.6922143", "0.68980795", "0.63079345", "0.5855959", "0.5489537", "0.54483324", "0.5218178", "0.511721", "0.5051381", "0.49734914", "0.49530166", "0.49249473", "0.49068794", "0.48716658", "0.48367786", "0.47627246", "0.47373727", "0.46996287", "0.4691545", "0.46...
0.8065057
0