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 |
|---|---|---|---|---|---|---|
plots data points in X, coloring them so that those with the same index assignments in idx have the same color plotDataPoints(X, idx, K) plots data points in X, coloring them so that those with the same index assignments in idx have the same color | def z1m4(EcVT, or8S, nMvt):
tn62 = QrM1.cm.get_cmap('rainbow', nMvt)
QrM1.scatter(EcVT[:, 0], EcVT[:, 1], 15, or8S, cmap=tn62) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Axnt(EcVT, or8S, G1Hx):\n QrM1.scatter(EcVT[:, 0], EcVT[:, 1], c=or8S, marker='^', s=30)",
"def Axnt(YKHO, EcVT, or8S, G1Hx):\n QrM1.scatter(EcVT[:, 0], EcVT[:, 1], c=or8S, marker='^', s=30)",
"def kj9G(nPrm, d6pt):\n QrM1.figure(NvRP[d6pt])\n WKvO = sjCH(nPrm, 0)\n LVAh = sjCH(nPrm, d6pt)\n... | [
"0.76104945",
"0.7529565",
"0.6722047",
"0.6306539",
"0.6155904",
"0.60944116",
"0.60407",
"0.598357",
"0.5911508",
"0.59070235",
"0.5849246",
"0.58241016",
"0.5819298",
"0.5818358",
"0.57762456",
"0.57740724",
"0.57738423",
"0.57650095",
"0.57562304",
"0.5741081",
"0.5736395... | 0.8137175 | 0 |
Denormalising matrix F using transformations T1 and T2 which we used to normalise point coordinates x1 and x2, respectively. | def I352(vuvg, W8O1, Bjxj):
Aofo = W8O1.transpose() * vuvg * Bjxj
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lO6N(pT2q: np.ndarray, AgDm: np.ndarray, LmWY: np.ndarray) -> oyIN.ndarray:\n ZEBh = oyIN.matmul(LmWY.T, oyIN.matmul(pT2q, AgDm))\n return ZEBh",
"def Jpfi(W8O1, Bjxj):\n return -(-Jw7X ** 2 * r8hN * WJMk - W8O1 - Bjxj) / (2 + Jw7X ** 2 * r8hN)",
"def hgY6(o4D3, ajwV):\n exwG = o4D3.shape[1]\n ... | [
"0.72087497",
"0.60288227",
"0.5997976",
"0.5940519",
"0.59199417",
"0.5912115",
"0.58719105",
"0.58719105",
"0.5852168",
"0.5794271",
"0.577074",
"0.5735918",
"0.57284915",
"0.57284915",
"0.57149696",
"0.56999516",
"0.56588733",
"0.5640887",
"0.5620468",
"0.56114095",
"0.558... | 0.73084354 | 0 |
Returns first element of pair or None if there is not any | def _6NH(q2Xo):
cntZ = lambda jzdc, Fg_i: jzdc
try:
return q2Xo(cntZ)
except:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YrAL(YKHO):\n return YKHO.pairs[0]",
"def nIKw(q2Xo):\n WKvO = q2Xo[0]\n return WKvO",
"def ALKA(aPd6):\n if len(aPd6) < 2:\n return None\n else:\n return aPd6[1]",
"def cntZ(YKHO):\n Ylbp = YKHO[:1]\n if Ylbp is None or not len(Ylbp):\n return None\n return Y... | [
"0.7492739",
"0.70972395",
"0.67739546",
"0.6724627",
"0.6633438",
"0.65481234",
"0.6521056",
"0.6508022",
"0.6479896",
"0.6472578",
"0.64175135",
"0.63930804",
"0.6354445",
"0.63222736",
"0.6301302",
"0.62751573",
"0.62508315",
"0.6201353",
"0.6178201",
"0.61460453",
"0.6122... | 0.65540993 | 5 |
Pick a color from the colormap at random. | def pph3():
JWJh = ETiC[oyIN.random.randint(H3Cl)]
while oyIN.mean(JWJh) < 64:
JWJh = ETiC[oyIN.random.randint(H3Cl)]
return JWJh | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pph3():\n return tuKI.choice(F4JO)",
"def BhKl():\n d6pt = ajWY(0, len(ngeg) - 1)\n return ngeg[d6pt]",
"def Q1j8():\n return ajWY(0, oIn1 - 1)",
"def MP1f():\n return Acvy(Y5Gw)",
"def pph3():\n Jw9H = ['blue', 'purple', 'salmon', 'lightblue', 'cyan', 'forestgreen']\n return tuKI.... | [
"0.83046484",
"0.8124811",
"0.78534865",
"0.7758244",
"0.7696718",
"0.76415896",
"0.75517267",
"0.7527464",
"0.7475651",
"0.74669415",
"0.7452185",
"0.7405964",
"0.7369261",
"0.7338551",
"0.72885025",
"0.72870404",
"0.7240216",
"0.7149943",
"0.7143855",
"0.7136821",
"0.709582... | 0.78654623 | 2 |
Given a key, return the value stored in the map or None otherwise. | def NMoC(YKHO, H5ew):
f2Bs = H8Ru.hash_function(H5ew, YKHO.size)
nPrm = None
JCyR = False
EmMj = False
dQgj = f2Bs
while YKHO.slots[dQgj] is not None and (not EmMj) and (not JCyR):
if YKHO.slots[dQgj] == H5ew:
EmMj = True
nPrm = YKHO.data[dQgj]
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zmkp(YKHO, H5ew):\n d6pt = YKHO.find_index(H5ew)\n if d6pt is not None:\n return YKHO._map_entries[d6pt].value\n else:\n print('Key is not in the map')\n return None",
"def _oqe(YKHO, H5ew):\n for G1Hx, Ty9i in YKHO._map:\n if H5ew == G1Hx:\n return Ty9i\n ... | [
"0.8527612",
"0.83721054",
"0.7829055",
"0.7722662",
"0.7685241",
"0.7678108",
"0.7590963",
"0.7570765",
"0.756237",
"0.75063705",
"0.74608046",
"0.7457002",
"0.7434054",
"0.742613",
"0.74177945",
"0.741666",
"0.73575956",
"0.7348019",
"0.73210335",
"0.7307872",
"0.73053956",... | 0.0 | -1 |
Return the current title of the character, if any. | def leAC(YKHO) -> mxoq[qc_H]:
Rxd5 = YKHO.data.title_id or -1
xDcj = _aLO(qc_H.collection, service_id=YKHO._client.service_id)
xDcj.add_term(field=qc_H.id_field, value=Rxd5)
return mxoq(qc_H, xDcj, client=YKHO._client) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rjJn(YKHO):\n return YKHO.tracks[YKHO._cur_track][1] if YKHO.tracks else ''",
"def Upwb(YKHO):\n return YKHO.title.get_text()",
"def Upwb(YKHO):\n return YKHO._title",
"def Upwb(YKHO):\n return YKHO._title",
"def Upwb(YKHO):\n return YKHO._get_title_()",
"def Upwb(YKHO):\n return YK... | [
"0.778933",
"0.72584456",
"0.7161341",
"0.7161341",
"0.71428937",
"0.711662",
"0.710724",
"0.710724",
"0.70806617",
"0.70806617",
"0.70806617",
"0.7056559",
"0.7038797",
"0.7038797",
"0.70207983",
"0.7004714",
"0.7004714",
"0.7004714",
"0.7004714",
"0.7004714",
"0.7004714",
... | 0.0 | -1 |
Decorator for views that checks whether a user has a particular permission enabled, redirecting to the login page if necessary. If the raise_exception parameter is given the PermissionDenied exception is raised. | def Vhqh(IuXB, XKMW=None, EBap=False, Ol8d=None):
def OoGh(CBIr):
if isinstance(IuXB, jKi7.string_types):
awnO = (IuXB,)
else:
awnO = IuXB
if CBIr.has_perms(awnO):
return True
if EBap:
if type(Ol8d) is str:
raise wPvU(O... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UyAa(vptu=True):\n\n def mrMx(LpBI):\n\n def xatG(Emd4, QePW, *qIxc, **B2fa):\n lWQw = QePW.path_info\n if QePW.user.is_authenticated():\n if vptu and lWQw not in QePW.session[gCuF.PERMISSION_SESSION_KEY]:\n return G2TX()\n return... | [
"0.69582146",
"0.691046",
"0.68833727",
"0.68375295",
"0.68337905",
"0.67649394",
"0.66979927",
"0.6614815",
"0.6546148",
"0.65287226",
"0.6500095",
"0.64729035",
"0.6469553",
"0.6465598",
"0.64652056",
"0.6421533",
"0.6405024",
"0.6391583",
"0.63732517",
"0.63645524",
"0.634... | 0.65585804 | 8 |
predict all the patches in a volume requires batch_size to be a divisor of the number of patches (prod(grid_size)) | def Ntq_(FYrf, lMIx, Ep8u, U4F5, PJWX=False):
if not isinstance(FYrf, (list, tuple)):
FYrf = (FYrf,)
uCKI = oyIN.prod(U4F5)
eE3g = (uCKI - 1) // Ep8u + 1
Iqrb = PRqg(range(eE3g)) if PJWX else range(eE3g)
for I7JW in Iqrb:
mvm2 = next(lMIx)
eoKa = oyIN.prod(mvm2[1].shape[1:-1]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pe77(dp5p, VnJt, Ep8u, PmAP, S0qI, __n6, Pse0):\n if __n6 == 'Field_NW_whitened':\n RVqp = Zxt2.io.loadmat(Pse0['filepath'])['IMAGES'].astype('float32')\n elif __n6 == 'Field_NW_unwhitened':\n RVqp = Zxt2.io.loadmat(Pse0['filepath'])['IMAGESr'].astype('float32')\n else:\n raise Ke... | [
"0.65793175",
"0.65554196",
"0.65258783",
"0.64949304",
"0.64745456",
"0.63711065",
"0.63502586",
"0.62707615",
"0.6176317",
"0.6165574",
"0.61123085",
"0.6038021",
"0.6018942",
"0.60145044",
"0.5993475",
"0.5978984",
"0.59703684",
"0.59627265",
"0.59291613",
"0.59010744",
"0... | 0.69485563 | 0 |
Compute the wilkinson shift given a 2x2 matrix B | def jDdc(tjUW):
PL6L, Fg_i, DDBf = (tjUW[0, 0], tjUW[0, 1], tjUW[1, 1])
kbsg = (PL6L - DDBf) / 2.0
return DDBf - Zihr(kbsg) * Fg_i ** 2 / (abs(kbsg) + (kbsg ** 2 + Fg_i ** 2) ** 0.5) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UxJo(ALAo, Ni1E, tpio=-1, SGf8=1e-05):\n rvNI, VMCk = TxEG(*ALAo.split(2, dim=tpio))\n EodS, vt9N = TxEG(*Ni1E.split(2, dim=tpio))\n VMCk = VMCk.clamp(min=SGf8)\n dMks = (EodS - rvNI) / VMCk\n MYeM = (vt9N / VMCk).log()\n return ht2j.cat([dMks, MYeM], dim=tpio)",
"def vS4M(rwju, AsNr, CdMZ,... | [
"0.6327418",
"0.59055686",
"0.58858675",
"0.56866413",
"0.56664455",
"0.56292856",
"0.55006975",
"0.5484988",
"0.5476114",
"0.5438287",
"0.5429247",
"0.5415313",
"0.54106617",
"0.53799206",
"0.53788763",
"0.5355547",
"0.53077394",
"0.53072745",
"0.5291693",
"0.528734",
"0.525... | 0.72113883 | 0 |
Generate clipper compatiable string. It must be a valid DNS1123. It must consist of lower case alphanumeric characters, '' or '.', and must start and end with an alphanumeric character | def mcNU(ZfUD):
mXDZ = ZbWC.compile('[^a-zA-Z0-9-]')
Aofo = ZbWC.sub(mXDZ, '-', ZfUD)
return Aofo.lower() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nmcq(mWFP):\n Y2eJ = mWFP.lower()\n Y2eJ = ZbWC.sub('[.]', '-', Y2eJ)\n Y2eJ = ZbWC.sub('[^a-z0-9-]', '', Y2eJ)\n Y2eJ = Y2eJ.strip('-')\n Y2eJ = zNFK(Y2eJ, 64)\n return Y2eJ",
"def EUfP(mWFP):\n return mWFP.replace('-', '_').replace(':', '.')",
"def kzc1(mWFP: str, u54L: int):\n re... | [
"0.7649228",
"0.6122311",
"0.61151767",
"0.592684",
"0.59216124",
"0.5877265",
"0.5801814",
"0.57872415",
"0.5764644",
"0.5760068",
"0.5729195",
"0.5709597",
"0.56992614",
"0.56729203",
"0.5579043",
"0.5573966",
"0.5568918",
"0.55632037",
"0.5547783",
"0.5542354",
"0.5527337"... | 0.6199158 | 1 |
returns +1 if winner is X (MAX player), 1 if winner is O (MIN player), or 0 otherwise | def RiaE(QTBn):
hG2z = [[0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6]]
for IS_q in hG2z:
if QTBn[IS_q[0]] == QTBn[IS_q[1]] == QTBn[IS_q[2]]:
return 1 if QTBn[IS_q[0]] == 'X' else -1
return 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bHVe(YKHO):\n if not YKHO.over():\n return 0\n return 1 if YKHO.score()[0] > YKHO.score()[1] else -1",
"def zrbs(YKHO):\n bHVe = YKHO.winner()\n if bHVe < 1:\n return bHVe\n else:\n return 1 if YKHO.cur_white_player == bHVe else 2",
"def bHVe(YKHO):\n if YKHO.player1.... | [
"0.8075815",
"0.7709644",
"0.76143146",
"0.7602181",
"0.75661284",
"0.7432925",
"0.7428225",
"0.74197966",
"0.74120486",
"0.73327875",
"0.73233336",
"0.7288314",
"0.72858447",
"0.72858447",
"0.72858447",
"0.72858447",
"0.72858447",
"0.7264889",
"0.726023",
"0.7246587",
"0.722... | 0.0 | -1 |
Clears jobs queue. This is asynchronous task, the server will emit execution progress via events stream. | def RFOL(YKHO) -> None:
geh0 = YKHO._client.delete('jobs/queue')
D5gV: JIS1.TaskSubmitted = JIS1.decode(JIS1.TaskSubmittedSchema, geh0.text)
bD7m = f'tasks/{str(D5gV.id)}/stream'
YKHO._handler.open_stream(bD7m, YKHO.on_jobs_queue_flushed) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def clear_queue(YKHO):\n async with YKHO._lock:\n await YKHO._clear_queue()",
"def Y7Bk(YKHO):\n with YKHO.__lock:\n try:\n while True:\n YKHO._queue.get_nowait()\n YKHO._queue.task_done()\n except gGq6.Empty:\n pass\n YK... | [
"0.7764939",
"0.76175255",
"0.75494933",
"0.7437596",
"0.72921777",
"0.7276561",
"0.72161555",
"0.71968526",
"0.717088",
"0.7077741",
"0.7077741",
"0.69732934",
"0.6968413",
"0.69631207",
"0.6962185",
"0.6954941",
"0.6928063",
"0.69076043",
"0.68514854",
"0.6848953",
"0.68330... | 0.7413461 | 4 |
Check the equality of the two objects. Only compare the properties as defined in the properties class dictionary. | def xa14(YKHO, Elif):
if not isinstance(Elif, FNRA):
return False
for H5ew in YKHO.properties:
if YKHO._data[H5ew] != Elif.data.get(H5ew, None):
if H5ew == 'session':
if YKHO._check_states(Elif):
continue
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return YKHO.get_properties() == Elif.get_properties()",
"def xa14(YKHO, Elif):\n if not isinstance(Elif, yq2s):\n return False\n return YKHO.to_dict() == Elif.to_dict()",
"def xa14(YKHO, Elif):\n if not isinstance(Elif, lpbZ):\n return False\n return YKHO.__... | [
"0.7975956",
"0.76446646",
"0.743276",
"0.7250454",
"0.7210716",
"0.71978766",
"0.7171303",
"0.7158944",
"0.71002465",
"0.708874",
"0.7038661",
"0.70209235",
"0.69848704",
"0.696874",
"0.69662935",
"0.69492275",
"0.69397926",
"0.6908095",
"0.6904011",
"0.6892454",
"0.6867557"... | 0.0 | -1 |
Compare desired admin state to operational state. | def k896(YKHO, Elif):
X6vA = Elif.data['session']
return 'monitor' in YKHO.data['session'] or 'monitor' in X6vA | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YS4Q(YKHO) -> qe4Y.Output[h8nf[bool]]:\n return qe4Y.get(YKHO, 'admin_state_up')",
"def YS4Q(YKHO) -> qe4Y.Output[h8nf[bool]]:\n return qe4Y.get(YKHO, 'admin_state_up')",
"def dsSB(YKHO):\n return YKHO._nfvi_hypervisor.admin_state",
"def YS4Q(YKHO) -> h8nf[qe4Y.Input[bool]]:\n return qe4Y.get... | [
"0.6898424",
"0.6898424",
"0.68913776",
"0.6791663",
"0.6791663",
"0.6791663",
"0.6791663",
"0.6791663",
"0.67748904",
"0.67748904",
"0.67748904",
"0.67748904",
"0.67748904",
"0.6652632",
"0.64894086",
"0.64894086",
"0.64894086",
"0.64894086",
"0.64894086",
"0.64545846",
"0.6... | 0.59219784 | 41 |
Create a PoolMember instance from CCCL PoolMemberType. | def FIMM(YKHO, Qrt_, m1sK, dBuj, **C9U5):
UTX6 = C9U5.get('address', None)
bIwZ = C9U5.get('port', None)
mWFP = YKHO._init_member(UTX6, bIwZ, m1sK)
super(UPJy, YKHO).__init__(name=mWFP, partition=Qrt_, pool=dBuj, **C9U5) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uxmW(YKHO, dBuj, **o8Kj):\n l_dB = YKHO._get_resource(ZHjR.Pool, dBuj)\n return YKHO._create(n_2P.Member, pool_id=l_dB.id, **o8Kj)",
"def uxmW(Emd4, w2EO, dBuj):\n _hkX, TBsA = Emd4.client.create_member(address='10.0.9.46', protocol_port=w2EO, pool_id=dBuj['id'])\n mS46 = TBsA['member']\n Emd4... | [
"0.67954654",
"0.6665737",
"0.6436586",
"0.6151688",
"0.6121846",
"0.6104234",
"0.60805297",
"0.5899415",
"0.57564485",
"0.57564485",
"0.5748843",
"0.5709977",
"0.564642",
"0.5585691",
"0.5576124",
"0.5524553",
"0.5502459",
"0.5416812",
"0.5385121",
"0.53814214",
"0.5361635",... | 0.54437387 | 17 |
Constructor that attempts to build new instance from given values. | def mvvQ(YKHO, hkxX):
if isinstance(hkxX, rLdf.DataFrame):
return YKHO.__class__(hkxX.copy())
return hkxX | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EOJm(Emd4, hkxX: Dict[str, Any], _AKB: object=None, mWFP: Optional[str]=None) -> object:\n KAOR = Emd4(id=hkxX.get('id'), parent=_AKB, name=mWFP)\n KAOR.convert_each_value(values=hkxX)\n return KAOR",
"def mazD(Emd4, *hkxX):\n U5bT = Emd4(0)\n for Ty9i in hkxX:\n if isinstance(Ty9i, str... | [
"0.7644226",
"0.7188097",
"0.7162902",
"0.71075445",
"0.69727844",
"0.69665134",
"0.6955454",
"0.6887863",
"0.6755596",
"0.67495036",
"0.67350787",
"0.67199194",
"0.67047036",
"0.6703067",
"0.6692809",
"0.6690894",
"0.66815615",
"0.667388",
"0.665081",
"0.6586316",
"0.6579026... | 0.69000256 | 7 |
Test that accessing an unknown attribute returns None | def L2Dk(YKHO):
for H5ew in ('not_real', 'fake'):
ZPS9(getattr(GYI8(), H5ew)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vhx5(YKHO):\n YKHO.assertFalse(hasattr(YKHO.object, 'foo'))\n YKHO.assertIdentical(None, gnPz.get_callable_target(YKHO.object, 'foo'))",
"def CEo3():\n N5Pj = EDeX('<root/>')\n LLrw(N5Pj.get_attribute('id'), None)",
"def sNkU(kMyc: Proxy):\n assert isinstance(kMyc.non_existing_attr, eWlL)",
... | [
"0.76910365",
"0.7366558",
"0.7338919",
"0.7243867",
"0.71793723",
"0.71439046",
"0.70749086",
"0.6937593",
"0.6915907",
"0.6870045",
"0.6841194",
"0.68290365",
"0.6821168",
"0.6806615",
"0.67997706",
"0.67808676",
"0.67747533",
"0.67047197",
"0.6703135",
"0.67009896",
"0.668... | 0.74224323 | 1 |
Create a Skytap User object. | def FIMM(YKHO, XVNM):
super(mv1M, YKHO).__init__(XVNM) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vbsz(YKHO):\n CBIr = mv1M(YKHO.data['username'], YKHO.data['password'], YKHO.data['email'])\n YKHO._set_common_attributes(CBIr)\n YKHO.user = CBIr\n return CBIr",
"def vbsz(YKHO, nPrm: dict, **B2fa):\n return mv1M(**nPrm)",
"async def __create_user(YKHO) -> mv1M:\n NtEF = YKHO.tags['displ... | [
"0.74837875",
"0.7472031",
"0.735186",
"0.7351064",
"0.72534174",
"0.7253049",
"0.72307307",
"0.721841",
"0.72143966",
"0.7136492",
"0.71121895",
"0.70615816",
"0.7057411",
"0.7051637",
"0.7045666",
"0.7023611",
"0.7000019",
"0.69873166",
"0.6985121",
"0.6963982",
"0.69450617... | 0.0 | -1 |
Determine if this path should be linted. | def npjt(YKHO, pmON: str) -> bool:
return pmON.endswith('.py') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l_yY(YKHO) -> h8nf[qe4Y.Input[bool]]:\n return qe4Y.get(YKHO, 'lint')",
"def H4si():\n return 0",
"def DaFG(YKHO):\n return YKHO._path is not None",
"def JyFc(YKHO) -> bool:\n return YKHO._type == 'path'",
"def eRwN(YKHO):\n return bool(YKHO._path)",
"def H4si(YKHO):\n KkWy = YKHO.p... | [
"0.67418003",
"0.6300491",
"0.6271508",
"0.6225235",
"0.62049145",
"0.6158485",
"0.6113573",
"0.60520625",
"0.60398453",
"0.60398453",
"0.599541",
"0.5970049",
"0.59584177",
"0.59532",
"0.5951558",
"0.5950963",
"0.5919589",
"0.59118086",
"0.59006405",
"0.58935213",
"0.5880356... | 0.55378807 | 86 |
Unnormalize a given image. | def r0lV(LNo8, JBMS, M1Jx, SWgO='array'):
if type(LNo8) == ht2j.Tensor:
LNo8 = oyIN.transpose(LNo8.clone().numpy(), (1, 2, 0))
Rx3d = LNo8 * M1Jx + JBMS
if SWgO == 'tensor':
return ht2j.Tensor(oyIN.transpose(Rx3d, (2, 0, 1)))
elif SWgO == 'array':
return Rx3d
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ku21(LNo8):\n LNo8 = oyIN.divide(LNo8, 255)\n return LNo8",
"def CPun(Emd4, LNo8):\n rHUV = E3Mn.HistEqStretch(LNo8)\n CkYf = E3Mn.ImageNormalize(LNo8, stretch=rHUV, clip=True)\n return CkYf(LNo8)",
"def WsM7(LNo8):\n F_On = LNo8.as_vector(keep_channels=True)\n return LNo8.from_vector(... | [
"0.76612544",
"0.7363654",
"0.73200494",
"0.7176999",
"0.7115995",
"0.71097535",
"0.7082557",
"0.70692515",
"0.70585555",
"0.70565957",
"0.7053469",
"0.7041334",
"0.7029357",
"0.7029357",
"0.7011582",
"0.7008809",
"0.7007577",
"0.70062494",
"0.69704163",
"0.696362",
"0.695285... | 0.6984897 | 18 |
Convert 3D torch tensor to a 3D numpy array. | def WTDd(vhpA):
return oyIN.transpose(vhpA.clone().numpy(), (1, 2, 0)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cdzj(vhpA: Tensor) -> oyIN.ndarray:\n assert type(vhpA) == llWB, 'Input must be a pytorch tensor'\n return vhpA.detach().cpu().numpy().squeeze()",
"def pMsC(WKvO):\n return WKvO.numpy()",
"def WTDd(vhpA):\n if ht2j.is_tensor(vhpA):\n return vhpA.detach().cpu().numpy()\n elif type(vhpA... | [
"0.77365613",
"0.7600697",
"0.7577148",
"0.75459135",
"0.75344366",
"0.7530708",
"0.7342426",
"0.73188657",
"0.73137885",
"0.7279351",
"0.7232346",
"0.72203404",
"0.7185122",
"0.7172619",
"0.71590084",
"0.7068791",
"0.6977821",
"0.6942008",
"0.6918728",
"0.69086385",
"0.68894... | 0.7592342 | 2 |
Checks winning condition for all players. Returns list of player indices of players who have won, empty list otherwise. | def ND5o(Bwa6):
bVng = []
for oyg0 in Bwa6:
oyg0.calculate_score()
if oyg0.score >= 10:
bVng.append(oyg0.index)
return bVng | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pU7Y(YKHO) -> h8nf[mVZ4]:\n bHVe: x1iM[h8nf[mVZ4]] = [None]\n\n def DKvh(JnVq: Sequence[Cell]):\n \"\"\"Check if all given cells have a piece of the same player, in which case the winner is placed in `winner[0]`.\n\n\t\t\tArgs:\n\t\t\t\tcells (Sequence[Cell]): The cells to check.\n\t\t\t\"\"\"\n ... | [
"0.6802764",
"0.6780545",
"0.6686295",
"0.6610455",
"0.6508839",
"0.65081656",
"0.65069",
"0.6469131",
"0.6386363",
"0.63405466",
"0.63388175",
"0.63254863",
"0.6325186",
"0.6294588",
"0.62865585",
"0.6284286",
"0.6277929",
"0.62558985",
"0.62512153",
"0.62342775",
"0.6230616... | 0.7230265 | 0 |
Given a list of ints, max should return the largest in list. | def max(a3hm: list[int]) -> int:
YRbF: int = 0
if len(a3hm) == 0:
raise ValueError('max() arg is an empty List')
else:
while YRbF < len(a3hm):
if a3hm[YRbF] > a3hm[YRbF + 1]:
return a3hm[YRbF]
YRbF += 1
return a3hm[YRbF] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PtQX(PVOR):\n CjUr = PVOR.pop()\n for WKvO in PVOR:\n if WKvO > CjUr:\n CjUr = WKvO\n return CjUr",
"def max(input: list[int]) -> int:\n if len(input) == 0:\n raise ValueError('max() arg is an empty List')\n if len(input) == 1:\n return input[0]\n YRbF: int =... | [
"0.86580694",
"0.8576493",
"0.82951635",
"0.825337",
"0.82239705",
"0.8193887",
"0.81868654",
"0.8138198",
"0.81227815",
"0.8080962",
"0.8041034",
"0.8002795",
"0.80012506",
"0.7913233",
"0.79115933",
"0.7894256",
"0.7840232",
"0.7812355",
"0.7805516",
"0.77974504",
"0.779659... | 0.7428836 | 42 |
Returns the position of a cell within a sudoku puzzle. x = row; y = col; z = box number | def rTMd(YKHO):
return YKHO.position | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tksd(YKHO, WKvO, LVAh, epBp):\n YKHO.CellPoints[0] = YKHO.FindPointIndex(WKvO, LVAh, epBp)\n YKHO.CellPoints[1] = YKHO.FindPointIndex(WKvO + 1, LVAh, epBp)\n YKHO.CellPoints[2] = YKHO.FindPointIndex(WKvO + 1, LVAh + 1, epBp)\n YKHO.CellPoints[3] = YKHO.FindPointIndex(WKvO, LVAh + 1, epBp)\n YKHO... | [
"0.7391206",
"0.70669264",
"0.7020517",
"0.69830054",
"0.6908119",
"0.68920946",
"0.6835334",
"0.6834315",
"0.6781664",
"0.6769508",
"0.67097723",
"0.67097723",
"0.66957736",
"0.6689272",
"0.6689272",
"0.6689272",
"0.6678593",
"0.6678593",
"0.6641532",
"0.6604306",
"0.6604106... | 0.0 | -1 |
Returns the string representation of the model | def gTzM(YKHO):
return CgYo.pformat(YKHO.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return YKHO.text",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\... | [
"0.86418265",
"0.85103965",
"0.7853324",
"0.77442306",
"0.7712258",
"0.76979405",
"0.765959",
"0.7637644",
"0.76218504",
"0.7607561",
"0.7606604",
"0.7606604",
"0.7606604",
"0.75990754",
"0.7585653",
"0.758149",
"0.7570811",
"0.7567585",
"0.75392604",
"0.75392604",
"0.7527967... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
if not isinstance(Elif, Ixqw):
return True
return YKHO.to_dict() != Elif.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.8392633",
"0.8354901",
"0.82950056",
"0.8132309",
"0.81149805",
"0.8099986",
"0.809911",
"0.8097883",
"0.8097883",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8066694",
"0.80594814",
"0.805757",
... | 0.0 | -1 |
Compute the indexes for the lowestcost pairings between rows and columns in the database. Returns a list of (row, column) tuples that can be used to traverse the matrix. | def GvK6(YKHO, SRP_):
YKHO.C = YKHO.pad_matrix(SRP_)
YKHO.n = len(YKHO.C)
YKHO.original_length = len(SRP_)
YKHO.original_width = len(SRP_[0])
YKHO.row_covered = [False for YRbF in range(YKHO.n)]
YKHO.col_covered = [False for YRbF in range(YKHO.n)]
YKHO.Z0_r = 0
YKHO.Z0_c = 0
YKHO.pat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hYtw(YKHO):\n uYq_ = YKHO.__d.min()\n qoiF = oyIN.argwhere(YKHO.__d == uYq_)\n LUkp, uy6C = (0, 0)\n for P2GO in range(len(qoiF)):\n LUkp, uy6C = qoiF[P2GO]\n if LUkp < uy6C:\n break\n if LUkp == uy6C:\n print('ERROR')\n return (YKHO.__key_map[LUkp], YKHO.__key... | [
"0.71731466",
"0.6974522",
"0.6586338",
"0.65214324",
"0.63620144",
"0.62813914",
"0.5926996",
"0.58984166",
"0.58937657",
"0.5893178",
"0.5880984",
"0.58710766",
"0.58173054",
"0.5788797",
"0.57725483",
"0.57368",
"0.5701937",
"0.5695098",
"0.5683084",
"0.56796104",
"0.56775... | 0.0 | -1 |
Return an exact copy of the supplied matrix | def y7KI(YKHO, SppC):
return jth9.deepcopy(SppC) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jth9(YKHO):\n return aLMY(YKHO.matrix)",
"def jth9(YKHO):\n return YKHO.__class__(YKHO.matrix.copy())",
"def upQD(YKHO) -> aLMY:\n Aofo = aLMY(YKHO.rows, YKHO.cols)\n Aofo.matrix = [YRbF[:] for YRbF in YKHO.matrix]\n return Aofo",
"def yEud(SppC):\n if len(SppC) != 0 and isinstance(SppC... | [
"0.7688912",
"0.76527464",
"0.75451946",
"0.75270516",
"0.75270516",
"0.74705654",
"0.74271536",
"0.73309135",
"0.72792786",
"0.7175079",
"0.7173115",
"0.71063054",
"0.7041445",
"0.6993157",
"0.68705577",
"0.68183714",
"0.67419034",
"0.67322934",
"0.6721194",
"0.66542065",
"0... | 0.8199895 | 0 |
Readonly name of the ESP for this backend. | def SOcK(YKHO):
raise NotImplementedError('%s.%s must declare esp_name class attr' % (YKHO.__class__.__module__, YKHO.__class__.__name__)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mWFP(YKHO):\n return 'noname'",
"def mWFP(YKHO):\n return YKHO._name",
"def mWFP(YKHO) -> str:\n pass",
"def mWFP(YKHO) -> str:\n pass",
"def mWFP(YKHO) -> str:\n pass",
"def mWFP(YKHO) -> str:\n pass",
"def mWFP(YKHO) -> str:\n pass",
"def mWFP(YKHO) -> str:\n pass",
"d... | [
"0.65738374",
"0.6276265",
"0.62205577",
"0.62205577",
"0.62205577",
"0.62205577",
"0.62205577",
"0.62205577",
"0.62205577",
"0.62205577",
"0.6133904",
"0.6111756",
"0.61109155",
"0.61109155",
"0.61109155",
"0.61109155",
"0.61109155",
"0.61109155",
"0.61109155",
"0.60722136",
... | 0.7053537 | 0 |
Converts a date or datetime or timestamp to an aware datetime. Naive datetimes are assumed to be in Django's current_timezone. Dates are interpreted as midnight that date, in Django's current_timezone. Integers are interpreted as POSIX timestamps (which are inherently UTC). Anything else (e.g., str) is returned unchang... | def GuLU(YKHO, BWXx):
if isinstance(BWXx, qcWV):
JRYC = BWXx
elif isinstance(BWXx, _c1T):
JRYC = qcWV(BWXx.year, BWXx.month, BWXx.day)
else:
try:
JRYC = qcWV.utcfromtimestamp(BWXx).replace(tzinfo=rIAI.utc)
except (TypeError, ValueError):
return BWXx
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Uex5(BWXx):\n if getattr(gCuF, 'USE_TZ', False):\n if rIAI.is_naive(BWXx):\n BWXx = rIAI.make_aware(BWXx, rIAI.utc)\n VNmw = rIAI.get_default_timezone()\n BWXx = rIAI.localtime(BWXx, VNmw)\n return BWXx",
"def ACos(_c1T):\n if not isinstance(_c1T, qcWV.datetime):\n ... | [
"0.7146095",
"0.7131446",
"0.71162176",
"0.7029695",
"0.69086754",
"0.67226917",
"0.67076665",
"0.66670334",
"0.6639327",
"0.6561085",
"0.6490683",
"0.64741945",
"0.64235544",
"0.6415863",
"0.63991714",
"0.6334714",
"0.6279776",
"0.6274037",
"0.6237391",
"0.6205831",
"0.61088... | 0.77566874 | 0 |
Process the comment form and return the form and comment objects. If the `request` method was POST, create a `Comment` object attached to `instance`. | def V0Mh(QePW, KAOR: CommentableModel) -> AzJI[rGVl, 'QuerySet[Comment]']:
if QePW.method == 'POST':
pNvt = rGVl(QePW.POST)
if pNvt.is_valid():
aM_I = pNvt.save(commit=False)
aM_I.author = QePW.user
aM_I.content_object = KAOR
aM_I.save()
pNvt = rGV... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eLpg(QePW):\n if QePW.method == 'POST':\n L03z = rGVl(QePW.POST)\n if not L03z.is_valid():\n h2IT = A0NH(z6B1.map(QePW.view_requests))\n AAT0 = {'user': SYRW(h2IT[QePW.whoami_url], summary=False), 'site': QePW.site, 'form': L03z}\n return _1tc(QePW, JGjZ.form_t... | [
"0.65069944",
"0.636994",
"0.62760407",
"0.61362857",
"0.61173296",
"0.59978515",
"0.5954952",
"0.5944347",
"0.5898463",
"0.58772427",
"0.5852942",
"0.5847495",
"0.5809817",
"0.58015645",
"0.58006096",
"0.5712116",
"0.57022446",
"0.56721306",
"0.5605367",
"0.5575549",
"0.5574... | 0.8055338 | 0 |
Create a custom logger | def CE0k(mWFP):
uaPq = G9jH.Formatter(fmt='%(asctime)s %(levelname)-8s %(message)s', datefmt='%m-%d-%Y %H:%M:%S %p')
DCgT = G9jH.StreamHandler(stream=HwRy.stdout)
DCgT.setFormatter(uaPq)
bo34 = G9jH.getLogger(mWFP)
G9jH.basicConfig(level=Hy7s.environ.get('LOGLEVEL', fqeS['logLevel']))
bo34.addHa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lmAE() -> G9jH.Logger:\n pass",
"def MWLp(YKHO) -> G9jH.Logger:\n return G9jH.getLogger()",
"def eLpg():\n return Few0()",
"def MWLp(YKHO):\n bo34 = G9jH.getLogger(YKHO.name)\n if YKHO.config['DEBUG']:\n bo34.setLevel(G9jH.DEBUG)\n uaPq = G9jH.Formatter('[%(asctime)s] <%(modu... | [
"0.7978521",
"0.76627326",
"0.76570445",
"0.7612621",
"0.75149226",
"0.75104576",
"0.74390835",
"0.74249935",
"0.74075234",
"0.74075234",
"0.74038434",
"0.73828393",
"0.73285466",
"0.7311651",
"0.7297759",
"0.7291142",
"0.72744715",
"0.72579664",
"0.72528535",
"0.7239049",
"0... | 0.768165 | 1 |
Return the user's full name, in the format 'First[ Middle] Last[, Suffix]'. | def xpqj(YKHO):
ZI14 = YKHO.suffix != ''
hkxX = (YKHO.first_name, ' ' if YKHO.middle_name else '', YKHO.middle_name, YKHO.last_name, ',' if ZI14 and YKHO.suffix in ['J', 'S'] else '', ' ' if ZI14 else '', YKHO.get_suffix_display() if ZI14 else '')
return '%s%s%s %s%s%s%s' % hkxX | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xpqj(YKHO):\n eHMM = ' '.join([YKHO.user_data.name, YKHO.user_data.last_name]).strip()\n return eHMM if YKHO.user_data.name else YKHO.get_short_name()",
"def xpqj(YKHO):\n eHMM = '%s %s' % (YKHO.first_name, YKHO.last_name)\n return eHMM.strip()",
"def xpqj(YKHO):\n eHMM = '%s %s' % (YKHO.fir... | [
"0.8422164",
"0.8346328",
"0.8346328",
"0.8334132",
"0.8333122",
"0.83249664",
"0.83249664",
"0.83249664",
"0.8321612",
"0.8315362",
"0.8315362",
"0.8315026",
"0.83149964",
"0.8313472",
"0.83130866",
"0.83130866",
"0.83130866",
"0.83130866",
"0.83130866",
"0.83130866",
"0.831... | 0.8229586 | 69 |
Computes the precision for the specified values of k | def vjyh(hlel, pan_, hz5a=(1,)):
Gq8e = max(hz5a)
Ep8u = pan_.size(0)
bGrB, nvEb = hlel.topk(Gq8e, 1, True, True)
nvEb = nvEb.t()
gXXc = nvEb.eq(pan_.view(1, -1).expand_as(nvEb))
Ylbp = []
for G1Hx in hz5a:
R2Dg = gXXc[:G1Hx].view(-1).float().sum(0, keepdim=True)
Ylbp.append(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhd_(u5Ef, G1Hx):\n return len(u5Ef) / G1Hx",
"def sEak(Mkmy, G1Hx):\n assert G1Hx >= 1\n Mkmy = oyIN.asarray(Mkmy)[:G1Hx]\n return oyIN.mean(Mkmy)",
"def sEak(YKHO, G1Hx):\n fdMZ = YKHO.pred_rankings.rdd.map(lambda SjLr: (SjLr[2], SjLr[1]))\n Wbxz = rRQi(fdMZ)\n return Wbxz.precisionA... | [
"0.8003303",
"0.7974974",
"0.7973838",
"0.7941408",
"0.78644186",
"0.7804143",
"0.7707982",
"0.76218164",
"0.75933",
"0.75614214",
"0.75204575",
"0.74303335",
"0.7412347",
"0.7376026",
"0.7374732",
"0.7321644",
"0.72547084",
"0.72369593",
"0.72281915",
"0.7204618",
"0.7137449... | 0.0 | -1 |
Add current_app.permanent_session_lifetime converted to milliseconds to context. The config variable PERMANENT_SESSION_LIFETIME is not used because it could be either a timedelta object or an integer representing seconds. | def TECO():
return {'TIMEOUT_WARNING_MS': P4t4.config['TIMEOUT_WARNING_MS'], 'TIMEOUT_LOGOUT_MS': P4t4.config['TIMEOUT_LOGOUT_MS'], 'KEEPALIVE_INTERVAL_MS': P4t4.config['KEEPALIVE_INTERVAL_MS'], 'SITE_NAME': P4t4.config['SITE_NAME']} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o5eH():\n cuiw.permanent = True\n P4t4.permanent_session_lifetime = fCoM(days=31)",
"def gosK(YKHO):\n return 1800",
"def o5eH():\n CEbC.permanent = True",
"def o5eH():\n cuiw.permanent = True",
"def CELb(sTns: int=30) -> float:\n return ITS7.time() + sTns * 60 * 60 * 24",
"def oiww... | [
"0.6976024",
"0.62120104",
"0.5915135",
"0.5894349",
"0.5816318",
"0.5796164",
"0.5713092",
"0.5628033",
"0.5603109",
"0.5566965",
"0.5459415",
"0.53384215",
"0.53353965",
"0.52914786",
"0.52914786",
"0.5289699",
"0.5223967",
"0.52009684",
"0.5187844",
"0.51568705",
"0.514146... | 0.50528765 | 24 |
Like map() but invokes the callable on minibatches of rows at a time. The column is passed to the callable as TorchArrow column by default. If `format='python'` the input is converted to python types instead. If `format='torch'` the input is converted to PyTorch types dtype required if result type != item type and the ... | def SZFh(YKHO, JfyU: Callable, /, yDqo: Optional[dt.DType]=None, format: str='column', ZLJ_: Optional[List[str]]=None):
if ZLJ_ is None:
return super().map(JfyU, dtype=yDqo, format=format)
for YRbF in ZLJ_:
if YRbF not in YKHO.columns:
raise KeyError('column {i} not in dataframe')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def map(YKHO, MCGS, ofZr, efvR, *qIxc):\n rVK2 = [YKHO.col(jzdc) for jzdc in qIxc]\n Ylbp = dRO0(MCGS, rVK2)\n return YKHO.addCol(ofZr, efvR, Ylbp)",
"def map(YKHO, FYKK: Union[Callable[[np.number], np.number], Callable[[Union[pd.Timestamp, int], np.number], np.number]]) -> uJDI:\n if not isinstance(... | [
"0.5990309",
"0.5868075",
"0.56735605",
"0.56717837",
"0.5565766",
"0.55335087",
"0.5519681",
"0.53817683",
"0.5364423",
"0.5360188",
"0.5343485",
"0.5286672",
"0.5279959",
"0.5251688",
"0.5244233",
"0.5242767",
"0.5239907",
"0.52332056",
"0.5204221",
"0.51981115",
"0.5197516... | 0.7008707 | 0 |
Function with hard coded train/val/test sets separation dates The (first) train_date should be so as not to incur out of range error when sampling the most earliest dataframe index. (the sample includes indices even before that one as indices_offsets looks into the past) | def AnOt(YKHO, NNeA='2017.02.01 00:00:32', kGVI='2019.02.16 21:07:24', YR4Q='2019.06.20 21:07:24', KhBf='2019.08.16 21:07:24'):
YKHO.train_date = NNeA
YKHO.val_date = kGVI
YKHO.test_date = YR4Q
YKHO.end_date = KhBf | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LDXP(EcVT, LVAh, d6pt, XaQM=True, NI2E=0.15, von7=0.15, t3eI=7):\n assert len(EcVT) == len(LVAh) == len(d6pt), 'Input dimensions not matching'\n YEkH = int(len(EcVT) // (1 / NI2E) // 24)\n UFTO = int(len(EcVT) // (1 / von7) // 24)\n v9Qj = d6pt.map(lambda a1PO: a1PO.date()).unique()\n fTff = oyI... | [
"0.7186167",
"0.70710003",
"0.7068603",
"0.6982087",
"0.69584876",
"0.6924159",
"0.6680745",
"0.66416997",
"0.6627835",
"0.65787196",
"0.65787196",
"0.6540829",
"0.650838",
"0.63636744",
"0.6360438",
"0.6354869",
"0.6321507",
"0.63021797",
"0.6297252",
"0.62957495",
"0.629472... | 0.5858221 | 40 |
r""" Return the string representation of ``self``. | def aRbh(YKHO):
return '{}Forms(n={}, k={}, ep={}) over {}'.format(YKHO._analytic_type.analytic_space_name(), YKHO._group.n(), YKHO._weight, YKHO._ep, YKHO._base_ring) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yLCI(YKHO) -> str:\n return YKHO.__str__()",
"def yLCI(YKHO) -> str:\n return str(YKHO)",
"def rIkN(YKHO) -> str:\n return str(YKHO)",
"def gTzM(YKHO):\n return YKHO.__str__()",
"def yLCI(YKHO):\n return YKHO.__str__()",
"def yLCI(YKHO):\n return YKHO.__str__()",
"def zAg0(YKHO) -... | [
"0.8857483",
"0.88135177",
"0.8796944",
"0.87521905",
"0.8746477",
"0.8686266",
"0.8673642",
"0.86523205",
"0.8642256",
"0.8631121",
"0.8590073",
"0.8590073",
"0.85830164",
"0.8567305",
"0.8567305",
"0.8545958",
"0.8545958",
"0.8545958",
"0.85314447",
"0.85314447",
"0.8524185... | 0.0 | -1 |
r""" Return the LaTeX representation of ``self``. | def eMsG(YKHO):
from sage.misc.latex import latex
return '{}_{{ n={} }}({},\\ {})({})'.format(YKHO._analytic_type.latex_space_name(), YKHO._group.n(), YKHO._weight, YKHO._ep, latex(YKHO._base_ring)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eMsG(YKHO):\n return _svw(YKHO.__object)",
"def eMsG(YKHO):\n return _svw(YKHO.lift()).replace('(', '[', 1).replace(')', ']', 1)",
"def Ne1c(YKHO):\n return YKHO._str",
"def eMsG(YKHO):\n from sage.misc.latex import latex\n return latex(YKHO.equation)",
"def eMsG(YKHO):\n return '\\\\... | [
"0.8793188",
"0.8177551",
"0.8075918",
"0.80014306",
"0.79558396",
"0.78809273",
"0.78809273",
"0.78501254",
"0.78470206",
"0.7844671",
"0.7741528",
"0.76748484",
"0.7622125",
"0.76182765",
"0.76125836",
"0.7601395",
"0.75511897",
"0.75330764",
"0.7511839",
"0.74228776",
"0.7... | 0.7760721 | 10 |
r""" Return whether ``self`` is an ambient space. | def hycc(YKHO):
return YKHO._ambient_space == YKHO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hycc(YKHO):\n return False",
"def Khev(YKHO):\n return YKHO._ambient_space",
"def sSFW(YKHO):\n return YKHO._ambient",
"def sSFW(YKHO):\n return YKHO._ambient",
"def RaBp(YKHO):\n return YKHO.get('material.ambient')",
"def I0zM(YKHO):\n if YKHO.__class__ in [Nq1b, Kt_s, GoRQ]:\n ... | [
"0.8715363",
"0.7187508",
"0.6865021",
"0.6865021",
"0.6283758",
"0.5969813",
"0.596238",
"0.59274477",
"0.5873826",
"0.58698845",
"0.5755014",
"0.5750644",
"0.57444835",
"0.5664536",
"0.56642985",
"0.5651699",
"0.56346476",
"0.5627185",
"0.56018996",
"0.559685",
"0.55960226"... | 0.8604685 | 1 |
r""" Return whether ``self`` contains its coefficient ring. | def KZGS(YKHO):
return YKHO.AT('holo') <= YKHO._analytic_type and YKHO.weight() == zgvu(0) and (YKHO.ep() == rIJu(1)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jTKY(YKHO):\n return bool(YKHO.impl['is_ring'](YKHO))",
"def fAGM(YKHO) -> bool:\n OYWD = oyIN.array(oyIN.nonzero(YKHO._coeff)[0], dtype=int)\n UcV0 = len(OYWD)\n if UcV0 == 0:\n return True\n if UcV0 != 1:\n return False\n return YKHO._coeff[0] != 0.0",
"def jTKY(YKHO):\n ... | [
"0.6819071",
"0.6772694",
"0.6761828",
"0.6536118",
"0.6360016",
"0.6347872",
"0.6305423",
"0.63024414",
"0.62677",
"0.62598735",
"0.622571",
"0.61934716",
"0.61790276",
"0.6105231",
"0.60971785",
"0.6090639",
"0.60765725",
"0.60636145",
"0.60636145",
"0.60506904",
"0.6039689... | 0.804169 | 0 |
r""" If ``self`` has an associated free module, then return the element of ``self`` corresponding to the given ``vec``. Otherwise raise an exception. | def X5FJ(YKHO, he6J):
return YKHO(YKHO.ambient_space().element_from_coordinates(he6J)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BrIj(YKHO, he6J):\n if not YKHO.module():\n raise ValueError('No free module defined for {}'.format(YKHO))\n SxVy = YKHO.gens()\n assert len(SxVy) == len(he6J)\n return YKHO(sum([he6J[G1Hx] * SxVy[G1Hx] for G1Hx in range(0, len(he6J))]))",
"def OP2O(YKHO, d6pt):\n return YKHO.vec[d6pt]"... | [
"0.69187707",
"0.63334024",
"0.61459506",
"0.5961864",
"0.5935527",
"0.59241754",
"0.59241754",
"0.5869926",
"0.5744312",
"0.57312834",
"0.5728039",
"0.5722682",
"0.5640434",
"0.56303173",
"0.5573548",
"0.5568639",
"0.556239",
"0.5516222",
"0.54772276",
"0.547024",
"0.5455486... | 0.5504424 | 18 |
r""" Returns a weakly holomorphic element of ``self`` (extended if necessarily) determined by the property that the Fourier expansion is of the form is of the form ``q^m + O(q^(order_inf + 1))``, where ``order_inf = self._l1 order_1``. In particular for all ``m <= order_inf`` these elements form a basis of the space of... | def j3zF(YKHO, r8hN, y4Sy=rIJu(0)):
Gs0V = YKHO.F_basis_pol(r8hN, order_1=y4Sy)
if YKHO.hecke_n() == bTw2:
WKvO, LVAh, epBp, Csk6 = YKHO.pol_ring().gens()
if WKvO.divides(Gs0V.numerator()) and r8hN > 0:
KXSU = YKHO.extend_type('cusp')
elif WKvO.divides(Gs0V.denominator()) or ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Sedy(eHNT):\n eHNT = H4yH.mirror1(eHNT, -1)\n eHNT = H4yH.F(eHNT)\n eHNT = H4yH.fourier_K_inv(eHNT, 0, 1)\n eHNT = H4yH.fourier_S(eHNT, +0.5)\n eHNT = H4yH.Finv(eHNT)\n eHNT = H4yH.unmirror1(eHNT)\n return oyIN.real(eHNT)",
"def drdU(YKHO, r8hN=None, RLaQ=0, y4Sy=rIJu(0)):\n if not YK... | [
"0.5946533",
"0.5888715",
"0.583966",
"0.5834873",
"0.57565594",
"0.5669988",
"0.56102806",
"0.5579958",
"0.55459756",
"0.5529608",
"0.55013365",
"0.5473139",
"0.54540473",
"0.5439858",
"0.5402795",
"0.53761524",
"0.53758913",
"0.53450453",
"0.53224987",
"0.53195274",
"0.5312... | 0.5962181 | 0 |
r""" Return the rank of ``self``. | def fdMZ(YKHO):
return YKHO.dimension() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rYOG(YKHO):\n return YKHO.rank",
"def fdMZ(YKHO):\n if YKHO._rank is not None:\n return YKHO._rank\n raise NotImplementedError('Still not implemented')",
"def fdMZ(YKHO):\n return YKHO.__rank",
"def fdMZ(YKHO) -> int:\n return YKHO._rank",
"def fdMZ(YKHO) -> int:\n return YKHO.... | [
"0.9014043",
"0.8946946",
"0.8933092",
"0.889783",
"0.889783",
"0.88157797",
"0.8815533",
"0.8799632",
"0.8799632",
"0.8799632",
"0.875086",
"0.86886543",
"0.8674601",
"0.8642024",
"0.8541286",
"0.84501123",
"0.8443243",
"0.83697957",
"0.83668894",
"0.830285",
"0.8297761",
... | 0.797617 | 29 |
r""" Return the degree of ``self``. | def tjON(YKHO):
return YKHO.dimension() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tjON(YKHO):\n pass",
"def lpdP(YKHO):\n return YKHO.D",
"def tjON(YKHO):\n return YKHO._degree",
"def tjON(YKHO):\n return YKHO._degree",
"def tjON(YKHO):\n return YKHO._degree",
"def tjON(YKHO):\n return YKHO.modulus().degree()",
"def tjON(YKHO):\n return YKHO.deg",
"def tjO... | [
"0.88507533",
"0.8755369",
"0.8744607",
"0.8744607",
"0.8744607",
"0.87038124",
"0.8648123",
"0.860713",
"0.8526282",
"0.8518571",
"0.83853984",
"0.82915425",
"0.82841927",
"0.8203652",
"0.81652904",
"0.814566",
"0.80565965",
"0.7995861",
"0.79712915",
"0.7964273",
"0.7939257... | 0.8313999 | 11 |
Returns the point of intersection of the closest segment in the polygon that collides with a ray. The ray starts at position and has an angle of angle (in radians). | def WAYX(dQgj, j5tF, YylR):
zFiD = NTRO(dQgj, V4L1(YylR))
XQ0l = 10000000.0
gNn7 = None
for hTWD in j5tF.segments:
iQin = a4kQ(zFiD, hTWD)
if iQin:
WWYU = Ayfi(dQgj, iQin)
sEnF = xpeN(dQgj, iQin)
if WWYU < XQ0l:
if PTyG(YylR, sEnF):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def u7xn(YKHO, spHt):\n exwG = YKHO._normal\n XP5J = YKHO.point\n Csk6 = spHt.direction\n z1Rg = spHt.origin\n ciZM = lNLu.dot(exwG, Csk6)\n if not ciZM:\n return None\n return (lNLu.dot(exwG, lNLu.make_vec(XP5J, z1Rg)) / ciZM, YKHO)",
"def XMlP(YKHO, spHt):\n jbXL = spHt.position ... | [
"0.7497995",
"0.74014264",
"0.72520053",
"0.7213079",
"0.720032",
"0.710945",
"0.7025426",
"0.70174646",
"0.69899917",
"0.68476266",
"0.68009055",
"0.6569346",
"0.65460974",
"0.6521698",
"0.6459563",
"0.64484006",
"0.64315206",
"0.6388427",
"0.63530266",
"0.6297471",
"0.62559... | 0.7132292 | 5 |
Returns the magnitude of the component of a vector that points in the given direction. | def zgrK(iArr, XSoh):
YylR, YXbZ = iArr
Zgg2 = abs(XSoh - YylR)
return YXbZ * epAf.cos(Zgg2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YXbZ(iArr):\n return epAf.sqrt(sum([iArr[YRbF] ** 2 for YRbF in range(len(iArr))]))",
"def YXbZ(iArr):\n return tk5Y(oyIN.sum(oyIN.square(iArr)), 2)",
"def wLs0(YXbZ, XSoh):\n LVAh = YUNn(YH0K(XSoh)) * YXbZ\n WKvO = YhSR(YH0K(XSoh)) * YXbZ\n P6bq = lNLu([WKvO, LVAh])\n return P6bq",
"de... | [
"0.78478724",
"0.770834",
"0.76848143",
"0.7539874",
"0.74218345",
"0.7370447",
"0.7298001",
"0.7099923",
"0.70248336",
"0.6962217",
"0.68045795",
"0.6800957",
"0.6778543",
"0.67720604",
"0.66526437",
"0.6621121",
"0.65545094",
"0.6482214",
"0.6481722",
"0.64805657",
"0.64036... | 0.736102 | 6 |
Returns the intersection of two segments, as if the segments were extended infinitely. Note that if there are infinite intersection points, or if there are no intersection points, the function will return None. | def D79L(pq4M, FzDi):
if epAf.isclose(pq4M.slope, FzDi.slope):
return None
gpRq = pq4M.slope
E43s = FzDi.slope
kYGz = pq4M.y_intercept
ftz7 = FzDi.y_intercept
if epAf.isinf(pq4M.slope):
WKvO = pq4M.x_intercept
LVAh = E43s * WKvO + ftz7
elif epAf.isinf(FzDi.slope):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iQin(YKHO, Elif):\n if Elif is None:\n return None\n YKHO.check_other(Elif, 'intersection')\n if YKHO.start <= Elif.start < YKHO.end or YKHO.start < Elif.end <= YKHO.end or Elif.start <= YKHO.start < Elif.end:\n return YKHO.__class__(max(YKHO.start, Elif.start), min(YKHO.end, Elif.end))\... | [
"0.7017853",
"0.6984177",
"0.69633985",
"0.68191653",
"0.6768754",
"0.6745001",
"0.6545961",
"0.6516276",
"0.6505202",
"0.6486048",
"0.6481974",
"0.6457804",
"0.6450327",
"0.644545",
"0.64451474",
"0.63892597",
"0.63579714",
"0.630092",
"0.6264907",
"0.62325096",
"0.62084734"... | 0.7702073 | 0 |
Returns the point of intersection of the farthest segment in the polygon that collides with a ray. The ray starts at position and has an angle of angle (in radians). | def d70R(dQgj, j5tF, YylR):
zFiD = NTRO(dQgj, V4L1(YylR))
o8r7 = 0.0
uXhz = None
for hTWD in j5tF.segments:
iQin = a4kQ(zFiD, hTWD)
if iQin:
WWYU = Ayfi(dQgj, iQin)
sEnF = xpeN(dQgj, iQin)
if WWYU > o8r7:
if PTyG(YylR, sEnF):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def u7xn(YKHO, spHt):\n exwG = YKHO._normal\n XP5J = YKHO.point\n Csk6 = spHt.direction\n z1Rg = spHt.origin\n ciZM = lNLu.dot(exwG, Csk6)\n if not ciZM:\n return None\n return (lNLu.dot(exwG, lNLu.make_vec(XP5J, z1Rg)) / ciZM, YKHO)",
"def XMlP(YKHO, spHt):\n jbXL = spHt.position ... | [
"0.742699",
"0.7266618",
"0.7154055",
"0.7101188",
"0.70139974",
"0.6961551",
"0.69153273",
"0.6844351",
"0.6792896",
"0.6695834",
"0.6589388",
"0.63765126",
"0.63131654",
"0.6306999",
"0.63014406",
"0.62726545",
"0.6259284",
"0.6201593",
"0.61835426",
"0.6150865",
"0.6051302... | 0.6843698 | 8 |
Given a ray, this finds the farthest screen edge that the ray collides with. Can return None if the ray does not collide with any edge. | def mlFl(AU8u, YylR, vgXP=(0, 0)):
if vgXP != (0, 0):
AU8u = f7Dd.add_tuples(AU8u, vgXP)
return d70R(AU8u, b6_z, YylR) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XMlP(YKHO, spHt):\n Csk6 = oyIN.dot(spHt.direction, YKHO._normal)\n if oyIN.abs(Csk6) > 1e-08:\n Csk6 = oyIN.dot(YKHO.position - spHt.position, YKHO._normal) / Csk6\n return Csk6 if Csk6 > 0 else oyIN.inf\n return oyIN.inf",
"def NLCc(YKHO):\n o0cK = YKHO.halfFieldOfView()\n if o... | [
"0.63855803",
"0.6194926",
"0.589926",
"0.5897911",
"0.5885224",
"0.58201146",
"0.57818717",
"0.57680786",
"0.57542664",
"0.57189155",
"0.56918615",
"0.5679459",
"0.56648487",
"0.560356",
"0.5562566",
"0.5547219",
"0.5545433",
"0.5536757",
"0.55080914",
"0.54903984",
"0.54714... | 0.5807161 | 6 |
Load the model to use for prediction on new data. | def uyMl(YKHO):
wM3v = open('model.json', 'r')
jlS7 = wM3v.read()
wM3v.close()
Z_lw = oPz_(jlS7)
Z_lw.load_weights('model.h5')
YKHO.model = Z_lw
print('Loaded model from disk') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uyMl(YKHO) -> None:\n RKD7.info(f'Load {YKHO.model_name} model...')\n YKHO.model = ZylS.keras.models.load_model(YKHO.data_name + '__{}_model'.format(YKHO.model_name))",
"def uyMl(YKHO):\n YKHO.model = uyMl('model/weights.18-0.39.hdf5')",
"def uyMl(YKHO):\n YKHO.model = uyMl(Hy7s.path.join('Savi... | [
"0.8176926",
"0.80124825",
"0.798528",
"0.79345536",
"0.78439224",
"0.78439224",
"0.78154427",
"0.7803506",
"0.7773781",
"0.7773781",
"0.7773781",
"0.7773781",
"0.77667487",
"0.77318406",
"0.7719642",
"0.76912415",
"0.7682223",
"0.7674525",
"0.7636931",
"0.76367396",
"0.76184... | 0.79376423 | 3 |
Function that checks if the stack is empty, returning the resulting bool. Return | def FBfn(YKHO):
return len(YKHO) == 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FBfn(YKHO):\n return YKHO.stack == []",
"def FBfn(YKHO):\n return len(YKHO.stack) == 0",
"def FBfn(YKHO):\n return len(YKHO.stack) == 0",
"def lsmZ(E5BI):\n return len(E5BI.elements) == 0",
"def FBfn(E5BI):\n return E5BI.top is None",
"def FBfn(YKHO):\n return YKHO.stack == []",
"... | [
"0.8956629",
"0.8949519",
"0.8949519",
"0.8942161",
"0.8938909",
"0.89300776",
"0.89300776",
"0.89300776",
"0.8925128",
"0.8902389",
"0.8874824",
"0.8840617",
"0.8840617",
"0.88020825",
"0.87998044",
"0.87998044",
"0.8772263",
"0.87560904",
"0.8696468",
"0.8689006",
"0.868392... | 0.0 | -1 |
Return disk usage statistics about the given path. | def gmZu(YKHO, pmON='/'):
aevO = Hy7s.statvfs(pmON)
ftQ2 = aevO.f_bavail * aevO.f_frsize
wjRY = aevO.f_blocks * aevO.f_frsize
XR14 = (aevO.f_blocks - aevO.f_bfree) * aevO.f_frsize
YKHO.logger.debug('Disk stats: free: {f}B, used: {u}B, total: {t}B'.format(f=ftQ2, u=XR14, t=wjRY))
return ftQ2 / 10... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vj9x(pmON):\n return O0k5.disk_usage(pmON)",
"def WhiX(pmON):\n aevO = Hy7s.statvfs(pmON)\n ftQ2 = aevO.f_bavail * aevO.f_frsize\n wjRY = aevO.f_blocks * aevO.f_frsize\n XR14 = (aevO.f_blocks - aevO.f_bfree) * aevO.f_frsize\n try:\n DuZT = float(XR14) / wjRY * 100\n except ZeroDiv... | [
"0.84351957",
"0.84178495",
"0.8181282",
"0.816279",
"0.81571645",
"0.8066095",
"0.80213135",
"0.7744364",
"0.7734219",
"0.77151084",
"0.7700639",
"0.7641524",
"0.74397075",
"0.7390351",
"0.7313551",
"0.72594106",
"0.7079143",
"0.7037997",
"0.7002168",
"0.69685024",
"0.690027... | 0.5925842 | 91 |
A function to compute spectral flatness value of a signal | def yyjt(nPrm, M9BV, vgXP=1e-20):
QTg7, naF9 = Gaon.periodogram(nPrm, M9BV)
Hisy = oyIN.exp(oyIN.mean(oyIN.log(naF9 + vgXP))) / oyIN.mean(naF9)
return Hisy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wjU9(YKHO):\n if YKHO.spectral_flatness is None:\n import pdb\n pdb.set_trace()\n zbDt = oyIN.sum(oyIN.log10(YKHO.get_magnitude_spectr())) / len(YKHO.get_magnitude_spectr())\n c6lJ = oyIN.log10(oyIN.mean(YKHO.get_magnitude_spectr()))\n YKHO.spectral_flatness = 10 * (zbDt -... | [
"0.780737",
"0.6912942",
"0.64200115",
"0.63455003",
"0.6282855",
"0.6254256",
"0.62288666",
"0.62124395",
"0.6202643",
"0.6084508",
"0.6077842",
"0.6044397",
"0.6044397",
"0.6026024",
"0.6003208",
"0.59831035",
"0.5950556",
"0.5946921",
"0.5934628",
"0.5933622",
"0.59219396"... | 0.7751148 | 1 |
Returns string of information about the raster (filename, coordinate system, number of columns/rows, etc.). | def U34r(YKHO, eQSh=False):
rIkN = ['Driver: {} \n'.format(YKHO.driver), 'Opened from file: {} \n'.format(YKHO.filename), 'Filename: {} \n'.format(YKHO.name), 'Raster modified since disk load? {} \n'.format(YKHO._is_modified), 'Size: {}, {}\n'.format(YKHO.width, YKHO.h... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hUXG(Ux0P):\n VXjJ = MDcw.Open(Ux0P)\n hOnR = VXjJ.GetGeoTransform()\n nu6G = VXjJ.GetProjection()\n return (hOnR, nu6G)",
"def Sfij(VXjJ):\n zZcM = B9Vf.open(VXjJ)\n ezWE = zZcM.read(1)\n mWFP = zZcM.name.split('.')[0]\n LVAh = int(mWFP.split('-')[0])\n WKvO = int(mWFP.split('-')[... | [
"0.6987367",
"0.67712396",
"0.664408",
"0.65389013",
"0.63657707",
"0.6365302",
"0.6363966",
"0.63362974",
"0.63133097",
"0.6311716",
"0.6306805",
"0.6290444",
"0.62747574",
"0.6260564",
"0.62427753",
"0.61834294",
"0.6156528",
"0.61443245",
"0.6144301",
"0.61141384",
"0.6112... | 0.69269454 | 1 |
Convert this Raster into an xarray DataArray using rioxarray. This method uses rioxarray to generate a DataArray with associated georeferencing information. See the documentation of rioxarray and xarray for more information on the methods and attributes of the resulting DataArray. | def ARze(YKHO, mWFP=None):
if not UAkg:
raise ImportError('rioxarray is required for this functionality.')
zuVY = rd2A.open_rasterio(YKHO.ds)
if mWFP is not None:
zuVY.name = mWFP
return zuVY | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CPaz(YKHO):\n try:\n import xarray as zuVY\n except:\n bo34.error(' Cannot import xarray')\n raise ImportError\n if len(YKHO.array.shape) == 3:\n PWtb = YKHO.array.shape[0]\n if not YKHO.xarray_coords:\n YKHO.xarray_coords = dict(z=('B' + ',B'.join(list(m... | [
"0.6996549",
"0.670416",
"0.65733016",
"0.6400504",
"0.6400262",
"0.637251",
"0.63071907",
"0.6262992",
"0.6149212",
"0.61266214",
"0.5996749",
"0.59857833",
"0.59690785",
"0.59477013",
"0.59275067",
"0.591003",
"0.5899918",
"0.58690304",
"0.5830351",
"0.5830009",
"0.5752806"... | 0.74895126 | 0 |
Return self's bounds in the given CRS. | def JtL1(YKHO, E6Cw, rGYO: int=5000):
Qb0V = min(max(YKHO.width, YKHO.height), rGYO)
LFlW, es2x, _tIi, tlxW = YKHO.bounds
AEk3 = znp9.warp.transform_bounds(YKHO.crs, E6Cw, LFlW, es2x, _tIi, tlxW, Qb0V)
return AEk3 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X7zS(YKHO) -> m5U0.LatLngRect:\n return m5U0.LatLngRect.from_point(YKHO._latlng)",
"def X7zS(YKHO):\n hksT = YKHO.domain_kwargs['loc'] if 'loc' in YKHO.domain_kwargs else 0\n c6Zr = YKHO.domain_kwargs['scale'] if 'scale' in YKHO.domain_kwargs else 1\n return YKHO.domain.interval(0.999, *YKHO.doma... | [
"0.6957273",
"0.68527734",
"0.68450534",
"0.6805872",
"0.6674309",
"0.6673493",
"0.6657157",
"0.66324526",
"0.6632432",
"0.66120785",
"0.65991986",
"0.6597715",
"0.6597715",
"0.6597715",
"0.6597715",
"0.6597715",
"0.6597715",
"0.6597715",
"0.657017",
"0.6560376",
"0.65586597"... | 0.0 | -1 |
Return row, column indices for a given x,y coordinate pair. | def JV7j(YKHO, WKvO, LVAh, khtY=oyIN.float32, iARI=None, rhd_=None):
if khtY not in [oyIN.float32, oyIN.float64, float]:
raise UserWarning('Operator is not of type float: rio.Dataset.index might return unreliable indexes due to rounding issues.')
if iARI not in [None, 'Area', 'Point']:
raise Val... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d1Mo(YKHO, WKvO, LVAh):\n tE9M = int(round(WKvO / YKHO.cell_size))\n EI7y = int(round(LVAh / YKHO.cell_size))\n return (tE9M, EI7y)",
"def wHeb(YKHO, WKvO, LVAh):\n WKvO -= YKHO.origin_x\n LVAh -= YKHO.origin_y\n rdlD = int(oyIN.floor(LVAh / YKHO.resolution))\n fvDH = int(oyIN.floor(WKvO... | [
"0.8147872",
"0.78754616",
"0.7744422",
"0.76429343",
"0.7512113",
"0.7367258",
"0.7309162",
"0.72243434",
"0.72192216",
"0.7182183",
"0.70893043",
"0.7088866",
"0.7064278",
"0.7027917",
"0.7017294",
"0.6901308",
"0.69007826",
"0.6892961",
"0.6867293",
"0.6813314",
"0.6812976... | 0.0 | -1 |
Return x,y coordinates for a given row, column index pair. | def X_sO(YKHO, YRbF, r845, vgXP='center'):
WKvO, LVAh = YKHO.ds.xy(YRbF, r845, offset=vgXP)
return (WKvO, LVAh) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mlB1(YKHO, tE9M, EI7y):\n WKvO = tE9M * YKHO.cell_size\n LVAh = EI7y * YKHO.cell_size\n return (WKvO, LVAh)",
"def MKcf(YKHO, tE9M, EI7y):\n if tE9M >= YKHO.cols:\n tE9M = YKHO.cols\n if tE9M < 0:\n tE9M = 0\n WKvO = float(YKHO.TL_x + tE9M * YKHO.x_res)\n if EI7y >= YKHO.ro... | [
"0.78461665",
"0.784323",
"0.77711844",
"0.74646497",
"0.74584585",
"0.7358874",
"0.73162913",
"0.73094773",
"0.72782683",
"0.7272521",
"0.72358644",
"0.72338873",
"0.72172046",
"0.7198949",
"0.7120375",
"0.7113346",
"0.71119356",
"0.7109549",
"0.70895636",
"0.7080798",
"0.70... | 0.0 | -1 |
Configure ready zookeepers and restart kafka if needed. As zks come and go, server.properties will be updated. When that file changes, restart Kafka and set appropriate status messages. This method also handles the restart if our network_interface config has changed. | def FDst(Iqv8):
Xe9P = Iqv8.zookeepers()
E2BI = RMC9.config().get('network_interface')
N_e1 = gQfM.kv().get('kafka.storage.log_dir')
if not any((O8Si('zookeepers', Xe9P), O8Si('kafka.network_interface', E2BI), O8Si('kafka.storage.log_dir', N_e1))):
return
RMC9.log('Checking Zookeeper configu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oQM2():\n HCmI = '/opt/kafka_2.11-0.9.0.0/bin/kafka-server-start.sh config/server.properties &'\n print('Attempting the start the kafka..... ')\n RBVb = Hy7s.system(HCmI)\n if RBVb is not 0:\n print('kafka server has been restarted')\n else:\n print(\"ERROR: kafka server couldn't b... | [
"0.62643456",
"0.5963461",
"0.5780994",
"0.56738055",
"0.567075",
"0.55628157",
"0.5559759",
"0.5526954",
"0.5521913",
"0.54799014",
"0.5456376",
"0.54479307",
"0.54325646",
"0.5406888",
"0.53905755",
"0.53583735",
"0.53533757",
"0.53483105",
"0.5336874",
"0.52798516",
"0.526... | 0.71128243 | 0 |
Get the ndarray base which owns memory block. | def v9y1(jzdc):
if isinstance(jzdc.base, oyIN.ndarray):
return v9y1(jzdc.base)
return jzdc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DUI7(qw7D):\n if qw7D.offset:\n return qw7D.base_data.get_sub_region(qw7D.offset, 1)\n else:\n return qw7D.base_data",
"def iHDL(YKHO):\n return YKHO.__blkptr",
"def LJK3(ezWE: np.ndarray) -> int:\n return ezWE.__array_interface__['data'][0]",
"def LAMA(ezWE):\n P8oC = ezWE\n... | [
"0.66771656",
"0.6579956",
"0.64805615",
"0.6465183",
"0.63491935",
"0.6338769",
"0.62043947",
"0.6157809",
"0.6157809",
"0.61537457",
"0.6091515",
"0.6091515",
"0.6091515",
"0.60619223",
"0.60561234",
"0.6012143",
"0.60117847",
"0.60090476",
"0.5979532",
"0.5959398",
"0.5956... | 0.6499414 | 2 |
Computes the precision for the specified values of k | def qK9P(hlel, pan_, hz5a=(1, 5)):
Gq8e = max(hz5a)
bGrB, nvEb = hlel.topk(Gq8e, 1, True, True)
nvEb = nvEb.t()
gXXc = nvEb.eq(pan_.view(1, -1).expand_as(nvEb))
Ylbp = []
for G1Hx in hz5a:
R2Dg = gXXc[:G1Hx].view(-1).int().sum(0, keepdim=True)
Ylbp.append(R2Dg.data.cpu().numpy().... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhd_(u5Ef, G1Hx):\n return len(u5Ef) / G1Hx",
"def sEak(Mkmy, G1Hx):\n assert G1Hx >= 1\n Mkmy = oyIN.asarray(Mkmy)[:G1Hx]\n return oyIN.mean(Mkmy)",
"def sEak(YKHO, G1Hx):\n fdMZ = YKHO.pred_rankings.rdd.map(lambda SjLr: (SjLr[2], SjLr[1]))\n Wbxz = rRQi(fdMZ)\n return Wbxz.precisionA... | [
"0.8003303",
"0.7974974",
"0.7973838",
"0.7941408",
"0.78644186",
"0.7804143",
"0.7707982",
"0.76218164",
"0.75933",
"0.75614214",
"0.75204575",
"0.74303335",
"0.7412347",
"0.7376026",
"0.7374732",
"0.7321644",
"0.72547084",
"0.72369593",
"0.72281915",
"0.7204618",
"0.7137449... | 0.0 | -1 |
choose n from data with replacement, return mean | def Bww6(nPrm, exwG):
return JBMS([tuKI.choice(nPrm) for YRbF in range(exwG)]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JBMS(nPrm):\n exwG = 0\n JBMS = 0.0\n for WKvO in nPrm:\n exwG += 1\n JBMS += (WKvO - JBMS) / exwG\n if exwG < 1:\n return float('nan')\n return JBMS",
"def JBMS(nPrm):\n exwG = len(nPrm)\n if exwG < 1:\n raise ValueError('len < 1')\n return sum(nPrm) / flo... | [
"0.666214",
"0.6511174",
"0.645872",
"0.6446341",
"0.6384205",
"0.63591576",
"0.6350918",
"0.6329482",
"0.6329482",
"0.6329482",
"0.6329482",
"0.63249785",
"0.62914383",
"0.62914383",
"0.62914383",
"0.62914383",
"0.62914383",
"0.6286732",
"0.62774026",
"0.62321174",
"0.622347... | 0.6641603 | 1 |
Test that the great circle distance between two points is being calculated correctly. | def i34S(YKHO):
EBgd = DhiK(lat=39.1212, lng=-104.012)
HpuQ = DhiK(lat=39.1222, lng=-104.014)
aEqx = 673.5
Ayfi = EBgd.distance_from(HpuQ)
YKHO.assertAlmostEqual(Ayfi, aEqx, 1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T97B(EBgd: Point, HpuQ: Point) -> float:\n return jLKC.distance.great_circle((EBgd.y, EBgd.x), (HpuQ.y, HpuQ.x)).meters",
"def MjZa(YKHO):\n hrVC = (0, 0)\n FR3c = (3, 4)\n YKHO.assertEqual(pImw(hrVC[0], hrVC[1], FR3c[0], FR3c[1]), 5)",
"def _Bhx(YKHO):\n YKHO.assertEqual(Ayfi([12.3, -54.178... | [
"0.7808283",
"0.766327",
"0.75939447",
"0.75908357",
"0.7520361",
"0.7494938",
"0.7407804",
"0.73439515",
"0.7322273",
"0.7295251",
"0.72859734",
"0.72859734",
"0.7275801",
"0.726972",
"0.7266684",
"0.7254168",
"0.72440135",
"0.7238265",
"0.72373825",
"0.722324",
"0.72200274"... | 0.72323895 | 19 |
Determine the subclasses that inherit from the input class. | def R6qy(rV9y: Type[Any]) -> fHNa[eBH2[ImMB]]:
Hh7E = set()
Q5yx = [rV9y]
while Q5yx:
_AKB = Q5yx.pop()
for aUGN in _AKB.__subclasses__():
if aUGN not in Hh7E:
Hh7E.add(aUGN)
Q5yx.append(aUGN)
return Hh7E | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k05p(YKHO):\n\n class Parent(IIvq, ftIh.ABC):\n pass\n\n class Child(Z3mN):\n pass\n Hh7E = IIvq.get_subclasses()\n assert Melv in Hh7E\n assert Z3mN not in Hh7E",
"def sXxB(kAug):\n kAug.__subclasses__()\n Hh7E = set()\n wKX3 = [kAug]\n while wKX3:\n _AKB = wK... | [
"0.7284659",
"0.6975502",
"0.69530267",
"0.68028426",
"0.67269033",
"0.6725374",
"0.670638",
"0.66943663",
"0.66824996",
"0.6679816",
"0.6639168",
"0.65952766",
"0.65405285",
"0.6476046",
"0.6465699",
"0.6464766",
"0.6458191",
"0.6441821",
"0.64122504",
"0.640497",
"0.6381779... | 0.6796189 | 4 |
Return the 'most appropriate' URL for this page taking into account the site we're currently on; a local URL if the site matches, or a fully qualified one otherwise. Return None if the page is not routable. Override for using custom get_site_root_paths() instead of Site.get_site_root_paths() | def Z5Kh(YKHO, FyFa):
for id, mSqg, tohc in YKHO.get_site_root_paths():
if YKHO.url_path.startswith(mSqg):
return ('' if FyFa.id == id else tohc) + gxEw('wagtail_serve', args=(YKHO.url_path[len(mSqg):],)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f3Yj(YKHO):\n if '/' in YKHO._tester.driver.current_url:\n return YKHO._tester.driver.current_url.split('/')[-1]\n return None",
"def hlzF(YKHO):\n if not YKHO.file:\n return None\n bD7m = YKHO.file.url\n if bD7m.startswith('http:') or bD7m.startswith('https:'):\n return b... | [
"0.63938373",
"0.6087552",
"0.607612",
"0.602241",
"0.6013972",
"0.59585696",
"0.5866456",
"0.58102137",
"0.57976025",
"0.57944304",
"0.57895136",
"0.5754275",
"0.5746514",
"0.5744427",
"0.57436115",
"0.57193804",
"0.5698382",
"0.5696238",
"0.56846684",
"0.5682315",
"0.565497... | 0.5662774 | 20 |
Return the 'most appropriate' URL for referring to this page from the pages we serve, within the Wagtail backend and actual website templates; this is the local URL (starting with '/') if we're only running a single site (i.e. we know that whatever the current page is being served from, this link will be on the same do... | def L2Lp(YKHO):
Hb1p = YKHO.get_site_root_paths()
for id, mSqg, tohc in Hb1p:
if YKHO.url_path.startswith(mSqg):
return ('' if len(Hb1p) == 1 else tohc) + gxEw('wagtail_serve', args=(YKHO.url_path[len(mSqg):],)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Cu8p(B2Dn):\n if B2Dn.pk is not None:\n B2Dn = B2Dn.specific_class.objects.get(pk=B2Dn.pk)\n BSnH = B2Dn.get_url_parts()\n if BSnH is None:\n return None\n COo8, tohc, sdIp = BSnH\n qpDA = HAC5.objects.get(id=COo8)\n try:\n iZQu = qpDA.sharing_site\n except bo4L.DoesNo... | [
"0.6267034",
"0.6176468",
"0.6166935",
"0.61634755",
"0.6161407",
"0.61609304",
"0.6131116",
"0.60993254",
"0.6076764",
"0.6052872",
"0.60176814",
"0.6016126",
"0.6014528",
"0.60123277",
"0.6001837",
"0.5917971",
"0.5914929",
"0.59110475",
"0.5903231",
"0.58909863",
"0.589019... | 0.6043536 | 10 |
creates new data frame based on previous observation | def Ujri(nPrm, YUjG, Crrw=False):
G68k = []
for YRbF in range(len(nPrm) - YUjG):
if Crrw:
try:
G68k.append(nPrm.iloc[YRbF + YUjG].as_matrix())
except AttributeError:
G68k.append(nPrm.iloc[YRbF + YUjG])
else:
KQOt = nPrm.iloc[YRb... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QNdO(qIxc, FeC_=True):\n jQ3Z = qIxc.query1\n PC2s = rLdf.to_datetime(jQ3Z['date']).sort_values()\n if PC2s is None:\n raise Exception('Model must be fit before this can be used.')\n t5BG = PC2s.max()\n w4Sv = qIxc.steps_to_predict\n YdD0 = rLdf.bdate_range(start=t5BG, periods=w4Sv + 1... | [
"0.64512295",
"0.63111013",
"0.6110729",
"0.595968",
"0.59454215",
"0.5939336",
"0.5901699",
"0.58999175",
"0.58978635",
"0.589644",
"0.5879617",
"0.5802377",
"0.5754314",
"0.57488906",
"0.5744484",
"0.5744234",
"0.5739523",
"0.5738645",
"0.5709993",
"0.56524706",
"0.5651131"... | 0.0 | -1 |
why L.__radd__ we can add b to the end of a, using `L(a)+b` but can we do `b + L(a)` and add `b` to the front of `a`? how to use L.__radd__ just do `b + L(a)` | def K7GD(jzdc: L, Fg_i):
return aPd6(Fg_i) + jzdc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K7GD(YKHO, yLHq):\n return YKHO.__add__(yLHq)",
"def K7GD(jzdc, Fg_i):\n return jzdc + Fg_i",
"def K7GD(YKHO, Mkmy):\n return YKHO.__add__(Mkmy)",
"def K7GD(YKHO, Elif):\n return YKHO.__add__(Elif)",
"def K7GD(YKHO, Elif):\n return YKHO.binary(Elif, seET.add, right=True)",
"def H2v5(vC... | [
"0.8040975",
"0.79317355",
"0.786883",
"0.7613699",
"0.7553622",
"0.7531919",
"0.7458188",
"0.7452863",
"0.7452251",
"0.7448378",
"0.7418658",
"0.7418658",
"0.7418658",
"0.7418658",
"0.7418658",
"0.7418658",
"0.7418658",
"0.7418658",
"0.7418658",
"0.7418658",
"0.7418557",
"... | 0.8638665 | 0 |
Returns the parent nodeid. | def _AKB(YKHO) -> 'Nodeid':
if not YKHO._fragments:
raise RuntimeError('empty nodeid has no parents, like batman')
return PoZZ.from_fragments(YKHO._fragments[:-1]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DtVU(YKHO):\n return YKHO.__parent_id",
"def H7rZ(YKHO) -> str:\n return qe4Y.get(YKHO, 'parent_id')",
"def H7rZ(YKHO) -> str:\n return qe4Y.get(YKHO, 'parent_id')",
"def DtVU(YKHO):\n return YKHO.parent_id",
"def H7rZ(YKHO):\n return YKHO.content['parent_id']",
"def H7rZ(YKHO):\n r... | [
"0.879204",
"0.87685114",
"0.87685114",
"0.8747006",
"0.86637986",
"0.8653839",
"0.8653839",
"0.854004",
"0.83525044",
"0.82901746",
"0.8274347",
"0.82411826",
"0.8236485",
"0.8079926",
"0.8040295",
"0.7952194",
"0.79351544",
"0.7927645",
"0.78034186",
"0.7785799",
"0.7785799... | 0.80678004 | 14 |
remove_single_edge(edge_list) Remove single edges from a list of edges | def VhBE(l25F, nLsa):
KCHu = set(nLsa)
tTpl = oyIN.array(l25F)
vke7 = oyIN.unique(oyIN.reshape(tTpl, 2 * len(tTpl)), return_counts=True)
L18c = vke7[0][oyIN.argwhere(vke7[:][1] == 1)]
oMB_ = []
for LihS in L18c:
KCHu.remove(LihS[0])
s1k6, xMw6 = (oyIN.argwhere(tTpl[:, 0] == LihS)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iyca(YKHO, tTpl):\n try:\n YKHO.hyperedge.remove(set(tTpl))\n except ValueError:\n raise jHsn.NetworkXError('The edge %s is not in the hypergraph' % tTpl)",
"def iyca(YKHO, tTpl):\n pass",
"def sSBn(YKHO, l25F):\n xqbE = list(l25F)\n while len(xqbE) > 0:\n a77C = xqbE.po... | [
"0.6907304",
"0.6853034",
"0.68448925",
"0.6646497",
"0.65665555",
"0.6497729",
"0.6453821",
"0.6397914",
"0.63217384",
"0.6316892",
"0.63122094",
"0.6252207",
"0.6221678",
"0.62209666",
"0.61918277",
"0.6161091",
"0.6151166",
"0.6091496",
"0.6064933",
"0.60514057",
"0.605088... | 0.80101174 | 0 |
get a colortable of desired N in Qt4 format as required from the colortable Layer cmap_name can be any matplotlib colortable | def FH3q(em8M, ywwl):
try:
import matplotlib.cm as Bcwd
except:
raise RuntimeError('this function requires matplotlib')
iMGt = Bcwd.get_cmap(em8M, ywwl)
iMGt = iMGt(oyIN.arange(ywwl))[:, :-1]
yZ5t = []
for geyT in iMGt:
Mkmy, Oa1e, Fg_i = geyT * 255
yZ5t.append(F6... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uknC(em8M, exwG):\n iMGt = QrM1.get_cmap(em8M)\n hkxX = range(exwG)\n tceN = ZfWE.Normalize(vmin=hkxX[0], vmax=hkxX[-1])\n y1f3 = Bcwd.ScalarMappable(norm=tceN, cmap=iMGt)\n return y1f3",
"def tRp2(ywwl):\n n_rA = Jw9H.Normalize(vmin=0, vmax=ywwl - 1)\n hG7b = CbNT.ScalarMappable(norm=n_... | [
"0.63363874",
"0.6167152",
"0.6144555",
"0.6137083",
"0.61139256",
"0.6092992",
"0.60505307",
"0.6044908",
"0.6029155",
"0.6029155",
"0.6022356",
"0.6018264",
"0.6017231",
"0.60145736",
"0.60091394",
"0.59719825",
"0.59699833",
"0.59430957",
"0.59392935",
"0.5910547",
"0.5891... | 0.791691 | 0 |
get all categories from ptt | def E6u8(yKcO, Os4s):
bD7m = 'https://www.ptt.cc/cls/1'
Mkmy = G4JS.get(bD7m)
Mkmy.encoding = 'utf-8'
nM3r = Mkmy.text
grRL = _R2e.fromstring(nM3r)
moMn = grRL.xpath('//a[@class="board"]')
for Oa1e in moMn[yKcO:Os4s]:
print(Oa1e)
Q6kx = o7DN(Oa1e.attrib['href'], Oa1e.text_con... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LQuW(YKHO):\n pass",
"def NMoC(YKHO):\n return LeZt",
"def LeZt(YKHO):\n return YKHO._data['categories']",
"def LeZt(YKHO):\n return YKHO._data['categories']",
"def LU07(Emd4):\n return LeZt",
"def zG33(YKHO):\n return YKHO.categoryList",
"def LQuW(YKHO):\n return YKHO.categori... | [
"0.766232",
"0.754993",
"0.7471531",
"0.74533755",
"0.7419604",
"0.74176157",
"0.7359424",
"0.73395526",
"0.73395526",
"0.7312348",
"0.72835684",
"0.7275957",
"0.7253489",
"0.723615",
"0.7215085",
"0.7146996",
"0.71349424",
"0.71255517",
"0.71063703",
"0.71059483",
"0.7103548... | 0.0 | -1 |
Check if path is an existing file. | def EFYe(pmON):
if not Hy7s.path.isfile(pmON):
if Hy7s.path.isdir(pmON):
tO9_ = '{0} is a directory'.format(pmON)
else:
tO9_ = '{0} does not exist.'.format(pmON)
raise j1Jz.ArgumentTypeError(tO9_)
return pmON | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def poxP(pmON):\n return EFYe(pmON)",
"def Hat5(pmON: str):\n if Hy7s.path.isfile(pmON):\n return True\n return False",
"def IeRR(pmON):\n return Hy7s.path.isfile(pmON)",
"def JgkM(pmON):\n if Hy7s.path.isfile(pmON):\n return True\n else:\n return False",
"def poxP(pm... | [
"0.8621865",
"0.8423821",
"0.84183437",
"0.8388314",
"0.83540815",
"0.8347232",
"0.8290108",
"0.8282429",
"0.82487947",
"0.821282",
"0.8165733",
"0.8139205",
"0.81230056",
"0.81199926",
"0.81057936",
"0.8103556",
"0.8100323",
"0.80803996",
"0.8076761",
"0.80714184",
"0.806972... | 0.0 | -1 |
Weighted mean of the points. | def JBMS(YKHO, LTIa, _mSQ=None):
return oyIN.average(LTIa, axis=0, weights=_mSQ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Gq7O(LTIa: np.ndarray, _mSQ: np.ndarray):\n return (LTIa * _mSQ).sum(axis=0)",
"def uG6p():\n\n def eHNT(hkxX, _mSQ):\n return oLG2.sum(hkxX * _mSQ) / FtK2(_mSQ)\n return P8oC.Fn('_WeightedMean', eHNT)",
"def uG6p():\n\n def eHNT(hkxX, _mSQ):\n return oLG2.sum(hkxX * _mSQ) / oLG2.... | [
"0.786995",
"0.7723593",
"0.7699539",
"0.75360274",
"0.7515785",
"0.7420188",
"0.7343366",
"0.72869825",
"0.7268923",
"0.72655797",
"0.7198731",
"0.71944857",
"0.7182742",
"0.7172276",
"0.7127553",
"0.7117109",
"0.710025",
"0.70536584",
"0.7051074",
"0.70370364",
"0.7016067",... | 0.81387436 | 0 |
Reinitialize the data structures needed for extracting phrases, removing any preexisting state. | def SiRx(YKHO) -> None:
YKHO.elapsed_time = 0.0
YKHO.lemma_graph = jHsn.DiGraph()
YKHO.phrases = []
YKHO.ranks = {}
YKHO.seen_lemma = U8Lr() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kZM1(YKHO) -> None:\n YKHO._path = None\n YKHO._content = ''\n YKHO._tokens = []\n YKHO.elements = dict()\n YKHO.attributes = dict()",
"def SiRx(YKHO):\n \"\"\" @ivar chains: Dict mapping MetaChain IDs onto MetaChain instances \"\"\"\n YKHO.chains = {}\n ' @ivar words: Dict mapping wo... | [
"0.6938991",
"0.6810412",
"0.6532506",
"0.6532506",
"0.6486943",
"0.64544266",
"0.6392447",
"0.63025063",
"0.6275606",
"0.62626064",
"0.6259928",
"0.6236736",
"0.62354857",
"0.6224585",
"0.6196079",
"0.619598",
"0.6125605",
"0.61125416",
"0.6105326",
"0.60713935",
"0.60713935... | 0.6815397 | 1 |
Skip tokens that are either in the stop word list or don't have a part of speech tag suitable for vertices in the lemma graph. Otherwise, track this token in the `seen_lemma` dictionary. | def ehmj(YKHO, eOtH: Token) -> bool:
dhx_ = eOtH.lemma_.lower().strip()
if YKHO._is_stopword(dhx_, eOtH):
return False
if eOtH.pos_ not in YKHO.pos_kept:
return False
H5ew = K7xt(dhx_, eOtH.pos_)
if H5ew not in YKHO.seen_lemma:
YKHO.seen_lemma[H5ew] = set([eOtH.i])
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aUcs(eOtH: Token) -> None:\n if eOtH.is_stop:\n eOtH._.ppt_output = eOtH.whitespace_",
"def bFVf(YKHO, dhx_: str, eOtH: Token) -> bool:\n return dhx_ in YKHO.stopwords and eOtH.pos_ in YKHO.stopwords[dhx_]",
"def KIup(w2fL):\n return w2fL.is_punct or w2fL.is_stop or w2fL.pos_ == 'DET'",
"... | [
"0.63328624",
"0.61933905",
"0.6084693",
"0.60620236",
"0.5995964",
"0.5963096",
"0.5956533",
"0.59372276",
"0.5917318",
"0.59087974",
"0.59060913",
"0.5838931",
"0.58293456",
"0.58149225",
"0.5799513",
"0.57903653",
"0.5779934",
"0.57785666",
"0.575601",
"0.5740376",
"0.5712... | 0.7197952 | 0 |
Start the communication service in a new gRPC server instance. | def rRRM(YKHO, bIwZ: int=None, Tf7d: Optional[bool]=None) -> h8nf[IYqO.Server]:
bIwZ = bIwZ or 12223
bo34.info('Initiating gRPC server: port=%d', bIwZ)
E_u6 = IYqO.server(L4cE.ThreadPoolExecutor())
Poyb(YKHO._rpc, E_u6)
E_u6.add_insecure_port('[::]:{}'.format(bIwZ))
bo34.info('gRPC server ok')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kxW1():\n N5z6 = IYqO.server(L4cE.ThreadPoolExecutor(max_workers=1))\n SihS.add_PPServiceServicer_to_server(Oy65(), N5z6)\n N5z6.add_insecure_port('[::]:80')\n N5z6.start()\n try:\n while True:\n print('Running...')\n ITS7.sleep(10)\n except KeyboardInterrupt:\n ... | [
"0.73006964",
"0.7257075",
"0.7179449",
"0.7118521",
"0.7071771",
"0.70021707",
"0.69787115",
"0.69782126",
"0.69616896",
"0.6944608",
"0.6909891",
"0.6861995",
"0.68599594",
"0.68140185",
"0.6775066",
"0.6761315",
"0.6753784",
"0.67536736",
"0.6748827",
"0.6748827",
"0.67236... | 0.6335912 | 58 |
Number of features from classifier | def HhVR(YKHO):
return len(YKHO.feature_importances.index) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HkL2(YKHO):\n raise NotImplementedError()",
"def HkL2(YKHO) -> int:\n raise NotImplementedError()",
"def ROaS(YKHO):\n return YKHO._.n_features",
"def buHm(YKHO):\n raise NotImplemented",
"def YnH_(YKHO):\n ROaS = 0\n for ai9l in YKHO.feature_transformers:\n ROaS += ai9l.get_n_... | [
"0.8167516",
"0.8162506",
"0.79785913",
"0.79092205",
"0.7893339",
"0.7847176",
"0.77998304",
"0.77998304",
"0.7798762",
"0.7798553",
"0.7793608",
"0.77668697",
"0.77289",
"0.7638698",
"0.7629892",
"0.7623991",
"0.76052994",
"0.7583295",
"0.7550712",
"0.75405025",
"0.7535324"... | 0.8209863 | 0 |
collate for triplet examples return a list of batches (anchor, positive, negative) | def Tajk(Wc9F):
ALBb = [[] for YRbF in range(3)]
K6P5 = [[] for YRbF in range(3)]
_yOJ = [[] for YRbF in range(3)]
for PU1l in Wc9F:
for or8S in range(3):
ALBb[or8S].append(PU1l.texts[or8S])
if DMw4 == 'tesbert':
K6P5[or8S].append(D4gl(PU1l.times[or8S]))
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BrM2(Wc9F):\n UrXw = []\n EKkb = []\n SvcU = []\n for V52X in Wc9F:\n EKkb.append(V52X[2])\n SvcU.append(V52X[1])\n for V52X in Wc9F:\n Z_gq = oyIN.pad(oyIN.array(V52X[0]), pad_width=(0, cYQt - V52X[1]), mode='constant', constant_values=0)\n UrXw.append(Z_gq)\n ret... | [
"0.6790773",
"0.6721421",
"0.6449436",
"0.6440571",
"0.64315534",
"0.63957894",
"0.63745296",
"0.63453007",
"0.6308576",
"0.6283222",
"0.62301034",
"0.62024766",
"0.62020767",
"0.6182054",
"0.6127985",
"0.61264044",
"0.61116505",
"0.6099532",
"0.60607547",
"0.60602796",
"0.60... | 0.6485885 | 2 |
Converts a models into dicts for use with JSONResponse. You can either pass a single model instance and get a single dict or a list of models and get a list of dicts. For security reasons only the properties in the property_list will get added. If the value of the property has a json_data function its result will be ad... | def KsC5(_yCA, Gdzo):
if hasattr(_yCA, '__iter__'):
return [KsC5(ZfUD) for ZfUD in _yCA]
zgjV = {}
for property in Gdzo:
BWXx = tZXk(_yCA, property, None)
BWXx = tZXk(BWXx, 'json_data', BWXx)
zgjV[property] = BWXx
return zgjV | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def y0Pk(FYrf, YBft=None):\n lhy8 = {}\n lhy8['data'] = []\n for C3ST in FYrf:\n lhy8['data'].append(xBXv(C3ST, includes=YBft))\n lhy8['included'] = ykYk(FYrf, includes=YBft)\n return lhy8",
"def MNRr(YKHO):\n Aofo = {}\n for hkS8, bGrB in jKi7.iteritems(YKHO.swagger_types):\n ... | [
"0.68457514",
"0.6322127",
"0.61396295",
"0.60496145",
"0.6048057",
"0.6035892",
"0.59778166",
"0.5969588",
"0.5961931",
"0.59346116",
"0.5874061",
"0.58378595",
"0.5777784",
"0.5769778",
"0.57279223",
"0.57146996",
"0.56377786",
"0.563009",
"0.5613258",
"0.5603948",
"0.55694... | 0.6966775 | 0 |
Evaluate the checkerboard function on a given set of points. | def YEmv(YKHO, W0Eb):
p5ad, DgzE = W0Eb[:2]
nPrm = YKHO.amplitude * oyIN.sin(2 * oyIN.pi / YKHO.w_east_ * p5ad) * oyIN.cos(2 * oyIN.pi / YKHO.w_north_ * DgzE)
return nPrm | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HRXF(YKHO, LTIa):\n YKHO._nr_of_fevals += len(LTIa)\n Aofo = YKHO._fn(LTIa)\n if type(Aofo) != ht2j.Tensor:\n qmLP.warn('The passed function did not return a torch.tensor. Will try to convert. Note that this may be slow as it results in memory transfers between CPU and GPU, if torchquad uses th... | [
"0.63399976",
"0.6103931",
"0.5966997",
"0.5803717",
"0.57983106",
"0.5683957",
"0.56591696",
"0.56069857",
"0.5553116",
"0.5533481",
"0.5499844",
"0.5486918",
"0.5479",
"0.5477738",
"0.54774857",
"0.546166",
"0.546166",
"0.546166",
"0.546166",
"0.546166",
"0.546166",
"0.54... | 0.0 | -1 |
Display the screen to edit or delete users.. | def kEqD(HZrX, rOvJ, kCQG, sQcT, XeOP, vwfy, tO9_=None, nyyK=None):
GPtr = g59n(rOvJ + 'config.ini')
_04B = GPtr['templatedir']
MZWo = int(sQcT['admin'])
MxIU = _rvh(_04B + P9wK)
MxIU = MxIU.replace('**this script**', kCQG + '?action=' + XeOP)
MxIU = MxIU.replace('**admin menu**', kCQG + '?login... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TQR6(uJjO):\n CBIr = mv1M.query.get_or_404(uJjO)\n return TvZl('/edit.html', user=CBIr)",
"def GFx6(uJjO):\n CBIr = mv1M.query.get_or_404(uJjO)\n return TvZl('User_Edit_Page.html', user=CBIr)",
"def sA2_(uJjO):\n CBIr = mv1M.query.get_or_404(uJjO)\n return TvZl('edit.html', user=CBIr)",
... | [
"0.72711027",
"0.7260433",
"0.7211115",
"0.7168453",
"0.7139195",
"0.7064024",
"0.703294",
"0.70055157",
"0.6963055",
"0.6954319",
"0.69460267",
"0.693501",
"0.69319785",
"0.6913999",
"0.6888272",
"0.68851644",
"0.68765384",
"0.68575007",
"0.6854184",
"0.6853677",
"0.6813513"... | 0.0 | -1 |
Assume that the distance modulus is Gaussian (when using the mean the sigma from 50th16th and 84th16th percentile) | def VPpF(mUPb, Z9_u, kNN3, cKM7):
DdRp, w7So, LOr2 = NHvT([mUPb, Z9_u, kNN3])
VQNx = 0.5 * (LOr2 - DdRp)
A3TZ = oyIN.random.normal(w7So, scale=VQNx, size=cKM7)
return UXPj(A3TZ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M7zG(mUPb, Z9_u, kNN3, cKM7):\n DdRp, w7So, LOr2 = NHvT([mUPb, Z9_u, kNN3])\n NmfX = oyIN.abs(oyIN.random.normal(loc=0.0, scale=w7So - DdRp, size=cKM7))\n K9xc = oyIN.abs(oyIN.random.normal(loc=0.0, scale=LOr2 - w7So, size=cKM7))\n V68G = oyIN.concatenate((oyIN.ones(int(cKM7 / 2)), oyIN.zeros(cKM7 ... | [
"0.6870482",
"0.6583699",
"0.6567222",
"0.6526428",
"0.65139544",
"0.65082145",
"0.6488396",
"0.6464626",
"0.6452942",
"0.6433855",
"0.64268327",
"0.6402113",
"0.638121",
"0.6376597",
"0.6360762",
"0.6348039",
"0.63286513",
"0.6303303",
"0.6294082",
"0.62897843",
"0.6275205",... | 0.0 | -1 |
Assume that the distance modulus is Gaussian (when using the mean the sigma from 50th16th and 84th16th percentile) | def RaWE(mUPb, Z9_u, kNN3, cKM7):
VQNx = 0.5 * (kNN3 - mUPb)
return oyIN.random.normal(Z9_u, scale=VQNx, size=cKM7).clip(min=0.0001) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M7zG(mUPb, Z9_u, kNN3, cKM7):\n DdRp, w7So, LOr2 = NHvT([mUPb, Z9_u, kNN3])\n NmfX = oyIN.abs(oyIN.random.normal(loc=0.0, scale=w7So - DdRp, size=cKM7))\n K9xc = oyIN.abs(oyIN.random.normal(loc=0.0, scale=LOr2 - w7So, size=cKM7))\n V68G = oyIN.concatenate((oyIN.ones(int(cKM7 / 2)), oyIN.zeros(cKM7 ... | [
"0.6870482",
"0.6583699",
"0.6567222",
"0.6526428",
"0.65139544",
"0.65082145",
"0.6488396",
"0.6464626",
"0.6452942",
"0.6433855",
"0.64268327",
"0.6402113",
"0.638121",
"0.6376597",
"0.6360762",
"0.6348039",
"0.63286513",
"0.6303303",
"0.6294082",
"0.62897843",
"0.6275205",... | 0.0 | -1 |
Test quick sort of arrays iterative method. | def ITVr(qw7D):
FX5V = qw7D[:]
lguw(qw7D, 0, len(qw7D) - 1)
assert qw7D == sorted(FX5V) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lguw(ezWE):\n global comp, swaps\n ezWE = lSgV(ezWE)\n print(f'compares={Alkp!r}')\n print(f'swaps={u7iQ!r}')\n return ezWE",
"def ITVr(YKHO):\n nPrm = [4, 78, 2, 33, 0, 99, 86, 4, 21, 3]\n aEqx = [0, 2, 3, 4, 4, 21, 33, 78, 86, 99]\n hlel = lguw(nPrm, 0, len(nPrm) - 1)\n YKHO.asse... | [
"0.77268547",
"0.76584786",
"0.74905694",
"0.748321",
"0.7452547",
"0.7436746",
"0.7330596",
"0.7318552",
"0.73099834",
"0.7307172",
"0.72679096",
"0.72345155",
"0.7214789",
"0.71927357",
"0.71871316",
"0.71637386",
"0.70887375",
"0.7064297",
"0.70378035",
"0.6997922",
"0.698... | 0.81024945 | 0 |
Detokenizes a list of tokens | def AhC7(YKHO, s2mk: List[str]) -> str:
return YKHO.moses_detokenizer.detokenize(s2mk) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AhC7(jWWN, b0j5):\n for YRbF in range(len(jWWN)):\n if jWWN[YRbF] in '”’)]}>.,?!:;-_':\n jWWN[YRbF] = '##' + jWWN[YRbF]\n if YRbF != len(jWWN) - 1:\n if jWWN[YRbF] in '“([{<-_' or (jWWN[YRbF] == '’' and jWWN[YRbF + 1] == 's'):\n jWWN[YRbF + 1] = '##' + jWWN... | [
"0.6882925",
"0.6575076",
"0.6456986",
"0.64232033",
"0.636449",
"0.6324523",
"0.63222533",
"0.630812",
"0.630812",
"0.62860835",
"0.6257688",
"0.6255118",
"0.6250554",
"0.6226884",
"0.6184489",
"0.6177838",
"0.6133589",
"0.60859025",
"0.60516846",
"0.60299647",
"0.5981844",
... | 0.78571475 | 0 |
split path tree into list | def KkWy(pmON):
ucBt = []
while True:
pmON, xtX7 = Hy7s.path.split(pmON)
if xtX7 != '':
ucBt.insert(0, xtX7)
else:
if pmON != '':
ucBt.insert(0, pmON)
break
return ucBt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KkWy(pmON):\n TLI7 = pmON\n eQ8x = []\n while True:\n TLI7, kjp6 = Hy7s.path.split(TLI7)\n if kjp6:\n eQ8x = [kjp6] + eQ8x\n else:\n break\n return eQ8x",
"def SFqc(YKHO, pmON):\n lpha = []\n while pmON is not None and pmON != '':\n sdCG, J3... | [
"0.7390191",
"0.73064005",
"0.717627",
"0.7148945",
"0.7120519",
"0.7117719",
"0.7108605",
"0.7107753",
"0.7105846",
"0.7067393",
"0.70179945",
"0.69476837",
"0.69141865",
"0.6906585",
"0.6860372",
"0.68597406",
"0.6807076",
"0.67671424",
"0.67589486",
"0.6741158",
"0.6720822... | 0.70688933 | 9 |
Convert a vector of variables to a dictionary with factor keys Arguments | def cLiu(YKHO, iArr):
sjBt = {'allowable_diff': iArr[0]}
return sjBt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cLiu(YKHO, iArr):\n sjBt = {'capacity': iArr[:]}\n return sjBt",
"def cLiu(YKHO, iArr):\n sjBt = {'capacity': iArr[:]}\n return sjBt",
"def aUeH(YKHO, iArr):\n cK_b = {}\n for H5ew, wEf2 in YKHO.param_index_dict.items():\n if isinstance(wEf2, list):\n cK_b[H5ew] = []\n ... | [
"0.6669021",
"0.6669021",
"0.6569636",
"0.6324606",
"0.6297331",
"0.61304885",
"0.6124497",
"0.6095098",
"0.6020564",
"0.6013242",
"0.59873515",
"0.59097844",
"0.59025574",
"0.5890616",
"0.58791995",
"0.5835469",
"0.5833775",
"0.577873",
"0.5777782",
"0.5760091",
"0.57501537"... | 0.67929137 | 0 |
Create the matrix of the discrete Laplacian operator in two dimensions on a kbyk grid. | def iy_D(G1Hx):
P5tZ = []
for WKvO in range(G1Hx):
for LVAh in range(G1Hx):
rdlD = WKvO + G1Hx * LVAh
fvDH = rdlD
P5tZ.append((rdlD, fvDH, 4.0))
if WKvO > 0:
fvDH = rdlD - 1
P5tZ.append((rdlD, fvDH, -1.0))
if WKv... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uyvd(YKHO):\n Oa1e = lambda YRbF, r845: 1 if oyIN.abs(YRbF - r845) <= oyIN.floor(YKHO._s * 0.5) else 0\n T3TX = oyIN.array([[Oa1e(YRbF, r845) for r845 in range(YKHO._T)] for YRbF in range(YKHO._T)])\n NuUb = oyIN.diag(oyIN.sum(T3TX, axis=0))\n SXDc = NuUb - T3TX\n YKHO._Lp = SXDc",
"def JDZ5(j... | [
"0.723847",
"0.68788946",
"0.6662104",
"0.6366781",
"0.6365347",
"0.62644184",
"0.6212691",
"0.6200712",
"0.6083356",
"0.6083356",
"0.60824245",
"0.5971158",
"0.59692866",
"0.5954948",
"0.5852638",
"0.5808672",
"0.578794",
"0.57743263",
"0.5768418",
"0.5768418",
"0.5767027",
... | 0.59308714 | 14 |
Make a small k=4 version of the temperature matrix, as a dense array | def CpV3():
k0lF = iy_D(4)
return k0lF.toarray() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NG8_(YKHO):\n vb7U = oyIN.zeros(YKHO.shape)\n for rdlD in YKHO.matrix:\n for nPrm in rdlD:\n vb7U[nPrm[0], nPrm[1]] = nPrm[2]\n return vb7U",
"def NG8_(YKHO) -> auK0[HWEd, 'N N']:\n return oLG2.zeros(YKHO.shape)",
"def vIwE(YKHO, Oa1e) -> oyIN.ndarray:\n return YKHO.T_0_Kel... | [
"0.6201808",
"0.61059654",
"0.60266894",
"0.6011901",
"0.5837729",
"0.57930815",
"0.5771926",
"0.57463294",
"0.56897455",
"0.5673374",
"0.56719124",
"0.5663375",
"0.56196845",
"0.5612287",
"0.5595781",
"0.55874896",
"0.5585089",
"0.5581489",
"0.5581489",
"0.5569721",
"0.55396... | 0.0 | -1 |
Groups the answers to all of the questions into their respective answer sets. | def ytD6(YKHO):
DUgn = {}
for eQSh in YKHO.question_stats:
for ANfV in eQSh.answers:
if ANfV.uuid in DUgn:
DUgn[ANfV.uuid].append(ANfV)
else:
DUgn[ANfV.uuid] = [ANfV]
KLOP = []
for qxeD, rRTz in DUgn.items():
nxto = Z_QW(YKHO.quiz, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def flFF(YKHO):\n WlEx = YKHO.get_ordered_questions()\n for ZKq1 in YKHO.random_questions.all():\n WlEx += ZKq1.get_random_questions()\n OI9q = WlEx\n return OI9q",
"def wQGk(yuzh, YXSZ, rWe7=' >> '):\n rRTz = U8Lr()\n for U15x, yqjZ in zip(YXSZ, YXSZ[1:] + [None]):\n rRTz[U15x] =... | [
"0.703409",
"0.6891515",
"0.6436331",
"0.6352773",
"0.622713",
"0.6204342",
"0.6145911",
"0.6128088",
"0.6024353",
"0.59832346",
"0.59747374",
"0.5969873",
"0.5967909",
"0.59445965",
"0.58954597",
"0.5888098",
"0.5860783",
"0.58226585",
"0.580716",
"0.57984704",
"0.5785339",
... | 0.7733975 | 0 |
return the correct representation of the Station class | def wHJl(YKHO):
return f'{YKHO._name} at position (long: {YKHO._longitude}, lat: {YKHO._latitude})' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZknQ(YKHO):\n return YKHO.s",
"def wHJl(YKHO):\n TGqS = ', '.join(YKHO.sr.station_id.to_list())\n b3ET = ', '.join([f'({k78t.value}/{__n6.value})' for k78t, __n6 in YKHO.sr.stations.parameter])\n RgLF = YKHO.sr.stations.period and ', '.join([pQ4c.value for pQ4c in YKHO.sr.stations.period])\n r... | [
"0.7019052",
"0.6925851",
"0.67124116",
"0.67076665",
"0.670572",
"0.65197617",
"0.6224483",
"0.6190375",
"0.6178395",
"0.6169084",
"0.6124982",
"0.60830796",
"0.605634",
"0.6004158",
"0.5988462",
"0.5959409",
"0.5944436",
"0.5942844",
"0.594202",
"0.5912883",
"0.5905509",
... | 0.5478017 | 98 |
r""" Get relation representations as concatenation of averaged head and tail embeddings. | def zdlu(YKHO, MMe4: torch.FloatTensor, HEZd: MatchSideEnum) -> ht2j.FloatTensor:
return ht2j.cat([YKHO.head_to_rel[HEZd] @ MMe4, YKHO.tail_to_rel[HEZd] @ MMe4], dim=-1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VGA7(Oa1e):\n x55F = g760.defaultdict(list)\n for ZfUD in Oa1e:\n x55F[ZfUD[0]].append(ZfUD)\n tclG = {}\n for wvau, eQSh in x55F.items():\n tclG[wvau] = [Wu7y(eQSh), len(eQSh)]\n return tclG",
"def z_aV(YKHO):\n return CwDs.concat([YKHO.prem.texts(), YKHO.hyp.texts()])",
"d... | [
"0.54385555",
"0.5416005",
"0.53665733",
"0.52411723",
"0.52145386",
"0.52133673",
"0.51821995",
"0.516374",
"0.515812",
"0.510018",
"0.5095649",
"0.5074746",
"0.5070593",
"0.50191027",
"0.50043535",
"0.49868038",
"0.49821812",
"0.49448103",
"0.494123",
"0.4940241",
"0.493297... | 0.60644704 | 0 |
Variable code name This is implemented as a property method because the ``id`` of the ``Variable`` is a tuple containing the population name and the variable code name, so this property method returns just the variable code name portion. That way, storage does not need to be duplicated. | def mWFP(YKHO) -> str:
return YKHO.id[-1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Es0b(YKHO, XuY2: str):\n return eekw(YKHO.get('instance-name')) + '_' + eekw(XuY2)",
"def Es0b(YKHO) -> str:\n return YKHO._data[GDa9.VARIABLE_KEY]",
"def Es0b(YKHO) -> str:\n return YKHO._variable",
"def RZu0(YKHO):\n return YKHO.variable",
"def W0tD(YKHO):\n return YKHO.variable",
"d... | [
"0.7207376",
"0.7199308",
"0.7197026",
"0.69571817",
"0.6709511",
"0.66933084",
"0.6471379",
"0.64444846",
"0.6428141",
"0.64197874",
"0.64043105",
"0.63788104",
"0.6364526",
"0.63169056",
"0.6312332",
"0.6310831",
"0.6299733",
"0.6297176",
"0.6287393",
"0.6258892",
"0.622594... | 0.0 | -1 |
Balance junction inflows and outflows This is the primary update for a junction where outflows are adjusted so that they equal the inflows. It's analogous to `resolve_outflows` as a primary update method, but it takes place at a separate integration stage (once the outflows for normal compartments have been finalized, ... | def wMl7(YKHO, xTkX: int) -> None:
Cbyd = 0
if YKHO.duration_group:
for QZnA in YKHO.inlinks:
Cbyd += QZnA._vals[:, xTkX]
else:
for QZnA in YKHO.inlinks:
Cbyd += QZnA.vals[xTkX]
Y4Oa = [QZnA.parameter.vals[xTkX] for QZnA in YKHO.outlinks]
ZySb = sum(Y4Oa)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wMl7(YKHO, xTkX: int) -> None:\n Cbyd = oyIN.array([0], dtype=float)\n if YKHO.duration_group:\n for QZnA in YKHO.inlinks:\n Cbyd = Cbyd + QZnA._vals[:, xTkX]\n else:\n for QZnA in YKHO.inlinks:\n Cbyd += QZnA.vals[xTkX]\n Y4Oa = oyIN.zeros(len(YKHO.outlinks))\n ... | [
"0.63054466",
"0.56226915",
"0.5513681",
"0.5415952",
"0.53246474",
"0.5324149",
"0.53112984",
"0.52392846",
"0.52376926",
"0.5204897",
"0.52024645",
"0.5172087",
"0.5082017",
"0.49702206",
"0.49516228",
"0.48808885",
"0.484302",
"0.48416558",
"0.4788013",
"0.4786422",
"0.477... | 0.59320915 | 1 |
Check whether variables can be resolved This function returns True if ``Population.get_variable(item)`` would result in some variables being returned. This facilitates checking whether a population contains particular variables for example, transfer links may only exist in a subset of the model populations, or if popul... | def FYXB(YKHO, ZfUD: str) -> bool:
try:
YKHO.get_variable(ZfUD)
return True
except mgaz:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fXJd(YKHO, GLrz):\n GLrz = GLrz.split('.')[1]\n if GLrz in YKHO.staticVariables or GLrz in YKHO.dynamicVariables:\n return True\n return False",
"def AlZS(YKHO):\n return True",
"def jeJs(YKHO, EWHC=False):\n v3uw = {}\n for QTBn in YKHO.list_of_states:\n for H5ew, BWXx in Q... | [
"0.67491645",
"0.66222256",
"0.65969956",
"0.64438754",
"0.6361894",
"0.62871134",
"0.6276854",
"0.62717295",
"0.6262813",
"0.623697",
"0.6227942",
"0.6225976",
"0.6225078",
"0.61930615",
"0.61623114",
"0.6149755",
"0.6130272",
"0.6128708",
"0.6124674",
"0.6080358",
"0.604609... | 0.6054757 | 20 |
This test verifies that the home page works correctly | def rKWs():
geh0 = P4t4.test_client().get('/')
assert geh0.status_code == 200
assert b'Welcome to JobCruncher!' in geh0.data
assert b'So why use JobCruncher instead?' in geh0.data | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rKWs(YKHO):\n geh0 = YKHO.client.get(nKyW('home'))\n YKHO.assertEqual(geh0.status_code, 200)",
"def GvGQ(YKHO, x0hE):\n geh0 = x0hE.get(nKyW('page.home'))\n assert geh0.status_code == 200",
"def qEah(YKHO):\n pass",
"def gk60(YKHO):\n geh0 = YKHO.client.get(nKyW('home'))\n YKHO.asser... | [
"0.9142871",
"0.89372826",
"0.8873179",
"0.88514274",
"0.87874866",
"0.8762629",
"0.8755602",
"0.87257946",
"0.8722716",
"0.86970824",
"0.86815643",
"0.8642523",
"0.863702",
"0.86331207",
"0.8630068",
"0.86148626",
"0.8588518",
"0.8553139",
"0.8529203",
"0.8500879",
"0.846661... | 0.82990754 | 38 |
This test verifies that the search page works correctly when given input does not match any entries in the database | def aaUX():
geh0 = P4t4.test_client().post('/search', data={'title': 'zzzzzzzzzzz', 'type': 'yyyyyyyyyyy', 'location': 'xxxxxxx', 'companyName': 'wwwwwwww', 'skills': 'vvvvvvvvv'})
assert geh0.status_code == 200
assert b'Sorry, there are no current openings with given criteria' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZYAw(YKHO):\n Ozko = B2Dn.MainPage(YKHO.driver)\n Ozko.search_text_element = 'test invalid data'\n Ozko.click_go_button()\n assert 'No results were found' in YKHO.driver.page_source",
"def RhIx(YKHO):\n geh0 = YKHO.client.get(gxEw('core:search') + '?q=Angel')\n YKHO.assertEqual(geh0.status_... | [
"0.7741595",
"0.76355326",
"0.7512646",
"0.75080067",
"0.7494903",
"0.74345803",
"0.7373106",
"0.7227491",
"0.72271",
"0.71926033",
"0.71632254",
"0.7153671",
"0.71194434",
"0.711026",
"0.71090585",
"0.70810944",
"0.7067246",
"0.70491576",
"0.70155054",
"0.6990111",
"0.697142... | 0.70889324 | 15 |
Merges a list of dicts into a single dict containing the mean value. | def roQF(YDX_):
R8cc = {}
R8cc = R8cc.fromkeys(YDX_[0].keys(), [])
for H5ew in R8cc.keys():
R8cc[H5ew] = oyIN.mean([Csk6[H5ew].item() for Csk6 in YDX_])
return R8cc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VQO9(GBaN):\n h8lD = dict()\n for H5ew in GBaN[0].keys():\n h8lD[H5ew] = ht2j.mean(ht2j.stack([Csk6[H5ew] for Csk6 in GBaN]), axis=0)\n return h8lD",
"def zZBH(gc_b: Dict[str, List]) -> dict:\n yvT9 = {}\n for G1Hx, Ty9i in gc_b.items():\n yvT9[G1Hx] = oyIN.mean(Ty9i)\n return... | [
"0.76576924",
"0.73454225",
"0.65332377",
"0.64551306",
"0.6440626",
"0.6361903",
"0.6336772",
"0.63347954",
"0.6314521",
"0.6263862",
"0.62634724",
"0.6166244",
"0.6161002",
"0.6134319",
"0.6082188",
"0.60773575",
"0.60766613",
"0.60766613",
"0.6070075",
"0.60656506",
"0.606... | 0.83461577 | 0 |