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 |
|---|---|---|---|---|---|---|
Gets all ngraph (digraphs for n=2, trigraphs n=3, etc) prefixes from a list of words, even if they only occur once. | def wKRA(V22M, exwG=2):
ar2g = dict()
for eXjv in V22M:
d6pt = 0
if d6pt + exwG > len(eXjv):
continue
HAqL = eXjv[d6pt:d6pt + exwG]
if HAqL not in ar2g.keys():
ar2g[HAqL] = 1
else:
ar2g[HAqL] += 1
return ar2g | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YLda(V22M, exwG=2):\n iku2 = filter(lambda WKvO: WKvO[1] > 1, wKRA(V22M, exwG).items())\n ar2g = sorted(iku2, key=lambda WKvO: WKvO[1], reverse=True)\n return ar2g",
"def glRM(V22M, exwG=2):\n ar2g = dict()\n for eXjv in V22M:\n d6pt = len(eXjv) - exwG\n if d6pt < 0 or d6pt > len... | [
"0.7718774",
"0.7151676",
"0.69761056",
"0.65735096",
"0.6568232",
"0.65679866",
"0.6551734",
"0.6521863",
"0.6480105",
"0.6465093",
"0.64084995",
"0.6326402",
"0.63220596",
"0.63184893",
"0.6265457",
"0.6259814",
"0.61986464",
"0.6188962",
"0.6152758",
"0.6139904",
"0.611116... | 0.8122966 | 0 |
This function performs the baby action and updates the board accordingly. It returns the new state of the board, the reward received by the baby and whether this action has resulted in the game being finished (all berries eaten) | def YPaw(YKHO, XeOP: str, _1tc: bool=False) -> (oyIN.array, int, bool):
if YKHO.dad != None:
if YKHO.dad.get_position() == YKHO.baby.get_position():
YKHO.make_board()
return (YKHO.get_state(), YKHO.game_over_reward, True)
YKHO.move_berries()
xQq1 = YKHO.baby.action(XeOP)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YPaw(YKHO, XeOP, tKkL):\n assert XeOP < len(YKHO.macro_actions), 'The action received is out of the range'\n vOGg = 0.0\n YKHO.cur_action = YKHO.macro_actions[XeOP]\n YKHO.cur_action_done = False\n if XeOP <= 2:\n tyoS = YKHO.cur_action.ma_bwpterm\n if YKHO.cur_action.expected_t_co... | [
"0.667202",
"0.6487082",
"0.6453518",
"0.6437207",
"0.643701",
"0.63925785",
"0.6372867",
"0.63629603",
"0.626178",
"0.6249547",
"0.62462",
"0.6237205",
"0.62330884",
"0.6211639",
"0.6206532",
"0.61879104",
"0.6156197",
"0.6156195",
"0.61520547",
"0.6139251",
"0.61369973",
... | 0.74653774 | 0 |
Create a Waiter object based on the specified resource. This is a convenience method for creating a waiter from a resource. Based on the arguments and the kind of resource, an appropriate waiter will be returned. A waiter can also be created directly, of course. | def NNiR(x0hE, Eorv: Resource, QTBn: str='present', XEri: Optional[Dict]=None, Xelj: Optional[bool]=False) -> Dpax:
if Xelj:
return VVTm()
if QTBn == 'present':
if XEri:
lgNN: YrBT[[wPpX], bool] = YLnl(PbOO, XEri)
else:
lgNN = IEFP.get(Eorv.kind, vtfo)
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NNiR(YKHO, SNaU: str=None) -> p8zQ:\n pass",
"def NNiR(YKHO, SNaU: str=None) -> p8zQ:\n pass",
"def NNiR(YKHO, SNaU: str=None) -> p8zQ:\n pass",
"def NNiR(YKHO, SNaU: str=None) -> p8zQ:\n pass",
"def NNiR(YKHO, SNaU: str=None) -> p8zQ:\n pass",
"def NNiR(YKHO, SNaU: str=None) -> p8zQ:\... | [
"0.5957128",
"0.5957128",
"0.5957128",
"0.5957128",
"0.5957128",
"0.5957128",
"0.5957128",
"0.5957128",
"0.5957128",
"0.5957128",
"0.5957128",
"0.5957128",
"0.5957128",
"0.5957128",
"0.5957128",
"0.5957128",
"0.5957128",
"0.57741654",
"0.57549155",
"0.5710187",
"0.5710187",
... | 0.7159704 | 0 |
Return minimum distance between coord and surface. | def uYq_(BHsk, J20S):
Csk6 = J20S - BHsk
_sQW = oyIN.sum(Csk6 * Csk6, 1)
return oyIN.sqrt(min(_sQW)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def paAm(YKHO):\n oxOY, bGrB = YKHO.get_dists_auto()\n uYq_ = oyIN.min(oxOY)\n if uYq_ < 0.9:\n return uYq_\n else:\n if YKHO.wp.multiplicity > 1:\n oxOY, bGrB = YKHO.get_dists_WP()\n if uYq_ > oyIN.min(oxOY):\n uYq_ = oyIN.min(oxOY)\n return uY... | [
"0.7031991",
"0.69452864",
"0.685957",
"0.64937174",
"0.6467763",
"0.6467162",
"0.64369",
"0.62856585",
"0.6251558",
"0.6238206",
"0.62350386",
"0.6203199",
"0.6194323",
"0.6188899",
"0.61852944",
"0.61648345",
"0.6085958",
"0.60857475",
"0.607781",
"0.6066108",
"0.6048466",
... | 0.87400454 | 0 |
Runs grid search on a given model with the selected param_grid, prints out train and test accuracy. | def QcCo(C3ST, maJ7, bmJ5=1, CkYf=True):
TgwQ = WtpJ(C3ST, maJ7, n_jobs=bmJ5, verbose=1)
if CkYf:
TgwQ.fit(lwf9, iUNp)
print('Train score:', TgwQ.score(lwf9, iUNp))
print('Test score:', TgwQ.score(HVMN, QDV6))
print('Best params:', TgwQ.best_params_)
else:
TgwQ.fit(Lc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eSH_(YKHO, C3ST: str, NArs: dict, Htse=None, H6_9=True):\n CZRf = YKHO.train_X.copy()\n pZ_I = YKHO.test_X.copy()\n if Htse is not None:\n zxDJ = EHUa(Htse)\n zxDJ.fit(CZRf, YKHO.train_y)\n CZRf = zxDJ.transform(CZRf)\n pZ_I = zxDJ.transform(pZ_I)\n if C3ST == 'gbr':\n ... | [
"0.7283903",
"0.72636557",
"0.7134853",
"0.7099083",
"0.70197403",
"0.7016389",
"0.70057744",
"0.6994156",
"0.6924103",
"0.69106835",
"0.6861852",
"0.6756144",
"0.6756144",
"0.6738074",
"0.67294675",
"0.6717314",
"0.6622094",
"0.6610118",
"0.657096",
"0.6569916",
"0.6528301",... | 0.6965844 | 8 |
Are the doors of this room on the room's walls? | def XuGK(YKHO) -> bool:
wBZN = YKHO.position.x
re6M = YKHO.position.x + YKHO.width - 1
KDmU = YKHO.position.y
rwK9 = YKHO.position.y + YKHO.height - 1
for Cv4z in YKHO._room_doors:
if Cv4z.x == wBZN or Cv4z.x == re6M:
return Cv4z.y in range(KDmU, rwK9)
elif Cv4z.y == KDmU... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def glzG(WKvO, ehDb, EmUK):\n return WKvO in EmUK.activity.get_room_doors(EmUK[PZBq(EmUK[_JMH(ehDb)])])",
"def V0CN(WKvO, ehDb, EmUK):\n return WKvO in EmUK.activity.get_room_doors(EmUK[i8js(EmUK[_JMH(ehDb)])])",
"def LsaJ(YKHO):\n return all(YKHO.walls.values())",
"def OC7g(YKHO, WKvO, LVAh):\n ... | [
"0.6896034",
"0.6731944",
"0.6637915",
"0.66150904",
"0.6612101",
"0.6525462",
"0.6522149",
"0.64979196",
"0.6476149",
"0.6407524",
"0.6392386",
"0.6379704",
"0.63789916",
"0.6371307",
"0.6371307",
"0.6364905",
"0.63617027",
"0.63247716",
"0.63088465",
"0.62815773",
"0.628070... | 0.86612004 | 0 |
Return a copy of the open tiles list. | def EXO9(YKHO) -> list:
return YKHO._open_tiles.copy() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qoBP(YKHO):\n dAmA = []\n for vC9B in YKHO.tiles:\n gAQa = vC9B[:]\n dAmA.append(gAQa)\n return dAmA",
"def L_OW(YKHO):\n return YKHO.tiles",
"def uEwF(YKHO):\n for eL5z in YKHO._open_tiles:\n in1a = eL5z.x - YKHO.position.x\n X7nr = eL5z.y - YKHO.position.y\n ... | [
"0.7502915",
"0.71433645",
"0.69489145",
"0.69372106",
"0.69324327",
"0.6887386",
"0.66819286",
"0.66598934",
"0.6459264",
"0.64339423",
"0.6267064",
"0.62005",
"0.6146464",
"0.6142465",
"0.6137442",
"0.6135234",
"0.6117241",
"0.61121744",
"0.6083559",
"0.5992651",
"0.5991527... | 0.8746399 | 0 |
Reusable Logger, determined by name If parameter `handlers` provided and not None, all previous handlers would be cleared and newly given ones set. | def FIMM(YKHO, E70h: str, oTZi: Iterable[logging.Handler]=None, sWtk=G9jH.DEBUG, cJvQ=False, aGl6=False):
qmLP.warn('Deprecated since 0.2.5. Use NehushtanFileLogger instead!', DeprecationWarning)
YKHO.with_process_info = cJvQ
YKHO.with_thread_info = aGl6
YKHO.logger = G9jH.getLogger(E70h)
YKHO.logge... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EsWC(mWFP):\n bo34 = G9jH.getLogger(mWFP)\n Ylj8(y9Z4)\n tCel = G9jH.Formatter('[%(asctime)s] [%(levelname)s] [%(name)s] [%(funcName)s():%(lineno)s] [PID:%(process)d TID:%(thread)d] %(message)s', '%d/%m/%Y %H:%M:%S')\n C5iz = G9jH.handlers.RotatingFileHandler('app/logger/logger.log', maxBytes=50000... | [
"0.6611004",
"0.65756446",
"0.6560342",
"0.6340982",
"0.6271945",
"0.62653726",
"0.6212674",
"0.61958665",
"0.6073504",
"0.6014744",
"0.60004216",
"0.60001826",
"0.5934585",
"0.5905838",
"0.5896732",
"0.5860381",
"0.58235824",
"0.5820002",
"0.58186924",
"0.58104026",
"0.58104... | 0.6670502 | 0 |
Return the trained model for this vectorizer. See the class docs on how it is cached and cleared. | def C3ST(YKHO):
Q5mJ: iu5r[V4l8] = YKHO.doc_factory.create_training_docs()
with ITS7('trained model'):
if bo34.isEnabledFor(G9jH.INFO):
bo34.info(f'creating model at {YKHO.index_path}')
return YKHO._create_model(Q5mJ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YrZb(YKHO):\n YKHO._model = YKHO._model or YKHO._load_model()\n if not YKHO._model:\n print('No previous model found. Creating a new one for training.')\n YKHO._model = oNB5(tokenizer=Dhdw.word_tokenize, stop_words=YKHO.EN_STOP)\n return YKHO._model",
"def cyq0(YKHO) -> wOed:\n retu... | [
"0.7935535",
"0.7568507",
"0.7318236",
"0.7249228",
"0.7044406",
"0.68687755",
"0.68145305",
"0.6811545",
"0.6767861",
"0.6656248",
"0.66465586",
"0.6616552",
"0.6600375",
"0.65738964",
"0.6554684",
"0.65256315",
"0.650549",
"0.64947426",
"0.64947426",
"0.64947426",
"0.647288... | 0.71227705 | 4 |
calculate the transpose of a numpy array | def ol8l(SppC):
return SppC.T | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l7uB(jzdc):\n return kp_e(jzdc, -1, -2)",
"def l7uB(vb7U):\n return vb7U.T",
"def ol8l(SppC):\n return SppC.transpose()",
"def ol8l(SppC):\n return SppC.transpose()",
"def uquV(k0lF: np.ndarray) -> oyIN.ndarray:\n return k0lF.T @ k0lF",
"def ol8l(SppC):\n import numpy as oyIN\n r... | [
"0.8037319",
"0.7926113",
"0.78835803",
"0.78835803",
"0.76517177",
"0.7614527",
"0.7559652",
"0.7552507",
"0.7443073",
"0.720797",
"0.7205324",
"0.7193589",
"0.71684784",
"0.71322024",
"0.7076886",
"0.7051688",
"0.7014956",
"0.69903886",
"0.69739336",
"0.6965841",
"0.6935940... | 0.79583615 | 1 |
Resolve symbol or number to an 8bit unsigned operand. | def Y8IH(YKHO, kuMQ, A3Vt, gkp_):
gkp_ = YKHO.symbol_table.resolve_expression(gkp_) % 256
return LE47[kuMQ] << 11 | gr_i[A3Vt] << 8 | gkp_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sZ5t(BWXx):\n return tNVR.spl.op.Expression('UINT8', int(BWXx))",
"def Yuri(YKHO, kuMQ, tZ2K):\n lhy8 = {}\n mWFP = 'USUB8'\n zbZI = b_av.usub8\n FmNz = False\n XEri = None\n if tZ2K == FgKF:\n ZqWn = [pdhd(0)]\n bGrB = G2m6(kuMQ, ZqWn)\n Lw3l = []\n elif tZ2K == ... | [
"0.6217705",
"0.6018196",
"0.5995911",
"0.59291506",
"0.57686144",
"0.5717245",
"0.56889474",
"0.560957",
"0.5547298",
"0.5519898",
"0.5507321",
"0.54732835",
"0.5446778",
"0.54325306",
"0.5385097",
"0.5354215",
"0.5318322",
"0.5296604",
"0.5294805",
"0.5290419",
"0.5276049",... | 0.657578 | 0 |
Compute a meansquared error loss between the documents' vectors and the prediction. Note that this is ripe for customization! We could compute the vectors in some other word, e.g. with an LSTM language model, or use some other type of objective. | def MgYO(IPme, Q5mJ, o3Uj, rV9r=...):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xBoL(N6Z1, x6A0):\n return epAf.sqrt(Wbxz.mean_squared_error(N6Z1, x6A0))",
"def BsIc(nvEb, n5sN):\n P1dF = oyIN.subtract(nvEb, n5sN)\n xDyf = oyIN.square(P1dF)\n nLVR = oyIN.mean(xDyf)\n iAxY = oyIN.sqrt(nLVR)\n yvNY = oyIN.abs(P1dF)\n Emt7 = oyIN.mean(yvNY)\n return (iAxY, Emt7)",
... | [
"0.69763386",
"0.6633407",
"0.64956945",
"0.64719605",
"0.6470276",
"0.634657",
"0.63288015",
"0.6314094",
"0.6295566",
"0.6281061",
"0.6260428",
"0.6259997",
"0.62497395",
"0.6247274",
"0.62353903",
"0.622991",
"0.62033546",
"0.619314",
"0.61836",
"0.61792016",
"0.6167431",
... | 0.68695974 | 1 |
Parse a pyramid string into a list of lists. We parse it in reverse order to make the DP easier. | def n5_v(Ywea):
SppC = []
for zFiD in Ywea.strip().split('\n')[::-1]:
SppC.append(list(map(int, zFiD.split())))
return SppC | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hmoj(ReZo):\n with open(ReZo, 'r') as nUeQ:\n Nqlg = nUeQ.readlines()\n zaZm = []\n for zFiD in Nqlg[0:]:\n zaZm.append([int(exwG) for exwG in zFiD.strip().split(' ')])\n return list(zaZm)",
"def oOnU(rdlD):\n rdlD = rdlD.strip().decode()\n OHaM, rdlD = khR9(rdlD)\n kcsq = ... | [
"0.6562966",
"0.60799503",
"0.60147136",
"0.5870776",
"0.5860897",
"0.58059186",
"0.5782735",
"0.5714048",
"0.5697301",
"0.5694962",
"0.56878114",
"0.5686003",
"0.56689185",
"0.5645507",
"0.56153107",
"0.5585699",
"0.55805993",
"0.5573823",
"0.55483824",
"0.5541372",
"0.55253... | 0.7780489 | 0 |
Base wavenet model without input and output layers. | def gxeW(WKvO: tf.Tensor):
WKvO = WcvW(WKvO, 16, 3, 12)
WKvO = WcvW(WKvO, 32, 3, 8)
WKvO = WcvW(WKvO, 64, 3, 4)
WKvO = WcvW(WKvO, 128, 3, 1)
return WKvO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rvDU(g4y1):\n WKvO = l6ZH(256, activation='relu')(g4y1)\n WKvO = lARV(0.2)(WKvO)\n WKvO = l6ZH(128, activation='relu')(WKvO)\n WKvO = lARV(0.2)(WKvO)\n return WKvO",
"def rvDU(Zadn):\n C3ST = ileL()\n for dfHy in range(ETyS):\n C3ST.add(l6ZH(g0yG * 4, activation='relu'))\n ... | [
"0.65560377",
"0.65135974",
"0.6475863",
"0.6301107",
"0.6282356",
"0.6250564",
"0.6250375",
"0.6094484",
"0.60815644",
"0.6021877",
"0.60177034",
"0.6014303",
"0.60034853",
"0.59907985",
"0.5986428",
"0.59770364",
"0.59737444",
"0.5960337",
"0.595302",
"0.5937384",
"0.593360... | 0.0 | -1 |
Wavenet model with residual convolution blocks. | def hxkJ(WKvO):
WKvO = mQG_(WKvO, 16, 3)
WKvO = WcvW(WKvO, 16, 3, 12)
WKvO = mQG_(WKvO, 32, 3)
WKvO = WcvW(WKvO, 32, 3, 8)
WKvO = mQG_(WKvO, 64, 3)
WKvO = WcvW(WKvO, 64, 3, 4)
WKvO = mQG_(WKvO, 128, 3)
WKvO = WcvW(WKvO, 128, 3, 1)
return WKvO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QufS(oubr, KUnM):\n Csk6 = yHwh(KUnM, kernel_size=3, strides=1, padding='same')(oubr)\n Csk6 = MroH('relu')(Csk6)\n Csk6 = GVKG(momentum=0.8)(Csk6)\n Csk6 = yHwh(KUnM, kernel_size=3, strides=1, padding='same')(Csk6)\n Csk6 = GVKG(momentum=0.8)(Csk6)\n return Csk6",
"def QufS(oubr, KUnM):\n ... | [
"0.6741818",
"0.6739495",
"0.6738416",
"0.673266",
"0.673266",
"0.65863556",
"0.6531042",
"0.65004766",
"0.6496199",
"0.6463863",
"0.64013386",
"0.6388649",
"0.63609415",
"0.6345953",
"0.63370997",
"0.63262844",
"0.6317038",
"0.62480944",
"0.6200047",
"0.61978126",
"0.6196792... | 0.0 | -1 |
Return if the current backend is the given one. | def aZj5(DDLl: str) -> bool:
return p5cf == DDLl | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OBsw(YKHO):\n return YKHO.is_available",
"def BNdt():\n return Hy7s.environ.get('BACKEND_TYPE', None) == 'MINDSPORE'",
"def LRPE():\n return Hy7s.environ.get('BACKEND_TYPE', None) == 'TENSORFLOW'",
"def jIsJ(Emd4, DDLl: BackendType) -> bool:\n ...",
"def rSyJ() -> h8nf[str]:\n import sys... | [
"0.7859983",
"0.73199505",
"0.717966",
"0.7135703",
"0.69261825",
"0.69079715",
"0.6894379",
"0.68912065",
"0.6796288",
"0.6796288",
"0.6796288",
"0.6796288",
"0.6796288",
"0.6796288",
"0.6768032",
"0.6765308",
"0.6753292",
"0.6699631",
"0.66637903",
"0.66367394",
"0.6636486"... | 0.83922255 | 0 |
Get or set the beginning of the event. | def _9an(YKHO):
return YKHO._begin | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yKcO(YKHO):\n if YKHO._start_present:\n return YKHO._start_value\n else:\n raise AttributeError(\"missing required field 'start'\")",
"def yKcO(YKHO):\n if not YKHO._start:\n kETg = YKHO._get_first_line()\n YKHO._start = YKHO._get_linetime(kETg)\n return YKHO._start",
... | [
"0.67207205",
"0.66260266",
"0.65347165",
"0.64657295",
"0.6393833",
"0.6361658",
"0.6361658",
"0.6361658",
"0.6358379",
"0.63561684",
"0.63070744",
"0.62985694",
"0.6261836",
"0.6260947",
"0.62598306",
"0.6196164",
"0.61957425",
"0.6141213",
"0.611901",
"0.6102503",
"0.60985... | 0.63712776 | 5 |
Get or set the completed of the todo. | def g9mP(YKHO):
if YKHO._completed:
return YKHO._completed
else:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KnEV(QePW, jttg):\n pPvV = Iofl(gx9E, id=jttg)\n pPvV.completed = True\n pPvV.save()\n return jnRN('marked as completed', safe=False)",
"def KnEV(c5ow, jttg):\n return gx9E.complete_todo(c5ow.id, jttg)",
"def g9mP(YKHO):\n return YKHO._completed_flag.is_set()",
"def BCVQ(YKHO, jttg):\n ... | [
"0.6950826",
"0.6608626",
"0.64871687",
"0.6434759",
"0.6421742",
"0.6421742",
"0.6409685",
"0.63683325",
"0.63683325",
"0.63152534",
"0.6298996",
"0.6276788",
"0.6276788",
"0.6276788",
"0.6276788",
"0.6276788",
"0.6276788",
"0.6276788",
"0.6276788",
"0.62480354",
"0.6204724"... | 0.6707033 | 1 |
Two todos are considered equal if they have the same uid. | def xa14(YKHO, Elif):
if not isinstance(Elif, gx9E):
raise NotImplementedError('Cannot compare Todo and {}'.format(type(Elif)))
return YKHO.uid == Elif.uid | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n if isinstance(Elif, gx9E):\n return YKHO.uid == Elif.uid\n raise NotImplementedError('Cannot compare Todo and {}'.format(type(Elif)))",
"def Vdqg(YKHO, Elif):\n if isinstance(Elif, gx9E):\n return YKHO.uid != Elif.uid\n raise NotImplementedError('Cannot compare T... | [
"0.7859898",
"0.70486665",
"0.69152606",
"0.6411306",
"0.63314986",
"0.6302791",
"0.614818",
"0.6108268",
"0.6051929",
"0.6044105",
"0.60124767",
"0.59737307",
"0.5962994",
"0.5962994",
"0.5962994",
"0.5876759",
"0.58757025",
"0.5829139",
"0.5811222",
"0.57801783",
"0.5773738... | 0.7477147 | 1 |
Create and save a regular User with the given email and password. | def lYUQ(YKHO, d_TE, jTXt=None, **wdCM):
wdCM.setdefault('is_staff', False)
wdCM.setdefault('is_superuser', False)
return YKHO._create_user(d_TE, jTXt, **wdCM) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xWi2(YKHO, D3lj, jTXt, **wdCM):\n if not D3lj:\n raise ValueError('The email must be set')\n D3lj = YKHO.normalize_email(D3lj)\n CBIr = YKHO.model(email=D3lj, **wdCM)\n CBIr.set_password(jTXt)\n CBIr.save()",
"def xWi2(YKHO, D3lj, jTXt, **wdCM):\n CBIr = YKHO.model(email=D3lj, **wdCM... | [
"0.874329",
"0.86429185",
"0.8606219",
"0.86045957",
"0.86044246",
"0.8602914",
"0.85992867",
"0.85992867",
"0.85992867",
"0.859409",
"0.8584467",
"0.8553975",
"0.8544033",
"0.8531397",
"0.85222083",
"0.8520832",
"0.85181487",
"0.85159653",
"0.85144114",
"0.8507048",
"0.85003... | 0.0 | -1 |
Create and save a SuperUser with the given email and password. | def Zp54(YKHO, d_TE, jTXt, **wdCM):
wdCM.setdefault('is_staff', True)
wdCM.setdefault('is_superuser', True)
if wdCM.get('is_staff') is not True:
raise ValueError('Superuser must have is_staff=True.')
if wdCM.get('is_superuser') is not True:
raise ValueError('Superuser must have is_superu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zp54(YKHO, D3lj, jTXt=None, **dDGN):\n YKHO._create_user(D3lj, True, jTXt, **dDGN)",
"def Zp54(YKHO, D3lj: str, jTXt: str, **wdCM: Dict[str, bool]):\n wdCM.setdefault('is_staff', True)\n wdCM.setdefault('is_superuser', True)\n wdCM.setdefault('is_active', True)\n if wdCM.get('is_staff') is not... | [
"0.8171723",
"0.80957687",
"0.80733633",
"0.8066663",
"0.806237",
"0.8055784",
"0.8035942",
"0.79796547",
"0.79613644",
"0.7956382",
"0.79467344",
"0.7942921",
"0.7942921",
"0.7942921",
"0.7942921",
"0.7942921",
"0.7942921",
"0.7942921",
"0.7942921",
"0.79397815",
"0.7935716"... | 0.0 | -1 |
Test if the partner api returns the expected http statuscode when posting. | def XORb(YKHO, x0hE, Weav):
assert x0hE.post('/partners/' + Weav).status == '405 METHOD NOT ALLOWED' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ieOq(YKHO):\n assert YKHO.response.status_code == 201",
"def j1x8(_hkX):\n return _hkX.status_code == 200",
"def AWhd(YKHO):\n YKHO.assertEqual(YKHO.resp.status_code, 200)",
"def Nje3(YKHO, nPrm, DnVF=jGRS.HTTP_204_NO_CONTENT):\n geh0 = YKHO.client.post(YKHO.url, qQXR.dumps(nPrm), **YKHO.head... | [
"0.7478297",
"0.7345105",
"0.73110396",
"0.7300038",
"0.7300038",
"0.72417545",
"0.721548",
"0.71357304",
"0.71357304",
"0.71209514",
"0.7071388",
"0.70509005",
"0.70509005",
"0.70413697",
"0.70359266",
"0.7017494",
"0.70171213",
"0.70171213",
"0.70117474",
"0.6969118",
"0.69... | 0.0 | -1 |
Test if the get requests with an expired token returns a 401 status code. | def XLLW(YKHO, x0hE, WM7d, Weav):
assert x0hE.get('/partners/' + Weav, headers={'Authorization': 'Bearer ' + WM7d}).status == '401 UNAUTHORIZED' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lSb0(YKHO):\n eOtH = YKHO._create_token(scope='root:read', expires=fCoM(hours=-1))\n uDyx = YKHO.api_get('/api/', HTTP_AUTHORIZATION='Bearer %s' % eOtH.token, expected_status=wOKl.http_status)\n YKHO.assertIn('stat', uDyx)\n YKHO.assertEqual(uDyx['stat'], 'fail')\n YKHO.assertIn('err', uDyx)\n ... | [
"0.80261207",
"0.7319696",
"0.728525",
"0.7165733",
"0.7110327",
"0.71084017",
"0.70725614",
"0.70174235",
"0.696197",
"0.6959957",
"0.6959957",
"0.69526833",
"0.689933",
"0.68827504",
"0.68635774",
"0.68584424",
"0.6854652",
"0.6854331",
"0.68537694",
"0.68259835",
"0.682598... | 0.0 | -1 |
Test if the partner api returns the expected http statuscode when putting without an authorization token. | def oyDX(YKHO, x0hE, Weav):
assert x0hE.put('/partners/' + Weav, headers={}, data={'firstname': 'Daisy', 'lastname': 'Ducks', 'email': 'daisy@tolli.com'}).status == '400 BAD REQUEST' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ObU7(YKHO):\n Ylbp = YKHO.client.put('/api/v1/users/rides/1/requests/1', data=qQXR.dumps(dict(status=0)), content_type='application/json', headers={'token': ''})\n nPrm = qQXR.loads(Ylbp.data.decode())\n YKHO.assertEqual(Ylbp.status_code, 401)\n YKHO.assertEqual(nPrm.get('message'), 'Token is missi... | [
"0.7518829",
"0.7367226",
"0.7367226",
"0.7367226",
"0.7221795",
"0.70471084",
"0.7042088",
"0.70216566",
"0.6998054",
"0.69912636",
"0.69562316",
"0.6941653",
"0.69126606",
"0.69064033",
"0.68787694",
"0.6878299",
"0.68754476",
"0.6852035",
"0.6848022",
"0.6840304",
"0.68294... | 0.0 | -1 |
Test if the partner api returns the expected http statuscode when putting without parameters. | def yfSB(YKHO, x0hE, eOtH, Weav):
assert x0hE.put('/partners/' + Weav, headers={'Authorization': 'Bearer ' + eOtH}, data={}).status == '400 BAD REQUEST' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ieOq(YKHO):\n assert YKHO.response.status_code == 201",
"def oOqK(YKHO):\n O0Fa = {**YKHO.REQUIRED_GAME, **YKHO.INVALID_CODE}\n NArs = {}\n geh0 = YKHO.client.post(YKHO.URL, NArs)\n YKHO.assertEqual(geh0.data, O0Fa)\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_400_BAD_REQUEST)",
"def Z5... | [
"0.69975317",
"0.69623786",
"0.6905758",
"0.68993884",
"0.68926203",
"0.68795556",
"0.68671715",
"0.6859082",
"0.6837591",
"0.68258303",
"0.6825572",
"0.6806711",
"0.6797854",
"0.6764779",
"0.6707019",
"0.6685502",
"0.6685502",
"0.66765517",
"0.6671786",
"0.667176",
"0.667176... | 0.0 | -1 |
Test if the partner api returns the expected http statuscode when putting with wrong parameters. | def MBEc(YKHO, x0hE, eOtH, Weav):
assert x0hE.put('/partners/' + Weav, headers={'Authorization': 'Bearer ' + eOtH}, data={'google_id': 'Daisy', 'lastname': 'Ducks', 'email': 'daisy@tolli.com'}).status == '400 BAD REQUEST' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def knUd(YKHO, NKcE):\n nPrm = {'message': 'Test Message', 'code': 202}\n YKHO._register_uri(NKcE, data=nPrm, status=200)\n geh0 = lGIF(YKHO.client, NKcE).call(YKHO.test_endpoint)\n YKHO.assertEqual(geh0['code'], 202)",
"def ieOq(YKHO):\n assert YKHO.response.status_code == 201",
"def Z5ZI(YKHO)... | [
"0.71227515",
"0.7074663",
"0.7054207",
"0.70317864",
"0.6993102",
"0.6957086",
"0.69026893",
"0.68593526",
"0.685369",
"0.6851031",
"0.6824596",
"0.68234444",
"0.6775842",
"0.6772738",
"0.67559606",
"0.675519",
"0.67332995",
"0.6722112",
"0.6716736",
"0.6709306",
"0.6708853"... | 0.0 | -1 |
Test if the put requests with an expired token returns a 401 status code. | def b_Eb(YKHO, x0hE, WM7d, Weav):
assert x0hE.put('/partners/' + Weav, headers={'Authorization': 'Bearer ' + WM7d}, data={'firstname': 'Daisy', 'lastname': 'Ducks', 'email': 'daisy' + str(qxeD.uuid4()) + '@tolli.com'}).status == '401 UNAUTHORIZED' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eRk1(YKHO):\n geh0 = YKHO.client.patch(YKHO.url)\n YKHO.assertEqual(geh0.status_code, 401)",
"def eRk1(YKHO):\n geh0 = YKHO.client.patch(YKHO.url)\n YKHO.assertEqual(geh0.status_code, 401)",
"def eRk1(YKHO):\n geh0 = YKHO.client.patch(YKHO.url)\n YKHO.assertEqual(geh0.status_code, 401)",
... | [
"0.71794075",
"0.71794075",
"0.71794075",
"0.6943819",
"0.67926097",
"0.66951495",
"0.668946",
"0.6672181",
"0.6645519",
"0.66293263",
"0.66028845",
"0.6602229",
"0.65524447",
"0.65488285",
"0.65395665",
"0.6485847",
"0.6480604",
"0.6478087",
"0.6387501",
"0.6381861",
"0.6368... | 0.0 | -1 |
Test if the partner api returns the expected http statuscode when deleting without an authorization token. | def YNfZ(YKHO, x0hE, Weav):
assert x0hE.delete('/partners/' + Weav, headers={}).status == '400 BAD REQUEST' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ffbb(YKHO):\n geh0 = YKHO.app.test_client().get('/regression/test/9432/delete')\n YKHO.assertEqual(geh0.status_code, 500)",
"def nZxR(YKHO):\n geh0 = YKHO.app.delete('/api/v1/products/2', content_type='application/json', headers={'x-access-token': 'token_is_wrong'})\n YKHO.assertEqual(geh0.status... | [
"0.7716242",
"0.7467711",
"0.7393254",
"0.7196994",
"0.7167381",
"0.71486485",
"0.7148071",
"0.7132059",
"0.7097127",
"0.7094182",
"0.70823926",
"0.7062201",
"0.7060389",
"0.703816",
"0.7036397",
"0.70245963",
"0.70149446",
"0.6959696",
"0.69544166",
"0.6942289",
"0.69389933"... | 0.0 | -1 |
Test if the put requests with an expired token returns a 401 status code. | def T8jn(YKHO, x0hE, WM7d, Weav):
assert x0hE.delete('/partners/' + Weav, headers={'Authorization': 'Bearer ' + WM7d}).status == '401 UNAUTHORIZED' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eRk1(YKHO):\n geh0 = YKHO.client.patch(YKHO.url)\n YKHO.assertEqual(geh0.status_code, 401)",
"def eRk1(YKHO):\n geh0 = YKHO.client.patch(YKHO.url)\n YKHO.assertEqual(geh0.status_code, 401)",
"def eRk1(YKHO):\n geh0 = YKHO.client.patch(YKHO.url)\n YKHO.assertEqual(geh0.status_code, 401)",
... | [
"0.7179058",
"0.7179058",
"0.7179058",
"0.6944284",
"0.67918545",
"0.6694078",
"0.66892177",
"0.6672956",
"0.6644538",
"0.662851",
"0.6602345",
"0.6601991",
"0.6552387",
"0.6548354",
"0.65409386",
"0.6485633",
"0.6479284",
"0.647675",
"0.63874483",
"0.63804597",
"0.63672376",... | 0.0 | -1 |
Test if the partner api returns the expected http statuscode when putting without an authorization token. | def oKxf(YKHO, x0hE, Weav):
assert x0hE.put('/partners/' + Weav + '/admin', headers={}).status == '400 BAD REQUEST' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ObU7(YKHO):\n Ylbp = YKHO.client.put('/api/v1/users/rides/1/requests/1', data=qQXR.dumps(dict(status=0)), content_type='application/json', headers={'token': ''})\n nPrm = qQXR.loads(Ylbp.data.decode())\n YKHO.assertEqual(Ylbp.status_code, 401)\n YKHO.assertEqual(nPrm.get('message'), 'Token is missi... | [
"0.7518829",
"0.7367226",
"0.7367226",
"0.7367226",
"0.7221795",
"0.70471084",
"0.7042088",
"0.70216566",
"0.6998054",
"0.69912636",
"0.69562316",
"0.6941653",
"0.69126606",
"0.69064033",
"0.68787694",
"0.6878299",
"0.68754476",
"0.6852035",
"0.6848022",
"0.6840304",
"0.68294... | 0.0 | -1 |
Test if the put requests with an expired token returns a 401 status code. | def SBlg(YKHO, x0hE, WM7d, Weav):
assert x0hE.put('/partners/' + Weav + '/admin', headers={'Authorization': 'Bearer ' + WM7d}).status == '401 UNAUTHORIZED' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eRk1(YKHO):\n geh0 = YKHO.client.patch(YKHO.url)\n YKHO.assertEqual(geh0.status_code, 401)",
"def eRk1(YKHO):\n geh0 = YKHO.client.patch(YKHO.url)\n YKHO.assertEqual(geh0.status_code, 401)",
"def eRk1(YKHO):\n geh0 = YKHO.client.patch(YKHO.url)\n YKHO.assertEqual(geh0.status_code, 401)",
... | [
"0.7179058",
"0.7179058",
"0.7179058",
"0.6944284",
"0.67918545",
"0.6694078",
"0.66892177",
"0.6672956",
"0.6644538",
"0.662851",
"0.6602345",
"0.6601991",
"0.6552387",
"0.6548354",
"0.65409386",
"0.6485633",
"0.6479284",
"0.647675",
"0.63874483",
"0.63804597",
"0.63672376",... | 0.0 | -1 |
Test if the partner api returns the expected http statuscode when putting without an ID. | def o4fH(YKHO, x0hE, eOtH):
assert x0hE.put('/partners/admin', headers={'Authorization': 'Bearer ' + eOtH}).status == '404 NOT FOUND' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jFLn(YKHO):\n with YKHO.client:\n geh0 = YKHO.client.put('/status/999')\n nPrm = qQXR.loads(geh0.data.decode())\n YKHO.assertEqual(geh0.status_code, 404)\n YKHO.assertIn('Status does not exist', nPrm['message'])\n YKHO.assertIn('fail', nPrm['status'])",
"def V_AQ(YKHO):\... | [
"0.74544674",
"0.74057186",
"0.7179636",
"0.7036689",
"0.7032407",
"0.6996562",
"0.699444",
"0.68764937",
"0.68485284",
"0.68434435",
"0.6837519",
"0.6820772",
"0.68201077",
"0.68066156",
"0.67726755",
"0.6756915",
"0.67389977",
"0.6710137",
"0.67062324",
"0.66719073",
"0.662... | 0.0 | -1 |
Test if the partner api returns the expected http statuscode when deleting without an authorization token. | def ZiNy(YKHO, x0hE, id):
assert x0hE.delete('/partners/' + id + '/admin', headers={}).status == '400 BAD REQUEST' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ffbb(YKHO):\n geh0 = YKHO.app.test_client().get('/regression/test/9432/delete')\n YKHO.assertEqual(geh0.status_code, 500)",
"def nZxR(YKHO):\n geh0 = YKHO.app.delete('/api/v1/products/2', content_type='application/json', headers={'x-access-token': 'token_is_wrong'})\n YKHO.assertEqual(geh0.status... | [
"0.77173144",
"0.74699336",
"0.73939866",
"0.7198141",
"0.716773",
"0.71503717",
"0.714937",
"0.7133238",
"0.70980245",
"0.70945495",
"0.708388",
"0.70631707",
"0.7061462",
"0.7039519",
"0.7038687",
"0.70257115",
"0.7016155",
"0.69612056",
"0.6955905",
"0.6943462",
"0.6939591... | 0.0 | -1 |
Test if the del requests with an expired token returns a 401 status code. | def _8Cy(YKHO, x0hE, WM7d, Weav):
assert x0hE.delete('/partners/' + Weav + '/admin', headers={'Authorization': 'Bearer ' + WM7d}).status == '401 UNAUTHORIZED' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lSb0(YKHO):\n eOtH = YKHO._create_token(scope='root:read', expires=fCoM(hours=-1))\n uDyx = YKHO.api_get('/api/', HTTP_AUTHORIZATION='Bearer %s' % eOtH.token, expected_status=wOKl.http_status)\n YKHO.assertIn('stat', uDyx)\n YKHO.assertEqual(uDyx['stat'], 'fail')\n YKHO.assertIn('err', uDyx)\n ... | [
"0.72238797",
"0.7056701",
"0.70029294",
"0.6908537",
"0.6890139",
"0.68526673",
"0.67929476",
"0.67895",
"0.67895",
"0.6727536",
"0.6722892",
"0.67143375",
"0.66908026",
"0.66703767",
"0.66550785",
"0.6629204",
"0.66256416",
"0.662291",
"0.6620088",
"0.6576244",
"0.65569586"... | 0.0 | -1 |
Test if the partner api returns the expected http statuscode when posting. | def GTCi(YKHO, x0hE, eOtH, id):
assert x0hE.delete('/partners/' + id, headers={'Authorization': 'Bearer ' + eOtH}).status == '200 OK'
assert x0hE.put('/partners/' + id, headers={'Authorization': 'Bearer ' + eOtH}, data={'firstname': 'Daisy', 'lastname': 'Ducks', 'email': 'daisy@tolli.com'}).status == '400 BAD R... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ieOq(YKHO):\n assert YKHO.response.status_code == 201",
"def j1x8(_hkX):\n return _hkX.status_code == 200",
"def AWhd(YKHO):\n YKHO.assertEqual(YKHO.resp.status_code, 200)",
"def Nje3(YKHO, nPrm, DnVF=jGRS.HTTP_204_NO_CONTENT):\n geh0 = YKHO.client.post(YKHO.url, qQXR.dumps(nPrm), **YKHO.head... | [
"0.7476945",
"0.7343417",
"0.73091066",
"0.72973895",
"0.72973895",
"0.72402996",
"0.72145414",
"0.7134055",
"0.7134055",
"0.7119397",
"0.70697474",
"0.70494545",
"0.70494545",
"0.70401734",
"0.70330733",
"0.70157427",
"0.7015531",
"0.7015531",
"0.7008824",
"0.69679385",
"0.6... | 0.0 | -1 |
Tests that correct routes don't raise errors. | def Wntq(YKHO):
for NdIm in range(len(YKHO.correct_routes)):
with YKHO.subTest(run=NdIm):
z_n9.helpers.parse_route(YKHO.correct_routes[NdIm]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pbUd(YKHO):\n J1b4 = YKHO.app.get('/api/v1/x')\n CYjz = YKHO.app.get('/x')\n bpa0 = YKHO.app.get('/login/x')\n YKHO.assertEqual(J1b4.status_code, 404)\n YKHO.assertEqual(CYjz.status_code, 404)\n YKHO.assertEqual(bpa0.status_code, 404)",
"def _7jB(SYJH):\n with trZe.raises(iAwL.RouteError... | [
"0.7925735",
"0.7887383",
"0.769628",
"0.7572528",
"0.7452677",
"0.7373032",
"0.7263232",
"0.7246088",
"0.72153246",
"0.71383554",
"0.71354604",
"0.7052424",
"0.69548374",
"0.6954131",
"0.68758833",
"0.6827452",
"0.6814157",
"0.6810131",
"0.6790719",
"0.67625254",
"0.67463857... | 0.696884 | 12 |
Tests that an error isn't raised when the correct token is given. | def vm86(YKHO):
z_n9.helpers.authenticate(body={YKHO.client_token_name: YKHO.token}, auth_token=True, client_token_name=z_n9.constants.API_CLIENT_TOKEN_NAME, server_token_name=z_n9.constants.API_SERVER_TOKEN_NAME) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k8v5(YKHO, w2fL, Th4D):\n if w2fL is not Th4D:\n YKHO._raise_exception(\"Read token '{}' instead of expected '{}'\".format(w2fL, Th4D))",
"def rZuV(eOtH):\n aEqx = TmCH()['parsing']['expected_token_types']\n if eOtH.ty not in aEqx:\n raise K2Kn('Invalid token.' + 'Expected a token of t... | [
"0.79174423",
"0.7600244",
"0.73931146",
"0.7388866",
"0.7303362",
"0.723666",
"0.7201655",
"0.7072736",
"0.7027201",
"0.6999468",
"0.6928655",
"0.69284254",
"0.69068563",
"0.68940604",
"0.6879699",
"0.6874198",
"0.6863304",
"0.67830557",
"0.67830557",
"0.6779701",
"0.6756766... | 0.0 | -1 |
Tests that an error is raised when the token is not given. | def S59m(YKHO):
with YKHO.assertRaises(z_n9.errors.AuthenticationRequiredError):
z_n9.helpers.authenticate(body={YKHO.client_token_name: YKHO.incorrect_token}, auth_token=True, client_token_name=z_n9.constants.API_CLIENT_TOKEN_NAME, server_token_name=z_n9.constants.API_SERVER_TOKEN_NAME) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ceH_(YKHO):\n YKHO.assertRaises(RuntimeError, KiBn, '', 'deadbeaf')",
"def k8v5(YKHO, w2fL, Th4D):\n if w2fL is not Th4D:\n YKHO._raise_exception(\"Read token '{}' instead of expected '{}'\".format(w2fL, Th4D))",
"def VWNR():\n nNXP.abort(aazL.HTTP_404)",
"def T3fu(YKHO):\n eOtH = 'nim... | [
"0.7727259",
"0.7548503",
"0.74473894",
"0.7374784",
"0.7307768",
"0.7290018",
"0.72037345",
"0.71136737",
"0.7054937",
"0.7045589",
"0.7045508",
"0.7038154",
"0.700317",
"0.69882065",
"0.69468445",
"0.6946391",
"0.6945732",
"0.69417334",
"0.6936872",
"0.69339997",
"0.6932217... | 0.7158567 | 7 |
Tests that an error is raised when an incorrect token is given. | def eaAc(YKHO):
with YKHO.assertRaises(z_n9.errors.AuthenticationRequiredError):
z_n9.helpers.authenticate(body={}, auth_token=True, client_token_name=z_n9.constants.API_CLIENT_TOKEN_NAME, server_token_name=z_n9.constants.API_SERVER_TOKEN_NAME) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rZuV(eOtH):\n aEqx = TmCH()['parsing']['expected_token_types']\n if eOtH.ty not in aEqx:\n raise K2Kn('Invalid token.' + 'Expected a token of types ' + str(aEqx) + ' but got token ' + eOtH.value + ' of type ' + eOtH.ty + ' instead.', eOtH.file_context)",
"def k8v5(YKHO, w2fL, Th4D):\n if w2fL... | [
"0.7581585",
"0.75210285",
"0.7359018",
"0.7328746",
"0.7311756",
"0.72447443",
"0.7205987",
"0.7184527",
"0.71342427",
"0.71280277",
"0.71280277",
"0.70973974",
"0.7091193",
"0.70080066",
"0.6970553",
"0.6932889",
"0.691221",
"0.69119555",
"0.690709",
"0.6836612",
"0.6831443... | 0.68151903 | 22 |
Set up matplotlib's RC params for LaTeX plotting. Call this before plotting a figure. | def MjC7(Enm2=None, Focb=None, ZLJ_=1):
assert ZLJ_ in [1, 2]
if Enm2 is None:
Enm2 = 3.39 if ZLJ_ == 1 else 6.9
if Focb is None:
ZlbZ = (PZyS(5) - 1.0) / 2.0
Focb = Enm2 * ZlbZ
Tw9C = 8.0
if Focb > Tw9C:
print('WARNING: fig_height too large:' + Focb + 'so will reduce... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rM39():\n LaRT = True if RDuA.which('tex') else False\n I8kJ.pyplot.rc('text', usetex=LaRT)\n I8kJ.pyplot.rc('font', family='serif')\n I8kJ.rcParams['hatch.linewidth'] = 0.5",
"def YVgb():\n QrM1.rcParams.update({'figure.figsize': (12, 9)})\n QrM1.rcParams.update({'lines.linewidth': 2})\n ... | [
"0.78060657",
"0.741593",
"0.7396604",
"0.72293824",
"0.72101074",
"0.7192828",
"0.70560503",
"0.70560503",
"0.7021335",
"0.70150965",
"0.70046586",
"0.6957658",
"0.6888029",
"0.6777049",
"0.6760504",
"0.67516977",
"0.6711305",
"0.6707085",
"0.670245",
"0.6701227",
"0.6689119... | 0.0 | -1 |
Read sentences from file f. | def fAiv(eHNT):
Rhv4 = []
with open(eHNT) as apum:
for zFiD in apum:
if zFiD[0] in vIwR.digits:
Rhv4.append(zFiD[zFiD.index(' ') + 1:].strip())
return Rhv4 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def j_03():\n Rhv4 = []\n with open('solutions/day19/sentences.txt') as eHNT:\n for zFiD in eHNT:\n Rhv4.append(zFiD.strip())\n return Rhv4",
"def j_03(nUeQ):\n eHNT = open(nUeQ).read().strip()\n Rhv4 = eHNT.split('\\n\\n')\n return Rhv4",
"def j_03(YKHO, FYKK):\n\n def U... | [
"0.74798787",
"0.7414534",
"0.73274845",
"0.7182416",
"0.7091653",
"0.7090764",
"0.7030872",
"0.7026257",
"0.7014547",
"0.6980419",
"0.6892643",
"0.68352836",
"0.68041414",
"0.6781028",
"0.6740106",
"0.671664",
"0.66962457",
"0.66952145",
"0.664085",
"0.66403735",
"0.6635166"... | 0.7198099 | 3 |
Function to take a list of encoded sequences and turn them into a batch | def QxcP(Emd4, ezWE):
BcCR = max([len(Q6uT) for Q6uT in ezWE])
SPca = iQnE(ht2j.zeros(len(ezWE), BcCR)).long() + BjAR
for YRbF, Q6uT in enumerate(ezWE):
SPca[YRbF, :len(Q6uT)] = Q6uT
return SPca | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EcLt(YKHO, jWe2: Union[List[int], List[List[int]], 'np.ndarray', 'torch.Tensor', 'tf.Tensor'], XX6P: bool=False, KtmZ: bool=None, **B2fa) -> x1iM[str]:\n return [YKHO.decode(Q6uT, skip_special_tokens=XX6P, clean_up_tokenization_spaces=KtmZ, **B2fa) for Q6uT in jWe2]",
"def NGP3(o9Hv, ZGum=k7XL):\n x6A0... | [
"0.73598707",
"0.69283706",
"0.69278646",
"0.68305445",
"0.66951936",
"0.66788036",
"0.6628934",
"0.6541094",
"0.65408635",
"0.65360916",
"0.6529075",
"0.64694494",
"0.6421543",
"0.63902396",
"0.6383066",
"0.6363353",
"0.63585013",
"0.6344937",
"0.63231075",
"0.63198334",
"0.... | 0.0 | -1 |
Return a shallow dictionary representation of this instance for easy kwargs unpacking. | def dict(YKHO):
return {G1Hx: getattr(YKHO, G1Hx) for G1Hx in YKHO.__slots__} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dict(YKHO) -> dict:\n return YKHO.__dict__()",
"def Is7w(YKHO) -> cuzp[str, ImMB]:\n return YKHO.dict()",
"def Napc(YKHO):\n return dict(YKHO.__dict__)",
"def _fYl(YKHO):\n return YKHO.dict(exclude_unset=True, exclude_defaults=True)",
"def _fYl(YKHO):\n return dict([(G1Hx, Ty9i) for G1Hx... | [
"0.7664569",
"0.75566864",
"0.755098",
"0.7544326",
"0.7408049",
"0.74064",
"0.74064",
"0.74064",
"0.74064",
"0.74064",
"0.74064",
"0.74064",
"0.74064",
"0.74064",
"0.74064",
"0.74055237",
"0.74055237",
"0.74055237",
"0.7364376",
"0.7355492",
"0.7353533",
"0.7353533",
"0.... | 0.0 | -1 |
Spawn new aliens for each game round, starting with 4 at the start of the game, then 2 for each subsequent game round | def T2rN(YKHO):
if YKHO.game_start == True:
ECpu = 4
YKHO.game_start = False
else:
ECpu = 2
for oeTy in range(ECpu):
oeTy = fHeP.Alien()
YKHO.aliens.append(oeTy)
K1Zo.spawn_alien(YKHO.game_board, oeTy)
YKHO._check_square(oeTy) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def okWT(tJm0, Vjhr, r8Pe, SaI9, Mi_s):\n oeTy = afmj(tJm0, Vjhr)\n lrIf = oeTy.rect.width\n oeTy.x = lrIf + 2 * lrIf * r8Pe\n oeTy.rect.x = oeTy.x\n oeTy.rect.y = oeTy.rect.height + 2 * oeTy.rect.height * Mi_s\n SaI9.add(oeTy)",
"def znsc(YqMg, SaI9, Vjhr, r8Pe, lrIf, Mi_s):\n oeTy = afmj(Y... | [
"0.6795148",
"0.6673576",
"0.6670341",
"0.66533947",
"0.65861547",
"0.6560199",
"0.6532841",
"0.6496934",
"0.6467007",
"0.6408493",
"0.64070565",
"0.6400308",
"0.63932616",
"0.6384806",
"0.6350443",
"0.63503313",
"0.63384736",
"0.63384736",
"0.63384736",
"0.63357997",
"0.6333... | 0.8115264 | 0 |
Update the alien and marine status using the outcome of the alien attack roll which is then put into the aliens attack table to get a status outcome. Format is (marine, alien) for status | def FvgJ(YKHO, VV9V, oeTy):
gBjs = YKHO.alien_attack_roll(VV9V, oeTy)
VV9V.status = gBjs[0]
oeTy.status = gBjs[1]
return (VV9V.status, oeTy.status, gBjs) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def u4Wf(YKHO, oeTy, VV9V):\n print('Checking determine outcome')\n if VV9V.status == 'killed':\n YKHO.marines.remove(VV9V)\n oeTy.status = 'normal'\n if oeTy.status == 'stunned':\n 'Move alien to nearest adjacent square, it loses a turn\\n\\t\\t\\tUncomment print() to check alien coo... | [
"0.63064724",
"0.57209635",
"0.5699896",
"0.5509634",
"0.55035496",
"0.5490855",
"0.5460077",
"0.54397035",
"0.5429056",
"0.54226387",
"0.5404291",
"0.5393004",
"0.537607",
"0.53592074",
"0.53479826",
"0.53437984",
"0.5343109",
"0.5340993",
"0.53315127",
"0.5305632",
"0.53008... | 0.8253741 | 0 |
Compute the slope of the line between two points (x1, y1) and (x2, y2) | def wJCt(YKHO, o4D3, si3g, ajwV, skBL):
if ajwV - o4D3 > 0:
return (skBL - si3g) * YKHO.inverse(ajwV - o4D3)
else:
if o4D3 == ajwV:
pass
return (si3g - skBL) * YKHO.inverse(o4D3 - ajwV) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VMex(o4D3, si3g, ajwV, skBL):\n return (skBL - si3g) / (ajwV - o4D3)",
"def SY6o(YKHO, o4D3, si3g, ajwV, skBL):\n return (si3g - skBL) / (ajwV - o4D3)",
"def VMex(o4D3, si3g, ajwV, skBL):\n return (skBL - si3g) / (ajwV - o4D3)",
"def VMex(o4D3, si3g, ajwV, skBL):\n return (skBL - si3g) / (ajw... | [
"0.8940426",
"0.89337504",
"0.8890589",
"0.88897574",
"0.8838068",
"0.83622473",
"0.8323199",
"0.83216006",
"0.83188057",
"0.8109822",
"0.80916435",
"0.7961019",
"0.7959379",
"0.7957883",
"0.7957883",
"0.79347557",
"0.78893375",
"0.78646874",
"0.7862116",
"0.7848263",
"0.7848... | 0.0 | -1 |
Compute the slope (i.e. the tangent) at the point (x1, y1) | def JoYk(YKHO, WKvO, LVAh):
return (3 * WKvO * WKvO + YKHO.a) * YKHO.inverse(2 * LVAh) % YKHO.groupOrder | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VMex(o4D3, si3g, ajwV, skBL):\n return (skBL - si3g) / (ajwV - o4D3)",
"def VMex(o4D3, si3g, ajwV, skBL):\n return (skBL - si3g) / (ajwV - o4D3)",
"def VMex(o4D3, si3g, ajwV, skBL):\n return (skBL - si3g) / (ajwV - o4D3)",
"def SY6o(YKHO, o4D3, si3g, ajwV, skBL):\n return (si3g - skBL) / (ajw... | [
"0.87031865",
"0.8701757",
"0.8671546",
"0.86438453",
"0.84755266",
"0.84433067",
"0.83337533",
"0.80058396",
"0.79484123",
"0.7946823",
"0.78496575",
"0.7836187",
"0.78079545",
"0.7777842",
"0.772144",
"0.77125406",
"0.76650506",
"0.7645824",
"0.7530099",
"0.75214326",
"0.75... | 0.0 | -1 |
This function is used to get the first x distances from the items list and labels from the labels list. | def W0fe(YKHO, WKvO: int):
if WKvO >= len(YKHO.items) or WKvO < 0:
raise IndexError
return (YKHO.items[0:WKvO], YKHO.labels[0:WKvO]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KLpe(Crrw, eFr6, d6pt):\n r8hN = len(Crrw)\n he6J = []\n for YRbF in range(r8hN - 1):\n G1Hx = d6pt[Crrw[YRbF]]\n for r845 in range(YRbF + 1, r8hN):\n a1PO = d6pt[Crrw[r845]]\n he6J.append(eFr6[G1Hx, a1PO])\n return he6J",
"def Te1x(YKHO):\n YKHO.labels = Ay... | [
"0.5955804",
"0.59398496",
"0.5850777",
"0.5835303",
"0.5824465",
"0.57543075",
"0.57424176",
"0.5705538",
"0.56568575",
"0.562529",
"0.55918866",
"0.55708575",
"0.5540562",
"0.55332804",
"0.54872453",
"0.5476798",
"0.5436605",
"0.5423768",
"0.54218745",
"0.538633",
"0.538420... | 0.494954 | 69 |
Decorator for logging function execution. By default, target function execution is logged with DEBUG level. | def OfAT(bo34, ABDL=G9jH.DEBUG):
def xv2J(JfyU):
@xBlr.wraps(JfyU)
def Zc4f(*qIxc, **YSA3):
G3UR = '[args=%s, kw=%s]' % (str(qIxc), str(YSA3)) if qIxc or YSA3 else ''
_nJi = "Called method [name=%s, doc='%s', params=%s]" % (JfyU.__name__, JfyU.__doc__, G3UR)
bo3... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s8u2(JfyU):\n\n @xBlr.wraps(JfyU)\n def eVKY(*qIxc, **B2fa):\n if GPtr.function_debug:\n ImYH = tq_1.signature(JfyU).bind(*qIxc, **B2fa)\n ImYH.apply_defaults()\n zKH4 = ['Calling {} with arguments:'.format(JfyU.__name__)]\n for H5ew, BWXx in ImYH.argume... | [
"0.73831475",
"0.7332926",
"0.7287201",
"0.7203809",
"0.7201551",
"0.7139948",
"0.7078387",
"0.7046857",
"0.70291746",
"0.70157146",
"0.6984412",
"0.6912791",
"0.6907479",
"0.688044",
"0.6850994",
"0.68090785",
"0.6785294",
"0.6778222",
"0.6771523",
"0.6769868",
"0.6767808",
... | 0.69039154 | 13 |
Merges two dictionaries. Values of right dictionary recursively get merged into left dictionary. | def roQF(LFlW, _tIi, f2Tp=True):
if LFlW is None:
return _tIi
if _tIi is None:
return LFlW
for G1Hx, Ty9i in _tIi.items():
if G1Hx not in LFlW:
LFlW[G1Hx] = Ty9i
else:
mOep = LFlW[G1Hx]
if isinstance(mOep, dict) and isinstance(Ty9i, dict):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k1Ji(LFlW: t.Dict[str, t.Any], _tIi: t.Dict[str, t.Any]) -> a1PO.Dict[str, a1PO.Any]:\n for H5ew, BWXx in LFlW.items():\n if H5ew in _tIi:\n if isinstance(BWXx, g760.abc.Mapping) and isinstance(_tIi[H5ew], g760.abc.Mapping):\n _tIi[H5ew] = k1Ji(BWXx, _tIi[H5ew])\n XIcQ = ... | [
"0.8714589",
"0.87051797",
"0.8607368",
"0.8520377",
"0.842658",
"0.8254778",
"0.8049725",
"0.8035913",
"0.79862833",
"0.7954718",
"0.78832316",
"0.78662795",
"0.7838419",
"0.7829384",
"0.7815115",
"0.7805709",
"0.7787223",
"0.77513015",
"0.7747301",
"0.7737747",
"0.77296233"... | 0.8334195 | 5 |
Updates left dict with content from right dict | def LpmY(LFlW, _tIi):
if LFlW is None:
return _tIi
if _tIi is None:
return LFlW
LFlW.update(_tIi)
return LFlW | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MXAX(M4Uv, EYU0):\n for G1Hx, Ty9i in M4Uv.items():\n if isinstance(Ty9i, dict):\n EYU0[G1Hx] = MXAX(Ty9i, EYU0[G1Hx])\n else:\n EYU0[G1Hx] = Ty9i\n return EYU0",
"def yQxF(WKvO, LVAh):\n epBp = WKvO.copy()\n epBp.update(LVAh)\n return epBp",
"def vGZu(LFl... | [
"0.7438912",
"0.73359114",
"0.7314811",
"0.72861016",
"0.7245156",
"0.7230003",
"0.72003895",
"0.7188821",
"0.71877015",
"0.7100463",
"0.7100463",
"0.7100463",
"0.7100463",
"0.7100463",
"0.7100463",
"0.7100463",
"0.7100463",
"0.7100463",
"0.7100463",
"0.7100463",
"0.7100463",... | 0.7894465 | 0 |
Generator over all subclasses of a given class in depth first order. | def QwZf(Emd4, LwWV=None):
if not isinstance(Emd4, type):
raise TypeError('iter_subclasses must be called with new-style class, not %.100r' % Emd4)
LwWV = LwWV or set()
try:
zbDt = Emd4.__subclasses__()
except TypeError:
zbDt = Emd4.__subclasses__(Emd4)
for finE in zbDt:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vCuQ(Emd4):\n for dm7U in Emd4.__subclasses__():\n yield from dm7U.__recursive_subclasses__()\n yield dm7U",
"def K2nW(Emd4):\n yield Emd4\n for qWQn in Emd4.__subclasses__():\n yield from K2nW(qWQn)",
"def QwZf(Emd4):\n for WKvO in Emd4.__subclasses__():\n yield WKv... | [
"0.84631586",
"0.82930124",
"0.8150372",
"0.8114904",
"0.8067051",
"0.7999353",
"0.79709554",
"0.79599804",
"0.79599804",
"0.79599804",
"0.79225445",
"0.79157394",
"0.7798472",
"0.7657027",
"0.7636084",
"0.7590188",
"0.75381577",
"0.74242187",
"0.74065566",
"0.7365103",
"0.73... | 0.7550156 | 16 |
Transforms a list of entries into dictionary. | def KMx3(VECZ):
Aofo = {}
for tTpl in VECZ:
if isinstance(tTpl, dict):
Aofo.update(tTpl)
else:
Aofo[tTpl] = sHTo
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BOen(YKHO, IqQl):\n m4Nl = {}\n for ZfUD in IqQl:\n m4Nl[ZfUD[0]] = ZfUD[1]\n return m4Nl",
"def js81(vC9B):\n return {G1Hx: Ty9i for Ty9i, G1Hx in vC9B}",
"def BOen(vC9B, dln7, rAxx):\n return {ATUZ[dln7]: ATUZ[rAxx] for ATUZ in vC9B}",
"def Y_Bi(aPd6, BWXx=None):\n return dict(... | [
"0.74493855",
"0.7195584",
"0.6983266",
"0.698089",
"0.6789471",
"0.67834693",
"0.67651474",
"0.6682894",
"0.66681826",
"0.66220254",
"0.65894115",
"0.6478271",
"0.6444153",
"0.6439167",
"0.643546",
"0.6401278",
"0.63903373",
"0.63481146",
"0.63446546",
"0.6344232",
"0.628855... | 0.6413725 | 15 |
Converts datetime value to string. If the given value is not an instance of datetime then the method returns the same value. | def hLAQ(wEf2, VWe_=' '):
if isinstance(wEf2, qcWV.datetime):
return wEf2.isoformat(VWe_)
return wEf2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CZBi(YKHO, BWXx: datetime.datetime) -> str:\n if BWXx is not None:\n return _hMQ.to_http_datetime(BWXx)",
"def ab7L(Ty9i):\n if isinstance(Ty9i, qcWV):\n return Ty9i.strftime('%Y-%m-%dT%H:%M:%S')\n return Ty9i",
"def qO0_(YKHO, Emd4, BWXx):\n return BWXx.isoformat()",
"def hLAQ(... | [
"0.8358491",
"0.77217793",
"0.7539177",
"0.737999",
"0.73668176",
"0.7351742",
"0.72738785",
"0.72223496",
"0.7191843",
"0.7174487",
"0.71744376",
"0.7164358",
"0.7162787",
"0.7040131",
"0.6995782",
"0.6987638",
"0.698252",
"0.697887",
"0.6959664",
"0.6927903",
"0.69064665",
... | 0.7211354 | 8 |
Converts datetime value in te given dict to string. | def mM7Y(Csk6, H5ew, VWe_=' '):
wEf2 = Csk6.get(H5ew)
if wEf2 is not None:
Csk6[H5ew] = hLAQ(Csk6[H5ew], sep=VWe_) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _RwM(Csk6: Dict):\n Ylbp = _qLf(Csk6)\n for Z9rn in Ylbp:\n if isinstance(Ylbp[Z9rn], qcWV):\n Ylbp[Z9rn] = qcWV.isoformat(Ylbp[Z9rn])\n return Ylbp",
"def ab7L(Ty9i):\n if isinstance(Ty9i, qcWV):\n return Ty9i.strftime('%Y-%m-%dT%H:%M:%S')\n return Ty9i",
"def zXI3(... | [
"0.8227084",
"0.7170025",
"0.7074039",
"0.70156944",
"0.68982345",
"0.6773127",
"0.6699005",
"0.66941047",
"0.66622776",
"0.66300684",
"0.65691316",
"0.6521833",
"0.65150934",
"0.64842063",
"0.6473954",
"0.64443547",
"0.6440623",
"0.64385873",
"0.64068943",
"0.6371756",
"0.63... | 0.7220612 | 1 |
Obtains the Access Token from the Authorization Header | def bIrX():
Jpbe = QePW.headers.get('Authorization', None)
if not Jpbe:
raise yHM3({'code': 'authorization_header_missing', 'description': 'Authorization header is expected'}, 401)
SQ3m = Jpbe.split()
if SQ3m[0].lower() != 'bearer':
raise yHM3({'code': 'invalid_header', 'description': 'A... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def O0Oo(Emd4, qv1X):\n WBPg = qv1X.META.get('HTTP_AUTHORIZATION').split()\n eOtH = WBPg[1]\n KkxT = IHrB(eOtH)\n return KkxT",
"def xMII(QePW):\n eOtH = None\n FM0n = QePW.getHeader(b'Authorization')\n if FM0n is not None and FM0n.startswith(b'Bearer '):\n eOtH = FM0n[7:]\n if b'a... | [
"0.77760035",
"0.768424",
"0.76341456",
"0.760732",
"0.75845176",
"0.75845176",
"0.7572779",
"0.75405395",
"0.7536629",
"0.751796",
"0.75157416",
"0.747884",
"0.7464015",
"0.7424793",
"0.7417416",
"0.74118054",
"0.7406532",
"0.73976284",
"0.73866445",
"0.7379636",
"0.7367603"... | 0.74466765 | 13 |
Initialize the NameNotFound Exception. | def FIMM(YKHO, Ol8d, mWFP, q86I, *qIxc):
YKHO.message = Ol8d
YKHO.name = mWFP
YKHO.list_of_stuff = q86I
super(bYTR, YKHO).__init__(Ol8d, mWFP, q86I, *qIxc) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Dl4W(Wxnj, mWFP, **B2fa):\n return yLBR(Wxnj, mWFP, **B2fa)",
"def lEym(YKHO):\n kyiJ = 'does_not_exist'\n PiQc = tD7t.joinpath(kyiJ)\n with YKHO.assertRaisesRegex(FileNotFoundError, kyiJ, msg=\"FileNotFoundError was not raised or doesn't contain a description\"):\n E9By.lib.Stm32pio(PiQc,... | [
"0.628638",
"0.6078549",
"0.6035668",
"0.586416",
"0.5854499",
"0.5848925",
"0.5824577",
"0.58236235",
"0.5759133",
"0.5759133",
"0.5759133",
"0.5759133",
"0.5744906",
"0.5694998",
"0.5680902",
"0.56806415",
"0.56693494",
"0.5646471",
"0.56175977",
"0.56079745",
"0.56056327",... | 0.60540223 | 2 |
Convert a pickle file to a json file. | def SnaM(eZ_W, hlel):
if not GkAb(eZ_W).exists():
k8wH.echo('Pickle file {} does not exist'.format(eZ_W))
return
with open(eZ_W, 'rb') as knAr:
Y4NL = t2lc.load(knAr)
with open(hlel, 'w') as _RR0:
qQXR.dump(Y4NL, _RR0, indent=4)
k8wH.echo('Wrote from {} to... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oD7C(YKHO, nUeQ: str):\n nPrm = qQXR.loads(YKHO.get_json())\n with open(nUeQ, 'w') as _RR0:\n qQXR.dump(nPrm, _RR0)",
"def oD7C(YKHO, nUeQ: str):\n nPrm = qQXR.loads(YKHO.get_json())\n with open(nUeQ, 'w') as _RR0:\n qQXR.dump(nPrm, _RR0)",
"def N1hG(eZ_W, hlel):\n if not GkAb(... | [
"0.69814944",
"0.69814944",
"0.69730234",
"0.69651157",
"0.6912024",
"0.6893454",
"0.68056995",
"0.67789674",
"0.6750497",
"0.6748049",
"0.67479575",
"0.67461497",
"0.6689023",
"0.6649836",
"0.6639373",
"0.66372716",
"0.6636301",
"0.66054046",
"0.659338",
"0.6591114",
"0.6588... | 0.80819905 | 0 |
Convert a pickle file to a json file. | def N1hG(eZ_W, hlel):
if not GkAb(eZ_W).exists():
k8wH.echo('JSON file {} does not exist'.format(eZ_W))
return
with open(eZ_W, 'rb') as wM3v:
Y4NL = qQXR.load(wM3v)
with open(hlel, 'wb') as _RR0:
t2lc.dump(Y4NL, _RR0, protocol=0)
k8wH.echo('Wrote from {} t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SnaM(eZ_W, hlel):\n if not GkAb(eZ_W).exists():\n k8wH.echo('Pickle file {} does not exist'.format(eZ_W))\n return\n with open(eZ_W, 'rb') as knAr:\n Y4NL = t2lc.load(knAr)\n with open(hlel, 'w') as _RR0:\n qQXR.dump(Y4NL, _RR0, indent=4)\n k8wH.echo('Wro... | [
"0.80821276",
"0.6981027",
"0.6981027",
"0.6964457",
"0.6911325",
"0.6893332",
"0.68057585",
"0.67785096",
"0.67494774",
"0.6747245",
"0.67465204",
"0.67442",
"0.6686959",
"0.66527045",
"0.66384625",
"0.6636528",
"0.66356426",
"0.6603765",
"0.6591271",
"0.6590287",
"0.6587373... | 0.6975478 | 3 |
Plot multiple images with markers in one figure. | def qWlt(Yw_3, OfOG=10, Gmep=None, xnlb=None, Hqti=None, VdXq=None):
if Gmep is None:
Gmep = int(Yw_3.shape[0] / OfOG) + 1
Hqti = bEbv(Hqti)
VdXq = bEbv(VdXq)
LZpg = QrM1.figure(figsize=(20, 36))
for YRbF in range(Yw_3.shape[0]):
LZpg.add_subplot(Gmep, OfOG, YRbF + 1)
QrM1.ax... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WjnR(Yw_3, x6A0):\n for YRbF in range(4):\n aNZO = QrM1.subplot(2, 2, YRbF + 1)\n EYAw(aNZO, Yw_3[YRbF][..., 0], x6A0[YRbF])\n QrM1.show()",
"def wz8M(YKHO, Tlen=None):\n if Tlen is None:\n LSWT('ERROR: list of images is empty')\n return\n for YRbF in range(Tlen.__len_... | [
"0.7299022",
"0.7196853",
"0.7165101",
"0.7143351",
"0.7105927",
"0.71044505",
"0.71044505",
"0.71044505",
"0.71044505",
"0.7064074",
"0.7048324",
"0.7036996",
"0.6978254",
"0.6973602",
"0.6939359",
"0.6889486",
"0.6882992",
"0.68815655",
"0.6877274",
"0.68750644",
"0.6852013... | 0.78844285 | 0 |
Returns all the prime factors of a positive integer | def uBVK(exwG):
Llmz = []
Csk6 = 2
while exwG > 1:
while exwG % Csk6 == 0:
Llmz.append(Csk6)
exwG /= Csk6
Csk6 = Csk6 + 1
return Llmz | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uBVK(exwG: int) -> list:\n ZgWQ = []\n while exwG % 2 == 0:\n ZgWQ.append(2)\n exwG = int(exwG / 2)\n for YRbF in range(3, int(epAf.sqrt(exwG)) + 1, 2):\n while exwG % YRbF == 0:\n ZgWQ.append(YRbF)\n exwG = int(exwG / YRbF)\n if exwG > 2:\n ZgWQ.ap... | [
"0.83452547",
"0.8214462",
"0.82080954",
"0.81878656",
"0.8185497",
"0.8158561",
"0.8142429",
"0.81405294",
"0.8118277",
"0.8115683",
"0.81155074",
"0.8100758",
"0.80989015",
"0.80978596",
"0.8088344",
"0.80619794",
"0.8061327",
"0.80597365",
"0.80575794",
"0.80520445",
"0.80... | 0.8061488 | 16 |
create a YAML file for testing | def FCbF(YKHO):
YKHO.filename = 'config.yaml'
with W5SF(open(YKHO.filename, 'wt')) as eHNT:
eHNT.write(YKHO.content())
PSrQ().add_to_root({}, replace=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hqlF(qIxc, gCuF):\n RbUd = Hy7s.path.join(gCuF.lammps_dir, 'examples')\n for QOe9, JXH8, tZi5 in AKgC(RbUd):\n PU1l = GKZ2(QOe9, JXH8, tZi5)\n if len(PU1l.testcases) > 0:\n PU1l.save_config()",
"def BNGj():\n with open('data/config.yaml', 'w') as Nu1S:\n for zFiD in X... | [
"0.7167925",
"0.7157266",
"0.7137646",
"0.7136391",
"0.7072181",
"0.6828021",
"0.6794556",
"0.67740285",
"0.6769713",
"0.6713668",
"0.661773",
"0.6507625",
"0.64908504",
"0.6480004",
"0.6479136",
"0.6478659",
"0.64726996",
"0.6472214",
"0.64690727",
"0.6452691",
"0.6427877",
... | 0.65029836 | 12 |
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(VXg0, YKHO).__init__(*qIxc, **c_sp)
if YKHO.header is None:
YKHO.header = kKAJ.msg.Header()
if YKHO.resources is None:
YKHO.resources = []
else:
YKHO.header = kKAJ.msg.Header()
YKHO.resources = ... | {
"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.8163331",
"0.7717334",
"0.7717334",
"0.7649744",
"0.7573215",
"0.75414646",
"0.7484271",
"0.74689704",
"0.74574524",
"0.7444216",
"0.7444215",
"0.74331963",
"0.74150974",
"0.74083173",
"0.7391518",
"0.73746645",
"0.7360718",
"0.7323206",
"0.7322305",
"0.7322305",
"0.732230... | 0.0 | -1 |
Returns a DataFrame with the rolling mean of some columns. | def JtYS(Emd4, jQ3Z, ZLJ_, FChg, exwG=0, Encw=3):
if isinstance(ZLJ_, str):
ZLJ_ = [ZLJ_]
if isinstance(FChg, str):
FChg = [FChg]
E2zf = ZLJ_ + FChg
if exwG > 0:
return jQ3Z[E2zf].groupby(FChg).rolling(min_periods=Encw, window=exwG).mean().reset_index(drop=True)[ZLJ_]
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VBBt(jQ3Z, KnxT):\n return rLdf.rolling_mean(jQ3Z, window=KnxT)",
"def dIlw(jQ3Z, WfCS, y0cW='m{window}wk_', KnxT=5, Encw=2):\n jQ3Z.sort(['Team', 'Season', 'Week'], inplace=True)\n for Z9rn in WfCS:\n Qg73 = y0cW.format(window=KnxT) + Z9rn\n jQ3Z[Qg73] = jQ3Z.groupby('Team')[Z9rn].app... | [
"0.72417283",
"0.7018751",
"0.69386005",
"0.68922126",
"0.6773523",
"0.67500633",
"0.6749871",
"0.6668858",
"0.66480696",
"0.6628668",
"0.65959984",
"0.6436705",
"0.63622326",
"0.63495046",
"0.6340722",
"0.63167256",
"0.6310631",
"0.6282845",
"0.6242194",
"0.62204623",
"0.620... | 0.6804982 | 4 |
Return true if the variable is odd. | def lMy_(BWXx: int) -> bool:
return BWXx % 2 == 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kYZq(YKHO):\n return YKHO.number % 2 == 1",
"def kYZq(BWXx):\n return BWXx % 2 == 1",
"def kYZq(WKvO):\n if WKvO % 2 != 0:\n return True\n return False",
"def XHAY(YKHO, BWXx):\n return BWXx % 2 == 1",
"def XHAY(WKvO):\n return WKvO % 2 != 0",
"def kYZq(WKvO):\n return WKv... | [
"0.8514286",
"0.8504993",
"0.84915173",
"0.8433705",
"0.83977824",
"0.83955646",
"0.8378103",
"0.832661",
"0.8267628",
"0.82015145",
"0.81664366",
"0.81479245",
"0.8140947",
"0.8093884",
"0.8057603",
"0.8051923",
"0.8029645",
"0.80020666",
"0.8001811",
"0.7993922",
"0.7991198... | 0.7871351 | 34 |
Return true if the variable is even. | def EVW3(BWXx: int) -> bool:
return BWXx % 2 == 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WOgS(FGW3):\n return bool(FGW3 % 2 == 0)",
"def Q5eN(YKHO, wEf2):\n if wEf2 % 2 == 0:\n return True\n else:\n return False",
"def ubP8(WKvO: int) -> bool:\n return WKvO % 2 == 0",
"def ubP8(WKvO):\n if WKvO % 2 == 0:\n return True\n return False",
"def ubP8(mLGw):... | [
"0.8670294",
"0.85823643",
"0.85698414",
"0.8539113",
"0.85206956",
"0.85206956",
"0.85172075",
"0.8515124",
"0.8513937",
"0.8513788",
"0.8508222",
"0.8508222",
"0.8498395",
"0.8498395",
"0.8498395",
"0.8498395",
"0.84880906",
"0.8487015",
"0.84467226",
"0.8420358",
"0.839738... | 0.81507325 | 28 |
Check if a variable is divisible by a number. | def nBIY(BWXx: int, mLGw: int) -> bool:
return BWXx % mLGw == 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bJ9I(BWXx, mLGw):\n return BWXx % mLGw == 0",
"def nBIY(BWXx, mLGw):\n return BWXx % mLGw == 0",
"def Tb_q(FGW3, aM8h):\n return FGW3 % aM8h == 0",
"def BhOo(mLGw: int, di96: int) -> bool:\n return mLGw % di96 == 0",
"def Tb_q(exwG: int, di96: int) -> bool:\n return exwG % di96 == 0",
... | [
"0.8446616",
"0.84040016",
"0.8380645",
"0.8331278",
"0.81821764",
"0.7951031",
"0.78079116",
"0.77921706",
"0.76751006",
"0.7612615",
"0.75111854",
"0.7510371",
"0.7482464",
"0.74618614",
"0.7430303",
"0.742222",
"0.74048203",
"0.740141",
"0.73957306",
"0.7388607",
"0.734676... | 0.8457894 | 0 |
Return true if the object is a float. | def Z6LN(BWXx: t.Any) -> bool:
return isinstance(BWXx, float) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wyNW(YEnM):\n return isinstance(YEnM, float)",
"def NLLz(YKHO, BWXx):\n try:\n float(BWXx)\n except ValueError:\n return False\n return True",
"def QpCZ(YKHO):\n return YKHO.memory_type in ['float', 'double']",
"def QpCZ(YKHO):\n return BtPp(YKHO.node)",
"def float(BWXx:... | [
"0.8848524",
"0.8642187",
"0.8523633",
"0.8458494",
"0.84419066",
"0.837703",
"0.83137673",
"0.8308576",
"0.8240758",
"0.81617",
"0.8125111",
"0.8119262",
"0.81106704",
"0.8100736",
"0.80911624",
"0.8063004",
"0.8063004",
"0.8063004",
"0.8063004",
"0.79683185",
"0.794638",
... | 0.82296157 | 9 |
Return true if the variable is a sequence. Sequences are variables that are iterable. | def jnOd(BWXx: t.Any) -> bool:
try:
len(BWXx)
BWXx.__getitem__
except Exception:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ysuw(WKvO):\n return isinstance(WKvO, g760.abc.Sequence)",
"def FDfP(YEnM):\n return isinstance(YEnM, g760.Iterable)",
"def FDfP(YEnM):\n return GfZ5(YEnM) and isinstance(YEnM, g760.Sequence)",
"def FDfP(wEf2: Any) -> bool:\n return isinstance(wEf2, (Qn3v, list, tuple))",
"def xvHC(BWXx):\n... | [
"0.807734",
"0.76543355",
"0.76479155",
"0.7642297",
"0.76187223",
"0.7509732",
"0.7428671",
"0.74099344",
"0.73971605",
"0.73971605",
"0.7396363",
"0.735418",
"0.7294563",
"0.7284393",
"0.7256814",
"0.72550446",
"0.7211662",
"0.6991865",
"0.6940057",
"0.6929591",
"0.6916875"... | 0.6768154 | 27 |
Returns the original imported name if present, or the name by which the object was exported already. | def xpqj(YKHO, VckX):
try:
return YKHO.nif_export.dict_names[VckX]
except KeyError:
return YKHO.get_unique_name(VckX) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Eub1(YKHO):\n if YKHO.file_path.endswith('.py'):\n return Hy7s.path.basename(YKHO.file_path).split('.')[0]\n else:\n return Hy7s.path.basename(YKHO.file_path)",
"def TrXu(YKHO) -> str:\n return YKHO._wrapped_type",
"def mWFP(YKHO):\n return YKHO.app.import_name",
"def mMBn(YKHO,... | [
"0.69971347",
"0.68903106",
"0.68337035",
"0.6438426",
"0.6397905",
"0.63909996",
"0.631587",
"0.62638795",
"0.6033864",
"0.59819776",
"0.59819776",
"0.59819776",
"0.59819776",
"0.59819776",
"0.59819776",
"0.59819776",
"0.59819776",
"0.59819776",
"0.59819776",
"0.59819776",
"... | 0.0 | -1 |
This is a decorator which enable CORS for the specified endpoint. | def Qogl(JfyU):
def h3Xc(*qIxc, **B2fa):
geh0.headers['Access-Control-Allow-Origin'] = '*'
geh0.headers['Access-Control-Allow-Methods'] = 'PUT, GET, POST, DELETE, OPTIONS'
geh0.headers['Access-Control-Allow-Headers'] = 'Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token'
r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k_e5(eHNT):\n\n @xBlr.wraps(eHNT)\n @_AvJ({'Access-Control-Allow-Origin': '*'})\n def SzLu(*qIxc, **B2fa):\n return eHNT(*qIxc, **B2fa)\n return SzLu",
"def Qogl(JfyU):\n\n def h3Xc(*qIxc, **B2fa):\n geh0.headers['Access-Control-Allow-Origin'] = 'http://localhost:3000'\n g... | [
"0.76831114",
"0.74288243",
"0.7323891",
"0.7104746",
"0.69812995",
"0.6913388",
"0.6869576",
"0.68523145",
"0.6722177",
"0.6706898",
"0.6698317",
"0.6674487",
"0.6674487",
"0.6674487",
"0.6674487",
"0.6631946",
"0.66290426",
"0.6617707",
"0.66104186",
"0.66104186",
"0.655834... | 0.75044274 | 1 |
Returns a copy of the LightCurve object. This method uses the `copy.deepcopy` function to ensure that all objects stored within the LightCurve are copied (e.g. time and flux). Returns | def jth9(YKHO):
return jth9.deepcopy(YKHO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jth9(YKHO):\n return J1ng(YKHO.diameter, YKHO.red.copy(), YKHO.green.copy(), YKHO.blue.copy(), YKHO.blacklight, YKHO.active)",
"def Z_ix(YKHO, mWFP):\n if mWFP not in YKHO.sources.keys():\n raise ValueError('Unknown transient name: %s' % mWFP)\n if YKHO.lightcurves is None:\n YKHO.ligh... | [
"0.75534296",
"0.64616174",
"0.6411319",
"0.6411319",
"0.63759315",
"0.6256136",
"0.62479043",
"0.6142924",
"0.6089897",
"0.6061548",
"0.60372317",
"0.59553695",
"0.59268343",
"0.5913931",
"0.58976144",
"0.58836484",
"0.58804584",
"0.58709663",
"0.5854619",
"0.58526164",
"0.5... | 0.0 | -1 |
A simple command to send gifs by keyword from giphy api | async def gif(OaeV, *qIxc):
if qIxc:
xDcj = ' '.join(qIxc)
d6pt = 0
if ' -' in xDcj:
try:
d6pt = int(xDcj.split(' -')[1])
except:
pass
xDcj = xDcj.split(' -')[0]
Y9lB = rVD6.Giphy() if SKI7 == '' else rVD6.Giphy(api_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def gif(YKHO, OaeV, *, TgwQ: typing.Optional[str]='thomas the tank engine'):\n s1JD = xf1Z(TgwQ)\n Q1PJ = ZOrr.Embed(colour=ZOrr.Colour.dark_red())\n Q1PJ.set_image(url=s1JD)\n await OaeV.send(embed=Q1PJ)",
"async def search(Ol8d, xDcj):\n Mkmy = await Xqgu.get('https://api.giphy.com/v1/gifs... | [
"0.7166664",
"0.71638465",
"0.7160646",
"0.7090316",
"0.681812",
"0.6707379",
"0.66385233",
"0.6586571",
"0.6513838",
"0.64961064",
"0.6286896",
"0.6217676",
"0.61782956",
"0.6161887",
"0.6110212",
"0.59731036",
"0.58919233",
"0.5847024",
"0.58213603",
"0.5756951",
"0.5756811... | 0.7413317 | 0 |
Shows stats and information about current guild. | async def guild(OaeV, *qIxc):
if OaeV.message.channel.is_private:
await JyK9.delete_message(OaeV.message)
return
Oa1e = OaeV.message.server
Bnkd = Oa1e.id
qsJ6 = [Oa1e.owner.name + '#' + Oa1e.owner.discriminator, Oa1e.owner.id]
zn0c = str(Oa1e.region)
ZRKA = str(len(Oa1e.members)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def guildinfo(YKHO, OaeV, *, lSCo: Union[int, str]=None):\n if lSCo is None:\n lSCo = OaeV.guild\n elif isinstance(lSCo, int):\n ycBG = YKHO.bot.get_guild(lSCo)\n if ycBG is not None:\n lSCo = ycBG\n elif isinstance(lSCo, str):\n ycBG = ZOrr.utils.get(YKHO.bot.... | [
"0.7696084",
"0.7532562",
"0.74610025",
"0.7273728",
"0.71851206",
"0.71410763",
"0.713877",
"0.70942914",
"0.7021352",
"0.69955117",
"0.6975804",
"0.69564956",
"0.6884441",
"0.6841181",
"0.6824387",
"0.682171",
"0.6795568",
"0.6793116",
"0.67824787",
"0.6772469",
"0.6749024"... | 0.74171454 | 3 |
Return device specific attributes. | def GWuV(YKHO):
return {'name': ueYb(YKHO._data, YKHO._device_id), 'identifiers': {(Sugg, Sph8(YKHO._data, YKHO._device_id))}, 'manufacturer': YhHo, 'model': YKHO._device.product_type, 'sw_version': YKHO._device.firmware_version, 'via_device': (Sugg, YKHO._data.wiserhub.system.name)} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UC7j(YKHO, **B2fa):\n wN9s = B2fa.get('device', None)\n laNn = './/device[@name=' + wN9s + ']'\n oaD6 = lAws.XmlGetElementsByTag(YKHO.LOGICAL_TOPOLOGY, laNn, allElements=True)\n Scip = oaD6.findall('attribute')\n ssxV = dict()\n for i_OE in Scip:\n EOK0 = i_OE.get('name')\n iZom... | [
"0.74106926",
"0.7394256",
"0.7343818",
"0.7298191",
"0.7252295",
"0.7238756",
"0.71793777",
"0.7172032",
"0.7164443",
"0.7148823",
"0.7148713",
"0.714538",
"0.7129106",
"0.709534",
"0.70936406",
"0.7073589",
"0.70714945",
"0.7055427",
"0.7055313",
"0.70371765",
"0.70325017",... | 0.0 | -1 |
Return device specific attributes. | def GWuV(YKHO):
return {'name': ueYb(YKHO._data, 0), 'identifiers': {(Sugg, Sph8(YKHO._data, 0))}, 'manufacturer': YhHo, 'model': YKHO._data.wiserhub.system.product_type, 'sw_version': YKHO._data.wiserhub.system.firmware_version, 'via_device': (Sugg, YKHO._data.wiserhub.system.name)} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UC7j(YKHO, **B2fa):\n wN9s = B2fa.get('device', None)\n laNn = './/device[@name=' + wN9s + ']'\n oaD6 = lAws.XmlGetElementsByTag(YKHO.LOGICAL_TOPOLOGY, laNn, allElements=True)\n Scip = oaD6.findall('attribute')\n ssxV = dict()\n for i_OE in Scip:\n EOK0 = i_OE.get('name')\n iZom... | [
"0.74106926",
"0.7394256",
"0.7343818",
"0.7298191",
"0.7252295",
"0.7238756",
"0.71793777",
"0.7172032",
"0.7164443",
"0.7148823",
"0.7148713",
"0.714538",
"0.7129106",
"0.709534",
"0.70936406",
"0.7073589",
"0.70714945",
"0.7055427",
"0.7055313",
"0.70371765",
"0.70325017",... | 0.0 | -1 |
Dequeues val, returns None if queue empty | def he0F(YKHO):
if YKHO.removestack.isempty():
while not YKHO.addstack.isempty():
YKHO.removestack.push(YKHO.addstack.pop())
return YKHO.removestack.pop() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def he0F(YKHO):\n if not YKHO.is_empty():\n BWXx = YKHO.arr[YKHO.head]\n YKHO.arr[YKHO.head] = None\n YKHO.head += 1\n YKHO.queue_size -= 1\n return BWXx\n else:\n return None",
"def he0F() -> ImMB:\n global queue\n if gGq6:\n return gGq6.pop(0)\n e... | [
"0.7952204",
"0.78267175",
"0.78209275",
"0.7762308",
"0.76937306",
"0.7685684",
"0.76237595",
"0.76237595",
"0.7595777",
"0.7545503",
"0.7510341",
"0.7506384",
"0.7381128",
"0.7378072",
"0.73742145",
"0.7357395",
"0.73435473",
"0.7332658",
"0.73084134",
"0.72852504",
"0.7279... | 0.0 | -1 |
Returns the negative of this Point i.e returns a new Point with coordinates (_x, _y) | def la4d(YKHO):
return PvyL(-YKHO._x, -YKHO._y) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def la4d(YKHO):\n return PvyL(-YKHO.x, -YKHO.y)",
"def V3hn(YKHO):\n return PvyL(-YKHO.x, YKHO.y)",
"def la4d(YKHO):\n return tplp(-YKHO.x, -YKHO.y)",
"def la4d(YKHO):\n return DpX9(-YKHO.x, -YKHO.y)",
"def la4d(YKHO):\n return DpX9(-YKHO.x, -YKHO.y)",
"def la4d(YKHO):\n WKvO = -YKHO.x\... | [
"0.8972611",
"0.88941264",
"0.8800521",
"0.8261536",
"0.82609785",
"0.808418",
"0.808418",
"0.78923786",
"0.78227437",
"0.7786318",
"0.7618771",
"0.75637275",
"0.75551915",
"0.7508016",
"0.74146676",
"0.7345353",
"0.7307099",
"0.72954243",
"0.72837365",
"0.7220276",
"0.721627... | 0.9026916 | 0 |
Returns the magnitude of the Point, i.e. the distance from the origin | def PKV0(YKHO):
return YKHO.distance(PvyL()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YXbZ(YKHO) -> float:\n return epAf.sqrt(YKHO.x ** 2 + YKHO.y ** 2)",
"def YXbZ(YKHO):\n return epAf.sqrt(YKHO.x ** 2 + YKHO.y ** 2)",
"def YXbZ(YKHO) -> float:\n return epAf.sqrt(YKHO._x ** 2 + YKHO._y ** 2)",
"def YXbZ(YKHO):\n return epAf.sqrt(YKHO.x * YKHO.x + YKHO.y * YKHO.y)",
"def YXb... | [
"0.8272684",
"0.8162696",
"0.81439084",
"0.8139769",
"0.80822396",
"0.8080898",
"0.8073775",
"0.8071316",
"0.80483705",
"0.7908482",
"0.7731085",
"0.7724512",
"0.7723983",
"0.77069825",
"0.77061874",
"0.7660741",
"0.76012194",
"0.7592611",
"0.75897306",
"0.7565254",
"0.756206... | 0.67102927 | 58 |
Returns a string representation of this Point | def zAg0(YKHO):
return '(' + str(YKHO._x) + ',' + str(YKHO._y) + ')' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n return str(YKHO.points)",
"def zAg0(YKHO):\n return 'Point ' + str(YKHO.pos)",
"def wHJl(YKHO):\n return 'Point({}, {})'.format(YKHO.x, YKHO.y)",
"def zAg0(YKHO):\n return '<{}>'.format(str(YKHO._coords)[1:-1])",
"def zAg0(YKHO):\n return 'Point at {} and {}'.format(YKHO.x,... | [
"0.8293944",
"0.8127115",
"0.81232625",
"0.80208814",
"0.8005649",
"0.7971622",
"0.79665005",
"0.7950377",
"0.7950377",
"0.79207003",
"0.7886551",
"0.78330654",
"0.78330654",
"0.77892405",
"0.7783161",
"0.77725106",
"0.7765897",
"0.7759699",
"0.7758463",
"0.77554876",
"0.7716... | 0.7916647 | 10 |
Retrieve the closest matching container. | def zGKt(YKHO):
return YKHO.__closest([Z9rn for Z9rn in pa4n.list() if Z9rn.project == YKHO.project and Z9rn.instance == YKHO.instance]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mp07(YKHO):\n pass",
"def D437(YKHO):\n return YKHO.closest",
"def s4ms(YKHO, oeNL):\n mp07 = oeNL\n return mp07",
"def lmg3(YKHO, DumB):\n dLPy = None\n Vk_N = None\n for ZfUD in DumB:\n jSYO = CbhI(ZfUD.hash, YKHO.repository)\n if jSYO <= YKHO.repository.current_commi... | [
"0.7138324",
"0.70033526",
"0.63052195",
"0.6183837",
"0.6158538",
"0.6129655",
"0.60843766",
"0.5913921",
"0.5894036",
"0.5891756",
"0.586237",
"0.58599335",
"0.57927036",
"0.5715451",
"0.56985086",
"0.56730676",
"0.5666351",
"0.56642985",
"0.5638595",
"0.56284845",
"0.56241... | 0.6306453 | 2 |
Retrieve the list of currently tags that are required to execute an update. | def dJ1p(YKHO):
qN8b = YKHO.repository.current_commit % CbhI(YKHO.container.hash, YKHO.repository)
for mWFP, LmAn in YKHO.roles.iteritems():
dJ1p = LmAn.update_triggers(qN8b)
for TZ9E in dJ1p:
yield TZ9E | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qwli(YKHO):\n return YKHO.get_job().get('tags', [])",
"def ECMc(aQ1I, *qIxc):\n tAPI = None\n Eorv, dJ1p = qIxc[:2]\n zyI5 = Eorv.get('tags')\n if zyI5 is not None:\n RQ2A = set(zyI5)\n rmKD = set(dJ1p)\n uSY5 = aQ1I(RQ2A, rmKD)\n if RQ2A != uSY5:\n tAPI ... | [
"0.69838804",
"0.6581472",
"0.6570525",
"0.6534781",
"0.6459311",
"0.6431293",
"0.6335496",
"0.6297775",
"0.62731934",
"0.6265545",
"0.6263628",
"0.625043",
"0.6230681",
"0.62127006",
"0.6158615",
"0.61451226",
"0.6142669",
"0.61181825",
"0.61181825",
"0.6107291",
"0.61061287... | 0.0 | -1 |
Initialize the GUI by placing the objects in the correct positions | def MG5I(YKHO):
YKHO.main_layout = x5x0.QVBoxLayout()
YKHO.main_layout.setContentsMargins(20, 20, 20, 20)
YKHO.setContentsMargins(10, 5, 10, 5)
YKHO.status_text = x5x0.QLabel()
YKHO.status_text.setText('Please position window over sudoku on screen!')
YKHO.status_text.setAlignment(wDYU.Qt.AlignHC... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MG5I(YKHO):\n YKHO.setMinimumSize(150, 150)\n YKHO.setMaximumSize(150, 150)\n YKHO.setFrameStyle(urYv.Panel)\n YKHO.bus_value = float()\n YKHO.pointer = fzCY()\n YKHO.start_point = fzCY(70.0, 70.0)\n '\\n self.update()\\n '\n '\\n self.paintEvent(self)\\n '",... | [
"0.7102547",
"0.7083529",
"0.70274633",
"0.70033807",
"0.6939297",
"0.6889158",
"0.6873646",
"0.686157",
"0.68587184",
"0.6816089",
"0.68091685",
"0.67991525",
"0.675696",
"0.67537117",
"0.673474",
"0.6732646",
"0.6715079",
"0.6691643",
"0.66874415",
"0.66824454",
"0.6678191"... | 0.0 | -1 |
Forward computation of network. If is critic, action must not be ``None`` | def KVH6(YKHO, W061: Dict, XeOP: Optional[Dict]=None) -> ht2j.tensor:
wjQX = YKHO._encoder(W061)
if YKHO._is_critic:
assert XeOP is not None
ci2p = ht2j.cat([wjQX, XeOP], dim=1)
vexM = YKHO._head(ci2p)
return vexM
hlel = YKHO._head(wjQX)
return hlel | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hIBd(YKHO, W061: torch.Tensor, XeOP: torch.Tensor) -> ht2j.Tensor:\n raise NotImplementedError",
"def nORg(YKHO, W061: torch.Tensor, XeOP: torch.Tensor) -> ht2j.Tensor:\n raise NotImplementedError",
"def KVH6(YKHO, QTBn, XeOP):\n TEmr = YKHO._q_state_net(QTBn)\n return YKHO._q_net(ht2j.cat((TEm... | [
"0.7047827",
"0.6984072",
"0.6739172",
"0.66911227",
"0.66852725",
"0.66488343",
"0.6616963",
"0.65962404",
"0.6560649",
"0.6553909",
"0.65437967",
"0.65349495",
"0.65196645",
"0.64890677",
"0.6488485",
"0.64790165",
"0.6469863",
"0.6453946",
"0.6453946",
"0.6442062",
"0.6391... | 0.65161353 | 13 |
Ensure create backup fails with invalid instance id. | def AulO(YKHO):
YKHO.test_runner.run_backup_create_instance_invalid() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C_2y(YKHO):\n uK4j = YKHO._create_volume_db_entry(size=1)\n RjST = YKHO._create_backup_db_entry(status='available', volume_id=uK4j)\n YKHO.assertRaises(AJ5d.InvalidBackup, YKHO.backup_mgr.create_backup, YKHO.ctxt, RjST)",
"def DHZE(YKHO):\n uK4j = YKHO._create_volume_db_entry(status='available', ... | [
"0.7685029",
"0.73654306",
"0.71589136",
"0.70109755",
"0.66960025",
"0.661124",
"0.66018915",
"0.6455184",
"0.6437144",
"0.64052725",
"0.63328356",
"0.6216056",
"0.6197509",
"0.6183459",
"0.61676496",
"0.6163526",
"0.6152812",
"0.6141821",
"0.61269736",
"0.61096376",
"0.6103... | 0.79623777 | 0 |
Ensure create backup fails with unknown instance id. | def Iw7R(YKHO):
YKHO.test_runner.run_backup_create_instance_not_found() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AulO(YKHO):\n YKHO.test_runner.run_backup_create_instance_invalid()",
"def C_2y(YKHO):\n uK4j = YKHO._create_volume_db_entry(size=1)\n RjST = YKHO._create_backup_db_entry(status='available', volume_id=uK4j)\n YKHO.assertRaises(AJ5d.InvalidBackup, YKHO.backup_mgr.create_backup, YKHO.ctxt, RjST)",
... | [
"0.769516",
"0.715196",
"0.68647224",
"0.6523903",
"0.63172567",
"0.629373",
"0.6291281",
"0.6270223",
"0.62315595",
"0.6215014",
"0.61944276",
"0.6163969",
"0.61594075",
"0.61202914",
"0.6093706",
"0.6059357",
"0.60282785",
"0.60194516",
"0.5992969",
"0.59487206",
"0.5931740... | 0.75147593 | 1 |
Ensure deleting backup by an unauthorized user fails. | def H3Pc(YKHO):
YKHO.test_runner.run_delete_backup_unauthorized_user() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KOn0(YKHO):\n uK4j = YKHO._create_volume_db_entry(size=1)\n RjST = YKHO._create_backup_db_entry(status='deleting', display_name='fail_on_delete', volume_id=uK4j)\n YKHO.assertRaises(IOError, YKHO.backup_mgr.delete_backup, YKHO.ctxt, RjST)\n JKMw = NCls.backup_get(YKHO.ctxt, RjST)\n YKHO.assertEq... | [
"0.68220884",
"0.6668995",
"0.66491586",
"0.65797395",
"0.65281236",
"0.6524294",
"0.651712",
"0.64302146",
"0.63742995",
"0.63101774",
"0.63057476",
"0.6296316",
"0.6272173",
"0.62671256",
"0.6237032",
"0.6231914",
"0.62273616",
"0.62211615",
"0.6188896",
"0.6174844",
"0.617... | 0.84505516 | 0 |
Initialise the battery's attributes. | def FIMM(YKHO, n8ok=75):
YKHO.battery_size = n8ok | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, PEX4, C3ST, lO87, FefQ=BqDA()):\n super().__init__(PEX4, C3ST, lO87)\n YKHO.battery = FefQ",
"def FIMM(YKHO, n8ok=70):\n YKHO.battery_size = n8ok",
"def FIMM(YKHO, n8ok=75):\n YKHO.battery_size = n8ok",
"def FIMM(YKHO, n8ok=70):\n YKHO.battery_size = n8ok",
"def FIMM(YKHO, n8o... | [
"0.73066807",
"0.7289275",
"0.7254117",
"0.722901",
"0.72283316",
"0.7219037",
"0.7143592",
"0.7134518",
"0.7121208",
"0.70198154",
"0.6942553",
"0.6912842",
"0.6869198",
"0.68442726",
"0.6730528",
"0.64707875",
"0.6451334",
"0.64326155",
"0.64145565",
"0.64075184",
"0.639834... | 0.72374386 | 3 |
Get a random element from the set. | def UIrZ(YKHO) -> int:
import random
Ylbp = random.choice(list(YKHO.li))
return Ylbp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def P8Zf(YKHO):\n try:\n return YKHO.object().random_element()\n except AttributeError:\n return Acvy(YKHO.list())",
"def UIrZ(YKHO) -> int:\n IZL_ = YKHO.randomizedSet.pop()\n YKHO.randomizedSet.add(IZL_)\n return IZL_",
"def UIrZ(YKHO):\n or8S = tuKI.randint(0, YKHO.length - 1... | [
"0.78055954",
"0.77602583",
"0.76503676",
"0.69756",
"0.6970386",
"0.69696873",
"0.69170576",
"0.6903906",
"0.68794334",
"0.6843657",
"0.68179744",
"0.68171364",
"0.6815859",
"0.6779796",
"0.6774275",
"0.6763151",
"0.6747374",
"0.67292315",
"0.6693236",
"0.6683133",
"0.666994... | 0.6118399 | 97 |
Given wide dataframe convert to boxplots. | def hCTx(F9T9, T4Wy=None, lGVU=None, LV0o=None):
uuEx.reset_defaults()
uuEx.set_style('whitegrid')
uuEx.set(font_scale=2.5)
QrM1.figure(figsize=(32, 8))
QrM1.axis('tight')
_obH = F9T9.variable.unique()
aAh7 = len(_obH)
SH71 = []
for G1Hx, fv7a in enumerate(_obH):
EnQo = F9T9[... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def enSl(jQ3Z, Hafq, leAC):\n Oa1e = K3eF(jQ3Z, col='bands', col_wrap=4)\n Oa1e.fig.suptitle(leAC)\n Oa1e.map_dataframe(wLS1, x='bands', y='value', hue=Hafq)\n Oa1e.add_legend()\n Oa1e.set_titles(col_template='{col_name}')\n Oa1e.set(xticklabels=[])",
"def LVC6(jQ3Z):\n A8fR = list(jQ3Z)\n ... | [
"0.68590605",
"0.672939",
"0.660248",
"0.6483647",
"0.64017063",
"0.63668376",
"0.6214482",
"0.5830617",
"0.581609",
"0.5805882",
"0.5805084",
"0.57739186",
"0.57717013",
"0.5757991",
"0.571108",
"0.5696191",
"0.5678939",
"0.56488794",
"0.5629119",
"0.5620077",
"0.560641",
... | 0.6004718 | 7 |
Get K nearest neighbors. | def XTTC(EcVT, nMvt, AcYW=None):
nMvt = nMvt + 1
if AcYW is None:
myQS = HFk3(n_neighbors=nMvt, algorithm='ball_tree', n_jobs=5).fit(EcVT)
else:
myQS = HFk3(n_neighbors=nMvt, algorithm='ball_tree', metric=AcYW, n_jobs=5).fit(EcVT)
_0VL = myQS.kneighbors(EcVT, return_distance=False)
r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TdJd(pNZh, vexM, nMvt=10):\n return None",
"def TdJd(pNZh, vexM, nMvt=10):\n return None",
"def TdJd(pNZh, vexM, nMvt=10):\n return None",
"def z1UU(nPrm, G1Hx):\n dUr3 = IyN9(nPrm)\n CLQW = oyIN.argpartition(dUr3, G1Hx, axis=1)[:, :G1Hx]\n return CLQW",
"def PYVH(YKHO, J_Es, AU8u, G1... | [
"0.8168958",
"0.8168958",
"0.8168958",
"0.81118405",
"0.80547416",
"0.8029619",
"0.79866284",
"0.79404104",
"0.77796686",
"0.7767564",
"0.77532136",
"0.77165306",
"0.7698646",
"0.76367736",
"0.7626573",
"0.7583996",
"0.75116414",
"0.7489596",
"0.7482872",
"0.74732727",
"0.745... | 0.78039205 | 8 |
Get adjacency matrix of X with size n by k (k number of connections/neighbors). Output matrix will be a square matrix of n by n where n is the number of nodes. | def I0pP(EcVT, _0VL):
jh2H = oyIN.zeros((EcVT.shape[0], EcVT.shape[0]))
for G1Hx, Ty9i in enumerate(_0VL):
oyIN.put(jh2H[G1Hx], Ty9i, 1)
return oyIN.matrix(jh2H) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I0pP(SLBp, y_PJ, LwMh='None'):\n wXIJ = len(SLBp)\n nMvt = 0\n eQUr = []\n for YRbF in range(wXIJ):\n or8S = oyIN.argwhere(y_PJ == YRbF)\n if len(or8S) == 0:\n or8S = [0]\n else:\n or8S = y_PJ[or8S[:, 0]]\n or8S = oyIN.unique(oyIN.sort(or8S.resh... | [
"0.69504136",
"0.69262683",
"0.68745255",
"0.674337",
"0.66893744",
"0.6687849",
"0.6674021",
"0.6668437",
"0.66206753",
"0.6557778",
"0.65510494",
"0.6531024",
"0.65262324",
"0.6450139",
"0.6440184",
"0.6440184",
"0.6437488",
"0.64090586",
"0.6384251",
"0.6358138",
"0.634359... | 0.6459723 | 13 |
Randomly select a given percentage of data from a dataframe. | def MSIw(jQ3Z, PaJA, igb0):
Xnhq = jQ3Z.copy()
Xnhq = oyIN.array(Xnhq)
pUmS = oyIN.product(Xnhq.shape[:])
or8S = oyIN.where(~oyIN.isnan(Xnhq))
pZYi = or8S[0]
zVcM = or8S[1]
Iy0m = pZYi.size
IW4y = Iy0m / pUmS
print('Percentage of current known entries {}'.format(IW4y))
OpCc = int... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lJYz(bOBl, Ik9y):\n print('making a local_df data sample with float_percent: %s' % Ik9y)\n return bOBl.sample(frac=Ik9y, random_state=1)",
"def UYEk(YKHO, His1=0.05, i5jP=10, gwAu=None):\n jzdc = max(int(His1 * float(len(YKHO.data.index))), i5jP)\n if gwAu:\n jzdc = min(jzdc, gwAu)\n re... | [
"0.7777246",
"0.7389299",
"0.7187719",
"0.70618397",
"0.6916033",
"0.68310636",
"0.6750043",
"0.66133296",
"0.6508682",
"0.6499852",
"0.64393073",
"0.6398386",
"0.6363076",
"0.6342262",
"0.63381934",
"0.6312164",
"0.63110566",
"0.6307278",
"0.6290758",
"0.62883866",
"0.625398... | 0.67242044 | 7 |
Get model name given list of paths. | def o23D(BTLB):
net2 = []
for YRbF in BTLB:
eb88 = YRbF.split('/')[-1]
eb88 = eb88.replace('output_pred_', '').replace('_.pkl', '')
net2.append(eb88)
return net2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tyq0(pmON):\n return Hy7s.path.join(Hy7s.path.basename(Hy7s.path.dirname(pmON)), Hy7s.path.basename(pmON))",
"def pItj(tTpl):\n with yVfu(tTpl):\n return FA6x().visit(tTpl)",
"def TbE8(Emd4, ZGE9: str) -> str:\n pmON = Emd4._custom_types_map.get(ZGE9)\n if pmON:\n ZGE9 = pmON.get_... | [
"0.7339375",
"0.6544042",
"0.64037865",
"0.64027023",
"0.6332548",
"0.63168484",
"0.625808",
"0.6170437",
"0.61110514",
"0.6016777",
"0.6011673",
"0.59710836",
"0.59629965",
"0.59629965",
"0.59535146",
"0.5952711",
"0.5939043",
"0.5912391",
"0.59006464",
"0.58972937",
"0.5882... | 0.7315826 | 1 |
Get indices of binary features. Given data array and nonnumerical indices, get indices of binary features. This information can be use to impute missing to 0.5 | def gcNW(Xnhq, MUEG):
DgFi = []
for YRbF in MUEG:
dOKV = rLdf.DataFrame(Xnhq[:, YRbF]).drop_duplicates().dropna()
xwew = dOKV.size
if xwew == 2:
DgFi.append(YRbF)
return DgFi | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _CBF(nPrm, RLfm):\n rdlD = nPrm[0]\n _0VL = list(range(len(rdlD)))\n TNkS = list(filter(lambda WKvO: WKvO != RLfm, _0VL))\n return TNkS",
"def k0zf(e5t6):\n wVHx = oyIN.flatnonzero(e5t6)\n return wVHx",
"def GeaR(YKHO):\n if YKHO.feat_type == 'derived':\n return list(YKHO.data.c... | [
"0.6847288",
"0.6808924",
"0.6469971",
"0.64540374",
"0.6408942",
"0.63085985",
"0.62652504",
"0.6261362",
"0.6203636",
"0.6145488",
"0.61296415",
"0.61222017",
"0.61042833",
"0.60827225",
"0.60709614",
"0.60129",
"0.60129",
"0.5995225",
"0.5995123",
"0.59463054",
"0.59269994... | 0.67249805 | 2 |
Constructs an cluster object. | def FIMM(YKHO, e6ux, LTIa=[]):
YKHO.centroid = e6ux
YKHO.points = [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VmTS(YKHO, QePW):\n return WJYt.Cluster()",
"def hoT1(YKHO):\n pGNo = PwH5(ITS7.time(), YKHO.k, YKHO.l_diversity, YKHO.c_diversity, YKHO.buff_size, YKHO.drift_detector)\n YKHO.total_opened_clusters += 1\n return pGNo",
"def zVKC(l7_R, U63o, __n6, yokr):\n hKn5 = Jpz4[l7_R](U63o, __n6, yokr)\... | [
"0.7563759",
"0.7421481",
"0.7393511",
"0.73669887",
"0.72865695",
"0.7193881",
"0.71903604",
"0.718927",
"0.7167692",
"0.7136371",
"0.71157867",
"0.71148795",
"0.70724195",
"0.7070258",
"0.70645726",
"0.699035",
"0.69887817",
"0.6977953",
"0.6962992",
"0.6959092",
"0.6897317... | 0.0 | -1 |
Return all points within the cluster. | def meaW(YKHO):
return YKHO.points | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M40C(YKHO):\n return YKHO.points",
"def nkGx(YKHO):\n Ziit = YKHO.get_nodes()\n LTIa = []\n for Q6kx in Ziit:\n LTIa.append(Q6kx[1])\n return LTIa",
"def tR9U(YKHO):\n \"\"\" Calculem l'array de distancies entre els píxels de X i les píxels dels centroids.\n Després guar... | [
"0.78526413",
"0.76372474",
"0.7308198",
"0.7228053",
"0.7183796",
"0.71711606",
"0.70774233",
"0.7067742",
"0.70440567",
"0.7006126",
"0.700155",
"0.700155",
"0.6982942",
"0.6957096",
"0.6953337",
"0.6884589",
"0.6872969",
"0.6872969",
"0.6872969",
"0.6872969",
"0.6866806",
... | 0.66442305 | 34 |
Get the cluster centroid. | def SZpp(YKHO):
return YKHO.centroid | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e6ux(YKHO):\n return LG9n.util.centroid(YKHO)",
"def e6ux(YKHO):\n return YKHO.coords.centroid",
"def e6ux(YKHO):\n return YKHO.coords.centroid",
"def e6ux(YKHO):\n return YKHO.center",
"def e6ux(YKHO):\n return YKHO.shape.centroid.coords[0]",
"def G0Yq(YKHO):\n return YKHO._centroi... | [
"0.86010087",
"0.8574408",
"0.8574408",
"0.849586",
"0.8396572",
"0.8373254",
"0.83525306",
"0.83255994",
"0.82769513",
"0.81432784",
"0.79945344",
"0.79708284",
"0.7964147",
"0.79267645",
"0.79021746",
"0.7860407",
"0.7857723",
"0.7846269",
"0.7786258",
"0.7762603",
"0.77234... | 0.8280552 | 8 |
Returns the number of points within the cluster. | def VMOf(YKHO):
return len(YKHO.points) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DrDG(YKHO):\n return len(YKHO.cluster)",
"def rQuf(YKHO):\n return YKHO.points.shape[0]",
"def O9N6(YKHO):\n try:\n return YKHO._npoints\n except AttributeError:\n return len(YKHO.points())",
"def O9N6(YKHO):\n try:\n return YKHO._npoints\n except AttributeError:\n ... | [
"0.7856939",
"0.77062386",
"0.767468",
"0.767468",
"0.76454437",
"0.75570005",
"0.7498831",
"0.7488708",
"0.7476465",
"0.741791",
"0.7361651",
"0.73585045",
"0.7298748",
"0.7298748",
"0.7279007",
"0.721443",
"0.72052306",
"0.72052306",
"0.7186482",
"0.71503925",
"0.7150324",
... | 0.0 | -1 |
Get the label spread within the cluster. | def c4fP(YKHO):
Crrw = {}
for AU8u in YKHO.points:
UXqs = YMrE(AU8u[1])
if UXqs not in Crrw.keys():
Crrw[UXqs] = 0
Crrw[UXqs] += 1
return Crrw | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WGGB(Crrw, Ew3d=9999999):\n TaUL, bySB = ZCMp.distance_transform_edt(Crrw == 0, return_distances=1, return_indices=1)\n bS0K = bySB[0] * Crrw.shape[1] + bySB[1]\n QVq7 = Crrw.ravel()[bS0K.ravel()].reshape(*Crrw.shape)\n QVq7 *= TaUL < Ew3d\n return QVq7",
"def YEmv(YKHO):\n if YKHO.fitted =... | [
"0.59166455",
"0.5532359",
"0.5507403",
"0.5487679",
"0.5478471",
"0.5477743",
"0.54352653",
"0.53747666",
"0.53462166",
"0.5327101",
"0.530478",
"0.52936685",
"0.5238922",
"0.5234469",
"0.52161264",
"0.5188637",
"0.51701844",
"0.5168969",
"0.5148885",
"0.51392",
"0.51272976"... | 0.57958204 | 1 |