query stringlengths 9 9.05k | document stringlengths 10 222k | metadata dict | negatives listlengths 30 30 | negative_scores listlengths 30 30 | document_score stringlengths 4 10 | document_rank stringclasses 2
values |
|---|---|---|---|---|---|---|
Merge two volumes into one. | def merge_volumes(volume1, volume2):
if not isinstance(volume1, Volume) or \
not isinstance(volume2, Volume):
raise TypeError()
lowercorner1, uppercorner1 = volume1.get_corners()
lowercorner2, uppercorner2 = volume2.get_corners()
lowercorner = (min(lowercorner1[0], lowercorner2[0]),
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def merge(): #Status: WIP\r\n pass",
"def sync(self, **kwargs):\n volume_1 = kwargs['NAMES'][0]\n volume_2 = kwargs['NAMES'][1]\n path1 = f\"{self.cm.find_name(name=volume_1)[0]['path']}/{volume_1}/\"\n path2 = f\"{self.cm.find_name(name=volume_2)[0]['path']}/{volume_2}/\"\n ... | [
"0.58557945",
"0.5811954",
"0.5793941",
"0.57914466",
"0.56307393",
"0.5590437",
"0.5583113",
"0.55503875",
"0.5532684",
"0.54878396",
"0.54819626",
"0.54766107",
"0.54480654",
"0.5441496",
"0.542764",
"0.5426027",
"0.54059726",
"0.5367306",
"0.5359285",
"0.5351776",
"0.53475... | 0.7455013 | 0 |
Alias of hypercubes_overlap. We do not verify that it is included but by definition of the problem if volume crosses outfile then volume in outfile. | def included_in(volume, outfile):
return hypercubes_overlap(volume, outfile) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hypercubes_overlap(hypercube1, hypercube2):\n if not isinstance(hypercube1, Volume) or \\\n not isinstance(hypercube2, Volume):\n raise TypeError()\n\n lowercorner1, uppercorner1 = hypercube1.get_corners()\n lowercorner2, uppercorner2 = hypercube2.get_corners()\n nb_dims = len(upperco... | [
"0.6887589",
"0.6100261",
"0.60348684",
"0.5958832",
"0.58412147",
"0.57699",
"0.5757132",
"0.5709748",
"0.56067",
"0.55064774",
"0.5492626",
"0.5490349",
"0.5449239",
"0.5437164",
"0.5422487",
"0.54063815",
"0.54039466",
"0.5402923",
"0.5399976",
"0.5399588",
"0.5388516",
... | 0.83019495 | 0 |
Add volume information to dictionary associating output file index to | def add_to_array_dict(array_dict, outfile, volume):
if (not isinstance(outfile.index, int)
or not isinstance(volume, Volume)
or not isinstance(outfile, Volume)):
raise TypeError()
if not outfile.index in array_dict.keys():
array_dict[outfile.index] = list()
array_dict[outf... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_volume_info(self, vi):\n vol_num = vi.volume_number\n self.volume_info_dict[vol_num] = vi\n if self.fh:\n self.fh.write(vi.to_string() + \"\\n\")",
"def volumes(self):",
"def generate_volume_info(self, NAME, path):\n info = {'tags': [], 'name': NAME, 'path': path,... | [
"0.7031723",
"0.6087027",
"0.5982795",
"0.59471434",
"0.59254646",
"0.5894586",
"0.57727504",
"0.56557536",
"0.56557536",
"0.56557536",
"0.56455255",
"0.56353813",
"0.5634556",
"0.5623358",
"0.5588118",
"0.55815965",
"0.54794145",
"0.54393363",
"0.5389895",
"0.5359095",
"0.53... | 0.63656837 | 1 |
From a dictionary of Volumes, creates a dictionary of list of slices. The new arrays_dict associates each output file to each volume that must be written at a time. | def clean_arrays_dict(arrays_dict):
for k in arrays_dict.keys():
volumes_list = arrays_dict[k]
arrays_dict[k] = [convert_Volume_to_slices(v) for v in volumes_list] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_to_array_dict(array_dict, outfile, volume):\n if (not isinstance(outfile.index, int) \n or not isinstance(volume, Volume) \n or not isinstance(outfile, Volume)):\n raise TypeError()\n\n if not outfile.index in array_dict.keys():\n array_dict[outfile.index] = list()\n ar... | [
"0.6480677",
"0.5515444",
"0.5372382",
"0.5338525",
"0.5293533",
"0.50967926",
"0.4978781",
"0.49624842",
"0.49225482",
"0.4908318",
"0.4890661",
"0.4890661",
"0.48351032",
"0.4833667",
"0.4814905",
"0.48083922",
"0.4790626",
"0.47904637",
"0.47892427",
"0.4787031",
"0.473998... | 0.7390135 | 0 |
Merge volume with other volumes from volumes list in the merge directions. | def apply_merge(volume, volumes, merge_directions):
def get_new_volume(volume, lowcorner):
v2 = get_volume(lowcorner)
if v2 != None:
return merge_volumes(volume, v2)
else:
return volume
def get_volume(lowcorner):
if not isinstance(lowcorner, tuple):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def merge_volumes(volume1, volume2):\n if not isinstance(volume1, Volume) or \\\n not isinstance(volume2, Volume):\n raise TypeError()\n\n lowercorner1, uppercorner1 = volume1.get_corners()\n lowercorner2, uppercorner2 = volume2.get_corners()\n lowercorner = (min(lowercorner1[0], lowercor... | [
"0.6615679",
"0.5793308",
"0.5730063",
"0.5686665",
"0.56246465",
"0.5593841",
"0.55670226",
"0.55485183",
"0.5492772",
"0.5480072",
"0.5442755",
"0.5396768",
"0.530223",
"0.5294843",
"0.527612",
"0.5255526",
"0.52393526",
"0.5207724",
"0.5206096",
"0.5203979",
"0.5188928",
... | 0.6634114 | 0 |
Subscribes the decorated function to all messages from the messagequeue. | def subscribe():
def func_wrapper(func):
queue.observe_on(scheduler).subscribe(func)
return func
return func_wrapper | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_messages_from_queue(fx):\n\n for msg in queue.receive_messages():\n fx(msg)",
"def subscribe(self, queue, action):\n self.channel.queue_declare(queue=queue)\n self.channel.basic_consume(queue=queue,\n on_message_callback=action,\n ... | [
"0.67206204",
"0.61992186",
"0.6189017",
"0.6103482",
"0.6008804",
"0.5993647",
"0.59808356",
"0.59557223",
"0.59217",
"0.5876236",
"0.586259",
"0.5857057",
"0.58430415",
"0.5837712",
"0.57736427",
"0.57736427",
"0.57736427",
"0.566076",
"0.56512743",
"0.5609942",
"0.5599494"... | 0.71473676 | 0 |
Subscribes the decorated function to messages of the given type. The function will be observed on its own thread. | def subscribe_to(type_to_subscribe_to=None):
def func_wrapper(func):
queue.filter(lambda x:isinstance(x, type_to_subscribe_to) or type_to_subscribe_to == None).observe_on(scheduler).subscribe(func)
return func
return func_wrapper | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def subscribe():\n def func_wrapper(func):\n queue.observe_on(scheduler).subscribe(func)\n return func\n return func_wrapper",
"def decorator(func):\n self.subscribe(func, event, *events)\n return func",
"def listen(self, event_type):\n def decorator(func):\n ... | [
"0.62448895",
"0.62394124",
"0.61755747",
"0.6086829",
"0.5917949",
"0.59065235",
"0.55706877",
"0.55671126",
"0.5484962",
"0.5458996",
"0.5413952",
"0.5413952",
"0.5413952",
"0.5380395",
"0.53653276",
"0.5363469",
"0.53156483",
"0.5297839",
"0.5297297",
"0.5295942",
"0.52826... | 0.7049433 | 0 |
Clause server; Statement edns_udp_size; passing mode | def test_isc_server_stmt_edns_udp_size_passing(self):
test_string = [
'edns-udp-size 0;',
'edns-udp-size 1;',
'edns-udp-size 102;',
'edns-udp-size 255;',
]
result = optviewserver_stmt_edns_udp_size.runTests(test_string, failureTests=False)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_isc_server_stmt_edns_udp_size_failing(self):\n test_string = [\n 'edns-udp-size yes;',\n 'edns-udp-size -3;',\n ]\n result = optviewserver_stmt_edns_udp_size.runTests(test_string, failureTests=True)\n self.assertTrue(result[0])",
"def SendPacketsSendSize... | [
"0.7094463",
"0.650804",
"0.6228553",
"0.5829782",
"0.5800739",
"0.5688185",
"0.56580013",
"0.5654203",
"0.56267405",
"0.5549835",
"0.5502808",
"0.5468445",
"0.5465288",
"0.5457814",
"0.5457814",
"0.54485154",
"0.53859425",
"0.53797966",
"0.5371547",
"0.53284526",
"0.532783",... | 0.7638634 | 0 |
Clause server; Statement edns_udp_size; failing mode | def test_isc_server_stmt_edns_udp_size_failing(self):
test_string = [
'edns-udp-size yes;',
'edns-udp-size -3;',
]
result = optviewserver_stmt_edns_udp_size.runTests(test_string, failureTests=True)
self.assertTrue(result[0]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_isc_server_stmt_edns_udp_size_passing(self):\n test_string = [\n 'edns-udp-size 0;',\n 'edns-udp-size 1;',\n 'edns-udp-size 102;',\n 'edns-udp-size 255;',\n ]\n result = optviewserver_stmt_edns_udp_size.runTests(test_string, failureTests=Fal... | [
"0.79074216",
"0.64085585",
"0.587062",
"0.5830589",
"0.58152884",
"0.57875025",
"0.5759887",
"0.5730117",
"0.5629439",
"0.56094414",
"0.5598666",
"0.5575006",
"0.5564831",
"0.5560443",
"0.5555972",
"0.5522362",
"0.5521356",
"0.54879683",
"0.5479655",
"0.54627013",
"0.5443418... | 0.7922531 | 0 |
Clause Options/View/Server; Statement provideixfr; passing mode | def test_isc_optviewserver_stmt_provide_ixfr_passing(self):
test_string = [
'provide-ixfr yes;',
'provide-ixfr 1;',
'provide-ixfr 0;',
'provide-ixfr no;',
'provide-ixfr True;',
'provide-ixfr False;',
]
result = optviewserver... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_isc_server_stmt_request_ixfr_passing(self):\n test_string = [\n 'request-ixfr yes;',\n 'request-ixfr 1;',\n 'request-ixfr 0;',\n 'request-ixfr no;',\n 'request-ixfr True;',\n 'request-ixfr False;',\n ]\n result = optvie... | [
"0.54498583",
"0.5436921",
"0.53755015",
"0.5369825",
"0.53392714",
"0.52997357",
"0.52606136",
"0.5233001",
"0.5134705",
"0.5132359",
"0.50852036",
"0.50761706",
"0.50589323",
"0.5057924",
"0.504792",
"0.4983767",
"0.49656382",
"0.4941426",
"0.49382856",
"0.49334484",
"0.492... | 0.58370453 | 0 |
Clause Options/View/Server; Statement provideixfr; failing mode | def test_isc_optviewserver_stmt_provide_ixfr_failing(self):
test_string = [
'provide-ixfr Y'
]
result = optviewserver_stmt_provide_ixfr.runTests(test_string, failureTests=True)
self.assertTrue(result[0]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_isc_server_stmt_request_ixfr_failing(self):\n test_string = [\n 'request-ixfr Y;'\n ]\n result = optviewserver_stmt_request_ixfr.runTests(test_string, failureTests=True)\n self.assertTrue(result[0])",
"def test_isc_optviewserver_stmt_provide_ixfr_passing(self):\n ... | [
"0.6487286",
"0.6465603",
"0.62053233",
"0.5869645",
"0.5828845",
"0.5621983",
"0.54275465",
"0.53884834",
"0.53768206",
"0.53627336",
"0.53449595",
"0.5315953",
"0.5300032",
"0.52997005",
"0.52063614",
"0.5185329",
"0.50743437",
"0.5046744",
"0.50120586",
"0.49937165",
"0.49... | 0.67688143 | 0 |
Clause server; Statement requestixfr; failing mode | def test_isc_server_stmt_request_ixfr_failing(self):
test_string = [
'request-ixfr Y;'
]
result = optviewserver_stmt_request_ixfr.runTests(test_string, failureTests=True)
self.assertTrue(result[0]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_isc_server_stmt_request_ixfr_passing(self):\n test_string = [\n 'request-ixfr yes;',\n 'request-ixfr 1;',\n 'request-ixfr 0;',\n 'request-ixfr no;',\n 'request-ixfr True;',\n 'request-ixfr False;',\n ]\n result = optvie... | [
"0.6406493",
"0.63106465",
"0.61551946",
"0.59871066",
"0.57487696",
"0.56122226",
"0.5583032",
"0.55265594",
"0.5511699",
"0.5490959",
"0.5476108",
"0.54370296",
"0.5434275",
"0.541941",
"0.5394525",
"0.5388886",
"0.53367317",
"0.53346413",
"0.53344035",
"0.53339714",
"0.531... | 0.69276994 | 0 |
Clause Options/View/Server; Statement transferformat; passing mode | def test_isc_optviewserver_stmt_transfer_format_passing(self):
test_string = [
'transfer-format one-answer;',
'transfer-format many-answers;',
]
result = optviewserver_stmt_transfer_format.runTests(test_string, failureTests=False)
self.assertTrue(result[0])
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_isc_optviewserver_stmt_transfer_format_failing(self):\n test_string = [\n 'transfer-format no-answer;',\n 'transfer-format !one-answer;',\n 'transfer-format many-answer;',\n ]\n result = optviewserver_stmt_transfer_format.runTests(test_string, failureT... | [
"0.53250027",
"0.5203599",
"0.50582415",
"0.49072838",
"0.4773112",
"0.47538304",
"0.47135463",
"0.46922514",
"0.45904437",
"0.45375693",
"0.45135164",
"0.4501895",
"0.4498528",
"0.44851896",
"0.44687873",
"0.44519544",
"0.4437863",
"0.44301352",
"0.44135845",
"0.44132853",
"... | 0.60011727 | 0 |
Clause Options/View/Server; Statement transferformat; failing mode | def test_isc_optviewserver_stmt_transfer_format_failing(self):
test_string = [
'transfer-format no-answer;',
'transfer-format !one-answer;',
'transfer-format many-answer;',
]
result = optviewserver_stmt_transfer_format.runTests(test_string, failureTests=True)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_isc_optviewserver_stmt_transfer_format_passing(self):\n test_string = [\n 'transfer-format one-answer;',\n 'transfer-format many-answers;',\n ]\n result = optviewserver_stmt_transfer_format.runTests(test_string, failureTests=False)\n self.assertTrue(result... | [
"0.6499616",
"0.5140578",
"0.51246786",
"0.5114225",
"0.48977125",
"0.48599628",
"0.4842079",
"0.4807188",
"0.4795688",
"0.47092488",
"0.46784234",
"0.46414515",
"0.4617407",
"0.46124506",
"0.45845458",
"0.45773217",
"0.4547477",
"0.45312032",
"0.45205274",
"0.45021373",
"0.4... | 0.67722803 | 0 |
Clause optviewserver; Statement optviewserver_statements_series; passing | def test_isc_optviewserver_statements_series_passing(self):
assertParserResultDictTrue(
optviewserver_statements_series,
'provide-ixfr yes;' +
'request-ixfr yes;' +
'transfer-format one-answer;',
{'provide_ixfr': 'yes',
'request_ixfr': 'ye... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_isc_optviewserver_stmt_statements_series_failing(self):\n test_string = [\n 'statements_series \"YYYY\";',\n ]\n result = optviewserver_statements_series.runTests(test_string, failureTests=True)\n self.assertTrue(result[0])",
"def test_isc_clause_view_zone_passing(... | [
"0.6122452",
"0.5366731",
"0.5269786",
"0.52468735",
"0.519176",
"0.51175207",
"0.50921494",
"0.50271696",
"0.501648",
"0.49650267",
"0.49156126",
"0.48880568",
"0.48826605",
"0.4845489",
"0.4833126",
"0.48132652",
"0.4803848",
"0.48014912",
"0.47879675",
"0.47807518",
"0.478... | 0.679627 | 0 |
Clause optviewserver; Statement statements_series; failing | def test_isc_optviewserver_stmt_statements_series_failing(self):
test_string = [
'statements_series "YYYY";',
]
result = optviewserver_statements_series.runTests(test_string, failureTests=True)
self.assertTrue(result[0]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_isc_optviewserver_statements_series_passing(self):\n assertParserResultDictTrue(\n optviewserver_statements_series,\n 'provide-ixfr yes;' +\n 'request-ixfr yes;' +\n 'transfer-format one-answer;',\n {'provide_ixfr': 'yes',\n 'reques... | [
"0.6881051",
"0.5535295",
"0.52554256",
"0.50420815",
"0.499866",
"0.49667323",
"0.49193373",
"0.48272485",
"0.48237696",
"0.48200497",
"0.47984976",
"0.4763116",
"0.4759599",
"0.47587875",
"0.47584245",
"0.47531343",
"0.47507235",
"0.4746896",
"0.47406352",
"0.47406352",
"0.... | 0.7035219 | 0 |
Return a threadspecific storage dictionary. | def _dic(self, thread_id=None): # def _dic(_get_ident=thread.get_ident) make thread.get_ident a local var
if thread_id is None:
thread_id = thread.get_ident() # Identify the calling thread.
try:
return _ThDict._tss[thread_id]
except KeyError:
tss = _ThDict._ts... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getSharedDict(self):\n return self._sharedDict",
"def get_storage_model(self) -> Dict[str, Any]:\n return self.data.dict()",
"def get_stored_dict(self):\n return dict([(k, getattr(self, k)) for k in Context.STORED_KEYS])",
"def get_storage(self):\n return self.storage",
"def... | [
"0.6215964",
"0.61273575",
"0.6037959",
"0.6016725",
"0.5994203",
"0.5977398",
"0.5924003",
"0.58914196",
"0.58765364",
"0.58751744",
"0.57997715",
"0.57680607",
"0.568655",
"0.563845",
"0.56246895",
"0.5611149",
"0.55896187",
"0.5578572",
"0.5547232",
"0.55118096",
"0.548565... | 0.69267035 | 0 |
Clear the named lazyprop from this object | def clear_lazyprop(object, property_name):
assert isinstance(property_name, str)
if _LAZY_PROP_VALUES in object.__dict__:
if property_name in object.__dict__[_LAZY_PROP_VALUES]:
del object.__dict__[_LAZY_PROP_VALUES][property_name]
if _LAZY_PROP_SUBSCRIBERS in object.__dict__:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def clearProperty(*args):",
"def clearProperty(*args):",
"def clearProperty(*args):",
"def clearProperty(*args):",
"def _del(self) -> None:\n self.variables.pop(prop_name, None)",
"def _reset_derived_prop_(self):\n self._derived_properties[\"photosamplers\"] = None",
"def reset(self):\r\n... | [
"0.6905533",
"0.6905533",
"0.6905533",
"0.6905533",
"0.6871976",
"0.6779333",
"0.6716801",
"0.66273415",
"0.65594524",
"0.6543166",
"0.65126073",
"0.6447588",
"0.6352423",
"0.63402987",
"0.62901765",
"0.62901765",
"0.62901765",
"0.62901765",
"0.6161432",
"0.61306316",
"0.6094... | 0.77106565 | 0 |
Clears all lazy prop from an object. This means they will be reevaluated next time they are run | def clear_all_lazyprops(object):
if _LAZY_PROP_VALUES in object.__dict__:
del object.__dict__[_LAZY_PROP_VALUES]
if _LAZY_PROP_SUBSCRIBERS in object.__dict__:
for subscribers in object.__dict__[_LAZY_PROP_SUBSCRIBERS].values():
for fn in subscribers:
fn(object) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def clear_lazyprop(object, property_name):\n assert isinstance(property_name, str)\n\n if _LAZY_PROP_VALUES in object.__dict__:\n if property_name in object.__dict__[_LAZY_PROP_VALUES]:\n del object.__dict__[_LAZY_PROP_VALUES][property_name]\n\n if _LAZY_PROP_SUBSCRIBERS in object.__dict... | [
"0.7548748",
"0.7294389",
"0.7102218",
"0.70832473",
"0.70832473",
"0.70832473",
"0.70832473",
"0.7073602",
"0.70369637",
"0.70369637",
"0.70369637",
"0.70369637",
"0.6780632",
"0.67750883",
"0.6658477",
"0.66337144",
"0.6555479",
"0.64801943",
"0.6456167",
"0.6351214",
"0.63... | 0.8140209 | 0 |
Clear the lazyprop on the subscriber_object if the listen_to_object property is cleared | def clear_lazyprop_on_lazyprop_cleared(subscriber_object, subscriber_lazyprop,
listen_to_object, listen_to_lazyprop=None):
if listen_to_lazyprop is None:
listen_to_lazyprop = subscriber_lazyprop
assert isinstance(listen_to_lazyprop, str)
assert isinstance(subs... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def clear_all_lazyprops(object):\n if _LAZY_PROP_VALUES in object.__dict__:\n del object.__dict__[_LAZY_PROP_VALUES]\n\n if _LAZY_PROP_SUBSCRIBERS in object.__dict__:\n for subscribers in object.__dict__[_LAZY_PROP_SUBSCRIBERS].values():\n for fn in subscribers:\n fn(o... | [
"0.6362107",
"0.63212144",
"0.6137851",
"0.58720046",
"0.5845626",
"0.58111215",
"0.5734059",
"0.5656716",
"0.5642605",
"0.56112516",
"0.56112516",
"0.5497448",
"0.5417932",
"0.5414736",
"0.53566337",
"0.53334963",
"0.5315492",
"0.53083503",
"0.5284902",
"0.5284902",
"0.52849... | 0.85002965 | 0 |
Converts a sentence (string) into a list of words (strings). Extracts the GloVe representation of each word and averages its value into a single vector encoding the meaning of the sentence. | def sentence_to_avg(sentence, word_to_vec_map):
# Get a valid word contained in the word_to_vec_map.
any_word = list(word_to_vec_map.keys())[0]
### START CODE HERE ###
# Step 1: Split sentence into list of lower case words (≈ 1 line)
words = sentence.lower().split()
# Initialize the avera... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_sentence_mean_vec(sentence):\n sentence_vecs = numpy.array([])\n \n sent1 = nltk.word_tokenize(sentence)\n for w in sent1: \n w = w.strip(\"'?.,- \")\n if not w in stop_words and w.lower() in glove_model:\n word_vec = numpy.array([glove_model[w.lower()]])\n i... | [
"0.7131855",
"0.6924961",
"0.6804821",
"0.67380065",
"0.67274404",
"0.67215794",
"0.6702916",
"0.6634316",
"0.6608552",
"0.64645565",
"0.64388955",
"0.638915",
"0.6375292",
"0.62756556",
"0.62042046",
"0.61897296",
"0.618508",
"0.61756694",
"0.61643064",
"0.61166936",
"0.6116... | 0.715393 | 0 |
Converts an array of sentences (strings) into an array of indices corresponding to words in the sentences. The output shape should be such that it can be given to `Embedding()` (described in Figure 4). | def sentences_to_indices(X, word_to_index, max_len):
m = X.shape[0] # number of training examples
### START CODE HERE ###
# Initialize X_indices as a numpy matrix of zeros and the correct shape (≈ 1 line)
X_indices = np.zeros((m, max_len))
for i in ra... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sentences_to_indices(X, word_to_index, max_len):\n m = X.shape[0] # number of training examples\n X_indices = np.zeros((m, max_len)) # Initialize X_indices as a numpy matrix of zeros and the correct shape (≈ 1 line)\n for i in range(m): #... | [
"0.7674391",
"0.7353829",
"0.7153578",
"0.7031342",
"0.6893006",
"0.66123027",
"0.64662796",
"0.6405434",
"0.63036615",
"0.6300431",
"0.6209552",
"0.61663127",
"0.6027999",
"0.60131246",
"0.6002782",
"0.5977784",
"0.59518605",
"0.5949315",
"0.5922359",
"0.58846384",
"0.588151... | 0.7652687 | 1 |
Creates a Keras Embedding() layer and loads in pretrained GloVe 50dimensional vectors. | def pretrained_embedding_layer(word_to_vec_map, word_to_index):
vocab_size = len(word_to_index) + 1 # adding 1 to fit Keras embedding (requirement)
any_word = list(word_to_vec_map.keys())[0]
emb_dim = word_to_vec_map[any_word].shape[0] # define dimensionality of your GloVe word vectors ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pretrained_embedding_layer(word_to_vec_map, word_to_index):\n vocab_len = len(word_to_index) + 1 # adding 1 to fit Keras embedding (requirement)\n emb_dim = word_to_vec_map[\"cucumber\"].shape[0] # define dimensionality of your GloVe word vectors (= 50)\n emb_matrix = np.zeros((v... | [
"0.76154107",
"0.7154327",
"0.6839435",
"0.6778559",
"0.6625631",
"0.6484582",
"0.6457826",
"0.64485055",
"0.6439924",
"0.6389491",
"0.63035595",
"0.62795806",
"0.62589514",
"0.624841",
"0.62045693",
"0.62018406",
"0.6198423",
"0.6192771",
"0.6180604",
"0.61795884",
"0.61667"... | 0.76650494 | 0 |
Function creating the Emojifyv2 model's graph. | def Emojify_V2(input_shape, word_to_vec_map, word_to_index):
### START CODE HERE ###
# Define sentence_indices as the input of the graph.
# It should be of shape input_shape and dtype 'int32' (as it contains indices, which are integers).
sentence_indices = Input(shape = input_shape, dtype = 'int32'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def generateGraph(mids, chaptersField, labelsField):\n output = \"digraph G { \\n\"\n # On ne traite que les chapitres qui ont actives le graphe\n chapts = chapters.graphChapters()\n # le dico nodes contient une liste pour chaque chapitre. Chaque liste\n # contient tous les neuds (un par note) prese... | [
"0.5534107",
"0.5258285",
"0.515239",
"0.5108124",
"0.5100486",
"0.509315",
"0.49832487",
"0.49781877",
"0.4977967",
"0.49577668",
"0.49575582",
"0.49375737",
"0.49323317",
"0.49096295",
"0.48911446",
"0.4890061",
"0.48886243",
"0.48797578",
"0.48782152",
"0.4875987",
"0.4868... | 0.58188945 | 0 |
Attempt to import a module, with a fallback. Attempt to import ``name``. If it fails, return ``alternative``. When supporting multiple versions of Python or optional dependencies, it is useful to be able to try to import a module. | def try_import(name, alternative=None, error_callback=None):
module_segments = name.split('.')
last_error = None
remainder = []
# module_name will be what successfully imports. We cannot walk from the
# __import__ result because in import loops (A imports A.B, which imports
# C, which calls try... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def try_import(module, default=None):\n try:\n return importlib.import_module(module)\n except ImportError:\n return default",
"def try_import(import_str, default=None):\r\n try:\r\n return import_module(import_str)\r\n except ImportError:\r\n return default",
"def impor... | [
"0.70256954",
"0.69698614",
"0.66042155",
"0.65385836",
"0.6399915",
"0.6266867",
"0.626313",
"0.6226527",
"0.61270225",
"0.6109838",
"0.6023738",
"0.6023738",
"0.6023738",
"0.5986579",
"0.5986579",
"0.59618664",
"0.589924",
"0.5896467",
"0.5854116",
"0.58165705",
"0.57714254... | 0.7629667 | 0 |
Map ``function`` across the values of ``dictionary``. | def map_values(function, dictionary):
return {k: function(dictionary[k]) for k in dictionary} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def map_values(fun, a_dict):\n return dict((k, fun(v)) for (k, v) in a_dict.items())",
"def mutate_dict_in_place(func, mapping):\n for key, value in mapping.items():\n if isinstance(value, dict):\n mutate_dict_in_place(func, value)\n else:\n mapping[key] = func(value)",
... | [
"0.81647795",
"0.73186177",
"0.67919385",
"0.67103237",
"0.66901916",
"0.65380114",
"0.63903636",
"0.63513243",
"0.63053024",
"0.6285849",
"0.6283094",
"0.626183",
"0.62040246",
"0.6043741",
"0.6023191",
"0.60203594",
"0.60124683",
"0.6009012",
"0.59802103",
"0.5977911",
"0.5... | 0.8729859 | 0 |
Filter ``dictionary`` by its values using ``function``. | def filter_values(function, dictionary):
return {k: v for k, v in dictionary.items() if function(v)} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def filter_dict(dictionary, pred):\n return dict((k, v) for k, v in dictionary.items() if pred(k, v))",
"def filter_keys(func, a_dict):\n return dict((k, v) for (k, v) in a_dict.items() if func(k))",
"def filter(self, func):\n self._sets.filter(key=func)",
"def filter_dict(fdict, mask):\n\n i... | [
"0.70143163",
"0.69534475",
"0.6837467",
"0.6674849",
"0.64855725",
"0.64559966",
"0.6397897",
"0.6368482",
"0.63502276",
"0.623713",
"0.6150504",
"0.61269593",
"0.61043084",
"0.60623217",
"0.6016967",
"0.59909564",
"0.5987634",
"0.596273",
"0.5946462",
"0.59055525",
"0.58641... | 0.86716884 | 0 |
Return a list ``a`` without the elements of ``b``. If a particular value is in ``a`` twice and ``b`` once then the returned list then that value will appear once in the returned list. | def list_subtract(a, b):
a_only = list(a)
for x in b:
if x in a_only:
a_only.remove(x)
return a_only | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def difference(a, b):\r\n return list(set(b).difference(set(a)))",
"def difference(a, b):\n return list(filterfalse(lambda x: x in b, a))",
"def sublist(a, b):\n r = a[:]\n for i in b:\n r.remove(i)\n return r",
"def difference(a, b):\r\n c = [i for i in a + b if i not in a or i not ... | [
"0.7454335",
"0.7405594",
"0.7392524",
"0.7338166",
"0.71582747",
"0.7101876",
"0.7096621",
"0.69358665",
"0.68041253",
"0.67892265",
"0.67726505",
"0.6708057",
"0.6708057",
"0.6624537",
"0.6611756",
"0.65195936",
"0.6506374",
"0.6492541",
"0.6486167",
"0.6474487",
"0.646777"... | 0.76899225 | 0 |
Reading a environment variable as text. | def env_var_line(key: str) -> str:
return str(os.environ.get(key) or "").strip() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_env(key: str) -> str:\n value = os.getenv(key)\n assert isinstance(value, str), (\n f\"the {key} environment variable must be set and a string, \" f\"{value=}\"\n )\n return value",
"def test_get_environment_string(self):\n pass",
"def getenv_string(settin... | [
"0.64903164",
"0.61682165",
"0.6142988",
"0.60816246",
"0.6054548",
"0.60263807",
"0.59471285",
"0.59415185",
"0.5887559",
"0.58568513",
"0.5842627",
"0.5826633",
"0.5815658",
"0.5800363",
"0.5800218",
"0.57895327",
"0.5763488",
"0.57547617",
"0.5748358",
"0.57209665",
"0.566... | 0.67881423 | 0 |
Reading a environment variable as int. | def env_var_int(key: str) -> int:
try:
return int(env_var_line(key))
except (ValueError, TypeError):
return 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eval_env_as_integer(varname, standard_value) -> int:\n return int(os.getenv(varname, standard_value))",
"def get_envint(key, *default):\n return get_env(key, *default, coerce=_int)",
"def read_int():\n return int(sys.stdin.readline())",
"def read_config_int(config, section, item):\n value... | [
"0.8005265",
"0.7366795",
"0.6973604",
"0.66420656",
"0.64328814",
"0.6258224",
"0.61605865",
"0.6140184",
"0.60856193",
"0.60836726",
"0.6055936",
"0.59444773",
"0.5934205",
"0.58919984",
"0.57885367",
"0.5759262",
"0.5757238",
"0.5685826",
"0.5665112",
"0.5640167",
"0.56313... | 0.7908468 | 1 |
Reading a environment variable as float. | def env_var_float(key: str) -> float:
try:
return float(env_var_line(key))
except (ValueError, TypeError):
return 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eval_env_as_float(varname, standard_value) -> float:\n return float(os.getenv(varname, standard_value))",
"def get_envfloat(key, *default):\n return get_env(key, *default, coerce=_float)",
"def getFloat(self, key):\n self._check(key)\n value, flag = self.__config.value(key).toDouble()\n... | [
"0.8250072",
"0.7407218",
"0.65869987",
"0.64011014",
"0.63798887",
"0.6249607",
"0.62252533",
"0.6190475",
"0.6136223",
"0.61103517",
"0.59694827",
"0.5918007",
"0.5894661",
"0.58787096",
"0.5845959",
"0.5840988",
"0.58388215",
"0.58197176",
"0.5793032",
"0.5783338",
"0.5772... | 0.80970025 | 1 |
Reading a environment variable as list, source line should be divided by commas. | def env_var_list(key: str) -> list:
return list(
filter(
None, map(str.strip, env_var_line(key).split(","))
)
) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def read_list(name, default=NO_ARGUMENT, separator=\",\"):\n value = os.environ.get(name)\n if value is None:\n if default is NO_ARGUMENT:\n return []\n else:\n return default\n return [v.strip() for v in value.split(separator) if v.strip()]",
"def get_envlist(key, *d... | [
"0.71439314",
"0.67040265",
"0.61332095",
"0.60854524",
"0.60168445",
"0.5877769",
"0.58456564",
"0.57908124",
"0.5651809",
"0.5635019",
"0.5613625",
"0.56000316",
"0.554496",
"0.5539179",
"0.5369789",
"0.53643876",
"0.53479964",
"0.5345841",
"0.5324846",
"0.52787125",
"0.527... | 0.73379016 | 0 |
returns the Planck function for radiation from a blackbody at temperature T (K) at wavelength(s) wave, given in Angstrom Returns radiance in cgs units. | def blackbody( wave, T, waveunit='Angstrom' ):
if waveunit=='Angstrom':
# convert wavelength from angstroms to cm
wave = wave / 1e10 * 100.
elif waveunit=='nm':
# convert wavelength from angstroms to cm
wave = wave / 1e9 * 100.
return( ((2 * h * c* c)/wave**5 ) / (exp(h*... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Planck(T, wav):\n\twav_cm=wav*1.e-7 #convert wavelengths from nm to cm.\n\tc=2.99792e10 #speed of light, in cm/s\n\th=6.62607e-27#Planck constant, in erg*s\n\tkb=1.38065e-16#Boltzmann constant, in erg/K\n\t\n\timport numpy as np\n\tresult_cm=(2.*h*c**2./wav_cm**5.)*1./(np.exp(h*c/(wav_cm*kb*T))-1) #ergs/cm^3/s... | [
"0.7115234",
"0.6639137",
"0.65268266",
"0.61489564",
"0.60964906",
"0.60357994",
"0.5996236",
"0.5951445",
"0.59121585",
"0.5871175",
"0.570669",
"0.56897724",
"0.5669057",
"0.5641666",
"0.5613359",
"0.55661654",
"0.5559787",
"0.5544136",
"0.5537837",
"0.54915255",
"0.548968... | 0.6880025 | 1 |
Testing that consecutive slices are forbidden. | def test_forbidden_consecutive_slices(
assert_errors,
parse_ast_tree,
expression,
default_options,
):
tree = parse_ast_tree(usage_template.format(expression))
visitor = SubscriptVisitor(default_options, tree=tree)
visitor.run()
assert_errors(visitor, [ConsecutiveSlicesViolation]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_forbidden_multiple_consecutive_slices(\n assert_errors,\n parse_ast_tree,\n expression,\n default_options,\n):\n tree = parse_ast_tree(usage_template.format(expression))\n\n visitor = SubscriptVisitor(default_options, tree=tree)\n visitor.run()\n\n assert_errors(visitor, [\n ... | [
"0.6979152",
"0.6303644",
"0.62793154",
"0.6089854",
"0.59647316",
"0.5812619",
"0.5812093",
"0.5779929",
"0.57402104",
"0.5720322",
"0.5710838",
"0.56718296",
"0.5631256",
"0.5608668",
"0.5585874",
"0.5575349",
"0.5570698",
"0.5568004",
"0.5545934",
"0.553743",
"0.5519926",
... | 0.7050572 | 0 |
Testing that consecutive slices are forbidden. | def test_forbidden_multiple_consecutive_slices(
assert_errors,
parse_ast_tree,
expression,
default_options,
):
tree = parse_ast_tree(usage_template.format(expression))
visitor = SubscriptVisitor(default_options, tree=tree)
visitor.run()
assert_errors(visitor, [
ConsecutiveSlice... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_forbidden_consecutive_slices(\n assert_errors,\n parse_ast_tree,\n expression,\n default_options,\n):\n tree = parse_ast_tree(usage_template.format(expression))\n\n visitor = SubscriptVisitor(default_options, tree=tree)\n visitor.run()\n\n assert_errors(visitor, [ConsecutiveSlicesV... | [
"0.705046",
"0.630489",
"0.6279199",
"0.6091267",
"0.59660774",
"0.58130056",
"0.5812792",
"0.57814914",
"0.57406366",
"0.5720761",
"0.5710128",
"0.5671244",
"0.563131",
"0.56088775",
"0.5586154",
"0.5573127",
"0.557137",
"0.5568639",
"0.554791",
"0.5537434",
"0.5520229",
"... | 0.69790363 | 1 |
finds the maximum product of four adjacent numbers in a matrix in the same direction | def find_max_product(mtx):
max_prod = 0
for row_num in range(20):
vert = 0
diag = 0
anti_diag = 0
horiz = horiz_max(mtx[row_num])
if row_num < len(mtx) - 3:
vert = vert_max(mtx[row_num], mtx[row_num + 1],
mtx[row_num + 2], mtx[row_n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def compute_largest_column_product(grid):\n max_product = 0\n for column in range(len(grid)):\n for row in range(len(grid) - 3):\n current_product = 1\n for j in range(4):\n current_product *= grid[row + j][column]\n if current_product > max_product:\n ... | [
"0.7602335",
"0.7415646",
"0.7369275",
"0.7299083",
"0.72303224",
"0.70609385",
"0.700835",
"0.69688153",
"0.68755877",
"0.6805713",
"0.67672414",
"0.66905874",
"0.663058",
"0.66105884",
"0.6555576",
"0.65416676",
"0.6468184",
"0.64372873",
"0.6433118",
"0.6330626",
"0.632694... | 0.7494554 | 1 |
List out slot names based on the names of parameters of func | def _slots_from_params(func):
funcsig = signature(func)
slots = list(funcsig.parameters)
slots.remove('self')
return slots | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_slot_names(self, *args, **kwargs):\n return self._optimizer.get_slot_names(*args, **kwargs)",
"def function_name(parameters):",
"def parameter_names(self) -> List[str]:",
"def parameterNames(self, p_int): # real signature unknown; restored from __doc__\n return []",
"def _func_lis... | [
"0.7401886",
"0.6727158",
"0.63846385",
"0.6307123",
"0.6185898",
"0.6185898",
"0.61344635",
"0.6027699",
"0.6006341",
"0.5964612",
"0.59010446",
"0.5862502",
"0.57894915",
"0.5722084",
"0.5717884",
"0.5717884",
"0.5704354",
"0.5668376",
"0.566833",
"0.5629399",
"0.5614547",
... | 0.71931607 | 1 |
Open or create a wheel file. In write and exclusivewrite modes, if `file_or_path` is not specified, or the specified path is a directory, the wheelfile will be created in the current working directory, with filename generated using the values given via `distname`, `version`, `build_tag`, `language_tag`, `abi_tag`, and ... | def __init__(
self,
file_or_path: Union[str, Path, BinaryIO] = './',
mode: str = 'r',
*,
distname: Optional[str] = None,
version: Optional[Union[str, Version]] = None,
build_tag: Optional[Union[int, str]] = None,
language_tag: Optional[str] = None,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def build_wheel( # noqa:C901\n req=None, # type: Optional[TInstallRequirement]\n reqset=None, # type: Optional[Union[TReqSet, Iterable[TInstallRequirement]]]\n output_dir=None, # type: Optional[str]\n preparer=None, # type: Optional[TPreparer]\n wheel_cache=None, # type: Optional[TWheelCache]\... | [
"0.5617606",
"0.55081505",
"0.5217721",
"0.5208986",
"0.5185103",
"0.5107417",
"0.50721467",
"0.5066343",
"0.4974916",
"0.49145496",
"0.49080288",
"0.4870449",
"0.48542884",
"0.4836735",
"0.4834694",
"0.4825824",
"0.48071554",
"0.47798565",
"0.47733852",
"0.47702336",
"0.4765... | 0.6301335 | 0 |
Return a filename from file obj or a path. If given file, the asumption is that the filename is within the value of its `name` attribute. If given a `Path`, assumes it is a path to an actual file, not a directory. If given an unnamed object, this returns None. | def _get_filename(
cls, file_or_path: Union[BinaryIO, Path]
) -> Optional[str]:
if cls._is_unnamed_or_directory(file_or_path):
return None
# TODO: test this
# If a file object given, ensure its a filename, not a path
if isinstance(file_or_path, Path):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getabsfile(object, _filename=None):\r\n if _filename is None:\r\n _filename = getsourcefile(object) or getfile(object)\r\n return os.path.normcase(os.path.abspath(_filename))",
"def extract_filename_from_object_info(object_info: dict) -> Optional[str]:\n if \"name\" in object_info and object_... | [
"0.6543205",
"0.65163434",
"0.64702183",
"0.6166343",
"0.6082145",
"0.60737973",
"0.60737973",
"0.6067047",
"0.6064387",
"0.6030024",
"0.6028483",
"0.60068804",
"0.5997551",
"0.59268546",
"0.5924116",
"0.59208626",
"0.5917195",
"0.59133685",
"0.58956224",
"0.58722764",
"0.586... | 0.7912477 | 0 |
Write a file to the .data directory under a specified section. This method is a handy shortcut for writing into `.data/`, such that you dont have to generate the path yourself. Updates the wheel record, if the record is being kept. | def write_data(self, filename: Union[str, Path],
section: str, arcname: Optional[str] = None,
*, recursive: bool = True, resolve: bool = True) -> None:
self._check_section(section)
if isinstance(filename, str):
filename = Path(filename)
if arcna... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def writeEntryToSection(context, section, key, value, callback=None):\n projectDir = context.projectDir\n if section not in GenericMetadata.SECTIONS:\n raise Exception( \"%s is an unknown section\" % (section,) )\n lockFilepath = os.path.join(projectDir, GenericMetadata.METADATA_LOC... | [
"0.63379085",
"0.62890714",
"0.61172116",
"0.6040453",
"0.60129803",
"0.600598",
"0.5906952",
"0.59036005",
"0.5861724",
"0.58348304",
"0.58348304",
"0.58348304",
"0.58348304",
"0.58348304",
"0.58348304",
"0.579581",
"0.5784512",
"0.57745516",
"0.57627445",
"0.5730551",
"0.57... | 0.70789695 | 0 |
Write given data to the .data directory under a specified section. This method is a handy shortcut for writing into `.data/`, such that you dont have to generate the path yourself. Updates the wheel record, if the record is being kept. | def writestr_data(self, section: str,
zinfo_or_arcname: Union[ZipInfo, str],
data: Union[bytes, str]) -> None:
self._check_section(section)
arcname = (
zinfo_or_arcname.filename
if isinstance(zinfo_or_arcname, ZipInfo)
else... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def write_data(self, filename: Union[str, Path],\n section: str, arcname: Optional[str] = None,\n *, recursive: bool = True, resolve: bool = True) -> None:\n self._check_section(section)\n\n if isinstance(filename, str):\n filename = Path(filename)\n ... | [
"0.67369294",
"0.62428963",
"0.6207554",
"0.61807334",
"0.61209357",
"0.6105475",
"0.60803586",
"0.60592484",
"0.6040712",
"0.6040712",
"0.6040712",
"0.6040712",
"0.6040712",
"0.6040712",
"0.59455603",
"0.59368366",
"0.5905411",
"0.58971053",
"0.588145",
"0.58433807",
"0.5820... | 0.6391121 | 1 |
Write a file to `.distinfo` directory in the wheel. This is a shorthand for `write(...)` with `arcname` prefixed with the `.distinfo` path. It also ensures that the metadata files critical to the wheel correctnes (i.e. the ones written into archive on `close()`) aren't being prewritten. | def write_distinfo(self, filename: Union[str, Path],
arcname: Optional[str] = None,
*, recursive: bool = True, resolve: bool = True) -> None:
if resolve and arcname is None:
arcname = resolved(filename)
elif arcname is None:
arcname =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _create_releaseinfo_file(projname, relinfo_str):\n dirs = projname.split('.')\n os.chdir(os.path.join(*dirs))\n print 'updating releaseinfo.py for %s' % projname\n with open('releaseinfo.py', 'w') as f:\n f.write(relinfo_str)",
"def create_meta(prefix, dist, info_dir, extra_info):\n # r... | [
"0.62034583",
"0.58835083",
"0.5526442",
"0.5514737",
"0.55070674",
"0.549292",
"0.5466621",
"0.5440966",
"0.53879744",
"0.538644",
"0.5340823",
"0.5244212",
"0.5236637",
"0.52094686",
"0.52030265",
"0.51610017",
"0.5137117",
"0.5121621",
"0.50919354",
"0.50608385",
"0.503672... | 0.7784242 | 0 |
Get an absolute path relative depth | def __getLibAbsPath(currentPath, depth):
libPath = currentPath
while depth:
libPath = os.path.split(libPath)[0]
depth -= 1
return libPath | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def path_depth(path):\n parts = os.path.dirname(path).split('/')\n parts = [part for part in parts if part != '']\n length = len(parts)\n return length",
"def dir_by_levels(path, levels):\n return op.abspath(op.join(path, *(['..'] * levels)))",
"def dirname_recurse(filepath: str, depth: int) -> ... | [
"0.64539737",
"0.6346503",
"0.62048346",
"0.6162363",
"0.6061876",
"0.6044649",
"0.5989426",
"0.5930455",
"0.5924277",
"0.5897604",
"0.58891785",
"0.58871776",
"0.58747077",
"0.58283246",
"0.5806055",
"0.5762614",
"0.5754181",
"0.5748785",
"0.5744405",
"0.57313746",
"0.570485... | 0.6351144 | 1 |
init Lib Path. append lib path into python path. | def initLibPath():
libHash = {
'Framework': 1,
'UserControlleLib': 1,
'CaseLib': 1
}
binPath = os.path.split(os.path.realpath(__file__))[0]
for key in libHash:
sys.path.append(os.path.join(__getLibAbsPath(binPath, libHash[key]), key)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setSysPath():\n c = os.path.abspath(os.path.dirname(__file__))\n\n add = [\n ['lib'],\n ]\n\n for item in add:\n p = os.path.join(c, *item)\n if not p in sys.path:\n sys.path[1:1] = [p]\n\n remove = ['django', 'simplejson']\n\n # Remove unwanted paths\n for ... | [
"0.69243926",
"0.68290377",
"0.68250597",
"0.68074346",
"0.6722081",
"0.66797453",
"0.6677228",
"0.6616815",
"0.6494127",
"0.6485778",
"0.6431461",
"0.63157105",
"0.6290918",
"0.6264477",
"0.61724114",
"0.6129387",
"0.6102272",
"0.6092327",
"0.6057182",
"0.60421085",
"0.60419... | 0.86582345 | 0 |
Splitting multipart copy upload. Splits copy upload parts into several ones to fit maximum upload part size limit. Also takes into the account minimum upload part size. | def __init__(self, mpu, min_part_size=5 * MB, max_part_size=5 * GB):
super(SplittingMultipartCopyUpload, self).__init__(mpu)
self._mpu = mpu
self._min_part_size = min_part_size
self._max_part_size = max_part_size | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def upload_all_parts(self):\n if not self.upload_id:\n raise RuntimeError(\"Attempting to use a multipart upload that has not been initiated.\")\n\n if self.file.name != \"<stdin>\":\n size_left = file_size = os.stat(self.file.name)[ST_SIZE]\n nr_parts = file_... | [
"0.7412221",
"0.66999257",
"0.6614869",
"0.63811994",
"0.6228369",
"0.6207673",
"0.6183003",
"0.6180115",
"0.61617076",
"0.6054617",
"0.60039365",
"0.59923476",
"0.59339154",
"0.59104306",
"0.5721449",
"0.55976",
"0.5578122",
"0.55743504",
"0.55683196",
"0.55657595",
"0.55336... | 0.69681275 | 1 |
Out of bounds splitting multipart copy upload. Splits out of bounds copy upload parts into several ones to fit memorysafe part size limit. Also takes into the account minimum upload part size. | def __init__(self, mpu, original_size, min_part_size, max_part_size):
super(OutOfBoundsSplittingMultipartCopyUpload, self).__init__(mpu, min_part_size, max_part_size)
self._original_size = original_size | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def upload_all_parts(self):\n if not self.upload_id:\n raise RuntimeError(\"Attempting to use a multipart upload that has not been initiated.\")\n\n if self.file.name != \"<stdin>\":\n size_left = file_size = os.stat(self.file.name)[ST_SIZE]\n nr_parts = file_... | [
"0.6936495",
"0.6747881",
"0.6268513",
"0.6234417",
"0.614132",
"0.6026663",
"0.600616",
"0.5888342",
"0.5825971",
"0.5810179",
"0.5752304",
"0.565045",
"0.56290716",
"0.5486159",
"0.54644954",
"0.5408568",
"0.54034483",
"0.5385147",
"0.5360366",
"0.53489244",
"0.5302736",
... | 0.6998303 | 0 |
Append optimized composite multipart copy upload. Uses original object as a pre uploaded composite part in case of append writes. In order to do so it adjusts the first of the already uploaded chunks. Uploads copy parts as regular parts using content of the original file. | def __init__(self, mpu, original_size, chunk_size, download):
super(AppendOptimizedCompositeMultipartCopyUpload, self).__init__(mpu)
self._mpu = mpu
self._original_size = original_size
self._chunk_size = chunk_size
self._download = download
self._copy_parts = []
s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def _multipart_upload_from_buffer(self):\n # check to see if bucket needs to be created\n if self._create_bucket:\n # check whether the bucket exists\n bucket_list = await self._get_bucket_list()\n if not self._bucket in bucket_list:\n await self.... | [
"0.61642283",
"0.60305166",
"0.58840835",
"0.5873734",
"0.5802467",
"0.55642086",
"0.55241823",
"0.548686",
"0.5390297",
"0.536524",
"0.5341583",
"0.53328073",
"0.5317409",
"0.5303169",
"0.52485627",
"0.5222615",
"0.51945925",
"0.5164831",
"0.51564217",
"0.50854754",
"0.50838... | 0.6833404 | 0 |
Convert an input text file to an output Morse code file. Notes This function assumes the existence of a MORSE_CODE dictionary, containing a mapping between English letters and their corresponding Morse code. | def english_to_morse(
input_file: str = "lorem.txt",
output_file: str = "lorem_morse.txt"
): | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def English2Morse ():\r\n \r\n morse_word = ''\r\n morse_list = []\r\n why = ''\r\n excp2 = True\r\n excp3 = True\r\n global dictionary\r\n global Morse_dict\r\n \r\n ## This part is building the Table, which is an dictionary,\r\n # that shows for each letter (the key), the equ... | [
"0.66860163",
"0.6397452",
"0.6393827",
"0.63401276",
"0.62655395",
"0.62346786",
"0.61487025",
"0.60022104",
"0.5958334",
"0.59045285",
"0.5865525",
"0.5748146",
"0.56561875",
"0.56045705",
"0.54538393",
"0.5409502",
"0.53338265",
"0.5236571",
"0.523552",
"0.52099687",
"0.51... | 0.8085192 | 0 |
Determine the appropriate format string for the pie chart percentage label | def pie_pct_format(value):
return '' if value < 7 else '{}'.format(value) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_text(self):\n # If percentage is zero, round it\n if self.percentage == 0:\n self.percentage = str(\"< 0.01\")\n text = str(self.percentage) + \"% in \" + self.name\n return text",
"def represent_percent(self, dlpkgs, numpkgs, length):\n if dlpkgs == 0:\n ... | [
"0.71216166",
"0.69674236",
"0.69005656",
"0.67435724",
"0.6666876",
"0.66204953",
"0.6384511",
"0.6376195",
"0.6370158",
"0.6365492",
"0.63114715",
"0.6275148",
"0.62578493",
"0.62169856",
"0.616937",
"0.61532456",
"0.6144259",
"0.6139536",
"0.6124622",
"0.6106336",
"0.60477... | 0.78149563 | 0 |
Create a valid authentication header either from username/password or a token if any were provided; return an empty dict otherwise | def create_auth_header(username=None, password=None, token=None, tenant=None):
headers = {}
if username and password:
credentials = b64encode(
'{0}:{1}'.format(username, password).encode('utf-8')
).decode('ascii')
headers = {
'Authorization':
'Basic ' ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _auth_headers(self):\n if self.token_str:\n return {'Authorization': 'Bearer {}'.format(self.token_str)}\n else:\n return {}",
"def make_auth_headers(email: str, password: str) -> Dict:\n auth_string = f\"{email}:{password}\"\n auth_binary = base64.b64encode(auth_str... | [
"0.72454095",
"0.7221148",
"0.71215636",
"0.7103372",
"0.7097047",
"0.6983618",
"0.6947449",
"0.69248074",
"0.69133794",
"0.687671",
"0.6841492",
"0.683843",
"0.6820057",
"0.6804868",
"0.67723274",
"0.6760751",
"0.667692",
"0.66578674",
"0.6633724",
"0.6623119",
"0.6621205",
... | 0.77106714 | 0 |
Sets the setting of this Software. | def setting(self, setting):
self._setting = setting | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_setting(self, name, value):\n w = self.choices['which']\n if w == 'global_default':\n return self.settings.set_global_default(name, value)\n elif w == 'project_default':\n return self.settings.set_project_default(name, value)\n elif w == 'global_variant':\n... | [
"0.6803539",
"0.6797325",
"0.6656029",
"0.65470356",
"0.6305723",
"0.62939876",
"0.6245357",
"0.6234438",
"0.6230997",
"0.62296474",
"0.6160666",
"0.61122584",
"0.60903925",
"0.60892445",
"0.6085018",
"0.6071015",
"0.60507715",
"0.6010427",
"0.5959746",
"0.5945527",
"0.588507... | 0.7087973 | 0 |
y_hat is the output tensor from the network y is the label tensor (no embedding) returns the mask to use for negating the padding | def label_mask(y, y_hat):
mask = torch.ones(len(y), np.shape(y)[1])
for i in range(len(y[0])):
try:
y_hat_index = np.where(y_hat[:,i]==1)[0][0]
y_index = np.where(y[:,i]==1)[0][0]
index = max(y_hat_index, y_index)
mask[index:, i] = 0
except:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def calculate_loss(self, y, y_hat):\r\n return tf.reduce_mean(tf.nn.sparse_softmax_cross_entropy_with_logits(labels=y, logits=y_hat))",
"def softmax_cross_entropy_loss(self, y, y_hat):\n batch_size = y.shape[0]\n return -(y - y_hat) / batch_size",
"def backward(cls, y, y_hat):\n sum... | [
"0.62096536",
"0.6175731",
"0.61632735",
"0.61611694",
"0.5887584",
"0.588355",
"0.5860502",
"0.5847948",
"0.5832571",
"0.5807852",
"0.5803117",
"0.5799957",
"0.5775149",
"0.5761061",
"0.57461977",
"0.57444036",
"0.57373565",
"0.57236624",
"0.57219243",
"0.5694064",
"0.568187... | 0.7869807 | 0 |
x is the training data tensor (no embedding) returns the mask to use for negating the padding effect on the attention add this mask before taking the softmax! | def attention_mask(x):
mask = torch.zeros(len(x), len(x[0]))
for i in range(len(x)):
try:
index = np.where(x[i]==1)[0][0]
mask[i][index:] = -np.inf
except:
pass
return mask | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def attention_mask(model, x):\n config = model.config\n input_mask = model.inputs[\"input_mask\"]\n final_mask = model.builder.customOp(opName=\"AttentionMask\",\n opVersion=1,\n domain=\"ai.graphcore\",\n ... | [
"0.7421151",
"0.7217545",
"0.7167106",
"0.7079211",
"0.6706677",
"0.6682437",
"0.66159326",
"0.6599417",
"0.65964437",
"0.65885895",
"0.6551673",
"0.6500141",
"0.6487599",
"0.6473447",
"0.6453691",
"0.64491236",
"0.640918",
"0.6409067",
"0.6409067",
"0.63933337",
"0.63802826"... | 0.7250042 | 1 |
Remove securityzone if exist and is not in use | def sec_zone_absent(module, session, endpoint, my_sz):
if not my_sz:
return True, False, {'label': '',
'id': '',
'msg': 'security-zone does not exist'}
if not module.check_mode:
aos_delete(session, endpoint, my_sz['id'])
return ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove(self):\n\n self.call(method='removeZoneRecord', args=[self.domainname, self.subdomain, self.record_id])",
"def SecurityZone(self) -> _n_6_t_7:",
"def SecurityZone(self) -> _n_6_t_7:",
"def sec_zone(module):\n margs = module.params\n\n endpoint = 'blueprints/{}/security-zones'.format(m... | [
"0.5807829",
"0.5751043",
"0.5751043",
"0.5531846",
"0.55279076",
"0.5481809",
"0.5456523",
"0.54271185",
"0.53969085",
"0.5374144",
"0.53658533",
"0.53476596",
"0.5314556",
"0.529601",
"0.5249035",
"0.52129596",
"0.5201034",
"0.51905715",
"0.5188096",
"0.51529765",
"0.513517... | 0.70903176 | 0 |
Create new securityzone or modify existing pool | def sec_zone_present(module, session, endpoint, my_sz, vni_id, vlan_id):
margs = module.params
if not my_sz:
if 'name' not in margs.keys():
return False, False, {"msg": "name required to create a new "
"security-zone"}
new_sz = {"sz_type": ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sec_zone(module):\n margs = module.params\n\n endpoint = 'blueprints/{}/security-zones'.format(margs['blueprint_id'])\n\n name = margs.get('name', None)\n uuid = margs.get('id', None)\n vni_id = margs.get('vni_id', None)\n vlan_id = margs.get('vlan_id', None)\n\n if vni_id:\n try:\n... | [
"0.607716",
"0.5653735",
"0.56347424",
"0.56218237",
"0.56128204",
"0.5576644",
"0.5575975",
"0.5575975",
"0.55006844",
"0.54984695",
"0.54873765",
"0.546849",
"0.54667926",
"0.5455745",
"0.5440565",
"0.54360205",
"0.5427527",
"0.54229987",
"0.54038274",
"0.53950787",
"0.5361... | 0.60932606 | 0 |
Main function to create, change or delete security zones within an AOS blueprint | def sec_zone(module):
margs = module.params
endpoint = 'blueprints/{}/security-zones'.format(margs['blueprint_id'])
name = margs.get('name', None)
uuid = margs.get('id', None)
vni_id = margs.get('vni_id', None)
vlan_id = margs.get('vlan_id', None)
if vni_id:
try:
vni_i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sec_zone_present(module, session, endpoint, my_sz, vni_id, vlan_id):\n margs = module.params\n\n if not my_sz:\n\n if 'name' not in margs.keys():\n return False, False, {\"msg\": \"name required to create a new \"\n \"security-zone\"}\n\n n... | [
"0.5668733",
"0.56471294",
"0.56471294",
"0.5595357",
"0.5510343",
"0.54987",
"0.5382354",
"0.52583814",
"0.5234275",
"0.52052534",
"0.51916015",
"0.51848376",
"0.51822424",
"0.5158139",
"0.51509154",
"0.5115389",
"0.51124156",
"0.5095959",
"0.50951517",
"0.5077985",
"0.50712... | 0.68908155 | 0 |
calculate the loop number on each core | def _cal_core(tik_instance, total_core_loop_num, num_core, core_number):
core_loop = tik_instance.Scalar("uint64")
sum_core = tik_instance.Scalar("uint64")
with tik_instance.if_scope(num_core < total_core_loop_num % MAX_CORE_NUM):
core_loop.set_as((total_core_loop_num + core_number - 1) //
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_total_n_cpu(self) -> int:",
"def _cal_core_loop_python(num_data_one_loop, core_loop, ub_ori):\n align_loop = ub_ori // num_data_one_loop\n remainder = core_loop % align_loop\n\n if align_loop > core_loop:\n align_loop = core_loop\n remainder = 0\n\n return align_loop, remainder"... | [
"0.68350554",
"0.6819639",
"0.6797855",
"0.67562383",
"0.67468655",
"0.6727995",
"0.6689224",
"0.65811265",
"0.6566272",
"0.65277976",
"0.6521367",
"0.6520759",
"0.6491461",
"0.6433719",
"0.6419304",
"0.64132607",
"0.6391651",
"0.63396746",
"0.6273546",
"0.6247827",
"0.613502... | 0.7611465 | 0 |
calculate the number of loops and remainder on each core and return python variable | def _cal_core_loop_python(num_data_one_loop, core_loop, ub_ori):
align_loop = ub_ori // num_data_one_loop
remainder = core_loop % align_loop
if align_loop > core_loop:
align_loop = core_loop
remainder = 0
return align_loop, remainder | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _cal_core(tik_instance, total_core_loop_num, num_core, core_number):\n core_loop = tik_instance.Scalar(\"uint64\")\n sum_core = tik_instance.Scalar(\"uint64\")\n\n with tik_instance.if_scope(num_core < total_core_loop_num % MAX_CORE_NUM):\n core_loop.set_as((total_core_loop_num + core_number - ... | [
"0.72697914",
"0.6879744",
"0.6682081",
"0.65112865",
"0.64037377",
"0.63325685",
"0.6216641",
"0.61193895",
"0.61",
"0.60939896",
"0.60520416",
"0.60310453",
"0.60280025",
"0.59839344",
"0.59617555",
"0.58904606",
"0.58621055",
"0.58573747",
"0.5834444",
"0.5831784",
"0.5811... | 0.71695155 | 1 |
vector_dup zeros when dup_number is python variable | def vector_dup_zero(self, tik_instance, ub_trans, dup_number, offset):
scalar_zero = tik_instance.Scalar(dtype="float16", init_value=0.0)
repeat_number = dup_number // MAX_MASK
tail = dup_number % MAX_MASK
with tik_instance.for_range(0, repeat_number // MAX_REPEATS) as \
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vector_dump_set(ibuilder, scalar, block_num, buf):\n vec_dtype = buf.dtype\n if vec_dtype in [\"float32\", \"int32\"]:\n vec_compute_nums = VEC_NUMS_HALF\n else:\n vec_compute_nums = VEC_NUMS\n\n repeat_times = int(block_num // VEC_BLOCK_NUMS)\n remain_len = int(block_num % VEC_BLO... | [
"0.5970925",
"0.5745958",
"0.5735644",
"0.5696948",
"0.56464106",
"0.549432",
"0.5441594",
"0.5392188",
"0.53915316",
"0.53656274",
"0.5356167",
"0.5326084",
"0.5323357",
"0.5291507",
"0.5251519",
"0.5247529",
"0.5225927",
"0.5218693",
"0.52077883",
"0.52020216",
"0.5196561",... | 0.7371926 | 0 |
Convert a dataframe of indicators into an inverse covariance matrix index | def invcov_index(indicators):
df = indicators.copy()
df = (df-df.mean())/df.std()
I = np.ones(df.shape[1])
E = inv(df.cov())
s1 = I.dot(E).dot(I.T)
s2 = I.dot(E).dot(df.T)
try:
int(s1)
S = s2/s1
except TypeError:
S = inv(s1).dot(s2)
S = pd.Series(S... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def invert(self):\r\n return pd.DataFrame(\r\n np.linalg.pinv(self.data, hermitian=True),\r\n index=self.data.index,\r\n columns=self.data.columns,\r\n ) # do not return CategoryCov because variance can be negative\r",
"def information_matrix(self):\n return... | [
"0.6422175",
"0.5994541",
"0.59150004",
"0.58663636",
"0.5760582",
"0.5612461",
"0.55810237",
"0.5535483",
"0.55111533",
"0.54344183",
"0.54144865",
"0.5412415",
"0.54084176",
"0.53880584",
"0.538651",
"0.53669155",
"0.5360462",
"0.531783",
"0.5299906",
"0.5290913",
"0.529091... | 0.7347716 | 0 |
Count the number of pairs with a given sum | def sum_pairs(arr: list, sum: int):
pair_count = 0
count_map = {}
for i in arr:
if i in count_map:
count_map[i] += 1
else:
count_map[i] = 1
for key, value in count_map.items():
if (sum - key) in count_map:
count1 = value
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def numIdenticalPairs(self, nums: List[int]) -> int:\n #brute force\n # res = 0\n # for i in range(len(nums)):\n # for j in range(len(nums)):\n # if i >= j:\n # continue\n\n # if nums[i] == nums[j]:\n # res += 1\n # return res\n #with memoiz... | [
"0.6868359",
"0.66832805",
"0.66112846",
"0.66064453",
"0.65179956",
"0.6467897",
"0.64248705",
"0.6424355",
"0.63199806",
"0.63117194",
"0.62766564",
"0.62698525",
"0.6211663",
"0.62083685",
"0.61964554",
"0.61943144",
"0.6185799",
"0.61598265",
"0.61551404",
"0.61480534",
"... | 0.83935183 | 0 |
Archive the provided URL using archive.org's Wayback Machine. Returns the archive.org URL where the capture is stored. Raises a CachedPage exception if archive.org declines to conduct a new capture and returns a previous snapshot instead. To silence that exception, pass into True to the `accept_cache` keyword argument.... | def capture(
target_url: str,
user_agent: str = DEFAULT_USER_AGENT,
accept_cache: bool = False,
authenticate: bool = False,
):
# Put together the URL that will save our request
domain = "https://web.archive.org"
save_url = urljoin(domain, "/save/")
request_url = save_url + target_url
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cli(\n url: str,\n user_agent: str | None = None,\n accept_cache: bool = False,\n authenticate: bool = False,\n):\n kwargs: dict[str, typing.Any] = {}\n if user_agent:\n kwargs[\"user_agent\"] = user_agent\n if accept_cache:\n kwargs[\"accept_cache\"] = accept_cache\n if a... | [
"0.687109",
"0.5586112",
"0.557555",
"0.53966314",
"0.53348285",
"0.5196314",
"0.5022589",
"0.4892101",
"0.48886994",
"0.48691416",
"0.4849584",
"0.4844973",
"0.47459376",
"0.4710222",
"0.4675755",
"0.46476734",
"0.46368256",
"0.46331286",
"0.46284184",
"0.4627435",
"0.461579... | 0.77938116 | 0 |
Test readout error on qubit 0 for bell state | def test_readout_error_qubit0(self):
# Test circuit: ideal bell state
qr = QuantumRegister(2, 'qr')
cr = ClassicalRegister(2, 'cr')
circuit = QuantumCircuit(qr, cr)
circuit.h(qr[0])
circuit.cx(qr[0], qr[1])
# Ensure qubit 0 is measured before qubit 1
circ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_readout_error_qubit1(self):\n\n # Test circuit: ideal bell state\n qr = QuantumRegister(2, 'qr')\n cr = ClassicalRegister(2, 'cr')\n circuit = QuantumCircuit(qr, cr)\n circuit.h(qr[0])\n circuit.cx(qr[0], qr[1])\n # Ensure qubit 0 is measured before qubit 1... | [
"0.761526",
"0.7077091",
"0.62291527",
"0.6159507",
"0.6138393",
"0.61096",
"0.6094899",
"0.6089263",
"0.6088242",
"0.6083451",
"0.60297614",
"0.58834726",
"0.5879146",
"0.58698696",
"0.5863989",
"0.58603543",
"0.5845688",
"0.5740765",
"0.5725579",
"0.57230467",
"0.5655644",
... | 0.7693814 | 0 |
Test readout error on qubit 1 for bell state | def test_readout_error_qubit1(self):
# Test circuit: ideal bell state
qr = QuantumRegister(2, 'qr')
cr = ClassicalRegister(2, 'cr')
circuit = QuantumCircuit(qr, cr)
circuit.h(qr[0])
circuit.cx(qr[0], qr[1])
# Ensure qubit 0 is measured before qubit 1
circ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_readout_error_qubit0(self):\n\n # Test circuit: ideal bell state\n qr = QuantumRegister(2, 'qr')\n cr = ClassicalRegister(2, 'cr')\n circuit = QuantumCircuit(qr, cr)\n circuit.h(qr[0])\n circuit.cx(qr[0], qr[1])\n # Ensure qubit 0 is measured before qubit 1... | [
"0.7660536",
"0.7181986",
"0.63022304",
"0.623464",
"0.6231123",
"0.61916983",
"0.61812544",
"0.613943",
"0.6105643",
"0.6102502",
"0.61010426",
"0.6059329",
"0.6034883",
"0.5977648",
"0.5974461",
"0.5962319",
"0.59377927",
"0.5909117",
"0.59089637",
"0.5904632",
"0.5895594",... | 0.7747605 | 0 |
Test 100% readout error on all qubits | def test_readout_error_all_qubit(self):
# Test circuit: ideal bell state
qr = QuantumRegister(2, 'qr')
cr = ClassicalRegister(2, 'cr')
circuit = QuantumCircuit(qr, cr)
circuit.h(qr[0])
circuit.cx(qr[0], qr[1])
# Ensure qubit 0 is measured before qubit 1
c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_readout_error_qubit1(self):\n\n # Test circuit: ideal bell state\n qr = QuantumRegister(2, 'qr')\n cr = ClassicalRegister(2, 'cr')\n circuit = QuantumCircuit(qr, cr)\n circuit.h(qr[0])\n circuit.cx(qr[0], qr[1])\n # Ensure qubit 0 is measured before qubit 1... | [
"0.76637715",
"0.7603116",
"0.6704679",
"0.6683766",
"0.6649942",
"0.6611385",
"0.65605485",
"0.6504623",
"0.64533865",
"0.6441967",
"0.6404075",
"0.6287275",
"0.6265213",
"0.62271565",
"0.61801034",
"0.6169512",
"0.61167383",
"0.6037226",
"0.5986241",
"0.59798735",
"0.592368... | 0.76687586 | 0 |
Test a correlated twoqubit readout error | def test_readout_error_correlated_2qubit(self):
# Test circuit: prepare all plus state
qr = QuantumRegister(2, 'qr')
cr = ClassicalRegister(2, 'cr')
circuit = QuantumCircuit(qr, cr)
circuit.h(qr)
circuit.barrier(qr)
# We will manually add a correlated measure oper... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_readout_error_qubit1(self):\n\n # Test circuit: ideal bell state\n qr = QuantumRegister(2, 'qr')\n cr = ClassicalRegister(2, 'cr')\n circuit = QuantumCircuit(qr, cr)\n circuit.h(qr[0])\n circuit.cx(qr[0], qr[1])\n # Ensure qubit 0 is measured before qubit 1... | [
"0.72487193",
"0.7131155",
"0.67280173",
"0.6090974",
"0.5945384",
"0.5846784",
"0.58361",
"0.5827254",
"0.57993144",
"0.57961226",
"0.57810736",
"0.5767251",
"0.57519376",
"0.5744709",
"0.5707226",
"0.5689585",
"0.5668584",
"0.5661487",
"0.5660232",
"0.56589425",
"0.5656539"... | 0.78623223 | 0 |
Test 50% perecent reset error on qubit0 | def test_reset_error_specific_qubit_50percent(self):
# Test circuit: ideal outcome "11"
qr = QuantumRegister(2, 'qr')
cr = ClassicalRegister(2, 'cr')
circuit = QuantumCircuit(qr, cr)
circuit.x(qr)
circuit.measure(qr, cr)
backend = QasmSimulator()
noise_ci... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_specific_qubit_pauli_error_reset_25percent(self):\n qr = QuantumRegister(2, 'qr')\n cr = ClassicalRegister(2, 'cr')\n circuit = QuantumCircuit(qr, cr)\n circuit.barrier(qr)\n circuit.reset(qr)\n circuit.barrier(qr)\n circuit.measure(qr, cr)\n backend... | [
"0.8051521",
"0.79759365",
"0.79388624",
"0.7862399",
"0.7766173",
"0.77096605",
"0.7605542",
"0.75477517",
"0.67614543",
"0.6734318",
"0.6728533",
"0.6721009",
"0.6587347",
"0.65431523",
"0.6492219",
"0.64849436",
"0.6459176",
"0.6434604",
"0.63961065",
"0.63679075",
"0.6339... | 0.80340695 | 1 |
Test 25% percent reset error on qubit1 | def test_reset_error_specific_qubit_25percent(self):
# Test circuit: ideal outcome "11"
qr = QuantumRegister(2, 'qr')
cr = ClassicalRegister(2, 'cr')
circuit = QuantumCircuit(qr, cr)
circuit.x(qr)
circuit.measure(qr, cr)
backend = QasmSimulator()
noise_ci... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_specific_qubit_pauli_error_reset_25percent(self):\n qr = QuantumRegister(2, 'qr')\n cr = ClassicalRegister(2, 'cr')\n circuit = QuantumCircuit(qr, cr)\n circuit.barrier(qr)\n circuit.reset(qr)\n circuit.barrier(qr)\n circuit.measure(qr, cr)\n backend... | [
"0.8192283",
"0.8074021",
"0.8054405",
"0.79512155",
"0.7703991",
"0.76622504",
"0.7568427",
"0.7505362",
"0.7011177",
"0.6954605",
"0.69186103",
"0.6909316",
"0.6887726",
"0.68811786",
"0.68578637",
"0.6784696",
"0.64939183",
"0.6487063",
"0.6195229",
"0.6170042",
"0.6104823... | 0.8253222 | 0 |
Test 100% precent reset error on all qubits | def test_reset_error_all_qubit_100percent(self):
# Test circuit: ideal outcome "11"
qr = QuantumRegister(2, 'qr')
cr = ClassicalRegister(2, 'cr')
circuit = QuantumCircuit(qr, cr)
circuit.x(qr)
circuit.measure(qr, cr)
backend = QasmSimulator()
noise_circs ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_specific_qubit_pauli_error_reset_25percent(self):\n qr = QuantumRegister(2, 'qr')\n cr = ClassicalRegister(2, 'cr')\n circuit = QuantumCircuit(qr, cr)\n circuit.barrier(qr)\n circuit.reset(qr)\n circuit.barrier(qr)\n circuit.measure(qr, cr)\n backend... | [
"0.7634604",
"0.7615573",
"0.7602229",
"0.75521535",
"0.7240932",
"0.7234621",
"0.7206218",
"0.7155868",
"0.65695375",
"0.64620274",
"0.6300707",
"0.6275485",
"0.62622374",
"0.62479293",
"0.6206906",
"0.6189297",
"0.6177947",
"0.6099705",
"0.60909253",
"0.6077174",
"0.6065224... | 0.7933952 | 0 |
Test 100% Pauli error on id gates | def test_all_qubit_pauli_error_gate_100percent(self):
qr = QuantumRegister(2, 'qr')
cr = ClassicalRegister(2, 'cr')
circuit = QuantumCircuit(qr, cr)
circuit.iden(qr)
circuit.barrier(qr)
circuit.measure(qr, cr)
backend = QasmSimulator()
shots = 100
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_specific_qubit_pauli_error_gate_100percent(self):\n qr = QuantumRegister(2, 'qr')\n cr = ClassicalRegister(2, 'cr')\n circuit = QuantumCircuit(qr, cr)\n circuit.iden(qr)\n circuit.barrier(qr)\n circuit.measure(qr, cr)\n backend = QasmSimulator()\n sh... | [
"0.6823113",
"0.65089923",
"0.63360244",
"0.62340903",
"0.620764",
"0.6184912",
"0.6162606",
"0.60578805",
"0.59943485",
"0.5974759",
"0.5974759",
"0.59589094",
"0.59528273",
"0.5899597",
"0.5862406",
"0.5817934",
"0.579591",
"0.576339",
"0.5763351",
"0.57591534",
"0.5753654"... | 0.6648989 | 1 |
Test 100% Pauli error on id gates on qubit1 | def test_specific_qubit_pauli_error_gate_100percent(self):
qr = QuantumRegister(2, 'qr')
cr = ClassicalRegister(2, 'cr')
circuit = QuantumCircuit(qr, cr)
circuit.iden(qr)
circuit.barrier(qr)
circuit.measure(qr, cr)
backend = QasmSimulator()
shots = 100
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_all_qubit_pauli_error_gate_100percent(self):\n qr = QuantumRegister(2, 'qr')\n cr = ClassicalRegister(2, 'cr')\n circuit = QuantumCircuit(qr, cr)\n circuit.iden(qr)\n circuit.barrier(qr)\n circuit.measure(qr, cr)\n backend = QasmSimulator()\n shots =... | [
"0.6948121",
"0.6896298",
"0.67069465",
"0.6486029",
"0.64153993",
"0.63180083",
"0.631731",
"0.6288314",
"0.62688136",
"0.6246572",
"0.62225777",
"0.6220967",
"0.62184393",
"0.61696744",
"0.6145834",
"0.606778",
"0.60577255",
"0.6056523",
"0.59679675",
"0.5959239",
"0.594980... | 0.7067444 | 0 |
Test 100% Pauli error on id gates qubit0 | def test_specific_qubit_pauli_error_gate_25percent(self):
qr = QuantumRegister(2, 'qr')
cr = ClassicalRegister(2, 'cr')
circuit = QuantumCircuit(qr, cr)
circuit.iden(qr)
circuit.barrier(qr)
circuit.measure(qr, cr)
backend = QasmSimulator()
shots = 2000
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_specific_qubit_pauli_error_gate_100percent(self):\n qr = QuantumRegister(2, 'qr')\n cr = ClassicalRegister(2, 'cr')\n circuit = QuantumCircuit(qr, cr)\n circuit.iden(qr)\n circuit.barrier(qr)\n circuit.measure(qr, cr)\n backend = QasmSimulator()\n sh... | [
"0.714219",
"0.70144165",
"0.68234855",
"0.67411816",
"0.6593448",
"0.6544619",
"0.6453381",
"0.6432425",
"0.64307654",
"0.64216",
"0.64054894",
"0.63167316",
"0.6282768",
"0.6226604",
"0.6193651",
"0.61926645",
"0.6139788",
"0.60511786",
"0.6022499",
"0.6021682",
"0.60182846... | 0.7020256 | 1 |
Test 100% nonlocal Pauli error on cx(0, 1) gate | def test_nonlocal_pauli_error_gate_25percent(self):
qr = QuantumRegister(3, 'qr')
cr = ClassicalRegister(3, 'cr')
circuit = QuantumCircuit(qr, cr)
circuit.cx(qr[0], qr[1])
circuit.barrier(qr)
circuit.cx(qr[1], qr[0])
circuit.barrier(qr)
circuit.measure(qr,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_controlled_by_error():\n c = Circuit(3)\n c.add(gates.H(0))\n c.add(gates.Y(1).controlled_by(0, 2))\n with pytest.raises(ValueError):\n c.to_qasm()",
"def test_aux_ops_raises(self):\n\n problem = TimeEvolutionProblem(\n self.hamiltonian, time=0.02, aux_operators=[sel... | [
"0.6160264",
"0.60424984",
"0.60073066",
"0.5985922",
"0.5964086",
"0.58918685",
"0.5890566",
"0.5871174",
"0.5871174",
"0.584095",
"0.58154696",
"0.5802302",
"0.57217896",
"0.5697638",
"0.56964415",
"0.56962276",
"0.56796205",
"0.5670367",
"0.56680375",
"0.56564397",
"0.5653... | 0.7001833 | 0 |
Test 25% PauliX error on measure of qubit1 | def test_specific_qubit_pauli_error_measure_25percent(self):
qr = QuantumRegister(2, 'qr')
cr = ClassicalRegister(2, 'cr')
circuit = QuantumCircuit(qr, cr)
circuit.measure(qr, cr)
backend = QasmSimulator()
shots = 2000
# test noise model
error = pauli_erro... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_all_qubit_pauli_error_measure_25percent(self):\n qr = QuantumRegister(2, 'qr')\n cr = ClassicalRegister(2, 'cr')\n circuit = QuantumCircuit(qr, cr)\n circuit.measure(qr, cr)\n backend = QasmSimulator()\n shots = 2000\n # test noise model\n error = pa... | [
"0.7395869",
"0.705778",
"0.6959764",
"0.6951617",
"0.69448733",
"0.6924721",
"0.6907305",
"0.6776238",
"0.67016417",
"0.66793114",
"0.666238",
"0.65331316",
"0.63741654",
"0.6357188",
"0.6355327",
"0.63139987",
"0.63046926",
"0.63001764",
"0.6269647",
"0.6225133",
"0.6215649... | 0.74995834 | 0 |
Test 25% PauliX error on reset of qubit1 | def test_specific_qubit_pauli_error_reset_25percent(self):
qr = QuantumRegister(2, 'qr')
cr = ClassicalRegister(2, 'cr')
circuit = QuantumCircuit(qr, cr)
circuit.barrier(qr)
circuit.reset(qr)
circuit.barrier(qr)
circuit.measure(qr, cr)
backend = QasmSimula... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_all_qubit_pauli_error_reset_25percent(self):\n qr = QuantumRegister(2, 'qr')\n cr = ClassicalRegister(2, 'cr')\n circuit = QuantumCircuit(qr, cr)\n circuit.barrier(qr)\n circuit.reset(qr)\n circuit.barrier(qr)\n circuit.measure(qr, cr)\n backend = Qa... | [
"0.80031896",
"0.76712894",
"0.7635047",
"0.75500256",
"0.7529674",
"0.7217046",
"0.71857226",
"0.71389174",
"0.71040606",
"0.7099653",
"0.70686287",
"0.7023759",
"0.69967765",
"0.6946481",
"0.6828879",
"0.6803246",
"0.66288227",
"0.6546882",
"0.64287186",
"0.63982475",
"0.62... | 0.8109222 | 0 |
Test amplitude damping error damps to correct state | def test_amplitude_damping_error(self):
qr = QuantumRegister(1, 'qr')
cr = ClassicalRegister(1, 'cr')
circuit = QuantumCircuit(qr, cr)
circuit.x(qr) # prepare + state
for _ in range(30):
# Add noisy identities
circuit.barrier(qr)
circuit.iden(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_amplitude_damping_error_raises_invalid_excited_state_pop(self):\n self.assertRaises(NoiseError,\n lambda: phase_amplitude_damping_error(0, 0, -0.5))\n self.assertRaises(NoiseError,\n lambda: phase_amplitude_damping_error(0, 0, 1.1))",
"def ... | [
"0.7397735",
"0.7351404",
"0.7334159",
"0.7277401",
"0.716212",
"0.7102862",
"0.7066937",
"0.7050793",
"0.7002974",
"0.6957776",
"0.67443824",
"0.6685103",
"0.63724357",
"0.629844",
"0.62963206",
"0.62188",
"0.61539865",
"0.6148564",
"0.6147389",
"0.6135113",
"0.6122521",
"... | 0.7710369 | 0 |
Test noise model basis_gates | def test_noise_model_basis_gates(self):
basis_gates = ['u1', 'u2', 'u3', 'cx']
model = NoiseModel(basis_gates)
target = sorted(basis_gates)
self.assertEqual(model.basis_gates, target)
# Check adding readout errors doesn't add to basis gates
model = NoiseModel(basis_gates... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_gaussian_basis_hon(self):\n def row_generator():\n return [random.gauss(0, 1) for i in range(self.d)]\n\n self._test_sample_basis_hon(row_generator)",
"def test_Gaussian_NB_estimators():",
"def noise_generator(n, mean, std, fractindex):\n if fractindex not in VALID_FRACT:\n... | [
"0.62887645",
"0.6246167",
"0.61668515",
"0.6104143",
"0.61000156",
"0.5940454",
"0.59359336",
"0.5919544",
"0.5901059",
"0.58504856",
"0.58291674",
"0.5822305",
"0.581121",
"0.5807476",
"0.57912207",
"0.5785746",
"0.577846",
"0.5721244",
"0.5677354",
"0.5672393",
"0.5672285"... | 0.7889592 | 0 |
Test two noise models are Equal | def test_noise_models_equal(self):
roerror = [[0.9, 0.1], [0.5, 0.5]]
error1 = pauli_error([['X', 1]], standard_gates=False)
error2 = pauli_error([['X', 1]], standard_gates=True)
model1 = NoiseModel()
model1.add_all_qubit_quantum_error(error1, ['u3'], False)
model1.add_q... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_noise_models_not_equal(self):\n error = pauli_error([['X', 1]])\n\n model1 = NoiseModel()\n model1.add_all_qubit_quantum_error(error, ['u3'], False)\n\n model2 = NoiseModel(basis_gates=['u3', 'cx'])\n model2.add_all_qubit_quantum_error(error, ['u3'], False)",
"def asse... | [
"0.7456823",
"0.706848",
"0.68467826",
"0.6754829",
"0.6733205",
"0.6702121",
"0.66993004",
"0.6589811",
"0.656786",
"0.6565996",
"0.6552568",
"0.6550797",
"0.6517824",
"0.65070695",
"0.64580256",
"0.64347464",
"0.6351226",
"0.63377047",
"0.6276327",
"0.624758",
"0.6246909",
... | 0.80302626 | 0 |
Test two noise models are not equal | def test_noise_models_not_equal(self):
error = pauli_error([['X', 1]])
model1 = NoiseModel()
model1.add_all_qubit_quantum_error(error, ['u3'], False)
model2 = NoiseModel(basis_gates=['u3', 'cx'])
model2.add_all_qubit_quantum_error(error, ['u3'], False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_noise_models_equal(self):\n roerror = [[0.9, 0.1], [0.5, 0.5]]\n error1 = pauli_error([['X', 1]], standard_gates=False)\n error2 = pauli_error([['X', 1]], standard_gates=True)\n\n model1 = NoiseModel()\n model1.add_all_qubit_quantum_error(error1, ['u3'], False)\n ... | [
"0.820037",
"0.69289684",
"0.6738332",
"0.66467637",
"0.6599596",
"0.65457606",
"0.65447915",
"0.6543903",
"0.6452476",
"0.64383215",
"0.64159083",
"0.638408",
"0.6375067",
"0.6360007",
"0.63317573",
"0.62647396",
"0.626305",
"0.62161314",
"0.6211834",
"0.6180281",
"0.615478"... | 0.8125664 | 1 |
Creates one hot vector of n classes with "index" class | def oneHot(index, n):
x = np.zeros(n)
x[index] = 1
return x | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def onehot(index):\n classNum=2#1\n onehot = np.zeros(classNum)#这代表种类类型\n onehot[index] = 1.0\n return onehot",
"def indices_to_one_hot(data, nb_classes):\n targets = np.array(data).reshape(-1)\n return np.eye(nb_classes)[targets]",
"def indices_to_one_hot(data, nb_classes):\n targets = np... | [
"0.8317261",
"0.81406474",
"0.81406474",
"0.81406474",
"0.81406474",
"0.8102245",
"0.80313605",
"0.80136204",
"0.8009317",
"0.79900396",
"0.7881947",
"0.77704865",
"0.7754152",
"0.7703118",
"0.765413",
"0.7646331",
"0.7600033",
"0.74995023",
"0.74995023",
"0.7410096",
"0.7407... | 0.83001465 | 1 |
Check if mode contains "check" | def isMode(mode, check):
if mode=="default" or mode=="all":
return True
if mode.__contains__(check):
return True
if check.__contains__("_"):
check_modes = check.split("_")
for check_mode in check_modes:
if not isMode(mode, check_mode):
return... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def check_enable_mode(self, check_string='#'):\n return True",
"def is_valid_mode(mode: str) -> bool:\n return mode in (TEST, EASY, HARD)",
"def check_enable_mode(self, *args, **kwargs):\n pass",
"def check():",
"def check_config_mode(self, check_string=\")#\", pattern=\"\"):\n retu... | [
"0.70960957",
"0.6581383",
"0.64866024",
"0.64746034",
"0.6376049",
"0.63402003",
"0.62630945",
"0.6178688",
"0.61621815",
"0.614451",
"0.61147934",
"0.6092406",
"0.6087381",
"0.60813844",
"0.6067212",
"0.60657835",
"0.6018074",
"0.5989378",
"0.59655833",
"0.5960526",
"0.5955... | 0.74882025 | 0 |
Coordinate embeddings of bounding boxes | def coordinate_embeddings(boxes, dim):
batch_size, num_boxes, num_loc = boxes.shape
# transform to (x_c, y_c, w, h) format
pos = boxes.new_zeros((batch_size, num_boxes, 4))
pos[:, :, 0] = (boxes[:, :, 0] + boxes[:, :, 2]) / 2 * 100
pos[:, :, 1] = (boxes[:, :, 1] + boxes[:, :, 3]) / 2 * 100
pos... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xywh_xyxy(boxes):\n bbox = np.zeros(boxes.shape)\n bbox[:, 0] = boxes[:, 0] \n bbox[:, 1] = boxes[:, 1] \n bbox[:, 2] = boxes[:, 0] + 1 * boxes[:, 2]\n bbox[:, 3] = boxes[:, 1] + 1 * boxes[:, 3]\n return bbox",
"def bounding_box(self):\n latlon00 = self.ij_to_latlon(-1,-1)\n ... | [
"0.6516033",
"0.6400761",
"0.6280361",
"0.61731803",
"0.61345005",
"0.6076974",
"0.60425735",
"0.60376346",
"0.6017529",
"0.5986557",
"0.59813845",
"0.59286344",
"0.5880047",
"0.5870507",
"0.58615243",
"0.5855573",
"0.5845112",
"0.58403444",
"0.581915",
"0.5816758",
"0.581241... | 0.6860003 | 0 |
Set default image feature to an existing model. | def set_default_image_feature(self, image_feature):
target = self.dummy_input_imgs
# None means batch axis
x = image_feature.features.clone()[None]
assert x.shape == target.data.shape
target.data = x
target = self.dummy_image_loc
# None means bat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_default_image(self, image):\n raise NotImplementedError",
"def _diffusion_imaging_model_changed(self, new):\n self.stages[\"Diffusion\"].config.diffusion_imaging_model = new",
"def select_default_picture(sender, instance, **kwargs):\n if not instance.id:\n instance.picture = \"... | [
"0.6984379",
"0.60346025",
"0.58383137",
"0.5692587",
"0.5637139",
"0.5607432",
"0.5505951",
"0.5462009",
"0.54486644",
"0.54372",
"0.5430467",
"0.54257965",
"0.5415532",
"0.54085255",
"0.5398587",
"0.5368907",
"0.5345402",
"0.52843153",
"0.5280943",
"0.52764785",
"0.5224097"... | 0.7342939 | 0 |
initialize a bdb hash | def bdb_init_hash(db_file, cache_size=None):
db_dir = dirname(db_file)
if not isdir(db_dir):
makedirs(db_dir)
db = DB()
if cache_size is None:
cache_size = _cache_size
db.set_cachesize (
cache_size / (1024*1024*1024),
cache_size % (1024*1024*1024)
)
db.open(db_file, dbtype=DB_HASH, flags=DB_CREATE)
retu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hfreq_bdb_init(db_file, cache_size=None):\n\treturn bdb_init_hash(db_file, cache_size)",
"def __init__(self):\n _snap.TStrHashF_DJB_swiginit(self, _snap.new_TStrHashF_DJB())",
"def __init__(self):\n # better to be a prime number, less collision\n self.key_space = 2069\n self.has... | [
"0.7191982",
"0.67193675",
"0.67058957",
"0.6701905",
"0.66732764",
"0.65171236",
"0.6465162",
"0.6455151",
"0.64273334",
"0.63605845",
"0.63186646",
"0.6285688",
"0.6251298",
"0.62214595",
"0.62131435",
"0.6166384",
"0.6118945",
"0.6118871",
"0.60922813",
"0.6070766",
"0.604... | 0.7485022 | 0 |
initialize (open) a bdb frequency hash | def hfreq_bdb_init(db_file, cache_size=None):
return bdb_init_hash(db_file, cache_size) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self):\n self.freq = {}",
"def bdb_init_hash(db_file, cache_size=None):\n\tdb_dir = dirname(db_file)\n\tif not isdir(db_dir):\n\t\tmakedirs(db_dir)\n\tdb = DB()\n\tif cache_size is None:\n\t\tcache_size = _cache_size\n\tdb.set_cachesize (\n\t\tcache_size / (1024*1024*1024),\n\t\tcache_size % ... | [
"0.6704742",
"0.65338004",
"0.64289284",
"0.63803357",
"0.62496257",
"0.6220571",
"0.6148755",
"0.6134633",
"0.60455704",
"0.59618205",
"0.59502053",
"0.59428495",
"0.5888558",
"0.58844864",
"0.5863423",
"0.5857028",
"0.5841682",
"0.5838687",
"0.5838318",
"0.5813352",
"0.5767... | 0.8135423 | 0 |
Compute Mean Volume Backscattering Strength (MVBS) based on intervals of range (``echo_range``) and ``ping_time`` specified in physical units. Output of this function differs from that of ``compute_MVBS_index_binning``, which computes binaveraged Sv according to intervals of ``echo_range`` and ``ping_time`` specified a... | def compute_MVBS(ds_Sv, range_meter_bin=20, ping_time_bin="20S"):
# create bin information for echo_range
range_interval = np.arange(0, ds_Sv["echo_range"].max() + range_meter_bin, range_meter_bin)
# create bin information needed for ping_time
ping_interval = (
ds_Sv.ping_time.resample(ping_ti... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def compute_MVBS_index_binning(ds_Sv, range_sample_num=100, ping_num=100):\n da_sv = 10 ** (ds_Sv[\"Sv\"] / 10) # average should be done in linear domain\n da = 10 * np.log10(\n da_sv.coarsen(ping_time=ping_num, range_sample=range_sample_num, boundary=\"pad\").mean(\n skipna=True\n ... | [
"0.7186321",
"0.50017744",
"0.48987573",
"0.48254302",
"0.47455582",
"0.47400346",
"0.4675963",
"0.45459038",
"0.45336497",
"0.45286122",
"0.45276594",
"0.45231518",
"0.44899863",
"0.44832665",
"0.44780084",
"0.44775733",
"0.44637537",
"0.44637537",
"0.44610992",
"0.4456314",
... | 0.6702398 | 1 |
Compute Mean Volume Backscattering Strength (MVBS) based on intervals of ``range_sample`` and ping number (``ping_num``) specified in index number. Output of this function differs from that of ``compute_MVBS``, which computes binaveraged Sv according to intervals of range (``echo_range``) and ``ping_time`` specified in... | def compute_MVBS_index_binning(ds_Sv, range_sample_num=100, ping_num=100):
da_sv = 10 ** (ds_Sv["Sv"] / 10) # average should be done in linear domain
da = 10 * np.log10(
da_sv.coarsen(ping_time=ping_num, range_sample=range_sample_num, boundary="pad").mean(
skipna=True
)
)
#... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def compute_MVBS(ds_Sv, range_meter_bin=20, ping_time_bin=\"20S\"):\n\n # create bin information for echo_range\n range_interval = np.arange(0, ds_Sv[\"echo_range\"].max() + range_meter_bin, range_meter_bin)\n\n # create bin information needed for ping_time\n ping_interval = (\n ds_Sv.ping_time.... | [
"0.67099965",
"0.4966635",
"0.49315238",
"0.47369355",
"0.4736683",
"0.47173724",
"0.4700994",
"0.46965313",
"0.4664597",
"0.4657153",
"0.46374193",
"0.4625975",
"0.46182775",
"0.45960948",
"0.45564148",
"0.4544722",
"0.45403704",
"0.45295733",
"0.4529087",
"0.4528951",
"0.45... | 0.7733896 | 0 |
Log a critical SQL error and exit | def sql_error(err):
try:
logger.critical('MySQL error [%d]: %s', err.args[0], err.args[1])
except IndexError:
logger.critical('MySQL error: %s', err)
sys.exit(-1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sql_error(err):\n try:\n print('MySQL error [%d]: %s' % (err.args[0], err.args[1]))\n except IndexError:\n print('MySQL error: %s' % err)\n sys.exit(-1)",
"def fatal(self, *args):\n self.mylog.critical(*args)\n sys.exit(1)",
"def _err(self, *args):\n logger.error... | [
"0.7171329",
"0.6761154",
"0.6277771",
"0.62170476",
"0.6160511",
"0.6116838",
"0.6057346",
"0.60028756",
"0.5875448",
"0.5868887",
"0.5848594",
"0.5823213",
"0.5809815",
"0.57910967",
"0.57910967",
"0.576729",
"0.5765866",
"0.57383525",
"0.57295555",
"0.5719349",
"0.57147664... | 0.78105843 | 1 |
r"""Test the rotation matrix generator. | def test_rot(self):
print("rot()")
obs = self.fixture
# rotation(0) = identity
for axis in [1, 2, 3]:
# theta = 0.0
rotation = obs.rot(0.0, axis)
# find || eye - rot1 ||
diff = np.linalg.norm(np.eye(3) - rotation)
self.assertA... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_asssert_rotation_matrix_behaves_like_check_matrix():\n random_state = np.random.RandomState(2345)\n for _ in range(5):\n a = pr.random_axis_angle(random_state)\n R = pr.matrix_from_axis_angle(a)\n original_value = R[2, 2]\n for error in [0, 1e-8, 1e-7, 1e-5, 1e-4, 1]:\n ... | [
"0.7209717",
"0.70525926",
"0.6995734",
"0.6941755",
"0.6785118",
"0.67178756",
"0.66431063",
"0.6460628",
"0.6438224",
"0.6438224",
"0.6431514",
"0.6425429",
"0.6425429",
"0.6425429",
"0.64090383",
"0.6356306",
"0.6322191",
"0.6319203",
"0.63143456",
"0.62883717",
"0.6263961... | 0.71879506 | 1 |
Return an integer representation based on the given string representation. The Trace.traceLevels hash table is used to do the translation. The integer returned is one of the levels from the Level class. The incoming level is intended to be an integer or a Jython string. | def _coerceLevel(self,level):
if (type(level) == type(0)):
if (level >= Level.NONE and level <= Level.FINEST):
result = level
else:
raise TraceSpecificationException("Unknown integer trace level: %s Valid integer trace levels: %s <= level <= %s" % (level, Level.NONE, Level.FINEST))
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _log_level_from_string(string):\n try:\n return getattr(logging, string)\n except AttributeError:\n raise ValueError('invalid log level: %r' % string)",
"def _coerceLevel(self,level):\n result = level\n if (type(level) == type(\"\") or type(level) == type(u\"\")):\n level = lev... | [
"0.6459587",
"0.6423294",
"0.6329741",
"0.6158966",
"0.6141229",
"0.6050959",
"0.58506906",
"0.5825516",
"0.5792962",
"0.5753301",
"0.5750161",
"0.57239944",
"0.5698036",
"0.56045485",
"0.55975974",
"0.5583622",
"0.5563788",
"0.5537052",
"0.55249166",
"0.54837537",
"0.5475534... | 0.6949068 | 0 |
Return a Python/Jython regular expression string that represents the given pattern. | def _patternToRegEx(self,pattern):
if (pattern == "*"):
# special case that matches anything
regex = ".*?"
else:
regex = pattern
if (regex.find(".") >= 0):
regex = regex.replace(".", "\.")
#endIf
asteriskIndex = regex.find("*")
if (asteriskIndex < 0):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_regex(pattern:str) -> str:\n raise NotImplementedError()",
"def _format_pattern(pattern: str) -> str:\n return pattern.rstrip('*') + '**'",
"def get_regex_format(self, case_sensitive=True):\n\n if case_sensitive is True:\n c = self.cursor()\n c.execute('PRAGMA case_s... | [
"0.7571252",
"0.6932767",
"0.68578047",
"0.67705536",
"0.6753435",
"0.67393273",
"0.669281",
"0.6593594",
"0.64645416",
"0.64624697",
"0.64510584",
"0.6398081",
"0.6398081",
"0.6398081",
"0.6377575",
"0.63312477",
"0.632012",
"0.63149226",
"0.6304338",
"0.62888813",
"0.628458... | 0.6962399 | 1 |
Return "true" if the given trace level is a valid string or integer representation of a trace level. | def _isTraceLevel(self,level):
if (type(level) == type(0)):
result = level >= Level.NONE and level <= Level.FINEST
elif (type(level) == type("") or type(level) == type(u"")):
level = level.lower()
validLevel = Trace.traceLevels.get(level)
# Keep in mind, trace level "none" maps t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _checkLevel(level):\n\n try:\n level = int(level)\n except:\n pass\n\n if isinstance(level, (int, long)):\n rv = level\n elif str(level) == level:\n if level not in logging._levelNames:\n raise ValueError('Unknown level: %r' % level)\n rv = logging._lev... | [
"0.64003354",
"0.63713634",
"0.6259688",
"0.6041013",
"0.5832999",
"0.568361",
"0.5626215",
"0.5560428",
"0.5560428",
"0.5522911",
"0.55040485",
"0.54773974",
"0.54651505",
"0.5385012",
"0.5354778",
"0.53337514",
"0.53284377",
"0.53162473",
"0.5291516",
"0.5280502",
"0.524399... | 0.8185287 | 0 |
Set the trace level for this instance of the trace class based on the Trace class traceSpec. If there is no trace spec that has a module pattern that matches this trace instance module name, then the trace level is not modified. | def configureThisTrace(self):
for spec in Trace.traceSpec:
if (spec.compiledRegex.match(self.entityName)):
self.traceLevel = spec.level
break
#endIf
#endFor | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def configureTrace(traceString):\n \n setTraceSpec(traceString)\n registeredModules = Trace.tracedEntities.keys()\n for module in registeredModules:\n for spec in Trace.traceSpec:\n if (spec.compiledRegex.match(module)):\n trace = Trace.tracedEntities[module]\n trace.setTraceLevel(spec.le... | [
"0.61845666",
"0.5965638",
"0.58020526",
"0.55751276",
"0.55380774",
"0.5459781",
"0.54203385",
"0.53951794",
"0.53279537",
"0.5266613",
"0.52020276",
"0.5173878",
"0.51630473",
"0.51576376",
"0.50914013",
"0.50914013",
"0.50914013",
"0.5078109",
"0.5073327",
"0.50539666",
"0... | 0.65092444 | 0 |
Return a string useable for output to stdout or a log file that provides a representation of the "exception stack" and the "frame stack" from "top to bottm" (TTB). The "exception stack" captures the code tree from main to where the exception was raised and is usually the most interesting part of the stack. The "frame s... | def _exceptionStackTTB(self,methodName,exc,depth=10):
stack = ""
# Reconstruct the call stack from where the trace of the exception was initiated by invoking
# Trace.error() or Trace.severe().
stackList = traceback.extract_stack()
try:
for stackData in stackList:
sourcefile,line,funct... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _exceptionStackBTT(self,methodName,exc,depth=10):\n stack = \"\"\n # Reconstruct the call stack from where the trace of the exception was initiated by invoking \n # Trace.error() or Trace.severe().\n stackList = traceback.extract_stack()\n try:\n stack = \"\\tFrame stack (most recent call l... | [
"0.7825131",
"0.768806",
"0.7321852",
"0.7201898",
"0.7133164",
"0.7126731",
"0.71193105",
"0.7107479",
"0.70943695",
"0.7013598",
"0.7007724",
"0.699771",
"0.6987858",
"0.6929358",
"0.68698084",
"0.67966884",
"0.6782249",
"0.6760829",
"0.67419785",
"0.6733596",
"0.67156154",... | 0.77414405 | 1 |
Return a string useable for output to stdout or a log file that provides a representation of the "exception stack" and the "frame stack" from "bottom to top" (BTT). The "exception stack" captures the code tree from main to where the exception was raised and is usually the most interesting part of the stack. The "frame ... | def _exceptionStackBTT(self,methodName,exc,depth=10):
stack = ""
# Reconstruct the call stack from where the trace of the exception was initiated by invoking
# Trace.error() or Trace.severe().
stackList = traceback.extract_stack()
try:
stack = "\tFrame stack (most recent call last):\n"
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _exceptionStackTTB(self,methodName,exc,depth=10):\n stack = \"\"\n # Reconstruct the call stack from where the trace of the exception was initiated by invoking \n # Trace.error() or Trace.severe().\n stackList = traceback.extract_stack()\n try:\n for stackData in stackList:\n sourcef... | [
"0.770486",
"0.76810896",
"0.735255",
"0.7192024",
"0.71451706",
"0.71258485",
"0.7122424",
"0.70791197",
"0.7071235",
"0.70586354",
"0.70271665",
"0.70149356",
"0.69869155",
"0.69722915",
"0.69187415",
"0.6851646",
"0.67909634",
"0.67870295",
"0.6779541",
"0.677022",
"0.6752... | 0.77506846 | 0 |
Set the trace level for this instance of Trace to the given level. The given level may be a Jython string that is a valid trace level as determined by the _coerceLevel() method. Or the given level may be an integer constant that is one of the levels defined in the Level class. | def setTraceLevel (self,level):
if (type(level) == type("") or type(level) == type(u"")):
if (level):
level = self._coerceLevel(level)
self.traceLevel = level
#endIf
elif (type(level) == type(0)):
if (self._isTraceLevel(level)):
self.traceLevel = level
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_level(self, level: LogLevel):\n pass",
"def level(self, level: int):\n if level is None:\n raise ValueError(\"Invalid value for `level`, must not be `None`\")\n\n self._level = level",
"def set_level(self, level: str):\n self._logger.setLevel(getattr(logging, ... | [
"0.7306564",
"0.72274274",
"0.7219667",
"0.71255",
"0.70831287",
"0.7012871",
"0.69622135",
"0.69622135",
"0.69622135",
"0.69605273",
"0.69581693",
"0.68610203",
"0.6837203",
"0.67565393",
"0.6656551",
"0.6635947",
"0.6564048",
"0.6537813",
"0.6396795",
"0.63748324",
"0.63450... | 0.7709587 | 0 |
The configureTrace() method defined for the Trace class is a convenience wrapper around the configureTrace() method defined for the Trace module. It is often the case that a Trace class instance is readily available to use for "global" trace configuration. | def configureTrace(self,traceString):
configureTrace(traceString) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def trace(self, trace=...):\n ...",
"def configureTrace(traceString):\n \n setTraceSpec(traceString)\n registeredModules = Trace.tracedEntities.keys()\n for module in registeredModules:\n for spec in Trace.traceSpec:\n if (spec.compiledRegex.match(module)):\n trace = Trace.tracedEntitie... | [
"0.6717687",
"0.6619051",
"0.62301195",
"0.61260366",
"0.605834",
"0.59307045",
"0.5855935",
"0.583541",
"0.5781825",
"0.57749945",
"0.56175256",
"0.5521022",
"0.551721",
"0.550927",
"0.5466992",
"0.54495686",
"0.5391383",
"0.5391383",
"0.5391383",
"0.534257",
"0.53140676",
... | 0.78586704 | 0 |
Return a list of TraceSpecification instances that represent a parsing of the given trace string. The returned list holds a TraceSpecifification instance for each trace specification in the given trace string. | def parseTraceString(traceString):
result = []
# If the given traceString is enclosed in double-quotes,
# then strip the double-quotes.
if (traceString[0] == '"' and traceString[-1] == '"'):
traceString = traceString[1:-1]
#endIf
traceStrings = traceString.split(":")
for trace in traceStrings:
tra... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def configureTrace(traceString):\n \n setTraceSpec(traceString)\n registeredModules = Trace.tracedEntities.keys()\n for module in registeredModules:\n for spec in Trace.traceSpec:\n if (spec.compiledRegex.match(module)):\n trace = Trace.tracedEntities[module]\n trace.setTraceLevel(spec.le... | [
"0.57680905",
"0.5595512",
"0.5319835",
"0.5319835",
"0.50716096",
"0.5068398",
"0.5048298",
"0.50376815",
"0.50376624",
"0.49978292",
"0.49924955",
"0.49803588",
"0.4978812",
"0.49030364",
"0.4879855",
"0.4866006",
"0.4865482",
"0.48360372",
"0.4830144",
"0.48097444",
"0.480... | 0.77411985 | 0 |
Given a trace specification string, set the module traceSpec used by all instances of Trace. | def setTraceSpec(traceString):
if (not traceString):
raise Exception("The traceString argument must be a non-empty string.")
#endIf
Trace.traceSpec = parseTraceString(traceString)
Trace.traceString = traceString | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def configureTrace(traceString):\n \n setTraceSpec(traceString)\n registeredModules = Trace.tracedEntities.keys()\n for module in registeredModules:\n for spec in Trace.traceSpec:\n if (spec.compiledRegex.match(module)):\n trace = Trace.tracedEntities[module]\n trace.setTraceLevel(spec.le... | [
"0.7412666",
"0.6379489",
"0.59484065",
"0.556465",
"0.51999474",
"0.5198167",
"0.51660997",
"0.50286394",
"0.49554184",
"0.48970115",
"0.48137328",
"0.4759622",
"0.46943736",
"0.46943736",
"0.468349",
"0.46787977",
"0.46474877",
"0.4629121",
"0.4556305",
"0.45438346",
"0.450... | 0.8000181 | 0 |
Return the module traceSpec used by all instances of Trace. | def getTraceSpec():
return Trace.traceSpec | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_testbench_specs(self, tb_type: str) -> Dict[str, Any]:\n return self._specs['testbenches'][tb_type]",
"def get_required_module_descriptors(self):\r\n return []",
"def trace(self):\n return self._trace",
"def tracing(self):\n return self.__trace",
"def return_spec(type_se... | [
"0.56054235",
"0.5599977",
"0.5386948",
"0.5383461",
"0.5374143",
"0.53723806",
"0.5286025",
"0.5286025",
"0.5230701",
"0.5191652",
"0.5066103",
"0.5061323",
"0.50166225",
"0.49577042",
"0.4929801",
"0.48848036",
"0.4884137",
"0.48701167",
"0.48573104",
"0.48374268",
"0.48327... | 0.7961328 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.