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 |
|---|---|---|---|---|---|---|
The Amazon Resource Name (ARN) of the MAC Security (MACsec) secret key to associate with the dedicated connection. | def fFcV(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'secret_arn') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fFcV(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'secret_arn')",
"def QDug(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'secret_key')",
"def WxeJ(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'kms_key_arn')",
"def MvRK(kvcN):\n return kvcN + '.ami'",
"def MYjm(YKHO) ... | [
"0.65348244",
"0.63320506",
"0.6222377",
"0.62009203",
"0.60361683",
"0.5993174",
"0.59830666",
"0.59830666",
"0.59204143",
"0.59123325",
"0.5901042",
"0.5901042",
"0.58347666",
"0.576516",
"0.57376236",
"0.57158595",
"0.57022244",
"0.5697687",
"0.5680451",
"0.5667175",
"0.56... | 0.6154829 | 4 |
The MAC Security (MACsec) CAK to associate with the dedicated connection. The valid values are 64 hexadecimal characters (09, AE). Required if using `ckn`. | def qK80(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'cak') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H73H(H5ew, nPrm):\n eHpk = K3pX.new(H5ew, K3pX.MODE_CBC, gly3(16))\n return eHpk.encrypt(nPrm)[-16:]",
"def Qcdv(YKHO):\n return d32i.canonicalMacName(YKHO.cipherSuite)",
"def bzqt(Emd4, iBIi):\n return Emd4.MAC_PREFIX + '{:02X}'.format(int(iBIi))",
"def Pp4r(YKHO):\n Pp4r = jry1(bdbQ().co... | [
"0.6890307",
"0.6483881",
"0.61452806",
"0.6109432",
"0.608284",
"0.60670954",
"0.60127324",
"0.5965188",
"0.5965188",
"0.59520465",
"0.58886176",
"0.58886176",
"0.5854882",
"0.5834354",
"0.5799104",
"0.57475615",
"0.56925696",
"0.5676094",
"0.56540793",
"0.56383044",
"0.5614... | 0.0 | -1 |
The MAC Security (MACsec) CKN to associate with the dedicated connection. The valid values are 64 hexadecimal characters (09, AE). Required if using `cak`. | def WzK7(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'ckn') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QeBN():\n hww6 = zhLG()\n DLdL = ':'.join((('%012x' % hww6)[YRbF:YRbF + 2] for YRbF in range(0, 12, 2)))\n return DLdL",
"def Qcdv(YKHO):\n return d32i.canonicalMacName(YKHO.cipherSuite)",
"def H73H(H5ew, nPrm):\n eHpk = K3pX.new(H5ew, K3pX.MODE_CBC, gly3(16))\n return eHpk.encrypt(nPrm)[... | [
"0.634334",
"0.6328112",
"0.6265812",
"0.616471",
"0.61055714",
"0.59995866",
"0.59923273",
"0.59923273",
"0.5942146",
"0.5940359",
"0.5921319",
"0.58917916",
"0.58917916",
"0.5867987",
"0.58056605",
"0.579108",
"0.57757354",
"0.5723496",
"0.5694966",
"0.56643826",
"0.5660127... | 0.57556146 | 18 |
The Amazon Resource Name (ARN) of the MAC Security (MACsec) secret key to associate with the dedicated connection. | def fFcV(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'secret_arn') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fFcV(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'secret_arn')",
"def QDug(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'secret_key')",
"def WxeJ(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'kms_key_arn')",
"def MvRK(kvcN):\n return kvcN + '.ami'",
"def MYjm(YKHO) ... | [
"0.65333796",
"0.63317716",
"0.6219413",
"0.61991936",
"0.60343134",
"0.5992395",
"0.59799904",
"0.59799904",
"0.5920522",
"0.5912278",
"0.590071",
"0.590071",
"0.58352315",
"0.5764725",
"0.5735273",
"0.5716099",
"0.57024133",
"0.5698535",
"0.56805",
"0.56659544",
"0.56536514... | 0.61532855 | 6 |
The date in UTC format that the MAC Security (MACsec) secret key takes effect. | def Ye8G(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'start_on') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DlWd(YKHO):\n FpOe = YKHO.getUserInfo()\n E3oo = int(float(FpOe['signupTimeSec']))\n return ITS7.strftime('%m/%d/%Y %H:%M', ITS7.gmtime(E3oo))",
"def slWZ():\n return qcWV.datetime.utcnow().isoformat()",
"def slWZ(YKHO):\n return YKHO.individual_session.session_date.strftime('%A')",
"def h... | [
"0.66778237",
"0.64367825",
"0.6328016",
"0.62454045",
"0.6227865",
"0.620385",
"0.6143129",
"0.60557044",
"0.6052782",
"0.60320383",
"0.60202897",
"0.6004045",
"0.5986499",
"0.5981786",
"0.590914",
"0.5895016",
"0.58807665",
"0.5877013",
"0.5874824",
"0.58704966",
"0.5868146... | 0.0 | -1 |
The MAC Security (MACsec) CAK to associate with the dedicated connection. The valid values are 64 hexadecimal characters (09, AE). Required if using `ckn`. | def qK80(YKHO) -> qe4Y.Output[h8nf[str]]:
return qe4Y.get(YKHO, 'cak') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H73H(H5ew, nPrm):\n eHpk = K3pX.new(H5ew, K3pX.MODE_CBC, gly3(16))\n return eHpk.encrypt(nPrm)[-16:]",
"def Qcdv(YKHO):\n return d32i.canonicalMacName(YKHO.cipherSuite)",
"def bzqt(Emd4, iBIi):\n return Emd4.MAC_PREFIX + '{:02X}'.format(int(iBIi))",
"def Pp4r(YKHO):\n Pp4r = jry1(bdbQ().co... | [
"0.6891271",
"0.6485267",
"0.61469626",
"0.61116815",
"0.6084731",
"0.6069341",
"0.6015226",
"0.59660095",
"0.59660095",
"0.5954819",
"0.589143",
"0.589143",
"0.5856658",
"0.5836837",
"0.5800456",
"0.574984",
"0.5693216",
"0.56777513",
"0.5656449",
"0.56402016",
"0.5616092",
... | 0.0 | -1 |
The MAC Security (MACsec) CKN to associate with the dedicated connection. The valid values are 64 hexadecimal characters (09, AE). Required if using `cak`. | def WzK7(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'ckn') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QeBN():\n hww6 = zhLG()\n DLdL = ':'.join((('%012x' % hww6)[YRbF:YRbF + 2] for YRbF in range(0, 12, 2)))\n return DLdL",
"def Qcdv(YKHO):\n return d32i.canonicalMacName(YKHO.cipherSuite)",
"def H73H(H5ew, nPrm):\n eHpk = K3pX.new(H5ew, K3pX.MODE_CBC, gly3(16))\n return eHpk.encrypt(nPrm)[... | [
"0.63453543",
"0.6329982",
"0.6266284",
"0.6167232",
"0.6106864",
"0.6002593",
"0.59943235",
"0.59943235",
"0.594347",
"0.59427184",
"0.59227896",
"0.5893499",
"0.5893499",
"0.580731",
"0.579305",
"0.57776695",
"0.5753917",
"0.5753917",
"0.572496",
"0.5696964",
"0.5666311",
... | 0.5866067 | 13 |
The Amazon Resource Name (ARN) of the MAC Security (MACsec) secret key to associate with the dedicated connection. | def fFcV(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'secret_arn') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QDug(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'secret_key')",
"def WxeJ(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'kms_key_arn')",
"def MvRK(kvcN):\n return kvcN + '.ami'",
"def fFcV(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'secret_arn')",
"def fFcV(Y... | [
"0.63301337",
"0.62196976",
"0.61981744",
"0.6154028",
"0.6154028",
"0.6154028",
"0.60333073",
"0.5990695",
"0.5979796",
"0.5979796",
"0.59181714",
"0.59101564",
"0.5898456",
"0.5898456",
"0.5833226",
"0.5762903",
"0.5733999",
"0.57136726",
"0.5699928",
"0.5698245",
"0.568074... | 0.65344346 | 0 |
The date in UTC format that the MAC Security (MACsec) secret key takes effect. | def Ye8G(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'start_on') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DlWd(YKHO):\n FpOe = YKHO.getUserInfo()\n E3oo = int(float(FpOe['signupTimeSec']))\n return ITS7.strftime('%m/%d/%Y %H:%M', ITS7.gmtime(E3oo))",
"def slWZ():\n return qcWV.datetime.utcnow().isoformat()",
"def slWZ(YKHO):\n return YKHO.individual_session.session_date.strftime('%A')",
"def h... | [
"0.6677898",
"0.64363104",
"0.6328461",
"0.6244495",
"0.622804",
"0.62006503",
"0.61413103",
"0.60531515",
"0.60512644",
"0.6032967",
"0.60202944",
"0.6003988",
"0.5984427",
"0.5979833",
"0.59069",
"0.58951735",
"0.58780396",
"0.5877223",
"0.58764714",
"0.5871618",
"0.5868083... | 0.0 | -1 |
batch_condition list[str]. str values MUST refer to cell metadata keys in obs. | def BmJZ(YKHO):
YKHO.validator.adata.uns['batch_condition'] = ['NO_COLUMN']
YKHO.validator.validate_adata()
YKHO.assertEqual(YKHO.validator.errors, ["ERROR: Value 'NO_COLUMN' of list 'batch_condition' is not a column in 'adata.obs'."]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def u7DM(YKHO, NRcB):\n U5bT = []\n while True:\n XEri = FRJU(YKHO.__read_until(NRcB, '['))\n NRcB.seek(-1, vhwf)\n BWXx = YKHO.__read_block(NRcB, startchr='[', endchr=']')\n BWXx = SEMF(BWXx).format(YKHO.obj, proxy=YKHO.proxy)\n U5bT.append((XEri, BWXx))\n if XEri.i... | [
"0.5601627",
"0.52959913",
"0.5249884",
"0.51418024",
"0.50576925",
"0.50552845",
"0.5029249",
"0.50261825",
"0.50045973",
"0.491102",
"0.4886363",
"0.48753417",
"0.4835975",
"0.483392",
"0.47915676",
"0.47807896",
"0.47803938",
"0.47614968",
"0.4711902",
"0.47084954",
"0.470... | 0.5621609 | 0 |
Helper function to cast JSON unicode data to plain str | def nMY2(ZfUD):
if isinstance(ZfUD, dict):
return dict(((nMY2(H5ew), nMY2(BWXx)) for H5ew, BWXx in ZfUD.iteritems()))
elif isinstance(ZfUD, list):
return [nMY2(U6D_) for U6D_ in ZfUD]
elif isinstance(ZfUD, QMSQ):
return ZfUD.encode('utf-8')
else:
return ZfUD | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Sa1R(nPrm):\n if ArHY(nPrm):\n return nPrm\n else:\n return nPrm.decode('latin-1')",
"def brQJ(nPrm):\n return yLCI(nPrm)",
"def brQJ(nPrm):\n if isinstance(nPrm, bytes):\n return nPrm.decode('utf-8')\n else:\n return nPrm",
"def wDCE(zgjV):\n return qQXR.dum... | [
"0.7320742",
"0.7196213",
"0.7165662",
"0.70806295",
"0.70713603",
"0.701533",
"0.699519",
"0.6953077",
"0.694383",
"0.6941315",
"0.6936791",
"0.6936791",
"0.6936791",
"0.6936791",
"0.6936791",
"0.6936791",
"0.6936791",
"0.6936791",
"0.6936791",
"0.6936791",
"0.6936791",
"0... | 0.7295068 | 1 |
Helper method for selecting taskspecific head. | def Pdsu(YKHO, hlel, DnC0: Iterable) -> ht2j.Tensor:
for YRbF, sdCG in enumerate(DnC0):
U3Ds = int((sdCG - 1) * YKHO.num_classes_per_head)
PyXk = int(sdCG * YKHO.num_classes_per_head)
hlel[YRbF, :U3Ds].data.fill_(-100000000000.0)
hlel[YRbF, PyXk:].data.fill_(-100000000000.0)
retu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sdCG(YKHO) -> GRpb:\n return YKHO._model.head",
"def sdCG(YKHO) -> ZylS.estimator.Head:\n LEgg = YKHO._problem_statement.tasks[0].type\n if LEgg.HasField('one_dimensional_regression'):\n return ZylS.estimator.RegressionHead()\n jTqs = YKHO._tf_transform_output.num_buckets_for_transformed_f... | [
"0.6484909",
"0.6195095",
"0.60027295",
"0.57025117",
"0.5634299",
"0.5621204",
"0.5615446",
"0.55770695",
"0.5478022",
"0.5463404",
"0.5348855",
"0.5325524",
"0.52829325",
"0.5192925",
"0.5184258",
"0.5182757",
"0.51746035",
"0.5145915",
"0.5118654",
"0.5113379",
"0.5071875"... | 0.47473708 | 83 |
Return the first_name plus the last_name, with a space in between. | def xpqj(YKHO):
eHMM = '%s %s' % (YKHO.first_name, YKHO.last_name)
return eHMM.strip() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eHMM(c9ua, zp3f):\n return c9ua + ' ' + zp3f",
"def eHMM(c9ua, zp3f):\n return c9ua + ' ' + zp3f",
"def kaIN(c9ua, zp3f):\n eHMM = c9ua + '' + zp3f\n return eHMM.title()",
"def xpqj(YKHO):\n return YKHO.first_name + ' ' + YKHO.last_name",
"def xpqj(YKHO):\n return YKHO.first_name + ' ... | [
"0.83421856",
"0.82273436",
"0.80990887",
"0.8067676",
"0.80525744",
"0.8043721",
"0.7993416",
"0.7992513",
"0.7992513",
"0.7992513",
"0.7978309",
"0.7963202",
"0.7957057",
"0.79399455",
"0.7936728",
"0.79338795",
"0.79154027",
"0.7901051",
"0.7892942",
"0.787005",
"0.7855431... | 0.77777326 | 58 |
Is the user a member of staff? | def WJxI(YKHO):
return YKHO.is_admin | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def is_staff(OaeV):\n mS46 = OaeV.message.author\n QnPi = ZOrr.utils.get(mS46.guild.roles, name=NQvZ)\n jSVV = ZOrr.utils.get(mS46.guild.roles, name=A5FQ)\n return QnPi in mS46.roles or jSVV in mS46.roles",
"def WJxI(YKHO):\n return YKHO.is_admin",
"def WJxI(YKHO) -> bool:\n return YKHO... | [
"0.80926746",
"0.7837715",
"0.77254343",
"0.7695358",
"0.76053584",
"0.76053584",
"0.75437886",
"0.75398374",
"0.74684024",
"0.7419359",
"0.74095607",
"0.7408753",
"0.74056166",
"0.71173227",
"0.7050053",
"0.7050053",
"0.7017228",
"0.6948149",
"0.687611",
"0.6858756",
"0.6831... | 0.794206 | 3 |
Get the min number of jumps to get thru the array. | def eGi5(G1Hx=[]):
if len(G1Hx) < 2:
return 1
HbtR = len(G1Hx)
for YRbF in reversed(range(G1Hx[0])):
if YRbF > len(G1Hx):
return 1
if G1Hx[YRbF] != 0:
HJRh = eGi5(G1Hx[YRbF + 1:])
HbtR = min(HbtR, HJRh)
return HbtR | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eUB0(qw7D):\n if len(qw7D) < 2:\n return 0\n FiHK = qw7D[0]\n Y9hR = qw7D[0]\n if FiHK >= len(qw7D) - 1:\n return 1\n YPaw = 1\n or8S = 1",
"def FiHK(YKHO, k0lF):\n FfMS = len(k0lF)\n p_mz = [FfMS if YRbF else 0 for YRbF in Ni9Y(len(k0lF))]\n for hksT, zMOd in enumera... | [
"0.7533833",
"0.69635075",
"0.6425989",
"0.6175034",
"0.6122982",
"0.6098591",
"0.5974532",
"0.59527886",
"0.5949562",
"0.5938186",
"0.5921373",
"0.59158945",
"0.58979535",
"0.5887581",
"0.58844537",
"0.58525664",
"0.58522713",
"0.58485454",
"0.58103365",
"0.5806879",
"0.5760... | 0.65343475 | 2 |
Parse a string into a list separated by commas with whitespace stripped | def R6cN(d7pR):
if isinstance(d7pR, list):
return d7pR
elif isinstance(d7pR, exCv):
qIxc = []
for Q7me in d7pR.split(','):
qIxc.append(Q7me.strip())
return qIxc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GBco(n_L_: str, O358: bool=True) -> x1iM[str]:\n CpN7 = n_L_.strip() if O358 else n_L_\n if not CpN7:\n return []\n Aofo = []\n for vVDX in CpN7.split(','):\n BWXx = vVDX\n if O358:\n BWXx = BWXx.strip()\n if not BWXx:\n continue\n Aofo.appen... | [
"0.7855387",
"0.76898867",
"0.76311827",
"0.7567656",
"0.7567617",
"0.74576783",
"0.74000555",
"0.73943484",
"0.73612314",
"0.7328455",
"0.7289234",
"0.7264855",
"0.7228451",
"0.7192716",
"0.71903723",
"0.71417856",
"0.70785284",
"0.7055804",
"0.7055656",
"0.7037711",
"0.7027... | 0.694682 | 26 |
Rounds down a number to the nearest 10 | def q_4u(WKvO):
return int(epAf.floor(WKvO / 10.0)) * 10 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VtiH(FGW3):\n UHFx = len(str(int(FGW3)))\n if FGW3 == 1:\n UHFx = 0\n elif FGW3 % 10 == 0:\n UHFx = UHFx - 1\n return 10 ** UHFx",
"def XZ3K(WKvO):\n return int(lO1m(WKvO / 10.0)) * 10",
"def mATY(WKvO, P8oC):\n return P8oC * epAf.floor(float(WKvO) / P8oC)",
"def q_4u(exwG... | [
"0.7303302",
"0.7223872",
"0.70913875",
"0.7025419",
"0.69031435",
"0.6885205",
"0.6861663",
"0.6761798",
"0.67119575",
"0.66520786",
"0.663425",
"0.66286135",
"0.65602136",
"0.6533005",
"0.65300715",
"0.65176994",
"0.6515406",
"0.6511412",
"0.65047",
"0.6490064",
"0.6481942"... | 0.80097455 | 0 |
Gets the enable_gateway of this GatewayJson. [DEPRECATED] 'enableGateway' is no longer needed to determine if gateway needs to be launched or not. Presence of gateway definition in request is suffucicient. This value is only used in legacy requests, when 'topologyName' or 'exposedServices' is defined in the root of Gat... | def n6sY(YKHO):
return YKHO._enable_gateway | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fUoR(YKHO):\n return YKHO.gateway",
"def P3xJ(YKHO) -> 'outputs.GatewayConfigResponse':\n return qe4Y.get(YKHO, 'gateway_config')",
"def n6sY(YKHO, n6sY):\n YKHO._enable_gateway = n6sY",
"def xGZZ(YKHO) -> h8nf[qe4Y.Input[bool]]:\n return qe4Y.get(YKHO, 'gateway_disabled')",
"def xGZZ(YKHO)... | [
"0.65902597",
"0.65182024",
"0.6453676",
"0.6213959",
"0.6213959",
"0.6187215",
"0.6100538",
"0.59662163",
"0.58852714",
"0.57671726",
"0.57671726",
"0.57396525",
"0.57111204",
"0.5595449",
"0.5595449",
"0.5556147",
"0.5533451",
"0.5506964",
"0.55048907",
"0.5494863",
"0.5483... | 0.81349915 | 0 |
Sets the enable_gateway of this GatewayJson. [DEPRECATED] 'enableGateway' is no longer needed to determine if gateway needs to be launched or not. Presence of gateway definition in request is suffucicient. This value is only used in legacy requests, when 'topologyName' or 'exposedServices' is defined in the root of Gat... | def n6sY(YKHO, n6sY):
YKHO._enable_gateway = n6sY | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n6sY(YKHO):\n return YKHO._enable_gateway",
"def Ddln(YKHO, kdXA):\n YKHO._validator.validate_one('gateway', iyhn['gateway'], kdXA)\n YKHO._ifAttributes['gateway'] = kdXA",
"def Ddln(YKHO):\n YKHO.gatewayip = YKHO.settings.getKeyValue('gatewayip')\n YKHO.socket.send('setenv gatewayip ' + YKH... | [
"0.73123914",
"0.6551886",
"0.6418623",
"0.5841547",
"0.57586265",
"0.57031846",
"0.5613399",
"0.5599404",
"0.55926114",
"0.55864024",
"0.5570483",
"0.5496303",
"0.54810447",
"0.5477156",
"0.54306054",
"0.5427417",
"0.53842473",
"0.5382908",
"0.536696",
"0.53518987",
"0.53518... | 0.83516294 | 0 |
Gets the topology_name of this GatewayJson. [DEPRECATED] Use the 'topologyName' inside the 'topologies' part of the request. If 'topologyName' is specified, other deprecated properties ('exposedServices' and 'enableGateway') will be used as well, and 'topologies' will be ignored. | def LHjG(YKHO):
return YKHO._topology_name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EwEf(YKHO) -> str:\n return YKHO._layer_protocol_name",
"def _w5D(sFC1='all'):\n if sFC1 == 'all':\n C934.protocolObj.stopAllProtocols()\n return\n c00E = {'from': '/', 'nodes': [{'node': 'topology', 'properties': ['name'], 'where': [{'property': 'name', 'regex': sFC1}]}]}\n KXkh = ... | [
"0.6048493",
"0.6005688",
"0.58802223",
"0.5795874",
"0.5704052",
"0.56624806",
"0.55516773",
"0.54985213",
"0.5465749",
"0.5370797",
"0.53402466",
"0.53007513",
"0.527173",
"0.52542615",
"0.52429044",
"0.52349746",
"0.52072144",
"0.5204542",
"0.52032834",
"0.5191515",
"0.519... | 0.753291 | 0 |
Sets the topology_name of this GatewayJson. [DEPRECATED] Use the 'topologyName' inside the 'topologies' part of the request. If 'topologyName' is specified, other deprecated properties ('exposedServices' and 'enableGateway') will be used as well, and 'topologies' will be ignored. | def LHjG(YKHO, LHjG):
YKHO._topology_name = LHjG | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LHjG(YKHO):\n return YKHO._topology_name",
"def _w5D(sFC1='all'):\n if sFC1 == 'all':\n C934.protocolObj.stopAllProtocols()\n return\n c00E = {'from': '/', 'nodes': [{'node': 'topology', 'properties': ['name'], 'where': [{'property': 'name', 'regex': sFC1}]}]}\n KXkh = C934.ixn.quer... | [
"0.6206906",
"0.6195226",
"0.5827934",
"0.56365514",
"0.5487861",
"0.54839885",
"0.5411289",
"0.5265941",
"0.52323633",
"0.5163254",
"0.5066797",
"0.49757662",
"0.49562454",
"0.48964873",
"0.4895961",
"0.4873745",
"0.48552898",
"0.4829231",
"0.48174635",
"0.48174635",
"0.4786... | 0.7716903 | 0 |
Sets the token_cert of this GatewayJson. SSO Provider certificate | def eaEK(YKHO, eaEK):
YKHO._token_cert = eaEK | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eaEK(YKHO):\n return YKHO._token_cert",
"def PwH1(YKHO, eOtH):\n wyyA = {'authentication_token': eOtH}\n U1ai(YKHO._tokenPath, wyyA)",
"def LSCv(YKHO, BWXx):\n YKHO._cert = BWXx",
"def Gpma(YKHO, Gpma):\n YKHO._device_token = Gpma",
"async def _tokenset(YKHO, OaeV: commands.Context, eOtH... | [
"0.66838616",
"0.6263847",
"0.62306666",
"0.6105429",
"0.5924381",
"0.581866",
"0.581866",
"0.5814446",
"0.57270914",
"0.5695224",
"0.56216717",
"0.55282295",
"0.5387907",
"0.53699404",
"0.5335598",
"0.52814615",
"0.5266987",
"0.5257765",
"0.5257765",
"0.52570313",
"0.5171606... | 0.83835876 | 0 |
Gets the gateway_type of this GatewayJson. Knox gateway type | def EoJ0(YKHO):
return YKHO._gateway_type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fUoR(YKHO):\n return YKHO.gateway",
"def kdXA(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'gateway')",
"def yxeC(YKHO) -> str:\n return qe4Y.get(YKHO, 'gateway_name')",
"def DS1x(YKHO) -> str:\n return 'urn:schemas-upnp-org:device:InternetGatewayDevice:1'",
"def EoJ0(YKHO, EoJ0)... | [
"0.70418024",
"0.6706364",
"0.65264463",
"0.64050907",
"0.6376307",
"0.6313232",
"0.6311951",
"0.6297783",
"0.62910956",
"0.62910956",
"0.62734497",
"0.6262733",
"0.6237657",
"0.6224973",
"0.62071085",
"0.62032014",
"0.61929935",
"0.61929935",
"0.61686707",
"0.6162472",
"0.61... | 0.8537298 | 0 |
Sets the gateway_type of this GatewayJson. Knox gateway type | def EoJ0(YKHO, EoJ0):
BbPm = ['CENTRAL', 'INDIVIDUAL']
if EoJ0 not in BbPm:
raise ValueError('Invalid value for `gateway_type` ({0}), must be one of {1}'.format(EoJ0, BbPm))
YKHO._gateway_type = EoJ0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EoJ0(YKHO):\n return YKHO._gateway_type",
"def Ddln(YKHO, kdXA):\n YKHO._validator.validate_one('gateway', iyhn['gateway'], kdXA)\n YKHO._ifAttributes['gateway'] = kdXA",
"def iczE(YKHO, iczE):\n YKHO._gateway_id = iczE",
"def TG_K(YKHO, Qy0e):\n YKHO.type_balle = Qy0e",
"def Ddln(YKHO):... | [
"0.7202106",
"0.71934044",
"0.6324061",
"0.62779903",
"0.61850834",
"0.60042584",
"0.60042584",
"0.5862711",
"0.57108074",
"0.56767",
"0.56477064",
"0.5628769",
"0.56277716",
"0.5603521",
"0.5600941",
"0.559608",
"0.55518806",
"0.55115426",
"0.55115426",
"0.55036163",
"0.5489... | 0.8208303 | 0 |
Gets the sso_type of this GatewayJson. Knox SSO type | def yk9Z(YKHO):
return YKHO._sso_type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FRul(YKHO):\n return YKHO._stype",
"def FRul(YKHO) -> str:\n return YKHO['Sns']['Type']",
"def cCim(YKHO):\n return YKHO.__stype",
"def FRul(YKHO):\n return YKHO._sType",
"def type(YKHO):\n return YKHO.get('type')",
"def type(YKHO):\n return YKHO.properties.get('type')",
"def type... | [
"0.6630452",
"0.6524108",
"0.63855284",
"0.63320684",
"0.6229308",
"0.60349715",
"0.5983019",
"0.5964124",
"0.5919682",
"0.58400786",
"0.5810087",
"0.5808363",
"0.57935923",
"0.57750833",
"0.577089",
"0.577089",
"0.577089",
"0.577089",
"0.577089",
"0.57663316",
"0.57591665",
... | 0.82010865 | 0 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, gD6_):
return False
return YKHO.__dict__ == Elif.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748"
] | 0.0 | -1 |
Yield successive nsized chunks from lst. | def eHxA(yv6U: list, exwG: int):
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, exwG):\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 yv6U[YRbF:... | [
"0.83063734",
"0.81902164",
"0.81902164",
"0.81893295",
"0.8125869",
"0.81209576",
"0.81209576",
"0.80765504",
"0.805255",
"0.805255",
"0.805255",
"0.805255",
"0.805255",
"0.805255",
"0.805255",
"0.805255",
"0.805255",
"0.805255",
"0.805255",
"0.805255",
"0.805255",
"0.8052... | 0.8193033 | 1 |
Calculate normalized entropy for df divided by values of col | def DeUR(jQ3Z: pd.DataFrame, fvDH: str) -> int:
FfMS = 0
for wEf2 in oyIN.unique(jQ3Z[fvDH]):
TXOr = jQ3Z[jQ3Z[fvDH] == wEf2]
FfMS += ebCz(TXOr) * TXOr.shape[0] / jQ3Z.shape[0]
return FfMS | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ebCz(jQ3Z: pd.DataFrame) -> int:\n hkxX, naI9 = oyIN.unique(jQ3Z[jQ3Z.columns[-1]], return_counts=True)\n naI9 = naI9 / naI9.sum()\n oqGu = 0\n for QTg7 in naI9:\n oqGu -= QTg7 * oyIN.log2(QTg7)\n return oqGu",
"def oqGu(YKHO, fvDH=None):\n Ylbp = 0\n if fvDH == None:\n SUk... | [
"0.78840464",
"0.7454076",
"0.735403",
"0.7340924",
"0.7262452",
"0.7237606",
"0.7190942",
"0.71153885",
"0.70694304",
"0.7005223",
"0.67457134",
"0.67329663",
"0.6724891",
"0.67233914",
"0.67178714",
"0.6692816",
"0.66803086",
"0.66776246",
"0.6670356",
"0.66673625",
"0.6659... | 0.7137522 | 7 |
Constructs a string representation for the Syllogism object. Returns str String representation containing the premise, quantifier, figure, and term information. | def zAg0(YKHO):
sWfS = 'Generalized Syllogism:\n'
sWfS += '\ttask: {}\n'.format(YKHO.task)
sWfS += '\tencoded_task: {}\n'.format(YKHO.encoded_task)
sWfS += '\tp1: {}\n'.format(YKHO.p1)
sWfS += '\tp2: {}\n'.format(YKHO.p2)
sWfS += '\tquantifier_p1: {}\n'.format(YKHO.quantifier_p1)
sWfS += '\t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PyCM(YKHO, Qj_h: StrPrinter, *qIxc: Any) -> str:\n return YKHO.__str__()",
"def zAg0(YKHO):\n TQrU = ' variables:\\t[ '\n for SRYB in YKHO.variables:\n TQrU += str(SRYB) + ', '\n TQrU = TQrU[:-2] + ' ]\\n assumptions :\\t[ '\n for EBDa in YKHO.assumptions.cnf:\n TQrU += EB... | [
"0.64853954",
"0.64393795",
"0.6382738",
"0.6356776",
"0.6245419",
"0.6243633",
"0.6222121",
"0.6222121",
"0.62065995",
"0.61915296",
"0.61815387",
"0.61764973",
"0.6171148",
"0.616779",
"0.616753",
"0.61641216",
"0.6157323",
"0.6152924",
"0.613991",
"0.61339176",
"0.6124678"... | 0.769338 | 0 |
(Freebie) Converts a tensor of classes to onehot, useful in XELoss | def kj8B(ezWE, jTqs):
ezWE = ezWE.data.astype(int)
jzdc = oyIN.zeros((ezWE.shape[0], jTqs))
jzdc[oyIN.arange(len(jzdc)), ezWE] = 1
return vhpA.Tensor(jzdc, requires_grad=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cIzq(CTRE, tsWk, f65o, ggQN):\n KLLm = ht2j.FloatTensor(f65o, tsWk, ggQN)\n KLLm.zero_()\n KLLm = KLLm.scatter_(1, tsWk, CTRE, 1)\n return KLLm",
"def KLLm(WKvO, jTqs, yDqo=oLG2.float32):\n return yOcR.nn.one_hot(WKvO, jTqs).astype(yDqo)",
"def LQDo(WKvO, jTqs):\n return oyIN.eye(jTqs, dt... | [
"0.8471393",
"0.846585",
"0.83316827",
"0.81466115",
"0.8116723",
"0.809805",
"0.79266226",
"0.79055566",
"0.7881197",
"0.7842058",
"0.78201616",
"0.77601755",
"0.7723799",
"0.7715799",
"0.7697902",
"0.7680006",
"0.7664918",
"0.76599306",
"0.7659867",
"0.7650168",
"0.7645842"... | 0.83317983 | 3 |
Gets the size of a Conv1d output. | def FDZG(zi3C, Ot1W, _0fC):
return (zi3C - Ot1W) // _0fC + 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def szAg(YKHO):\n pNz6, XQaS = YKHO.conv_dims()\n return pNz6 * XQaS",
"def a6Jb(YKHO) -> int:\n return YKHO.output_dim",
"def Ep8u(YKHO):\n return YKHO._first_rgb.shape[0]",
"def EDoJ(YKHO):\n return YKHO._output_dim",
"def EBwL(YKHO) -> int:\n raise NotImplementedError",
"def oLRV(YKH... | [
"0.733717",
"0.72851783",
"0.6900208",
"0.6826479",
"0.6802014",
"0.670692",
"0.670348",
"0.6688676",
"0.66867673",
"0.6644342",
"0.6598016",
"0.6598016",
"0.6598016",
"0.6587136",
"0.6587136",
"0.6565159",
"0.65495265",
"0.65477896",
"0.6533459",
"0.6522282",
"0.6513689",
... | 0.78305423 | 1 |
Test string version of ValidationError when no name provided. | def LEut(YKHO):
YKHO.assertEquals('Validation error', str(yEHD.ValidationError('Validation error'))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wSZv(mWFP):\n return '' if mWFP else L8Py.REQUIRED_FIELD_NAME_MSG",
"def Gw8C(YKHO):\n try:\n KCyC('_identifier')\n except sUXu:\n YKHO.fail('Field name raised ValidationError unexpectedly')",
"def B_8I(YKHO):\n try:\n KCyC('good_field_name')\n except sUXu:\n YKHO... | [
"0.7852545",
"0.7554146",
"0.7413365",
"0.7374408",
"0.71972394",
"0.7195476",
"0.7113838",
"0.69740844",
"0.6969488",
"0.6844451",
"0.68431634",
"0.6808134",
"0.67888844",
"0.6654927",
"0.6641623",
"0.66348976",
"0.65368605",
"0.65334266",
"0.6525892",
"0.65234107",
"0.65124... | 0.7588466 | 1 |
Test string version of ValidationError when no name provided. | def Gy2O(YKHO):
k3xx = yEHD.ValidationError('Validation error')
k3xx.field_name = 'a_field'
YKHO.assertEquals('Validation error', str(k3xx)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wSZv(mWFP):\n return '' if mWFP else L8Py.REQUIRED_FIELD_NAME_MSG",
"def LEut(YKHO):\n YKHO.assertEquals('Validation error', str(yEHD.ValidationError('Validation error')))",
"def Gw8C(YKHO):\n try:\n KCyC('_identifier')\n except sUXu:\n YKHO.fail('Field name raised ValidationError... | [
"0.7852545",
"0.7588466",
"0.7554146",
"0.7413365",
"0.7374408",
"0.71972394",
"0.7113838",
"0.69740844",
"0.6969488",
"0.6844451",
"0.68431634",
"0.6808134",
"0.67888844",
"0.6654927",
"0.6641623",
"0.66348976",
"0.65368605",
"0.65334266",
"0.6525892",
"0.65234107",
"0.65124... | 0.7195476 | 6 |
Test that names iterates over enum names. | def fX6n(YKHO):
YKHO.assertEquals(set(['BLUE', 'GREEN', 'INDIGO', 'ORANGE', 'RED', 'VIOLET', 'YELLOW']), set(HRmL.names())) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def njrT(YKHO):\n mWFP = 'george'\n kgDL = [('abc', 3), ('def', 5), ('ghi', 7)]\n qQ1Y = E3D9.EnumSpec.create(mWFP, kgDL)\n YKHO.assertEqual(3, qQ1Y.value('abc'))\n YKHO.assertEqual(5, qQ1Y.value('def'))\n YKHO.assertEqual(7, qQ1Y.value('ghi'))",
"def qmuu(YKHO):\n pass",
"def ityv(OaeV, Z... | [
"0.69922745",
"0.698766",
"0.68470335",
"0.6798778",
"0.6685075",
"0.649295",
"0.63822585",
"0.63719535",
"0.6292803",
"0.62737626",
"0.6246769",
"0.62300885",
"0.61811304",
"0.6144995",
"0.6118305",
"0.6058772",
"0.60319513",
"0.60229594",
"0.5974705",
"0.59691167",
"0.59451... | 0.70752907 | 0 |
Test that constructor lookup by name or number. | def ljhX(YKHO):
YKHO.assertEquals(HRmL.RED, HRmL('RED'))
YKHO.assertEquals(HRmL.RED, HRmL(u'RED'))
YKHO.assertEquals(HRmL.RED, HRmL(20))
if jKi7.PY2:
YKHO.assertEquals(HRmL.RED, HRmL(Swre(20)))
YKHO.assertEquals(HRmL.RED, HRmL(HRmL.RED))
YKHO.assertRaises(TypeError, HRmL, 'Not exists')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Kpyl(YKHO, mWFP, YEnM):\n assert getattr(Radr, mWFP) == YEnM",
"def Kpyl(YKHO, mWFP, YEnM):\n assert getattr(Radr, mWFP) == YEnM",
"def uJXE(YKHO):\n nqEK = UqxI(attr_name='element')\n nqEK.register(F83u)\n fi8l = nqEK.get('grass', 'goofus')\n zEnV = nqEK.get('grass', name='gallant')\n ... | [
"0.66405135",
"0.66405135",
"0.6618267",
"0.6500247",
"0.62838584",
"0.6279893",
"0.6246566",
"0.6128897",
"0.5946253",
"0.590966",
"0.58919764",
"0.5734203",
"0.571058",
"0.56694764",
"0.5629002",
"0.5628987",
"0.5621229",
"0.56011915",
"0.56001717",
"0.5587909",
"0.5579258"... | 0.6106837 | 8 |
Test that it is not possible to subclass enum classes. | def Lhte(YKHO):
def blLr():
class MoreColor(HRmL):
pass
YKHO.assertRaises(yEHD.EnumDefinitionError, blLr) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TS1F():\n with trZe.raises(TypeError):\n\n class Subclass(h320):\n tjUW = 'b'",
"def gd5O(YKHO):\n YKHO.assertRaises(yEHD.EnumDefinitionError, yEHD.Enum.def_enum, {'Bad': '1'}, 'BadEnum')",
"def j7VZ(YKHO):\n YKHO.assertRaises(yEHD.FieldDefinitionError, yEHD.EnumField, str, 10)\n... | [
"0.8088814",
"0.7381176",
"0.7281386",
"0.7190367",
"0.70609534",
"0.7038123",
"0.70115834",
"0.6951529",
"0.6796058",
"0.67302275",
"0.6634347",
"0.6608742",
"0.6562331",
"0.6552754",
"0.6508182",
"0.6501598",
"0.64333487",
"0.6384052",
"0.63721174",
"0.6327543",
"0.6311986"... | 0.7841519 | 1 |
Test that enum classes themselves are not mutable. | def lNpN(YKHO):
YKHO.assertRaises(AttributeError, setattr, HRmL, 'something_new', 10) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def njrT(YKHO):\n YRbF = GzPZ(state='LIVING')\n print(YRbF)\n print(YRbF.state)\n print(YRbF.state.code)\n print(YRbF.state.code.text)\n print(type(YRbF.state))\n print(Rk9v.LIVING)\n assert str(YRbF.state) == 'LIVING'\n assert YRbF.state.code == Rk9v.LIVING\n YEnM = qQXR.loads(C86k.d... | [
"0.6887683",
"0.6689893",
"0.6686943",
"0.6573635",
"0.652777",
"0.6431901",
"0.642446",
"0.627235",
"0.62585884",
"0.62579864",
"0.6214114",
"0.62074876",
"0.6195464",
"0.6193258",
"0.6190906",
"0.61887383",
"0.6182773",
"0.6137542",
"0.60859716",
"0.60665727",
"0.6059495",
... | 0.6196592 | 12 |
Test that enum instances are not mutable. | def X2Ao(YKHO):
YKHO.assertRaises(TypeError, setattr, HRmL.RED, 'something_new', 10) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qmuu(YKHO):\n pass",
"def OSOB(YKHO):\n YKHO.assertRaises(TypeError, delattr, HRmL, 'RED')",
"def dXec():\n\n class RedundantStatus(X2DN):\n S3dM = 'draft'\n yKGp = 'draft'\n xBxz = 'published'\n Gbcw = 'archived'\n YG79 = 'draft, unpublished, published, archived... | [
"0.657697",
"0.6526673",
"0.6460343",
"0.64444536",
"0.64360857",
"0.63570243",
"0.6351252",
"0.6328925",
"0.6234092",
"0.61893916",
"0.6144923",
"0.6127281",
"0.6127104",
"0.6109343",
"0.60295874",
"0.5972383",
"0.59673816",
"0.59616953",
"0.59588724",
"0.5912825",
"0.590454... | 0.6341409 | 7 |
Test that zero is accepted by enum def. | def zgUF(YKHO):
class NotImportant(yEHD.Enum):
"""Testing for value zero"""
LegL = 0
YKHO.assertEquals(0, int(Xbea.VALUE)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AbTD(YKHO):\n YKHO.assertRaises(yEHD.EnumDefinitionError, yEHD.Enum.def_enum, {'Bad': -1}, 'BadEnum')",
"def gd5O(YKHO):\n YKHO.assertRaises(yEHD.EnumDefinitionError, yEHD.Enum.def_enum, {'Bad': '1'}, 'BadEnum')",
"def qmuu(YKHO):\n pass",
"def wnMQ(YKHO):\n YKHO.assertRaises(yEHD.EnumDefinit... | [
"0.7602643",
"0.7408601",
"0.6989304",
"0.6851257",
"0.67956066",
"0.6636969",
"0.65762377",
"0.6494661",
"0.6482349",
"0.6433868",
"0.6414908",
"0.64125925",
"0.63825727",
"0.6295969",
"0.6196025",
"0.6191418",
"0.6177731",
"0.61717844",
"0.61537784",
"0.610948",
"0.61057794... | 0.7145924 | 2 |
Test duplicated numbers are forbidden. | def wnMQ(YKHO):
YKHO.assertRaises(yEHD.EnumDefinitionError, yEHD.Enum.def_enum, {'Ok': 1, 'Repeated': 1}, 'BadEnum') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tyVM(exwG):\n for jzdc in e0P5:\n if jzdc >= exwG:\n break\n if exwG - jzdc in Lb1a:\n return True\n return False",
"def b76J(YKHO, xYvp):\n I1rh = set()\n for FGW3 in xYvp:\n if FGW3 in I1rh:\n return True\n I1rh.add(FGW3)\n return ... | [
"0.65833473",
"0.65705496",
"0.6536712",
"0.6530836",
"0.64698064",
"0.64655197",
"0.6447277",
"0.6399993",
"0.63913417",
"0.63548684",
"0.6326235",
"0.63232464",
"0.6302651",
"0.62813985",
"0.6270448",
"0.6258638",
"0.62436175",
"0.619907",
"0.61540246",
"0.61496186",
"0.614... | 0.0 | -1 |
Test that enum values cannot be deleted. | def OSOB(YKHO):
YKHO.assertRaises(TypeError, delattr, HRmL, 'RED') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gd5O(YKHO):\n YKHO.assertRaises(yEHD.EnumDefinitionError, yEHD.Enum.def_enum, {'Bad': '1'}, 'BadEnum')",
"def AbTD(YKHO):\n YKHO.assertRaises(yEHD.EnumDefinitionError, yEHD.Enum.def_enum, {'Bad': -1}, 'BadEnum')",
"def qmuu(YKHO):\n pass",
"def wnMQ(YKHO):\n YKHO.assertRaises(yEHD.EnumDefinit... | [
"0.6908722",
"0.68509686",
"0.6744683",
"0.6659874",
"0.66562176",
"0.6312567",
"0.6271532",
"0.62666756",
"0.62070537",
"0.61610836",
"0.6121907",
"0.61174816",
"0.61117727",
"0.6075593",
"0.606299",
"0.60499424",
"0.60385823",
"0.6023158",
"0.5957477",
"0.5937778",
"0.59223... | 0.76320446 | 0 |
Test comparing various enums to different types. | def h5lg(YKHO):
class Enum1(yEHD.Enum):
rKfr = 1
BQft = 2
class Enum2(yEHD.Enum):
rKfr = 1
YKHO.assertEquals(hoOS.VAL1, hoOS.VAL1)
YKHO.assertNotEquals(hoOS.VAL1, hoOS.VAL2)
YKHO.assertNotEquals(hoOS.VAL1, VSOt.VAL1)
YKHO.assertNotEquals(hoOS.VAL1, 'VAL1')
YKHO.asse... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qvOF(YKHO, uGHt, Fvlg):\n YKHO.assertEqual(uGHt.name, Fvlg.name)\n YKHO.assertEqual(uGHt.description, Fvlg.description)\n YKHO.assertEqual(uGHt.func_descriptor, Fvlg.func_descriptor)",
"def qmuu(YKHO):\n pass",
"def KJB6(YKHO) -> None:\n AGPF = Hy7s.path.join(FJXQ, 'enum_payloads')\n l87X... | [
"0.7618909",
"0.7297068",
"0.71660525",
"0.7050482",
"0.6901546",
"0.6642597",
"0.6582936",
"0.65039986",
"0.6500808",
"0.6477391",
"0.638795",
"0.6263912",
"0.6262335",
"0.62503576",
"0.61707455",
"0.61585224",
"0.6154037",
"0.6147419",
"0.61307144",
"0.6094133",
"0.6074393"... | 0.7182442 | 2 |
Test the default for enum fields. | def QkoO(YKHO):
class Symbol(yEHD.Enum):
p7kO = 1
IJ9r = 2
BR4e = 3
Jyyj = yEHD.EnumField(wZLS, 1, default=wZLS.ALPHA)
YKHO.assertEquals(wZLS.ALPHA, Jyyj.default) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rmNj(YKHO):\n Jyyj = yEHD.EnumField('apitools.base.protorpclite.descriptor.FieldDescriptor.Label', 1, default=200)\n YKHO.assertRaisesWithRegexpMatch(TypeError, 'No such value for 200 in Enum Label', getattr, Jyyj, 'default')",
"def yJ9G(YKHO):\n Jyyj = yEHD.EnumField(jXCX.FieldDescriptor.Label, 1, ... | [
"0.7850738",
"0.767179",
"0.7604393",
"0.75172764",
"0.74597985",
"0.7141603",
"0.69071805",
"0.6875163",
"0.6871458",
"0.6558437",
"0.6467741",
"0.6462426",
"0.6388132",
"0.6356718",
"0.6331292",
"0.6285885",
"0.62647843",
"0.62253904",
"0.62253904",
"0.61446935",
"0.6105986... | 0.8057588 | 0 |
Test enum fields accept valid default values when type is known. | def yJ9G(YKHO):
Jyyj = yEHD.EnumField(jXCX.FieldDescriptor.Label, 1, default='REPEATED')
YKHO.assertEquals(jXCX.FieldDescriptor.Label.REPEATED, Jyyj.default) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K8q9(YKHO):\n YKHO.assertRaisesWithRegexpMatch(TypeError, 'No such value for NOT_A_LABEL in Enum Label', yEHD.EnumField, jXCX.FieldDescriptor.Label, 1, default='NOT_A_LABEL')",
"def rmNj(YKHO):\n Jyyj = yEHD.EnumField('apitools.base.protorpclite.descriptor.FieldDescriptor.Label', 1, default=200)\n Y... | [
"0.786471",
"0.78351843",
"0.7684259",
"0.7630801",
"0.7334507",
"0.724025",
"0.69479555",
"0.69375086",
"0.6876105",
"0.6597608",
"0.6488649",
"0.6474032",
"0.64602745",
"0.6295398",
"0.6283682",
"0.61974555",
"0.6195642",
"0.61881745",
"0.6130701",
"0.61290604",
"0.6096515"... | 0.7740982 | 2 |
Test that enum fields validate default values if type is known. | def K8q9(YKHO):
YKHO.assertRaisesWithRegexpMatch(TypeError, 'No such value for NOT_A_LABEL in Enum Label', yEHD.EnumField, jXCX.FieldDescriptor.Label, 1, default='NOT_A_LABEL') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rmNj(YKHO):\n Jyyj = yEHD.EnumField('apitools.base.protorpclite.descriptor.FieldDescriptor.Label', 1, default=200)\n YKHO.assertRaisesWithRegexpMatch(TypeError, 'No such value for 200 in Enum Label', getattr, Jyyj, 'default')",
"def j7VZ(YKHO):\n YKHO.assertRaises(yEHD.FieldDefinitionError, yEHD.Enu... | [
"0.78986794",
"0.7757604",
"0.7684634",
"0.75887585",
"0.7447553",
"0.7367554",
"0.72267896",
"0.6832946",
"0.6770132",
"0.66414297",
"0.6593828",
"0.6437191",
"0.6280121",
"0.62752575",
"0.6244526",
"0.6226337",
"0.6206059",
"0.61502427",
"0.612854",
"0.6121739",
"0.60703844... | 0.80181134 | 0 |
Tests initializing nested fields from dict. | def sRji(YKHO):
class SimpleMessage(yEHD.Message):
jeGQ = yEHD.IntegerField(1, required=True)
class NestedMessage(yEHD.Message):
c9WI = yEHD.MessageField(A5cj, 1)
class RepeatedMessage(yEHD.Message):
c9WI = yEHD.MessageField(A5cj, 1, repeated=True)
OFai = GOha(simple={'require... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xjTb(YKHO):\n o1Kh = BBZd.from_dict({'x': 1, 'y': {'z': 2, 'w': [1, 2, {'v': 22}]}})\n YKHO.assertEquals(o1Kh.x, 1)\n YKHO.assertEquals(o1Kh['x'], 1)\n YKHO.assertEquals(o1Kh.y.z, 2)\n YKHO.assertEquals(o1Kh['y']['z'], 2)\n YKHO.assertEquals(o1Kh.y.w[2].v, 22)\n YKHO.assertEquals(o1Kh['y']... | [
"0.7155329",
"0.7135814",
"0.7081419",
"0.6749261",
"0.6727118",
"0.6556593",
"0.64841324",
"0.641289",
"0.63878983",
"0.6306532",
"0.62942207",
"0.6276404",
"0.62739915",
"0.6234808",
"0.62086767",
"0.62051576",
"0.620174",
"0.61937636",
"0.6188055",
"0.61597556",
"0.6141780... | 0.7599895 | 0 |
Test attribute assignment on Message classes is not allowed. | def JgmH(YKHO):
def Zeft():
class WithMethods(yEHD.Message):
pCTn = 1
def JfKJ():
class WithMethods(yEHD.Message):
pCTn = 'not allowed'
def laxz():
class WithMethods(yEHD.Message):
pCTn = HRmL.RED
for XeOP in (Zeft, JfKJ, laxz):
Y... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gC44(YKHO):\n\n class MyMessage(yEHD.Message):\n pass\n YKHO.assertRaises(AttributeError, setattr, okUZ, 'x', 'do not assign')",
"def e0ec(YKHO):\n\n class SimpleMessage(yEHD.Message):\n Jyyj = yEHD.IntegerField(1)\n O1fY = A5cj()\n YKHO.assertRaises(AttributeError, setattr, O1fY... | [
"0.8118892",
"0.7606112",
"0.6561863",
"0.6499201",
"0.62957966",
"0.6242465",
"0.61155164",
"0.60972804",
"0.60857403",
"0.60814947",
"0.6072642",
"0.60660076",
"0.6011382",
"0.6005267",
"0.5998869",
"0.5993389",
"0.5971787",
"0.5943228",
"0.5914259",
"0.5909385",
"0.5899644... | 0.70725846 | 2 |
Not permitted to create subclasses of message classes. | def skTu(YKHO):
class SuperClass(yEHD.Message):
pass
def XeOP():
class SubClass(BnMZ):
pass
YKHO.assertRaises(yEHD.MessageDefinitionError, XeOP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gC44(YKHO):\n\n class MyMessage(yEHD.Message):\n pass\n YKHO.assertRaises(AttributeError, setattr, okUZ, 'x', 'do not assign')",
"def yJZI(YKHO):\n\n class Trade(yEHD.Message):\n\n class Lot(yEHD.Message):\n pass\n\n class Agent(yEHD.Message):\n pass\n Y... | [
"0.62968034",
"0.6091969",
"0.6006056",
"0.5942203",
"0.5712671",
"0.56922156",
"0.55952567",
"0.5550872",
"0.5507227",
"0.5468906",
"0.54688823",
"0.54675394",
"0.5416633",
"0.53874284",
"0.53740114",
"0.5371319",
"0.53657067",
"0.53164726",
"0.5283719",
"0.5225013",
"0.5224... | 0.7756037 | 0 |
Test allowing nested enums in a message definition. | def BR_3(YKHO):
class Trade(yEHD.Message):
class Duration(yEHD.Enum):
HbCk = 1
fDD5 = 2
class Currency(yEHD.Enum):
QWwV = 1
YCoi = 2
JuBK = 3
YKHO.assertEquals(['Currency', 'Duration'], N1k1.__enums__)
YKHO.assertEquals(N1k1, N1k... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tYVk(YKHO):\n\n class OuterEnum(yEHD.Enum):\n pass\n YKHO.assertEquals(None, a0O_.message_definition())\n\n class OuterMessage(yEHD.Message):\n\n class InnerEnum(yEHD.Enum):\n pass\n YKHO.assertEquals(LQzS, LQzS.InnerEnum.message_definition())",
"def njrT(YKHO):\n with... | [
"0.7443277",
"0.7113204",
"0.70678514",
"0.690198",
"0.6726821",
"0.669236",
"0.66888726",
"0.668191",
"0.6675376",
"0.66639453",
"0.66409945",
"0.6588712",
"0.6538406",
"0.6531824",
"0.6368488",
"0.63350827",
"0.6306954",
"0.62504727",
"0.61600363",
"0.6150363",
"0.6130172",... | 0.80088055 | 0 |
Test message class equality. | def whu6(YKHO):
class MyEnum(yEHD.Enum):
wNuL = 1
Mlb1 = 2
class AnotherMessage(yEHD.Message):
vIwR = yEHD.StringField(1)
class MyMessage(yEHD.Message):
GvJb = yEHD.IntegerField(1)
ve0q = yEHD.EnumField(AjiK, 2)
YK7X = yEHD.MessageField(E9wU, 3)
T4cS = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Ol8d):\n return YKHO.source == Ol8d.source and YKHO.destination == Ol8d.destination and (YKHO.size_bytes == Ol8d.size_bytes) and (YKHO.message_type == Ol8d.message_type) and (YKHO.data == Ol8d.data)",
"def xa14(YKHO, Elif):\n Aofo = NotImplemented\n if isinstance(Elif, LuKW):\n Aof... | [
"0.7344584",
"0.69156027",
"0.6772732",
"0.67279756",
"0.6687771",
"0.66845286",
"0.6625576",
"0.65741235",
"0.64978456",
"0.64972967",
"0.64322907",
"0.63935477",
"0.6388816",
"0.6368704",
"0.6365063",
"0.6363504",
"0.63597316",
"0.63538635",
"0.6352487",
"0.6343266",
"0.633... | 0.75720865 | 0 |
Test that Enums are found. | def uPT1(YKHO):
class Color(yEHD.Enum):
pass
k0lF = YKHO.DefineMessage('a', 'A', {'Color': HRmL})
YKHO.assertEquals(HRmL, yEHD.find_definition('Color', k0lF, importer=YKHO.Importer)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def njrT(YKHO):\n with JYaA('pyexample'):\n with open('_build/text/docfx_yaml/example.enum_type.EnumFoo.yml') as wV3k:\n nPrm = eJb6.safe_load(wV3k)\n for ZfUD in nPrm['items']:\n if ZfUD['uid'] == 'example.enum_type.EnumFoo':\n YKHO.assertEqual(ZfU... | [
"0.73005867",
"0.72388184",
"0.7150594",
"0.7072543",
"0.70191026",
"0.6923182",
"0.6814975",
"0.6765079",
"0.666039",
"0.66602975",
"0.6659067",
"0.66451603",
"0.66037697",
"0.65739936",
"0.65699494",
"0.6549572",
"0.6526382",
"0.6406287",
"0.6378296",
"0.63611513",
"0.63607... | 0.73138624 | 0 |
Update an existing post. | def r3Zb(YKHO, U34r, **Ltpw):
Fi3q = OMav(Ltpw.pop('id'))[1]
m8z6 = YOIG.objects.get(pk=Fi3q)
if not m8z6:
print('=' * 100)
print('schema.py@41')
print('Erro while updating post')
print('=' * 100)
return riFY(success=False)
for G1Hx, Ty9i in Ltpw.items():
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HrwA(Fi3q):\n m8z6 = T97t.query.get_or_404(Fi3q)\n m8z6.title = QePW.form['edit_post_title']\n m8z6.content = QePW.form['edit_post_content']\n UHUx = [int(mLGw) for mLGw in QePW.form.getlist('tags')]\n m8z6.tags = OhYN.query.filter(OhYN.id.in_(UHUx)).all()\n NCls.session.add(m8z6)\n NCls.s... | [
"0.77233607",
"0.7450944",
"0.7264696",
"0.7071551",
"0.70528066",
"0.6966255",
"0.6850572",
"0.67310226",
"0.6657074",
"0.66340834",
"0.6580428",
"0.6550912",
"0.6476071",
"0.6458061",
"0.64543605",
"0.64482594",
"0.6400658",
"0.63092726",
"0.62942237",
"0.62768227",
"0.6256... | 0.63880545 | 17 |
Unload a config entry. | async def async_unload_entry(RUgX: OpenPeerPower, bTKY: ConfigEntry) -> bool:
yT1k = await RUgX.config_entries.async_unload_platforms(bTKY, aprE)
return yT1k | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def async_unload_entry(ajET, PhL6):\n yT1k = await ajET.config_entries.async_forward_entry_unload(PhL6, 'climate')\n return yT1k",
"async def async_unload_entry(ajET: HomeAssistant, bTKY: ConfigEntry) -> bool:\n ajET.data.pop(Sugg)\n return True",
"async def async_unload_entry(ajET: HomeAssis... | [
"0.69724077",
"0.68874407",
"0.67794776",
"0.6747554",
"0.6690105",
"0.66575706",
"0.6615711",
"0.6602761",
"0.6592408",
"0.6559057",
"0.654105",
"0.6507526",
"0.6507526",
"0.6507526",
"0.6507526",
"0.64986694",
"0.64931244",
"0.6486496",
"0.6486496",
"0.6486496",
"0.6486496"... | 0.58749133 | 75 |
Generate a pandas series of the month as a string in YYYYMM format from the date column. | def d4w_(jQ3Z, WJFk):
return jQ3Z[WJFk].dt.to_period('M').astype(str) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ts0o(_c1T):\n return _c1T.month",
"def VIcm(YKHO, fa8K):\n return fa8K.strftime('%B') + '-' + fa8K.strftime('%Y')",
"def sFG4(_c1T):\n return g6xZ(_c1T).month",
"def YaNU():\n e8y2 = [5, 4, 3, 2, 1, 12, 11, 10, 9, 8]\n try:\n UxjY = e8y2.index(JRYC.now().month)\n except ValueErro... | [
"0.6820479",
"0.6816802",
"0.67744964",
"0.6645461",
"0.65257865",
"0.65239125",
"0.6504214",
"0.6417957",
"0.6161367",
"0.60417557",
"0.5985766",
"0.59812903",
"0.59743094",
"0.5946948",
"0.5943847",
"0.5914783",
"0.58986276",
"0.5883355",
"0.5837632",
"0.5800411",
"0.578265... | 0.7873443 | 0 |
Load the evictions data, filter for the correct years, and add a column that contains the month. | def x17Z(i0XC, WJFk, xqQH, AXZX, F7Em=True):
_vy4 = rLdf.read_csv(i0XC, parse_dates=[WJFk], infer_datetime_format=True).dropna(how='all').drop_duplicates()
_vy4['year'] = _vy4[WJFk].dt.year
YQvl = _vy4[(_vy4.year >= xqQH) & (_vy4.year <= AXZX)]
YQvl['year'] = YQvl['year'].astype(int)
YQvl['month'] =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fAPo(YKHO, lO87, x0eS):\n nPrm = RmyR(YKHO.url, YKHO.table_name, lO87, x0eS)\n if 'INTERVENTION' in nPrm.columns:\n nPrm = nPrm[nPrm['INTERVENTION'] == 0]\n nPrm = nPrm.loc[:, YKHO.table_columns]\n with YKHO.con:\n nPrm.to_sql(YKHO.table_name, con=YKHO.con, if_exists='append', index=F... | [
"0.61134815",
"0.5813346",
"0.56931615",
"0.5646574",
"0.56113833",
"0.55939126",
"0.5563639",
"0.553234",
"0.5529593",
"0.55283165",
"0.5522799",
"0.5511767",
"0.54909074",
"0.54862744",
"0.54622716",
"0.54586345",
"0.5457239",
"0.5455451",
"0.54375064",
"0.54339886",
"0.540... | 0.7239205 | 0 |
Build a dictionary where the keys are the current column names and the values are new column names based on an input dictionary that contains substrings to rename. For example, if the dataframe contains the columns 'evictions2016' and 'evictions2017', and the | def HUMU(jQ3Z, sUdQ):
UF8F = {}
for ob2G in sUdQ:
for Z9rn in jQ3Z.columns:
if ob2G in Z9rn:
UF8F[Z9rn] = Z9rn.replace(ob2G, sUdQ[ob2G])
return UF8F | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BfRN(B_Yw, rqW4):\n for aTqo, F3iL in B_Yw.items():\n rqW4 = rqW4.withColumnRenamed(aTqo, F3iL)\n return rqW4",
"def azPU(G1b0):\n for H5ew in G1b0.keys():\n _C3g = {WKvO: ZbWC.sub('^_', '', WKvO.lower()) for WKvO in G1b0[H5ew].columns}\n G1b0[H5ew].rename(columns=_C3g, inplace=... | [
"0.69809294",
"0.6678324",
"0.65761524",
"0.6243225",
"0.62233025",
"0.5953338",
"0.5882547",
"0.58742905",
"0.58526826",
"0.5795768",
"0.5744195",
"0.57226086",
"0.5706661",
"0.5697401",
"0.5667592",
"0.5647275",
"0.5643964",
"0.56303316",
"0.55835027",
"0.55698323",
"0.5568... | 0.624491 | 3 |
Iterate a dict in order. If k from order not found in d yield rest of d elements. | def jUXm(Csk6, T4Wy, DumB=False, EdbX=True):
aY6a = Csk6.copy()
while aY6a:
for MaOh in T4Wy:
if MaOh in aY6a:
Ty9i = aY6a.pop(MaOh)
yield (MaOh if not DumB else (MaOh, Ty9i))
if not EdbX:
yield (aY6a.popitem()[0] if not DumB else aY6a.popi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rzZ3(Op6c, Cvh_, loS_=True):\n Csk6 = Op6c.copy()\n for H5ew in Cvh_:\n if H5ew in Csk6:\n yield (H5ew, Csk6.pop(H5ew))\n if loS_:\n for H5ew, BWXx in Csk6.iteritems():\n yield (H5ew, BWXx)",
"def UDQK(Csk6: dict, *sjXb: Iterable, gxEw=False) -> dict:\n return ... | [
"0.73893416",
"0.6519104",
"0.6155327",
"0.61162204",
"0.6020384",
"0.59583277",
"0.5868979",
"0.58036005",
"0.5773749",
"0.57537943",
"0.5752917",
"0.57030284",
"0.5700442",
"0.5700442",
"0.5676789",
"0.56406915",
"0.5603756",
"0.55927795",
"0.55480206",
"0.55439466",
"0.551... | 0.71858793 | 1 |
Create subset of the given data by selecting only the indices of the given labels | def otkR(Crrw, nPrm, DUhl):
cntZ = True
mm84 = None
for UXqs in Crrw:
g0N3 = nPrm.filter(lambda Csk6: Csk6.get('label') == UXqs).take(DUhl)
if cntZ:
mm84 = g0N3
cntZ = False
else:
mm84 = mm84.concatenate(g0N3)
oSgh = ZylS.cast(list(Crrw), ZylS.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def y0Kp(YKHO, UXqs, _0VL):\n for UXqs in V3lM.get(UXqs, [UXqs]):\n YKHO._subsets[UXqs] = _0VL",
"def jg6s():\n hnFq = ZylS.constant([[0.2, 0.8], [0.4, 0.6], [0.25, 0.75]])\n DNs0 = ZylS.constant([1, 0, 1])\n LVAh = ZylS.gather_nd(hnFq, ZylS.transpose(ZylS.stack([ZylS.range(DNs0.shape[0]), DNs... | [
"0.63808423",
"0.63712794",
"0.63355976",
"0.633141",
"0.62201077",
"0.6169739",
"0.61553794",
"0.6152089",
"0.613982",
"0.6090856",
"0.6062694",
"0.6053092",
"0.5947956",
"0.5934873",
"0.59190375",
"0.5914073",
"0.59030604",
"0.58853525",
"0.5884873",
"0.588486",
"0.58557004... | 0.6385612 | 0 |
Return the class of this sensor, from DEVICE_CLASSES. | def rM2U(YKHO):
return YKHO._device_class | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rM2U(YKHO):\n return YKHO.sensor_type['class']",
"def rM2U(YKHO):\n return MQ2o.get(YKHO.sensor_data['model'])",
"def rM2U(YKHO):\n return lc9R[YKHO.sensor][3].get('device_class')",
"def rM2U(YKHO):\n if YKHO.sensor_class in MQ2o:\n return YKHO.sensor_class\n return None",
"def rM... | [
"0.906293",
"0.89478695",
"0.8810025",
"0.87471527",
"0.8745711",
"0.8745711",
"0.8733673",
"0.8711787",
"0.85650563",
"0.85650563",
"0.85538274",
"0.8434772",
"0.8431975",
"0.8389737",
"0.8317508",
"0.8282632",
"0.8270846",
"0.81682813",
"0.81074876",
"0.80012065",
"0.791262... | 0.7797398 | 30 |
Return moving average for period n. | def gyoy(WKvO, exwG):
yzQ0 = oyIN.ones((exwG,)) / exwG
return oyIN.convolve(WKvO, yzQ0, mode='valid') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZCKv(jzdc, exwG=3):\n U5bT = oyIN.cumsum(jzdc, dtype=float)\n U5bT[exwG:] = U5bT[exwG:] - U5bT[:-exwG]\n return U5bT[exwG - 1:] / exwG",
"def ZCKv(YKHO, jzdc, exwG=3):\n U5bT = oyIN.nancumsum(jzdc, dtype=float)\n U5bT[exwG:] = U5bT[exwG:] - U5bT[:-exwG]\n return U5bT[exwG - 1:] / exwG",
"... | [
"0.8287956",
"0.8283606",
"0.8266164",
"0.8246738",
"0.80869025",
"0.77691054",
"0.77690303",
"0.76028115",
"0.7515389",
"0.74885786",
"0.7335399",
"0.73217386",
"0.72419006",
"0.7233745",
"0.7210514",
"0.7081684",
"0.7007917",
"0.6938337",
"0.6930907",
"0.6889293",
"0.687886... | 0.0 | -1 |
Sets the head count of the attention. | def iCMd(YKHO, iCMd):
if iCMd < 1:
raise ValueError('The `head_count` must be > 0.')
YKHO._internal.set_head_count(int(iCMd)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bocP(YKHO, exwG):\n YKHO.__head = exwG",
"def sdCG(YKHO, sdCG):\n YKHO._head = sdCG",
"def FIMM(YKHO, UHFx=0):\n YKHO.head = N_PP()\n YKHO.count = UHFx",
"def iCMd(YKHO):\n return YKHO._internal.get_head_count()",
"def _YzM(YKHO, r9Hf):\n YKHO.__mancount = r9Hf",
"def ZF4Q(YKHO, mLG... | [
"0.65809035",
"0.6445961",
"0.617921",
"0.6014255",
"0.59382504",
"0.5737634",
"0.57234514",
"0.571104",
"0.5688065",
"0.56128544",
"0.55491555",
"0.54813504",
"0.547836",
"0.54562634",
"0.54312384",
"0.5401055",
"0.5390539",
"0.5390539",
"0.5390539",
"0.5390539",
"0.53676426... | 0.766384 | 0 |
Gets the hidden size of the attention. | def wjbX(YKHO):
return YKHO._internal.get_hidden_size() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g6fV(YKHO):\n return YKHO.hidden_layer_size",
"def wjbX(YKHO) -> int:\n return YKHO._cell.hidden_size",
"def Norb(YKHO):\n return YKHO.__hidden_dim",
"def BYPK(YKHO) -> int:\n return YKHO.config.model_size",
"def BYPK(YKHO) -> int:\n return YKHO.output_dim",
"def q0CJ(YKHO):\n zNig ... | [
"0.79684895",
"0.7961351",
"0.7703686",
"0.76353836",
"0.76116514",
"0.74885184",
"0.7055191",
"0.70409167",
"0.7007014",
"0.6997245",
"0.69751203",
"0.6902821",
"0.66552347",
"0.64709866",
"0.6442421",
"0.6323084",
"0.6273863",
"0.61940056",
"0.61748314",
"0.6121945",
"0.608... | 0.8266202 | 0 |
Sets the hidden size of the attention. Must be a multiple of the head_count. | def wjbX(YKHO, wjbX):
if wjbX < 1:
raise ValueError('The `hidden_size` must be > 0.')
YKHO._internal.set_hidden_size(int(wjbX)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, wjbX):\n YKHO.hidden_size = wjbX",
"def MP8d(YKHO, Ep8u):\n YKHO.hidden_state = (ht2j.zeros(((1 + YKHO.bidirectional) * YKHO.num_layers, Ep8u, YKHO.hidden_size)).to(YKHO.device), ht2j.zeros(((1 + YKHO.bidirectional) * YKHO.num_layers, Ep8u, YKHO.hidden_size)).to(YKHO.device))",
"def SiRx(Y... | [
"0.6589588",
"0.6148756",
"0.61280423",
"0.61280423",
"0.61184096",
"0.61184096",
"0.61184096",
"0.61184096",
"0.61184096",
"0.61184096",
"0.61184096",
"0.61184096",
"0.60918623",
"0.5944475",
"0.5942377",
"0.5916657",
"0.5914759",
"0.58672327",
"0.5853337",
"0.5853337",
"0.5... | 0.75677925 | 0 |
Gets the dropout rate. | def hr1G(YKHO):
return YKHO._internal.get_dropout() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Dh6q(nPrm, oEL_=None):\n if oEL_ is None:\n oEL_ = cGpL(nPrm)\n kqge = 100\n if len(nPrm) < kqge:\n raise g4yC\n d6pt = aqIr(nPrm)\n assert d6pt[-1] > d6pt[0]\n WbTE = d6pt[-1] - d6pt[0]\n GozC = round(WbTE.total_seconds() / oEL_ + 1)\n lo24 = 1 - d6pt.size / GozC\n if ... | [
"0.6945431",
"0.65463257",
"0.65403146",
"0.6514084",
"0.6437919",
"0.63834643",
"0.63766336",
"0.62054086",
"0.615905",
"0.61472106",
"0.6141882",
"0.6135444",
"0.61030954",
"0.60875463",
"0.6058535",
"0.6058535",
"0.6032272",
"0.60243934",
"0.6021965",
"0.60163975",
"0.6003... | 0.6576083 | 1 |
Sets the hidden size of the attention. Must be a multiple of the head_count. | def hr1G(YKHO, hr1G):
if hr1G >= 1.0:
raise ValueError('The `dropout` must be < 1.')
YKHO._internal.set_dropout(float(hr1G)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wjbX(YKHO, wjbX):\n if wjbX < 1:\n raise ValueError('The `hidden_size` must be > 0.')\n YKHO._internal.set_hidden_size(int(wjbX))",
"def FIMM(YKHO, wjbX):\n YKHO.hidden_size = wjbX",
"def MP8d(YKHO, Ep8u):\n YKHO.hidden_state = (ht2j.zeros(((1 + YKHO.bidirectional) * YKHO.num_layers, Ep8... | [
"0.7566179",
"0.65882117",
"0.6148157",
"0.61292315",
"0.61292315",
"0.61172795",
"0.61172795",
"0.61172795",
"0.61172795",
"0.61172795",
"0.61172795",
"0.61172795",
"0.61172795",
"0.6092045",
"0.59438396",
"0.59433156",
"0.5916527",
"0.5913501",
"0.5868034",
"0.58528376",
"0... | 0.0 | -1 |
Gets the feed forward size. | def xdaC(YKHO):
return YKHO._internal.get_feed_forward_size() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zNig(YKHO) -> int:\n return YKHO._fock.size",
"def zNig(YKHO):\n zNig = 1\n eNvf = YKHO.front\n if YKHO.front == None:\n return 0\n while eNvf.next != None:\n eNvf = eNvf.next\n zNig += 1\n return zNig",
"def zNig(YKHO):\n zNig = 1\n eNvf = YKHO.front\n if YK... | [
"0.6808853",
"0.6768787",
"0.6768787",
"0.6710059",
"0.6706399",
"0.6704614",
"0.66999125",
"0.6667812",
"0.6648937",
"0.6632664",
"0.65750706",
"0.6566084",
"0.65445834",
"0.6543137",
"0.65260184",
"0.6517553",
"0.64991826",
"0.6496363",
"0.64908564",
"0.6486411",
"0.6476608... | 0.9190133 | 0 |
Sets the feed forward size. | def xdaC(YKHO, xdaC):
if xdaC < 1:
raise ValueError('The `feed_forward_size` must be > 0.')
YKHO._internal.set_feed_forward_size(int(xdaC)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xdaC(YKHO):\n return YKHO._internal.get_feed_forward_size()",
"def gyWJ(YKHO, zNig):\n YKHO.__size = zNig",
"def PTn_(YKHO, brh6):\n YKHO.frame_size = brh6",
"def qDK4(YKHO, Ep8u):\n Q1W9 = YKHO.full_dataset_size % Ep8u\n if not YKHO.final_batch:\n YKHO.dataset_size = YKHO.full_data... | [
"0.71544653",
"0.6409734",
"0.6228593",
"0.62118036",
"0.6199784",
"0.6147276",
"0.6143206",
"0.6134795",
"0.6125311",
"0.60741043",
"0.60501254",
"0.5996163",
"0.5996163",
"0.5996163",
"0.5996163",
"0.5980893",
"0.59804636",
"0.5972744",
"0.597004",
"0.59648114",
"0.5964567"... | 0.8610295 | 0 |
Parse dependencies from 'requirements.txt' file. | def O1OY():
with open('requirements.txt') as Gcbu:
Nqlg = Gcbu.read().splitlines()
emMa, wPdp = ([], [])
for zFiD in Nqlg:
if zFiD.startswith('git+'):
wPdp.append(zFiD)
elif zFiD:
emMa.append(zFiD)
return (emMa, wPdp) | {
"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.8206447",
"0.76028156",
"0.75480306",
"0.74831784",
"0.7437083",
"0.73807997",
"0.7366033",
"0.7342791",
"0.7295425",
"0.72740453",
"0.7225313",
"0.7213678",
"0.72097725",
"0.7171425",
"0.7153191",
"0.710717",
"0.70973235",
"0.7024207",
"0.7006107",
"0.6994257",
"0.6955289... | 0.7310824 | 8 |
Find a rectangular perspective to represent a headon view of the image | def TAz_(QUSx, ir4b, D1sU=0.1, KBKF=False):
iLki = None
while iLki is None:
FZpI, f4IJ = QUSx.read()
bo34.info('Frame: %s' % str(f4IJ))
if not FZpI:
bo34.info('No frame read; continuing loop...')
continue
iLki = BXht(f4IJ, ir4b, tolerance=D1sU, img_map=KBK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cTcn(LNo8, y5bX, yzQ0, MKlR):\n o0SS = oyIN.zeros((4, 2), dtype='float32')\n KCHu = oyIN.sum(y5bX, axis=2)\n GPIy = y5bX[oyIN.argmin(KCHu)]\n Rzz_ = y5bX[oyIN.argmax(KCHu)]\n yk4i = oyIN.diff(y5bX, axis=-1)\n yKIT = y5bX[oyIN.argmin(yk4i)]\n mpiO = y5bX[oyIN.argmax(yk4i)]\n if yzQ0 <= 0... | [
"0.7054508",
"0.70284677",
"0.67805535",
"0.66709024",
"0.659098",
"0.65166163",
"0.6490359",
"0.64517283",
"0.64311296",
"0.63075954",
"0.6292712",
"0.6260339",
"0.6258728",
"0.62430644",
"0.620262",
"0.6184208",
"0.61833113",
"0.6148804",
"0.61446136",
"0.6126091",
"0.61115... | 0.6234256 | 14 |
Computes the average absolute residual and the maximum residual of the current problem. | def PmiC(X3eO):
if len(X3eO.constraints) == 0:
return (None, None)
H5AF = 0
C_T9 = 0
l38O = 0
for oVM8 in X3eO.constraints:
Ylbp = oVM8.residual.value
zZKx = 0
if isinstance(Ylbp, oyIN.matrix):
l38O += oyIN.prod(Ylbp.size)
H5AF += Ylbp.sum()
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UKy8(YKHO, NArs):\n nPrm = YKHO.F ** 2\n C3ST = oyIN.absolute(YKHO._model()) ** 2\n WTkW = YKHO.sigma\n return (nPrm[YKHO.mask] - C3ST[YKHO.mask]) / WTkW[YKHO.mask]",
"def E5KX(YKHO):\n VC3Q = YKHO.I - YKHO.E\n return VC3Q",
"def mBEO(YKHO, WKvO):\n MKlR = WKvO\n MKlR = YKHO.c1(MKlR... | [
"0.6610154",
"0.64421856",
"0.6346543",
"0.6078119",
"0.59952325",
"0.5995135",
"0.599471",
"0.59737897",
"0.5953753",
"0.5899667",
"0.5875445",
"0.5873756",
"0.58345604",
"0.58321524",
"0.583054",
"0.57942235",
"0.5776996",
"0.57658285",
"0.576345",
"0.576341",
"0.57485074",... | 0.6731548 | 0 |
Return ``True`` if the object is a PyVista wrapped dataset. | def CocE(YEnM):
return isinstance(YEnM, (qaWJ.DataSet, qaWJ.MultiBlock)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nRjE(YEnM):\n return isinstance(YEnM, (bzbj, orlE, JgeI, BXok, zk04))",
"def nRjE(YKHO):\n return YKHO._dataset is not None",
"def LCHE(YEnM):\n return hasattr(type(YEnM), '__dataclass_fields__')",
"def PwMT(YEnM: Any) -> bool:\n return nf7Q.is_dataclass(YEnM) and (not isinstance(YEnM, type))... | [
"0.73545504",
"0.7327032",
"0.6368359",
"0.6291285",
"0.62759346",
"0.6096682",
"0.60780764",
"0.5947328",
"0.59174824",
"0.5889254",
"0.58726484",
"0.58560395",
"0.58471984",
"0.56990296",
"0.56704766",
"0.56632715",
"0.5662434",
"0.56430274",
"0.5630162",
"0.5613805",
"0.56... | 0.8464892 | 0 |
Check if a point is inside a set of bounds. This is implemented through recursion so that this is Ndimensional. | def IlhC(AU8u, X7zS):
if isinstance(AU8u, (int, float)):
AU8u = [AU8u]
if isinstance(AU8u, (oyIN.ndarray, g760.abc.Sequence)) and (not isinstance(AU8u, g760.deque)):
if len(X7zS) < 2 * len(AU8u) or len(X7zS) % 2 != 0:
raise ValueError('Bounds mismatch point dimensionality')
A... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def peGe(YKHO, AU8u):\n if not YKHO.regions:\n QnmL, FDPT = (AU8u.latitude, AU8u.longitude)\n if FDPT > YKHO.limits[0] and QnmL > YKHO.limits[1] and (FDPT < YKHO.limits[2]) and (QnmL < YKHO.limits[3]):\n return True\n else:\n return False\n else:\n XP5J = Pvy... | [
"0.768995",
"0.75680894",
"0.75473225",
"0.74699265",
"0.74127054",
"0.7320254",
"0.7282582",
"0.7282582",
"0.7221446",
"0.7217512",
"0.71895313",
"0.71818227",
"0.71689713",
"0.7152845",
"0.7121815",
"0.7119088",
"0.71156454",
"0.7104448",
"0.70702684",
"0.7021193",
"0.70211... | 0.8008371 | 0 |
Get the leaderboard; a (paginated) list of all users ordered by ranking | def xyLa(QePW):
KmlL = mv1M.objects.filter(hide_leaderboard=False, is_staff=False)
wnzo = []
for ZfUD in KmlL.values('points').distinct().order_by('-points'):
wnzo.append(ZfUD['points'])
KmlL = KmlL.order_by('-points')
l1ml = []
for CBIr in KmlL:
nPrm = {'user': CBIr, 'rank': wnz... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xyLa(exwG, uJjO):\n Pe9W = l5Ny('\\n WITH global_rank AS (\\n WITH scores AS (\\n SELECT user_id, COUNT(*) AS score FROM task_run\\n WHERE user_id IS NOT NULL GROUP BY user_id)\\n SELECT user_id, score, rank() ... | [
"0.79070354",
"0.77093476",
"0.7407578",
"0.7333305",
"0.7133642",
"0.70422405",
"0.70004654",
"0.69224864",
"0.68573904",
"0.6790573",
"0.6720614",
"0.6710295",
"0.6698099",
"0.66826874",
"0.6633133",
"0.659641",
"0.65196115",
"0.6483807",
"0.64620525",
"0.6413542",
"0.64006... | 0.8249403 | 0 |
Returns starting state of the board. | def W9gz():
return [[KAvf, KAvf, KAvf], [KAvf, KAvf, KAvf], [KAvf, KAvf, KAvf]] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rEkR(YKHO):\n return oyIN.zeros(YKHO.board_size, dtype=oyIN.int8)",
"def rEkR():\n return H66R.Board()",
"def jKlz(YKHO):\n return (YKHO.startingPosition, (False, False, False, False))",
"def D3Ar(YKHO):\n gnPz.raiseNotDefined()",
"def D3Ar(YKHO):\n gnPz.raiseNotDefined()",
"def D3Ar(Y... | [
"0.80820704",
"0.7890804",
"0.75346106",
"0.7278855",
"0.7278855",
"0.7226189",
"0.7226189",
"0.7226189",
"0.7226189",
"0.7226189",
"0.7226189",
"0.7226189",
"0.7226189",
"0.7226189",
"0.7226189",
"0.7226189",
"0.7226189",
"0.7226189",
"0.7226189",
"0.7226189",
"0.7226189",
... | 0.0 | -1 |
Returns player who has the next turn on a board. | def oyg0(iBIi):
oLdq = 0
for rdlD in range(len(iBIi)):
for iVRZ in range(len(iBIi[rdlD])):
if iBIi[rdlD][iVRZ] != KAvf:
oLdq += 1
if oLdq % 2 == 0:
return EcVT
return LTX_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zia_(iBIi, UwI3):\n RUgX = VlLD.opponent(UwI3)\n if VlLD.any_legal_move(RUgX, iBIi):\n return RUgX\n elif VlLD.any_legal_move(UwI3, iBIi):\n return UwI3\n return None",
"def Zia_(YKHO, iBIi, UwI3):\n RUgX = YKHO.opponent(UwI3)\n iiQJ = YKHO.any_legal_move(RUgX, iBIi)\n v5zX... | [
"0.7911148",
"0.7521969",
"0.74204457",
"0.73687756",
"0.71954805",
"0.69775087",
"0.69621766",
"0.69253695",
"0.69208723",
"0.69010353",
"0.6845991",
"0.6841043",
"0.6838282",
"0.68265843",
"0.67751175",
"0.67751175",
"0.6769739",
"0.6713109",
"0.67060393",
"0.66561204",
"0.... | 0.0 | -1 |
Returns the optimal action for the current player on the board. | def SR1K(iBIi):
BZN_ = None
if oyg0(iBIi) == EcVT:
miCz = float('-inf')
for XeOP in xASv(iBIi):
BWXx = WzEy(Aofo(iBIi, XeOP))
if BWXx == 1:
BZN_ = XeOP
miCz = BWXx
elif BWXx >= miCz:
BZN_ = XeOP
m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ePBn(YKHO):\n if YKHO.bestAction is None:\n YKHO.calculate_best_action()\n return YKHO.bestAction",
"def bk5W(YKHO, Ov5A: GameState):\n SkJr = float('-inf')\n XeOP = None\n for BZN_ in Ov5A.getLegalActions(0):\n gnPz = SR1K(YKHO.evaluationFunction, 1, 0, Ov5A.generateSuccessor(0,... | [
"0.7766856",
"0.76323676",
"0.75855315",
"0.75285065",
"0.75175256",
"0.74667144",
"0.7460485",
"0.74263537",
"0.7416421",
"0.73943585",
"0.7375846",
"0.7333894",
"0.73147565",
"0.7306611",
"0.7284639",
"0.72650313",
"0.72650313",
"0.7250975",
"0.72331834",
"0.7203267",
"0.71... | 0.0 | -1 |
Stops the old thread in case it's running, then sets self.run_thread to a new thread and starts it. | def CahD(YKHO):
YKHO.stop_thread()
YKHO.running = True
YKHO.run_thread = T6FA.Thread(target=YKHO.run, daemon=True)
YKHO.run_thread.start() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yvBH(YKHO):\n YKHO.running = False\n if YKHO.run_thread.is_alive():\n YKHO.run_thread.join()",
"def M9xE(YKHO, tvqc):\n if not YKHO.running:\n YKHO.start_thread()\n else:\n YKHO.stop_thread()",
"def yKcO(YKHO) -> None:\n YKHO.stopping.clear()\n YKHO.thread = T6FA.Thre... | [
"0.6862558",
"0.65574116",
"0.6437334",
"0.6378661",
"0.6230949",
"0.61385745",
"0.60549134",
"0.6039228",
"0.60317194",
"0.5894547",
"0.58698094",
"0.5855439",
"0.58414084",
"0.5814953",
"0.5810383",
"0.5767305",
"0.5763817",
"0.57442796",
"0.5736026",
"0.57241386",
"0.57155... | 0.72492087 | 0 |
Stops the current self.run_thread and joins it (if its alive) Also sets self.running to false | def yvBH(YKHO):
YKHO.running = False
if YKHO.run_thread.is_alive():
YKHO.run_thread.join() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JCyR(YKHO):\n YKHO.running = False\n YKHO.join()",
"def JCyR(YKHO):\n YKHO.should_run = False\n if YKHO.is_alive():\n YKHO.join()",
"def JCyR(YKHO) -> None:\n assert YKHO.is_alive(), 'Thread not alive'\n YKHO.stopped.set()",
"def JCyR(YKHO) -> None:\n YKHO._stop_event.set()\n ... | [
"0.82010823",
"0.8177459",
"0.8049424",
"0.7927743",
"0.76515746",
"0.76512253",
"0.7572489",
"0.7568743",
"0.7547752",
"0.749612",
"0.749612",
"0.74943596",
"0.7460452",
"0.7433511",
"0.741764",
"0.74045336",
"0.74045336",
"0.74045336",
"0.74045336",
"0.74045336",
"0.7404533... | 0.89871633 | 0 |
Check if a target object is within a certain distance in front of a reference object. | def rRdv(VYzn, Ubxj, aq_o):
sNE4 = oyIN.array([VYzn.location.x - Ubxj.location.x, VYzn.location.y - Ubxj.location.y])
CLgK = oyIN.linalg.norm(sNE4)
if CLgK < 0.001:
return True
if CLgK > aq_o:
return False
rGNu = Ubxj.get_forward_vector()
ofmy = oyIN.array([rGNu.x, rGNu.y])
B... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rRdv(VYzn, Ubxj, aq_o):\n sNE4 = oyIN.array([VYzn.location.x - Ubxj.location.x, VYzn.location.y - Ubxj.location.y])\n CLgK = oyIN.linalg.norm(sNE4)\n if CLgK < 0.001:\n return True\n if CLgK > aq_o:\n return False\n rGNu = Ubxj.get_forward_vector()\n ofmy = oyIN.array([rGNu.x, r... | [
"0.67105824",
"0.6610936",
"0.6604438",
"0.62496036",
"0.6109051",
"0.6100768",
"0.6066971",
"0.60583895",
"0.60580266",
"0.6042359",
"0.6024932",
"0.60143125",
"0.60143125",
"0.59996426",
"0.5911124",
"0.5896701",
"0.58761185",
"0.5869878",
"0.585845",
"0.58277917",
"0.58230... | 0.67055386 | 1 |
Check if a target object is within a certain distance from a reference object. A vehicle in front would be something around 0 deg, while one behind around 180 deg. | def UgiN(sxXJ, ekLW, C3ap, aq_o, X1JP, ZyMj=0):
sNE4 = oyIN.array([sxXJ.x - ekLW.x, sxXJ.y - ekLW.y])
CLgK = oyIN.linalg.norm(sNE4)
if CLgK < 0.001:
return True
if CLgK > aq_o:
return False
ofmy = oyIN.array([epAf.cos(epAf.radians(C3ap)), epAf.sin(epAf.radians(C3ap))])
Bn_B = epA... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rRdv(VYzn, Ubxj, aq_o):\n sNE4 = oyIN.array([VYzn.location.x - Ubxj.location.x, VYzn.location.y - Ubxj.location.y])\n CLgK = oyIN.linalg.norm(sNE4)\n if CLgK < 0.001:\n return True\n if CLgK > aq_o:\n return False\n rGNu = Ubxj.get_forward_vector()\n ofmy = oyIN.array([rGNu.x, r... | [
"0.68747115",
"0.6852998",
"0.68305814",
"0.66423887",
"0.6258163",
"0.62306774",
"0.6138802",
"0.6053951",
"0.59971404",
"0.59574085",
"0.59158725",
"0.583687",
"0.58301014",
"0.5828046",
"0.58103186",
"0.58055717",
"0.5805144",
"0.57984054",
"0.57963645",
"0.57429403",
"0.5... | 0.7003688 | 1 |
Returns the unit vector from location_1 to location_2 | def iArr(IM3G, _3JW):
WKvO = _3JW.x - IM3G.x
LVAh = _3JW.y - IM3G.y
epBp = _3JW.z - IM3G.z
CkYf = oyIN.linalg.norm([WKvO, LVAh, epBp]) + oyIN.finfo(float).eps
return [WKvO / CkYf, LVAh / CkYf, epBp / CkYf] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def j8U8(YRbF, r845):\n YXbZ = oyIN.sqrt(YRbF ** 2 + r845 ** 2)\n JmOy = YRbF / YXbZ\n B9qe = r845 / YXbZ\n return (JmOy, B9qe)",
"def EMSF(suSV, X3qZ):\n T_gk = PZyS((suSV[0] - X3qZ[0]) ** 2 + (suSV[1] - X3qZ[1]) ** 2)\n return ((X3qZ[0] - suSV[0]) / T_gk, (X3qZ[1] - suSV[1]) / T_gk)",
"def ... | [
"0.669603",
"0.64839983",
"0.6461275",
"0.6202012",
"0.6096269",
"0.6096269",
"0.6075195",
"0.6074927",
"0.59702754",
"0.59530854",
"0.58330834",
"0.5821186",
"0.5800835",
"0.57945806",
"0.57792443",
"0.5778809",
"0.5718374",
"0.56765264",
"0.56091136",
"0.56066215",
"0.56054... | 0.79359806 | 1 |
Return the given number if positive, else 0 | def vsK8(mLGw):
return mLGw if mLGw > 0.0 else 0.0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zihr(mLGw: float):\n return 1 if mLGw >= 0 else -1",
"def wh86(FGW3):\n if FGW3 < 0:\n return FGW3\n else:\n return FGW3 * -1",
"def Zihr(WKvO):\n if WKvO >= 0:\n return 1\n return -1",
"def lKcA(mLGw):\n if mLGw >= 0:\n return mLGw\n else:\n return... | [
"0.76395184",
"0.7575793",
"0.74351966",
"0.741846",
"0.7392237",
"0.72629845",
"0.7190364",
"0.70063263",
"0.70010287",
"0.6966823",
"0.69396806",
"0.6908973",
"0.6895083",
"0.6792521",
"0.6791796",
"0.6758046",
"0.67472285",
"0.66796434",
"0.66732603",
"0.66656125",
"0.6664... | 0.79707485 | 1 |
Test unauthorized API calls to return a 401 status. | def HXKX(YKHO):
O0Fa = {'errors': [{'message': 'No valid client certificate presented', 'status': 401}], 'message': 'No valid client certificate presented'}
h2IT.add(h2IT.GET, f'{Hy7s.environ['AIVEN_API_URL']}/v1/me', json=O0Fa, status=401)
_hkX = G4JS.get(f'{Hy7s.environ['AIVEN_API_URL']}/v1/me')
asser... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rEEa(YKHO):\n bD7m = YKHO.get_url(YKHO.active_user.id)\n geh0 = YKHO.client.get(bD7m)\n haEC = 401\n YKHO.assertEqual(geh0.status_code, haEC)",
"def N4J5(YKHO):\n YKHO._error_test(ODk9.HTTPUnauthorized)",
"def p_Hn():\n return c1Bu(401)",
"def xVg2(YKHO):\n geh0 = YKHO.client.get(MQN... | [
"0.819252",
"0.8151366",
"0.7993992",
"0.7941144",
"0.7932271",
"0.78789127",
"0.78682816",
"0.78585535",
"0.78585535",
"0.78150344",
"0.77118576",
"0.7686576",
"0.76751953",
"0.76529926",
"0.7623709",
"0.762161",
"0.7601887",
"0.7543062",
"0.75382644",
"0.74732697",
"0.74326... | 0.7744796 | 10 |
Create a list of variable declaraitons from a sequence of symbols. | def awzy(GlbD):
vYh2 = sorted(GlbD, key=lambda KCHu: KCHu.name)
return [jQSY.VDecl(aDi_) for aDi_ in vYh2] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kc1W(ZWCE, **B2fa):\n return rmc3(ZWCE, cls=iQnE, seq=True, **B2fa)",
"def UyQ6(ja3b):\n s2mk = ['::']\n for exwG in ja3b:\n s2mk += b0j5.tokenize(exwG) + [',']\n del s2mk[-1]\n Aofo = kn8A(s2mk)\n return Aofo",
"def kc1W(KCHu):\n Aofo = set([])\n\n def ZAda(KCHu):\n i... | [
"0.7055602",
"0.643417",
"0.64259595",
"0.6159599",
"0.6030119",
"0.6029027",
"0.5929945",
"0.5878523",
"0.5877973",
"0.58494115",
"0.5782728",
"0.5743262",
"0.5719109",
"0.55911773",
"0.55839455",
"0.5573902",
"0.5565973",
"0.5558817",
"0.55486465",
"0.55438215",
"0.5507727"... | 0.5885893 | 7 |
Check if queue is empty | def FBfn(YKHO):
return len(YKHO.__queue) > 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FBfn(YKHO):\n return YKHO.queue == []",
"def FBfn(YKHO):\n return len(YKHO.queue) == 0",
"def FBfn(YKHO):\n return len(YKHO.queue) == 0",
"def FBfn(YKHO):\n return len(YKHO.the_queue) == 0",
"def lsmZ(YKHO):\n return YKHO.queue == []",
"def lsmZ(YKHO) -> bool:\n if YKHO.queue is not... | [
"0.89253086",
"0.8843133",
"0.8843133",
"0.8786258",
"0.87190884",
"0.8708457",
"0.8640375",
"0.8627408",
"0.8615782",
"0.8543514",
"0.849978",
"0.8486712",
"0.8471584",
"0.84412205",
"0.84367406",
"0.8436225",
"0.8400864",
"0.8363655",
"0.8363655",
"0.8253498",
"0.82298285",... | 0.88034135 | 3 |
Returns a JSON response, transforming 'context' to make the payload. | def EK31(YKHO, QpfX, **TIVb):
return igJ6(YKHO.convert_context_to_json(QpfX), content_type='application/json', **TIVb) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SGJU(YKHO, QpfX):\n return YKHO.get_json_response(YKHO.convert_context_to_json(QpfX))",
"def SGJU(YKHO, QpfX):\n return YKHO.get_json_response(YKHO.convert_context_to_json(QpfX))",
"def EK31(YKHO, QpfX, **TIVb):\n return jnRN(YKHO.get_data(QpfX))",
"def EK31(YKHO, QpfX, **TIVb):\n return jnRN... | [
"0.7900071",
"0.78258467",
"0.7558514",
"0.75040793",
"0.7409266",
"0.7409266",
"0.7409266",
"0.7409266",
"0.7409266",
"0.73804635",
"0.73667556",
"0.7348796",
"0.73462486",
"0.73103166",
"0.7131352",
"0.6942184",
"0.6894355",
"0.67183167",
"0.66316086",
"0.66316086",
"0.6631... | 0.7675795 | 3 |
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.Purples):
QrM1.imshow(Bcwd, interpolation='nearest', cmap=iMGt)
QrM1.title(leAC)
wIWT = oyIN.arange(len(KndY))
QrM1.xticks(wIWT, KndY, rotation=45)
QrM1.yticks(wIWT, KndY)
if NkkI:
Bcwd = Bcwd.astype('float') / Bcwd.s... | {
"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.8194586",
"0.8095255",
"0.802963",
"0.80189276",
"0.7994091",
"0.79910594",
"0.798075",
"0.79766196",
"0.79603124",
"0.7957427",
"0.7937533",
"0.7934523",
"0.79342",
"0.7931087",
"0.7926079",
"0.7924241",
"0.79235566",
"0.79232305",
"0.7922709",
"0.7921817",
"0.79173964",
... | 0.7884335 | 35 |
This function creates a DCM that preforms a rotation about the zaxis (3 axis). | def mtuw(q7In):
ZpMq = oyIN.array([[oyIN.cos(q7In), oyIN.sin(q7In), 0], [-oyIN.sin(q7In), oyIN.cos(q7In), 0], [0, 0, 1]])
return ZpMq | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JkLf(q7In):\n zNiy = oyIN.zeros((3, 3))\n zNiy[0, 0] = zNiy[1, 1] = oyIN.cos(q7In)\n zNiy[0, 1] = oyIN.sin(q7In)\n zNiy[1, 0] = -zNiy[0, 1]\n zNiy[2, 2] = 1\n return zNiy",
"def MJtD(mghH: float) -> oyIN.matrix:\n from numpy import cos, sin, pi\n SRCs = -mghH * pi / 180\n sisM = co... | [
"0.65059143",
"0.64175415",
"0.6373884",
"0.6362556",
"0.6320967",
"0.62811476",
"0.6274837",
"0.60981184",
"0.6050329",
"0.6046051",
"0.600447",
"0.5984605",
"0.5929926",
"0.5896152",
"0.5891834",
"0.5864436",
"0.585169",
"0.58416396",
"0.5838819",
"0.5838819",
"0.5838819",
... | 0.64006656 | 2 |
Test that a 'block_info' transaction is injected at the end of the block and confirming that all other batches only contains intkey transactions | def TBIy(YKHO):
K48d = dQ6y(YKHO.signer, [('inc', 'abcd', 60)])
sGkH = dQ6y(YKHO.signer, [('inc', 'abcd', 70)])
m2HM = dQ6y(YKHO.signer, [('inc', 'abcd', 80)])
nJ0e = IMCo([K48d, sGkH, m2HM])
Xdtf(nJ0e)
pZbc = xpYM()[0]
zANN = ksvL(pZbc['batches'][0])
YKHO.assertEqual(zANN, 'intkey')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ftuE(YKHO):\n pass",
"def MBNo(YKHO):\n K48d = dQ6y(YKHO.signer, [('inc', 'abcd', 30)])\n sGkH = dQ6y(YKHO.signer, [('inc', 'abcd', 40)])\n m2HM = dQ6y(YKHO.signer, [('inc', 'abcd', 50)])\n nJ0e = IMCo([K48d, sGkH, m2HM])\n Xdtf(nJ0e)\n pZbc = xpYM()[0]\n zANN = ksvL(pZbc['batches'][0... | [
"0.72756666",
"0.69867986",
"0.6981504",
"0.69490194",
"0.69209087",
"0.6768449",
"0.66532993",
"0.64360857",
"0.641834",
"0.63452566",
"0.6337501",
"0.63339204",
"0.63058966",
"0.6212282",
"0.6200093",
"0.6192124",
"0.61651856",
"0.61635095",
"0.6151241",
"0.61487454",
"0.61... | 0.7343181 | 0 |
Set up test data for the whole TestCase (only run once for the TestCase) | def izSt(Emd4):
tOFR.run() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FCbF(YKHO):\n YKHO.test_data_path = 'testing/test_data/'",
"def FCbF(YKHO):\n YKHO.dataset = eis1()",
"def izSt(Emd4):\n BJsk.initialize_empty_volunteer()",
"def FCbF(YKHO):\n YKHO.dataset = YKHO.dataset_cls()",
"def FCbF(YKHO):\n YKHO.data_list = ['hello', 'world', 'funilrys', 'funceble... | [
"0.8151888",
"0.81410164",
"0.80503845",
"0.7757677",
"0.77493596",
"0.7736056",
"0.7572924",
"0.75631404",
"0.75584584",
"0.75548816",
"0.7549482",
"0.750721",
"0.7504551",
"0.747803",
"0.74672127",
"0.74611723",
"0.744",
"0.74319816",
"0.74318194",
"0.7431639",
"0.74084747"... | 0.80497265 | 6 |
Randomly chooses the parent from the population using the fitness function | def Mkew(CHNM, UX9L):
yBBU = []
for YRbF in CHNM:
Evdd = ATav(YRbF, UX9L)
yBBU.append(Evdd)
xRAU = Ob5z(yBBU)
Vw6Y = oyIN.random.choice(len(CHNM), p=xRAU)
Acvy = CHNM[Vw6Y]
return Acvy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b7fK(YKHO, CHNM):\n tuKI.shuffle(CHNM)\n return CHNM",
"def zclx(YKHO, wkbQ, PODZ):\n YsHJ = XTiz.sum(wkbQ)\n if YsHJ == 0:\n YKHO.logger.error('Cannot proceed because the sum of fitness values is zero. Cannot divide by zero.')\n raise ZeroDivisionError('Cannot proceed because the s... | [
"0.73776245",
"0.73322403",
"0.72496444",
"0.6942053",
"0.6917391",
"0.66672504",
"0.6664995",
"0.6656062",
"0.6622094",
"0.661794",
"0.6607694",
"0.6549053",
"0.6543015",
"0.65422386",
"0.6531151",
"0.6485542",
"0.6443142",
"0.6438492",
"0.64118516",
"0.6404566",
"0.6392959"... | 0.62174225 | 31 |
Should return (or generate) querysets for all model instances used by this view. Each instance should have an updated_at field. These querysets are not actually evaluated directly, but union'd together and only their updated_at fields are used without constructing full instances. If None or an empty list is returned, n... | def Lh9j(YKHO):
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k66M(YKHO):\n return kMmW(YKHO.model, using=YKHO._db)",
"def SR0I(YKHO, QePW):\n umWR = YKHO.model.all_objects.get_query_set()\n mJZc = YKHO.ordering or ()\n if mJZc:\n umWR = umWR.order_by(*mJZc)\n return umWR",
"def SR0I(Emd4):\n return Emd4.model._default_manager.all()",
"def ... | [
"0.66364944",
"0.66241235",
"0.65386075",
"0.6535596",
"0.64999497",
"0.64172775",
"0.64170253",
"0.6392134",
"0.636157",
"0.63219714",
"0.63193613",
"0.63077426",
"0.6292829",
"0.6292147",
"0.6286735",
"0.62738156",
"0.6264164",
"0.6264164",
"0.6264164",
"0.6264164",
"0.6264... | 0.0 | -1 |
Initializes normalization or structure functions or planes Initializes the parameters __mean_SF, __std_SF, and __covList. | def m2gX(YKHO, EaZy, f3j1):
fHmP = YKHO.__nc_RSoft_I
hYYE = YKHO.__n_SF_rad + YKHO.__n_SF_ang
bGTm = oyIN.zeros(hYYE)
XY9Y = oyIN.zeros(hYYE)
VswQ = oyIN.zeros((hYYE, hYYE))
pr6S = 0
for kbIL, kN9s in enumerate(YKHO.__types_unique):
pr6S = 0
xwzd = oyIN.where(YKHO.__types == ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uIcm(YKHO):\n yGTL = 0\n WTkW = oyIN.sqrt(2 / YKHO.dataset['d'])\n YKHO.F1 = oyIN.random.normal(yGTL, WTkW, YKHO.F1.shape)\n YKHO.F2 = oyIN.random.normal(yGTL, WTkW, YKHO.F2.shape)\n YKHO.W = oyIN.random.normal(yGTL, WTkW, YKHO.W.shape)\n YKHO.F1_momentum = oyIN.zeros(YKHO.F1.shape)\n YKHO... | [
"0.65832454",
"0.63023007",
"0.62800795",
"0.6202261",
"0.6172763",
"0.6146519",
"0.6143242",
"0.6084042",
"0.60765284",
"0.6054672",
"0.6052164",
"0.6051793",
"0.6033074",
"0.60097814",
"0.59851605",
"0.59336513",
"0.5923808",
"0.59172606",
"0.5891708",
"0.58734405",
"0.5860... | 0.7421072 | 0 |
Saving model using torch.save and log into Weight & Biases | def xkzz(YKHO, YEnM, pmON: str, qtWj: int=None, cCrA: float or dict=None):
NmVZ = Hy7s.path.normpath(Hy7s.path.join(pmON, Hy7s.path.pardir))
if not Hy7s.path.exists(NmVZ):
Hy7s.makedirs(NmVZ)
if qtWj is not None:
YEnM['epoch'] = qtWj
if cCrA is not None:
if isinstance(cCrA, float... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lac1(YKHO, mWFP):\n ht2j.save(dict(params=YKHO.model.encoder.state_dict()), BKva.join(YKHO.args.save_path, mWFP + '.pth'))",
"def lac1(YKHO):\n UWda = Hy7s.path.join(YKHO.log_path, 'models', 'weights_{}'.format(YKHO.epoch))\n if not Hy7s.path.exists(UWda):\n Hy7s.makedirs(UWda)\n for ZGE9 ... | [
"0.7809711",
"0.7795389",
"0.77638984",
"0.7655282",
"0.7605489",
"0.7602631",
"0.7539826",
"0.7528425",
"0.7454979",
"0.74478394",
"0.74478394",
"0.74478394",
"0.74478394",
"0.74478394",
"0.7403449",
"0.7383622",
"0.7383622",
"0.73601675",
"0.73477906",
"0.73159313",
"0.7261... | 0.0 | -1 |
Compute softmax values for each sets of scores in x. | def N93T(YKHO, WKvO):
uw5A = oyIN.exp(WKvO)
return uw5A / uw5A.sum(axis=1, keepdims=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N93T(YKHO, cCrA):\n MvhI = oyIN.sum(oyIN.exp(cCrA), axis=1, keepdims=True)\n N93T = oyIN.exp(cCrA) / MvhI\n return N93T",
"def N93T(WKvO):\n j1LR = oyIN.exp(oyIN.asarray(WKvO))\n return j1LR / j1LR.sum(0)",
"def N93T(cCrA):\n XeFQ = oyIN.exp(cCrA)\n return XeFQ / oyIN.sum(XeFQ)",
"de... | [
"0.7796294",
"0.7760558",
"0.7759004",
"0.77567077",
"0.76577055",
"0.76577055",
"0.76577055",
"0.76577055",
"0.7585655",
"0.743143",
"0.7407772",
"0.73941606",
"0.7358175",
"0.73174125",
"0.72689486",
"0.72623265",
"0.72614294",
"0.7256868",
"0.723019",
"0.7214918",
"0.72017... | 0.0 | -1 |
Returns the contents of ``tensor`` at the multidimensional integer array ``indexes``. Leading dimensions of ``tensor`` must match the dimensions of ``indexes``. | def pPmm(bS0K, vhpA):
tpio = len(bS0K.shape)
assert bS0K.shape == vhpA.shape[:tpio]
mLGw = bS0K.numel()
kwqo = vhpA.view((mLGw,) + vhpA.shape[tpio:])
Rwkh = kwqo[ht2j.arange(mLGw), bS0K.view(-1)]
return Rwkh.view(vhpA.shape[:tpio] + vhpA.shape[tpio + 1:]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kS1Y(asm6, jmlw):\n WKvO, LVAh, epBp = asm6.size()\n a1PO = asm6.reshape(WKvO * LVAh, epBp)\n rxEN = jmlw.reshape(WKvO * LVAh)\n Ty9i = a1PO[ht2j.arange(WKvO * LVAh), rxEN]\n Ty9i = Ty9i.reshape(WKvO, LVAh)\n return Ty9i",
"def z2L_(bS0K: list, nPrm: np.ndarray) -> oyIN.ndarray:\n return... | [
"0.64149225",
"0.6126187",
"0.6071101",
"0.6060197",
"0.588927",
"0.5819812",
"0.5786708",
"0.57190686",
"0.57071954",
"0.57068115",
"0.55868393",
"0.55305433",
"0.54998374",
"0.54585403",
"0.54585403",
"0.54585403",
"0.54482704",
"0.54353964",
"0.54137176",
"0.53959394",
"0.... | 0.7669653 | 0 |
Converts integer values in multidimensional tensor ``indexes`` to onehot values of size ``num``; expanded in an additional trailing dimension. | def LQDo(bS0K, mLGw, yDqo=None):
if yDqo is None:
yDqo = bS0K.dtype
aFAW = ht2j.zeros(bS0K.shape + (mLGw,), dtype=yDqo, device=bS0K.device)
aFAW.scatter_(-1, bS0K.unsqueeze(-1).type(ht2j.long), 1)
return aFAW | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def w1WJ(bS0K, Lm6x=None):\n bS0K = bS0K.type(ht2j.int64).view(-1, 1)\n Lm6x = Lm6x if Lm6x is not None else int(ht2j.max(bS0K)) + 1\n cHmM = ht2j.zeros(bS0K.size()[0], Lm6x).scatter_(1, bS0K, 1)\n cHmM = cHmM.view(*bS0K.shape - 1)\n return cHmM.type(ht2j.LongTensor)",
"def aFAW(bS0K, ywwl=None, N... | [
"0.7503348",
"0.6753746",
"0.6663001",
"0.6660671",
"0.6437275",
"0.6323957",
"0.62498003",
"0.620212",
"0.60491776",
"0.60330254",
"0.60330254",
"0.60330254",
"0.60330254",
"0.60288876",
"0.59250796",
"0.59086674",
"0.58900535",
"0.5878305",
"0.5868206",
"0.5860303",
"0.5844... | 0.7845459 | 0 |
Argmax over trailing dimension of tensor ``onehot``. Optional return dtype specification. | def n3Mf(aFAW, tpio=-1, yDqo=None):
bS0K = ht2j.argmax(aFAW, dim=tpio)
if yDqo is not None:
bS0K = bS0K.type(yDqo)
return bS0K | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xAV3(KeL5):\n return Kt_s.extra_ops.to_one_hot(Kt_s.argmax(KeL5, -1), KeL5.shape[-1])",
"def q1NN(vhpA):\n raise NotImplementedError",
"def E3DW(ezWE: np.ndarray) -> oyIN.ndarray:\n return QfEj(oyIN.argmin(ezWE, axis=1))",
"def l1q5(KLLm):\n if type(KLLm) is not oyIN.ndarray or len(KLLm.shape... | [
"0.7159098",
"0.6866533",
"0.65986437",
"0.65517324",
"0.64722866",
"0.6426143",
"0.6316279",
"0.63162196",
"0.6247499",
"0.6243214",
"0.6121572",
"0.6085835",
"0.60520595",
"0.5940435",
"0.5937668",
"0.59348476",
"0.59251",
"0.5905805",
"0.59022623",
"0.5891443",
"0.58218545... | 0.69066066 | 1 |
Mean of ``tensor``, accounting for optional mask ``valid``, optionally along a dimension. | def V5sM(vhpA, deVW=None, tpio=None):
tpio = () if tpio is None else tpio
if deVW is None:
return vhpA.mean(dim=tpio)
deVW = deVW.type(vhpA.dtype)
return (vhpA * deVW).sum(dim=tpio) / deVW.sum(dim=tpio) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JBMS(vhpA, jDK_=None):\n raise NotImplementedError",
"def HFbV(vhpA):\n return vhpA.mean(dim=list(range(1, len(vhpA.shape))))",
"def HFbV(vhpA):\n return vhpA.mean(axis=list(range(1, len(vhpA.shape))))",
"def cZKd(WKvO: Tensor) -> llWB:\n return ht2j.mean(WKvO, dim=0)",
"def IotL(vhpA):\n ... | [
"0.7679913",
"0.6994597",
"0.6904162",
"0.682697",
"0.66383904",
"0.66383904",
"0.66006225",
"0.6579483",
"0.654301",
"0.6321002",
"0.62278557",
"0.60989386",
"0.6081952",
"0.60429454",
"0.6030726",
"0.60115385",
"0.5966949",
"0.59658927",
"0.5963768",
"0.5937968",
"0.5853985... | 0.8405047 | 0 |