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 |
|---|---|---|---|---|---|---|
Check if valid add_book response | def e5Nx(zSfU):
return 'name' in zSfU and 'price' in zSfU and ('isbn' in zSfU) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Cou0(YKHO):\n geh0 = YKHO.client.post('/api/v1/books', data=qQXR.dumps(E4mv), content_type='application/json', headers=YKHO.get_admin_token())\n Aofo = qQXR.loads(geh0.data.decode())\n YKHO.assertEqual(Aofo['message'], 'Book awarded successfully')\n assert geh0.status_code == 201",
"def Z3zE(YKHO... | [
"0.7324188",
"0.71444285",
"0.6754424",
"0.6736015",
"0.6707971",
"0.65491146",
"0.64058864",
"0.6374645",
"0.63528895",
"0.62992406",
"0.6231329",
"0.61846805",
"0.6130675",
"0.61279374",
"0.61115086",
"0.6074249",
"0.60553634",
"0.59958106",
"0.59835815",
"0.5963882",
"0.59... | 0.5959604 | 20 |
Retrieves a specific State | def VE4R(uJjO):
KAOR = S8SU.get(mv1M, uJjO)
if not KAOR:
eTsH(404)
return pz3A(KAOR.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ja6o(ZuB6):\n QTBn = S8SU.get('State', ZuB6)\n if QTBn:\n return pz3A(QTBn.to_dict())\n eTsH(404)",
"def ja6o(ZuB6):\n try:\n QTBn = pz3A(S8SU.get(wHLO, ZuB6).to_dict())\n return QTBn\n except:\n eTsH(404)",
"def ja6o(ZuB6):\n QTBn = S8SU.get(wHLO, ZuB6)\n i... | [
"0.7712307",
"0.7697305",
"0.75829816",
"0.75710946",
"0.7479273",
"0.7385776",
"0.7367735",
"0.73124015",
"0.7242776",
"0.7230957",
"0.7230957",
"0.7226292",
"0.7187894",
"0.7184518",
"0.71566695",
"0.70179963",
"0.70118475",
"0.70118475",
"0.698592",
"0.69692653",
"0.696791... | 0.0 | -1 |
Get the command args to run this step. If skip_serialized_namedtuple is True, then get_command_env should be used to pass the args to Click using an env var. | def y7_v(YKHO, o9bK: bool=False) -> bdIy[str]:
return wxxv(YKHO.job_origin) + ['api', 'execute_step'] + (['--compressed-input-json', YKHO._get_compressed_args()] if not o9bK else []) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SLxw(YKHO) -> bdIy[GySg[str, str]]:\n return [{'name': 'DAGSTER_COMPRESSED_EXECUTE_STEP_ARGS', 'value': YKHO._get_compressed_args()}]",
"def Zb36():\n zNND = ['run.py', Fyf6, pths, '-t', str(1), '-o', str(cNeK), '-b', str(2)]\n return zNND",
"def wP0Y(YKHO):\n return YKHO._command_args",
"def... | [
"0.6210668",
"0.6135422",
"0.61330277",
"0.60214496",
"0.6014586",
"0.59911364",
"0.59727347",
"0.5931152",
"0.5925983",
"0.5814533",
"0.56944984",
"0.5693068",
"0.5686931",
"0.56763566",
"0.5610325",
"0.5578867",
"0.5564705",
"0.5560622",
"0.5509382",
"0.5509382",
"0.5486576... | 0.76721996 | 0 |
Get the env vars for overriding the Click args of this step. Used in conjuction with get_command_args(skip_serialized_namedtuple=True). | def SLxw(YKHO) -> bdIy[GySg[str, str]]:
return [{'name': 'DAGSTER_COMPRESSED_EXECUTE_STEP_ARGS', 'value': YKHO._get_compressed_args()}] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zKTY(YKHO):\n return VYPX(YKHO._tagged_env_vars, build=False)",
"def Nca6(YKHO):\n return VYPX(YKHO._tagged_env_vars, build=True)",
"def xtda(YKHO):\n _wWf = {}\n for H5ew in YKHO.envvars:\n try:\n _wWf[H5ew] = Hy7s.environ[H5ew]\n except KeyError:\n continue... | [
"0.689278",
"0.6753468",
"0.67225736",
"0.6722288",
"0.6669228",
"0.66501456",
"0.65956956",
"0.6542301",
"0.65310127",
"0.6529589",
"0.6508932",
"0.6465983",
"0.6465983",
"0.6465983",
"0.6465983",
"0.64303946",
"0.63602084",
"0.6296463",
"0.6256607",
"0.6251316",
"0.6251316"... | 0.66326296 | 6 |
Check if an instance profile exists. | def vtfo(z39Z, mWFP):
Aofo = Ef3Y(z39Z, mWFP)
return len(Aofo) > 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Je54(YKHO) -> None:\n YKHO.assertTrue(YKHO.validate_instance_profile('s3-access-role', is_prod=YKHO.prod_env))",
"def Nqnu(z39Z):\n if Hy7s.path.isfile(AJy1):\n gP7g.config.load_credential_file(AJy1)\n if gP7g.config.get(z39Z, 'region'):\n return True\n else:\n ... | [
"0.8154871",
"0.7510733",
"0.66523707",
"0.6491631",
"0.6476768",
"0.6417421",
"0.63992935",
"0.6298554",
"0.62861156",
"0.6164219",
"0.6151578",
"0.6124031",
"0.6035546",
"0.60092634",
"0.60092336",
"0.60053897",
"0.5968085",
"0.5876538",
"0.58478",
"0.5842592",
"0.57657355"... | 0.7405177 | 3 |
Create an instance profile. | def eLpg(z39Z, mWFP):
if vtfo(z39Z, mWFP):
tO9_ = "Instance profile '" + str(mWFP) + "' already exists."
raise MRPk(tO9_)
NArs = {}
NArs['profile'] = z39Z
NArs['name'] = mWFP
geh0 = BfDw.do_request(UZ06, 'create', NArs)
kaiG = CWaf(z39Z, mWFP)
if not kaiG:
tO9_ = "Ins... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eLpg(z39Z, mWFP):\n x0hE = yy95.get('iam', z39Z)\n NArs = {}\n NArs['InstanceProfileName'] = mWFP\n return x0hE.create_instance_profile(**NArs)",
"def euOS(vC92, **YSA3):\n CBIr = YSA3['instance']\n if YSA3['created']:\n z39Z = BFpK(user=CBIr)\n z39Z.save()",
"def sxXS(KAOR,... | [
"0.7980981",
"0.73846895",
"0.73759806",
"0.7278604",
"0.71552795",
"0.71538186",
"0.71216303",
"0.71066165",
"0.706962",
"0.70648557",
"0.6899764",
"0.6899764",
"0.6899764",
"0.6889016",
"0.6884204",
"0.684115",
"0.6837916",
"0.6823874",
"0.6795658",
"0.6794917",
"0.6757974"... | 0.7846144 | 1 |
Check if an IAM role is attached to an instance profile. | def a93y(z39Z, if2M, LmAn):
kaiG = Ef3Y(z39Z, if2M)
if not kaiG:
tO9_ = "No instance profile '" + str(if2M) + "'."
raise gxbg(tO9_)
if not k4Hy.exists(z39Z, LmAn):
tO9_ = "No role '" + str(LmAn) + "'."
raise gxbg(tO9_)
Tf5Y = BfDw.get_data('Roles', kaiG[0])
zVot = [WK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I2g3(z39Z, if2M, LmAn):\n kaiG = Ef3Y(z39Z, if2M)\n if not kaiG:\n tO9_ = \"No instance profile '\" + str(if2M) + \"'.\"\n raise gxbg(tO9_)\n if not k4Hy.exists(z39Z, LmAn):\n tO9_ = \"No role '\" + str(LmAn) + \"'.\"\n raise gxbg(tO9_)\n Tf5Y = BfDw.get_data('Roles', ka... | [
"0.7088546",
"0.6954864",
"0.6926873",
"0.67344093",
"0.632607",
"0.6269203",
"0.62026495",
"0.6070061",
"0.60275495",
"0.59771913",
"0.5725403",
"0.57020354",
"0.5701487",
"0.56407905",
"0.5587612",
"0.55163646",
"0.55126065",
"0.5507493",
"0.5485463",
"0.54719484",
"0.54596... | 0.8047882 | 0 |
Visualises the layers into matplotlib images | def wsLX(YKHO, EcVT):
if isinstance(EcVT, oyIN.ndarray):
EcVT = oyIN.reshape(EcVT, (EcVT.shape[0], EcVT.shape[1], EcVT.shape[2], 1))
elif isinstance(EcVT, ZylS.data.Dataset):
EcVT = EcVT.map(YKHO._reshape)
for WKvO, LVAh in EcVT:
WKvO = ZylS.expand_dims(WKvO, 0)
QrM1.title('T... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Gp1Y(YKHO, aNZO):\n H0q3 = YKHO.w[1:, :].reshape(28, 28, 10, order='F')\n XZBo = oyIN.transpose(H0q3, axes=[1, 0, 2])\n aNZO.imshow(XZBo.reshape(28, -1, order='F'), cmap='bone')",
"def yuSY(YKHO, lzjZ='conv1', KQ2Q=''):\n mgU1 = [or8S for or8S, gEmA in enumerate(YKHO.model.layers) if gEmA.name ==... | [
"0.71518236",
"0.7068693",
"0.7035294",
"0.6981722",
"0.6935098",
"0.6823357",
"0.6802339",
"0.6800211",
"0.6793122",
"0.6783266",
"0.6780422",
"0.67716116",
"0.6752977",
"0.672909",
"0.6727449",
"0.6726443",
"0.6697387",
"0.6638319",
"0.65907335",
"0.6580887",
"0.6580887",
... | 0.67066616 | 16 |
Returns a diagonal or a diagonal array. | def A2lD(Ty9i, G1Hx=0):
if isinstance(Ty9i, cqkc.ndarray):
if Ty9i.ndim == 1:
zNig = Ty9i.size + abs(G1Hx)
U5bT = cqkc.zeros((zNig, zNig), dtype=Ty9i.dtype)
U5bT.diagonal(G1Hx)[:] = Ty9i
return U5bT
else:
return Ty9i.diagonal(G1Hx)
else... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IjIm(fHgE):\n assert fHgE.ndim == 2, 'diagonal requires 2 dimensional ndarray'\n ph3e = XSBh.min(fHgE.shape[0], fHgE.shape[1])\n return XSBh.nd.array(XSBh.range(XSBh.int32(ph3e)).map(lambda YRbF: fHgE[YRbF, YRbF]))",
"def IjIm(jzdc, vgXP=0, M_mI=0, ZMAG=1):\n return jzdc.diagonal(vgXP, M_mI, ZMAG... | [
"0.6815963",
"0.6779226",
"0.6757019",
"0.66014105",
"0.65470177",
"0.65308356",
"0.6455631",
"0.6425529",
"0.6404942",
"0.6394657",
"0.6366269",
"0.6340309",
"0.63219327",
"0.6299192",
"0.6271247",
"0.62636733",
"0.626132",
"0.6198233",
"0.61666346",
"0.6134196",
"0.6132334"... | 0.6123252 | 22 |
Creates a diagonal array from the flattened input. | def BVjG(Ty9i, G1Hx=0):
if isinstance(Ty9i, cqkc.ndarray):
return cqkc.diag(Ty9i.ravel(), G1Hx)
else:
return cqkc.diag(XTiz.ndarray(Ty9i).ravel(), G1Hx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IjIm(fHgE):\n assert fHgE.ndim == 2, 'diagonal requires 2 dimensional ndarray'\n ph3e = XSBh.min(fHgE.shape[0], fHgE.shape[1])\n return XSBh.nd.array(XSBh.range(XSBh.int32(ph3e)).map(lambda YRbF: fHgE[YRbF, YRbF]))",
"def IjIm(YKHO):\n E3D9 = YKHO.rep\n r8hN, exwG = YKHO.shape\n return [E3D... | [
"0.7002077",
"0.6953516",
"0.6932767",
"0.6844725",
"0.68130857",
"0.672427",
"0.6572406",
"0.64834136",
"0.64701927",
"0.6462185",
"0.6459648",
"0.6401316",
"0.6344102",
"0.63140404",
"0.6306936",
"0.6284715",
"0.6267831",
"0.6260347",
"0.61699694",
"0.6159974",
"0.6145433",... | 0.6463307 | 9 |
Constructs a radix(2^N) representation of data from charlist, where charlist is of length 2^N. (like base64) | def Fzo9(nPrm, ESrO):
if len(ESrO) & len(ESrO) - 1 != 0:
raise Exception('charlist length is not a power of 2')
Ghde = int(epAf.floor(epAf.log(len(ESrO), 2)))
k2lQ = 0
LXTO = 0
_0VL = []
for Fg_i in bytearray(nPrm):
S1VO = 8
while S1VO != 0:
hJDR = min(S1VO, G... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JAVq(SXwH, KuP7):\n assert len(SXwH) >= 0\n tjUW = (1 << KuP7) - 1\n exwG = 0\n while 1:\n Csk6 = N2RQ(SXwH, KuP7)\n if Csk6 == tjUW:\n return exwG\n else:\n exwG = exwG * tjUW + Csk6\n pass\n pass\n pass",
"def Q_SM(MoiL: List[str],... | [
"0.6283157",
"0.60114247",
"0.5999854",
"0.5967389",
"0.59325397",
"0.58388025",
"0.57500297",
"0.57471853",
"0.5655632",
"0.56444794",
"0.5587657",
"0.55712277",
"0.5569921",
"0.5564001",
"0.5543843",
"0.5539689",
"0.55359596",
"0.55316466",
"0.54873633",
"0.54620403",
"0.54... | 0.76633596 | 0 |
takes a node and returns a display string containing its bbox | def XMVv(Q6kx):
return '%s: %s' % (Q6kx.name(), rLgT(Q6kx.bbox())) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cviu(YKHO, Q6kx):\n Lnes = Q6kx.get('id')\n U34r = YKHO.node_info[Lnes]\n WKvO = U34r.x\n LVAh = U34r.y\n TVTK = U34r.width\n H2v2 = U34r.height\n return rh6a(PvyL(WKvO, LVAh), PvyL(WKvO + TVTK, LVAh), PvyL(WKvO + TVTK, LVAh + H2v2), PvyL(WKvO, LVAh + H2v2))",
"def q2XX(Q6kx, tXC6):\n ... | [
"0.7424719",
"0.65300006",
"0.62933594",
"0.60478354",
"0.6046967",
"0.6031258",
"0.60228676",
"0.5945682",
"0.5918483",
"0.5912601",
"0.5868687",
"0.58246267",
"0.5781722",
"0.57788426",
"0.5736045",
"0.5733403",
"0.57300884",
"0.5722795",
"0.56736726",
"0.56667054",
"0.5640... | 0.8292475 | 0 |
Function called when the user presses the blur_button. It performs gaussian blurring on the image. | def ihGu(YKHO):
IqDH = YKHO.horizontal.get()
VXjJ = YKHO.master.images[-1]
WUZM = jUwU.gaussian_blur(VXjJ, IqDH)
YKHO.master.display_image.display_image(img=WUZM)
YKHO.master.images.append(WUZM) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DVDp(YKHO, tvqc):\n if YKHO.winfo_containing(tvqc.x_root, tvqc.y_root) == YKHO.blur_button:\n if YKHO.image_present_check():\n YKHO.horizontal = bi20(YKHO, from_=0.0, to=100.0, resolution=0.5, orient=k9Ct)\n YKHO.horizontal.pack()\n pa_n = D04X(YKHO, text='Set STD of ... | [
"0.7722035",
"0.76690006",
"0.7510682",
"0.75013095",
"0.74837667",
"0.73598856",
"0.7315707",
"0.7294763",
"0.72899055",
"0.72899055",
"0.72899055",
"0.72899055",
"0.72899055",
"0.72899055",
"0.72899055",
"0.72899055",
"0.72899055",
"0.72899055",
"0.72899055",
"0.72899055",
... | 0.7406741 | 5 |
Invoked when the sharpen_button is pressed. Performs unsharp masking on the displayed image using gaussian blur with STD set by the user. The constant multiplied is also determined by the user. | def _l8Q(YKHO):
IqDH = YKHO.horizontal.get()
Ixkb = YKHO.vertical.get()
VXjJ = YKHO.master.images[-1]
WADt = LIfH.gaussian_unsharp_masking(VXjJ, IqDH, Ixkb)
YKHO.master.display_image.display_image(img=WADt)
YKHO.master.images.append(WADt) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ima_(YKHO, tvqc):\n if YKHO.winfo_containing(tvqc.x_root, tvqc.y_root) == YKHO.sharpening_button:\n if YKHO.image_present_check():\n YKHO.horizontal = bi20(YKHO, from_=0.0, to=100.0, resolution=0.5, orient=k9Ct)\n YKHO.horizontal.pack()\n YKHO.vertical = bi20(YKHO, fr... | [
"0.7014764",
"0.6965435",
"0.67520636",
"0.67291576",
"0.67200476",
"0.66416484",
"0.64673835",
"0.64494747",
"0.62225056",
"0.6155897",
"0.61447334",
"0.61404",
"0.6123072",
"0.5979111",
"0.5931946",
"0.5888824",
"0.58493227",
"0.5829368",
"0.5828138",
"0.5823372",
"0.581278... | 0.67564183 | 2 |
Return the document request record class. | def kA5T(YKHO):
return YKHO.record_class_by_pid_type(DkYx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hdFt(YKHO):\n return YKHO.record_class_by_pid_type(L1nb)",
"def Q63A(YKHO):\n return YKHO.search_by_pid_type(DkYx)",
"def VfGH(YKHO):\n raise NotImplementedError()",
"def PWg9(YKHO):\n try:\n YKHO._project_name()\n except ValueError:\n return OCDb\n if YKHO._is_satisfied()... | [
"0.7799157",
"0.70509356",
"0.66858846",
"0.60147554",
"0.59282196",
"0.59181327",
"0.5890304",
"0.57738495",
"0.5768338",
"0.5756767",
"0.5719984",
"0.5689928",
"0.56885153",
"0.56840444",
"0.5669853",
"0.56684095",
"0.56683636",
"0.5654152",
"0.56521016",
"0.5650806",
"0.56... | 0.87766784 | 0 |
Return the eitem record class. | def qHmV(YKHO):
return YKHO.record_class_by_pid_type(LRfp) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def B4ob(YKHO):\n return YKHO.record_class_by_pid_type(IJDO)",
"def U93o(YKHO):\n return YKHO._ELE_CLS",
"def hdFt(YKHO):\n return YKHO.record_class_by_pid_type(L1nb)",
"def dVGP(YKHO, ZfUD):\n if type(ZfUD) == type:\n return ZfUD\n return ZfUD.__class__",
"def fqkM(YKHO):\n return... | [
"0.8246512",
"0.67597944",
"0.674543",
"0.6591923",
"0.646923",
"0.64527714",
"0.6421278",
"0.6418583",
"0.64165735",
"0.63099736",
"0.62671673",
"0.6129993",
"0.61276144",
"0.61229557",
"0.61126244",
"0.60887665",
"0.60302216",
"0.60233307",
"0.59484863",
"0.59318405",
"0.59... | 0.8748377 | 0 |
Ask user for a valid IPv4 subnet mask in dotted decimal | def _49e():
oGem = [255, 254, 252, 248, 240, 224, 192, 128, 0]
while True:
try:
HDjO = input('Enter the current subnet mask: ')
except KeyboardInterrupt:
print('\nGood bye!\n')
HwRy.exit()
Fg_i = HDjO.split('.')
idNL = False
UL7S = Fals... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Nf3X(ZHfW):\n ZHfW = int(ZHfW)\n UOVU = 4294967295 ^ (1 << 32 - ZHfW) - 1\n return GGmw.inet_ntoa(BlNT.pack('>I', UOVU))",
"def LtDB():\n while True:\n ANfV = input('Please enter the IPv4 Address [n.n.n.n/n]: ')\n try:\n eh6u = ANfV.split('/')\n z05X = I33c(eh6... | [
"0.70959437",
"0.68923104",
"0.6870825",
"0.66647846",
"0.65872353",
"0.63958573",
"0.6395524",
"0.6290091",
"0.6273001",
"0.6236289",
"0.6216331",
"0.6195159",
"0.6131487",
"0.60903776",
"0.607975",
"0.6037063",
"0.60239947",
"0.60215896",
"0.5991053",
"0.5944972",
"0.592508... | 0.7122879 | 0 |
Private method to handle the paste action. | def CAiR(YKHO):
if q22J.focusWidget() == MtmM().getObject('Shell'):
MtmM().getObject('Shell').paste()
else:
YKHO.activeWindow().paste() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MJ2_(YKHO, Tdem, PLBI):\n if Tdem:\n return YKHO.errormessage(\"Doesn't need any argument\")\n if not YKHO.HasPerms(YKHO.__context, 'View management screens'):\n return -1\n if not hasattr(YKHO, '_clipboard'):\n return YKHO.errormessage('Clipboard is empty')\n try:\n YKH... | [
"0.70122194",
"0.6758794",
"0.6625979",
"0.6554356",
"0.6468314",
"0.64067304",
"0.6149966",
"0.60509753",
"0.59971136",
"0.5959481",
"0.5845177",
"0.5840773",
"0.58308846",
"0.57955885",
"0.57947767",
"0.57841873",
"0.57615405",
"0.57409805",
"0.57308275",
"0.5724637",
"0.57... | 0.7310397 | 0 |
Private method to open a new view of the current editor in a new split. | def JqQZ(YKHO):
npaS = YKHO.activeWindow()
if npaS:
YKHO.addSplit()
YKHO.newEditorView(npaS.getFileName(), npaS, npaS.getFileType()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yQsB(YKHO):\n npaS = YKHO.activeWindow()\n if npaS:\n YKHO.newEditorView(npaS.getFileName(), npaS, npaS.getFileType())",
"def kFRw(YKHO):\n YKHO.addSplit()",
"def SxXT(tvqc):\n tvqc.current_buffer.open_in_editor(tvqc.cli)",
"def Ew_m(YKHO):\n ty0B.command('silent! botright split {0}... | [
"0.7121881",
"0.6540798",
"0.6514014",
"0.63474935",
"0.62472415",
"0.6149323",
"0.6010219",
"0.5963351",
"0.59611124",
"0.59055626",
"0.5874557",
"0.5814578",
"0.5792717",
"0.5766427",
"0.5662704",
"0.56464523",
"0.5627508",
"0.55724305",
"0.5561633",
"0.55538857",
"0.553940... | 0.8286171 | 0 |
Private slot to set the automatic spell checking of all editors. | def n_jW(YKHO):
etR_ = YKHO.autoSpellCheckAct.isChecked()
leqm.setEditor('AutoSpellCheckingEnabled', etR_)
for bx_5 in YKHO.editors:
bx_5.setAutoSpellChecking() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OR29(YKHO):\n from QScintilla.SpellChecker import SpellChecker\n BlfV = SpellChecker.isAvailable()\n YKHO.spellCheckAct.setEnabled(len(YKHO.editors) != 0 and BlfV)\n YKHO.autoSpellCheckAct.setEnabled(BlfV)",
"def qD1N(YKHO):\n npaS = YKHO.activeWindow()\n if npaS:\n npaS.checkSpellin... | [
"0.7636197",
"0.71462005",
"0.65836585",
"0.5865829",
"0.5843504",
"0.5776261",
"0.5665405",
"0.5537406",
"0.55343485",
"0.5509878",
"0.54583484",
"0.53753674",
"0.53663105",
"0.5298167",
"0.52587396",
"0.5242033",
"0.5233465",
"0.52325606",
"0.5229334",
"0.5192617",
"0.51908... | 0.8417452 | 0 |
Public method to get a list of all actions. actionSetType string denoting the action set to get. It must be one of "edit", "file", "search", "view", "window", "macro", "bookmark" or "spelling". list of all actions (list of E5Action) | def qaYX(YKHO, Phn2):
try:
return YKHO.__actions[Phn2][:]
except KeyError:
return [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xASv(YKHO):\n return YKHO._action_list",
"def eqLF(YKHO):\n return YKHO.actions",
"def Q6sW(YKHO):\n return []",
"def qaYX(YKHO):\n xASv = YKHO.actions[:]\n return xASv",
"def xASv(YKHO):\n Mkmy = YKHO.session.query(FYrf.Action).all()\n return [WKvO.type_name for WKvO in Mkmy]",
... | [
"0.7648261",
"0.754506",
"0.7339192",
"0.72533303",
"0.72417945",
"0.7237163",
"0.72027916",
"0.72027916",
"0.7079289",
"0.7059448",
"0.704063",
"0.69953513",
"0.6951467",
"0.6951467",
"0.6951467",
"0.6950716",
"0.6929098",
"0.69041616",
"0.68887097",
"0.68832284",
"0.6839939... | 0.8236746 | 0 |
Calculate the next rectangular position of the object by moving along the current direction. The rectangle is returned together with the delta x and delta y from the topleft of the old position. | def jvJ1(YKHO, AbGy):
zTvC, YtJp = YKHO.DIR_VECTORS[YKHO.direction]
Jw7X, eUWA = (zTvC * YKHO.speed * AbGy, YtJp * YKHO.speed * AbGy)
eWTf = YKHO.rect.move(Jw7X, eUWA)
return (eWTf, Jw7X, eUWA) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BZN_(YKHO, J2ZS, NAQq):\n return _JMH(YKHO.x + J2ZS, YKHO.y + NAQq)",
"def BZN_(YKHO, J2ZS, NAQq):\n return _JMH(YKHO.x + J2ZS, YKHO.y + NAQq)",
"def wjMf(n1b7, Jw7X, eUWA):\n HyS1 = x7Ls()\n HyS1.height = n1b7.height\n HyS1.width = n1b7.width\n HyS1.corner = PvyL()\n HyS1.corner.x = n... | [
"0.6548108",
"0.6512436",
"0.6511377",
"0.65025324",
"0.63872814",
"0.6326634",
"0.6320892",
"0.627287",
"0.6198977",
"0.6069119",
"0.60591114",
"0.6053064",
"0.6042055",
"0.60325384",
"0.6026192",
"0.5996216",
"0.59890306",
"0.597638",
"0.5930403",
"0.5928315",
"0.5920207",
... | 0.65715355 | 0 |
Get notification type defined with class name. | def type(Emd4):
return Emd4.__name__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I62H(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'notification_type')",
"def I62H(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'notification_type')",
"def I62H(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'notification_type')",
"def gG9d(w4sM):\n try:\n yR_P = AN... | [
"0.6816152",
"0.6767083",
"0.67297274",
"0.6410028",
"0.63802385",
"0.6354915",
"0.62539977",
"0.6193046",
"0.6141165",
"0.6061648",
"0.60268986",
"0.60262996",
"0.59612995",
"0.5947072",
"0.5915754",
"0.59023654",
"0.58839464",
"0.5814799",
"0.5795495",
"0.5776086",
"0.57666... | 0.6068346 | 9 |
Initialise weights and biases | def sIHF(YKHO):
DbxN = TPe2(YKHO.w_init)
if YKHO.w_gain:
mb4J = U78l.init.calculate_gain('relu')
DbxN(YKHO.relations, gain=mb4J)
else:
DbxN(YKHO.relations)
if YKHO.b_init:
DbxN = ZZtf(YKHO.b_init)
DbxN(YKHO.sbias)
DbxN(YKHO.pbias)
DbxN(YKHO.obias) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C0Lv(YKHO):\n pass",
"def sTi3(YKHO, dIoi, wdin):\n h0Df = [[YKHO.input_size, YKHO.hidden_size[0]], [YKHO.hidden_size[0], YKHO.hidden_size[1]], [YKHO.hidden_size[1], YKHO.output_size]]\n X9xv = [[1, YKHO.hidden_size[0]], [1, YKHO.hidden_size[1]], [1, YKHO.output_size]]\n YKHO.weights = [vB93(KCHu... | [
"0.82576996",
"0.8227028",
"0.82042074",
"0.817285",
"0.8160349",
"0.8155006",
"0.8127573",
"0.81187093",
"0.8007405",
"0.7982579",
"0.7974712",
"0.79322505",
"0.78819776",
"0.78818023",
"0.7876818",
"0.78659105",
"0.7865434",
"0.7865434",
"0.7865434",
"0.78556186",
"0.782407... | 0.7561252 | 38 |
Initialise biases and weights (glorot_uniform or uniform) | def Q0Ko(YKHO, xqfp='glorot_uniform'):
if xqfp == 'glorot_uniform':
if YKHO.weight_decomp == 'block':
U78l.init.xavier_uniform_(YKHO.blocks, gain=U78l.init.calculate_gain('relu'))
elif YKHO.weight_decomp == 'basis':
U78l.init.xavier_uniform_(YKHO.bases, gain=U78l.init.calcula... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XXxF(YKHO):\n YKHO.biases = [oyIN.random.randn(LVAh, 1) for LVAh in YKHO.sizes[1:]]\n YKHO.weights = [oyIN.random.randn(LVAh, WKvO) / oyIN.sqrt(WKvO) for WKvO, LVAh in zip(YKHO.sizes[:-1], YKHO.sizes[1:])]",
"def e45a(YKHO):\n YKHO.weights = []\n YKHO.bias = []\n for YRbF, tpio in enumerate(YK... | [
"0.7695583",
"0.76904297",
"0.768687",
"0.7631656",
"0.75850135",
"0.7546133",
"0.7538794",
"0.74401927",
"0.74401927",
"0.74317634",
"0.739828",
"0.73953336",
"0.737125",
"0.7343187",
"0.7282984",
"0.7263123",
"0.72536844",
"0.72379565",
"0.72379565",
"0.72379565",
"0.723438... | 0.0 | -1 |
Fill the input `Tensor` with values according to the Schlichtkrull method, using a normal distribution. | def Qg1Z(vhpA, ROpF, mb4J=1.0):
M1Jx = kUbN(ROpF, mb4J)
with ht2j.no_grad():
return vhpA.normal_(0.0, M1Jx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a7rK(YKHO):\n if YKHO.lowerBoundUsed == False and YKHO.upperBoundUsed == False:\n YKHO._distribution = GIhX.BasicWeibullDistribution(YKHO.k, YKHO.lambdaVar, YKHO.low)\n YKHO.lowerBound = YKHO.low\n YKHO.upperBound = HwRy.float_info.max\n else:\n if YKHO.lowerBoundUsed == False... | [
"0.5979632",
"0.5846269",
"0.5841435",
"0.5806471",
"0.5806471",
"0.58041257",
"0.5796013",
"0.57950556",
"0.5716712",
"0.5704743",
"0.5704743",
"0.5704743",
"0.5704743",
"0.5704743",
"0.5689562",
"0.56430966",
"0.56412244",
"0.5617718",
"0.5609436",
"0.5605589",
"0.5591438",... | 0.6289478 | 0 |
Return the current project data dir, creating it if it doesn't exist | def qIcM(bNKA: str='default') -> str:
if not aAmB():
raise ANmP('Not inside a project')
_Fei = tgzD()
if _Fei.has_option(MDQr, bNKA):
Csk6 = GkAb(_Fei.get(MDQr, bNKA))
else:
qgFh = ytYw()
if not qgFh:
raise ANmP('Unable to find scrapy.cfg file to infer project... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xe5l():\n h_xa = GkAb(TdjZ() / 'data')\n h_xa.mkdir(parents=True, exist_ok=True)\n return h_xa",
"def xe5l():\n return GkAb(wk5E.config['USER_DIR']) / 'data'",
"def h_xa():\n return Hy7s.path.join(Hy7s.path.dirname(Hy7s.path.abspath(xAKo)), 'data')",
"def xe5l() -> str:\n Hy7s.makedirs(... | [
"0.884594",
"0.8154901",
"0.8143387",
"0.8130206",
"0.7878359",
"0.7874639",
"0.78590393",
"0.7808614",
"0.77807176",
"0.7725354",
"0.7691692",
"0.76879364",
"0.7636406",
"0.75192946",
"0.75016165",
"0.74805737",
"0.7458777",
"0.7458247",
"0.7436417",
"0.74316865",
"0.7429985... | 0.7689561 | 11 |
Return the given path joined with the .scrapy data directory. If given an absolute path, return it unmodified. | def i0XC(pmON: str, YlEm: bool=False) -> str:
j7TG = GkAb(pmON)
if not j7TG.is_absolute():
if aAmB():
j7TG = GkAb(qIcM(), pmON)
else:
j7TG = GkAb('.scrapy', pmON)
if YlEm and (not j7TG.exists()):
j7TG.mkdir(parents=True)
return str(j7TG) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OyQC(i0XC):\n return Hy7s.path.dirname(Hy7s.path.realpath(xAKo)) + Hy7s.sep + i0XC",
"def s8df(pmON):\n i0XC = GkAb(YKHO.kard.meta.get('data_path', 'data'))\n if i0XC.is_absolute():\n return str(i0XC / pmON)\n return str(YKHO.kard_folder_path / YKHO.kard.name / i0XC / pmON)",
"def yLtf(p... | [
"0.7194747",
"0.712831",
"0.6813964",
"0.6805899",
"0.67509013",
"0.675075",
"0.6701231",
"0.6690529",
"0.66013783",
"0.65679127",
"0.65266705",
"0.650922",
"0.64778847",
"0.6452505",
"0.64015555",
"0.63948417",
"0.6387983",
"0.63615096",
"0.63472974",
"0.63385934",
"0.630335... | 0.71222496 | 2 |
Online status of the application. True if no local card data is present. | def M8aA(YKHO, jGRS: bool):
YKHO.ui.get_object('statusbar_icon').set_from_icon_name(gnPz.online_icons[jGRS], Rn7Y.IconSize.BUTTON)
YKHO.ui.get_object('statusbar_icon').set_tooltip_text(gnPz.online_tooltips[jGRS])
YKHO.config['local_db'] = not jGRS
YKHO.save_config() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SLbt(YKHO) -> bool:\n return YKHO._raw_result['data']['online']",
"def Zs2h(YKHO) -> bool:\n return YKHO.data[URbA.ONLINE]",
"def SLbt(YKHO):\n return False",
"def Zs2h(YKHO) -> h8nf[qe4Y.Input[bool]]:\n return qe4Y.get(YKHO, 'is_online')",
"def Zs2h(YKHO) -> bool:\n return not YKHO.conf... | [
"0.7865311",
"0.7805424",
"0.76072806",
"0.7488986",
"0.7395054",
"0.72255445",
"0.71028167",
"0.71028167",
"0.70384157",
"0.6982051",
"0.6942591",
"0.6909111",
"0.67982364",
"0.6796394",
"0.6764952",
"0.675009",
"0.67485243",
"0.67328125",
"0.6655613",
"0.6646827",
"0.662441... | 0.0 | -1 |
Set up the status bar in the Mac menu | def WpSU(YKHO):
YKHO.status = wFJI.systemStatusBar().statusItemWithLength_(f0UF)
YKHO.status.setMenu_(YKHO.status_menu)
YKHO.status.setTitle_('Core')
YKHO.status.setHighlightMode_(tfww.YES) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def J2yl(YKHO):\n YKHO.statusbar = YKHO.CreateStatusBar()",
"def DUlM(YKHO):\n YKHO.statusbar = YKHO.CreateStatusBar()\n YKHO.statusbar.SetFieldsCount(3)\n YKHO.statusbar.SetStatusWidths([-1, -1, -2])\n YKHO.statusbar.SetStatusText('', 0)\n YKHO.statusbar.SetStatusText('Namelist:', 1)\n YKHO... | [
"0.72974026",
"0.704181",
"0.6907672",
"0.6680588",
"0.66564",
"0.664472",
"0.6605341",
"0.6601754",
"0.65815306",
"0.64965403",
"0.64820766",
"0.64719707",
"0.64041114",
"0.6365701",
"0.6295507",
"0.6215244",
"0.6096732",
"0.60924906",
"0.6074106",
"0.605839",
"0.60554826",
... | 0.7981992 | 0 |
Search all of the available window handles (i.e. Chromium instances / web pages / Finsemble components) that are visible to Selenium and locate the specific one corresponding to the provided URL. | def bDGB(YKHO, DTfq: str) -> str:
def gPil():
t2p_ = YKHO.discover_all_available_pages()
JdMs = next((nVrR for nVrR, mlZd in t2p_.items() if DTfq.lower() in mlZd['url'].lower()), None)
return JdMs
try:
return HOII._wait_until(gPil, timeout_in_seconds=10)
except TimeoutError:... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cv9K(YKHO, DTfq: str) -> x1iM[str]:\n t2p_ = YKHO.discover_all_available_pages()\n kMxs = [nVrR for nVrR, mlZd in t2p_.items() if DTfq.lower() in mlZd['url'].lower()]\n return kMxs",
"def mEd7(**B2fa):\n try:\n B2fa['backend'] = 'win32'\n UqER = a1Pm(**B2fa)\n return [LihS.ha... | [
"0.6499459",
"0.64341563",
"0.60216457",
"0.58066374",
"0.5801197",
"0.5758334",
"0.5699086",
"0.55551445",
"0.5531188",
"0.5505056",
"0.5485803",
"0.5469651",
"0.5457565",
"0.5358329",
"0.53565603",
"0.5326569",
"0.5326569",
"0.52843535",
"0.52678406",
"0.526148",
"0.5256366... | 0.6465577 | 1 |
Returns True or False whether the specified plugin is disabled or not. | def GtHW(YKHO, t0qN: str) -> bool:
with W5YI.mutex:
return t0qN in YKHO._disabled | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gv1u(YKHO) -> qe4Y.Output[bool]:\n return qe4Y.get(YKHO, 'is_disabled')",
"def gv1u(YKHO) -> qe4Y.Output[h8nf[bool]]:\n return qe4Y.get(YKHO, 'is_disabled')",
"def gv1u(YKHO):\n return YKHO.__contains__('disabled')",
"def lbi2(YKHO) -> bool:\n return qe4Y.get(YKHO, 'disabled')",
"def lbi2(Y... | [
"0.7553718",
"0.7410899",
"0.7372038",
"0.73590446",
"0.73590446",
"0.72663414",
"0.72172564",
"0.7114851",
"0.71010745",
"0.7099821",
"0.7045404",
"0.7045404",
"0.6978214",
"0.6959868",
"0.6959868",
"0.6959868",
"0.6959868",
"0.6959868",
"0.6959868",
"0.6959868",
"0.6959868"... | 0.887675 | 0 |
It will open a .txt file and return the fileName back. | def Kdvs():
while True:
print('Enter a valid .txt file')
try:
uRP3 = UURg.fileopenbox('Enter a .txt file', 'Open file', default='C:\\', filetypes=['*.txt'])
if uRP3 == None:
raise
except:
pass
else:
return uRP3 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qKJz(gIsw):\n eHNT = open(gIsw, 'r')\n l5Ny = eHNT.read()\n return l5Ny",
"def Np1T(YNHG: str):\n hGN5: str = ''\n with open(YNHG, mode='r', encoding='utf-8') as nUeQ:\n print('file being read: ' + YNHG + '\\n')\n hGN5 = nUeQ.read()\n return hGN5",
"def DMrX(YKHO):\n retu... | [
"0.72944707",
"0.7255649",
"0.7086624",
"0.7031243",
"0.6920041",
"0.688983",
"0.68801343",
"0.6845105",
"0.6827755",
"0.67921734",
"0.67916375",
"0.6778593",
"0.6729788",
"0.67192703",
"0.66965175",
"0.66637677",
"0.6642754",
"0.6637316",
"0.6620653",
"0.66100776",
"0.658348... | 0.6160696 | 62 |
Read the text from the file and return in back. | def uEFG(uRP3):
yKwe = ''
with open(uRP3, 'r') as kaC3:
yKwe = kaC3.read()
return yKwe | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def j7F_(OwN0):\n with open(OwN0, 'rt') as nUeQ:\n nPrm = nUeQ.read()\n return nPrm",
"def OcVp(qaEx):\n gnli = open(qaEx).read()\n return gnli",
"def Nwr9(qaEx):\n try:\n eZ_W = open(qaEx)\n vF7L = eZ_W.read()\n eZ_W.close()\n return vF7L\n except IOErr... | [
"0.7722382",
"0.7580321",
"0.75347316",
"0.75064945",
"0.74893135",
"0.74482197",
"0.74246323",
"0.73390263",
"0.733697",
"0.7333794",
"0.7299624",
"0.7280394",
"0.7240668",
"0.7229014",
"0.7227244",
"0.72060597",
"0.7188755",
"0.71726364",
"0.71656406",
"0.7130675",
"0.71202... | 0.7460799 | 5 |
Return a tuple ``(updated_bias, updated_weight)`` representing the gradient for the cost function C_x. ``updated_bias`` and ``updated_weight`` are layerbylayer lists of numpy arrays, similar to ``self.biases`` and ``self.weights``. | def QADO(YKHO, WKvO, LVAh):
M9YB = []
for Fg_i in YKHO.biases:
M9YB.append(oyIN.zeros(Fg_i.shape))
INKt = []
for yzQ0 in YKHO.weights:
INKt.append(oyIN.zeros(yzQ0.shape))
YDYE = WKvO
oQvm = [WKvO]
fERC = []
for Fg_i, yzQ0 in zip(YKHO.biases, YKHO.weights):
epBp = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lgY2(YKHO):\n V1Rd = YKHO._neural_net.weights()\n mfkG = YKHO._neural_net.biases()\n k_ul = len(V1Rd)\n MXLj = []\n ZNPH = []\n qzBL = YKHO._cost_function\n VaZJ = Q25T(neural_net=YKHO._neural_net, data_src=YKHO._data_src, cost_function=qzBL)\n F0FP = YFOC(neural_net=YKHO._neural_net, d... | [
"0.70037687",
"0.6904672",
"0.68984175",
"0.68149334",
"0.6785196",
"0.6736419",
"0.67154384",
"0.6707164",
"0.6702782",
"0.66837496",
"0.65808415",
"0.65519845",
"0.65458727",
"0.64750123",
"0.6470527",
"0.645518",
"0.6451915",
"0.6412186",
"0.64033324",
"0.6388749",
"0.6388... | 0.0 | -1 |
Return the vector of partial derivatives \partial C_x / \partial a for the output activations. | def KX7l(YKHO, XH02, LVAh):
return XH02 - LVAh | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tNbl(YKHO, g4y1, WlSc):\n vnM8 = g4y1['SOC']\n ovGo = g4y1['temperature']\n Jxbn = g4y1['P_bat']\n o5UJ = uBEc * YKHO.exponential\n _fy8 = -uBEc * YKHO.voc * oyIN.exp(Cwt5 * (ovGo[4, :] - wGZt) / wGZt) * Cwt5 / wGZt\n fw4i = oyIN.exp(vnM8[0, :]) / (oyIN.e - 1)\n YKHO.dI_dP = 1.0 / YKHO.V\n... | [
"0.6179747",
"0.6113179",
"0.6110102",
"0.6063869",
"0.6060675",
"0.5840477",
"0.58356196",
"0.57909757",
"0.5785478",
"0.576321",
"0.56648666",
"0.56212157",
"0.5613195",
"0.5575484",
"0.5562849",
"0.5559713",
"0.5545122",
"0.55250263",
"0.551218",
"0.5509232",
"0.5506259",
... | 0.56029624 | 15 |
Derivative of the sigmoid function. | def hj5n(epBp):
return m1Hg(epBp) * (1 - m1Hg(epBp)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NZml(WKvO):\n return WKvO * (1 - WKvO)",
"def NZml(WKvO):\n return WKvO * (1.0 - WKvO)",
"def NZml(WKvO):\n return m1Hg(WKvO) * (1 - m1Hg(WKvO))",
"def BV7B(WKvO):\n return WKvO * (1 - WKvO)",
"def BV7B(WKvO):\n return WKvO * (1 - WKvO)",
"def NZml(WKvO):\n KCHu = m1Hg(WKvO)\n ox... | [
"0.84754366",
"0.8450928",
"0.8396931",
"0.83485264",
"0.83485264",
"0.8298343",
"0.80539966",
"0.7753385",
"0.77070266",
"0.7498153",
"0.7464916",
"0.7454039",
"0.7401582",
"0.7385017",
"0.73829913",
"0.7346935",
"0.7321687",
"0.73094004",
"0.7192053",
"0.7113881",
"0.709236... | 0.0 | -1 |
Return the absolute end of the utterance relative to the signal. | def VP2i(YKHO):
if YKHO.end == float('inf'):
return YKHO.track.duration
else:
return YKHO.end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Os4s(YKHO):\n return YKHO._t0 + YKHO.length",
"def q0ht(YKHO):\n return YKHO._end",
"def A_2I(YKHO):\n return YKHO.__end",
"def A_2I(YKHO):\n return YKHO._end",
"def brro(YKHO) -> Swre:\n ...",
"def A_2I(YKHO):\n return YKHO._start + YKHO._duration",
"def zJEB(YKHO):\n return Y... | [
"0.67138165",
"0.6436659",
"0.6302284",
"0.6288117",
"0.6269361",
"0.6230538",
"0.61950463",
"0.6194317",
"0.6047313",
"0.59740156",
"0.5973062",
"0.5929029",
"0.5923726",
"0.5916584",
"0.5906003",
"0.5864616",
"0.58030725",
"0.579325",
"0.5792297",
"0.5780779",
"0.5766522",
... | 0.73755103 | 0 |
Return the absolute duration in seconds. | def WbTE(YKHO):
return YKHO.end_abs - YKHO.start | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WbTE(YKHO):\n return float('{0:.2f}'.format(YKHO.end_time - YKHO.start_time))",
"def WbTE(YKHO) -> float:\n return YKHO._stop - YKHO._start if YKHO._stop is not None else None",
"def m3XP(YKHO):\n return YKHO.get_data('duration_in_seconds')",
"def WbTE(YKHO):\n return YKHO.stop - YKHO.start",... | [
"0.74623835",
"0.73813367",
"0.7258197",
"0.7205601",
"0.7184122",
"0.7179667",
"0.7177773",
"0.717655",
"0.71611416",
"0.71505004",
"0.7140248",
"0.7140148",
"0.7113886",
"0.71128476",
"0.70916873",
"0.7089816",
"0.7074316",
"0.70680296",
"0.70603245",
"0.7009464",
"0.700419... | 0.7618609 | 0 |
``modular_squareroot_in_FQ2(x)`` returns the value ``y`` such that ``y2 % q == x``, and None if this is not possible. In cases where there are two solutions, the value with higher imaginary component is favored; if both solutions have equal imaginary component the value with higher real component is favored. | def XZQZ(BWXx: FQ2) -> h8nf[JWKC]:
QHbn = BWXx ** ((LXIV + 8) // 16)
GfdN = QHbn ** 2 / BWXx
if GfdN in QWA4[::2]:
o4D3 = QHbn / QWA4[QWA4.index(GfdN) // 2]
ajwV = -o4D3
_Wt2, xOKv = o4D3.coeffs
TIxB, KOkl = ajwV.coeffs
return o4D3 if xOKv > KOkl or (xOKv == KOkl and ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def poVz(eHNT, WKvO, MKlR=1e-05):\n return (-3 * eHNT(WKvO) + 4 * eHNT(WKvO + MKlR) - eHNT(WKvO + 2 * MKlR)) / (2 * MKlR)\n raise NotImplementedError('Problem 2 Incomplete')",
"def ZpWq(eHNT, WKvO, MKlR=1e-05):\n return (eHNT(WKvO + MKlR) - eHNT(WKvO - MKlR)) / (2 * MKlR)\n raise NotImplementedError(... | [
"0.60363",
"0.5656827",
"0.5607009",
"0.5589462",
"0.5497674",
"0.52864265",
"0.5166727",
"0.5152072",
"0.51497895",
"0.51399916",
"0.5110753",
"0.5099447",
"0.50873184",
"0.50827193",
"0.5010801",
"0.49463192",
"0.49347386",
"0.48830405",
"0.48534817",
"0.48531464",
"0.48519... | 0.8154235 | 0 |
Return a dataframe where index is sequences and columns is kmers | def nSzU(jWe2, CKFI):
jdKX = xBlr.partial(Uguy, kmer_size=CKFI, normalize=False)
dBuj = laXl.Pool(laXl.cpu_count())
JiUM = dBuj.map(jdKX, jWe2, chunksize=250)
dBuj.close()
dBuj.join()
vb7U = oyIN.vstack(JiUM).astype(int)
NKcn = ['' for bGrB in range(len(F5eL(CKFI)))]
for SOtT, YRbF in F5... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Suiq():\n OxJJ = [['approach', 'contact', 'retract', 'pause'], ['force', 'height']]\n d6pt = rLdf.MultiIndex.from_product(OxJJ, names=['segment', 'channel'])\n return rLdf.DataFrame(columns=d6pt)",
"def NUvE(Ueki):\n mS67 = []\n for YRbF in range(1, len(Ueki) + 1):\n mS67.append(YRbF)\n... | [
"0.63301885",
"0.61599785",
"0.5676173",
"0.566182",
"0.56429535",
"0.5638753",
"0.56306696",
"0.5625229",
"0.5522354",
"0.5496233",
"0.5451835",
"0.5386565",
"0.5336502",
"0.53291607",
"0.53284216",
"0.53099346",
"0.5295041",
"0.5238038",
"0.5201106",
"0.51936346",
"0.518240... | 0.5231338 | 18 |
Given a sequence and query kmers, return a binary matrix where each row represents if that kmer is in that position >>> sequence_kmer_pileup("ACTGCGTACG", ['ACT', 'GCG', 'TACG']) array([[1, 1, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1]]) >>> sequence_kmer_pileup("ACTGCGTACG"... | def buuX(Q6uT, ioyR):
assert isinstance(ioyR, list)
Fbjb = set([len(SOtT) for SOtT in ioyR])
RI88 = oyIN.zeros((len(ioyR), len(Q6uT))).astype(int)
for u54L in Fbjb:
assert u54L <= len(Q6uT), 'Cannoty query a kmer against a seq shorter than that kmer'
RXmH = [Q6uT[YRbF:YRbF + u54L] for YR... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JNOr(Q6uT, RXmH, GSaK=10, vpr_=2):\n try:\n OOPu = buuX(Q6uT, RXmH)\n except AssertionError:\n return []\n NgxG = oyIN.clip(oyIN.sum(OOPu, axis=0), 0, 1)\n NgxG = xA7Q(NgxG, vpr_)\n QeQ2 = aOfA(NgxG, l=GSaK)\n RI88 = [Q6uT[YRbF:YRbF + vC9B] for YRbF, vC9B in QeQ2]\n assert al... | [
"0.61783755",
"0.60753685",
"0.5434832",
"0.5219357",
"0.5162407",
"0.5095824",
"0.50787956",
"0.49830213",
"0.49265006",
"0.49147594",
"0.4905451",
"0.48459452",
"0.48157683",
"0.47851542",
"0.4756707",
"0.47567025",
"0.47282517",
"0.47153527",
"0.4694984",
"0.4694121",
"0.4... | 0.81217086 | 0 |
Return the index and length of all run non zero elements of length greater than l Primarily intended as a helper function for the below function assemble_kmer_motifs | def aOfA(ybOP, vC9B):
O2Hj = [(G1Hx, list(Oa1e)) for G1Hx, Oa1e in Hs6x.groupby(ybOP)]
RI88 = [(YRbF, len(Oa1e)) for YRbF, (G1Hx, Oa1e) in enumerate(O2Hj) if G1Hx and len(Oa1e) > vC9B]
return RI88 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Sym2(N9D1):\n return [len(list(uOe2)) for bGrB, uOe2 in Hs6x.groupby(N9D1)]",
"def tm40(paSp):\n tm40 = []\n for YRbF in paSp:\n tm40.append(len(YRbF))\n return tm40",
"def HkmG(KTQ3: np.ndarray) -> oyIN.ndarray:\n X8D5 = oyIN.any(oyIN.logical_not(oyIN.isclose(KTQ3, 0.0)), axis=-1).as... | [
"0.57668364",
"0.57313144",
"0.5707507",
"0.5580042",
"0.55796087",
"0.5565112",
"0.55609334",
"0.5546772",
"0.5518239",
"0.5488525",
"0.54691786",
"0.54683095",
"0.5459347",
"0.5455764",
"0.54440415",
"0.5441734",
"0.5425191",
"0.53992045",
"0.53959763",
"0.53895664",
"0.537... | 0.6479534 | 0 |
Creates an instance of this model from a dictionary | def rQfz(Emd4, cmPJ):
if cmPJ is None:
return None
SgJd = cmPJ.get('hasArchivalCopy')
OkGr = cmPJ.get('hasLocalCopy')
xt4R = cmPJ.get('hasRemoteCopy')
BfR6 = cmPJ.get('modifiedTimeUsecs')
UMm5 = None
if cmPJ.get('replicaInfoList') != None:
UMm5 = list()
for g8x2 in cm... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rQfz(Emd4, cmPJ):\n if cmPJ is None:\n return None\n id = cmPJ.get('id')\n mWFP = cmPJ.get('name')\n tDvy = cmPJ.get('type')\n fFb7 = cmPJ.get('usageBytes')\n return Emd4(id, mWFP, tDvy, fFb7)",
"def eLpg(Emd4, cmPJ):\n return Emd4(**cmPJ)",
"def eLpg(Emd4, cmPJ):\n return Em... | [
"0.83181584",
"0.8168118",
"0.8168118",
"0.8118749",
"0.8089047",
"0.79787344",
"0.7949278",
"0.79231393",
"0.7898951",
"0.78923255",
"0.788838",
"0.7882321",
"0.7882212",
"0.7876749",
"0.78585315",
"0.7836853",
"0.7801407",
"0.7801407",
"0.7801407",
"0.7801407",
"0.7801407",... | 0.0 | -1 |
Create a new instance of our `User` model. | def qjwx(cuiw: Session, CBIr: User) -> mv1M:
try:
cuiw.add(CBIr)
cuiw.commit()
S0MI.success(f'Created new user: {CBIr}')
return CBIr
except yXsM as e:
S0MI.error(tTpl.orig)
raise tTpl.orig
except cQ7A as e:
S0MI.error(f'Unexpected error when creating u... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lYUQ(YKHO, D3lj: str, jTXt: str, **B2fa: str) -> 'User':\n D3lj = YKHO.normalize_email(D3lj)\n CBIr: 'User' = YKHO.model(email=D3lj, **B2fa)\n CBIr.set_password(jTXt)\n CBIr.save()\n return CBIr",
"def lYUQ(YKHO):\n return NqOl.create()",
"def lYUQ(YKHO, **B2fa):\n CBIr = YKHO.user_mod... | [
"0.7993599",
"0.79923683",
"0.79566765",
"0.7897849",
"0.77330023",
"0.77002925",
"0.7699446",
"0.76870686",
"0.7683861",
"0.76535153",
"0.7635452",
"0.7633329",
"0.7607549",
"0.7600044",
"0.758689",
"0.75838315",
"0.758236",
"0.7579588",
"0.75724137",
"0.75642264",
"0.756048... | 0.0 | -1 |
Create a list of partitioned variables according to the given `slicing`. Currently only one dimension of the full variable can be sliced, and the full variable can be reconstructed by the concatenation of the returned list along that dimension. | def GjKQ(ROpF, sL6f, MuED, yDqo=m1c7.float32, XJsN=True, g760=None, mWFP=None, CJGY=None):
if len(ROpF) != len(sL6f):
raise ValueError("The 'shape' and 'slicing' of a partitioned Variable must have the length: shape: %s, slicing: %s" % (ROpF, sL6f))
if len(ROpF) < 1:
raise ValueError('A partitio... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GjKQ(ROpF, sL6f, MuED, yDqo=m1c7.float32, XJsN=True, g760=None, mWFP=None, CJGY=None):\n if len(ROpF) != len(sL6f):\n raise ValueError(f\"The 'shape' and 'slicing' of a partitioned Variable must have the length: shape: {ROpF}, slicing: {sL6f}\")\n if len(ROpF) < 1:\n raise ValueError(f'A pa... | [
"0.7400339",
"0.6649992",
"0.6155834",
"0.6027694",
"0.5980611",
"0.58807266",
"0.5725447",
"0.5596276",
"0.55921227",
"0.5575733",
"0.55720437",
"0.5551016",
"0.55449885",
"0.55369186",
"0.5514247",
"0.548069",
"0.5457379",
"0.5433361",
"0.5427207",
"0.54064906",
"0.53875506... | 0.73679435 | 1 |
Returns the number of fields in this schema. | def szAg(YKHO):
return len(YKHO._by_number) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def szAg(YKHO):\n return YKHO.dbms.get_nb_fields(YKHO.table, YKHO.db)",
"def TRTk(YKHO):\n return len(YKHO.paths)",
"def gYg2(YKHO):\n return len(YKHO.columns) + (1 if YKHO.serialize else 0)",
"def W74N(YKHO):\n if YKHO.value.count != 0:\n return len(YKHO.value[0])\n else:\n retu... | [
"0.81591487",
"0.78460896",
"0.7257139",
"0.7252796",
"0.7120052",
"0.6978501",
"0.68712497",
"0.68519604",
"0.68484867",
"0.6738405",
"0.67203087",
"0.6709255",
"0.66980517",
"0.6691632",
"0.66814804",
"0.6612548",
"0.6610964",
"0.6578507",
"0.65737176",
"0.6571952",
"0.6560... | 0.0 | -1 |
Returns a list of the names of the fields in this schema. | def NSNj(YKHO):
return YKHO._names | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qPqU(YKHO):\n return YKHO.__fieldNames",
"def zJN_(YKHO):\n return YKHO._keys",
"def NSNj(YKHO):\n return YKHO.base_field_names() + list(YKHO.data.keys())",
"def FAz_(Emd4) -> x1iM:\n return list((Jyyj.name for Jyyj in nf7Q.fields(Emd4)))",
"def zJN_(YKHO):\n return {im04[0] for im04 in ... | [
"0.84484935",
"0.8384219",
"0.8352998",
"0.8320168",
"0.8296431",
"0.82712126",
"0.8186574",
"0.8079723",
"0.79368764",
"0.7814438",
"0.77573127",
"0.77475095",
"0.7678432",
"0.7672202",
"0.76382",
"0.76280415",
"0.76061904",
"0.7572449",
"0.7543729",
"0.7541312",
"0.75341004... | 0.8322108 | 3 |
Given a field number, returns the field's name. | def MXNc(YKHO, FGW3):
return YKHO._names[FGW3] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VS2R(YKHO, Jyyj):\n mWFP = Jyyj.name\n mWFP = ujeG(mWFP)\n if YKHO.options(Jyyj).convert_case:\n mWFP = A13V(mWFP)\n mWFP = YKHO._mangle_name(mWFP)\n return mWFP",
"def AtTB(YKHO, Jyyj):\n mWFP = Jyyj.name\n return ujeG(mWFP)",
"def waFm(zGKt, Jyyj):\n if 'standard_name' in z... | [
"0.7281962",
"0.7170076",
"0.7035154",
"0.7026706",
"0.7006933",
"0.6831218",
"0.6755667",
"0.6750089",
"0.67179394",
"0.6710781",
"0.6677429",
"0.6654905",
"0.65733427",
"0.6517517",
"0.65146506",
"0.64716965",
"0.6448458",
"0.6425866",
"0.63990456",
"0.6378071",
"0.6367998"... | 0.6655586 | 11 |
Returns a list of field numbers corresponding to the fields that are vectored. | def wFrN(YKHO):
return [YRbF for YRbF, ZFoc in enumerate(YKHO._by_number) if ZFoc.vector] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ecgg(YKHO):\n return any((ZFoc.vector for ZFoc in YKHO._by_number))",
"def yfhR(YKHO):\n return Zxt2.dstack((YKHO._u_int, YKHO._v_int))",
"def blUy(YKHO, H5ew):\n Dyub = YKHO.get_field(H5ew + '1')\n EmyI = YKHO.get_field(H5ew + '2')\n IxvY = YKHO.get_field(H5ew + '3')\n WKvO, LVAh, epBp =... | [
"0.6576135",
"0.62712544",
"0.60526973",
"0.5864147",
"0.57768536",
"0.57186764",
"0.5664389",
"0.56052095",
"0.5580481",
"0.55764526",
"0.5470249",
"0.54560256",
"0.54304016",
"0.5407624",
"0.54074955",
"0.5394592",
"0.53900814",
"0.53792286",
"0.53194577",
"0.52956903",
"0.... | 0.85502195 | 0 |
Returns the content analyzer for the given fieldname, or None if the field has no analyzer | def rSDZ(YKHO, K_Sa):
Jyyj = YKHO[K_Sa]
if Jyyj.format and Jyyj.format.analyzer:
return Jyyj.format.analyzer | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RYV7(Emd4, yXuA):\n return Emd4._class_registry[yXuA.lower()]",
"def QTMT(YKHO, vXX7):\n for eHNT in YKHO.fields:\n if eHNT.name.lower() == vXX7.lower():\n return eHNT\n return None",
"def bi3L(K_Sa):\n vC9B = [Csk6 for Csk6 in Pdb4 if Csk6.doctype == 'DocField' and Csk6.field... | [
"0.6079767",
"0.589265",
"0.5835959",
"0.53897285",
"0.5088177",
"0.5068475",
"0.50557554",
"0.5018533",
"0.49397895",
"0.49092835",
"0.48768896",
"0.47611442",
"0.47393295",
"0.4728982",
"0.4700087",
"0.46914902",
"0.4690814",
"0.466198",
"0.4646916",
"0.4645643",
"0.4635231... | 0.7778403 | 0 |
Sets the timesheet_line_id of this TimesheetLine. | def kZaW(YKHO, kZaW):
YKHO._timesheet_line_id = kZaW | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kI_D(YKHO, kI_D):\n YKHO._line_item_id = kI_D",
"def _mV9(YKHO, bGrB=None):\n YKHO.set_mask_type('line')",
"def JyxL(YKHO, JyxL):\n YKHO._line_nbr = JyxL",
"def fYd2(YKHO, fYd2):\n YKHO._line_status = fYd2",
"def aclT(YKHO, aclT):\n YKHO._sparkline_line_color = aclT",
"def li6g(YKHO, l... | [
"0.6376212",
"0.585144",
"0.57867175",
"0.56583244",
"0.5600785",
"0.5485917",
"0.5475551",
"0.54733694",
"0.5457823",
"0.5449516",
"0.5371612",
"0.5358188",
"0.52637",
"0.5210421",
"0.52039397",
"0.5165261",
"0.51464885",
"0.51464885",
"0.51464885",
"0.5125291",
"0.51213425"... | 0.9208573 | 0 |
Sets the tracking_item_id of this TimesheetLine. | def gc5D(YKHO, gc5D):
YKHO._tracking_item_id = gc5D | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kI_D(YKHO, kI_D):\n YKHO._line_item_id = kI_D",
"def ShdB(YKHO, ShdB):\n YKHO._tracking_id = ShdB",
"def ht7m(YKHO, ht7m):\n YKHO._item_id = ht7m",
"def ht7m(YKHO, ht7m):\n YKHO._item_id = ht7m",
"def ht7m(YKHO, ht7m):\n YKHO._item_id = ht7m",
"def kZaW(YKHO, kZaW):\n YKHO._timeshee... | [
"0.7257509",
"0.6755095",
"0.64136916",
"0.64136916",
"0.64136916",
"0.5871529",
"0.5680786",
"0.56769633",
"0.56769633",
"0.5609209",
"0.5501813",
"0.5485787",
"0.5467613",
"0.51974404",
"0.51598537",
"0.51566774",
"0.51323116",
"0.5124376",
"0.5121191",
"0.5074866",
"0.5072... | 0.815952 | 0 |
Sets the number_of_units of this TimesheetLine. | def gzjx(YKHO, gzjx):
if gzjx is None:
raise ValueError('Invalid value for `number_of_units`, must not be `None`')
YKHO._number_of_units = gzjx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gzjx(YKHO, gzjx):\n YKHO._number_of_units = gzjx",
"def rfjI(YKHO, dsRq):\n YKHO.number_of_time_steps = dsRq",
"def nFDf(YKHO, rYO3):\n YKHO.units = rYO3",
"def LydE(YKHO, LydE):\n YKHO._units_setting = LydE",
"def rYO3(YKHO, rYO3):\n YKHO._units = rYO3",
"def rYO3(YKHO, rYO3):\n YK... | [
"0.8183294",
"0.70641243",
"0.6417182",
"0.6198261",
"0.5933052",
"0.5933052",
"0.5933052",
"0.5894928",
"0.574319",
"0.5724416",
"0.56904614",
"0.5610853",
"0.55990285",
"0.55183345",
"0.54891974",
"0.5480462",
"0.54644585",
"0.5446119",
"0.5418585",
"0.5403658",
"0.53636944... | 0.71914977 | 1 |
Matches to explicit slashless URLs should go unmolested. | def Yzva(YKHO):
def T_2m(qv1X):
return igJ6("Here's the text of the web page.")
QePW = YKHO.rf.get('/noslash')
YKHO.assertIsNone(tIGv(T_2m).process_request(QePW))
YKHO.assertEqual(tIGv(T_2m)(QePW).content, b"Here's the text of the web page.") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YYNn():\n assert gmoQ('http://www.example.com/foo//bar.html') == 'http://www.example.com/foo/bar.html'\n assert gmoQ('http://example.com///abc') == 'http://example.com/abc'",
"def BCf3():\n assert gmoQ('example.com') == 'http://example.com/'\n assert gmoQ('example.com/abc') == 'http://example.com... | [
"0.69019014",
"0.6602079",
"0.64100283",
"0.6345101",
"0.6202505",
"0.61982834",
"0.59627116",
"0.5944036",
"0.5937673",
"0.5934989",
"0.5899633",
"0.5865584",
"0.5847636",
"0.58120596",
"0.57773834",
"0.5759613",
"0.5758419",
"0.5756713",
"0.57340276",
"0.57326156",
"0.56948... | 0.52134234 | 99 |
APPEND_SLASH should append slash to path when redirecting a request with a querystring ending with slash. | def qU_x(YKHO):
QePW = YKHO.rf.get('/slash?test=slash/')
_hkX = tIGv(HX0C)(QePW)
YKHO.assertIsInstance(_hkX, QEeo)
YKHO.assertEqual(_hkX.url, '/slash/?test=slash/') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RPq5(YKHO):\n QePW = YKHO.rf.get('/slash?test=1')\n _hkX = tIGv(HX0C)(QePW)\n YKHO.assertEqual(_hkX.url, '/slash/?test=1')",
"def FDzg(PNq_, so27):\n from colubrid.exceptions import HttpMoved\n bD7m = NCC9(PNq_.get('SCRIPT_NAME', ''))\n bD7m += NCC9(PNq_.get('PATH_INFO', ''))\n xDcj = PN... | [
"0.74099624",
"0.7253963",
"0.7086631",
"0.6728155",
"0.6602731",
"0.6182194",
"0.6003779",
"0.59855634",
"0.5924239",
"0.59172046",
"0.5905983",
"0.5868049",
"0.5868018",
"0.5817994",
"0.562229",
"0.56061345",
"0.55782634",
"0.55239135",
"0.55239135",
"0.55194396",
"0.549757... | 0.74912924 | 0 |
Disabling append slash functionality should leave slashless URLs alone. | def kJ34(YKHO):
QePW = YKHO.rf.get('/slash')
YKHO.assertEqual(tIGv(HX0C)(QePW).status_code, 404) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YYNn():\n assert gmoQ('http://www.example.com/foo//bar.html') == 'http://www.example.com/foo/bar.html'\n assert gmoQ('http://example.com///abc') == 'http://example.com/abc'",
"def bIoc(bD7m):\n return bD7m if bD7m.endswith('/') else bD7m + '/'",
"def o4Wg(pB6H: str) -> str:\n if pB6H[-1:] != '/... | [
"0.67874944",
"0.6561039",
"0.65192884",
"0.64829475",
"0.6442448",
"0.64176923",
"0.6327198",
"0.63167566",
"0.61084825",
"0.61076355",
"0.6096986",
"0.6096121",
"0.6088276",
"0.6011603",
"0.60082155",
"0.60057205",
"0.5990615",
"0.59772855",
"0.5931927",
"0.59236723",
"0.59... | 0.69257134 | 0 |
Matches to explicit slashless URLs should go unmolested. | def mFyr(YKHO):
def T_2m(qv1X):
return igJ6('web content')
QePW = YKHO.rf.get('/customurlconf/noslash')
QePW.urlconf = 'middleware.extra_urls'
YKHO.assertIsNone(tIGv(T_2m).process_request(QePW))
YKHO.assertEqual(tIGv(T_2m)(QePW).content, b'web content') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YYNn():\n assert gmoQ('http://www.example.com/foo//bar.html') == 'http://www.example.com/foo/bar.html'\n assert gmoQ('http://example.com///abc') == 'http://example.com/abc'",
"def BCf3():\n assert gmoQ('example.com') == 'http://example.com/'\n assert gmoQ('example.com/abc') == 'http://example.com... | [
"0.69019014",
"0.6602079",
"0.64100283",
"0.6345101",
"0.6202505",
"0.61982834",
"0.59627116",
"0.5944036",
"0.5937673",
"0.5934989",
"0.5899633",
"0.5865584",
"0.5847636",
"0.58120596",
"0.57773834",
"0.5759613",
"0.5758419",
"0.5756713",
"0.57340276",
"0.57326156",
"0.56948... | 0.0 | -1 |
Disabling append slash functionality should leave slashless URLs alone. | def MqwE(YKHO):
QePW = YKHO.rf.get('/customurlconf/slash')
QePW.urlconf = 'middleware.extra_urls'
YKHO.assertIsNone(tIGv(HX0C).process_request(QePW))
YKHO.assertEqual(tIGv(HX0C)(QePW).status_code, 404) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kJ34(YKHO):\n QePW = YKHO.rf.get('/slash')\n YKHO.assertEqual(tIGv(HX0C)(QePW).status_code, 404)",
"def YYNn():\n assert gmoQ('http://www.example.com/foo//bar.html') == 'http://www.example.com/foo/bar.html'\n assert gmoQ('http://example.com///abc') == 'http://example.com/abc'",
"def bIoc(bD7m):... | [
"0.69257134",
"0.67874944",
"0.6561039",
"0.65192884",
"0.64829475",
"0.64176923",
"0.6327198",
"0.63167566",
"0.61084825",
"0.61076355",
"0.6096986",
"0.6096121",
"0.6088276",
"0.6011603",
"0.60082155",
"0.60057205",
"0.5990615",
"0.59772855",
"0.5931927",
"0.59236723",
"0.5... | 0.6442448 | 5 |
The 304 Not Modified response should include only the headers required by RFC 9110 Section 15.4.5, LastModified, and the cookies. | def dN4V(YKHO):
def T_2m(qv1X):
_hkX = YKHO.client.get(qv1X.path_info)
_hkX['Date'] = 'Sat, 12 Feb 2011 17:35:44 GMT'
_hkX['Last-Modified'] = 'Sat, 12 Feb 2011 17:35:44 GMT'
_hkX['Expires'] = 'Sun, 13 Feb 2011 17:35:44 GMT'
_hkX['Vary'] = 'Cookie'
_hkX['Cache-Control... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SR6x(YKHO):\n IMwm = ('allow', 'content-encoding', 'content-language', 'content-length', 'content-md5', 'content-range', 'content-type', 'last-modified')\n for MKlR in IMwm:\n BCYG.response.set_header(MKlR, 'foo')\n BCYG.status = 304\n for MKlR, Ty9i in BCYG.response.headerlist:\n YKH... | [
"0.77433777",
"0.7389816",
"0.7304999",
"0.72709113",
"0.7158089",
"0.71346813",
"0.67680997",
"0.6660743",
"0.65579474",
"0.6540546",
"0.65395445",
"0.64814484",
"0.64814484",
"0.64471066",
"0.6441493",
"0.64004403",
"0.6374444",
"0.6374444",
"0.6342886",
"0.63065875",
"0.63... | 0.7653532 | 1 |
The X_FRAME_OPTIONS setting can be set to SAMEORIGIN to have the middleware use that value for the HTTP header. | def auQI(YKHO):
with H4Ge(X_FRAME_OPTIONS='SAMEORIGIN'):
Mkmy = IHKi(qlfV)(eu5F())
YKHO.assertEqual(Mkmy.headers['X-Frame-Options'], 'SAMEORIGIN')
with H4Ge(X_FRAME_OPTIONS='sameorigin'):
Mkmy = IHKi(qlfV)(eu5F())
YKHO.assertEqual(Mkmy.headers['X-Frame-Options'], 'SAMEORIGIN') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bsIz(YKHO):\n with H4Ge(X_FRAME_OPTIONS=None):\n del gCuF.X_FRAME_OPTIONS\n Mkmy = IHKi(qlfV)(eu5F())\n YKHO.assertEqual(Mkmy.headers['X-Frame-Options'], 'DENY')",
"def rCHf(YKHO):\n\n def KJtn(QePW):\n geh0 = igJ6()\n geh0.headers['X-Frame-Options'] = 'SAMEORIGIN'\n ... | [
"0.797619",
"0.7835283",
"0.7401202",
"0.7227937",
"0.70077145",
"0.6819348",
"0.67600465",
"0.66922677",
"0.64878297",
"0.63498175",
"0.6249832",
"0.6233134",
"0.6120981",
"0.60746974",
"0.60449773",
"0.5995455",
"0.59321135",
"0.59264505",
"0.5913701",
"0.58064616",
"0.5800... | 0.7810529 | 2 |
The X_FRAME_OPTIONS setting can be set to DENY to have the middleware use that value for the HTTP header. | def SxVf(YKHO):
with H4Ge(X_FRAME_OPTIONS='DENY'):
Mkmy = IHKi(qlfV)(eu5F())
YKHO.assertEqual(Mkmy.headers['X-Frame-Options'], 'DENY')
with H4Ge(X_FRAME_OPTIONS='deny'):
Mkmy = IHKi(qlfV)(eu5F())
YKHO.assertEqual(Mkmy.headers['X-Frame-Options'], 'DENY') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bsIz(YKHO):\n with H4Ge(X_FRAME_OPTIONS=None):\n del gCuF.X_FRAME_OPTIONS\n Mkmy = IHKi(qlfV)(eu5F())\n YKHO.assertEqual(Mkmy.headers['X-Frame-Options'], 'DENY')",
"def rCHf(YKHO):\n\n def KJtn(QePW):\n geh0 = igJ6()\n geh0.headers['X-Frame-Options'] = 'SAMEORIGIN'\n ... | [
"0.77441394",
"0.77235246",
"0.7475997",
"0.7407488",
"0.72964406",
"0.6919084",
"0.6720077",
"0.64512885",
"0.6388979",
"0.633439",
"0.59314615",
"0.58958787",
"0.5841698",
"0.57990575",
"0.5778251",
"0.5755206",
"0.57463",
"0.5726813",
"0.5702936",
"0.56696177",
"0.56688845... | 0.8097318 | 0 |
If the X_FRAME_OPTIONS setting is not set then it defaults to DENY. | def bsIz(YKHO):
with H4Ge(X_FRAME_OPTIONS=None):
del gCuF.X_FRAME_OPTIONS
Mkmy = IHKi(qlfV)(eu5F())
YKHO.assertEqual(Mkmy.headers['X-Frame-Options'], 'DENY') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SxVf(YKHO):\n with H4Ge(X_FRAME_OPTIONS='DENY'):\n Mkmy = IHKi(qlfV)(eu5F())\n YKHO.assertEqual(Mkmy.headers['X-Frame-Options'], 'DENY')\n with H4Ge(X_FRAME_OPTIONS='deny'):\n Mkmy = IHKi(qlfV)(eu5F())\n YKHO.assertEqual(Mkmy.headers['X-Frame-Options'], 'DENY')",
"def ljKE(Y... | [
"0.81923014",
"0.8078053",
"0.7757181",
"0.7130634",
"0.667028",
"0.64313835",
"0.57909423",
"0.56664836",
"0.5645852",
"0.554543",
"0.55281603",
"0.5457793",
"0.5340389",
"0.5340389",
"0.53040135",
"0.52516526",
"0.51903003",
"0.5158321",
"0.5144021",
"0.51436627",
"0.511732... | 0.7452115 | 3 |
If the XFrameOptions header is already set then the middleware does not attempt to override it. | def rCHf(YKHO):
def KJtn(QePW):
geh0 = igJ6()
geh0.headers['X-Frame-Options'] = 'SAMEORIGIN'
return geh0
def G0PM(QePW):
geh0 = igJ6()
geh0.headers['X-Frame-Options'] = 'DENY'
return geh0
with H4Ge(X_FRAME_OPTIONS='DENY'):
Mkmy = IHKi(KJtn)(eu5F())
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bsIz(YKHO):\n with H4Ge(X_FRAME_OPTIONS=None):\n del gCuF.X_FRAME_OPTIONS\n Mkmy = IHKi(qlfV)(eu5F())\n YKHO.assertEqual(Mkmy.headers['X-Frame-Options'], 'DENY')",
"def ZVtN(YKHO):\n\n def cGdU(QePW):\n geh0 = igJ6()\n geh0.xframe_options_exempt = True\n return... | [
"0.75769746",
"0.7559421",
"0.69810355",
"0.69232666",
"0.6921727",
"0.6782732",
"0.6491265",
"0.6448554",
"0.6047611",
"0.56697845",
"0.54975253",
"0.5489311",
"0.54482067",
"0.54186684",
"0.53674936",
"0.5365614",
"0.527816",
"0.52711457",
"0.5242988",
"0.52124727",
"0.5202... | 0.75254494 | 2 |
GZipMiddleware makes a strong ETag weak. | def d5sK(YKHO):
def T_2m(qv1X):
geh0 = igJ6(YKHO.compressible_string)
geh0.headers['ETag'] = '"eggs"'
return geh0
QePW = YKHO.rf.get('/', headers={'accept-encoding': 'gzip, deflate'})
ozBh = xYVA(T_2m)(QePW)
YKHO.assertEqual(ozBh.headers['ETag'], 'W/"eggs"') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qtPC(YKHO):\n\n def T_2m(qv1X):\n geh0 = igJ6(YKHO.compressible_string)\n geh0.headers['ETag'] = 'W/\"eggs\"'\n return geh0\n QePW = YKHO.rf.get('/', headers={'accept-encoding': 'gzip, deflate'})\n ozBh = xYVA(T_2m)(QePW)\n YKHO.assertEqual(ozBh.headers['ETag'], 'W/\"eggs\"')",... | [
"0.7565509",
"0.6790778",
"0.6711801",
"0.63088965",
"0.624187",
"0.6101281",
"0.59977597",
"0.5978516",
"0.5971494",
"0.5754018",
"0.56875217",
"0.5585591",
"0.55424803",
"0.5439437",
"0.5348001",
"0.5328124",
"0.53126985",
"0.52768075",
"0.5225052",
"0.51471895",
"0.514468"... | 0.7457159 | 1 |
GZipMiddleware doesn't modify a weak ETag. | def qtPC(YKHO):
def T_2m(qv1X):
geh0 = igJ6(YKHO.compressible_string)
geh0.headers['ETag'] = 'W/"eggs"'
return geh0
QePW = YKHO.rf.get('/', headers={'accept-encoding': 'gzip, deflate'})
ozBh = xYVA(T_2m)(QePW)
YKHO.assertEqual(ozBh.headers['ETag'], 'W/"eggs"') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d5sK(YKHO):\n\n def T_2m(qv1X):\n geh0 = igJ6(YKHO.compressible_string)\n geh0.headers['ETag'] = '\"eggs\"'\n return geh0\n QePW = YKHO.rf.get('/', headers={'accept-encoding': 'gzip, deflate'})\n ozBh = xYVA(T_2m)(QePW)\n YKHO.assertEqual(ozBh.headers['ETag'], 'W/\"eggs\"')",
... | [
"0.7308437",
"0.6863467",
"0.66180116",
"0.6354348",
"0.62460524",
"0.6134506",
"0.6048172",
"0.59835535",
"0.5968006",
"0.58983374",
"0.575672",
"0.5627629",
"0.5577308",
"0.55178344",
"0.54604185",
"0.5438792",
"0.5319739",
"0.5313638",
"0.526459",
"0.5229137",
"0.51921755"... | 0.74918115 | 0 |
GZipMiddleware allows 304 Not Modified responses. | def y1dY(YKHO):
def T_2m(qv1X):
return igJ6(YKHO.compressible_string)
def sIfD(qv1X):
return N7Ls(T_2m)(qv1X)
QePW = YKHO.rf.get('/', headers={'accept-encoding': 'gzip, deflate'})
geh0 = xYVA(sIfD)(QePW)
IE2L = geh0.headers['ETag']
zwJI = YKHO.rf.get('/', headers={'accept-encod... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qtPC(YKHO):\n\n def T_2m(qv1X):\n geh0 = igJ6(YKHO.compressible_string)\n geh0.headers['ETag'] = 'W/\"eggs\"'\n return geh0\n QePW = YKHO.rf.get('/', headers={'accept-encoding': 'gzip, deflate'})\n ozBh = xYVA(T_2m)(QePW)\n YKHO.assertEqual(ozBh.headers['ETag'], 'W/\"eggs\"')",... | [
"0.6854429",
"0.6741573",
"0.658272",
"0.6445341",
"0.63581556",
"0.63434166",
"0.6312553",
"0.6298311",
"0.6186649",
"0.5948793",
"0.5864117",
"0.5847581",
"0.56995493",
"0.5563173",
"0.5528743",
"0.5521492",
"0.55056155",
"0.5495077",
"0.5490004",
"0.5417216",
"0.5371164",
... | 0.6394955 | 4 |
Sets datadog API key | async def statset_apikey(YKHO, H5ew):
YKHO._set_api_key(H5ew)
await YKHO.bot.say('API key successfully set.') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yElH(YKHO, rJDA):\n YKHO._api_key = rJDA",
"def yElH(YKHO, rJDA):\n YKHO._api_key = rJDA",
"def yElH(YKHO, rJDA):\n YKHO._analyzer.SetAPIKey(rJDA)",
"def Dma5(rJDA):\n H4Ej.__api_key = rJDA",
"def Dma5(wGvM):\n global api_key\n rJDA = wGvM",
"def Dma5(YKHO, rJDA):\n YKHO.api_key ... | [
"0.70950806",
"0.70950806",
"0.6908245",
"0.67399395",
"0.6729884",
"0.66733587",
"0.66491234",
"0.655347",
"0.64002097",
"0.6328368",
"0.6238506",
"0.6142716",
"0.6066376",
"0.6057347",
"0.6047893",
"0.59926176",
"0.5980683",
"0.5965308",
"0.5939813",
"0.58505857",
"0.584780... | 0.67987484 | 3 |
The constructor initializes empty lists | def FIMM(YKHO):
YKHO.param_names = []
YKHO.param_values = []
YKHO.param_settings = []
YKHO.result = []
YKHO.best_params = None
YKHO.best_score = None
YKHO.max_reps = 5
YKHO.num_values = False
YKHO.algorithm_done = False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n YKHO.mylist = []",
"def FIMM(YKHO):\n YKHO.l = []",
"def FIMM(YKHO):\n YKHO.list = []",
"def FIMM(YKHO):\n x1iM.__init__(YKHO)",
"def FIMM(YKHO):\n list.__init__([])\n YKHO.name = ''\n YKHO.ideal_value = None",
"def FIMM(YKHO, *qIxc):\n VQ6Z = _VfD.new_ListOf(*qI... | [
"0.7677622",
"0.76043624",
"0.7603818",
"0.7514921",
"0.7482716",
"0.7436217",
"0.74123544",
"0.7351431",
"0.7351431",
"0.73165447",
"0.73157436",
"0.72575426",
"0.7222783",
"0.7204848",
"0.72019887",
"0.7201009",
"0.71974546",
"0.7175932",
"0.706622",
"0.70638686",
"0.703859... | 0.0 | -1 |
Return True if file exist, Return FileExistsError if file doesn't exist | def JgkM(Ux0P: str):
if Hy7s.path.isfile(Ux0P):
return True
else:
raise FileExistsError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nDe1() -> bool:\n pass",
"def Hat5(YKHO):\n pass",
"def ROGV(nUeQ):\n return Hy7s.path.exists(nUeQ)",
"def fepa(YKHO):\n return False",
"def poxP(YKHO):\n if Hy7s.path.exists(YKHO.file_path):\n return True\n else:\n return False",
"def poxP(pmON):\n try:\n wi... | [
"0.8629078",
"0.8614841",
"0.846485",
"0.8403369",
"0.83062434",
"0.81839824",
"0.81131935",
"0.8106633",
"0.810475",
"0.8093502",
"0.8087499",
"0.8060332",
"0.80587894",
"0.8054834",
"0.8054834",
"0.8041066",
"0.8017158",
"0.80128294",
"0.8006283",
"0.7999294",
"0.7994094",
... | 0.84336394 | 3 |
Normalizes probability vectors so they sum to one. | def Ea7F(vb7U):
T4Wy = len(vb7U.shape) - 1
vb7U = aQBx(vb7U)
FtBq = vb7U.sum(axis=T4Wy)
vb7U = GEPU(vb7U)
for AU8u in vb7U.data:
di96 = FtBq[AU8u[:-1]]
vb7U[AU8u] = vb7U[AU8u] / di96
vb7U = aQBx(vb7U)
return vb7U | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z7xS(Ty9i):\n WuUW = 1.0 / sum(Ty9i)\n HBfW = [YRbF * WuUW for YRbF in Ty9i]\n return HBfW",
"def NkkI(F_On):\n if len(oyIN.asarray(F_On).shape) == 1:\n return F_On / oyIN.linalg.norm(F_On)\n CkYf = oyIN.linalg.norm(F_On, axis=1)\n return F_On / CkYf[:, oyIN.newaxis]",
"def ikhk(he... | [
"0.7580847",
"0.75564206",
"0.74186236",
"0.7410925",
"0.7377618",
"0.73085237",
"0.72912604",
"0.72175294",
"0.7196013",
"0.71357614",
"0.70906126",
"0.70791817",
"0.70737934",
"0.70503455",
"0.70298916",
"0.70199317",
"0.69846654",
"0.6981637",
"0.6973443",
"0.69549954",
"0... | 0.0 | -1 |
Returns all predecessor transaction ids for a write of the provided address. | def YLHT(YKHO, UTX6):
SoZd = set()
s2mk = YKHO._tokenize_address(UTX6)
O54T = None
Cutu = None
Q6kx = YKHO._root
for YRbF, eOtH in enumerate(s2mk):
if eOtH not in Q6kx.children:
break
Q6kx = Q6kx.children[eOtH]
if YRbF == len(s2mk) - 1:
Cutu = Q6kx... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def blgH(YKHO, UTX6):\n SoZd = set()\n s2mk = YKHO._tokenize_address(UTX6)\n O54T = None\n Cutu = None\n Q6kx = YKHO._root\n for YRbF, eOtH in enumerate(s2mk):\n if eOtH not in Q6kx.children:\n break\n Q6kx = Q6kx.children[eOtH]\n if YRbF == len(s2mk) - 1:\n ... | [
"0.6227516",
"0.61230135",
"0.5462253",
"0.5246722",
"0.5119472",
"0.5113666",
"0.5044757",
"0.4976977",
"0.4962724",
"0.49612528",
"0.4944683",
"0.49066156",
"0.48827434",
"0.48396674",
"0.481053",
"0.47906673",
"0.477658",
"0.47230756",
"0.4710375",
"0.47073352",
"0.4684185... | 0.64865726 | 0 |
Returns all predecessor transaction ids for a read of the provided address. | def blgH(YKHO, UTX6):
SoZd = set()
s2mk = YKHO._tokenize_address(UTX6)
O54T = None
Cutu = None
Q6kx = YKHO._root
for YRbF, eOtH in enumerate(s2mk):
if eOtH not in Q6kx.children:
break
Q6kx = Q6kx.children[eOtH]
if YRbF == len(s2mk) - 1:
Cutu = Q6kx... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RqaR(UTX6):\n MI4h = G4JS.get('https://blockstream.info/testnet/api/address/{}/txs'.format(UTX6)).json()\n ofgl = [UShr['txid'] for UShr in MI4h]\n return ofgl",
"def vOPp(YKHO, Q6kx):\n aTLP = []\n nz8x = YKHO.node_to_state(Q6kx)\n for WhY1 in YKHO.predecessors:\n xGoe = (Q6kx[0] + ... | [
"0.6252107",
"0.5598242",
"0.5539953",
"0.54895395",
"0.5374383",
"0.5285195",
"0.519724",
"0.51863295",
"0.51379186",
"0.5116271",
"0.5083562",
"0.5043375",
"0.50414634",
"0.4970563",
"0.49442694",
"0.4913162",
"0.4908487",
"0.48961192",
"0.48753965",
"0.48634443",
"0.481537... | 0.6184831 | 1 |
Return a random vector within the constraints of this cube. | def CeVu(YKHO, ADdS):
return qw7D([ADdS.uniform(*Z9rn) for Z9rn in YKHO.constraints]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XLEQ(YKHO):\n return MF4b([oyIN.random.uniform(vC9B, P6bq) for vC9B, P6bq in YKHO.bounds])",
"def QmEa():\n WKvO = oyIN.random.normal(loc=0.0, scale=1.0, size=(LUrB, YKHO.dim))\n epBp = oyIN.random.exponential(scale=1.0, size=(LUrB,))\n Csk6 = (oyIN.sum(oyIN.square(WKvO), axis=1) + epBp) ** 0.5\n... | [
"0.7057693",
"0.66879135",
"0.6620441",
"0.65932673",
"0.6571752",
"0.63854337",
"0.63134366",
"0.6206621",
"0.6206621",
"0.6163843",
"0.61616606",
"0.61566645",
"0.6156069",
"0.61395216",
"0.61284345",
"0.61011714",
"0.60848147",
"0.60419506",
"0.60418",
"0.6007049",
"0.6001... | 0.7298451 | 0 |
Return all extended attributes on path as a mapping. path can either be a path (str or bytes) or an open file descriptor (int). follow_symlinks indicates whether symlinks should be followed and only applies when path is not an open file descriptor. The returned mapping maps xattr names (bytes) to values (bytes or None)... | def pi1E(pmON, llTg=False):
if isinstance(pmON, str):
pmON = Hy7s.fsencode(pmON)
Aofo = {}
try:
ZWCE = FQVq(pmON, follow_symlinks=llTg)
for mWFP in ZWCE:
try:
Aofo[mWFP] = Vizl(pmON, mWFP, follow_symlinks=llTg)
except OSError as e:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TRDU(pmON, m3gs, llTg=False):\n if isinstance(pmON, str):\n pmON = Hy7s.fsencode(pmON)\n pEH_ = False\n for G1Hx, Ty9i in m3gs.items():\n try:\n vvUy(pmON, G1Hx, Ty9i, follow_symlinks=llTg)\n except OSError as e:\n pEH_ = True\n if tTpl.errno == d1... | [
"0.6320701",
"0.55420697",
"0.5457799",
"0.531721",
"0.5238313",
"0.5232355",
"0.5222333",
"0.52132016",
"0.5200607",
"0.5169005",
"0.49911028",
"0.49643806",
"0.49535906",
"0.480479",
"0.48016867",
"0.47861853",
"0.47584578",
"0.4731208",
"0.4717506",
"0.46894896",
"0.464641... | 0.79996324 | 0 |
Set up this platform for a specific ConfigEntry(==Gateway). | async def async_setup_entry(ajET: HomeAssistant, PhL6: ConfigEntry, QEEk: AddEntitiesCallback) -> None:
async def async_discover(tR5e: DiscoveryInfo) -> None:
"""Discover and add a MySensors sensor."""
L3zE.setup_mysensors_platform(ajET, Sugg, tR5e, Wy2t, async_add_entities=QEEk)
fEn5(ajET, PhL... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def async_setup_entry_gateway(ajET, PhL6, QEEk):\n nNXP = ajET.data[Sugg][PhL6.entry_id]['api']\n S3vU = ajET.data[Sugg][PhL6.entry_id][OGJM]\n MMe4 = []\n MG2r = ['plug', 'switch_group']\n fGFq = nNXP.get_all_devices()\n for SjDy, Mqyx in fGFq.items():\n DgAC = None\n C3ST = ... | [
"0.6461348",
"0.62020314",
"0.61107635",
"0.6081859",
"0.6049066",
"0.59690785",
"0.5960705",
"0.59341437",
"0.59322643",
"0.58968097",
"0.58958465",
"0.5891298",
"0.5835677",
"0.57888645",
"0.5782377",
"0.57703453",
"0.57316804",
"0.5725577",
"0.571871",
"0.5710234",
"0.5706... | 0.0 | -1 |
Return True if state updates should be forced. If True, a state change will be triggered anytime the state property is updated, not just when the value changes. | def rVtO(YKHO) -> bool:
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Debg(YKHO):\n if YKHO.is_update_locked():\n return YKHO.graceful_state\n if YKHO._state['action'] == 1 and YKHO._state['state'] == 2:\n return True\n return False",
"def VAZT(YKHO, DHvX=False):\n if not DHvX and ITS7.time() - YKHO.last_updated_at < 30:\n return True\n YKHO... | [
"0.7352021",
"0.68483967",
"0.67604077",
"0.6739706",
"0.6698367",
"0.66888833",
"0.6679782",
"0.6679782",
"0.6679782",
"0.6679782",
"0.6679782",
"0.66680014",
"0.6620739",
"0.6605557",
"0.6564037",
"0.6564037",
"0.65255386",
"0.650659",
"0.64855486",
"0.6420593",
"0.6403902"... | 0.678565 | 2 |
Return the state of this entity. | def QTBn(YKHO) -> str | None:
return YKHO._values.get(YKHO.value_type) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QTBn(YKHO):\n return YKHO.get_state()",
"def GBfH(YKHO):\n return YKHO.state",
"def GBfH(YKHO):\n return YKHO.state",
"def GBfH(YKHO):\n return YKHO.state",
"def GBfH(YKHO):\n return YKHO.state",
"def GBfH(YKHO) -> None:\n return YKHO.state",
"def ja6o(YKHO):\n return YKHO.stat... | [
"0.83650255",
"0.82515925",
"0.82515925",
"0.82515925",
"0.8231717",
"0.8165146",
"0.81334424",
"0.81334424",
"0.8123368",
"0.8123368",
"0.8102165",
"0.8098855",
"0.8098855",
"0.8073014",
"0.80673444",
"0.80554146",
"0.80554146",
"0.80554146",
"0.80554146",
"0.80554146",
"0.8... | 0.0 | -1 |
Return the device class of this entity. | def rM2U(YKHO) -> str | None:
return YKHO._get_sensor_type()[2] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rM2U(YKHO):\n return YKHO._device_class",
"def rM2U(YKHO):\n return YKHO._device_class",
"def rM2U(YKHO):\n return YKHO._device_class",
"def rM2U(YKHO):\n return YKHO._device_class",
"def rM2U(YKHO):\n return YKHO._device_class",
"def rM2U(YKHO):\n return YKHO._device_type",
"def ... | [
"0.88960886",
"0.88960886",
"0.88960886",
"0.88960886",
"0.88960886",
"0.88906753",
"0.8848185",
"0.88091695",
"0.88091695",
"0.88091695",
"0.8716641",
"0.86759204",
"0.8606744",
"0.8605054",
"0.8460027",
"0.8391178",
"0.83831364",
"0.83497155",
"0.8252572",
"0.8227272",
"0.8... | 0.8458741 | 15 |
Return the unit of measurement of this entity. | def b82i(YKHO) -> str | None:
trRF = YKHO.gateway.const.SetReq
if gXVD(YKHO.gateway.protocol_version) >= gXVD('1.5') and trRF.V_UNIT_PREFIX in YKHO._values:
Wi8c: str = YKHO._values[trRF.V_UNIT_PREFIX]
return Wi8c
if trRF(YKHO.value_type) == trRF.V_TEMP:
if YKHO.hass.config.units.is_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b82i(YKHO):\n return YKHO._unit",
"def b82i(YKHO):\n return YKHO._unit",
"def b82i(YKHO):\n return YKHO._unit",
"def b82i(YKHO):\n return YKHO._unit",
"def b82i(YKHO):\n return YKHO._unit",
"def b82i(YKHO):\n return YKHO._unit",
"def b82i(YKHO):\n return YKHO._unit",
"def b82... | [
"0.8798436",
"0.8798436",
"0.8798436",
"0.8798436",
"0.8798436",
"0.8798436",
"0.8798436",
"0.874902",
"0.874902",
"0.874902",
"0.874902",
"0.874902",
"0.874902",
"0.874902",
"0.874902",
"0.874902",
"0.874902",
"0.874902",
"0.874902",
"0.874902",
"0.874902",
"0.8740797",
... | 0.73999214 | 85 |
Recursively merge 2 dictionaries. This does not use deepcopy (performance is too slow for large data) and thus it will modify the dict in place. | def roQF(jzdc, Fg_i):
if not isinstance(Fg_i, dict):
return Fg_i
Aofo = jzdc
for G1Hx, Ty9i in Fg_i.items():
if G1Hx in Aofo and isinstance(Aofo[G1Hx], dict):
Aofo[G1Hx] = roQF(Aofo[G1Hx], Ty9i)
else:
Aofo[G1Hx] = Ty9i
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PCMW(AjzU, _sQW):\n if _sQW is None:\n return\n for G1Hx, Ty9i in _sQW.items():\n if G1Hx not in AjzU:\n AjzU[G1Hx] = dict()\n if isinstance(Ty9i, dict):\n PCMW(AjzU[G1Hx], Ty9i)\n else:\n AjzU[G1Hx] = Ty9i",
"def W0j7(AjzU, _sQW):\n for H... | [
"0.81556773",
"0.81311816",
"0.8113898",
"0.80247134",
"0.80247134",
"0.79859436",
"0.79759693",
"0.79412216",
"0.7936173",
"0.7839935",
"0.7834071",
"0.7808992",
"0.7799202",
"0.7765704",
"0.7758297",
"0.7753694",
"0.7719996",
"0.7696061",
"0.7671423",
"0.76403594",
"0.75944... | 0.7722735 | 16 |
Implements the sigmoid activation in numpy | def m1Hg(Nk6w):
k0lF = 1 / (1 + oyIN.exp(-Nk6w))
wyyA = Nk6w
return (k0lF, wyyA) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m1Hg(WKvO: np.ndarray) -> oyIN.ndarray:\n return 1 / (1 + oyIN.exp(-WKvO))",
"def m1Hg(EcVT, XcU5, Fg_i):\n sdgB = oyIN.dot(EcVT, XcU5) + Fg_i\n return 1.0 / (1.0 + oyIN.exp(-sdgB))",
"def d1fz(WKvO):\n return 1.0 / (1 + oyIN.exp(-WKvO))",
"def m1Hg(WKvO):\n return 1 / (1 + oyIN.exp(-WKvO)... | [
"0.8374216",
"0.8308304",
"0.8258762",
"0.8215258",
"0.8150142",
"0.8140216",
"0.8140216",
"0.8140216",
"0.8140216",
"0.8140216",
"0.8140216",
"0.8125962",
"0.81212926",
"0.81212926",
"0.80962545",
"0.8082652",
"0.8068939",
"0.80095696",
"0.80017805",
"0.79810584",
"0.7977735... | 0.0 | -1 |
Read global_name from file. | def QaJy(gIsw, cF8H):
import os
globals = {}
exec(open(os.path.join(os.path.dirname(xAKo), 'python_thing', gIsw)).read(), globals)
return globals[cF8H] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lbQU(YKHO):\n hkS8 = YKHO.get_attr(av29)\n return hkS8.read()",
"def O3BA(YKHO):\n return YKHO.read_value()",
"def ksoK(YKHO):\n YKHO.show(f'cat {YKHO.keyname_file}')\n with open(YKHO.keyname_file) as eHNT:\n VhAE = eHNT.readline().strip()\n YKHO.report('Using key:', VhAE)\n ret... | [
"0.59745985",
"0.58837634",
"0.5870485",
"0.58154154",
"0.58154154",
"0.58154154",
"0.58154154",
"0.58154154",
"0.58154154",
"0.5808376",
"0.5786394",
"0.5714963",
"0.5705623",
"0.5657871",
"0.5647314",
"0.56199205",
"0.5600802",
"0.5590424",
"0.5570223",
"0.54580796",
"0.542... | 0.6218074 | 0 |
Standardizes features by removing mean and scaling to unit variance | def hWT_(EcVT):
Y5YY = txNa()
nukC = Y5YY.fit_transform(EcVT)
return nukC | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _ERn(YKHO):\n nGWB = []\n for fvDH in YKHO.X.columns:\n if YKHO.X[fvDH].dtype != 'object':\n nGWB.append(fvDH)\n Y5YY = ZvG6.StandardScaler().fit(YKHO.X[nGWB])\n YKHO.X[nGWB] = Y5YY.transform(YKHO.X[nGWB])",
"def n2ri(jQ3Z):\n return jQ3Z.apply(lambda iVRZ: (iVRZ - iVRZ.mean(... | [
"0.75487155",
"0.7521557",
"0.7495686",
"0.73947674",
"0.7385628",
"0.7354648",
"0.7334214",
"0.7319599",
"0.73069733",
"0.7256114",
"0.7221183",
"0.7215637",
"0.711634",
"0.7098721",
"0.7031819",
"0.69738495",
"0.6965499",
"0.69235337",
"0.6922812",
"0.6913396",
"0.6900623",... | 0.7419897 | 3 |
Sets the id of this WritableDeviceType. | def id(YKHO, id):
YKHO._id = id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C6UA(YKHO, id, lCeJ=0):\n _hkX = YKHO.XAPCommand('DID', id, unitCode=lCeJ)\n return int(_hkX)",
"def jf3N(YKHO, jf3N):\n YKHO._device_id = jf3N",
"def jf3N(YKHO, jf3N):\n YKHO._device_id = jf3N",
"def V_9M(YKHO, id):\n YKHO.__id = id",
"def V_9M(YKHO, id):\n YKHO.data['id'] = id",
"... | [
"0.6817009",
"0.68146956",
"0.68146956",
"0.6639847",
"0.6567267",
"0.6519578",
"0.6503319",
"0.64753264",
"0.63503236",
"0.63503236",
"0.63503236",
"0.63479704"
] | 0.6346724 | 90 |
Sets the display_name of this WritableDeviceType. | def qQNS(YKHO, qQNS):
YKHO._display_name = qQNS | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XVeK(YKHO, XVeK):\n YKHO._device_display_name = XVeK",
"def HJeF(YKHO, qQNS):\n YKHO._call('set_display_name', display_name=qQNS)",
"def qQNS(YKHO, qQNS: str):\n YKHO._display_name = qQNS",
"def qQNS(YKHO, qQNS):\n YKHO._display_name = qQNS",
"def qQNS(YKHO, qQNS):\n YKHO._display_name =... | [
"0.8149548",
"0.77492887",
"0.7404001",
"0.7239476",
"0.7239476",
"0.7239476",
"0.7239476",
"0.7239476",
"0.7239476",
"0.6616066",
"0.6500954",
"0.6167301",
"0.6152523",
"0.60852706",
"0.5996601",
"0.5826999",
"0.57595956",
"0.5620252",
"0.56112677",
"0.5611023",
"0.5578111",... | 0.7334337 | 7 |
Sets the part_number of this WritableDeviceType. | def oalz(YKHO, oalz):
if oalz is not None and len(oalz) > 50:
raise ValueError('Invalid value for `part_number`, length must be less than or equal to `50`')
YKHO._part_number = oalz | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lGPW(YKHO, Qrt_):\n wgkp(YKHO, YKHO.name)\n if Qrt_ is not None and (not isinstance(Qrt_, MIcu.Partition)):\n raise ValueError('partition must be None or a parted.Partition instance')\n RKD7.debug('device %s new partedPartition %s', YKHO.name, Qrt_)\n YKHO._partedPartition = Qrt_\n YKHO.u... | [
"0.6395709",
"0.60988855",
"0.59004223",
"0.5726002",
"0.5687503",
"0.5654937",
"0.56267947",
"0.558915",
"0.5586271",
"0.54778904",
"0.5474286",
"0.544489",
"0.53740853",
"0.5331987",
"0.530239",
"0.5277876",
"0.5263698",
"0.52300066",
"0.51880205",
"0.5113544",
"0.5093287",... | 0.6581171 | 0 |
Sets the custom_fields of this WritableDeviceType. | def Sno3(YKHO, Sno3):
YKHO._custom_fields = Sno3 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wxMS(YKHO, wxMS):\n YKHO._custom_profile_fields = wxMS",
"def hXTF(YKHO, hXTF):\n YKHO._custom_attributes = hXTF",
"def bWOC(YKHO, bWOC):\n YKHO._custom_data = bWOC",
"def v7e0(YKHO, nPrm):\n nPrm = x0SS(nPrm, YKHO.fields_parameters)\n return YKHO.put('/device/fields', nPrm)",
"def Az6d(... | [
"0.6226463",
"0.5989527",
"0.581636",
"0.56390154",
"0.54586655",
"0.53973055",
"0.53265536",
"0.5280839",
"0.5248794",
"0.52340144",
"0.52213675",
"0.52056193",
"0.50984114",
"0.5086562",
"0.49868515",
"0.49772623",
"0.4970455",
"0.4970455",
"0.4943328",
"0.4910179",
"0.4861... | 0.70801896 | 3 |
Sets the last_updated of this WritableDeviceType. | def mn17(YKHO, mn17):
YKHO._last_updated = mn17 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mn17(YKHO, mn17: str):\n YKHO._last_updated = mn17",
"def mn17(YKHO, BWXx):\n YKHO._last_updated = BWXx",
"def Tlir(YKHO, Tlir):\n YKHO._last_update_timestamp = Tlir",
"def cV9T(YKHO, cV9T):\n YKHO._last_update = cV9T",
"def sPBL(YKHO, sPBL: datetime):\n YKHO._updated = sPBL",
"def NQm... | [
"0.7123917",
"0.68401974",
"0.6402652",
"0.6358405",
"0.63043034",
"0.62346876",
"0.6219971",
"0.60855293",
"0.60068226",
"0.60068226",
"0.60068226",
"0.60068226",
"0.60068226",
"0.60068226",
"0.60068226",
"0.60068226",
"0.60068226",
"0.60068226",
"0.59992325",
"0.598691",
"0... | 0.7263649 | 2 |
Sets the device_count of this WritableDeviceType. | def m0SM(YKHO, m0SM):
YKHO._device_count = m0SM | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i2VU(YKHO, UHFx):\n YKHO._count = UHFx",
"def i2VU(YKHO, UHFx, IbHI=None):\n YKHO._set_property('pc:count', UHFx, IbHI)",
"def i2VU(YKHO, UHFx):\n if UHFx is not None and (not isinstance(UHFx, int)):\n raise pDrJ(Byma.DATA_TYPE_ERROR, 'KEY: count EXPECTED TYPE: int', None, None)\n YKHO._... | [
"0.633868",
"0.60808736",
"0.6021513",
"0.5986852",
"0.5986852",
"0.5986852",
"0.5986852",
"0.5958499",
"0.5933162",
"0.57999253",
"0.571162",
"0.57091904",
"0.56384456",
"0.55507433",
"0.55486226",
"0.5534559",
"0.55004245",
"0.5462561",
"0.5429859",
"0.5416078",
"0.54113406... | 0.8161956 | 0 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, sP4l):
return False
return YKHO.__dict__ == Elif.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.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 |
Adds a new softmax and fullyconnected layer for training. We need to retrain the top layer to identify our new classes, so this function adds the right operations to the graph, along with some variables to hold the weights, and then sets up all the gradients for the backward pass. | def BRge(y6i2, oO5F, Ech4, BSAl):
with ZylS.name_scope('input'):
Hgwg = ZylS.placeholder_with_default(Ech4, shape=[None, BSAl], name='BottleneckInputPlaceholder')
XhZw = ZylS.placeholder(ZylS.float32, [None, y6i2], name='GroundTruthInput')
lzjZ = 'final_training_ops'
with ZylS.name_scope(lzj... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Yorg(YKHO):\n I89s = ZylS.one_hot(YKHO.data.train_labels, YKHO.way)\n zbDV = YKHO.embedding_fn(YKHO.data.train_images, depth_multiplier=YKHO.depth_multiplier, reuse=ZylS.AUTO_REUSE)\n S8dk = zbDV['embeddings']\n v5mR = zbDV['params']\n with ZylS.variable_scope('linear_classifier', reuse=ZylS.AUT... | [
"0.69956243",
"0.68404883",
"0.6745722",
"0.67423326",
"0.66896594",
"0.66883427",
"0.66473544",
"0.65983844",
"0.6484846",
"0.6465325",
"0.64633745",
"0.6461249",
"0.6452662",
"0.6438398",
"0.6425403",
"0.63217443",
"0.6315425",
"0.6314847",
"0.6306606",
"0.6284461",
"0.6232... | 0.68008125 | 2 |
r"""Initializes the lowest metric checkpoint writer. | def FIMM(YKHO, AcYW: str, uOe2: str='eval', zJsh: bool=True, **c_sp: Any) -> None:
y0cW = JKL_(metric_label=AcYW, group_label=uOe2)
super().__init__(AcYW, uOe2, prefix=y0cW, **c_sp)
eJmI.log(f'The lowest value for the metric {YKHO._group_label}/{YKHO._metric_label} is set to {YKHO._best_metric:.8f}.', stdou... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SQQ8(YKHO):\n YKHO._reporter.open(mode='w')\n YKHO._reporter.write_thermodynamic_states(YKHO._thermodynamic_states, YKHO._unsampled_states)\n YKHO._store_options()\n YKHO._reporter.write_dict('metadata', YKHO._metadata)\n YKHO._report_iteration()",
"def FIMM(YKHO, N_e1, bPTx):\n YKHO.log_di... | [
"0.6337783",
"0.6126731",
"0.60819036",
"0.6079826",
"0.60106874",
"0.5996427",
"0.59381",
"0.59315497",
"0.5916804",
"0.5904727",
"0.58976996",
"0.5838126",
"0.5795011",
"0.5713546",
"0.5685055",
"0.56691206",
"0.5624299",
"0.55987364",
"0.5594259",
"0.5587432",
"0.55826426"... | 0.59055495 | 9 |
r"""Initializes the highest metric checkpoint writer. | def FIMM(YKHO, AcYW: str, uOe2: str='eval', zJsh: bool=True, **c_sp: Any):
y0cW = JKL_(metric_label=AcYW, group_label=uOe2)
super().__init__(AcYW, uOe2, prefix=y0cW, **c_sp)
eJmI.log(f'The highest value for the metric {YKHO._group_label}/{YKHO._metric_label} is set to {YKHO._best_metric:.8f}.', stdout=zJsh) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO) -> None:\n YKHO.metrics = {}\n YKHO.current = None\n YKHO.run = None",
"def SQQ8(YKHO):\n YKHO._reporter.open(mode='w')\n YKHO._reporter.write_thermodynamic_states(YKHO._thermodynamic_states, YKHO._unsampled_states)\n YKHO._store_options()\n YKHO._reporter.write_dict('metadata... | [
"0.6221882",
"0.6209097",
"0.6012857",
"0.5991224",
"0.5984746",
"0.5981619",
"0.59674007",
"0.5937154",
"0.5867477",
"0.58594817",
"0.5857366",
"0.58413243",
"0.58328134",
"0.5820313",
"0.5699227",
"0.5695059",
"0.5695059",
"0.5642132",
"0.5617906",
"0.5594201",
"0.5580388",... | 0.59033865 | 8 |
String of data about the table. | def zAg0(YKHO):
return ', '.join([YKHO.yftf_data, YKHO.info_hash, str(YKHO.num_pieces), str(YKHO.peers)]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n D6Z9 = [YKHO.headers]\n for rdlD in YKHO.data:\n D6Z9.append([rdlD[fvDH] or '' for fvDH in YKHO.headers])\n return OaA6(D6Z9)",
"def OhM2(YKHO):\n return 'XXX'",
"def SnfU(YKHO):\n XRrw = 'l' * YKHO._num_cols\n qn6S = dPmk.join([str(yzuK) for yzuK in YKHO._header])\n ... | [
"0.7974366",
"0.7752018",
"0.7432076",
"0.7410597",
"0.73566025",
"0.73501647",
"0.72819215",
"0.72650623",
"0.7242251",
"0.70667744",
"0.70608014",
"0.7003432",
"0.7000975",
"0.6981335",
"0.6966772",
"0.6882096",
"0.6874453",
"0.6857732",
"0.67458314",
"0.67401105",
"0.66823... | 0.0 | -1 |
r""" Do the estimator optimization step. Usefull when computing gradients across several steps/batches and optimizing using the accumulated gradients. | def Pf_a(YKHO):
YKHO.optimizer.step()
YKHO.optimizer.zero_grad() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vage(YKHO, qtWj, I7JW, K0do, Y4fz, bbHN=None):\n K0do.step()\n K0do.zero_grad()\n YKHO.lr_scheduler.step()",
"def N2uJ(YKHO):\n o6yt = YKHO.X_train.shape[0]\n BHML = oyIN.random.choice(o6yt, YKHO.batch_size)\n dTb3 = YKHO.X_train[BHML]\n omIE = YKHO.y_train[BHML]\n N77f, vtNT = YKHO.m... | [
"0.7033555",
"0.69779474",
"0.6892027",
"0.68874633",
"0.6860204",
"0.6856823",
"0.67698336",
"0.6745149",
"0.6743444",
"0.67368054",
"0.6672701",
"0.6638408",
"0.6638389",
"0.66371375",
"0.66343653",
"0.6616669",
"0.659877",
"0.65827596",
"0.6573586",
"0.6572765",
"0.6535152... | 0.74803805 | 1 |
download_latex Downloads latex from arxiv as a tar file in the `self.paper_root_path`. Ideally called seperately from the `mine_paper` method or from the ArxivPaper(build_paper=True) It will just download the latex tar source. | def CXB0(YKHO):
try:
_E99, rt_r = YKHO.extract_meta_from_remote(YKHO.paper_id)
YKHO.identity = _E99
if not tQBm(YKHO.paper_root_path):
Hy7s.makedirs(YKHO.paper_root_path)
m90v = ipwY.download(rt_r, dirpath=YKHO.paper_root_path, slugify=lambda rt_r: rt_r.get('id').split('/... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CqTM(YKHO):\n YKHO._system.download('http://geant4.web.cern.ch/geant4/support/source/' + YKHO._tar_name)",
"def MI6F(YKHO, eGRE=True, SdD9=False):\n try:\n _E99, rt_r = YKHO.extract_meta_from_remote(YKHO.paper_id)\n YKHO.identity = _E99\n if not tQBm(YKHO.paper_root_path):\n ... | [
"0.5867368",
"0.5609417",
"0.55654997",
"0.55267787",
"0.5392388",
"0.53666675",
"0.5360486",
"0.5337258",
"0.5287813",
"0.52505654",
"0.52386224",
"0.52144915",
"0.51870066",
"0.51612914",
"0.514488",
"0.5143402",
"0.51158744",
"0.5086015",
"0.50707835",
"0.50592184",
"0.503... | 0.8018099 | 0 |
freezes weights of the input layer | def UboC(YKHO, C3ST):
for mWFP, aUGN in C3ST.named_children():
for xqoZ in aUGN.parameters():
xqoZ.requires_grad = False if YKHO.freeze_flag else True
YKHO.dfs_freeze(aUGN) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MyUA(YKHO):\n pass",
"def MyUA(YKHO):\n YKHO._weights = YKHO._weights + YKHO.update_weights_value\n YKHO.weights_clipping()",
"def MyUA(YKHO):\n YKHO.weights -= YKHO.loss_grads\n YKHO.loss_grads = oyIN.zeros(YKHO.weights.shape)",
"def vKfT(YKHO):\n for yR_P in YKHO.modules():\n i... | [
"0.7281546",
"0.69291824",
"0.68560183",
"0.6833448",
"0.6663273",
"0.6656298",
"0.66336745",
"0.66292495",
"0.66292495",
"0.66292495",
"0.6569869",
"0.656191",
"0.6555251",
"0.65177983",
"0.65020293",
"0.6495656",
"0.64764893",
"0.6455338",
"0.6452497",
"0.6452497",
"0.64461... | 0.0 | -1 |
adjust learning rate and weights decay | def VUr6(YKHO):
for Lwm5 in YKHO.optimizer.param_groups:
for xqoZ in Lwm5['params']:
xqoZ.data = xqoZ.data.add(-1.0 * YKHO.weights_decay * Lwm5['lr'], xqoZ.data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WMj5(YKHO):\n if YKHO.l_rate > YKHO.l_rate_bound[0] and YKHO.l_rate - YKHO.decay_rate > 0.0:\n YKHO.l_rate -= YKHO.decay_rate\n elif YKHO.l_rate - YKHO.decay_rate <= 0.0 or YKHO.l_rate < YKHO.l_rate_bound[0]:\n YKHO.l_rate = YKHO.l_rate_bound[0]\n for gEmA in YKHO.network:\n gEmA.... | [
"0.7796024",
"0.772269",
"0.772269",
"0.7708068",
"0.759695",
"0.759225",
"0.7583436",
"0.755238",
"0.7478743",
"0.74650764",
"0.7440892",
"0.743856",
"0.74214333",
"0.74017316",
"0.7381381",
"0.73758715",
"0.7356456",
"0.7342442",
"0.7333016",
"0.7304729",
"0.7276835",
"0.... | 0.76752096 | 4 |