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 the min_players of this CoreActivitySettings. The minimum number of players the game can hold | def QEiI(YKHO):
return YKHO._min_players | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QEiI(YKHO):\n return 2",
"def QEiI(YKHO, QEiI):\n YKHO._min_players = QEiI",
"def DsWp(YKHO):\n U96t = None\n for Ii1o in YKHO.players:\n if U96t is None or Ii1o < U96t:\n U96t = Ii1o\n return U96t",
"def F8JU(YKHO):\n return YKHO._min_ps",
"def pIp4(YKHO):\n retu... | [
"0.76113",
"0.6851282",
"0.68278474",
"0.643859",
"0.640651",
"0.63727874",
"0.63515544",
"0.6343842",
"0.62926227",
"0.62926227",
"0.6239794",
"0.62332374",
"0.62070435",
"0.6170405",
"0.61378324",
"0.60647947",
"0.6036875",
"0.60143083",
"0.5976273",
"0.5976273",
"0.5976273... | 0.8670473 | 0 |
Sets the min_players of this CoreActivitySettings. The minimum number of players the game can hold | def QEiI(YKHO, QEiI):
YKHO._min_players = QEiI | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QEiI(YKHO):\n return YKHO._min_players",
"def QEiI(YKHO):\n return 2",
"def mO3F(YKHO, nbVh):\n YKHO.min_participants = nbVh",
"def pIp4(YKHO, pIp4):\n YKHO._xp_per_min = pIp4",
"def FIMM(YKHO, aIw4):\n YKHO.min_player_count = aIw4",
"def q33K(YKHO, q33K):\n if YKHO.local_vars_confi... | [
"0.7563934",
"0.71112365",
"0.65346396",
"0.6465872",
"0.6395651",
"0.6234409",
"0.6109531",
"0.600785",
"0.5916709",
"0.5916709",
"0.58952904",
"0.5881943",
"0.58510995",
"0.58152056",
"0.58152056",
"0.57964677",
"0.57964677",
"0.57964677",
"0.57834744",
"0.57834744",
"0.577... | 0.8662863 | 0 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, I0rg):
return False
return YKHO.__dict__ == Elif.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.80885184",
"0.80885184",
"0.805514",
"0.7983044",
"0.7966715",
"0.7966715",
"0.7966715",
"0.7966715",
"0.7966715",
"0.7966715",
"0.7966715",
"0.7966715",
"0.7966715",
"0.7966715",
"0.7966715",
"0.7966715",
"0.7966715",
"0.7966715",
"0.7966715",
"0.7966715",
"0.7966715",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748"
] | 0.0 | -1 |
Add a word in the trie structure | def H2v5(tk5Y, GIN8):
Q6kx = tk5Y
for hcXw in GIN8:
C7E2 = False
for aUGN in Q6kx.children:
if aUGN.char == hcXw:
aUGN.counter += 1
Q6kx = aUGN
C7E2 = True
break
if not C7E2:
Esd_ = etby(hcXw)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e0k0(YKHO, GIN8):\n AsCw = YKHO.root\n for G1Hx in GIN8:\n if G1Hx in AsCw.child:\n AsCw = AsCw.child[G1Hx]\n else:\n AsCw.child[G1Hx] = ep_x()\n AsCw = AsCw.child[G1Hx]\n AsCw.isEnd = True",
"def e0k0(YKHO, GIN8):\n YKHO.root.makeTrie(GIN8)",
"def... | [
"0.89895463",
"0.8933609",
"0.8932145",
"0.8932144",
"0.88926435",
"0.88826823",
"0.8866427",
"0.8830613",
"0.88140225",
"0.87661743",
"0.8742865",
"0.8725088",
"0.8568811",
"0.851034",
"0.850462",
"0.84927154",
"0.84809357",
"0.8477725",
"0.84429365",
"0.841936",
"0.83847225... | 0.8136192 | 41 |
NHWC [1x1xd] [5x5xd] + (1) [1x1x4d] (N)(H//stride)(W//stride)(4d) | def MFxF(YKHO, g4y1, _0fC=1, Bf31=None, rrBf=None):
with ZylS.variable_scope(rrBf, 'bottleneck_v2', [g4y1]) as Sa_m:
if YKHO.use_batch_norm:
hNWY = Fz20.batch_norm(g4y1, activation_fn=ZylS.nn.relu, scope='preact')
else:
hNWY = ZylS.nn.relu(g4y1)
PWHU = Fz20.conv2d(hNW... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IVJu(exwG):\n return 4 * exwG * exwG + 1",
"def _Rs5(aBvC: Tuple[int, int], Ot1W: int=1, _0fC: int=1, hVLt: int=0, ivFb: int=1):\n MKlR = pBSp((aBvC[0] + 2 * hVLt - ivFb * (Ot1W - 1) - 1) / _0fC + 1)\n yzQ0 = pBSp((aBvC[1] + 2 * hVLt - ivFb * (Ot1W - 1) - 1) / _0fC + 1)\n return (MKlR, yzQ0)",
... | [
"0.604739",
"0.5929892",
"0.5908317",
"0.58959913",
"0.5829011",
"0.5730633",
"0.5728713",
"0.57135063",
"0.5692593",
"0.5662185",
"0.5637902",
"0.5634279",
"0.5588223",
"0.55839044",
"0.55359906",
"0.54808956",
"0.539002",
"0.5380176",
"0.5344539",
"0.5321963",
"0.5321041",
... | 0.0 | -1 |
Op for generating training labels for RPN proposals. This is used when training RPN jointly with Fast/Mask RCNN (as in endtoend Faster RCNN training). | def KVH6(YKHO, xbTT, wWMN, hUXG):
ANnM = hUXG.data.numpy()[:, 2]
AZ_U = ['rois', 'labels_int32', 'bbox_targets', 'bbox_inside_weights', 'bbox_outside_weights', 'mask_rois', 'roi_has_mask_int32', 'masks_int32']
YKHO.add_proposals(wWMN, xbTT, ANnM, crowd_thresh=0)
dIng = {G1Hx: [] for G1Hx in AZ_U}
YK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wl12(cDK5):\n return (oyIN.ones([cDK5, 1]), oyIN.zeros([cDK5, 1]))",
"def j2c4(YKHO):\n if YKHO.label_mode == 'separate':\n return YKHO.generate_separate_labels()\n elif YKHO.label_mode == 'joint':\n return YKHO.generate_joint_labels()",
"def Znz3():\n return {0: 'others', 33: 'ca... | [
"0.57406735",
"0.5732566",
"0.568096",
"0.5674445",
"0.567086",
"0.5649215",
"0.5618738",
"0.5617878",
"0.55908847",
"0.559006",
"0.5570181",
"0.55655843",
"0.55563813",
"0.5551461",
"0.5535618",
"0.552033",
"0.55115414",
"0.55050284",
"0.5502784",
"0.5494684",
"0.5493915",
... | 0.0 | -1 |
Only keep boxes with both sides >= min_size and center within the image. | def EUsT(YKHO, oUSw, qonS, hUXG):
qonS *= hUXG[2]
VTcd = oUSw[:, 2] - oUSw[:, 0] + 1
ObL9 = oUSw[:, 3] - oUSw[:, 1] + 1
cBvt = oUSw[:, 0] + VTcd / 2.0
KEUX = oUSw[:, 1] + ObL9 / 2.0
uZq5 = oyIN.where((VTcd >= qonS) & (ObL9 >= qonS) & (cBvt < hUXG[1]) & (KEUX < hUXG[0]))[0]
return uZq5 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EUsT(oUSw, qonS):\n VTcd = oUSw[:, 2] - oUSw[:, 0] + 1\n ObL9 = oUSw[:, 3] - oUSw[:, 1] + 1\n uZq5 = oyIN.where((VTcd >= qonS) & (ObL9 >= qonS))[0]\n return uZq5",
"def EUsT(oUSw, qonS):\n VTcd = oUSw[:, 2] - oUSw[:, 0] + 1\n ObL9 = oUSw[:, 3] - oUSw[:, 1] + 1\n uZq5 = oyIN.where((VTcd >... | [
"0.7619617",
"0.7603541",
"0.7603541",
"0.75886637",
"0.7537951",
"0.7290434",
"0.7057679",
"0.6964894",
"0.66949075",
"0.66687864",
"0.6575996",
"0.6575996",
"0.64715207",
"0.6446642",
"0.640746",
"0.6312547",
"0.62918854",
"0.6291512",
"0.62779146",
"0.62597907",
"0.6259790... | 0.80861914 | 0 |
Clip boxes to image boundaries. im_shape is [height, width] and boxes has shape (N, 4 num_tiled_boxes). | def qAck(YKHO, oUSw, TkH6):
assert oUSw.shape[1] % 4 == 0, 'boxes.shape[1] is {:d}, but must be divisible by 4.'.format(oUSw.shape[1])
oUSw[:, 0::4] = oyIN.maximum(oyIN.minimum(oUSw[:, 0::4], TkH6[1] - 1), 0)
oUSw[:, 1::4] = oyIN.maximum(oyIN.minimum(oUSw[:, 1::4], TkH6[0] - 1), 0)
oUSw[:, 2::4] = oyIN.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rISd(YKHO, oUSw, TkH6):\n if oUSw.shape[0] == 0:\n return oUSw\n oUSw[:, 0::4] = oyIN.maximum(oyIN.minimum(oUSw[:, 0::4], TkH6[1] - 1), 0)\n oUSw[:, 1::4] = oyIN.maximum(oyIN.minimum(oUSw[:, 1::4], TkH6[0] - 1), 0)\n oUSw[:, 2::4] = oyIN.maximum(oyIN.minimum(oUSw[:, 2::4], TkH6[1] - 1), 0)\n... | [
"0.83247554",
"0.8321995",
"0.82934266",
"0.82399404",
"0.82399404",
"0.8150131",
"0.8150131",
"0.8148732",
"0.81025916",
"0.7851256",
"0.7478519",
"0.7408463",
"0.7223331",
"0.7004812",
"0.68646723",
"0.6505796",
"0.64668024",
"0.6355265",
"0.6335578",
"0.6248439",
"0.624530... | 0.8381895 | 0 |
Return whether we expect / require regression weights; Right now that is all models except ESM1v | def trjx(ZGE9):
return not 'esm1v' in ZGE9 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qQlD(YEnM):\n CWt_ = hasattr(type(YEnM), 'trainable_weights') and hasattr(type(YEnM), 'non_trainable_weights')\n return CWt_ and (not isinstance(YEnM, type))",
"def IbJY(ZGE9):\n return ZGE9 == 'logistic' or ZGE9 == 'sgd'",
"def laGj(YKHO):\n try:\n super().check_regressor\n except:\n... | [
"0.6592943",
"0.64028656",
"0.63032",
"0.61123866",
"0.61022455",
"0.6061834",
"0.6035603",
"0.6005666",
"0.60020566",
"0.59139276",
"0.59011495",
"0.58188635",
"0.5811774",
"0.578876",
"0.5733348",
"0.5707055",
"0.5675799",
"0.56562686",
"0.56400377",
"0.5626857",
"0.5626857... | 0.86441183 | 0 |
Return bpmfln function with numba. | def J6zV(G1Hx, exwG, XP5J):
Y0DV = oyIN.empty_like(exwG, dtype=oyIN.float64)
La78 = epAf.log(XP5J)
h8jM = epAf.log(1 - XP5J)
for YRbF in range(len(G1Hx)):
Y0DV[YRbF] = epAf.exp(ct4W(exwG[YRbF], G1Hx[YRbF]) + G1Hx[YRbF] * La78 + (exwG[YRbF] - G1Hx[YRbF]) * h8jM)
return Y0DV | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ScO5(JfyU):\n return JfyU",
"def J6zV(G1Hx, exwG, XP5J):\n return oyIN.exp(ct4W(exwG, G1Hx) + G1Hx * oyIN.log(XP5J) + (exwG - G1Hx) * oyIN.log(1 - XP5J))",
"def R1vu(jzdc, siIk, *qIxc):\n yvT9 = oyIN.full_like(jzdc, oyIN.nan, dtype=oyIN.float_)\n for fvDH in range(yvT9.shape[1]):\n DNs0 ... | [
"0.64635795",
"0.6398811",
"0.6019388",
"0.59986913",
"0.595082",
"0.5919305",
"0.58751404",
"0.58368987",
"0.5836305",
"0.5802148",
"0.5730889",
"0.57168716",
"0.56329316",
"0.561414",
"0.55734676",
"0.5545763",
"0.5542114",
"0.552053",
"0.55117244",
"0.5509722",
"0.550114",... | 0.6489538 | 0 |
Return bpmfln function wuth numpy. | def J6zV(G1Hx, exwG, XP5J):
return oyIN.exp(ct4W(exwG, G1Hx) + G1Hx * oyIN.log(XP5J) + (exwG - G1Hx) * oyIN.log(1 - XP5J)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Unfu(rVnq, vtMg):\n eHNT = 1.0 / oyIN.absolute(1.0 - _lIW(rVnq, vtMg)) ** 2\n return eHNT",
"def J6zV(G1Hx, exwG, XP5J):\n Y0DV = oyIN.empty_like(exwG, dtype=oyIN.float64)\n La78 = epAf.log(XP5J)\n h8jM = epAf.log(1 - XP5J)\n for YRbF in range(len(G1Hx)):\n Y0DV[YRbF] = epAf.exp(ct4W... | [
"0.6960087",
"0.67491955",
"0.6103096",
"0.6037518",
"0.6031193",
"0.60158575",
"0.59856194",
"0.5959925",
"0.59296924",
"0.5914411",
"0.58878785",
"0.5784712",
"0.57818717",
"0.5740454",
"0.5704756",
"0.5702907",
"0.5682225",
"0.56217027",
"0.56202936",
"0.55736226",
"0.5573... | 0.6645829 | 2 |
Saves parameters to json file | def xkzz(YKHO, RsFk):
with open(RsFk, 'w') as eHNT:
qQXR.dump(YKHO.__dict__, eHNT, indent=4) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def U1ai(YKHO, pmON=None):\n if pmON is None:\n pmON = YKHO.parampath\n NArs = {str(H5ew): str(BWXx) for H5ew, BWXx in YKHO.__dict__.items()}\n with open(Hy7s.path.join(pmON, f'params_{YKHO.mode}.json'), 'w') as eHNT:\n qQXR.dump(NArs, eHNT)",
"def TDTa(YKHO):\n try:\n with open(... | [
"0.82312053",
"0.8181947",
"0.8057166",
"0.7808885",
"0.77812463",
"0.775106",
"0.7710382",
"0.7706769",
"0.76148814",
"0.75990826",
"0.7574917",
"0.75643057",
"0.7448175",
"0.7373087",
"0.7341731",
"0.7261098",
"0.719621",
"0.7154501",
"0.714766",
"0.7143015",
"0.71297264",
... | 0.6701761 | 63 |
Sets the logger to log info in terminal and file `log_path`. In general, it is useful to have a logger so that every output to the terminal is saved in a permanent file. Here we save it to `model_dir/train.log`. | def wmdW(zeeE):
bo34 = G9jH.getLogger()
bo34.setLevel(G9jH.INFO)
if not bo34.handlers:
L8wK = G9jH.FileHandler(zeeE, mode='w')
L8wK.setFormatter(G9jH.Formatter('%(asctime)s:%(levelname)s: %(message)s'))
bo34.addHandler(L8wK)
qnWX = G9jH.StreamHandler()
qnWX.setFormatt... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n9Xd(YKHO, uqvc=None):\n YKHO.epoch = 0\n wzkt = qcWV.datetime.now()\n if uqvc:\n njyT = '.*/\\\\w+(\\\\d{4})(\\\\d{2})(\\\\d{2})T(\\\\d{2})(\\\\d{2})/mask\\\\_rcnn\\\\_\\\\w+(\\\\d{4})\\\\.h5'\n r8hN = ZbWC.match(njyT, uqvc)\n if r8hN:\n wzkt = qcWV.datetime(int(r8hN.g... | [
"0.7125661",
"0.7017231",
"0.6963836",
"0.68003154",
"0.65923315",
"0.6566201",
"0.654351",
"0.6436083",
"0.63942605",
"0.6256997",
"0.62283105",
"0.6212779",
"0.6182543",
"0.6181041",
"0.6157524",
"0.61547387",
"0.6153127",
"0.6081566",
"0.60556686",
"0.59869903",
"0.5946518... | 0.62806326 | 9 |
Returns the active ``SparkContext`` if there is one and it's not stopped, otherwise returns None | def ycRQ() -> h8nf[XYQe]:
if StUT():
return None
return XYQe._active_spark_context | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f5WJ() -> h8nf[lBG2]:\n if StUT():\n return None\n return lBG2.getActiveSession()",
"def lXGf(Fv2L=None):\n if hasattr(XYQe, 'getOrCreate'):\n with XYQe._lock:\n if XYQe._active_spark_context is None:\n aHsF = jkqz() if Fv2L is None else Fv2L\n ... | [
"0.830488",
"0.72235626",
"0.6739669",
"0.6606784",
"0.62115747",
"0.61983407",
"0.6195099",
"0.6171946",
"0.6101583",
"0.6029224",
"0.6022193",
"0.5772433",
"0.5705983",
"0.5705983",
"0.5705983",
"0.56983453",
"0.5648026",
"0.56366515",
"0.56271595",
"0.5457026",
"0.53808236... | 0.9050855 | 0 |
Get a SparkSession object with some of the default/boilerplate config needed for THIS project preset Providing no arguments will work, and give a plainvanilla SparkSession wrapping a plain vanilla SparkContext with all the default spark configurations set (or set with any filebased configs that have been established in... | def A1es(tkLc: JavaGateway=None, nr89: Union[SparkContext, SparkSession]=None, LDIG=None, kvcN='Spark App', wiAm: int=None, A7xg: bool=False, qWDA: bool=False, AMK2: bool=False, **xAU6) -> lBG2:
if nr89 and (not nr89._jvm or nr89._jvm.SparkSession.getDefaultSession().get().sparkContext().isStopped()):
raise... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Yu9h(mWFP='not provided', **B2fa):\n try:\n from pyspark.sql import SparkSession\n except ImportError:\n import findspark\n findspark.init(spark_home=B2fa.get('spark_home'), python_path=B2fa.get('python_path'))\n from pyspark.sql import SparkSession\n mBtZ = SparkSession.bu... | [
"0.6867688",
"0.6605679",
"0.6398324",
"0.6377082",
"0.63403815",
"0.63389045",
"0.63049394",
"0.6284391",
"0.62388784",
"0.6158866",
"0.61490256",
"0.6146191",
"0.61113846",
"0.6102277",
"0.6082016",
"0.6082016",
"0.6082016",
"0.6082016",
"0.6082016",
"0.6082016",
"0.6082016... | 0.5931455 | 34 |
Converts the passedin Postgres DB connection URI to a JDBCcompliant Postgres DB connection string | def qvZD(fm0t: str) -> str:
BSnH, CBIr, jTXt = Blgl(fm0t)
if CBIr is None or jTXt is None:
raise ValueError('pg_uri provided must have username and password with host or in query string')
fm0t = f'postgresql://{BSnH.hostname}:{BSnH.port}{BSnH.path}?user={CBIr}&password={jTXt}'
return f'jdbc:{fm0... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qb13():\n if not X8Rg.DATABASE_URL:\n raise ValueError('DATABASE_URL config val must provided')\n return qvZD(X8Rg.DATABASE_URL)",
"def YtR6(YKHO):\n return 'postgresql+psycopg2://%s:%s@%s:%s/%s' % (Hy7s.environ['DB_USER'], Hy7s.environ['DB_PASSWORD'], Hy7s.environ['DB_HOST'], Hy7s.environ['D... | [
"0.7377357",
"0.71319085",
"0.70621395",
"0.70545214",
"0.70001876",
"0.67105854",
"0.66121274",
"0.65854883",
"0.6511685",
"0.6505907",
"0.64583147",
"0.6398349",
"0.6380881",
"0.63494456",
"0.63442296",
"0.63309294",
"0.63192916",
"0.6281735",
"0.62536454",
"0.6243578",
"0.... | 0.79532456 | 0 |
Return age with currentmeters. | def SZFh(YKHO, EcVT):
T4M1 = oyIN.ones(EcVT.shape)
T4M1[:, 0] = rLdf.to_datetime(EcVT[:, 1]).year - EcVT[:, 0]
T4M1[:, 1] = EcVT[:, 2]
return T4M1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N_N1(YKHO):\n ZJe_ = vEMp - YKHO.year\n return ZJe_",
"def N_N1(YKHO):\n return vEMp - YKHO.year",
"def N_N1(YKHO):\n return vEMp - YKHO.year",
"def N_N1(YKHO):\n return YKHO.age",
"def N_N1(YKHO):\n return AdLa.CURRENT_YEAR - YKHO.year",
"def N_N1(YKHO):\n return YKHO.age",
"d... | [
"0.8072585",
"0.8005624",
"0.8005624",
"0.7801879",
"0.7717726",
"0.7699239",
"0.764645",
"0.7630905",
"0.7611926",
"0.760829",
"0.7606074",
"0.7575031",
"0.7575031",
"0.7575031",
"0.7557475",
"0.7545636",
"0.75398916",
"0.7531413",
"0.7441121",
"0.73864776",
"0.73414785",
... | 0.0 | -1 |
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(Odol, YKHO).__init__(*qIxc, **c_sp)
if YKHO.manip_return_code is None:
YKHO.manip_return_code = 0
if YKHO.object_grabber_return_code is None:
YKHO.object_grabber_return_code = 0
if YKHO.des_gripper_pose is ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, *qIxc, **c_sp):\n if qIxc or c_sp:\n super(JwGr, YKHO).__init__(*qIxc, **c_sp)\n if YKHO.header is None:\n YKHO.header = kKAJ.msg.Header()\n if YKHO.cmd is None:\n YKHO.cmd = ''\n if YKHO.cat is None:\n YKHO.cat = ''\n else:\n ... | [
"0.7794164",
"0.7721611",
"0.7721611",
"0.7687804",
"0.7626575",
"0.7565245",
"0.74406534",
"0.74182206",
"0.73521465",
"0.73088044",
"0.72807634",
"0.7238138",
"0.7227902",
"0.72254795",
"0.72254795",
"0.7219563",
"0.7212849",
"0.7212849",
"0.7212849",
"0.7212849",
"0.721284... | 0.0 | -1 |
Checks vowel count, double letter, forbidden strings and returns whether or not sit satisfies conditions | def WgUr(vIwR: str) -> bool:
lzi6 = 0
AIp9 = 0
dHgy = False
n_Ec = ''
for YRbF, sZqf in enumerate(vIwR):
lzi6 += 1 if sZqf in 'aeiou' else 0
AIp9 += 1 if sZqf == n_Ec else 0
if n_Ec + sZqf in YUOo:
dHgy = True
n_Ec = sZqf
return lzi6 >= 3 and AIp9 >= 1... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Mwp_(vIwR):\n lzi6 = ['a', 'e', 'i', 'o', 'u']\n QWf0 = 0\n for cVTd in lzi6:\n if cVTd in vIwR:\n QWf0 += vIwR.count(cVTd)\n if QWf0 > 2:\n return True\n return False",
"def vDaG(GIN8):\n VFMH = 0\n lzi6 = 'aeiou'\n for hcXw in GIN8:\n ... | [
"0.6971542",
"0.68248385",
"0.6652647",
"0.6635341",
"0.66008973",
"0.65079343",
"0.6453528",
"0.6429756",
"0.6311973",
"0.6279592",
"0.6236954",
"0.6218705",
"0.6200517",
"0.6192769",
"0.61464816",
"0.61139685",
"0.6113959",
"0.61121494",
"0.6094367",
"0.6056389",
"0.6040775... | 0.7464414 | 0 |
Returns True if user is a candidate. Costs one database query. | def k0ww(YKHO, CBIr):
return YKHO.candidates.filter(pk=CBIr.pk).exists() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H63j(Emd4, XnWo):\n return T8ck(candidates__student=XnWo)",
"def H63j(Emd4, XnWo):\n return T8ck(candidates__relatedstudent__user=XnWo)",
"def SeQ3(YKHO, CBIr):\n return YKHO.owner == CBIr or YKHO.workers.filter(pk=CBIr.id).exists()",
"def k_LM(YKHO, YEnM):\n CBIr = YKHO.context['request'].us... | [
"0.7259935",
"0.70674884",
"0.6730719",
"0.65276784",
"0.64876944",
"0.6464249",
"0.6393419",
"0.6359417",
"0.63493454",
"0.63210964",
"0.6306662",
"0.63002443",
"0.6246956",
"0.6205753",
"0.6179037",
"0.6172021",
"0.617082",
"0.61521536",
"0.6092689",
"0.6083653",
"0.6074239... | 0.86393374 | 0 |
Returns the normal queryset. In the background we join and prefetch all related models. | def fmfM(YKHO, *qIxc, **B2fa):
return super().get_prefetched_queryset(*qIxc, **B2fa).select_related('user', 'poll').prefetch_related('votes') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JB9A(YKHO, SR0I: models.QuerySet) -> FYrf.QuerySet:\n hWCj = YKHO.model.objects.all()\n if YKHO.filters:\n vexM = Pusg(seET.and_, [eHNT.get() for eHNT in YKHO.filters])\n hWCj = hWCj.filter(vexM)\n if YKHO.sort:\n hWCj = hWCj.order_by(*YKHO.sort)\n hWCj = hWCj.select_related(*[... | [
"0.78477097",
"0.7259695",
"0.7037126",
"0.6867757",
"0.6819712",
"0.6778886",
"0.67473936",
"0.6565618",
"0.65518004",
"0.6402129",
"0.6383351",
"0.6238297",
"0.62120056",
"0.6191736",
"0.61817664",
"0.61370593",
"0.60924804",
"0.607053",
"0.60594714",
"0.59891963",
"0.59883... | 0.6771962 | 6 |
Returns the normal queryset with all assignment polls. In the background we join and prefetch all related models. | def fmfM(YKHO, *qIxc, **B2fa):
return super().get_prefetched_queryset(*qIxc, **B2fa).select_related('assignment').prefetch_related('options', 'options__user', 'options__votes', 'voted', 'groups') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fmfM(YKHO, *qIxc, **B2fa):\n return super().get_prefetched_queryset(*qIxc, **B2fa).prefetch_related('assignment_related_users', 'agenda_items', 'lists_of_speakers', 'tags', 'attachments', 'polls', 'polls__options')",
"def fmfM(YKHO, *qIxc, **B2fa):\n return super().get_prefetched_queryset(*qIxc, **B2fa... | [
"0.7630337",
"0.7000979",
"0.65076745",
"0.6365199",
"0.6278897",
"0.5972492",
"0.5930554",
"0.58636695",
"0.58182603",
"0.5696804",
"0.5686963",
"0.55791265",
"0.55791265",
"0.5462735",
"0.5455535",
"0.5449296",
"0.5441646",
"0.5434988",
"0.54224044",
"0.5422243",
"0.5383985... | 0.7449777 | 1 |
Returns the number of days since start day | def xeih():
RqgG = lJoy('time_stamp.txt')
n5sN = ITS7.localtime(ITS7.time())
if RqgG[0] == n5sN[0]:
return n5sN[7] - RqgG[7]
elif GRk0.isleap(RqgG[0]):
return 366 - RqgG[7] + n5sN[7]
else:
return 365 - RqgG[7] + n5sN[7] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Klka(yKcO: date, Os4s: date) -> int:\n RA_F = Os4s - yKcO\n return RA_F.days + 1",
"def F4g0(YKHO):\n return 1",
"def JdFb(yKcO, Os4s):\n return (Os4s - yKcO).days + 1",
"def epma(KhBf, kepv):\n return (g6xZ(KhBf) - g6xZ(kepv)).days",
"def opNw(YKHO) -> int:\n return (qcWV.today() - Y... | [
"0.7662911",
"0.7637556",
"0.75184983",
"0.7363291",
"0.7343233",
"0.7288119",
"0.71636724",
"0.71007746",
"0.70899326",
"0.7084582",
"0.7071234",
"0.7056898",
"0.70462847",
"0.70361936",
"0.69083375",
"0.6835536",
"0.67967796",
"0.67846334",
"0.67846334",
"0.67706615",
"0.67... | 0.78667194 | 0 |
Convert a string (bytestring in `encoding` or unicode), to unicode. | def brQJ(l5Ny, tZ2K='utf8', UAju='strict'):
if isinstance(l5Ny, QMSQ):
return l5Ny
return QMSQ(l5Ny, tZ2K, errors=UAju) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def brQJ(vIwR):\n if isinstance(vIwR, str):\n return vIwR.decode('utf-8')\n else:\n return QMSQ(vIwR)",
"def brQJ(KCHu, tZ2K='utf-8'):\n if isinstance(KCHu, jKi7.text_type):\n return KCHu\n elif isinstance(KCHu, bytes):\n return KCHu.decode(tZ2K)\n return KCHu",
"def ... | [
"0.85251766",
"0.8524837",
"0.83010745",
"0.81882405",
"0.81632316",
"0.8149855",
"0.8114386",
"0.8092626",
"0.8046262",
"0.7950895",
"0.7921842",
"0.7917224",
"0.78339505",
"0.78276324",
"0.7822083",
"0.780238",
"0.77633584",
"0.77592474",
"0.7722087",
"0.7688505",
"0.768850... | 0.7469589 | 26 |
Instantiate an NlpEngine with a spaCy model | def xMwv(uqvc: str) -> AzJI[npSO, MvSy]:
nqEK = MvSy()
nqEK.load_predefined_recognizers()
if not CNQv.util.is_package(uqvc):
CNQv.cli.download(uqvc)
UWgu = {'nlp_engine_name': 'spacy', 'models': [{'lang_code': 'en', 'model_name': uqvc}]}
duwe = hN3t(nlp_configuration=UWgu).create_engine()
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, xf_u):\n YKHO.__nlp_model: CNQv = xf_u\n YKHO.__pipe_mode = False\n YKHO.__documents = None\n YKHO.__nlp_model.tokenizer = xm8z(YKHO.__nlp_model.vocab)",
"def b8V_(C3ST=None, kmfe=None, KjSY=20):\n if C3ST is not None:\n K9NE = CNQv.load(C3ST)\n print(\"Loaded model '%... | [
"0.66777116",
"0.6516763",
"0.6497612",
"0.6494125",
"0.64900994",
"0.6478523",
"0.64034444",
"0.6387191",
"0.6293386",
"0.61844265",
"0.61250937",
"0.6083482",
"0.6042071",
"0.6016586",
"0.60078216",
"0.5979568",
"0.59571797",
"0.595414",
"0.5954043",
"0.5875853",
"0.5862723... | 0.71796453 | 0 |
Instantiate an NlpEngine with a TransformersRecognizer and a small spaCy model. The TransformersRecognizer would return results from Transformers models, the spaCy model would return NlpArtifacts such as POS and lemmas. | def GsgQ(uqvc: str) -> AzJI[npSO, MvSy]:
from transformers_rec import STANFORD_COFIGURATION, BERT_DEID_CONFIGURATION, TransformersRecognizer
nqEK = MvSy()
nqEK.load_predefined_recognizers()
if not CNQv.util.is_package('en_core_web_sm'):
CNQv.cli.download('en_core_web_sm')
FvlP = Transformers... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xMwv(uqvc: str) -> AzJI[npSO, MvSy]:\n nqEK = MvSy()\n nqEK.load_predefined_recognizers()\n if not CNQv.util.is_package(uqvc):\n CNQv.cli.download(uqvc)\n UWgu = {'nlp_engine_name': 'spacy', 'models': [{'lang_code': 'en', 'model_name': uqvc}]}\n duwe = hN3t(nlp_configuration=UWgu).create_... | [
"0.6309258",
"0.59957725",
"0.5848229",
"0.5831569",
"0.5831549",
"0.56891596",
"0.566701",
"0.5644719",
"0.55836546",
"0.54984206",
"0.5488743",
"0.5468071",
"0.54487264",
"0.5393884",
"0.53751194",
"0.53609306",
"0.53496253",
"0.5299719",
"0.5288677",
"0.5271717",
"0.525315... | 0.7412707 | 0 |
Instantiate an NlpEngine with a TextAnalyticsWrapper and a small spaCy model. The TextAnalyticsWrapper would return results from calling Azure Text Analytics PII, the spaCy model would return NlpArtifacts such as POS and lemmas. | def d2fk(zOU0: str, xtly: str):
from text_analytics_wrapper import TextAnalyticsWrapper
if not zOU0 or not xtly:
raise RuntimeError('Please fill in the Text Analytics endpoint details')
nqEK = MvSy()
nqEK.load_predefined_recognizers()
_4AN = TextAnalyticsWrapper(ta_endpoint=xtly, ta_key=zOU0... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xMwv(uqvc: str) -> AzJI[npSO, MvSy]:\n nqEK = MvSy()\n nqEK.load_predefined_recognizers()\n if not CNQv.util.is_package(uqvc):\n CNQv.cli.download(uqvc)\n UWgu = {'nlp_engine_name': 'spacy', 'models': [{'lang_code': 'en', 'model_name': uqvc}]}\n duwe = hN3t(nlp_configuration=UWgu).create_... | [
"0.6329537",
"0.6134199",
"0.59808147",
"0.57942176",
"0.5723757",
"0.55372757",
"0.5435132",
"0.540155",
"0.5391157",
"0.53365564",
"0.53069323",
"0.5287742",
"0.52663356",
"0.522313",
"0.5202655",
"0.51811576",
"0.5176938",
"0.51603085",
"0.5157487",
"0.5080522",
"0.5060003... | 0.74815893 | 0 |
Get current average value. | def Zmkp(YKHO) -> float:
return YKHO.average | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VjSA(YKHO):\n return YKHO.data['avg']",
"def S8vG(YKHO):\n return (YKHO.current + YKHO.last) / 2.0",
"def S8vG(YKHO):\n return YKHO.properties.get('average')",
"def wGlu(YKHO):\n hkxX = YKHO._timings\n return oyIN.mean(hkxX)",
"def VjSA(YKHO):\n nPrm = YKHO.pair.data\n if nPrm['avg... | [
"0.82754064",
"0.8273873",
"0.80291945",
"0.7965683",
"0.79476863",
"0.79342854",
"0.791237",
"0.7849167",
"0.77748686",
"0.7761742",
"0.77044845",
"0.77001125",
"0.77001125",
"0.7685076",
"0.76703435",
"0.76491344",
"0.7638778",
"0.7489224",
"0.7471779",
"0.7393287",
"0.7391... | 0.84638816 | 0 |
Get argument parser for a class. | def xuJu(dDED) -> WDqQ:
wvEv = None
try:
psfS = _2vT(dDED)
wvEv = psfS.get_argument_parser()
except Exception:
pass
return wvEv | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EpPs():\n wvEv = wvEv.ArgumentParser()\n return wvEv",
"def wvEv(YKHO):\n return YKHO.arg_parser",
"def EpPs():\n wvEv = WDqQ(description=__doc__, formatter_class=JXf6)\n wvEv.add_argument('-s', '--sentence', dest='sentence', help=\"sentence, splitted by ';'\")\n return wvEv",
"def EpPs... | [
"0.7529748",
"0.7425545",
"0.7014187",
"0.6880837",
"0.6880837",
"0.68285406",
"0.6810964",
"0.68031895",
"0.67766315",
"0.67219365",
"0.6719253",
"0.6712278",
"0.6645676",
"0.656488",
"0.65113723",
"0.650896",
"0.6489204",
"0.64720553",
"0.6465023",
"0.6456307",
"0.64529526"... | 0.8027745 | 0 |
Returns a tree with the same structure as `x` but with each leaf replaced by a `_ValueRepresentation` object. | def oQdO(WKvO):
return yOcR.tree_util.tree_map(V8nv, WKvO, is_leaf=lambda WKvO: WKvO is None or isinstance(WKvO, e5kH.Partitioned)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mMDK(hkxX):\n if len(hkxX) == 1:\n return hkxX\n J_Es = oyIN.empty_like(hkxX)\n dHdF = int(oyIN.log2(len(hkxX) + 1) - 1)\n edUh = len(hkxX) - (2 ** (dHdF + 1) - 1)\n if edUh > 0:\n o5j2 = oyIN.s_[:2 * edUh:2]\n J_Es[-edUh:] = hkxX[o5j2]\n hkxX = oyIN.delete(hkxX, o5j2... | [
"0.61983526",
"0.61905545",
"0.58174485",
"0.58076596",
"0.58076596",
"0.56117356",
"0.5321016",
"0.5302137",
"0.5276118",
"0.522799",
"0.5219278",
"0.52188027",
"0.521051",
"0.5197067",
"0.51930845",
"0.5176564",
"0.51745635",
"0.5167721",
"0.5167721",
"0.5164249",
"0.514700... | 0.7618141 | 0 |
Return list of message_ids of messages that have not yet been sent out | def mhws():
w9b8 = LuKW.query.filter(LuKW.sent == False).all()
return w9b8 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OKtI(YKHO, yEHD):\n uxRZ = set()\n for PObu in yEHD:\n H5ew = '%s_%s_%s' % (YKHO.opt_pop3_server, YKHO.opt_global_account['username'], PObu.split()[1])\n if YKHO.helper.get_check_point(H5ew) is not None:\n uxRZ.add(PObu)\n z1Ri = set(yEHD) - uxRZ\n YKHO.helper.log_debug('fi... | [
"0.6564373",
"0.64003205",
"0.6358967",
"0.6358967",
"0.62269306",
"0.61844486",
"0.6127037",
"0.6124186",
"0.6118156",
"0.60941833",
"0.59998477",
"0.5987276",
"0.5964109",
"0.58986986",
"0.58953977",
"0.5858326",
"0.58520764",
"0.5820744",
"0.5820744",
"0.5800344",
"0.57960... | 0.75613105 | 0 |
Converts a number to a number with decimal point. | def x0SS(Z5kt):
if not Z5kt:
return Z5kt
if ZbWC.search('[\\. ][0-9]{3},[0-9]{1,2}$', Z5kt):
return Z5kt.replace('.', '').replace(' ', '').replace(',', '.')
if ZbWC.search('[, ][0-9]{3}\\.[0-9]{1,2}$', Z5kt):
return Z5kt.replace(',', '').replace(' ', '')
if ZbWC.search('[0-9](,[0... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mLGw(BWXx):\n BWXx = ZjSO(BWXx)\n return BWXx",
"def BAPu(exwG):\n return '{:.2f}'.format(exwG)",
"def mx74(mLGw):\n return float(round(SOnQ.Decimal(mLGw), Cfli.precision))",
"def vNe2(BWXx):\n hwDb().prec = 8\n Ty9i = str(BWXx)\n return ZjSO(Ty9i) / ZjSO('1.000000')",
"def zWlT(Cs... | [
"0.7077795",
"0.69462895",
"0.64070225",
"0.6384231",
"0.6351873",
"0.6304567",
"0.627297",
"0.6259637",
"0.6251034",
"0.62466913",
"0.61581266",
"0.60988283",
"0.6085649",
"0.603252",
"0.6031842",
"0.59968853",
"0.5969206",
"0.59469354",
"0.5913636",
"0.59094125",
"0.5906922... | 0.0 | -1 |
Try to extract the expiration date from the given data. | def E2oU(YKHO):
for njyT in YKHO.expiration_patterns:
ad72 = XN37.Regex(njyT).match(YKHO.data, return_match=True, rematch=True, group=0)
if not ad72:
continue
ad72 = ad72[0].strip()
if XN37.Regex(YKHO.regex_numbers).match(ad72, return_match=True):
return YKHO.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uwYH():\n return EGAC('expiry', 'Please enter your expiry date, two digits for the month and two digits for the year')",
"def Qeq9(YKHO, bD7m, nPrm):\n if nPrm.expires_after < ITS7.time():\n del YKHO.data[bD7m]\n nPrm = None\n return nPrm",
"def ad72(YKHO) -> laHg.Optional[qcWV.datet... | [
"0.6765368",
"0.6507341",
"0.6214671",
"0.60990363",
"0.60603565",
"0.6003449",
"0.59971756",
"0.59558797",
"0.59003645",
"0.5898838",
"0.5890946",
"0.58480436",
"0.58217484",
"0.57251346",
"0.5687422",
"0.5601885",
"0.5599184",
"0.5589525",
"0.5566101",
"0.5559045",
"0.55521... | 0.69955814 | 0 |
Set default value for defined field. | def c5Jj(YKHO, Jyyj):
if Jyyj._default is not None:
if callable(Jyyj._default):
WmM4 = Jyyj._default()
else:
WmM4 = Jyyj._default
YKHO.defaults[Jyyj.name] = WmM4 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WmM4(YKHO, WmM4):\n YKHO._set_field('value', WmM4)",
"def UXGE(YKHO):\n YKHO.setValue(YKHO.default_value)",
"def HyJ9(YKHO, wEf2):\n YKHO.set_property('DefaultValue', wEf2)",
"def HyJ9(YKHO, HyJ9):\n YKHO._default_value = HyJ9",
"def HyJ9(YKHO, HyJ9):\n YKHO._default_value = HyJ9",
"de... | [
"0.793816",
"0.7418267",
"0.7380837",
"0.7185621",
"0.7185621",
"0.7185621",
"0.7148132",
"0.7125401",
"0.7056688",
"0.69887215",
"0.6982201",
"0.68796945",
"0.6876141",
"0.68555295",
"0.6811182",
"0.6807332",
"0.6784424",
"0.6783037",
"0.6779412",
"0.6771425",
"0.6703667",
... | 0.86775917 | 0 |
Get Model object or if it is not found then create one. | def cDO8(Emd4, muwo=None, **B2fa):
try:
KAOR = Emd4.get(**B2fa)
except uOn8:
if isinstance(muwo, dict):
B2fa.update(muwo)
KAOR = Emd4.create(**B2fa)
return KAOR | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Oh2N(YKHO, pB3N):\n try:\n C3ST = YKHO.get_model(pB3N)\n except aV9_:\n C3ST = YKHO.initialize_model()\n C3ST.id = pB3N.get('local_id', C3ST.id)\n return C3ST",
"def WjRz(YKHO) -> wOed:\n assert YKHO.model_name\n print('Check if Model exists.')\n if YKHO.model_name in YKHO.... | [
"0.76848316",
"0.7673591",
"0.7368167",
"0.7238984",
"0.72070044",
"0.7024778",
"0.69812745",
"0.6980114",
"0.6961938",
"0.6949769",
"0.69435483",
"0.69435483",
"0.6887673",
"0.6851559",
"0.6830831",
"0.68263364",
"0.6759251",
"0.67446715",
"0.674362",
"0.672204",
"0.6690674"... | 0.611056 | 83 |
Join a different chat channel on Twitch. Note, this function returns immediately, but the switch might take a moment | def kjU1(YKHO, YwkQ):
YKHO._send('JOIN #%s\r\n' % YwkQ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def joinChat(YKHO, OaeV):\n await OaeV.send('Joining the chat kiddo')",
"async def join(OaeV):\n YwkQ = OaeV.message.author.voice.channel\n if OaeV.voice_client is not None:\n return await OaeV.voice_client.move_to(YwkQ)\n await YwkQ.connect()",
"async def join(YKHO, OaeV, *, R5yJ: str... | [
"0.7036636",
"0.6902702",
"0.66494554",
"0.6646213",
"0.66429573",
"0.65229636",
"0.6522512",
"0.64485794",
"0.6419035",
"0.641416",
"0.6394776",
"0.6377304",
"0.63673985",
"0.6365609",
"0.630374",
"0.62790704",
"0.62551767",
"0.6253805",
"0.62377506",
"0.62025845",
"0.619748... | 0.6114248 | 25 |
Setup test fixture for all model tests. | def eCGt():
RkHo()
aiy_() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tbq9(YKHO):\n pass",
"def qTTL(YKHO):\n pass",
"def FCbF(YKHO):\n YKHO.app = RkHo(YKHO.application_under_test)\n try:\n GTYX()\n except Exception as e:\n print('-> err ({})'.format(tTpl.__str__()))\n bxQM(section_name=YKHO.application_under_test)\n aiy_()\n uh_h = xxHK... | [
"0.8034924",
"0.7966587",
"0.7475684",
"0.7444913",
"0.74374974",
"0.74343306",
"0.73820174",
"0.7374081",
"0.7324077",
"0.7293779",
"0.7267342",
"0.7215689",
"0.718387",
"0.7175931",
"0.71700966",
"0.71652836",
"0.71581763",
"0.71337205",
"0.7123558",
"0.7123558",
"0.7115997... | 0.0 | -1 |
Yield successive nsized chunks from l. | def eHxA(vC9B, exwG):
for YRbF in Ni9Y(0, len(vC9B), exwG):
yield vC9B[YRbF:YRbF + exwG] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xJ0H(YKHO, vC9B, exwG):\n for YRbF in range(0, len(vC9B) + 1, exwG):\n yield vC9B[YRbF:YRbF + exwG]",
"def eHxA(YKHO, vC9B, exwG):\n for YRbF in range(0, len(vC9B), exwG):\n yield vC9B[YRbF:YRbF + exwG]",
"def I7IE(vC9B, exwG):\n for YRbF in range(0, len(vC9B), exwG):\n yield ... | [
"0.80388075",
"0.7924573",
"0.79226995",
"0.788447",
"0.7877021",
"0.781505",
"0.7764907",
"0.77549165",
"0.7743869",
"0.7731126",
"0.77281487",
"0.77241385",
"0.77024275",
"0.7688614",
"0.7688614",
"0.7663561",
"0.7656419",
"0.76552874",
"0.76552874",
"0.76452404",
"0.764524... | 0.0 | -1 |
Create a dependency object from a DB dependency dict. | def FIMM(YKHO, _fuv: dict):
YKHO._config = _fuv | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jG8h(Emd4, qHj0) -> 'DependencyValue':\n return gnPz.deserialize_model(qHj0, Emd4)",
"def CCiu(Emd4, tbx9: dict) -> 'BaseDataConnection':\n pass",
"def jG8h(Emd4, BiR6):\n return Xlpl.from_dict(data_class=Emd4, data=BiR6)",
"def jG8h(YKHO, cmPJ, vjcZ, uJjO=None, Z33g=None):\n CBIr = vjcZ.get_... | [
"0.6852481",
"0.60002345",
"0.59658813",
"0.5847309",
"0.57865566",
"0.57640845",
"0.5764",
"0.574865",
"0.56398195",
"0.5509046",
"0.54535604",
"0.54454505",
"0.5443455",
"0.5420895",
"0.5417176",
"0.54124546",
"0.54124546",
"0.54124546",
"0.54124546",
"0.54124546",
"0.54124... | 0.0 | -1 |
Return the dependency type. | def type(YKHO) -> str:
return YKHO._config.get('type') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eSf9(YKHO, oeNL):\n return YKHO.sentence[oeNL].getDependenceType()",
"def FRul(YKHO):\n return YKHO.type",
"def FRul(YKHO):\n return YKHO.type",
"def type(YKHO):\n return YKHO.container['type']",
"def type(YKHO):\n return YKHO.container['type']",
"def YwLH(YKHO):\n return YKHO.type"... | [
"0.66796106",
"0.6395118",
"0.6395118",
"0.6391446",
"0.6391446",
"0.6381704",
"0.63696474",
"0.63696474",
"0.63605577",
"0.63605577",
"0.63605577",
"0.63605577",
"0.63605577",
"0.63605577",
"0.63605577",
"0.63605577",
"0.63605577",
"0.63605577",
"0.63605577",
"0.63605577",
"... | 0.0 | -1 |
Get the height of the board. | def VAHQ(YKHO):
return YKHO._grid_height | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H2v2(YKHO):\n return YKHO.board.shape[0]",
"def bAiv(YKHO):\n return YKHO.height",
"def bAiv(YKHO):\n return YKHO.height",
"def bAiv(YKHO):\n return YKHO._height",
"def VAHQ(YKHO):\n return YKHO._height",
"def VAHQ(YKHO):\n return YKHO._height",
"def xglF(YKHO):\n return YKHO._... | [
"0.85063905",
"0.78268176",
"0.78268176",
"0.77902925",
"0.77875626",
"0.77875626",
"0.77665955",
"0.77665955",
"0.77665955",
"0.77665955",
"0.7765325",
"0.7761614",
"0.7758976",
"0.7755297",
"0.77416444",
"0.77371883",
"0.77204704",
"0.7695517",
"0.7692841",
"0.7692841",
"0.... | 0.76299065 | 27 |
Ensure we can get student objects. | def ChPy(YKHO):
Siu_ = YKHO.create_School(2, 20)
bD7m = '/students'
for YRbF in range(10):
nPrm = {'first_name': 'Poompatai', 'last_name': 'Puntitpong', 'age': 20, 'nationality': 'Thailand', 'school': Siu_[0]}
geh0 = YKHO.client.post(bD7m, nPrm, format='json')
geh0 = YKHO.client.get(bD7m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ri3R(YKHO):\n pass",
"def B4bq(YKHO):\n try:\n print(str(YKHO.__student_controller))\n except zbco as re:\n print(ZbWC)\n return",
"def FIMM(YKHO):\n YKHO.students = {}",
"def GjQf(YKHO):\n bD7m = gxEw('get_students_features', kwargs={'course_id': YKHO.course.id.to_dep... | [
"0.67002726",
"0.60937667",
"0.6019808",
"0.59977525",
"0.59746265",
"0.5940141",
"0.5893593",
"0.5874697",
"0.58580077",
"0.5848654",
"0.5818573",
"0.5781427",
"0.5772508",
"0.5756074",
"0.575212",
"0.5670481",
"0.56360984",
"0.56344455",
"0.55732244",
"0.55711555",
"0.55393... | 0.5367133 | 34 |
Creates the SPARQL pattern to filter the graph according to the premise of this rule (i.e., all literals in the premise). | def V4n3(YKHO, pNZh: Graph, WwHl: URIRef, O5zP: URIRef, GwOM: URIRef) -> AzJI[str, h8nf[GVaG]]:
b6H_ = ''
m6Y4 = None
Te5c = None
JVAj = None
for ndOX in YKHO.antecedents:
BaPj = ndOX.relation.uri
if BaPj == O5zP:
m6Y4 = f'?{ndOX.literal_subject}'
Te5c = f'?{n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Pe9W(YKHO):\n znBJ = []\n b6H_ = {}\n Ofzt = []\n for pmON, eD8c in YKHO.rules:\n if not YKHO.is_rule(eD8c):\n pass\n VVOC = eD8c['_rule_type']\n zhyQ = YKHO.sql_generators[VVOC](pmON, eD8c)\n if zhyQ is not None:\n znBJ.append(zhyQ)\n if 'pa... | [
"0.5640796",
"0.56134504",
"0.56025726",
"0.55813146",
"0.5409966",
"0.51362306",
"0.50652134",
"0.50593764",
"0.5034537",
"0.49820298",
"0.49720347",
"0.49263874",
"0.4914475",
"0.48920816",
"0.48728907",
"0.48647857",
"0.48603174",
"0.4859698",
"0.4849195",
"0.48317784",
"0... | 0.5490746 | 4 |
r"""Computes a sparsely evaluated softmax. | def N93T(zZcM: Tensor, d6pt: Optional[Tensor]=None, AsCw: Optional[Tensor]=None, EKkU: Optional[int]=None, tpio: int=0) -> llWB:
if AsCw is not None:
tpio = tpio + zZcM.dim() if tpio < 0 else tpio
zNig = [1] * tpio + [-1]
UHFx = AsCw[1:] - AsCw[:-1]
AsCw = AsCw.view(zNig)
NIW... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def j48n(o7sj, tpio):\n yDqo = o7sj.dtype\n begE = o7sj.device\n o7sj = o7sj.coalesce()\n FfMS = float('inf')\n _0VL = o7sj._indices()\n hkxX = o7sj._values()\n if tpio < o7sj.sparse_dim():\n _NIw = o7sj._nnz()\n zNig = o7sj.size()\n FEri = ht2j.ones((o7sj.sparse_dim(), 1)... | [
"0.7821737",
"0.7569942",
"0.7551847",
"0.75240827",
"0.7449907",
"0.73949605",
"0.7382366",
"0.73781186",
"0.73700947",
"0.73700947",
"0.73700947",
"0.73700947",
"0.73700947",
"0.73700947",
"0.73700947",
"0.73700947",
"0.7347379",
"0.73378986",
"0.73333216",
"0.73306376",
"0... | 0.0 | -1 |
Gets the default embed url for this guild. If the widget is not enabled, this endpoint will 404. | def Q32V(YKHO) -> str:
return (ck73.GUILD_BASE + '/embed.png').format(guild_id=YKHO.id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vP9t(YKHO):\n return YKHO.embed_url",
"def vP9t(YKHO):\n if not YKHO._oembed:\n return ''\n if not YKHO.original_url:\n return ''\n return 'https://w.soundcloud.com/player/?url=%s' % YKHO.original_url",
"def vP9t(YKHO):\n if not YKHO.original_url:\n return ''\n if not... | [
"0.71179944",
"0.6908282",
"0.6827079",
"0.66636914",
"0.6631826",
"0.6496669",
"0.64584064",
"0.6445753",
"0.6255571",
"0.62260836",
"0.61648464",
"0.5945101",
"0.5915735",
"0.5906226",
"0.58611506",
"0.58585626",
"0.5837658",
"0.58164734",
"0.5771251",
"0.56905174",
"0.5666... | 0.74588627 | 0 |
Gets the invites for this guild. | async def get_invites(YKHO) -> 'typing.List[dt_invite.Invite]':
wWWP = await YKHO._bot.http.get_invites_for(YKHO.id)
wWWP = [Wlg9.Invite(YKHO._bot, **YRbF) for YRbF in wWWP]
try:
J5jR = await YKHO.get_vanity_invite()
except (a2Q3, pgG1):
pass
else:
if J5jR is not None:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def list(YKHO):\n wWWP = []\n from arcgis.gis import GIS\n isinstance(YKHO._gis, GIS)\n bD7m = YKHO._url\n NArs = {'f': 'json', 'num': 100, 'start': 1}\n Ylbp = YKHO._gis._con.get(bD7m, NArs)\n wWWP = Ylbp['invitations']\n while Ylbp['nextStart'] > -1:\n NArs['start'] += 100\n ... | [
"0.7105344",
"0.69937795",
"0.6967634",
"0.6844363",
"0.6404758",
"0.6342184",
"0.6313638",
"0.61439383",
"0.61439383",
"0.6087891",
"0.60308194",
"0.585102",
"0.5832664",
"0.58262444",
"0.5749733",
"0.57105964",
"0.563897",
"0.5587444",
"0.5556794",
"0.5501028",
"0.547931",
... | 0.76706654 | 0 |
Gets the bans for this guild. | async def get_bans(YKHO) -> 'typing.List[dt_user.User]':
if not YKHO.me.guild_permissions.ban_members:
raise Dad4('ban_members')
l_0t = await YKHO._bot.http.get_bans(YKHO.id)
DW23 = []
for gFsc in l_0t:
gFsc = gFsc.get('user', None)
DW23.append(DQpY.User(YKHO._bot, **gFsc))
r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def bans(YKHO, OaeV):\n try:\n l_0t = await YKHO.bot.get_bans(OaeV.message.server)\n except ZOrr.Forbidden:\n await YKHO.bot.say('I do not have the proper permissions')\n except ZOrr.HTTPException:\n await YKHO.bot.say('Getting bans failed')\n else:\n await YKHO.bot.sa... | [
"0.6886236",
"0.6713512",
"0.6689792",
"0.6257416",
"0.60631204",
"0.5812861",
"0.5782474",
"0.56242865",
"0.55663234",
"0.5406851",
"0.5211844",
"0.5188771",
"0.51777005",
"0.51518244",
"0.51489145",
"0.51450855",
"0.51394767",
"0.51219463",
"0.5105906",
"0.510097",
"0.50949... | 0.71995574 | 0 |
Gets the webhooks for this guild. | async def get_webhooks(YKHO) -> 'typing.List[dt_webhook.Webhook]':
P9zf = await YKHO._bot.http.get_webhooks_for_guild(YKHO.id)
a2t6 = []
for yWCP in P9zf:
a2t6.append(YKHO._bot.state.make_webhook(yWCP))
return a2t6 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def P9zf(YKHO) -> qQXR:\n try:\n return YKHO.api(method='GET', endpoint=f'all/webhooks.json').json()\n except Exception as e:\n raise tTpl",
"def P9zf(YKHO):\n return Xdog(YKHO._client, YKHO.id)",
"def P9zf(YKHO) -> h8nf[bdIy['outputs.MutatingWebhook']]:\n return qe4Y.get(YKHO, 'webho... | [
"0.6820525",
"0.6778464",
"0.67231727",
"0.67025614",
"0.666831",
"0.62340087",
"0.62335944",
"0.611383",
"0.5872288",
"0.5559806",
"0.5405932",
"0.53790724",
"0.52683055",
"0.5257497",
"0.5236784",
"0.5202617",
"0.5202617",
"0.51657933",
"0.5126988",
"0.51090825",
"0.5097852... | 0.7003051 | 0 |
Gets the widget info for the current guild. | async def get_widget_info(YKHO) -> 'typing.Tuple[bool, typing.Union[None, channel.Channel]]':
U34r = await YKHO._bot.http.get_widget_status(YKHO.id)
return (U34r.get('enabled', False), YKHO.channels.get(int(U34r.get('channel_id', 0)))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def server_info(YKHO, OaeV):\n if OaeV.author.bot == False:\n Q1PJ = ZOrr.Embed(title=OaeV.guild.name, colour=OaeV.guild.owner.colour)\n Q1PJ.set_thumbnail(url=OaeV.guild.icon_url)\n kL40 = [len(list(filter(lambda r8hN: str(r8hN.status) == 'online', OaeV.guild.members))), len(list(fil... | [
"0.598221",
"0.58984613",
"0.58862126",
"0.57446456",
"0.5690402",
"0.564421",
"0.56369436",
"0.55805933",
"0.5483065",
"0.5479517",
"0.54745346",
"0.5445657",
"0.53902596",
"0.5382697",
"0.52869904",
"0.5268995",
"0.5254527",
"0.52532613",
"0.5236347",
"0.5227437",
"0.520712... | 0.7259492 | 0 |
Check that the fileupload field data contains a valid image (GIF, JPG, PNG, etc. whatever Pillow supports). | def WOxh(YKHO, nPrm):
eHNT = super().to_python(nPrm)
if eHNT is None:
return None
if hasattr(eHNT, 'seek') and callable(eHNT.seek):
eHNT.seek(0)
return eHNT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aO7N(LNo8):\n tO9_ = N7gp(LNo8)\n if tO9_:\n raise sUXu(tO9_)",
"def ZM12(YKHO):\n bD7m = LDEV(YKHO.recipe.id)\n Ylbp = YKHO.client.post(bD7m, {'image': 'not_image'}, format='multipart')\n YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_400_BAD_REQUEST)",
"def gKPP(LNo8):\n return ZbW... | [
"0.7209003",
"0.701283",
"0.6928476",
"0.6868208",
"0.6840397",
"0.669595",
"0.66787404",
"0.6673956",
"0.6660406",
"0.6651892",
"0.66257185",
"0.66222644",
"0.65953416",
"0.6594749",
"0.65880215",
"0.657784",
"0.65657496",
"0.6558707",
"0.65190226",
"0.6509398",
"0.647481",
... | 0.0 | -1 |
Load a pfm file as a numpy array | def ymll(nUeQ):
nUeQ = open(nUeQ, 'rb')
qfpW = None
TVTK = None
H2v2 = None
NXpY = None
dmhX = None
WBPg = nUeQ.readline().rstrip()
if WBPg == b'PF':
qfpW = True
elif WBPg == b'Pf':
qfpW = False
else:
raise Exception('Not a PFM file.')
Htse = nUeQ.read... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vrzX(Ux0P):\n Ux0P = NBjn(Ux0P)\n with open(Ux0P, 'r', encoding='ISO-8859-1') as nUeQ:\n fHmP = 3 if nUeQ.readline().rstrip() == 'PF' else 1\n TVTK, H2v2 = [int(WKvO) for WKvO in nUeQ.readline().rstrip().split()]\n ROpF = (H2v2, TVTK, fHmP)\n VXjJ = oyIN.fromfile(nUeQ, '{0}{1}... | [
"0.7168331",
"0.67942333",
"0.6766622",
"0.6746099",
"0.66631687",
"0.66081446",
"0.6573312",
"0.64853144",
"0.64757055",
"0.64460194",
"0.63697314",
"0.6354761",
"0.6304555",
"0.62857765",
"0.6278143",
"0.6269284",
"0.62009907",
"0.6198456",
"0.6192154",
"0.61494",
"0.613625... | 0.7168952 | 0 |
Closes the input stream. Implement for each class inheriting from this base class. | def DDI8(YKHO):
raise NotImplementedError('`close` method is not implemented!') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DDI8(YKHO):\n YKHO.p.close(YKHO.inStream)",
"def DDI8(YKHO):\n YKHO._raw_stream.close()",
"def DDI8(t8BC):\n t8BC.close()",
"def DDI8(YKHO):\n ytKZ()\n if YKHO._input is not None:\n YKHO._input.Close()\n YKHO._input = None",
"def DDI8(YKHO) -> None:\n YKHO._stream.close()",
... | [
"0.77910525",
"0.74855524",
"0.72816855",
"0.72583944",
"0.71702224",
"0.7096506",
"0.707678",
"0.6951112",
"0.6813278",
"0.67478746",
"0.662871",
"0.66201234",
"0.6612518",
"0.6608153",
"0.6597965",
"0.6583388",
"0.6546983",
"0.6536023",
"0.6501895",
"0.6499266",
"0.6491975"... | 0.635868 | 30 |
Test the ``plt_residual_offsets`` function | def cCm5():
oQRR = kjgs()
ONXy = UDqJ()
oQRR.source = CJD_(data=ONXy)
oQRR.add_time_column()
oQRR.setup_date_range()
Aofo = oQRR.plt_residual_offsets()
assert IlO0 == type(Aofo) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mBEO(m2Zb, XP5J, WKvO, LVAh, W9fC):\n return (LVAh - m2Zb(XP5J, WKvO)) / W9fC",
"def llHw(YKHO):\n WKvO = [1.0, 2.0, 3.0, 4.0, 5.0]\n LVAh = [2.1, 4.2, 5.9, 8.4, 9.6]\n Aofo = pTCK(WKvO, LVAh)\n YKHO.assertFloatEqual(Aofo, [-0.1, 0.08, -0.14, 0.44, -0.28])",
"def pJ1Q(YKHO) -> TT44:\n pas... | [
"0.67898595",
"0.6704861",
"0.65182054",
"0.63889945",
"0.63721776",
"0.62628126",
"0.6231846",
"0.6057031",
"0.5902097",
"0.5881215",
"0.5877174",
"0.58343905",
"0.5807807",
"0.57777864",
"0.5720431",
"0.56970227",
"0.56752205",
"0.5602011",
"0.5599224",
"0.5550275",
"0.5507... | 0.6831052 | 0 |
For all OpenMM particle parameters, set charge to 0 | def zGdN(J_Kc, gMBN, t5MT=None):
Y8mx = False
if t5MT is None:
t5MT = []
Y8mx = True
for DHvX in gMBN.getSystem().getForces():
if isinstance(DHvX, IbNv.NonbondedForce):
for YRbF in range(DHvX.getNumParticles()):
if Y8mx:
t5MT.append(DHv... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E4ZK(YKHO):\n for _oWe in YKHO.params:\n if 'optimizer_param' in _oWe.tags:\n _oWe.set_value(oyIN.zeros(_oWe.get_value(borrow=True).shape, dtype=e89i.config.floatX))",
"def ZbYE(YKHO):\n YKHO.cm = oyIN.array([0, 0, 0])\n YKHO.m = 0\n YKHO.iT = oyIN.identity([3, 3])",
"def frhb... | [
"0.6424862",
"0.60686916",
"0.59661573",
"0.59435624",
"0.5915792",
"0.5898966",
"0.5853008",
"0.58226246",
"0.58226246",
"0.57962126",
"0.57962126",
"0.57888985",
"0.5769204",
"0.5768316",
"0.5761745",
"0.5741",
"0.57274556",
"0.5710388",
"0.56893355",
"0.5670834",
"0.567017... | 0.58371806 | 7 |
Transform a matrix of positive elements to a markovlike matrix by dividing each row by the sum of the elements of the row. | def yrTy(CGbr, Y1zV=False):
E9TO = oyIN.array(CGbr, dtype=oyIN.float64)
if Y1zV:
E9TO = E9TO.T + E9TO
YJY3 = len(E9TO)
assert YJY3 == len(E9TO[0])
for YRbF in range(YJY3):
if (E9TO[YRbF, :] < 0).any():
raise ValueError('All the elements in the input matrix mus... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M3Zm(YKHO, SppC, RfIB):\n SppC = SppC.astype(float)\n XTiz.multiply(SppC, SppC, SppC)\n XTiz.divide(SppC, RfIB, SppC)\n SppC = XTiz.transpose(SppC)\n XTiz.divide(SppC, RfIB, SppC)\n SppC *= 100\n return SppC.astype(XTiz.int)",
"def DnXX(r8hN):\n r8hN = cYXn(r8hN)\n FtBq = sum(r8hN,... | [
"0.5759078",
"0.5739116",
"0.5723317",
"0.5613334",
"0.55930793",
"0.55659616",
"0.5564418",
"0.55388045",
"0.5536578",
"0.5517576",
"0.551429",
"0.5498729",
"0.5493847",
"0.54323244",
"0.54098535",
"0.5359036",
"0.5287974",
"0.5270153",
"0.5248449",
"0.52344084",
"0.52234775... | 0.57102346 | 3 |
Normalize a vector by dividing each element by the total sum of all its elements | def NkkI(THMg):
THMg = oyIN.array(THMg)
zNig = len(THMg)
MCOv = sum(THMg)
if MCOv != 0.0:
for YRbF in range(zNig):
THMg[YRbF] = THMg[YRbF] / MCOv
return THMg | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cswH(iArr):\n return oyIN.divide(iArr, float(sum(iArr)))",
"def Z7xS(Ty9i):\n WuUW = 1.0 / sum(Ty9i)\n HBfW = [YRbF * WuUW for YRbF in Ty9i]\n return HBfW",
"def NkkI(ezWE):\n wjRY = sum(ezWE)\n return list(map(lambda WKvO: WKvO / wjRY, ezWE))",
"def NkkI(he6J):\n return he6J / u54L(... | [
"0.81921554",
"0.80004805",
"0.7677651",
"0.76440805",
"0.76382816",
"0.75637466",
"0.75351405",
"0.75155896",
"0.74846435",
"0.7402586",
"0.7385171",
"0.7378984",
"0.734323",
"0.7335654",
"0.7318486",
"0.72886264",
"0.7257571",
"0.72418565",
"0.7230987",
"0.71928865",
"0.711... | 0.82843494 | 0 |
Calculate the eigen values and eigen vectors of the transposed transition matrix | def cPes(CGbr):
PPJ0(CGbr)
YJY3 = len(CGbr)
oNRe, Svjc = GToF(CGbr)
ufVO, Sj_L = oyIN.linalg.eig(oNRe.T)
Sj_L = Sj_L.T
FEvo = oyIN.isclose(ufVO, 1.0, atol=1e-06)
xLa9 = [not oyIN.iscomplex(rdlD).any() for rdlD in Sj_L]
RYo3 = YJY3 - len(Svjc)
D5iy = oyIN.zeros(RYo3)
for Q0p_, gKH... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def J6jV(E3D9):\n hkxX, F_On = oyIN.linalg.eig(E3D9)\n return (hkxX, F_On)",
"def FsQI(SppC):\n yzQ0 = None\n Ty9i = None\n yzQ0, Ty9i = oyIN.linalg.eig(SppC)\n return (yzQ0, Ty9i)",
"def PloY(YKHO):\n yzQ0, cAlv = aJJu.eigh(YKHO.K)\n Z9rn = yzQ0[::-1]\n if isinstance(YKHO.num_xi, fl... | [
"0.72649026",
"0.7148297",
"0.70320636",
"0.68540686",
"0.6627855",
"0.6584551",
"0.65067756",
"0.6504993",
"0.64850354",
"0.6443049",
"0.64367837",
"0.6435948",
"0.6428457",
"0.6410131",
"0.6401041",
"0.6346989",
"0.6331505",
"0.6327404",
"0.6317906",
"0.63075197",
"0.630146... | 0.0 | -1 |
Test exporting assessments with conflicting custom attribute names. | def VOOP(YKHO):
YKHO.import_file(u'assessment_template_no_warnings.csv')
YKHO.import_file(u'assessment_with_templates.csv')
jCeH = FYrf.Assessment.query.filter(FYrf.Assessment.slug == u'A 2').first()
Mb1j = FYrf.CustomAttributeDefinition(attribute_type=u'Text', title=u'ca title', definition_type=u'asses... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hMyx(YKHO):\n YKHO.import_file('assessment_template_no_warnings.csv')\n geh0 = YKHO.import_file('assessment_with_templates.csv')\n YKHO._check_csv_response(geh0, {})\n jCeH = FYrf.Assessment.query.filter(FYrf.Assessment.slug == 'A 4').first()\n hkxX = set((Ty9i.attribute_value for Ty9i in jCeH.c... | [
"0.6372443",
"0.6248295",
"0.6026427",
"0.5942778",
"0.58766216",
"0.5788114",
"0.5778432",
"0.56836873",
"0.568146",
"0.56199855",
"0.56040704",
"0.55626106",
"0.55357933",
"0.5510906",
"0.5504582",
"0.5491917",
"0.54792255",
"0.54728407",
"0.54683757",
"0.5463582",
"0.54556... | 0.7195836 | 0 |
Return a name for this data set (likely set during the constructor) | def W0tD(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def j3aw(YKHO):\n return YKHO.dataset.name",
"def j3aw(YKHO):\n return YKHO._dataset_name",
"def P6gR(YKHO):\n raise NotImplementedError",
"def P6gR(YKHO):\n return YKHO.dataset_name",
"def mWFP(YKHO):\n return 'data_extraction_for_' + '_'.join(YKHO.names).lower()",
"def mWFP(YKHO):\n r... | [
"0.7717186",
"0.76749545",
"0.7661689",
"0.7556866",
"0.7321283",
"0.7303024",
"0.72896355",
"0.7206409",
"0.7192157",
"0.7192157",
"0.71811366",
"0.71686035",
"0.71555495",
"0.71555495",
"0.71555495",
"0.71555495",
"0.71555495",
"0.71555495",
"0.71555495",
"0.71555495",
"0.7... | 0.0 | -1 |
Initialize Wav2Lip dataset class. | def FIMM(YKHO, SS3M, Ylkb, zpi1, lpha):
YKHO.image_path = SS3M
YKHO.img_size = Ylkb
YKHO.split = lpha
YKHO.all_videos = z9xr(YKHO.image_path, YKHO.split) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, *qIxc, **B2fa):\n super(yhu0, YKHO).__init__(*qIxc, **B2fa)",
"def FIMM(YKHO):\n YKHO.__dataset = None",
"def FIMM(YKHO):\n RKD7.msg('Initializing Twitch parser.')\n YKHO.streams = tuple()\n YKHO.crc32 = 0",
"def FIMM(YKHO, __n6):\n YKHO._dataset = __n6",
"def FIMM(YKHO):\n... | [
"0.6001145",
"0.5979969",
"0.5950341",
"0.5939494",
"0.5899911",
"0.5890568",
"0.58755016",
"0.58668",
"0.58588725",
"0.584755",
"0.5807136",
"0.57497144",
"0.5727289",
"0.57197326",
"0.5710834",
"0.5698481",
"0.5688412",
"0.56869924",
"0.5669083",
"0.5654246",
"0.56534135",
... | 0.0 | -1 |
Create a colormap of flats based no prace per square meter under development | def ilug(YKHO):
YKHO.load_coords()
WKvO = []
LVAh = []
Xlvp = []
for ZfUD in YKHO.coords:
if ZfUD[1] > 52.1 and ZfUD[1] < 52.4 and (ZfUD[2] > 20.8) and (ZfUD[2] < 21.4):
WKvO.append(ZfUD[1])
LVAh.append(ZfUD[2])
Xlvp.append(ZfUD[3])
QrM1.scatter(WKvO, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DBRy():\n MPlo = QrM1.cm.datad['Reds']\n MPlo = list(MPlo)\n MPlo.insert(0, (1, 1, 1))\n MPlo.insert(0, (1, 1, 1))\n GO5N = I8kJ.colors.LinearSegmentedColormap.from_list('my_Reds', MPlo)\n return GO5N",
"def w7ZZ(ywwl):\n iMGt = I8kJ.cm.jet\n _1oH = oyIN.concatenate((oyIN.linspace(0, ... | [
"0.6943691",
"0.6875001",
"0.68058205",
"0.67240196",
"0.6699318",
"0.6668012",
"0.666336",
"0.66537863",
"0.66451186",
"0.6640226",
"0.66197497",
"0.66197497",
"0.660369",
"0.6580764",
"0.6571373",
"0.6571373",
"0.65682155",
"0.6515903",
"0.64752007",
"0.6455428",
"0.6438120... | 0.0 | -1 |
Method returns a string representation of the deck | def ZfF9(YKHO):
TcPZ = '-----------Loading Sequence----------------------------------------------------------------\n'
for rdlD in YKHO.grid:
for fvDH in rdlD:
if fvDH == -1:
TcPZ += 'X\t'
elif fvDH == 0:
TcPZ += '-\t'
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n vIwR = 'Deck contains '\n for YRbF in range(len(YKHO.deck)):\n vIwR += str(YKHO.deck[YRbF].get_suit()) + str(YKHO.deck[YRbF].get_rank()) + ' '\n return vIwR",
"def zAg0(YKHO):\n hlel = 'Deck contains'\n for dxhl in YKHO.deck:\n hlel += ' %s' % dxhl\n return hlel ... | [
"0.8406452",
"0.8332581",
"0.82304335",
"0.81441444",
"0.80965894",
"0.79840666",
"0.79818296",
"0.7970407",
"0.7654539",
"0.76412016",
"0.74860907",
"0.74439895",
"0.74439895",
"0.74088955",
"0.7395283",
"0.7355099",
"0.7341276",
"0.7306411",
"0.726058",
"0.7257771",
"0.7220... | 0.0 | -1 |
Return whether a class is a valid Host Filter class. | def sLPk(Emd4):
return type(Emd4) is SnBA.TypeType and issubclass(Emd4, i5Fk) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _Gk6(rV9y):\n if not as9g(rV9y):\n bo34.error(f'{rV9y!r} is not a class')\n return False\n if not callable(rV9y):\n bo34.error(f'{rV9y!r} is not callable')\n return False\n if WhLE(rV9y.__call__).args != WhLE(aLeZ.__call__).args:\n bo34.error(f\"{rV9y!r} '__call__' m... | [
"0.7400233",
"0.6322352",
"0.6105194",
"0.60316503",
"0.5810963",
"0.57681763",
"0.5738779",
"0.5673392",
"0.56654876",
"0.56495607",
"0.56482285",
"0.56318885",
"0.55875075",
"0.5574385",
"0.55625176",
"0.5555831",
"0.5548639",
"0.55474895",
"0.55452776",
"0.55308455",
"0.55... | 0.835078 | 0 |
Gets a substring of a line, from x1 to x2 [inclusive, exclusive) | def hCHX(YKHO, LVAh, o4D3, ajwV):
return YKHO.lines[LVAh][o4D3:ajwV] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NiKf(YKHO, yKcO: ir.FloatingValue, Os4s: ir.FloatingValue) -> _ABP.LineStringValue:\n return IPme.GeoLineSubstring(YKHO, yKcO, Os4s).to_expr()",
"def W4oG(YKHO, yKcO, Os4s):\n return YKHO.input[yKcO:Os4s]",
"def Ft8l(HLDs, UkhN, zFiD):\n yKcO = zFiD.find(HLDs)\n if yKcO >= 0:\n yKcO = yK... | [
"0.67367285",
"0.67278343",
"0.6501663",
"0.64438224",
"0.60840136",
"0.6077105",
"0.6071085",
"0.5976423",
"0.59403944",
"0.59112716",
"0.58666843",
"0.58606637",
"0.58606637",
"0.5832403",
"0.5779781",
"0.5741213",
"0.57312834",
"0.57237965",
"0.57098037",
"0.56422216",
"0.... | 0.81611043 | 0 |
Row normalization function Implement a function that normalizes each row of a matrix to have unit length. | def U95B(WKvO):
qRo7 = oyIN.sqrt(oyIN.sum(WKvO ** 2, axis=1))
sHpf = oyIN.reshape(qRo7, (-1, 1))
WKvO /= sHpf
return WKvO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def U95B(WKvO):\n XsBg = oyIN.linalg.norm(WKvO, 2, axis=1).reshape(WKvO.shape[0], -1)\n WKvO = WKvO / XsBg\n return WKvO",
"def U95B(WKvO):\n WKvO = WKvO / oyIN.sqrt(oyIN.sum(WKvO * WKvO, axis=-1, keepdims=True))\n return WKvO",
"def U95B(WKvO):\n ywwl = WKvO.shape[0]\n WKvO /= oyIN.sqrt(o... | [
"0.8100325",
"0.80679506",
"0.7920536",
"0.7845435",
"0.7514513",
"0.7423473",
"0.74134856",
"0.7315453",
"0.71876514",
"0.7096419",
"0.7090385",
"0.6912171",
"0.68501747",
"0.67711014",
"0.6762052",
"0.6597388",
"0.65409607",
"0.65031916",
"0.65025306",
"0.6491698",
"0.64803... | 0.7916425 | 3 |
|coro| Ban a user from the team. | async def ban(YKHO, CBIr: User, *, lo9Y: str=None, lcrb: datetime.datetime=None, j5R8: int=None):
if j5R8 is not None and lcrb is not None:
raise lhyT('Specify delete_message_days or delete_after, not both.')
if j5R8 is not None:
wzkt = qcWV.datetime.now(qcWV.timezone.utc)
yk4i = wzkt - ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def hackban(YKHO, OaeV, uJjO: int):\n try:\n await YKHO.liara.http.ban(str(uJjO), str(OaeV.guild.id))\n await OaeV.send('Done. Good riddance.')\n except ZOrr.NotFound:\n await OaeV.send(\"That user doesn't exist.\")\n except ZOrr.Forbidden:\n await OaeV.send(\"Sorry, I do... | [
"0.69669664",
"0.6923701",
"0.6905808",
"0.6826883",
"0.674119",
"0.67385405",
"0.6721724",
"0.6615344",
"0.6611648",
"0.65819037",
"0.6559862",
"0.6556454",
"0.64762133",
"0.6394379",
"0.63453287",
"0.63080794",
"0.63042814",
"0.62889004",
"0.6268676",
"0.62594694",
"0.62564... | 0.59082985 | 36 |
Return date and precipitation data as json | def aj9W():
O99P = cuiw.query(J9Sm.date, J9Sm.prcp).all()
bwJa = rLdf.DataFrame(O99P).set_index('date')
ZGe3 = bwJa.to_dict()
return pz3A(ZGe3) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cBYs():\n dixj = cuiw.query(Ny6I.date, Ny6I.prcp).all()\n dict = {}\n for Aofo in dixj:\n dict[Aofo.date] = Aofo.prcp\n return pz3A(dict)",
"def cBYs():\n pCKc = eHpk.execute(\"SELECT date, prcp FROM Measurement WHERE date BETWEEN '2016-08-23' AND '2017-08-23'\").fetchall()\n tVty = ... | [
"0.81172603",
"0.79339975",
"0.7873939",
"0.78680897",
"0.7852904",
"0.7848465",
"0.78243965",
"0.77953184",
"0.7762617",
"0.7752964",
"0.774965",
"0.7748303",
"0.7717237",
"0.77054465",
"0.76753086",
"0.7662834",
"0.7641662",
"0.7620495",
"0.7620462",
"0.7611507",
"0.7608559... | 0.80652446 | 1 |
Time when the instance was deleted. Empty if not deleted. | def Yq1m(YKHO) -> str:
return qe4Y.get(YKHO, 'delete_time') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F0B_(YKHO) -> str:\n return qe4Y.get(YKHO, 'deleted_time')",
"def Pu2x(YKHO) -> str:\n return qe4Y.get(YKHO, 'destroy_time')",
"def dTlU(YKHO) -> str:\n return qe4Y.get(YKHO, 'deletion_date')",
"def TS3o(YKHO) -> str:\n return qe4Y.get(YKHO, 'destroy_event_time')",
"def d6tY(YKHO) -> h8nf[q... | [
"0.87649816",
"0.7832633",
"0.76353264",
"0.72575474",
"0.6848147",
"0.6733119",
"0.66159266",
"0.66159266",
"0.66159266",
"0.66159266",
"0.6463335",
"0.6421133",
"0.6415361",
"0.6377617",
"0.6340735",
"0.6326473",
"0.63263017",
"0.63263017",
"0.63263017",
"0.6304959",
"0.625... | 0.804285 | 2 |
Function converts string to date | def feVn(UcxK):
if UcxK == '':
return None
else:
return JRYC.strptime(UcxK, '%Y-%m-%d') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BOAD(vIwR):\n NArs = vIwR.strip().split('-')\n lO87 = int(NArs[0])\n x0eS = int(NArs[1])\n CjKC = int(NArs[2])\n Csk6 = _c1T(lO87, x0eS, CjKC)\n return Csk6",
"def FLL4(YKHO, _c1T):\n return SKtv.date_parser(_c1T)",
"def HD4I(LGXO):\n _c1T = LGXO.split('-')\n return JRYC.date(int... | [
"0.824094",
"0.8038457",
"0.7912825",
"0.79072154",
"0.7751148",
"0.77165186",
"0.76758957",
"0.7671344",
"0.7669091",
"0.764955",
"0.7632643",
"0.76314145",
"0.76158357",
"0.7566669",
"0.75314397",
"0.7502928",
"0.7496041",
"0.7481978",
"0.74614275",
"0.73622155",
"0.734941"... | 0.0 | -1 |
Drop rows or cols based on the ratio of NA values along the axis. | def zQHC(jQ3Z, jDK_=0, idx7=0.4):
jQ3Z = jQ3Z.copy()
jDK_ = 0 if jDK_ == 1 else 1
D1Qf = jQ3Z.isna().sum(axis=jDK_) / jQ3Z.shape[jDK_] <= idx7
jQ3Z = jQ3Z.iloc[:, D1Qf.values]
return jQ3Z | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Dimq(jQ3Z):\n lQH5 = oyIN.array([])\n for YRbF in range(jQ3Z.shape[0]):\n if oyIN.sum(rLdf.isnull(jQ3Z.iloc[YRbF])) == jQ3Z.shape[1] - 1:\n lQH5 = oyIN.append(lQH5, YRbF)\n jQ3Z.drop(jQ3Z.index[lQH5.astype(int)], inplace=True)\n for fvDH in jQ3Z.columns:\n ezWE = rLdf.notnu... | [
"0.68152285",
"0.66806734",
"0.6606132",
"0.64539176",
"0.6390422",
"0.6371664",
"0.6363131",
"0.62996393",
"0.6294165",
"0.6228186",
"0.62018967",
"0.6194754",
"0.6069667",
"0.6059363",
"0.6059216",
"0.6054782",
"0.59790504",
"0.5978665",
"0.5977065",
"0.59753233",
"0.589783... | 0.7240114 | 0 |
Compute area under the ROC for regression. | def avdw(Y8eF, aMgO, idx7=0.5):
Y8eF = oyIN.where(Y8eF < idx7, 1, 0)
OU5i = oyIN.where(aMgO < idx7, 1, 0)
mMj0 = N3vq.metrics.roc_auc_score(Y8eF, OU5i)
return mMj0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f0tD(YKHO):\n return 0.5 * oyIN.abs(oyIN.dot(YKHO.x, oyIN.roll(YKHO.y, 1)) - oyIN.dot(YKHO.y, oyIN.roll(YKHO.x, 1)))",
"def tjC2(YKHO):\n f0tD = 0\n for YRbF in YKHO.residues:\n f0tD += YRbF.solvent_acc_area\n return f0tD",
"def tjC2(YKHO):\n return XTiz.prod([Mkmy[1] - Mkmy[0] for Mk... | [
"0.66914207",
"0.6691028",
"0.65666336",
"0.6514005",
"0.6275835",
"0.62515485",
"0.61757225",
"0.6159982",
"0.6149491",
"0.61308426",
"0.60962856",
"0.6095552",
"0.6091085",
"0.6045997",
"0.6041426",
"0.6035901",
"0.5994329",
"0.5972812",
"0.5966892",
"0.5961227",
"0.5958564... | 0.65511185 | 3 |
Takes dict of scores from sklean's cross_validate and converts to df with certain updates. | def MStj(Zsvi):
KFnI = len(list(Zsvi.values())[0])
jQ3Z = D9db(Zsvi, decimals=3, calc_stats=False)
Ty9i = list(map(lambda WKvO: '_'.join(WKvO.split('_')[1:]), jQ3Z.index))
jQ3Z.insert(loc=0, column='metric', value=Ty9i)
uo5I = [True if 'neg_' in KCHu else False for KCHu in jQ3Z['metric']]
for YR... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F9si(cCrA):\n cCrA['user_assessment_date'] = rLdf.to_datetime(cCrA['user_assessment_date'])\n cCrA['user_assessment_age'] = rLdf.to_datetime(cCrA['user_assessment_date'].max() + rLdf.DateOffset(1)) - cCrA['user_assessment_date']\n cCrA['user_assessment_age'] = cCrA['user_assessment_age'].apply(lambda ... | [
"0.6384957",
"0.63551456",
"0.617499",
"0.58769953",
"0.5742682",
"0.5715245",
"0.5707312",
"0.5681102",
"0.5660799",
"0.5657595",
"0.5647516",
"0.5562742",
"0.5552821",
"0.5547868",
"0.5507941",
"0.5467803",
"0.539571",
"0.5362884",
"0.53500915",
"0.5347908",
"0.5310593",
... | 0.6821416 | 0 |
Takes dict of scores from sklean's cross_validate and converts to df. | def D9db(Zsvi, phJ9=3, yXVc=False):
for G1Hx in ['fit_time', 'train_time', 'score_time']:
if G1Hx in Zsvi.keys():
del Zsvi[G1Hx]
Zsvi = rLdf.DataFrame(Zsvi).T
Zsvi.columns = ['f' + str(Z9rn) for Z9rn in Zsvi.columns]
if yXVc:
Zsvi.insert(loc=0, column='mean', value=Zsvi.mean(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TmyM(dDGT):\n Euz2 = rLdf.DataFrame.from_dict(dDGT).drop(['fit_time', 'score_time'], axis=1)\n N_fc = oyIN.abs(Euz2.mean() * 100)\n JNfk = oyIN.abs(Euz2.std() * 100)\n dixj = rLdf.DataFrame({'Accuracy': N_fc, 'Standard Deviation': JNfk})\n y0vk = oyIN.round(dixj.iloc[list(range(1, 19, 2))], deci... | [
"0.6150245",
"0.6125588",
"0.60803777",
"0.60243475",
"0.59991693",
"0.59424186",
"0.5929478",
"0.5906807",
"0.58710146",
"0.58463275",
"0.5824873",
"0.5717466",
"0.56560445",
"0.5653157",
"0.56246173",
"0.5624378",
"0.5621734",
"0.5594994",
"0.5584466",
"0.5580193",
"0.55772... | 0.6881527 | 0 |
waits 1 second so that the QT app is running and then launches the ball animation thread | def iYe6(YKHO):
ITS7.sleep(1)
YKHO.fishbowl.animate_balls() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rf0l(YKHO):\n YKHO.timer = wDYU.QTimer()\n YKHO.timer.timeout.connect(YKHO.animation)\n YKHO.timer.start(ZNVK)",
"def yKcO(YKHO):\n YKHO.top.after(15, YKHO.video_loop)",
"def yKcO(YKHO):\n if not YKHO._is_running:\n YKHO._pos_thread = gZbH(YKHO.draw_intvl, YKHO._run)\n YKHO._po... | [
"0.6708043",
"0.66499645",
"0.6612362",
"0.6566007",
"0.6504588",
"0.6421836",
"0.6352333",
"0.63310903",
"0.6311518",
"0.62918454",
"0.6288204",
"0.62429243",
"0.62421906",
"0.6222013",
"0.6204568",
"0.6203996",
"0.6195577",
"0.61907804",
"0.61905926",
"0.61809856",
"0.61631... | 0.68744594 | 0 |
Get base classes for the resulting extension type. For jit types, these are simply the bases of the Python class we decorated. For autojitdecorated classes we get a more complicated inheritance scheme (see AutojitExtensionCompiler.get_bases). | def PAnI(YKHO):
return YKHO.py_class.__bases__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def z5vs(YKHO, a1PO):\n if isinstance(a1PO, ZOfv.ClassType):\n return sum((YKHO.get_superclasses(Z9rn) for Z9rn in a1PO.cls.bases), [a1PO])\n elif isinstance(a1PO, ZOfv.AnythingType):\n return [ZOfv.NamedType('builtins.object')]\n elif isinstance(a1PO, ZOfv.GenericType):\n return YKHO... | [
"0.713211",
"0.7131509",
"0.6696836",
"0.666036",
"0.6574672",
"0.622522",
"0.6122663",
"0.61087",
"0.6108414",
"0.6091516",
"0.60429156",
"0.6001359",
"0.6000882",
"0.5891685",
"0.5888856",
"0.58801377",
"0.58759934",
"0.5856311",
"0.5814993",
"0.5803133",
"0.5767041",
"0.... | 0.7490308 | 0 |
Return true iff s appears as a substring | def pDag(YKHO, KCHu):
Q6kx, l4XF = YKHO.followPath(KCHu)
return Q6kx is not None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wurN(Npeo, vIwR):\n return Npeo in vIwR",
"def m3l7(j93S, Nqp_):\n return j93S.find(Nqp_) != -1",
"def IsTy(Y0Fj, Pb4f):\n if Y0Fj in Pb4f:\n return True\n else:\n False",
"def ikBy(qoGC, VyPo, _7nK=0):\n return True",
"def ug2Q(l5Ny: str, UqER: set) -> bool:\n for U6D_ ... | [
"0.7935169",
"0.76511735",
"0.7352866",
"0.70086056",
"0.6864206",
"0.6748644",
"0.6730506",
"0.6711265",
"0.65831876",
"0.65759295",
"0.6573499",
"0.65438676",
"0.6487382",
"0.64675325",
"0.6432309",
"0.6415039",
"0.6415039",
"0.6371927",
"0.63714164",
"0.6360899",
"0.634127... | 0.8062963 | 0 |
Return true iff s is a suffix | def llNc(YKHO, KCHu):
Q6kx, l4XF = YKHO.followPath(KCHu)
if Q6kx is None:
return False
if l4XF is None:
return '$' in Q6kx.out
else:
return Q6kx.lab[l4XF] == '$' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xuwD(ZI14: str, GIN8: str):\n return GIN8.endswith(ZI14)",
"def xuwD(Ty9i, KCHu):\n Z9rn = len(Ty9i) - 1\n exwG = len(KCHu)\n return Z9rn + Ty9i[Z9rn] == 2 * exwG",
"def TsQn(YKHO):\n return False if YKHO.suffix_link is None else True",
"def vbqj(UQhw, ZI14):\n return UQhw.endswith(ZI14... | [
"0.8135886",
"0.8091354",
"0.73786396",
"0.7286839",
"0.71542937",
"0.70127165",
"0.6860003",
"0.6797614",
"0.6696741",
"0.66883916",
"0.66883916",
"0.6622363",
"0.6605842",
"0.65794384",
"0.648719",
"0.64368826",
"0.640317",
"0.6397085",
"0.6335966",
"0.6133945",
"0.6125691"... | 0.8047783 | 2 |
The identity_block is the block that has no conv layer at shortcut Arguments | def aP6R(FRUf, Ot1W, KUnM, EtM5, XkN1, e5sz=True, HVS_=True):
HUUr, IF78, vquH = KUnM
RmTP = 'res' + str(EtM5) + XkN1 + '_branch'
lPXw = 'bn' + str(EtM5) + XkN1 + '_branch'
WKvO = PlVk.Conv2D(HUUr, (1, 1), name=RmTP + '2a', use_bias=e5sz)(FRUf)
WKvO = SwZx(name=lPXw + '2a')(WKvO, training=HVS_)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aP6R(YKHO, FRUf, KUnM, YDYE, EtM5, XkN1, AkBB=True):\n RmTP = 'res' + str(EtM5) + XkN1 + '_branch'\n uFbb = 'batch_norm' + str(EtM5) + XkN1 + '_branch'\n T9jN = FRUf\n WKvO = None\n if AkBB:\n WKvO = GVKG(axis=3, name=uFbb + '_1')(FRUf)\n WKvO = MroH(YDYE)(WKvO)\n else:\n ... | [
"0.7417824",
"0.72852165",
"0.72147304",
"0.72146046",
"0.721052",
"0.71971375",
"0.71670413",
"0.7152859",
"0.7131995",
"0.71131915",
"0.7111289",
"0.708507",
"0.70782053",
"0.7077924",
"0.70730114",
"0.70315313",
"0.70171803",
"0.70157117",
"0.700963",
"0.6998712",
"0.69987... | 0.7029831 | 17 |
conv_block is the block that has a conv layer at shortcut Arguments | def mQG_(FRUf, Ot1W, KUnM, EtM5, XkN1, FEri=(2, 2), e5sz=True, HVS_=True):
HUUr, IF78, vquH = KUnM
RmTP = 'res' + str(EtM5) + XkN1 + '_branch'
lPXw = 'bn' + str(EtM5) + XkN1 + '_branch'
WKvO = PlVk.Conv2D(HUUr, (1, 1), strides=FEri, name=RmTP + '2a', use_bias=e5sz)(FRUf)
WKvO = SwZx(name=lPXw + '2a'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mQG_(YKHO, DVMO, UU6M, b27A):\n return YKHO.add_layer(mQG_, DVMO, UU6M, b27A)",
"def mQG_(input, KUnM, JT9N=JT9N):\n mQG_ = ZylS.layers.conv2d(inputs=input, filters=KUnM, kernel_size=3, padding='SAME', activation=ZylS.nn.relu)\n return mQG_",
"def mQG_(FRUf, Ot1W, KUnM, EtM5, yetk, FEri=(2, 2), wH... | [
"0.75352484",
"0.7485905",
"0.7364652",
"0.72221285",
"0.7209271",
"0.72062933",
"0.72031564",
"0.71860236",
"0.7177927",
"0.7174483",
"0.7160332",
"0.71580297",
"0.71574706",
"0.71514505",
"0.7130759",
"0.71060336",
"0.70997053",
"0.7073006",
"0.70581305",
"0.70305437",
"0.7... | 0.6993496 | 24 |
Lazy powerset construction, automatically prunes itself | def JEys(k0lF):
k0lF = mYi2(k0lF)
Eorb = {frozenset({0}): 0}
nR0l = {0: frozenset({0})}
gZgb = k0lF.alphabet
tjUW = PRXd(1, set())
if 0 in k0lF.accepting:
tjUW.accepting.add(0)
wH8M = {0}
while len(wH8M) > 0:
CQbW = set()
for MbzJ in wH8M:
for o61b in ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R0Xi(jzdc):\n if len(jzdc) == 0:\n return set([frozenset()])\n alQJ = set()\n jzdc = set(jzdc)\n U6D_ = jzdc.pop()\n for vcn7 in R0Xi(jzdc):\n alQJ.add(vcn7)\n alQJ.add(frozenset(set([U6D_]) | vcn7))\n return alQJ",
"def f70Y(YKHO):\n if YKHO._is_empty():\n re... | [
"0.6359265",
"0.6322484",
"0.6185431",
"0.613952",
"0.6014685",
"0.6001673",
"0.59770066",
"0.5972335",
"0.5948192",
"0.59262234",
"0.59124357",
"0.59046215",
"0.5901743",
"0.5848007",
"0.58461493",
"0.58295226",
"0.5825275",
"0.58178276",
"0.58114785",
"0.57671356",
"0.57671... | 0.0 | -1 |
Initialize your data structure here. Set the size of the queue to be k. | def FIMM(YKHO, G1Hx: int):
YKHO.maxlen = G1Hx
YKHO.circular = [None] * G1Hx
YKHO.front = 0
YKHO.rear = -1
YKHO.size = 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, G1Hx):\n YKHO.queue = []\n YKHO.size = G1Hx",
"def FIMM(YKHO, G1Hx):\n YKHO.queue = [0] * G1Hx\n YKHO.headIndex = 0\n YKHO.count = 0\n YKHO.capacity = G1Hx",
"def FIMM(YKHO, G1Hx: int):\n YKHO.queue = [0] * G1Hx\n YKHO.headIndex = 0\n YKHO.count = 0\n YKHO.capacity ... | [
"0.8516782",
"0.8472152",
"0.8441989",
"0.84088355",
"0.83643377",
"0.8301168",
"0.8067307",
"0.8067155",
"0.78686005",
"0.78605986",
"0.77475804",
"0.76817715",
"0.766867",
"0.76042986",
"0.7504088",
"0.71947587",
"0.71298",
"0.6975332",
"0.6913572",
"0.69102687",
"0.6889578... | 0.7387965 | 15 |
Get the front item from the queue. | def y9BR(YKHO) -> int:
return YKHO.circular[YKHO.front] if YKHO.size else -1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uW34(YKHO):\n VnzS = YKHO.queue[YKHO.front]\n return VnzS\n pass",
"def VnzS(YKHO):\n return YKHO.queue[0] if not YKHO.empty() else None",
"def y9BR(YKHO):\n if len(YKHO.queue) >= 1:\n return YKHO.queue[0]\n else:\n return -1",
"def VnzS(gGq6):\n if _OiT(gGq6):\n ... | [
"0.90385115",
"0.89434814",
"0.846308",
"0.8426328",
"0.8357853",
"0.83309764",
"0.83309764",
"0.83211964",
"0.83211964",
"0.82988536",
"0.8279939",
"0.8216258",
"0.8213497",
"0.8213348",
"0.8209029",
"0.8205413",
"0.81683636",
"0.812805",
"0.81277895",
"0.8076473",
"0.799508... | 0.0 | -1 |
Get the last item from the queue. | def kITm(YKHO) -> int:
return YKHO.circular[YKHO.rear] if YKHO.size else -1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XVAW(YKHO):\n if YKHO.is_empty():\n raise ValueError('Queue is empty!')\n return YKHO.last_node().element().value()",
"def XVAW(YKHO):\n return YKHO.deque[-1]",
"def ScHw(YKHO):\n return YKHO.container[YKHO.length - 1]",
"def kITm(YKHO):\n if len(YKHO.queue) >= 1:\n return YK... | [
"0.82451856",
"0.80613",
"0.8023248",
"0.77849776",
"0.7629952",
"0.7628782",
"0.76055205",
"0.75932163",
"0.7584632",
"0.75637347",
"0.7543559",
"0.75429386",
"0.7518005",
"0.7494505",
"0.746898",
"0.7461607",
"0.74455327",
"0.73941535",
"0.73889613",
"0.73865324",
"0.737336... | 0.0 | -1 |
Checks whether the circular queue is empty or not. | def A4KR(YKHO) -> bool:
return not YKHO.size | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FBfn(YKHO):\n return YKHO.queue == []",
"def FBfn(YKHO):\n return len(YKHO.the_queue) == 0",
"def FBfn(YKHO):\n return len(YKHO.queue) == 0",
"def FBfn(YKHO):\n return len(YKHO.queue) == 0",
"def FBfn(YKHO):\n return len(YKHO.__queue) > 0",
"def A4KR(YKHO):\n return 0 == len(YKHO.qu... | [
"0.84918785",
"0.84607804",
"0.8429387",
"0.8429387",
"0.83951026",
"0.82831895",
"0.8246613",
"0.82329935",
"0.8193397",
"0.8184179",
"0.81770307",
"0.8163974",
"0.81180215",
"0.8102001",
"0.80947953",
"0.8042463",
"0.79564434",
"0.7913296",
"0.7909012",
"0.7909012",
"0.7901... | 0.0 | -1 |
Checks whether the circular queue is full or not. | def Yykn(YKHO) -> bool:
return YKHO.size == YKHO.maxlen | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Yykn(YKHO):\n return len(YKHO.queue) == YKHO.size",
"def Yykn(YKHO):\n if len(YKHO.queue) == YKHO.maxlen:\n return True\n else:\n return False",
"def FBfn(YKHO):\n return len(YKHO.__queue) > 0",
"def FBfn(YKHO):\n return len(YKHO.the_queue) == 0",
"def FBfn(YKHO):\n retu... | [
"0.84751034",
"0.8299797",
"0.78827924",
"0.78358734",
"0.782498",
"0.782426",
"0.782426",
"0.7629194",
"0.76109856",
"0.76109785",
"0.75850576",
"0.7578127",
"0.7531097",
"0.7526271",
"0.7490314",
"0.7479896",
"0.747371",
"0.74505204",
"0.7448315",
"0.7435628",
"0.7421604",
... | 0.0 | -1 |
Checks parsed origin is None. Pass control to the validate_origin function. Returns ``True`` if validation function was successful, ``False`` otherwise. | def IIyk(YKHO, cznD):
if cznD is None and '*' not in YKHO.allowed_origins:
return False
return YKHO.validate_origin(cznD) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dadg(YKHO, cznD):\n return any((mXDZ == '*' or YKHO.match_allowed_origin(cznD, mXDZ) for mXDZ in YKHO.allowed_origins))",
"def s9hz(YKHO, hLRM):\n return True",
"def s9hz(YKHO, hLRM):\n return True",
"def s9hz(YKHO, hLRM):\n return True",
"def s9hz(YKHO, hLRM):\n return True",
"def s9h... | [
"0.7646842",
"0.75754607",
"0.75754607",
"0.75754607",
"0.75754607",
"0.70084876",
"0.6954515",
"0.6388186",
"0.6255994",
"0.58356786",
"0.5776445",
"0.5742855",
"0.57113725",
"0.57013065",
"0.5669203",
"0.559975",
"0.55838186",
"0.5581787",
"0.5572417",
"0.5568081",
"0.55658... | 0.8300116 | 0 |
Validate the given origin for this site. Check than the origin looks valid and matches the origin pattern in specified list ``allowed_origins``. Any pattern begins with a scheme. After the scheme there must be a domain. Any domain beginning with a period corresponds to the domain and all its subdomains (for example, | def dadg(YKHO, cznD):
return any((mXDZ == '*' or YKHO.match_allowed_origin(cznD, mXDZ) for mXDZ in YKHO.allowed_origins)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IIyk(YKHO, cznD):\n if cznD is None and '*' not in YKHO.allowed_origins:\n return False\n return YKHO.validate_origin(cznD)",
"def d6gV(YKHO, cznD, mXDZ):\n if cznD is None:\n return False\n A36A = KVWQ(mXDZ.lower())\n if cznD.hostname is None:\n return False\n if not A... | [
"0.7817406",
"0.71039236",
"0.65975267",
"0.6359062",
"0.6315245",
"0.6315245",
"0.6315245",
"0.6315245",
"0.6104404",
"0.6009336",
"0.59931624",
"0.5918373",
"0.5909156",
"0.58889353",
"0.5634858",
"0.53963476",
"0.5246202",
"0.52342856",
"0.5225792",
"0.51650745",
"0.513451... | 0.77178377 | 1 |
Parse the message string message and return a intermediate representation of the message which can in turn be converted into a database tree. The structure is the following. For each keyed node, there is a tuple (node, items) where node is the node object itself and items is a list which contains the data matched by th... | def hfK9(YKHO, Ol8d):
return YKHO.parse_subtree(Ol8d)[1][0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _8oH(tO9_):\n Rf7M = {'messageType': tO9_['messageType'], 'messageID': tO9_['messageID'], 'messageURL': tO9_['messageURL'], 'messageIssueTime': tO9_['messageIssueTime'], 'messageBody': {}}\n UOrz = tO9_['messageBody'].split('\\n## ')\n for Q7me in UOrz:\n try:\n WBPg, TBsA = Q7me.spl... | [
"0.5793024",
"0.5538835",
"0.54343635",
"0.5394789",
"0.5278391",
"0.5263013",
"0.52562886",
"0.5231319",
"0.5206912",
"0.5200666",
"0.5162891",
"0.5160833",
"0.5140216",
"0.50685716",
"0.5037561",
"0.5027684",
"0.50157744",
"0.5014303",
"0.5006186",
"0.50026345",
"0.50000435... | 0.6048471 | 0 |
Convert this message into a struct as required by | def q4AP(YKHO):
Aofo = {}
for Q6kx in filter(lambda WKvO: WKvO.parent is None, YKHO.nodes):
bGrB, EaK5 = Aofo.setdefault(Q6kx.format_node.key, (Q6kx.format_node, []))
EaK5.append(Q6kx.unparse_struct())
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UyVR(YKHO):\n return gpan.to_struct(YKHO)",
"def UyVR(YKHO):\n return {'_class': YKHO.__class__.__name__, 'value': YKHO.__value, 'string': r4Ld(YKHO)}",
"def n5rA(YKHO, str):\n if Fsn6:\n T_Uj.lookup_error('rosmsg').msg_type = YKHO._type\n try:\n if YKHO.Header is None:\n ... | [
"0.69606614",
"0.66855204",
"0.66295105",
"0.6625527",
"0.65596485",
"0.6548119",
"0.6547582",
"0.6521244",
"0.651251",
"0.64892447",
"0.64206463",
"0.64185786",
"0.6413732",
"0.6411368",
"0.63906705",
"0.6379438",
"0.63629615",
"0.6352646",
"0.63384295",
"0.6336275",
"0.6309... | 0.0 | -1 |
Return a string representation of this message. | def fvgm(YKHO):
return YKHO.format.unparse(YKHO.unparse_struct()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return YKHO.message.as_string()",
"def zAg0(YKHO):\n return YKHO.message",
"def zAg0(YKHO) -> str:\n return 'Envelope(to={to}, sender={sender}, protocol_specification_id={protocol_specification_id}, message={message})'.format(to=YKHO.to, sender=YKHO.sender, protocol_specification_id=... | [
"0.82506686",
"0.8225756",
"0.80269396",
"0.78557736",
"0.7790642",
"0.7707805",
"0.7685787",
"0.7668287",
"0.7666409",
"0.7640587",
"0.763899",
"0.7625176",
"0.7625176",
"0.75903517",
"0.7587147",
"0.7585231",
"0.7575343",
"0.75542015",
"0.75542015",
"0.75542015",
"0.7554201... | 0.0 | -1 |
Apply a list conversion for all items in original_list. | def Wsc2(HU2v, DdnK, Ev0K=False, KXwX=[], ynSc=[]):
p1UR = []
for eJh7 in list(HU2v):
p1UR.append(wxRi(eJh7, DdnK, fill_in=Ev0K, whitelist=KXwX, blacklist=ynSc))
return p1UR | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VQlD(vC9B):\n vC9B = [list(LihS) for LihS in vC9B]\n return vC9B",
"def WpHk(YKHO, tJzs):\n S06t = []\n for ZfUD in tJzs:\n S06t.append(YKHO.transform(ZfUD))\n return S06t",
"def iJMr(YKHO, DumB):\n if YKHO.prewrap_fn:\n DumB = [YKHO.prewrap_fn(YRbF) for YRbF in DumB]\n i... | [
"0.669106",
"0.6690905",
"0.6584683",
"0.65592134",
"0.6412425",
"0.63520795",
"0.63383645",
"0.6265066",
"0.6143508",
"0.61312693",
"0.602669",
"0.5987237",
"0.59850675",
"0.59390295",
"0.5894239",
"0.586849",
"0.5865001",
"0.58510715",
"0.5829008",
"0.57371426",
"0.57090354... | 0.63884264 | 5 |
Sets the learning rate to the initial LR decayed by 1/decrease_rate every 10 epochs | def NOBX(GPtr, K0do, qtWj, oZYH=0.1):
if not isinstance(K0do, ht2j.optim.SGD):
return
if qtWj and qtWj % 10 == 0:
for YRbF, Lwm5 in enumerate(K0do.param_groups):
Lwm5['lr'] *= oZYH
bo34.info('Setting learning layer=i, rate=%.6f', YRbF, Lwm5['lr']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e_63(ma4o, K0do, qtWj, lBIP):\n tspZ = ma4o * 0.1 ** (qtWj // lBIP)\n for Lwm5 in K0do.param_groups:\n Lwm5['lr'] = tspZ",
"def e_63(K0do, qtWj, qIxc):\n tspZ = qIxc.lr\n if 20 < qtWj <= 30:\n tspZ = 0.0001\n elif 30 < qtWj:\n tspZ = 1e-05\n for Lwm5 in K0do.param_group... | [
"0.76319885",
"0.75825876",
"0.75803655",
"0.75739485",
"0.7571104",
"0.75655967",
"0.7553353",
"0.7553347",
"0.75393635",
"0.753853",
"0.7529374",
"0.7522825",
"0.75174165",
"0.7517232",
"0.751665",
"0.7509014",
"0.74975663",
"0.74915737",
"0.74904794",
"0.7489288",
"0.74752... | 0.7426548 | 31 |
Generates a batch iterator; this is a generator function | def aNDg(YKHO, nPrm, cCrA, Ep8u):
Zgof = len(nPrm)
PmAP = epAf.ceil(len(nPrm) / Ep8u)
for Bugx in range(PmAP):
V_8U = Bugx * Ep8u
ixQc = min((Bugx + 1) * Ep8u, Zgof)
yield (nPrm[V_8U:ixQc], cCrA[V_8U:ixQc]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vs4Q(YKHO):\n for Wc9F in YKHO.iterator:\n yield Qqmr.from_iterator_batch(Wc9F, YKHO.pad_index, YKHO.sos_index, YKHO.eos_index)",
"def aNDg(WbAn, Ep8u):\n MWN_, BHML, SLOY, j4Qx = ([], [], [], [])\n for bySB in WbAn:\n if len(MWN_) == Ep8u:\n yield (MWN_, BHML, SLOY, j4Qx)\n... | [
"0.7835241",
"0.7798434",
"0.7786397",
"0.7754601",
"0.772694",
"0.7604501",
"0.74915266",
"0.7486854",
"0.7448429",
"0.7426344",
"0.73691976",
"0.733821",
"0.73252404",
"0.7299188",
"0.72931576",
"0.7280207",
"0.72485393",
"0.72469115",
"0.7235672",
"0.72192866",
"0.71851593... | 0.65765446 | 96 |
Decay the learning rate based on schedule | def e_63(tspZ, ILPn, K0do, qtWj, RvCN=0.1):
paSp = list(map(int, ILPn.split(',')))
for iIep in paSp:
tspZ *= RvCN if qtWj >= iIep else 1.0
for Lwm5 in K0do.param_groups:
Lwm5['lr'] = tspZ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TfYV(Cwt5, f9Ey, Aak1, BkRq):\n \"\"\"if staircase == True\n decayed_learning_rate = learning_rate /\n (1 + decay_rate * floor(global_step / decay_step)))\"\"\"\n return ZylS.train.inverse_time_decay(Cwt5, Aak1, BkRq, f9Ey, staircase=True)",
"def b6Gq(qtWj):\n return Cwt5 / (1 + f9Ey * qtWj)",... | [
"0.7373194",
"0.7292736",
"0.7228895",
"0.7211029",
"0.7203241",
"0.72028047",
"0.71989626",
"0.718389",
"0.7162159",
"0.71439254",
"0.7130453",
"0.7110413",
"0.7034126",
"0.70272094",
"0.7019835",
"0.700661",
"0.6999512",
"0.69994646",
"0.69744974",
"0.6970913",
"0.69616294"... | 0.6448708 | 94 |
Computes the accuracy over the k top predictions for the specified values of k | def vjyh(hlel, pan_, hz5a=(1,)):
with ht2j.no_grad():
Gq8e = max(hz5a)
Ep8u = pan_.size(0)
bGrB, nvEb = hlel.topk(Gq8e, 1, True, True)
nvEb = nvEb.t()
gXXc = nvEb.eq(pan_.view(1, -1).expand_as(nvEb))
Ylbp = []
for G1Hx in hz5a:
R2Dg = gXXc[:G1Hx].r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z7qO(LVAh, aMgO, G1Hx=2):\n nvEb = []\n for YRbF in range(len(LVAh)):\n if LVAh[YRbF] in aMgO[YRbF][:G1Hx]:\n nvEb.append(1)\n else:\n nvEb.append(0)\n return sum(nvEb) / len(nvEb)",
"def vjyh(aMgO, ibJh, hz5a=(1,)):\n Gq8e = max(hz5a)\n Ep8u = ibJh.size(0)\... | [
"0.83311",
"0.8286288",
"0.8239192",
"0.82308143",
"0.8221246",
"0.81875855",
"0.81859523",
"0.81764203",
"0.817261",
"0.81711614",
"0.8167704",
"0.8165669",
"0.8164918",
"0.8163395",
"0.8163395",
"0.8163395",
"0.8163395",
"0.8163395",
"0.8163395",
"0.8163395",
"0.8163395",
... | 0.78628665 | 69 |
Create a string of k random characters including letters, digits and whitespace. | def BWvy(G1Hx: int) -> str:
SIyd = vIwR.ascii_letters + vIwR.digits + ' '
return ''.join(tuKI.choices(SIyd, k=G1Hx)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BWvy():\n G1Hx = tuKI.randint(5, 10)\n return ''.join(tuKI.choices(vIwR.ascii_letters + vIwR.digits, k=G1Hx))",
"def BWvy() -> str:\n G1Hx = tuKI.randint(5, 10)\n return ''.join(tuKI.choices(vIwR.ascii_letters + vIwR.digits, k=G1Hx))",
"def Q_QB():\n yvT9 = ''\n for bGrB in range(24):\n ... | [
"0.8146227",
"0.8040712",
"0.760194",
"0.74491227",
"0.74265796",
"0.7365992",
"0.7250787",
"0.72305954",
"0.7218306",
"0.71683806",
"0.7147232",
"0.713552",
"0.71268374",
"0.7106268",
"0.71021384",
"0.70900416",
"0.7037375",
"0.703593",
"0.7031172",
"0.70232606",
"0.70229185... | 0.86409026 | 0 |
Sets the page_number_label of this CRFItemMetadata. | def iDsB(YKHO, iDsB):
YKHO._page_number_label = iDsB | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YUEN(Emd4, klRQ=None):\n Emd4._page_number = klRQ",
"def eSCR(YKHO, B2Dn):\n if B2Dn is not None and (not isinstance(B2Dn, int)):\n raise pDrJ(Byma.DATA_TYPE_ERROR, 'KEY: page EXPECTED TYPE: int', None, None)\n YKHO.__page = B2Dn\n YKHO.__key_modified['page'] = 1",
"def vs_k(YKHO, vs_k):... | [
"0.64171135",
"0.61489177",
"0.6137141",
"0.6114764",
"0.60671866",
"0.60616547",
"0.59743214",
"0.5770319",
"0.5686637",
"0.56367856",
"0.55440176",
"0.5525631",
"0.5525631",
"0.54636943",
"0.5457164",
"0.5397731",
"0.53417575",
"0.5326899",
"0.5301802",
"0.5284346",
"0.5258... | 0.84648216 | 0 |
Sets the question_number_label of this CRFItemMetadata. | def vs_k(YKHO, vs_k):
YKHO._question_number_label = vs_k | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iDsB(YKHO, iDsB):\n YKHO._page_number_label = iDsB",
"def DeTJ(YKHO, JTtA):\n \"\"\" list_question_int is 0 based, the question ids and labels are 1-based \"\"\"\n NLbo = YKHO.get_quiz_question(JTtA)\n lDm5 = JTtA + 1\n UXqs = str(lDm5) + '. ' + NLbo['question_text']\n return UXqs",
"def ... | [
"0.5779019",
"0.5340435",
"0.5264574",
"0.5264574",
"0.5136962",
"0.511571",
"0.5074241",
"0.5045586",
"0.5030891",
"0.5030891",
"0.5030891",
"0.5030891",
"0.5030891",
"0.5030891",
"0.5030891",
"0.5030891",
"0.5030891",
"0.5030891",
"0.5030891",
"0.49965665",
"0.49755958",
... | 0.8306851 | 0 |
Sets the left_item_text of this CRFItemMetadata. | def hxaH(YKHO, hxaH):
YKHO._left_item_text = hxaH | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZIZB(YKHO, UXqs):\n YKHO._setlabel(G07k, UXqs)",
"def SlQC(YKHO, SlQC):\n YKHO._right_item_text = SlQC",
"def l1ll(YKHO, ZfUD, LNo8):\n ZfUD.SetLeftImage(LNo8)\n Bc4p = lnPd.ClientDC(YKHO)\n YKHO.CalculateSize(ZfUD, Bc4p)\n YKHO.RefreshLine(ZfUD)",
"def GVcf(YKHO, l5Ny):\n YKHO._top_... | [
"0.65293217",
"0.63202965",
"0.6260443",
"0.6179439",
"0.604142",
"0.5959585",
"0.5953809",
"0.5933594",
"0.5860581",
"0.5860581",
"0.5850252",
"0.56611806",
"0.56546223",
"0.5612308",
"0.5570203",
"0.55116075",
"0.55116075",
"0.55026764",
"0.54403585",
"0.5439165",
"0.530228... | 0.9002481 | 0 |