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 |
|---|---|---|---|---|---|---|
Yield the preterminals one at a time in BACKWARDS order This is done reversed as it is a frequently used method in the parser, so this is a tiny optimization | def Mlku(YKHO):
Ziit = MUE7()
Ziit.append(YKHO)
while len(Ziit) > 0:
Q6kx = Ziit.pop()
if len(Q6kx.children) == 0:
raise ValueError('Got called with an unexpected tree layout: {}'.format(YKHO))
elif Q6kx.is_preterminal():
yield Q6kx
else:
Z... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Nl91(YKHO):\n E5BI = [YKHO]\n while E5BI:\n Q6kx = E5BI.pop()\n yield Q6kx\n E5BI.extend(Q6kx.children[::-1])",
"def Nl91(YKHO):\n yield YKHO\n for Q6kx in YKHO.children:\n if Q6kx:\n for exwG in Q6kx.preorder():\n yield exwG",
"def apmG(YKH... | [
"0.7263014",
"0.69632477",
"0.6737437",
"0.66297257",
"0.66297257",
"0.66297257",
"0.6609668",
"0.65260154",
"0.6458913",
"0.64575016",
"0.64477307",
"0.64424944",
"0.6360483",
"0.63243073",
"0.6313455",
"0.63075805",
"0.6248736",
"0.6248271",
"0.62421405",
"0.6220292",
"0.62... | 0.7527819 | 0 |
Updates the weights according to STDP. | def MyUA(YKHO, bOIK, NmYP):
if YKHO.time_delta is None:
return YKHO.current_weights
yfHK = bOIK.shape[0]
DZdr = NmYP - YKHO.effective_ltp_window
d29C = _qLf(bOIK[:, DZdr:NmYP + 1])
if YKHO.time_delta == 0:
for YRbF in range(0, YKHO.num_afferents):
B5pS = YKHO.calculate_ti... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FUu9(YKHO):\n YKHO.input_weights = XTiz.array(YKHO.input_weights) + XTiz.array(YKHO.weight_modifier)",
"def MyUA(YKHO):\n YKHO.vw = YKHO.mc * YKHO.vw + YKHO.lr * YKHO.d_w\n YKHO.vb = YKHO.mc * YKHO.vb + YKHO.lr * YKHO.d_b\n YKHO.w += YKHO.vw\n YKHO.b += YKHO.vb",
"def MyUA(YKHO, P6bq, XP5J, ... | [
"0.7475189",
"0.72866684",
"0.7181688",
"0.7081725",
"0.70395064",
"0.703583",
"0.70330054",
"0.7029762",
"0.7009681",
"0.69981146",
"0.6982633",
"0.69634086",
"0.6961482",
"0.6937359",
"0.6937359",
"0.6934703",
"0.6925361",
"0.68909323",
"0.68667346",
"0.6827118",
"0.6803614... | 0.0 | -1 |
Given vectors of spikes and weights update the EPSP contributions. | def Nu9n(YKHO, d29C):
if YKHO.time_delta == 0:
YKHO.epsps = oyIN.zeros((YKHO.num_afferents, 1))
else:
qHDB = oyIN.multiply(d29C, YKHO.current_weights)
YKHO.epsps = oyIN.hstack((YKHO.epsps, qHDB))
TVTK = YKHO.epsps.shape[1]
if TVTK > YKHO.t_window:
qnFQ = TVTK ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sUFK(YKHO, LVAh, XP5J, WKvO, yzQ0):\n for YRbF in WKvO.keys():\n Oa1e = (XP5J - LVAh) * WKvO[YRbF]\n KCHu = (PZyS(YKHO.n[YRbF] + Oa1e * Oa1e) - PZyS(YKHO.n[YRbF])) / YKHO.alpha\n YKHO.z[YRbF] += Oa1e - KCHu * yzQ0[YRbF]\n YKHO.n[YRbF] += Oa1e * Oa1e",
"def QdZT(YKHO, F_On, _mSQ... | [
"0.68008184",
"0.67835754",
"0.63410187",
"0.6209286",
"0.61407375",
"0.61407375",
"0.6105061",
"0.6073121",
"0.59603685",
"0.5873672",
"0.5867973",
"0.5836783",
"0.5834993",
"0.58128834",
"0.58051276",
"0.57820785",
"0.5771147",
"0.5726859",
"0.5721563",
"0.56835914",
"0.567... | 0.67677844 | 2 |
Return the current membrane potential. | def nHFa(YKHO, NmYP):
JiZR = YKHO.calculate_psp()
ikEC = YKHO.sum_epsps()
CanW = YKHO.sum_ipsps(NmYP)
return JiZR + ikEC + CanW | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ctTV(YKHO):\n return YKHO._membrane",
"def ebiP(YKHO) -> None:\n YKHO.i_net = YKHO.net * (YKHO.spec.e_rev_e - YKHO.v_m) + YKHO.spec.gc_l * (YKHO.spec.e_rev_l - YKHO.v_m) + YKHO.gc_i * (YKHO.spec.e_rev_i - YKHO.v_m)\n YKHO.v_m += (YKHO.spec.integ * YKHO.spec.vm_dt * (YKHO.i_net - YKHO.adapt)).clamp(-... | [
"0.7330021",
"0.6942138",
"0.6867457",
"0.652421",
"0.6289098",
"0.6205843",
"0.61848176",
"0.617388",
"0.60810125",
"0.6071787",
"0.6060471",
"0.6049852",
"0.6049532",
"0.6032215",
"0.5998154",
"0.5990355",
"0.5946218",
"0.5892655",
"0.58553034",
"0.5845716",
"0.5843544",
... | 0.6206156 | 5 |
Calculate the value of the mu kernel. | def Axts(YKHO, RA_F):
if RA_F is None or RA_F > YKHO.t_window:
return 0
_hZ2 = YKHO.calculate_epsilon(RA_F)
yGTL = -YKHO.alpha * YKHO.theta * _hZ2
return yGTL | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yGTL(YKHO):\n return YKHO._mu",
"def yGTL(YKHO):\n return -oyIN.log(YKHO.rate) - YKHO.sigma ** 2 / 2",
"def bwRG(YKHO):\n return YKHO.mu",
"def bwRG(YKHO):\n return YKHO._mu",
"def yGTL(YKHO):\n return oyIN.mean(YKHO.samples())",
"def bwRG(YKHO):\n return YKHO['_mu']",
"def yGTL(Y... | [
"0.7394931",
"0.7129274",
"0.70496815",
"0.70017236",
"0.69420123",
"0.6939918",
"0.6925742",
"0.68232185",
"0.68201286",
"0.6805688",
"0.6741195",
"0.66817987",
"0.6679516",
"0.6611042",
"0.6607692",
"0.65991116",
"0.65621394",
"0.6507701",
"0.64999896",
"0.64670074",
"0.640... | 0.64579695 | 20 |
Forward modeltakes in state vector and returns the binned model points to compare directly to data. Be sure to change planet parameters when going to a new planet! | def AOlJ(WKvO, fNvl, _ZIP, Vpn2, _8Uz, CAur, LEyJ, SXfs, lvXp=None, pyDg=None):
fSJX = WKvO[0]
orFz = WKvO[1]
mBOV = WKvO[2]
kLhV = 10.0 ** WKvO[3]
pYAA = 10.0 ** WKvO[4]
PrDi = WKvO[5]
fPG5 = WKvO[6]
KFyH = WKvO[7]
cJO4 = WKvO[8]
E3D9 = WKvO[9]
AlP4 = 10 ** WKvO[10]
OFik... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVH6(YKHO, QTBn):\n GicI = QTBn.shape[0]\n WKvO = vuvg.relu(YKHO.linear1(QTBn))\n WKvO = vuvg.relu(YKHO.linear2(WKvO))\n WKvO = YKHO.head(WKvO)\n a7D2 = WKvO[:, 0].reshape(-1, 1)\n Jvq9 = WKvO[:, 1].reshape(-1, 1)\n bxdA = WKvO[:, 2].reshape(-1, 1)\n a7D2 = ht2j.tanh(a7D2)\n Jvq9 = h... | [
"0.62644625",
"0.6233174",
"0.6233174",
"0.6233174",
"0.5948702",
"0.59486663",
"0.58802634",
"0.58755547",
"0.58661664",
"0.5864752",
"0.5857133",
"0.5829103",
"0.5797635",
"0.5787436",
"0.57817227",
"0.57603914",
"0.57603914",
"0.57603914",
"0.57603914",
"0.57552356",
"0.57... | 0.0 | -1 |
Load model from file. | def uyMl(Ux0P: str):
return tyeH(Ux0P) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uyMl(Ux0P):\n pass",
"def uyMl(Ux0P):\n raise NotImplementedError()",
"def uyMl(YKHO, WJHQ):\n raise NotImplementedError",
"def J2u4(YKHO, pmON):\n YKHO._model = uyMl(pmON)\n print('Loaded model from file.')",
"def tyeH(YKHO, SkYi: Path) -> None:\n pass",
"def uyMl(YKHO, gIsw):\n ... | [
"0.87157947",
"0.8696808",
"0.866538",
"0.86528605",
"0.86259127",
"0.86112756",
"0.8606326",
"0.85732746",
"0.8467336",
"0.8420413",
"0.83917266",
"0.8389066",
"0.8389066",
"0.8389066",
"0.8307683",
"0.830101",
"0.8281648",
"0.80788356",
"0.80664116",
"0.8062204",
"0.8034796... | 0.8373264 | 14 |
Function for value normalization | def NkkI(YKHO, WKvO, gqRb=0, ODP9=1):
if ODP9 <= gqRb:
return 0
if WKvO >= ODP9:
return 1
if WKvO <= gqRb:
return 0
return (WKvO - gqRb) / (ODP9 - gqRb) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NkkI(YKHO):\n CkYf = YKHO.norm()\n YKHO.values /= CkYf",
"def OEry(YKHO, WKvO):\n if len(WKvO) > 1:\n WKvO = (WKvO - min(WKvO)) / (max(WKvO) - min(WKvO))\n return WKvO",
"def NkkI(JBMS, ee6l, BWXx):\n return (BWXx - JBMS) / ee6l",
"def NkkI(WKvO):\n return WKvO / CkYf(WKvO)",
"... | [
"0.7806653",
"0.77547747",
"0.7699499",
"0.7689483",
"0.76674414",
"0.7660334",
"0.763919",
"0.7602091",
"0.75978464",
"0.75575525",
"0.7526123",
"0.7525623",
"0.75121605",
"0.7511711",
"0.75042105",
"0.7502056",
"0.74666953",
"0.74666953",
"0.7454647",
"0.74322367",
"0.74094... | 0.0 | -1 |
This function returns True if num is even else False | def BnE9(FGW3):
if FGW3 % 2 == 0:
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vDsO(mLGw):\n if mLGw % 2 == 0:\n return True\n else:\n return False",
"def ubP8(mLGw):\n return mLGw % 2 == 0",
"def ubP8(mLGw):\n return mLGw % 2 == 0",
"def vf3I(mLGw):\n return mLGw % 2 == 0",
"def qG84(mLGw: int) -> bool:\n if mLGw % 2 == 0:\n return True\n ... | [
"0.87729686",
"0.8749542",
"0.8749542",
"0.8687289",
"0.86659986",
"0.86331373",
"0.85961705",
"0.8577728",
"0.85286784",
"0.8472148",
"0.8436545",
"0.83770376",
"0.83724034",
"0.83724034",
"0.83724034",
"0.83724034",
"0.8361079",
"0.83574426",
"0.8334341",
"0.8328926",
"0.83... | 0.85590065 | 8 |
This functions returns True if number1 < number2 else False | def fbcx(gdXy, DWMs):
if gdXy < DWMs:
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H2hK(YKHO, gdXy, DWMs):\n Aofo = gdXy < int(DWMs)\n return Aofo",
"def W8Vm(jzdc, Fg_i: int):\n if Fg_i > jzdc:\n return True\n elif jzdc > Fg_i:\n return False\n elif jzdc == Fg_i:\n return -1",
"def W6zL(jzdc, Fg_i):\n if jzdc < Fg_i:\n return True\n else:... | [
"0.8619911",
"0.7778696",
"0.77543366",
"0.77454746",
"0.76604044",
"0.7567457",
"0.7558384",
"0.7529604",
"0.74810827",
"0.7451289",
"0.7439793",
"0.7409997",
"0.72930086",
"0.7290015",
"0.72375226",
"0.7234357",
"0.72168124",
"0.7191847",
"0.7189421",
"0.7187792",
"0.715615... | 0.8760884 | 0 |
Split a pathname into components (the opposite of os.path.join) in a platformneutral way. | def c6pt(pmON, Aofo=None):
if Aofo is None:
Aofo = []
sdCG, J3uN = Hy7s.path.split(pmON)
if sdCG == '':
return [J3uN] + Aofo
if sdCG == pmON:
return Aofo
return c6pt(sdCG, [J3uN] + Aofo) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lpha(YKHO, pmON):\n raise NotImplementedError",
"def eQ8x(pmON):\n return Hy7s.path.split(pmON)",
"def KkWy(pmON):\n return Hy7s.path.normpath(pmON).strip('/').split('/')",
"def eQ8x(pmON):\n return pmON.lstrip(Hy7s.sep).rstrip(Hy7s.sep).split(Hy7s.sep)",
"def KkWy(pmON):\n pmON = Hy7s.p... | [
"0.7318286",
"0.72786045",
"0.72260725",
"0.72021437",
"0.7157938",
"0.71526974",
"0.7046175",
"0.7040051",
"0.6968414",
"0.6958091",
"0.69112074",
"0.6909565",
"0.6882334",
"0.6874157",
"0.6852186",
"0.6852186",
"0.6815774",
"0.678075",
"0.6760369",
"0.6735989",
"0.6713664",... | 0.6109369 | 73 |
turtle.setpos(10,10) turtle.pd() turtle.fd(5) turtle.right(90) turtle.fd(5) turtle.right(90) turtle.fd(5) turtle.right(90) turtle.fd(5) turtle.right(90) turtle.pu() | def FIMM(YKHO, qyuF, **B2fa):
YKHO.fenetre = qyuF
LQRw.__init__(YKHO, qyuF, background='blue', width=500, height=200, **B2fa)
YKHO.pack(fill=_Z54, expand=1)
YKHO.bouton_retour = None
YKHO.message = seYU(YKHO, text='BattleShip', font=('Helvetica', 24, 'bold italic'), fg='white', bg='black')
YKHO.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eCGt():\n ZbiO.up()\n ZbiO.seth(90)",
"def DRUf():\n ZbiO.forward(30)\n ZbiO.left(45)\n ZbiO.forward(30)\n ZbiO.left(135)\n ZbiO.forward(30)\n ZbiO.left(45)\n ZbiO.forward(30)\n ZbiO.left(135)",
"def DbxN():\n ZbiO.up()\n ZbiO.setpos(-200, -200)\n ZbiO.down()",
"def... | [
"0.7721797",
"0.76967585",
"0.768017",
"0.7504615",
"0.7411933",
"0.7232377",
"0.7199553",
"0.7193646",
"0.7179615",
"0.7177473",
"0.7130193",
"0.7097336",
"0.7085748",
"0.7077979",
"0.7053346",
"0.7045897",
"0.69684225",
"0.69302356",
"0.68940324",
"0.6791168",
"0.6780273",
... | 0.0 | -1 |
Tests whether ``ApplicationEntity.from_data`` works as intended. | def cNNK():
UXqo = 202211240047
mWFP = 'Red'
nPrm = {'id': str(UXqo), 'name': mWFP}
_it5 = p1UJ.from_data(nPrm)
lgGV(_it5)
Qg87.assert_eq(_it5.id, UXqo)
Qg87.assert_eq(_it5.name, mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m7sC():\n G9Sw = 202304140003\n SkWX = RMo0(ADSq, 12)\n _G4g = RMo0(ADSq, 23)\n JBZA = 'Afraid'\n mWFP = 'Chata'\n nPrm = {'id': str(G9Sw), 'cover_image': SkWX.as_base_16_hash, 'icon': _G4g.as_base_16_hash, 'description': JBZA, 'name': mWFP}\n _DQl = pz5i.from_data(nPrm)\n iaTU(_DQl)\n ... | [
"0.71488994",
"0.67396003",
"0.62283003",
"0.5815202",
"0.5722493",
"0.5720269",
"0.56768453",
"0.56135434",
"0.5567971",
"0.555239",
"0.5499571",
"0.5448206",
"0.54471415",
"0.54194576",
"0.54142284",
"0.53887236",
"0.5371477",
"0.5346295",
"0.5343049",
"0.5335657",
"0.52861... | 0.84040534 | 0 |
Load a json object. | def lc9H(Ux0P: str, pmON: str=''):
with open(Hy7s.path.join(pmON, Ux0P), 'r') as FYKK:
return qQXR.load(FYKK) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ddor(YKHO, TLbt):\n pass",
"def lc9H():\n pass",
"def lc9H(YKHO, **B2fa):\n if not Hy7s.path.isfile(YKHO.json_filepath):\n G9jH.error('{} is not exist'.format(YKHO.json_filepath))\n raise FileNotFoundError('{} is not exist'.format(YKHO.json_filepath))\n else:\n YKHO.coco = ... | [
"0.8318802",
"0.79723674",
"0.7601751",
"0.7507233",
"0.74617845",
"0.74402493",
"0.74369365",
"0.7421059",
"0.74131113",
"0.73831964",
"0.73735666",
"0.7332375",
"0.73193175",
"0.7304322",
"0.7281957",
"0.72573483",
"0.72414523",
"0.7220667",
"0.719749",
"0.7196151",
"0.7165... | 0.6799624 | 63 |
Save a json object. | def U1ai(YEnM, Ux0P: str, pmON: str=''):
def GCGA(YEnM):
if isinstance(YEnM, oyIN.generic):
return YEnM.item()
elif isinstance(YEnM, oyIN.ndarray):
return YEnM.tolist()
else:
raise TypeError(f'invalid json serialization type: {type(YEnM)}')
with open(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xkzz(YKHO):\n if not YKHO.to_save:\n return\n try:\n ytgA = open(YKHO.store, 'w')\n qQXR.dump(YKHO, ytgA)\n ytgA.close()\n except IOError:\n pass",
"def xkzz(YKHO):\n if YKHO.path:\n YKHO.saved = True\n with open(YKHO.path, 'w') as eHNT:\n ... | [
"0.78346384",
"0.77447957",
"0.77030516",
"0.7666441",
"0.7666441",
"0.7666441",
"0.7661529",
"0.76600945",
"0.76417464",
"0.75752777",
"0.75463355",
"0.75437886",
"0.75379825",
"0.7531511",
"0.7523382",
"0.751121",
"0.75068796",
"0.7481769",
"0.74647874",
"0.74484575",
"0.74... | 0.6932676 | 70 |
Load a file into a pandas DataFrame. | def UlWi(Ux0P: str, pmON: str='') -> rLdf.DataFrame:
VqRE = Hy7s.path.join(pmON, Ux0P)
if not Hy7s.path.isfile(VqRE):
raise FileNotFoundError(f'filepath: {VqRE} does not exist')
YBcr = Hy7s.path.splitext(VqRE)[1].lower()
if YBcr == '.json':
return rLdf.read_json(VqRE)
elif YBcr == '.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WbUU(YKHO, nUeQ):\n YKHO.dataframe = rLdf.read_csv(nUeQ)\n return",
"def bOBl(Ux0P):\n nPrm = rLdf.read_csv(Ux0P)\n return nPrm",
"def UlWi(Sd0C: Path) -> rLdf.DataFrame:\n EcVT: rLdf.DataFrame = rLdf.read_csv(filepath_or_buffer=Sd0C, index_col='note_id', usecols=['note_id', 'full_note_norm'... | [
"0.7889037",
"0.75474477",
"0.7509311",
"0.749278",
"0.74780273",
"0.74646324",
"0.745724",
"0.74352854",
"0.7423955",
"0.7411043",
"0.737927",
"0.7376326",
"0.73746574",
"0.73731714",
"0.7354512",
"0.73218626",
"0.7302293",
"0.7300173",
"0.7269098",
"0.72568893",
"0.7255736"... | 0.7318672 | 16 |
Plot the losses of D and G recorded in the train_hist dictionary during training | def GzY1(cn5Z, ZGE9, xkzz, n80H):
DgpE, OvX0 = (cn5Z['Loss_D'], cn5Z['Loss_G'])
LZpg, hh7H = QrM1.subplots(1, 1)
hh7H.set_title(f'GAN Training Loss {ZGE9}')
QrM1.plot(range(len(DgpE)), DgpE, color='red', alpha=0.4, label='Discriminator Loss')
QrM1.plot(range(len(OvX0)), OvX0, color='blue', alpha=0.4... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ysuu(N8L0):\n LZpg, aNZO = QrM1.subplots()\n N8L0 = oyIN.array(N8L0)\n QrM1.plot(N8L0.T[0], label='Discriminator')\n QrM1.plot(N8L0.T[1], label='Generator')\n QrM1.title('Training Losses')\n QrM1.show()",
"def co5b(R4CY):\n import matplotlib.pyplot as QrM1\n QrM1.figure(figsize=(10, 1... | [
"0.7509781",
"0.7407079",
"0.7332178",
"0.7268625",
"0.7255147",
"0.72502387",
"0.71720517",
"0.7165433",
"0.71577823",
"0.71499205",
"0.7131886",
"0.7122726",
"0.70951784",
"0.70949465",
"0.7051136",
"0.7014203",
"0.7007293",
"0.6988086",
"0.69860905",
"0.6965973",
"0.695229... | 0.77687883 | 0 |
The object "type" used in the OSF v2 API. | def wYEv(YKHO):
return 'comments' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vcaS(YKHO) -> str:\n return qe4Y.get(YKHO, 'object_type')",
"def vcaS(YKHO):\n pass",
"def vcaS(YKHO):\n return YKHO.__object_type",
"def vcaS(YKHO):\n return YKHO._object_type",
"def vcaS(YKHO):\n return YKHO._object_type",
"def vcaS(YKHO):\n return YKHO._object_type",
"def vcaS(... | [
"0.8457285",
"0.79203475",
"0.79063845",
"0.7902338",
"0.7902338",
"0.7902338",
"0.7902338",
"0.7902338",
"0.7902338",
"0.7902338",
"0.7902338",
"0.7902338",
"0.7902338",
"0.7902338",
"0.7902338",
"0.78506273",
"0.7513726",
"0.7513726",
"0.7471158",
"0.7424474",
"0.7393359",
... | 0.0 | -1 |
Returns the comment content if the user is allowed to see it. Deleted comments can only be viewed by the user who created the comment. | def EPt3(YKHO, Jpbe):
if not Jpbe and (not YKHO.node.is_public):
raise Dad4
if YKHO.is_deleted and ((not Jpbe or Jpbe.user.is_anonymous) or (Jpbe and (not Jpbe.user.is_anonymous) and (YKHO.user._id != Jpbe.user._id))):
return None
return YKHO.content | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KOal(YKHO, **B2fa):\n uJjO = B2fa['user_id']\n try:\n hGN5 = YKHO.db['content'].find({'user_id': str(uJjO)} and {'deleted': True})\n if hGN5:\n return hGN5\n else:\n return None\n except:\n print(wVCK.format_exc())\n raise",
"def nPpv(YKHO, yY... | [
"0.66097575",
"0.64142895",
"0.6231002",
"0.6191364",
"0.6191364",
"0.60054046",
"0.59847564",
"0.59784913",
"0.5849614",
"0.58430314",
"0.57444215",
"0.5706238",
"0.56701434",
"0.5634141",
"0.563149",
"0.5623771",
"0.5612706",
"0.5590648",
"0.55822915",
"0.5566778",
"0.55615... | 0.62202805 | 3 |
Get onehot representation of a 1D numpy array of integers. | def kj8B(WKvO, rb7a):
U5bT = oyIN.zeros((WKvO.shape[0], rb7a))
U5bT[oyIN.arange(WKvO.shape[0]), WKvO] = 1
return U5bT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jpTz(ezWE):\n assert len(ezWE.shape) == 1\n fQvb = oyIN.zeros((ezWE.shape[0], 6), dtype=oyIN.int)\n for YRbF, epBp in enumerate(ezWE):\n if epBp > 0:\n fQvb[YRbF, jm2t[epBp]] = 1\n return fQvb",
"def KLLm(ezWE):\n d6pt = oyIN.zeros(oyIN.max(ezWE) + 1, dtype=oyIN.int32)\n l... | [
"0.868688",
"0.8585379",
"0.84896606",
"0.8445709",
"0.8331467",
"0.83214825",
"0.8255828",
"0.82204825",
"0.82162625",
"0.81950015",
"0.8160164",
"0.81142277",
"0.81119794",
"0.80935705",
"0.8060361",
"0.8025626",
"0.8011943",
"0.8003811",
"0.7999044",
"0.7990682",
"0.798534... | 0.7896759 | 32 |
Test whether invalid addresses fail to decode. | def bNxF(YKHO):
for QOe9 in Gd2Y:
_1Yj, bGrB = MXUn.decode('bc', QOe9)
YKHO.assertIsNone(_1Yj)
_1Yj, bGrB = MXUn.decode('tb', QOe9)
YKHO.assertIsNone(_1Yj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bNxF(YKHO):\n for QOe9 in Gd2Y:\n _1Yj, bGrB = G8Wt.decode(QOe9)\n print(_1Yj)\n assert _1Yj is None",
"def V7lC(YKHO):\n YKHO.assertFilterErrors({'addresses': [b'', True, None, b'not valid trytes', OmzZ(YKHO.trytes2), 2130706433, b'9' * 82]}, {'addresses.0': [eHNT.Required.CODE_EM... | [
"0.7694867",
"0.7401813",
"0.7267653",
"0.7114106",
"0.7006148",
"0.6903909",
"0.685986",
"0.6858313",
"0.6767727",
"0.6693624",
"0.6680125",
"0.6667075",
"0.66259646",
"0.6594926",
"0.6584184",
"0.65754634",
"0.65429187",
"0.6511283",
"0.65103936",
"0.6489238",
"0.6452611",
... | 0.7608157 | 1 |
Return string representation of self. | def wHJl(YKHO):
return '<GrafanaDashboard>' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yLCI(YKHO) -> str:\n return str(YKHO)",
"def yLCI(YKHO):\n return str(YKHO)",
"def yLCI(YKHO):\n return str(YKHO)",
"def yLCI(YKHO):\n return YKHO.__str__()",
"def yLCI(YKHO):\n return YKHO.__str__()",
"def yLCI(YKHO) -> str:\n return YKHO.__str__()",
"def gTzM(YKHO):\n return ... | [
"0.8882081",
"0.88754416",
"0.88754416",
"0.8874869",
"0.88736063",
"0.8843354",
"0.88044226",
"0.8804373",
"0.86891365",
"0.86597276",
"0.85644007",
"0.8553404",
"0.8550706",
"0.85290784",
"0.85038936",
"0.8495513",
"0.8495513",
"0.8495513",
"0.849345",
"0.8471105",
"0.84711... | 0.0 | -1 |
Use (for now) the loki_push_api AlertRules to initialize this. | def RzZx(YKHO) -> cuzp:
nOcf = lrCS(query_type='logql', topology=zBSa.from_charm(YKHO._charm))
nOcf.add_path(YKHO._logs_rules, recursive=YKHO._recursive)
return nOcf.as_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(Ro_8, *, qIrO: Optional[pulumi.Input['ConditionArgs']]=None, JkvF: Optional[pulumi.Input['ConditionArgs']]=None, YnZc: Optional[pulumi.Input['ConditionArgs']]=None, JBZA: Optional[pulumi.Input['ConditionArgs']]=None, ZLDi: Optional[pulumi.Input['ConditionArgs']]=None, m1Hk: Optional[pulumi.Input['Conditio... | [
"0.66678315",
"0.64616877",
"0.63181466",
"0.6290909",
"0.62278986",
"0.61824304",
"0.6169543",
"0.6023223",
"0.60064423",
"0.59635156",
"0.5958264",
"0.5947947",
"0.59227836",
"0.58929926",
"0.57392144",
"0.5690731",
"0.56817985",
"0.56767225",
"0.5675726",
"0.5622128",
"0.5... | 0.547521 | 35 |
Splits a list l into n almost equal chunks | def eHxA(vC9B, exwG):
exwG = max(1, exwG)
return (vC9B[YRbF:YRbF + exwG] for YRbF in range(0, len(vC9B), exwG)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eHxA(vC9B, exwG):\n exwG = max(1, exwG)\n return [vC9B[YRbF:YRbF + exwG] for YRbF in range(0, len(vC9B), exwG)]",
"def AyNP(vC9B, exwG):\n return [vC9B[YRbF:YRbF + exwG] for YRbF in range(0, len(vC9B), exwG)]",
"def eHxA(vC9B, exwG):\n exwG = max(1, exwG)\n return [vC9B[YRbF:YRbF + exwG] for... | [
"0.8806216",
"0.87718886",
"0.8768663",
"0.8767843",
"0.86741865",
"0.86741865",
"0.86714435",
"0.8659031",
"0.8659031",
"0.8658129",
"0.864076",
"0.8638891",
"0.86150503",
"0.8614915",
"0.8610746",
"0.86002105",
"0.85990506",
"0.85990506",
"0.85773647",
"0.85664475",
"0.8561... | 0.844915 | 35 |
Local Mass matrix for a single gaussian point. | def Ew3u(Ykk4: np.array, MXZ3: np.array):
wNZO = TfTo.shape_func_vec(Ykk4)
E3D9 = oyIN.outer(wNZO, wNZO)
return E3D9 * oyIN.linalg.det(TfTo.jacobian(Ykk4, MXZ3)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N24o(qIxc):\n IBxX, VQLk, MXZ3 = qIxc\n E3D9 = oyIN.zeros(shape=(6, 6))\n for YRbF in range(VQLk.shape[0]):\n E3D9 += Ew3u(VQLk[YRbF, 0:2], MXZ3) * VQLk[YRbF, -1]\n return E3D9",
"def QzIO(WKvO: Variable, yGTL: Matrix, WTkW: Matrix) -> aLMY:\n if yGTL.shape != WTkW.shape:\n raise... | [
"0.6685522",
"0.6621124",
"0.66181797",
"0.63624895",
"0.6353896",
"0.6328569",
"0.6303741",
"0.62920433",
"0.62642515",
"0.62642515",
"0.6224184",
"0.6221252",
"0.6214854",
"0.6214487",
"0.621119",
"0.62079006",
"0.61755353",
"0.61717856",
"0.6162214",
"0.6151335",
"0.613323... | 0.5753703 | 72 |
Integrates over the element given the integration points and the element coords to get the local stiffness. | def Mw37(qIxc):
j917, VQLk, MXZ3, aM8h = qIxc
O9N6 = VQLk.shape[0]
nMvt = oyIN.zeros(shape=(6, 6))
for YRbF in range(O9N6):
nMvt += ZCw8(VQLk[YRbF, 0:2], MXZ3) * VQLk[YRbF, -1]
return nMvt * aM8h | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zQMB(YKHO):\n OEry = YKHO.box.measure() / YKHO.samples\n LTIa = YKHO.mesh.points(count=YKHO.samples, box=YKHO.box)\n es0W = YKHO.region.contains(LTIa)\n eAkl = OEry * sum(YKHO.integrand.eval(es0W))\n return eAkl",
"def frGb(YKHO) -> float:\n GttN = 0.0\n for YRbF in range(len(YKHO.np_int... | [
"0.6135657",
"0.5929018",
"0.5860838",
"0.57209283",
"0.57006705",
"0.57006705",
"0.56505936",
"0.5640903",
"0.5597091",
"0.5567783",
"0.55035496",
"0.5478262",
"0.5457443",
"0.54503024",
"0.5448512",
"0.5430934",
"0.53747344",
"0.5354374",
"0.53449553",
"0.5335307",
"0.53177... | 0.0 | -1 |
function to determine reward | def Y7h5(QTBn, xmhc):
if _Bkp == 'move_up':
return xmhc[9] - QTBn[9] - (iKh9 - xmhc[2]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vOGg(YKHO):\n pass",
"def Jc_J(YKHO):\n pass",
"def Jc_J(YKHO):\n pass",
"def vOGg(YKHO):\n if YKHO.score_type == z34d.PROGRESS:\n return YKHO.progress()\n elif YKHO.score_type == z34d.REGRET:\n return YKHO.progress() - YKHO.regret()\n else:\n return YKHO.score()",
... | [
"0.8526404",
"0.82063705",
"0.82063705",
"0.81763846",
"0.8126698",
"0.80523247",
"0.804331",
"0.7975552",
"0.79542154",
"0.79143864",
"0.7899965",
"0.7893891",
"0.7872846",
"0.78702295",
"0.7861998",
"0.78362215",
"0.782844",
"0.78262454",
"0.78205705",
"0.7815939",
"0.78134... | 0.0 | -1 |
Configures the logging module with colored level and message formatting. | def tqPq() -> None:
G9jH.root.setLevel(wnrn)
uaPq = I8TR.ColoredFormatter(MTA8)
wOb_ = G9jH.StreamHandler()
wOb_.setLevel(wnrn)
wOb_.setFormatter(uaPq)
tk5Y = G9jH.getLogger()
tk5Y.setLevel(wnrn)
tk5Y.addHandler(wOb_) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DPJO(YKHO):\n if YKHO.args.get('debug'):\n RaXn = G9jH.DEBUG\n else:\n RaXn = G9jH.INFO\n Jw9H = {'reset': '\\x1b[0m', 'green': '\\x1b[32m', 'cyan': '\\x1b[36m'}\n XGTX = '{reset}{cyan}[{green}%(asctime)s{cyan}]{reset} %(message)s'.format(**Jw9H)\n G9jH.basicConfig(level=RaXn, form... | [
"0.7684071",
"0.7189814",
"0.71607345",
"0.71411836",
"0.71369916",
"0.7078765",
"0.7018726",
"0.70048696",
"0.6993184",
"0.69800544",
"0.69173706",
"0.68294984",
"0.67822796",
"0.6727825",
"0.67155933",
"0.6713155",
"0.66972435",
"0.66771674",
"0.66386145",
"0.6636901",
"0.6... | 0.7112426 | 5 |
Returns a tuple containing the max value at each index in a list of tuples. | def pNhX(SqIz):
return Pusg(niiS, map(mYzW, SqIz)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UOaW(yv6U: list) -> int:\n if len(yv6U) == 0:\n raise Exception('List is empty')\n max = yv6U[0][0]\n for ZfUD in yv6U:\n if ZfUD[0] > max:\n max = ZfUD[0]\n return max",
"def poU3(Xg1X: list[NumT]) -> tuple[mldJ, int]:\n return max(((Xg1X[YRbF], YRbF) for YRbF, GdBV i... | [
"0.7774413",
"0.7622926",
"0.75918233",
"0.7465482",
"0.7413891",
"0.7413891",
"0.7413891",
"0.7413891",
"0.7402755",
"0.7362235",
"0.7291715",
"0.7290276",
"0.7283914",
"0.72314465",
"0.718353",
"0.7178563",
"0.708857",
"0.70717996",
"0.7054059",
"0.7002543",
"0.69975096",
... | 0.0 | -1 |
Sample an action according to the exploration policy. This is either done by sampling the probability distribution of the policy, or sampling a random action (from a uniform distribution over the action space) or by adding noise to the deterministic output. | def BtKs(YKHO, BUas: int, ELpg: Optional[ActionNoise]=None) -> AzJI[oyIN.ndarray, oyIN.ndarray]:
sH6g = 0
if YKHO.num_timesteps < BUas and (not (YKHO.use_sde and YKHO.use_sde_at_warmup)):
anWo = oyIN.array([YKHO.action_space.sample()])
else:
anWo, bGrB, sH6g = YKHO.predict(YKHO._last_obs, de... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def su1c(YKHO):\n return tuKI.choice(YKHO.action_space)",
"def xkwP(YKHO):\n return oyIN.random.choice(YKHO.dim_actions)",
"def su1c(YKHO):\n return tuKI.choices(YKHO.primordial_actions_space)[0]",
"def su1c(YKHO, W061, oJto):\n Jw7X, eUWA, aUJK, SG6Y, DDI8 = YKHO._action_space.sample()\n if o... | [
"0.74472123",
"0.7434423",
"0.7366662",
"0.73549724",
"0.73513603",
"0.73460925",
"0.7245919",
"0.7201479",
"0.7192085",
"0.7188169",
"0.71635205",
"0.7138682",
"0.712877",
"0.7124153",
"0.71116376",
"0.7108964",
"0.7100072",
"0.7088288",
"0.70714563",
"0.7066936",
"0.7054025... | 0.66311306 | 59 |
Return a possibly cached objective value. | def mfyk(hkxX: Array) -> float:
nonlocal cache
if wyyA is None or not oyIN.array_equal(hkxX, wyyA[0]):
wyyA = (hkxX.copy(), fhm5(hkxX)[:2])
return wyyA[1][0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _luV(YKHO):\n return YKHO._objective_value",
"def NeKD(YKHO):\n return YKHO._objective_value",
"def rV9r(YKHO):\n return YKHO._objective",
"def fjxd(YKHO):\n return YKHO._get_attribute('objectiveValue')",
"def NeKD(YKHO):\n return jxQ2.getcallbacknodeobjval(YKHO._cbstruct)",
"def qxSN(... | [
"0.7510331",
"0.72734267",
"0.6937401",
"0.67605317",
"0.66349363",
"0.6542516",
"0.65076596",
"0.647754",
"0.6440873",
"0.63397866",
"0.63156843",
"0.6258654",
"0.62316614",
"0.62260765",
"0.6212945",
"0.6204517",
"0.6178541",
"0.61418825",
"0.613033",
"0.61205477",
"0.61192... | 0.69523853 | 2 |
Update attributes driven by the change of state, check chance to tweet and then increase the age. | def QdZT(YKHO, AJEJ: str, qN8b: List[int], WbTE: int) -> None:
ztXJ.set_age(YKHO.__current_age)
YKHO.__tired += qN8b[0]
YKHO.__hunger += qN8b[1]
YKHO.__thirst += qN8b[2]
if YKHO.__rogue_pig():
ztXJ.error('Rogue Pig: {0}'.format(str(YKHO)))
raise OverflowError
if YKHO.__state != A... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Riv0(YKHO, nZuS):\n wzkt = qcWV.datetime.utcnow()\n ZJe_ = wzkt.year - YKHO.dob.year\n if wzkt.month >= YKHO.dob.month and wzkt.day > YKHO.dob.day:\n ZJe_ -= 1\n YKHO.age = ZJe_",
"def Riv0(YKHO, ng0v, CHNM, rg4j, ApHK):\n YKHO.age += 1\n TPDn = 0.0014 + ApHK\n if TPDn * YKHO.age ... | [
"0.65618944",
"0.6407596",
"0.60641253",
"0.6021647",
"0.6020918",
"0.5984776",
"0.5974494",
"0.592592",
"0.5923902",
"0.5786548",
"0.57574344",
"0.57574344",
"0.57574344",
"0.5756252",
"0.5747792",
"0.5680044",
"0.5663962",
"0.56599647",
"0.56493324",
"0.5649176",
"0.564757"... | 0.5817086 | 9 |
Build a string showing the current internal state. | def zAg0(YKHO) -> str:
return 'GuineaPig:(Name: {0}, Save File: {1}, Lifespan: {2} days, Current Age: {3} mins, State: {4}, Tired: {5}, Hunger: {6}, Thirst: {7})'.format(YKHO.__name, YKHO.__save_file, YKHO.__lifespan, YKHO.__current_age, YKHO.__state, YKHO.__tired, YKHO.__hunger, YKHO.__thirst) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Cc7Y(YKHO) -> str:\n if YKHO.debug is True and YKHO._state_log:\n return YKHO.formatted_debug()\n return YKHO.formatted()",
"def zAg0(YKHO):\n i8_y = 'Current Game State...\\n=======\\n'\n for YRbF in range(len(YKHO.stacks)):\n i8_y += '#%d %s\\n' % (YRbF, str(YKHO.stacks[YRbF]))\n ... | [
"0.83969474",
"0.77579045",
"0.73350257",
"0.71984416",
"0.7174232",
"0.6994405",
"0.69689107",
"0.69390273",
"0.69375134",
"0.6911554",
"0.6902773",
"0.6893944",
"0.6818651",
"0.68073153",
"0.67861354",
"0.67861354",
"0.67492753",
"0.67065346",
"0.6700317",
"0.6699837",
"0.6... | 0.0 | -1 |
An env for graph bandits. | def FIMM(YKHO, pXhY, ht2Y, KFFv, C3_1):
YKHO.mu0 = KFFv
YKHO.sigma0 = C3_1
YKHO.num_node = pXhY
YKHO.num_op = ht2Y
YKHO.sap_time = [oyIN.zeros([YKHO.num_op * (YRbF + 1)]) for YRbF in range(pXhY)]
YKHO.reward = [oyIN.zeros(YKHO.num_op * (YRbF + 1)) for YRbF in range(pXhY)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xwQb(E5BI=True, LWNN=True):\n sEAN = c36K(sEAN)\n if LWNN:\n sEAN = BlB6(sEAN)\n sEAN = JwEo(sEAN)\n if E5BI:\n sEAN = a3Pg(sEAN, 4)\n return sEAN",
"def FIMM(YKHO, sEAN, KMvS=0.99, _hZ2=0.1, Cwt5=0.5, gYZ3=0.9):\n super().__init__(sEAN, gamma=KMvS, alpha=Cwt5, epsilon=_hZ2)\n... | [
"0.5656901",
"0.5639502",
"0.55379504",
"0.55328655",
"0.5491439",
"0.5491365",
"0.54804313",
"0.54766667",
"0.5471115",
"0.5468429",
"0.54668635",
"0.5451563",
"0.54448885",
"0.54001117",
"0.5381553",
"0.5362364",
"0.53568274",
"0.53568274",
"0.5347175",
"0.5323093",
"0.5319... | 0.0 | -1 |
Convert a tensor of token ids into a string of text | def x8I_(YKHO, vhpA: Tensor, akMs: bool=False) -> str:
_0VL = vhpA.long()
if akMs:
vC9B = '<'
Mkmy = '>'
else:
vC9B = ''
Mkmy = ''
s2mk = [vC9B + YKHO.itos[YRbF] + Mkmy for YRbF in _0VL]
return ' '.join(s2mk) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KA5q(vhpA, C3ST):\n Cxtm = ''\n for YRbF in range(len(vhpA)):\n yAmx = x9Y1(vhpA[YRbF], C3ST)\n Cxtm += yAmx\n return Cxtm",
"def KA5q(vhpA):\n vIwR = ''\n for YRbF in range(vhpA.size(0)):\n _K85 = vhpA[YRbF]\n vIwR += bMMz(_K85)\n return vIwR",
"def XykB(YKHO,... | [
"0.6959752",
"0.69406646",
"0.68701077",
"0.6868427",
"0.6825435",
"0.6777204",
"0.6765842",
"0.6716411",
"0.6652234",
"0.6594145",
"0.6575323",
"0.65523005",
"0.65521324",
"0.6497745",
"0.64289343",
"0.6398259",
"0.63323087",
"0.6302324",
"0.62965786",
"0.626701",
"0.6252309... | 0.65608454 | 11 |
Creates minibatch tensors from the list of tuples ( Review Tensor, Sent Length, Images, Sentiments ). We should build custom collate_fn rather than using default collate_fn, because merging tensor with variable length is not supported in default. | def QxcP(nPrm):
Tilc, RrrS, Y9dw, QPZq = zip(*nPrm)
YeU7 = 0
VUZw = 0
for f4hs in RrrS:
if len(f4hs) > YeU7:
YeU7 = len(f4hs)
if max(f4hs) > VUZw:
VUZw = max(f4hs)
p5VW = ht2j.zeros(len(Tilc), YeU7, VUZw).long()
xzDT = ht2j.zeros(len(Tilc), YeU7).long()
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qlmv(vC9B):\n\n def MmZh(o5Dc):\n if len(o5Dc) == 0:\n o5Dc = [[1]]\n return o5Dc\n bGrB, Slbv, RrWF = zip(*vC9B)\n RyIN = ht2j.Tensor(RrWF).long()\n lz84 = [MmZh(WKvO) for WKvO in Slbv]\n gLiZ = []\n H4yH = []\n OgoW = []\n FwIN = []\n o4X0 = 0\n for o5Dc... | [
"0.6539318",
"0.63842183",
"0.63836294",
"0.63655895",
"0.62356764",
"0.622039",
"0.6032396",
"0.60043204",
"0.5921276",
"0.5921276",
"0.5921276",
"0.58850604",
"0.588417",
"0.5874802",
"0.5865061",
"0.580409",
"0.57973677",
"0.57782286",
"0.5777749",
"0.57770926",
"0.5774576... | 0.60474825 | 6 |
Creates minibatch tensors from the list of tuples ( Review Tensor, Sent Length, Images, Sentiments ). We should build custom collate_fn rather than using default collate_fn, because merging tensor with variable length is not supported in default. | def kX7R(nPrm):
Tilc, RrrS, Y9dw, ckRy, A07C = zip(*nPrm)
YeU7 = 0
VUZw = 0
for f4hs in RrrS:
if len(f4hs) > YeU7:
YeU7 = len(f4hs)
if max(f4hs) > VUZw:
VUZw = max(f4hs)
p5VW = ht2j.zeros(len(Tilc), YeU7, VUZw).long()
xzDT = ht2j.zeros(len(Tilc), YeU7).lon... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qlmv(vC9B):\n\n def MmZh(o5Dc):\n if len(o5Dc) == 0:\n o5Dc = [[1]]\n return o5Dc\n bGrB, Slbv, RrWF = zip(*vC9B)\n RyIN = ht2j.Tensor(RrWF).long()\n lz84 = [MmZh(WKvO) for WKvO in Slbv]\n gLiZ = []\n H4yH = []\n OgoW = []\n FwIN = []\n o4X0 = 0\n for o5Dc... | [
"0.654035",
"0.63830185",
"0.6381185",
"0.636465",
"0.62355065",
"0.6219276",
"0.6046769",
"0.60325116",
"0.6003478",
"0.59225535",
"0.59225535",
"0.59225535",
"0.58843523",
"0.58759934",
"0.58645374",
"0.5803574",
"0.57977897",
"0.5779564",
"0.57784146",
"0.57772595",
"0.577... | 0.5885106 | 12 |
These tests check that the heatmap accurately reflects the data. | def _95_(jVhc, Pwjy, RkIb, yyRE, TV7o, C3tg, Pf_O, TBXe, gCuF):
bNKA = Pwjy
y9ar.objects.create(profile=yyRE, project=bNKA, permission='CODER')
y9ar.objects.create(profile=TV7o, project=bNKA, permission='CODER')
Crrw = C3tg
hFlr, FGfE, ld_l = RkIb
_Q0v(hFlr, 'random', ld_l, bNKA.percentage_irr, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bBtp():\n EcVT = A0Q6(10, 0.5)\n Nk7V = ['Dimension {}'.format(YRbF) for YRbF in range(10)]\n KmnS = ['Dimension {}'.format(YRbF) for YRbF in range(10)]\n LZpg = Y4Ek(EcVT, transform='log', xticklabels=Nk7V, yticklabels=KmnS)\n LZpg = Y4Ek(EcVT, transform='zero-boost')\n LZpg = Y4Ek(EcVT, tra... | [
"0.7113574",
"0.6764083",
"0.6586505",
"0.6552547",
"0.6514088",
"0.6506166",
"0.64574695",
"0.6411079",
"0.64013517",
"0.64013517",
"0.64000756",
"0.62863076",
"0.62595993",
"0.62151873",
"0.621027",
"0.62093186",
"0.61963177",
"0.6160714",
"0.6138935",
"0.6090922",
"0.60792... | 0.0 | -1 |
Extracts a NestedMap with the nested prefix keys from its NestedMap node. | def CZBV(Q6kx: Any, y0cW: str='', dNHt: str='/', ZX9G: str='[', GzhD: str=']') -> ImMB:
if isinstance(Q6kx, dict):
return Trsj(Q6kx, y0cW, dNHt, ZX9G, GzhD)
elif isinstance(Q6kx, yOcR.sharding.PartitionSpec):
return y0cW
elif isinstance(Q6kx, (list, tuple)):
if hasattr(Q6kx, '_fields... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i5gV(YKHO, dict, y0cW):\n sjXb = []\n for H5ew in dict.keys():\n jgBG = YKHO._get_prefixed_key_name(H5ew, y0cW)\n if isinstance(dict[H5ew], GySg):\n sjXb += YKHO._get_all_prefixed_keys_from_nested_maps(dict[H5ew], jgBG)\n else:\n sjXb += [jgBG]\n return sjXb"... | [
"0.67578375",
"0.6366803",
"0.6254386",
"0.60392267",
"0.574279",
"0.57005244",
"0.56974345",
"0.5634137",
"0.56289",
"0.5621558",
"0.56004936",
"0.55889785",
"0.55693805",
"0.556802",
"0.5513785",
"0.5476642",
"0.54288",
"0.5419914",
"0.5403887",
"0.5401851",
"0.53924954",
... | 0.730204 | 0 |
Unload a config entry. | async def async_unload_entry(ajET: HomeAssistant, bTKY: ConfigEntry) -> bool:
yT1k = await ajET.config_entries.async_unload_platforms(bTKY, aprE)
if yT1k:
M2Xa = ajET.data[Sugg][bTKY.entry_id].pop(Qgdn)
await M2Xa.unsubscribe()
ajET.data[Sugg].pop(bTKY.entry_id)
return yT1k | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def async_unload_entry(ajET: HomeAssistant, bTKY: config_entries.ConfigEntry):\n return await ajET.config_entries.async_forward_entry_unload(bTKY, lQ1Q)",
"async def async_unload_entry(ajET: HomeAssistantType, bTKY: ConfigEntry):\n nNXP = ajET.data[Sugg][bTKY.unique_id]\n await nNXP.async_unload()... | [
"0.70418245",
"0.69975436",
"0.69197667",
"0.69024074",
"0.6896897",
"0.6870464",
"0.6840728",
"0.67911863",
"0.67835754",
"0.6782968",
"0.6776581",
"0.67688036",
"0.6737991",
"0.6730449",
"0.6713354",
"0.67085946",
"0.6664857",
"0.66411716",
"0.6637687",
"0.66157013",
"0.660... | 0.0 | -1 |
Returns the type of the item | def FRul(YKHO):
return YKHO.topic_item.get_type() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hghu(YKHO, ZfUD):\n return YKHO.cv.type(ZfUD)",
"def eBH2(YKHO):\n YKHO.link.check_connection()\n oUZx = 'G_Item_Type'\n YKHO.link.send_line(oUZx)\n YKHO.link.send_item(YKHO)\n n1dV = YKHO.link.rec_int()\n YKHO.link.check_status()\n return n1dV",
"def FRul(YKHO, ZfUD):\n if isins... | [
"0.87373114",
"0.8233467",
"0.8098326",
"0.7934899",
"0.78846836",
"0.77157927",
"0.7676153",
"0.76043695",
"0.7541613",
"0.7541613",
"0.7506451",
"0.7503869",
"0.7473409",
"0.7465362",
"0.7444145",
"0.7444145",
"0.7444145",
"0.74372023",
"0.74372023",
"0.74372023",
"0.743054... | 0.7602893 | 8 |
Returns the state as a string. | def ja6o(YKHO):
return YKHO.topic_item.get_state() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n return str(YKHO.state)",
"def cOz4(YKHO):\n return getattr(YKHO.state, 'name', YKHO.state)",
"def qrTE(YKHO):\n _6Mr = ''\n for U6D_ in YKHO.current:\n _6Mr += U6D_\n return _6Mr",
"def zdvC(QTBn):\n s8EJ = ''.join((str(int(tTpl)) for tTpl in QTBn))\n return s8EJ... | [
"0.8467238",
"0.8336349",
"0.80775905",
"0.80451906",
"0.80364096",
"0.7991222",
"0.79659617",
"0.7962911",
"0.78593796",
"0.7839154",
"0.78181005",
"0.7800964",
"0.7789195",
"0.77714086",
"0.7749586",
"0.7714577",
"0.7679703",
"0.7679703",
"0.7679703",
"0.7679703",
"0.767970... | 0.0 | -1 |
Returns the latest dict of the data_list or the item of the dict with the given key. | def AbsD(YKHO, *qIxc):
return YKHO.topic_item.get_latest_data(*qIxc) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fsbt(YKHO):\n if YKHO.empty():\n return None\n return list(YKHO.data.keys())[-1]",
"def kTCt(YKHO, H5ew):\n TZ9E = OhYN(H5ew)\n _95e = dict.__getitem__(YKHO, TZ9E)\n if isinstance(_95e, tuple) and _95e.value is None:\n return YKHO[H5ew]\n return _95e",
"def OP2O(YKHO, H5ew):... | [
"0.660574",
"0.62516487",
"0.6232407",
"0.62009466",
"0.6125265",
"0.605212",
"0.60364866",
"0.5986844",
"0.596916",
"0.5966451",
"0.59635276",
"0.594831",
"0.5937971",
"0.59291583",
"0.59212416",
"0.5900835",
"0.58954287",
"0.5878892",
"0.5873433",
"0.5873433",
"0.58482593",... | 0.5573965 | 75 |
Returns the parent of this or None if there is no parent. | def _AKB(YKHO):
return YKHO.__parent | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _AKB(YKHO) -> h8nf[o7DN]:\n return YKHO._parent",
"def DtVU(YKHO) -> h8nf[id]:\n if YKHO.has_parent():\n return YKHO.parent\n return None",
"def _AKB(YKHO) -> h8nf[ImMB]:\n return YKHO._parent",
"def _AKB(YKHO):\n if len(YKHO._parents) == 1:\n return YKHO._parents[0]\n eli... | [
"0.8866845",
"0.8625685",
"0.8597181",
"0.85889095",
"0.85404307",
"0.8510038",
"0.8468648",
"0.8414924",
"0.8414924",
"0.8414924",
"0.8414924",
"0.8380193",
"0.8362937",
"0.83494335",
"0.83304095",
"0.8323964",
"0.82700723",
"0.824758",
"0.824758",
"0.821479",
"0.8202086",
... | 0.7933648 | 70 |
Returns the vector for the given magnitude and angle | def yKil(YXbZ, YylR):
return (YhSR(YylR) * YXbZ, -(YUNn(YylR) * YXbZ)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ng6a(YylR):\n return oyIN.array([oyIN.cos(YylR), oyIN.sin(YylR)])",
"def wLs0(YXbZ, XSoh):\n LVAh = YUNn(YH0K(XSoh)) * YXbZ\n WKvO = YhSR(YH0K(XSoh)) * YXbZ\n P6bq = lNLu([WKvO, LVAh])\n return P6bq",
"def WD6p(XSoh, YXbZ):\n P6bq = oyIN.sin(oyIN.deg2rad(XSoh)) * YXbZ\n Ty9i = oyIN.cos... | [
"0.787635",
"0.75398624",
"0.74615586",
"0.74178785",
"0.72659045",
"0.71595377",
"0.7151376",
"0.71271825",
"0.7000525",
"0.6980028",
"0.6967069",
"0.67610216",
"0.66923696",
"0.664554",
"0.6617406",
"0.6570736",
"0.6518931",
"0.6486365",
"0.64582664",
"0.64270097",
"0.64254... | 0.82104075 | 0 |
Whether this report supplies conflicts. | def uGtS(YKHO) -> bool:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K69n(YKHO) -> bool:\n return len(YKHO.conflicts()) == 0",
"def xyx3(YKHO, FDvM):\n return FDvM == YKHO.conflict",
"def SAQZ(YKHO):\n return YKHO._tag == 'conflict'",
"def VwaJ(YKHO, Elif):\n for Z9rn in Z56C:\n if YKHO.category in Z9rn and Elif.category in Z9rn:\n return Tru... | [
"0.7841463",
"0.7266836",
"0.7127203",
"0.6821752",
"0.6792601",
"0.66412985",
"0.6484991",
"0.6476449",
"0.64680326",
"0.6392239",
"0.6379681",
"0.6379681",
"0.63739413",
"0.6300193",
"0.62905735",
"0.62905735",
"0.624073",
"0.6235465",
"0.6208572",
"0.61779875",
"0.61776394... | 0.81200343 | 0 |
Displays the index page accessible at '/' | def d6pt():
return WsL5.render_template('index.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d6pt():\n return TvZl('index.html', url=QePW.url)",
"def d6pt():\n return TvZl('index.html')",
"def d6pt():\n return TvZl('index.html')",
"def d6pt():\n return TvZl('index.html')",
"def d6pt():\n G9jH.info('On index page')\n return TvZl('index.html')",
"def d6pt():\n return TvZl(... | [
"0.86042184",
"0.86039484",
"0.86039484",
"0.8584791",
"0.8583762",
"0.85747325",
"0.8549182",
"0.85299975",
"0.8522783",
"0.85179675",
"0.85179675",
"0.85179675",
"0.85179675",
"0.85179675",
"0.85179675",
"0.8511824",
"0.84988546",
"0.84735423",
"0.8429009",
"0.8419053",
"0.... | 0.0 | -1 |
Displays the about page accessible at '/about' | def vsuQ():
return WsL5.render_template('about.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vsuQ():\n bo34.info('User visited the about page.')\n return TvZl('about.html')",
"def vsuQ():\n return TvZl('about.html', title='about')",
"def vsuQ():\n return TvZl('about.html', title='About')",
"def vsuQ(QePW):\n return SGJU('about.html')",
"def vsuQ():\n return TvZl('about.html',... | [
"0.8856327",
"0.87985647",
"0.87914705",
"0.87890136",
"0.87824285",
"0.8700419",
"0.86797386",
"0.86730397",
"0.867137",
"0.86703265",
"0.86703265",
"0.86703265",
"0.86703265",
"0.86703265",
"0.86703265",
"0.86703265",
"0.86703265",
"0.86703265",
"0.86703265",
"0.86703265",
... | 0.0 | -1 |
Percentage of Numerical Characters | def cWUl(YKHO) -> float:
UHFx = 0
for bseI in YKHO.data:
if bseI.isnumeric():
UHFx += 1
return round(float(UHFx) / len(YKHO.data), 2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NKA5(YKHO):\n sTZu = YKHO.num_letters + YKHO.num_numbers\n return sTZu / len(YKHO.og_text.replace(' ', ''))",
"def RWSM(w2Td, bseI):\n u54L = len(w2Td)\n ZKXo = 0.0\n for d6pt in range(u54L):\n if w2Td[d6pt] == bseI:\n ZKXo += 1\n return ZKXo / u54L * 100",
"def khVW(l5N... | [
"0.7973815",
"0.7749342",
"0.7679115",
"0.74900514",
"0.732373",
"0.72812563",
"0.72765934",
"0.72765934",
"0.7181781",
"0.70801824",
"0.6883545",
"0.6874189",
"0.68461573",
"0.6807561",
"0.6759259",
"0.6728108",
"0.67248994",
"0.6721883",
"0.66923916",
"0.665482",
"0.6647033... | 0.85070235 | 0 |
Return the horizontal field of view of the camera | def Tznh(YKHO):
hkxX = YKHO._request_get([b'horz_fov'])
Zm1V = hkxX[b'horz_fov']
return Zm1V | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PjvE(YKHO):\n iwls = YKHO.get_horizontal_field_of_view_degrees()\n Zm1V = pvHv.degrees_to_radians(iwls)\n return Zm1V",
"def C_ft(YKHO):\n return lued(YKHO.pos + iArr(0, 720), YKHO.pos + iArr(1280, 0))",
"def H4hf(YKHO):\n return YKHO.named.data.xmat[['upper_arm', 'lower_arm'], 'xz']",
"de... | [
"0.84524864",
"0.66718423",
"0.6451523",
"0.6441477",
"0.6430083",
"0.6340912",
"0.6280841",
"0.6261616",
"0.6173416",
"0.6143025",
"0.61332494",
"0.60785437",
"0.5977307",
"0.5977019",
"0.59738266",
"0.5928035",
"0.58846366",
"0.58846366",
"0.58692247",
"0.58538693",
"0.5850... | 0.80076355 | 1 |
Return the horizontal field of view of the camera | def PjvE(YKHO):
iwls = YKHO.get_horizontal_field_of_view_degrees()
Zm1V = pvHv.degrees_to_radians(iwls)
return Zm1V | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Tznh(YKHO):\n hkxX = YKHO._request_get([b'horz_fov'])\n Zm1V = hkxX[b'horz_fov']\n return Zm1V",
"def C_ft(YKHO):\n return lued(YKHO.pos + iArr(0, 720), YKHO.pos + iArr(1280, 0))",
"def H4hf(YKHO):\n return YKHO.named.data.xmat[['upper_arm', 'lower_arm'], 'xz']",
"def cF1X(YKHO):\n retu... | [
"0.80076355",
"0.66718423",
"0.6451523",
"0.6441477",
"0.6430083",
"0.6340912",
"0.6280841",
"0.6261616",
"0.6173416",
"0.6143025",
"0.61332494",
"0.60785437",
"0.5977307",
"0.5977019",
"0.59738266",
"0.5928035",
"0.58846366",
"0.58846366",
"0.58692247",
"0.58538693",
"0.5850... | 0.84524864 | 0 |
Return the current normal image in vector representation | def Xjhn(YKHO, SnCn=None, E4jy=False):
geh0 = YKHO._request_render_images([b'normal_image'], use_trackball=E4jy)
Rx3d = geh0[b'normal_image']
Rx3d = YKHO.scale_image_with_nearest_interpolation(Rx3d, SnCn)
YKHO.filter_normal_image(Rx3d)
Rx3d = YKHO.convert_rgb_to_bgr(Rx3d)
return Rx3d | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XGpy(YKHO, HBfW=False):\n HGCR = YKHO.natural_frame()\n mhAC = HGCR[1].cross_product(HGCR[2])\n if HBfW:\n mhAC /= mhAC.norm()\n return Nzai(mhAC)",
"def iSV7(YKHO):\n hQHm = YKHO.points[0].vector3D\n jlSq = YKHO.points[1].vector3D\n bUZ8 = YKHO.points[2].vector3D\n pO9Q = jlSq... | [
"0.774366",
"0.75832677",
"0.7575869",
"0.75240964",
"0.7389583",
"0.7373729",
"0.73523813",
"0.7343886",
"0.7343601",
"0.7330966",
"0.73191124",
"0.73182994",
"0.7305833",
"0.729917",
"0.7239848",
"0.7220801",
"0.7214758",
"0.7190969",
"0.7174633",
"0.7174407",
"0.7141455",
... | 0.0 | -1 |
Return the current pose as a tuple of location and orientation quaternion | def hzkB(YKHO):
Rci7, thba = YKHO.get_pose_rpy()
rKSe, H2HG, xTkQ = thba
if H2HG <= -oyIN.pi:
H2HG += 2 * oyIN.pi
elif H2HG > oyIN.pi:
H2HG -= 2 * oyIN.pi
_Jov = BmLB.quaternion_from_euler(xTkQ, H2HG, rKSe, 'rzyx')
return (Rci7, _Jov) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mk5E(YKHO):\n if YKHO._keep_pose_state:\n thba = [pvHv.degrees_to_radians(Ty9i) for Ty9i in YKHO._orientation_rpy]\n return (YKHO._location.copy(), thba)\n geh0 = YKHO._request_get([b'location', b'orientation_rpy'])\n Rci7 = geh0[b'location']\n thba = geh0[b'orientation_rpy']\n thb... | [
"0.7321368",
"0.72791696",
"0.72596323",
"0.72300667",
"0.7177775",
"0.71364874",
"0.7125255",
"0.71228874",
"0.7073631",
"0.70660794",
"0.70660794",
"0.7022057",
"0.6996505",
"0.68750393",
"0.68516517",
"0.6846697",
"0.6830066",
"0.6798768",
"0.6792991",
"0.6779637",
"0.6761... | 0.78949565 | 0 |
The name of the scheduler | def mWFP(YKHO):
return YKHO.__class__.__name__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s2nd(YKHO) -> str:\n if YKHO._schedule is not None:\n return YKHO._schedule.name\n return sYJn",
"def mWFP(YKHO) -> str:\n if YKHO.schedule and YKHO.schedule[r2U0]:\n return YKHO.schedule[r2U0]\n else:\n return 'Schedule #{}'.format(YKHO.schedule_id)",
"def mWFP(YKHO) -> st... | [
"0.77230877",
"0.7628115",
"0.753722",
"0.725067",
"0.71049505",
"0.7097197",
"0.70876914",
"0.70876914",
"0.6997542",
"0.6957085",
"0.6957085",
"0.6957085",
"0.6957085",
"0.6957085",
"0.6957085",
"0.6957085",
"0.6957085",
"0.6957085",
"0.6878913",
"0.6832749",
"0.6822968",
... | 0.0 | -1 |
Choose the majority class label. P.S. If the two class have the same count. Choose any one is okay. | def pfTs(YKHO, t2SB):
return mBkc(t2SB).keys()[0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n1Js(Crrw):\n BWz1 = oyIN.bincount(Crrw)\n cxFb = oyIN.where(BWz1 == oyIN.max(BWz1))[0]\n if len(cxFb) > 1:\n if 'debug' in vPBo and vPBo.debug:\n G9jH.log(G9jH.DEBUG, 'Choosing randomly from tied labels: {}'.format(oyIN.asarray(Crrw[cxFb])))\n E62w = cxFb[oyIN.random.choice(l... | [
"0.7324562",
"0.7284778",
"0.72202635",
"0.71905327",
"0.7186074",
"0.7165918",
"0.7144864",
"0.7141588",
"0.7133669",
"0.7071776",
"0.70489675",
"0.70472205",
"0.7003685",
"0.7001467",
"0.69974357",
"0.69974357",
"0.694155",
"0.68003273",
"0.6787285",
"0.67771006",
"0.674079... | 0.7383381 | 0 |
Fixed values for remaining state components. Values given to state components other than those chosen as independent. It is a onedimensional array, or `None` if the whole dynamical system is twodimensional. It can be set as a single float value, in which case this value is given to all fixed axes. It cannot be deleted. | def C_Lv(YKHO):
return YKHO._fixed_axes | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y2eJ(YKHO) -> h8nf[qe4Y.Input[float]]:\n return qe4Y.get(YKHO, 'fixed')",
"def o3rF(YKHO):\n if YKHO._x0 is None:\n print('No initial condition given. We assume that the initial condition is \"x0=[[1,0,...],[1,0,...],...]\"')\n YKHO._x0 = oyIN.zeros(YKHO._model_dimension)\n YKHO._x... | [
"0.65247005",
"0.61777157",
"0.5859571",
"0.58225554",
"0.5796497",
"0.5789647",
"0.5684036",
"0.5663918",
"0.56567585",
"0.55990267",
"0.5512282",
"0.5500053",
"0.5485403",
"0.54181415",
"0.53959775",
"0.5390564",
"0.5388707",
"0.5371309",
"0.5361885",
"0.5342552",
"0.533678... | 0.6087191 | 2 |
Plot nullclines on the phase plane. Plot nullclines for independent variables on the phase plane. This method is mostly intended to be used with the WilsonCowan system, with its extension with refractory state, or with the 'mixed' system that makes a transition between the first two. Indeed, with these systems nullclin... | def Zjsu(YKHO, Nygx='both', mLGw=1000, Obgw=None, Tt4h=None, jk7u=(0, 1), rTQi=(0, 1), ZHfW=False, **B2fa):
if Nygx not in (ZuCc := ('x', 'y', 'both')):
E4N8(f"Unexpected value {Nygx} for 'which'. Valid values are {ZuCc}. No nullclines will be plotted.", stacklevel=2, category=x_Xj)
kj9G = {'x': True if... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PmlK(kzOt, oA9I, Dt18, Tp85, aNZO=None):\n dgn1, ADR1 = kzOt\n yWg2, ANTq = oA9I\n Hziu, QveJ, vRop = Dt18\n _TRd, ym68, lS6E = Tp85\n dK9T = ADR1 / Hziu\n sOSa = ANTq / _TRd\n _uwy = WTkW(dgn1, QveJ, vRop)\n arj7 = WTkW(yWg2, ym68, lS6E)\n V1dT = lambda SGf8: dK9T + 1.0 / (3 * vRop ... | [
"0.5809042",
"0.57826173",
"0.568059",
"0.5615292",
"0.55743927",
"0.55563486",
"0.5532432",
"0.5484453",
"0.54782176",
"0.545739",
"0.5382307",
"0.5331451",
"0.52917975",
"0.5274046",
"0.52272445",
"0.5216997",
"0.5212811",
"0.5204368",
"0.5196603",
"0.5189671",
"0.51818883"... | 0.5226684 | 15 |
Get numerically the nullcline for an A component. | def EkPi(YKHO, Nk6w, XcU5, r845, G1Hx, XP5J):
f81y = YKHO.config.network.populations[r845]
A3Vt = YKHO.fixed_axes[XP5J + r845 - 1 - int(XP5J + r845 > G1Hx)]
def eHNT(jzdc):
k0lF = [jzdc if exwG == r845 else YKHO.fixed_axes[exwG - int(exwG > r845)] for exwG in range(XP5J)]
tjUW = sum((YKHO.c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eRmw(YKHO, Nk6w, XcU5, r845, G1Hx):\n XP5J = len(YKHO.config.network.populations)\n if r845 < XP5J:\n if G1Hx < XP5J or G1Hx == r845 + XP5J:\n return YKHO._nullcline_A_analytical(Nk6w, XcU5, r845, G1Hx, XP5J)\n return YKHO._nullcline_A_numerical(Nk6w, XcU5, r845, G1Hx, XP5J)\n ... | [
"0.570347",
"0.55655193",
"0.55375564",
"0.5436283",
"0.5339757",
"0.52134645",
"0.52134645",
"0.52134645",
"0.5212439",
"0.52025443",
"0.51718485",
"0.51610243",
"0.50889933",
"0.50889933",
"0.50889933",
"0.5076504",
"0.5062573",
"0.50529546",
"0.5031261",
"0.50192106",
"0.5... | 0.52068377 | 9 |
Get the spectrum of this result. Get a `Spectrum` instance corresponding to `self` where each state component is replaced by its real fast Fourier transform. | def T6Tz(YKHO, mWFP=None):
return sg5f(YKHO.config, YKHO._states_dict, YKHO.times, YKHO.default_name, mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _owh(YKHO):\n eHNT, _owh = cr9B.get_spectra(YKHO.input.data, method=YKHO.method)\n return _owh",
"def _owh(YKHO):\n YKHO.method['Fs'] = YKHO.method.get('Fs', YKHO.input.sampling_rate)\n _owh = eNCY(YKHO.cache, YKHO.ij)\n return _owh",
"def _owh(YKHO):\n if not hasattr(YKHO, '_spectrum'):\... | [
"0.7950013",
"0.7786993",
"0.75171226",
"0.75152874",
"0.74119765",
"0.71058565",
"0.69632",
"0.69004744",
"0.67124265",
"0.6704778",
"0.66298145",
"0.66173655",
"0.6591972",
"0.6587885",
"0.6532056",
"0.64919513",
"0.64864403",
"0.6465997",
"0.63613933",
"0.6319202",
"0.6304... | 0.68046045 | 8 |
Get the fractions variables dictionary. | def YBEk(YKHO, wspz):
Gd1t = oyIN.transpose(wspz)
k0lF = Gd1t[:(XP5J := len(YKHO.config.network.populations))]
A3Vt = Gd1t[XP5J:2 * XP5J]
o4sw = 1 - k0lF - A3Vt
return {'A': k0lF, 'R': A3Vt, 'S': o4sw} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wA3x(YKHO, M6pt, UUZ1):\n H5ew = f'{M6pt}/{UUZ1}'\n return hE8O.EncTbls.getmapped(YKHO.encoding, 'frac', str(H5ew))",
"def wA3x(YKHO):\n jzdc, Fg_i = (1, 0)\n for vexM in reversed(YKHO.cont):\n jzdc, Fg_i = (jzdc * vexM + Fg_i, jzdc)\n return (jzdc, Fg_i)",
"def vars(YKHO) -> cuzp[str... | [
"0.6528201",
"0.6164803",
"0.6096681",
"0.6059831",
"0.60489625",
"0.6031061",
"0.5971384",
"0.5914563",
"0.58439815",
"0.58358574",
"0.58008",
"0.5799013",
"0.5787349",
"0.577316",
"0.5750015",
"0.5741999",
"0.5734229",
"0.5732457",
"0.5731044",
"0.569561",
"0.5695121",
"0... | 0.6678531 | 0 |
Get the variance of the refractory fraction of network. | def hUXq(YKHO):
try:
return YKHO._states_dict['CRR'][0][0]
except KeyError:
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M5jT():\n return I8JS",
"def I8JS(YKHO):\n return YKHO._rv.var()",
"def I8JS(YKHO):\n return YKHO._variance",
"def I8JS(YKHO):\n return YKHO.base_dist.variance * YKHO.scale ** 2",
"def I8JS(YKHO):\n if YKHO.sample_count > 1:\n return YKHO.new_var / (1 - YKHO.B2 ** YKHO.sample_coun... | [
"0.79341656",
"0.76946455",
"0.76534253",
"0.7585699",
"0.7530971",
"0.7498503",
"0.7485398",
"0.7412079",
"0.7382429",
"0.73115015",
"0.7305546",
"0.7297418",
"0.7294159",
"0.72884476",
"0.726632",
"0.72451115",
"0.721383",
"0.71812135",
"0.71198344",
"0.70895475",
"0.706392... | 0.0 | -1 |
Get the variance of the sensitive fraction of network. | def s_gR(YKHO):
try:
return YKHO._states_dict['CSS'][0][0]
except KeyError:
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M5jT():\n return I8JS",
"def I8JS(YKHO):\n return YKHO._rv.var()",
"def I8JS(YKHO):\n return YKHO._variance",
"def I8JS(YKHO):\n return YKHO.base_dist.variance * YKHO.scale ** 2",
"def I8JS(YKHO):\n yGTL = YKHO.expected()\n return YKHO.moment(2) - yGTL * yGTL",
"def I8JS(YKHO):\n ... | [
"0.8069242",
"0.8032146",
"0.7989587",
"0.79096943",
"0.7853284",
"0.7824632",
"0.7821014",
"0.7716714",
"0.7694153",
"0.76590824",
"0.7568976",
"0.7561836",
"0.7548362",
"0.7546197",
"0.7525529",
"0.7525529",
"0.7501038",
"0.7488838",
"0.74783516",
"0.7456676",
"0.74516296",... | 0.0 | -1 |
Label for the third central moment for variables `X`, `Y` and `Z` for the `J`th, `K`th and `L`th populations. | def mNTW(YKHO, RM3a, Oa10, nMvt, aPd6):
EYTZ = ''.join([YKHO.config.network.populations[V6IE].ID for V6IE in (Oa10, nMvt, aPd6)])
return f'$\\mathrm{{M}}_{{{RM3a}}}^{{{EYTZ}}}$' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mNTW(YKHO, RM3a, Oa10, nMvt, aPd6):\n EYTZ = ''.join([YKHO.config.network.populations[V6IE].ID for V6IE in (Oa10, nMvt, aPd6)])\n return f'$\\\\hat{{\\\\mathrm{{M}}}}_{{{RM3a}}}^{{{EYTZ}}}$'",
"def mNTW(YKHO, RM3a, Oa10, nMvt, aPd6):\n return f'$\\\\hat{{\\\\mathrm{{M}}}}_{{{RM3a}}}$'",
"def mNTW(... | [
"0.7440765",
"0.7126354",
"0.7098252",
"0.6258084",
"0.582518",
"0.5673357",
"0.56280756",
"0.5545969",
"0.5545969",
"0.5537185",
"0.5525355",
"0.54985243",
"0.54747677",
"0.54516524",
"0.5436494",
"0.5418109",
"0.5416286",
"0.5364601",
"0.5364601",
"0.5342141",
"0.5342141",
... | 0.74360895 | 1 |
Initialize a figure. Create a Matplotlib figure with default formatting. The default color cycle is changed with default colors used in `Graphics` classes. The font is also changed to Times or Helvetica according to the font family. | def JI1i(nlwp=None, wytA=(5, 3.75), weqM=150, kMq5=True, Ehf5='serif', LaRT=False, uK8v=None, **B2fa):
if Ehf5 not in ['serif', 'sans-serif']:
E4N8(f'Unknown font family {Ehf5}. Taking a default instead.', category=x_Xj, stacklevel=2)
Ehf5 = 'serif'
x5MY.rcParams['font.family'] = Ehf5
x5MY.r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fyQC(wytA=None):\n QrM1.style.use('ggplot')\n LZpg = QrM1.figure(figsize=wytA) if wytA else QrM1.figure()\n QrM1.tick_params(axis='both', which='both', bottom='off', left='off', labelleft='off', top='off', labelbottom='off')\n return LZpg",
"def ioPP(YKHO):\n YKHO.fig = QrM1.figure(figsize=(8,... | [
"0.66475517",
"0.6599897",
"0.6586299",
"0.65786284",
"0.6561978",
"0.6468848",
"0.6451016",
"0.6451016",
"0.6422842",
"0.637779",
"0.63709986",
"0.6357429",
"0.63546485",
"0.6268635",
"0.62662077",
"0.62524825",
"0.62351185",
"0.6233265",
"0.61745554",
"0.6158086",
"0.608527... | 0.6065932 | 24 |
return a list of Dataframes with columns cast to raw_default_columns | def TQeJ(YKHO, L9AY: Dict[Text, pd.DataFrame]) -> cuzp[I2jr, rLdf.DataFrame]:
raise NotImplementedError('_cast_raw_DataFrames not implemented') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PRLP(tyNF: Table) -> iu5r[OciN]:\n for iVRZ in tyNF.columns:\n if rlzL(iVRZ) is False:\n yield iVRZ",
"def Cu6Y(YKHO):\n return None",
"def I6ui(YKHO, ZLJ_, qoqK=-1):\n YjEu = [YKHO.cols[Z9rn] for Z9rn in ZLJ_]\n jQ3Z = rLdf.read_sql(RyuO.select(YjEu).limit(qoqK), YKHO.bind)\n... | [
"0.6312088",
"0.6257762",
"0.59713197",
"0.58810925",
"0.58190984",
"0.5816666",
"0.5734129",
"0.565355",
"0.56052524",
"0.5540954",
"0.55037695",
"0.5482633",
"0.54734504",
"0.5424623",
"0.54115546",
"0.53924274",
"0.53813744",
"0.5367464",
"0.5357632",
"0.534432",
"0.533319... | 0.5214941 | 36 |
Converts text to integer representation. | def GE8Y(YKHO, LNo8, UXqs):
hkxX = oyIN.array([YKHO.char_to_int[LVAh] for LVAh in UXqs.decode('utf-8').lower()], dtype=oyIN.int32)
return (LNo8, hkxX) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BLG7(l5Ny):\n try:\n return int(''.join((WKvO for WKvO in l5Ny if WKvO.isdigit())))\n except ValueError:\n return 0",
"def i3qN(l5Ny):\n if l5Ny is not None:\n return int(l5Ny)",
"def BLG7(l5Ny):\n try:\n return int(''.join((WKvO for WKvO in l5Ny if WKvO.isdigit())))... | [
"0.7976382",
"0.7972819",
"0.79645836",
"0.78162444",
"0.76706666",
"0.75936115",
"0.75627357",
"0.7413863",
"0.71724993",
"0.716922",
"0.71101624",
"0.71081233",
"0.7085941",
"0.7073401",
"0.69583523",
"0.6954645",
"0.6922302",
"0.69166285",
"0.6870449",
"0.68281126",
"0.675... | 0.0 | -1 |
Converts dense tensor to sparse. | def N9pj(FXoG):
_0VL = ZylS.where(ZylS.not_equal(FXoG, -1))
hkxX = ZylS.gather_nd(FXoG, _0VL)
ROpF = ZylS.shape(FXoG, out_type=ZylS.int64)
return ZylS.SparseTensor(_0VL, hkxX, ROpF) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R1eO(oP0T):\n yDqo = oP0T.dtype\n begE = oP0T.device\n Xbds = oP0T.requires_grad\n _0VL = ht2j.nonzero(oP0T)\n if len(_0VL.shape) == 0:\n return ht2j.sparse_coo_tensor([], [], oP0T.shape, dtype=yDqo, device=begE, requires_grad=Xbds)\n _0VL = _0VL.t()\n hkxX = oP0T[tuple((_0VL[YRbF] ... | [
"0.8202534",
"0.81880486",
"0.81148744",
"0.80643857",
"0.78860074",
"0.78608465",
"0.75451064",
"0.74709725",
"0.7404573",
"0.7375494",
"0.7375494",
"0.7375494",
"0.7375494",
"0.7375494",
"0.7375494",
"0.7351736",
"0.7182628",
"0.7012701",
"0.70013547",
"0.6993703",
"0.69833... | 0.8211872 | 0 |
Converts sparse tensor to text string. | def Ghuj(BtZX, pdQt):
mkaz = set(BtZX.indices[:, 0])
Aofo = {}
for QyVM in mkaz:
UqER = BtZX.indices[:, 0] == QyVM
Aofo[QyVM] = ''.join([pdQt[jbXL] for jbXL in BtZX.values[oyIN.ix_(UqER)]])
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KA5q(vhpA):\n vIwR = ''\n for YRbF in range(vhpA.size(0)):\n _K85 = vhpA[YRbF]\n vIwR += bMMz(_K85)\n return vIwR",
"def dI8X(YKHO, vhpA):\n Cxtm = ''\n for YRbF in range(len(vhpA)):\n yAmx = YKHO.long_matrix_to_string(vhpA[YRbF])\n Cxtm += yAmx + '\\n'\n return ... | [
"0.6828662",
"0.6756085",
"0.6750449",
"0.6624856",
"0.6329179",
"0.6201067",
"0.6136717",
"0.6086026",
"0.6066877",
"0.6054687",
"0.60532016",
"0.6044901",
"0.6043553",
"0.6040676",
"0.5983602",
"0.5959842",
"0.58843845",
"0.5815617",
"0.58152515",
"0.5798615",
"0.57616186",... | 0.7352862 | 0 |
Now write a list comprehension that will create a deck of cards. Each element in the list will be a card, which is represented by a tuple containing the suit as a string and the value as an int. | def JJor():
return [(iCfd, BWXx) for iCfd in ('heart', 'diamond', 'spade', 'club') for BWXx in range(1, 14)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d56l():\n F1Hz = UQtd('Card', 'rank suit')\n HRrY = ['A'] + [str(exwG) for exwG in range(2, 11)] + ['J', 'Q', 'K']\n SOXX = ['spades', 'hearts', 'diamonds', 'clubs']\n return [F1Hz(fdMZ, iCfd) for iCfd in SOXX for fdMZ in HRrY]",
"def z9Hb():\n return [(iCfd, wEf2) for iCfd in TW5D for wEf2 in... | [
"0.8073618",
"0.77677613",
"0.77512705",
"0.77269113",
"0.76304275",
"0.76259243",
"0.75969803",
"0.7580693",
"0.7548176",
"0.75430125",
"0.7503501",
"0.74477464",
"0.7396097",
"0.7392216",
"0.73878986",
"0.7346418",
"0.7336041",
"0.7326776",
"0.73140574",
"0.7313808",
"0.731... | 0.8412322 | 0 |
Return a new DeviceTreeSegment object. | def FIMM(YKHO, j3HC):
if not Hy7s.path.isfile(j3HC):
raise IOError('The dtbo file {} does not exist.'.format(j3HC))
YKHO.dtbo_path = j3HC
YKHO.dtbo_name = rwsZ(j3HC)
YKHO.sysfs_dir = Hy7s.path.join(cU_9, YKHO.dtbo_name) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eLpg(Emd4, Pjr8):\n return Emd4(Pjr8, Pjr8.get_object(oy_l, UNsD))",
"def LE07(YKHO, Tg4_: dict=None) -> object:\n if Tg4_ is None:\n print('No segment data has been pushed')\n return None\n nPrm = JMSA(Tg4_)\n pG0V = HZbD(YKHO._endpoint_company + YKHO._getSegments, data=nPrm, heade... | [
"0.5484412",
"0.53332496",
"0.526521",
"0.5172035",
"0.51349384",
"0.51225895",
"0.51219565",
"0.5063204",
"0.505969",
"0.5051512",
"0.50509906",
"0.501788",
"0.49944448",
"0.49843833",
"0.4954621",
"0.49531722",
"0.4941875",
"0.4931577",
"0.49279803",
"0.49278826",
"0.492763... | 0.0 | -1 |
Show if the device tree segment has been applied. Returns bool True if the device tree status shows `applied`. | def _LW_(YKHO):
if not Hy7s.path.exists(YKHO.sysfs_dir):
return False
with open(Hy7s.path.join(YKHO.sysfs_dir, 'status'), 'r') as eHNT:
return eHNT.read() == 'applied\n' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dwnD(YKHO):\n return bool(YKHO.__get_command('CONTrol:FSWEEp:STATus?'))",
"def km9n(YKHO):\n return bool(YKHO.sysfs_entry) and Hy7s.path.exists(YKHO.sysfs_entry)",
"def sQqs(YKHO):\n return len(YKHO.all_applicable_rules()) == 0",
"def Debg(YKHO) -> bool:\n return bool(YKHO._node.status)",
"... | [
"0.5809354",
"0.5535973",
"0.55192",
"0.5436278",
"0.5342148",
"0.5338066",
"0.5310855",
"0.5283587",
"0.5270052",
"0.5170039",
"0.51350546",
"0.5126821",
"0.51209545",
"0.51209515",
"0.51131725",
"0.5109893",
"0.5106649",
"0.5104184",
"0.5069269",
"0.5067884",
"0.5062407",
... | 0.65339637 | 0 |
Initialize an UI object. | def FIMM(YKHO):
YKHO._ui_windows = list() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DbxN(GD_A):\n global __ui\n J7ds = GD_A",
"def FIMM(YKHO, GD_A):\n YKHO.ui = GD_A",
"def FIMM(YKHO):\n super(rirZ, YKHO).__init__()\n YKHO.initConfiguration()\n YKHO.initUI()",
"def MG5I(YKHO):\n YKHO.setFixedSize(600, 300)\n YKHO.centre()\n YKHO.setWindowTitle('UBCCrawler')\n ... | [
"0.7884616",
"0.77705556",
"0.7744777",
"0.77082723",
"0.760507",
"0.7596885",
"0.7588221",
"0.75435925",
"0.75154793",
"0.74967057",
"0.7439845",
"0.7345037",
"0.734425",
"0.7329352",
"0.7313259",
"0.73079985",
"0.7292327",
"0.7289881",
"0.7266787",
"0.72555834",
"0.72469103... | 0.7081723 | 29 |
Shuffle an iterator. This works by holding `bufsize` items back and yielding them sometime later. This is NOT 100% random, proved or anything. | def VsmN(OxJJ, vK3y=10000):
OxJJ = iter(OxJJ)
LaVg = []
try:
while True:
for YRbF in Ni9Y(tuKI.randint(1, vK3y - len(LaVg))):
LaVg.append(OxJJ.next())
tuKI.shuffle(LaVg)
for YRbF in Ni9Y(tuKI.randint(1, vK3y)):
if LaVg:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CH8T(nPrm, vK3y=1000):\n LaVg = []\n for mvm2 in nPrm:\n if len(LaVg) < vK3y:\n LaVg.append(next(nPrm))\n G1Hx = JseQ.randint(0, len(LaVg) - 1)\n mvm2, LaVg[G1Hx] = (LaVg[G1Hx], mvm2)\n yield mvm2",
"def CH8T(nPrm, vK3y=1000):\n LaVg = []\n for mvm2 in nPrm:... | [
"0.79748356",
"0.79633266",
"0.77488697",
"0.657234",
"0.60056764",
"0.58970666",
"0.5829026",
"0.5772495",
"0.56496584",
"0.5642424",
"0.56347275",
"0.5607005",
"0.55406076",
"0.55359083",
"0.552413",
"0.5514292",
"0.5447459",
"0.54207575",
"0.5406602",
"0.53942883",
"0.5392... | 0.76741195 | 4 |
Use this data source to access information about an existing resource. | def btUF(hGN5: Optional[str]=None, bD7m: Optional[str]=None, A2Ul: Optional[bool]=None, VKhi: Optional[pulumi.InvokeOptions]=None) -> gSM6:
rYZf = dict()
rYZf['content'] = hGN5
rYZf['url'] = bD7m
rYZf['verifyChain'] = A2Ul
VKhi = qe4Y.InvokeOptions.merge(i5mz.get_invoke_opts_defaults(), VKhi)
p5... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _t3k(YKHO, Eorv):\n raise NotImplementedError",
"def _t3k(YKHO, Eorv):\n raise NotImplementedError",
"def HeD1(YKHO):\n raise NotImplementedError('Please Implement this method')",
"def fZQR(YKHO):\n for x0hE, zn0c in YKHO.clients.get_clients():\n try:\n Eorv = x0hE.get_resou... | [
"0.67010295",
"0.67010295",
"0.6675973",
"0.6643787",
"0.6498448",
"0.6480757",
"0.6422027",
"0.6381092",
"0.6377706",
"0.6368547",
"0.63489103",
"0.6343972",
"0.6338893",
"0.62235767",
"0.61831486",
"0.6182694",
"0.6177376",
"0.6171728",
"0.6155077",
"0.6142951",
"0.6132873"... | 0.0 | -1 |
Use this data source to access information about an existing resource. | def _BIc(hGN5: Optional[pulumi.Input[Optional[str]]]=None, bD7m: Optional[pulumi.Input[Optional[str]]]=None, A2Ul: Optional[pulumi.Input[Optional[bool]]]=None, VKhi: Optional[pulumi.InvokeOptions]=None) -> qe4Y.Output[iN95]:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _t3k(YKHO, Eorv):\n raise NotImplementedError",
"def _t3k(YKHO, Eorv):\n raise NotImplementedError",
"def HeD1(YKHO):\n raise NotImplementedError('Please Implement this method')",
"def fZQR(YKHO):\n for x0hE, zn0c in YKHO.clients.get_clients():\n try:\n Eorv = x0hE.get_resou... | [
"0.6701141",
"0.6701141",
"0.6674192",
"0.66434205",
"0.6496995",
"0.64797753",
"0.6420289",
"0.63790625",
"0.6375624",
"0.63675797",
"0.6349413",
"0.63445276",
"0.6336711",
"0.6221801",
"0.6182098",
"0.61818045",
"0.61752254",
"0.6169869",
"0.6154932",
"0.6141021",
"0.613145... | 0.0 | -1 |
Helper method for parsing failed AWS API call | def BRMA(YKHO, aTqo):
if aTqo.body:
lCrW = GXnK.fromstring(aTqo.body)
vdhi = lCrW.find('.//Message')
if vdhi is not None:
zTKF = vdhi.text
else:
zTKF = None
return zTKF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y03z(YKHO):\n TBsA = super().parse_error()\n Wxnj, Ol8d = YKHO._parse_error_details(element=TBsA)\n gTi_ = PMYa(element=TBsA, xpath='RequestId', namespace=YKHO.namespace)\n XldB = PMYa(element=TBsA, xpath='HostId', namespace=YKHO.namespace)\n P1dF = {'code': Wxnj, 'message': Ol8d, 'request_id': ... | [
"0.68271327",
"0.6806997",
"0.67601585",
"0.6755335",
"0.66148585",
"0.65602255",
"0.6453768",
"0.64512646",
"0.64182943",
"0.6387764",
"0.6387764",
"0.6367482",
"0.63508695",
"0.63373715",
"0.63069594",
"0.63055325",
"0.6300852",
"0.6277381",
"0.627494",
"0.62485963",
"0.621... | 0.6103035 | 34 |
Reset the parameter gradients to zero | def frhb(YKHO):
YKHO.gradW = VNqG(YKHO.W.shape)
YKHO.gradb = VNqG(YKHO.b.shape) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def frhb(YKHO):\n for xqoZ in YKHO.params:\n xqoZ.grad = None",
"def frhb(YKHO):\n for XP5J in YKHO.params:\n XP5J.grad = None\n YKHO.optimizer.zero_grad()",
"def SiRx(YKHO):\n if not YKHO._gradients:\n return\n YKHO._accum_steps.assign(0)\n for ICX2 in YKHO._gradients:\n... | [
"0.84083503",
"0.8256303",
"0.8248732",
"0.82287943",
"0.82287943",
"0.81522536",
"0.8137735",
"0.8113784",
"0.8086225",
"0.807688",
"0.807688",
"0.807688",
"0.807688",
"0.8076086",
"0.8074579",
"0.80562156",
"0.8045229",
"0.8042425",
"0.8036362",
"0.8036362",
"0.8036362",
... | 0.7564735 | 48 |
Perform the gradient descent parameter update for all layers | def QdZT(YKHO, tspZ):
for r8hN in YKHO.modules:
r8hN.update(tspZ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pu93(YKHO):\n for gEmA in YKHO.layers:\n if not (isinstance(gEmA, X6a0) or isinstance(gEmA, lMfz)):\n F1XA = gEmA.weight_gradient\n CAnn = 1 / F1XA.shape[0] * oyIN.sum(F1XA, axis=0)\n if YKHO.regularization:\n CAnn += YKHO.regularization(gEmA.weights, d... | [
"0.7759346",
"0.7635363",
"0.757706",
"0.7572127",
"0.74855226",
"0.7284074",
"0.7272617",
"0.7228325",
"0.72146064",
"0.7213478",
"0.7184698",
"0.717153",
"0.7165042",
"0.7158693",
"0.7124158",
"0.71135384",
"0.7101516",
"0.7069956",
"0.7067488",
"0.7051277",
"0.7011387",
... | 0.0 | -1 |
Reset the gradients to zero for all layer parameters | def frhb(YKHO):
for r8hN in YKHO.modules:
r8hN.zero_grad() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def frhb(YKHO):\n for vC9B in YKHO.layers:\n vC9B.zero_grad()",
"def frhb(YKHO):\n for xqoZ in YKHO.parameters():\n xqoZ.zero_grad()",
"def frhb(YKHO):\n for xqoZ in YKHO.parameters():\n xqoZ.zero_grad()",
"def frhb(YKHO):\n for xqoZ in YKHO.params:\n xqoZ.grad = None"... | [
"0.8139894",
"0.80765253",
"0.80765253",
"0.807284",
"0.8034761",
"0.80066",
"0.798152",
"0.7942967",
"0.7822603",
"0.7795138",
"0.7767089",
"0.77653354",
"0.7736462",
"0.7705982",
"0.76835996",
"0.767356",
"0.767356",
"0.767356",
"0.767356",
"0.7663722",
"0.76607287",
"0.7... | 0.734009 | 46 |
Returns the number of vertices in this graph | def cxdz(YKHO) -> int:
return len(YKHO.__nodes) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GthF(YKHO):\n return YKHO.graph.vertexCount()",
"def MrQl(YKHO):\n return YKHO._n",
"def X7h0(YKHO):\n return len(YKHO.vertices)",
"def JalI(YKHO) -> int:\n return YKHO.__number_of_vertices",
"def MrQl(YKHO):\n return len(YKHO._edges)",
"def poMF(YKHO):\n return YKHO._num_vertices",... | [
"0.9108305",
"0.8986315",
"0.89620394",
"0.8951864",
"0.89293575",
"0.88889927",
"0.88889927",
"0.8874109",
"0.8862719",
"0.8851237",
"0.88304037",
"0.88298005",
"0.8790437",
"0.8790437",
"0.8785027",
"0.87602",
"0.8702316",
"0.867409",
"0.86195934",
"0.8585138",
"0.8581303",... | 0.70608616 | 82 |
Returns the number of edges in this graph | def itm2(YKHO) -> int:
return YKHO.__edge_count | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fOCg(YKHO):\n return YKHO._graph.number_of_edges()",
"def fOCg(YKHO):\n return YKHO.graph.number_of_edges()",
"def n8F9(YKHO) -> int:\n return YKHO.__edge_count",
"def DY3m(YKHO):\n return len(YKHO.getEdges())",
"def vi4d(YKHO):\n return YKHO._n",
"def fOCg(YKHO):\n return len(list(... | [
"0.90981364",
"0.9089187",
"0.9079709",
"0.90017414",
"0.8942426",
"0.8907405",
"0.88849133",
"0.8853943",
"0.881077",
"0.881077",
"0.87938625",
"0.87933505",
"0.87933505",
"0.8779135",
"0.87594724",
"0.8752384",
"0.86953545",
"0.86643994",
"0.8657911",
"0.8637107",
"0.861539... | 0.79581267 | 46 |
Adds a node to the graph. | def g5gD(YKHO, Lnes: int, oeNL: tuple=None) -> bool:
if Lnes not in YKHO.__nodes:
TuoA = uU2K(*oeNL) if oeNL is not None else None
Q6kx = o7DN(Lnes, TuoA)
YKHO.__nodes[Lnes] = Q6kx
EoEf: cuzp[str, cuzp[int, ndC_]] = {DRE7.ATTR_LINKS_OUT: {}, DRE7.ATTR_LINKS_IN: {}}
YKHO.__lin... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g5gD(YKHO, Q6kx):\n YKHO.graph[Q6kx]",
"def g5gD(YKHO, Q6kx):\n YKHO.nodes.add(Q6kx)",
"def g5gD(YKHO, Q6kx):\n YKHO._nodes.add(Q6kx)",
"def g5gD(YKHO, Q6kx):\n YKHO._check_nodes([Q6kx])\n jHsn.DiGraph.add_node.im_func(YKHO, Q6kx)",
"def g5gD(YKHO, Q6kx):\n YKHO.nodes.append(Q6kx)",
... | [
"0.8982756",
"0.8455929",
"0.8396676",
"0.83696526",
"0.8361396",
"0.8361396",
"0.83389515",
"0.8279939",
"0.8257232",
"0.8219817",
"0.8179781",
"0.8175587",
"0.81434554",
"0.8087202",
"0.8066252",
"0.8065444",
"0.80501956",
"0.80387354",
"0.7997806",
"0.7997806",
"0.7878475"... | 0.0 | -1 |
Removes an edge from the graph. | def iyca(YKHO, Za_E: int, Hymz: int) -> bool:
if Za_E in YKHO.__links and Hymz in YKHO.__links.get(Za_E).get(DRE7.ATTR_LINKS_OUT):
del YKHO.__links.get(Za_E).get(DRE7.ATTR_LINKS_OUT)[Hymz]
del YKHO.__links.get(Hymz).get(DRE7.ATTR_LINKS_IN)[Za_E]
YKHO.__mode_count += 1
YKHO.__edge_cou... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Eik1(YKHO, D70y):\n if YKHO.edgeExists(D70y):\n del YKHO.graph[YKHO.EDGES_KEY][D70y]\n return\n raise Exception('Edge not Found in Graph!')",
"def Qmvo(YKHO, D70y):\n YKHO.nodes[D70y[0]].neighbors.discard(D70y[1])\n YKHO.nodes[D70y[1]].neighbors.discard(D70y[0])",
"def iyca(YKHO, ... | [
"0.839114",
"0.82493705",
"0.7974301",
"0.79620546",
"0.7937009",
"0.79287076",
"0.7900778",
"0.7813701",
"0.77783793",
"0.77435935",
"0.77197754",
"0.7717087",
"0.7710291",
"0.77064824",
"0.77061796",
"0.7650032",
"0.7617598",
"0.7606133",
"0.7599825",
"0.7551449",
"0.752722... | 0.0 | -1 |
Full pass through the ConvModel. | def KVH6(YKHO, rmyT, MKlR, mvHT, Z7tv, eFKZ: bool=True):
if eFKZ:
MKlR['user'] = YKHO.user_embed(MKlR['user'])
MKlR['item'] = YKHO.item_embed(MKlR['item'])
if 'sport' in MKlR.keys():
MKlR['sport'] = YKHO.sport_embed(MKlR['sport'])
MKlR = YKHO.get_repr(rmyT, MKlR)
WQ_f = Y... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def v4O_(YKHO, C3ST, Vpyj=1.0):\n YKHO.counts = oRi_(lambda: 0)\n wqdw = YKHO.phase == 'inference'\n Ty9i = 'data'\n Ty9i = YKHO.conv(C3ST, 'conv', Ty9i, input_depth=3, num_filters=32, kernel=3, stride=2, pad=0, is_inference=wqdw)\n Ty9i = YKHO.conv(C3ST, 'conv', Ty9i, input_depth=32, num_filters=32... | [
"0.64705604",
"0.64474887",
"0.6427356",
"0.6406521",
"0.6402844",
"0.6382764",
"0.6335654",
"0.6310479",
"0.63095784",
"0.6276478",
"0.6232094",
"0.62264156",
"0.62264156",
"0.61935025",
"0.617639",
"0.61592394",
"0.6137909",
"0.6106115",
"0.609845",
"0.60788435",
"0.6038548... | 0.0 | -1 |
int>str >>>generate_nums(test.py, 3) [3\n, 7\n, 21\n] >>>generate_nums(test.py, 7) ['3\n', '7\n', '21\n', '14\n', '100\n', '29\n', '37\n'] | def cX5P(Ux0P, exwG):
tuKI.seed(0)
eHNT = open(Ux0P, 'w')
ewCu = 0
while ewCu < exwG:
eHNT.write(str(tuKI.randrange(0, 100)) + '\n')
ewCu += 1
eHNT.close() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mFai():\n return [1, 3, 5, 7, 8]",
"def hkbL(exwG):\n mSrU = []\n for YRbF in range(0, exwG):\n mSrU.append(tuKI.randint(1, 10 * exwG))\n return mSrU",
"def gkKB():\n xYvp = []\n for YRbF in range(oD_w):\n XP5J = int(tuKI.choice(PdoO)[:oD_w])\n xYvp.append(XP5J)\n ... | [
"0.70414424",
"0.62050927",
"0.61696696",
"0.61572325",
"0.61489296",
"0.61198175",
"0.59970707",
"0.5976662",
"0.5937312",
"0.5927421",
"0.5916337",
"0.5899881",
"0.5893241",
"0.58880717",
"0.58517504",
"0.58437556",
"0.58290875",
"0.5817084",
"0.5814256",
"0.5814167",
"0.58... | 0.5528263 | 70 |
Strips out quoted strings from a name and replaces them with their raw versions. So for example, if foo"()\\"\\\\"bar | def CzA5(mWFP):
Aofo = ''
lzQg = False
EtF8 = False
yJqe = None
for YRbF, Z9rn in enumerate(mWFP):
if EtF8:
EtF8 = False
if Z9rn == '\\':
Aofo += '\\'
elif Z9rn == '"':
Aofo += '"'
else:
Aofo += '... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i_wI(exwG):\n exwG = exwG[1:-1]\n exwG = exwG.replace('\\\\\"', '\"')\n exwG = exwG.replace(\"\\\\'\", \"'\")\n exwG = exwG.replace('\\\\\\\\', '\\\\')\n exwG = exwG.replace('\\\\#', '#')\n return exwG",
"def t0t2(YKHO, mWFP):\n if len(mWFP) >= 3 and mWFP[0] == \"'\" and (mWFP[-1] == \"'... | [
"0.7413899",
"0.72629607",
"0.6556847",
"0.65254265",
"0.6487565",
"0.644077",
"0.64304614",
"0.6375459",
"0.63148713",
"0.62843794",
"0.62744",
"0.6232577",
"0.620571",
"0.6176189",
"0.615513",
"0.61498225",
"0.61322653",
"0.61319035",
"0.6122908",
"0.6118184",
"0.6086041",
... | 0.6879902 | 2 |
Performs lemmatization operation and removes stopwords. | def Ntaf(i0XC, gXgy):
jQ3Z = rLdf.read_csv(i0XC, parse_dates=['dtm'], converters={'tags': HyPc})
Dhdw.download('stopwords')
yttv = alQE()
GLxq = set(Dhdw.corpus.stopwords.words('russian'))
def GMXA(l5Ny):
A1xJ = yttv.lemmatize(l5Ny)
return ''.join((vC9B for vC9B in A1xJ if vC9B not ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MvRx(l5Ny):\n return ydeT(g8pp(Jnxk(l5Ny)))",
"def v_nw(yAmx):\n hwHU = set(di0c.words('english'))\n DJGF = dFss(yAmx)\n bxxQ = []\n for yzQ0 in DJGF:\n if yzQ0 not in hwHU:\n bxxQ.append(yzQ0.lower())\n HD_u = []\n for yzQ0 in bxxQ:\n HD_u.append(dhx_.lemmatize(... | [
"0.7674581",
"0.7643973",
"0.76034826",
"0.7507208",
"0.7478266",
"0.7436004",
"0.7429125",
"0.73630357",
"0.7362136",
"0.7308535",
"0.7306266",
"0.7299121",
"0.7285194",
"0.72786146",
"0.72550404",
"0.72397023",
"0.72317946",
"0.7220443",
"0.7168449",
"0.71559006",
"0.714910... | 0.72902524 | 12 |
Returns True if any two non identical elements in lst add up to any n. >>> add_up(100, [1, 2, 3, 4, 5]) False >>> add_up(7, [1, 2, 3, 4, 2]) True >>> add_up(10, [5, 5]) False | def VXow(exwG, yv6U):
RfIB = set()
yv6U = set(yv6U)
for WKvO in yv6U:
if exwG - WKvO != WKvO:
RfIB.add(exwG - WKvO)
if yv6U.intersection(RfIB):
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Bnch(yv6U):\n xYvp = set()\n for mLGw in yv6U:\n if -mLGw in xYvp or mLGw == 0:\n return True\n xYvp.add(mLGw)\n return False",
"def Rn4f(yv6U):\n xYvp = set(yv6U)\n for mLGw in yv6U:\n if -mLGw in xYvp:\n return True\n return False",
"def mTws(y... | [
"0.61073875",
"0.592463",
"0.5852009",
"0.57596546",
"0.5747669",
"0.5641088",
"0.5573405",
"0.55654144",
"0.5548199",
"0.5518463",
"0.5501839",
"0.5465827",
"0.544363",
"0.54138327",
"0.5409392",
"0.5409194",
"0.5358707",
"0.53405094",
"0.53234255",
"0.5281529",
"0.52637064"... | 0.78166616 | 0 |
Returns True if there are any duplicates in lst that are within k indices apart. >>> find_duplicates_k(3, [1, 2, 3, 4, 1]) False >>> find_duplicates_k(4, [1, 2, 3, 4, 1]) True | def lPvs(G1Hx, yv6U):
jth9 = yv6U[:]
ycBG = jth9[0:G1Hx + 1]
for yKcO in range(len(yv6U) - G1Hx + 1):
if len(ycBG) != len(set(ycBG)):
return True
ycBG = jth9[yKcO:yKcO + G1Hx + 1]
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mowq(xYvp: list, G1Hx: int) -> bool:\n if len(xYvp) == 0 or G1Hx < 1:\n return False\n Djvb = dict()\n for YRbF, mLGw in enumerate(xYvp):\n if mLGw in Djvb:\n SvM6 = Djvb[mLGw]\n if YRbF - SvM6 <= G1Hx:\n return True\n Djvb[mLGw] = YRbF\n ... | [
"0.82379365",
"0.79103506",
"0.75091106",
"0.703492",
"0.6477879",
"0.6271109",
"0.6215751",
"0.6099498",
"0.6009288",
"0.59998685",
"0.59850854",
"0.5960269",
"0.59362286",
"0.59299636",
"0.5897407",
"0.58957916",
"0.5826078",
"0.5782103",
"0.5685844",
"0.5656408",
"0.565514... | 0.83287764 | 0 |
add a node to end of list | def SStx(YKHO, Q6kx):
if YKHO.head is None:
YKHO.head = Q6kx
YKHO.tail = Q6kx
else:
YKHO.tail._next = Q6kx
YKHO.tail = Q6kx
YKHO.size += 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F1bx(YKHO, BWXx):\n Q6kx = o7DN(BWXx)\n if YKHO.tail is None:\n YKHO.head = Q6kx\n YKHO.tail = Q6kx\n else:\n YKHO.tail.next = Q6kx\n YKHO.tail = Q6kx\n YKHO.length += 1",
"def e68I(YKHO, Cc00):\n Q6kx = YKHO.first\n while Q6kx.getNext():\n Q6kx = Q6kx.get... | [
"0.80437136",
"0.8026024",
"0.78452337",
"0.7784837",
"0.77793527",
"0.776033",
"0.76827496",
"0.7632765",
"0.7573366",
"0.75633276",
"0.75375545",
"0.7525058",
"0.75217766",
"0.7496092",
"0.7491828",
"0.743327",
"0.73713624",
"0.7357141",
"0.73525316",
"0.73506206",
"0.73486... | 0.7096963 | 67 |
add to front reassign head value to current node | def _jXH(YKHO, Q6kx):
if YKHO.head is None:
YKHO.head = Q6kx
YKHO.tail = Q6kx
else:
YKHO.head._prev = Q6kx
Q6kx._next = YKHO.head
YKHO.head = Q6kx
YKHO.size += 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dZVG(YKHO, Cc00):\n ycBG = dlws(Cc00)\n ycBG.set_next(YKHO.head)\n YKHO.head = ycBG",
"def dZVG(YKHO, Cc00):\n ycBG = eTj7(Cc00)\n ycBG.set_next(YKHO.head)\n YKHO.head = ycBG",
"def LYLL(YKHO, BWXx):\n BQJU = ne2O(BWXx)\n if YKHO.size == 0:\n YKHO.head = BQJU\n YKHO.ta... | [
"0.7985706",
"0.79540706",
"0.7606761",
"0.7568449",
"0.75651217",
"0.75644237",
"0.7554879",
"0.7554879",
"0.7482422",
"0.74813896",
"0.74790865",
"0.7394113",
"0.73670095",
"0.7348661",
"0.73477805",
"0.7319438",
"0.73061556",
"0.72785246",
"0.7261473",
"0.72384",
"0.723151... | 0.0 | -1 |
remove and return head value reassign head to current head.next | def BEuN(YKHO):
if YKHO.head is None:
return 'No value to return'
elif YKHO.head._next == None:
return YKHO.head
else:
Q6kx = YKHO.head
YKHO.head = YKHO.head._next
YKHO.size -= 1
return Q6kx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kSdD(YKHO):\n wEf2 = YKHO.head\n YKHO.head = YKHO.head._next\n YKHO._size -= 1\n return wEf2",
"def Ml0O(YKHO):\n if YKHO.size == 0:\n return None\n ZESx = YKHO.head.value\n if YKHO.size == 1:\n YKHO.head = YKHO.tail = None\n else:\n YKHO.head = YKHO.head.next\n ... | [
"0.83815885",
"0.8062972",
"0.8007617",
"0.7930542",
"0.79278755",
"0.77377737",
"0.77087253",
"0.76820177",
"0.76540136",
"0.76504564",
"0.76210886",
"0.7578321",
"0.7568007",
"0.7559739",
"0.7521582",
"0.74931437",
"0.74785024",
"0.74692327",
"0.7447357",
"0.74439967",
"0.7... | 0.73417556 | 26 |
remove and return tail value reassign tail to prev | def DkWr(YKHO):
if YKHO.tail is None:
return 'No value to return'
elif YKHO.tail._prev == None:
return YKHO.tail
else:
Q6kx = YKHO.tail
YKHO.tail = YKHO.tail._prev
YKHO.size -= 1
return Q6kx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K8ox(YKHO):\n BWXx = YKHO.tail.data\n YKHO.tail = YKHO.tail.prev\n if YKHO.tail != None:\n YKHO.tail.next = None\n YKHO.size -= 1\n return BWXx",
"def mVXt(YKHO):\n Ylbp = YKHO.tail.prev\n YKHO._remove_node(Ylbp)\n return Ylbp",
"def mVXt(YKHO):\n Ylbp = YKHO.tail.prev\n ... | [
"0.7697306",
"0.7652928",
"0.7652928",
"0.7499226",
"0.732521",
"0.7247495",
"0.72336763",
"0.7187844",
"0.71875155",
"0.7186094",
"0.7162136",
"0.7151878",
"0.7109419",
"0.7086818",
"0.7049265",
"0.7013387",
"0.7010875",
"0.6985634",
"0.6985004",
"0.6983479",
"0.6957529",
... | 0.73726696 | 4 |
Return the sum of all odd numbers between a and b >>> odd_sum(100, 200) 7500 | def MqT_(jzdc, Fg_i):
assert type(jzdc) == int and type(Fg_i) == int and (Fg_i > jzdc)
jzdc = jzdc + 1 if jzdc % 2 == 0 else jzdc
return sum(list(range(jzdc, Fg_i, 2))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iG7T(jzdc, Fg_i):\n wjRY = 0\n for YRbF in range(jzdc, Fg_i + 1):\n if YRbF % 2 != 0:\n wjRY = wjRY + YRbF\n return wjRY",
"def aYLQ(jzdc, Fg_i):\n sum = 0\n while jzdc <= Fg_i:\n sum += jzdc\n jzdc += 1\n return sum",
"def eDnj(FGW3):\n wjRY = 0\n fo... | [
"0.8156562",
"0.7342568",
"0.7229932",
"0.7158842",
"0.7148061",
"0.7102696",
"0.7035698",
"0.6923634",
"0.68923765",
"0.68616503",
"0.68468386",
"0.67681485",
"0.6756218",
"0.66598284",
"0.6623701",
"0.65798396",
"0.65294594",
"0.65059215",
"0.6496212",
"0.64493406",
"0.6402... | 0.9036341 | 0 |
Gets the currently active configuration. There must always be an active configuration. If there isn't this means no configurations have been created yet and this will autocreate a default configuration. If there are legacy user properties, they will be migrated to the newly created configuration. | def kcAT():
return pGH8(force_create=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pGH8(mfBG):\n Zu8l = JbVO()\n if not Zu8l:\n Zu8l = DcuO(mfBG)\n return y8cn(Zu8l, True)",
"def jwlr(YKHO) -> nC76:\n if not YKHO.active_configuration:\n raise KpxQ('No active configuration')\n return YKHO.get_configuration(name=YKHO.active_configuration)",
"def oRVB():\n gl... | [
"0.76480967",
"0.728606",
"0.7003782",
"0.67860323",
"0.6607709",
"0.65644324",
"0.6523259",
"0.64032394",
"0.63709664",
"0.6363992",
"0.631443",
"0.6240764",
"0.62255967",
"0.6221651",
"0.6193003",
"0.61412823",
"0.612778",
"0.612778",
"0.612778",
"0.61150265",
"0.61033255",... | 0.70951194 | 2 |
Gets the currently active configuration. There must always be an active configuration. If there isn't this means no configurations have been created yet and this will autocreate a default configuration. If there are legacy user properties, they will be migrated to the newly created configuration. | def pGH8(mfBG):
Zu8l = JbVO()
if not Zu8l:
Zu8l = DcuO(mfBG)
return y8cn(Zu8l, True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jwlr(YKHO) -> nC76:\n if not YKHO.active_configuration:\n raise KpxQ('No active configuration')\n return YKHO.get_configuration(name=YKHO.active_configuration)",
"def kcAT():\n return pGH8(force_create=True)",
"def oRVB():\n global _active_config\n cI0f = Hy7s.environ.get('DEPLOYED', ... | [
"0.7286572",
"0.7096514",
"0.70042795",
"0.67855215",
"0.66067463",
"0.6564057",
"0.6523689",
"0.6403473",
"0.6369613",
"0.63623327",
"0.63143915",
"0.623948",
"0.6224481",
"0.6221421",
"0.6191512",
"0.6140272",
"0.61264765",
"0.61264765",
"0.61264765",
"0.61137295",
"0.61017... | 0.76495606 | 0 |
Gets the currently active configuration. | def JbVO():
Zu8l = Yhfz.ActiveConfig()
if not Zu8l:
Zu8l = Qq6Q()
if not Zu8l:
Zu8l = OzXQ()
return Zu8l | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zKPb(YKHO):\n return YKHO._config",
"def jwlr(YKHO) -> nC76:\n if not YKHO.active_configuration:\n raise KpxQ('No active configuration')\n return YKHO.get_configuration(name=YKHO.active_configuration)",
"def tgzD(YKHO):\n return YKHO.config.config",
"def tgzD(YKHO):\n return YKHO.co... | [
"0.8405976",
"0.8152663",
"0.7823337",
"0.7823337",
"0.7823337",
"0.77144265",
"0.77129483",
"0.7644114",
"0.76334614",
"0.7583405",
"0.7563698",
"0.7555434",
"0.7552637",
"0.7552637",
"0.7552637",
"0.7552637",
"0.7523953",
"0.75025636",
"0.74972916",
"0.745637",
"0.7449301",... | 0.0 | -1 |
Gets the currently active configuration according to the environment. | def Qq6Q():
return Hy7s.environ.get(GPtr.CLOUDSDK_ACTIVE_CONFIG_NAME, None) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oRVB():\n global _active_config\n cI0f = Hy7s.environ.get('DEPLOYED', False)\n cH4u = Hy7s.environ.get('DEBUG', False)\n if OK5E is None:\n if cI0f:\n if cH4u:\n OK5E = oZpE\n else:\n OK5E = ponW\n elif cH4u:\n OK5E = ZK84... | [
"0.7895535",
"0.7580646",
"0.74691045",
"0.74514127",
"0.7415445",
"0.7409526",
"0.7395263",
"0.7132325",
"0.7132325",
"0.7132325",
"0.7104804",
"0.70968187",
"0.7060135",
"0.7013072",
"0.69951755",
"0.69905746",
"0.69905746",
"0.69905746",
"0.69905746",
"0.69764906",
"0.6962... | 0.6965591 | 20 |
Gets the path to the properties file for a given configuration. The file need not actually exist, it is just the path where it would be. | def L5KN(Zu8l, ckRy):
if Zu8l == kQVi:
return None
return Hy7s.path.join(ckRy.named_config_directory, d4Zi + Zu8l) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RrNC():\n return Hy7s.path.join(vmiX, u8az)",
"def zLWx(YKHO):\n qaEx = YKHO.path_of_file + YKHO.name_of_file\n return qaEx",
"def xzSM(YKHO):\n return YKHO.abs_path(YKHO.config_dir, u8az)",
"def S673(YKHO):\n return Hy7s.path.join(YKHO.database_dir, YKHO.config_filename)",
"def RrNC(YKH... | [
"0.78262746",
"0.76370335",
"0.73621553",
"0.7187476",
"0.7159429",
"0.71015006",
"0.705059",
"0.7035429",
"0.70180655",
"0.6997246",
"0.6989917",
"0.698175",
"0.6975373",
"0.6972436",
"0.6925332",
"0.68579954",
"0.6836388",
"0.68243754",
"0.6793459",
"0.67911136",
"0.6768454... | 0.0 | -1 |
Set the gradients of this parameter to all zeros. | def frhb(YKHO):
YKHO._grad = oyIN.zeros_like(YKHO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sbx9(YKHO):\n for xqoZ in YKHO.parameters():\n if xqoZ.grad is None:\n xqoZ.grad = xqoZ.new(*xqoZ.shape)\n xqoZ.grad.zero_()",
"def frhb(YKHO):\n for xqoZ in YKHO.params:\n xqoZ.grad = None",
"def qw6L(YKHO):\n for XP5J in YKHO.parameters():\n if XP5J.grad_v ... | [
"0.82432026",
"0.81136495",
"0.8018502",
"0.80098325",
"0.80098325",
"0.80084604",
"0.79021263",
"0.7854385",
"0.7833582",
"0.7812774",
"0.77456224",
"0.76735884",
"0.76419985",
"0.76379025",
"0.7584298",
"0.75761145",
"0.75671273",
"0.75671273",
"0.75671273",
"0.75671273",
"... | 0.78762084 | 8 |