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 |
|---|---|---|---|---|---|---|
Returns the mean value of given 2D dataset in a circle using a mask | def SMNV(r1VO, LVAh, WKvO, nPrm):
WZcn = oyIN.zeros_like(nPrm)
jzdc, Fg_i = WZcn.shape
LVAh, WKvO = oyIN.ogrid[-WKvO:r1VO + WKvO, -LVAh:r1VO + LVAh]
ZHfW = WKvO ** 2 + LVAh ** 2 <= r1VO ** 2
ZHfW = ZHfW[:jzdc, :Fg_i]
nPrm = nPrm[ZHfW]
if nPrm.size > 0:
return WZcn.size / max(oyIN.cou... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def beCm(mkD6, jDK_=0):\n return fHeP.mean(mkD6, axis=jDK_)",
"def nUX6(kL8P, PLPk):\n assert len(kL8P.shape) == 4, 'Error, data_img should be a 4Dfile, shape is {}'.format(kL8P.shape)\n assert v1Xc(kL8P.shape[:3], PLPk.shape), 'Error, Image and mask are incompatible {} {}'.format(kL8P.shape[:3], PLPk.s... | [
"0.7024995",
"0.69744486",
"0.6826633",
"0.681449",
"0.6644727",
"0.6528751",
"0.6444116",
"0.64423007",
"0.63804835",
"0.636015",
"0.6328421",
"0.62803304",
"0.62358236",
"0.62241656",
"0.6218972",
"0.621242",
"0.6208394",
"0.6207984",
"0.619686",
"0.6190919",
"0.61891085",
... | 0.7262045 | 0 |
Returns the Survey belonging to the given SurveyContent. | def mDwu(YKHO, jVb2):
V_D6 = {'survey_content': jVb2}
return YKHO.getForFields(V_D6, unique=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Inv7(YKHO):\n return getattr(YKHO, '_survey', None)",
"def Inv7(YKHO):\n if YKHO._survey is None:\n raise AttributeError('Simulation must have a survey')\n return YKHO._survey",
"def LS1w():\n if cuiw.get(h1Zf) == None:\n return False\n return LN4V.get(cuiw[h1Zf])",
"def fyTu... | [
"0.6168464",
"0.61430013",
"0.5947107",
"0.57578033",
"0.5627846",
"0.562539",
"0.5565567",
"0.53955793",
"0.53793466",
"0.5364546",
"0.51917917",
"0.51314074",
"0.51250744",
"0.5119841",
"0.5111213",
"0.5043555",
"0.5037358",
"0.49138218",
"0.4879083",
"0.48252335",
"0.48233... | 0.86675924 | 0 |
Returns SurveyRecordLogic that belongs to this SurveyLogic. | def lvs2(YKHO):
return YKHO.record_logic | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Inv7(YKHO):\n return getattr(YKHO, '_survey', None)",
"def Inv7(YKHO):\n if YKHO._survey is None:\n raise AttributeError('Simulation must have a survey')\n return YKHO._survey",
"def FIMM(YKHO, C3ST=jcBk, rvDU=A5W7, vynH=n1uZ, u6Xk=crps.logic):\n YKHO.record_logic = u6Xk\n super(GeYe,... | [
"0.6196004",
"0.60749114",
"0.5959654",
"0.58468175",
"0.56011236",
"0.55304193",
"0.5269902",
"0.52126914",
"0.52005297",
"0.5051071",
"0.49523088",
"0.4943305",
"0.48472995",
"0.48184696",
"0.48072025",
"0.4751144",
"0.4749088",
"0.47208706",
"0.47198778",
"0.47136527",
"0.... | 0.66189426 | 0 |
Gets the role of a user for a project, used for SurveyRecordGroup. | def arj_(YKHO, CBIr, Inv7, bNKA):
if Inv7.taking_access == 'mentor evaluation':
VkOM = YKHO.getMentorforProject(CBIr, bNKA)
if len(VkOM) < 1 or len(VkOM) > 1:
G9jH.warning('Unable to determine mentor for user %s. Results returned: %s ' % (CBIr.key().name(), str(VkOM)))
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NMoC(YKHO, j9fW: str):\n bNKA = Gz1E.get_by_name(j9fW)\n Gz1E.check_if_project_exist(bNKA)\n return utJC.get_users_role(bNKA.id)",
"def Iimf(YKHO):\n return Edpv.ROLE[YKHO.role]",
"def Iimf(YKHO):\n return YKHO.urole",
"def Iimf(YKHO, uJjO, kBYg):\n try:\n wvau = MZ86.BoardUser.o... | [
"0.7183346",
"0.6936624",
"0.67729145",
"0.6693874",
"0.66730094",
"0.6672464",
"0.66042745",
"0.66042745",
"0.66042745",
"0.66042745",
"0.66042745",
"0.66042745",
"0.66042745",
"0.6602954",
"0.6487052",
"0.6487052",
"0.64803153",
"0.64663196",
"0.63661236",
"0.6353334",
"0.6... | 0.7341783 | 0 |
Creates and returns a new game | def kR1s(Emd4, CBIr):
BH3N = _apf(user=CBIr, rows=6, columns=7, moves=0, game_canceled=False, game_over=False, board=[])
BH3N.put()
return BH3N | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eLpg(mWFP):\n if mWFP in _apf.GAMES:\n BH3N = _apf.GAMES[mWFP]\n else:\n _apf.GAMES[mWFP] = BH3N = _apf(mWFP)\n return BH3N",
"def joMS(YKHO, QO8w):\n YKHO.games[QO8w] = KndY.Game(QO8w)\n return YKHO.games[QO8w]",
"def joMS():\n BH3N = _apf()\n mVZ4(BH3N, name='Red', stra... | [
"0.83072346",
"0.81604636",
"0.8097658",
"0.80132496",
"0.79703784",
"0.7866733",
"0.778417",
"0.77696383",
"0.7736263",
"0.77230537",
"0.76152617",
"0.75405085",
"0.7509215",
"0.7461363",
"0.7413064",
"0.7360586",
"0.7340618",
"0.73377514",
"0.7269975",
"0.72096425",
"0.7199... | 0.72344345 | 19 |
Filter out sequences of length less than minlen. | def Cayb(eZ_W, UXEK, TcGQ):
print(''.join(['='] * 80))
print('filter_by_minlen()')
print('input_file = ', eZ_W)
print('output_file = ', UXEK)
print('minlen = ', TcGQ)
qQWU = 0
jqgi = 0
d7Ir = 0
with open(eZ_W, 'r') as f5bT:
with open(UXEK, 'w') as gywj:
ixsc = m6_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uMLG(U7GJ, GSaK=5000, wWuS=None):\n XLW7 = (Q6uT for Q6uT in QOo0(U7GJ, format='fasta') if len(Q6uT) > GSaK)\n if wWuS is None:\n return list(XLW7)\n else:\n eSKj(XLW7, format='fasta', into=wWuS)",
"def jmx8(C13M, TcGQ):\n l5Ny = ' '.join((GIN8 for GIN8 in C13M.split() if len(GIN8) ... | [
"0.6902866",
"0.6902328",
"0.68043005",
"0.6803325",
"0.67759734",
"0.67056674",
"0.66555417",
"0.6639328",
"0.6598811",
"0.65745616",
"0.65423846",
"0.65408295",
"0.6448536",
"0.6429173",
"0.6416202",
"0.6407054",
"0.64046556",
"0.6401514",
"0.63948643",
"0.6297506",
"0.6284... | 0.677904 | 4 |
Given a binary tree rooted at root, the depth of each node is the shortest distance to the root. A node is deepest if it has the largest depth possible among any node in the entire tree. The subtree of a node is that node, plus the set of all descendants of that node. Return the node with the largest depth such that it... | def dlKR(YKHO, tk5Y):
YKHO.initial_solution(tk5Y) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def J5p7(YKHO):\n if YKHO.root is None:\n return 0\n cTPb, E5BI = (0, [(YKHO.root, 1)])\n while E5BI:\n Q6kx, pImw = E5BI.pop(0)\n if pImw > cTPb:\n cTPb = pImw\n for aUGN in [Q6kx.left, Q6kx.right]:\n if aUGN is not None:\n E5BI.append((aUG... | [
"0.71868855",
"0.6675522",
"0.66267073",
"0.6591647",
"0.6572496",
"0.65360993",
"0.65176487",
"0.64445335",
"0.6404574",
"0.639957",
"0.6393747",
"0.6374262",
"0.63619053",
"0.6294013",
"0.6275476",
"0.62553",
"0.62180984",
"0.6213677",
"0.6204443",
"0.614676",
"0.6133634",
... | 0.6436325 | 8 |
Returning k_th_current if is possible else 1 | def Omyq(k0lF, JcOb, gcNp, wpjq, v6J_, YRbF, r845):
if r845 + 1 < len(JcOb):
d6pt = tqD0(JcOb, k0lF[r845 + 1])
if d6pt != -1:
if gcNp[d6pt] == 0:
if v6J_ + 1 >= wpjq:
return False
else:
gcNp[d6pt] += 1
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zW0J(kMLo, G1Hx):\n if kMLo.next_node is None:\n if G1Hx == 0:\n return (-1, kMLo.data)\n else:\n return (1, None)\n d6pt, BWXx = zW0J(kMLo.next_node, G1Hx)\n if d6pt == G1Hx:\n return (-1, kMLo.data)\n if d6pt == -1:\n return (-1, BWXx)\n return... | [
"0.68134034",
"0.6680972",
"0.6629368",
"0.65303594",
"0.64822257",
"0.6473028",
"0.6302009",
"0.6295251",
"0.62860245",
"0.6264627",
"0.6181761",
"0.616718",
"0.6162115",
"0.61110854",
"0.6104071",
"0.60968775",
"0.60793614",
"0.6073744",
"0.6069323",
"0.60667706",
"0.606622... | 0.6323383 | 6 |
(Required only by `tags.TagValueIamPolicy`) The policy data generated by a `organizations_get_iam_policy` data source. | def DXuJ(YKHO) -> str:
return qe4Y.get(YKHO, 'policy_data') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kIPs(YKHO) -> str:\n return qe4Y.get(YKHO, 'data_policy')",
"def aEAQ(YKHO, QePW):\n YKHO.check_preconditions(QePW)\n return YKHO.iam_policy_as_json()",
"def qFaa(YKHO):\n return YKHO.policies",
"def qFaa(nPrm):\n HCmI = IwTr(oYNk)\n CPjn(HCmI, nPrm)\n return HCmI",
"def VES9(YKHO)... | [
"0.7546556",
"0.7254208",
"0.70731837",
"0.7023656",
"0.6989579",
"0.68845177",
"0.68845177",
"0.67440593",
"0.67117953",
"0.6707957",
"0.67032534",
"0.66823274",
"0.66711587",
"0.66711587",
"0.66711587",
"0.66711587",
"0.66711587",
"0.66711587",
"0.66711587",
"0.66711587",
"... | 0.80259883 | 1 |
Get the episode title. Japanese title is prioritized. | def ZWnT(xgXB: Episode) -> int:
for leAC in xgXB.titles:
if leAC.lang == 'ja':
return leAC.title
else:
return xgXB.titles[0].title | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ontt(YKHO):\n UTX6 = YKHO.__sendUserMessage(0, YKHO.IPC_GET_PLAYING_TITLE)\n return YKHO.__readStringFromMemory(UTX6, True)",
"def leAC(YKHO):\n try:\n leAC = YKHO.tree.xpath('//div[@id=\"post-8\"]/h1/text()')\n leAC, P4t4 = leAC[0].split(' - ')\n except Exception:\n leAC = '... | [
"0.71063286",
"0.693993",
"0.69290245",
"0.6913043",
"0.6822973",
"0.68123347",
"0.6785359",
"0.67815053",
"0.677779",
"0.6777518",
"0.67745703",
"0.67745703",
"0.6744116",
"0.6744116",
"0.6744116",
"0.67429",
"0.6741911",
"0.67371345",
"0.67371345",
"0.67371345",
"0.67371345... | 0.8410979 | 0 |
Find a matching subelement and return its text. If default is given, return it if a matching subelement is not found. Otherwise, ValueError is raised. | def NIWz(U6D_, kUBT, WmM4=None):
aUGN = U6D_.find(kUBT)
try:
return aUGN.text
except AttributeError:
if WmM4 is not None:
return WmM4
else:
raise EQuU(U6D_, kUBT) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Sdzz(YKHO, mWFP, WmM4=''):\n mWFP = YKHO._fix_ns(mWFP)\n E8RN = YKHO.xml.find(mWFP)\n if E8RN is None or E8RN.text is None:\n return WmM4\n else:\n return E8RN.text",
"def PMYa(YKHO, TZ9E, WmM4=''):\n geyT = YKHO.find(TZ9E)\n if geyT is not None:\n if not geyT.text:\n ... | [
"0.7419216",
"0.73769844",
"0.72881037",
"0.72881037",
"0.72665083",
"0.71504056",
"0.6786427",
"0.67268765",
"0.6460165",
"0.6348833",
"0.6298357",
"0.62856567",
"0.6229238",
"0.61801136",
"0.61605495",
"0.61605495",
"0.6142126",
"0.61377925",
"0.60896134",
"0.6075558",
"0.6... | 0.7845779 | 0 |
Add a node of value val before the first element of the linked list. After the insertion, the new node will be the first node of the linked list. | def PgMl(YKHO, wEf2: int) -> None:
YKHO.root = Msxl(wEf2, YKHO.root)
YKHO.ln += 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yMiq(YKHO, wEf2, Z6gX):\n if YKHO.includes(wEf2):\n if YKHO.head.value == wEf2:\n YKHO.insert(Z6gX)\n else:\n Q6kx = o7DN(Z6gX)\n jvSB = YKHO.head\n while jvSB.nxt.value != wEf2:\n jvSB = jvSB.nxt\n Q6kx.nxt = jvSB.nxt\n ... | [
"0.84593505",
"0.8395178",
"0.83873093",
"0.8136637",
"0.80744994",
"0.8035562",
"0.7995206",
"0.79605454",
"0.7942256",
"0.7921097",
"0.78947777",
"0.7870307",
"0.78390753",
"0.7832724",
"0.7783744",
"0.77622366",
"0.7701862",
"0.7674554",
"0.7673125",
"0.76703274",
"0.76633... | 0.73841625 | 38 |
unsigned int WINAPI SetReadMode(int mode) Description This function will set the readout mode to be used on the subsequent acquisitions. | def JH34(YKHO, Tuqy: int) -> AzJI[int, bool, str]:
RaQ6 = {0: 'Full Vertical Binning', 1: 'Multi-Track', 2: 'Random-Track', 3: 'Single-Track', 4: 'Image'}
if Tuqy not in RaQ6:
return YKHO._error_andor(-1, user_def=f'Wrong mode {Tuqy} for SetReadMode. MODES: {RaQ6}')
Tuqy = gk2W.c_int(Tuqy)
Ylbp ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YEgi(YKHO, Tuqy):\n YKHO._send_command(P6fI.CMD_SET_READ_MODE, Tuqy, wait_response=False)",
"def H1N_(YKHO, Tuqy):\n from time import sleep\n if Tuqy not in fZgN.keys():\n print('Invalid mode', Tuqy)\n return\n YKHO.mode = Tuqy\n YKHO.serial_if.write(fZgN[YKHO.mode])\n print('... | [
"0.78746223",
"0.70055884",
"0.6814401",
"0.6737177",
"0.6656886",
"0.66396135",
"0.65508693",
"0.6534986",
"0.65254813",
"0.65254813",
"0.6495052",
"0.64729935",
"0.6452773",
"0.6429496",
"0.6400778",
"0.63501376",
"0.63333935",
"0.62472785",
"0.6237471",
"0.6233494",
"0.618... | 0.80407816 | 0 |
Find 2D contour given discrete samples of posterior distribution. | def x_Ms(WKvO, LVAh, epBp, Pyrc, kTwQ=[0.95, 0.68], _mSQ=None, NKcE='raw'):
if NKcE == 'raw':
kTwQ, bctv = PjaN(epBp, nu=kTwQ)
else:
qJvq, btha = oyIN.meshgrid(Pyrc[0], Pyrc[1])
LTIa = oyIN.array([WKvO, LVAh]).T
hkxX = epBp
Cs6h = ih8r(LTIa, epBp, (qJvq, btha), method=NKc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DNi_(WKvO, LVAh, VoLU='', IICq='', bVvo=None, _Il2=None, QaWx='red', GAJY=22, moRk=('SkyBlue', 'Aqua'), Cwt5=0.7, BQGg=None, bYzl=None, h3cg=None, Z3uP=None, leAC='', aM00=False, vH4O='gray', d1_o=2, sYYb=None, hjvg=True, nF9T=False):\n exwG = 100\n LTIa = oyIN.array([WKvO, LVAh])\n IKSE = SdIb(LTIa)\... | [
"0.6797802",
"0.6434455",
"0.6298089",
"0.6211822",
"0.61773026",
"0.61135346",
"0.6098822",
"0.60812515",
"0.6007106",
"0.59763753",
"0.58048195",
"0.577748",
"0.573057",
"0.5694493",
"0.56581944",
"0.56581944",
"0.5646764",
"0.5642574",
"0.5622081",
"0.561562",
"0.56080854"... | 0.0 | -1 |
Bin samples in x and y. This is for backward compatibility. It's just a wrapper around `quantify_scatter` defined above. | def Mzqq(WKvO, LVAh, VQVM, _mSQ=None, c5uu=False, yArv=None, z3pA=False, yYKB=False):
if c5uu:
return FA3m(WKvO, LVAh, VQVM, weights=_mSQ, method_std='bounds', inclusive=yYKB)
elif yArv is not None:
jzdc, Fg_i, Z9rn, Csk6 = FA3m(WKvO, LVAh, VQVM, weights=_mSQ, method_std=yArv, inclusive=yYKB)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cnb0(WKvO, LVAh, Pyrc):\n p6S0 = oyIN.digitize(WKvO, Pyrc)\n OBkc = oyIN.zeros(p6S0.max() + 1)\n DhCE = oyIN.zeros(p6S0.max() + 1)\n for YRbF in oyIN.unique(p6S0):\n OBkc[YRbF] = WKvO[p6S0 == YRbF].mean()\n DhCE[YRbF] = LVAh[p6S0 == YRbF].mean()\n return (OBkc, DhCE)",
"def Ffz0(... | [
"0.6282605",
"0.6046809",
"0.6035451",
"0.6024872",
"0.6017015",
"0.6014334",
"0.5917963",
"0.59080935",
"0.5877642",
"0.58466184",
"0.57552725",
"0.5707315",
"0.56986403",
"0.56453264",
"0.5636876",
"0.562807",
"0.5612761",
"0.5585259",
"0.55733585",
"0.5536882",
"0.5525174"... | 0.66852087 | 0 |
Set up the test by requesting the home page uri. | def FCbF(YKHO):
YKHO.response = G4JS.get(YKHO.url, params=YKHO.params) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FCbF(YKHO):\n YKHO.response = YKHO.client.get(gxEw('home'))",
"def FCbF(YKHO):\n YKHO.response = YKHO.client.get(gxEw('homepage'))",
"def GvGQ(YKHO, x0hE):\n geh0 = x0hE.get(nKyW('page.home'))\n assert geh0.status_code == 200",
"def rKWs(YKHO):\n geh0 = YKHO.client.get(nKyW('home'))\n Y... | [
"0.7843563",
"0.77738506",
"0.7740331",
"0.77271146",
"0.7604721",
"0.75499797",
"0.7523054",
"0.7449537",
"0.7435959",
"0.74329007",
"0.7405675",
"0.73750126",
"0.7365261",
"0.73066217",
"0.72825956",
"0.72685254",
"0.7226866",
"0.72215694",
"0.7208227",
"0.7190419",
"0.7185... | 0.0 | -1 |
Check that the expected template is loaded. | def jsJv(YKHO):
for K4TY in YKHO.testCodes:
YKHO.assertIn(K4TY, YKHO.response.text, 'There appears to be a problem with the rendering of the template, TestCode: {0}. Template returns the following:\n{1}'.format(K4TY, YKHO.response.text)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xbkg():\n PePH = ('askbot.skins.loaders.load_template_source', 'askbot.skins.loaders.filesystem_load_template_source')\n UAju = list()\n for DWkG in PePH:\n if DWkG in POek.TEMPLATE_LOADERS:\n UAju.append('remove \"%s\" from the TEMPLATE_LOADERS setting' % DWkG)\n lhxR = 'askbot.s... | [
"0.74079",
"0.7344064",
"0.7336823",
"0.72911334",
"0.72730225",
"0.72668296",
"0.72499967",
"0.72232515",
"0.72014266",
"0.718952",
"0.71863276",
"0.7179506",
"0.71722084",
"0.71647406",
"0.7144121",
"0.71417856",
"0.713447",
"0.71222764",
"0.71209997",
"0.70500535",
"0.7040... | 0.0 | -1 |
Send a post request containing specified data by the subclass of this type. | def FCbF(YKHO):
YKHO.response = YKHO.s.post(YKHO.url, data=YKHO.payload, files=YKHO.files, params=YKHO.params, headers=YKHO.headers) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m8z6(YKHO, **B2fa):\n B2fa['req_type'] = 'post'\n return YKHO._request(**B2fa)",
"def oJEX(YKHO, nPrm=None, MOPg=None):\n return YKHO.send_http_request('POST', data=nPrm, headers=MOPg)",
"def bIrq(YKHO, nPrm):\n YKHO._send_data(YKHO.base_uri, nPrm, 'POST', 'Adding')\n YKHO.get()\n return ... | [
"0.7102892",
"0.7037983",
"0.701539",
"0.6832818",
"0.6783777",
"0.6779243",
"0.6766482",
"0.6730046",
"0.66765195",
"0.66570985",
"0.66421497",
"0.6611779",
"0.660234",
"0.6590307",
"0.6575497",
"0.6557569",
"0.65111685",
"0.64997584",
"0.6492576",
"0.64818877",
"0.64818877"... | 0.0 | -1 |
Load a previously saved model and its history from a file | def uyMl(xEeo, u5gh=-1):
print('Loading model from %s' % xEeo)
nPrm = ht2j.load(xEeo)
jKzz(nPrm['cfg']['dtype'])
bk_f = s0z8(nPrm['model_geom_class_str'], nPrm['history_geom_state'][u5gh])
ephx = jth9.deepcopy(nPrm['model_state'])
Xlvp = [ephx[G1Hx].item() for G1Hx in ephx if 'probes' in G1Hx an... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uyMl(Ux0P):\n pass",
"def uyMl(YKHO):\n jkyf = ZylS.train.Saver()\n jkyf.restore(YKHO.sess, YKHO.checkpoint_path)\n print('Model restored.')",
"def tyeH(YKHO, mWFP, UeD_=None, PJWX=True):\n if PJWX:\n print('loading model from disk ...', end='')\n YKHO.kwargs['model'] = uyMl('./mod... | [
"0.73323774",
"0.7291728",
"0.7276973",
"0.7247734",
"0.72257894",
"0.7182168",
"0.71777403",
"0.7136223",
"0.7133127",
"0.7099497",
"0.70834756",
"0.70621914",
"0.704729",
"0.7047172",
"0.70190036",
"0.7016745",
"0.7016745",
"0.7016745",
"0.70153534",
"0.70015",
"0.69847023"... | 0.0 | -1 |
Initialize a n_dimensionn_dimension table using empty lists and return it | def YnkF(I8N9):
tyNF = oyIN.zeros((I8N9, I8N9), dtype=object)
for YRbF in range(I8N9):
for r845 in range(I8N9):
tyNF[YRbF][r845] = []
return tyNF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MkTf(r8hN, exwG):\n return [[0] * exwG for bGrB in range(r8hN)]",
"def MkTf(r8hN, exwG):\n return [[0] * exwG for bGrB in range(r8hN)]",
"def rRIm():\n yzQ0, MKlR = (3, 54)\n tyNF = [[0 for WKvO in range(yzQ0)] for LVAh in range(MKlR)]\n return tyNF",
"def TnFK(lGpN):\n tyNF = []\n f... | [
"0.7274922",
"0.7274922",
"0.715296",
"0.7018968",
"0.6696095",
"0.66436136",
"0.6578326",
"0.65735775",
"0.6521301",
"0.6455165",
"0.6446609",
"0.6403127",
"0.6344967",
"0.6326534",
"0.63106436",
"0.63026464",
"0.6300055",
"0.62838686",
"0.62737983",
"0.62591547",
"0.6250412... | 0.84002346 | 0 |
Initial sample cart item creation API for developer testing. | def q0CV(QePW):
if QePW.user.is_authenticated:
uJjO = QePW.user.id
bUWH = [w21X(name='Palm Print Back Graphic T-shirt', price=23, quantity=1, user_id=uJjO, pic_address='https://media.boohoo.com/i/boohoo/mzz27451_blue_xl?$product_image_category_page_horizontal_filters_desktop_2x$&fmt=webp'), w21X(nam... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tTPK():\n xryH = S8SU.create_cart()\n return (pz3A(xryH.to_json()), 201)",
"def QnJ4(YKHO):\n gf_J = {'name': 'Spyglass', 'description': 'Antique spyglass found in the year 1438', 'current_price': 998.88, 'bidding_closure_date': '2021-09-06 12:00:00'}\n geh0 = YKHO.client.post(U9aN + 'api/item/',... | [
"0.75866437",
"0.74510443",
"0.71009856",
"0.7025545",
"0.690666",
"0.68813705",
"0.68807846",
"0.68776494",
"0.68746823",
"0.6810919",
"0.68060535",
"0.6741419",
"0.66646594",
"0.65980136",
"0.65816665",
"0.64771205",
"0.6453686",
"0.6408337",
"0.63980496",
"0.636797",
"0.63... | 0.0 | -1 |
Response POST request and update cart items, product size set and product.item instance. | def INJ3(QePW):
if QePW.method == 'POST':
rIYp = QePW.POST
cTRz = int(rIYp.get('quantity', ''))
SllW = int(rIYp.get('cart_item_id', 0))
hHJw = w21X.objects.get(id=SllW)
Lx3t = hHJw.product
V4iq = hHJw.size
yOVS = hHJw.quantity
ha5Z = Lx3t.size_set.get(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def h7Nq(QePW, ht7m):\n Lx3t = Iofl(msfn, pk=ht7m)\n cTRz = int(QePW.POST.get('quantity'))\n zNig = None\n FGW3 = None\n if 'product_size' or 'product_number' in QePW.POST:\n zNig = QePW.POST.get('product_size', None)\n FGW3 = QePW.POST.get('product_number', None)\n xryH = QePW.sess... | [
"0.7068213",
"0.6908796",
"0.6880807",
"0.67432076",
"0.66993624",
"0.66953796",
"0.66480064",
"0.66420245",
"0.6610996",
"0.65815026",
"0.6568735",
"0.656767",
"0.6513491",
"0.6487112",
"0.6479005",
"0.63964087",
"0.6395436",
"0.63833505",
"0.63832825",
"0.63652354",
"0.6358... | 0.6758539 | 3 |
Calculates IoU of the given box with the array of the given boxes. | def BR5u(WsnK, UT57):
RjuK = [WsnK.intersection(PI_E).area / (WsnK.union(PI_E).area + 1e-12) for PI_E in UT57]
return oyIN.array(RjuK, dtype=oyIN.float32) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aOkw(FlUN, oUSw):\n ab__ = (FlUN[2] - FlUN[0]) * (FlUN[3] - FlUN[1])\n f0tD = (oUSw[:, 2] - oUSw[:, 0]) * (oUSw[:, 3] - oUSw[:, 1])\n frsW = oyIN.maximum(FlUN[0], oUSw[:, 0])\n TdlV = oyIN.maximum(FlUN[1], oUSw[:, 1])\n yjMy = oyIN.minimum(FlUN[2], oUSw[:, 2])\n YvNL = oyIN.minimum(FlUN[3], o... | [
"0.8772688",
"0.85602486",
"0.85394824",
"0.81327826",
"0.81262887",
"0.81135577",
"0.81135577",
"0.81135577",
"0.81135577",
"0.81135577",
"0.81135577",
"0.81093556",
"0.80960786",
"0.8049694",
"0.80243164",
"0.80145186",
"0.78447765",
"0.7837404",
"0.77805215",
"0.76905537",
... | 0.0 | -1 |
Walk a page tree recursively, and yield the root and all its children. | def ZAda(YKHO, pmON, **NArs):
NArs = NArs.copy()
XU__ = NArs.pop('depth_1st', False)
tohc = YKHO.url(pmON)
YKHO.log.debug('Walking %r %s', tohc, 'depth 1st' if XU__ else 'breadth 1st')
E5BI = g760.deque([(0, [YKHO.get(tohc, **NArs)])])
while E5BI:
rb7a, Gqqd = E5BI.pop()
for B2Dn... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZAda(YKHO):\n yield YKHO.root\n for geyT in YKHO.root.walk():\n yield geyT",
"def eNvf(YKHO):\n if not YKHO.children:\n return\n for y0cW in sorted(YKHO.children):\n aUGN = YKHO.children[y0cW]\n yield aUGN\n for aUGN in aUGN.traverse():\n yield aUGN",... | [
"0.7176025",
"0.7112304",
"0.6968051",
"0.6959593",
"0.6906308",
"0.687348",
"0.6688538",
"0.6640424",
"0.66252947",
"0.65767664",
"0.65532374",
"0.65246636",
"0.6489676",
"0.6445341",
"0.6442375",
"0.64355093",
"0.6414368",
"0.63949585",
"0.6330099",
"0.63293016",
"0.6323185... | 0.7775622 | 0 |
Compute softmax values for each sets of scores in x. | def N93T(WKvO):
uw5A = oyIN.exp(WKvO)
return uw5A / uw5A.sum(axis=0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oSvh(WKvO):\n S2MS = []\n if oyIN.array(WKvO).ndim == 1:\n hrCc = oyIN.exp(WKvO)\n RmXN = oyIN.sum(hrCc)\n xzMv = hrCc / RmXN\n dzye = xzMv\n else:\n dzye = oyIN.exp(cCrA) / oyIN.sum(oyIN.exp(cCrA), axis=0)\n return dzye",
"def N93T(WKvO):\n j1LR = oyIN.exp(o... | [
"0.80113125",
"0.77607703",
"0.77607703",
"0.7687368",
"0.76707524",
"0.76605",
"0.76571554",
"0.76571554",
"0.76571554",
"0.76571554",
"0.76571554",
"0.76571554",
"0.76571554",
"0.76397043",
"0.762786",
"0.7551623",
"0.7532752",
"0.74565",
"0.73242354",
"0.73171765",
"0.7298... | 0.0 | -1 |
this function checks if $right is present as a column variable | def fMCC(YKHO) -> bool:
Hu5_ = False
if YKHO.expression:
for YRbF in YKHO.expression:
Hu5_ = Hu5_ or YRbF.check_for_right()
return Hu5_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hu5_(YKHO):\n return YKHO.r is not None",
"def fMCC(YKHO) -> bool:\n if YKHO.value and YKHO.value == '$right':\n return True\n else:\n return False",
"def J7HI(YKHO, iVRZ: str, nP88: Table, pmEE: Table):\n ygEh = hIzy.match(iVRZ)\n vMHP = ''\n if ygEh:\n iVRZ = ygEh.g... | [
"0.6777545",
"0.65530694",
"0.65479213",
"0.6412757",
"0.6334636",
"0.6128187",
"0.6090076",
"0.60196406",
"0.5857609",
"0.58472747",
"0.5820027",
"0.5807226",
"0.5768558",
"0.57538563",
"0.57488996",
"0.5741207",
"0.5706495",
"0.5688097",
"0.56874067",
"0.56704396",
"0.56631... | 0.6087053 | 7 |
Mock Empty Scan Response | def xUtY(x0hE):
geh0 = {'Items': [], 'ConsumedCapacity': {'TableName': 'TestTable', 'CapacityUnits': 123.0, 'Table': {'CapacityUnits': 123.0}, 'LocalSecondaryIndexes': {'string': {'CapacityUnits': 123.0}}, 'GlobalSecondaryIndexes': {'string': {'CapacityUnits': 123.0}}}}
CppO = z1GO(x0hE.meta.client)
CppO.ad... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lAB8(x0hE, sisH):\n from RubrikPolaris import rubrik_sonar_ondemand_scan_result_command\n L_pB = S3ET(Hy7s.path.join(Hy7s.path.dirname(xAKo), 'test_data/sonar_ondemand_scan_result_empty_response.json'))\n x7oU = S3ET(Hy7s.path.join(Hy7s.path.dirname(Hy7s.path.realpath(xAKo)), WJ1r))\n h2IT = [{'jso... | [
"0.70350254",
"0.67725295",
"0.66779095",
"0.66518277",
"0.6633049",
"0.66162664",
"0.6560243",
"0.6536877",
"0.65131265",
"0.6496422",
"0.6298032",
"0.62808144",
"0.623696",
"0.6214014",
"0.61446023",
"0.6141263",
"0.6132679",
"0.6125105",
"0.6125078",
"0.61028445",
"0.60826... | 0.77039504 | 0 |
calculate the new image applying a custom filter | def rvE2(YKHO, WZcn):
H5Km = YKHO.create_padding(WZcn.shape[0])
vgXP = int((WZcn.shape[0] - 1) / 2)
for YRbF in range(vgXP, YKHO.height):
for r845 in range(vgXP, YKHO.width):
YKHO.result[YRbF - vgXP, r845 - vgXP] = oyIN.sum(H5Km[YRbF - vgXP:YRbF + vgXP + 1, r845 - vgXP:r845 + vgXP + 1] *... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Wo_L(YKHO):\n YKHO.protein.image = NYai(YKHO.method_fn, YKHO.protein, YKHO.points).reshape(3 * (YKHO.size,) + (-1,))\n YKHO.ligand.image = NYai(YKHO.method_fn, YKHO.ligand, YKHO.points).reshape(3 * (YKHO.size,) + (-1,))",
"def Euvd(LNo8, filter):\n assert filter.shape[0] % 2 == 1\n assert filter.... | [
"0.7305473",
"0.7263396",
"0.7047633",
"0.6986229",
"0.6979316",
"0.69760454",
"0.69534856",
"0.691823",
"0.6913057",
"0.69118685",
"0.6899576",
"0.68564004",
"0.6855429",
"0.68304354",
"0.68259656",
"0.6818663",
"0.68027556",
"0.6782468",
"0.669211",
"0.669121",
"0.66711146"... | 0.6151496 | 84 |
Update position based on speed, angle Update speed based on drag | def BZN_(YKHO):
YKHO.x += epAf.sin(YKHO.angle) * YKHO.speed
YKHO.y -= epAf.cos(YKHO.angle) * YKHO.speed
YKHO.speed *= YKHO.drag | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BZN_(YKHO):\n YKHO.direction.x = epAf.sin(-epAf.radians(YKHO.angle))\n YKHO.direction.y = -epAf.cos(epAf.radians(YKHO.angle))\n YKHO.position.x += YKHO.velocity.x * YKHO.speed / 100.0\n YKHO.position.y += YKHO.velocity.y * YKHO.speed / 100.0",
"def BZN_(YKHO):\n YKHO.x += epAf.sin(YKHO.angle) ... | [
"0.7583556",
"0.70351744",
"0.70015794",
"0.69838315",
"0.69055176",
"0.69034797",
"0.6895441",
"0.6858399",
"0.68411314",
"0.6826172",
"0.67830706",
"0.6767189",
"0.6765691",
"0.6765691",
"0.66325366",
"0.66199106",
"0.65797275",
"0.65652704",
"0.6562745",
"0.6533319",
"0.65... | 0.7841373 | 0 |
Create and return a new 'Movie' instance, given the validated data | def eLpg(YKHO, vGfb):
return H4Ej.objects.create(**vGfb) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LOWy(pB3N):\n nPrm = QePW.get_json()\n try:\n R5D2 = H4Ej()\n R5D2.title = nPrm['title']\n R5D2.release_date = nPrm['release_date']\n R5D2.insert()\n return (pz3A({'success': True, 'movie': R5D2.format()}), 200)\n except BaseException:\n eTsH(401)",
"def DMf... | [
"0.68110156",
"0.66892546",
"0.65739584",
"0.65065193",
"0.6448834",
"0.6445282",
"0.6348116",
"0.63456476",
"0.63274217",
"0.6326558",
"0.6302591",
"0.6245981",
"0.62396306",
"0.62126607",
"0.61940616",
"0.61079276",
"0.610623",
"0.6046312",
"0.6041182",
"0.60382944",
"0.602... | 0.8661532 | 0 |
Update and return an existing 'Movie' instance, given the validated data | def QdZT(YKHO, KAOR, vGfb):
KAOR.title = vGfb.get('title', KAOR.title)
KAOR.year = vGfb.get('year', KAOR.year)
KAOR.description = vGfb.get('description', KAOR.description)
KAOR.ranking = vGfb.get('ranking', KAOR.ranking)
KAOR.rating = vGfb.get('rating', KAOR.rating)
KAOR.review = vGfb.get('revie... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qZa5(Ca1L):\n xTXs = Ca1L.get('id')\n LHvA = H4Ej.query.get(xTXs)\n if not LHvA:\n G0um(404, message=f'No movie was found for id {xTXs}')\n LHvA.title = Ca1L.get('title') if Ca1L.get('title') else LHvA.title\n LHvA.release_date = Ca1L.get('release_date') if Ca1L.get('release_date') else L... | [
"0.7555956",
"0.74030787",
"0.6727932",
"0.67155796",
"0.67121106",
"0.66274816",
"0.657472",
"0.654616",
"0.6531378",
"0.65035874",
"0.64805996",
"0.6474365",
"0.645781",
"0.6450867",
"0.6445607",
"0.6445607",
"0.64294547",
"0.63962847",
"0.63852906",
"0.6355076",
"0.6350575... | 0.71782315 | 2 |
Extract variable name from scope name. | def z4iT(h7Vl: str):
if not h7Vl:
return None
SRYB = h7Vl.split(tvOd)[-1].lower()
SRYB = SRYB.replace(b3Ci, p8If).replace(OMid, '')
return SRYB | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mZ1z(XP5J):\n for zFiD in tq_1.getframeinfo(tq_1.currentframe().f_back)[3]:\n r8hN = ZbWC.search('\\\\bvarname\\\\s*\\\\(\\\\s*([A-Za-z_][A-Za-z0-9_]*)\\\\s*\\\\)', zFiD)\n if r8hN:\n return r8hN.group(1)",
"def IXzM(SRYB):\n for o36Q in reversed(tq_1.stack()):\n ZWCE = ... | [
"0.7520235",
"0.7274963",
"0.7252474",
"0.7205693",
"0.7170324",
"0.7107091",
"0.7107091",
"0.7052728",
"0.70151734",
"0.6993166",
"0.6978107",
"0.6978107",
"0.6978107",
"0.6978107",
"0.6978107",
"0.6972447",
"0.68848723",
"0.68699247",
"0.68506134",
"0.67787564",
"0.6776251"... | 0.816198 | 0 |
Reset the positions of inactive particles to x0. | def BVvA(YKHO):
QyVM = YKHO.particles['isActive'] == False
YKHO.particles['X'][QyVM] = YKHO.particles['X0'][QyVM]
YKHO.particles['Y'][QyVM] = YKHO.particles['Y0'][QyVM]
YKHO.particles['Z'][QyVM] = YKHO.particles['Z0'][QyVM] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def daff(YKHO):\n YKHO.x_position = 0\n YKHO.y_position = 0",
"def SiRx(YKHO) -> None:\n YKHO._x = YKHO._x0",
"def SiRx(YKHO):\n YKHO.x = 0\n YKHO.y = 0",
"def iqFv(YKHO):\n YKHO.call('positionerResetPosition', (YKHO.axis_number,))",
"def SiRx(YKHO):\n YKHO.x = YKHO.start_position[0]\n... | [
"0.70142585",
"0.6934025",
"0.69053847",
"0.68747026",
"0.6829635",
"0.6803509",
"0.6799839",
"0.6718366",
"0.67113864",
"0.6548731",
"0.6516508",
"0.6515029",
"0.64643985",
"0.64438033",
"0.64438033",
"0.6441311",
"0.64167386",
"0.6410425",
"0.64012176",
"0.63936245",
"0.637... | 0.84781086 | 0 |
Calculates the rolling exponentially weighted moving variance of a series. | def bT3Y(Mp3U, UCNy, zJeG, RNS6=0, SoQy=True):
if SoQy:
h2RK = (1.0 + 2.0 * zJeG) / (2.0 * zJeG)
else:
h2RK = 1.0
if not isinstance(UCNy, type(Mp3U)):
raise Exception('Input arrays must be of the same type!')
if isinstance(Mp3U, oM6q):
if Mp3U.index is not UCNy.index:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MYwo(dy_H, u54L):\n dy_H.index = rLdf.to_datetime(dy_H.index)\n I8JS = dy_H.rolling(u54L).var()\n I8JS.name = dy_H.name + '_var'\n return I8JS",
"def rIP3(YKHO, dy_H, Cwt5):\n _mSQ = oyIN.array([(1 - Cwt5) ** YRbF for YRbF in range(YKHO.window)])\n return (dy_H.ix[-YKHO.window:] * _mSQ).sum... | [
"0.728159",
"0.6609447",
"0.6554593",
"0.6537783",
"0.6534718",
"0.63055557",
"0.6262843",
"0.6205707",
"0.6184672",
"0.6158673",
"0.614476",
"0.6110352",
"0.6108217",
"0.61079776",
"0.60930145",
"0.60828155",
"0.60630673",
"0.60630673",
"0.60630673",
"0.60630673",
"0.6061365... | 0.0 | -1 |
Initialize an Athena audit. | def FIMM(YKHO, Cwt5: float, RA_F: float, xvN2: float, fCl7: Contest):
if RA_F <= 0:
raise ValueError('Delta must be > 0.')
super().__init__(Cwt5, 0.0, xvN2, True, fCl7)
YKHO.delta = RA_F
for q2Xo, OYTs in YKHO.sub_audits.items():
YKHO.sub_audits[q2Xo].min_sample_size = YKHO.get_min_sampl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, tweL, mkPq, zb3C, Cxz5) -> None:\n super(Byb4, YKHO).__init__(tweL, mkPq, zb3C, Cxz5)\n YKHO.audits_table_name = GWDZ\n YKHO.state = PS82(connection_string=YKHO.connection_string, file_path='audits')",
"def PMHU(YKHO, **B2fa):\n B2fa.update({'organization': YKHO.assessment.organization... | [
"0.6942945",
"0.68825495",
"0.68537915",
"0.6472804",
"0.6337036",
"0.6301541",
"0.6224841",
"0.6221026",
"0.62063503",
"0.6104029",
"0.6040694",
"0.59529823",
"0.5885987",
"0.5787085",
"0.5764813",
"0.574614",
"0.5741496",
"0.5739373",
"0.57109535",
"0.565875",
"0.56502455",... | 0.0 | -1 |
Return the risk level of an interactive Athena audit. Noninteractive and bulk Athena audits are not considered here since the sampled number of reported winner ballots is not available. | def NKPV(YKHO):
if len(YKHO.pvalue_schedule) < 1:
return None
return min(YKHO.pvalue_schedule) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pxBh(YKHO) -> int:\n return qe4Y.get(YKHO, 'audit_status')",
"def I_cD(YKHO):\n if 'RiskyDstn' in YKHO.time_vary:\n LYDC = YKHO.RiskyAvgTrue\n TirB = YKHO.RiskyStdTrue\n else:\n LYDC = YKHO.RiskyAvg\n TirB = YKHO.RiskyStd\n YKHO.shocks['Risky'] = t9P0.from_mean_std(LYD... | [
"0.5844017",
"0.5467109",
"0.5463261",
"0.5451846",
"0.54445606",
"0.54359",
"0.5301255",
"0.5281462",
"0.5239938",
"0.5157273",
"0.5142831",
"0.51160896",
"0.5103926",
"0.50522107",
"0.50442797",
"0.50317466",
"0.5010651",
"0.49967209",
"0.4963909",
"0.49382025",
"0.49382025... | 0.50201017 | 16 |
Add session to list. Accepts a session object and returns its index in the sessions list. | def y0M8(cuiw):
global sessions
G9jH.info('Adding session %s to global list.' % cuiw.name)
Aing.append(cuiw)
if t3rF(cuiw) not in GPtr.main['sessions']['sessions']:
GPtr.main['sessions']['sessions'].append(t3rF(cuiw))
GPtr.main.write()
return Aing.index(cuiw) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Q565(YKHO, cuiw):\n YKHO._sessions.append(cuiw)",
"def RFVC(Emd4, cuiw, YEnM):\n cuiw.add(YEnM)",
"def H2v5(YKHO, cuiw):\n raise NotImplemented()",
"def KfiN(cuiw: str):\n try:\n return Aing.index(cuiw)\n except Exception as e:\n Aing.append(cuiw)\n print(tTpl, file=f6... | [
"0.7146059",
"0.6769676",
"0.65673894",
"0.65435886",
"0.6451399",
"0.638204",
"0.6313891",
"0.631089",
"0.6286761",
"0.621219",
"0.61656314",
"0.6151196",
"0.61449564",
"0.6127647",
"0.58969665",
"0.5802507",
"0.5789146",
"0.56788605",
"0.56606364",
"0.5657736",
"0.56418335"... | 0.8094983 | 0 |
Closes the current database session. Useful if needed for "long" interactive commands where we want to release the connection and later reacquire it. | async def release(YKHO):
return await YKHO._release(*HwRy.exc_info()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sV_n():\n wNWy.r('dbDisconnect(con)')",
"def IcA6(bGrB):\n if not NCls.connector.database.is_closed():\n NCls.connector.database.close()",
"def ngVb(YKHO):\n NCls = YKHO.db_con\n if NCls is not None:\n NCls.close()",
"def yZlT(AJ5d=None):\n NCls.session.close()",
"def YzkT(... | [
"0.7315609",
"0.7234593",
"0.7182757",
"0.71803963",
"0.7152437",
"0.7070334",
"0.70458025",
"0.70430756",
"0.7040635",
"0.7038583",
"0.7038583",
"0.7038583",
"0.7038583",
"0.7038583",
"0.7038583",
"0.7038583",
"0.7031285",
"0.70308024",
"0.7029766",
"0.70145005",
"0.6997479"... | 0.0 | -1 |
Save the optimizer state with epoch no. along with the weights | def NyUj(a2jN, C3ST, cfQG, y7GR):
ZGE9 = Hy7s.path.join(a2jN, 'transformer_ep' + str(cfQG) + '_' + y7GR + '.pt')
ht2j.save(C3ST.state_dict(), ZGE9)
print('Model saved to disk... : {}'.format(ZGE9)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vdwA(YKHO, BrK6, qtWj):\n Ux0P = '%s_%s_%s_%d.prm' % (str(YKHO.args.game.lower()), str(YKHO.args.learner_type.lower()), str(YKHO.args.optimizer.lower()), qtWj + 1)\n YKHO.model.save_params(Hy7s.path.join(BrK6, Ux0P))",
"def vdwA(YKHO, qtWj):\n iexi = Hy7s.path.join(YKHO.opt.outf, YKHO.opt.name, 'tra... | [
"0.7338475",
"0.72641885",
"0.7212711",
"0.71627945",
"0.7117848",
"0.7082065",
"0.70413554",
"0.7032418",
"0.7032418",
"0.7032418",
"0.70251036",
"0.7014623",
"0.6988076",
"0.6955726",
"0.6930654",
"0.6890541",
"0.6868198",
"0.6864468",
"0.68580776",
"0.68537515",
"0.6844166... | 0.0 | -1 |
Load the pretrained weights to the models' encoder and decoder modules | def SUd8(a2jN, C3ST, cfQG, y7GR):
ZGE9 = Hy7s.path.join(a2jN, 'transformer_ep' + str(cfQG) + '_' + y7GR + '.pt')
if Hy7s.path.isfile(ZGE9):
C3ST.load_state_dict(ht2j.load(ZGE9))
print('Loading Transformer weights... : {}'.format(ZGE9))
return C3ST | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oIHg(YKHO):\n rEli = dict()\n rEli['weights'] = {}\n rEli['biases'] = {}\n J_pJ = [YKHO.network_architecture['n_input']] + YKHO.network_architecture['hidden']\n _Rzr = len(J_pJ)\n yvCd = YKHO.pretrain_path + '/weight'\n for YRbF in range(_Rzr - 1):\n exwG = YRbF + 1\n rEli['w... | [
"0.7648176",
"0.7577531",
"0.7577531",
"0.7577531",
"0.7532959",
"0.7405623",
"0.7319281",
"0.72260725",
"0.7223555",
"0.7222989",
"0.7222989",
"0.7218401",
"0.7204794",
"0.720213",
"0.7188594",
"0.7181315",
"0.71275455",
"0.7123528",
"0.71006316",
"0.7095815",
"0.70787334",
... | 0.7278026 | 7 |
Retrieve last run program | def EQ17(YKHO):
return YKHO._get_variable('lrun')[1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _iYW(YKHO):\n return pmON.join(YKHO.root, qpQv)",
"def hRSi(YPqY):\n if YPqY in zMHY():\n return AHEI(zMHY()[YPqY])\n return None",
"def YPqY(YKHO):\n return YKHO._getProgramInfo()[0]",
"def Ec6T(YKHO):\n return YKHO._get_variable('lrun')[0]",
"def zO73():\n return bSZ0.run(['l... | [
"0.7156038",
"0.70792663",
"0.707009",
"0.6995566",
"0.6828596",
"0.682691",
"0.6781139",
"0.6748249",
"0.6653869",
"0.66398585",
"0.661422",
"0.65894306",
"0.6575192",
"0.65449584",
"0.65205103",
"0.6425796",
"0.6375171",
"0.63442117",
"0.6329623",
"0.6320346",
"0.62947357",... | 0.8827334 | 0 |
Retrieve last run end time | def H5mu(YKHO):
return YKHO._timestamp_to_utc(YKHO._get_variable('lrun')[3]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wirM(YKHO):\n return YKHO.global_end_time",
"def BeO2(YKHO):\n return YKHO._get_variable('lrun')[2]",
"def wirM(YKHO):\n return YKHO.end_time",
"def wirM(YKHO):\n raise NotImplementedError",
"def C7pn(YKHO):\n return YKHO.end().time",
"def C7pn(YKHO):\n return YKHO.end().time",
"d... | [
"0.7874188",
"0.7855358",
"0.77538055",
"0.7705893",
"0.76729673",
"0.76729673",
"0.76729673",
"0.76662797",
"0.7661129",
"0.7625571",
"0.76222444",
"0.7599056",
"0.7597546",
"0.7597546",
"0.7594424",
"0.7576963",
"0.75374943",
"0.7516063",
"0.7512857",
"0.749681",
"0.7491765... | 0.8616742 | 0 |
Retrieve last device reboot time | def z08B(YKHO):
return YKHO._timestamp_to_utc(YKHO._get_variable('lupt')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Go04():\n TOQY = UyIK('kern.boottime')\n TOQY = TOQY.split(' } ')[1]\n return TOQY",
"def cikU(YKHO):\n hlel = YKHO.shell_cmd('last reboot')\n kjNI = []\n if hlel:\n for YRbF in hlel:\n kjNI.append(YRbF)\n return kjNI",
"def YCHw():\n U5bT = {'value': None}\n Yl... | [
"0.71749187",
"0.7021764",
"0.69099015",
"0.6848867",
"0.6843883",
"0.6843883",
"0.6807634",
"0.67321396",
"0.656394",
"0.65559304",
"0.653967",
"0.6528677",
"0.6497718",
"0.6497718",
"0.648783",
"0.648661",
"0.6469109",
"0.6460701",
"0.6457858",
"0.6414052",
"0.6414052",
"... | 0.82518655 | 0 |
Retrieve last device reboot cause | def APmI(YKHO):
return YKHO._get_variable('lrbtc') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cikU(YKHO):\n hlel = YKHO.shell_cmd('last reboot')\n kjNI = []\n if hlel:\n for YRbF in hlel:\n kjNI.append(YRbF)\n return kjNI",
"def z08B(YKHO):\n return YKHO._timestamp_to_utc(YKHO._get_variable('lupt'))",
"def Go04():\n TOQY = UyIK('kern.boottime')\n TOQY = TOQY.s... | [
"0.7393629",
"0.72268957",
"0.688622",
"0.6616781",
"0.6541716",
"0.6485012",
"0.6451019",
"0.6445592",
"0.64088225",
"0.6399932",
"0.6254254",
"0.6232007",
"0.6207612",
"0.61991847",
"0.61744344",
"0.6108692",
"0.61061186",
"0.608332",
"0.60661393",
"0.60588336",
"0.60588336... | 0.7965017 | 0 |
Serialize all attributes of a player instance in order to save them in a document oriented database (TinyDB). In the case of the Player class, this method is the same of get_attributes method because the attributes are not build from other class instances. | def A9YS(YKHO):
return YKHO.get_attributes() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Napc(YKHO):\n return {'firstName': YKHO.firstName, 'lastName': YKHO.lastName, 'playerNum': YKHO.playerNum, 'position': YKHO.position, 'height': YKHO.height, 'weight': YKHO.weight, 'age': YKHO.age, 'college': YKHO.college, 'birthplace': YKHO.birthplace, 'role': YKHO.role, 'id': YKHO.id}",
"def Napc(YKHO):\... | [
"0.66679996",
"0.6297543",
"0.61980414",
"0.61783653",
"0.61121035",
"0.6066593",
"0.60625166",
"0.60315955",
"0.6003422",
"0.5998546",
"0.5932628",
"0.5926269",
"0.59119165",
"0.59118515",
"0.5906978",
"0.5890653",
"0.5888847",
"0.58756053",
"0.58733165",
"0.58602947",
"0.58... | 0.6357286 | 1 |
test, a function that takes an int parameter and returns a Boolean Assumes there exists an int, x, such that test(x) is True Returns an int, x, with the smallest absolute value such that test(x) is True In case of ties, return any one of them. | def XyOp(QOe9):
fjjX = None
for WKvO in range(-1000, 1000):
try:
if QOe9(WKvO):
if not fjjX or abs(WKvO) <= abs(fjjX):
fjjX = WKvO
except IndexError:
continue
return fjjX | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XyOp(QOe9):\n WKvO = 0\n while True:\n if QOe9(WKvO):\n return WKvO\n if QOe9(-WKvO):\n return -WKvO\n WKvO += 1",
"def XyOp(QOe9):\n exwG = 0\n while True:\n if QOe9(exwG) == True:\n return exwG\n elif QOe9(-exwG) == True:\n ... | [
"0.7290515",
"0.6737169",
"0.6697249",
"0.6685703",
"0.6563574",
"0.6224623",
"0.60883933",
"0.60607797",
"0.59610474",
"0.59449774",
"0.58945876",
"0.58721507",
"0.58077204",
"0.5777789",
"0.5768802",
"0.57536817",
"0.571693",
"0.5710006",
"0.56916994",
"0.5680659",
"0.56662... | 0.72475225 | 1 |
Function responsible for the main view of the application, displays all items in the database grouped by category | def nDBw():
CS5l = ZYXf.find()
l1QI = Xy8V(CS5l)
return TvZl('items.html', grouped_items=l1QI) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZsT6():\n LeZt = cuiw.query(qZuN).all()\n eCvx = cuiw.query(kLxY).order_by(QoB4(kLxY.id)).limit(10)\n if 'username' not in sGQh:\n return TvZl('index_public.html', categories=LeZt, latestitems=eCvx)\n else:\n return TvZl('index.html', categories=LeZt, latestitems=eCvx)",
"def d6pt()... | [
"0.73703367",
"0.7337353",
"0.7329489",
"0.73115975",
"0.7262427",
"0.7225368",
"0.71558696",
"0.71501803",
"0.7105445",
"0.7100888",
"0.7082979",
"0.7055583",
"0.7022102",
"0.7004758",
"0.699039",
"0.6954462",
"0.69483286",
"0.693646",
"0.6906784",
"0.68996596",
"0.6837233",... | 0.7005774 | 13 |
Return `string` with double quotes escaped for use in a Windows shell command. | def O4Mr(vIwR):
return vIwR.replace('"', '\\"') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _sjO(vIwR):\n return vIwR.replace('\"', '\\\\\"')",
"def L9lW(KCHu):\n if KCHu is None:\n return None\n if Hy7s.name == 'nt':\n KCHu = '{}'.format(KCHu.replace('\\\\', '\\\\\\\\'))\n return '\"' + KCHu.replace(\"'\", \"'\\\\''\") + '\"'",
"def o8HB(str):\n if '\"' in str:\n ... | [
"0.8212617",
"0.79911643",
"0.79546046",
"0.7698901",
"0.7668377",
"0.75557876",
"0.75196683",
"0.7469172",
"0.73814017",
"0.7349401",
"0.7331867",
"0.7331474",
"0.7302672",
"0.7270155",
"0.71934104",
"0.71685225",
"0.71520615",
"0.69798404",
"0.69672096",
"0.69204456",
"0.69... | 0.75770557 | 5 |
Test CP Choi to Other evolution. | def Imkn(YKHO, sWfS, v1jE, ISIR):
for pjBH in v1jE:
tpio = 2 ** pjBH
for bGrB in range(ISIR):
oZuG = YKHO.rand_rho(tpio)
vb7U = tpio * YKHO.rand_rho(tpio ** 2)
iPoY = qLxe(vb7U)
fy7g = iPoY._evolve(oZuG)
KmZT = sWfS(iPoY)
IMyn =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tHgo(YKHO):\n YKHO._choi_to_other_cp(JmbU, YKHO.qubits_test_cases, YKHO.repetitions)",
"def EM2p(YKHO):\n YKHO._chi_to_other(qLxe, YKHO.qubits_test_cases, YKHO.repetitions)",
"def JUYu(YKHO):\n YKHO._other_to_operator(qLxe, YKHO.qubits_test_cases, YKHO.repetitions)",
"def j68s(YKHO):\n YKHO._... | [
"0.7357925",
"0.7187966",
"0.7138647",
"0.69292927",
"0.69203705",
"0.6862087",
"0.67841226",
"0.6600942",
"0.65351605",
"0.64901763",
"0.64408576",
"0.64112777",
"0.6400439",
"0.6384101",
"0.63280034",
"0.63256884",
"0.63221705",
"0.62584573",
"0.62411386",
"0.619309",
"0.61... | 0.6148541 | 22 |
Test CP Choi to Other evolution. | def XSeE(YKHO, sWfS, v1jE, ISIR):
for pjBH in v1jE:
tpio = 2 ** pjBH
for bGrB in range(ISIR):
oZuG = YKHO.rand_rho(tpio)
vb7U = YKHO.rand_matrix(tpio ** 2, tpio ** 2)
iPoY = qLxe(vb7U)
fy7g = iPoY._evolve(oZuG)
KmZT = sWfS(iPoY)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tHgo(YKHO):\n YKHO._choi_to_other_cp(JmbU, YKHO.qubits_test_cases, YKHO.repetitions)",
"def EM2p(YKHO):\n YKHO._chi_to_other(qLxe, YKHO.qubits_test_cases, YKHO.repetitions)",
"def JUYu(YKHO):\n YKHO._other_to_operator(qLxe, YKHO.qubits_test_cases, YKHO.repetitions)",
"def j68s(YKHO):\n YKHO._... | [
"0.7359501",
"0.7189421",
"0.71396893",
"0.6929697",
"0.6920904",
"0.68623435",
"0.67838496",
"0.66008013",
"0.6533831",
"0.6490534",
"0.6441828",
"0.641111",
"0.64007133",
"0.63836956",
"0.6327637",
"0.63263214",
"0.63197786",
"0.62579185",
"0.62403196",
"0.61931086",
"0.618... | 0.60549074 | 25 |
Test Choi to Operator evolution. | def JUYu(YKHO):
YKHO._other_to_operator(qLxe, YKHO.qubits_test_cases, YKHO.repetitions) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LXWQ(YKHO):\n YKHO._other_to_operator(JmbU, YKHO.qubits_test_cases, YKHO.repetitions)",
"def EM2p(YKHO):\n YKHO._chi_to_other(qLxe, YKHO.qubits_test_cases, YKHO.repetitions)",
"def GZ4H(YwkQ):\n Tr6b = TSLW.num_qubits(YwkQ)\n n5sN = TSLW.operation_to_choi(YwkQ)\n aEqx = Q5tL(YwkQ)\n asser... | [
"0.71307856",
"0.66999763",
"0.66004777",
"0.6422623",
"0.6309812",
"0.6287378",
"0.61937344",
"0.6190934",
"0.6039754",
"0.60082126",
"0.59249425",
"0.59210205",
"0.59102595",
"0.58575004",
"0.5853153",
"0.5803165",
"0.5788389",
"0.5779144",
"0.5774762",
"0.5765723",
"0.5751... | 0.7745081 | 0 |
Test CP Choi to Chi evolution. | def tHgo(YKHO):
YKHO._choi_to_other_cp(JmbU, YKHO.qubits_test_cases, YKHO.repetitions) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EM2p(YKHO):\n YKHO._chi_to_other(qLxe, YKHO.qubits_test_cases, YKHO.repetitions)",
"def JUYu(YKHO):\n YKHO._other_to_operator(qLxe, YKHO.qubits_test_cases, YKHO.repetitions)",
"def LXWQ(YKHO):\n YKHO._other_to_operator(JmbU, YKHO.qubits_test_cases, YKHO.repetitions)",
"def j68s(YKHO):\n YKHO.... | [
"0.7749891",
"0.7373739",
"0.71453077",
"0.69769365",
"0.69672906",
"0.6836053",
"0.67736655",
"0.67424744",
"0.67203665",
"0.66052794",
"0.6518416",
"0.6361037",
"0.63494855",
"0.62519366",
"0.6231713",
"0.6221121",
"0.6190502",
"0.6188562",
"0.61876565",
"0.61738855",
"0.61... | 0.789146 | 0 |
Test single Kraus to Choi evolution. | def bhEJ(YKHO):
YKHO._kraus_to_other_single(qLxe, YKHO.qubits_test_cases, YKHO.repetitions) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GESz(YKHO):\n YKHO._chi_to_other(AMrI, YKHO.qubits_test_cases, YKHO.repetitions)",
"def cUDY(YKHO):\n YKHO._kraus_to_other_single(JmbU, YKHO.qubits_test_cases, YKHO.repetitions)",
"def yU08(YKHO):\n YKHO._choi_to_other_cp(AMrI, YKHO.qubits_test_cases, YKHO.repetitions)",
"def fTqS():\n nPrm.c... | [
"0.7251084",
"0.6973416",
"0.69501835",
"0.6737885",
"0.67262286",
"0.6666565",
"0.66521585",
"0.6432836",
"0.62639326",
"0.619657",
"0.6044554",
"0.6035124",
"0.59958446",
"0.59874266",
"0.5976062",
"0.59721524",
"0.59685254",
"0.59570867",
"0.59440583",
"0.59349424",
"0.592... | 0.73820066 | 0 |
Test single Kraus to Choi evolution. | def w2Zb(YKHO):
YKHO._kraus_to_other_double(qLxe, YKHO.qubits_test_cases, YKHO.repetitions) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bhEJ(YKHO):\n YKHO._kraus_to_other_single(qLxe, YKHO.qubits_test_cases, YKHO.repetitions)",
"def GESz(YKHO):\n YKHO._chi_to_other(AMrI, YKHO.qubits_test_cases, YKHO.repetitions)",
"def cUDY(YKHO):\n YKHO._kraus_to_other_single(JmbU, YKHO.qubits_test_cases, YKHO.repetitions)",
"def yU08(YKHO):\n ... | [
"0.73807126",
"0.72500277",
"0.69723713",
"0.6948551",
"0.67370504",
"0.66652066",
"0.6652754",
"0.64337254",
"0.6263647",
"0.6198079",
"0.60446995",
"0.6034581",
"0.5995238",
"0.5986302",
"0.5976577",
"0.59710085",
"0.5968634",
"0.595824",
"0.5944245",
"0.5936499",
"0.592796... | 0.67253274 | 5 |
The `__init__` method of any subclass should also contain these arguments. ResStage builds p streams, where p can be greater or equal to one. | def FIMM(YKHO, yXjA, uwTF, _0fC, cgMp, YIPF, mzLR, FmZA, ncT8, ivFb, j0pM=False, Yf0b=True, Gjct=CbyH.nn.BatchNorm3D):
super(Y0x5, YKHO).__init__()
assert all((ncT8[YRbF] <= YIPF[YRbF] for YRbF in range(len(cgMp))))
YKHO.num_blocks = YIPF
YKHO.temp_kernel_sizes = [(cgMp[YRbF] * YIPF[YRbF])[:ncT8[YRbF]] ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, *JJXN):\n pass",
"def FIMM(YKHO, u9PO, **B2fa):\n super(fRx7, YKHO).__init__(**B2fa)\n YKHO.default['width'] = 400.0\n YKHO.default['height'] = 200.0\n YKHO.set_default_attrs(YKHO.default)\n YKHO._set_stage_default_proprieties()\n YKHO.content = []\n YKHO.name = u9PO\n Y... | [
"0.64473414",
"0.59977096",
"0.59531945",
"0.5905686",
"0.5905686",
"0.5901273",
"0.5880146",
"0.5872843",
"0.5865243",
"0.5823659",
"0.58182645",
"0.58164966",
"0.58132076",
"0.58105993",
"0.58105993",
"0.57931",
"0.57904035",
"0.57667756",
"0.57601804",
"0.57363784",
"0.570... | 0.5744941 | 19 |
Returns the path where this SimpleDocument is saved/loaded. | def E0XI(YKHO):
return YKHO.path | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gXgy(YKHO):\n return YKHO._save_path",
"def gXgy(YKHO):\n raise NotImplementedError",
"def TCuf(YKHO, TCuf=None):\n if TCuf is None:\n return YKHO.savePath\n else:\n YKHO.savePath = TCuf",
"def OyQC(YKHO):\n return YKHO.__path",
"def pmON(YKHO):\n return YKHO.__path",
... | [
"0.8612076",
"0.81055963",
"0.76834035",
"0.7501509",
"0.74844795",
"0.7464267",
"0.74513876",
"0.74513876",
"0.74467427",
"0.74467427",
"0.74467427",
"0.7443078",
"0.7443078",
"0.74406695",
"0.74373895",
"0.74318033",
"0.7422264",
"0.73998815",
"0.7384846",
"0.738362",
"0.73... | 0.7063214 | 99 |
create an Nth order highpass Butterworth filter with cutoff frequency w0 sampling_rate/2 | def ZBpR(WKvO, PKKQ, ywwl=4):
from scipy import signal
Fg_i, jzdc = signal.butter(ywwl, PKKQ, 'high')
LVAh = signal.filtfilt(Fg_i, jzdc, WKvO, padlen=WKvO.shape[0] - 1)
return LVAh | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QG6q(nPrm, tAX0, Vb5F, T4Wy=5):\n bq_o = 0.5 * Vb5F\n ODP9 = tAX0 / bq_o\n Fg_i, jzdc = fJsr(T4Wy, ODP9, btype='high', analog=False)\n LVAh = bfm2(Fg_i, jzdc, nPrm)\n return LVAh",
"def PID3(dgV7, uCif, V2zj):\n cVlt = dgV7 / 44100.0\n ifXm = uCif / 44100.0\n Fg_i = V2zj / 44100.0\n ... | [
"0.7440532",
"0.74027324",
"0.73972154",
"0.7366959",
"0.7166798",
"0.6923551",
"0.69016963",
"0.6879184",
"0.678813",
"0.6783023",
"0.67378706",
"0.673496",
"0.673239",
"0.6686058",
"0.66716033",
"0.6647867",
"0.6644379",
"0.6632053",
"0.6617446",
"0.6614277",
"0.66093343",
... | 0.7068196 | 5 |
Normalize EEG spectrogram by deviding each frequency band by its average value. | def W8tr(cyvo, mWFP, PyDY=0, Ebru=[], z3rX=5, SExX=True, zkLu='', rN2Z=[]):
if len(zkLu) == 0 or zkLu == 'std':
V6IE = cbZA.loadmat(Hy7s.path.join(cyvo, mWFP, 'sp_' + mWFP + '.mat'), squeeze_me=True)
elif zkLu == 'fine':
V6IE = cbZA.loadmat(Hy7s.path.join(cyvo, mWFP, 'sp_fine_' + mWFP + '.mat'),... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jnV4(YKHO):\n NUHp = oyIN.max(oyIN.median(YKHO.templates, axis=1))\n YKHO.waveform /= NUHp\n YKHO.filtered /= NUHp\n YKHO.templates /= NUHp",
"def OEry(YKHO, Sxzb):\n DKP6 = oyIN.array(Sxzb, dtype=oyIN.float32)\n S8vG = oyIN.sum(DKP6, axis=1) / DKP6.shape[1]\n m79M = oyIN.array([Csk6 - j... | [
"0.68266004",
"0.6685582",
"0.636132",
"0.6356986",
"0.63280606",
"0.6304357",
"0.6283915",
"0.62470514",
"0.6223475",
"0.61597806",
"0.6137721",
"0.61114645",
"0.6096883",
"0.60963845",
"0.6033508",
"0.60215306",
"0.602104",
"0.60098445",
"0.60063624",
"0.59705186",
"0.59522... | 0.6950698 | 0 |
get_sequences(idx, ibreak=1) idx np.vector of indices | def jOws(or8S, Jn3P=1, jPNK=False):
yk4i = or8S[1:] - or8S[0:-1]
RIgD = oyIN.nonzero(yk4i > Jn3P)[0]
RIgD = oyIN.append(RIgD, len(or8S) - 1)
Q6uT = []
GYFY = 0
for YRbF in RIgD:
Mkmy = list(range(GYFY, YRbF + 1))
Q6uT.append(or8S[Mkmy])
GYFY = YRbF + 1
if jPNK:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WoaC(YKHO):\n EQjW = oyIN.arange(len(YKHO.height))\n if not BfDw.isscalar(YKHO.folding_velocity):\n T5C3 = YKHO.getvar('chirp_start_indices')\n return oyIN.split(EQjW, T5C3[1:])\n return [EQjW]",
"def Rkvh(Q6uT, d6pt):\n return [Q6uT[YRbF] for YRbF in d6pt]",
"def Rkvh(Q6uT, d6pt)... | [
"0.6635273",
"0.61322707",
"0.61322707",
"0.6016815",
"0.5982795",
"0.5888887",
"0.5838115",
"0.5837103",
"0.5794803",
"0.57876784",
"0.5749482",
"0.57355607",
"0.57290965",
"0.57042164",
"0.5694318",
"0.5679245",
"0.5679245",
"0.56773114",
"0.56736314",
"0.5656317",
"0.56416... | 0.79194653 | 0 |
Initialized the DistMult embeddings. | def DZXV(YKHO, yokr):
if YKHO._model_weights_initial is None:
assert YKHO.embedding_params.get('embedding_size') is not None, "'embedding_size' should be given in embedding_params when using RESCAL"
qoqK = oyIN.sqrt(6.0 / YKHO.embedding_params['embedding_size'])
sfhQ = ZylS.initializers.Rand... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RqWc(YKHO):\n M8HU = DTX1(YKHO.initialiser, YKHO.seed)\n j1LK = ZylS.get_variable('em_ents', shape=[YKHO.nb_ents + 1, YKHO.em_size], initializer=M8HU)\n t33B = ZylS.get_variable('em_rels', shape=[YKHO.nb_rels + 1, YKHO.em_size], initializer=M8HU)\n YKHO._embeddings['ents'] = j1LK\n YKHO._embeddi... | [
"0.6617351",
"0.6511166",
"0.65085495",
"0.6317758",
"0.6277298",
"0.6277298",
"0.6241129",
"0.6212584",
"0.61993444",
"0.61496437",
"0.6147348",
"0.6144653",
"0.613594",
"0.613203",
"0.60822403",
"0.607705",
"0.60628796",
"0.60506505",
"0.6047798",
"0.6021099",
"0.6017147",
... | 0.61574274 | 9 |
Update the parameter values. Using the given parameter values, the default configuration will be overrided and the corresponding tunable parameters will be removed from the alreadycollected tunableparameter list. This method is usually used for updating to the optimized parameter values. Note that the internal implemen... | def pu93(YKHO, rosz: Mapping[str, Any]):
MEc9(YKHO.config, rosz)
for H5ew in rosz:
YKHO.parameters.pop(H5ew) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eZJ6(YKHO):\n YKHO.printv('Overwriting default parameters with config')\n for xqoZ, wEf2 in YKHO.config['parameters'].items():\n YKHO.parameters[xqoZ] = wEf2",
"def JM9S(YKHO, SGPK):\n if len(SGPK) != len(YKHO._optimization_parameters):\n raise ValueError('updating parameters does not ... | [
"0.7364874",
"0.6923631",
"0.66865027",
"0.66788673",
"0.66512483",
"0.6649341",
"0.6617161",
"0.6617063",
"0.6617063",
"0.6617063",
"0.6617063",
"0.6617063",
"0.6617063",
"0.6617063",
"0.6617063",
"0.6617063",
"0.6617063",
"0.6617063",
"0.6617063",
"0.6617063",
"0.6617063",
... | 0.75964373 | 0 |
Returns the arc length of the light curve. Sensitive to the magnitude of flux. | def HVoU(YKHO) -> float:
e2wI = YKHO.time[YKHO.detected == 1]
LXFO = YKHO.flux[YKHO.detected == 1]
FZyQ = e2wI[1:] - e2wI[:-1]
KSQ0 = LXFO[1:] - LXFO[:-1]
return float(oyIN.sum(oyIN.sqrt(FZyQ ** 2 + KSQ0 ** 2))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FGHU(YKHO):\n return xu3j(YKHO.config_points)",
"def FGHU(YKHO):\n return FGHU(YKHO.config_points)",
"def J5ks(YKHO):\n return YKHO._arcLength",
"def FGHU(r1VO, Q6i8):\n return 2 * epAf.pi * r1VO * (Q6i8 / 360)",
"def kClY(YKHO):\n u54L = 2 * YKHO.get_radius()\n u54L = u54L * (1 - gf5... | [
"0.828612",
"0.81496114",
"0.78124505",
"0.7458588",
"0.7457727",
"0.74486953",
"0.7316773",
"0.6868061",
"0.66169894",
"0.6614845",
"0.6607795",
"0.6568804",
"0.65124",
"0.651151",
"0.65076566",
"0.64546925",
"0.64135665",
"0.6405109",
"0.6378601",
"0.6377665",
"0.6370154",
... | 0.0 | -1 |
If destination is entered without a trailing slash, append a trailing slash. | def zpZB(YKHO, yFgu):
if yFgu[-1] != '/':
yFgu = '{}/'.format(yFgu)
return yFgu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TXkm(pmON):\n return pmON if pmON.endswith('/') else pmON + '/'",
"def TJGw(YKHO, PsRC):\n return PsRC if PsRC.endswith(b'/') or len(PsRC) == 0 else PsRC + b'/'",
"def TXkm(pmON):\n if not pmON.endswith('/'):\n pmON += '/'\n return pmON",
"def E0F2(P8oC):\n if not P8oC.endswith('/')... | [
"0.69450885",
"0.6902843",
"0.6878302",
"0.66224897",
"0.65717334",
"0.6543551",
"0.6524365",
"0.63761556",
"0.6376121",
"0.6288486",
"0.6237704",
"0.622349",
"0.6190038",
"0.61287445",
"0.6103623",
"0.60820854",
"0.6081769",
"0.6077439",
"0.60493815",
"0.6021252",
"0.6021204... | 0.73070914 | 0 |
Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix inorder arguments and keyword arguments. | def FIMM(YKHO, *qIxc, **c_sp):
if qIxc or c_sp:
super(YuIW, YKHO).__init__(*qIxc, **c_sp)
if YKHO.header is None:
YKHO.header = kKAJ.msg.Header()
if YKHO.between_gears is None:
YKHO.between_gears = False
if YKHO.between_gears_is_valid is None:
YKHO... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, Ol8d=None):\n if Ol8d is not None:\n YKHO.message = Ol8d",
"def FIMM(YKHO, Ol8d=None):\n YKHO.message = Ol8d",
"def FIMM(YKHO, Ol8d=None):\n YKHO.message = Ol8d",
"def FIMM(YKHO, Ol8d=None):\n super().__init__()\n YKHO.message = Ol8d",
"def FIMM(YKHO, *qIxc, **c_sp):\n ... | [
"0.81645745",
"0.7718656",
"0.7718656",
"0.76512235",
"0.75726247",
"0.7542752",
"0.7484152",
"0.74688715",
"0.74572617",
"0.7444701",
"0.74434286",
"0.7432273",
"0.741445",
"0.740745",
"0.73911446",
"0.7374251",
"0.7361524",
"0.7323566",
"0.73224604",
"0.73224604",
"0.732246... | 0.0 | -1 |
Return full path to the dependency directory. | def WUHX(F3jJ, zJAO):
Q3Qv = F3jJ
UHFx = 0
for eOtH in zJAO.split(':'):
if UHFx < 2:
Q3Qv = Hy7s.path.join(Q3Qv, *eOtH.split('.'))
else:
Q3Qv = Hy7s.path.join(Q3Qv, eOtH)
UHFx += 1
return Q3Qv | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def S_Ps(YKHO) -> GkAb:\n Aofo = YKHO.build_directory / 'dependencies'\n Aofo.mkdir(exist_ok=True, parents=True)\n return Aofo",
"def Cui_():\n Ux0P = SC2F(gzes(mkE9(), '*', aPr_(xAKo)))[0]\n return TLI7(Ux0P)",
"def ty94():\n if 'DEPOT_PATH' not in Hy7s.environ:\n Hy7s.environ['DEPOT_... | [
"0.75469136",
"0.754495",
"0.74058056",
"0.7365685",
"0.7356041",
"0.7178663",
"0.70042366",
"0.69550884",
"0.69500303",
"0.6934847",
"0.6861164",
"0.68602824",
"0.6845293",
"0.68091065",
"0.67973256",
"0.67221546",
"0.6712339",
"0.6707837",
"0.6704481",
"0.67021024",
"0.6701... | 0.65006584 | 43 |
Returns temperature corresponding to JSON string, date shift and time shift passed. | def rcrL(qQXR, exwG=1, a1PO='03:00:00'):
exwG, a1PO = k6gk(exwG, a1PO)
vOgr(a1PO)
tNWS(qQXR, exwG, a1PO)
ppPa = _Jn1(exwG, a1PO)
BkS9 = str(ppPa)
I1mm = qQXR.find(BkS9)
p87d = qQXR.rfind('temp":', 0, I1mm)
HjeV = qQXR.find('main', I1mm)
Idqm = qQXR[p87d:HjeV]
wQzQ = Idqm.find('te... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AC3t():\n IGom = zgjV['main']['temp']\n M03n = epAf.floor(IGom * 1.8 - 459.67)\n UEcI = zgjV['main']['temp_min']\n vrZn = epAf.floor(UEcI * 1.8 - 459.67)\n awlj = zgjV['main']['temp_max']\n gZCh = epAf.floor(awlj * 1.8 - 459.67)\n print(f'\\tTEMPERATURE will be {M03n}F.')\n print(f'\\tH... | [
"0.6850426",
"0.65169746",
"0.63741773",
"0.6360296",
"0.6242071",
"0.6227547",
"0.6225952",
"0.61341876",
"0.61315614",
"0.6094364",
"0.6090625",
"0.608328",
"0.6056396",
"0.60489786",
"0.6040621",
"0.5994639",
"0.5971589",
"0.5965834",
"0.59458786",
"0.5943614",
"0.5938346"... | 0.76341 | 0 |
Returns pressure corresponding to JSON string, date shift and time shift passed. | def MLFu(qQXR, exwG=1, a1PO='03:00:00'):
exwG, a1PO = k6gk(exwG, a1PO)
vOgr(a1PO)
tNWS(qQXR, exwG, a1PO)
ppPa = _Jn1(exwG, a1PO)
BkS9 = str(ppPa)
I1mm = qQXR.find(BkS9)
p87d = qQXR.rfind('temp":', 0, I1mm)
HjeV = qQXR.find('main', I1mm)
Idqm = qQXR[p87d:HjeV]
CILf = Idqm.find('pr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pSLj(YKHO):\n huOu = a7R7.kpaCmdsFromJSON([{'type': 'pressure', 'port': 1, 'sensor_id': 100, 'addy': 100, 'convert': 'x', 'bias': 0}, {'type': 'pressure', 'port': 1, 'sensor_id': 101, 'addy': 102, 'convert': 'x', 'bias': 0}, {'type': 'pressure', 'port': 2, 'sensor_id': 102, 'addy': 103, 'convert': 'x', 'bia... | [
"0.5931003",
"0.5813428",
"0.56958336",
"0.56924444",
"0.56079984",
"0.55659485",
"0.55428594",
"0.54966944",
"0.54054064",
"0.5396694",
"0.5376805",
"0.53691316",
"0.53453696",
"0.53392035",
"0.53392035",
"0.53392035",
"0.53392035",
"0.53181386",
"0.531498",
"0.52904695",
"0... | 0.7241317 | 0 |
Return the name of the thermostat. | def mWFP(YKHO):
return YKHO._device_info.name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W0tD(YKHO):\n return YKHO.THERMAL_NAME_LIST[YKHO.index]",
"def mWFP(YKHO):\n return '{} {}'.format(Kb4M.climate_status[YKHO._id].location, 'Temperature')",
"def mWFP(YKHO):\n return '{} {}'.format(Kb4M.temperature_status[YKHO._id]['label'], 'Temperature')",
"def mWFP(YKHO):\n return YKHO._nuk... | [
"0.7091191",
"0.7017284",
"0.67591774",
"0.67568326",
"0.6749188",
"0.6691631",
"0.66861343",
"0.66211253",
"0.6573108",
"0.6514048",
"0.6509548",
"0.64923733",
"0.64923733",
"0.64923733",
"0.6477543",
"0.6464854",
"0.6452647",
"0.6444914",
"0.6443195",
"0.6427146",
"0.642714... | 0.6420209 | 26 |
Return the unit of measurement. | def xklW(YKHO):
return hMVl | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b82i(YKHO):\n return YKHO._unit",
"def b82i(YKHO):\n return YKHO._unit",
"def b82i(YKHO):\n return YKHO._unit",
"def b82i(YKHO):\n return YKHO._unit",
"def b82i(YKHO):\n return YKHO._unit",
"def b82i(YKHO):\n return YKHO._unit",
"def b82i(YKHO):\n return YKHO._unit",
"def b82... | [
"0.90788347",
"0.9042988",
"0.9042988",
"0.9042988",
"0.9042988",
"0.9042988",
"0.9042988",
"0.9042988",
"0.9042988",
"0.9042988",
"0.9042988",
"0.9013875",
"0.90051067",
"0.89462197",
"0.89462197",
"0.89366317",
"0.89184356",
"0.89184356",
"0.89184356",
"0.89184356",
"0.8918... | 0.0 | -1 |
Return the current temperature. | def CMHP(YKHO) -> float:
return YKHO.coordinator.innova.ambient_temp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CMHP(YKHO):\n return YKHO._current_temp",
"def CMHP(YKHO):\n return YKHO._cur_temp",
"def CMHP(YKHO):\n return YKHO._cur_temp",
"def CMHP(YKHO):\n return YKHO._temperature",
"def CMHP(YKHO) -> float:\n return YKHO.device['sensors']['temperature']",
"def CMHP(YKHO):\n return YKHO._cu... | [
"0.88468945",
"0.8834989",
"0.8834989",
"0.88280296",
"0.880198",
"0.87888485",
"0.87888485",
"0.87888485",
"0.87888485",
"0.87888485",
"0.87888485",
"0.87888485",
"0.87888485",
"0.87888485",
"0.87823194",
"0.877892",
"0.87785536",
"0.8762494",
"0.87570673",
"0.8735515",
"0.8... | 0.84479064 | 54 |
Return the current state of the thermostat. | def Wc11(YKHO):
if not YKHO.coordinator.innova.power:
return YDvD.OFF
Tuqy = YKHO.coordinator.innova.mode
if Tuqy.is_heating:
if YKHO.current_temperature < YKHO.target_temperature:
return YDvD.HEATING
else:
return YDvD.IDLE
if Tuqy.is_cooling:
if Y... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c0mt(YKHO):\n return YKHO.agent.get_state()",
"def QTBn(YKHO):\n return YKHO.temperature",
"def jGRS(YKHO):\n Mkmy = YKHO.get('control/thermostat', params={'param': 'state'})\n return Mkmy.json()",
"def elVU(YKHO):\n return YKHO.status",
"def QTBn(YKHO):\n return Kb4M.temperature_stat... | [
"0.7560818",
"0.75139",
"0.7376979",
"0.7361691",
"0.7358775",
"0.7249434",
"0.7244018",
"0.7244018",
"0.719834",
"0.719152",
"0.71612865",
"0.715872",
"0.71456784",
"0.71452135",
"0.71380097",
"0.7137419",
"0.7137419",
"0.7137419",
"0.7137419",
"0.7137419",
"0.7137419",
"0... | 0.0 | -1 |
Return the current state of the thermostat. | def IT4j(YKHO):
if not YKHO.coordinator.innova.power:
return HEOQ.OFF
if YKHO.coordinator.innova.mode.is_cooling:
return HEOQ.COOL
if YKHO.coordinator.innova.mode.is_heating:
return HEOQ.HEAT
if YKHO.coordinator.innova.mode.is_dehumidifying:
return HEOQ.DRY
if YKHO.co... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c0mt(YKHO):\n return YKHO.agent.get_state()",
"def QTBn(YKHO):\n return YKHO.temperature",
"def jGRS(YKHO):\n Mkmy = YKHO.get('control/thermostat', params={'param': 'state'})\n return Mkmy.json()",
"def elVU(YKHO):\n return YKHO.status",
"def QTBn(YKHO):\n return Kb4M.temperature_stat... | [
"0.7558956",
"0.75129336",
"0.737577",
"0.73600507",
"0.73584354",
"0.7248264",
"0.7242446",
"0.7242446",
"0.7197272",
"0.71902466",
"0.7159322",
"0.7157631",
"0.7145274",
"0.7143527",
"0.71364707",
"0.71364707",
"0.71364707",
"0.71364707",
"0.71364707",
"0.71364707",
"0.7136... | 0.0 | -1 |
Turns a list of images to a list of flat numpy arrays. | def EC_r(Yw_3):
F_On = []
for VXjJ in Yw_3:
F_On.append(XTiz.asarray(VXjJ.convert('L'), dtype='uint8').flatten() / 255)
return F_On | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GRLl(xkjI):\n Sk_F = oyIN.array(list(map(lambda VXjJ: mCo1(VXjJ, dtype='float16'), xkjI)), dtype='float16') / 255.0\n return Sk_F",
"def HYsh(Sk_F):\n xkjI = list(map(lambda VXjJ: KvTZ(VXjJ, scale=255), Sk_F))\n return xkjI",
"def EQJ6(qZLi):\n Mkmy = mWTC(qZLi[0])\n yzQ0 = LU3Z()\n qw... | [
"0.7458886",
"0.74177355",
"0.7378036",
"0.7249862",
"0.71899945",
"0.71291256",
"0.71262246",
"0.70144147",
"0.69951063",
"0.6968516",
"0.69610775",
"0.6959243",
"0.6953713",
"0.694159",
"0.69337106",
"0.69241494",
"0.6917681",
"0.688662",
"0.68483144",
"0.6845169",
"0.68439... | 0.6360236 | 63 |
Anonymous users should not be able to list courses. | def LLpP(YKHO):
Rqdq.CourseFactory()
geh0 = YKHO.client.get('/api/v1.0/courses/')
YKHO.assertEqual(geh0.status_code, 401)
YKHO.assertEqual(geh0.json(), {'detail': 'Authentication credentials were not provided.'}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hKCc(YKHO):\n GQfX = Rqdq.CourseFactory()\n geh0 = YKHO.client.get(f'/api/v1.0/courses/{GQfX.id}/')\n YKHO.assertEqual(geh0.status_code, 401)\n YKHO.assertEqual(geh0.json(), {'detail': 'Authentication credentials were not provided.'})",
"def Kugn(YKHO):\n geh0 = YKHO.client.get(gxEw('yaksh:cou... | [
"0.76053977",
"0.7253998",
"0.7230366",
"0.70986164",
"0.70642847",
"0.69407094",
"0.66857004",
"0.6683938",
"0.66694045",
"0.6649398",
"0.65837544",
"0.65637386",
"0.651683",
"0.65020335",
"0.6501396",
"0.6486875",
"0.6414602",
"0.6408802",
"0.6380377",
"0.63778657",
"0.6368... | 0.80085033 | 0 |
Authenticated users should only see the courses to which they have access. | def LYdy(YKHO):
CBIr = Rqdq.UserFactory()
eOtH = YKHO.get_user_token(CBIr.username)
Rqdq.CourseFactory()
sDlr = Rqdq.CourseFactory.create_batch(3)
Rqdq.UserCourseAccessFactory(user=CBIr, course=sDlr[0])
Rqdq.UserCourseAccessFactory(user=CBIr, course=sDlr[1])
with YKHO.assertNumQueries(7):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C2Um(YKHO):\n bD7m = gxEw('institute-courses-list', args=['IC'])\n ZsMf.check_user_permissions(YKHO, None, 'get', jGRS.HTTP_200_OK, bD7m)",
"def _9sn(YKHO):\n CBIr = YKHO.make_user()\n W10k()\n with YKHO.login(CBIr):\n YKHO.get_check_200('courses:copy')\n assert YKHO.get_context('sch... | [
"0.7366392",
"0.73580855",
"0.729953",
"0.7074279",
"0.7045324",
"0.7045324",
"0.7045324",
"0.7035573",
"0.7030824",
"0.70246506",
"0.6976971",
"0.6927896",
"0.684453",
"0.684354",
"0.6834744",
"0.6819178",
"0.6819079",
"0.6796584",
"0.67479604",
"0.67346853",
"0.671883",
"... | 0.69429547 | 11 |
Authenticated users should only see the courses to which they have access. | def f2F_(YKHO, bGrB):
CBIr = Rqdq.UserFactory()
eOtH = YKHO.get_user_token(CBIr.username)
Rqdq.CourseFactory()
GQfX = Rqdq.CourseFactory()
Rqdq.UserCourseAccessFactory(user=CBIr, course=GQfX)
with TMAJ.patch.object(FYrf.Course, 'get_abilities', return_value={'foo': 'bar'}) as nc1T:
geh0 ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C2Um(YKHO):\n bD7m = gxEw('institute-courses-list', args=['IC'])\n ZsMf.check_user_permissions(YKHO, None, 'get', jGRS.HTTP_200_OK, bD7m)",
"def _9sn(YKHO):\n CBIr = YKHO.make_user()\n W10k()\n with YKHO.login(CBIr):\n YKHO.get_check_200('courses:copy')\n assert YKHO.get_context('sch... | [
"0.736802",
"0.7359213",
"0.72992545",
"0.7074963",
"0.704527",
"0.704527",
"0.704527",
"0.70363486",
"0.703284",
"0.7024658",
"0.69782996",
"0.69434327",
"0.692862",
"0.68462837",
"0.68444073",
"0.68360734",
"0.68206275",
"0.6820527",
"0.67979306",
"0.6749201",
"0.6736747",
... | 0.0 | -1 |
Authenticated users should not be able to get a course through its id if they have no access to it. | def RkPK(YKHO):
CBIr = Rqdq.UserFactory()
eOtH = YKHO.get_user_token(CBIr.username)
GQfX = Rqdq.CourseFactory()
geh0 = YKHO.client.get(f'/api/v1.0/courses/{GQfX.id}/', HTTP_AUTHORIZATION=f'Bearer {eOtH}')
YKHO.assertEqual(geh0.status_code, 404)
YKHO.assertEqual(geh0.json(), {'detail': 'Not found... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TpfK(Emd4, WBAH, S7Jr):\n YEnM = Iofl(Emd4, pk=WBAH)\n if YEnM.course_id != S7Jr:\n raise Q_33\n return YEnM",
"def hKCc(YKHO):\n GQfX = Rqdq.CourseFactory()\n geh0 = YKHO.client.get(f'/api/v1.0/courses/{GQfX.id}/')\n YKHO.assertEqual(geh0.status_code, 401)\n YKHO.assertEqual(geh0... | [
"0.73394835",
"0.7209084",
"0.7158413",
"0.7102237",
"0.69815886",
"0.6975077",
"0.69670594",
"0.6912174",
"0.6713675",
"0.67044514",
"0.66970074",
"0.66737074",
"0.6664033",
"0.66561145",
"0.6631994",
"0.6600409",
"0.65744716",
"0.6569202",
"0.6569202",
"0.6565347",
"0.65056... | 0.7675871 | 0 |
Authenticated users should be able to get a course through its id if they have access to it. | def tq90(YKHO, bGrB):
CBIr = Rqdq.UserFactory()
eOtH = YKHO.get_user_token(CBIr.username)
GQfX = Rqdq.CourseFactory()
Rqdq.UserCourseAccessFactory(user=CBIr, course=GQfX)
Rqdq.CourseProductRelationFactory(course=GQfX, product=Rqdq.ProductFactory(), organizations=Rqdq.OrganizationFactory.create_batch... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JQEu(YKHO):\n bD7m = gxEw('institute-courses-detail', args=['IC', 42])\n ZsMf.check_user_permissions(YKHO, None, 'get', jGRS.HTTP_200_OK, bD7m)",
"def RkPK(YKHO):\n CBIr = Rqdq.UserFactory()\n eOtH = YKHO.get_user_token(CBIr.username)\n GQfX = Rqdq.CourseFactory()\n geh0 = YKHO.client.get(f... | [
"0.74545157",
"0.74488163",
"0.7361989",
"0.71924174",
"0.7061486",
"0.6993431",
"0.69499224",
"0.68841535",
"0.6854366",
"0.683201",
"0.68263936",
"0.67983735",
"0.6728402",
"0.6711318",
"0.669665",
"0.66185373",
"0.660804",
"0.6598999",
"0.65896016",
"0.65803903",
"0.651653... | 0.7161593 | 4 |
Authenticated users should be able to get a course through its code if they have access to it. | def REWX(YKHO, bGrB):
CBIr = Rqdq.UserFactory()
eOtH = YKHO.get_user_token(CBIr.username)
GQfX = Rqdq.CourseFactory(code='MYCODE-0088')
Rqdq.UserCourseAccessFactory(user=CBIr, course=GQfX)
Rqdq.CourseProductRelationFactory(course=GQfX, product=Rqdq.ProductFactory(), organizations=[Rqdq.OrganizationF... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RkPK(YKHO):\n CBIr = Rqdq.UserFactory()\n eOtH = YKHO.get_user_token(CBIr.username)\n GQfX = Rqdq.CourseFactory()\n geh0 = YKHO.client.get(f'/api/v1.0/courses/{GQfX.id}/', HTTP_AUTHORIZATION=f'Bearer {eOtH}')\n YKHO.assertEqual(geh0.status_code, 404)\n YKHO.assertEqual(geh0.json(), {'detail':... | [
"0.7201383",
"0.7146572",
"0.6935119",
"0.68786275",
"0.6865959",
"0.6784542",
"0.67084426",
"0.6654123",
"0.6614496",
"0.6607541",
"0.65855706",
"0.658027",
"0.65334654",
"0.65307224",
"0.65269965",
"0.6514555",
"0.6511082",
"0.6491984",
"0.64907163",
"0.6439256",
"0.6415080... | 0.7612491 | 0 |
Anonymous users should not be able to create a course. | def I66h(YKHO):
nPrm = {'code': 'ORG-001', 'title': 'Organization 001'}
geh0 = YKHO.client.post('/api/v1.0/courses/', data=nPrm)
YKHO.assertEqual(geh0.status_code, 401)
YKHO.assertFalse(FYrf.Course.objects.exists()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LLpP(YKHO):\n Rqdq.CourseFactory()\n geh0 = YKHO.client.get('/api/v1.0/courses/')\n YKHO.assertEqual(geh0.status_code, 401)\n YKHO.assertEqual(geh0.json(), {'detail': 'Authentication credentials were not provided.'})",
"def Cz0T(YKHO):\n geh0 = YKHO.client.post('/api/v1.0/course-runs/', {'reso... | [
"0.7328638",
"0.72974",
"0.7238281",
"0.7193768",
"0.69357723",
"0.69070286",
"0.68637574",
"0.6743516",
"0.6719728",
"0.6711567",
"0.6708534",
"0.669194",
"0.65882176",
"0.64878535",
"0.6384722",
"0.6378333",
"0.6359822",
"0.6355357",
"0.6332395",
"0.6283946",
"0.6278191",
... | 0.78221506 | 0 |
Authenticated users should not be able to create a course. | def kH7V(YKHO):
CBIr = Rqdq.UserFactory(is_staff=tuKI.choice([True, False]), is_superuser=tuKI.choice([True, False]))
eOtH = YKHO.get_user_token(CBIr.username)
nPrm = {'code': 'ORG-001', 'title': 'Organization 001'}
geh0 = YKHO.client.post('/api/v1.0/courses/', data=nPrm, HTTP_AUTHORIZATION=f'Bearer {eO... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sTbP(YKHO):\n YKHO.client.login(username=YKHO.student.username, password=YKHO.student_plaintext_pass)\n S7Jr = YKHO.course.id\n geh0 = YKHO.client.get(gxEw('yaksh:add_course'), follow=True)\n YKHO.assertEqual(geh0.status_code, 404)",
"def I66h(YKHO):\n nPrm = {'code': 'ORG-001', 'title': 'Orga... | [
"0.7481351",
"0.73188007",
"0.7082232",
"0.70803076",
"0.69513404",
"0.6940876",
"0.6887894",
"0.68734777",
"0.68557966",
"0.68535614",
"0.68228734",
"0.6746335",
"0.6708352",
"0.6708352",
"0.66686326",
"0.66474783",
"0.6646571",
"0.6623196",
"0.6617349",
"0.6603367",
"0.6592... | 0.71216923 | 2 |
Authenticated users with owner role should not be able to update a course. | def HS4y(YKHO):
CBIr = Rqdq.UserFactory(is_staff=tuKI.choice([True, False]), is_superuser=tuKI.choice([True, False]))
eOtH = YKHO.get_user_token(CBIr.username)
GQfX = Rqdq.CourseFactory()
Rqdq.UserCourseAccessFactory(user=CBIr, course=GQfX, role=aVkO.OWNER)
nPrm = {'code': 'ORG-001', 'title': 'Organ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def keJI(YKHO, S7Jr, CBIr):\n try:\n GQfX = CQpO.objects.select_related('owner').get(id=S7Jr)\n except CQpO.DoesNotExist as e:\n bo34.exception(tTpl)\n return oGir(str(tTpl), jGRS.HTTP_404_NOT_FOUND)\n if sXN6.has_valid_subscription(GQfX.owner):\n return True\n P1dF = 'User:... | [
"0.69704044",
"0.68170005",
"0.67008996",
"0.6574422",
"0.6565704",
"0.6530372",
"0.64940536",
"0.6420422",
"0.63690674",
"0.6328923",
"0.63271147",
"0.6304495",
"0.6211459",
"0.62099516",
"0.6199611",
"0.6191366",
"0.618326",
"0.6181721",
"0.6181652",
"0.6168742",
"0.6149001... | 0.64247036 | 7 |
Anonymous users should not be able to delete a course. | def pXlu(YKHO):
GQfX = Rqdq.CourseFactory()
geh0 = YKHO.client.delete(f'/api/v1.0/courses/{GQfX.id}/')
YKHO.assertEqual(geh0.status_code, 401)
YKHO.assertEqual(FYrf.Course.objects.count(), 1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rs0M(YKHO):\n CBIr = Rqdq.UserFactory(is_staff=tuKI.choice([True, False]), is_superuser=tuKI.choice([True, False]))\n eOtH = YKHO.get_user_token(CBIr.username)\n GQfX = Rqdq.CourseFactory()\n geh0 = YKHO.client.delete(f'/api/v1.0/courses/{GQfX.id}/', HTTP_AUTHORIZATION=f'Bearer {eOtH}')\n YKHO.a... | [
"0.7655004",
"0.7430119",
"0.73407006",
"0.7327146",
"0.6832982",
"0.6819339",
"0.67397064",
"0.673454",
"0.67337567",
"0.658395",
"0.65807635",
"0.6569269",
"0.6568012",
"0.65513736",
"0.65324944",
"0.6529256",
"0.6498119",
"0.64967865",
"0.6476529",
"0.64734113",
"0.6427693... | 0.8115316 | 0 |
Authenticated users should not be able to delete a course. | def rs0M(YKHO):
CBIr = Rqdq.UserFactory(is_staff=tuKI.choice([True, False]), is_superuser=tuKI.choice([True, False]))
eOtH = YKHO.get_user_token(CBIr.username)
GQfX = Rqdq.CourseFactory()
geh0 = YKHO.client.delete(f'/api/v1.0/courses/{GQfX.id}/', HTTP_AUTHORIZATION=f'Bearer {eOtH}')
YKHO.assertEqual... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OPtP(YKHO):\n bD7m = gxEw('institute-courses-detail', args=['IC', 42])\n ZsMf.check_user_permissions(YKHO, None, 'delete', jGRS.HTTP_403_FORBIDDEN, bD7m)\n ZsMf.check_user_permissions(YKHO, 'admin', 'delete', jGRS.HTTP_204_NO_CONTENT, bD7m)\n ZsMf.check_user_permissions(YKHO, 'user', 'delete', jGRS... | [
"0.8049258",
"0.76351297",
"0.7489686",
"0.70665455",
"0.70375556",
"0.69807476",
"0.6959934",
"0.69413745",
"0.6936276",
"0.68911576",
"0.688238",
"0.6793685",
"0.6787372",
"0.67807764",
"0.6769619",
"0.6705144",
"0.6702841",
"0.6689642",
"0.6689163",
"0.664612",
"0.664612",... | 0.8021911 | 1 |
Authenticated users with owner role should not be able to delete a course. | def NTnu(YKHO):
CBIr = Rqdq.UserFactory(is_staff=tuKI.choice([True, False]), is_superuser=tuKI.choice([True, False]))
eOtH = YKHO.get_user_token(CBIr.username)
GQfX = Rqdq.CourseFactory()
Rqdq.UserCourseAccessFactory(user=CBIr, course=GQfX, role=aVkO.OWNER)
geh0 = YKHO.client.delete(f'/api/v1.0/cour... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OPtP(YKHO):\n bD7m = gxEw('institute-courses-detail', args=['IC', 42])\n ZsMf.check_user_permissions(YKHO, None, 'delete', jGRS.HTTP_403_FORBIDDEN, bD7m)\n ZsMf.check_user_permissions(YKHO, 'admin', 'delete', jGRS.HTTP_204_NO_CONTENT, bD7m)\n ZsMf.check_user_permissions(YKHO, 'user', 'delete', jGRS... | [
"0.7308681",
"0.7142515",
"0.68727607",
"0.6665375",
"0.66193706",
"0.65501004",
"0.6523507",
"0.65102357",
"0.6493393",
"0.64888775",
"0.64888775",
"0.64736104",
"0.64690757",
"0.6342767",
"0.6324888",
"0.6321873",
"0.62670225",
"0.6255931",
"0.62459344",
"0.62342644",
"0.62... | 0.7110352 | 2 |
Returns a TestSuite instance built from all of the test cases in the given test case class whose names begin with the given prefix | def IaRV(LZ3l, y0cW='test'):
niNf = filter(lambda exwG, XP5J=y0cW: exwG[:len(XP5J)] == XP5J, dir(LZ3l))
ajHT = map(LZ3l, niNf)
return Uz4O(ajHT) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Q6js(rV9y, lfdS, Fzu6):\n ajHT = []\n for QOe9 in lfdS:\n ajHT.append(rV9y(Fzu6 + QOe9))\n return ajHT",
"def M8O9(gCHl):\n RkiG = DuvM.TestLoader()\n o0Dy = RkiG.getTestCaseNames(gCHl)\n wa51 = DuvM.TestSuite()\n for Pcn2 in o0Dy:\n wa51.addTest(gCHl(Pcn2, args=hWC7()))\n ... | [
"0.73114836",
"0.6834142",
"0.6758851",
"0.669836",
"0.6681846",
"0.65790313",
"0.6579007",
"0.64154345",
"0.6322498",
"0.6312592",
"0.63099784",
"0.6206506",
"0.6144026",
"0.6140781",
"0.6134403",
"0.61241704",
"0.61197805",
"0.61150897",
"0.6104015",
"0.6075831",
"0.6043845... | 0.83600307 | 0 |
Validate that the translation name is not the same as the integration name. | def ApOs(Urat: Integration) -> bool:
return not Urat.core or Urat.domain in Vpck or Urat.quality_scale == 'internal' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JOpz(Urat: Integration) -> None:\n yZ8a = Urat.path / '.translations'\n I2Vp = Urat.path / 'translations'\n if I2Vp.is_dir():\n return\n if yZ8a.is_dir():\n Urat.add_error('translations', snMS)",
"def lnHx():\n sOXw = jth9.deepcopy(hvBJ)\n del sOXw['nameTranslations'][0]['name... | [
"0.6752274",
"0.66072685",
"0.621753",
"0.61559165",
"0.6071919",
"0.6063571",
"0.6037975",
"0.6022983",
"0.59719956",
"0.59675235",
"0.5956711",
"0.5911205",
"0.59000105",
"0.5899284",
"0.58894175",
"0.58891064",
"0.5864001",
"0.5834645",
"0.58080226",
"0.578869",
"0.5786619... | 0.72508967 | 0 |
Adds item to the queue to be added into database. | def wVYw(YKHO, nPrm):
try:
del nPrm['command']
YKHO.queue_out.put(nPrm)
except Exception as e:
RKD7.critical('Data cannot be queued. Error %s', tTpl)
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qw6N(YKHO, dDQD):\n YKHO._queue.insert(0, dDQD)",
"def SStx(YKHO, ZfUD):\n YKHO.queue.append(ZfUD)",
"def jvNa(YKHO, ZfUD):\n YKHO._queue.append(ZfUD)",
"def H2v5(YKHO, ZfUD):\n if YKHO._unique:\n H5ew = YKHO._key(ZfUD) if YKHO._key else ZfUD\n if H5ew in YKHO._seen:\n ... | [
"0.8002323",
"0.80019873",
"0.7985174",
"0.77783364",
"0.77203715",
"0.77203715",
"0.77032655",
"0.7665121",
"0.76243156",
"0.7592793",
"0.75461364",
"0.7524706",
"0.7520946",
"0.7459598",
"0.7459598",
"0.7459598",
"0.7459598",
"0.7459598",
"0.7452875",
"0.7416165",
"0.739336... | 0.0 | -1 |
>>> lnk = Link(1, Link(1, Link(1, Link(1, Link(5))))) >>> remove_duplicates(lnk) >>> lnk Link(1, Link(5)) | def dDv2(QZnA):
if QZnA is PRV_.empty or QZnA.rest is PRV_.empty:
return
else:
while QZnA.second == QZnA.first:
QZnA.rest = QZnA.rest.rest
return dDv2(QZnA.rest) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dDv2(USDe):\n \"\"\" \n while lnk is not Link.empty and lnk.rest is not Link.empty :\n if lnk.first == lnk.rest.first:\n lnk.rest = lnk.rest.rest\n else:\n lnk = lnk.rest\n \"\"\"\n if USDe is PRV_.empty or USDe.rest is PRV_.empty:\n return\n elif USD... | [
"0.82576203",
"0.8031379",
"0.7253411",
"0.7200602",
"0.7186664",
"0.71051204",
"0.6985281",
"0.6926757",
"0.69088465",
"0.6875279",
"0.685275",
"0.68279827",
"0.6709415",
"0.6642395",
"0.6632646",
"0.6571678",
"0.64776146",
"0.64501584",
"0.6421407",
"0.6420739",
"0.6405203"... | 0.8031747 | 1 |
>>> x = [1,2,3,4,5,6] >>> even_weighted(x) [0, 6, 20] | def fDWc(yv6U):
return [QyVM * U6D_ for QyVM, U6D_ in enumerate(yv6U) if QyVM % 2 == 0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fDWc(KCHu):\n return [KCHu[YRbF] * YRbF for YRbF in range(len(KCHu)) if YRbF % 2 == 0]",
"def fDWc(yv6U):\n return [U6D_ * yv6U.index(U6D_) for U6D_ in yv6U if yv6U.index(U6D_) % 2 == 0]",
"def qm4O(YKHO):\n pass",
"def Hy2g(jkyz, _mSQ):\n z1E8 = zip(jkyz, _mSQ)\n _kUa = []\n for ZfUD i... | [
"0.8110578",
"0.7803129",
"0.6882446",
"0.6430944",
"0.64053893",
"0.63652784",
"0.63239574",
"0.6300527",
"0.6295711",
"0.6149473",
"0.6128291",
"0.60922194",
"0.60608226",
"0.60529435",
"0.60521483",
"0.6027569",
"0.6007068",
"0.60010815",
"0.5998951",
"0.5995282",
"0.59843... | 0.7920006 | 1 |
>>> quicksort_list([3,1,4,5,2,0,10]) [0, 1, 2, 3, 4, 5, 10] | def R3Pj(yv6U):
if len(yv6U) == 0:
return yv6U
csQL = yv6U[0]
HFDh = [U6D_ for U6D_ in yv6U if U6D_ < csQL]
_5Kr = [U6D_ for U6D_ in yv6U if U6D_ > csQL]
return R3Pj(HFDh) + [csQL] + R3Pj(_5Kr) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R3Pj(yv6U):\n if not yv6U:\n return\n csQL = yv6U[0]\n HFDh = [U6D_ for U6D_ in yv6U if U6D_ < csQL]\n _5Kr = [U6D_ for U6D_ in yv6U if U6D_ > csQL]\n return HFDh + [csQL] + _5Kr",
"def lguw(yv6U):\n if yv6U:\n return lguw([WKvO for WKvO in yv6U if WKvO < yv6U[0]]) + [WKvO for... | [
"0.85463715",
"0.84884095",
"0.84462",
"0.84386533",
"0.8425559",
"0.8388068",
"0.81715727",
"0.79745424",
"0.79741377",
"0.79661065",
"0.7963975",
"0.7963388",
"0.79611975",
"0.7947183",
"0.79249316",
"0.79073364",
"0.79064804",
"0.790498",
"0.7871481",
"0.78687984",
"0.7868... | 0.8356199 | 6 |
Update a dict value if it's set to None | def YEsv(Csk6, G1Hx, Ty9i):
if Csk6[G1Hx] is None:
Csk6[G1Hx] = Ty9i | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M5Ld(dict, mWFP, BWXx):\n if BWXx is not None:\n dict[mWFP] = BWXx",
"def oqAS(Csk6, H5ew, wEf2):\n if Csk6.get(H5ew, None) is None:\n Csk6[H5ew] = wEf2\n return Csk6[H5ew]",
"def Gu_C(YKHO, xUwc, H5ew, BWXx):\n if BWXx:\n xUwc.update({H5ew: BWXx})",
"def M5Ld(dict, mWFP,... | [
"0.7599832",
"0.756438",
"0.7542765",
"0.747427",
"0.7426358",
"0.7331557",
"0.7090714",
"0.7050282",
"0.6870582",
"0.66523135",
"0.66365886",
"0.6594312",
"0.6503986",
"0.63751245",
"0.63322306",
"0.63305587",
"0.632067",
"0.6299194",
"0.62859327",
"0.6256128",
"0.6238951",
... | 0.7882336 | 0 |
Sets the unit of this Quota. | def PXGI(YKHO, PXGI):
YKHO._unit = PXGI | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HG0k(YKHO, PXGI):\n YKHO.unit = PXGI",
"def AzKP(YKHO, PXGI):\n YKHO.unit = PXGI",
"def PXGI(YKHO, PXGI):\n YKHO._unit = PXGI",
"def Giyk(YKHO) -> None:\n YKHO.signals.axis_unit_changed.emit()",
"def qTLA(YKHO, PXGI):\n YKHO.measurement_unit = kATS(int(PXGI))",
"def UnF5(YKHO, rYO3):\n... | [
"0.83640176",
"0.82790726",
"0.8026733",
"0.786188",
"0.75111794",
"0.74351835",
"0.73292935",
"0.7289448",
"0.7217559",
"0.72147167",
"0.7212736",
"0.70863384",
"0.70717734",
"0.69941103",
"0.6932355",
"0.6932161",
"0.6858203",
"0.68279344",
"0.6800837",
"0.6729473",
"0.6728... | 0.79299444 | 4 |
Returns the string representation of the model | def gTzM(YKHO):
return CgYo.pformat(YKHO.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return YKHO.text",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\... | [
"0.86418265",
"0.85103965",
"0.7853324",
"0.77442306",
"0.7712258",
"0.76979405",
"0.765959",
"0.7637644",
"0.76218504",
"0.7607561",
"0.7606604",
"0.7606604",
"0.7606604",
"0.75990754",
"0.7585653",
"0.758149",
"0.7570811",
"0.7567585",
"0.75392604",
"0.75392604",
"0.7527967... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
if not isinstance(Elif, TCdb):
return True
return YKHO.to_dict() != Elif.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.83939064",
"0.83558416",
"0.8296191",
"0.8133439",
"0.81156427",
"0.810097",
"0.81001526",
"0.8099001",
"0.8099001",
"0.80936444",
"0.80936444",
"0.80936444",
"0.80936444",
"0.80862904",
"0.80862904",
"0.80862904",
"0.80862904",
"0.80862904",
"0.80677134",
"0.80598736",
"0... | 0.0 | -1 |
Present the captured frame on the screen to the user | def P2CB(f4IJ) -> None:
XC5k.imshow('Video', f4IJ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W8mS(YKHO, f4IJ: np.ndarray):\n XC5k.imshow('frame', f4IJ)",
"def KCDz(YKHO, f4IJ: np.ndarray):\n _gO8 = YKHO.convert_cv2pixmap(f4IJ)\n YKHO.setPixmap(_gO8)",
"def q6Q0(f4IJ):\n LNo8 = y467(f4IJ)\n r2sP(LNo8)",
"def KCDz(YKHO, f4IJ):\n if YKHO.show_stream and YKHO.augmented or YKHO.show... | [
"0.758557",
"0.74882686",
"0.7431685",
"0.72031426",
"0.7161702",
"0.6892326",
"0.68103236",
"0.67626417",
"0.6755922",
"0.6700836",
"0.6684928",
"0.6634818",
"0.6594016",
"0.65910983",
"0.65667737",
"0.6521061",
"0.65205425",
"0.6508064",
"0.6505999",
"0.64960617",
"0.649242... | 0.7057925 | 5 |
Gets the package version. | def kaPv() -> str:
with RkCj.open_text(__package__, 'VERSION') as wOb_:
return wOb_.readline().strip() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kaPv(YKHO):\n return YKHO.get_single('/package/version')",
"def eJy1(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'package_version')",
"def eJy1(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'package_version')",
"def zvqz(YKHO):\n return YKHO.get_job()['packageVersion']",
"def ka... | [
"0.9140032",
"0.8613109",
"0.8613109",
"0.8608711",
"0.83752716",
"0.83034265",
"0.82873803",
"0.8286406",
"0.8242988",
"0.8240604",
"0.8235766",
"0.8235766",
"0.82187384",
"0.81920147",
"0.8183256",
"0.8179821",
"0.8154345",
"0.81263995",
"0.8124938",
"0.8124938",
"0.8124293... | 0.82791936 | 8 |
Tests user follow method of InstagramBot by checking if it raises an error, and then prints the error message | def te5k(YKHO):
try:
YKHO.bot.follow_user('https://www.instagram.com/nintendo/')
except Exception as e:
YKHO.fail(tTpl)
ITS7.sleep(2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BQzh(YKHO):\n YKHO.register_user()\n geh0 = YKHO.login_user()\n eOtH = geh0.data['token']\n geh0 = YKHO.follow_user(eOtH, 'Mrs.non_existent_user')\n aEqx = 'The requested profile does not exist.'\n YKHO.assertTrue(geh0.data['errors']['detail'] == aEqx)\n YKHO.assertEquals(jGRS.HTTP_400_BAD... | [
"0.7263761",
"0.709016",
"0.7061834",
"0.7025042",
"0.6995208",
"0.6788727",
"0.67613184",
"0.65946114",
"0.6585081",
"0.6480323",
"0.64589626",
"0.64458597",
"0.6415539",
"0.6359503",
"0.6350842",
"0.6344192",
"0.63142115",
"0.63082564",
"0.6302319",
"0.62959814",
"0.6232527... | 0.7723241 | 0 |
Render 'users/profile.html' on GET. | def ykgQ(YKHO):
geh0 = YKHO._profile('get')
YKHO.assertTemplateUsed(geh0, 'users/profile.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QyAW():\n return TvZl('user_profile_page.html')",
"def NMoC(YKHO, NtEF):\n return TvZl('auth/profile.html', user=mv1M.get_by_username(NtEF))",
"def SGll():\n return TvZl('user_profile_page.html')",
"def vJua():\n return TvZl('profile.html')",
"def z39Z():\n return TvZl('profile.html')",
... | [
"0.8115573",
"0.8104111",
"0.8090659",
"0.80479234",
"0.7972207",
"0.7914367",
"0.79129124",
"0.78162825",
"0.7795449",
"0.77863413",
"0.77658343",
"0.77658343",
"0.7753657",
"0.77083653",
"0.7639255",
"0.76149625",
"0.7609454",
"0.75893897",
"0.75719476",
"0.75248575",
"0.75... | 0.713219 | 52 |
If the user has already voted for the video, remove the session key and do nothing. | def zAcM(YKHO, _8xI):
f6W2 = RAVR.create()
lFQG.objects.create(user=YKHO.user, video=f6W2)
YKHO.request.session['vote_video'] = QMSQ(f6W2.id)
YKHO.verify.login_success()
Ej5C('vote_video' not in YKHO.request.session)
NaW5(lFQG.objects.filter(user=YKHO.user, video=f6W2).count(), 1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JAE7(YKHO, _8xI):\n YKHO.request.session['vote_video'] = '99999'\n YKHO.verify.login_success()\n Ej5C('vote_video' not in YKHO.request.session)\n Ej5C(not lFQG.objects.filter(user=YKHO.user).exists())",
"def A0m2(YKHO):\n if YKHO._has_active_session():\n return YKHO._vote_timer.cancel()... | [
"0.60173494",
"0.5836189",
"0.5805647",
"0.5782526",
"0.5735033",
"0.573494",
"0.5704668",
"0.5691057",
"0.5688303",
"0.56546074",
"0.5584313",
"0.55680996",
"0.5551505",
"0.55309594",
"0.55300486",
"0.5518329",
"0.54924065",
"0.5479923",
"0.5479896",
"0.54662234",
"0.5449571... | 0.5145925 | 58 |