query
stringlengths
10
3.6k
document
stringlengths
19
61.4k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Return an entire dict of a specific class_reference, with value that not in partial_dict value in template.
def rWuE(j8uk, rPXJ, ebzb): BdPz = j8uk.properties() for ibDM in BdPz: BdPz[ibDM] = ebzb.get(ibDM, rPXJ.get(ibDM, '')) return BdPz
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def XNXM(fGC9, vOsx):\n Ty9i = None\n for Z9rn in osi2(vOsx)[::-1]:\n if Z9rn in fGC9:\n Ty9i = fGC9[Z9rn]\n break\n return Ty9i", "def UdOP(_U3a):\n d7_m = {}\n for AyMM, w75t in _U3a.items():\n d7_m[AyMM] = NDnK if w75t == wLfB else wLfB\n return d7_m", "...
[ "0.50671744", "0.49810186", "0.48294201", "0.47631404", "0.4757528", "0.4741675", "0.4732998", "0.47204667", "0.46938542", "0.4665725", "0.46034804", "0.45980883", "0.4587361", "0.4571944", "0.45580745", "0.45361668", "0.45161417", "0.45152247", "0.45052987", "0.44999406", "0...
0.6825306
0
Gets the current value of the bits.
def UnfG(YKHO): return aAsC()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BWXx(YKHO):\n if hasattr(YKHO, '_m_value'):\n return YKHO._m_value if hasattr(YKHO, '_m_value') else None\n YKHO._m_value = YKHO.b & 127\n return YKHO._m_value if hasattr(YKHO, '_m_value') else None", "def JkD2(YKHO):\n assert YKHO.is_started()\n return YKHO.currValue", "def BWXx(YKHO...
[ "0.75253373", "0.70285946", "0.6814496", "0.67528015", "0.66390926", "0.6631336", "0.66143584", "0.65567166", "0.65440804", "0.6476098", "0.6441274", "0.6407309", "0.6400492", "0.6391237", "0.63809025", "0.6347824", "0.63405514", "0.63405514", "0.6340113", "0.63310176", "0.62...
0.0
-1
Sets the port direction mask. Sets the port direction for each bit. The mask is one value representing all bits from the port. The given ``bit_mask`` will set the direction of all digital input bits. For each bit which should drive its port, the corresponding ``bit_mask`` value should be set to 1. An hexadecimal ``bit_...
def FWUy(YKHO, jBIq): d4C3(jBIq)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qnsr(YKHO, ZHfW):\n YKHO.mask = ZHfW", "def tvdR(YKHO, ZHfW):\n YKHO.mask = ZHfW", "def J1um(YKHO, bIwZ, XSoh):\n if bIwZ == 1:\n YKHO.__bus.write_byte_data(YKHO.__ioaddress, YKHO.IODIRB, XSoh)\n YKHO.__port_b_direction = XSoh\n else:\n YKHO.__bus.write_byte_data(YKHO.__ioa...
[ "0.5917578", "0.58691025", "0.5745566", "0.5460471", "0.53694445", "0.53694445", "0.5368885", "0.5268375", "0.5166452", "0.50176686", "0.49800947", "0.4959418", "0.49519765", "0.49120265", "0.49073195", "0.47790155", "0.47614002", "0.4739055", "0.4738864", "0.46848133", "0.46...
0.7326797
0
Gets the Ram buffer size. This method allows the user to get the RAM buffer size used in schedules.
def EzWd(YKHO): return u70w()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DLL8(YKHO):\n return gTEQ('PrlVmCfg_GetRamSize', YKHO.handle)", "def cize(YKHO):\n return gTEQ('PrlStat_GetUsageRamSize', YKHO.handle)", "def bk0L(YKHO):\n return gTEQ('PrlStat_GetTotalRamSize', YKHO.handle)", "def uIE7(YKHO):\n return gTEQ('PrlStat_GetFreeRamSize', YKHO.handle)", "def vNzg...
[ "0.8083486", "0.791237", "0.77963513", "0.77706224", "0.7756433", "0.7748938", "0.7529886", "0.7499676", "0.7441068", "0.7184475", "0.70885414", "0.69414234", "0.69116664", "0.69116664", "0.6875057", "0.68390083", "0.6790145", "0.6668991", "0.66353095", "0.6604294", "0.653586...
0.5958043
47
Sets the schedule onset value. This method allows the user to set the nanosecond delay between schedule start and first sample. If no delay is required, this method does not need to be used. Default value is 0.
def rj2P(YKHO, uvrz): fMeQ(uvrz)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def t4fM(YKHO, lGE9):\n YKHO._simulator_.update(t0=lGE9)\n return", "def ADFo(YKHO, *qIxc):\n return _VfD.Event_setDelay(YKHO, *qIxc)", "def b6Gq(YKHO, b6Gq):\n YKHO._schedule = b6Gq", "def b6Gq(YKHO, b6Gq):\n YKHO._schedule = b6Gq", "def b6Gq(YKHO, b6Gq):\n YKHO._schedule = b6Gq", "def...
[ "0.6216358", "0.6119197", "0.5969866", "0.58590484", "0.58590484", "0.5728359", "0.57192093", "0.56866515", "0.5665514", "0.56502134", "0.5632581", "0.56279105", "0.561515", "0.56134814", "0.56101656", "0.560535", "0.5596059", "0.5577898", "0.5549093", "0.55241936", "0.547113...
0.6835493
0
Gets the schedule count value. This method allows the user to get the current count for a schedule.
def Xtow(YKHO): return mK7t()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UHFx(YKHO) -> int:\n return qe4Y.get(YKHO, 'count')", "def DUZc(YKHO):\n return YKHO.count", "def DUZc(YKHO):\n return YKHO.count", "def DUZc(YKHO):\n return YKHO.count", "def UHFx(YKHO):\n with YKHO._block:\n ewCu = ZbWC.search('count=(\\\\d+) ', repr(YKHO))\n return int(e...
[ "0.68729573", "0.6747663", "0.6747663", "0.6683865", "0.6672399", "0.6664099", "0.66408926", "0.6599058", "0.65461475", "0.65461475", "0.6529244", "0.6523279", "0.6420016", "0.6383871", "0.63235503", "0.63027096", "0.63027096", "0.63027096", "0.63027096", "0.63027096", "0.630...
0.76366657
0
stop the active schedule for a given subsystem. Depending on how the Schedules are configured, it may not be necessary to call this method. When a schedule is using a count down, it is not required to stop the schedule.
def x8qG(YKHO): m6Gq()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JCyR(YKHO):\n b6Gq = YKHO._schedules[YKHO._index]\n b6Gq.stop()\n YKHO._stopped.set()\n YKHO._started.clear()", "def JCyR():\n with stkY:\n global running, s\n for tvqc in KCHu.queue:\n KCHu.cancel(tvqc)\n HX9S = False\n KCHu = Cjuo.scheduler()\n k...
[ "0.69434714", "0.66351914", "0.64332634", "0.64238137", "0.63299674", "0.6325", "0.6272689", "0.6229594", "0.62203455", "0.6216021", "0.6180752", "0.61679214", "0.6031662", "0.59153944", "0.5877905", "0.5872941", "0.58612496", "0.5852913", "0.5841851", "0.58382374", "0.583038...
0.6908405
1
Create required parameters dict for the request.
def luoI(YKHO, _VkV): return {'College': '', 'Conference': '', 'Country': '', 'DateFrom': '', 'DateTo': '', 'Division': '', 'DraftPick': '', 'DraftYear': '', 'GameScope': '', 'GameSegment': '', 'Height': '', 'LastNGames': '0', 'LeagueID': '00', 'Location': '', 'Month': '0', 'OpponentTeamID': '0', 'Outcome': '', 'PO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def YTov():\n return {}", "def S7z9(YKHO):\n return {'key': YKHO.key, 'hash': YKHO.hash}", "def UQ6f(YKHO) -> YgsZ:\n return YgsZ([])", "def UQ6f(YKHO) -> YgsZ:\n return YgsZ([])", "def Vlb9(YKHO, QePW: Request) -> dict:\n NArs = {'forceAsync': True}\n vcn7 = YKHO._spatial_subset_params(Q...
[ "0.8375964", "0.7456644", "0.73895395", "0.73895395", "0.73788327", "0.7118652", "0.69378275", "0.6885733", "0.6865472", "0.68040067", "0.6757807", "0.6757768", "0.6751884", "0.67383516", "0.67104787", "0.67062324", "0.66926634", "0.668606", "0.6682524", "0.66766566", "0.6648...
0.0
-1
Return the name of the device if any.
def mWFP(YKHO): return YKHO._name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yxaP(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'device_name')", "def yxaP(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'device_name')", "def mWFP(YKHO):\n return YKHO._device.name", "def mWFP(YKHO):\n return YKHO._device.name", "def mWFP(YKHO):\n return YKHO._device.name", "def ueYb(Y...
[ "0.89734465", "0.89734465", "0.8584627", "0.8584627", "0.8584627", "0.8502048", "0.84944665", "0.84194607", "0.83955586", "0.83955586", "0.8379756", "0.83165", "0.8306566", "0.8161454", "0.81564134", "0.8090303", "0.8087526", "0.8073198", "0.8006941", "0.7999654", "0.79544145...
0.0
-1
Return the state attributes of the device.
def R1i3(YKHO): return YKHO._device.status
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def R1i3(YKHO):\n return YKHO.attributes", "def R1i3(YKHO):\n return YKHO._attributes", "def R1i3(YKHO):\n return YKHO._state_attrs", "def R1i3(YKHO):\n return YKHO._state_attrs", "def R1i3(YKHO):\n return YKHO._attributes", "def R1i3(YKHO):\n return YKHO._attributes", "def R1i3(YKHO)...
[ "0.92738223", "0.92053986", "0.91516256", "0.91516256", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148889", "0.9148746", "0.9148746", "0.9137698", "0.9110632",...
0.8948436
25
Constructor for ModelCheckpoint class.
def FIMM(YKHO, Tuqy: str='min', N6hW: str='val_loss'): super(OTGK, YKHO).__init__(order=obV0.INTERNAL) YKHO.mode = Tuqy YKHO.eps = 1e-07 if 'val_' not in N6hW: YKHO.monitor = 'val_' + N6hW else: YKHO.monitor = N6hW if YKHO.mode == 'max': YKHO.best_val = -oyIN.inf ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO):\n YKHO.num_examples_per_epoch = None\n YKHO.optimizer = 'SGD'\n YKHO.initial_learning_rate = 2.0\n YKHO.learning_rate_decay_factor = 0.8\n YKHO.num_epochs_per_decay = 4\n YKHO.clip_gradients = 5.0\n YKHO.max_checkpoints_to_keep = 2", "def FIMM(YKHO, N_e1, bPTx):\n YKHO.log...
[ "0.7281369", "0.71553236", "0.6797001", "0.6615878", "0.6603439", "0.6576648", "0.64174026", "0.64138556", "0.64057535", "0.6377543", "0.6356363", "0.63517433", "0.6340139", "0.6309982", "0.6290898", "0.6272829", "0.6242992", "0.6237599", "0.62232536", "0.6216645", "0.6207713...
0.585373
74
Returns a JSON response, transforming 'context' to make the payload.
def EK31(YKHO, QpfX, **TIVb): return jnRN(YKHO.get_data(QpfX), **TIVb)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SGJU(YKHO, QpfX):\n return YKHO.get_json_response(YKHO.convert_context_to_json(QpfX))", "def SGJU(YKHO, QpfX):\n return YKHO.get_json_response(YKHO.convert_context_to_json(QpfX))", "def EK31(YKHO, QpfX, **TIVb):\n return igJ6(YKHO.convert_context_to_json(QpfX), content_type='application/json', **T...
[ "0.7898263", "0.7824009", "0.76766837", "0.76766837", "0.7560496", "0.75058556", "0.73821956", "0.73662317", "0.7348336", "0.7347456", "0.7309291", "0.7130906", "0.6941217", "0.6892298", "0.6722085", "0.663044", "0.663044", "0.663044", "0.663044", "0.6624278", "0.66101027", ...
0.74115
6
Evaluate the fault displacement magnitude at each location
def CYU9(YKHO, LTIa, NXpY=True): if NXpY: LTIa = YKHO.scale(LTIa, inplace=False) T6S7 = oyIN.zeros(LTIa.shape[0]) for eHNT in YKHO.features: if eHNT.type == 'fault': o_qv = eHNT.displacementfeature.evaluate_value(LTIa) T6S7[~oyIN.isnan(o_qv)] += o_qv[~oyIN.isnan(o_qv)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def YXbZ(YKHO):\n return epAf.sqrt(Pusg(lambda WKvO, LVAh: WKvO + LVAh, [WKvO ** 2 for WKvO in YKHO.vector]))", "def eh9H(nc8e, hpWF, cBIC, VLJZ, shSu):\n return 2.5 / oyIN.log(10) * O5KS(nc8e, hpWF, cBIC, VLJZ, shSu) / shSu", "def YXbZ(KwKv, YBrO):\n iArr = oyIN.subtract(KwKv, YBrO)\n wjRY = 0\n ...
[ "0.6223352", "0.6206339", "0.60708314", "0.59685576", "0.58984625", "0.58571744", "0.583324", "0.583021", "0.58124584", "0.58124584", "0.57992333", "0.5795835", "0.5777622", "0.5743629", "0.57335776", "0.57301664", "0.5714974", "0.5699999", "0.5662668", "0.56319606", "0.56078...
0.6674907
0
compute the haversine distance between a list coordinates (coord1) and a given coordinate (coord2)
def GeVo(mAYH, pks6): return 2 * wv6M * pvd3.arcsin(pvd3.sqrt(pvd3.sin((mAYH[:, 0] - pks6[0]) / 2) ** 2 + pvd3.cos(pks6[0]) * pvd3.cos(mAYH[:, 0]) * pvd3.sin((pks6[1] - mAYH[:, 1]) / 2) ** 2))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UVU1(mAYH, pks6):\n igSk, GgQG = mAYH\n TGuP, tk0B = pks6\n A3Vt = 6373.0\n igSk = Y_1E(igSk)\n GgQG = Y_1E(GgQG)\n TGuP = Y_1E(TGuP)\n tk0B = Y_1E(tk0B)\n H91H = tk0B - GgQG\n n_9K = TGuP - igSk\n jzdc = YUNn(n_9K / 2) ** 2 + YhSR(igSk) * YhSR(TGuP) * YUNn(H91H / 2) ** 2\n Z9r...
[ "0.8296543", "0.7935986", "0.7933038", "0.7917138", "0.7911019", "0.78857344", "0.78799397", "0.7875213", "0.7873103", "0.78551435", "0.7850477", "0.7834798", "0.7823377", "0.7823297", "0.7819288", "0.7812433", "0.78033155", "0.7796257", "0.7777385", "0.7775714", "0.77681005"...
0.8420375
0
Assert that two requests are 'equal'. This is the most complicated due to how we serialize parent and children requests to avoid reference loops. Parent fields will not serialize their children. That's why compare_parent asserts that the children field is None. The requests in the children field will not serialize thei...
def G6yt(BzZr, RL4V, ZW0d=False): def GWsX(*qIxc): for d7pR in qIxc: r5xE(d7pR is None, '') def XMXJ(f8pg, lQgl): ANYa(f8pg, lQgl, expected_type=VNUm, deep_fields={'children': GWsX}, do_raise=True) def yzWW(f8pg, lQgl): ANYa(f8pg, lQgl, expected_type=VNUm, deep_fields=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RrAP(YKHO):\n WKvO = YKHO.start_request_tests(zVa7.get_request('POST', {u'tree1_nwk': '((a,b)c);', u'tree2_nwk': '(a,(b,c));'}))\n YKHO.assert_success(WKvO)\n qQXR.dump(WKvO.json(), HwRy.stdout, indent=2)\n p9K5 = WKvO.json().get(u'message')\n YKHO.assertFalse(WKvO.json()[u'are_same_tree'], p9K5...
[ "0.64876235", "0.6483889", "0.6478216", "0.63430804", "0.62925184", "0.62247574", "0.62030923", "0.6143838", "0.60958076", "0.60471195", "0.60339016", "0.60040253", "0.59565103", "0.59553313", "0.5901126", "0.5869842", "0.58462864", "0.58453465", "0.5840993", "0.5840375", "0....
0.79267335
0
Return whether there are OIDs to fetch.
def LVZQ(YKHO): return bool(YKHO.scalar_oids or YKHO.next_oids or YKHO.bulk_oids)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zvlO(YKHO):\n try:\n if YKHO.orcid:\n return True\n except kaQ_.DoesNotExist:\n pass\n return False", "def yWbd(YKHO):\n return True", "def nQgm(YKHO):\n return bool(YKHO.mapper.count())", "def W32_(YKHO):\n N1p7 = YKHO._exec(YKHO.select)\n return bool(N1p7.f...
[ "0.6610158", "0.6299308", "0.627192", "0.6152724", "0.6100274", "0.6010182", "0.6003457", "0.59998894", "0.5993669", "0.59936076", "0.59219676", "0.58593106", "0.5822894", "0.58148885", "0.5794466", "0.5760256", "0.5752229", "0.57419944", "0.57393235", "0.5730104", "0.5728904...
0.6889557
0
x.__nonzero__() x != 0
def ebnO(YKHO): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ebnO(YKHO):\n for tTpl in YKHO:\n if tTpl != 0:\n return True\n return False", "def ebnO(YKHO):\n return YKHO.value.__nonzero__()", "def ebnO(YKHO):\n return YKHO.__nonzero", "def ebnO(YKHO):\n return YKHO.__nonzero", "def ebnO(YKHO):\n return not YKHO.as_point == (0...
[ "0.77507436", "0.76362675", "0.74977964", "0.74977964", "0.749715", "0.7277969", "0.71057385", "0.70980686", "0.7076215", "0.7038673", "0.7013006", "0.69773006", "0.6971467", "0.69356734", "0.6927782", "0.6920768", "0.690163", "0.6892301", "0.6864851", "0.6852248", "0.6836008...
0.61815006
78
x.__nonzero__() x != 0
def ebnO(YKHO): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ebnO(YKHO):\n for tTpl in YKHO:\n if tTpl != 0:\n return True\n return False", "def ebnO(YKHO):\n return YKHO.value.__nonzero__()", "def ebnO(YKHO):\n return YKHO.__nonzero", "def ebnO(YKHO):\n return YKHO.__nonzero", "def ebnO(YKHO):\n return not YKHO.as_point == (0...
[ "0.77507436", "0.76362675", "0.74977964", "0.74977964", "0.749715", "0.7277969", "0.71057385", "0.70980686", "0.7076215", "0.7038673", "0.7013006", "0.69773006", "0.6971467", "0.69356734", "0.6927782", "0.6920768", "0.690163", "0.6892301", "0.6864851", "0.6852248", "0.6836008...
0.61815006
79
Set up test data for the whole TestCase (only run once for the TestCase)
def izSt(Emd4): tOFR.run()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FCbF(YKHO):\n YKHO.test_data_path = 'testing/test_data/'", "def FCbF(YKHO):\n YKHO.dataset = eis1()", "def izSt(Emd4):\n BJsk.initialize_empty_volunteer()", "def FCbF(YKHO):\n YKHO.dataset = YKHO.dataset_cls()", "def FCbF(YKHO):\n YKHO.data_list = ['hello', 'world', 'funilrys', 'funceble...
[ "0.8151314", "0.81394684", "0.805013", "0.7755899", "0.77489984", "0.77354276", "0.7571873", "0.75621843", "0.7557796", "0.75538814", "0.75478435", "0.75068873", "0.7504429", "0.7477761", "0.74667764", "0.7459755", "0.744017", "0.74311286", "0.743051", "0.7430405", "0.7407945...
0.804802
4
Returns the average Lipschitz constant of individual losses. This is particularly useful for stepsize tuning of some solvers. Returns
def X98e(YKHO) -> float: if YKHO._fitted: return YKHO._model.get_lip_mean() else: raise ValueError('call ``fit`` before using ``get_lip_max``')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zIzJ(YKHO):\n return sum([XP5J.kl_loss() for XP5J in YKHO.parameters])", "def gSqT(YKHO):\n pass", "def nUfw() -> float:\n return 0.49", "def Y6R5(YKHO) -> float:\n return YKHO.net_worth / YKHO.initial_net_worth", "def L8kW(YKHO):\n return YKHO.loss / YKHO.cnt", "def sjTf(YKHO, WKvO: n...
[ "0.6473362", "0.6340902", "0.6306362", "0.62927824", "0.6193142", "0.61590755", "0.6148258", "0.6075791", "0.6062522", "0.6056253", "0.6053945", "0.60419226", "0.5998071", "0.59977627", "0.59831244", "0.5978852", "0.5951738", "0.5946855", "0.59379184", "0.58999115", "0.589791...
0.53774506
100
Update the binary classification weights.
def MyUA(YKHO, YSCq, HTqh, pnIH): GamQ = {'mu': oyIN.zeros(YSCq['alpha'].shape), 'sigma': oyIN.zeros((YKHO.task_count, YKHO.R + 1, YKHO.R + 1))} LqHq = oyIN.sum(HTqh['mu'], axis=1) CQH3 = HTqh['mu'] @ HTqh['mu'].transpose() + HTqh['sigma'] * YKHO.sample_count for YRbF in range(YKHO.task_count): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MyUA(YKHO):\n pass", "def MyUA(YKHO):\n YKHO._weights = YKHO._weights + YKHO.update_weights_value", "def MyUA(YKHO):\n YKHO._weights = YKHO._weights + YKHO.update_weights_value\n YKHO.weights_clipping()", "def FUu9(YKHO, DjXD):\n GZiu = YKHO.collectAllBranches()\n for YRbF in range(YKHO...
[ "0.81484026", "0.7942983", "0.7688436", "0.7426983", "0.7407733", "0.72915196", "0.7123603", "0.71039957", "0.69634324", "0.6960061", "0.6852013", "0.6832201", "0.6823326", "0.6806129", "0.6785535", "0.67735934", "0.6764993", "0.67589414", "0.6729023", "0.6715791", "0.6697946...
0.0
-1
Returns the number of seconds from the epoch to date. Should match the number returned by the equivalent function in postgres.
def IMJE(_c1T): g75m = _c1T - qtWj return g75m.days * 86400 + g75m.seconds + float(g75m.microseconds) / 1000000
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IMJE(_c1T):\n g75m = _c1T - qtWj\n return g75m.days * 86400 + g75m.seconds + float(g75m.microseconds) / 1000000", "def SWek(ppPa, qtWj=None):\n return ccOx(ppPa) / 10.0 ** 6", "def mqoM():\n wzkt = qcWV.datetime.utcnow()\n qtWj = qcWV.datetime(1970, 1, 1)\n return (wzkt - qtWj).total_seco...
[ "0.8104526", "0.7947113", "0.750754", "0.7160082", "0.70695573", "0.68526405", "0.67466754", "0.6745077", "0.6721347", "0.66505826", "0.6621885", "0.6621885", "0.6607314", "0.6590369", "0.65068203", "0.64717203", "0.6453204", "0.64264446", "0.6402945", "0.6367948", "0.6337083...
0.8093896
1
Build a dictionary through a list of words
def o18O(YKHO, dict): YKHO.all_words = set(dict) YKHO.wc_dict = g760.defaultdict(int) for yzQ0 in dict: for Uf4h in YKHO.get_wildcards(yzQ0): YKHO.wc_dict[Uf4h] += 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BCj6(vwCE):\n Csk6 = dict()\n for YRbF in vwCE:\n H5ew = ''.join(sorted(list(YRbF)))\n if H5ew in Csk6:\n Csk6[H5ew].append(YRbF)\n else:\n Csk6[H5ew] = [YRbF]\n return Csk6", "def K63D(V22M):\n dixj = MabX(set([YKHO.normalize(yzQ0) for yzQ0 in V22M] + V...
[ "0.7771935", "0.7714796", "0.76650697", "0.75896126", "0.75077", "0.7402118", "0.7371921", "0.7257023", "0.724838", "0.72190464", "0.71511894", "0.7121465", "0.70906883", "0.70329714", "0.69910663", "0.6939837", "0.6926235", "0.69013107", "0.68620795", "0.68157786", "0.680981...
0.6463316
40
Returns if there is any word in the trie that equals to the given word after modifying exactly one character
def TgwQ(YKHO, GIN8): for Uf4h in YKHO.get_wildcards(GIN8): if Uf4h in YKHO.wc_dict and (YKHO.wc_dict[Uf4h] > 1 or GIN8 not in YKHO.all_words): return True return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Gtm1(ZOCz, vIwR: str) -> bool:\n return any((yzQ0 == vIwR for yzQ0 in ZOCz))", "def TgwQ(YKHO, GIN8):\n ZbOB = YKHO.trie\n for YRbF, Npgh in enumerate(GIN8):\n ZbOB = ZbOB.get(Npgh, {})\n if ZbOB:\n continue\n else:\n break\n if YRbF == len(GIN8) - 1 and...
[ "0.78987586", "0.7713067", "0.76827085", "0.7650699", "0.74977815", "0.74953616", "0.7492678", "0.74721324", "0.7441035", "0.7440776", "0.7415909", "0.7413349", "0.73969525", "0.7383449", "0.7365638", "0.7334273", "0.73318183", "0.72946453", "0.72943574", "0.72771394", "0.727...
0.6678582
81
Uses the POST api endpoint to post a single sensor reading.
def m8z6(SKCf, PXGI, BWXx, E3oo=True): pB3N = {'key': SKCf, 'unit': PXGI, 'value': BWXx, 'lat': cv__, 'lon': _P6Y} if E3oo: pB3N['timestamp'] = qcWV.datetime.now().strftime('%Y%m%d%H%M%S') _hkX = G4JS.post(Ygj9, data=pB3N) return _hkX
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def m8z6(YKHO, QePW, _sei):\n zgjV = open(gCuF.BASE_DIR + '/sensorapp/sensor_data.json').read()\n JWgk = qQXR.loads(zgjV)\n fajq = JWgk['sensor_data']\n Cp4Q = []\n for nPrm in fajq:\n nPrm['reading_timestamp'] = ITS7.mktime(qcWV.datetime.strptime(nPrm['reading_date'], '%Y-%m-%d').timetuple()...
[ "0.68284583", "0.64752597", "0.61823404", "0.6127135", "0.6031738", "0.6024244", "0.5988254", "0.57938683", "0.57245433", "0.5701917", "0.56954366", "0.56829286", "0.56318027", "0.55595946", "0.55236", "0.5492572", "0.5489064", "0.5471483", "0.5461013", "0.5447577", "0.542669...
0.53772163
22
Given a review ID, return the description associated with that review.
def t5do(YKHO, id, lO87=None): lO87 = YKHO.get_year(id, switch='reviews') if lO87 is None else lO87 Slbv = YKHO.get_review(id, lO87) return Slbv['description']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def c_1S(YKHO, hbFX):\n N1p7 = YKHO._connection.cursor()\n Dln7 = XTLB('reviews')\n Dln7 += ' WHERE id_ = ?'\n N1p7.execute(Dln7, (hbFX,))\n for rdlD in N1p7:\n return Go9Q(rdlD, WZLK)\n return None", "def c_1S(YKHO, id):\n w2IS = '/v3/educator/reviews/%s' % id\n Aofo = YKHO.reques...
[ "0.787991", "0.7046271", "0.67535424", "0.6628309", "0.65394425", "0.64600104", "0.64537233", "0.64390373", "0.6385218", "0.59808385", "0.59547967", "0.58935773", "0.5813767", "0.5792099", "0.5784452", "0.5667967", "0.56483", "0.5647745", "0.5644596", "0.5643746", "0.5622614"...
0.8336716
0
Get the total free energy of a harmonic oscillator with this frequency and these atoms. Temperatures are clipped at 1 microKelvin.
def Mob5(YKHO, aoB2=None): if aoB2 is None: aoB2 = YKHO.input.temperature aoB2 = oyIN.clip(aoB2, 1e-06, oyIN.inf) UqYS = 1.0 / (jzF4 * aoB2) return -3 * len(YKHO.input.structure) * oyIN.log(oyIN.pi / (YKHO.input.spring_constant * UqYS)) / (2 * UqYS)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ksp9(YKHO, aoB2=None):\n if aoB2 is None:\n aoB2 = YKHO.input.temperature\n aoB2 = oyIN.clip(aoB2, 1e-06, oyIN.inf)\n UqYS = 1.0 / (jzF4 * aoB2)\n eHNT = 0\n for r8hN in YKHO.input.structure.get_masses():\n sYsH = OiOf * oyIN.sqrt(YKHO.input.spring_constant / r8hN) * qT4B\n ...
[ "0.7245388", "0.70027137", "0.69853157", "0.6729733", "0.6721604", "0.66150934", "0.6579566", "0.6450256", "0.64264965", "0.6419435", "0.6412604", "0.6394664", "0.63616216", "0.6354492", "0.63448423", "0.6294995", "0.6291252", "0.62784314", "0.62776107", "0.6254628", "0.62499...
0.67386603
3
Get the total free energy of a harmonic oscillator with this frequency and these atoms. Temperatures are clipped at 1 microKelvin.
def ksp9(YKHO, aoB2=None): if aoB2 is None: aoB2 = YKHO.input.temperature aoB2 = oyIN.clip(aoB2, 1e-06, oyIN.inf) UqYS = 1.0 / (jzF4 * aoB2) eHNT = 0 for r8hN in YKHO.input.structure.get_masses(): sYsH = OiOf * oyIN.sqrt(YKHO.input.spring_constant / r8hN) * qT4B eHNT += 3.0 /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rZnx(YKHO, Kt_s=0, V6IE=0, fHXl={}):\n return YKHO.energy", "def M6MN(YKHO):\n return YKHO.momentum * YKHO.momentum / (2 * YKHO.mass)", "def Mob5(YKHO, aoB2=None):\n if aoB2 is None:\n aoB2 = YKHO.input.temperature\n aoB2 = oyIN.clip(aoB2, 1e-06, oyIN.inf)\n UqYS = 1.0 / (jzF4 * aoB2)...
[ "0.7003301", "0.6984585", "0.6740122", "0.67287576", "0.67200327", "0.6613455", "0.65786207", "0.6449017", "0.6427686", "0.64179045", "0.64122105", "0.6393598", "0.6360696", "0.63530034", "0.63423496", "0.629455", "0.62888", "0.62775683", "0.6276775", "0.6253897", "0.62496376...
0.72456896
0
Posting a post with an invalid body
def ozkZ(YKHO): nPrm = {'title': 32, 'rent': 700} geh0 = YKHO.client.post('/api/posts', data=qQXR.dumps(nPrm), content_type='application/json', headers=[('Accept', 'application/json')]) YKHO.assertEqual(geh0.status_code, 422) nPrm = qQXR.loads(geh0.data) YKHO.assertEqual(nPrm['message'], "32 is not ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Qco6(YKHO):\n YKHO._login_as_staff()\n geh0 = YKHO.client.post(YKHO.path())\n assert geh0.status_code == 400", "def VyLQ(YKHO):\n geh0 = YKHO.post(title='foo')\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_400_BAD_REQUEST)", "def sgWc(YKHO):\n YKHO.is_authenticated()\n geh0 = YKHO.pos...
[ "0.72845495", "0.70353395", "0.6914541", "0.6890934", "0.6829769", "0.68229645", "0.67496055", "0.66929364", "0.6626599", "0.6624536", "0.6614122", "0.66037023", "0.6530199", "0.64720976", "0.64591336", "0.63967395", "0.6393242", "0.63932115", "0.63788515", "0.6335431", "0.63...
0.6453764
15
Timezone aware UTC now.
def wj6w() -> qcWV.datetime: return qcWV.datetime.utcnow().replace(tzinfo=FXGE.UTC)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def W5lc():\n return qcWV.datetime.now(FXGE.utc)", "def Aues():\n return qcWV.now(tz=rIAI.utc)", "def SsoH() -> qcWV:\n return qcWV.now(rIAI.utc)", "def BosD() -> qcWV:\n return qcWV.now(rIAI.utc)", "def Aues():\n xUMo = qcWV.utcnow()\n xUMo = FXGE.utc.localize(xUMo)\n return xUMo", ...
[ "0.8509725", "0.83848816", "0.822516", "0.8159737", "0.81217617", "0.8110946", "0.8104256", "0.8081836", "0.8045279", "0.7912622", "0.7880216", "0.784423", "0.7733743", "0.7718092", "0.76843685", "0.76723087", "0.74987286", "0.74987286", "0.74686915", "0.744483", "0.73215675"...
0.7934128
9
Return duration in seconds.
def N8Pq(YKHO): if YKHO.start and YKHO.end: return (YKHO.end - YKHO.start).total_seconds() return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def m3XP(YKHO):\n return YKHO.get_data('duration_in_seconds')", "def kDRY(YKHO):\n WbTE = 0.0\n if YKHO.is_video() or YKHO.is_audio():\n if YKHO.__dict__['duration']:\n try:\n WbTE = float(YKHO.__dict__['duration'])\n except ValueError:\n raise ...
[ "0.852767", "0.8103076", "0.8089623", "0.8077145", "0.8036213", "0.7942442", "0.7942442", "0.7942442", "0.7942442", "0.7942442", "0.7942442", "0.7942442", "0.7942442", "0.7940655", "0.7915932", "0.78827506", "0.78798556", "0.7866422", "0.78646374", "0.786395", "0.78328675", ...
0.0
-1
Record the end timestamp for the given key. Can be called multiple times with the same key, which will keep overwriting the previous `end` timestamp.
def Os4s(YKHO, H5ew): if H5ew not in YKHO: raise KeyError('`start` missing for {}, cannot record end.'.format(H5ew)) YKHO[H5ew] = Kx1f(YKHO[H5ew].start, wj6w())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gO0s(YKHO, i8WE):\n SaH1 = YKHO.floor_time(i8WE)\n if YKHO.last_timestamp is None or SaH1 > YKHO.last_timestamp:\n YKHO.last_timestamp = SaH1", "def ldOB(YKHO, ldOB):\n YKHO._end_time_stamp = ldOB", "def Os4s(YKHO, Os4s):\n if Os4s is None:\n YKHO._set('end', Os4s)\n else:\n ...
[ "0.69299734", "0.67263526", "0.64030427", "0.6373018", "0.6339404", "0.6339404", "0.63353074", "0.63353074", "0.63353074", "0.62768495", "0.62768495", "0.62768495", "0.6258943", "0.6013547", "0.5966932", "0.59355545", "0.5928336", "0.5925922", "0.5910351", "0.59091824", "0.59...
0.72512233
0
Format seconds in hours / minutes / seconds in readable format. >>> format_duration(3730) 1 hours 2 minutes 10 seconds
def DhpL(WbTE: int) -> str: assert WbTE > 0, '`duration` must be nonzero number.' Wave = WbTE / 3600 O66n = WbTE // 60 % 60 C6wh = WbTE % 60 Aofo = [] if Wave >= 1: Aofo.append('{} hours'.format(Wave)) if O66n >= 1: Aofo.append('{} minutes'.format(O66n)) if C6wh: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TmWH(WbTE):\n return tz8A.format_seconds(WbTE)", "def DhpL(C6wh: float) -> str:\n if C6wh < 60:\n return f'{C6wh:.0f}s'\n elif C6wh < 3600:\n O66n = epAf.floor(C6wh / 60)\n C6wh -= O66n * 60\n return f'{O66n}m{C6wh:.0f}s'\n else:\n Wave = epAf.floor(C6wh / 3600)...
[ "0.8108612", "0.7742682", "0.74755687", "0.7340124", "0.7328268", "0.7299271", "0.71376383", "0.70367026", "0.6974592", "0.6938442", "0.6870475", "0.68475163", "0.68394333", "0.67895496", "0.6773892", "0.67423147", "0.6723701", "0.66851234", "0.66821474", "0.6650317", "0.6629...
0.77792287
1
Returns right boundary mps __| __| __|
def ZwnB(lWPh, aPd6): lYEE = oyIN.zeros([aPd6], oyIN.object) FY1h = oyIN.zeros([lWPh, lWPh]) Jh7B = oyIN.zeros([lWPh, lWPh, lWPh]) FY1h[epBp, epBp] = 1 FY1h[jzdc, jzdc] = 1 Jh7B[epBp, jzdc, epBp] = 1 Jh7B[jzdc, jzdc, jzdc] = 1 Jh7B[epBp, epBp, jzdc] = 1 lYEE[0] = FY1h for YRbF in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ci39(YKHO):\n rVnq = oyIN.arange(0.0, 2.0 * oyIN.pi, 0.1)\n BzR2 = oyIN.ones_like(rVnq) * 110 * oyIN.pi / 180.0\n uOJ7 = oyIN.ones_like(rVnq) * 70 * oyIN.pi / 180.0\n EV9X, H_5F = YKHO.gc2radec(rVnq, BzR2)\n C8HN, fZuO = YKHO.gc2radec(rVnq, uOJ7)\n return ((C8HN, fZuO), (EV9X, H_5F))", "def...
[ "0.6416118", "0.6079651", "0.59029", "0.5893384", "0.5807296", "0.5682659", "0.56805384", "0.5666723", "0.56307274", "0.5573946", "0.55631995", "0.55461586", "0.5504188", "0.54996026", "0.5487034", "0.5478181", "0.54719824", "0.5462099", "0.54616183", "0.5426012", "0.5426012"...
0.5476311
16
Test whether the highlevel GFF3 interface can properly read the features from a GFF3 file and write these properties to a file without data changing. The 'phase' is tested additionally, since it is not part of a `Feature` object.
def jhS6(pmON): xD4m = hIrY.GFFFile.read(gzes(h_xa('sequence'), pmON)) DkhC = hIrY.get_annotation(xD4m) g7im = [] for bGrB, bGrB, type, bGrB, bGrB, bGrB, bGrB, JT9N, bGrB in xD4m: if type == 'CDS': g7im.append(JT9N) xD4m = hIrY.GFFFile() hIrY.set_annotation(xD4m, DkhC) yc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def EAro(YKHO, j5gs):\n with open(j5gs) as apum:\n set = None\n for zFiD in apum:\n if zFiD[0] == '#':\n if zFiD[:3] == '###' and set:\n YKHO.sets.append(set)\n set = None\n if zFiD.startswith('##sequence-region'):\n ...
[ "0.5861071", "0.55998117", "0.55320144", "0.552993", "0.55164295", "0.5408356", "0.53901905", "0.5344513", "0.53081614", "0.52478", "0.52320164", "0.5230046", "0.5220379", "0.52139574", "0.51998216", "0.518737", "0.5185574", "0.518532", "0.5182513", "0.5175064", "0.51746464",...
0.5445151
5
Setup the sensor platform.
def AbqV(ajET, GPtr, uVcJ, tR5e=None): CCpH = ajET.data.get(aJyA) if not CCpH: return oB5g = [] fJ6C = {T7F4: {JwK2: CCpH.get_weekday, VDgb: None}, KxWU: {JwK2: CCpH.get_day_part, VDgb: None}, d2Qy: {JwK2: CCpH.get_current_profile, VDgb: CCpH.get_current_profile_data_parts}, OMCy: {JwK2: CCpH.ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AbqV(ajET, GPtr, deL4, tR5e=None):\n pmwE = zgvu(GPtr[VMxG])\n pmwE.start()\n NYTb = tb4Y(ajET, VMxG, pmwE)\n deL4([NYTb])", "def _kZf(YKHO, b32v):\n YKHO.__sensors = YKHO.setup_components(b32v, 'scale_client.sensors')", "def AbqV(ajET: HomeAssistant, GPtr: ConfigType, uVcJ: AddEntitiesCallb...
[ "0.7249521", "0.7210104", "0.7194671", "0.7163429", "0.7035067", "0.6979973", "0.6975266", "0.69677466", "0.696644", "0.6903852", "0.690341", "0.6835207", "0.6825917", "0.680988", "0.679155", "0.67871094", "0.6784935", "0.6776815", "0.6770015", "0.67620605", "0.67544883", "...
0.6571912
35
Return the state of this sensor.
def QTBn(YKHO): return YKHO._state
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def QTBn(YKHO):\n return YKHO.device.device_data[YKHO.device_id][YKHO._sensor_type]", "def QTBn(YKHO):\n if YKHO.coordinator.data:\n return YKHO.coordinator.data[YKHO._sensor]", "def QTBn(YKHO):\n return YKHO.device.value()", "def QTBn(YKHO):\n return YKHO._device.value", "def QTBn(YKHO)...
[ "0.8998373", "0.8456933", "0.8426156", "0.8404828", "0.8316373", "0.82554173", "0.82472205", "0.817695", "0.8155576", "0.80494386", "0.8019522", "0.8004513", "0.7848942", "0.7848942", "0.7800974", "0.7787611", "0.7747029", "0.7741532", "0.77304995", "0.7725836", "0.7724544", ...
0.0
-1
Return the state attributes.
def R1i3(YKHO): return YKHO._attributes
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def upgy(YKHO):\n return YKHO._attributes", "def upgy(YKHO):\n return YKHO._attributes", "def R1i3(YKHO):\n return YKHO.attributes", "def R1i3(YKHO):\n return YKHO._state_attrs", "def R1i3(YKHO):\n return YKHO._state_attrs", "def R1i3(YKHO):\n return YKHO._attributes", "def upgy(YKHO)...
[ "0.8953404", "0.8953404", "0.85239846", "0.8366765", "0.8366765", "0.8363429", "0.83362615", "0.8334551", "0.8310377", "0.8292682", "0.8289349", "0.8289349", "0.8273077", "0.82236886", "0.8223562", "0.8205066", "0.8184393", "0.81659013", "0.8102565", "0.8064994", "0.8064994",...
0.82871646
14
Return the full path to the data directory, ensuring that it exists. If the 'data_dir' configuration parameter is set, checks that it exists and returns it (doesn't automatically create it). Otherwise, uses `(astropy cache dir)/sncosmo` (automatically created if it doesn't exist).
def xe5l(): if Fv2L.data_dir is not None: if Hy7s.path.isdir(Fv2L.data_dir): return Fv2L.data_dir else: raise RuntimeError('data directory {0!r} not an existing directory'.format(Fv2L.data_dir)) else: h_xa = gzes(Hz4f(), 'sncosmo') if not Hy7s.path.isdir(h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xe5l() -> str:\n Hy7s.makedirs(uQWv, exist_ok=True)\n return uQWv", "def h_xa():\n return viqz.datadir", "def s8df():\n return Hy7s.getcwd() + '/data/'", "def xe5l():\n if not IOA_:\n nWeE = Hy7s.path.abspath(Hy7s.path.join(Hy7s.path.dirname(xAKo), '..', 'data'))\n if Hy7s.pa...
[ "0.72709966", "0.7191842", "0.7052607", "0.70512253", "0.7007311", "0.69776547", "0.6940576", "0.6867808", "0.6831866", "0.67782056", "0.67562294", "0.6742938", "0.6739254", "0.6736782", "0.6700761", "0.6687532", "0.6672271", "0.6668328", "0.66304797", "0.6626105", "0.6616323...
0.86421114
0
Removes a queue from the shard catalog. Call this method after successfully deleting it from a backend shard.
def phKE(YKHO, gGq6, bNKA=None): YKHO._invalidate_cached_id(gGq6, bNKA) YKHO._catalogue_ctrl.delete(bNKA, gGq6)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ecnt(YKHO):\n YKHO.work_queue_client.delete_queue()", "def yOCd(YKHO, gGq6) -> None:\n YKHO.receive_queues.remove(gGq6)", "def yOCd(YKHO, gGq6):\n with YKHO.mutex:\n YKHO.queues.remove(gGq6)", "def SmHU(YKHO, gGq6):\n gGq6.delete()", "def ecnt(YKHO, Q64Y: str) -> None:\n if Q64Y i...
[ "0.7496421", "0.73610497", "0.73293966", "0.7305945", "0.72437954", "0.72253674", "0.7151214", "0.7142337", "0.71367115", "0.7116734", "0.7023352", "0.6969044", "0.68962514", "0.6785475", "0.6775993", "0.6749584", "0.67103916", "0.6655882", "0.65476745", "0.65264994", "0.6509...
0.65470827
19
Returns the updated interpolated data if the instance has is_raw_data = False. Else the raw data is returned.
def NMoC(YKHO): if not YKHO.is_raw_data and YKHO._interp_xs is not None: return YKHO.get_interpolation() return (YKHO._ys, YKHO._xs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SwtT(YKHO):\n if YKHO._img and YKHO.is_4d():\n ycBG = YKHO._img.get_data(caching='unchanged')\n ycBG = oyIN.rot90(ycBG)\n for HRJ_ in YKHO._loaded_time_list:\n ycBG[..., HRJ_] = YKHO._data[..., HRJ_]\n else:\n ycBG = YKHO._data.copy()\n return oyIN.rot90(ycBG, 3)...
[ "0.63492435", "0.6335329", "0.6186918", "0.61409134", "0.60807425", "0.6053128", "0.6053128", "0.6002188", "0.6002188", "0.5993923", "0.5940913", "0.5885374", "0.5848196", "0.5813982", "0.57514167", "0.572691", "0.57145023", "0.5706114", "0.5624072", "0.5597885", "0.5597111",...
0.56316906
18
Get range of map between start and end px. This method allows to store abstract frequency maps without information that is specific to the track.
def YdOG(YKHO): return YKHO.get_raw_ys()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def B3g4():\n PAzV = {'lt': [0.0, 24.0], 'lon': [0.0, 360.0], 'angle': [0.0, 2.0 * oyIN.pi]}\n return PAzV", "def a6BD(YKHO, xlLU):\n zBlf = {'2 nA': gu7a.Ammeter.CurrentRange.N2, '20 nA': gu7a.Ammeter.CurrentRange.N20, '200 nA': gu7a.Ammeter.CurrentRange.N200, '2 uA': gu7a.Ammeter.CurrentRange.U2, '20 ...
[ "0.663399", "0.64556164", "0.62715036", "0.62069154", "0.6182567", "0.61762357", "0.61409974", "0.61368495", "0.61176187", "0.6080028", "0.60486376", "0.6042315", "0.6037796", "0.6031462", "0.60078406", "0.59257025", "0.59251624", "0.5918538", "0.59124076", "0.59042615", "0.5...
0.5880148
21
Calculate the precision of measurement (percent RSD) for a column of data. Allow for inf, inf values in input.
def uLze(t1_1): M1Jx = XTiz.std(t1_1) ckJd = M1Jx / XTiz.mean(t1_1) * 100 if XTiz.isnan(ckJd): ckJd = XTiz.inf return ckJd
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gCUM(YKHO):\n raise NotImplementedError", "def rhd_(YKHO):\n hG7h, g1pg = (len(YKHO.__true_positives), len(YKHO.__false_positives))\n return float(hG7h) / (hG7h + g1pg)", "def QyH8(YKHO):\n return round(CCGu(YKHO.actual, YKHO.predicted), 2)", "def OK6l(YKHO) -> float:\n cnnd = [p4BK, IrbE,...
[ "0.6148764", "0.6081337", "0.6030484", "0.6028098", "0.6025829", "0.6017732", "0.60029876", "0.59590054", "0.59561014", "0.59508973", "0.59438634", "0.5887117", "0.58840007", "0.58820784", "0.58729804", "0.5861612", "0.58602184", "0.5833024", "0.58086485", "0.58077693", "0.57...
0.6870618
0
Compute the IoU between two arrays If the arrays are probabilities (floats) instead of predictions (integers or booleans) they are automatically rounded to the nearest integer and converted to bool before the IoU is computed.
def _nRW(Y8eF, aMgO, PJWX=False): CzNp = oyIN.finfo(float).eps if Y8eF.dtype in [oyIN.float32, oyIN.float64]: Y8eF = Y8eF.round().astype(bool) if aMgO.dtype in [oyIN.float32, oyIN.float64]: aMgO = aMgO.round().astype(bool) Y8eF = Y8eF.ravel() aMgO = aMgO.ravel() iQin = oyIN.sum(Y...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cxP1(o3Uj, pan_):\n iQin = oyIN.logical_and(o3Uj, pan_)\n b65I = oyIN.logical_or(o3Uj, pan_)\n return oyIN.sum(iQin) / oyIN.sum(b65I)", "def yTYk(aTLP, Crrw, KAvf=1.0, F8Q6=False):\n aTLP = (aTLP.float().view(-1, 1, 1, 1).data > 0).float()\n Crrw = Crrw.view(-1, 1, 1, 1)\n if not F8Q6:\n ...
[ "0.7120553", "0.6559061", "0.65034837", "0.6463628", "0.6455993", "0.6454782", "0.64154756", "0.6389634", "0.6259211", "0.6241029", "0.62167686", "0.6188566", "0.61399513", "0.61398494", "0.61191815", "0.61154073", "0.6104779", "0.60889775", "0.6078737", "0.6071421", "0.60485...
0.55505836
59
if input a vector, return a diagonal matrix
def KPsj(YKHO, input, Wc9F): if len(input.size()) == 1: return ht2j.diag(input) if len(input.size()) == 2: if not Wc9F: return ht2j.diag(he6J(input)) else: Lgqc = ht2j.Tensor().to(YKHO.device) for YRbF in range(input.size()[0]): Lgqc = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def g26e(iArr):\n TXzq = i912.shape(iArr)[-1]\n _E99 = i912.eye(TXzq)\n _E99 = i912.cast(_E99, iArr.dtype)\n ivq9 = i912.einsum('...i,ij->...ij', iArr, _E99)\n return ivq9", "def TaGW(he6J):\n U5bT = II46((len(he6J), len(he6J)))\n for YRbF in range(len(he6J)):\n grAN(U5bT, YRbF, YRbF,...
[ "0.8390741", "0.81109643", "0.7800452", "0.7622944", "0.7312805", "0.724312", "0.7212917", "0.7113068", "0.69213337", "0.6800939", "0.6703636", "0.6647841", "0.66257715", "0.6548756", "0.6518099", "0.6459483", "0.64542425", "0.6412448", "0.638988", "0.6384865", "0.6357297", ...
0.6375012
20
Fast check to determine of the edge is a border.
def V9Ys(YKHO, gwAu): def Oihx(EBgd, HpuQ, Lq8X): return oyIN.linalg.norm(oyIN.cross(HpuQ - EBgd, EBgd - Lq8X)) / oyIN.linalg.norm(HpuQ - EBgd) c13l = 0 for XP5J in YKHO.shape: c13l += Oihx(YKHO.shape[0], YKHO.shape[-1], XP5J) return c13l < gwAu
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oxL1(YKHO):\n if YKHO._row == 0 or YKHO._row == 9 or YKHO._column == 0 or (YKHO._column == 9):\n if not YKHO.is_corner():\n return True\n return False", "def V9Ys(BHsk, BA7i):\n return BHsk[0] <= 0 or BHsk[0] >= BA7i['bottom'] or BHsk[1] <= 0 or (BHsk[1] >= BA7i['right'])", "def ...
[ "0.7551858", "0.75158983", "0.7363427", "0.70759135", "0.7023558", "0.6860162", "0.6730458", "0.6684477", "0.665951", "0.6631665", "0.6615347", "0.6584409", "0.65555423", "0.65503985", "0.65308964", "0.6503788", "0.64706427", "0.64044964", "0.6314697", "0.63030803", "0.629132...
0.68804514
5
Computes the acceleration of one particle based on the distance to the other particles of the space
def sgTf(YKHO, fuBA): YAq3 = oyIN.array([0.0, 0.0]) for Q7me in YKHO.particles: oDkW = ((Q7me.x - fuBA[0]) ** 2 + (Q7me.y - fuBA[1]) ** 2) ** 1.5 if oDkW < 100000.0: continue YAq3 += Q7me.mass / oDkW * yvY1 * oyIN.array([Q7me.x - fuBA[0], Q7me.y - fuBA[1]]) return YAq3
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DHvX(XRJn, H_W3):\n g4we = XRJn.position\n dC8m = H_W3.position\n hGqb = oyIN.sqrt((g4we.x - dC8m.x) ** 2 + (g4we.y - dC8m.y) ** 2 + (g4we.z - dC8m.z) ** 2)\n return yvY1 * XRJn.mass * H_W3.mass / hGqb ** 2", "def LDyh(YKHO, WKvO, LVAh):\n PiiY = yvY1 * YKHO.m / (WKvO * WKvO + LVAh * LVAh) * -...
[ "0.6733729", "0.6674904", "0.666162", "0.6610552", "0.6446342", "0.63871706", "0.6303397", "0.6270542", "0.6147492", "0.6106558", "0.61039454", "0.60831136", "0.6082944", "0.6076739", "0.6057781", "0.60250044", "0.5993674", "0.59509516", "0.5943108", "0.59070504", "0.5898085"...
0.688044
0
Takes an variable len batch of visual features and preprocess them through a transformer. Output a tensor with the same shape as visual_feats passed in input.
def KVH6(YKHO, VvAY, Q4Vw=None, oUSw=None): VvAY = VvAY.permute(1, 0, 2) if YKHO.pos_encoding is not None: VvAY = YKHO.pos_encoding_image(VvAY, oUSw) if Q4Vw is not None: lHmx = VvAY.shape[1] wzH_ = max(Q4Vw) ZHfW = ht2j.zeros(lHmx, wzH_).bool() for tTpl, vC9B in zip(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nPIK(CK9p, biH0):\n CK9p = CK9p.convert('L')\n CK9p = biH0(CK9p)\n CK9p = CK9p.reshape(-1, g75m.get_resize(PSrQ.is_small_resize)[0], g75m.get_resize(PSrQ.is_small_resize)[1], 1)\n CK9p = CK9p.permute(3, 0, 1, 2)\n if lDLs.is_available():\n return CK9p.type('torch.cuda.FloatTensor')\n e...
[ "0.6077393", "0.5973481", "0.5960856", "0.5828423", "0.5781957", "0.578063", "0.57423276", "0.5725372", "0.5722356", "0.56060934", "0.5564434", "0.55016184", "0.5497879", "0.54914296", "0.54840076", "0.546409", "0.5461935", "0.54394686", "0.54394686", "0.5435605", "0.5434803"...
0.62456757
0
Returns the duration for an incident; if the incident is not resolved the duration is from start until now.
def MM1K(xDh8): KAOn = SzfX(xDh8.created_at) if xDh8.status == 'resolved': cV9T = SzfX(xDh8.last_status_change_at) else: cV9T = qcWV.now() return str(cV9T - KAOn)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def EdTY(YKHO):\n return (YKHO.stop_day - YKHO.start_day) * (24 * 60) + (YKHO.stop_hour - YKHO.start_hour) * 60", "def EdTY(YKHO):\n YRbF = YKHO.icalendar_component\n return YKHO._get_duration(YRbF)", "def EdTY(YKHO, YEnM):\n KAOn = YEnM.started_at\n Pt1K = YEnM.finished_at\n if KAOn and Pt1K...
[ "0.6775093", "0.67330843", "0.6608493", "0.6591439", "0.6541086", "0.65239006", "0.6468536", "0.6462862", "0.6387129", "0.619435", "0.61542225", "0.61335915", "0.6112901", "0.61113423", "0.6044302", "0.6036117", "0.6009817", "0.6004777", "0.60003275", "0.6000319", "0.5981661"...
0.8086599
0
Creates a printable representation of the map service. returns a string for printing.
def wHJl(YKHO): qI1H = ' - {0}' fpSO = ' + {0}' hlel = ['{0} ({1})'.format(YKHO.name, YKHO.url)] hlel.append('-' * len(hlel[0])) hlel.append(' {0}'.format(YKHO.mxd)) for NCls in YKHO._dbnames: hlel.append(qI1H.format(NCls)) for FBfN in sorted(YKHO._datastructure[NCls]): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OaWK(YKHO):\n print(YKHO.__str__())", "def zAg0(YKHO):\n jbXL = {str(Z9rn) + ' (id=' + str(id(Z9rn)) + ')': Ty9i for Z9rn, Ty9i in YKHO.items()}\n return 'ComponentMap(' + str(jbXL) + ')'", "def bizs(YKHO) -> str:\n return BfDw.to_json(YKHO.mapping)", "def fZNC():\n print('\\n ____________...
[ "0.6763217", "0.67295104", "0.66014475", "0.6532086", "0.63509667", "0.62860024", "0.61440605", "0.61326325", "0.6113768", "0.60871357", "0.60472983", "0.5982687", "0.59760237", "0.59346396", "0.5906684", "0.58646953", "0.5844098", "0.58360076", "0.5818757", "0.5814094", "0.5...
0.0
-1
Read a manifest.json file, and pull out the relavant information. manfile is the filename and path of a manifest.json file
def Lb40(KH5Q): dsqj = '' zVa7 = '' bD7m = '' ekEV = {} with open(KH5Q, 'r') as eHNT: Kz8N = qQXR.load(eHNT) dsqj = Kz8N['resources'][0]['onPremisePath'] M0DQ = Kz8N['resources'][0]['serverPath'].split('\\') pGO4 = [WKvO for WKvO in M0DQ if 'MapServer' in WKvO] if len(pGO4) =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Lb40(EZMt):\n with open(EZMt, 'r') as eHNT:\n nPrm = eHNT.read()\n if nPrm:\n return qQXR.loads(nPrm)\n else:\n return {}", "def oI9l(gIsw):\n nHI3 = open(gIsw, 'rb')\n try:\n return PObv(nHI3)\n finally:\n nHI3.close()", "def TUVp(YKHO):...
[ "0.6642836", "0.65847313", "0.6456769", "0.6447418", "0.6274114", "0.6073729", "0.5958652", "0.5909834", "0.58877736", "0.5880943", "0.58254766", "0.57938623", "0.5783545", "0.5699878", "0.56876427", "0.56415826", "0.56273514", "0.56135243", "0.56051874", "0.56031597", "0.560...
0.68515867
0
Test that filtering page still loads when no failed pod name is given
def NhgD(YKHO): ypJo = YKHO.BUILD_DIR + 'nodelog?junit=junit_01.xml' DtyE(YKHO.BUILD_DIR) Lsrz(YKHO.BUILD_DIR + 'artifacts/tmp-node-image/junit_01.xml', I6zU) Lsrz(YKHO.BUILD_DIR + 'artifacts/tmp-node-image/kubelet.log', 'abc\nEvent(api.ObjectReference{Name:"abc", UID:"podabc"} failed)\n') geh0 = P4...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def p_Q6(YKHO):\n geh0 = YKHO.client.get('search?q=hf')\n YKHO.assertIn(b'\"status\": \"FAILED\"', geh0.data)", "def nHMp(YKHO):\n geh0 = YKHO.client.get('search/health-facilities?q=')\n YKHO.assertIn(b'Tamba Pwani', geh0.data)", "def nHMp(YKHO):\n geh0 = YKHO.client.get('search?q=')\n YKHO.a...
[ "0.6269784", "0.62046266", "0.6191928", "0.61281914", "0.595943", "0.58230835", "0.5788055", "0.5779153", "0.5778206", "0.56951785", "0.5685474", "0.5659939", "0.5635128", "0.56228405", "0.5620017", "0.5603897", "0.55877423", "0.5583932", "0.556894", "0.55631375", "0.5556702"...
0.52053356
77
Create a search tree Node, derived from a parent by an action.
def FIMM(YKHO, QTBn, _AKB, XeOP, wdjW): YKHO.state = QTBn YKHO.parent = _AKB YKHO.action = XeOP YKHO.path_cost = wdjW YKHO.depth = 0 if _AKB: YKHO.depth = _AKB.depth + 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO, QTBn, _AKB=None, XeOP=None):\n YKHO.state = QTBn\n YKHO.parent = _AKB\n YKHO.action = XeOP\n YKHO.depth = 0\n if _AKB:\n YKHO.depth = _AKB.depth + 1", "def nrOS(YKHO, _AKB):\n if YKHO._predicate is not None and (not YKHO._predicate(_AKB)):\n raise KeyError(_AKB)\n ...
[ "0.65833175", "0.6459039", "0.60139126", "0.6007905", "0.6000603", "0.59630543", "0.5954473", "0.588921", "0.5867272", "0.58405125", "0.58161235", "0.5798438", "0.57502145", "0.57459635", "0.565649", "0.56405544", "0.5638548", "0.5589593", "0.55554473", "0.5552606", "0.555208...
0.59128064
7
List the nodes reachable in one step from this node.
def lHli(YKHO, X3eO): return [YKHO.child_node(X3eO, XeOP) for XeOP in X3eO.actions(YKHO.state)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Ziit(YKHO):\n return list(YKHO.__graph.keys())", "def Ziit(YKHO):\n return YKHO.graph.nodes", "def Ziit(YKHO):\n return YKHO.__nodes", "def C3Il(YKHO):\n return YKHO.visited_nodes", "def Ziit(YKHO):\n return YKHO.__nodes", "def AyQV(YKHO):\n try:\n return list(YKHO._adjacency...
[ "0.693908", "0.69369644", "0.6879865", "0.68754965", "0.68689376", "0.6827248", "0.68100685", "0.68097466", "0.68097466", "0.68097466", "0.6764401", "0.67621917", "0.6743569", "0.67257047", "0.67242104", "0.6685335", "0.6649937", "0.66321135", "0.66193134", "0.66079694", "0.6...
0.0
-1
Return a list of nodes forming the path from the root to this node.
def pmON(YKHO): Q6kx, Jk9z = (YKHO, []) while Q6kx: Jk9z.append(Q6kx) Q6kx = Q6kx.parent return list(reversed(Jk9z))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pmON(YKHO):\n Q6kx, X_FV = (YKHO, [])\n while Q6kx:\n X_FV.append(Q6kx)\n Q6kx = Q6kx.parent\n return list(reversed(X_FV))", "def pmON(YKHO):\n Q6kx, Jk9z = (YKHO, [])\n while Q6kx:\n Jk9z.append(Q6kx)\n Q6kx = Q6kx.parent\n return list(reversed(Jk9z))", "def A...
[ "0.7984329", "0.77074516", "0.7606885", "0.7442534", "0.7393407", "0.73567694", "0.73452824", "0.7337256", "0.7315247", "0.7297849", "0.7290767", "0.7246857", "0.72439355", "0.7197385", "0.7157757", "0.715197", "0.71127594", "0.710878", "0.7068614", "0.7051616", "0.70308995",...
0.7581861
3
Return a list of nodes forming the path from the root to this node.
def sSN_(YKHO): Q6kx, Jk9z = (YKHO, []) sSN_ = 0 while Q6kx: Jk9z.append(Q6kx) if Q6kx.action is not None: sSN_ = sSN_ + Q6kx.action.cost Q6kx = Q6kx.parent return [sSN_, list(reversed(Jk9z))]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pmON(YKHO):\n Q6kx, X_FV = (YKHO, [])\n while Q6kx:\n X_FV.append(Q6kx)\n Q6kx = Q6kx.parent\n return list(reversed(X_FV))", "def pmON(YKHO):\n Q6kx, Jk9z = (YKHO, [])\n while Q6kx:\n Jk9z.append(Q6kx)\n Q6kx = Q6kx.parent\n return list(reversed(Jk9z))", "def A...
[ "0.7984695", "0.7707993", "0.76075685", "0.7582547", "0.7582547", "0.74433106", "0.73939186", "0.7357707", "0.7344919", "0.7336959", "0.731532", "0.72982883", "0.72902405", "0.7246324", "0.72434825", "0.71981883", "0.7157075", "0.71537286", "0.7113386", "0.71092755", "0.70693...
0.0
-1
Return an empty list, suitable as a LastInFirstOut Queue.
def S9Ut(): return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DcDA(gGq6: Queue) -> list:\n dixj = []\n while True:\n try:\n Aofo = gGq6.get_nowait()\n dixj.append(Aofo)\n except rWmY:\n break\n return dixj", "def Ngu1(YKHO):\n ycBG = []\n for WRKq, MPhP in enumerate(YKHO.queues):\n try:\n y...
[ "0.6821298", "0.6768826", "0.672515", "0.672515", "0.65561545", "0.65105253", "0.64947486", "0.63419896", "0.63324875", "0.632704", "0.6161069", "0.6150938", "0.615033", "0.60879225", "0.60813576", "0.6068872", "0.6061594", "0.60239273", "0.59947866", "0.59844345", "0.5976385...
0.5354029
81
This test should ensure that the correct exception gets returned on creating a user with a short password.
def lY9I(YKHO): nPrm = {'firstname': 'John', 'lastname': 'Doe', 'password': 'short', 'password_repeat': 'short'} Ylbp = YKHO.post(url='/users', data=nPrm) YKHO.assertException(Ylbp, BQDi.PasswordTooShort) DW23 = mv1M.query.all() YKHO.assertEqual(len(DW23), 5)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iqfu(YKHO):\n pB3N = {'email': 'rest@eamil.com', 'password': 'pw', 'name': 'test Name'}\n Ylbp = YKHO.client.post(CKgv, pB3N)\n YKHO.assertEquals(Ylbp.status_code, jGRS.HTTP_400_BAD_REQUEST)", "def lY9I(YKHO):\n Ylbp = YKHO.client.post(CKgv, {**YKHO.mock_user, 'password': 'pw'})\n _gH8 = egNl(...
[ "0.83701366", "0.8299526", "0.82450336", "0.82040614", "0.81924886", "0.8191082", "0.8187987", "0.8187643", "0.8187331", "0.8173519", "0.8141736", "0.8121234", "0.8115956", "0.80198705", "0.7919002", "0.78852385", "0.78054214", "0.77995336", "0.7794868", "0.7775997", "0.77651...
0.7929082
14
This test should ensure that the correct exception gets returned on creating a user when the passwords do not match.
def ZBNo(YKHO): nPrm = {'firstname': 'John', 'lastname': 'Doe', 'password': 'supersecret', 'password_repeat': 'supersecret_ooops'} Ylbp = YKHO.post(url='/users', data=nPrm) YKHO.assertException(Ylbp, BQDi.PasswordsDoNotMatch) DW23 = mv1M.query.all() YKHO.assertEqual(len(DW23), 5)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def N1so(YKHO):\n print('Create user invalid password (empty)')\n lgoE = 3\n NtEF = 'newtestuser'\n jTXt = ''\n uwbZ = 1\n R6Gd = len(mv1M.query.all())\n YKHO.assertEqual(YKHO.system.create_user(lgoE, NtEF, jTXt, uwbZ), 0)\n ranj = len(mv1M.query.all())\n YKHO.assertEqual(R6Gd, ranj)", ...
[ "0.83762646", "0.8207531", "0.80691093", "0.8069102", "0.8061012", "0.7957495", "0.7907003", "0.7904376", "0.7876258", "0.78687865", "0.78686625", "0.78662515", "0.7863485", "0.78485876", "0.78359693", "0.78196526", "0.7811175", "0.78035074", "0.7797841", "0.7797841", "0.7797...
0.7847159
14
Generate a random string of fixed length of 8
def BWvy() -> str: KoG3 = vIwR.ascii_lowercase return ''.join((tuKI.choice(KoG3) for YRbF in range(8)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def e7Tf(u54L=6):\n exwG = int(u54L / 2 + 1)\n WKvO = MRxC.hexlify(Hy7s.urandom(exwG))\n KCHu = WKvO[:u54L]\n return KCHu.decode('utf-8')", "def BWvy(u54L):\n return Xbr4(Hy7s.urandom(u54L))[:u54L]", "def BWvy(u54L=8):\n return ''.join([tuKI.choice(vIwR.letters + vIwR.digits) for WKvO in rang...
[ "0.8328549", "0.8311473", "0.82442516", "0.79748046", "0.7971683", "0.7937174", "0.78839236", "0.78783065", "0.78696907", "0.7846706", "0.7825582", "0.77538955", "0.76995504", "0.7684068", "0.76775575", "0.76590836", "0.7633136", "0.76221114", "0.761787", "0.761305", "0.76027...
0.801054
3
Create a rotation matrix corresponding to the rotation around a general axis by a specified angle.
def tPaT(j6Vr): if j6Vr.ndim == 1: if oyIN.size(j6Vr) == 5: j6Vr = oyIN.reshape(j6Vr, (5, 1)) hxbC = 1 elif oyIN.size(j6Vr) == 4: j6Vr = oyIN.reshape(oyIN.hstack((j6Vr, oyIN.array([1]))), (5, 1)) hxbC = 1 else: raise Exception('Wron...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DWJ0(YKHO, YylR, jDK_):\n HpT6 = jDK_.x * jDK_.x\n CwFP = jDK_.y * jDK_.y\n LdZT = jDK_.z * jDK_.z\n sHY4 = HpT6 + CwFP + LdZT\n Xyq7 = epAf.cos(YylR)\n LEev = (1.0 - Xyq7) / sHY4\n PDUN = epAf.sin(YylR) / epAf.sqrt(sHY4)\n WpqA = LEev * jDK_.x * jDK_.y\n BZV0 = LEev * jDK_.x * jDK_....
[ "0.7499418", "0.74165714", "0.7336505", "0.72626525", "0.7190893", "0.70425063", "0.69224447", "0.6921608", "0.6853846", "0.6844978", "0.68238324", "0.6821718", "0.6789848", "0.67720777", "0.67404425", "0.6723477", "0.66915923", "0.66581553", "0.6643707", "0.6625455", "0.6621...
0.0
-1
Call in a loop to create terminal progress bar.
def Enql(YKHO, f8ix, SWox): dfHy = f8ix + 1 y0cW = 'Progress: ' u54L = 50 LGJQ = '█' DuZT = ('{0:.' + str(1) + 'f}').format(100 * (dfHy / float(YKHO.num_games))) ZI9t = '{}/{}'.format(dfHy, YKHO.num_games) QRPl = int(u54L * dfHy // YKHO.num_games) RGHr = int(ITS7() - SWox) jAEe = (IT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kDHN():\n if N25Q:\n cKkT = len(list(yDFK.keys()))\n else:\n cKkT = sum((len(WKvO) for WKvO in list(yDFK.values())))\n BbzT = {'printstatus': B2fa.get('printstatus', True), 'root': tk5Y, 'note': fytP, 'length': cKkT, 'startnum': B2fa.get('startnum'), 'denom': B2fa.get('denominator', 1)}\...
[ "0.7299647", "0.72136474", "0.71250576", "0.70456845", "0.68892944", "0.6889146", "0.6872352", "0.68412644", "0.68061566", "0.6793585", "0.677608", "0.677608", "0.677608", "0.67743635", "0.6771614", "0.6771258", "0.6771258", "0.6771145", "0.67609525", "0.6756896", "0.6752498"...
0.6898423
4
Get the ChromeOS build version from /etc/lsbrelease. chromeos release version.
def OWHX(): try: eTx4('CHROMEOS_RELEASE_VERSION') except: G9jH.info('CHROMEOS_RELEASE_VERSION not found') return -1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zq5E(YKHO) -> str:\n return iXC1('cat /etc/redhat-release').split()[-2][0]", "def ZB9Y():\n if a9EH.linux_distribution()[0]:\n return ' '.join(a9EH.linux_distribution())\n elif a9EH.mac_ver()[0]:\n return '%s %s' % (a9EH.mac_ver()[0], a9EH.mac_ver()[2])\n else:\n return 'Unkn...
[ "0.69959277", "0.690742", "0.68039197", "0.66506964", "0.6629549", "0.6610124", "0.652456", "0.6505086", "0.6494291", "0.64611316", "0.6460999", "0.6446504", "0.63952297", "0.63737077", "0.6368136", "0.6320774", "0.63077646", "0.6302513", "0.6301613", "0.62888604", "0.6281491...
0.7736488
0
Get the ChromeOS platform name. For unibuild this should be equal to model name. For nonunibuild it will either be board name or empty string. In the case of empty string return board name to match equivalent logic in server/hosts/cros_host.py platform name
def nDSA(): try: a9EH = bkZ5.call_cros_config_get_output('/ name', BfDw.run) if a9EH == '': a9EH = eS_Z() return a9EH except: G9jH.info('Not found') return -1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def a9EH():\n return 'micaz'", "def X7ke():\n if cZl2:\n return cZl2\n if Njvv():\n return 'win32'\n if jWLO():\n return 'linux'\n if i5z2():\n return 'mac'\n raise NotImplementedError('Unknown platform \"%s\".' % HwRy.platform)", "def a9EH(YKHO):\n return YKHO....
[ "0.71827334", "0.71827245", "0.70403415", "0.69764656", "0.68741584", "0.68345904", "0.68326366", "0.6712714", "0.6663454", "0.6645088", "0.65717965", "0.6544426", "0.6544426", "0.6526504", "0.65111035", "0.6504747", "0.6488302", "0.6470735", "0.64631975", "0.6394207", "0.636...
0.7519619
0
Get the firmware version as strings. a string representing this host's firmware version.
def MONY(): return BfDw.run('crossystem fwid').stdout.strip()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uCIf(YKHO):\n LaVg = (gk2W.c_char * YKHO.MAX_BUF_SIZE)()\n YKHO._dll.JLINKARM_GetFirmwareString(LaVg, YKHO.MAX_BUF_SIZE)\n return gk2W.string_at(LaVg).decode()", "def uCIf(YKHO) -> str:\n return YKHO._firmware_version", "def uCIf(YKHO):\n return YKHO._read(kw_2)", "def uCIf(YKHO):\n ret...
[ "0.79400396", "0.7779086", "0.7521428", "0.7473645", "0.74618", "0.72982407", "0.72559255", "0.70889515", "0.70473623", "0.689738", "0.68797696", "0.6878019", "0.6875305", "0.6871219", "0.6749576", "0.6746246", "0.6715031", "0.6689781", "0.6677149", "0.66495883", "0.66249996"...
0.71868354
7
Get the kernel version as strings. a string representing this host's kernel version.
def Yxzj(): try: return BfDw.run('uname -r').stdout.strip() except: G9jH.info('Not Found') return -1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qU1N():\n return a9EH.uname().system", "def DpZH():\n HCmI = '{} -v'.format(XDmX())\n yvT9 = PHIk['cmd.run'](HCmI).splitlines()\n U5bT = yvT9[0].split(': ')\n return U5bT[1]", "def VZjY(cEzT, YYp2, w5up):\n return NrAt(cEzT, YYp2, w5up)['version']", "def _f0b(YKHO):\n return YKHO._eu...
[ "0.67689794", "0.6689234", "0.65093845", "0.6421613", "0.638744", "0.63701737", "0.6309763", "0.6305329", "0.6297143", "0.628527", "0.62825394", "0.62666667", "0.6249764", "0.62033993", "0.620263", "0.6182576", "0.616743", "0.61661345", "0.61620593", "0.61375564", "0.6099651"...
0.6512545
2
Return root device. Will return correct disk device even system boot from /dev/dm0
def I09p(): return BfDw.system_output('rootdev -s -d')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def s6ko(YKHO):\n iiGX = None\n SBGa = None\n for akib in YKHO.volumes:\n if not akib.partitions:\n continue\n for Qrt_ in akib.partitions:\n if Qrt_.mount_point == '/':\n iiGX = akib\n elif Qrt_.mount_point == '/boot':\n SBGa = ...
[ "0.743768", "0.7065002", "0.6749646", "0.67476046", "0.6702804", "0.6655139", "0.6615999", "0.6479103", "0.64013696", "0.6383586", "0.63643336", "0.63574684", "0.6346968", "0.6338461", "0.62723887", "0.62526584", "0.62246984", "0.62164897", "0.6178602", "0.61552894", "0.61273...
0.83389235
0
Set up a test environment.
def d2RT(__n6, TBXe): print('>>> Test environment:') print('dataset:', __n6) print('tmpdir:', TBXe) rgEB(TBXe, __n6) return {'dataset': __n6, 'tmpdir': TBXe}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FCbF(YKHO):\n ct9j()", "def HTzG(YKHO):\n pass", "def SjAq():\n global TestEnv\n MQa_(GD0I)", "def SjAq():\n global TestEnv\n MQa_(GD0I)", "def FCbF(YKHO):\n G9jH.debug('setting up')", "def FCbF(YKHO):\n G9jH.debug('setting up')", "def Q2RS():\n import hashlib\n ckXV(T...
[ "0.807226", "0.7482669", "0.7395789", "0.7395789", "0.7323509", "0.7323509", "0.72632086", "0.7179126", "0.7114935", "0.7060469", "0.7008032", "0.6990954", "0.6977949", "0.69689155", "0.6968162", "0.69093984", "0.68979186", "0.68898356", "0.68822104", "0.68772477", "0.6875155...
0.0
-1
Set up a test environment using test dataset 'min1'.
def bEAF(TBXe): return d2RT('min1', TBXe)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FCbF(YKHO):\n ct9j()", "def FCbF(YKHO):\n YKHO.dataset = eis1()", "def INkk(YKHO, Zwka: list=None):\n print('[dataset]: using test setup ...')\n YKHO.vocabulary = ['empty']\n YKHO.eval_dataset = RwLm(data_path=YKHO.dev_path, mode=YKHO.in_mode, task=YKHO.task, tokenizer=YKHO.tokenizer, vocab=...
[ "0.6628866", "0.6622548", "0.65294117", "0.640557", "0.6338267", "0.63281184", "0.6320459", "0.6320425", "0.631288", "0.6231715", "0.6222626", "0.62161267", "0.618193", "0.6144903", "0.61337966", "0.61266404", "0.6115915", "0.61072934", "0.6102301", "0.6102085", "0.60989827",...
0.6162583
13
Set up a test environment using test dataset 'min3'.
def tSI9(TBXe): return d2RT('min3', TBXe)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FCbF(YKHO):\n ct9j()", "def FCbF(YKHO):\n YKHO.dataset = eis1()", "def INkk(YKHO, Zwka: list=None):\n print('[dataset]: using test setup ...')\n YKHO.vocabulary = ['empty']\n YKHO.eval_dataset = RwLm(data_path=YKHO.dev_path, mode=YKHO.in_mode, task=YKHO.task, tokenizer=YKHO.tokenizer, vocab=...
[ "0.65883803", "0.65667874", "0.64844406", "0.645259", "0.6328357", "0.6326369", "0.63216734", "0.62923676", "0.6269549", "0.62622607", "0.6247097", "0.6186915", "0.61831725", "0.61763924", "0.6164265", "0.6159328", "0.615682", "0.615682", "0.61561793", "0.6148458", "0.6144971...
0.6414367
4
Displays the root UI.
def P8bN(): return eFvM()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def W8mS(YKHO) -> None:\n YKHO.root.display()", "def lb1t(YKHO):\n YKHO.clear_terminal()\n YKHO.main_menu()\n YKHO.handle_selection_main()", "def b8V_():\n return TvZl('UI.html')", "def tk5Y():\n return TvZl('root.html')", "def tk5Y(YKHO):\n return YKHO.render(YKHO.nav.root())", "def...
[ "0.77400357", "0.73010254", "0.71644497", "0.7095685", "0.7030151", "0.69971895", "0.69582045", "0.68906975", "0.68906975", "0.68906975", "0.6825896", "0.6811073", "0.67543066", "0.6727734", "0.67221874", "0.6683957", "0.6672294", "0.66719496", "0.66472286", "0.6632292", "0.6...
0.6442545
29
Gets the views of this PrefetchResponse. Contains all the views matching the request.
def RCd1(YKHO): return YKHO._views
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AHMg(YKHO):\n return list(YKHO.__views)", "def AHMg(YKHO):\n return list(YKHO.__views.keys())", "def Oz8R(YKHO):\n xDcj = Unkf.get_views()\n bo34.info(u'Views query: %s', xDcj)\n for eGKW in YKHO.execute_query(xDcj):\n for rdlD in eGKW[0]:\n yield (rdlD[0], rdlD[1])", "de...
[ "0.71542346", "0.66912264", "0.6390769", "0.62425417", "0.6107243", "0.6035034", "0.59929824", "0.58978415", "0.57811755", "0.57342356", "0.56681156", "0.566706", "0.5564722", "0.5559799", "0.5556475", "0.5547521", "0.5512223", "0.54970616", "0.54686934", "0.5458042", "0.5457...
0.68580717
1
Sets the views of this PrefetchResponse. Contains all the views matching the request.
def RCd1(YKHO, RCd1): YKHO._views = RCd1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def s7Rl(YKHO, s7Rl):\n YKHO._view_list = s7Rl", "def rRSo(aTLP):\n N6Z1.set_preds_as_viewed(aTLP)", "def WgYu(YKHO, RCd1: Iterable[np.ndarray], LVAh=None, **B2fa):\n return YKHO", "def dSez(YKHO, RCd1: Iterable[np.ndarray], **B2fa):\n return YKHO.fit(RCd1, **B2fa).transform(RCd1, **B2fa)", "de...
[ "0.5453209", "0.52553564", "0.51034665", "0.50927436", "0.5021565", "0.5018381", "0.4993566", "0.49459183", "0.48753285", "0.48663464", "0.4837061", "0.4791182", "0.474467", "0.4713523", "0.46919867", "0.4668019", "0.4611431", "0.45873412", "0.45708817", "0.45478213", "0.4523...
0.7067103
0
Gets the mboxes of this PrefetchResponse. Prefetched mboxes, including content and notification tokens to be sent back when the mboxes are displayed.
def kVPd(YKHO): return YKHO._mboxes
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Ii1S(kVPd):\n if not kVPd:\n return None\n GM_3 = []\n for eWWu in kVPd:\n xAU6 = QFJV(eWWu)\n GM_3.append(UR7X(index=eWWu.get('index'), name=eWWu.get('name'), options=xAU6))\n return GM_3", "def sYQy(YKHO):\n return YKHO._boxes", "def c8Yy(YKHO) -> x1iM[rh6a]:\n retu...
[ "0.6314072", "0.6191602", "0.59009296", "0.5886659", "0.5678111", "0.56578785", "0.5609376", "0.5444694", "0.53151405", "0.52151567", "0.52070636", "0.5130126", "0.50709504", "0.5016885", "0.5015728", "0.49420232", "0.48590705", "0.4830721", "0.4806369", "0.4786646", "0.47778...
0.71640295
0
Sets the mboxes of this PrefetchResponse. Prefetched mboxes, including content and notification tokens to be sent back when the mboxes are displayed.
def kVPd(YKHO, kVPd): YKHO._mboxes = kVPd
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Ii1S(kVPd):\n if not kVPd:\n return None\n GM_3 = []\n for eWWu in kVPd:\n xAU6 = QFJV(eWWu)\n GM_3.append(UR7X(index=eWWu.get('index'), name=eWWu.get('name'), options=xAU6))\n return GM_3", "def B4BZ(YKHO, focB):\n YKHO._boxes = focB", "def kVPd(YKHO):\n return YKHO....
[ "0.63638073", "0.61803854", "0.59135115", "0.482469", "0.47008628", "0.46655414", "0.4608289", "0.4608289", "0.46044838", "0.45921344", "0.457805", "0.44858494", "0.44810584", "0.44389394", "0.44326752", "0.44082797", "0.4396439", "0.43941227", "0.43911472", "0.43674633", "0....
0.7771728
0
Returns true if both objects are equal
def xa14(YKHO, Elif): if not isinstance(Elif, OcHf): return False return YKHO.__dict__ == Elif.__dict__
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)", "def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)", "def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False", "def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", ...
0.0
-1
Returns true if both objects are not equal
def Vdqg(YKHO, Elif): return not YKHO == Elif
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True", "def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)", "def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)", "def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)", ...
[ "0.84560555", "0.83913696", "0.8143685", "0.81403786", "0.8131871", "0.8093231", "0.80915105", "0.80915105", "0.80915105", "0.8084564", "0.8084564", "0.8075547", "0.8075547", "0.8065006" ]
0.0
-1
Finds the reward gained on the last iteration.
def k6pM(YKHO, xzj7: Player) -> cuzp[eax5, cuzp[eax5, Ca9i]]: if len(xzj7.history) == 0: zVUj = YKHO._random.random_choice() else: zVUj = xzj7.history[-1] vOGg = YKHO.payoff_matrix[YKHO.prev_action][zVUj] if YKHO.part_of_MMQL: YKHO.rewards_list_manager(vOGg) return vOGg
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def k6pM(YKHO, xzj7: Player) -> cuzp[eax5, cuzp[eax5, Ca9i]]:\n return YKHO.payoff_matrix[YKHO.decision][xzj7.history[-1]]", "def _KvT(YKHO):\n vOGg = -1\n return vOGg", "def xyVK(YKHO):\n sSN_ = YKHO.cost_function()\n NZ1z = YKHO.get_constraints_violation()\n vOGg = -YKHO.get_augmented_cost(...
[ "0.75797004", "0.734375", "0.72672707", "0.726439", "0.7164849", "0.7149232", "0.7122559", "0.70738345", "0.70325845", "0.6970495", "0.696674", "0.69628793", "0.69453853", "0.694346", "0.68970233", "0.6871107", "0.6856799", "0.67591786", "0.6752317", "0.67387927", "0.6735471"...
0.7442721
1
Appends the last reward to the rewards list and makes sure it only holds the last n items.
def j6ba(YKHO, vOGg): YKHO.rewards_list.append(vOGg) if len(YKHO.rewards_list) > YKHO.list_size: YKHO.rewards_list.pop(0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def I3wI(YKHO, vOGg: float) -> OpmE:\n iBIi, BZN_ = YKHO.prevBoardMove\n YKHO.sarsList.append((iBIi, BZN_, vOGg, None))\n return YKHO.sarsList", "def wqu8(YKHO, Acvy, UHFx=1):\n YKHO.redis.hincrby(lARE % YKHO.name, '%s:rewards' % Acvy, UHFx)\n YKHO._choices = None", "def J_uo(YKHO):\n if len(...
[ "0.6940695", "0.6293838", "0.6049912", "0.6036716", "0.5980498", "0.5978603", "0.5953674", "0.5928577", "0.5901281", "0.5889297", "0.58783174", "0.58511144", "0.5816891", "0.57781863", "0.5770032", "0.57581145", "0.57199514", "0.57122374", "0.56712264", "0.5667138", "0.566302...
0.72789717
0
Checks in its history if it has played this Player before.
def wqv0(YKHO, xzj7: Player): if xzj7.name in YKHO.previous_matches_dict: return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jqxn(YKHO):\n if YKHO.guess in YKHO.past_guesses:\n return False\n else:\n return True", "def bFdH(YKHO) -> bool:\n return YKHO.published_before().count() != 0", "def qQuL(KcSv, h3kA):\n aWqH = min(KcSv, h3kA)\n Yobw = max(KcSv, h3kA)\n Wi1T = Ykhp()\n Apnl = Wi1T.cursor(...
[ "0.6726694", "0.6357391", "0.62660646", "0.61942995", "0.60906136", "0.60780567", "0.6056948", "0.6056064", "0.6030249", "0.59795034", "0.5927675", "0.5924521", "0.5924521", "0.58539885", "0.57905394", "0.5765914", "0.57540375", "0.5738936", "0.5726516", "0.57102835", "0.5708...
0.70664173
0
Returns the value of a key of a dictionary that is in a list.
def Zmkp(YKHO, dblz, H5ew): for wEf2 in dblz: if H5ew in wEf2: return wEf2[H5ew]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uYhD(YDX_, BWXx, H5ew):\n if YDX_ is None:\n return None\n return next((ZfUD for ZfUD in YDX_ if ZfUD[H5ew] == BWXx), None)", "def LSic(nE6X, ZVgY, THkp=None):\n if THkp is None:\n Ylbp = []\n else:\n Ylbp = THkp.copy()\n if type(nE6X) is dict:\n vM5z = [nE6X]\n ...
[ "0.7252144", "0.7230733", "0.7200766", "0.70316327", "0.69805676", "0.69760656", "0.6875394", "0.67682153", "0.6677581", "0.66481495", "0.6639688", "0.66168624", "0.6585044", "0.65550876", "0.65442616", "0.65321434", "0.6455877", "0.63427633", "0.6333561", "0.6266734", "0.623...
0.7182878
3
Evaluate policies and switches current_policy if mean average reward for the last n steps > than current policy.
def TlU5(YKHO): dAhx = {} SiEb = YKHO.current_policy for Qabx in YKHO.policy_list: IxhU = lambda WKvO: sum(WKvO) / len(WKvO) BWXx = IxhU(Qabx.rewards_list) dAhx[Qabx.name_id] = BWXx oaO_ = YKHO.find_max_value(dAhx) if YKHO.current_policy.name_id in oaO_: print(f' Stil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oPc6(YKHO):\n if YKHO.n_calls % YKHO.eval_freq == 0:\n JMXZ, FTtT = wbX_(YKHO.model, YKHO.eval_env, n_eval_episodes=YKHO.n_eval_episodes)\n YKHO.logger.record('eval_mean_reward', JMXZ)\n YKHO.model.save(YKHO.save_latest)\n if JMXZ > YKHO.best_mean_reward:\n YKHO.best_m...
[ "0.67783296", "0.6595428", "0.6524142", "0.64929575", "0.64715815", "0.6469852", "0.64628375", "0.64430654", "0.6443044", "0.64113194", "0.64113194", "0.6395731", "0.6375213", "0.6306766", "0.6303111", "0.6301132", "0.629855", "0.62930226", "0.6281682", "0.62657493", "0.62623...
0.72443324
0
Checks if it is time to evaluate policy.
def rzHe(YKHO): if YKHO.turns in range(0, YKHO.game_length + 1, YKHO.Vs_eval_point): return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Qj_V():\n WXkz = ra5c()\n C61p = abs((WXkz['local'] - WXkz['target']).total_seconds())\n return C61p < lb9x", "def ZTWy(YKHO):\n if YKHO.run_type.startswith('timed'):\n VA_f = ITS7.time() - YKHO.start_times['run']\n lfun = YKHO.max_time * 60 - VA_f\n if lfun < 0:\n ...
[ "0.6689097", "0.65070665", "0.64731044", "0.64486563", "0.64077616", "0.6395067", "0.63318723", "0.62511456", "0.624812", "0.6182041", "0.6167794", "0.61447847", "0.6119615", "0.60869086", "0.6085523", "0.6051685", "0.6037464", "0.6010893", "0.6007734", "0.60010743", "0.59722...
0.0
-1
Gets a list of all neighbours from a position towards all directions.
def XSKz(YKHO, _jo8): ur7Y = YKHO.board_to_connection_index(_jo8) rdlD = YKHO.connection_matrix[ur7Y] bdGm = [] for DT55 in range(0, len(rdlD)): if rdlD[DT55]: FUS4 = YKHO.connection_to_board_index(DT55) if YKHO.board[FUS4[0]][FUS4[1]].state != pLxH.EMPTY: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tk2G(YKHO, dQgj):\n Cs6h = YKHO._grid\n WKvO, LVAh = dQgj\n bdGm = []\n gQVb = [(0, 1), (1, 0), (0, -1), (-1, 0)]\n hXNa(gQVb)\n for vgXP in gQVb:\n YRbF, r845 = vgXP\n dQgj = (WKvO + YRbF, LVAh + r845)\n if Cs6h.valid_position(dQgj) and dQgj not in YKHO.shots:\n ...
[ "0.76507026", "0.7549347", "0.73710203", "0.73402965", "0.72468984", "0.7022887", "0.70182645", "0.7008794", "0.70060974", "0.69371927", "0.6935482", "0.69351274", "0.6918002", "0.6916862", "0.68926436", "0.68735766", "0.6868936", "0.68377554", "0.68138546", "0.68085164", "0....
0.736226
3
Gets all legal moves for the current board state. (self.board). Returns a matrix of True/False where True means, and a list of positions that it is legal to place there
def r5wO(YKHO): TK1l = [] E1UW = [] for rdlD in range(YKHO.size): wcmT = [] for fvDH in range(YKHO.size): lsmZ = YKHO.board[rdlD][fvDH].state == pLxH.EMPTY wcmT.append(lsmZ) if lsmZ: E1UW.append((rdlD, fvDH)) TK1l.append(wcmT) '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dgbU(YKHO):\n oLdq = []\n if YKHO.player_locations[YKHO.whose_turn] is None:\n return YKHO.get_blank_locations()\n SppC = [(1, 0), (-1, 0), (0, 1), (0, -1), (1, 1), (1, -1), (-1, 1), (-1, -1)]\n for Jw7X, eUWA in SppC:\n WKvO, LVAh = YKHO.player_locations[YKHO.whose_turn]\n whi...
[ "0.8308492", "0.8300396", "0.802414", "0.78296113", "0.77352315", "0.77256405", "0.7718534", "0.77081513", "0.7668014", "0.765604", "0.7645819", "0.7626022", "0.7584768", "0.7581337", "0.75597256", "0.754108", "0.75220305", "0.75061715", "0.7477422", "0.7466972", "0.74535805"...
0.86073625
0
Yield successive nsized chunks from lst.
def eHxA(yv6U, exwG): for YRbF in range(0, len(yv6U), exwG): yield yv6U[YRbF:YRbF + exwG]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eHxA(YKHO, yv6U, exwG):\n for YRbF in range(0, len(yv6U), exwG):\n yield yv6U[YRbF:YRbF + exwG]", "def eHxA(yv6U: list, exwG: int):\n for YRbF in range(0, len(yv6U), exwG):\n yield yv6U[YRbF:YRbF + exwG]", "def eHxA(yv6U, exwG):\n for YRbF in range(0, len(yv6U), exwG):\n yield...
[ "0.83073896", "0.81937337", "0.8191178", "0.8191178", "0.81903666", "0.81268156", "0.812207", "0.812207", "0.80774724", "0.80527616", "0.80527616", "0.80527616", "0.80527616", "0.80527616", "0.80042547", "0.7870935", "0.78464705", "0.7828888", "0.78281975", "0.78149104", "0.7...
0.80534166
16
Test that the command updates the specified records (ignoring ones with errors).
def f2Vk(rfdJ, KTnm): KTnm.set_level('ERROR') dEPy = HhDg.create_batch(4) nPrm = [] for q9zX in dEPy: AIu6 = A4Uc(q9zX.id) OMV9 = qQXR.dumps(AIu6) Oztx = QMfv(OMV9.encode('utf-8')).decode('utf-8') nPrm.append(Oztx) A0hV = QMfv('{"what": }'.encode('utf-8')).decode('utf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mmy9(YKHO):\n pass", "def GBbL(YKHO):\n __n6 = YKHO.create_mixed_test_data()\n q_Ad = __n6['test_log_entries']\n YKHO.menu.records = q_Ad\n g5nA = 1\n gwnG = U8Lr([('name', 'New Test Employee'), ('date', '2017-10-05'), ('task_name', 'New Test Task'), ('duration', 55), ('notes', 'New Note')]...
[ "0.78881055", "0.7061696", "0.69923824", "0.68376505", "0.6822583", "0.6767727", "0.6729194", "0.6729194", "0.6729194", "0.66630197", "0.6654071", "0.6638935", "0.6625693", "0.65843153", "0.6565443", "0.6560695", "0.6543985", "0.65364295", "0.6535769", "0.65290207", "0.651321...
0.0
-1
Set the pool of servers used by this client.
def vCys(YKHO, HwSA): B2fa = dict(io_loop=YKHO.io_loop) if YKHO.dead_retry: B2fa['dead_retry'] = YKHO.dead_retry YKHO.servers = [rpQI(KCHu, YKHO.debuglog, **B2fa) for KCHu in HwSA] YKHO._init_buckets()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KnX3(YKHO, KnX3):\n YKHO._server_pool = KnX3", "def vCys(YKHO, HwSA):\n YKHO.servers = []\n YKHO.buckets = []\n for S_bD in HwSA:\n if type(S_bD) == tuple:\n nLQm, upAO = S_bD\n else:\n nLQm, upAO = (S_bD, 1)\n N5z6 = tnE1(nLQm, upAO, YKHO._debuglog)\n ...
[ "0.7321937", "0.70889455", "0.68078506", "0.6469448", "0.6269636", "0.6156293", "0.6094887", "0.6013716", "0.59658796", "0.5912318", "0.5881732", "0.58734155", "0.58019567", "0.5772837", "0.5721683", "0.56458396", "0.5584574", "0.5561476", "0.5553551", "0.55455774", "0.553602...
0.6783839
3
Computes the accuracy over the k top predictions for the specified values of k
def vjyh(hlel, pan_, hz5a=(1,)): with ht2j.no_grad(): Gq8e = max(hz5a) Ep8u = pan_.size(0) bGrB, nvEb = hlel.topk(Gq8e, 1, True, True) nvEb = nvEb.t() gXXc = nvEb.eq(pan_.view(1, -1).expand_as(nvEb)) Ylbp = [] for G1Hx in hz5a: R2Dg = gXXc[:G1Hx].v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Z7qO(LVAh, aMgO, G1Hx=2):\n nvEb = []\n for YRbF in range(len(LVAh)):\n if LVAh[YRbF] in aMgO[YRbF][:G1Hx]:\n nvEb.append(1)\n else:\n nvEb.append(0)\n return sum(nvEb) / len(nvEb)", "def vjyh(aMgO, ibJh, hz5a=(1,)):\n Gq8e = max(hz5a)\n Ep8u = ibJh.size(0)\...
[ "0.8331214", "0.8284662", "0.82381004", "0.8229767", "0.82202226", "0.81864446", "0.81847763", "0.8175173", "0.8171541", "0.81699467", "0.81664646", "0.81645083", "0.81637454", "0.81622064", "0.81622064", "0.81622064", "0.81622064", "0.81622064", "0.81622064", "0.81622064", "...
0.7852251
79
Replaces PII from string input, which could be an email address or a string representation of a Python object. The string representation may also be truncated to a certain length, thus the value pattern above also captures values when hitting endofstring.
def eWYt(tO9_: str) -> str: for D3lj in WkKH.findall(tO9_): tO9_ = tO9_.replace(D3lj, ZbWC.sub(fAJR, xnIZ, D3lj)) for PKWo in nPQ0: tO9_ = PKWo.sub(WVzd, tO9_) return tO9_
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def F64o(YKHO, vIwR):\n UHFx = vIwR.count('.')\n bD3d = vIwR\n if UHFx < 3:\n return bD3d\n hqZV = vIwR.split('.')\n gfPH = 0\n for UksD in hqZV:\n try:\n bGrB = int(UksD)\n gfPH = gfPH + 1\n except ValueError:\n pass\n if gfPH >= 4:\n ...
[ "0.529651", "0.5286037", "0.5113821", "0.5107283", "0.5072503", "0.5039288", "0.5021523", "0.5010002", "0.50037354", "0.50005305", "0.49705333", "0.49659023", "0.49548504", "0.49321055", "0.4885496", "0.4882123", "0.48803803", "0.4876779", "0.4867307", "0.4856089", "0.4831583...
0.58040845
0
Returns the transport used by the client instance.
def PdI0(YKHO) -> bQj1: return YKHO._transport
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PdI0(YKHO):\n return YKHO._transport", "def PdI0(YKHO) -> XLc3:\n return YKHO._client.transport", "def PdI0(YKHO) -> WYqF:\n return YKHO._client.transport", "def PdI0(YKHO) -> PaEF:\n return YKHO._client.transport", "def PdI0(YKHO) -> JKRZ:\n return YKHO._client.transport", "def PdI0(Y...
[ "0.82946277", "0.7887542", "0.773594", "0.773068", "0.76806635", "0.7674273", "0.76357967", "0.7558095", "0.7551682", "0.75303864", "0.74958986", "0.7488142", "0.7436853", "0.7423566", "0.7368433", "0.73340607", "0.7109823", "0.7102308", "0.68808985", "0.68144", "0.6671675", ...
0.721926
16
Returns a fullyqualified tensorboard_experiment string.
def MRAE(bNKA: str, Rci7: str, Ahgi: str, ftWC: str) -> str: return 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}'.format(project=bNKA, location=Rci7, tensorboard=Ahgi, experiment=ftWC)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def t6ks(YKHO):\n return YKHO._experiment_name", "def bUvN(bNKA: str, Rci7: str, Ahgi: str, ftWC: str, iXC1: str) -> str:\n return 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}'.format(project=bNKA, location=Rci7, tensorboard=Ahgi, experiment=ftWC, ...
[ "0.6733724", "0.63253695", "0.62591577", "0.6120263", "0.60489845", "0.59458035", "0.58992136", "0.5865498", "0.58287936", "0.57862365", "0.57394284", "0.57240576", "0.5649301", "0.5647834", "0.54428434", "0.53889257", "0.5316732", "0.5296445", "0.5286561", "0.52846986", "0.5...
0.7786094
0
Parses a tensorboard_time_series path into its component segments.
def hR9w(pmON: str) -> cuzp[str, str]: r8hN = ZbWC.match('^projects/(?P<project>.+?)/locations/(?P<location>.+?)/tensorboards/(?P<tensorboard>.+?)/experiments/(?P<experiment>.+?)/runs/(?P<run>.+?)/timeSeries/(?P<time_series>.+?)$', pmON) return r8hN.groupdict() if r8hN else {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WuEn(YKHO, pmON: str) -> oyIN.ndarray:\n DumB = []\n AOBR = None\n for ZfUD in sorted(oAb3.Path(pmON).glob('*.nc')):\n with zuVY.open_dataset(ZfUD) as oxOY:\n jvSB = oxOY.ocean_time.values[0].astype('datetime64[M]')\n if AOBR is not None and jvSB - AOBR != oyIN.timedelta64...
[ "0.5642332", "0.53205794", "0.5216421", "0.50843465", "0.5084148", "0.4992526", "0.49634525", "0.49479604", "0.49462703", "0.48868632", "0.48567763", "0.48517153", "0.48504207", "0.48441702", "0.48363525", "0.4835228", "0.48223904", "0.48207572", "0.48102683", "0.4792345", "0...
0.69275206
0
Returns a fullyqualified billing_account string.
def VwIJ(GLga: str) -> str: return 'billingAccounts/{billing_account}'.format(billing_account=GLga)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GLga(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'billing_account')", "def GLga(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'billing_account')", "def GLga(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'billing_account')", "def GLga(YKHO) -> qe4Y.Input[str]:\n return qe4Y.ge...
[ "0.79002553", "0.79002553", "0.79002553", "0.7712969", "0.7712969", "0.750967", "0.74875593", "0.74875593", "0.68009645", "0.6783066", "0.66662496", "0.66662496", "0.66435224", "0.66435224", "0.65389526", "0.6513056", "0.6302785", "0.6262761", "0.6173323", "0.6169606", "0.616...
0.73243135
8
r"""Gets the IAM access control policy for a function. Returns an empty policy if the function exists and does not have a policy set.
def aEAQ(YKHO, QePW: Optional[iam_policy_pb2.GetIamPolicyRequest]=None, *, ZFzw: OptionalRetry=uMLX.method.DEFAULT, vYBr: Union[float, object]=uMLX.method.DEFAULT, yIVm: Sequence[Tuple[str, str]]=()) -> u0K_.Policy: if isinstance(QePW, dict): QePW = N1Ai.GetIamPolicyRequest(**QePW) lTaB = uMLX.method.wr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LWdt(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'network_access_policy')", "def aesk(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'client_access_policy')", "def qFaa(IBYC):\n return Qabx.get(TdCj(IBYC), {})", "def Qabx(YKHO) -> h8nf[qe4Y.Input['ServicePolicyArgs']]:\n return qe4Y....
[ "0.6178885", "0.61590993", "0.61123925", "0.6104738", "0.6104738", "0.600796", "0.59676766", "0.59676766", "0.59460056", "0.59460056", "0.59353316", "0.59042543", "0.5884025", "0.58732426", "0.58699167", "0.58668566", "0.5858578", "0.5836053", "0.5836053", "0.5836053", "0.577...
0.0
-1
Set hidden layer parameters. Initialize to 0
def LiHt(YKHO, Ep8u): if YKHO.config['cuda']: YKHO.hx = ht2j.zeros(Ep8u, YKHO.config['state_dim'], device='cuda') YKHO.cx = ht2j.zeros(Ep8u, YKHO.config['state_dim'], device='cuda') else: YKHO.hx = ht2j.zeros(Ep8u, YKHO.config['state_dim']) YKHO.cx = ht2j.zeros(Ep8u, YKHO.config[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MP8d(YKHO):\n D5BU = ht2j.zeros(YKHO.num_layers, YKHO.batch_size, YKHO.hidden_size)\n return D5BU", "def tnre(YKHO):\n if YKHO.cfg.initial_forget_bias is not None:\n YKHO.hindcast_lstm.bias_hh_l0.data[YKHO.cfg.hidden_size:2 * YKHO.cfg.hidden_size] = YKHO.cfg.initial_forget_bias", "def FIMM(...
[ "0.7579515", "0.7219264", "0.7147271", "0.7117862", "0.7116846", "0.7094303", "0.70175666", "0.7016845", "0.70109487", "0.6990654", "0.6898711", "0.68371445", "0.6832899", "0.6749875", "0.6701819", "0.6675785", "0.6666213", "0.6666213", "0.6666213", "0.6630961", "0.6610587", ...
0.61685276
63
Return a list of bigram from a set of tokens
def SyRs(YKHO, s2mk): return [jzdc + ' ' + Fg_i for jzdc, Fg_i in zip(s2mk, s2mk[1:])]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def INAj(yAmx):\n return [GIN8 + '_' + yAmx[YRbF + 1] if GIN8 + '_' + yAmx[YRbF + 1] in OLx9 else None for YRbF, GIN8 in enumerate(yAmx[:-1])] if GPtr.USE_BIGRAMS else []", "def iFw2(zHkQ, z_aV):\n return [zHkQ[A97Q] for A97Q in z_aV]", "def SyRs(l5Ny):\n gOBC = INAj(l5Ny.split())\n br_7 = []\n ...
[ "0.72109574", "0.6979419", "0.6973909", "0.6913209", "0.6872742", "0.66915166", "0.66187626", "0.63897", "0.6356495", "0.62698644", "0.62079304", "0.6190746", "0.61907154", "0.61585534", "0.6137321", "0.61241156", "0.6113256", "0.610226", "0.6063019", "0.6057659", "0.60537195...
0.7848915
0
Returns features based on the SentiWordNet features
def DRcr(YKHO, s2mk): TT8Y, UwUO = (0.0, 0.0) gpBk, NZwF = (0, 0) for eOtH in s2mk: if eOtH in YKHO.senti_wordnet_map: if YKHO.senti_wordnet_map[eOtH] >= 0: TT8Y += YKHO.senti_wordnet_map[eOtH] gpBk += 1 else: UwUO += YKHO.senti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WSKm(YKHO, _dZy):\n return [YKHO.word2features(_dZy['tokens'], YRbF) for YRbF in range(len(_dZy['tokens']))]", "def aJsD(Mau6):\n egug = eeCZ(Mau6)\n Mau6 = rq7K(Mau6)\n El7S = izBs.polarity_scores(Mau6)\n V22M = biH0(Mau6)\n vPks = NPYS.syllable_count(V22M)\n yLAt = sum((len(yzQ0) for y...
[ "0.73183894", "0.71263", "0.70751894", "0.69676757", "0.6945837", "0.69217503", "0.69050235", "0.6876446", "0.6857538", "0.6857172", "0.68460387", "0.6833683", "0.68296003", "0.6827002", "0.6808507", "0.6793462", "0.6743678", "0.67287916", "0.671578", "0.6701386", "0.66613275...
0.0
-1
insert node at end traverse the list, then add when node.next is none
def SStx(YKHO, Esd_): if YKHO.head is None: YKHO.head = Esd_ return None Iuo4 = YKHO.head while Iuo4.next is not None: Iuo4 = Iuo4.next Iuo4.next = Esd_
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Ze1L(YKHO, nPrm):\n if YKHO.head is None:\n YKHO.head = Msxl(nPrm)\n else:\n ycBG = YKHO.head\n while ycBG.next is not None:\n ycBG = ycBG.next\n ycBG.next = Msxl(nPrm)", "def tj6L(YKHO, ndXP):\n if YKHO.head == None:\n YKHO.head = ndXP\n return\n...
[ "0.7634774", "0.7556984", "0.72107995", "0.7086823", "0.7028926", "0.70181656", "0.7015274", "0.6972772", "0.69708765", "0.6946059", "0.6935984", "0.6920278", "0.69060373", "0.68891156", "0.6885321", "0.6863869", "0.6806091", "0.6787113", "0.6786611", "0.6782133", "0.67751724...
0.66094273
36
Returns the number of incoming edges a given Stack has in the StackGraph. The number of incoming edge also represents the number of Stacks that depend on the given Stack.
def kQrU(YKHO, E5BI): return YKHO.__graph.in_degree(E5BI)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def n8F9(YKHO):\n return YKHO._top_exp.number_of_edges()", "def fOCg(YKHO) -> int:\n return YKHO.graph.number_of_edges()", "def IgjN(YKHO):\n return YKHO._graph_state.get_num_edges()", "def epQE(YKHO):\n return sum(map(lambda WKvO: len(WKvO), YKHO.__adj))", "def L1_y(YKHO):\n wjRY = sum((len...
[ "0.72772425", "0.7205154", "0.70886415", "0.6989499", "0.6958669", "0.6957508", "0.689919", "0.68849486", "0.68188494", "0.68153244", "0.67455715", "0.6717251", "0.66675067", "0.66592574", "0.6645671", "0.6636326", "0.6559431", "0.65306413", "0.6399459", "0.6391311", "0.63341...
0.68788356
8