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 |
|---|---|---|---|---|---|---|
Converts euler (yaw, pitch, roll) to quaternion equivalent (x, x, y, z) | def WlgB(xTkQ, H2HG, rKSe):
vHO5 = epAf.cos(xTkQ * 0.5)
BhJz = epAf.sin(xTkQ * 0.5)
U7YL = epAf.cos(H2HG * 0.5)
H4yH = epAf.sin(H2HG * 0.5)
KBgZ = epAf.cos(rKSe * 0.5)
JvR2 = epAf.sin(rKSe * 0.5)
yzQ0 = vHO5 * U7YL * KBgZ + BhJz * H4yH * JvR2
WKvO = vHO5 * U7YL * JvR2 - BhJz * H4yH * KBg... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yrsR(WKvO, LVAh, epBp, yzQ0):\n lGE9 = +2.0 * (yzQ0 * WKvO + LVAh * epBp)\n n2Q1 = +1.0 - 2.0 * (WKvO * WKvO + LVAh * LVAh)\n cDNu = epAf.atan2(lGE9, n2Q1)\n SpII = +2.0 * (yzQ0 * LVAh - epBp * WKvO)\n SpII = +1.0 if SpII > +1.0 else SpII\n SpII = -1.0 if SpII < -1.0 else SpII\n TC6u = epA... | [
"0.8429312",
"0.8423185",
"0.8400243",
"0.8332193",
"0.8192959",
"0.8170563",
"0.8155459",
"0.8058223",
"0.80349743",
"0.79742205",
"0.7747596",
"0.7597188",
"0.7543305",
"0.7500849",
"0.75007",
"0.7485397",
"0.74781585",
"0.74781585",
"0.74598426",
"0.74330425",
"0.74295586"... | 0.87279296 | 0 |
Returns the quaternion product | def lXsh(hbUd, BzON):
HueY = hbUd[0]
Y7Vs = BzON[0]
ssN5 = hbUd[1]
ezlb = BzON[1]
sQNz = hbUd[2]
qmxs = BzON[2]
oy9O = hbUd[3]
eCVV = BzON[3]
WKvO = ssN5 * Y7Vs + sQNz * eCVV - oy9O * qmxs + HueY * ezlb
LVAh = -ssN5 * eCVV + sQNz * Y7Vs + oy9O * ezlb + HueY * qmxs
epBp = ssN5... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Lx3t(YKHO, vexM: np.ndarray) -> oyIN.ndarray:\n if isinstance(vexM, R5H8):\n zDbD, jCyH, PMVZ, MDnR = vexM\n elif isinstance(vexM, (oyIN.ndarray, list, tuple)):\n zDbD, jCyH, PMVZ, MDnR = R5H8(vexM)\n else:\n raise TypeError(f'q must be a Quaternion or an array, not {type(vexM)}')... | [
"0.77504045",
"0.7210473",
"0.71107423",
"0.7068177",
"0.70024896",
"0.69102615",
"0.68782955",
"0.6862836",
"0.67189115",
"0.6666304",
"0.66502774",
"0.658127",
"0.65783346",
"0.6556263",
"0.65469915",
"0.6516602",
"0.6494177",
"0.64497936",
"0.64464974",
"0.64440626",
"0.64... | 0.73401606 | 1 |
Rotates vector xyz by quaternion wxyz | def RNfM(Ty9i, vexM):
Mkmy = [0] + Ty9i
HuSO = [vexM[0], -vexM[1], -vexM[2], -vexM[3]]
return lXsh(lXsh(vexM, Mkmy), HuSO)[1:] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PgEy(YKHO):\n _Jov = iCFA.from_axis_angle_deg(SoA4(0, 0, 1), 90.0)\n he6J = SoA4(1, 1, 1)\n EGgP = _Jov.rotate_vec(he6J)\n YKHO.assertAlmostEqual(-1.0, EGgP.x)\n YKHO.assertAlmostEqual(1.0, EGgP.y)\n YKHO.assertAlmostEqual(1.0, EGgP.z)",
"def yrsR(YKHO, WKvO, LVAh, epBp, yzQ0):\n lGE9 = ... | [
"0.70170164",
"0.698487",
"0.6981486",
"0.69387877",
"0.69113785",
"0.6902339",
"0.6857792",
"0.6597977",
"0.65789545",
"0.65615094",
"0.6493876",
"0.6478198",
"0.6469963",
"0.642127",
"0.64010155",
"0.6395416",
"0.6367804",
"0.63655335",
"0.63624156",
"0.6346277",
"0.6292973... | 0.6648088 | 7 |
Takes turn stack, flip corresponding edge flag to true and check if all edges are occupied. Returns true if occupied. | def QdZT(YKHO, E5BI):
if YKHO.occupied == 1 or YKHO.occupied == 2 or YKHO.occupied == 3:
return False
if E5BI[0].pos == YKHO.rect.topleft and E5BI[1].pos == YKHO.rect.topright or (E5BI[1].pos == YKHO.rect.topleft and E5BI[0].pos == YKHO.rect.topright):
YKHO.top_edge = True
YKHO.check_occ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OgBd(YKHO):\n for rdlD in YKHO.game_state:\n for tTpl in rdlD:\n if tTpl is None:\n return False\n return True",
"def vLZU(eL5z):\n return y1et(eL5z, 4)",
"def W3V4(eL5z):\n return y1et(eL5z, 2)",
"def nMi8(YKHO):\n for oeTy in YKHO.aliens.sprites():\n ... | [
"0.6199984",
"0.6153463",
"0.6123684",
"0.60984546",
"0.60943526",
"0.6075924",
"0.6004335",
"0.6004335",
"0.6004335",
"0.5949942",
"0.5886926",
"0.5857642",
"0.5847547",
"0.5838338",
"0.5836865",
"0.5832117",
"0.58263874",
"0.5821103",
"0.581889",
"0.5814659",
"0.5811703",
... | 0.6480664 | 0 |
Create filename for data shard. | def TDTX(pmON, TZ9E, OyTE, OkEv):
return Hy7s.path.join(pmON, '%s-%s-%.5d-of-%.5d' % (_RQl, TZ9E, OyTE, OkEv)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UjUC(rDuq):\n pmON, Ux0P = Hy7s.path.split(rDuq)\n zfYv, YBcr = Hy7s.path.splitext(Ux0P)\n if Hy7s.path.splitext(rDuq)[1] in ['.png', '.jpg', '.tiff', '.JPG']:\n SAR5 = Hy7s.path.join(pmON, ''.join([sZqf for sZqf in zfYv if sZqf.isalpha()]) + '.hdf5')\n else:\n SAR5 = Hy7s.path.join(p... | [
"0.71882224",
"0.71347773",
"0.7064838",
"0.69381607",
"0.6875004",
"0.67602825",
"0.6755242",
"0.6698934",
"0.665635",
"0.6625433",
"0.66191363",
"0.66055256",
"0.6593376",
"0.6592142",
"0.6582782",
"0.65421116",
"0.6518978",
"0.650782",
"0.64858466",
"0.6454506",
"0.6381873... | 0.706266 | 3 |
Converts a dictionary of string>int to a tf.Example. | def U7Mr(cmPJ):
bySB = {}
for G1Hx, Ty9i in jKi7.iteritems(cmPJ):
bySB[G1Hx] = ZylS.train.Feature(int64_list=ZylS.train.Int64List(value=Ty9i))
return ZylS.train.Example(features=ZylS.train.Features(feature=bySB)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FLq9(YKHO, x0Ih):\n LNo8 = x0Ih['image']\n LNo8 = LNo8.tobytes()\n UXqs = x0Ih['label']\n return ZylS.train.Example(features=ZylS.train.Features(feature={'image': ZylS.train.Feature(bytes_list=ZylS.train.BytesList(value=[LNo8])), 'label': ZylS.train.Feature(int64_list=ZylS.train.Int64List(value=[UX... | [
"0.72307324",
"0.6855185",
"0.67302984",
"0.67302984",
"0.67268705",
"0.67055607",
"0.6690847",
"0.668516",
"0.6626223",
"0.65431654",
"0.65431654",
"0.6477947",
"0.6472604",
"0.6464817",
"0.6451474",
"0.64475596",
"0.63921565",
"0.63173705",
"0.6086282",
"0.60430026",
"0.602... | 0.84548163 | 0 |
Yield successive nsized chunks from lst. | def eHxA(yv6U, exwG):
for YRbF in range(0, len(yv6U), exwG):
yield yv6U[YRbF:YRbF + exwG] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eHxA(YKHO, yv6U, exwG):\n for YRbF in range(0, len(yv6U), exwG):\n yield yv6U[YRbF:YRbF + exwG]",
"def eHxA(yv6U: list, exwG: int):\n for YRbF in range(0, len(yv6U), exwG):\n yield yv6U[YRbF:YRbF + exwG]",
"def eHxA(yv6U, exwG):\n for YRbF in range(0, len(yv6U), exwG):\n yield... | [
"0.8305801",
"0.8192371",
"0.81896204",
"0.81896204",
"0.8188763",
"0.8125368",
"0.8120533",
"0.8120533",
"0.807605",
"0.80513006",
"0.80513006",
"0.80513006",
"0.80513006",
"0.80513006",
"0.8002998",
"0.7869975",
"0.78449064",
"0.78277224",
"0.78258467",
"0.78124744",
"0.780... | 0.80520135 | 15 |
The set of arguments for constructing a PrivateCloud resource. | def FIMM(Ro_8, *, Rci7: pulumi.Input[str], mTQt: pulumi.Input['PrivateCloudManagementClusterArgs'], CtsI: pulumi.Input['PrivateCloudNetworkConfigArgs'], JBZA: Optional[pulumi.Input[str]]=None, mWFP: Optional[pulumi.Input[str]]=None, bNKA: Optional[pulumi.Input[str]]=None):
qe4Y.set(Ro_8, 'location', Rci7)
qe4Y.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(Ro_8, kFeU: str, qIxc: PrivateCloudArgs, VKhi: Optional[pulumi.ResourceOptions]=None):\n ...",
"def FIMM(Ro_8, kFeU: str, VKhi: Optional[pulumi.ResourceOptions]=None, JBZA: Optional[pulumi.Input[str]]=None, Rci7: Optional[pulumi.Input[str]]=None, mTQt: Optional[pulumi.Input[pulumi.InputType['PrivateC... | [
"0.7701864",
"0.6640795",
"0.6597265",
"0.6475078",
"0.62686265",
"0.6059364",
"0.60563135",
"0.5994978",
"0.59276193",
"0.5912271",
"0.58158076",
"0.5810898",
"0.57922196",
"0.57377315",
"0.5733888",
"0.5678828",
"0.56522614",
"0.564133",
"0.5630807",
"0.5628696",
"0.5626725... | 0.6284509 | 4 |
The ID of the PrivateCloud. | def mWFP(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'name') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def id(YKHO):\n if YKHO.cloudserver:\n return YKHO.cloudserver.id\n else:\n return None",
"def id(YKHO):\n if YKHO.cloudnet:\n return YKHO.cloudnet.id\n else:\n return None",
"def FXiA(YKHO) -> str:\n return qe4Y.get(YKHO, 'internal_id')",
"def La6v(YKHO) -> GLG2:\n... | [
"0.756143",
"0.737348",
"0.68891376",
"0.6430862",
"0.6344769",
"0.6309909",
"0.6309909",
"0.6291323",
"0.62905484",
"0.62905484",
"0.6290242",
"0.6290242",
"0.6290242",
"0.6290242",
"0.6290242",
"0.6290242",
"0.6290242",
"0.6290242",
"0.6290242",
"0.6290242",
"0.6290242",
... | 0.0 | -1 |
The ID of the PrivateCloud. | def mWFP(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'name') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def id(YKHO):\n if YKHO.cloudserver:\n return YKHO.cloudserver.id\n else:\n return None",
"def id(YKHO):\n if YKHO.cloudnet:\n return YKHO.cloudnet.id\n else:\n return None",
"def FXiA(YKHO) -> str:\n return qe4Y.get(YKHO, 'internal_id')",
"def La6v(YKHO) -> GLG2:\n... | [
"0.75614274",
"0.73734045",
"0.68891054",
"0.6430752",
"0.63447815",
"0.6309729",
"0.6309729",
"0.62912863",
"0.6290541",
"0.6290541",
"0.62901795",
"0.62901795",
"0.62901795",
"0.62901795",
"0.62901795",
"0.62901795",
"0.62901795",
"0.62901795",
"0.62901795",
"0.62901795",
"... | 0.0 | -1 |
Get an existing PrivateCloud resource's state with the given name, id, and optional extra properties used to qualify the lookup. | def NMoC(kFeU: str, id: pulumi.Input[str], VKhi: Optional[pulumi.ResourceOptions]=None, JBZA: Optional[pulumi.Input[str]]=None, u5uw: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['PrivateCloudHcxArgs']]]]]=None, Rci7: Optional[pulumi.Input[str]]=None, mTQt: Optional[pulumi.Input[pulumi.InputType['Privat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NMoC(kFeU: str, id: pulumi.Input[str], VKhi: Optional[pulumi.ResourceOptions]=None, GPtr: Optional[pulumi.Input[str]]=None, JBZA: Optional[pulumi.Input[str]]=None, yIVm: Optional[pulumi.Input[pulumi.InputType['SyntheticsPrivateLocationMetadataArgs']]]=None, mWFP: Optional[pulumi.Input[str]]=None, dJ1p: Optiona... | [
"0.65079397",
"0.60180366",
"0.5631492",
"0.5520025",
"0.5516253",
"0.5478971",
"0.5461587",
"0.5423228",
"0.54021776",
"0.5391341",
"0.53576255",
"0.5346516",
"0.534531",
"0.53248453",
"0.5313847",
"0.5311084",
"0.52749074",
"0.5260175",
"0.52535284",
"0.5236298",
"0.5212986... | 0.71614945 | 0 |
The ID of the PrivateCloud. | def mWFP(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'name') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def id(YKHO):\n if YKHO.cloudserver:\n return YKHO.cloudserver.id\n else:\n return None",
"def id(YKHO):\n if YKHO.cloudnet:\n return YKHO.cloudnet.id\n else:\n return None",
"def FXiA(YKHO) -> str:\n return qe4Y.get(YKHO, 'internal_id')",
"def La6v(YKHO) -> GLG2:\n... | [
"0.75614274",
"0.73734045",
"0.68891054",
"0.6430752",
"0.63447815",
"0.6309729",
"0.6309729",
"0.62912863",
"0.6290541",
"0.6290541",
"0.62901795",
"0.62901795",
"0.62901795",
"0.62901795",
"0.62901795",
"0.62901795",
"0.62901795",
"0.62901795",
"0.62901795",
"0.62901795",
"... | 0.0 | -1 |
Return a colored time stamp as str. | def ksTy(YKHO):
if not YKHO.show_message_times:
return ''
LLuI = JRYC.datetime.now().strftime('%H:%M:%S')
yk4i = YKHO.last_message_timer.get('s')
rVQp = BfDw.nice_time_string(yk4i)
jFGN = '+%s' % rVQp.rjust(4)
YKHO.last_message_timer.reset()
y0cW = '%s [%s] ' % (jFGN, LLuI)
if YK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pqi0():\n import time\n return str(time.strftime('%a %d %b %Y %I:%M:%S %p'))",
"def E3oo(_Cnz=False):\n if not _Cnz:\n return ITS7.strftime('%H:%M:%S%p %D', ITS7.localtime())\n else:\n return ITS7.strftime(_Cnz, ITS7.localtime())",
"def d65_(_Cnz='%y/%m/%db'):\n i8WE = ''\n ... | [
"0.7243191",
"0.7215947",
"0.7168577",
"0.7142945",
"0.70724404",
"0.6846711",
"0.68410975",
"0.68303",
"0.6802723",
"0.6773432",
"0.67650586",
"0.668286",
"0.6644579",
"0.6617341",
"0.66012836",
"0.6599197",
"0.6581608",
"0.6563026",
"0.6519783",
"0.6512448",
"0.64942485",
... | 0.65204114 | 18 |
Expands the random field as a finite linear combination of the KL eigen functions with coefficients sampled from a distribution given by the array sample_point. If attr is log, then the random field is the exponentiated. | def klwJ(YKHO, Lrlo, E4dN, hkS8):
GTDm = uru2(YKHO._mesh, 'CG', 1)
rDZG = f_8k(GTDm)
wD_a = oyIN.zeros(YKHO._mesh.num_vertices(), dtype=float)
for bISY in range(0, Lrlo):
wD_a += PZyS(YKHO.eigen_vals[bISY]) * E4dN[bISY] * YKHO.eigen_funcs[bISY].vector().array()
if hkS8 == 'log':
ZYCW... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RFg8(YKHO, JBMS, IR53):\n SGf8 = ht2j.randn_like(JBMS).to(YKHO.device)\n epBp = ht2j.exp(0.5 * IR53) * SGf8 + JBMS\n return epBp",
"def eTxJ(YKHO, yGTL, XO02):\n SGf8 = ht2j.randn_like(yGTL)\n return yGTL + SGf8 * ht2j.exp(0.5 * XO02)",
"def eTxJ(YKHO, yGTL, XO02):\n SGf8 = ht2j.randn_lik... | [
"0.5443033",
"0.54332983",
"0.54332983",
"0.54332983",
"0.54332983",
"0.54048586",
"0.5266122",
"0.51295024",
"0.50889564",
"0.50773805",
"0.5043628",
"0.5043628",
"0.50307107",
"0.5029842",
"0.5000028",
"0.4991507",
"0.49862686",
"0.49857447",
"0.494048",
"0.49280787",
"0.49... | 0.77260077 | 0 |
Returns the maximum number of readings the ammeter can hold | def bCyx(YKHO):
return 2500 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hRhB(YKHO):\n QePW = YKHO.client().get('/devices/{}/readings/max/'.format(YKHO.device_uuid))\n YKHO.assertEqual(QePW.json.get('value', None), 100)",
"def N44s(YKHO):\n return YKHO.__size * 20",
"def n6mp(YKHO):\n return YKHO.config.get('max_count', 500)",
"def Aeea(YKHO) -> qe4Y.Input[int]:\n... | [
"0.7064799",
"0.6876236",
"0.6795457",
"0.67838174",
"0.66716325",
"0.6647795",
"0.6529371",
"0.65090114",
"0.64929694",
"0.6491466",
"0.64898306",
"0.6473247",
"0.6473247",
"0.6473247",
"0.6473247",
"0.6473247",
"0.64692223",
"0.64664495",
"0.6463778",
"0.64474916",
"0.64243... | 0.825167 | 0 |
Get a chunk of audio. The first time this reads the full number of samples required for the FFT. Subsequent calls give a major latter chunk of the previous output plus the new samples required to fill the rest of the buffer. | def Nf95():
LaVg = None
sHLC = TyFG // tJZV
with open(rEgh) as tWnD:
while True:
if LaVg is None:
LaVg = tWnD.read(TyFG)
else:
LaVg = LaVg[sHLC:] + tWnD.read(sHLC)
yield LaVg | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i4rk(YKHO):\n nPrm = YKHO.stream.read(DsOt)\n Sxzb = bytearray(nPrm)\n YKHO.cur_input = []\n for YRbF in range(DsOt):\n Os_7 = BlNT.unpack('H', Sxzb[:2])\n for bGrB in range(2):\n Sxzb.pop(0)\n YKHO.cur_input.append(Os_7)",
"def Ueki(YKHO, yKcO, zNig, s2BS=False):\... | [
"0.72874796",
"0.6661119",
"0.6434563",
"0.6308734",
"0.62464464",
"0.61685735",
"0.615072",
"0.60862964",
"0.6053902",
"0.60050607",
"0.5975894",
"0.5926335",
"0.5798063",
"0.5788498",
"0.5782724",
"0.57610863",
"0.57597136",
"0.5758252",
"0.57539314",
"0.5749107",
"0.574910... | 0.6912398 | 1 |
Adds custom gradients in the backprop stage. | def cJdu(YKHO, oIZO, _mSQ):
Bbbt = ZylS.sign(ZylS.reshape(_mSQ, shape=(-1,)) + 1000000.0)
epBp = oIZO * Bbbt
def Ro40(aUJK):
return (aUJK, aUJK)
return (epBp, Ro40) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rkBb(YKHO, CLRx, Aak1=None, mWFP=None, aO_3=None):\n YKHO._decay_var_list = set(aO_3) if aO_3 else False\n return super(EERJ, YKHO).apply_gradients(CLRx, global_step=Aak1, name=mWFP)",
"def cpNp(YKHO, b0Ix):\n raise NotImplementedError()",
"def io5p(_oWe, SG1g, XkLz):\n r9Hf = 0\n for xqoZ i... | [
"0.66081387",
"0.64641005",
"0.6413468",
"0.6412344",
"0.641107",
"0.63822436",
"0.6311049",
"0.6250906",
"0.6238698",
"0.62230843",
"0.61751586",
"0.61376643",
"0.6113364",
"0.6110002",
"0.6089549",
"0.6067444",
"0.6067444",
"0.60644275",
"0.60598946",
"0.6058577",
"0.604347... | 0.69161004 | 0 |
The account identifier to target for the resource. | def Z31E(YKHO) -> qe4Y.Input[str]:
return qe4Y.get(YKHO, 'account_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z31E(YKHO) -> str:\n return qe4Y.get(YKHO, 'account_id')",
"def Z31E(YKHO) -> str:\n return qe4Y.get(YKHO, 'account_id')",
"def Z31E(YKHO) -> str:\n return qe4Y.get(YKHO, 'account_id')",
"def Z31E(YKHO) -> str:\n return qe4Y.get(YKHO, 'account_id')",
"def Z31E(YKHO) -> str:\n return qe4Y... | [
"0.81525457",
"0.81525457",
"0.81525457",
"0.81525457",
"0.81525457",
"0.81525457",
"0.81525457",
"0.81525457",
"0.80785906",
"0.8056882",
"0.79521817",
"0.79379904",
"0.79216164",
"0.79014987",
"0.77820086",
"0.77820086",
"0.77820086",
"0.77820086",
"0.77820086",
"0.7753671",
... | 0.7650948 | 25 |
The name of the branch that is used for the production environment. | def cZ4i(YKHO) -> qe4Y.Input[str]:
return qe4Y.get(YKHO, 'production_branch') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cZ4i(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'production_branch')",
"def dUOl():\n if Hy7s.getenv('GIT_BRANCH'):\n jehQ = Hy7s.getenv('GIT_BRANCH')\n elif Hy7s.getenv('BRANCH_NAME'):\n jehQ = Hy7s.getenv('BRANCH_NAME')\n else:\n jehQ = CD35('git rev-parse --abbrev-... | [
"0.7910726",
"0.7822266",
"0.7593047",
"0.7455047",
"0.74435496",
"0.7324827",
"0.71299386",
"0.70948887",
"0.7066308",
"0.70112336",
"0.70112336",
"0.69671506",
"0.69460595",
"0.6899111",
"0.6779219",
"0.6728212",
"0.6720825",
"0.6720825",
"0.6673321",
"0.66697365",
"0.66602... | 0.778484 | 2 |
The account identifier to target for the resource. | def Z31E(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'account_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z31E(YKHO) -> str:\n return qe4Y.get(YKHO, 'account_id')",
"def Z31E(YKHO) -> str:\n return qe4Y.get(YKHO, 'account_id')",
"def Z31E(YKHO) -> str:\n return qe4Y.get(YKHO, 'account_id')",
"def Z31E(YKHO) -> str:\n return qe4Y.get(YKHO, 'account_id')",
"def Z31E(YKHO) -> str:\n return qe4Y... | [
"0.81525457",
"0.81525457",
"0.81525457",
"0.81525457",
"0.81525457",
"0.81525457",
"0.81525457",
"0.81525457",
"0.80785906",
"0.8056882",
"0.79521817",
"0.79379904",
"0.79216164",
"0.79014987",
"0.77820086",
"0.77820086",
"0.77820086",
"0.77820086",
"0.77820086",
"0.7753671",
... | 0.7420867 | 33 |
The name of the branch that is used for the production environment. | def cZ4i(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'production_branch') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cZ4i(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'production_branch')",
"def dUOl():\n if Hy7s.getenv('GIT_BRANCH'):\n jehQ = Hy7s.getenv('GIT_BRANCH')\n elif Hy7s.getenv('BRANCH_NAME'):\n jehQ = Hy7s.getenv('BRANCH_NAME')\n else:\n jehQ = CD35('git rev-parse --abbrev-... | [
"0.7910726",
"0.7822266",
"0.778484",
"0.7455047",
"0.74435496",
"0.7324827",
"0.71299386",
"0.70948887",
"0.7066308",
"0.70112336",
"0.70112336",
"0.69671506",
"0.69460595",
"0.6899111",
"0.6779219",
"0.6728212",
"0.6720825",
"0.6720825",
"0.6673321",
"0.66697365",
"0.666029... | 0.7593047 | 3 |
The Cloudflare subdomain associated with the project. | def UhTt(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'subdomain') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UhTt(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'subdomain')",
"def cbWw(YKHO):\n return YKHO.Subdomain",
"def vK05():\n zrIJ = ''\n for ZfUD in ZbWC.split('\\\\.', sEAN.host)[1:]:\n zrIJ = zrIJ + '.' + ZfUD\n return zrIJ.lstrip('.')",
"def GXfk(YKHO) -> h8nf[str]:\n retu... | [
"0.78226054",
"0.7576885",
"0.7433715",
"0.7431048",
"0.74264306",
"0.7259316",
"0.7250373",
"0.72070515",
"0.7137395",
"0.70844424",
"0.7071613",
"0.7071613",
"0.70686567",
"0.70640665",
"0.7058208",
"0.7052028",
"0.70419145",
"0.7022579",
"0.699674",
"0.6892024",
"0.6882206... | 0.76161826 | 1 |
The account identifier to target for the resource. | def Z31E(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'account_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z31E(YKHO) -> str:\n return qe4Y.get(YKHO, 'account_id')",
"def Z31E(YKHO) -> str:\n return qe4Y.get(YKHO, 'account_id')",
"def Z31E(YKHO) -> str:\n return qe4Y.get(YKHO, 'account_id')",
"def Z31E(YKHO) -> str:\n return qe4Y.get(YKHO, 'account_id')",
"def Z31E(YKHO) -> str:\n return qe4Y... | [
"0.8154262",
"0.8154262",
"0.8154262",
"0.8154262",
"0.8154262",
"0.8154262",
"0.8154262",
"0.8154262",
"0.8080623",
"0.805934",
"0.7953823",
"0.7940875",
"0.7923217",
"0.7903534",
"0.77834684",
"0.77834684",
"0.77834684",
"0.77834684",
"0.77834684",
"0.77558345",
"0.7653298"... | 0.7720449 | 21 |
The name of the branch that is used for the production environment. | def cZ4i(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'production_branch') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dUOl():\n if Hy7s.getenv('GIT_BRANCH'):\n jehQ = Hy7s.getenv('GIT_BRANCH')\n elif Hy7s.getenv('BRANCH_NAME'):\n jehQ = Hy7s.getenv('BRANCH_NAME')\n else:\n jehQ = CD35('git rev-parse --abbrev-ref HEAD'.split(' ')).decode('utf-8').strip()\n return jehQ.replace('/', '_')",
"def... | [
"0.78230476",
"0.7784668",
"0.75930625",
"0.74560213",
"0.7444226",
"0.7325169",
"0.713063",
"0.70959663",
"0.7066538",
"0.70117944",
"0.70117944",
"0.69680023",
"0.69465566",
"0.6899448",
"0.67798585",
"0.6728735",
"0.67215997",
"0.67215997",
"0.66739136",
"0.6670546",
"0.66... | 0.7910732 | 0 |
The Cloudflare subdomain associated with the project. | def UhTt(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'subdomain') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UhTt(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'subdomain')",
"def cbWw(YKHO):\n return YKHO.Subdomain",
"def vK05():\n zrIJ = ''\n for ZfUD in ZbWC.split('\\\\.', sEAN.host)[1:]:\n zrIJ = zrIJ + '.' + ZfUD\n return zrIJ.lstrip('.')",
"def GXfk(YKHO) -> h8nf[str]:\n ... | [
"0.7618404",
"0.7578766",
"0.74346465",
"0.7433089",
"0.742805",
"0.72598284",
"0.72509205",
"0.72080994",
"0.71380097",
"0.7086173",
"0.7072636",
"0.7072636",
"0.70698726",
"0.70644397",
"0.7059106",
"0.7052774",
"0.7043056",
"0.70237607",
"0.69971645",
"0.6892797",
"0.68827... | 0.78243244 | 0 |
Create a circle mask. | def o9bW(TVTK, dMYj):
ZHfW = oyIN.zeros((TVTK, TVTK), dtype=oyIN.float32)
hgjH = TVTK // 2
r1VO = dMYj * hgjH
LVAh, WKvO = oyIN.ogrid[-hgjH:TVTK - hgjH, -hgjH:TVTK - hgjH]
lsU9 = WKvO * WKvO + LVAh * LVAh <= r1VO * r1VO
ZHfW[lsU9] = 1.0
return ZHfW | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MdqH(fXzF, JPqE, r1VO):\n FV9o = JmFt.circle(fXzF, JPqE, r1VO)\n return FV9o",
"def swa7(ROpF, r1VO=4, hgjH=None):\n yzQ0 = ROpF[0]\n MKlR = ROpF[1]\n if hgjH is None:\n hgjH = [int(yzQ0 / 2), int(MKlR / 2)]\n if r1VO is None:\n r1VO = min(hgjH[0], hgjH[1], yzQ0 - hgjH[0], MKl... | [
"0.8766884",
"0.81500834",
"0.7790507",
"0.7766674",
"0.76388115",
"0.76090956",
"0.75531393",
"0.7359383",
"0.72413415",
"0.7224996",
"0.72002417",
"0.6873268",
"0.68332684",
"0.68059593",
"0.6794593",
"0.67885506",
"0.67329526",
"0.67173964",
"0.6679737",
"0.66779953",
"0.6... | 0.77203965 | 4 |
Render the main Github stats view | def d6pt(QePW):
if QePW.method == 'POST':
L03z = CfyU(QePW.POST)
if L03z.is_valid():
CBIr = lxC5.make_user(L03z.cleaned_data['username'])
else:
L03z = CfyU()
ESns = lxC5.objects.all()
return _1tc(QePW, 'github/index.html', {'form': L03z, 'github_users': ESns}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Dz7Y():\n return (TvZl('statistics.html'), 200)",
"def eQSh(QePW):\n return _1tc(QePW, 'stats.html')",
"def d6pt(QePW):\n jth9 = '2018 ' + taDc\n QpfX = dict(author=taDc, copyright=jth9, repo_url=N5OF)\n return _1tc(QePW, 'index.html', QpfX)",
"def d6pt():\n leAC = 'Global Statistics'\n... | [
"0.6819067",
"0.6787305",
"0.638312",
"0.6342737",
"0.6268916",
"0.6253234",
"0.61611587",
"0.6131109",
"0.6124636",
"0.6092433",
"0.6048323",
"0.6030266",
"0.6009829",
"0.5985238",
"0.59847295",
"0.5966748",
"0.5959749",
"0.59556603",
"0.5896294",
"0.5896294",
"0.5890848",
... | 0.0 | -1 |
Computes the sampling probability for scheduled sampling using inverse sigmoid. | def W18p(Aak1, G1Hx):
return G1Hx / (G1Hx + epAf.exp(Aak1 / G1Hx)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m1Hg(a1PO):\n kCB8 = 10\n a1PO[a1PO <= -kCB8] = 0\n a1PO[a1PO > -kCB8] = 1 / (1 + oyIN.exp(-a1PO))\n return a1PO",
"def m1Hg(WKvO):\n return 1 / (1 - naF9(tTpl, -WKvO))",
"def m1Hg(a1PO):\n return 1 / (1 + oyIN.exp(-a1PO))",
"def rh78(WKvO):\n return 1 / (1 + oyIN.exp(-WKvO))",
"de... | [
"0.64867145",
"0.6486586",
"0.64809066",
"0.64515716",
"0.64411783",
"0.64293915",
"0.640807",
"0.640807",
"0.63982797",
"0.6397821",
"0.6390894",
"0.6390894",
"0.6390894",
"0.6390894",
"0.6390894",
"0.6390894",
"0.63685536",
"0.6368346",
"0.63604724",
"0.6358248",
"0.6357634... | 0.0 | -1 |
Returns a list of notifier classes in the registry. | def uUBO(YKHO):
return YKHO.registry.keys() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UCpi(YKHO):\n PplX = []\n for TlkN in YKHO.notifiers or gCuF.ACTIVITIES_DEFAULT_NOTIFIERS:\n if isinstance(TlkN, str):\n TlkN = uQ4g.get(TlkN)\n else:\n TlkN = uQ4g.get_or_register(TlkN)\n PplX.append(TlkN)\n return PplX",
"def KndY(YKHO):\n if YKHO.clas... | [
"0.71155614",
"0.6832109",
"0.6798664",
"0.6798664",
"0.6798664",
"0.6798664",
"0.6798664",
"0.6798664",
"0.67130214",
"0.66954243",
"0.65584815",
"0.64868057",
"0.6474896",
"0.64188045",
"0.6377732",
"0.6322927",
"0.63071007",
"0.6266645",
"0.62628615",
"0.6260661",
"0.62599... | 0.67288476 | 8 |
If the current user is authenticated, directly route to dashboard. | def d6pt():
if c5ow.is_authenticated:
return vKnz(nKyW('home'))
return TvZl('index.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N5hv():\n if c5ow.is_admin:\n return TvZl('home/admin_dashboard.html', title='Admin Dashboard')\n eTsH(403)",
"def NMoC(YKHO):\n CBIr = YKHO.get_active_user()\n if CBIr:\n YKHO.render_newpage(user=CBIr)\n else:\n YKHO.redirect('/login')",
"def ypeQ(QePW):\n if QePW.us... | [
"0.6823933",
"0.66756296",
"0.66665274",
"0.6544777",
"0.6541027",
"0.6535879",
"0.6492684",
"0.64501256",
"0.6395559",
"0.6356666",
"0.6342406",
"0.6320861",
"0.6308646",
"0.62974495",
"0.62781143",
"0.6276214",
"0.6276214",
"0.62467945",
"0.6242847",
"0.62306714",
"0.622544... | 0.61880785 | 27 |
Registers the user and sets a hashed password. | def gr_i():
L03z = pYYa(QePW.form)
if QePW.method == 'POST' and L03z.validate():
dOp1 = NByB.encrypt(L03z.password.data, rounds=200000, salt_size=16)
CBIr = YJv1(L03z.email.data, dOp1)
NCls.session.add(CBIr)
NCls.session.commit()
CGuU(CBIr, remember=True)
Dwep('Us... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iQ7K(YKHO):\n mv1M.add_user(mv1M(YKHO.email.data, YKHO.password.data))",
"def G3s8(YKHO, CBIr, jTXt):\n kg40 = YKHO.hash_password(jTXt)\n NzQY = YKHO.get_server_name()\n RMC9.log('Storing hash: {}'.format(kg40), RMC9.DEBUG)\n Aofo = YKHO.pgsql_query(\"UPDATE users SET password_hash = '{}' WHER... | [
"0.77806985",
"0.7229552",
"0.70409644",
"0.7012111",
"0.69044983",
"0.68274784",
"0.6786985",
"0.67286086",
"0.6728315",
"0.67100847",
"0.67041004",
"0.6647833",
"0.6639575",
"0.6607124",
"0.6585375",
"0.65755326",
"0.6562504",
"0.6557068",
"0.6555503",
"0.6551017",
"0.65487... | 0.648321 | 26 |
Given user_id, return the associated User object. | def GYAu(uJjO):
return YJv1.query.get(uJjO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bt8D(uJjO):\n return mv1M.query.get(uJjO)",
"def NMoC(YKHO, uJjO):\n return mv1M.get(uJjO)",
"def B9ST(uJjO):\n return YJv1.query.filter_by(id=uJjO).first()",
"def TKWP(YKHO, uJjO):\n mv1M = egNl()\n try:\n return mv1M.objects.get(pk=uJjO)\n except mv1M.DoesNotExist:\n ret... | [
"0.84712285",
"0.83936065",
"0.8368699",
"0.82852244",
"0.8246819",
"0.82448286",
"0.8243413",
"0.822687",
"0.8179028",
"0.8177211",
"0.8177211",
"0.81507134",
"0.81507134",
"0.81507134",
"0.81507134",
"0.7941718",
"0.7908995",
"0.7870521",
"0.78473383",
"0.78203225",
"0.7785... | 0.0 | -1 |
Return the bool of whether RSTP is enabled. | def AKi_(YKHO):
YKHO.open_route('/configure/switch_settings', 'Switch')
xuXR = wABx.get_dropdown_value(YKHO.get_page(), var_id='node_group_use_stp')
return xuXR == 'Enable RSTP' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n30Z(YKHO) -> qe4Y.Output[bool]:\n return qe4Y.get(YKHO, 'is_enabled')",
"def etR_(YKHO) -> bool:\n return qe4Y.get(YKHO, 'enabled')",
"def etR_(YKHO) -> bool:\n return qe4Y.get(YKHO, 'enabled')",
"def etR_(YKHO) -> bool:\n return qe4Y.get(YKHO, 'enabled')",
"def etR_(YKHO) -> bool:\n re... | [
"0.7194349",
"0.7160575",
"0.7160575",
"0.7160575",
"0.7160575",
"0.7160575",
"0.7160575",
"0.71315926",
"0.71315926",
"0.71315926",
"0.71315926",
"0.71315926",
"0.71315926",
"0.71315926",
"0.71315926",
"0.70494854",
"0.700399",
"0.69757503",
"0.69751245",
"0.6972934",
"0.696... | 0.79867226 | 0 |
Register a LinkCallback providing the implementation for the Link for a particular backend. | def ZXYK(Emd4, DDLl, db6b):
Emd4._callbacks[DDLl][Emd4] = db6b | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gr_i(YKHO, db6b):\n YKHO.callback = db6b",
"def ZXYK(YKHO, db6b):\n YKHO.callbacks.add(db6b)",
"def Whkm(YKHO, BBLH, *qIxc):\n w2B8 = len(YKHO.callbacks)\n YKHO.callbacks[w2B8] = (BBLH, qIxc)\n return w2B8",
"def pwgJ(YKHO, db6b):\n RKD7.debug('Adding callback {}'.format(db6b))\n db6... | [
"0.6438172",
"0.640721",
"0.6394827",
"0.6273493",
"0.62365454",
"0.6154329",
"0.60415494",
"0.6038855",
"0.60354584",
"0.6029309",
"0.60273",
"0.59802276",
"0.5931468",
"0.59200925",
"0.5892719",
"0.58862734",
"0.5883498",
"0.5853362",
"0.58272624",
"0.5738057",
"0.5736773",... | 0.6965264 | 0 |
SparseSparse matrix multiplication. Output will be copied into dense `out` matrix. This function can be applied to CPU or CUDA tensors (but all tensors must be on the same device). | def S8yu(k0lF: SparseTensor, tjUW: SparseTensor, yvT9: torch.Tensor) -> ht2j.Tensor:
if k0lF.nnz() == 0 or tjUW.nnz() == 0:
return yvT9
if k0lF.is_cuda:
return OJEO(k0lF, tjUW, yvT9)
else:
return TqiN(k0lF, tjUW, yvT9) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OJEO(k0lF: SparseTensor, tjUW: SparseTensor, yvT9: torch.Tensor):\n from falkon.sparse.sparse_helpers import spspmm, csr2dense\n if not k0lF.is_csr:\n raise ValueError('A must be CSR matrix')\n if not tjUW.is_csr:\n raise ValueError('B must be CSR matrix')\n iBPA, uoJZ, D7Gk = spspmm(... | [
"0.6860165",
"0.6649118",
"0.64669234",
"0.60196674",
"0.6008235",
"0.5968241",
"0.5790825",
"0.57601863",
"0.5711573",
"0.5655556",
"0.55956006",
"0.5584358",
"0.5581835",
"0.5581835",
"0.55582434",
"0.54979575",
"0.5485175",
"0.5448889",
"0.54334295",
"0.54320043",
"0.54174... | 0.72344065 | 0 |
Rowwise squared l2 norm of a sparse 2D matrix. The operation is equivalent to squaring all elements of the matrix, and summing up the rows. | def dmbV(k0lF: SparseTensor, yvT9: torch.Tensor) -> ht2j.Tensor:
if not k0lF.is_csr:
raise RuntimeError('Squared norm can only be applied on CSR tensors')
if not pw1h(k0lF, yvT9):
raise ValueError('All data-types must match')
if k0lF.shape[0] != yvT9.shape[0]:
raise ValueError("Dimen... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sLun(SppC):\n u54L = SppC.shape[0]\n ikiY = oyIN.reshape(oyIN.diag(SppC), (u54L, 1))\n return ikiY + oyIN.transpose(ikiY) - 2 * SppC",
"def qagD(SppC):\n u54L = SppC.shape[0]\n CkYf = oyIN.divide(1, oyIN.sqrt(gD7t(SppC)))\n fhxM = oyIN.multiply(oyIN.multiply(oyIN.reshape(CkYf, [u54L, 1]), S... | [
"0.7117264",
"0.69637316",
"0.6779424",
"0.67528653",
"0.67504",
"0.67504",
"0.66562766",
"0.6592972",
"0.6575342",
"0.6449741",
"0.6425728",
"0.63997",
"0.62898177",
"0.6270818",
"0.6267802",
"0.6229614",
"0.6200041",
"0.6199835",
"0.6168866",
"0.6168839",
"0.61506224",
"0... | 0.6634474 | 7 |
Calculate the great circle distance between two points on the earth (specified in decimal degrees) | def rkEX(GgQG, igSk, tk0B, TGuP):
GgQG, igSk, tk0B, TGuP = map(Y_1E, [GgQG, igSk, tk0B, TGuP])
H91H = tk0B - GgQG
n_9K = TGuP - igSk
jzdc = YUNn(n_9K / 2) ** 2 + YhSR(igSk) * YhSR(TGuP) * YUNn(H91H / 2) ** 2
Z9rn = 2 * P099(PZyS(jzdc))
Jwq1 = 6371000 * Z9rn
return Jwq1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KzuF(rCSf, hjIX, FNKk, T3JP):\n hjIX = r8hN.radians(hjIX)\n rCSf = r8hN.radians(rCSf)\n T3JP = r8hN.radians(T3JP)\n FNKk = r8hN.radians(FNKk)\n Csk6 = 2 * 6367.45 * r8hN.asin(r8hN.sqrt(GeVo(FNKk - rCSf) + r8hN.cos(rCSf) * r8hN.cos(FNKk) * GeVo(T3JP - hjIX)))\n return Csk6",
"def T97B(GgQG, ... | [
"0.81444913",
"0.78628397",
"0.76311773",
"0.7604652",
"0.75954515",
"0.75949824",
"0.7592846",
"0.757015",
"0.75629693",
"0.7554376",
"0.752855",
"0.7515809",
"0.7492531",
"0.7465686",
"0.7450806",
"0.74330103",
"0.73909706",
"0.73566103",
"0.73473287",
"0.7329735",
"0.73278... | 0.7028556 | 49 |
2D gaussian mask should give the same result as MATLAB's fspecial('gaussian',[shape],[sigma]) | def JbXV(ROpF, WTkW):
r8hN, exwG = [(KG9w - 1.0) / 2.0 for KG9w in ROpF]
LVAh, WKvO = oyIN.ogrid[-r8hN:r8hN + 1, -exwG:exwG + 1]
MKlR = oyIN.exp(-(WKvO * WKvO + LVAh * LVAh) / (2.0 * WTkW * WTkW))
MKlR[MKlR < oyIN.finfo(MKlR.dtype).eps * MKlR.max()] = 0
MjEv = MKlR.sum()
if MjEv != 0:
MK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IAWS(zNig, WTkW):\n jzdc, Fg_i = oyIN.ogrid[-zNig / 2:zNig / 2, -zNig / 2:zNig / 2]\n ZHfW = jzdc ** 2 + Fg_i ** 2\n ZHfW = oyIN.exp(-ZHfW.astype('float') / (2 * float(WTkW ** 2)))\n return ZHfW",
"def IeI1(ROpF=(3, 3), WTkW=0.5):\n r8hN, exwG = [(KG9w - 1.0) / 2.0 for KG9w in ROpF]\n LVAh,... | [
"0.7830456",
"0.756351",
"0.72270316",
"0.7156208",
"0.6948441",
"0.6849707",
"0.6788711",
"0.67704195",
"0.675055",
"0.675055",
"0.6715782",
"0.67129564",
"0.66879165",
"0.66752213",
"0.66421515",
"0.66121954",
"0.6583791",
"0.65671456",
"0.6559635",
"0.6506034",
"0.6504701"... | 0.66812015 | 13 |
Given any number of dicts, shallow copy and merge into a new dict, precedence goes to key value pairs in latter dicts. | def roQF(*fgcx):
Aofo = {}
for Csk6 in fgcx:
Aofo.update(Csk6)
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W0j7(*qIxc):\n return Pusg(lambda Csk6, KCHu: Csk6.update(KCHu) or Csk6, qIxc)",
"def W0j7(*qIxc):\n return Pusg(lambda Csk6, KCHu: Csk6.update(KCHu) or Csk6, qIxc)",
"def cyBQ(yLHq, RKYb, jRxN=True):\n if not isinstance(yLHq, dict) or not isinstance(RKYb, dict):\n if jRxN:\n ret... | [
"0.76666087",
"0.7660024",
"0.7477783",
"0.7452349",
"0.7452349",
"0.7452349",
"0.73742205",
"0.734022",
"0.7306342",
"0.7278467",
"0.72731894",
"0.72538626",
"0.72516036",
"0.72516036",
"0.72516036",
"0.72516036",
"0.72516036",
"0.72516036",
"0.72314394",
"0.72206295",
"0.72... | 0.71577954 | 26 |
Gets model's features on the given inputs. | def YEmk(C3ST, Mekx):
bySB = C3ST.get_feature(Mekx, training=False)
return bySB | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iPRq(YKHO, g4y1):\n g4y1 = g4y1.to(YKHO.device)\n with ht2j.no_grad():\n bySB = YKHO.model.encode(g4y1)\n return bySB",
"def carQ(YKHO, g4y1):\n pass",
"def carQ(YKHO, g4y1):\n WKvO = YKHO.conv1(g4y1)\n WKvO = YKHO.bn1(WKvO)\n WKvO = YKHO.relu(WKvO)\n WKvO = YKHO.maxpool(WKvO... | [
"0.8400616",
"0.7977793",
"0.77038205",
"0.7677214",
"0.72801375",
"0.7212278",
"0.701948",
"0.6908011",
"0.67576694",
"0.6663368",
"0.66137624",
"0.65661025",
"0.64933974",
"0.6492246",
"0.6443386",
"0.6392165",
"0.62720567",
"0.6254876",
"0.6237003",
"0.62164605",
"0.620948... | 0.73535985 | 4 |
Gets model's margins on the given inputs. | def El28(C3ST, Mekx):
o4Jx = C3ST(Mekx, training=False)
hCO3 = ZylS.sort(o4Jx, direction='DESCENDING', axis=1)
XWt4 = hCO3[:, 0] - hCO3[:, 1]
return XWt4 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XWt4(YKHO) -> tuple[int, int, int, int]:\n return YKHO._widget._mgui_get_margins()",
"def MVIL(YKHO) -> AzJI[int, int, int, int]:\n return (YKHO.imargin[0].to_pixels(YKHO.parent.width), YKHO.imargin[1].to_pixels(YKHO.parent.width), YKHO.imargin[2].to_pixels(YKHO.parent.height), YKHO.imargin[3].to_pixel... | [
"0.6920656",
"0.643909",
"0.6386788",
"0.6292267",
"0.6149117",
"0.60865736",
"0.6047428",
"0.5895864",
"0.58437055",
"0.5739422",
"0.57305235",
"0.56391114",
"0.554308",
"0.5465631",
"0.53215337",
"0.52851737",
"0.52745605",
"0.5225098",
"0.52216154",
"0.51884097",
"0.512918... | 0.7220013 | 0 |
Gets ensemble model's features on the given inputs. | def lxN8(FYrf, Mekx):
_4Fm = []
for C3ST in FYrf:
v_tA = C3ST.get_feature(Mekx, training=False)
_4Fm.append(v_tA)
chTF = ZylS.concat(_4Fm, axis=1)
return chTF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iPRq(YKHO, g4y1):\n g4y1 = g4y1.to(YKHO.device)\n with ht2j.no_grad():\n bySB = YKHO.model.encode(g4y1)\n return bySB",
"def carQ(YKHO, g4y1):\n WKvO = YKHO.conv1(g4y1)\n WKvO = YKHO.bn1(WKvO)\n WKvO = YKHO.relu(WKvO)\n WKvO = YKHO.maxpool(WKvO)\n WKvO = YKHO.layer1(WKvO)\n ... | [
"0.7796322",
"0.7563362",
"0.7558548",
"0.7492285",
"0.7176713",
"0.7004927",
"0.6809105",
"0.6694236",
"0.66772443",
"0.6660724",
"0.6561689",
"0.65109205",
"0.65109193",
"0.64722025",
"0.644351",
"0.63942045",
"0.63567543",
"0.635088",
"0.63312244",
"0.63093793",
"0.6271999... | 0.7077079 | 5 |
Evaluates model's crossentropy loss on the dataset. | def ZfTH(C3ST, oxOY, HOb3='CE'):
N77f = 0
if HOb3 == 'CE':
iQU3 = ZylS.keras.losses.SparseCategoricalCrossentropy(reduction=ZylS.keras.losses.Reduction.SUM)
else:
raise ValueError(f'Not supported loss function {HOb3}!')
exwG = 0
for Mekx, ON2u in oxOY:
N5bd = j9V1(C3ST, Mekx)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b7La(YKHO, EcVT, LVAh):\n aMgO = YKHO.predict(EcVT)\n return YKHO.cross_entropy_loss(LVAh, aMgO)",
"def b7La(YKHO, __n6, *qIxc, **B2fa):\n N8L0 = []\n for mvm2 in __n6:\n hlel = YKHO.predict(mvm2, *qIxc, **B2fa)\n N8L0.append(YKHO.metric_loss(hlel, mvm2, *qIxc, **B2fa))\n return ... | [
"0.7403949",
"0.70643187",
"0.6998887",
"0.69025266",
"0.68017304",
"0.67919713",
"0.6778915",
"0.67183614",
"0.6715214",
"0.67043793",
"0.66702735",
"0.6664677",
"0.6636489",
"0.66291314",
"0.65847474",
"0.65713906",
"0.6568213",
"0.65642107",
"0.6563219",
"0.65564483",
"0.6... | 0.69415814 | 3 |
Load a Mopedmodeling YAML config file. | def tyeH(YKHO, Nu1S):
try:
with open(Nu1S, 'r') as ytgA:
nPrm = eJb6.load(ytgA)
for H5ew in nPrm:
if hasattr(YKHO, H5ew):
setattr(YKHO, H5ew, nPrm[H5ew])
if YKHO.name == '':
bGrB, YKHO.name = Hy7s.path.split(YKHO.img_dir... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f9B0(REY6):\n print('training network configuration file is {0}'.format(REY6))\n gnPz.check_file_exist(REY6)\n GPtr = gnPz.load_yaml_file(REY6)\n return GPtr",
"def LgIG():\n t7Ny = Hy7s.path.dirname(Hy7s.path.abspath(xAKo))\n lqQH = Hy7s.path.join(t7Ny, 'config.yml')\n Fv2L = eJb6.safe_... | [
"0.69565684",
"0.69238794",
"0.6858291",
"0.6841398",
"0.67981935",
"0.67842054",
"0.6782866",
"0.67827344",
"0.6774935",
"0.6700422",
"0.6685077",
"0.6682819",
"0.6668596",
"0.6664087",
"0.6659172",
"0.6658441",
"0.6657666",
"0.6643049",
"0.6639861",
"0.65983355",
"0.6592095... | 0.0 | -1 |
Initialize PointInfo with locs, desc, cam_id. | def FIMM(YKHO, GOzt=None, QoB4=None, kLw8=None):
YKHO.locs = GOzt
YKHO.desc = QoB4
YKHO.cam_id = kLw8 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, LTIa):\n YKHO.points = LTIa\n YKHO.init()",
"def FIMM(YKHO, AU8u=None):\n if AU8u is None:\n AU8u = (0, 0)\n YKHO.x = AU8u[0]\n YKHO.y = AU8u[1]",
"def FIMM(YKHO, FDPT: float=0, QnmL: float=0):\n super(AjYs, YKHO).__init__(FDPT, QnmL)",
"def FIMM(YKHO, LTIa):\n YKHO... | [
"0.6181243",
"0.61438036",
"0.61338145",
"0.59951645",
"0.5963096",
"0.5951045",
"0.594447",
"0.5933753",
"0.5880865",
"0.5866702",
"0.5815802",
"0.58104825",
"0.577835",
"0.577663",
"0.5720085",
"0.568429",
"0.56764793",
"0.56727016",
"0.56654525",
"0.56629884",
"0.5600262",... | 0.7010697 | 0 |
Apply rigid 3D transformation to model. This function is useful to align a MOPED model (arbitrary axes) so that it corresponds to a known scale and axis. The fields 'pts3D' and 'cam_poses' are updated. | def SZFh(YKHO, A3Vt, a1PO, NXpY=1):
YsBu = PlcQ.tf_format('4x4', A3Vt, a1PO)
YsBu[:-1, :] *= NXpY
Mllg = PlcQ.tf_format('i4x4', A3Vt, a1PO) * NXpY
if YKHO.pts3D is not None and YKHO.pts3D.shape[1] > 0:
unTg = oyIN.r_[YKHO.pts3D, oyIN.ones((1, YKHO.pts3D.shape[1]))]
unTg = oyIN.dot(YsBu, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def t3wx():\n dR17 = FQNo.ls(selection=True, long=True)\n if len(dR17) == 0:\n FQNo.warning('Select one or more Transform Nodes')\n return\n for Fzxm in dR17:\n lvD0 = PXaF(Fzxm)\n if lvD0 == 'imagePlane':\n FQNo.warning(\"Can't Center3D an image plane\")\n ... | [
"0.6069621",
"0.6068405",
"0.58936274",
"0.5847731",
"0.57482713",
"0.57323974",
"0.572919",
"0.5695031",
"0.566867",
"0.566494",
"0.566323",
"0.56565136",
"0.5645098",
"0.5555037",
"0.55501115",
"0.5531103",
"0.552245",
"0.5509203",
"0.5508304",
"0.5491474",
"0.5486474",
"... | 0.63741857 | 0 |
convert node to string | def zAg0(YKHO):
return str(YKHO.__data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BZEt(Emd4, Q6kx):\n return JrOA.etree.tostring(Q6kx, method='html').decode()",
"def rIkN(Q6kx):\n VuiE = ' '.join((G1Hx for G1Hx, bGrB in Q6kx.leaves()))\n return u' '.join(VuiE.split())",
"def jIBX(YKHO):\n eHNT = Ta4V.node_to_str\n assert eHNT(('a', 'b')) == 'a: b'\n assert eHNT(('a',))... | [
"0.8331965",
"0.82182574",
"0.76223266",
"0.72551405",
"0.72269905",
"0.71409893",
"0.7045778",
"0.69267035",
"0.69236785",
"0.690379",
"0.6856993",
"0.6812192",
"0.6744112",
"0.6740997",
"0.6740996",
"0.67264885",
"0.66993773",
"0.6690935",
"0.66826755",
"0.66760933",
"0.667... | 0.0 | -1 |
initialize a singly linked list | def FIMM(YKHO):
YKHO.__head = None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, yv6U=[]):\n YKHO.__length = 0\n YKHO.__head = None\n for tTpl in yv6U:\n YKHO.add(tTpl)",
"def FIMM(YKHO):\n Q6kx = Msxl(0)\n YKHO.head = Q6kx\n YKHO.tail = Q6kx\n YKHO.len = 0",
"def FIMM(YKHO, sdCG: ListNode):\n YKHO.l = []\n while sdCG:\n YKHO.l.append... | [
"0.78083444",
"0.76586807",
"0.7582945",
"0.7520789",
"0.74281234",
"0.74161446",
"0.7382752",
"0.73798484",
"0.7359489",
"0.73444897",
"0.7321385",
"0.73171395",
"0.7315219",
"0.7302377",
"0.7302377",
"0.7271583",
"0.72462326",
"0.7244291",
"0.7244291",
"0.7244291",
"0.72442... | 0.6875056 | 74 |
Reset trainable network parameters (factorized gaussian noise). | def Q0Ko(YKHO):
VaBd = 1 / epAf.sqrt(YKHO.in_features)
YKHO.weight_mu.data.uniform_(-VaBd, VaBd)
YKHO.weight_sigma.data.fill_(YKHO.std_init / epAf.sqrt(YKHO.in_features))
YKHO.bias_mu.data.uniform_(-VaBd, VaBd)
YKHO.bias_sigma.data.fill_(YKHO.std_init / epAf.sqrt(YKHO.out_features)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Q0Ko(YKHO) -> None:\n M1Jx = epAf.sqrt(3 / YKHO.in_features)\n YKHO.weight.data.uniform_(-M1Jx, M1Jx)\n YKHO.bias.data.uniform_(-M1Jx, M1Jx)",
"def Q0Ko(YKHO):\n vRNf.truncated_normal_(YKHO.weight, mean=0.0, std=0.1)\n vRNf.truncated_normal_(YKHO.bias, mean=0.0, std=0.1)",
"def SiRx(YKHO):\n... | [
"0.7617915",
"0.7508924",
"0.7274491",
"0.72522336",
"0.7234711",
"0.72258276",
"0.72258276",
"0.72258276",
"0.7135332",
"0.7124662",
"0.71216637",
"0.7103422",
"0.70747775",
"0.70641387",
"0.70641387",
"0.7062052",
"0.7049134",
"0.70391566",
"0.70145386",
"0.6930886",
"0.690... | 0.727579 | 2 |
remove duplicates from a list of hashables, keeping order | def kcwm(BDwY):
PwWw = set()
aygV = PwWw.add
return [WKvO for WKvO in BDwY if not (WKvO in PwWw or aygV(WKvO))] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sHC1(IqQl):\n return list(U8Lr.fromkeys(IqQl))",
"def dDv2(IqQl):\n return list(dict.fromkeys(IqQl))",
"def gBto(YKHO, yv6U):\n MKlR = {}\n for tTpl in yv6U:\n MKlR[tTpl] = 1\n return sorted(MKlR.keys())",
"def EIZV(yv6U):\n return list(dict.fromkeys(yv6U))",
"def uY6T(list):\n... | [
"0.791706",
"0.7821127",
"0.76029545",
"0.75960547",
"0.7431756",
"0.7401797",
"0.73761046",
"0.7348887",
"0.73096263",
"0.73010904",
"0.7271795",
"0.724598",
"0.72449076",
"0.719822",
"0.717741",
"0.7099763",
"0.70880127",
"0.7035358",
"0.69921213",
"0.6941157",
"0.69064134"... | 0.72240907 | 13 |
Return the output tensor at the given index. | def QDxD(YKHO, d6pt):
T8hE = YKHO._interpreter.get_output_details()[d6pt]
vhpA = oyIN.squeeze(YKHO._interpreter.get_tensor(T8hE['index']))
return vhpA | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QEIX(d6pt):\n T8hE = mh5P.get_output_details()[d6pt]\n vhpA = oyIN.squeeze(mh5P.get_tensor(T8hE['index']))\n return vhpA",
"def QEIX(YKHO, d6pt):\n T8hE = YKHO.model.get_output_details()[d6pt]\n vhpA = oyIN.squeeze(YKHO.model.get_tensor(T8hE['index']))\n return vhpA",
"def QEIX(YKHO, d6pt... | [
"0.87351835",
"0.87322223",
"0.8662991",
"0.8395132",
"0.8366491",
"0.8366491",
"0.8366491",
"0.7527034",
"0.7176715",
"0.67831147",
"0.6718036",
"0.6621825",
"0.65628904",
"0.6528218",
"0.65079767",
"0.6489946",
"0.6340246",
"0.6294931",
"0.6201866",
"0.6177447",
"0.6152569"... | 0.85986006 | 3 |
Resolve a given relative path against the base directory given by config. Return path unchanged, if it is absolute. | def dyl_(GPtr: Mapping[str, Any], pmON: str) -> str:
if t_gb(pmON):
Yb80 = pmON
else:
oEge = yE4I(GPtr)
Yb80 = f'{oEge}/{pmON}'
if '://' in Yb80:
ht58, BPuJ = Yb80.split('://', maxsplit=1)
if '/' in BPuJ:
ayrW, pB6H = BPuJ.split('/', maxsplit=1)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ssrL(pmON):\n if Hy7s.path.isabs(pmON):\n return pmON\n jNha = Hy7s.path.dirname(Hy7s.path.dirname(Hy7s.path.dirname(Hy7s.path.realpath(xAKo))))\n return Hy7s.path.join(jNha, pmON)",
"def xBs1(YKHO, pmON=''):\n pmON = YKHO._sep.join([YKHO.root] + pmON.split('/'))\n return RUFc(pmON)",
... | [
"0.7482547",
"0.7424582",
"0.73036957",
"0.7032041",
"0.6941662",
"0.67737186",
"0.67696434",
"0.66793716",
"0.66403276",
"0.66340953",
"0.6595137",
"0.65875256",
"0.64567816",
"0.6435037",
"0.6383054",
"0.6301616",
"0.62616",
"0.62280864",
"0.62003714",
"0.6192767",
"0.61619... | 0.75381917 | 0 |
Convert a corpus to a list of lowercase words using white space as the delimiter, preserving the order of words. Insert start(s) at start of sentences according to the size of the ngram, replace punctuation that terminates a sentence with end. Remove all other punctuation. | def wr3U(YKHO, rrSk: str, exwG: int):
rrSk = YKHO._parse_punctuation(rrSk)
rrSk = rrSk.lower()
cufJ = rrSk.split()
for YRbF in range(exwG - 1):
cufJ.insert(0, YKHO.TOKENS.STRT.value)
if cufJ[len(cufJ) - 1] != YKHO.TOKENS.END.value:
cufJ.append(YKHO.TOKENS.END.value)
NVxY = [YRbF ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def paQW(rrSk):\n l5Ny = ZbWC.findall('[a-zA-Z]+', rrSk)\n V22M = [yzQ0.lower() for yzQ0 in l5Ny]\n dhx_ = Dhdw.WordNetLemmatizer()\n xCIG = [dhx_.lemmatize(yzQ0) for yzQ0 in V22M]\n nb0Z = Dhdw.pos_tag(xCIG)\n wB6u = []\n Y5bi = ['CC', 'DT', 'EX', 'IN', 'MD', 'PDT', 'POS', 'PRP', 'PRP$', 'TO'... | [
"0.6909934",
"0.69004166",
"0.67835337",
"0.670156",
"0.6674127",
"0.6670297",
"0.6616926",
"0.65456074",
"0.6537721",
"0.65121937",
"0.65082383",
"0.65044063",
"0.6475626",
"0.64646393",
"0.64249426",
"0.6413282",
"0.6395923",
"0.6351571",
"0.6337604",
"0.63112503",
"0.63021... | 0.6212141 | 34 |
Make list of words that make up an ngram according to size of n. Can also make the ngram preceding each word. | def Qceb(YKHO, cufJ: list, qEMD: int, exwG: int, RiIF=False):
pCSA = []
_KoX = 0 if RiIF else -1
for YRbF in range(exwG - 1, _KoX, -1):
pCSA.append(cufJ[qEMD - YRbF])
return tuple(pCSA) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aPuO(vwCE, exwG):\n yield zip(*[vwCE[YRbF:] for YRbF in range(exwG)])",
"def YYlr(l5Ny, exwG=3):\n return [l5Ny[YRbF:YRbF + exwG] for YRbF in range(len(l5Ny) - exwG + 1)]",
"def R4Rq(list, exwG):\n pCSA = zip(*[list[YRbF:] for YRbF in range(exwG)])\n return [' '.join(u8Mh) for u8Mh in pCSA]",
... | [
"0.8449973",
"0.83471453",
"0.81231475",
"0.8114405",
"0.81035113",
"0.8102586",
"0.7990484",
"0.78982997",
"0.7888925",
"0.78723454",
"0.783445",
"0.7809138",
"0.76951313",
"0.7678311",
"0.7665776",
"0.76310253",
"0.76204985",
"0.7593198",
"0.75571394",
"0.7436135",
"0.74361... | 0.7774178 | 12 |
Compute a list of probabilities of ngrams in a corpus, sampled with a sliding window of one word, in the normal lefttoright direction of English text. Can employ Laplacian smoothing by assigning occurrence of ngram ending with UNK to 1 (sum of 0 + 1). | def NKfU(YKHO, rrSk: str, exwG: int, wtS1=False):
cufJ = YKHO.tokenize(rrSk, exwG)
BlmI = YKHO.make_ngrams_and_pre_word_ngrams(cufJ, exwG)
zfQi = YKHO._count_occurrences(cufJ, exwG)
nRA1 = YKHO._count_occurrences(cufJ, exwG - 1)
s3ao = {}
cAlv = 0
uadS = 0
if wtS1:
cAlv = YKHO.ca... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Kx9n(ZBvi, exwG):\n return",
"def HHJ3(eyf_):\n return",
"def YYlr(l5Ny, exwG=3):\n return [l5Ny[YRbF:YRbF + exwG] for YRbF in range(len(l5Ny) - exwG + 1)]",
"def Cdq5(iOuq, xSRY, ro2x, ED_H, G1Hx=1.0):\n iOuq = tuple(iOuq)\n ED_H = ED_H + ['<e>', '<unk>']\n bV1g = len(ED_H)\n WErR =... | [
"0.67714757",
"0.6585946",
"0.6475615",
"0.6426006",
"0.64133203",
"0.6354042",
"0.62784386",
"0.6261772",
"0.6257932",
"0.6204315",
"0.61938274",
"0.61527073",
"0.6150367",
"0.610769",
"0.6086413",
"0.6074309",
"0.6053449",
"0.6048103",
"0.6026025",
"0.6015344",
"0.59995276"... | 0.5818031 | 37 |
Calculate vocabulary size of corpus (for training), as the number of distinct tokens including UNK (not including start and end tokens, divided by the total number of words in the corpus. | def XfWs(YKHO, rrSk: str):
baRL = YKHO._tokenize_less_start_end(rrSk)
uadS = 1
GKoX = len(set(baRL))
cAlv = GKoX + uadS
return cAlv | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bV1g(YKHO):\n return len(YKHO.vocab)",
"def iq72(YKHO):\n return len(YKHO.vocab.keys())",
"def FjiL():\n return p6S0.doc_count()",
"def jXxl(YKHO) -> int:\n return len(YKHO.vocabulary)",
"def jXxl(YKHO):\n return YKHO._vocab_size",
"def jXxl(YKHO) -> int:\n return len(YKHO._tokenize... | [
"0.746306",
"0.7352853",
"0.73325956",
"0.73102176",
"0.72555244",
"0.7233731",
"0.7233731",
"0.7225566",
"0.68752635",
"0.6861664",
"0.6849121",
"0.6811493",
"0.67795384",
"0.67564076",
"0.667587",
"0.6654501",
"0.6632594",
"0.66219085",
"0.6594525",
"0.6588352",
"0.6576736"... | 0.8674432 | 0 |
Calculates RMSD from initial state s0 along trajectory state_trajectory | def OO9s(Esro, jSNe):
return oyIN.sqrt(f4rB(Esro, jSNe)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f4rB(Esro, jSNe):\n UfwV = oyIN.array(Esro)\n aevO = oyIN.asarray(jSNe)\n Xgd1 = oyIN.sum((aevO - UfwV) ** 2, axis=-1)\n return Xgd1",
"def P618(YKHO):\n p9YG = oyIN.sum((YKHO.eta_model - YKHO.eta_exp) ** 2.0)\n return p9YG",
"def UQgU(YKHO, KCHu):\n if KCHu > YKHO.total_length:\n ... | [
"0.7728926",
"0.6006215",
"0.593627",
"0.5880853",
"0.57791704",
"0.5741547",
"0.57397133",
"0.570762",
"0.57024056",
"0.5694547",
"0.56476945",
"0.5642655",
"0.5597415",
"0.55889314",
"0.5553222",
"0.5542348",
"0.5539058",
"0.5537539",
"0.55282885",
"0.54779816",
"0.54578626... | 0.8236417 | 0 |
Convert index from flattened upper triangular matrix to pair subindex. | def tjvN(exwG, p6S0):
G1Hx = 0
for YRbF in range(exwG - 1):
for r845 in range(YRbF + 1, exwG):
if G1Hx == p6S0:
return (YRbF, r845)
G1Hx += 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oEnj(YKHO, p6S0, BGSy):\n or8S = oyIN.ravel_multi_index((p6S0, BGSy), YKHO.shape)\n return or8S",
"def dLJf(rdlD, iVRZ, SppC):\n return rdlD * SppC.cols + iVRZ",
"def oEnj(ylpH, vvpC, MUPk):\n r8hN, exwG = ylpH\n return vvpC * (exwG - 1) + MUPk - 1",
"def Gw6g(d6pt, Htse):\n zbDt = []\n... | [
"0.6220416",
"0.61667466",
"0.6098016",
"0.6017521",
"0.5988121",
"0.5958607",
"0.5939187",
"0.5852096",
"0.58470243",
"0.58125377",
"0.5743587",
"0.570285",
"0.56947595",
"0.5629406",
"0.56276226",
"0.56131756",
"0.5583333",
"0.5571509",
"0.55649775",
"0.55596757",
"0.555272... | 0.59909457 | 4 |
Return unique rows indices of a numeric numpy array. | def _NJ_(vb7U, jcN9=False):
Fg_i = oyIN.ascontiguousarray(vb7U).view(oyIN.dtype((oyIN.void, vb7U.dtype.itemsize * vb7U.shape[1])))
if not jcN9:
bGrB, or8S = oyIN.unique(Fg_i, return_index=True)
else:
bGrB, or8S = oyIN.unique(Fg_i, return_inverse=True)
return or8S | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _NJ_(qw7D):\n qw7D = oyIN.ascontiguousarray(qw7D)\n yDqo = oyIN.dtype((oyIN.void, qw7D.dtype.itemsize * qw7D.shape[1]))\n YGAR = qw7D.view(dtype=yDqo)\n bGrB, or8S = oyIN.unique(YGAR, return_index=True)\n return qw7D[or8S]",
"def RR7x(jzdc):\n T4Wy = oyIN.lexsort(jzdc.T)\n jzdc = jzdc[T4... | [
"0.72966653",
"0.71330875",
"0.7110418",
"0.69618964",
"0.6924001",
"0.676073",
"0.6613013",
"0.6507103",
"0.64443994",
"0.63791454",
"0.62952435",
"0.6287125",
"0.62635094",
"0.62058926",
"0.6077665",
"0.5984382",
"0.59432054",
"0.5889493",
"0.5865529",
"0.5755482",
"0.57410... | 0.6901177 | 5 |
Generate all possible binary spin states. | def jrOT(exwG, aDi_=False):
if exwG < 0:
raise Exception('n cannot be <0')
if exwG > 30:
raise Exception('n is too large to enumerate all states.')
Ty9i = oyIN.array([list(oyIN.binary_repr(YRbF, width=exwG)) for YRbF in range(2 ** exwG)]).astype(int)
if aDi_ is False:
return Ty9i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lEx0(YKHO):\n YKHO.clingo = ObOW()\n P8oC = ('base', '')\n YKHO.clingo.add_file('initial-states.lp')\n YKHO.clingo.run([P8oC])\n hlel = YKHO.clingo.output\n _omM = int(len(hlel) / 2)\n wspz = oyIN.full(_omM, object)\n for YRbF in range(0, _omM):\n EaF0 = []\n for WhQ6 in h... | [
"0.6314658",
"0.5993469",
"0.5704833",
"0.5702639",
"0.5698927",
"0.56279147",
"0.55876994",
"0.5559703",
"0.55584943",
"0.54852873",
"0.5464381",
"0.54571587",
"0.5377787",
"0.53361166",
"0.5330843",
"0.53244656",
"0.52789825",
"0.5269117",
"0.5269117",
"0.5268354",
"0.52683... | 0.5745846 | 2 |
Generator for iterating through all states for Potts model with k distinct states. This is a faster version of calling xbin_states(n, False) except with strings returned as elements instead of integers. | def BRue(exwG, G1Hx):
assert exwG > 0, 'n cannot be <0'
assert G1Hx >= 2, 'k cannot be <2'
for YRbF in range(G1Hx ** exwG):
QTBn = luV5(YRbF, G1Hx)
yield (['0'] * (exwG - len(QTBn)) + QTBn) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sdAX(exwG, aDi_=False):\n assert exwG > 0, 'n cannot be <0'\n\n def Ty9i():\n for YRbF in range(2 ** exwG):\n if aDi_ is False:\n yield oyIN.array(list(oyIN.binary_repr(YRbF, width=exwG))).astype('int')\n else:\n yield (oyIN.array(list(oyIN.binar... | [
"0.657001",
"0.6036281",
"0.6008307",
"0.5839257",
"0.56808233",
"0.55150694",
"0.5509951",
"0.54692584",
"0.54639053",
"0.54587126",
"0.54567873",
"0.5440125",
"0.54118186",
"0.5400484",
"0.5395248",
"0.5382987",
"0.5379463",
"0.5348208",
"0.532136",
"0.5314528",
"0.5309149"... | 0.7672833 | 0 |
Get probability of unique states. There is an option to allow for weighted counting. | def N7OY(Ty9i, T_au=None, _mSQ=None, HBfW=True):
if Ty9i.ndim == 1:
Ty9i = Ty9i[:, None]
exwG = Ty9i.shape[1]
r845 = 0
QFWL = False
if T_au is None:
T_au = Ty9i[_NJ_(Ty9i)]
qjcw = _NJ_(Ty9i, return_inverse=True)
QTg7 = oyIN.bincount(qjcw)
QFWL = True
else:... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wwRm(YKHO, wspz, xASv):\n BFeB = oyIN.ones(len(wspz)) / 2\n return BFeB",
"def CCcM(YKHO) -> oyIN.ndarray:\n return oyIN.ones(YKHO.n_states) / YKHO.n_states",
"def wwRm(YKHO, wspz, xASv):\n BFeB = []\n for d6pt, (QTBn, XeOP) in enumerate(zip(wspz, xASv)):\n eUNT = YKHO.sample_action(Q... | [
"0.72098875",
"0.68719506",
"0.681885",
"0.66933316",
"0.64928764",
"0.646415",
"0.6455021",
"0.6451709",
"0.64341277",
"0.64116365",
"0.63906914",
"0.6369575",
"0.6304875",
"0.62995815",
"0.62764776",
"0.62749606",
"0.6260037",
"0.62496746",
"0.62049574",
"0.620298",
"0.6185... | 0.6863431 | 2 |
Replace diagonal entries of square matrix. | def KKZ7(vb7U, vK5Q):
if vK5Q.ndim > 1:
raise Exception('newdiag should be 1-dimensional')
if not vb7U.shape[0] == vb7U.shape[1] == vK5Q.size:
raise Exception('Incorrect dimensions.')
return vb7U - oyIN.diag(vb7U.diagonal()) + oyIN.diag(vK5Q) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Fe7R(vb7U):\n return KKZ7(vb7U, oyIN.zeros(vb7U.shape[0]))",
"def ppuh(TVTK, H2v2):\n k0lF = fbIl(H2v2, TVTK)\n for rdlD in range(H2v2):\n for fvDH in range(TVTK):\n if rdlD == fvDH:\n k0lF[rdlD][fvDH] = 1\n else:\n k0lF[rdlD][fvDH] = 0\n ... | [
"0.6818765",
"0.6663469",
"0.66334283",
"0.6589273",
"0.6532726",
"0.6294296",
"0.619446",
"0.618863",
"0.61355823",
"0.6104683",
"0.6051159",
"0.59297997",
"0.5877385",
"0.58515203",
"0.5838582",
"0.58321714",
"0.5830014",
"0.5796444",
"0.5772605",
"0.5766806",
"0.57219243",... | 0.66665506 | 1 |
Replace diagonal entries of square matrix with zeros. | def Fe7R(vb7U):
return KKZ7(vb7U, oyIN.zeros(vb7U.shape[0])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jFMI(SppC):\n usx6 = set()\n ZLJ_ = set()\n r8hN = len(SppC)\n exwG = len(SppC[0])\n for YRbF in range(r8hN):\n for r845 in range(exwG):\n if SppC[YRbF][r845] == 0:\n usx6.add(YRbF)\n ZLJ_.add(r845)\n for YRbF in range(r8hN):\n for r845 i... | [
"0.76364577",
"0.741482",
"0.72098637",
"0.72076064",
"0.7194845",
"0.7187605",
"0.7179795",
"0.71545714",
"0.71404755",
"0.7116813",
"0.71061784",
"0.7101403",
"0.70931053",
"0.7078037",
"0.707109",
"0.7050938",
"0.7049955",
"0.70301324",
"0.70263463",
"0.70243907",
"0.70221... | 0.7914989 | 0 |
This function stores the 10 users in descending order of their weekly scores. While displaying weekly leaderboard users are selected from this table. It remains static for a week | def kUj4(QePW):
"""NOTE:Always execute this after executing Overall leader board"""
try:
CBIr = BFpK.objects.order_by('-prev_week_score')
UHFx = BFpK.objects.order_by('-prev_week_score').count()
if UHFx > 10:
UHFx = 10
VECZ = GDwt.objects.all().count()
if VECZ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mwE9(YKHO, CBIr):\n wX5C = YKHO.get_reviewed_documents_count_for_user(CBIr)\n UHFx = YKHO.leaderboard().filter(num_entries__gte=wX5C).count()\n P1HI = UHFx - 3 if UHFx - 3 >= 0 else 0\n DLtp = YKHO.leaderboard().filter(num_entries__gte=wX5C)[P1HI:]\n UGdd = YKHO.leaderboard().filter(num_entries_... | [
"0.6518284",
"0.62911123",
"0.62114656",
"0.613538",
"0.5977623",
"0.5976624",
"0.59152174",
"0.58882964",
"0.58437175",
"0.573525",
"0.57267207",
"0.56890243",
"0.5650607",
"0.563731",
"0.56155074",
"0.55836856",
"0.5561299",
"0.5559957",
"0.55426884",
"0.5540046",
"0.553987... | 0.6733844 | 0 |
Tests the API endpoint to Redeem BLVT without tokenName | def iMMf():
x0hE = i9zE(H5ew, DXni)
x0hE.redeem_blvt.when.called_with('', '1').should.throw(_bAh) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EH6_(YKHO):\n print(' --------------------------- Test 4 - Try Access without token ----------------------------')\n uJjO = qxeD.uuid4()\n jTXt = 'my-precious'\n VIXL = 'EUR'\n iQ7K(uJjO, jTXt, VIXL)\n MOPg = {'Content-Type': 'application/json'}\n nPrm = '{\"amount\" : 20.0}'\n geh0 = G... | [
"0.69678366",
"0.6823835",
"0.68079174",
"0.65782005",
"0.64727575",
"0.64182734",
"0.6410921",
"0.6350603",
"0.6330735",
"0.6295604",
"0.62089884",
"0.6203766",
"0.6167417",
"0.6161279",
"0.61465585",
"0.6144366",
"0.6102332",
"0.6088465",
"0.6072441",
"0.6067823",
"0.606568... | 0.77624285 | 0 |
Generate random string of given length | def lx9M(ZBaj):
KoG3 = vIwR.ascii_uppercase + ' '
return ''.join((tuKI.choice(KoG3) for YRbF in range(ZBaj))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YzjY(u54L: int):\n FLLz = vIwR.ascii_letters + vIwR.digits\n return ''.join(tuKI.choices(FLLz, k=u54L))",
"def e7Tf(u54L):\n return ''.join((tuKI.choice(vIwR.ascii_uppercase + vIwR.digits) for bGrB in range(u54L)))",
"def e7Tf(u54L=30):\n dLKT = C1SZ + BHGE\n return ''.join((Acvy(dLKT) for b... | [
"0.8844503",
"0.8726719",
"0.85819155",
"0.85577863",
"0.85499674",
"0.85491097",
"0.8543545",
"0.8523494",
"0.8522387",
"0.8517031",
"0.85046446",
"0.85040534",
"0.84566855",
"0.84562707",
"0.84507287",
"0.8443748",
"0.84064084",
"0.8395912",
"0.8389881",
"0.8321455",
"0.830... | 0.83249706 | 19 |
Replace a given character in a string with 5% probability | def wtNT(KCHu):
rRy_ = ''
KoG3 = vIwR.ascii_uppercase + ' '
KCHu = list(KCHu)
for YRbF in range(len(KCHu)):
if mqS_():
rRy_ = rRy_ + tuKI.choice(KoG3)
else:
rRy_ = rRy_ + KCHu[YRbF]
return rRy_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def r3Zb(_dKt):\n JfEU = _dKt\n for Bb_j in range(len(_dKt)):\n qIL_ = cl17()\n r7T2 = tuKI.choice(JfEU)\n JfEU = JfEU.replace(r7T2, qIL_, 1)\n return JfEU",
"def Ld7T(YKHO, hcXw):\n YRbF = oyIN.random.randint(0, 2)\n return YKHO.typo[hcXw][YRbF]",
"def WqS0(ytkQ: str) -> st... | [
"0.6311851",
"0.6193895",
"0.61363345",
"0.60909975",
"0.6055487",
"0.5938125",
"0.5891487",
"0.58658195",
"0.5823957",
"0.5822421",
"0.5802144",
"0.57907736",
"0.57653373",
"0.5752115",
"0.56485534",
"0.5641217",
"0.5561156",
"0.55560714",
"0.55560714",
"0.555528",
"0.554232... | 0.58330303 | 8 |
Compute dot product of ``x`` and ``y``. | def Tcon(WKvO, LVAh):
return Fjlh(WKvO, LVAh) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BJ1H(WKvO, LVAh):\n return sum([Y7fn * O5iP for Y7fn, O5iP in zip(WKvO, LVAh)])",
"def BJ1H(WKvO, LVAh):\n Ylbp = WKvO[0] * LVAh[0]\n for jzdc, Fg_i in zip(WKvO, LVAh):\n Ylbp += jzdc * Fg_i\n return Ylbp",
"def pxL1(WKvO, LVAh):\n return sum(JaxB(seET.mul, WKvO, LVAh))",
"def yYJc(... | [
"0.8491295",
"0.8296241",
"0.8229306",
"0.80518425",
"0.79082066",
"0.75913566",
"0.75577414",
"0.75301313",
"0.7527398",
"0.7515738",
"0.75053287",
"0.74667364",
"0.7382237",
"0.7381008",
"0.73807794",
"0.73807794",
"0.7375743",
"0.73670745",
"0.73506725",
"0.7253983",
"0.72... | 0.0 | -1 |
isList(obj) > Returns true if obj is a Python list. This function does not return true if the object supplied is a UserList object. | def S7ID(YEnM):
return type(YEnM) == SnBA.ListType | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Lm1b(YEnM):\n return type(YEnM) is list",
"def Lm1b(b25f):\n return wUhG(b25f, x1iM)",
"def S7ID(nPrm):\n try:\n from types import ListType\n if type(nPrm) == ListType:\n return True\n except ImportError:\n if type(nPrm) == type([]):\n return True\n ... | [
"0.9034523",
"0.7945225",
"0.78491604",
"0.7847296",
"0.7833444",
"0.7789604",
"0.77525455",
"0.7666976",
"0.76357245",
"0.7575635",
"0.7540054",
"0.75367045",
"0.74248445",
"0.7335114",
"0.7294102",
"0.7270129",
"0.7133863",
"0.70564574",
"0.69643503",
"0.6943497",
"0.689898... | 0.88559943 | 1 |
Get the instantaneous velocity of the vehicle | def IB0p(YKHO) -> fexq:
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uxsC(YKHO):\n return YKHO.momentum / YKHO.mass",
"def Uk5V(YKHO):\n return YKHO.v",
"def p8Jz(YKHO):\n return YKHO._velocity",
"def p8Jz(YKHO):\n return YKHO._velocity",
"def uxsC(YKHO):\n return YKHO._I85_msg_from_device(YKHO.node.sdo[24684].phys) / 10",
"def p8Jz(YKHO):\n return Y... | [
"0.81550604",
"0.8021493",
"0.7824219",
"0.7824219",
"0.773878",
"0.7615091",
"0.75660264",
"0.75613755",
"0.7361096",
"0.7292588",
"0.7203171",
"0.71959347",
"0.7185026",
"0.71544135",
"0.71415496",
"0.7092134",
"0.7079417",
"0.70488185",
"0.6977106",
"0.6965514",
"0.6953223... | 0.0 | -1 |
Get the angular velocity of the vehicle | def chkZ(YKHO) -> gRP9:
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W43o(YKHO):\n u8oJ = PQkn.GET_ANGULAR_VELOCITY_TRIGGER_READ\n if YKHO.__trigger == u8oJ:\n YKHO.read_and_update_angle()\n shsp = YKHO.__angle - YKHO.__offset\n if YKHO.__factorSet:\n return shsp / YKHO.__degPerSecondFactor\n return shsp",
"def uxsC(YKHO):\n return YKHO.momentu... | [
"0.8059321",
"0.7897727",
"0.7807798",
"0.7697948",
"0.7674692",
"0.76417446",
"0.76417446",
"0.76398784",
"0.7620011",
"0.74393064",
"0.71774113",
"0.7153626",
"0.70817024",
"0.7072808",
"0.7031192",
"0.70142263",
"0.70040464",
"0.69933337",
"0.6984637",
"0.69648975",
"0.695... | 0.0 | -1 |
Calculate mortgage amortization (monthly, yearly) | def XCUY(Emd4, Vtys: int, LMdR: float, _IhL: float) -> lmHO:
ZY7h = []
NjHw = []
rpdr = Emd4.payment_calc(years=Vtys, interest=_IhL, mortgage_amount=LMdR)
lP2E = Vtys * 12
lO87 = 1
rPFq = _IhL / 100 / 12
zc53 = _c1T.today()
GYYg = _c1T.today()
SYRI = LMdR
Cn_O = LMdR
NXQj = 0... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TUvL(LMdR: float, ulWt: int, Ee3s: float) -> float:\n W1KH = ulWt * 12\n IiJB = Ee3s / 100 / 12\n M6pt = IiJB * (1 + IiJB) ** W1KH\n UUZ1 = (1 + IiJB) ** W1KH - 1\n rpdr = round(LMdR * (M6pt / UUZ1), 2)\n return rpdr",
"def HM2U(YKHO):\n if YKHO.balance > 0:\n h6F6 = pow(1 + YKHO.... | [
"0.6487584",
"0.6259489",
"0.61939764",
"0.61643493",
"0.60776573",
"0.6062495",
"0.6021848",
"0.5995979",
"0.5958701",
"0.5955507",
"0.59300846",
"0.5859633",
"0.5859509",
"0.57057583",
"0.56838846",
"0.5666902",
"0.5646642",
"0.56455237",
"0.5642566",
"0.5628647",
"0.562696... | 0.68517774 | 0 |
Removes all the rows and columns that are full of zeros. | def LRWB(YKHO, zAVU):
zAVU = zAVU[oyIN.any(zAVU != Td7z, axis=1), :]
zAVU = zAVU[:, oyIN.any(zAVU != Td7z, axis=0)]
return zAVU | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JViT(WKvO):\n assert len(WKvO.shape) == 2\n return WKvO[~oyIN.all(WKvO == 0, axis=1)]",
"def jFMI(SppC):\n usx6 = set()\n ZLJ_ = set()\n r8hN = len(SppC)\n exwG = len(SppC[0])\n for YRbF in range(r8hN):\n for r845 in range(exwG):\n if SppC[YRbF][r845] == 0:\n ... | [
"0.74536926",
"0.74197286",
"0.71336657",
"0.7104906",
"0.6959379",
"0.6938438",
"0.69152904",
"0.687545",
"0.68144846",
"0.6814092",
"0.6744852",
"0.67090714",
"0.66147745",
"0.66117287",
"0.6605634",
"0.659063",
"0.65819573",
"0.6578627",
"0.65643966",
"0.65231234",
"0.6514... | 0.0 | -1 |
Datetime in a format suitable for generating fake XML files to feed timeplot. | def Ebnu(YKHO):
if YKHO.time:
return YKHO.date.strftime('%b %d %Y') + ' ' + YKHO.time.strftime('%H:%M:%S') + ' GMT'
else:
return YKHO.date.strftime('%b %d %Y') + ' ' + '00:00:00' + ' GMT' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ebnu(YKHO):\n return YKHO.date.strftime('%b %d %Y') + ' ' + '00:00:00' + ' GMT'",
"def wRmF(YKHO):\n return str(YKHO.date)",
"def wRmF(YKHO):\n return str(YKHO.date)",
"def wRmF(YKHO):\n return str(YKHO.date)",
"def RIQ9(BWXx):\n import datetime\n if not isinstance(BWXx, datetime.date... | [
"0.761962",
"0.71846664",
"0.71846664",
"0.71846664",
"0.70496804",
"0.68589175",
"0.6773855",
"0.6747785",
"0.67126924",
"0.6637275",
"0.65375906",
"0.6527248",
"0.6506784",
"0.65020233",
"0.649874",
"0.6492056",
"0.64541537",
"0.6443951",
"0.6443528",
"0.64197046",
"0.64103... | 0.7601324 | 1 |
Datetime in a format suitable for generating fake XML files to feed timeplot. | def Ebnu(YKHO):
return YKHO.date.strftime('%b %d %Y') + ' ' + '00:00:00' + ' GMT' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ebnu(YKHO):\n if YKHO.time:\n return YKHO.date.strftime('%b %d %Y') + ' ' + YKHO.time.strftime('%H:%M:%S') + ' GMT'\n else:\n return YKHO.date.strftime('%b %d %Y') + ' ' + '00:00:00' + ' GMT'",
"def wRmF(YKHO):\n return str(YKHO.date)",
"def wRmF(YKHO):\n return str(YKHO.date)",
... | [
"0.7600319",
"0.71850157",
"0.71850157",
"0.71850157",
"0.7048055",
"0.6858682",
"0.67739093",
"0.6748223",
"0.6713253",
"0.66371894",
"0.6537068",
"0.6527517",
"0.650657",
"0.65000445",
"0.64990854",
"0.6491356",
"0.6452532",
"0.64425963",
"0.64421767",
"0.6419546",
"0.64092... | 0.76186186 | 0 |
Sets up the optimization scheme | def UPkQ(YKHO):
K0do = ht2j.optim.Adam(YKHO.parameters(), lr=0.001)
return K0do | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ra5j(YKHO):\n MTKo = lE6K()\n if bo34.getEffectiveLevel() == G9jH.DEBUG:\n MTKo.printLevel = XFjo.NONE\n else:\n MTKo.printLevel = XFjo.NONE\n YKHO.solver_minimizing = BXQW(YKHO.nV, YKHO.nC)\n YKHO.solver_minimizing.setOptions(MTKo)\n YKHO.solver_maximizing = BXQW(YKHO.nV, YKHO.... | [
"0.68792874",
"0.66135776",
"0.66088444",
"0.66001785",
"0.65226376",
"0.64388984",
"0.6419879",
"0.6399884",
"0.6379564",
"0.6320737",
"0.63067204",
"0.62696296",
"0.6252122",
"0.62463",
"0.6210827",
"0.61129",
"0.6106012",
"0.61041033",
"0.60489315",
"0.60441214",
"0.603058... | 0.0 | -1 |
Sets up the optimization scheme | def UPkQ(YKHO):
K0do = ht2j.optim.Adam(YKHO.parameters(), lr=YKHO.hparams['learning_rate'])
return K0do | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ra5j(YKHO):\n MTKo = lE6K()\n if bo34.getEffectiveLevel() == G9jH.DEBUG:\n MTKo.printLevel = XFjo.NONE\n else:\n MTKo.printLevel = XFjo.NONE\n YKHO.solver_minimizing = BXQW(YKHO.nV, YKHO.nC)\n YKHO.solver_minimizing.setOptions(MTKo)\n YKHO.solver_maximizing = BXQW(YKHO.nV, YKHO.... | [
"0.68792874",
"0.66135776",
"0.66088444",
"0.66001785",
"0.65226376",
"0.64388984",
"0.6419879",
"0.6399884",
"0.6379564",
"0.6320737",
"0.63067204",
"0.62696296",
"0.6252122",
"0.62463",
"0.6210827",
"0.61129",
"0.6106012",
"0.61041033",
"0.60489315",
"0.60441214",
"0.603058... | 0.0 | -1 |
Return a unicode representation of the exception message. | def Ku9n(YKHO):
return QMSQ(YKHO.args[0]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BuEc(YKHO):\n return YKHO._exception_message",
"def BuEc(YKHO) -> str:\n return qe4Y.get(YKHO, 'exception_message')",
"def _T21(AJ5d):\n if hasattr(AJ5d, 'message'):\n return str(AJ5d.message)\n return str(AJ5d)",
"def JCGw(YKHO):\n vSlG = bHIZ\n vSlG += '\\nException Class: %s\\... | [
"0.79872286",
"0.78442556",
"0.7642504",
"0.7578385",
"0.7256937",
"0.70916015",
"0.7055222",
"0.694551",
"0.6903667",
"0.6896262",
"0.6838885",
"0.67391044",
"0.6725241",
"0.6694937",
"0.6658766",
"0.6658766",
"0.6658766",
"0.6638548",
"0.6631082",
"0.6630395",
"0.6621789",
... | 0.0 | -1 |
Cut out Values of a given dataset beginning from "fromValue" to "toValue". This function assumes that the first dimension of the dataset is orderd ascending and reflects the xAxis values. | def R0s2(fxlC, s_8I, SpEn):
_Q4K = []
for nPrm in fxlC:
_Q4K.append([])
for SjLr in zip(*fxlC):
if s_8I <= SjLr[0] and SjLr[0] <= SpEn:
for YRbF, wEf2 in enumerate(SjLr):
_Q4K[YRbF].append(wEf2)
return _Q4K | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ToEQ(yKcO, Os4s):\n nPrm = vXOu(yKcO, Os4s)\n aUKP = nPrm.shape[0]\n nPrm.loc[0, 'from'] = yKcO\n nPrm.loc[0, 'delta'] = nPrm.loc[0, 'to'] - yKcO\n if nPrm.loc[aUKP - 1, 'to'] > Os4s:\n nPrm.loc[aUKP - 1, 'to'] = Os4s\n nPrm.loc[aUKP - 1, 'delta'] = Os4s - nPrm.loc[aUKP - 1, 'from'... | [
"0.5697572",
"0.5638063",
"0.5602279",
"0.5498198",
"0.5466695",
"0.5385294",
"0.5322709",
"0.5322709",
"0.53112674",
"0.52842146",
"0.5242307",
"0.5133078",
"0.5100356",
"0.5086364",
"0.5063078",
"0.49841172",
"0.49736372",
"0.49708834",
"0.49494633",
"0.4945881",
"0.4935054... | 0.75804305 | 0 |
Get the color of a node in the tree | def gvdk(zi_v):
for TDgG in list(GkW1.keys()):
if zi_v in GkW1[TDgG]:
return HIMw[TDgG]
try:
WKvO = int(zi_v)
return HIMw['Terminals']
except:
try:
WKvO = float(zi_v)
return HIMw['Terminals']
except:
try:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PICn(YKHO, Q6kx: Node) -> str:\n or8S = hash(Q6kx.get_kind_name()) % len(YKHO.colors_)\n return YKHO.colors_[or8S]",
"def PICn(Q6kx, YDzg):\n if Q6kx in YDzg:\n return YDzg[Q6kx]\n return 'black'",
"def gvdk(YKHO, qO4Y):\n qO4Y %= 11\n if qO4Y == 9:\n return (0.753, 0.753, 0... | [
"0.76955146",
"0.7130979",
"0.7075502",
"0.69564354",
"0.6928769",
"0.67350966",
"0.67350966",
"0.67350966",
"0.6679222",
"0.6679088",
"0.66723704",
"0.66622853",
"0.66622853",
"0.66622853",
"0.66622853",
"0.6660124",
"0.66277707",
"0.6614305",
"0.6598142",
"0.65887123",
"0.6... | 0.6891435 | 5 |
Initialize a matchList object | def FIMM(YKHO):
YKHO.matches = {}
YKHO.usersInLobby = []
YKHO.lastID = 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, hHld=None):\n super(ycrv, YKHO).__init__()\n if hHld is None:\n hHld = []\n YKHO.matches = hHld",
"def FIMM(YKHO, hHld, FGW3, kepv=None, KhBf=None):\n YKHO.matches = hHld\n YKHO.number = FGW3\n YKHO.start_date = kepv\n YKHO.end_date = KhBf",
"def FIMM(YKHO, D9Ga):\n ... | [
"0.74445736",
"0.6776817",
"0.6419827",
"0.64026994",
"0.6393391",
"0.63497096",
"0.6235516",
"0.61387926",
"0.61284995",
"0.60810715",
"0.60534924",
"0.5999657",
"0.5992352",
"0.5936301",
"0.59003556",
"0.58667624",
"0.58600235",
"0.58493406",
"0.58215636",
"0.5792449",
"0.5... | 0.6554051 | 2 |
Call to schedule current learning rate | def nrOS(YKHO, xnwZ):
if xnwZ > YKHO.count:
YKHO.base_lr = YKHO.origin_lr * pow(1 - 1.0 * xnwZ / YKHO.max_samples, YKHO.factor)
if YKHO.base_lr < YKHO.stop_factor_lr:
YKHO.base_lr = YKHO.stop_factor_lr
G9jH.info('Update[%d]: now learning rate arrived at %0.5e, will not change... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fggk(YKHO):\n YKHO.scheduler.step(YKHO.clock.epoch)",
"def nrOS(YKHO, qtWj):\n b0Ix = YKHO.schedule(qtWj)\n ZylS.summary.scalar('learning rate', data=b0Ix, step=qtWj)\n return b0Ix",
"def fggk(YKHO):\n for IesV in YKHO.schedulers:\n if YKHO.opt.lr_policy == 'plateau':\n Ies... | [
"0.8229549",
"0.8019128",
"0.7837845",
"0.7581702",
"0.7561924",
"0.7470505",
"0.739445",
"0.712",
"0.70963514",
"0.7093816",
"0.7089851",
"0.7062276",
"0.705441",
"0.70389843",
"0.7028878",
"0.6979073",
"0.6951482",
"0.69390315",
"0.69213116",
"0.69197434",
"0.69094574",
"... | 0.65652806 | 37 |
The user should be able to make a booking | def ZQgV(YKHO):
_c1T = qcWV(2030, 3, 1, 11)
geh0 = YKHO.client.post(gxEw('bookings', kwargs={'facility': 'g'}), {'book': str(_c1T.timestamp())})
QpfX = geh0.context
GXqQ = QpfX['bookings']
YKHO.assertEqual(geh0.status_code, 200)
YKHO.assertEqual(QpfX['quota'], gCuF.BOOKINGS_QUOTA - 1)
YKHO.a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o_cE(YKHO):\n T3Kv = AprZ(YKHO.someone, YKHO.first_day, 11)\n geh0 = YKHO.client.post(gxEw('bookings', kwargs={'facility': 'g'}), {'book': str(T3Kv.date.timestamp())})\n QpfX = geh0.context\n GXqQ = QpfX['bookings']\n YKHO.assertEqual(geh0.status_code, 403)\n YKHO.assertEqual(QpfX['quota'], g... | [
"0.65733033",
"0.6262309",
"0.6248513",
"0.6232085",
"0.6199877",
"0.61662143",
"0.61391747",
"0.6104352",
"0.6103857",
"0.6099108",
"0.609168",
"0.6081628",
"0.60685664",
"0.6051172",
"0.6045759",
"0.6043005",
"0.60311186",
"0.6024618",
"0.601339",
"0.6009465",
"0.5926087",
... | 0.65740085 | 0 |
Should display bookings for selected facility | def ssGw(YKHO):
o6yu = AprZ(YKHO.user, YKHO.first_day, 8, facility='g')
geh0 = YKHO.client.get(gxEw('bookings', kwargs={'facility': 'g'}))
QpfX = geh0.context
GXqQ = QpfX['bookings']
YKHO.assertEqual(geh0.status_code, 200)
YKHO.assertEqual(QpfX['quota'], gCuF.BOOKINGS_QUOTA - 1)
for Vzk6 in ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bdpx(YKHO):\n geh0 = YKHO.client.get(gxEw('bookings', kwargs={'facility': 'h'}))\n YKHO.assertEqual(geh0.status_code, 200)\n YKHO.assertEqual(geh0.context['is_g'], False)",
"def lZ58(YKHO):\n o6yu = AprZ(YKHO.user, YKHO.first_day, 8, facility='g')\n geh0 = YKHO.client.get(gxEw('bookings', kwar... | [
"0.70730275",
"0.6802688",
"0.628358",
"0.607653",
"0.6069607",
"0.60472393",
"0.60439026",
"0.5952408",
"0.591294",
"0.56381917",
"0.5492407",
"0.5451856",
"0.5418347",
"0.5402953",
"0.53849506",
"0.53067315",
"0.5282332",
"0.52819073",
"0.51773065",
"0.51677585",
"0.5137756... | 0.76715374 | 0 |
Computes the accuracy over the k top predictions for the specified values of k | def vjyh(hlel, pan_, hz5a=(1,)):
with ht2j.no_grad():
Gq8e = max(hz5a)
Ep8u = pan_.size(0)
bGrB, nvEb = hlel.topk(Gq8e, 1, True, True)
nvEb = nvEb.t()
gXXc = nvEb.eq(pan_.view(1, -1).expand_as(nvEb))
Ylbp = []
for G1Hx in hz5a:
R2Dg = gXXc[:G1Hx].v... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z7qO(LVAh, aMgO, G1Hx=2):\n nvEb = []\n for YRbF in range(len(LVAh)):\n if LVAh[YRbF] in aMgO[YRbF][:G1Hx]:\n nvEb.append(1)\n else:\n nvEb.append(0)\n return sum(nvEb) / len(nvEb)",
"def vjyh(aMgO, ibJh, hz5a=(1,)):\n Gq8e = max(hz5a)\n Ep8u = ibJh.size(0)\... | [
"0.8331214",
"0.8284662",
"0.82381004",
"0.8229767",
"0.82202226",
"0.81864446",
"0.81847763",
"0.8175173",
"0.8171541",
"0.81699467",
"0.81664646",
"0.81645083",
"0.81637454",
"0.81622064",
"0.81622064",
"0.81622064",
"0.81622064",
"0.81622064",
"0.81622064",
"0.81622064",
"... | 0.78614724 | 74 |
parses requirements from requirements.txt | def Ks_v():
VGiD = Hy7s.path.join(BXHv, 'requirements.txt')
with open(VGiD, encoding='utf8') as eHNT:
f9mM = [zFiD.strip() for zFiD in eHNT if not zFiD.strip().startswith('#')]
ZWCE = []
wPdp = []
for qv1X in f9mM:
if '://' in qv1X:
wPdp.append(qv1X)
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def khiT():\n tk5Y = Hy7s.path.dirname(Hy7s.path.abspath(xAKo))\n fA3L = []\n SMAd = []\n with open(Hy7s.path.join(tk5Y, 'requirements.txt'), 'r') as eHNT:\n for zFiD in eHNT.readlines():\n zFiD = zFiD.rstrip()\n if not zFiD or zFiD.startswith('#'):\n continu... | [
"0.8261331",
"0.773876",
"0.75876206",
"0.75540644",
"0.75315946",
"0.7514253",
"0.7495916",
"0.7487109",
"0.7451425",
"0.7450626",
"0.7389462",
"0.7381643",
"0.7373195",
"0.73333806",
"0.73200643",
"0.72835296",
"0.728088",
"0.72645885",
"0.7158073",
"0.71071446",
"0.7093100... | 0.7664683 | 2 |
Remove duplicated words from tokenized data. | def c88d(s2mk):
return sorted(set(s2mk)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BE34(V22M):\n Vl6w = []\n QTBn = oyIN.ones(len(V22M))\n while QTBn.any():\n ojCT = QTBn.nonzero()[0][0]\n for or8S in range(len(V22M)):\n iONc = V22M[ojCT]\n zmME = V22M[or8S]\n if or8S != ojCT and QTBn[or8S] and X0P6._do_words_intersect(iONc, zmME):\n ... | [
"0.71445256",
"0.70917296",
"0.6874571",
"0.67319804",
"0.66220075",
"0.65991855",
"0.6592135",
"0.65364367",
"0.6517979",
"0.6513646",
"0.6507246",
"0.6475281",
"0.6441893",
"0.6431872",
"0.6426122",
"0.64167345",
"0.6391357",
"0.6341155",
"0.63387936",
"0.63320225",
"0.6325... | 0.83719915 | 0 |
Remove stopwords (and, the, unless, about, etc.) from tokenized data. | def aUcs(s2mk):
return [a1PO for a1PO in s2mk if a1PO not in di0c.words('english')] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aUcs(nPrm):\n hwHU = di0c.words('english')\n V22M = dFss(str(nPrm))\n BdN0 = ''\n for GIN8 in V22M:\n if GIN8 not in hwHU and len(GIN8) > 1:\n BdN0 = BdN0 + ' ' + GIN8\n return BdN0",
"def wkDh(YKHO):\n s2mk = str(YKHO.doc).split()\n zLya = [eOtH for eOtH in s2mk if eOt... | [
"0.8169409",
"0.80082494",
"0.7991079",
"0.7704265",
"0.77015567",
"0.7681213",
"0.7666058",
"0.76279706",
"0.76223654",
"0.7577843",
"0.7562546",
"0.75536466",
"0.7500464",
"0.74909294",
"0.7476891",
"0.74767596",
"0.7466664",
"0.74162275",
"0.7406267",
"0.74060184",
"0.7392... | 0.78416765 | 3 |
Converts single form of word into its plural form. | def iYyZ(GIN8):
if GIN8.endswith('y'):
return GIN8[:-1] + 'ies'
elif GIN8[-1] in 'sx' or GIN8[-2:] in ['sh', 'ch']:
return GIN8 + 'es'
elif GIN8.endswith('an'):
return GIN8[:-2] + 'en'
else:
return GIN8 + 's' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hQ0A(GIN8):\n assert GIN8\n assert isinstance(GIN8, exCv)\n assert len(GIN8) > 0\n pyNA = GIN8[-2]\n XVAW = GIN8[-1]\n if XVAW in ['s', 'z', 'x']:\n return GIN8 + 'es'\n elif XVAW == 'h':\n if pyNA in ['s', 'c']:\n return GIN8 + 'es'\n else:\n ret... | [
"0.790306",
"0.762722",
"0.74138546",
"0.73063236",
"0.7224289",
"0.68215835",
"0.6714078",
"0.6651951",
"0.65788925",
"0.6479883",
"0.64093316",
"0.63903713",
"0.6383846",
"0.63624036",
"0.6352076",
"0.6330327",
"0.63197696",
"0.616359",
"0.61491525",
"0.6075423",
"0.6028547... | 0.822852 | 0 |
Returns element x from X which maximizes function value | def q1NN(m2Zb, EcVT, abmg=None):
return WHwV(lambda WKvO: -m2Zb(WKvO), EcVT, abmg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JI53(YKHO, ZYDH=50):\n with YKHO.fix_evaluator():\n nJ9F = NobF(lambda WKvO: -YKHO(WKvO[0])[0], [[0, oyIN.pi]], Ns=ZYDH, finish=None)\n Ylbp = H0wL(lambda WKvO: -YKHO(WKvO)[0], bracket=(nJ9F, oyIN.pi / ZYDH), bounds=(0, oyIN.pi), method='bounded', options=dict(xatol=1e-12))\n return Ylb... | [
"0.7010033",
"0.70056397",
"0.683527",
"0.68305373",
"0.6755575",
"0.6747582",
"0.6747582",
"0.6736222",
"0.67086214",
"0.6695453",
"0.668586",
"0.6672674",
"0.66649336",
"0.66649336",
"0.66649336",
"0.66649336",
"0.66649336",
"0.66649336",
"0.66649336",
"0.66649336",
"0.6664... | 0.67547315 | 5 |
Returns a default group name for an entry. | def DQkD(bTKY: _MemberDocumenterEntry) -> str:
IXKo = jSJz.get(bTKY.name)
if IXKo is None:
if bTKY.documenter.objtype == 'class':
IXKo = 'Classes'
else:
IXKo = 'Public members'
return IXKo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HnNj(YKHO, MjBJ, WmM4=None):\n try:\n BWXx = YKHO.match.group(MjBJ)\n if BWXx is None:\n return WmM4\n return BWXx\n except:\n return WmM4",
"def IXKo(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'group_name')",
"def IXKo(YKHO) -> h8nf[qe4Y.Input[s... | [
"0.7011084",
"0.68847287",
"0.68847287",
"0.6837681",
"0.68362194",
"0.6744566",
"0.668549",
"0.6632096",
"0.6627966",
"0.660757",
"0.65161395",
"0.65044737",
"0.64735377",
"0.63730216",
"0.63730216",
"0.6335591",
"0.6314184",
"0.6313359",
"0.6308101",
"0.62939095",
"0.629390... | 0.75292665 | 0 |
Reset the state of the algorithm based on the given state_dict | def hdXp(YKHO, xA7f):
super().set_state(jth9.deepcopy(xA7f))
YKHO._client_state = jth9.deepcopy(xA7f.get('_client_state'))
YKHO._trials_map = jth9.deepcopy(xA7f.get('_trials_map')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kZM1(YKHO):\n YKHO.state = YKHO.start_state.copy()",
"def SiRx(YKHO):\n YKHO._cur_state = YKHO._sample_state(YKHO._mdp.I)\n YKHO._prev_state = YKHO._cur_state",
"def El1J(qIxc, C3ST, xA7f, KFXN):\n VQlq = {}\n NXpY = C3ST.initializer_range if hasattr(C3ST, 'initializer_range') else getattr(C... | [
"0.73989797",
"0.7273473",
"0.7268481",
"0.7188341",
"0.71106577",
"0.71034837",
"0.71034837",
"0.71034837",
"0.71034837",
"0.71034837",
"0.71034837",
"0.71034837",
"0.71034837",
"0.71034837",
"0.71034837",
"0.71034837",
"0.7072804",
"0.7072408",
"0.6955266",
"0.6913521",
"0.... | 0.6637174 | 37 |
Get first input name | def RNn9(YKHO) -> h8nf[str]:
try:
return next(YKHO.iter_inputs())
except StopIteration:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c9ua(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'first_name')",
"def c9ua(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'first_name')",
"def fz1W(YKHO):\n U6D_ = YKHO.driver.find_element(*YKHO.firstname_textbox_selector)\n return U6D_.get_attribute('value')",
"def fz1W(... | [
"0.7944009",
"0.7944009",
"0.7787763",
"0.7275141",
"0.7229786",
"0.7216724",
"0.7216724",
"0.7216724",
"0.7216724",
"0.7216724",
"0.7216724",
"0.7216724",
"0.7216724",
"0.7216724",
"0.7216724",
"0.7216724",
"0.7216724",
"0.7216724",
"0.7216724",
"0.7216724",
"0.7216724",
"... | 0.0 | -1 |
Freeze the node and reduce memory footprint. No further graph construction manipulations are possible after the freezing. | def FiJ9(YKHO) -> None:
YKHO.description = None
YKHO.bound_inputs = None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eAEo(YKHO) -> None:\n YKHO._SetNodes(GpAB)",
"def J7Y8(YKHO):\n YKHO._freezeCount = YKHO._freezeCount + 1",
"def FiJ9(YKHO):\n pass",
"def FiJ9(YKHO):\n YKHO.collect_params().setattr('grad_req', 'null')",
"def aeFw(YKHO) -> None:\n YKHO._set_requires_grad(True)",
"def FiJ9(YKHO):\n ... | [
"0.8140439",
"0.6738785",
"0.66114765",
"0.6468904",
"0.64180017",
"0.63292307",
"0.616592",
"0.6103365",
"0.5980842",
"0.59622616",
"0.59428704",
"0.5780639",
"0.56979173",
"0.56715304",
"0.5659152",
"0.56315184",
"0.56121135",
"0.560236",
"0.55595154",
"0.55475754",
"0.5524... | 0.5246686 | 31 |
Returns the filtered queryset based on the query string value. | def SR0I(YKHO, QePW, SR0I):
CRDg = [G1Hx.upper() for G1Hx, Ty9i in gCuF.STATE_NAMES.items()]
if YKHO.value() == eIIt(gCuF.REGION_NAME):
return SR0I.filter(state__in=CRDg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k66M(YKHO):\n umWR = super().get_queryset()\n HI6H = YKHO.request.GET.get('search_box')\n if HI6H is not None:\n umWR = umWR.search_by(HI6H)\n return umWR",
"def k66M(YKHO):\n peBr = YKHO.request.query_params.get('keyword', '')\n SR0I = YKHO.queryset.filter(title__icontains=peBr)\n ... | [
"0.7303569",
"0.67871463",
"0.6773138",
"0.6759081",
"0.6737882",
"0.66412413",
"0.66301274",
"0.6627799",
"0.6622906",
"0.65955704",
"0.65433896",
"0.65407723",
"0.64867747",
"0.647158",
"0.64439607",
"0.64315325",
"0.64268696",
"0.63893616",
"0.6373919",
"0.63686645",
"0.63... | 0.6069736 | 41 |
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`. | def LwSz(Bcwd, KndY, NkkI=False, leAC='Confusion matrix', iMGt=QrM1.cm.Blues):
QrM1.imshow(Bcwd, interpolation='nearest', cmap=iMGt)
QrM1.title(leAC)
QrM1.colorbar()
wIWT = oyIN.arange(len(KndY))
QrM1.xticks(wIWT, KndY, rotation=45)
QrM1.yticks(wIWT, KndY)
if NkkI:
Bcwd = Bcwd.astype... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LwSz(Bcwd, KndY=[0, 1], NkkI=False, leAC='Confusion matrix', RMso=False):\n if NkkI:\n Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]\n print('Normalized confusion matrix')\n else:\n print('Confusion matrix, without normalization')\n if RMso:\n print(Bcwd)"... | [
"0.81922984",
"0.80933887",
"0.80272716",
"0.8016492",
"0.79913706",
"0.79885876",
"0.79777396",
"0.79729784",
"0.7958926",
"0.7954523",
"0.79347897",
"0.7931899",
"0.7931772",
"0.7928666",
"0.7923684",
"0.7921764",
"0.79213995",
"0.7920191",
"0.792016",
"0.7919876",
"0.79153... | 0.7913632 | 21 |
Function to perform a circular shift of a list to the left by a given number of elements | def DkWr(qw7D: List[int], mLGw: int) -> x1iM[int]:
if mLGw > len(qw7D):
raise ValueError
VBAo = qw7D[0:mLGw]
Fd7O = qw7D[mLGw:]
return [*Fd7O, *VBAo] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JR58(aPd6):\n F67R = aPd6[0]\n for YRbF in range(1, len(aPd6)):\n aPd6[YRbF - 1] = aPd6[YRbF]\n aPd6[-1] = F67R",
"def DkWr(jzdc, exwG=1):\n return jzdc[exwG:] + jzdc[:exwG]",
"def N0Pp(vC9B: list, exwG: int) -> list:\n return vC9B[-exwG:] + vC9B[:-exwG]",
"def uqfs(UOVU, LXgO):\n ... | [
"0.736864",
"0.72583044",
"0.7041001",
"0.70302767",
"0.6981906",
"0.6979766",
"0.6979766",
"0.69791937",
"0.6920969",
"0.68633217",
"0.682043",
"0.6810421",
"0.6725489",
"0.67117625",
"0.66969717",
"0.66084194",
"0.66018736",
"0.6596936",
"0.65745115",
"0.6548643",
"0.651213... | 0.6476862 | 25 |
Convert datetime to timestamp | def Jj31(BWXx):
if not isinstance(BWXx, qcWV.date):
return None
return ITS7.mktime(BWXx.timetuple()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n99j(YKHO, JRYC):\n return ITS7.mktime(JRYC.timetuple())",
"def l2cW(JRYC):\n E3oo = JRYC.timestamp()\n E3oo = int(E3oo)\n return E3oo",
"def Jj31(JRYC):\n return ITS7.mktime(JRYC.timetuple())",
"def aEIX(JRYC):\n return GRk0.timegm(JRYC.timetuple()) * 1000",
"def O27N(SMut):\n try... | [
"0.80794185",
"0.7690546",
"0.75856304",
"0.75487113",
"0.7529122",
"0.7385298",
"0.73818004",
"0.73589486",
"0.7252668",
"0.7231751",
"0.72240937",
"0.7200384",
"0.7149287",
"0.70919484",
"0.7059883",
"0.7046437",
"0.70334876",
"0.6989898",
"0.6968598",
"0.68879336",
"0.6882... | 0.7278026 | 8 |
Remove html tags from string | def JZhs(nPrm):
XP5J = ZbWC.compile('<.*?>')
return XP5J.sub('', nPrm) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JZhs(l5Ny):\n print('VOU REMOVER AS TAGS DA STRING')\n x0SS = ZbWC.compile('<.*?>')\n print('', ZbWC.sub(x0SS, '', l5Ny))\n return ZbWC.sub(x0SS, '', l5Ny)",
"def JZhs(YKHO, l5Ny):\n x0SS = ZbWC.compile('<.*?>')\n return ZbWC.sub(x0SS, '', l5Ny)",
"def JZhs(l5Ny: str) -> str:\n return ... | [
"0.8601719",
"0.8508436",
"0.8382815",
"0.83795327",
"0.8347479",
"0.83158517",
"0.83158517",
"0.8291176",
"0.8283774",
"0.82750565",
"0.8184092",
"0.8181785",
"0.8163925",
"0.8146746",
"0.8118009",
"0.8096395",
"0.80443776",
"0.80394965",
"0.800225",
"0.7992396",
"0.7960763"... | 0.81516665 | 13 |