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 |
|---|---|---|---|---|---|---|
Given features and labels as 2D NumPy arrays, returns them as lists of NumPy arrays. | def Kuq1(EcVT, LVAh):
assert EcVT.shape[0] == LVAh.shape[0], 'X and y must have the same number of rows'
A6_I = EcVT.shape[0]
iSnc = [EcVT[YRbF, :] for YRbF in range(A6_I)]
QgiL = [LVAh[YRbF, :] for YRbF in range(A6_I)]
return (iSnc, QgiL) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aqaH(iSnc, QgiL, gfLg=XTiz.float64, v7yA=int):\n EcVT = XTiz.array(iSnc, dtype=gfLg)\n LVAh = XTiz.array(QgiL, dtype=v7yA)\n return (EcVT, LVAh)",
"def fIsm(Crrw):\n EaWK = oyIN.zeros((10, len(Crrw)))\n for nWi7, UXqs in enumerate(Crrw):\n EaWK[UXqs][nWi7] = 1\n return EaWK",
"def ... | [
"0.7779068",
"0.7316397",
"0.7278336",
"0.7243764",
"0.69902647",
"0.6857465",
"0.6790376",
"0.6760118",
"0.6734884",
"0.6636582",
"0.6631957",
"0.6623568",
"0.65866226",
"0.6539092",
"0.6501728",
"0.6488922",
"0.6488922",
"0.6468816",
"0.6440277",
"0.64265496",
"0.6425755",
... | 0.75202894 | 1 |
Saves an indexing profile to a file, in JSON. | def xkzz(YKHO, Ux0P):
with open(Ux0P, 'w') as eHNT:
qQXR.dump(YKHO.json(), eHNT, indent=4) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UcId(z39Z: dict) -> int:\n pass",
"def euOS(YKHO, z39Z: Profile, VqRE: str):\n nPrm = None\n with open(VqRE, 'r') as eHNT:\n nPrm = dict(qQXR.loads(eHNT.read()))\n QhXp = list(nPrm.get('profiles', []))\n QhXp.append(z39Z.serialize())\n nPrm['profiles'] = QhXp\n with open(VqRE, 'w'... | [
"0.6652659",
"0.66048425",
"0.6569648",
"0.6434453",
"0.6408739",
"0.6357633",
"0.6355633",
"0.6302225",
"0.6273657",
"0.62519616",
"0.62189054",
"0.61941737",
"0.61876315",
"0.6175579",
"0.6171331",
"0.61684114",
"0.61613435",
"0.61484206",
"0.6133151",
"0.6132276",
"0.61310... | 0.60478544 | 33 |
Returns current position in uncompressed file. | def WeOw(YKHO):
return YKHO._uncompressed_position | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uKWF(YKHO):\n YKHO.position_index = YKHO.file_obj.tell()\n return YKHO.position_index",
"def Iuzb(YKHO):\n YKHO.pos = YKHO.f.tell()\n return YKHO.pos",
"def vlwY(WpAY: int) -> int:\n pass",
"def AGb1(YKHO):\n return YKHO.eFile.tell()",
"def Iuzb(YKHO):\n return YKHO.read('position'... | [
"0.7885693",
"0.7352317",
"0.6850571",
"0.6823626",
"0.6688641",
"0.66290903",
"0.65389",
"0.64883035",
"0.64107126",
"0.6399796",
"0.6397841",
"0.6369954",
"0.6364001",
"0.63622046",
"0.63604766",
"0.633769",
"0.6318373",
"0.6296171",
"0.6291967",
"0.62790275",
"0.6276442",
... | 0.7810708 | 1 |
Check if the provided path exists on the FileSystem. | def vtfo(YKHO, pmON):
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vqzx(pmON):\n return MZ_0.exists(pmON)",
"def vtfo(YKHO, pmON: str) -> bool:\n return YKHO.fs.exists(pmON)",
"def W32_(YKHO, pmON):\n try:\n M5_I = YKHO.fs.exists\n except AttributeError:\n try:\n return len(YKHO.fs.glob(pmON)) > 0\n except FileNotFoundError:\n ... | [
"0.85866195",
"0.83123845",
"0.83024067",
"0.8197281",
"0.81576115",
"0.8150777",
"0.8088915",
"0.8084519",
"0.80807674",
"0.80610937",
"0.8056092",
"0.80254364",
"0.7993232",
"0.79753184",
"0.79704875",
"0.7958074",
"0.7958074",
"0.7958074",
"0.7954711",
"0.7945305",
"0.7939... | 0.8131333 | 6 |
Cal the mean and std of df. When columns is None, all columns in df will be calculated, Otherwise, only column in will be calcuated. | def LwGf(jQ3Z, ZLJ_=None, UYS9=None, d6Uq=False):
if ZLJ_ is None:
ZLJ_ = jQ3Z.columns.values
if UYS9 is not None and UYS9 not in jQ3Z.columns.values:
raise Exception('%s not exists in df.columns' % UYS9)
if d6Uq:
IPme = [oyIN.mean]
else:
IPme = [oyIN.mean, DVqh]
if U... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hWT_(jQ3Z, WfCS):\n G_PE = jQ3Z.copy()\n for fvDH in WfCS:\n G_PE[fvDH] = (G_PE[fvDH] - oyIN.mean(G_PE[fvDH])) / oyIN.std(G_PE[fvDH])\n return G_PE",
"def qCBq(QxHi: pd.DataFrame):\n lGBy = rLdf.DataFrame()\n SOdV = QxHi.mean().to_frame().T\n SOdV.columns = [str(fvDH) + '_mean' for f... | [
"0.68769383",
"0.6813386",
"0.6800477",
"0.6764995",
"0.6739292",
"0.6653764",
"0.66384864",
"0.66065514",
"0.6581489",
"0.648065",
"0.6478333",
"0.6449027",
"0.64442885",
"0.6437688",
"0.63688487",
"0.63165194",
"0.6309516",
"0.6289953",
"0.6262773",
"0.6256995",
"0.61979264... | 0.6569127 | 9 |
apply mean and std calculated by function cal_mean_std to df. | def HIj1(jQ3Z, wRro, NIaF, ZLJ_=None, UYS9=None):
if UYS9 is not None and UYS9 not in jQ3Z.columns.values:
raise Exception('%s not exists in df.columns' % UYS9)
if jQ3Z is None or wRro is None or NIaF is None:
raise Exception('df or mean_var or global_mean_var is None')
if ZLJ_ is None:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hWT_(jQ3Z):\n return (jQ3Z - jQ3Z.mean()) / jQ3Z.std()",
"def qCBq(QxHi: pd.DataFrame):\n lGBy = rLdf.DataFrame()\n SOdV = QxHi.mean().to_frame().T\n SOdV.columns = [str(fvDH) + '_mean' for fvDH in SOdV.columns]\n MkY3 = QxHi.std().to_frame().T\n MkY3.columns = [str(fvDH) + '_std' for fvDH ... | [
"0.7454497",
"0.7429439",
"0.7251699",
"0.72258896",
"0.7198162",
"0.7169099",
"0.7109522",
"0.70524406",
"0.7009398",
"0.70065063",
"0.6990133",
"0.68690884",
"0.6844441",
"0.6842178",
"0.6824386",
"0.67933327",
"0.6772755",
"0.6718644",
"0.6718644",
"0.6700856",
"0.66311926... | 0.0 | -1 |
The reverse process of apply_mean_std | def AiuB(jQ3Z, wRro, NIaF, ZLJ_=None, T_jV=None, UYS9=None):
if UYS9 is not None and UYS9 not in jQ3Z.columns.values:
raise Exception('%s not exists in df.columns' % UYS9)
if jQ3Z is None or wRro is None or NIaF is None:
raise Exception('df or mean_var or global_mean_var is None')
if ZLJ_ is... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vb6t(input):\n return (input.mean(keepdims=True), input.std(keepdims=True))",
"def sdUi(nPrm):\n JBMS, M1Jx = (oyIN.mean(nPrm), oyIN.std(nPrm))\n return (JBMS, M1Jx)",
"def ITm9(YKHO):\n for JBMS, M1Jx in [(1.5, 0.1), ((1.0, 1.1, 1.2, 1.3), (0.0, 0.1, 0.2, 0.3))]:\n for qw7D in [YKHO.arr... | [
"0.78955746",
"0.76653993",
"0.75228554",
"0.7332504",
"0.73143256",
"0.72938585",
"0.7273784",
"0.7252682",
"0.7242639",
"0.724114",
"0.7217815",
"0.7215439",
"0.7197323",
"0.7196655",
"0.7148459",
"0.7142904",
"0.71340984",
"0.7122718",
"0.7114826",
"0.71056396",
"0.7104640... | 0.0 | -1 |
Returns True if len(self)==0,or False otherwise | def A4KR(YKHO):
return len(YKHO) == 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lsmZ(YKHO):\n return len(YKHO) < 1",
"def FBfn(YKHO):\n return len(YKHO) == 0",
"def lsmZ(YKHO):\n if len(YKHO) == 0:\n return True\n else:\n return False",
"def lsmZ(YKHO):\n return len(YKHO) == 0",
"def FBfn(YKHO):\n return len(YKHO) == 0",
"def FBfn(YKHO):\n retu... | [
"0.88559103",
"0.88162565",
"0.8803864",
"0.8793682",
"0.8752642",
"0.86676717",
"0.8648623",
"0.8626708",
"0.86263406",
"0.86263406",
"0.86263406",
"0.86263406",
"0.86263406",
"0.86263406",
"0.86263406",
"0.86263406",
"0.86263406",
"0.86263406",
"0.86263406",
"0.86263406",
"... | 0.8610423 | 23 |
Returns the number of items in self | def szAg(YKHO):
return YKHO._size | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ogsx(YKHO):\n return len(YKHO.items)",
"def Jm1s(YKHO):\n return len(YKHO.items)",
"def Jm1s(YKHO):\n return YKHO.items.count()",
"def OGwl(YKHO):\n return YKHO.num_items",
"def UHFx(YKHO):\n return len(YKHO.itemList)",
"def fcYF(YKHO):\n UHFx = 0\n for bGrB in YKHO:\n UHF... | [
"0.90701765",
"0.9062355",
"0.8975342",
"0.8878685",
"0.886062",
"0.87192845",
"0.8711607",
"0.86486953",
"0.86255664",
"0.8608846",
"0.8608846",
"0.8548507",
"0.8548507",
"0.8547975",
"0.8536529",
"0.852927",
"0.852927",
"0.852927",
"0.8509129",
"0.8509129",
"0.8509129",
"... | 0.0 | -1 |
returns one row of zeros of width "width"... You should use this in your createBoard(width, height) function | def wPqH(TVTK):
rdlD = []
for fvDH in range(TVTK):
rdlD += [0]
return rdlD | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GUba(TVTK, H2v2):\n iBIi = []\n for begg in range(H2v2):\n rdlD = ['*'] * TVTK\n iBIi.append(rdlD)\n return iBIi",
"def fbIl(TVTK, H2v2):\n k0lF = []\n for rdlD in range(H2v2):\n k0lF += [wPqH(TVTK)]\n return k0lF",
"def efGj(TVTK, H2v2):\n iBIi = []\n for rdlD ... | [
"0.7725519",
"0.7597096",
"0.7580404",
"0.75751424",
"0.75684077",
"0.7476886",
"0.74761987",
"0.7466229",
"0.74236137",
"0.73799473",
"0.72912234",
"0.7283296",
"0.71707803",
"0.709299",
"0.70532364",
"0.70477283",
"0.7033891",
"0.70327675",
"0.699175",
"0.6979679",
"0.69729... | 0.72422534 | 13 |
returns a 2d array with "height" rows and "width" cols | def fbIl(TVTK, H2v2):
k0lF = []
for rdlD in range(H2v2):
k0lF.append(wPqH(TVTK))
return k0lF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HVJK(BWXx, H2v2, TVTK):\n ezWE = []\n for YRbF in range(0, H2v2):\n ezWE.append([None] * TVTK)\n return ezWE",
"def Lm0U(TVTK, H2v2):\n return [[0 for WKvO in range(TVTK)] for LVAh in range(H2v2)]",
"def NMoC(YKHO):\n return oyIN.array((YKHO.width, YKHO.height))",
"def kt1c(TVTK, H2... | [
"0.7858013",
"0.7168413",
"0.70767313",
"0.6826709",
"0.68017304",
"0.67254657",
"0.65653193",
"0.65625966",
"0.6559744",
"0.65530974",
"0.6485248",
"0.6467519",
"0.64635634",
"0.6455709",
"0.64085263",
"0.63957024",
"0.63948554",
"0.6275707",
"0.62348884",
"0.6214996",
"0.61... | 0.6109627 | 33 |
Extract text list from JSON data. | def wOl2(zgjV):
return zgjV['source_texts'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zy1w(l5Ny: str):\n hHld = yahA.finditer(l5Ny)\n for kUBT in hHld:\n yield kUBT.group(1)",
"def mIFe(gIsw, C3ST=_L1O):\n gnli = []\n with open(gIsw, 'r') as eHNT:\n TLbt = qQXR.load(eHNT)\n WUvH = TLbt['body_text']\n for l5Ny in WUvH:\n C13M = C3ST(l5Ny['text'])\n ... | [
"0.6857734",
"0.67457",
"0.6695724",
"0.66717535",
"0.6664366",
"0.65947896",
"0.6442441",
"0.6421048",
"0.6400455",
"0.62845045",
"0.62783325",
"0.6267311",
"0.6256782",
"0.62447995",
"0.62424225",
"0.6240781",
"0.62397695",
"0.623472",
"0.6223344",
"0.6221573",
"0.6221573",... | 0.7560528 | 0 |
Convert input text list to vocabulary id (token) list. | def jqBP(z_aV):
s2mk = []
for l5Ny in z_aV:
eOtH = [Byma.BOS] + [nPrm['dict']['src'].get(YRbF, Byma.UNK) for YRbF in l5Ny] + [Byma.EOS]
s2mk.append(eOtH)
return s2mk | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wClh(CtWL, s2mk):\n A07C = []\n for eOtH in s2mk:\n A07C.append(CtWL[eOtH])\n return A07C",
"def bW0F(NkeG, A07C):\n hlel = []\n for ZfUD in A07C:\n hlel.append(NkeG[ZfUD])\n return hlel",
"def I44O(yAmx, ED_H, b0j5=None):\n if b0j5:\n V22M = b0j5(yAmx)\n else:\... | [
"0.7306965",
"0.71916896",
"0.71061563",
"0.7095821",
"0.703924",
"0.6996992",
"0.6996992",
"0.6993076",
"0.6977553",
"0.6930043",
"0.690325",
"0.6879347",
"0.68788064",
"0.68788064",
"0.68765426",
"0.68558186",
"0.6855639",
"0.6801424",
"0.6696682",
"0.66709566",
"0.6661137"... | 0.0 | -1 |
Compute log Gaussian prob given mean and covariance | def K3Mw(YKHO, EcVT, JBMS, _IBo):
yk4i = EcVT - JBMS
rhd_ = oyIN.linalg.inv(_IBo)
nUPH = oyIN.linalg.det(_IBo)
return -0.5 * (YKHO.n_components * oyIN.log(2 * oyIN.pi) + oyIN.log(nUPH) + oyIN.sum(oyIN.dot(yk4i, rhd_) * yk4i, axis=1)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zmOD(JBMS, PFC2, WKvO, wZTJ='full'):\n ywwl = PFC2.shape[0]\n if wZTJ == 'diagonal':\n khB7 = PFC2.diagonal()\n Fe4P = oyIN.diag(1.0 / khB7)\n eTAT = oyIN.sum(oyIN.log(khB7))\n else:\n eTAT = oyIN.log(oyIN.linalg.det(PFC2))\n Fe4P = oyIN.linalg.inv(PFC2)\n yk4i = ... | [
"0.79394233",
"0.7812882",
"0.7690846",
"0.76699895",
"0.7585477",
"0.75625044",
"0.75444376",
"0.74319136",
"0.73180014",
"0.7264286",
"0.72556627",
"0.7215485",
"0.71972704",
"0.71794945",
"0.717183",
"0.717183",
"0.716588",
"0.71553236",
"0.7142531",
"0.71413124",
"0.71374... | 0.8345219 | 0 |
Test case for ask_for_password_reset_via_form | def rCri(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AQXB(YKHO):\n pass",
"def OvfQ(YKHO):\n pass",
"def OAOs(YKHO):\n pass",
"def rHdc(YKHO):\n pass",
"def naSB(YKHO):\n L03z = VVDG(password='new', password2='new')\n YKHO.assertTrue(L03z.validate())",
"def xe3w(YKHO):\n Mkmy = YKHO.client.get(gxEw('User:Reset', args=[str(YKHO.prr.... | [
"0.8428594",
"0.78513247",
"0.77097714",
"0.76190275",
"0.7530875",
"0.74863863",
"0.7436365",
"0.7385219",
"0.7368393",
"0.73275584",
"0.73244214",
"0.7291026",
"0.72557527",
"0.7250117",
"0.7242979",
"0.7186139",
"0.71790195",
"0.7178022",
"0.71635413",
"0.71608514",
"0.712... | 0.9558622 | 0 |
Test case for confirm_password_reset_request | def OvfQ(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Px5x(YKHO):\n sBvR = 'NjA'\n eOtH = '4zk-4cf11a9b549aa608ff27'\n geh0 = YKHO.client.get(gxEw('password_reset_confirm', args=(sBvR, eOtH)))\n YKHO.assertEqual(geh0.status_code, 200)\n YKHO.assertTemplateUsed(geh0, 'food/account/password_reset_confirm.html')",
"def OAOs(YKHO):\n pass",
"def... | [
"0.82665586",
"0.82598233",
"0.80844194",
"0.796067",
"0.79339564",
"0.7874509",
"0.78499264",
"0.77894026",
"0.7769376",
"0.76993257",
"0.76779944",
"0.7661454",
"0.7574028",
"0.7527312",
"0.7522152",
"0.7496025",
"0.7492284",
"0.7434635",
"0.7430874",
"0.74079424",
"0.73432... | 0.9249866 | 0 |
Test case for finsih_github_signup | def Yj1U(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R4Sp(YKHO):\n pass",
"def tuZt(YKHO):\n Aofo = YKHO.client.post('/thankyou', data={'first_name': 'Ash', 'lname': 'Fri', 'email': 'ashfri@gmail.com', 'zipcode': '12345', 'password': '123'}, follow_redirects=True)\n YKHO.assertEqual(Aofo.status_code, 200)\n YKHO.assertIn('Thank you for signing up!'... | [
"0.918126",
"0.7483231",
"0.705098",
"0.7044619",
"0.702856",
"0.69859153",
"0.6968146",
"0.69612694",
"0.69432306",
"0.6935145",
"0.6909209",
"0.6908561",
"0.6875724",
"0.6871741",
"0.68641794",
"0.6814271",
"0.6785146",
"0.677545",
"0.67534554",
"0.6744898",
"0.67302734",
... | 0.94243324 | 0 |
Test case for get_password_forgotten_form | def AQXB(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rCri(YKHO):\n pass",
"def BhSC(YKHO):\n pass",
"def VFZB():\n RKD7.info('provide forgot form')\n return ccBJ.get_template('forgot_pwd.html').render()",
"def OAOs(YKHO):\n pass",
"def KUhZ(YKHO):\n QePW = YKHO.client.get(gxEw('authentication:forgotten_password'))\n YKHO.assertEqual(... | [
"0.8496276",
"0.8167549",
"0.80974466",
"0.8027271",
"0.7779752",
"0.7731759",
"0.7674657",
"0.7652153",
"0.75674325",
"0.75593466",
"0.74993086",
"0.7391036",
"0.73652977",
"0.7356579",
"0.73365",
"0.7320428",
"0.72983575",
"0.7289929",
"0.7289023",
"0.7273702",
"0.72570795"... | 0.9394198 | 0 |
Test case for github_signup | def R4Sp(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Yj1U(YKHO):\n pass",
"def tuZt(YKHO):\n Aofo = YKHO.client.post('/thankyou', data={'first_name': 'Ash', 'lname': 'Fri', 'email': 'ashfri@gmail.com', 'zipcode': '12345', 'password': '123'}, follow_redirects=True)\n YKHO.assertEqual(Aofo.status_code, 200)\n YKHO.assertIn('Thank you for signing up!'... | [
"0.9303815",
"0.7456141",
"0.7191647",
"0.70953614",
"0.70949626",
"0.7082255",
"0.7082129",
"0.70438045",
"0.70390654",
"0.70359814",
"0.7018799",
"0.7009572",
"0.70020634",
"0.697355",
"0.69671094",
"0.6874506",
"0.68571454",
"0.68571436",
"0.68417567",
"0.6837625",
"0.6831... | 0.9367771 | 0 |
Test case for reset_password_forgotten | def OAOs(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OvfQ(YKHO):\n pass",
"def hBBL(YKHO):\n pass",
"def BhSC(YKHO):\n pass",
"def rHdc(YKHO):\n pass",
"def AQXB(YKHO):\n pass",
"def MVYL(YKHO):\n Z9rn = i9zE()\n YKHO.assertTrue(Z9rn.login(username=YKHO.userinfo['username'], password=YKHO.pw1))\n Z9rn.logout()\n Mkmy = Z9rn.g... | [
"0.876429",
"0.8621633",
"0.83987665",
"0.8291426",
"0.82104164",
"0.8182487",
"0.8156722",
"0.8105256",
"0.8066224",
"0.80597514",
"0.8057551",
"0.8056812",
"0.7976234",
"0.79749805",
"0.797178",
"0.7955984",
"0.78798115",
"0.7879368",
"0.78468907",
"0.7843678",
"0.77904814"... | 0.9404413 | 0 |
Wraps hidden states in new Tensors, to detach them from their history. | def IOWm(YKHO, MKlR):
if isinstance(MKlR, ht2j.Tensor):
return MKlR.detach()
else:
return tuple((YKHO.repackage_hidden(Ty9i) for Ty9i in MKlR)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YmeV(YKHO):\n YKHO.hidden = (ht2j.zeros(1, YKHO.batch_size, YKHO.hidden_size), ht2j.zeros(1, YKHO.batch_size, YKHO.hidden_size))",
"def eIRW(Zode):\n if isinstance(Zode, ht2j.Tensor):\n return Zode.detach()\n else:\n return tuple((eIRW(Ty9i) for Ty9i in Zode))",
"def MAw8(YKHO):\n ... | [
"0.68808645",
"0.64512575",
"0.6378076",
"0.6308437",
"0.625255",
"0.6235045",
"0.6204071",
"0.61985195",
"0.61885226",
"0.61885226",
"0.61265355",
"0.6118659",
"0.6069778",
"0.6001251",
"0.59973645",
"0.5994936",
"0.5970335",
"0.59645176",
"0.5948465",
"0.5937404",
"0.593569... | 0.0 | -1 |
This decorator assumes the second argument to the view is the pk of a project. It uses that to check if the request.user has permission to see the project | def NpPz(FYKK):
def h3Xc(*qIxc, **B2fa):
QePW = qIxc[0]
CBIr = QePW.user
_sei = qIxc[1]
bNKA = oPx1.objects.get(pk=_sei)
if CBIr in bNKA.clients.all() or CBIr.has_perm('projects.can_view_all'):
return FYKK(*qIxc, **B2fa)
if CBIr.is_authenticated():
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qHTF(YKHO, QePW, tTee):\n w10S = tTee.kwargs.get('project_pk')\n uJjO = QePW.user.id\n return True if YKHO.user_permission(w10S, uJjO) else False",
"def qHTF(YKHO, QePW, tTee):\n w10S = tTee.kwargs.get('project_pk')\n uJjO = QePW.user.id\n return True if YKHO.user_permission(w10S, uJjO, 1) ... | [
"0.75637865",
"0.7448269",
"0.727932",
"0.7268137",
"0.70125145",
"0.6978383",
"0.69645876",
"0.695849",
"0.6819644",
"0.66493225",
"0.6645357",
"0.6633304",
"0.66305",
"0.66305",
"0.6620552",
"0.6614779",
"0.6558207",
"0.6551415",
"0.6526625",
"0.65143627",
"0.6507922",
"0... | 0.80938894 | 0 |
This decorator assumes the second argument to the view is the pk of a todo. It uses that to check if the request.user has permission to access this todo item | def SB4I(FYKK):
def h3Xc(*qIxc, **B2fa):
QePW = qIxc[0]
CBIr = QePW.user
_sei = qIxc[1]
pPvV = EQrN.objects.get(pk=_sei)
bNKA = pPvV.project
if CBIr in bNKA.clients.all() or CBIr.has_perm('projects.can_view_all'):
return FYKK(*qIxc, **B2fa)
if CBI... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XRr9(JfyU):\n\n @zaGL(JfyU)\n def Nlkd(*qIxc, **B2fa):\n if not c5ow.has_role('ADMIN'):\n if not c5ow.is_user(B2fa.get('id')):\n eTsH(401)\n return JfyU(*qIxc, **B2fa)\n return Nlkd",
"def qHTF(YKHO, QePW, tTee):\n raise NotImplementedError()",
"def qHTF(... | [
"0.7137409",
"0.7086399",
"0.6996914",
"0.69658303",
"0.68911505",
"0.6870001",
"0.6818775",
"0.67964333",
"0.6783876",
"0.6783876",
"0.6783876",
"0.6783876",
"0.6783876",
"0.67823476",
"0.67823476",
"0.6729541",
"0.67275894",
"0.66730624",
"0.6621668",
"0.6594362",
"0.658122... | 0.77628726 | 0 |
Test that a 400 during authenticate raises exception.AuthBadRequest | def EZ7Y(YKHO):
def jAJY(*qIxc, **B2fa):
_hkX = ZrWc.Response()
_hkX.status = Xqgu.BAD_REQUEST
return (BYZu(_hkX), '')
YKHO.mock_object(Jpbe.KeystoneStrategy, '_do_request', jAJY)
sZfS = {'username': 'user1', 'auth_url': 'http://localhost/badauthurl/', 'password': 'pass', 'strategy'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vBvX(YKHO):\n YKHO.assertRaises(AJ5d.ValidationError, YKHO.api.authenticate, {}, {'auth': 'abcd'})",
"def bafb():\n with trZe.raises(iRIu.errors.AuthError):\n raise iRIu.errors.AuthError(404, 'Not found')",
"def pJBL(YKHO):\n with YKHO.client:\n eOtH = YKHO.get_user_token()\n ... | [
"0.7799528",
"0.7512673",
"0.7506459",
"0.7409032",
"0.7370912",
"0.73347443",
"0.7277387",
"0.7242265",
"0.7242265",
"0.72368777",
"0.7230123",
"0.72207844",
"0.7190824",
"0.7189907",
"0.7185949",
"0.7182786",
"0.71526223",
"0.7134732",
"0.7111649",
"0.7086742",
"0.70151967"... | 0.71025795 | 19 |
Test that a 400 during authenticate raises exception.AuthBadRequest | def xofC(YKHO):
def jAJY(*qIxc, **B2fa):
_hkX = ZrWc.Response()
_hkX.status = Xqgu.BAD_REQUEST
return (BYZu(_hkX), '')
YKHO.mock_object(Jpbe.KeystoneStrategy, '_do_request', jAJY)
sZfS = {'username': 'user1', 'auth_url': 'http://localhost/badauthurl/v2.0/', 'password': 'pass', 'tena... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vBvX(YKHO):\n YKHO.assertRaises(AJ5d.ValidationError, YKHO.api.authenticate, {}, {'auth': 'abcd'})",
"def bafb():\n with trZe.raises(iRIu.errors.AuthError):\n raise iRIu.errors.AuthError(404, 'Not found')",
"def pJBL(YKHO):\n with YKHO.client:\n eOtH = YKHO.get_user_token()\n ... | [
"0.7799528",
"0.7512673",
"0.7506459",
"0.7409032",
"0.7370912",
"0.73347443",
"0.7277387",
"0.7242265",
"0.7242265",
"0.72368777",
"0.7230123",
"0.72207844",
"0.7190824",
"0.7189907",
"0.7185949",
"0.7182786",
"0.71526223",
"0.7134732",
"0.7111649",
"0.71025795",
"0.7086742"... | 0.70151967 | 21 |
Checks whether a string can be converted to a float. | def e5f3(vIwR):
try:
float(vIwR)
except ValueError:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e5f3(YKHO, vIwR):\n try:\n float(vIwR)\n return True\n except ValueError:\n return False",
"def e5f3(vIwR):\n try:\n float(vIwR)\n return True\n except ValueError:\n return False",
"def QpCZ(vIwR):\n try:\n float(vIwR)\n return True\n ... | [
"0.87802744",
"0.8704312",
"0.86551476",
"0.86551476",
"0.8628489",
"0.8607992",
"0.85645044",
"0.8560041",
"0.8552052",
"0.85438436",
"0.8537546",
"0.85112345",
"0.8470142",
"0.84607583",
"0.84290045",
"0.8396176",
"0.8396176",
"0.8396176",
"0.8396176",
"0.83521783",
"0.8282... | 0.8746067 | 1 |
Compute softmax values for each sets of scores in x. | def N93T(WKvO):
uw5A = oyIN.exp(WKvO - oyIN.max(WKvO))
return uw5A / uw5A.sum(axis=0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oSvh(WKvO):\n S2MS = []\n if oyIN.array(WKvO).ndim == 1:\n hrCc = oyIN.exp(WKvO)\n RmXN = oyIN.sum(hrCc)\n xzMv = hrCc / RmXN\n dzye = xzMv\n else:\n dzye = oyIN.exp(cCrA) / oyIN.sum(oyIN.exp(cCrA), axis=0)\n return dzye",
"def N93T(WKvO):\n j1LR = oyIN.exp(o... | [
"0.80119765",
"0.7762025",
"0.7762025",
"0.7686785",
"0.7671754",
"0.76615846",
"0.76581645",
"0.76581645",
"0.76581645",
"0.76581645",
"0.76581645",
"0.76581645",
"0.76581645",
"0.76407975",
"0.7627673",
"0.7551796",
"0.75327057",
"0.74580646",
"0.7325217",
"0.7317911",
"0.7... | 0.70613074 | 90 |
Load examples from preprocessed file. One example per line, JSON encoded. | def UlWi(qIxc, Ux0P):
with open(Ux0P) as eHNT:
_73Q = [qQXR.loads(zFiD) for zFiD in eHNT]
return _73Q | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UlWi(Ux0P):\n with open(Ux0P) as eHNT:\n _73Q = [qQXR.loads(zFiD) for zFiD in eHNT]\n return _73Q",
"def I8ZM(Ux0P):\n pmON = Hy7s.path.dirname(Hy7s.path.abspath(xAKo))\n with open(Hy7s.path.join(pmON, 'json/example_{file}.json'.format(file=Ux0P))) as wM3v:\n return qQXR.load(wM3v)"... | [
"0.7618308",
"0.6963912",
"0.63788474",
"0.6367063",
"0.63613844",
"0.6359016",
"0.6289756",
"0.62656176",
"0.62059855",
"0.6182109",
"0.6171555",
"0.61194456",
"0.6104537",
"0.60910577",
"0.60416496",
"0.6022992",
"0.6022992",
"0.60024446",
"0.59994686",
"0.599047",
"0.59637... | 0.7383138 | 1 |
Automatically merges all parent QuerySet classes to preserve custom defined QuerySet methods | def zcTT(Emd4):
xu6F = [getattr(_AKB, 'QuerySet', False) for _AKB in Emd4.__bases__]
if 'QuerySet' in Emd4.__dict__:
xu6F = [Emd4.QuerySet] + xu6F
xu6F = filter(bool, xu6F)
if xu6F:
Emd4.QuerySet = type('QuerySet', tuple(xu6F), {})
if Emd4.__name__ == 'QuerySetManagerModel':
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k66M(YKHO) -> ZYvt:\n SR0I: ZYvt = super().get_queryset()\n cIuE = YKHO.get_serializer_class()\n if hasattr(cIuE, 'setup_eager_loading'):\n SR0I = cIuE.setup_eager_loading(SR0I, YKHO.request.method == 'GET')\n return SR0I",
"def Cce9(YKHO):\n return YKHO",
"def all(Emd4) -> ZYvt:\n ... | [
"0.6789607",
"0.6716089",
"0.6529845",
"0.6499259",
"0.6478127",
"0.64662457",
"0.6458781",
"0.64533234",
"0.6441769",
"0.643048",
"0.6418947",
"0.64106244",
"0.64106244",
"0.635424",
"0.63512665",
"0.6349281",
"0.62829703",
"0.6274411",
"0.62393445",
"0.62353295",
"0.6203146... | 0.7139621 | 0 |
Convert a string to boolean. Meant for the argparser. | def M0mR(KCHu):
return KCHu.lower() in ['yes', 'y', 'true', 't'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fgVc(Ty9i):\n if isinstance(Ty9i, bool):\n return Ty9i\n if Ty9i.lower() == 'true':\n return True\n elif Ty9i.lower() == 'false':\n return False\n else:\n raise j1Jz.ArgumentTypeError(f'Boolean string or boolean expected; received {Ty9i}.')",
"def oOc6(Ty9i: str):\n ... | [
"0.8777049",
"0.87319475",
"0.86698526",
"0.86551064",
"0.8626545",
"0.8626545",
"0.86234826",
"0.8600661",
"0.859161",
"0.8579985",
"0.85731155",
"0.85731155",
"0.85731155",
"0.85731155",
"0.8567199",
"0.8567199",
"0.8567199",
"0.8567199",
"0.855686",
"0.85516447",
"0.855164... | 0.0 | -1 |
Optimizer function called once for the entire model, as opposed for each CPU / GPU individually. The optimizer will be a stepwise weight decay. | def GjqI(C3ST):
LSJq = int(30 * qIxc.epoch_size / qIxc.batch_size / qIxc.num_shards)
LSJq = LSJq if LSJq else 100
K0do.add_weight_decay(C3ST, 0.0001)
y7GR = K0do.build_sgd(C3ST, qIxc.base_learning_rate, momentum=0.9, nesterov=1, policy='step', stepsize=LSJq, gamma=0.1)
return y7GR | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vage(YKHO, N77f, C3ST, K0do) -> None:\n tdL7.optimizer_step(K0do)",
"def WIl5(YKHO):\n YKHO.global_step = ZylS.Variable(0, name='global_step', trainable=False)\n YKHO.train_op = ZylS.train.RMSPropOptimizer(vPBo.learning_rate).minimize(YKHO.loss, global_step=YKHO.global_step)",
"def Vage(YKHO, N77f... | [
"0.70493734",
"0.69421893",
"0.68411374",
"0.6775744",
"0.6772486",
"0.676912",
"0.6740097",
"0.67143315",
"0.6708665",
"0.67047834",
"0.6648213",
"0.66476405",
"0.6635832",
"0.6629322",
"0.66106546",
"0.6609372",
"0.6605752",
"0.6605752",
"0.65955126",
"0.65931714",
"0.65649... | 0.66274637 | 14 |
Add a simple gradient based parameter update with stepwise adaptive learning rate. | def cnO9(C3ST):
sDBH = u372.iter(C3ST, 'iter')
gPbP = C3ST.LearningRate(sDBH, 'LR', base_lr=-qIxc.base_learning_rate, policy='step', stepsize=1000, gamma=0.999)
UgBJ = C3ST.param_init_net.ConstantFill([], 'ONE', shape=[1], value=1.0)
for xqoZ in C3ST.params:
XBSW = C3ST.param_to_grad[xqoZ]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QdZT(YKHO, b0Ix, S1Y2, DqOf, YPaw):\n raise NotImplementedError",
"def QdZT(YKHO, b0Ix, hNPz, tXU8, YPaw):\n raise NotImplementedError",
"def pu93(YKHO, b0Ix):\n tds7, uyzC = YKHO.load_parameter_gradients()\n YKHO._w += -b0Ix * tds7\n YKHO._b += -b0Ix * uyzC",
"def fggk(YKHO, YPaw, WMj5='p... | [
"0.76197153",
"0.74241257",
"0.7289955",
"0.7160965",
"0.7140729",
"0.7110913",
"0.7051341",
"0.7035812",
"0.7018585",
"0.6970426",
"0.69684577",
"0.69622916",
"0.6955579",
"0.69196284",
"0.69160706",
"0.6889909",
"0.6886737",
"0.6874996",
"0.6867504",
"0.6856273",
"0.6847991... | 0.77293795 | 0 |
The beta parameters of the pulled arm are updated accordingly | def dz2l(YKHO, MbHq, vOGg):
super().update_observations(MbHq, vOGg)
YKHO.beta_parameters[MbHq, 0] += vOGg
YKHO.beta_parameters[MbHq, 1] += 1.0 - vOGg | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vHuH(YKHO):\n if YKHO.hypothesis == 'equality':\n YKHO.beta = YKHO._beta\n YKHO.power = 1 - YKHO.beta\n elif YKHO.hypothesis == 'superiority':\n YKHO.beta = YKHO._beta\n YKHO.power = 1 - YKHO.beta\n elif YKHO.hypothesis == 'equivalence':\n YKHO.beta = 1 - 2 * YKHO._b... | [
"0.74154663",
"0.73227113",
"0.70897895",
"0.70405656",
"0.6904167",
"0.6890985",
"0.6853265",
"0.6849335",
"0.6784945",
"0.6775546",
"0.6715309",
"0.65884775",
"0.65548944",
"0.6542021",
"0.6519893",
"0.6518946",
"0.65185153",
"0.6511149",
"0.648207",
"0.64715606",
"0.646926... | 0.7004669 | 4 |
Counts how many possible ship alignments there are on each cell on the board. So if for coordinate (0,1), there are 2 possible ships that can be fit to lie on this coordinate then returned_array[0,1] = 2. | def EsSU(iBIi, _pRX, Pusg=False):
l1DD = oyIN.zeros((len(iBIi), len(iBIi[0])), dtype=int)
Wcp1 = {}
for LVAh in range(0, len(iBIi)):
for WKvO in range(0, len(iBIi[0])):
if iBIi[LVAh][WKvO] == '':
mcsA = vhpi(LVAh, WKvO, iBIi, _pRX)
if Pusg:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hDeO(YKHO):\n mLGw = 0\n for BHsk, qw7D in YKHO.cell_dict.items():\n if len(qw7D) > 1:\n mLGw += 1\n return mLGw",
"def cdvz(iBIi):\n UHFx = 0\n for rdlD in iBIi:\n for iVRZ in rdlD:\n if iVRZ == 'X':\n UHFx += 1\n return UHFx",
"def cpAM... | [
"0.68683666",
"0.6676048",
"0.6412744",
"0.6403407",
"0.63046706",
"0.6252857",
"0.6241419",
"0.6229779",
"0.62143886",
"0.6212924",
"0.61480355",
"0.61375475",
"0.6137057",
"0.6136393",
"0.6108717",
"0.6101688",
"0.60863346",
"0.6064912",
"0.6042646",
"0.60081095",
"0.599386... | 0.6355834 | 4 |
Onehot encoding for the hour of day feature | def AAuP(EcVT):
mktQ = RHxJ(sparse='False', categories=[list(range(0, 24))])
qw7D = mktQ.fit_transform(oyIN.array(EcVT.index.hour).reshape(-1, 1))
qw7D = qw7D.toarray()
ZLJ_ = ['hour_' + str(YRbF) for YRbF in range(0, 24)]
return rLdf.DataFrame(qw7D, index=EcVT.index, columns=ZLJ_) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vcQt(ZJ_5):\n ZJ_5 = rLdf.get_dummies(ZJ_5, prefix='HourOfDay')\n return ZJ_5",
"def vnij(E3oo):\n iZNb = qcWV.utcfromtimestamp(E3oo)\n XKrP = iZNb.weekday()\n ROt1 = iZNb.hour\n vhpA = ht2j.zeros(1, 31)\n vhpA[0][ROt1] = 1.0\n vhpA[0][24 + XKrP] = 1.0\n return vhpA",
"def paMf(Y... | [
"0.7117976",
"0.6982433",
"0.6673906",
"0.6640815",
"0.6631003",
"0.64246273",
"0.6401856",
"0.6280443",
"0.62335175",
"0.6225824",
"0.62250173",
"0.6221019",
"0.6202117",
"0.61907995",
"0.6181756",
"0.61795825",
"0.61629605",
"0.61612934",
"0.61588246",
"0.6145087",
"0.61419... | 0.66099375 | 5 |
OneHot encoding for weekend feature (Binary) | def zVBm(EcVT):
ENu8 = EcVT.index.dayofweek == 5
jKfX = EcVT.index.dayofweek == 6
mktQ = RHxJ(sparse='False', drop='first', categories=[list(range(0, 2))])
qw7D = mktQ.fit_transform(oyIN.logical_or(ENu8, jKfX).reshape(-1, 1))
qw7D = qw7D.toarray()
ZLJ_ = ['weekend_' + str(YRbF) for YRbF in range... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zGX0(jQ3Z):\n KpaX = [Z9rn for Z9rn in jQ3Z.columns if jQ3Z[Z9rn].dtype.name == 'object']\n jQ3Z = rLdf.get_dummies(jQ3Z, columns=KpaX, prefix=KpaX)\n return jQ3Z",
"def RnAd(XKrP):\n Ae2G = lLNu()\n Ae2G.fit(aQha)\n return Ae2G.transform([XKrP])[0]",
"def zGX0(jQ3Z):\n jQ3Z = rLdf.get... | [
"0.7200928",
"0.7060065",
"0.6921886",
"0.677153",
"0.67261344",
"0.6690174",
"0.6641503",
"0.66290617",
"0.66218776",
"0.65676874",
"0.65512055",
"0.65303063",
"0.6497705",
"0.6433217",
"0.64207894",
"0.63946086",
"0.638062",
"0.6372869",
"0.6359829",
"0.6341944",
"0.6334847... | 0.68653744 | 3 |
Compute the loss for a batch. | def KVH6(YKHO, iSXe: Tensor, GIvQ: Tensor, Yw_3: Tensor, n9UN: Tensor, EhEJ: Tensor, K3La: Tensor) -> llWB:
WAQg = YKHO.loss_enc(iSXe, GIvQ)
Ha_3 = YKHO.loss_con(Yw_3, n9UN)
Kvln = YKHO.loss_adv(EhEJ, K3La)
N77f = Kvln * YKHO.wadv + Ha_3 * YKHO.wcon + WAQg * YKHO.wenc
return N77f | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wOmn(YKHO, Wc9F: Tuple[torch.Tensor, ...]) -> ht2j.Tensor:\n nvEb, pan_ = YKHO.model(*Wc9F)\n N77f = YKHO.loss_fn(nvEb, pan_)\n return N77f",
"def xBoL(YKHO, Wc9F, S2z8=False, **B2fa):\n pass",
"def L8kW(YKHO, cuiw, Wc9F):\n WJTi = {}\n WJTi[YKHO.context_ids] = Wc9F.context_ids\n WJTi[... | [
"0.8533067",
"0.7888065",
"0.7817044",
"0.76737696",
"0.7661934",
"0.7655236",
"0.7593377",
"0.7589296",
"0.7583266",
"0.75684834",
"0.75648695",
"0.756435",
"0.7443814",
"0.7430361",
"0.74296224",
"0.7424705",
"0.74049073",
"0.7399301",
"0.737169",
"0.7360664",
"0.73460937",... | 0.0 | -1 |
Compute the loss for a predicted batch. | def KVH6(YKHO, EhEJ: Tensor, K3La: Tensor) -> llWB:
yLhe = YKHO.loss_bce(EhEJ, ht2j.ones(size=EhEJ.shape, dtype=ht2j.float32, device=EhEJ.device))
Cq_P = YKHO.loss_bce(K3La, ht2j.zeros(size=K3La.shape, dtype=ht2j.float32, device=K3La.device))
Mv81 = (Cq_P + yLhe) * 0.5
return Mv81 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wOmn(YKHO, Wc9F: Tuple[torch.Tensor, ...]) -> ht2j.Tensor:\n nvEb, pan_ = YKHO.model(*Wc9F)\n N77f = YKHO.loss_fn(nvEb, pan_)\n return N77f",
"def N77f(YKHO, aMgO: Tensor, Y8eF: Tensor) -> float:\n raise NotImplementedError",
"def wOmn(YKHO):\n with ZylS.variable_scope('loss'):\n N77f... | [
"0.74931014",
"0.7448591",
"0.74284506",
"0.7344774",
"0.73165375",
"0.73165375",
"0.73165375",
"0.72890925",
"0.7249224",
"0.72398",
"0.72398",
"0.72369456",
"0.71755064",
"0.7165945",
"0.7151277",
"0.7151277",
"0.7151277",
"0.71360254",
"0.7122243",
"0.71079284",
"0.7105874... | 0.0 | -1 |
Deliver static landing page that launches the clientside app. | def d6pt():
return TvZl('index.html', debug=P4t4.config['DEBUG'], default_config=P4t4.config['default_config'].flatten(), plugin_templates=hl9_()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F_xU():\n return TvZl('index.html')",
"def kZiy():\n return P4t4.send_static_file('home.html')",
"def hXw_():\n return TvZl('landing_page.html')",
"def kZiy():\n return P4t4.send_static_file('index.html')",
"def Ev1b():\n bo34.info('At main app page.')\n return TvZl('index.html')",
... | [
"0.7232293",
"0.709688",
"0.7079188",
"0.7061295",
"0.70356524",
"0.69351566",
"0.6931673",
"0.6911283",
"0.68995595",
"0.686966",
"0.684317",
"0.68082595",
"0.6794262",
"0.6703573",
"0.6701906",
"0.66745937",
"0.6669183",
"0.6617663",
"0.6586668",
"0.6578707",
"0.6577989",
... | 0.0 | -1 |
Computes the precision for the specified values of k | def vjyh(YKHO, hlel, pan_, hz5a=(1,)):
Gq8e = max(hz5a)
Ep8u = pan_.size(0)
bGrB, nvEb = hlel.topk(Gq8e, 1, True, True)
nvEb = nvEb.t()
gXXc = nvEb.eq(pan_.view(1, -1).expand_as(nvEb))
Ylbp = []
for G1Hx in hz5a:
R2Dg = gXXc[:G1Hx].view(-1).float().sum(0)
Ylbp.append(R2Dg.mul... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhd_(u5Ef, G1Hx):\n return len(u5Ef) / G1Hx",
"def sEak(Mkmy, G1Hx):\n assert G1Hx >= 1\n Mkmy = oyIN.asarray(Mkmy)[:G1Hx]\n return oyIN.mean(Mkmy)",
"def sEak(YKHO, G1Hx):\n fdMZ = YKHO.pred_rankings.rdd.map(lambda SjLr: (SjLr[2], SjLr[1]))\n Wbxz = rRQi(fdMZ)\n return Wbxz.precisionA... | [
"0.8003211",
"0.79748034",
"0.79735845",
"0.7941222",
"0.78642285",
"0.7803938",
"0.7707779",
"0.7621563",
"0.7593218",
"0.75612706",
"0.752028",
"0.7430132",
"0.74122673",
"0.7375894",
"0.7374447",
"0.7321427",
"0.7254542",
"0.7236769",
"0.72279894",
"0.7204469",
"0.7137302"... | 0.0 | -1 |
Create a random number of four unique digits. | def E81Q():
a2cL = tuKI.sample(range(0, 10), k=4)
return a2cL | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZCYd(exwG=4):\n bqSJ = 10 ** (exwG - 1)\n W4ky = 10 ** exwG - 1\n return str(ajWY(bqSJ, W4ky))",
"def gkKB():\n return str(ajWY(1000, 9999)).zfill(4)",
"def IiL8():\n ZTUg = ''\n for WKvO in range(8):\n ZTUg += tuKI.choice(vIwR.ascii_letters + vIwR.digits)\n return ZTUg",
"def... | [
"0.77145416",
"0.7708208",
"0.75024194",
"0.740779",
"0.7374301",
"0.7253466",
"0.7231455",
"0.7201927",
"0.71824074",
"0.71081215",
"0.71038926",
"0.70424455",
"0.7014131",
"0.7007504",
"0.7006099",
"0.6977876",
"0.6977208",
"0.69758177",
"0.69758177",
"0.69709045",
"0.69687... | 0.0 | -1 |
Translate the object to a path string and ensure trailing slash for nonpure paths that are directories. | def ID9D(YKHO) -> str:
VWe_ = ''
mWFP = str(YKHO)
if isinstance(YKHO, GkAb) and mWFP and YKHO.is_dir():
VWe_ = YKHO._flavour.sep
return mWFP + VWe_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ak3z(YEnM):\n if YEnM is None:\n Ol8d = QMSQ('error - request path object None')\n raise Exception(Ol8d)\n if YEnM.collection is None:\n Ol8d = QMSQ('error - request path object collection none %s type %s' % (YEnM.title, type(YEnM)))\n raise Exception(Ol8d)\n RSBG = PeJ0(YE... | [
"0.67638767",
"0.6697391",
"0.6681866",
"0.66388494",
"0.6578688",
"0.65463835",
"0.6540769",
"0.65371704",
"0.6515365",
"0.64575535",
"0.6450234",
"0.64168465",
"0.64043325",
"0.640284",
"0.63791597",
"0.6379015",
"0.6378246",
"0.6365719",
"0.63116163",
"0.63092965",
"0.6308... | 0.72281873 | 0 |
Rewrite int / int to Fraction(int, int). | def HIF7(YKHO, Q6kx):
JfyU = QFwh
if isinstance(Q6kx.n, float):
JfyU = vR6X
return jZ4I.copy_location(jZ4I.Call(func=JfyU, args=[jZ4I.Str(str(Q6kx.n))], keywords=[], starargs=None, kwargs=None), Q6kx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MhEZ(YKHO) -> 'Fraction':\n jzdc = tjkb(YKHO.numerator, YKHO.denominator)\n return kteF(int(YKHO.numerator / jzdc), int(YKHO.denominator / jzdc))",
"def fwuD(Emd4, M6pt=0, UUZ1=None, *, jnV4=True):\n YKHO = super(kteF, Emd4).__new__(Emd4)\n if UUZ1 is None:\n if type(M6pt) is int:\n ... | [
"0.7133499",
"0.7011172",
"0.6990788",
"0.6987638",
"0.688541",
"0.6802894",
"0.6783445",
"0.6758265",
"0.6701924",
"0.6689135",
"0.66812253",
"0.6650867",
"0.66213095",
"0.660354",
"0.65899706",
"0.6578301",
"0.65572894",
"0.6550792",
"0.6536487",
"0.65296066",
"0.6492002",
... | 0.0 | -1 |
Find all vertices connected to the given `vertex_index`, including `vertex_index` itself. | def vkQ0(YKHO, zcCi: int) -> HRJ_.Set[int]:
EmSm = YKHO.get_triangles(allow_primitive_restarts=False, include_degenerate_faces=False)
gela = {zcCi}
for nXnc in (set(a1PO) for a1PO in EmSm):
if gela.intersection(nXnc):
gela |= nXnc
return gela | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SAjZ(YKHO, oROG):\n apzJ.abstract()",
"def mZAY(YKHO, d6pt, a8er=False):\n rR8k = YKHO.polydata()\n pdiZ = YU_E.vtkIdList()\n rR8k.GetPointCells(d6pt, pdiZ)\n DNs0 = []\n for YRbF in range(pdiZ.GetNumberOfIds()):\n lqMq = YU_E.vtkIdList()\n rR8k.GetCellPoints(pdiZ.GetId(YRbF),... | [
"0.65685815",
"0.62056893",
"0.6197397",
"0.6184588",
"0.610294",
"0.60689557",
"0.6026369",
"0.6001952",
"0.5901408",
"0.59007275",
"0.5855092",
"0.5823516",
"0.58150744",
"0.58040535",
"0.58039767",
"0.5795387",
"0.57923293",
"0.5782244",
"0.57794344",
"0.57784426",
"0.5755... | 0.73907 | 0 |
Returns a dictionary from parameter names to descriptions. Returns | def Rdgn(Emd4):
return dict(DTSA_params='Schematic parameters for the double tail sense amplifier.', D2S_params='Schematic parameters for the dynamic to static latch.') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MnWk(YKHO):\n aevO = YKHO.describe()\n return dict([(XP5J['key'], XP5J) for XP5J in aevO['parameters']])",
"def SGPK(YKHO):\n return dict(((G1Hx, getattr(YKHO, G1Hx)) for G1Hx in YKHO._parameter_names))",
"def SGPK(YKHO) -> cuzp[str, ImMB]:\n return {mWFP: getattr(YKHO, mWFP) for mWFP in YKHO.p... | [
"0.8323599",
"0.7416645",
"0.73098916",
"0.72821087",
"0.7112357",
"0.69728196",
"0.6907672",
"0.68064445",
"0.68014175",
"0.68006855",
"0.6749965",
"0.67406386",
"0.6739034",
"0.670004",
"0.66252285",
"0.65529186",
"0.6518889",
"0.65064925",
"0.6504026",
"0.64932585",
"0.646... | 0.69145745 | 6 |
Normalizes string, converts to lowercase, removes nonalpha characters, and converts spaces to hyphens. | def eIIt(YKHO, BWXx):
BWXx = zVCt.normalize('NFKD', BWXx).encode('ascii', 'ignore')
BWXx = QMSQ(ZbWC.sub('[^\\w\\s-]', '', BWXx).strip().lower())
return ZbWC.sub('[-\\s]+', '-', BWXx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I3lj(vIwR):\n return vIwR.lower().replace(' ', '')",
"def nJdR(YKHO, KCHu: str) -> str:\n return ''.join([Z9rn.lower() for Z9rn in KCHu if Z9rn.isalnum()])",
"def NkkI(vIwR: str) -> str:\n return Zf5h.only_word_characters(vIwR.replace(' ', '_')).lower()",
"def I3lj(YKHO, KCHu):\n KCHu = KCHu.... | [
"0.8028116",
"0.79457074",
"0.79016554",
"0.78988516",
"0.78412575",
"0.7748379",
"0.77027833",
"0.76998234",
"0.7696584",
"0.76752454",
"0.76030815",
"0.76020813",
"0.75730497",
"0.7488966",
"0.7344378",
"0.73300225",
"0.7327598",
"0.7327083",
"0.73228514",
"0.7292187",
"0.7... | 0.70340747 | 58 |
Returns a descriptive name of the service | def Q0HP(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bSEa(YKHO) -> str:\n return qe4Y.get(YKHO, 'service_name')",
"def bSEa(YKHO) -> str:\n return qe4Y.get(YKHO, 'service_name')",
"def bSEa(YKHO) -> str:\n return qe4Y.get(YKHO, 'service_name')",
"def bSEa(YKHO) -> str:\n return qe4Y.get(YKHO, 'service_name')",
"def mWFP(YKHO):\n return YKH... | [
"0.87541986",
"0.87541986",
"0.87541986",
"0.87541986",
"0.86196136",
"0.8561053",
"0.8561053",
"0.8561053",
"0.8561053",
"0.8413634",
"0.8413634",
"0.8335316",
"0.8172494",
"0.8172494",
"0.8112107",
"0.8112107",
"0.8112107",
"0.8112107",
"0.8063701",
"0.79264736",
"0.7907637... | 0.0 | -1 |
Gets the counters for this service | def Vcw9(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vcw9(YKHO):\n nPrm = YKHO._retrieve('counters')\n return YKHO._parseCounters(nPrm)",
"def G_Si(Emd4):\n return Emd4._counters",
"def zdsY(YKHO):\n qv1X = G4JS.get(ExMO + Fo8b % YKHO._token)\n return YKHO.read_json_from_req(qv1X)",
"def Vcw9(YKHO):\n YKHO.send_getCounters()\n return Y... | [
"0.83877695",
"0.8194355",
"0.8120782",
"0.7875258",
"0.75855833",
"0.75855833",
"0.75855833",
"0.75855833",
"0.75855833",
"0.75855833",
"0.7548321",
"0.7452266",
"0.72609085",
"0.7244454",
"0.7086",
"0.7040541",
"0.7026487",
"0.6896306",
"0.6806635",
"0.67716986",
"0.6719562... | 0.80253917 | 3 |
Returns a descriptive name of the service | def Q0HP(YKHO):
YKHO.send_getName()
return YKHO.recv_getName() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bSEa(YKHO) -> str:\n return qe4Y.get(YKHO, 'service_name')",
"def bSEa(YKHO) -> str:\n return qe4Y.get(YKHO, 'service_name')",
"def bSEa(YKHO) -> str:\n return qe4Y.get(YKHO, 'service_name')",
"def bSEa(YKHO) -> str:\n return qe4Y.get(YKHO, 'service_name')",
"def mWFP(YKHO):\n return YKH... | [
"0.8753283",
"0.8753283",
"0.8753283",
"0.8753283",
"0.86195433",
"0.85603786",
"0.85603786",
"0.85603786",
"0.85603786",
"0.84123856",
"0.84123856",
"0.8334101",
"0.8171445",
"0.8171445",
"0.81110585",
"0.81110585",
"0.81110585",
"0.81110585",
"0.80625737",
"0.7925739",
"0.7... | 0.0 | -1 |
Gets the counters for this service | def Vcw9(YKHO):
YKHO.send_getCounters()
return YKHO.recv_getCounters() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vcw9(YKHO):\n nPrm = YKHO._retrieve('counters')\n return YKHO._parseCounters(nPrm)",
"def G_Si(Emd4):\n return Emd4._counters",
"def zdsY(YKHO):\n qv1X = G4JS.get(ExMO + Fo8b % YKHO._token)\n return YKHO.read_json_from_req(qv1X)",
"def Vcw9(YKHO):\n pass",
"def rqTy(YKHO):\n return... | [
"0.83879566",
"0.81941736",
"0.8120969",
"0.8025438",
"0.75860333",
"0.75860333",
"0.75860333",
"0.75860333",
"0.75860333",
"0.75860333",
"0.75483984",
"0.74514574",
"0.72604597",
"0.72441953",
"0.7084513",
"0.7039594",
"0.70256686",
"0.6896712",
"0.6806996",
"0.67715126",
"0... | 0.78752935 | 4 |
Stores the server response ids into dictionary. | def wgaI(YKHO, Ylbp, j0SG):
j0SG.store_object(YKHO.df, Ylbp.dfId)
j0SG.store_object(YKHO.model, Ylbp.modelId)
j0SG.store_object(YKHO, Ylbp.eventId) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def si2B(h2IT):\n cuiw['responses'] = h2IT",
"def jqdT(YKHO, geh0):\n while True:\n try:\n nPrm, rRzo = YKHO._socket.recvfrom(1024)\n if nPrm:\n if rRzo not in geh0:\n geh0[rRzo] = []\n geh0[rRzo].append(nPrm)\n else:\... | [
"0.6160079",
"0.59861547",
"0.59738415",
"0.5972192",
"0.58721906",
"0.583743",
"0.5772023",
"0.57705057",
"0.5707449",
"0.5698835",
"0.5692035",
"0.5603338",
"0.560094",
"0.55928844",
"0.54948235",
"0.54948235",
"0.54508775",
"0.5402251",
"0.5390376",
"0.538895",
"0.5378399"... | 0.0 | -1 |
Stores MetricEvent on the server. | def H69_(YKHO, j0SG):
RuJL = YKHO.make_event(j0SG)
mIb8 = j0SG.client
Ylbp = mIb8.storeMetricEvent(RuJL)
YKHO.associate(Ylbp, j0SG) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yUEk(YKHO, tvqc):\n J8Ht = tvqc.name\n if YKHO.metrics is not None and J8Ht not in YKHO.metrics:\n return\n if type(YKHO.metrics) is dict:\n J8Ht = YKHO.metrics[J8Ht]\n YKHO.logger.debug('Submitting to datadog {}{}={}'.format(YKHO.prefix, J8Ht, tvqc.value))\n YKHO.series.append({'m... | [
"0.6907572",
"0.6581965",
"0.62917703",
"0.6257742",
"0.6224546",
"0.6186482",
"0.61707324",
"0.616563",
"0.6114814",
"0.60175157",
"0.6014113",
"0.6000455",
"0.59475154",
"0.59475154",
"0.5938124",
"0.5931613",
"0.58558065",
"0.58229095",
"0.5810269",
"0.57658917",
"0.575577... | 0.6181306 | 6 |
Convert torch Tensor x to numpy. | def WTDd(YKHO, WKvO):
import torch
if not isinstance(WKvO, torch.Tensor):
raise cdJA(f'Expected torch.Tensor but got {WKvO}.')
return WKvO.detach().cpu().numpy() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pMsC(WKvO):\n return WKvO.numpy()",
"def LrLM(WKvO):\n return ht2j.from_numpy(WKvO)",
"def i3wu(WKvO):\n return ht2j.from_numpy(WKvO).type(ht2j.FloatTensor)",
"def vuQn(YKHO, WKvO):\n if isinstance(WKvO, ht2j.Tensor):\n return WKvO.cpu().numpy()\n elif isinstance(WKvO, dict):\n ... | [
"0.87848574",
"0.83505744",
"0.8178511",
"0.8165589",
"0.7892991",
"0.7823508",
"0.77665716",
"0.7758647",
"0.77543056",
"0.77402437",
"0.7696005",
"0.76682186",
"0.763419",
"0.7624325",
"0.7564089",
"0.75325924",
"0.747697",
"0.7434376",
"0.7423618",
"0.73745596",
"0.7343125... | 0.85244143 | 1 |
compute all treynor values for portfolio | def all(t2_1, T_zh, AHaO, Xoey, gn1e):
dixj = {'daily': XOTX(t2_1, T_zh, AHaO, Xoey, gn1e, gWqW.math.interp.linear, gWqW.date.day), 'weekly': XOTX(t2_1, T_zh, AHaO, Xoey, gn1e, gWqW.math.interp.linear, gWqW.date.week), 'monthly': XOTX(t2_1, T_zh, AHaO, Xoey, gn1e, gWqW.math.interp.linear, gWqW.date.month), 'quarter... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fhm5(YKHO, HVIF):\n sum = 0\n for YRbF in range(len(HVIF)):\n sum += YKHO.stocks_analysis.iloc[YRbF]['ror'] * HVIF[YRbF]\n return -sum",
"def kgWm(YKHO):\n return YKHO.state[0] + YKHO.state[1] * YKHO.state[3]",
"def WYPg(YKHO):\n ZgWQ = YKHO._daily\n TXjx = 'cum_investment_return'\... | [
"0.7003145",
"0.68887156",
"0.6805357",
"0.6697926",
"0.65902203",
"0.65647936",
"0.64622355",
"0.6416751",
"0.6353104",
"0.6345885",
"0.6312375",
"0.62733096",
"0.6270614",
"0.62373537",
"0.6197433",
"0.6186067",
"0.61663854",
"0.6102883",
"0.60581833",
"0.60440654",
"0.5959... | 0.0 | -1 |
r"""Converts input to an iterable if it is not already one. | def YYDj(OSnw):
if not isinstance(OSnw, (list, tuple)):
OSnw = [OSnw]
return OSnw | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def j6LA(WKvO):\n if OxJJ(WKvO):\n return WKvO\n else:\n return [WKvO]",
"def c21o(WKvO):\n if isinstance(WKvO, g760.Iterable) and (not isinstance(WKvO, str)):\n return WKvO\n else:\n return (WKvO,)",
"def OxJJ(ZfUD):\n try:\n iter(ZfUD)\n return ZfUD\n ... | [
"0.7532428",
"0.720324",
"0.71082324",
"0.7059922",
"0.70401585",
"0.6988211",
"0.68930846",
"0.6883308",
"0.68701065",
"0.6788704",
"0.6744699",
"0.65970767",
"0.6579265",
"0.65337974",
"0.64963365",
"0.64660776",
"0.64660776",
"0.6445479",
"0.6423184",
"0.63914996",
"0.6385... | 0.0 | -1 |
r"""Gets the feature vectors for all items in the batch that are within the sequence, according to `seq_len`. Performs the same operation as `torch.masked_select`, but on a batch (i.e. returning a 2d tensor). Parameres | def alsf(lCtD, tsWk):
ZHfW = rWMo(tsWk, lCtD.shape[1], dtype=ht2j.long)
ZHfW = ZHfW.squeeze(dim=2)
DNs0 = ZHfW.nonzero(as_tuple=True)
return lCtD[DNs0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def v18U(JZXy, tsWk):\n KIE5 = oyIN.random.randint(0, JZXy['X'].shape[0] - tsWk, size=JZXy['X'].shape[1])\n tqVc = ht2j.cat([JZXy['X'][DkWr:DkWr + tsWk, P2GO:P2GO + 1] for P2GO, DkWr in enumerate(KIE5)], dim=1)\n V6Xo = ht2j.cat([JZXy['Y'][DkWr:DkWr + tsWk, P2GO:P2GO + 1] for P2GO, DkWr in enumerate(KIE5)... | [
"0.57938004",
"0.5575263",
"0.55358744",
"0.5451039",
"0.5437838",
"0.5425426",
"0.53980935",
"0.5383468",
"0.53343487",
"0.53138214",
"0.5291124",
"0.52538663",
"0.5232223",
"0.52104586",
"0.5202864",
"0.52016604",
"0.5192536",
"0.5186922",
"0.5186922",
"0.5186922",
"0.51865... | 0.7361174 | 0 |
Sets the event_id of this LoyaltyLedgerEntry. | def RQ6U(YKHO, RQ6U):
YKHO._event_id = RQ6U | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _8Ho(YKHO, _8Ho):\n YKHO._auth_event_id = _8Ho",
"def T4pi(YKHO, RQ6U='epochtime', UXqs='event_id'):\n if RQ6U == 'epochtime':\n YKHO.eventid = UXqs + '=' + YKHO.epochtimestamp\n else:\n YKHO.eventid = UXqs + '=' + RQ6U",
"def a0Li(YKHO, a0Li):\n YKHO._booking_hold_entry_id = a0Li... | [
"0.6398381",
"0.6368694",
"0.6336819",
"0.6069794",
"0.60556376",
"0.60109305",
"0.58995485",
"0.58888364",
"0.58134717",
"0.58134717",
"0.5807415",
"0.5783627",
"0.57723206",
"0.57632875",
"0.5756773",
"0.57115525",
"0.5690225",
"0.5674384",
"0.56110364",
"0.5539456",
"0.552... | 0.7593934 | 0 |
Sets the amount of this LoyaltyLedgerEntry. | def Z5kt(YKHO, Z5kt):
if YKHO.local_vars_configuration.client_side_validation and Z5kt is None:
raise ValueError('Invalid value for `amount`, must not be `None`')
YKHO._amount = Z5kt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z5kt(YKHO, Z5kt):\n YKHO._amount = Z5kt",
"def Z5kt(YKHO, Z5kt):\n YKHO._amount = Z5kt",
"def Z5kt(YKHO, Z5kt):\n YKHO._amount = Z5kt",
"def Z5kt(YKHO, Z5kt):\n YKHO._amount = Z5kt",
"def Z5kt(YKHO, Z5kt):\n YKHO._amount = Z5kt",
"def Z5kt(YKHO, Z5kt):\n YKHO._amount = Z5kt",
"def... | [
"0.7375889",
"0.7375889",
"0.7375889",
"0.7375889",
"0.7375889",
"0.7375889",
"0.7375889",
"0.7375889",
"0.7375889",
"0.7375889",
"0.7375889",
"0.7375889",
"0.7375889",
"0.7375889",
"0.7375889",
"0.73057663",
"0.7223359",
"0.7204149",
"0.7112127",
"0.7052207",
"0.68458194",
... | 0.634527 | 35 |
Sets the start_date of this LoyaltyLedgerEntry. | def kepv(YKHO, kepv):
YKHO._start_date = kepv | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YFxH(YKHO, kepv):\n YKHO._start_date = kepv",
"def YFxH(YKHO, kepv):\n YKHO.__start_date = kepv",
"def wEtp(YKHO, wEtp):\n YKHO._date_start = wEtp",
"def wEtp(YKHO, wEtp):\n YKHO._date_start = wEtp",
"def wEtp(YKHO, wEtp):\n YKHO._date_start = wEtp",
"def wEtp(YKHO, wEtp):\n YKHO._d... | [
"0.82940996",
"0.8230765",
"0.7872605",
"0.7872605",
"0.7872605",
"0.7872605",
"0.7872605",
"0.78687894",
"0.78090423",
"0.78089154",
"0.78032255",
"0.77243525",
"0.74617314",
"0.7384834",
"0.6760354",
"0.6643411",
"0.65840244",
"0.6546554",
"0.6535346",
"0.6496782",
"0.64918... | 0.80962795 | 3 |
Sets the sub_ledger_id of this LoyaltyLedgerEntry. | def XYhu(YKHO, XYhu):
if YKHO.local_vars_configuration.client_side_validation and XYhu is None:
raise ValueError('Invalid value for `sub_ledger_id`, must not be `None`')
YKHO._sub_ledger_id = XYhu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o0tJ(YKHO, o0tJ):\n YKHO._sub_tenant_id = o0tJ",
"def o0tJ(YKHO, o0tJ):\n YKHO._sub_tenant_id = o0tJ",
"def psjw(YKHO, QFbv: DescLevel) -> None:\n ...",
"def V1Lh(YKHO, V1Lh):\n if YKHO.local_vars_configuration.client_side_validation and V1Lh is None:\n raise ValueError('Invalid value ... | [
"0.71792924",
"0.71792924",
"0.69380283",
"0.6869799",
"0.6177171",
"0.59803754",
"0.59391284",
"0.5893429",
"0.5893429",
"0.5893429",
"0.5893429",
"0.5893429",
"0.58486664",
"0.57898",
"0.57898",
"0.57898",
"0.57898",
"0.5757441",
"0.57391834",
"0.56721455",
"0.56345564",
... | 0.8179022 | 0 |
Returns the string representation of the model | def gTzM(YKHO):
return CgYo.pformat(YKHO.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return YKHO.text",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\... | [
"0.86418265",
"0.85103965",
"0.7853324",
"0.77442306",
"0.7712258",
"0.76979405",
"0.765959",
"0.7637644",
"0.76218504",
"0.7607561",
"0.7606604",
"0.7606604",
"0.7606604",
"0.75990754",
"0.7585653",
"0.758149",
"0.7570811",
"0.7567585",
"0.75392604",
"0.75392604",
"0.7527967... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
if not isinstance(Elif, UNvV):
return True
return YKHO.to_dict() != Elif.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.8392633",
"0.8354901",
"0.82950056",
"0.8132309",
"0.81149805",
"0.8099986",
"0.809911",
"0.8097883",
"0.8097883",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8066694",
"0.80594814",
"0.805757",
... | 0.0 | -1 |
endpoint = '/v1/KCSBTC/order', command = 'amount=10&price=1.1&type=BUY' | def SbSb(YKHO, NKcE, w2IS, TBsA={}):
try:
bEAa = str(int(ITS7.time() * 1000))
lWQw = YKHO.BASE_URL + w2IS
Yvhb = ''
if any(TBsA):
Yvhb = qQXR.dumps(TBsA, sort_keys=True, separators=(',', ':'))
aadv = YKHO.trading_api_sign(NKcE, w2IS, Yvhb, bEAa)
QePW = {}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eLpg(rJDA, QDug, HEZd, y7DO, Sgcx, hI0L):\n NArs = {'side': HEZd, 'symbol': 'BTCUSD', 'order_type': y7DO, 'qty': Sgcx, 'price': hI0L, 'time_in_force': 'GoodTillCancel', 'api_key': rJDA, 'timestamp': round(ITS7.time() * 1000), 'recv_window': 10000}\n '\\n params = { # spot create order params\\n ... | [
"0.64547557",
"0.6279289",
"0.6265448",
"0.6247696",
"0.61863106",
"0.61398405",
"0.6102934",
"0.60338145",
"0.60261965",
"0.60163593",
"0.6011388",
"0.5984259",
"0.59840864",
"0.5982936",
"0.5978374",
"0.59761035",
"0.59470415",
"0.5905301",
"0.5894506",
"0.5873934",
"0.5857... | 0.54047334 | 82 |
Get a list of available currency pairs for trading. GET /api/v1/symbols | def vZzE(YKHO):
return YKHO.get_request('/api/v1/symbols') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Tank():\n bD7m = 'https://api.binance.com/api/v3/ticker/24hr'\n return G4JS.get(bD7m).json()",
"def IvwC(YKHO):\n bD7m = 'https://min-api.cryptocompare.com/data/all/exchanges'\n o8aD = xL7I(bD7m)[1][YKHO.exchange]\n rmc3 = []\n for o61b in o8aD:\n for gUY9 in o8aD[o61b]:\n ... | [
"0.7451653",
"0.7307966",
"0.72170776",
"0.7174425",
"0.7152282",
"0.705106",
"0.70316845",
"0.7003764",
"0.6978483",
"0.69466877",
"0.6932288",
"0.68246174",
"0.67398256",
"0.67152137",
"0.67152137",
"0.6703914",
"0.6698301",
"0.66828847",
"0.66732055",
"0.6652897",
"0.65909... | 0.782806 | 0 |
Ticker include only the inside (i.e. best) bid and ask data , last price and last trade size. GET /api/v1/market/orderbook/level1?symbol= | def kWfe(YKHO, o61b):
return YKHO.get_request('/api/v1/market/orderbook/level1?symbol=' + o61b) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def fetch_order_book(YKHO, o61b: str, qoqK: Optional[int]=None, NArs={}):\n await YKHO.load_markets()\n GT8I = YKHO.market(o61b)\n QePW = {'instrument_code': GT8I['id']}\n if qoqK is not None:\n QePW['depth'] = qoqK\n geh0 = await YKHO.publicGetOrderBookInstrumentCode(YKHO.extend(QePW, ... | [
"0.74651754",
"0.7220802",
"0.6878493",
"0.6823589",
"0.6784204",
"0.6734654",
"0.6723469",
"0.670243",
"0.6674486",
"0.6646764",
"0.6642839",
"0.6623513",
"0.66008306",
"0.65925336",
"0.65682757",
"0.65680385",
"0.6559286",
"0.6530841",
"0.65026784",
"0.6484296",
"0.647612",... | 0.8127204 | 0 |
Get a list of open orders for a symbol. Level2 order book includes all bids and asks (aggregated by price), this level return only one size for each active price (as if there was only a single order for that size at the level). This API will return a part of Order Book within 100 depth for each side(ask or bid). It is ... | def qmlV(YKHO, o61b):
return YKHO.get_request('/api/v1/market/orderbook/level2_100?symbol=' + o61b) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vhnx(YKHO, o61b, rb7a=None):\n return YKHO.client.OrderBook.OrderBook_getL2(symbol=o61b, depth=rb7a).result()",
"def PUeW(YKHO, o61b: str):\n try:\n return YKHO.exchange.fetch_l2_order_book(symbol=o61b, limit=None)\n except cxgh.BaseError as e:\n YKHO.log.exception('fetch_l2_order_book... | [
"0.766386",
"0.7625203",
"0.71676993",
"0.7157432",
"0.71102154",
"0.6836226",
"0.6756111",
"0.67389816",
"0.67184955",
"0.67149603",
"0.6708831",
"0.66711825",
"0.66600907",
"0.6607645",
"0.6572623",
"0.6534017",
"0.6492791",
"0.64477515",
"0.6439675",
"0.6398536",
"0.636082... | 0.6393966 | 20 |
Get a list of open orders for a symbol. Level2 order book includes all bids and asks (aggregated by price), this level return only one size for each active price (as if there was only a single order for that size at the level). This API will return data with full depth. It is generally used by professional traders beca... | def X3nk(YKHO, o61b):
return YKHO.get_request('/api/v1/market/orderbook/level2?symbol=' + o61b) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vhnx(YKHO, o61b, rb7a=None):\n return YKHO.client.OrderBook.OrderBook_getL2(symbol=o61b, depth=rb7a).result()",
"def PUeW(YKHO, o61b: str):\n try:\n return YKHO.exchange.fetch_l2_order_book(symbol=o61b, limit=None)\n except cxgh.BaseError as e:\n YKHO.log.exception('fetch_l2_order_book... | [
"0.79631627",
"0.7548989",
"0.71886885",
"0.67573375",
"0.67284214",
"0.6712646",
"0.6709913",
"0.66791683",
"0.6466942",
"0.6459835",
"0.6398774",
"0.6363144",
"0.6336956",
"0.6331443",
"0.62480813",
"0.6219254",
"0.61982954",
"0.61921215",
"0.6187852",
"0.6179933",
"0.61246... | 0.6798867 | 3 |
Get a list of open orders for a symbol. Level3 order book includes all bids and asks (nonaggregated, each item in Level3 means a single order). Level 3 is nonaggregated and returns the entire order book. This API is generally used by professional traders because it uses more server resources and traffic, and we have st... | def fkpe(YKHO, o61b):
return YKHO.get_request('/api/v1/market/orderbook/level3?symbol=' + o61b) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def get_open_orders(YKHO, o61b):\n j8eK = '/api2/1/private/openOrders'\n TBsA = {'currencyPair': o61b}\n nyyK, P1dF = await YKHO.request('POST', j8eK, TBsA)\n return (nyyK, P1dF)",
"def TpUr(YKHO, o61b=None, **B2fa):\n pB6H = '/api/v3/openOrders'\n pB3N = {'symbol': o61b, **B2fa}\n ret... | [
"0.7718055",
"0.7418261",
"0.7388973",
"0.73560095",
"0.72156614",
"0.69618905",
"0.68705374",
"0.674989",
"0.6714678",
"0.6667789",
"0.6666833",
"0.659578",
"0.654845",
"0.654845",
"0.6506154",
"0.6465621",
"0.6437803",
"0.64204836",
"0.6318447",
"0.62815356",
"0.62450296",
... | 0.7383813 | 3 |
Get single currency detail GET /api/v1/currencies/{currency} | def BCnH(YKHO, VIXL):
return YKHO.get_request('/api/v1/currencies/' + VIXL) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ExyB(YKHO, qPCP: int):\n pass",
"def ExyB(VIXL):\n if isinstance(VIXL, qdHh):\n return VIXL\n return qdHh.objects.filter(short_name=VIXL.upper()).first()",
"def Vvvl(YKHO):\n VIXL = qdHh.objects.get(name='Bitcoin')\n geh0 = YKHO.client.get(gxEw('api:currencies-detail', kwargs={'pk': V... | [
"0.76857024",
"0.7397602",
"0.65778804",
"0.6501844",
"0.6472922",
"0.64681286",
"0.63377535",
"0.63028014",
"0.62909436",
"0.62713385",
"0.6267786",
"0.62150764",
"0.62097615",
"0.6202516",
"0.61843073",
"0.61532336",
"0.6144219",
"0.6129299",
"0.61101943",
"0.60587883",
"0.... | 0.86007863 | 0 |
List your current orders. ParamTypeDescription statusstring[optional] active or done, done as default, Only list orders for a specific status . symbolstring[optional] Only list orders for a specific symbol. sidestring[optional] buy or sell typestring[optional] limit, market, limit_stop or market_stop startAtlong[option... | def awPf(YKHO, QePW={}):
return YKHO.trading_api_request('get', '/api/v1/orders', QePW) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oMj6(YKHO, jGRS: str=None, qoqK: int=None, DOuq: str=None, ZsYj: str=None, XSoh: str=None, NArs=None, UtCB: bool=None, rmc3: List[str]=None, HEZd: str=None) -> y1XM:\n if NArs is None:\n NArs = dict()\n if qoqK is not None:\n NArs['limit'] = qoqK\n if DOuq is not None:\n NArs['aft... | [
"0.7379241",
"0.72094554",
"0.6791974",
"0.6670409",
"0.6661068",
"0.66543204",
"0.64672077",
"0.64020437",
"0.6315811",
"0.6242718",
"0.6219226",
"0.61862177",
"0.6128108",
"0.61199844",
"0.60916054",
"0.60831374",
"0.60714483",
"0.60535115",
"0.60483074",
"0.6027199",
"0.60... | 0.61627513 | 12 |
Return path to the module based on the module fqdn. | def agcN(eH97):
MJH2 = eH97.replace('.', Hy7s.path.sep) + '.py'
MJH2 = Hy7s.path.abspath(MJH2)
return MJH2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kEuL(MJH2):\n d6pt = MJH2.find('scalyr_agent')\n if d6pt != -1:\n MJH2 = MJH2[MJH2.find('scalyr_agent'):]\n d6pt = MJH2.find('tests/unit')\n if d6pt != -1:\n MJH2 = MJH2[MJH2.find('tests/unit'):]\n eH97 = MJH2.replace(Hy7s.path.sep, '.').replace('.py', '')\n return eH97",
"def... | [
"0.80634797",
"0.7152811",
"0.70465004",
"0.6922905",
"0.6863214",
"0.68619186",
"0.6831008",
"0.67331046",
"0.6704791",
"0.6704791",
"0.66971356",
"0.66813695",
"0.6669212",
"0.6669212",
"0.6669212",
"0.6669212",
"0.6669212",
"0.6644101",
"0.6608097",
"0.6581914",
"0.6485035... | 0.88071895 | 0 |
Returns the number of works authored by this user | def S34t(YKHO):
hFiK = YKHO._soup_works.find('div', {'class': 'works-index dashboard filtered region'})
WL4f = hFiK.h2.text.split()
return int(WL4f[4].replace(',', '')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def D9OE(YKHO) -> int:\n return qe4Y.get(YKHO, 'user_count')",
"def CyiD(YKHO) -> int:\n raise NotImplementedError",
"def D9OE(YKHO):\n return YKHO._user_count",
"def hdsS(YKHO):\n return len(YKHO.total_requests_by_user)",
"def wCT7(YKHO):\n return YKHO._related_field_counts.get('users', 0)"... | [
"0.7084549",
"0.70384747",
"0.69757265",
"0.67111546",
"0.66474944",
"0.66017747",
"0.65544325",
"0.65517014",
"0.6524319",
"0.6493153",
"0.64795065",
"0.6466233",
"0.645614",
"0.6437996",
"0.6399896",
"0.6399654",
"0.635766",
"0.635766",
"0.6345126",
"0.63412386",
"0.6289703... | 0.56290144 | 91 |
Build a list of potential options for a given slot, to be used in responseCard generation. | def fEWs(oQ6W):
if oQ6W == 'CryptoHelpIntent':
xAU6 = []
xAU6.append({'text': 'Bitcoin Price', 'value': 'What is the price of bitcoin?'})
xAU6.append({'text': 'Ethereum Price', 'value': 'What is the price of ethereum?'})
xAU6.append({'text': 'Litecoin Price', 'value': 'What is the pr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fEWs(oQ6W, Rci7):\n if oQ6W == 'BranchLocationInput':\n return [{'text': 'Malta', 'value': 'Malta'}, {'text': 'Japan', 'value': 'Japan'}, {'text': 'Malaysia', 'value': 'Malaysia'}]\n elif oQ6W == 'MalaysiaInput':\n return [{'text': 'Malaysia, Cyberjaya', 'value': 'Malaysia, Cyberjaya'}, {'t... | [
"0.73294866",
"0.5805414",
"0.57759726",
"0.56709886",
"0.55154794",
"0.5503678",
"0.54528207",
"0.5450288",
"0.54132754",
"0.5401624",
"0.53941286",
"0.5375257",
"0.5373843",
"0.5363863",
"0.5358497",
"0.53553396",
"0.5288311",
"0.52854973",
"0.5269062",
"0.52620345",
"0.522... | 0.76900816 | 0 |
Extraction of PATCHES FROM IMAGE of shape (x, y, ...) with sliding window. Sliding window runs from left upper corner to right bottom corner. If step size coincides with patch size height or width there are no overlapping patches. Otherwise, there is overlapping, for example horizontal overlap = (nn_input_patch_size[1]... | def wLEa(ezWE, FTrt=(64, 64), Rf07=64):
G9jH.info('ARRAY2PATCHES, arr.shape:{}, patch_size:{}'.format(ezWE.shape, FTrt))
Zdqz = (ezWE.shape[0] - FTrt[0]) // Rf07
ZVOE = (ezWE.shape[1] - FTrt[1]) // Rf07
cC56 = ezWE[0:Zdqz * Rf07 + FTrt[0], 0:ZVOE * Rf07 + FTrt[1]].copy()
c5de = cC56.shape[0] - FTrt[... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YXTw(Xn71, FTrt=[8, 8], yHH9=[0, 0]):\n if not isinstance(Xn71, oyIN.ndarray):\n if isinstance(Xn71, uGYG.Image.Image):\n Xn71 = oyIN.array(Xn71)\n else:\n raise TypeError(\"Parameter 'im' is not a numpy array.\")\n MEXo, OV1s = aUms(Xn71.shape, FTrt, yHH9)\n I7fg =... | [
"0.7091169",
"0.7060145",
"0.6974257",
"0.6899301",
"0.6807312",
"0.672968",
"0.672968",
"0.6654834",
"0.66463983",
"0.66139126",
"0.6597872",
"0.6581364",
"0.6525286",
"0.64979756",
"0.6479099",
"0.64774114",
"0.6472474",
"0.6401105",
"0.6396632",
"0.63937163",
"0.6365651",
... | 0.0 | -1 |
Extraction of PATCHES FROM IMAGE of shape (x, y, ...) with sliding window. Sliding window runs from left upper corner to right bottom corner. If step size coincides with patch size height or width there are no overlapping patches. Otherwise, there is overlapping, for example horizontal overlap = (nn_input_patch_size[1]... | def FyOP(ezWE, FTrt=(64, 64), Rf07=64):
G9jH.info('ARRAY2PATCHES, arr.shape:{}, patch_size:{}'.format(ezWE.shape, FTrt))
return oyIN.array([ezWE[YRbF:YRbF + FTrt[0], r845:r845 + FTrt[1]] for YRbF in range(0, ezWE.shape[0] - FTrt[0], Rf07) for r845 in range(0, ezWE.shape[1] - FTrt[1], Rf07)]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YXTw(Xn71, FTrt=[8, 8], yHH9=[0, 0]):\n if not isinstance(Xn71, oyIN.ndarray):\n if isinstance(Xn71, uGYG.Image.Image):\n Xn71 = oyIN.array(Xn71)\n else:\n raise TypeError(\"Parameter 'im' is not a numpy array.\")\n MEXo, OV1s = aUms(Xn71.shape, FTrt, yHH9)\n I7fg =... | [
"0.70936376",
"0.7061424",
"0.69755733",
"0.6900805",
"0.680853",
"0.6730447",
"0.6730447",
"0.6656314",
"0.6648389",
"0.6617067",
"0.65989214",
"0.6582436",
"0.65274656",
"0.64980495",
"0.64788705",
"0.64787805",
"0.6474481",
"0.64019245",
"0.63979197",
"0.63939136",
"0.6366... | 0.0 | -1 |
Conversion of PATCHES of one image back TO IMAGE WITHOUT OVERLAPPING. From every patch the central subpatch of size step_size (the one which is possible, otherwise some pixels will be skipped) is taken. Since, in cases of overlapping the dimension of subpatch is less than the dimension of patch. It is needed to reduce ... | def bs7C(ohfT, Ylkb, ajCD=(64, 64), Rf07=16, XmXL=(16, 16)):
hTbx = (Rf07, Rf07)
B0T9 = (Ylkb[1] - ajCD[1]) // Rf07 + 1
ezWE = oyIN.empty((0, B0T9 * hTbx[1]))
for YRbF in range((Ylkb[0] - ajCD[0]) // Rf07 + 1):
rdlD = oyIN.concatenate(ohfT[YRbF * B0T9:YRbF * B0T9 + B0T9, ajCD[0] // 2 - hTbx[0] /... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y0BO(ohfT, N0ky):\n N0ky = oyIN.asarray(N0ky)\n FTrt = oyIN.asarray(ohfT[0].shape)\n if FTrt[0] > N0ky[0]:\n raise ValueError('Height of the patch should be less than the height of the image.')\n if FTrt[1] > N0ky[1]:\n raise ValueError('Width of the patch should be less than the widt... | [
"0.7356698",
"0.72676176",
"0.71512586",
"0.70226496",
"0.69699824",
"0.69663167",
"0.686644",
"0.68647",
"0.68422246",
"0.6778983",
"0.6721113",
"0.6650038",
"0.6577328",
"0.65405345",
"0.64963263",
"0.6395801",
"0.63924074",
"0.6356592",
"0.6346353",
"0.6324925",
"0.6324925... | 0.736383 | 0 |
Extraction of PATCHES FROM IMAGE of shape (x, y, ...) with sliding window. Sliding window runs from left upper corner to right bottom corner. If step size coincides with patch size height or width there are no overlapping patches. Otherwise, there is overlapping, for example horizontal overlap = (nn_input_patch_size[1]... | def vt0N(ohfT, tk57, Ylkb, FTrt=(64, 64), Rf07=64):
G9jH.info('PATCHES2ARRAY, patches.shape:{}, img_size:{}'.format(ohfT.shape, Ylkb))
G9jH.debug('patches2array: img_size: {}'.format(Ylkb))
B0T9 = round((Ylkb[1] - FTrt[1]) / Rf07)
x8to = round((Ylkb[0] - FTrt[0]) / Rf07)
G9jH.debug('patches2array: p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YXTw(Xn71, FTrt=[8, 8], yHH9=[0, 0]):\n if not isinstance(Xn71, oyIN.ndarray):\n if isinstance(Xn71, uGYG.Image.Image):\n Xn71 = oyIN.array(Xn71)\n else:\n raise TypeError(\"Parameter 'im' is not a numpy array.\")\n MEXo, OV1s = aUms(Xn71.shape, FTrt, yHH9)\n I7fg =... | [
"0.70936376",
"0.7061424",
"0.69755733",
"0.6900805",
"0.680853",
"0.6730447",
"0.6730447",
"0.6656314",
"0.6648389",
"0.6617067",
"0.65989214",
"0.6582436",
"0.65274656",
"0.64980495",
"0.64788705",
"0.64787805",
"0.6474481",
"0.64019245",
"0.63979197",
"0.63939136",
"0.6366... | 0.0 | -1 |
Convert between the PennTreebank tags to simple Wordnet tags | def VVrx(TZ9E):
if TZ9E.startswith('J'):
return X1AK.ADJ
elif TZ9E.startswith('N'):
return X1AK.NOUN
elif TZ9E.startswith('R'):
return X1AK.ADV
elif TZ9E.startswith('V'):
return X1AK.VERB
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mbJc(TZ9E):\n if TZ9E in ('NN', 'NNS', 'NNP', 'NNPS'):\n return 'n'\n if TZ9E in ('JJ', 'JJR', 'JJS'):\n return 'a'\n if TZ9E in ('VB', 'VBD', 'VBG', 'VBN', 'VBP', 'VBZ'):\n return 'v'\n if TZ9E in ('RB', 'RBR', 'RBS'):\n return 'r'\n return None",
"def VVrx(TZ9E):\... | [
"0.7365638",
"0.7264097",
"0.6920416",
"0.6911804",
"0.68953335",
"0.6814262",
"0.6759691",
"0.67004967",
"0.6694278",
"0.6694278",
"0.6694278",
"0.6694278",
"0.66886526",
"0.66459477",
"0.65051794",
"0.6375983",
"0.63616675",
"0.6331752",
"0.6300252",
"0.62788117",
"0.627364... | 0.6287076 | 19 |
Return a validation fail message and 400 status code | def FPek(YSJr, eqiP):
return ({'message': 'Parameter validation fail', 'error': {'field': eqiP}}, 400) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k3xx(XObx):\n _hkX = {'error': str(XObx).split('\\n')[0], 'instance': XObx.instance, 'validator': XObx.validator, 'validator_value': XObx.validator_value, 'schema': XObx.schema}\n return (WsL5.jsonify(_hkX), 400)",
"def xQJF(P1dF):\n Ol8d = P1dF.message or str(P1dF)\n return ({'status': 400, 'err... | [
"0.76726013",
"0.7477017",
"0.7459535",
"0.72640705",
"0.7235174",
"0.7235174",
"0.7235174",
"0.7235174",
"0.7235174",
"0.7235174",
"0.7078686",
"0.6961053",
"0.6918208",
"0.6918208",
"0.68880874",
"0.6886965",
"0.688681",
"0.6884372",
"0.6852371",
"0.68462",
"0.6843724",
"... | 0.7167832 | 10 |
Getter for the session dialect | def pMVb(YKHO) -> str:
return YKHO._dialect | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pMVb(YKHO):\n return YKHO._dialect",
"def LhYR():\n return dYNn.dialect",
"def pMVb(YKHO) -> str:\n return YKHO._engine.dialect.name",
"def pMVb(YKHO):\n if YKHO.__parser:\n return getattr(YKHO.__parser, 'dialect', {})\n return None",
"def LhYR(QWcs, WmM4=None):\n return YKHO.d... | [
"0.8548006",
"0.813728",
"0.79848075",
"0.79758865",
"0.74691534",
"0.691565",
"0.68633956",
"0.67683834",
"0.6651938",
"0.6489201",
"0.6458012",
"0.63964665",
"0.63964295",
"0.6296906",
"0.6273645",
"0.6229006",
"0.6211122",
"0.61851317",
"0.61017114",
"0.6078106",
"0.588425... | 0.81385016 | 1 |
Viewing the django administration panel user list | def NCrI(YKHO):
bD7m = gxEw('admin:core_user_changelist')
Ylbp = YKHO.client.get(bD7m)
YKHO.assertContains(Ylbp, YKHO.user.email) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yR_X():\n DW23 = NCls.accounts.find()\n return TvZl('admin-users.html', users=DW23)",
"def DBYg():\n return s0TM()",
"def dp9S():\n DW23 = KT1Q()\n G9jH.debug('admin worked successfully')\n return TvZl('list.html', value=DW23)",
"def xSQP():\n return TvZl('users_admin.html', users=qm... | [
"0.784575",
"0.783906",
"0.7640316",
"0.76189584",
"0.7611473",
"0.7559298",
"0.75197357",
"0.7500209",
"0.7496164",
"0.7451241",
"0.74296623",
"0.7426286",
"0.7421435",
"0.74187815",
"0.73762447",
"0.73623544",
"0.73398113",
"0.73230183",
"0.729296",
"0.7247912",
"0.7231871"... | 0.0 | -1 |
Test user edit page works. | def RRRY(YKHO):
bD7m = gxEw('admin:core_user_change', args=(YKHO.user.id,))
Ylbp = YKHO.client.get(bD7m)
YKHO.assertEqual(Ylbp.status_code, 200) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _dh_(YKHO):\n bD7m = gxEw('admin:core_user_change', args=[YKHO.user.id])\n Ylbp = YKHO.client.get(bD7m)\n YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_200_OK)",
"def _dh_(YKHO):\n bD7m = gxEw('admin:core_user_change', args=[YKHO.user.id])\n geh0 = YKHO.client.get(bD7m)\n YKHO.assertEqual(ge... | [
"0.88994646",
"0.8847874",
"0.877434",
"0.86916643",
"0.86456174",
"0.85413116",
"0.85355556",
"0.8376316",
"0.8166337",
"0.80769503",
"0.8019784",
"0.79372394",
"0.788986",
"0.78546274",
"0.7809849",
"0.7779383",
"0.7670112",
"0.7664146",
"0.7635618",
"0.7625527",
"0.7622668... | 0.7663624 | 18 |
Test new user create page works | def LvTq(YKHO):
bD7m = gxEw('admin:core_user_add')
Ylbp = YKHO.client.get(bD7m)
YKHO.assertEqual(Ylbp.status_code, 200) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hq01(YKHO):\n bD7m = gxEw('admin:core_user_add')\n Ylbp = YKHO.client.get(bD7m)\n YKHO.assertEqual(Ylbp.status_code, 200)",
"def Hq01(YKHO):\n bD7m = gxEw('admin:core_user_add')\n Ylbp = YKHO.client.get(bD7m)\n YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_200_OK)",
"def F3wO(YKHO):\n p... | [
"0.87659913",
"0.87553954",
"0.8667748",
"0.8659707",
"0.8642248",
"0.86160594",
"0.8597145",
"0.85957026",
"0.8586027",
"0.85719",
"0.85198474",
"0.8477897",
"0.8427605",
"0.8342104",
"0.83058065",
"0.8268447",
"0.8220764",
"0.82206094",
"0.8196805",
"0.8110207",
"0.8105533"... | 0.8820382 | 0 |
Draw an object to the screen | def JmFt(YKHO, J20S):
for x3GD in YKHO.body:
J20S.blit(YKHO.image, dNMY(x3GD)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JmFt(YKHO):\n YKHO.screen.blit(YKHO.object_image, YKHO.position)",
"def JmFt(YKHO, object, oeNL=None, mawX=None):\n if not oeNL:\n oeNL = object.rect\n else:\n oeNL = (0, 0)\n YKHO.display.blit(object, oeNL)",
"def JmFt(YKHO, Vjhr):\n pass",
"def JmFt(YKHO, Vjhr):\n pass",... | [
"0.85701495",
"0.8230675",
"0.7820074",
"0.7820074",
"0.78189516",
"0.7802213",
"0.7757913",
"0.77471477",
"0.77372456",
"0.76977295",
"0.7694519",
"0.76834506",
"0.765959",
"0.76336926",
"0.7629578",
"0.7616351",
"0.7594729",
"0.7591733",
"0.75899464",
"0.757811",
"0.7577390... | 0.0 | -1 |
The root path of an exchange folder. | def zwjy(cJHQ):
tk5Y = VfSq()
cRaQ = Hy7s.path.join(tk5Y, 'exchanges', cJHQ)
XVId(cRaQ)
return cRaQ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iLzh(YKHO) -> str:\n return YKHO._root_folder",
"def E0im(YKHO):\n return YKHO.path[0:len(YKHO.path) - len(B5hR)]",
"def jNha(YKHO) -> str:\n return YKHO._root_dir",
"def E0im(YKHO):\n return YKHO._root_path",
"def Rip8(YKHO):\n return YKHO.root_path",
"def jNha(YKHO) -> GkAb:\n ret... | [
"0.81016123",
"0.7867436",
"0.7799402",
"0.77411485",
"0.76959497",
"0.7603386",
"0.75926733",
"0.75838083",
"0.757908",
"0.7567843",
"0.75313324",
"0.75119543",
"0.7434218",
"0.73503155",
"0.73399264",
"0.73068404",
"0.72877973",
"0.72797894",
"0.723449",
"0.7215101",
"0.719... | 0.66600305 | 51 |
The absolute path of the exchange's symbol.json file. | def wtHW(cJHQ, fw4S=False):
mWFP = 'symbols.json' if not fw4S else 'symbols_local.json'
cRaQ = zwjy(cJHQ)
return Hy7s.path.join(cRaQ, mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def G2lw(o61b):\n oEge = Hy7s.getcwd()\n return Hy7s.path.join(oEge, 'BitcoinData', str(o61b))",
"def haIR(YKHO) -> str:\n return Hy7s.path.join(YKHO.dirname, 'phones.sym')",
"def WFBL():\n return YnkN.joinpath('geohash.json')",
"def F28p(YKHO):\n return YKHO._bds().file_path_from_hash(YKHO.bd... | [
"0.74328804",
"0.700642",
"0.66725636",
"0.6405681",
"0.6405114",
"0.6394231",
"0.6379119",
"0.6379119",
"0.6334495",
"0.63229805",
"0.63100153",
"0.6296081",
"0.627066",
"0.6249211",
"0.6232711",
"0.62292147",
"0.62276196",
"0.6212057",
"0.6212057",
"0.62092257",
"0.62092257... | 0.7218746 | 1 |
A concatenated string of symbols from a list of assets. | def BtJP(Ffmk):
qw7D = [Ffmk] if isinstance(Ffmk, ICaF) else Ffmk
return ', '.join([IbHI.symbol for IbHI in qw7D]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Jdie(yv6U: List[Symbol]) -> x1iM[str]:\n return [o61b.value() for o61b in yv6U]",
"def UOCP(hQ6X, ja3b):\n return ' + '.join([UJOf(PQrP, ja3b) for PQrP in hQ6X])",
"def dQ0I(kn2i: List[Colour]) -> str:\n return ''.join((OfK8.symbol for OfK8 in kn2i))",
"def l7gM(Ot91):\n return ''.join(Ot91)"... | [
"0.60448706",
"0.59383893",
"0.5879611",
"0.5811216",
"0.5786807",
"0.5659838",
"0.5606322",
"0.5556881",
"0.5549035",
"0.55484396",
"0.5521158",
"0.54502195",
"0.5447963",
"0.54451376",
"0.54441774",
"0.5436377",
"0.54160166",
"0.5405308",
"0.5358881",
"0.53576267",
"0.53543... | 0.7807915 | 0 |
Return the number of items in the queue. | def szAg(YKHO):
return len(YKHO._items) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cPAc(YKHO):\n return len(YKHO.queue)",
"def jBJp(YKHO) -> int:\n return len(YKHO.__queue)",
"def zNig(YKHO):\n return len(YKHO.queue)",
"def yAGA(YKHO) -> int:\n return qe4Y.get(YKHO, 'queue_count')",
"def len(YKHO):\n with YKHO._lock:\n return len(YKHO.queue)",
"def UHFx(YKHO):... | [
"0.8447242",
"0.8385092",
"0.8310046",
"0.8305529",
"0.8274522",
"0.8261294",
"0.8257699",
"0.8225458",
"0.8214693",
"0.8186474",
"0.81835777",
"0.81635463",
"0.8162273",
"0.8152516",
"0.8151376",
"0.8119226",
"0.81099415",
"0.8094009",
"0.8084232",
"0.80789673",
"0.8039605",... | 0.0 | -1 |
Add item to the queue. | def jvNa(YKHO, ZfUD):
YKHO._items.append(ZfUD) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SStx(YKHO, ZfUD):\n YKHO.queue.append(ZfUD)",
"def jvNa(YKHO, ZfUD):\n YKHO._queue.append(ZfUD)",
"def jvNa(YKHO, ZfUD):\n YKHO.append(ZfUD)",
"def H2v5(YKHO, ZfUD):\n if YKHO._unique:\n H5ew = YKHO._key(ZfUD) if YKHO._key else ZfUD\n if H5ew in YKHO._seen:\n return\n... | [
"0.8947014",
"0.882025",
"0.8560101",
"0.8525169",
"0.8508225",
"0.84052473",
"0.8385149",
"0.83463717",
"0.82753354",
"0.8274",
"0.8242565",
"0.8242565",
"0.8242565",
"0.8242565",
"0.8242565",
"0.82376695",
"0.8221479",
"0.8213957",
"0.8198064",
"0.8191399",
"0.8126179",
"... | 0.8526715 | 3 |
Remove and return the least recently inserted item. | def he0F(YKHO):
return YKHO._items.pop(0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BEuN(YKHO):\n if len(YKHO.list) == 0:\n return None\n else:\n uLcG = YKHO.list[0]\n ScHw = YKHO.list.pop()\n if len(YKHO.list) > 0:\n YKHO.list[0] = ScHw\n EMMj = YKHO.index_table.get(YKHO.hashtable_get_key(ScHw))\n EMMj.index = 0\n ... | [
"0.74552405",
"0.73149085",
"0.7291607",
"0.71442765",
"0.70188034",
"0.69619006",
"0.69619006",
"0.69301724",
"0.68859243",
"0.6872255",
"0.68699527",
"0.68444055",
"0.68072855",
"0.6799301",
"0.6776554",
"0.6769054",
"0.6736068",
"0.6698696",
"0.66901916",
"0.6679437",
"0.6... | 0.0 | -1 |
Return number of items in the stack. | def szAg(YKHO):
return len(YKHO._items) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zNig(YKHO):\n if lJj5.is_empty(YKHO):\n return 0\n else:\n return YKHO.num_items",
"def zNig(E5BI):\n return E5BI.size",
"def zNig(YKHO):\n return len(YKHO.stack)",
"def zNig(YKHO) -> int:\n return len(YKHO.stack)",
"def zNig(YKHO):\n return len(YKHO.stack)",
"def zNig... | [
"0.83911824",
"0.8180201",
"0.80948466",
"0.8080529",
"0.8071532",
"0.8071532",
"0.8071532",
"0.8038872",
"0.8031793",
"0.7920203",
"0.7916821",
"0.78974295",
"0.7712385",
"0.77072793",
"0.7679592",
"0.76306385",
"0.7585941",
"0.7581595",
"0.7581595",
"0.7581595",
"0.7579421"... | 0.0 | -1 |
Ensure that a login POST with a wrong password results in an 'Invalid username or password' message. | def bRoB(YKHO):
im04 = YKHO.app.post('/weblab/login', data=dict(username='any', password='wrongpassword'))
' :type: flask.wrappers.Response '
YKHO.assertEqual(im04.status_code, 302, 'Login POST with wrong pass does not return 302')
YKHO.assertTrue(im04.location.endswith('/weblab/login'), 'Redirection do... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OGsz(YKHO):\n geh0 = YKHO.client.post(YKHO.login, {'username': YKHO.username, 'password': 'I_know'})\n YKHO.assertEqual(400, geh0.status_code)",
"def _djf(YKHO):\n nPrm = {'username': YKHO.user.username, 'password': 'wrongpassword'}\n geh0 = YKHO.client.post(gxEw('login-list'), nPrm)\n YKHO.as... | [
"0.80859554",
"0.8057693",
"0.80381763",
"0.80042243",
"0.8003937",
"0.7905172",
"0.7894134",
"0.787356",
"0.78340596",
"0.7826825",
"0.78105533",
"0.7806759",
"0.77831626",
"0.77816427",
"0.7780614",
"0.77798814",
"0.77562565",
"0.7747059",
"0.77263147",
"0.77218866",
"0.768... | 0.77074414 | 20 |
Ensure that a login POST with a right password results in a redirection to the labs page. | def mbRk(YKHO):
im04 = YKHO.app.post('/weblab/login', data=dict(username='any', password='password'))
' :type: flask.wrappers.Response '
YKHO.assertEqual(im04.status_code, 302, 'Login POST with right pass does not return 302')
YKHO.assertTrue(im04.location.endswith('/weblab/'), 'Redirection does not lea... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bRoB(YKHO):\n im04 = YKHO.app.post('/weblab/login', data=dict(username='any', password='wrongpassword'))\n ' :type: flask.wrappers.Response '\n YKHO.assertEqual(im04.status_code, 302, 'Login POST with wrong pass does not return 302')\n YKHO.assertTrue(im04.location.endswith('/weblab/login'), 'Redir... | [
"0.7621286",
"0.75110716",
"0.7382323",
"0.72818154",
"0.72601646",
"0.7232284",
"0.7225984",
"0.7143961",
"0.7137409",
"0.7128518",
"0.7124664",
"0.7099379",
"0.70891595",
"0.70807797",
"0.70769054",
"0.70742",
"0.7019774",
"0.70019954",
"0.69823384",
"0.6966813",
"0.6962765... | 0.7584924 | 1 |
Verifies the name field should not be more than 100 characters | def Tk4t(YKHO, EzGk, RcHO):
QUXy = PVKc(EzGk, RcHO)
QUXy.create_new_input.select('Example Input One')
QUXy.entity1.example_account.wait_for_values()
buEH = 'a' * 101
QUXy.entity1.name.set_value(buEH)
YKHO.assert_util(QUXy.entity1.save, 'Length of input name should be between 1 and 100', left_arg... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QNqz(YKHO, mWFP: str) -> bool:\n return len(mWFP) <= 30 and len(mWFP) != 0",
"def c8ST(mWFP):\n return len(mWFP) <= 100 and ZbWC.match('^[a-zA-Z0-9]+\\\\.*[a-zA-Z0-9]+$', mWFP)",
"def VvOT(mWFP):\n if 0 <= len(mWFP) <= 100:\n return True\n return False",
"def K8mM(YKHO):\n YKHO.subj... | [
"0.81682515",
"0.8029687",
"0.8009166",
"0.7913215",
"0.77687556",
"0.77662265",
"0.7760216",
"0.7736825",
"0.76995647",
"0.7659697",
"0.7653814",
"0.7528466",
"0.75168806",
"0.7468081",
"0.7466659",
"0.7460378",
"0.7436003",
"0.7428566",
"0.7399205",
"0.73714805",
"0.7303523... | 0.7089537 | 32 |
Verifies whether adding special characters, name field displays validation error | def J8yW(YKHO, EzGk, RcHO):
QUXy = PVKc(EzGk, RcHO)
QUXy.create_new_input.select('Example Input One')
QUXy.entity1.example_account.wait_for_values()
QUXy.entity1.name.set_value('$$test_name')
YKHO.assert_util(QUXy.entity1.save, 'Input Name must begin with a letter and consist exclusively of alphanum... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def olSX(YKHO):\n KAOR = qcrw(name='this is an invalid field name')\n try:\n KAOR.full_clean()\n except sUXu as err:\n YKHO.assertIn('The name may only contain alphanumeric characters and underscores.', XObx.error_dict['name'][0].messages)\n else:\n YKHO.fail('Validation error not ... | [
"0.762418",
"0.7487437",
"0.73308104",
"0.72614163",
"0.72443753",
"0.72196877",
"0.72096324",
"0.71964",
"0.7193677",
"0.7191494",
"0.7187806",
"0.714618",
"0.71319854",
"0.7087033",
"0.70520586",
"0.698531",
"0.6980993",
"0.6969226",
"0.69519675",
"0.6944004",
"0.6942203",
... | 0.6634675 | 43 |
Verifies the title of the 'Delete Entity' | def ghZv(YKHO, EzGk, RcHO, KlD4):
QUXy = PVKc(EzGk, RcHO)
QUXy.table.delete_row('dummy_input_one', prompt_msg=True)
YKHO.assert_util(QUXy.entity1.title.container.get_attribute('textContent').strip(), 'Delete Confirmation') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _4cr(YKHO):\n NuWl = YKHO.assert_create(b4Sj, name=d0Dv, surname=YIzv, birthday=qj3D, biography=qyLU)\n YKHO.assert_delete(NuWl)",
"def _4cr(YKHO):\n YKHO.metadata.create_or_update(data=YKHO.create)\n xYqm = YKHO.metadata.get_by_name(entity=TQJD, fqdn=YKHO.entity.fullyQualifiedName)\n fxE9 = Y... | [
"0.67503774",
"0.6729611",
"0.6688777",
"0.6688777",
"0.66461205",
"0.6588206",
"0.6503165",
"0.64828444",
"0.6476815",
"0.6458846",
"0.6454764",
"0.64450485",
"0.6403137",
"0.64012045",
"0.6396587",
"0.6381766",
"0.6332401",
"0.6322197",
"0.62814265",
"0.62797064",
"0.627314... | 0.650029 | 7 |
Verifies the name field should not be more than 100 characters | def YPfX(YKHO, EzGk, RcHO):
QUXy = PVKc(EzGk, RcHO)
QUXy.create_new_input.select('Example Input Two')
QUXy.entity2.example_account.wait_for_values()
buEH = 'a' * 101
QUXy.entity2.name.set_value(buEH)
YKHO.assert_util(QUXy.entity2.save, 'Length of input name should be between 1 and 100', left_arg... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QNqz(YKHO, mWFP: str) -> bool:\n return len(mWFP) <= 30 and len(mWFP) != 0",
"def c8ST(mWFP):\n return len(mWFP) <= 100 and ZbWC.match('^[a-zA-Z0-9]+\\\\.*[a-zA-Z0-9]+$', mWFP)",
"def VvOT(mWFP):\n if 0 <= len(mWFP) <= 100:\n return True\n return False",
"def K8mM(YKHO):\n YKHO.subj... | [
"0.81682515",
"0.8029687",
"0.8009166",
"0.7913215",
"0.77687556",
"0.77662265",
"0.7760216",
"0.7736825",
"0.76995647",
"0.7659697",
"0.7653814",
"0.7528466",
"0.75168806",
"0.7468081",
"0.7466659",
"0.7460378",
"0.7436003",
"0.7428566",
"0.7399205",
"0.73714805",
"0.7303523... | 0.68399584 | 54 |
Verifies whether adding special characters, name field displays validation error | def JE_y(YKHO, EzGk, RcHO):
QUXy = PVKc(EzGk, RcHO)
QUXy.create_new_input.select('Example Input Two')
QUXy.entity2.example_account.wait_for_values()
QUXy.entity2.name.set_value('$$test_name_two')
YKHO.assert_util(QUXy.entity2.save, 'Input Name must begin with a letter and consist exclusively of alph... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def olSX(YKHO):\n KAOR = qcrw(name='this is an invalid field name')\n try:\n KAOR.full_clean()\n except sUXu as err:\n YKHO.assertIn('The name may only contain alphanumeric characters and underscores.', XObx.error_dict['name'][0].messages)\n else:\n YKHO.fail('Validation error not ... | [
"0.76237625",
"0.7486788",
"0.73323065",
"0.7260986",
"0.7243451",
"0.72210133",
"0.72105056",
"0.7196377",
"0.7194133",
"0.7190846",
"0.7189095",
"0.7145533",
"0.7131612",
"0.7087727",
"0.70526344",
"0.6986715",
"0.69819486",
"0.69692016",
"0.695272",
"0.69450504",
"0.694343... | 0.0 | -1 |
Verifies the title of the 'Delete Entity' | def N1es(YKHO, EzGk, RcHO, Achh):
QUXy = PVKc(EzGk, RcHO)
QUXy.table.delete_row('dummy_input_two', prompt_msg=True)
YKHO.assert_util(QUXy.entity2.title.container.get_attribute('textContent').strip(), 'Delete Confirmation') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _4cr(YKHO):\n NuWl = YKHO.assert_create(b4Sj, name=d0Dv, surname=YIzv, birthday=qj3D, biography=qyLU)\n YKHO.assert_delete(NuWl)",
"def _4cr(YKHO):\n YKHO.metadata.create_or_update(data=YKHO.create)\n xYqm = YKHO.metadata.get_by_name(entity=TQJD, fqdn=YKHO.entity.fullyQualifiedName)\n fxE9 = Y... | [
"0.67503774",
"0.6729611",
"0.6688777",
"0.6688777",
"0.66461205",
"0.6588206",
"0.6503165",
"0.650029",
"0.64828444",
"0.6476815",
"0.6458846",
"0.6454764",
"0.64450485",
"0.6403137",
"0.64012045",
"0.6396587",
"0.6381766",
"0.6332401",
"0.6322197",
"0.62797064",
"0.6273142"... | 0.62814265 | 19 |
This method after each request you must remove the current SQLAlchemy Session. | def mTtn(P1dF):
S8SU.close() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yi3Z(YKHO):\n YKHO.__orm.remove_session()",
"def gBn5(AJ5d):\n NCls.session.remove()",
"def jQoW() -> None:\n if FEJ9.in_flask_request():\n Oa1e.session.remove()\n elif cuiw.session:\n cuiw.session.remove()\n cuiw.session = None\n else:\n print('No DB session foun... | [
"0.82665974",
"0.79353476",
"0.7867117",
"0.78433657",
"0.77996916",
"0.77996916",
"0.77641815",
"0.7681376",
"0.76671696",
"0.7608715",
"0.75463873",
"0.7508261",
"0.7508261",
"0.7508261",
"0.7508261",
"0.7508261",
"0.7508261",
"0.7508261",
"0.7409477",
"0.738853",
"0.736669... | 0.0 | -1 |