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 |
|---|---|---|---|---|---|---|
Grant access to a private flavor for a project/tenant. | def DIUT(YKHO, jDnk, ekCf):
YKHO._mod_flavor_access('add', jDnk, ekCf) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TqXP(YKHO, XeOP, jDnk, ekCf):\n try:\n if XeOP == 'add':\n YKHO.manager.submitTask(n2K3.FlavorAddAccess(flavor=jDnk, tenant=ekCf))\n elif XeOP == 'remove':\n YKHO.manager.submitTask(n2K3.FlavorRemoveAccess(flavor=jDnk, tenant=ekCf))\n except Exception as e:\n ra... | [
"0.66400087",
"0.66271216",
"0.6592931",
"0.64750755",
"0.6435162",
"0.64116555",
"0.57558227",
"0.5669368",
"0.56682193",
"0.5644377",
"0.56228113",
"0.5616916",
"0.5599675",
"0.5598298",
"0.55870163",
"0.5575051",
"0.55455106",
"0.55407244",
"0.5537853",
"0.5492166",
"0.548... | 0.6616374 | 2 |
ptr bit shift left | def XHpj(YKHO):
YKHO.cell[YKHO.ptr] << 1
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MagG(YKHO, WKvO):\n return YKHO.__ror__(WKvO)",
"def LYTE(yLHq, RKYb):\n return hoL9.left_shift(yLHq, RKYb)",
"def wQnl(Jyyj):\n if len(Jyyj) == 1:\n return (1 << Jyyj[0], Jyyj[0])\n else:\n return ((1 << Jyyj[0] - Jyyj[1] + 1) - 1 << Jyyj[1], Jyyj[1])",
"def MagG(YKHO, Elif):\n... | [
"0.65765154",
"0.6385347",
"0.6223096",
"0.61907935",
"0.6132987",
"0.6110731",
"0.5955148",
"0.5936995",
"0.5867484",
"0.58469474",
"0.5828087",
"0.58246064",
"0.5813917",
"0.58047116",
"0.5783578",
"0.5779997",
"0.57701874",
"0.57430434",
"0.57279813",
"0.5694125",
"0.56938... | 0.68910795 | 0 |
Returns the name of this configuration | def mWFP(YKHO) -> str:
return 'xception_gap' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mWFP(YKHO):\n return YKHO._config.name",
"def mWFP(YKHO):\n return YKHO._config.name",
"def mWFP(YKHO):\n return YKHO._config.name",
"def mWFP(YKHO) -> str:\n return YKHO.config.name",
"def Ks8p(YKHO) -> str:\n return YKHO._config.get_name()",
"def mWFP(YKHO):\n return YKHO._config[... | [
"0.9213535",
"0.9213535",
"0.9213535",
"0.9159649",
"0.9154302",
"0.910219",
"0.9087668",
"0.9081615",
"0.8994417",
"0.8920897",
"0.88818705",
"0.88409466",
"0.8433405",
"0.8271329",
"0.8271329",
"0.8248572",
"0.8073998",
"0.8019014",
"0.7810821",
"0.77860254",
"0.7700832",
... | 0.0 | -1 |
Function that emulates test.assert_equals (binary_array_to_number([0,0,0,1])) | def xKps():
from ones_and_zeroes import binary_array_to_number
assert binary_array_to_number([0, 0, 0, 1]) == 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lzjN():\n from ones_and_zeroes import binary_array_to_number\n assert binary_array_to_number([0, 0, 1, 0]) == 2",
"def NnbQ():\n from ones_and_zeroes import binary_array_to_number\n assert binary_array_to_number([1, 1, 1, 1]) == 15",
"def JXR8():\n from ones_and_zeroes import binary_array_to... | [
"0.7927929",
"0.7810445",
"0.77121854",
"0.7699068",
"0.7101663",
"0.7069723",
"0.6977058",
"0.69555634",
"0.6541321",
"0.65166175",
"0.6253872",
"0.62247056",
"0.62247056",
"0.62247056",
"0.62247056",
"0.62247056",
"0.62247056",
"0.62247056",
"0.62247056",
"0.62247056",
"0.6... | 0.7956074 | 0 |
Function that emulates test.assert_equals (binary_array_to_number([0,0,1,0])) | def lzjN():
from ones_and_zeroes import binary_array_to_number
assert binary_array_to_number([0, 0, 1, 0]) == 2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xKps():\n from ones_and_zeroes import binary_array_to_number\n assert binary_array_to_number([0, 0, 0, 1]) == 1",
"def NnbQ():\n from ones_and_zeroes import binary_array_to_number\n assert binary_array_to_number([1, 1, 1, 1]) == 15",
"def JXR8():\n from ones_and_zeroes import binary_array_to... | [
"0.7945319",
"0.78286934",
"0.77416193",
"0.76825356",
"0.7089888",
"0.7021364",
"0.7005175",
"0.69479144",
"0.6576668",
"0.65173125",
"0.62847847",
"0.62031394",
"0.62031394",
"0.62031394",
"0.62031394",
"0.62031394",
"0.62031394",
"0.62031394",
"0.62031394",
"0.62031394",
"... | 0.7942977 | 1 |
Function that emulates test.assert_equals (binary_array_to_number([1,1,1,1])) | def NnbQ():
from ones_and_zeroes import binary_array_to_number
assert binary_array_to_number([1, 1, 1, 1]) == 15 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lzjN():\n from ones_and_zeroes import binary_array_to_number\n assert binary_array_to_number([0, 0, 1, 0]) == 2",
"def xKps():\n from ones_and_zeroes import binary_array_to_number\n assert binary_array_to_number([0, 0, 0, 1]) == 1",
"def JXR8():\n from ones_and_zeroes import binary_array_to_... | [
"0.7532281",
"0.7530789",
"0.7399519",
"0.7357112",
"0.6927071",
"0.69204265",
"0.68885",
"0.66482383",
"0.63970643",
"0.62648857",
"0.62439805",
"0.624198",
"0.62276554",
"0.62276554",
"0.62276554",
"0.62276554",
"0.62276554",
"0.62276554",
"0.62276554",
"0.62276554",
"0.622... | 0.76488626 | 0 |
Function that emulates test.assert_equals (binary_array_to_number([0,1,1,0])) | def JXR8():
from ones_and_zeroes import binary_array_to_number
assert binary_array_to_number([0, 1, 1, 0]) == 6 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xKps():\n from ones_and_zeroes import binary_array_to_number\n assert binary_array_to_number([0, 0, 0, 1]) == 1",
"def lzjN():\n from ones_and_zeroes import binary_array_to_number\n assert binary_array_to_number([0, 0, 1, 0]) == 2",
"def NnbQ():\n from ones_and_zeroes import binary_array_to_... | [
"0.7945936",
"0.7923478",
"0.7846762",
"0.7679014",
"0.7038163",
"0.7010078",
"0.70092726",
"0.69937277",
"0.6565865",
"0.65408605",
"0.63510954",
"0.6278497",
"0.6278497",
"0.6278497",
"0.6278497",
"0.6278497",
"0.6278497",
"0.6278497",
"0.6278497",
"0.6278497",
"0.6278497",... | 0.7741998 | 3 |
Function that emulates test.assert_equals (binary_array_to_number([0,1,1,0])) | def aRY_():
from ones_and_zeroes import binary_array_to_number
import random
for bGrB in range(50):
exwG = random.randint(0, 1000)
qw7D = [int(WKvO) for WKvO in bin(exwG)[2:]]
assert binary_array_to_number(qw7D) == exwG | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xKps():\n from ones_and_zeroes import binary_array_to_number\n assert binary_array_to_number([0, 0, 0, 1]) == 1",
"def lzjN():\n from ones_and_zeroes import binary_array_to_number\n assert binary_array_to_number([0, 0, 1, 0]) == 2",
"def NnbQ():\n from ones_and_zeroes import binary_array_to_... | [
"0.79459435",
"0.7923228",
"0.78464997",
"0.7741892",
"0.76790285",
"0.7038563",
"0.7009457",
"0.6993871",
"0.6565578",
"0.654092",
"0.63514316",
"0.6277781",
"0.6277781",
"0.6277781",
"0.6277781",
"0.6277781",
"0.6277781",
"0.6277781",
"0.6277781",
"0.6277781",
"0.6277781",
... | 0.701051 | 6 |
Initialize the Bucket Tree | def WqhK(YKHO):
YKHO._tree = O6bh() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n YKHO.bucket_size = 769\n YKHO.buckets = WoxW()",
"def FIMM(YKHO):\n YKHO._bkt_size = 10000\n YKHO._bucket = [x1iM() for bGrB in range(YKHO._bkt_size)]",
"def FIMM(YKHO, b7hB):\n YKHO.tree = Vxud(b7hB)",
"def FIMM(YKHO, b7hB):\n YKHO.tree = Vxud(b7hB)",
"def FIMM(YKHO):\n... | [
"0.7047063",
"0.70329815",
"0.6910729",
"0.6910729",
"0.6878646",
"0.68681306",
"0.6811874",
"0.6808803",
"0.68063205",
"0.6794226",
"0.6794226",
"0.6786241",
"0.67858607",
"0.6783159",
"0.67798334",
"0.67636734",
"0.6759357",
"0.67325646",
"0.67325646",
"0.67325646",
"0.6732... | 0.86659056 | 0 |
Return the maximum index | def r_l4(YKHO, d6pt=None):
try:
return YKHO._long_index_tree.maxKey(d6pt)
except ValueError:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VULb(nPrm) -> int:\n VAJu = 0\n r8hN = nPrm[VAJu]\n for YRbF in range(len(nPrm)):\n if nPrm[YRbF] > r8hN:\n r8hN = nPrm[YRbF]\n VAJu = YRbF\n return VAJu",
"def BYEG(YKHO):\n raise NotImplementedError",
"def bKPk(EcVT):\n YRbF = 0\n r845 = 0\n return (YR... | [
"0.8639381",
"0.8628425",
"0.85717916",
"0.85222495",
"0.8460395",
"0.84212095",
"0.8246506",
"0.81924987",
"0.81422716",
"0.8128028",
"0.7922218",
"0.79167414",
"0.78822774",
"0.78767645",
"0.7848082",
"0.7752489",
"0.77489173",
"0.7744076",
"0.7639319",
"0.76002294",
"0.760... | 0.7650074 | 18 |
Returns the normalized vector along u. | def NkkI(P6bq):
return P6bq / epAf.sqrt(XTiz.dot(P6bq, P6bq), dtype=oyIN.float64) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def u1KP(KkY2):\n aWZo = []\n for P6bq in KkY2:\n UziI = P6bq.vector().array()\n aWZo.append(UziI)\n aWZo = oyIN.array(aWZo)\n NsNj = oyIN.sqrt(sum(aWZo ** 2))\n aWZo /= NsNj\n JuVi = []\n for UziI in aWZo:\n xmeU = f_8k(T8ck)\n xmeU.vector().set_local(UziI)\n ... | [
"0.78588057",
"0.78588057",
"0.7763053",
"0.77618986",
"0.7736711",
"0.7617486",
"0.7596506",
"0.758499",
"0.75788397",
"0.75788397",
"0.756584",
"0.7491184",
"0.7488377",
"0.7471752",
"0.74464923",
"0.7436567",
"0.74256414",
"0.7419136",
"0.7416364",
"0.74094635",
"0.7403973... | 0.8329449 | 0 |
Constructor for the Monomer class, which sets the properties depending on what monolignol is being represented. The only attributes that need to be set are the species [02], and the unique integer identifier. Everything else will be computed from these values. The active site is initially set to 0, indicating that the ... | def FIMM(YKHO, LJaO, YRbF):
YKHO.identity = YRbF
YKHO.type = LJaO
YKHO.parent = YKHO
YKHO.size = 1
YKHO.active = 0
if LJaO == yvY1 or LJaO == Nq1b:
YKHO.open = {4, 5, 8}
elif LJaO == o4sw:
YKHO.open = {4, 8}
else:
raise ixzZ(f"Encountered unit type {LJaO}, but on... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n YKHO.id = wPWn()\n YKHO.life_span = 1\n YKHO.food = pp_0()\n YKHO.mate = False\n YKHO.mature = False\n YKHO.pregnant = False\n YKHO.gestating = False\n YKHO.dna = R7zZ()\n YKHO.parent = None",
"def FIMM(YKHO):\n if YKHO.__class__ == h5FW:\n raise NotImplemen... | [
"0.58741415",
"0.5843598",
"0.5741794",
"0.57261413",
"0.558112",
"0.55489683",
"0.55254066",
"0.55254066",
"0.55092084",
"0.5498277",
"0.54969907",
"0.5458448",
"0.5454811",
"0.54521954",
"0.54495686",
"0.5424731",
"0.54106414",
"0.5374326",
"0.5372738",
"0.53719264",
"0.536... | 0.6074091 | 0 |
This function returns the density matrix from a random state, this is why we need to pass the Fourier plus and minous to this function, this does not compute the fourier transform, only the density matrix associated with it. | def kI3N(Emd4, y9vJ: np.ndarray, z_KD: np.ndarray, aPd6: np.int64, xcXt: bool=False) -> oyIN.ndarray:
EjmO, o4sw, bkfN = Emd4.Compute_svd_Cov_Matrix(Fourier_M=y9vJ, Fourier_P=z_KD, L=aPd6, Circulant=xcXt, Complete=True)
o4sw = -o4sw + 0.5
WKvO = oyIN.log(1 - o4sw) - oyIN.log(o4sw)
UqYS = Emd4.compute_be... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tvy0(YKHO):\n GUUu = [1]\n FSYx = [oyIN.matrix([[0]])]\n wjRY = 0\n ZbOB = 2\n while wjRY <= YKHO.L:\n EipQ = oyIN.random.uniform(-0.1, 0.1)\n GUUu.append(EipQ)\n FSYx.append(oyIN.matrix([[ZbOB]]))\n wjRY += EipQ ** 2 * oyIN.abs(ZbOB) ** (2 * YKHO.s)\n ZbOB += ... | [
"0.68157274",
"0.67773056",
"0.6603106",
"0.6370209",
"0.62826717",
"0.62153614",
"0.6199575",
"0.6172458",
"0.61680156",
"0.6135961",
"0.6089068",
"0.6016972",
"0.5975134",
"0.5968286",
"0.5945246",
"0.5909856",
"0.59092534",
"0.5891914",
"0.58780676",
"0.5871617",
"0.585063... | 0.7140465 | 0 |
Calculate the Intersection Over Union of two boxes | def VPYF(sOrw, sxK1):
ZFgS = max(0, min(sOrw[2], sxK1[2]) - max(sOrw[0], sxK1[0]))
rfRS = max(0, min(sOrw[3], sxK1[3]) - max(sOrw[1], sxK1[1]))
iQin = ZFgS * rfRS
xoEI = (sOrw[2] - sOrw[0]) * (sOrw[3] - sOrw[1])
_n3E = (sxK1[2] - sxK1[0]) * (sxK1[3] - sxK1[1])
b65I = xoEI + _n3E - iQin
RjuK ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zjH4(c2BJ, BHYc):\n assert c2BJ[2] >= c2BJ[0]\n assert BHYc[2] >= BHYc[0]\n assert c2BJ[3] >= c2BJ[1]\n assert BHYc[3] >= BHYc[1]\n if sum([JBMS < 1 and JBMS >= 0 for JBMS in [c2BJ.mean(), BHYc.mean()]]) == 1:\n bo34.warning('One set of boxes appears to be normalized while the other is no... | [
"0.82803893",
"0.80481917",
"0.777517",
"0.7695075",
"0.76880133",
"0.76811105",
"0.76174194",
"0.7608248",
"0.75831085",
"0.7576048",
"0.75627065",
"0.75601286",
"0.75570667",
"0.7556782",
"0.75003785",
"0.74505955",
"0.7430605",
"0.7420647",
"0.7415896",
"0.7396317",
"0.738... | 0.7821067 | 2 |
Return false if a file that should not be distributed exists. | def ZLOu(YKHO, aBO1, b4vv):
for eHNT in b4vv:
GSwS = Hy7s.path.join(aBO1, eHNT)
if Hy7s.path.isfile(GSwS) or Hy7s.path.isdir(GSwS):
cGnr(GSwS + ' exists.')
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def poxP(YKHO):\n return True",
"def Q3SB(YKHO):\n return Hy7s.path.isfile(f'{YKHO.directory}/{YKHO.filename}')",
"def TFmP(qaEx):\n if Hy7s.path.exists(str(qaEx).rstrip()):\n return True\n return False",
"def j85m(YKHO, Ux0P):\n return Hy7s.path.exists(Ux0P)",
"def vtfo(YKHO, Ux0P):\... | [
"0.79409724",
"0.77422196",
"0.76557773",
"0.76262295",
"0.75705844",
"0.7544724",
"0.75435334",
"0.753666",
"0.7531604",
"0.7527113",
"0.7503558",
"0.7489094",
"0.7455581",
"0.7434224",
"0.74310476",
"0.742739",
"0.74043906",
"0.74043167",
"0.74043167",
"0.74043167",
"0.7379... | 0.70691633 | 85 |
Check if a file exists. | def Hat5(pmON: str):
if Hy7s.path.isfile(pmON):
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def poxP(qaEx):\n return pmON.exists(qaEx)",
"def Pj8c(jQJk):\n bo34.debug('Checking if file \"{}\" exists'.format(jQJk))\n return vtfo('-f', jQJk)",
"def poxP(Ux0P):\n return Hy7s.path.exists(Ux0P)",
"def hZSK(YKHO, Ux0P):\n if Hy7s.path.isfile(Ux0P):\n return True\n else:\n ... | [
"0.8521847",
"0.85014874",
"0.84564763",
"0.84373045",
"0.8423772",
"0.84207684",
"0.84172916",
"0.8410703",
"0.837751",
"0.83162415",
"0.8286798",
"0.82766163",
"0.8270737",
"0.82574165",
"0.8242166",
"0.8228516",
"0.8224987",
"0.8215465",
"0.8201122",
"0.8200044",
"0.819624... | 0.81499445 | 22 |
Constructor of SinglyLinkedList class. | def FIMM(YKHO, sdCG=None):
YKHO.head = sdCG | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, nPrm=None):\n YKHO.__list = RRVT(nPrm)",
"def FIMM(YKHO):\n YKHO._linkedlist = _sfu()\n YKHO.head = YKHO._linkedlist.head\n YKHO._length = YKHO._linkedlist._length\n YKHO.tail = None",
"def FIMM(YKHO, KAOR: 'LinkedList'=None) -> None:\n raise NotImplementedError",
"def FIMM(Y... | [
"0.7950655",
"0.73372346",
"0.7326883",
"0.7219229",
"0.72080886",
"0.71808857",
"0.71198815",
"0.71198815",
"0.708529",
"0.7074252",
"0.70656645",
"0.70439833",
"0.703672",
"0.7032857",
"0.7023157",
"0.7015231",
"0.7013661",
"0.7010822",
"0.7008637",
"0.7000835",
"0.7000828"... | 0.6935769 | 33 |
Append a node to the end of the linked list. | def H2v5(YKHO, Q6kx):
if YKHO.head == None:
YKHO.head = Q6kx
else:
AsCw = YKHO.head
while AsCw.next != None:
AsCw = AsCw.next
AsCw.next = Q6kx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SStx(YKHO, Q6kx):\n if YKHO.head is None:\n YKHO.head = Q6kx\n YKHO.tail = Q6kx\n else:\n YKHO.tail._next = Q6kx\n YKHO.tail = Q6kx\n YKHO.size += 1",
"def SStx(YKHO, Q6kx):\n if YKHO.head is None:\n YKHO.head = Q6kx\n else:\n ZbOB = YKHO.head\n ... | [
"0.82428116",
"0.81103307",
"0.796055",
"0.78828245",
"0.78739864",
"0.7858621",
"0.7749858",
"0.7748615",
"0.77394426",
"0.77394426",
"0.77394426",
"0.7737687",
"0.77231324",
"0.77231324",
"0.77198446",
"0.77049994",
"0.7700276",
"0.7676545",
"0.7675796",
"0.7630624",
"0.761... | 0.74665654 | 40 |
Iteratively search for value in the linked list. | def neBz(YKHO, wEf2):
AsCw = YKHO.head
while AsCw != None:
if AsCw.val == wEf2:
return AsCw
AsCw = AsCw.next
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TgwQ(YKHO, BWXx):\n jvSB = YKHO.head\n if YKHO.head:\n while jvSB.value is not BWXx:\n jvSB = jvSB.next\n return jvSB\n return None",
"def TgwQ(YKHO, BWXx):\n kMLo = YKHO.head\n while kMLo:\n if kMLo.value == BWXx:\n return kMLo\n else:\n ... | [
"0.8081208",
"0.79879194",
"0.79827535",
"0.7980279",
"0.7943773",
"0.79299",
"0.7853683",
"0.78392017",
"0.783025",
"0.7823785",
"0.7811456",
"0.7783971",
"0.7751428",
"0.7746411",
"0.77041596",
"0.76611376",
"0.76473045",
"0.76441455",
"0.76231176",
"0.75740844",
"0.7527251... | 0.7575534 | 19 |
Get the length of the linked list. | def u54L(YKHO):
exwG = 0
AsCw = YKHO.head
while AsCw != None:
exwG += 1
AsCw = AsCw.next
return exwG | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def szAg(YKHO):\n u54L = 0\n if YKHO.head is not None:\n aCLL = YKHO.head\n u54L = 1\n while aCLL.pointer_next is not None:\n u54L += 1\n aCLL = aCLL.pointer_next\n return u54L",
"def yQQq(YKHO, sdCG):\n jvSB = sdCG\n u54L = 0\n while jvSB is not None:... | [
"0.8674644",
"0.8582243",
"0.8563291",
"0.85504967",
"0.8445634",
"0.8440961",
"0.84210986",
"0.83867997",
"0.8384684",
"0.8363422",
"0.83614665",
"0.8355332",
"0.83222955",
"0.8318443",
"0.8288931",
"0.8288915",
"0.82682246",
"0.8208975",
"0.8191737",
"0.81713724",
"0.811679... | 0.86681634 | 1 |
Compute softmax values for each sets of scores in x. | def N93T(WKvO):
return oyIN.exp(WKvO) / oyIN.sum(oyIN.exp(WKvO), axis=0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oSvh(WKvO):\n S2MS = []\n if oyIN.array(WKvO).ndim == 1:\n hrCc = oyIN.exp(WKvO)\n RmXN = oyIN.sum(hrCc)\n xzMv = hrCc / RmXN\n dzye = xzMv\n else:\n dzye = oyIN.exp(cCrA) / oyIN.sum(oyIN.exp(cCrA), axis=0)\n return dzye",
"def N93T(WKvO):\n j1LR = oyIN.exp(o... | [
"0.8012713",
"0.7762838",
"0.7762838",
"0.7687722",
"0.76702154",
"0.7660042",
"0.7656712",
"0.7656712",
"0.7656712",
"0.7656712",
"0.7656712",
"0.7656712",
"0.7656712",
"0.7639282",
"0.7628546",
"0.75537443",
"0.7533854",
"0.7456668",
"0.7326696",
"0.7319352",
"0.7301473",
... | 0.0 | -1 |
Exportts the ticker dataframe into an postgresql | def kRgb(Jyuf: pandas.DataFrame, bo34: logging.Logger, YtR6: str, UufE: int=None) -> None:
bo34.info('Exporting data into postgresql.')
try:
if UufE:
Jyuf = Jyuf.head(UufE)
eHpk = i48E.create_engine(YtR6)
Jyuf.to_sql('magicformula', eHpk, if_exists='append', index=False)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VB5N(jQ3Z, GTA_, uPxI, eHpk):\n print('Writing dataframe to PostgreSQL')\n jQ3Z.to_sql(name=GTA_, con=eHpk, schema=uPxI, if_exists='replace')\n print('End Writing')",
"def TQLe(_M9w, tyNF):\n gBiF = '192.168.222.204'\n kxBF = '5432'\n _iyM = _M9w\n DJL3 = 'ghpsj'\n bFrh = 'starclay201... | [
"0.71781445",
"0.70366985",
"0.7032034",
"0.70016456",
"0.696571",
"0.69594914",
"0.6864419",
"0.6847096",
"0.6773907",
"0.67265314",
"0.6711598",
"0.6693718",
"0.66793644",
"0.6656974",
"0.6632298",
"0.662195",
"0.6610114",
"0.66015404",
"0.660094",
"0.6568953",
"0.6561801",... | 0.74336386 | 0 |
The algorithm picks a random but possible move | def lfCk(l1V2):
try:
BZN_ = tuKI.choice([wQcs[WKvO] for WKvO in wQcs.keys() if b7La.evaluate(l1V2, int(WKvO)) >= 0])
except Exception:
BZN_ = 'a'
return BZN_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qy5L(YKHO):\n NNsw = YKHO.compute_possible_set()\n if len(NNsw) == 0:\n return None\n BZN_ = tuKI.sample(NNsw, 1)[0]\n for bGrB in range(5):\n print('*')\n print('??-->', BZN_)\n return BZN_",
"def X5nx(YKHO, Cs6h):\n return tuKI.choice(IBKe(Cs6h))",
"def mdR7(IayW):\n ... | [
"0.82439375",
"0.8147467",
"0.8108712",
"0.8098399",
"0.8051598",
"0.8037694",
"0.79611623",
"0.7931727",
"0.79275244",
"0.7926706",
"0.79185975",
"0.7905631",
"0.78867054",
"0.7859022",
"0.7820966",
"0.7771728",
"0.77682006",
"0.7741317",
"0.7730906",
"0.77029216",
"0.769459... | 0.69585305 | 91 |
check that the Fourier transform of the lineshape function g(t) is a probability distribution G(w) over energies w, which is normalized to 1, i.e. / | dw G(w) = 1 / | def CotQ(YKHO):
ZhTo = 0.5
WTkW = ZhTo / oyIN.sqrt(2.0 * oyIN.log(2.0)) / rYO3.hartree_to_ev
VAyu = RW2C.gaussian(WTkW)
WXkz = oyIN.linspace(0.0, 10.0, 500) / rYO3.autime_to_fs
dNGY = oyIN.ones_like(WXkz)
yzQ0, yvY1 = b5Lm.rate_from_correlation(WXkz, dNGY, VAyu)
yvY1 /= 1000000000000000.0 / ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k0cp(YKHO):\n zrIJ = Nlmb(-20, 20, 100000)\n yOP5 = CkYf.pdf(zrIJ.ts(), 1, 1) * zrIJ.dt()\n vtBP = xpR4(yOP5, zrIJ)\n assert yOP5.sum() == trZe.approx(1)\n fJNY = SF8B.Fourier(vtBP)\n OOX3 = fJNY.compute_composition(3)\n assert oyIN.dot(OOX3.pmf, zrIJ.ts()) == trZe.approx(3, abs=0.001)",
... | [
"0.6142634",
"0.5947962",
"0.57586145",
"0.5691632",
"0.5669654",
"0.56601346",
"0.5564572",
"0.5562664",
"0.5560958",
"0.55476576",
"0.55460465",
"0.55285674",
"0.5527281",
"0.55009556",
"0.5488452",
"0.5488452",
"0.54878473",
"0.54616004",
"0.54568696",
"0.54567283",
"0.544... | 0.6643865 | 0 |
Returns a summary of the parameters and variables contained in a tf.Module. | def MgDc(yR_P: tf.Module):
return FoUV(yR_P, None) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QxIo(YKHO):\n print(f'Layer\\tN. params')\n for yR_P in YKHO.module_list:\n print(f'{yR_P.__class__.__name__}\\t{sum([xqoZ.shape[-2] * xqoZ.shape[-1] for xqoZ in yR_P.param()])}')",
"def jNQL(yR_P):\n for mWFP, IGeV in yR_P.named_parameters():\n if IGeV.grad is None:\n conti... | [
"0.7244068",
"0.70893157",
"0.6749904",
"0.6579078",
"0.6494998",
"0.6428081",
"0.6414141",
"0.6393644",
"0.6348254",
"0.6308012",
"0.6299943",
"0.6261565",
"0.62598765",
"0.62593275",
"0.6240056",
"0.6232885",
"0.62211597",
"0.6214973",
"0.62085384",
"0.6194987",
"0.6194901"... | 0.7985235 | 0 |
Returns a numpy array version of the iterable, as well as its shape. | def j2Za(OxJJ):
OxJJ = oyIN.array(OxJJ)
if len(OxJJ.shape) == 1:
OxJJ = OxJJ.reshape(OxJJ.shape[0], -1)
return (OxJJ, OxJJ.shape) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def G4MF(WRKq, yDqo=None):\n try:\n iter(WRKq)\n except TypeError:\n exit('Second Argument must be iterable')\n if yDqo is None:\n return oyIN.array(WRKq)\n else:\n return oyIN.array(WRKq, yDqo)",
"def uzII(YKHO, yDqo=None):\n return YKHO[:, :, :].__array__(yDqo)",
"d... | [
"0.70534873",
"0.69976157",
"0.686331",
"0.6851994",
"0.67867374",
"0.67026323",
"0.67026323",
"0.661903",
"0.6589777",
"0.65826595",
"0.64806026",
"0.64624757",
"0.64399654",
"0.6426746",
"0.6407227",
"0.6402955",
"0.63922334",
"0.63767946",
"0.6374789",
"0.6371524",
"0.6341... | 0.67810595 | 5 |
Create app and setup queues. | def LUif() -> AzJI[X7cC, Hop7]:
P4t4 = X7cC(__name__)
AyEt = HjSW.as_view('fn_api')
P4t4.add_url_rule('/fn', methods=['POST', 'GET'], view_func=AyEt)
P4t4.add_url_rule('/fn/<id>', methods=['GET', 'POST', 'PUT', 'DELETE'], view_func=AyEt)
lGbz = moTT()
rysN: Hop7 = lGbz.run_until_complete(wWoh(P4... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def setup_queues(P4t4: Quart) -> Hop7:\n rysN: Hop7 = dict({})\n De13: ORy_ = sijU()\n P4t4.logger.info('Creating container creation consumer.')\n QkoF = _Kok(Utd2(De13))\n rysN['create'] = (QkoF, De13)\n OLdj: ORy_ = sijU()\n P4t4.logger.info('Creating task runner consumer.')\n qQZE ... | [
"0.75117403",
"0.70298105",
"0.67536694",
"0.67536694",
"0.66732424",
"0.6636934",
"0.6544683",
"0.65390354",
"0.6527273",
"0.6519106",
"0.65139204",
"0.65022856",
"0.6501055",
"0.6500992",
"0.64976454",
"0.64945143",
"0.64942175",
"0.6491692",
"0.648512",
"0.64835435",
"0.64... | 0.7515663 | 0 |
Return ``True`` if ``other`` is a subset of ``self``. | def PhZ_(YKHO, Elif):
for ZfUD in Elif:
if ZfUD not in YKHO:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vcn7(YKHO, Elif):\n yvT9 = True\n for ZfUD in Elif:\n if ZfUD not in YKHO._set:\n yvT9 = False\n break\n return yvT9",
"def oASY(YKHO, Elif):\n for wEf2, QTg7 in YKHO.Items():\n if QTg7 > Elif.Freq(wEf2):\n return False\n return True",
"def oASY... | [
"0.8406543",
"0.82513183",
"0.82513183",
"0.79936045",
"0.7960554",
"0.7960554",
"0.7908684",
"0.78171515",
"0.7754186",
"0.77236104",
"0.7709765",
"0.76789165",
"0.76524323",
"0.76524323",
"0.7643937",
"0.76402324",
"0.7627022",
"0.75996774",
"0.75996774",
"0.75982994",
"0.7... | 0.7561406 | 21 |
This function takes in a set of folders and their root path. It returns a list of tuples of (image paths, class label) where class label is either 0,1,2 as in classes.csv | def SR1h(ucBt, i0XC, D5gV):
MQ_j = []
for xtX7 in ucBt:
for gIsw in Hy7s.listdir(Hy7s.path.join(i0XC, xtX7)):
if '.jpg' in gIsw:
P1lZ = gIsw.split('_')[0]
if Hy7s.path.exists(Hy7s.path.join(i0XC, xtX7, P1lZ + '_bbox.bin')):
kkrV = oyIN.from... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EyUG(ucBt):\n if type(ucBt) == str:\n ucBt = [ucBt]\n Crrw = []\n ehBT = []\n iumf = []\n print(ucBt)\n for YRbF, xtX7 in enumerate(ucBt):\n ZWck = Hy7s.listdir(xtX7)\n for Hbam in ZWck:\n if ZbWC.search('\\\\.jpg\\\\Z', Hbam) != None:\n iumf.app... | [
"0.749041",
"0.7399062",
"0.7249162",
"0.70018667",
"0.69965804",
"0.6966133",
"0.6933482",
"0.6887725",
"0.68863857",
"0.68808657",
"0.68698925",
"0.68600637",
"0.68551534",
"0.68358594",
"0.67905486",
"0.677147",
"0.67614675",
"0.67341524",
"0.6728207",
"0.67239296",
"0.670... | 0.7054139 | 3 |
This Dataset takes in image and label pairs (tuples) and a list of transformations to apply and returns tuples of (image_path, transformed_image_tensor, label_tensor) | def FIMM(YKHO, MQ_j, Ymkf, xkAu=False):
YKHO.image_label_pairs = MQ_j
YKHO.transforms = Ymkf
YKHO.isTrain = xkAu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d1bu(nPrm, UXqs):\n nPrm = RsfQ.image.imresize(nPrm, 64, 64)\n nPrm = RsfQ.nd.transpose(nPrm, (2, 0, 1))\n nPrm = nPrm.astype(oyIN.float32) / 128 - 1\n if nPrm.shape[0] == 1:\n nPrm = RsfQ.nd.tile(nPrm, (3, 1, 1))\n return (nPrm, UXqs)",
"def TR5M(BmLB):\n\n @ZylS.function\n def c... | [
"0.663985",
"0.65818924",
"0.6500899",
"0.6419709",
"0.63511074",
"0.6325861",
"0.6286144",
"0.6242145",
"0.6226554",
"0.6197823",
"0.61804646",
"0.6177517",
"0.6163202",
"0.6161605",
"0.61578846",
"0.61563474",
"0.61485845",
"0.61443585",
"0.61402786",
"0.6131353",
"0.612316... | 0.0 | -1 |
Return (but do not remove) the element at the front of the queue. Raise Empty exception if the queue is empty. | def cntZ(YKHO):
if YKHO.is_empty():
raise PAmy('Queue is empty')
return YKHO._data[YKHO._front] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XL7A(YKHO):\n if YKHO.is_empty():\n raise nKJm\n return YKHO.queue[YKHO.front]",
"def qnv3(YKHO) -> Kt_s:\n if YKHO.size == 0:\n return None\n return YKHO.queue[YKHO.front]",
"def VnzS(gGq6):\n if FBfn(gGq6):\n raise IndexError('front on empty queue')\n return gGq6.fr... | [
"0.8714099",
"0.8610431",
"0.84059185",
"0.82200456",
"0.8218789",
"0.8214903",
"0.82102656",
"0.81743276",
"0.8112695",
"0.8057875",
"0.80505556",
"0.8011037",
"0.8011037",
"0.8011037",
"0.8008683",
"0.80009365",
"0.79371953",
"0.7918031",
"0.7916318",
"0.79159683",
"0.78930... | 0.8017203 | 11 |
Returns the public URL of the object (assuming permissions have been set appropriately). | def bD7m(YKHO):
return PuD2(YKHO.bucket_name, YKHO.key) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SK7z(YKHO) -> str:\n ...",
"def VbTh(YKHO):\n raise NotImplementedError()",
"def VbTh(YKHO):\n return YKHO.client._public_url(YKHO)",
"def QJ4l(YKHO):\n YKHO.set_acl(w1Kf)\n return YKHO.url",
"def LvtP(YEnM):\n return YEnM.get_absolute_url()",
"def hKhs(YKHO, YEnM):\n return YEnM... | [
"0.81481385",
"0.8032566",
"0.7851987",
"0.7745609",
"0.7505736",
"0.7194866",
"0.70871615",
"0.70521444",
"0.6939486",
"0.69326085",
"0.6916457",
"0.6916457",
"0.68091094",
"0.6683308",
"0.6645018",
"0.66090745",
"0.6591243",
"0.656422",
"0.65608",
"0.65271425",
"0.65092355"... | 0.7471764 | 5 |
Deletes the object defined by the bucket/key pair or uri. | def PTpj(*Rci7, WE7e=None, H5ew=None, j8eK=None):
WE7e, H5ew, j8eK = UjaM(*Rci7, bucket=WE7e, key=H5ew, uri=j8eK)
if isinstance(H5ew, list):
FIO_(bucket=WE7e).delete_objects(Delete={'Objects': [{'Key': G1Hx} for G1Hx in H5ew], 'Quiet': True})
else:
xBeT(bucket=WE7e, key=H5ew).delete() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TquA(YKHO, qIxc):\n if not qIxc:\n raise Exception('Missing object path.')\n WE7e, H5ew = fT_V(qIxc.pop(0))\n if not H5ew:\n raise Exception('Missing key.')\n YKHO.s3.DeleteObject(WE7e, H5ew)",
"def PTpj(YKHO):\n YKHO.s3_client.delete_object(Bucket=YKHO.get_bucket_name(), Key=YKH... | [
"0.77608544",
"0.7647491",
"0.7611601",
"0.7604537",
"0.7582143",
"0.754011",
"0.7449028",
"0.7420677",
"0.7402354",
"0.73671925",
"0.72820705",
"0.725495",
"0.72380406",
"0.7235521",
"0.7216157",
"0.7187497",
"0.7183169",
"0.71122706",
"0.7088343",
"0.70701873",
"0.7064886",... | 0.7125567 | 17 |
Returns the number of bytes (content_length) in an S3 object. | def zNig(*Rci7, WE7e=None, H5ew=None, j8eK=None):
WE7e, H5ew, j8eK = UjaM(*Rci7, bucket=WE7e, key=H5ew, uri=j8eK)
return xBeT(bucket=WE7e, key=H5ew).content_length | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qOA3(YKHO, pmON, WE7e):\n pGmv = iVGz.client('s3')\n return pGmv.get_object(Bucket=WE7e, Key=pmON)['ContentLength']",
"def JAMD(YKHO, pmON):\n _hkX = YKHO.s3.head_object(Bucket=YKHO.bucket, Key=pmON)\n return _hkX['ContentLength']",
"def HHiU(gcuA):\n cuiw = iVGz.Session(profile_name='aws-ch... | [
"0.83816177",
"0.8174579",
"0.8139102",
"0.80915",
"0.78506345",
"0.7784355",
"0.7663137",
"0.7479242",
"0.744353",
"0.7348342",
"0.72957134",
"0.72360814",
"0.72130656",
"0.7180816",
"0.71417445",
"0.7131947",
"0.711914",
"0.70937574",
"0.705981",
"0.7001244",
"0.7001244",
... | 0.7238529 | 11 |
Returns the file name from an S3 URI or key. Mirrors the behavior of the os.path.basename function. | def aPr_(y1Uh):
if '/' in y1Uh:
return y1Uh.split('/')[-1]
else:
return y1Uh | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tlxf(xfSW):\n CktY = KVWQ(xfSW)\n return CktY.path.lstrip('/')",
"def h47C(YKHO):\n return YKHO.path.split('s3://')[-1].split('/')[0]",
"def g_2H(zAat):\n return zAat.split('/')[-1]",
"def mexE(YKHO):\n return '/'.join(YKHO.path.split('s3://')[-1].split('/')[1:])",
"def QCL9(H5ew):\n ... | [
"0.7983639",
"0.74766237",
"0.74696237",
"0.73099995",
"0.71852815",
"0.71219784",
"0.70137715",
"0.69629854",
"0.6933441",
"0.6905287",
"0.68759805",
"0.68310124",
"0.68281865",
"0.6826404",
"0.68194246",
"0.68192595",
"0.67755556",
"0.6746155",
"0.6741618",
"0.67332214",
"0... | 0.77717555 | 1 |
Extracts the basename from an S3 key or URI and splits the contents into a tuple of the file name and extension. | def YptF(y1Uh):
return Hy7s.path.splitext(aPr_(y1Uh)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HXs4(ITdu: Union[FilePath, str]) -> AzJI[str, str, str]:\n pmON = ITdu.replace('s3://', '')\n pmON = pmON.split('/')\n l7rj = pmON[0]\n gIsw = '/'.join(pmON[1:])\n vku8 = pmON[-1]\n return (l7rj, gIsw, vku8)",
"def moST(TkSh):\n RVjQ = TkSh.replace('s3://', '').split('/')\n WE7e = RVj... | [
"0.7101362",
"0.7057565",
"0.6798767",
"0.6781086",
"0.6670047",
"0.6605865",
"0.6590209",
"0.65771556",
"0.6546957",
"0.65156037",
"0.6495825",
"0.6400162",
"0.6342532",
"0.62827146",
"0.6257833",
"0.62055576",
"0.61986583",
"0.6194177",
"0.6163808",
"0.61527735",
"0.6127664... | 0.757078 | 0 |
Load and preprocess an image. | def DFoz(QMAG, elV7=0.875, N0ky=299):
if not Hy7s.path.exists(QMAG):
ZylS.logging.fatal('Input image does not exist %s', QMAG)
ThLH = ZylS.gfile.FastGFile(QMAG).read()
VXjJ = ZylS.cast(ZylS.image.decode_jpeg(ThLH, channels=3), ZylS.float32)
VXjJ = ZylS.image.central_crop(VXjJ, central_fraction=e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hM8o(pmON):\n oO50 = N_vL.load_image(pmON)\n return N_vL.preprocess(oO50)",
"def hM8o(pmON):\n LNo8 = ZylS.io.read_file(pmON)\n uiiP = j9DC(LNo8)\n return uiiP",
"def M6Wt(pmON):\n VXjJ = ZylS.read_file(pmON)\n return j9DC(VXjJ)",
"def biH0(YKHO, QMAG):\n LNo8 = JghP(QMAG, target_... | [
"0.81036425",
"0.79926354",
"0.79722273",
"0.7658297",
"0.7657596",
"0.76368827",
"0.761901",
"0.7504034",
"0.7487558",
"0.7462144",
"0.73250765",
"0.7316162",
"0.7314109",
"0.7303901",
"0.72968954",
"0.72306615",
"0.7214692",
"0.71334463",
"0.6986708",
"0.6967993",
"0.696184... | 0.0 | -1 |
This functions takes a list of input sequences and a vocabulary and returns the onehot encoded sequences as a numpy array. Sequence length is assumed to be equal for all sequences. | def OjaS(g4y1, QTg7, CtWL):
rTfk = []
for input in g4y1:
WKvO = oyIN.zeros((len(input), len(i9lr)))
for YRbF in range(len(input)):
for r845 in range(len(CtWL)):
if input[YRbF].lower() in CtWL[r845].lower():
WKvO[YRbF][r845] = 1
rTfk.append(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zGX0(jWe2, CtWL):\n t3gT = {Z9rn: YRbF for YRbF, Z9rn in enumerate(CtWL)}\n e9rZ = oyIN.zeros((len(jWe2), len(jWe2[0]), len(CtWL)), dtype=float)\n for YRbF, Q6uT in enumerate(jWe2):\n for r845, hcXw in enumerate(Q6uT):\n e9rZ[YRbF, r845, t3gT[hcXw]] = 1\n return ht2j.tensor(e9rZ)"... | [
"0.8089311",
"0.80502266",
"0.78954214",
"0.7860997",
"0.7860741",
"0.7744914",
"0.7465073",
"0.74507725",
"0.7450503",
"0.7417894",
"0.7371741",
"0.73501533",
"0.73453826",
"0.73314464",
"0.7320973",
"0.7313764",
"0.716618",
"0.7162244",
"0.7148462",
"0.7126728",
"0.71258736... | 0.7486463 | 6 |
Load a network model form a file | def uyMl(YKHO, A18S):
IyFz.load_hdf5(A18S, YKHO.model)
jRa3.copy_param(target_link=YKHO.model, source_link=YKHO.shared_model)
MkTx = A18S + '.opt'
if Hy7s.path.exists(MkTx):
print('WARNING: {0} was not found, so loaded only a model'.format(MkTx))
IyFz.load_hdf5(A18S + '.opt', YKHO.optimi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uyMl(Ux0P):\n pass",
"def tyeH(YKHO, pmON):\n YKHO.neural_network.load_model(pmON)",
"def tyeH(YKHO, pmON):\n YKHO.network = bdPE.models.load_model(pmON)",
"def uyMl(YKHO) -> Zgf_:\n pass",
"def uyMl(ytgA: str):\n raise NotImplementedError",
"def XCN0(pmON, begE, DMw4=None):\n if DM... | [
"0.79096603",
"0.7847151",
"0.7769099",
"0.77066356",
"0.7653038",
"0.7619378",
"0.75949186",
"0.75917625",
"0.7501803",
"0.7500978",
"0.7471933",
"0.7448304",
"0.7423195",
"0.7376353",
"0.73556435",
"0.734666",
"0.7341336",
"0.7333436",
"0.73082566",
"0.7277157",
"0.7266003"... | 0.0 | -1 |
Skip test if minimum supported git version is not installed | def OX5d(sGFq=None, qYZG='1.6.5'):
if sGFq is None:
return xBlr.partial(OX5d, min_version=qYZG)
return ihn_(sGFq, qYZG, 'git {0} or newer required to run this test (detected {1})') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a0cI(sGFq):\n qYZG = '1.7.2'\n return ihn_(sGFq, qYZG, 'git_opts only supported in git {0} and newer (detected {1})')",
"def fAqm(YKHO):\n YKHO.assertFalse(Wsmj.git_require((2,)))\n YKHO.assertFalse(Wsmj.git_require((1, 3)))\n YKHO.assertFalse(Wsmj.git_require((1, 2, 4)))\n YKHO.assertFalse... | [
"0.7716384",
"0.7471842",
"0.7344959",
"0.7242458",
"0.6971084",
"0.6806053",
"0.674752",
"0.6731662",
"0.66987646",
"0.6618868",
"0.65956336",
"0.6581453",
"0.65758806",
"0.65359706",
"0.6500158",
"0.6487511",
"0.6474837",
"0.6473451",
"0.64258385",
"0.64216036",
"0.64138466... | 0.7954627 | 0 |
Gets the JVMCI JDK corresponding to 'debugLevel'. | def jvFR(L1ND=None):
if not L1ND:
L1ND = xjqu.debugLevel
D03d = nIzA.get(L1ND)
if D03d is None:
try:
D03d = OOyn(L1ND)
except RsfQ.JDKConfigException as e:
pYH_ = WgiQ(L1ND)
tO9_ = 'Error with the JDK built into {}:\n{}\nTry (re)building it with: m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def D03d(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'jdk')",
"def D03d(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'jdk')",
"def D03d(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'jdk')",
"def WgiQ(L1ND=None):\n if L1ND is None:\n L1ND = xjqu.debugLevel... | [
"0.588019",
"0.58215946",
"0.58215946",
"0.5587502",
"0.54094964",
"0.51309574",
"0.5023263",
"0.4507576",
"0.4478473",
"0.44783545",
"0.43890807",
"0.43558362",
"0.43414825",
"0.43259782",
"0.43198538",
"0.4319641",
"0.43151924",
"0.4313122",
"0.43012667",
"0.4287812",
"0.42... | 0.8084315 | 0 |
Strip /home/user from path if appropriate. | def XRah(YKHO, pmON):
pmON = GkAb(pmON)
kZiy = GkAb.home()
if kZiy in pmON.parents:
return '~/' + str(pmON.relative_to(kZiy))
else:
return str(pmON) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _fIH(pmON):\n kZiy = GwqS()\n if not kZiy.endswith('/'):\n kZiy = kZiy + '/'\n if pmON.startswith(kZiy):\n return pmON[len(kZiy):]\n else:\n return pmON",
"def twgc(pmON):\n kZiy = Hy7s.path.expanduser('~')\n return pmON.replace(kZiy, '~', 1)",
"def AWVE(pmON):\n r... | [
"0.76376027",
"0.6916212",
"0.6890712",
"0.67771447",
"0.66760945",
"0.66427606",
"0.6619137",
"0.6602456",
"0.6589227",
"0.6543273",
"0.65185523",
"0.6515392",
"0.64979947",
"0.6467861",
"0.6458819",
"0.64402884",
"0.6438962",
"0.6437932",
"0.6436264",
"0.6383171",
"0.638270... | 0.0 | -1 |
Return a HttpResponse with a text message containing something that looks like a JSON document, but it's just "text/html". | def ru4p(QePW):
return igJ6("{'received': True}", content_type='text/html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UV9z(QePW):\n return igJ6('a simple text message', content_type='text/html')",
"def Cte3(nPrm, **YSA3):\n return oGir(str(nPrm), content_type='text/html', **YSA3)",
"def GtGV(nPrm):\n return igJ6(qQXR.dumps(nPrm), content_type='application/json')",
"def XU4p(hGN5):\n return oGir(hGN5, content... | [
"0.75465024",
"0.71837676",
"0.71598333",
"0.7144174",
"0.708653",
"0.70804054",
"0.70249224",
"0.702224",
"0.6977968",
"0.6946313",
"0.69413906",
"0.6938394",
"0.6889248",
"0.6813304",
"0.6796847",
"0.6785298",
"0.6778066",
"0.67556596",
"0.6720926",
"0.66333973",
"0.6631324... | 0.76719266 | 0 |
Return an actual JSON response by setting the `content_type` of the HttpResponse object manually. | def w7Rc(QePW):
YEnM = {'received': True}
return igJ6(qQXR.dumps(YEnM), content_type='application/json') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JezV(YKHO, hGN5, **GHd8):\n geh0 = igJ6(hGN5, content_type='application/json', **GHd8)\n Af2f(geh0)\n return geh0",
"def JezV(YKHO, hGN5, **GHd8):\n geh0 = igJ6(hGN5, content_type='application/json', **GHd8)\n Af2f(geh0)\n return geh0",
"def JezV(hGN5, **B2fa):\n return igJ6(qQXR.dumps... | [
"0.7887781",
"0.7887781",
"0.7697287",
"0.75344497",
"0.7376485",
"0.7354624",
"0.7341745",
"0.72622764",
"0.72539115",
"0.72475624",
"0.72334695",
"0.72134197",
"0.7170044",
"0.71620935",
"0.7130007",
"0.70883447",
"0.70108026",
"0.7002162",
"0.6946827",
"0.6938816",
"0.6913... | 0.7019916 | 16 |
Return the same JSON document, but now using a JsonResponse instead. | def GtGV(QePW):
return jnRN({'received': True}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NULH(YKHO):\n return oGir(response=YKHO.serialize(), status=200, mimetype='application/json')",
"def qQXR(YKHO):\n return geh0",
"def qQXR(YKHO):\n return geh0",
"def qQXR(YKHO):\n return geh0",
"def qQXR(YKHO):\n return YKHO.response.json()",
"def qQXR(YKHO):\n return YKHO.response... | [
"0.778776",
"0.75218636",
"0.75218636",
"0.75218636",
"0.74018526",
"0.720209",
"0.71980274",
"0.7197332",
"0.71499974",
"0.71241385",
"0.70751244",
"0.70653945",
"0.70626986",
"0.7042681",
"0.6915803",
"0.6914254",
"0.6896859",
"0.6891612",
"0.6891612",
"0.6891612",
"0.68792... | 0.6545306 | 57 |
Return a JsonResponse with an error message and 400 (Bad Request) status code. | def SCET(QePW):
return jnRN({'err': 'bad request'}, status=400) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tjWP():\n jxeo = {}\n jxeo['Status'] = 400\n jxeo['Success'] = False\n jxeo['Result'] = 'Invalid request.'\n return oGir(response=qQXR.dumps(jxeo, sort_keys=True, indent=4), status=400, mimetype='application/json')",
"def mUn6(QePW, *qIxc, **B2fa):\n nPrm = {'error': 'Bad request (400)'}\n ... | [
"0.8317219",
"0.82386476",
"0.82366854",
"0.7924574",
"0.7922457",
"0.7868437",
"0.774858",
"0.7716581",
"0.7711214",
"0.7677443",
"0.7673069",
"0.76333565",
"0.76113194",
"0.757957",
"0.75573444",
"0.75425094",
"0.75420636",
"0.75364274",
"0.7527278",
"0.74705434",
"0.745912... | 0.82542354 | 1 |
Sets the seed for this env's random number generator(s). Returns Returns the list of seeds used in this env's random number generators | def yokr(YKHO, yokr=None):
raise YKHO.gym.seed(yokr) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yokr(YKHO, yokr=None):\n if yokr is None:\n return []\n YKHO.np_random.seed(yokr)\n return [yokr]",
"def yokr(YKHO, yokr=None):\n YKHO.np_random, yokr = ch3p.utils.seeding.np_random(yokr)\n return [yokr]",
"def yokr(YKHO, yokr=None):\n YKHO.np_random, yokr = ch3p.utils.seeding.np_r... | [
"0.85480136",
"0.8513439",
"0.8513439",
"0.849283",
"0.849283",
"0.8481189",
"0.84638226",
"0.84638226",
"0.8337241",
"0.8326257",
"0.8312622",
"0.8238564",
"0.8209318",
"0.8207868",
"0.8183854",
"0.8167376",
"0.8083177",
"0.8069761",
"0.8010385",
"0.7828377",
"0.7742353",
... | 0.0 | -1 |
Returns True if the FlightIterator is not empty. | def xc3U(YKHO) -> bool:
return YKHO.next() is not None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FBfn(YKHO) -> bool:\n return len(YKHO.listing) == 0\n pass",
"def FBfn(YKHO):\n try:\n next(YKHO.documents)\n return False\n except StopIteration:\n return True",
"def FBfn(YKHO) -> bool:\n return YKHO._first is None",
"def FBfn(YKHO) -> bool:\n return YKHO._first i... | [
"0.7722051",
"0.77032787",
"0.76830107",
"0.76830107",
"0.7682949",
"0.7682949",
"0.7682949",
"0.7675126",
"0.76416785",
"0.76338595",
"0.76338595",
"0.76338595",
"0.763349",
"0.7631269",
"0.7627623",
"0.76182246",
"0.7616638",
"0.7616638",
"0.75829935",
"0.75829935",
"0.7582... | 0.0 | -1 |
Returns the first/next element in the FlightIterator. | def next(YKHO) -> h8nf['Flight']:
return next(YKHO, None) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cntZ(YKHO):\n return next(iter(YKHO))",
"def OPHn(YKHO):\n return YKHO._iterator.get_next()",
"def OPHn(YKHO):\n return YKHO._iterator.get_next()",
"def nrOS(YKHO):\n return next(YKHO.iter)",
"def next(YKHO):\n NlZ_ = YKHO.readentry()\n if NlZ_ is None:\n raise StopIteration\n ... | [
"0.75235707",
"0.7386124",
"0.7386124",
"0.7279722",
"0.7237038",
"0.7235809",
"0.7209524",
"0.7169555",
"0.7150085",
"0.71375597",
"0.7082597",
"0.69895005",
"0.6956736",
"0.69563997",
"0.6955605",
"0.6930579",
"0.69239074",
"0.69239074",
"0.69239074",
"0.6912085",
"0.689482... | 0.7692149 | 0 |
Returns the size of the FlightIterator. | def sum(YKHO) -> int:
return len(YKHO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zNig(YKHO):\n iter = YKHO.head\n zNig = 0\n while iter is not None:\n zNig += 1\n iter = iter.proximo\n return zNig",
"def zNig(YKHO):\n return sum((1 for bGrB in YKHO))",
"def zNig(YKHO) -> int:\n return len(YKHO.entries)",
"def zNig(YKHO):\n return len(YKHO.getList())... | [
"0.7611433",
"0.7542709",
"0.74541557",
"0.74521136",
"0.7429377",
"0.7425251",
"0.7417463",
"0.7417463",
"0.7413584",
"0.7413584",
"0.7413584",
"0.74125254",
"0.7363383",
"0.735124",
"0.735124",
"0.735124",
"0.73206496",
"0.73206496",
"0.72939485",
"0.7287763",
"0.7287763",
... | 0.0 | -1 |
prepares an datetime object at the start of the day | def HNQD(_c1T):
return _c1T.replace(hour=0, minute=0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Spnx():\n rg4j = m6Z7()\n while not CO1Q(rg4j):\n rg4j = rg4j - qcWV.timedelta(days=1)\n return rg4j",
"def I_9r(YKHO):\n YKHO.start_time = qcWV.today()\n return YKHO.start_time",
"def BuUg():\n _c1T = qcWV.date.today()\n while _c1T.weekday() != 0:\n _c1T = _c1T - qcWV.ti... | [
"0.6868259",
"0.6817139",
"0.67449206",
"0.6707797",
"0.6670527",
"0.6565162",
"0.6459919",
"0.643922",
"0.6433258",
"0.64132416",
"0.64099973",
"0.63661045",
"0.6358714",
"0.6325564",
"0.63102823",
"0.630711",
"0.629443",
"0.6278728",
"0.626529",
"0.62621605",
"0.6247193",
... | 0.6676443 | 4 |
Marks a method as overriding the samenamed method on its parent TiePy checking will fail if the decorated method doesn't override a parent method | def If3P(NKcE: _WrappedMethod) -> sRuV:
NKcE.__tiepy_overrides = True
return NKcE | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def If3P(OWw8):\n\n def AuU4(NKcE):\n \"\"\"\n Override assertion\n \"\"\"\n assert NKcE.__name__ in dir(OWw8)\n return NKcE\n return AuU4",
"def toVX(UKpZ):\n\n def UJ_Y(NKcE):\n assert NKcE.__name__ in dir(UKpZ), \"No similar named method '%s' in super class '... | [
"0.71337944",
"0.6852736",
"0.6735407",
"0.6641753",
"0.64526194",
"0.6368336",
"0.63529944",
"0.63331896",
"0.6277464",
"0.6254211",
"0.6253955",
"0.6155086",
"0.6155086",
"0.6155086",
"0.6155086",
"0.6155086",
"0.6155086",
"0.6155086",
"0.6155086",
"0.6155086",
"0.6155086",... | 0.6603459 | 4 |
Broadcasts x's batch dims (except self.axis) to match self.batch_shape. Specifically, x is broadcasted to have shape `sample_shape + target_batch + event_shape` where target_batch == self.batch_shape except along the concatenation axis. | def iEFy(YKHO, WKvO, rIHd):
OOcW = hnFq.shape(WKvO)
ooTa = YKHO._calculate_batch_shape()
Ahf7 = hnFq.size(rIHd) + hnFq.size(ooTa)
bGrB, m1zx = hnFq.split(OOcW, [Ahf7, hnFq.rank(WKvO) - Ahf7])
u5Om = hnFq.concat([rIHd, ooTa[:YKHO._axis], [OOcW[YKHO._axis + hnFq.size(rIHd)]], ooTa[YKHO._axis + 1:], m1... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jtwv(YKHO, WKvO):\n if YKHO._batch_shape_arg is None:\n return WKvO\n ZzXB = YKHO.batch_shape.concatenate([1, 1])\n arSB = _WqI.broadcast_static_shape(WKvO.get_shape(), ZzXB)\n if ZzXB.is_fully_defined():\n if arSB == WKvO.get_shape():\n return WKvO\n VNqG = _WqI.zer... | [
"0.7533652",
"0.65504026",
"0.6236946",
"0.60165334",
"0.596143",
"0.5882326",
"0.5876544",
"0.5842739",
"0.5823455",
"0.5724234",
"0.5714387",
"0.5667892",
"0.56438816",
"0.5605494",
"0.5593391",
"0.5589017",
"0.5569664",
"0.54966754",
"0.54654276",
"0.54613066",
"0.54613066... | 0.8107335 | 0 |
Compute 1 accuracy. Expects pred to be probabilities NxC and target to be in [1,..., C]. Currently inconsistent with Crossentropy loss. | def nrOS(YKHO, nvEb, pan_):
return 1.0 - (oyIN.argmax(nvEb, axis=1) == pan_).astype(oyIN.float) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vjyh(nvEb, pan_, nZt5=4):\n Ep8u = pan_.shape[0]\n RjuK = 0.0\n for YRbF in range(Ep8u):\n RjuK += _xWy(nvEb[YRbF, :, :], pan_[YRbF, :, :], nZt5)\n return RjuK / Ep8u",
"def vjyh(pKvt, pan_):\n ungu = ht2j.zeros(pan_.shape)\n ungu[pKvt == pan_] = 1\n return float(ht2j.mean(ungu))"... | [
"0.7446555",
"0.7382081",
"0.73291105",
"0.7288264",
"0.72405934",
"0.71395767",
"0.7109856",
"0.70844734",
"0.70738",
"0.70515025",
"0.7050831",
"0.7049756",
"0.70346737",
"0.70300347",
"0.70188916",
"0.69870865",
"0.69799334",
"0.6964714",
"0.6947791",
"0.69388396",
"0.6937... | 0.0 | -1 |
start date of the work | def SWox(YKHO):
return YKHO._start_time | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kepv(YKHO) -> _c1T:\n return YKHO.__start_date",
"def nUNa(YKHO):\n return YKHO.start_date",
"def nUNa(YKHO):\n return YKHO.start_date",
"def nUNa(YKHO):\n return YKHO.start_date",
"def nUNa(YKHO):\n return YKHO.start_date",
"def nUNa(YKHO):\n return YKHO.__start_date",
"def yKcO(... | [
"0.7762315",
"0.75603575",
"0.75603575",
"0.75603575",
"0.75603575",
"0.7486363",
"0.7477442",
"0.7459678",
"0.74349153",
"0.74349153",
"0.74349153",
"0.74349153",
"0.74349153",
"0.74349153",
"0.74349153",
"0.740977",
"0.73778766",
"0.73364586",
"0.73364586",
"0.72440994",
"0... | 0.0 | -1 |
end date of the work | def C7pn(YKHO):
return YKHO._end_time | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eiFi(YKHO) -> _c1T:\n eiFi = YKHO.startdate() + fCoM(days=6)\n return eiFi",
"def mjdP(YKHO):\n return YKHO.end_date",
"def mjdP(YKHO):\n return YKHO.end_date",
"def mjdP(YKHO):\n return YKHO.end_date",
"def mjdP(YKHO):\n return YKHO.end_date",
"def ddKN(YKHO):\n return YKHO._dat... | [
"0.78831375",
"0.78634584",
"0.78634584",
"0.78634584",
"0.78634584",
"0.77250284",
"0.76520747",
"0.76266044",
"0.76266044",
"0.76266044",
"0.76266044",
"0.76266044",
"0.76266044",
"0.759413",
"0.7588583",
"0.75218624",
"0.7478593",
"0.7475901",
"0.7428991",
"0.7391031",
"0.... | 0.0 | -1 |
Test new SinglyLinkedList initialization | def I_He(YKHO):
CLNC = RRVT()
YKHO.assertIsNone(CLNC.head, None) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def as4H():\n from linked_list import LinkedList\n v_nO = LinkedList()\n assert v_nO.head is None",
"def BElg():\n from linked_list import Node\n Esd_ = Node(0, None)\n assert Esd_.contents == 0 and Esd_.next_node is None",
"def aWik(nPrm, hlel):\n Pcn2 = _sfu(nPrm)\n assert Pcn2.head.d... | [
"0.79151815",
"0.7507303",
"0.7487275",
"0.74729556",
"0.7389554",
"0.73178315",
"0.7207517",
"0.71674955",
"0.7110988",
"0.7058648",
"0.70405114",
"0.6982152",
"0.69507915",
"0.69477314",
"0.69332296",
"0.6928742",
"0.6891677",
"0.6876967",
"0.6873394",
"0.6868864",
"0.68591... | 0.8472487 | 0 |
Test new SinglyLinkedList add method, which adds a new node to the head of the list | def Ijr8(YKHO):
CLNC = RRVT()
YKHO.assertIsNone(CLNC.head, None)
CLNC.add(17)
YKHO.assertIsInstance(CLNC.head, o7DN)
YKHO.assertEqual(CLNC.head.get_data(), 17)
CLNC.add(31)
YKHO.assertIsInstance(CLNC.head, o7DN)
YKHO.assertEqual(CLNC.head.get_data(), 31)
YKHO.assertEqual(CLNC.head.ge... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A8oZ():\n Esd_ = Kt9y.add(99)\n assert Esd_.data == 99\n assert Kt9y.head.data == 99",
"def qWVH():\n Kt9y.add(99)\n Esd_ = Kt9y.add(199)\n assert Esd_.data == 199\n assert Kt9y.head.next_.next_.data == 199",
"def NWpg(YKHO):\n YKHO.empty_list.add_first(o7DN('h'))\n YKHO.assertIs... | [
"0.8169396",
"0.8087303",
"0.77488965",
"0.76637495",
"0.75344235",
"0.73332405",
"0.73224103",
"0.72739834",
"0.72263455",
"0.7198747",
"0.7187433",
"0.71571267",
"0.7144982",
"0.71090484",
"0.70933986",
"0.7090836",
"0.7087065",
"0.70867807",
"0.7075938",
"0.7016848",
"0.70... | 0.81801564 | 0 |
Recursively parse requirements from nested pip files. | def ARui(_ZYm='./requirements.txt'):
c0tL = []
with T_Uj.open(_ZYm, 'r') as nVrR:
Nqlg = (zFiD.strip() for zFiD in nVrR if zFiD.strip() and (not zFiD.startswith('#')))
for zFiD in Nqlg:
if zFiD.startswith('-r'):
c0tL += ARui(req_path=zFiD[3:])
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xfZk(pmON):\n with open(pmON, 'r') as rVmU:\n OZKa = rVmU.read()\n for uiGr in RkCj.parse_requirements(OZKa):\n try:\n mWFP = str(uiGr.req)\n except AttributeError:\n mWFP = str(uiGr)\n if mWFP.startswith('pip '):\n continue\n yield mWFP... | [
"0.71288544",
"0.6651787",
"0.65426314",
"0.6529125",
"0.6504721",
"0.64700425",
"0.64617753",
"0.64617753",
"0.646136",
"0.6363199",
"0.636149",
"0.6360567",
"0.6250586",
"0.62482285",
"0.62408596",
"0.6186244",
"0.6181662",
"0.60957664",
"0.6090548",
"0.608845",
"0.6066069"... | 0.71874356 | 0 |
Update `dict_org` with `dict_patch` inplace recursively. | def e49C(NQkf, SlrI, PJWX=False, j3e4=''):
for H5ew, BWXx in SlrI.items():
if H5ew not in NQkf:
if PJWX:
G9jH.info('Overwriting config: [{}{}]: None -> {}'.format(j3e4, H5ew, BWXx))
NQkf[H5ew] = BWXx
elif isinstance(BWXx, dict):
e49C(NQkf[H5ew], BW... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jUJF(_U3a, Mi6e):\n for H5ew in Mi6e.keys():\n wEf2 = Mi6e[H5ew]\n tZlo = _U3a.get(H5ew)\n if isinstance(wEf2, dict) and isinstance(tZlo, dict):\n jUJF(tZlo, wEf2)\n else:\n _U3a[H5ew] = wEf2",
"def EcPf(eJh7, Po4F, wShp=set({})):\n jbXL = eJh7.copy()\n... | [
"0.7645885",
"0.7104443",
"0.6886619",
"0.6626415",
"0.6592957",
"0.65780014",
"0.6575262",
"0.65690863",
"0.65683454",
"0.65628004",
"0.65537053",
"0.6520097",
"0.6501911",
"0.6469407",
"0.64546263",
"0.6404811",
"0.640175",
"0.63822025",
"0.6376387",
"0.63711345",
"0.632741... | 0.83274776 | 0 |
init pool manager with custom SSLContext | def AewB(YKHO, *qIxc, **B2fa):
QpfX = G4JS.packages.urllib3.util.ssl_.create_urllib3_context(i5iB.PROTOCOL_TLSv1_2)
QpfX.verify_mode = i5iB.CERT_REQUIRED
QpfX.options = QpfX.options | i5iB.OP_NO_TLSv1_1 | i5iB.OP_NO_TLSv1
QpfX.check_hostname = True
return super(EqfS, YKHO).init_poolmanager(*qIxc, ss... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AewB(YKHO, *qIxc, **B2fa):\n QpfX = i5iB.create_default_context()\n B2fa['ssl_context'] = QpfX\n QpfX.load_default_certs()\n return super(EqfS, YKHO).init_poolmanager(*qIxc, **B2fa)",
"def AewB(YKHO, siZ_, ANdr, XkN1=False):\n OaeV = i5iB.create_default_context()\n OaeV.set_ciphers('DEFAULT... | [
"0.8734159",
"0.7807787",
"0.7126786",
"0.65304863",
"0.63384485",
"0.62887824",
"0.6276363",
"0.6276363",
"0.62741274",
"0.6175886",
"0.61492115",
"0.6140705",
"0.6108396",
"0.61048853",
"0.61048853",
"0.6059722",
"0.6019968",
"0.601044",
"0.6002899",
"0.5991806",
"0.5987637... | 0.80864024 | 1 |
return a requests.Session object with optional client cert and trust anchor | def f57V(NKRf, aQ0h=None):
cuiw = G4JS.Session()
cuiw.mount(NKRf, EqfS(cadata=aQ0h))
return cuiw | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KfiN():\n G5sA = i5iB.SSLContext(i5iB.PROTOCOL_TLS_CLIENT)\n G5sA.check_hostname = False\n G5sA.verify_mode = i5iB.CERT_NONE\n w2B8 = piYe.TCPConnector(ssl=G5sA)\n return piYe.ClientSession(connector=w2B8)",
"def I0pn():\n x0hE = G4JS.session()\n return x0hE",
"def P6j4(YKHO):\n cui... | [
"0.7255816",
"0.71636796",
"0.7067632",
"0.7026047",
"0.69502795",
"0.6938462",
"0.6903281",
"0.6853317",
"0.68420416",
"0.6789743",
"0.67880136",
"0.6754696",
"0.672637",
"0.67137444",
"0.6684778",
"0.66589504",
"0.6580056",
"0.6574143",
"0.65709764",
"0.6545215",
"0.6521421... | 0.71809846 | 1 |
Initialize the DQN agent using the kerasrl package. | def Mdkt(sEAN, g6MG):
C3ST = ileL()
C3ST.add(D2Bo(input_shape=(1,) + sEAN.observation_space.shape))
C3ST.add(l6ZH(16))
C3ST.add(MroH('relu'))
C3ST.add(l6ZH(16))
C3ST.add(MroH('relu'))
C3ST.add(l6ZH(16))
C3ST.add(MroH('relu'))
C3ST.add(l6ZH(g6MG))
C3ST.add(MroH('linear'))
prin... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DYWV(YKHO, sEAN):\n from keras import Sequential\n from keras.optimizers import Adam\n from keras.layers import Dense, Dropout\n from rl.memory import SequentialMemory\n from rl.agents import DQNAgent\n from rl.policy import BoltzmannQPolicy\n YKHO.env = sEAN\n g6MG = YKHO.env.action_sp... | [
"0.75623614",
"0.7041456",
"0.69076264",
"0.6901907",
"0.6697566",
"0.6653363",
"0.64669174",
"0.64667547",
"0.6445147",
"0.64448273",
"0.643972",
"0.6438478",
"0.6437078",
"0.6432472",
"0.64035827",
"0.63941157",
"0.6373971",
"0.63456583",
"0.6308468",
"0.62893146",
"0.62865... | 0.679808 | 4 |
r"""Compute sigma value to be used for GAK. This method was originally presented in [1]_. | def gUk0(__n6, cDK5=100, t3eI=None):
t3eI = p11e(t3eI)
__n6 = e64F(__n6)
_yKp, Rv0k, Csk6 = __n6.shape
if not O7q_(__n6):
Rv0k = XTiz.min([g18D(i8WE) for i8WE in __n6])
if _yKp * Rv0k < cDK5:
qx_G = True
else:
qx_G = False
Nh2c = t3eI.choice(_yKp * Rv0k, size=cDK5, re... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dFi8(YKHO):\n KkY2 = rQrC([YKHO.u, YKHO.v, YKHO.w])\n exwG = KkY2.geometric_dimension()\n V6IE = YKHO.calc_pressure()\n jmzt = YKHO.calc_tau(P6bq)\n return jmzt - V6IE * VoC8(exwG)",
"def WTkW(YKHO):\n return YKHO._sigma",
"def WTkW(YKHO):\n return YKHO._sigma_0 * YKHO.growth",
"def ... | [
"0.7762209",
"0.7709764",
"0.76839375",
"0.7641255",
"0.7600358",
"0.7600358",
"0.7482217",
"0.7447759",
"0.74355215",
"0.7419266",
"0.7339671",
"0.7282556",
"0.7282556",
"0.7258493",
"0.7246855",
"0.7210285",
"0.7209508",
"0.72009224",
"0.718332",
"0.7150331",
"0.71237755",
... | 0.6403177 | 59 |
Creates an instance of this model from a dictionary | def rQfz(Emd4, cmPJ):
if cmPJ is None:
return None
LZV4 = cmPJ.get('numObjectsProtected')
FQqT = cmPJ.get('numObjectsUnprotected')
MCEN = cmPJ.get('protectedSizeBytes')
i14T = None
if cmPJ.get('statsByEnv') != None:
i14T = list()
for g8x2 in cmPJ.get('statsByEnv'):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rQfz(Emd4, cmPJ):\n if cmPJ == None:\n return None\n else:\n mWFP = cmPJ.get('name')\n l8cJ = cmPJ.get('generic_id')\n Gsi3 = cmPJ.get('therauptic_uses')\n PALZ = cmPJ.get('search_score')\n return Emd4(mWFP, l8cJ, Gsi3, PALZ)",
"def rQfz(Emd4, cmPJ):\n if cm... | [
"0.8371138",
"0.8334741",
"0.8214326",
"0.8169405",
"0.8169405",
"0.8147263",
"0.80518186",
"0.8028713",
"0.8012647",
"0.797861",
"0.79210013",
"0.79179746",
"0.79171103",
"0.7911904",
"0.79054826",
"0.78999585",
"0.78963107",
"0.7885213",
"0.78755313",
"0.7853558",
"0.785355... | 0.0 | -1 |
r"""Save fitted model. Save fitted MCCD model for later use. Ideally, you would probably want to store the whole MCCD instance, though this might mean storing a lot of data you are not likely to use if you do not alter the fit that was already performed. | def f6ys(YKHO, pmON):
if not YKHO.is_fitted:
raise ValueError('MCCD instance has not yet been fitted to observations. Please run the fit method.')
SMIV = {'n_comp_loc': YKHO.n_comp_loc, 'd_comp_glob': YKHO.d_comp_glob, 'upfact': YKHO.upfact}
Gjj5 = {'n_ccd': YKHO.n_ccd, 'obs_pos': YKH... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NrnH(YKHO, LWY6):\n with open(LWY6, 'wb') as eHNT:\n t2lc.dump(YKHO.trained_model, eHNT)",
"def lac1(YKHO, Ux0P=None):\n if YKHO.fitted_:\n C3ST = YKHO.model\n if Ux0P is not None:\n Ux0P = Ux0P\n else:\n SRYB = str(YKHO.output_var)\n Ux0P = ... | [
"0.72841185",
"0.70261955",
"0.6997776",
"0.6905962",
"0.6887937",
"0.68567187",
"0.6822444",
"0.6821088",
"0.6801089",
"0.67477286",
"0.67298603",
"0.67143595",
"0.67092323",
"0.67015857",
"0.6696821",
"0.6657251",
"0.6630511",
"0.6620066",
"0.6602499",
"0.6599122",
"0.65954... | 0.7821734 | 0 |
r"""Transform local weights to local contributions of the PSFs. | def Ub9h(YKHO, N4Mq, QHUQ):
return YKHO.S[QHUQ].dot(N4Mq) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YNmr(YKHO):\n for H5ew in YKHO.global_weights:\n YKHO.global_weights[H5ew] = oyIN.round(YKHO.global_weight * YKHO.local_weights[H5ew], YKHO.precision)",
"def NasG(YKHO):\n try:\n assert YKHO.local_weight != None\n except AssertionError:\n G9jH.error('No local model buffered!')\n... | [
"0.6422573",
"0.62555116",
"0.6243525",
"0.62263644",
"0.6211274",
"0.6146973",
"0.6078847",
"0.5947194",
"0.58301866",
"0.58301866",
"0.58043057",
"0.5679845",
"0.5647548",
"0.5640006",
"0.56216955",
"0.56158584",
"0.5614667",
"0.5604533",
"0.5601422",
"0.5577419",
"0.555703... | 0.52915007 | 61 |
r"""Transform global weights to global contribution of the PSFs. | def HGbv(YKHO, X4tU):
return YKHO.S[-1].dot(X4tU) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YNmr(YKHO):\n for H5ew in YKHO.global_weights:\n YKHO.global_weights[H5ew] = oyIN.round(YKHO.global_weight * YKHO.local_weights[H5ew], YKHO.precision)",
"def jUoz(YKHO):\n YKHO.global_transforms = YKHO._create_global_transforms()",
"def mbtL(YKHO):\n if YKHO._node_children:\n for PUA... | [
"0.746754",
"0.6607758",
"0.6604836",
"0.6422496",
"0.64035547",
"0.63071245",
"0.63071245",
"0.6150787",
"0.61292285",
"0.61269116",
"0.61269116",
"0.6105178",
"0.6105178",
"0.6061247",
"0.60152906",
"0.6012853",
"0.60045505",
"0.60035115",
"0.59942555",
"0.59919304",
"0.595... | 0.69121623 | 1 |
Add a node to the scene. Create the widget if it does not already exist. | def aZVs(YKHO, Q6kx, dQgj=(0, 0)):
if not isinstance(Q6kx, OFmS):
raise TypeError('node must be an instance of a NodeWidget type')
YKHO.scene().addItem(Q6kx)
Q6kx.setGraphView(YKHO)
Q6kx.setPos(float(dQgj[0]), float(dQgj[1])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g5gD(YKHO, Q6kx):\n YKHO.root.add_node(Q6kx)",
"def AKRy(YKHO, Q6kx):\n if not Q6kx._parentRef:\n YKHO._orphanceSceneNodeList.append(Q6kx)\n else:\n _AKB = Q6kx._parentRef()\n if _AKB:\n _AKB._children.append(Q6kx)\n mBge.AddChild(_AKB.GetCoreHandle(), Q6kx... | [
"0.7410262",
"0.73380333",
"0.72921056",
"0.7272368",
"0.72096205",
"0.71839696",
"0.71839696",
"0.71733475",
"0.71120685",
"0.70557743",
"0.70444447",
"0.702353",
"0.701204",
"0.69336295",
"0.6923465",
"0.69217277",
"0.6921101",
"0.6870808",
"0.6820726",
"0.67964506",
"0.679... | 0.7320804 | 2 |
Get installed package version. | def k9RV(YKHO, mWFP):
Wxnj, hlel = BfDw.exec_cmd('dpkg -s {} | grep Version'.format(mWFP))
kUBT = ZbWC.match('Version: (\\d:)?(.+)-\\d', hlel.decode())
if kUBT:
return kUBT.group(2)
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wnSZ(hxGQ: str) -> AzJI[int]:\n return RkCj.get_distribution(hxGQ).parsed_version.release",
"def a8K3(YKHO):\n fUpG = YKHO._pkg.CurrentVer\n if fUpG is not None:\n return fUpG.VerStr\n else:\n return None",
"def kaPv(YKHO):\n return YKHO.get_single('/package/version')",
"def ... | [
"0.82775795",
"0.824403",
"0.8165084",
"0.79452336",
"0.7911275",
"0.78869045",
"0.78343225",
"0.78343225",
"0.7824154",
"0.7778432",
"0.77641755",
"0.77595484",
"0.76994526",
"0.76706535",
"0.7661376",
"0.7624358",
"0.7554291",
"0.7521147",
"0.7493087",
"0.7480317",
"0.74758... | 0.7726521 | 12 |
Get installed package version. | def k9RV(YKHO, mWFP):
Wxnj, hlel = BfDw.exec_cmd('rpm -qi {} | grep Version'.format(mWFP))
kUBT = ZbWC.match('Version\\s+: (.+)', hlel.decode())
if kUBT:
return kUBT.group(1)
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wnSZ(hxGQ: str) -> AzJI[int]:\n return RkCj.get_distribution(hxGQ).parsed_version.release",
"def a8K3(YKHO):\n fUpG = YKHO._pkg.CurrentVer\n if fUpG is not None:\n return fUpG.VerStr\n else:\n return None",
"def kaPv(YKHO):\n return YKHO.get_single('/package/version')",
"def ... | [
"0.8277408",
"0.82439595",
"0.81650805",
"0.7945112",
"0.7911206",
"0.78867024",
"0.783434",
"0.783434",
"0.7823963",
"0.7778481",
"0.7764104",
"0.7759668",
"0.772627",
"0.76993656",
"0.76706934",
"0.7661625",
"0.762479",
"0.75539005",
"0.74929607",
"0.74802345",
"0.7475782",... | 0.7520947 | 18 |
Return the appropriate package backend. | def JLXL():
nW_p = BfDw.dist_name()
DDLl = None
if nW_p in ['debian', 'debian gnu/linux', 'ubuntu']:
DDLl = eP4m
elif 'centos' in nW_p:
DDLl = c4bH
else:
raise NotImplementedError('Sorry, this distribution is not supported yet.')
return DDLl(nW_p) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JLXL():\n return HwRy.modules[__name__]",
"def JLXL():\n return HwRy.modules[__name__]",
"def JLXL():\n return HwRy.modules[__name__]",
"def JLXL():\n return HwRy.modules[__name__]",
"def JLXL():\n return HwRy.modules[__name__]",
"def JLXL():\n return HwRy.modules[__name__]",
"def... | [
"0.7889477",
"0.7852916",
"0.7823802",
"0.7823802",
"0.7823802",
"0.7823802",
"0.7823802",
"0.7823802",
"0.778553",
"0.75698644",
"0.7553272",
"0.7469589",
"0.743495",
"0.7415952",
"0.74121803",
"0.73509336",
"0.73350364",
"0.7333221",
"0.73071575",
"0.72775227",
"0.725539",
... | 0.874413 | 0 |
Spatiotemporal convolutional block, which contains two temporal gated convolution layers and one spatial graph convolution layer in the middle. | def FIMM(YKHO, r3jU, n5ES, EKkU, lq30, KXIc, iqte, Gz_G, rrBf, xMux, hr1G, p_64, QfV9='GLU', **B2fa):
super(dHtu, YKHO).__init__(**B2fa)
YKHO.road_num = iqte
YKHO.car_num = Gz_G
yC5J = {'road': 0, 'car': r3jU + 1}
if iqte == 0:
yC5J['car'] = 0
YKHO.hidden_num = YKHO.get_hidden_num(iqte, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pQyR(vHnr, ZGVe, QJWG, _0fC, fiu3, G_Si, hr1G, XPx2=False, fC0I=False, CJGY=False, OEry='weight_norm', LT6S=False, DbxN=False):\n sMyr = 1.0 - hr1G\n QGo8 = vHnr.get_shape()[-1]\n mWFP = W0tD('temporal_block', G_Si)\n with ZylS.variable_scope(mWFP):\n if CJGY:\n ZylS.get_variable_... | [
"0.69079196",
"0.6520311",
"0.6512714",
"0.64783275",
"0.64480805",
"0.641866",
"0.640239",
"0.63965213",
"0.63842136",
"0.63531697",
"0.63460433",
"0.6301296",
"0.629613",
"0.6294166",
"0.62913436",
"0.62546515",
"0.61851645",
"0.617853",
"0.617303",
"0.6145881",
"0.61209184... | 0.6335282 | 11 |
Identifies red lights in the incoming camera image and publishes the index of the waypoint closest to the red light's stop line to /traffic_waypoint | def u69M(YKHO, tO9_):
YKHO.has_image = True
YKHO.camera_image = tO9_
zhpB, QTBn = YKHO.process_traffic_lights()
'\n Publish upcoming red lights at camera frequency.\n Each predicted state has to occur `STATE_COUNT_THRESHOLD` number\n of times till we start using it. Otherwise the pr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X83s(YKHO):\n agxD = None\n v8uu = GPtr.light_positions\n if YKHO.pose is not None and YKHO.waypoints is not None:\n zhpB = YKHO.get_closest_waypoint(YKHO.pose.pose)\n pImw = -1\n VXjJ = YKHO.bridge.imgmsg_to_cv2(YKHO.camera_image, 'passthrough')\n ZHfW = YKHO.red_select(VXjJ)\n WfT... | [
"0.782888",
"0.7263428",
"0.69903624",
"0.6981275",
"0.69811934",
"0.6901608",
"0.6825243",
"0.682373",
"0.68096244",
"0.6779576",
"0.67643315",
"0.671695",
"0.6646702",
"0.66458976",
"0.66231716",
"0.6620322",
"0.6595658",
"0.65712464",
"0.6567182",
"0.64809835",
"0.6441016"... | 0.5293648 | 78 |
Return the cache associated with this instance. | def wyyA(YKHO):
return oRi_(dict) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T_mo(YKHO):\n return YKHO.cache",
"def wyyA(YKHO):\n if YKHO._cache is None:\n YKHO._cache = ygwh.get_cache(YKHO.cache_name)\n return YKHO._cache",
"def T_mo(YKHO):\n return YKHO._instance.__dict__.setdefault(YKHO._cache_name, {})",
"def wyyA(YKHO):\n return YKHO._cache",
"def wyy... | [
"0.8941482",
"0.8682967",
"0.8615503",
"0.856268",
"0.8554455",
"0.8550632",
"0.8458118",
"0.8440664",
"0.84106",
"0.8202124",
"0.8186369",
"0.79574305",
"0.7884392",
"0.77525884",
"0.7711712",
"0.76809365",
"0.76662385",
"0.7619965",
"0.75290895",
"0.7527261",
"0.74969554",
... | 0.72677654 | 25 |
Plot y vs. x but fill in between y and 0 with a colormap. Arguments x, y1, y2 curves to plot between c array congruent to x and y indicating which color in the color map to fill in at that point. The range should be from 0.0 to 1.0 Keyword Arguments cm Matplotlib Colormap Object. The c array above picks colors from thi... | def fL73(WKvO, si3g, skBL=None, Z9rn=None, Bcwd=Bcwd.gist_rainbow, MPlV=None):
if MPlV is None:
MPlV = QrM1.gca()
if skBL is None:
skBL = oyIN.zeros(len(si3g), dtype=float)
elif isinstance(skBL, (int, float)):
skBL *= oyIN.ones(len(si3g), dtype=float)
EqBn = Z9rn.copy()
EqBn[... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ujrY(o0ZM, BhJz, iMGt, AVI5, KDfs, r2gD=None, Qzoi=None):\n YdCk = SnBA.is_numeric_dtype(o0ZM)\n Dfba = SnBA.is_numeric_dtype(BhJz)\n SGNq = SnBA.is_categorical_dtype(o0ZM)\n X1kh = SnBA.is_categorical_dtype(BhJz)\n tO9_ = 'The provided {s} is not numeric or categorical. If {s} contains categori... | [
"0.57530934",
"0.5716779",
"0.56639886",
"0.56639886",
"0.5640113",
"0.5612588",
"0.5453619",
"0.54418826",
"0.54418826",
"0.54114544",
"0.5365217",
"0.5362016",
"0.53609854",
"0.53410673",
"0.5330634",
"0.531628",
"0.5314956",
"0.5302397",
"0.5268266",
"0.52571875",
"0.52320... | 0.73312104 | 0 |
Load Pretrained VGG Model into TensorFlow. | def LbAo(cb_Q, VyBP):
lFgm = 'vgg16'
kvAN = 'image_input:0'
jlSf = 'keep_prob:0'
XYEU = 'layer3_out:0'
Fq6D = 'layer4_out:0'
FI61 = 'layer7_out:0'
ZylS.saved_model.loader.load(cb_Q, [lFgm], VyBP)
pNZh = cb_Q.graph
njad = pNZh.get_tensor_by_name(kvAN)
sMyr = pNZh.get_tensor_by_nam... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LbAo(cb_Q, VyBP):\n lFgm = 'vgg16'\n kvAN = 'image_input:0'\n jlSf = 'keep_prob:0'\n XYEU = 'layer3_out:0'\n Fq6D = 'layer4_out:0'\n FI61 = 'layer7_out:0'\n ZylS.saved_model.loader.load(cb_Q, [lFgm], VyBP)\n pNZh = ZylS.get_default_graph()\n input = pNZh.get_tensor_by_name(kvAN)\n ... | [
"0.7914449",
"0.7891967",
"0.78874564",
"0.78874564",
"0.7812284",
"0.7785123",
"0.7765342",
"0.77561873",
"0.7743745",
"0.7733068",
"0.7711817",
"0.7696616",
"0.769391",
"0.76822555",
"0.7673929",
"0.7657265",
"0.76298875",
"0.7626694",
"0.7621515",
"0.7619852",
"0.7600322",... | 0.77095634 | 11 |
Computes Nxk distance matrix using kernel matrix | def GRlU(YKHO, nMvt, G1Hx, k0lF, yK2S):
pImw = oyIN.zeros((nMvt.shape[0], G1Hx))
for CQwJ in Ni9Y(G1Hx):
ZHfW = k0lF == CQwJ
if oyIN.sum(ZHfW) == 0:
raise xxyF("ERROR:cluster '%d' is empty. Looks like we cant make %d clusters" % (CQwJ, G1Hx))
raws = yK2S[ZHfW].sum()
v... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def v_Qm(nMvt):\n Csk6 = oyIN.diag(nMvt)\n lWPh = bPtQ(Csk6) + oovF(Csk6) - 2 * nMvt\n lWPh[lWPh < 0] = 0.0\n return oyIN.sqrt(lWPh)",
"def ygaj(YKHO, EcVT, G1Hx):\n TaUL, _0VL = YKHO._get_NN(EcVT, k=G1Hx)\n if YKHO.sigma != 0:\n G9jH.info('calculating kernel matrix with global sigma %f'... | [
"0.7234338",
"0.71775013",
"0.6889557",
"0.6382724",
"0.62630093",
"0.62573344",
"0.62278616",
"0.62255543",
"0.6201578",
"0.6164583",
"0.6099894",
"0.6088591",
"0.6088591",
"0.6078623",
"0.6041702",
"0.6018813",
"0.6008241",
"0.6006531",
"0.59872085",
"0.59786165",
"0.597240... | 0.58229804 | 45 |
Return an iterator that batches query results. This is usually used in order to avoid overloading memory. Ideally we would use window functions, but not all dbs support this. | def H594(YKHO, vexM, Ep8u):
wjRY = vexM.count()
nfC1 = 0
Wc9F = None
while nfC1 < wjRY:
if not Wc9F:
Wc9F = vexM.limit(Ep8u).offset(nfC1)
for rdlD in Wc9F:
nfC1 += 1
if nfC1 % Ep8u == 0:
Wc9F = None
yield rdlD | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yEmi(YKHO):\n try:\n yKcO = int(YKHO.results.start)\n except AttributeError:\n yKcO = 0\n yKcO += len(YKHO.results)\n NArs = dict(YKHO._params)\n NArs['start'] = yKcO\n vexM = NArs['q']\n del NArs['q']\n return YKHO._connection.query(vexM, **NArs)",
"def __uJ(SR0I):\n ... | [
"0.73867345",
"0.71763045",
"0.70580196",
"0.687356",
"0.68473333",
"0.6831299",
"0.6803469",
"0.6802151",
"0.6798327",
"0.67066956",
"0.67007655",
"0.6694311",
"0.66712886",
"0.6665158",
"0.6660359",
"0.66408396",
"0.6624276",
"0.66143644",
"0.6586603",
"0.6584395",
"0.65827... | 0.76031804 | 0 |
Split the last dimension into (num_heads, depth). Transpose the result such that the shape is (batch_size, num_heads, seq_len, depth) | def Plaj(YKHO, WKvO, Ep8u):
WKvO = ZylS.reshape(WKvO, (Ep8u, -1, YKHO.num_heads, YKHO.depth))
return ZylS.transpose(WKvO, perm=[0, 2, 1, 3]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Plaj(YKHO, WKvO, Ep8u):\n WKvO = ZylS.reshape(WKvO, (Ep8u, -1, YKHO.num_heads, YKHO.depth))\n return ZylS.transpose(WKvO, perm=[0, 2, 1, 3])",
"def Plaj(WKvO, hC9O):\n return ZylS.transpose(VjTS(WKvO, hC9O), [0, 2, 1, 3])",
"def Plaj(YKHO, WKvO, Ep8u):\n WKvO = ZylS.reshape(WKvO, (Ep8u, -1, YKH... | [
"0.75420517",
"0.75000507",
"0.7437006",
"0.7437006",
"0.7437006",
"0.73778385",
"0.73312783",
"0.73312783",
"0.73312783",
"0.7284441",
"0.728058",
"0.7257643",
"0.72245455",
"0.71920156",
"0.7040687",
"0.6766547",
"0.6713164",
"0.65893745",
"0.65893745",
"0.65792304",
"0.653... | 0.7250769 | 12 |
Check of the file extension to allow the upload of the desired ones | def SnBA(Fst3):
KzJa = ['pdf', 'text']
for w2IS in KzJa:
if w2IS in Fst3:
return w2IS.upper()
raise KeyError('File not allowed') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hGfQ(YKHO):\n Ux0P, Fst3 = YKHO.file_name.split('.')\n if Fst3 not in ['csv', 'xlsx']:\n return 'Please upload a CSV or XLSX file only _/\\\\_'\n return True",
"def XT0o(Va2z):\n return Va2z.strip('.') in UWr8",
"def nrOS(YKHO, L03z, Jyyj):\n if not Jyyj.has_file():\n return\n ... | [
"0.8112833",
"0.7858256",
"0.7803797",
"0.7784365",
"0.76407224",
"0.76385653",
"0.7599338",
"0.7590762",
"0.7566074",
"0.755586",
"0.75533825",
"0.7541389",
"0.7537973",
"0.7537973",
"0.75375825",
"0.75375825",
"0.7530848",
"0.75219136",
"0.7510046",
"0.7490564",
"0.7486219"... | 0.0 | -1 |
A parallel version of `[func(G, arg) for arg in arglist]`. There is no deterministic assignment of workers to arglist elements. Optionally runs with progress bar. | def T6jg(YKHO, JfyU, FCKa: list, FRUU: tqdm=None):
if FRUU is not None:
FRUU.total = len(FCKa)
if wvg6 and YKHO._n_threads == 1:
Ylbp = []
for d7pR in FCKa:
Ylbp.append(JfyU(YKHO._G, _qLf(d7pR)))
if FRUU:
FRUU.update(1)
return Ylbp
GjG8... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vfuS(JfyU: Callable[[Inp], Out], ezWE: Sequence[Inp], l54n: Optional[int]=None, Eb4t: bool=False, **B2fa: Any) -> bdIy[g0sJ]:\n l54n = l54n if isinstance(l54n, int) else min(16, g2zq.cpu_count())\n if l54n < 2:\n if Eb4t:\n dixj = list(map(JfyU, PRqg(ezWE, total=len(ezWE), **B2fa)))\n ... | [
"0.6965242",
"0.6763857",
"0.662845",
"0.66112953",
"0.6466872",
"0.64660054",
"0.6428869",
"0.64037746",
"0.6400448",
"0.63918525",
"0.6333758",
"0.6282108",
"0.6247265",
"0.6229684",
"0.620288",
"0.6188145",
"0.6163012",
"0.6132796",
"0.61062056",
"0.61062056",
"0.61062056"... | 0.75869983 | 0 |
Get all players for specific year and league; returns dataframe League input in format '201819' | def V6BG(bJqe, lO87):
bD7m = 'https://www.eliteprospects.com/league/' + bJqe + '/stats/' + lO87 + '?page='
Bwa6 = []
for YRbF in range(1, 10):
B2Dn = G4JS.get(bD7m + str(YRbF))
Z9JV = rKuS(B2Dn.content, 'html.parser')
FzLR = Z9JV.find('table', {'class': 'table table-striped table-sor... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ISfR(YKHO):\n mWFP = YKHO.getName.split()\n if not YKHO.check_records(' '.join(mWFP)):\n print('player does not exist')\n else:\n oMnA = YKHO.selectByName(mWFP)\n YKHO.cur.execute('Select * FROM YearOfPlayer\\n WHERE key = ?', (oMnA[-1],))\n whbj... | [
"0.68784004",
"0.6589918",
"0.62853307",
"0.6261653",
"0.6249139",
"0.62224275",
"0.6220778",
"0.620176",
"0.6145235",
"0.6134294",
"0.609301",
"0.6067357",
"0.6052088",
"0.60232425",
"0.60198253",
"0.59676754",
"0.5964892",
"0.59532267",
"0.59405106",
"0.5920903",
"0.5917131... | 0.62657267 | 3 |
Takes series of playerlinks to eliteprospectprofiles, Return dataframe with stats by player and season | def AqUY(G02y):
k9X4 = 'table table-striped table-condensed table-sortable player-stats skater-stats highlight-stats'
nPrm = []
VNpL = 0
for d6pt, QZnA in enumerate(G02y):
B2Dn = G4JS.get(QZnA)
Z9JV = rKuS(B2Dn.content, 'html.parser')
wl4b = Z9JV.find('table', {'class': k9X4})
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V6BG(bJqe, lO87):\n bD7m = 'https://www.eliteprospects.com/league/' + bJqe + '/stats/' + lO87 + '?page='\n Bwa6 = []\n for YRbF in range(1, 10):\n B2Dn = G4JS.get(bD7m + str(YRbF))\n Z9JV = rKuS(B2Dn.content, 'html.parser')\n FzLR = Z9JV.find('table', {'class': 'table table-stripe... | [
"0.6898304",
"0.6819472",
"0.66605467",
"0.65223056",
"0.6501225",
"0.64712197",
"0.6425922",
"0.6332613",
"0.6324893",
"0.61937195",
"0.61796206",
"0.61603606",
"0.61462605",
"0.61299384",
"0.6031331",
"0.6029695",
"0.60215163",
"0.6006258",
"0.5982806",
"0.59788746",
"0.596... | 0.663522 | 3 |
Convert triu (upper triangular) matrix to full, symmetric matrix. Assumes square input matrix D | def rESn(YKHO, lWPh):
IjIm = ht2j.eye(lWPh.shape[0], dtype=ht2j.float32, device=YKHO.device) * ht2j.diag(lWPh)
lWPh = lWPh + lWPh.T - IjIm
return lWPh | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rESn(YKHO, lWPh):\n IjIm = ht2j.eye(lWPh.shape[0], dtype=ht2j.float64, device=YKHO.device)\n IjIm = IjIm * ht2j.diag(lWPh)\n lWPh = lWPh + lWPh.T - IjIm\n return lWPh",
"def yeG4(YKHO, Sq9X, KkY2):\n return gQS9.matrix_SymTriDiag(YKHO, Sq9X, KkY2)",
"def pwH0(KkY2):\n E3D9 = KkY2.copy()\n... | [
"0.8104079",
"0.69244915",
"0.68024784",
"0.6515388",
"0.645863",
"0.6348533",
"0.6331669",
"0.6278243",
"0.62635934",
"0.6253295",
"0.60618293",
"0.60525024",
"0.5976492",
"0.59497386",
"0.5897376",
"0.58888066",
"0.5821076",
"0.5789959",
"0.5745723",
"0.5726025",
"0.5670513... | 0.8086053 | 1 |
Test that only password and not username raises ValueError. | def UMy4(fkN9):
fkN9.settings['MONGODB_URI'] = 'mongodb://testing@localhost/testing'
with trZe.raises(ValueError):
PGNO(fkN9) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cEkh(YKHO):\n YKHO.assertFalse(mv1M.authenticate('tester22', 'password1'))",
"def cEkh(YKHO):\n YKHO.assertFalse(mv1M.authenticate('aljgs;lkj', 'password'))",
"def cEkh(YKHO):\n YKHO.assertFalse(mv1M.authenticate('badusername', 'password'))",
"def WTsm(NtEF, jTXt):\n if ' ' in jTXt or ' ' in ... | [
"0.8167318",
"0.81520325",
"0.80673176",
"0.7796723",
"0.7642382",
"0.7640985",
"0.75516504",
"0.7515665",
"0.7494347",
"0.74937",
"0.74834454",
"0.7463917",
"0.74336874",
"0.741478",
"0.7413727",
"0.7394933",
"0.73875153",
"0.7371066",
"0.7346005",
"0.7343825",
"0.73348254",... | 0.0 | -1 |
Returns cleaned version of votes or 0 if it's a nonnumeric value. | def Iv4y(YKHO, wEf2):
if type(wEf2) is str:
if wEf2.strip() == '':
return 0
try:
return int(float(wEf2))
except ValueError:
return 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Iv4y(YKHO, wEf2):\n if wEf2.strip() == '':\n return 0\n try:\n return int(float(wEf2))\n except ValueError:\n return 0",
"def Iv4y(YKHO, wEf2):\n if wEf2.strip() == '':\n return 0\n try:\n return int(float(wEf2))\n except ValueError:\n return 0",
... | [
"0.75205654",
"0.75205654",
"0.59375393",
"0.5754639",
"0.5541891",
"0.55151755",
"0.5496662",
"0.5494049",
"0.54201555",
"0.5418169",
"0.5351059",
"0.53376323",
"0.53338885",
"0.5166284",
"0.5152727",
"0.5130768",
"0.50908184",
"0.5086605",
"0.50862277",
"0.5063502",
"0.5058... | 0.7470631 | 2 |
Return full names of labels the classifier uses | def Y949(M_NZ):
return [wHjh[Z9rn] for Z9rn in M_NZ.classes_] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Te1x(YKHO):\n return ['toxic', 'severe_toxic', 'obscene', 'threat', 'insult', 'identity_hate']",
"def Crrw(YKHO) -> x1iM[str]:\n pass",
"def zg9A():\n return ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']",
"def i59d() -> x1iM[str]:\n assert nunu is... | [
"0.7820519",
"0.77588713",
"0.7695404",
"0.76931447",
"0.7634535",
"0.76282215",
"0.7568946",
"0.75291544",
"0.752757",
"0.75225294",
"0.75225294",
"0.75157976",
"0.75157976",
"0.7511507",
"0.7481438",
"0.7477396",
"0.7474199",
"0.7462468",
"0.7459298",
"0.7459298",
"0.745891... | 0.0 | -1 |
Calculate odd even by condition | def b8V_():
FGW3 = int(input())
while FGW3 >= 1:
if FGW3 % 2 == 1 and FGW3 != 1:
print(int(FGW3), end=' ')
FGW3 += 1
else:
print(int(FGW3), end=' ')
FGW3 /= 2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C_CQ(WKvO):\n return WKvO % 2 != 0",
"def lMy_(BWXx):\n return BWXx % 2 == 1",
"def ubP8(WKvO):\n return WKvO % 2 == 0",
"def ubP8(WKvO):\n return WKvO % 2 == 0",
"def kYZq(WKvO):\n return WKvO % 2",
"def C_CQ(WKvO):\n return not int(WKvO) % 2 == 0",
"def vf3I(WKvO):\n return i... | [
"0.7710155",
"0.76075685",
"0.75770456",
"0.75770456",
"0.75611275",
"0.74861413",
"0.7445796",
"0.74382734",
"0.74208105",
"0.7403903",
"0.7395793",
"0.7350209",
"0.7342738",
"0.7302215",
"0.7297163",
"0.7290304",
"0.72474325",
"0.7242501",
"0.72385854",
"0.7233775",
"0.7233... | 0.0 | -1 |
r""" Returns the static temperature of a perfect gas, based on the specific | def LGWj(EH9b: Dim, re34: Dim, mIQ8: Dim, HN86: Dim) -> y7PS:
return mIQ8 + (EH9b - HN86) / re34 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C6FI(Cs6h=None, nIjK=None):\n rR8k = oyIN.meshgrid(Cs6h.x, Cs6h.y, Cs6h.z, indexing='ij')\n if nIjK['crd_sys'] == 'sph':\n x6aZ = rR8k[0]\n rxEN = rR8k[1]\n _oWe = rR8k[2]\n CAzz = x6aZ * oyIN.sin(rxEN) * oyIN.cos(_oWe)\n Jd40 = x6aZ * oyIN.sin(rxEN) * oyIN.sin(_oWe)\n ... | [
"0.7059645",
"0.695632",
"0.6906281",
"0.67285067",
"0.66361105",
"0.66221833",
"0.65912765",
"0.6528974",
"0.6525802",
"0.6481456",
"0.64671606",
"0.6466966",
"0.64591795",
"0.6457997",
"0.64192647",
"0.6398703",
"0.6390152",
"0.63606006",
"0.6356485",
"0.6345958",
"0.632996... | 0.0 | -1 |
Extracts a minibatch of size 'batchsize' from the given data. In the GaussianBernoulli implementation, these samples are not meant to be binary. | def SI7W(YKHO, nPrm, f65o):
wpJo = oyIN.shape(nPrm)[0]
zN91 = oyIN.shape(nPrm)[1]
r845 = oyIN.random.randint(low=0, high=wpJo, size=f65o)
return nPrm[r845, :] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Q4Dm(nPrm, Ep8u=100, Y9ns=False):\n pass",
"def SI7W(YKHO, Ep8u=100, vgXP=0):\n gGnb = []\n while len(gGnb) < Ep8u:\n d6pt = tuKI.randint(0, YKHO.count)\n gGnb.append(YKHO.get_sample(d6pt))\n return gGnb",
"def Rmoh(YKHO, Ep8u):\n UHFx = 0\n I1mm = tuKI.randint(0, int(YKHO._... | [
"0.81076676",
"0.7529406",
"0.73682314",
"0.7154552",
"0.71511453",
"0.69407934",
"0.694005",
"0.694005",
"0.694005",
"0.689564",
"0.689564",
"0.68781567",
"0.67619187",
"0.6666398",
"0.6660796",
"0.6628827",
"0.6611122",
"0.66096234",
"0.66096234",
"0.6600123",
"0.65315765",... | 0.8306959 | 0 |
This function find molar mass of compound. Don't use if compound has brackets! | def fxaD(foR1):
CgjT = 0
if not foR1[:1] in R63d and (not foR1[:2] in R63d):
print('This compound does not exist! ')
else:
for G1Hx, hcXw in enumerate(foR1):
if foR1[G1Hx:G1Hx + 2] in R63d:
if foR1[G1Hx + 2:3 + G1Hx] in list('123456789'):
CgjT ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Pvk4(asBq):\n asBq = asBq.replace('_', ' ')\n try:\n l9Ur = OaaN[asBq]\n except:\n raise ValueError('Error in get_molmass. Unknown molecule: ' + asBq)\n try:\n UHFx = pPgg(l9Ur)\n except:\n raise ValueError('Error in get_molmass' + ' Cant count elements in ' + asBq +... | [
"0.732592",
"0.72995526",
"0.7105491",
"0.7051099",
"0.6850889",
"0.67495424",
"0.6734134",
"0.66104907",
"0.65942883",
"0.64956707",
"0.6471959",
"0.644158",
"0.6402755",
"0.6378068",
"0.63484097",
"0.6267302",
"0.62083846",
"0.62025505",
"0.6187136",
"0.61864024",
"0.618042... | 0.8035045 | 0 |
Test the ion temperature inside the pedestal. | def me_x(YKHO, G2Ym):
WPfG = G2Ym.ion_temperature(0.2)
assert trZe.approx(WPfG, 45.89987429) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZSva(YKHO, G2Ym):\n WPfG = G2Ym.ion_temperature(2.4)\n assert trZe.approx(WPfG, 5.45525594)",
"def MMEK(YKHO, G2Ym):\n zXil = odwy['minor_radius'] / 100.0\n WPfG = G2Ym.ion_temperature(zXil)\n assert trZe.approx(WPfG, odwy['ion_temperature_seperatrix'])",
"def NqRg(YKHO):\n pass",
"def ... | [
"0.7881209",
"0.72069067",
"0.7196547",
"0.7081031",
"0.70536727",
"0.7023559",
"0.69732606",
"0.6959021",
"0.69531703",
"0.68242717",
"0.6790102",
"0.6786951",
"0.6710988",
"0.670634",
"0.67049354",
"0.6681199",
"0.6671824",
"0.6668183",
"0.6660142",
"0.6638713",
"0.6622462"... | 0.8186078 | 0 |
Test the ion temperature outside the pedestal. | def ZSva(YKHO, G2Ym):
WPfG = G2Ym.ion_temperature(2.4)
assert trZe.approx(WPfG, 5.45525594) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def me_x(YKHO, G2Ym):\n WPfG = G2Ym.ion_temperature(0.2)\n assert trZe.approx(WPfG, 45.89987429)",
"def MMEK(YKHO, G2Ym):\n zXil = odwy['minor_radius'] / 100.0\n WPfG = G2Ym.ion_temperature(zXil)\n assert trZe.approx(WPfG, odwy['ion_temperature_seperatrix'])",
"def wg7Q(YKHO):\n YKHO._setup_s... | [
"0.8197432",
"0.741761",
"0.72199845",
"0.71594584",
"0.7135319",
"0.70552206",
"0.70121133",
"0.7009221",
"0.69779474",
"0.694803",
"0.6890942",
"0.6858726",
"0.68579924",
"0.67824835",
"0.676258",
"0.6758419",
"0.6737867",
"0.6698946",
"0.6676553",
"0.6627419",
"0.65960693"... | 0.83395606 | 0 |
Test the ion temperature at the boundary. | def MMEK(YKHO, G2Ym):
zXil = odwy['minor_radius'] / 100.0
WPfG = G2Ym.ion_temperature(zXil)
assert trZe.approx(WPfG, odwy['ion_temperature_seperatrix']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YVTn(YKHO):\n YKHO._setup_switch(False)\n BJsk.set_temperature(YKHO.hass, 30)\n YKHO.hass.block_till_done()\n YKHO._setup_sensor(29)\n YKHO.hass.block_till_done()\n assert 0 == len(YKHO.calls)",
"def b57K(YKHO):\n YKHO._setup_switch(False)\n BJsk.set_temperature(YKHO.hass, 25)\n YK... | [
"0.726623",
"0.72507685",
"0.70849323",
"0.7051274",
"0.70424193",
"0.69948566",
"0.6986842",
"0.6942983",
"0.6916819",
"0.69044816",
"0.6898786",
"0.68053967",
"0.66443664",
"0.6592566",
"0.656471",
"0.6519529",
"0.65132606",
"0.6428127",
"0.64056593",
"0.63859886",
"0.63603... | 0.7948902 | 0 |
Returns True if a dictionary is 'empty' i.e. all the values are zero | def amg7(chwN):
for H5ew in chwN.keys():
if chwN.get(H5ew) != 0:
return False
break
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FBfn(eUNp):\n return len(eUNp) == 0",
"def FBfn(eUNp):\n return len(eUNp) == 0",
"def FBfn(YKHO):\n return any(YKHO.values.keys())",
"def FBfn(cmPJ: dict) -> bool:\n return not bool(cmPJ)",
"def FBfn(cmPJ: dict) -> bool:\n return not bool(cmPJ)",
"def TyG3(JZXy):\n for YRbF in JZXy.... | [
"0.87275165",
"0.86033636",
"0.85341555",
"0.8330075",
"0.8330075",
"0.8022286",
"0.79219514",
"0.76353365",
"0.7587883",
"0.75772154",
"0.7493541",
"0.74838793",
"0.7455917",
"0.74134666",
"0.741051",
"0.74078214",
"0.7386398",
"0.73652816",
"0.7290323",
"0.7272727",
"0.7268... | 0.8434536 | 3 |
Returns the id of the resource. | def unpH(YKHO):
if YKHO._id_attr is None:
return None
return getattr(YKHO, YKHO._id_attr) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def id(YKHO):\n return YKHO._resource_id",
"def id(YKHO):\n return YKHO._getValue('resource-id')",
"def PcW4(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_id')",
"def PcW4(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_id')",
"def PcW4(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_id')"... | [
"0.88593274",
"0.8777015",
"0.84824884",
"0.84824884",
"0.84824884",
"0.8298083",
"0.82433134",
"0.82119286",
"0.8179516",
"0.8114396",
"0.8114396",
"0.8114396",
"0.8114396",
"0.8114396",
"0.8069962",
"0.8041592",
"0.8041592",
"0.8041592",
"0.8041592",
"0.8041592",
"0.8041592... | 0.0 | -1 |
The next page number. If None, the current page is the last. | def Ynkd(YKHO):
return YKHO._list.prev_page | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jsLP(YKHO):\n if YKHO.page < YKHO.pages:\n return YKHO.page + 1\n return None",
"def jsLP(YKHO):\n if not YKHO.has_next:\n return None\n return YKHO.page + 1",
"def jsLP(YKHO):\n if YKHO.has_next:\n return YKHO.page + 1",
"def jsLP(YKHO):\n return YKHO.page + 1",
... | [
"0.89359903",
"0.8799347",
"0.833492",
"0.81269807",
"0.81269807",
"0.81269807",
"0.7614285",
"0.7351691",
"0.7351691",
"0.72808313",
"0.69988084",
"0.6870431",
"0.6825005",
"0.67516506",
"0.67142296",
"0.6712726",
"0.6683241",
"0.6631251",
"0.66242856",
"0.6617485",
"0.66174... | 0.0 | -1 |
The next page number. If None, the current page is the last. | def fmO_(YKHO):
return YKHO._list.next_page | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jsLP(YKHO):\n if YKHO.page < YKHO.pages:\n return YKHO.page + 1\n return None",
"def jsLP(YKHO):\n if not YKHO.has_next:\n return None\n return YKHO.page + 1",
"def jsLP(YKHO):\n if YKHO.has_next:\n return YKHO.page + 1",
"def jsLP(YKHO):\n return YKHO.page + 1",
... | [
"0.8936825",
"0.8800193",
"0.833565",
"0.8127922",
"0.8127922",
"0.8127922",
"0.7614843",
"0.735101",
"0.735101",
"0.6998207",
"0.68701655",
"0.6825101",
"0.67512226",
"0.6713875",
"0.67124116",
"0.6683876",
"0.6631821",
"0.6624029",
"0.6618177",
"0.6618177",
"0.6596839",
"... | 0.7280483 | 9 |
Convert categorials to dummies | def _3y6(zUQz):
KqFV = rLdf.DataFrame()
for _x49 in zUQz.columns.tolist():
jQ3Z = rLdf.get_dummies(zUQz[_x49], dummy_na=True, prefix=_x49)
KqFV = rLdf.concat([KqFV, jQ3Z], axis=1)
return KqFV | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tVT8(YKHO):\n YKHO.df = rLdf.get_dummies(YKHO.df[[WKvO for WKvO in YKHO.df.columns]])",
"def fyxj(jQ3Z):\n O4ib = jQ3Z.columns[jQ3Z.dtypes == 'int32'].tolist()\n for SRYB in O4ib:\n jQ3Z = jQ3Z.join(rLdf.get_dummies(jQ3Z[SRYB], prefix=SRYB).astype('int32'))\n jQ3Z = jQ3Z.drop(O4ib, axis=1)... | [
"0.82095724",
"0.7904602",
"0.7651023",
"0.7518798",
"0.7471873",
"0.7351339",
"0.7294335",
"0.7271532",
"0.72145283",
"0.7211522",
"0.7145363",
"0.7116434",
"0.7090229",
"0.70833296",
"0.70555",
"0.7055055",
"0.70437",
"0.7034312",
"0.70330864",
"0.7028017",
"0.6988421",
"... | 0.7735518 | 2 |