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 |
|---|---|---|---|---|---|---|
Test retrieving profile for logged in users | def DOw2(YKHO):
Ylbp = YKHO.client.get(XiK1)
YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_200_OK)
YKHO.assertEqual(Ylbp.data, {'name': YKHO.user.name, 'email': YKHO.user.email}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PFTI(YKHO):\n Aofo = YKHO.client.get('/profile/1')\n YKHO.assertIn(b'In house:', Aofo.data)",
"def FuRs(YKHO):\n geh0 = YKHO.client.get(MQNu)\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_200_OK)\n YKHO.assertEqual(geh0.data, {'name': YKHO.user.name, 'email': YKHO.user.email})",
"def HjWA(V... | [
"0.81711257",
"0.80854654",
"0.79636335",
"0.7941477",
"0.79225314",
"0.7913775",
"0.78914225",
"0.7851111",
"0.78483266",
"0.78402805",
"0.78152454",
"0.7808281",
"0.7798181",
"0.77953845",
"0.77234495",
"0.772056",
"0.7701586",
"0.76450664",
"0.7635928",
"0.7625624",
"0.761... | 0.7885846 | 7 |
Returns the SQS queue associated with the name provided | def mSQt(mWFP):
c9NQ = iVGz.resource('sqs')
return c9NQ.get_queue_by_name(QueueName=mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CqEO(YKHO, VsgD):\n for mWFP, gGq6 in YKHO.queues.items():\n if VsgD in gGq6:\n return mWFP\n return YKHO.default_queue",
"def io0A(cuiw, Q64Y):\n x0hE = cuiw.client('sqs')\n _hkX = x0hE.get_queue_url(QueueName=Q64Y)\n return _hkX['QueueUrl']",
"def NMoC(Q64Y: str, **B2fa) ... | [
"0.7586098",
"0.70955753",
"0.70654523",
"0.6963068",
"0.66689426",
"0.66041845",
"0.65472215",
"0.6489761",
"0.64880717",
"0.6451502",
"0.6430923",
"0.6404732",
"0.6282781",
"0.62749827",
"0.6266604",
"0.62122804",
"0.6192859",
"0.61644053",
"0.6142807",
"0.61416143",
"0.609... | 0.89727956 | 0 |
Gets the source_id of this SourceSchema. | def UBGL(YKHO) -> str:
return YKHO._source_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UBGL(YKHO):\n return YKHO._source_id",
"def UBGL(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'source_id')",
"def _zUn(YKHO) -> str:\n return qe4Y.get(YKHO, 'source_identifier')",
"def _zUn(YKHO) -> str:\n return qe4Y.get(YKHO, 'source_identifier')",
"def Nwxp(YKHO):\n return YKHO._source... | [
"0.8383902",
"0.79836535",
"0.76179427",
"0.76179427",
"0.74200153",
"0.7084294",
"0.7084294",
"0.70629627",
"0.6992628",
"0.68882525",
"0.68882525",
"0.67980164",
"0.6670204",
"0.6665483",
"0.66482115",
"0.6584191",
"0.65593994",
"0.6546823",
"0.64896107",
"0.64815307",
"0.6... | 0.81867415 | 2 |
Sets the source_id of this SourceSchema. | def UBGL(YKHO, UBGL: str):
if UBGL is None:
raise ValueError('Invalid value for `source_id`, must not be `None`')
YKHO._source_id = UBGL | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UBGL(YKHO, UBGL: str):\n YKHO._source_id = UBGL",
"def UBGL(YKHO, UBGL):\n YKHO._source_id = UBGL",
"def UBGL(YKHO, UBGL):\n YKHO._source_id = UBGL",
"def UBGL(YKHO, UBGL):\n if UBGL is None:\n raise ValueError('Invalid value for `source_id`, must not be `None`')\n YKHO._source_id =... | [
"0.8360772",
"0.828087",
"0.828087",
"0.798003",
"0.72521406",
"0.71138036",
"0.7015518",
"0.6578036",
"0.6526695",
"0.65239024",
"0.6492135",
"0.634931",
"0.634931",
"0.63388735",
"0.632033",
"0.62579215",
"0.62217927",
"0.6212664",
"0.6212622",
"0.6211954",
"0.6183537",
"... | 0.7979072 | 4 |
Sets the source of this SourceSchema. | def JZXy(YKHO, JZXy: List[StateSchema]):
if JZXy is None:
raise ValueError('Invalid value for `source`, must not be `None`')
YKHO._source = JZXy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xUuB(YKHO, JZXy):\n YKHO.data['source'] = JZXy",
"def JZXy(YKHO, JZXy):\n YKHO._source = JZXy",
"def JZXy(YKHO, JZXy):\n YKHO._source = JZXy",
"def JZXy(YKHO, JZXy):\n YKHO._source = JZXy",
"def JZXy(YKHO, JZXy):\n YKHO._source = JZXy",
"def JZXy(YKHO, JZXy):\n YKHO._source = JZXy",... | [
"0.7880129",
"0.75935674",
"0.75935674",
"0.75935674",
"0.75935674",
"0.75935674",
"0.75935674",
"0.75935674",
"0.75273",
"0.7499188",
"0.7447674",
"0.7394303",
"0.7374431",
"0.7339089",
"0.7145187",
"0.70432156",
"0.69777626",
"0.69777626",
"0.6923888",
"0.68695354",
"0.6804... | 0.747181 | 10 |
This function test the valid IP address will be saved | def Mnzg(rRzo, Ol8d):
PCmf = rRzo.split('.')
NgZO.info(Ol8d)
RCUs(_JMH(728, 516))
eMR1(str(PCmf[0]))
if len(PCmf[0]) < 3:
type(pe5E.TAB)
else:
type('a', vVvH.CTRL)
eMR1(str(PCmf[1]))
if len(PCmf[1]) < 3:
type(pe5E.TAB)
else:
type('a', vVvH.CTRL)
eM... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uKoB(YKHO):\n D8Ke = GGmw.gethostbyname(GGmw.gethostname())\n D8Ke = [int(YRbF) for YRbF in D8Ke.split('.')]\n assert len(D8Ke) == 4\n assert D8Ke[0] == 10\n assert D8Ke[1] == 137\n assert D8Ke[2] == 1\n assert D8Ke[3] >= 1 and D8Ke[3] <= 255",
"def pgzm():\n D8Ke = '1.1.1.1'\n ass... | [
"0.751344",
"0.7285146",
"0.7249641",
"0.7199421",
"0.7142184",
"0.7121088",
"0.70631504",
"0.6990609",
"0.695461",
"0.6885162",
"0.6871393",
"0.6852756",
"0.6837679",
"0.68362784",
"0.6824195",
"0.6816933",
"0.6713933",
"0.6711242",
"0.67022645",
"0.666929",
"0.6658758",
"... | 0.64658344 | 38 |
Test the unvalid IP address | def kDhW(MxXY, cWFu, ZQPE, re_p, Ol8d):
NgZO.info(Ol8d)
RCUs(_JMH(728, 516))
eMR1(str(MxXY))
if len(MxXY) < 3:
type(pe5E.TAB)
else:
type('a', vVvH.CTRL)
eMR1(str(cWFu))
if len(cWFu) < 3:
type(pe5E.TAB)
else:
type('a', vVvH.CTRL)
eMR1(str(ZQPE))
if ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nKVQ(YKHO, D8Ke):\n if not oo2j.checkIPAddrWithoutMask(D8Ke):\n raise _olT(kpDr('GENERAL', 'INVALID_IP_ADDRESS') % D8Ke)",
"def mty4(D8Ke):\n ...",
"def c61f():\n try:\n KCHu = GGmw.inet_aton(qIxc.target)\n except GGmw.error:\n print('')\n print(f'{vkps} Bad IP addre... | [
"0.8100674",
"0.8080593",
"0.8072465",
"0.7915526",
"0.7725667",
"0.77133286",
"0.76433736",
"0.76405567",
"0.7635958",
"0.75719017",
"0.7571086",
"0.75484586",
"0.75292194",
"0.7521892",
"0.7507904",
"0.75061595",
"0.75057834",
"0.7476333",
"0.74688935",
"0.74586",
"0.744213... | 0.0 | -1 |
Mean Arctangent Absolute Percentage Error | def DDEU(n5sN: np.ndarray, PjQx: np.ndarray):
return oyIN.mean(oyIN.arctan(oyIN.abs((n5sN - PjQx) / (n5sN + BVxk)))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DDEU(YKHO) -> float:\n return float(oyIN.mean(oyIN.arctan(oyIN.abs((YKHO.true - YKHO.predicted) / (YKHO.true + CzNp)))))",
"def Emt7(n5sN, PjQx):\n ii_g = oyIN.abs(n5sN - PjQx)\n return float(ii_g.mean())",
"def Emt7(a1PO, LVAh):\n return W4jA(a1PO, LVAh)",
"def ZqiB(YKHO) -> float:\n retu... | [
"0.71263194",
"0.68211216",
"0.68203205",
"0.67147535",
"0.6604331",
"0.6600438",
"0.6564151",
"0.6525782",
"0.6479799",
"0.647424",
"0.6469288",
"0.6465817",
"0.6458842",
"0.64391905",
"0.6432964",
"0.6428075",
"0.6418386",
"0.6414736",
"0.6395974",
"0.6375605",
"0.6363231",... | 0.6611123 | 4 |
Symmetric Mean Absolute Percentage Error | def n3m0(n5sN: np.ndarray, PjQx: np.ndarray):
return oyIN.mean(oyIN.divide(oyIN.abs(n5sN - PjQx), (oyIN.abs(n5sN) + oyIN.abs(PjQx) + oyIN.finfo(float).eps) * 0.5)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C0OV(OXDA: Tensor, OXTU: int) -> llWB:\n return OXDA / OXTU",
"def GmD5(OXDA: Tensor, OXTU: int) -> llWB:\n return OXDA / OXTU",
"def FI0x(OY7P: Tensor, cnd2: int) -> llWB:\n return OY7P / cnd2",
"def EVkr(e7tW, P1Cu, bIMr, o4yM):\n e7tW = oyIN.array(e7tW)\n bIMr = oyIN.array(bIMr)\n o4... | [
"0.7984505",
"0.7271417",
"0.70238733",
"0.6960333",
"0.69289076",
"0.68264985",
"0.68179744",
"0.67925465",
"0.6789411",
"0.6787597",
"0.6661828",
"0.6661828",
"0.66364896",
"0.6633226",
"0.66244555",
"0.65166587",
"0.6485501",
"0.6461034",
"0.6442152",
"0.6438563",
"0.64290... | 0.6187274 | 46 |
Returns the absolute path to the indicated data file stored under the 'data/' folder colocated with this module. | def OyQC(i0XC):
return Hy7s.path.dirname(Hy7s.path.realpath(xAKo)) + Hy7s.sep + i0XC | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s8df():\n return Hy7s.getcwd() + '/data/'",
"def s8df():\n pmON = Hy7s.path.join(Hy7s.path.dirname(xAKo), mkjs)\n Eu4W = Hy7s.path.abspath(pmON)\n if not Hy7s.path.exists(Eu4W):\n raise iJw0\n return Eu4W",
"def TNBq():\n return '..' + Hy7s.sep + 'data' + Hy7s.sep",
"def s8df():\... | [
"0.8665063",
"0.86533004",
"0.8613001",
"0.835773",
"0.8282328",
"0.81024015",
"0.8044464",
"0.80244017",
"0.8019964",
"0.7980718",
"0.7949705",
"0.7932424",
"0.7923546",
"0.7854824",
"0.78408027",
"0.7828998",
"0.7806845",
"0.7789293",
"0.77636874",
"0.77380025",
"0.77012616... | 0.81513727 | 5 |
Returns True if the types and values are the same. | def xa14(YKHO, Elif):
return YKHO.type == Elif.type and YKHO.value == Elif.value | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VC9h(YKHO, wNuL, Mlb1):\n if YKHO.f_supports(wNuL) != YKHO.f_supports(Mlb1):\n return False\n if not YKHO.f_supports(wNuL) and (not YKHO.f_supports(Mlb1)):\n raise TypeError('I do not support the types of both inputs (`%s` and `%s`), therefore I cannot judge whether the two are of same type... | [
"0.80351937",
"0.78741366",
"0.77644867",
"0.7698466",
"0.7614705",
"0.7556479",
"0.7370863",
"0.7100185",
"0.709661",
"0.70739865",
"0.7073445",
"0.70564276",
"0.6972106",
"0.68879265",
"0.6849391",
"0.68440783",
"0.6787801",
"0.670629",
"0.6698581",
"0.6692789",
"0.6691776"... | 0.6846985 | 15 |
The name of the company associated with this Stock. | def mWFP(YKHO):
return YKHO._name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def u8qZ(YKHO):\n if 'companyName' in YKHO._prop_dict:\n return YKHO._prop_dict['companyName']\n else:\n return None",
"def u8qZ(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'company_name')",
"def ubTE(YKHO, b9MO):\n return YKHO.db.select_company_name(b9MO)",
"def Hy08(YKHO):\n re... | [
"0.8355501",
"0.8252127",
"0.81619966",
"0.7995412",
"0.7614332",
"0.7614332",
"0.75054485",
"0.7444551",
"0.7430095",
"0.7424251",
"0.7085025",
"0.6762083",
"0.6760923",
"0.67401886",
"0.6685852",
"0.66094697",
"0.64340585",
"0.63975626",
"0.63522387",
"0.63446784",
"0.63136... | 0.0 | -1 |
Set the name of this Stock. | def mWFP(YKHO, mWFP):
YKHO._name = mWFP | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WZrJ(YKHO, mWFP):\n YKHO._name = mWFP",
"def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP",
"def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP",
"def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP",
"def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP",
"def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP",
"def zPdd(YKHO, mWFP)... | [
"0.82686764",
"0.8238836",
"0.8238836",
"0.8238836",
"0.8238836",
"0.8238836",
"0.82038474",
"0.8182663",
"0.8115692",
"0.8089347",
"0.8073546",
"0.805207",
"0.805207",
"0.8029298",
"0.8029298",
"0.8007828",
"0.7965118",
"0.7936267",
"0.7936267",
"0.7867074",
"0.78632426",
... | 0.7675622 | 39 |
The market this Stock is traded in. | def GT8I(YKHO):
return YKHO._market | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M4KY(YKHO):\n return YKHO.market",
"def SYlA(YKHO):\n return YKHO.__train_prop['ticker']",
"def Tjka(GT8I):\n return GT8I[-1]",
"def OUog(YKHO):\n return YKHO._stock_exchange",
"def Rr5q(YKHO):\n return YKHO._C_stock",
"def Dl3O():\n return Acvy(XBEM.TARGET_MARKETS)",
"def _KDp(YK... | [
"0.8479414",
"0.6752942",
"0.6742229",
"0.6701783",
"0.66812474",
"0.66744",
"0.65810895",
"0.6480096",
"0.6410698",
"0.6272628",
"0.62642443",
"0.62600577",
"0.62460387",
"0.621263",
"0.621263",
"0.6204755",
"0.6177224",
"0.61157995",
"0.61031985",
"0.60630023",
"0.6054271",... | 0.86703336 | 0 |
Set the market this Stock is traded in. | def GT8I(YKHO, GT8I):
YKHO._market = GT8I | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Dfvm(YKHO, GT8I: MarketEvent):\n YKHO._portfolio.update_market_value(GT8I)",
"def IYUG(YKHO, IYUG: float):\n if IYUG is None:\n raise ValueError('Invalid value for `trade`, must not be `None`')\n YKHO._trade = IYUG",
"def MUpl(YKHO, MUpl):\n if MUpl is None:\n raise ValueError('In... | [
"0.6286877",
"0.60998654",
"0.60863835",
"0.600833",
"0.59894824",
"0.5924932",
"0.589315",
"0.58679235",
"0.58330905",
"0.5823143",
"0.57429796",
"0.5694203",
"0.5628661",
"0.5593688",
"0.55125326",
"0.5445756",
"0.5417705",
"0.5396171",
"0.53932947",
"0.53810024",
"0.537136... | 0.8283994 | 0 |
Set the revenue per market cap. | def RXeq(YKHO, RXeq):
YKHO._pe_ratio = RXeq | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A3np(YKHO) -> float:\n McuB = YKHO.demand_served() * YKHO.inputs.revenue_per_m3\n return McuB + YKHO.revenue_landfill()",
"def Mkmy(WKvO):\n ytwJ = HBEc * WKvO\n return ytwJ",
"def ZJGP(YKHO, T9qQ):\n pass",
"def DCK2(YKHO, pQ4c: int, PyVm: float) -> float:\n NrlN = YKHO.capital * ((1.0... | [
"0.6061146",
"0.586547",
"0.58105975",
"0.578652",
"0.5729379",
"0.5641834",
"0.5556773",
"0.5544031",
"0.5524396",
"0.5474875",
"0.5360377",
"0.5360377",
"0.535134",
"0.5343912",
"0.5252631",
"0.521897",
"0.52160734",
"0.5207761",
"0.518836",
"0.5156886",
"0.5132023",
"0.5... | 0.0 | -1 |
Checks whether the region type is valid in CRTF format | def _KbN():
mzGW = 'hyperbola[[18h12m24s, -23d11m00s], 2.3arcsec]'
with trZe.raises(WNLd) as zK6_:
Haf5.parse(mzGW, format='crtf')
assert 'Not a valid CRTF Region type: "hyperbola"' in str(zK6_.value) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xvwL(YKHO):\n if YKHO.region_type not in AOkv:\n raise ValueError(\"'{}' is not a valid region type in this packagesupported by CRTF\".format(YKHO.region_type))\n if YKHO.coordsys not in oN6s['CRTF']:\n raise ValueError(\"'{}' is not a valid coordinate reference frame in astropy supported b... | [
"0.76998967",
"0.6557505",
"0.62991804",
"0.6064255",
"0.6013864",
"0.60021484",
"0.5830083",
"0.5794553",
"0.5695507",
"0.56873155",
"0.5646396",
"0.5640338",
"0.5635461",
"0.56344134",
"0.55852085",
"0.5580561",
"0.55454314",
"0.5538473",
"0.54316336",
"0.54048306",
"0.5402... | 0.70973265 | 1 |
r"""Gets details of a single Cluster. | def xP7V(YKHO, QePW, jMd6=None):
GPtr = YKHO.GetMethodConfig('Get')
return YKHO._RunMethod(GPtr, QePW, global_params=jMd6) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HVIl(c0yN, f5m3):\n QgMl = dict()\n QgMl.update(P4t4.clusters[c0yN].__dict__)\n QgMl.pop('auth_data', None)\n QgMl['connection'] = P4t4.managers[c0yN]._client.state\n _hkX = oGir(qQXR.dumps(QgMl), status=200, mimetype='application/json')\n return _hkX",
"def oT52(mWFP: str) -> PwH5:\n Gi... | [
"0.7688785",
"0.75866675",
"0.73177177",
"0.7268437",
"0.7075167",
"0.7062712",
"0.7060756",
"0.7026709",
"0.700013",
"0.69541407",
"0.6943902",
"0.6943902",
"0.6932986",
"0.6873242",
"0.68467164",
"0.6832071",
"0.6754254",
"0.67508876",
"0.6710992",
"0.6682692",
"0.66444176"... | 0.0 | -1 |
r"""Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. | def zJtK(YKHO, QePW, jMd6=None):
GPtr = YKHO.GetMethodConfig('GetIamPolicy')
return YKHO._RunMethod(GPtr, QePW, global_params=jMd6) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qabx(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'policy')",
"def RmIS(YKHO, QePW, jMd6=None):\n GPtr = YKHO.GetMethodConfig('GetPolicy')\n return YKHO._RunMethod(GPtr, QePW, global_params=jMd6)",
"def Qabx(YKHO) -> h8nf[qe4Y.Input['ServicePolicyArgs']]:\n return qe4Y.get(YKHO, 'policy')",
"d... | [
"0.6401397",
"0.6327003",
"0.6309178",
"0.6309178",
"0.6294312",
"0.6246665",
"0.6238207",
"0.6238207",
"0.62309676",
"0.6223123",
"0.61790425",
"0.61739725",
"0.61739725",
"0.61739725",
"0.61679745",
"0.6141191",
"0.612441",
"0.6118661",
"0.6116921",
"0.61140686",
"0.6087465... | 0.0 | -1 |
Returns the coverage for a given chromosome as a numpy.array. | def N85S(YKHO, u54L):
vFZ1 = oyIN.array(VNqG(u54L))
for YRbF in range(0, u54L):
vFZ1[YRbF] = YKHO.coverage(aWuw, YRbF) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g_hr(q7V9: Chromosome) -> oyIN.ndarray:\n tsWk = len(q7V9.sequence)\n ezWE = oyIN.zeros((tsWk - 2,), dtype=oyIN.int)\n for eHNT in q7V9.features:\n if eHNT.type != 'CDS':\n continue\n if eHNT.strand == '-':\n continue\n VW3a = (eHNT.end - eHNT.start) // 3\n ... | [
"0.7548198",
"0.6989481",
"0.6375022",
"0.6281755",
"0.6167503",
"0.611115",
"0.59425646",
"0.59393924",
"0.5873697",
"0.5763089",
"0.5592977",
"0.5540678",
"0.5533475",
"0.54621303",
"0.54189223",
"0.5390265",
"0.53751206",
"0.53498065",
"0.53346527",
"0.5306799",
"0.5235013... | 0.7295931 | 1 |
Returns True if n is a prime, and False it is a composite by trying to divide it by two and all the odd numbers lesser than or equal to the value in the position K. Returns None if test is inconclusive. | def u_y_(exwG, nMvt=100):
if exwG % 2 == 0:
return exwG == 2
if exwG in Z3L5.lessThanHundredThousand:
return True
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T1qg(exwG, G1Hx):\n if exwG <= 1 or exwG == 4:\n return False\n if exwG <= 3:\n return True\n if ubP8(exwG):\n return False\n while G1Hx > 0:\n jzdc = tuKI.randint(2, exwG - 1)\n if ML2l(exwG, jzdc) != 1:\n return False\n if WQiS(jzdc, exwG - 1, ... | [
"0.74357015",
"0.731782",
"0.7311119",
"0.717771",
"0.71527344",
"0.71204925",
"0.71063787",
"0.70990884",
"0.702568",
"0.7013384",
"0.69846207",
"0.6954042",
"0.690117",
"0.6888829",
"0.6875123",
"0.68724287",
"0.68572426",
"0.68443406",
"0.6841368",
"0.6841368",
"0.6827087"... | 0.7840354 | 0 |
The density of the sparse matrixthat is, the number of nonzero elements per row divided by the length of a row. | def InLe(YKHO):
return YKHO.nnz / YKHO.dim | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MSMZ(SppC):\n return SppC.getnnz() / (SppC.shape[0] * SppC.shape[1])",
"def InLe(YKHO):\n return YKHO.nnz / YKHO.size",
"def InLe(vhpA):\n waS5 = vhpA.abs().gt(0).sum()\n return float(waS5.item()) / ht2j.numel(vhpA)",
"def InLe(YKHO):\n return YKHO.count_ones() / float(YKHO.xspan * YKHO.ys... | [
"0.7897565",
"0.7803707",
"0.6861916",
"0.6744389",
"0.66349286",
"0.6461354",
"0.6453647",
"0.6378891",
"0.627",
"0.61604875",
"0.6159487",
"0.6093237",
"0.6042236",
"0.6042236",
"0.6042236",
"0.60359555",
"0.60097235",
"0.5959616",
"0.5934346",
"0.5932718",
"0.5885556",
"... | 0.78363645 | 1 |
Get the representation of the operator in the (mask, sign, coefficient) | def sj6d(YKHO, MaSe=None, GDMi=False):
if MaSe is None:
if YKHO._MSC is None:
YKHO._MSC = YKHO._get_MSC()
return YKHO._MSC
else:
return YKHO._get_MSC(MaSe, wrap=GDMi) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OfrP(H5ew):\n if H5ew.startswith('re_'):\n seET = oyIN.real\n aRpU = H5ew[3:]\n elif H5ew.startswith('im_'):\n seET = oyIN.imag\n aRpU = H5ew[3:]\n elif H5ew.startswith('abs_'):\n seET = oyIN.abs\n aRpU = H5ew[4:]\n else:\n seET = None\n aRpU ... | [
"0.65425664",
"0.61764455",
"0.6144061",
"0.6116314",
"0.61015916",
"0.60782915",
"0.6009125",
"0.5982865",
"0.59713227",
"0.59678555",
"0.5949723",
"0.59272075",
"0.58483416",
"0.5828794",
"0.5828794",
"0.58127415",
"0.5797213",
"0.5748041",
"0.5748041",
"0.5745424",
"0.5731... | 0.0 | -1 |
Test if user that is not registered can get the email | def aWkv(YKHO):
geh0 = YKHO.client.post(YKHO.password_reset_url, YKHO.email_not_registered, format='json')
YKHO.assertEqual(geh0.status_code, jGRS.HTTP_400_BAD_REQUEST)
YKHO.assertEqual(qQXR.loads(geh0.content), {'errors': {'email': ['User with this email does not exist.']}}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Bt7w(YKHO, BWXx):\n if not mv1M.objects.filter(email=BWXx).exists():\n raise IyFz.ValidationError('User with this email does not exist.')\n return BWXx",
"def Bt7w(YKHO, BWXx):\n if not mv1M.objects.filter(email=BWXx).exists():\n raise IyFz.ValidationError('User with this email does no... | [
"0.7383407",
"0.7383407",
"0.73522377",
"0.7232632",
"0.71616143",
"0.71273553",
"0.7100953",
"0.70613974",
"0.7056952",
"0.7048699",
"0.7035696",
"0.70348406",
"0.7018469",
"0.70132256",
"0.70072025",
"0.69810826",
"0.69632065",
"0.6946505",
"0.69321537",
"0.6925532",
"0.690... | 0.69849044 | 15 |
Returns the position of the Knot whose statespace has the lowest entropy. | def W58s(YKHO):
h_LB = float('inf')
for oPTK in YKHO.wait_to_collapse:
ARTs = tuKI.random() / 1000
if YKHO[oPTK].entropy - ARTs < h_LB:
dQgj = oPTK[:]
h_LB = YKHO[dQgj].entropy - ARTs
return dQgj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vh0y(Cs6h):\n cL1f = epAf.inf\n FEH7 = []\n for YRbF in range(len(Cs6h[0])):\n for r845 in range(len(Cs6h)):\n if not Cs6h[r845][YRbF].collapsed:\n yzQ0 = Cs6h[r845][YRbF].block_weights\n OxsJ = sum([-epAf.log(geyT) for geyT in yzQ0])\n if... | [
"0.6638354",
"0.6349472",
"0.6206943",
"0.6167542",
"0.61297476",
"0.6117415",
"0.6096334",
"0.6072252",
"0.6064889",
"0.60195637",
"0.6003861",
"0.59856623",
"0.5978985",
"0.596013",
"0.59564626",
"0.5954064",
"0.5947811",
"0.5898324",
"0.5881373",
"0.5878293",
"0.586943",
... | 0.7533803 | 0 |
Yields neighboring Knots and their directions of a given `position`. | def AAbN(YKHO, dQgj):
if YKHO.options['PeriOpt']:
if dQgj[0] == 0:
yield ((YKHO.size[0] - 1, dQgj[1]), 0)
elif dQgj[0] == YKHO.size[0] - 1:
yield ((0, dQgj[1]), 1)
if dQgj[1] == 0:
yield ((dQgj[0], YKHO.size[1] - 1), 2)
elif dQgj[1] == YKHO.size[1]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _v97(dQgj):\n return iter(EoIA[dQgj])",
"def XSKz(YKHO, _jo8):\n ur7Y = YKHO.board_to_connection_index(_jo8)\n rdlD = YKHO.connection_matrix[ur7Y]\n bdGm = []\n for DT55 in range(0, len(rdlD)):\n if rdlD[DT55]:\n FUS4 = YKHO.connection_to_board_index(DT55)\n if YKH... | [
"0.61075956",
"0.6088314",
"0.57958126",
"0.57522845",
"0.56867534",
"0.5659933",
"0.5645656",
"0.5541702",
"0.55407655",
"0.5526952",
"0.5448167",
"0.53663176",
"0.536037",
"0.5325601",
"0.5317667",
"0.5218648",
"0.52039146",
"0.5163547",
"0.5154481",
"0.5150301",
"0.5141945... | 0.69416916 | 0 |
Returns total seconds represented by a datetime.timedelta object. | def Zhzg(g75m):
return (g75m.microseconds + (g75m.seconds + g75m.days * 24 * 3600) * 1000000.0) / 1000000.0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def z0YJ(g75m):\n return (g75m.microseconds + (g75m.seconds + g75m.days * 24 * 3600) * 10 ** 6) / 10 ** 6",
"def z0YJ(YKHO):\n return ((YKHO.days * 86400 + YKHO.seconds) * 10 ** 6 + YKHO.microseconds) / 10 ** 6",
"def z0YJ(RA_F):\n try:\n return RA_F.total_seconds()\n except AttributeError:\... | [
"0.7785865",
"0.7658821",
"0.7639121",
"0.75352657",
"0.7376265",
"0.7234179",
"0.7190544",
"0.7107655",
"0.70819324",
"0.70671886",
"0.70211244",
"0.69546527",
"0.69546527",
"0.6851196",
"0.681582",
"0.6751442",
"0.6710503",
"0.6709221",
"0.6666859",
"0.6639251",
"0.6638927"... | 0.7707235 | 1 |
Computes the cumulative distribution of a dataset. | def IOiI(nPrm, aVkX, range=None, AXJc=True, NLME=False):
ELWn, bK54 = oyIN.histogram(nPrm, aVkX, range, AXJc)
ELWn = ELWn.cumsum()
if NLME:
WH_7 = 0.5 * (bK54[-1] - bK54[0]) / aVkX
bK54 += WH_7
if AXJc:
CkYf = 1.0 / ELWn[-1]
ELWn *= CkYf
return (bK54[:-1], ELWn)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHtf(YKHO, EcVT):\n raise NotImplementedError",
"def u14S(YKHO):\n g2VT = kuG0(C77I)\n g2VT.fit(YKHO.data.to_numpy())\n EcVT = oyIN.array([2000.0, 200.0, 1.0])\n Ggta = 0.4550595153746892\n Aofo = g2VT.cumulative_distribution(EcVT)\n assert oyIN.isclose(Aofo, Ggta, atol=1e-05).all().all(... | [
"0.76917243",
"0.7009624",
"0.6913743",
"0.68286425",
"0.6757748",
"0.675588",
"0.6751237",
"0.66086197",
"0.65746015",
"0.6514815",
"0.6475707",
"0.6403158",
"0.6369984",
"0.6340523",
"0.6304046",
"0.630065",
"0.6201614",
"0.61941814",
"0.61222583",
"0.6069135",
"0.6034362",... | 0.6789889 | 4 |
Finds the 1st, 2nd and 3rd quartiles of a dataset. | def jviO(nPrm):
vexM = oyIN.percentile(nPrm, [25, 50, 75])
return (vexM[0], vexM[1], vexM[2]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tlmz(Emd4, nPrm: tuple or list) -> tuple:\n Emd4._data_validation(nPrm)\n from math import floor\n exwG = Emd4.get_n(nPrm)\n if exwG == 0:\n return (0, 0, 0, 0)\n O_7m = sorted(list(nPrm))\n yAhy = True if exwG % 2 == 1 else False\n NvrF = floor(exwG / 2)\n ctED = floor(exwG / 2)... | [
"0.77415645",
"0.7531217",
"0.7426699",
"0.7099109",
"0.6815998",
"0.67567486",
"0.6698048",
"0.662714",
"0.66183525",
"0.6597815",
"0.65792227",
"0.65275645",
"0.64962065",
"0.6422223",
"0.64112675",
"0.63897896",
"0.6355377",
"0.6345474",
"0.63252634",
"0.6306161",
"0.62980... | 0.79789907 | 0 |
Given a set, finds all combinations of given size. Returns a list with all possible permutations of length <= comblength of the elements in data. If N is the length of the data, the number of combinations of length 'comblength' is the binomial coefficient BinomialCoefficient(N,comblength). | def Mvog(nPrm, Ea7H):
return [Z9rn for Z9rn in Hs6x.combinations(nPrm, Ea7H)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vzor(nPrm, Ea7H):\n Ea7H = int(Ea7H)\n if Ea7H < 1 or Ea7H >= tipY:\n raise ValueError(\"'comblength' out of range, please make sure 0 < comblength < len(data).\")\n E6VQ = [Z9rn for Z9rn in Hs6x.combinations(nPrm, Ea7H)]\n RRvN = []\n if EfG5 and Ea7H == knrW:\n lYCG = len(E6VQ)\n... | [
"0.7559354",
"0.7201703",
"0.69321585",
"0.67683893",
"0.67120063",
"0.66901094",
"0.6629796",
"0.6613789",
"0.659548",
"0.6494228",
"0.64605784",
"0.6448944",
"0.64423287",
"0.6392903",
"0.6278522",
"0.6266506",
"0.625203",
"0.62080836",
"0.6163596",
"0.61609024",
"0.6148451... | 0.78086025 | 0 |
Given a dataset, finds all bipartitions in which one of the subsets is of size 'comblength'. The size of the complementary subset is N 'comblength', where N is the size of the data. | def Vzor(nPrm, Ea7H):
Ea7H = int(Ea7H)
if Ea7H < 1 or Ea7H >= tipY:
raise ValueError("'comblength' out of range, please make sure 0 < comblength < len(data).")
E6VQ = [Z9rn for Z9rn in Hs6x.combinations(nPrm, Ea7H)]
RRvN = []
if EfG5 and Ea7H == knrW:
lYCG = len(E6VQ)
for YRb... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SxzF(nPrm, Ea7H=None):\n tipY = len(nPrm)\n EfG5 = tipY % 2 == 0\n knrW = tipY // 2\n BCWz = set(nPrm)\n if Ea7H == 0:\n raise ValueError(\"'comblength' out of range, please make sure 0 < comblength < len(data).\")\n\n def Tm4B(nPrm):\n \"\"\"Given a dataset, it finds all bipart... | [
"0.81097865",
"0.72212464",
"0.692126",
"0.67837775",
"0.6156119",
"0.61357164",
"0.60753214",
"0.60753214",
"0.6012841",
"0.5983464",
"0.59388417",
"0.59038335",
"0.580175",
"0.5754516",
"0.5632561",
"0.5603893",
"0.55912876",
"0.5579633",
"0.5574327",
"0.55675143",
"0.55494... | 0.84244347 | 0 |
Page not found in all apps. | def o3cf(YKHO, QePW):
return 'Not found' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m7kB(tTpl):\n return ('Sorry, nothing at this URL.', 404)",
"def m7kB(tTpl):\n return ('Sorry, nothing at this URL.', 404)",
"def m7kB(tTpl):\n return ('Sorry, nothing at this URL.', 404)",
"def m7kB(tTpl):\n return ('Sorry, nothing at this URL.', 404)",
"def m7kB(tTpl):\n return ('Sorry... | [
"0.77562106",
"0.77562106",
"0.77562106",
"0.77562106",
"0.77562106",
"0.77562106",
"0.77562106",
"0.7754001",
"0.7754001",
"0.7754001",
"0.7754001",
"0.7754001",
"0.7754001",
"0.7754001",
"0.7754001",
"0.77415085",
"0.7703986",
"0.7703785",
"0.77036",
"0.7700083",
"0.7672294... | 0.71450055 | 46 |
linfinity distance between vectors (AMDs). | def K7j0(Ty9i, m07n):
return oyIN.amax(oyIN.abs(Ty9i - m07n)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Q1Zj(YKHO, lSjb, v8Fa):\n return PZyS(sum([(float(hQHm) - float(jlSq)) ** 2 for hQHm, jlSq in zip(lSjb, v8Fa)]))",
"def YoW1(hQHm, jlSq):\n Aofo = []\n for YRbF in range(0, len(hQHm)):\n if hQHm[YRbF] == jlSq[YRbF]:\n Aofo.append(0)\n elif (hQHm[YRbF] == float('inf') or hQHm... | [
"0.6396874",
"0.63282776",
"0.628249",
"0.6263486",
"0.6233567",
"0.6228044",
"0.61418283",
"0.61053854",
"0.60879314",
"0.6059225",
"0.6056888",
"0.6035465",
"0.6012867",
"0.6011812",
"0.59810036",
"0.59739274",
"0.5969925",
"0.59654856",
"0.5928009",
"0.59250295",
"0.591117... | 0.5631198 | 73 |
Earth mover's distance between two PDDs. | def g8U6(EBEs, e_EY, AcYW='chebyshev', **B2fa):
from .core.Wasserstein import wasserstein
p37X = iNVJ(EBEs[:, 1:], e_EY[:, 1:], metric=AcYW, **B2fa)
return wasserstein(EBEs[:, 0], e_EY[:, 0], p37X) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jc10(CB6B, to8X):\n if isinstance(CB6B, oCHH):\n CB6B = CB6B.to_global_waypoint()\n if isinstance(to8X, oCHH):\n to8X = to8X.to_global_waypoint()\n if isinstance(CB6B, tO9_.Waypoint):\n CB6B = fT_N.from_waypoint_message(CB6B)\n if CB6B is None:\n return None\n ... | [
"0.6616971",
"0.6608936",
"0.6606888",
"0.66053146",
"0.65984625",
"0.65682256",
"0.6524367",
"0.64684427",
"0.6455242",
"0.6446824",
"0.64438987",
"0.6438073",
"0.6433515",
"0.64135844",
"0.6387846",
"0.63837963",
"0.6370962",
"0.6358328",
"0.6355808",
"0.6355128",
"0.635052... | 0.0 | -1 |
Remove folder 'foo' and subfolders at setup and teardown. | def hnYR(QePW):
pmON = khtY.join('tests/data', 'foo')
def HySU():
if Hy7s.path.exists(pmON):
RDuA.rmtree(pmON)
HySU()
QePW.addfinalizer(HySU)
return pmON | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tBIc(YKHO):\n for tk5Y, AQSv, RRlC in Hy7s.walk(Wya9, topdown=False):\n for mWFP in RRlC:\n Hy7s.remove(Hy7s.path.join(tk5Y, mWFP))\n for mWFP in AQSv:\n Hy7s.rmdir(Hy7s.path.join(tk5Y, mWFP))\n Hy7s.rmdir(tk5Y)",
"def tBIc(YKHO):\n for Csk6 in Hy7s.listdir(wX... | [
"0.72991216",
"0.7100837",
"0.70377254",
"0.7009992",
"0.7009992",
"0.7008049",
"0.69919807",
"0.6971281",
"0.69678265",
"0.69440514",
"0.6918657",
"0.6918657",
"0.6889609",
"0.68848073",
"0.6806415",
"0.6763796",
"0.67540056",
"0.6725217",
"0.6723914",
"0.6719491",
"0.670834... | 0.72521317 | 1 |
Test that correct emoji is returned for deleted status | def qZ87(YKHO):
YKHO.assertEqual(FnUC('DELETED'), ':x:') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OlD0(YKHO):\n YKHO.assertEqual(FnUC(None), '')",
"def ikDD():\n oVDR = mxie()\n assert oVDR.transform([[':test_emoji:']])['corpus'][0] == ''\n assert not oVDR.drops['emoji'].dropna().empty",
"def WI8u(YKHO):\n YKHO.assertEqual(FnUC('MODIFIED'), ':warning:')",
"def c2zO(YKHO):\n YKHO.ass... | [
"0.68940103",
"0.66425824",
"0.6634938",
"0.6180687",
"0.61600906",
"0.61288124",
"0.6064771",
"0.60625064",
"0.60175896",
"0.59569645",
"0.595349",
"0.59413576",
"0.5901302",
"0.5900255",
"0.5889953",
"0.5851411",
"0.5832148",
"0.57977325",
"0.5773636",
"0.57701564",
"0.5764... | 0.88308996 | 0 |
Check if the binary symbol s is a commutative operation in the model | def o7Pa(YKHO, KCHu):
return all((YKHO.operations[KCHu][WKvO][LVAh] == YKHO.operations[KCHu][LVAh][WKvO] for WKvO in range(YKHO.cardinality) for LVAh in range(YKHO.cardinality))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o7Pa(YKHO, Q6kx):\n return Q6kx.name in Si_L",
"def yG_o(OKsI):\n if OKsI == '' or OKsI is None:\n return None\n kysj = eval(OKsI)\n jzdc = FCE9.Symbol('a')\n Fg_i = FCE9.Symbol('b')\n try:\n xRJo = kysj(jzdc, Fg_i)\n ITPY = kysj(Fg_i, jzdc)\n except (TypeError, Attr... | [
"0.7264537",
"0.67819613",
"0.6682001",
"0.6677731",
"0.6476577",
"0.6039049",
"0.5987633",
"0.59771204",
"0.5973414",
"0.597118",
"0.59017897",
"0.58713436",
"0.58385414",
"0.5799773",
"0.57830954",
"0.57505375",
"0.57452816",
"0.571884",
"0.5702474",
"0.5699611",
"0.5698572... | 0.7829457 | 0 |
Return True if some model of self is not a model of cls (in given time) | def zDIt(YKHO, Emd4, C6wh=60):
aevO = '(' + ') & ('.join(Emd4.axioms) + ')'
r8hN = RFVS(YKHO.axioms, [aevO], C6wh, 1, options=YKHO.options)
if type(r8hN) == list:
return (True, r8hN[0])
else:
return (False, r8hN) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, FtLW):\n return YKHO.date != FtLW.date or YKHO.time_of_day != FtLW.time_of_day",
"def Fkab(YKHO) -> bool:\n return YKHO.times > 1",
"def OJWa(YKHO):\n YKHO.assertTrue(issubclass(YKHO.rev.__class__, KcDH), True)",
"def Vdqg(YKHO, Elif):\n if not isinstance(Elif, nczy):\n retu... | [
"0.64281946",
"0.63915133",
"0.62804604",
"0.6216732",
"0.6208856",
"0.6198486",
"0.6091048",
"0.608391",
"0.6062241",
"0.606158",
"0.5971495",
"0.59363204",
"0.5909583",
"0.59031135",
"0.58869886",
"0.58730865",
"0.5822353",
"0.58191556",
"0.5802999",
"0.5783695",
"0.5778052... | 0.6362145 | 2 |
Summarise a list with duplicates by counting how often each item appears | def BWz1(BDwY):
Csk6 = {}
for WKvO in BDwY:
Csk6[WKvO] = Csk6.get(WKvO, 0) + 1
return dict(sorted(([WKvO, Csk6[WKvO]] for WKvO in Csk6))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gezE(OxJJ):\n return {H5ew for H5ew, UHFx in mBkc(OxJJ).items() if UHFx > 1}",
"def bOA_(vC9B):\n return dict(((vC9B.count(WhY1), WhY1) for WhY1 in vC9B))",
"def xFUr(DumB):\n vR2X = set()\n for ZfUD in DumB:\n if DumB.count(ZfUD) > 1:\n vR2X.add(ZfUD)\n WLxG = list(vR2X)\n... | [
"0.69966114",
"0.69915146",
"0.69504386",
"0.6765103",
"0.67624986",
"0.66214913",
"0.65832025",
"0.64946216",
"0.6478724",
"0.64211226",
"0.64114183",
"0.6399849",
"0.63565785",
"0.63376236",
"0.6330287",
"0.6317333",
"0.6273729",
"0.62722945",
"0.62408376",
"0.6224359",
"0.... | 0.6812722 | 3 |
Test case for otoroshi_controllers_adminapi_templates_controller_template_spec | def vaTD(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EWnt(YKHO):\n pass",
"def sLBy(YKHO):\n pass",
"def CXp8(YKHO):\n pass",
"def quvj(YKHO):\n pass",
"def hUQI(YKHO):\n pass",
"def jHWh(YKHO):\n pass",
"def rcRW(YKHO):\n im04 = g6r9.get('/templates')\n Aofo = im04.json()\n aEqx = gnPz.MOCK_TEMPLATE_LIST\n YKHO.assertEq... | [
"0.7717394",
"0.7430598",
"0.6890855",
"0.68571156",
"0.6749655",
"0.67490464",
"0.6648409",
"0.66386586",
"0.65750694",
"0.65576047",
"0.6533697",
"0.65316844",
"0.6503687",
"0.6503687",
"0.6488502",
"0.6450554",
"0.64130664",
"0.6384379",
"0.63842994",
"0.63751024",
"0.6369... | 0.95213 | 0 |
Returns a configuration key's value for a guild. | async def config_get(YKHO, lSCo: Guild, mWFP: str):
return await YKHO.redis.get(f'{lSCo.id}:{mWFP}', encoding='utf-8') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XkdC(YKHO, lSCo: Guild):\n try:\n return YKHO._config_cache.get(lSCo.id)\n except KeyError:\n return YKHO.config.hgetall(f'guilds:{lSCo.id}')",
"async def get_guild_config(OaeV):\n LRlk = OaeV.guild.id\n i8vI = OaeV.bot.db_cache.get(LRlk)\n if not i8vI:\n i8vI = await eHpk... | [
"0.69600433",
"0.676314",
"0.66826135",
"0.65594995",
"0.6491908",
"0.64166313",
"0.6411674",
"0.6377647",
"0.6374771",
"0.634086",
"0.6278821",
"0.614717",
"0.6105389",
"0.6050673",
"0.60354257",
"0.60297847",
"0.60040516",
"0.5988258",
"0.59730566",
"0.5968486",
"0.59538025... | 0.7410673 | 0 |
returns a descriptive string representation of the model. | def wHJl(YKHO):
return YKHO.description | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n C3ST = YKHO._meta.verbose_name.title()\n return f'{C3ST:s}: {YKHO.name:s}'",
"def zAg0(YKHO):\n C3ST = YKHO._meta.verbose_name.title()\n return f'{C3ST:s}: {YKHO.name:s}'",
"def zAg0(YKHO):\n return '%s%s' % (YKHO.name, ' - %s' % YKHO.model if YKHO.model else '')",
"def zAg0(... | [
"0.8336697",
"0.8336697",
"0.82503355",
"0.8227392",
"0.8159128",
"0.8042023",
"0.8004978",
"0.7982771",
"0.78100693",
"0.7746835",
"0.774553",
"0.77331215",
"0.7665885",
"0.76411104",
"0.7624742",
"0.7624446",
"0.7581699",
"0.7532804",
"0.7495108",
"0.7488425",
"0.7463667",
... | 0.0 | -1 |
The maximum number of artifacts allowed for the action type. | def Aeea(YKHO) -> qe4Y.Input[int]:
return qe4Y.get(YKHO, 'maximum_count') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E0wO(YKHO):\n raise NotImplementedError()",
"def ANdr(YKHO):\n return None",
"def E0wO(YKHO):\n zNig = 1\n for or8S in YKHO.config.index_specs:\n zNig *= len(or8S.distribution)\n return zNig",
"def VAAb(YKHO):\n return 333",
"def ph8c(YKHO) -> int:\n return YKHO.max_order_qu... | [
"0.6428912",
"0.6199278",
"0.61662596",
"0.61324346",
"0.60740244",
"0.60708416",
"0.6055091",
"0.5998627",
"0.5983144",
"0.5941226",
"0.59152895",
"0.5893206",
"0.5884744",
"0.5855084",
"0.5848474",
"0.58325183",
"0.58257127",
"0.58237565",
"0.58155805",
"0.57958394",
"0.578... | 0.53188354 | 88 |
Whether the configuration property is a required value. | def jeGQ(YKHO) -> qe4Y.Input[bool]:
return qe4Y.get(YKHO, 'required') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jeGQ(YKHO) -> h8nf[qe4Y.Input[bool]]:\n return qe4Y.get(YKHO, 'required')",
"def jeGQ(YKHO) -> h8nf[qe4Y.Input[bool]]:\n return qe4Y.get(YKHO, 'required')",
"def glsA(YKHO):\n return YKHO.default == YKHO.NotSpecified",
"def glsA(YKHO) -> bool:\n return YKHO.required",
"def jeGQ(YKHO) -> boo... | [
"0.76441187",
"0.76441187",
"0.7565553",
"0.7533416",
"0.75169975",
"0.749064",
"0.7403104",
"0.7316761",
"0.72501576",
"0.6990858",
"0.6949851",
"0.69027567",
"0.68969893",
"0.6861094",
"0.6774596",
"0.6774596",
"0.66953653",
"0.661187",
"0.6584321",
"0.6565778",
"0.65468174... | 0.7650305 | 0 |
The description of the action configuration property that is displayed to users. | def JBZA(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'description') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JBZA(YKHO) -> w4ot:\n return YKHO._description",
"def JBZA(YKHO):\n return YKHO.__class__.get_setting_description(YKHO.key, **YKHO.get_kwargs())",
"def JBZA(YKHO):\n if 'description' in YKHO._prop_dict:\n return YKHO._prop_dict['description']\n else:\n return None",
"def JBZA(YK... | [
"0.7334889",
"0.7047611",
"0.6924214",
"0.6910781",
"0.6863423",
"0.6626874",
"0.6626874",
"0.6626874",
"0.6626874",
"0.6626874",
"0.6622725",
"0.6589058",
"0.652234",
"0.652234",
"0.65108716",
"0.6486574",
"0.6486574",
"0.6486574",
"0.6486574",
"0.6486574",
"0.6486574",
"0... | 0.0 | -1 |
Indicates that the property is used with PollForJobs. When creating a custom action, an action can have up to one queryable property. If it has one, that property must be both required and not secret.If you create a pipeline with a custom action type, and that custom action contains a queryable property, the value for ... | def x1zE(YKHO) -> h8nf[qe4Y.Input[bool]]:
return qe4Y.get(YKHO, 'queryable') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def property(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'property')",
"def Nxkc(YKHO) -> str:\n return f'{YKHO.action}={YKHO.amount}/{YKHO.per}'",
"def xzCw(Emd4, **B2fa: Any) -> None:\n BcCR = B2fa.get('max_length', None)\n if BcCR <= 0:\n raise t4gY('Parameter max_length is re... | [
"0.5100465",
"0.49284878",
"0.49029276",
"0.49012324",
"0.48695537",
"0.48632783",
"0.4852182",
"0.48521236",
"0.4837107",
"0.48072967",
"0.4767597",
"0.4755014",
"0.4755014",
"0.4755014",
"0.4755014",
"0.473142",
"0.47312337",
"0.4729814",
"0.47288248",
"0.46953678",
"0.4688... | 0.0 | -1 |
Empirical confidence interval for a sample distribution | def WZyy(WKvO, Cwt5=0.05):
WKvO = oyIN.asarray(WKvO)
fUYa = WKvO.size
KCHu = oyIN.argsort(WKvO)
Z9rn = int(Cwt5 / 2 * fUYa)
return Kx1f(WKvO[KCHu[Z9rn - 1]], WKvO[KCHu[fUYa - Z9rn]]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def la9G(gGnb, O3ch):\n JBMS = Zxt2.mean(gGnb)\n u2KW = Zxt2.std(gGnb)\n exwG = len(gGnb)\n jQ3Z = exwG - 1\n a1PO = hOed.t.ppf((1 + O3ch) / 2.0, jQ3Z)\n VOlW = hqc_, EWnO = (JBMS - a1PO * u2KW / epAf.sqrt(exwG), JBMS + a1PO * u2KW / epAf.sqrt(exwG))\n NzMs = EWnO - hqc_\n ZDiD = NzMs / JBM... | [
"0.71988654",
"0.71415883",
"0.69903654",
"0.6807079",
"0.67864764",
"0.67781603",
"0.6731597",
"0.6720846",
"0.6642634",
"0.6642138",
"0.65838975",
"0.6542895",
"0.6412641",
"0.64099145",
"0.640758",
"0.63971215",
"0.638413",
"0.6299119",
"0.6294555",
"0.62855005",
"0.624820... | 0.0 | -1 |
Get the interquartile range with an additional factor extension | def n0b6(WKvO, aM8h=1.5):
fUYa = oyIN.sort(oyIN.asarray(WKvO))
x2Pk, Bu_I = (int(0.25 * fUYa.size), int(0.75 * fUYa.size))
vC9B = (fUYa[x2Pk - 1] + fUYa[x2Pk]) / 2.0
P6bq = (fUYa[Bu_I - 1] + fUYa[Bu_I]) / 2.0
Csk6 = (P6bq - vC9B) * aM8h
return Kx1f(vC9B - Csk6, P6bq + Csk6) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sezZ(WKvO):\n return aM62(WKvO, 0.75) - aM62(WKvO, 0.25)",
"def sezZ(fUYa: List[float]) -> float:\n return aM62(fUYa, 0.75) - aM62(fUYa, 0.25)",
"def sezZ(etQF):\n OXTU = etQF.shape[0]\n XUBc = int(OXTU / 4.0)\n hbUd = etQF[XUBc]\n iv7Q = etQF[OXTU - XUBc]\n return (iv7Q - hbUd)[0]",
... | [
"0.78446496",
"0.78361267",
"0.7329264",
"0.7277547",
"0.62848103",
"0.6220972",
"0.6212683",
"0.6126903",
"0.6076109",
"0.6013926",
"0.59599835",
"0.5945277",
"0.5944486",
"0.59132844",
"0.586369",
"0.586369",
"0.58502626",
"0.5838192",
"0.5810716",
"0.5797957",
"0.5788276",... | 0.5574511 | 34 |
Initialize the params for b and h from initsol, for all other params set some dummy values. Separate every param equation wise and stick it in a list | def f2sd(YKHO):
JTgH, K9fJ = ([], [])
i4BX, YoeV = ([], [])
for mZgh, pmsH in enumerate(YKHO.equations):
n2SD = YKHO.regressors[mZgh]['prod']
bKIe = YKHO.regressors[mZgh]['degrad']
KBEz = YKHO.initsol['h'][pmsH - 1]
ChhJ = YKHO.initsol['g'][pmsH - 1]
JTgH.append(YKHO.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MQM1(YKHO, wEsz=0.01):\n YKHO.rhos = oyIN.ones(YKHO.Ndim)\n YKHO.a = oyIN.random.rand(YKHO.Ndim, YKHO.Nhidden)\n YKHO.c = oyIN.random.rand(YKHO.Nhidden)\n YKHO.W = oyIN.random.randn(YKHO.Nhidden, YKHO.Ndim) * wEsz\n YKHO.alphas = oyIN.zeros((YKHO.Ndim, YKHO.Ncomponents))\n YKHO.mus = oyIN.zer... | [
"0.63768536",
"0.63639575",
"0.6344924",
"0.6274821",
"0.6249926",
"0.6177377",
"0.6169369",
"0.61526257",
"0.6076583",
"0.6076583",
"0.6076583",
"0.6069444",
"0.60591495",
"0.6057367",
"0.605526",
"0.601068",
"0.6004535",
"0.59952307",
"0.5956314",
"0.5923012",
"0.59117675",... | 0.7125334 | 0 |
Set the SSE values for the diff phases | def rKc7(YKHO, EwlI, F3as, Ptm0):
if YKHO.save_trace:
YKHO.ssep.append(EwlI)
YKHO.ssed.append(F3as)
YKHO.sse.append(Ptm0)
else:
YKHO.ssep = [EwlI]
YKHO.ssed = [F3as]
YKHO.sse = [Ptm0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dbQk(YKHO):\n YKHO.wx = oyIN.copy(AGDB.wzero)\n YKHO.wy = oyIN.copy(AGDB.wzero)",
"def lkVo(YKHO):\n YKHO.delta = Sa_m.Delta(YKHO.noise_cov.noise_cov, YKHO.signal_cov.cl_inv, YKHO.mask.mask, YKHO.params.pix_area)",
"def vEmy(YKHO, Q6gh):\n YKHO.Ts = Q6gh\n YKHO.OutputValueIncrement = (YKHO.M... | [
"0.59605914",
"0.5894171",
"0.5883996",
"0.5883996",
"0.55673504",
"0.5538108",
"0.5524605",
"0.5522457",
"0.54845953",
"0.5475106",
"0.5467689",
"0.5465241",
"0.5433536",
"0.5429207",
"0.54117715",
"0.53857094",
"0.5382142",
"0.5374937",
"0.5347513",
"0.5328624",
"0.5319871"... | 0.55466795 | 5 |
Returns a stream of velocity with units of cm/s. | def uxsC(wOb_):
oXWb = aC7w()
for zgsA in wOb_:
K569 = zgsA.copy()
K569.integrate()
K569.stats['units'] = 'cm/s'
oXWb.append(K569)
return oXWb | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uxsC(YKHO):\n return YKHO.momentum / YKHO.mass",
"def uxsC(YKHO):\n return YKHO._I85_msg_from_device(YKHO.node.sdo[24684].phys) / 10",
"def Uk5V(YKHO):\n return YKHO.v",
"def Ty9i(YKHO):\n CXJh = float(RBLI.dcMotorPWMDurationLeft) / 4095.0\n uZQJ = CXJh * YKHO.motorMaxRPM\n YiDx = 60\n ... | [
"0.66958135",
"0.6647904",
"0.6483449",
"0.6325685",
"0.61784226",
"0.6153046",
"0.6153046",
"0.60536504",
"0.600734",
"0.5953955",
"0.59369403",
"0.59334874",
"0.58922356",
"0.5879083",
"0.5841358",
"0.5824808",
"0.5824002",
"0.5801865",
"0.579023",
"0.5747097",
"0.5718724",... | 0.7323536 | 0 |
Constructing an RL agent. Args | def FIMM(YKHO, Cwt5=0.4, KMvS=0.2, exwG=1):
YKHO.epsilon = 0.3
YKHO.reward = []
YKHO.totalCount = 0
YKHO.totalOnTarget = 0
YKHO.shootCount = 0
YKHO.phasesTemp = 0
YKHO.phasesOnTarget = []
YKHO.arrowAngleCount = dict()
YKHO.arrowAngleOn = dict()
YKHO.loadStats()
YKHO.q_table =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DYWV(YKHO, sEAN):\n from keras import Sequential\n from keras.optimizers import Adam\n from keras.layers import Dense, Dropout\n from rl.memory import SequentialMemory\n from rl.agents import DQNAgent\n YKHO.env = sEAN\n g6MG = YKHO.env.action_space.n\n C3ST = Sequential()\n C3ST.add... | [
"0.6891245",
"0.68211496",
"0.6565846",
"0.6525725",
"0.64860606",
"0.64854795",
"0.6481379",
"0.64537036",
"0.6423636",
"0.6394675",
"0.63888",
"0.63830537",
"0.6369426",
"0.6365953",
"0.6358878",
"0.63076633",
"0.63023514",
"0.6282893",
"0.62804013",
"0.6277194",
"0.6248733... | 0.0 | -1 |
Compute the partials Tx and Ty, compute the absolute value of the gradients. | def DTtu(L2Qu, qnfV):
Vo9x = ht2j.zeros(3, 4)
iYPf = Vo9x
return iYPf | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NCMZ(Kt_s, WKvO, LVAh):\n Vo9x = ht2j.zeros(3, 4)\n L2Qu = Vo9x\n qnfV = Vo9x\n return (L2Qu, qnfV)",
"def RHr8(YKHO):\n nPem = YKHO.fx + YKHO.r\n t64c = YKHO.fy\n oXNz = YKHO.gx + YKHO.r\n w_fc = YKHO.gy\n yVo3 = oyIN.linspace(YKHO.fx[0], oXNz[-1], YKHO.N)\n F_Bz = oyIN.linspac... | [
"0.6702647",
"0.6138296",
"0.59238213",
"0.5876406",
"0.5842837",
"0.5841584",
"0.5719233",
"0.57162446",
"0.56961256",
"0.5683851",
"0.5667813",
"0.5652793",
"0.5631196",
"0.561918",
"0.5611303",
"0.5597914",
"0.5596903",
"0.5592228",
"0.5567622",
"0.55403984",
"0.552168",
... | 0.6591556 | 1 |
Make sure input is either a string or a unicode string | def hiJB(aAhx):
if type(aAhx) == type('') or type(aAhx) == type(u''):
return
G9jH.error('assert_is_string() test failed!')
G9jH.critical(repr(locals()))
raise ValueError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LGEq(nPrm, XObx='Input not valid unicode'):\n try:\n if not isinstance(nPrm, str) and (not isinstance(nPrm, str)):\n raise UnicodeError(XObx)\n str(nPrm)\n except UnicodeError:\n raise UnicodeError(XObx)",
"def pZIl(BWXx):\n if not isinstance(BWXx, jKi7.string_types):... | [
"0.790888",
"0.73409545",
"0.71633554",
"0.7052878",
"0.7023568",
"0.6974539",
"0.69613564",
"0.6936988",
"0.6900525",
"0.6854773",
"0.6839094",
"0.6780258",
"0.6730281",
"0.67033863",
"0.6697373",
"0.6689518",
"0.666724",
"0.66563207",
"0.6652304",
"0.66450363",
"0.66232544"... | 0.62614244 | 41 |
Given a blog name or URL, mangle it into something the tumblr API will probably like | def s_K7(_Iq6):
oAAd = _Iq6.strip('\r\n\t ')
G9jH.debug('stripped_url: ' + repr(oAAd))
j1MX = '(?:https?://)?([^#/\'"]+)'
n5PH = ZbWC.search(j1MX, oAAd, ZbWC.IGNORECASE)
if n5PH:
yCEe = n5PH.group(1)
return yCEe
else:
G9jH.error("Can't parse list item! Skipping it.")
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F6HG(rJDA, R6Xf):\n from time import strftime, localtime\n try:\n import json\n except ImportError:\n import simplejson as json\n try:\n import urllib.request as GuYA\n except ImportError:\n import urllib2 as GuYA\n\n def ENwQ(rJDA, R6Xf, vgXP=0):\n bD7m = '... | [
"0.61286676",
"0.6038978",
"0.6011304",
"0.59003806",
"0.58796257",
"0.58796257",
"0.58136576",
"0.5779535",
"0.57519096",
"0.5750346",
"0.56949276",
"0.56673795",
"0.5591074",
"0.55716944",
"0.5560232",
"0.55318934",
"0.55102646",
"0.5483784",
"0.54791874",
"0.547159",
"0.54... | 0.6253625 | 0 |
Function to find related actors from related movies(movie_movie_similarity_matrix using pca) corresponding to the given movie | def Srom(YKHO, VeCA):
Un1J = YKHO.sim_act_diff_mov_tf.get_movie_tag_matrix()
d3iF = Un1J.values
sV3k = list(Un1J.index.values)
dJ1p = list(Un1J)
KkY2, KCHu, hax7 = gnPz.PCA(d3iF)
lecb = KkY2[:, :5]
yR5g = XTiz.dot(d3iF, lecb)
dqHP = yR5g.transpose()
xhSb = XTiz.dot(yR5g, dqHP)
xr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kCp8(YKHO, VeCA):\n Kiac = YKHO.data_extractor.get_mlmovies_data()\n A314 = YKHO.data_extractor.get_genome_tags_data()\n Q5yL = YKHO.data_extractor.get_mltags_data()\n jo9L = Q5yL.merge(A314, how='left', left_on='tagid', right_on='tagId')\n jo9L = jo9L.merge(Kiac, how='left', left_on='movieid', ... | [
"0.7175485",
"0.6909426",
"0.63776225",
"0.62654656",
"0.6224838",
"0.6164424",
"0.6101993",
"0.6034018",
"0.5978447",
"0.59721303",
"0.5884915",
"0.5859096",
"0.58271915",
"0.57516944",
"0.5731579",
"0.57142574",
"0.5711693",
"0.5708562",
"0.56976116",
"0.566409",
"0.5660183... | 0.7533873 | 0 |
Computes the logdensity of a multivariate normal. | def nSzW(WKvO, yGTL, aPd6):
if WKvO.shape.ndims is None:
bo34.warn('Shape of x must be 2D at computation.')
elif WKvO.shape.ndims != 2:
raise ValueError('Shape of x must be 2D.')
if yGTL.shape.ndims is None:
bo34.warn('Shape of mu may be unknown or not 2D.')
elif yGTL.shape.ndims... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aXk3(WKvO: torch.Tensor, yGTL: torch.Tensor, XO02: torch.Tensor):\n CkYf = -0.5 * (epAf.log(2 * epAf.pi) + XO02)\n gXdX = CkYf - 0.5 * ((WKvO - yGTL) ** 2 * ht2j.exp(-XO02))\n return gXdX",
"def aXk3(WKvO, yGTL, XO02):\n CkYf = -0.5 * (epAf.log(2 * epAf.pi) + XO02)\n gXdX = CkYf - 0.5 * ((WKvO... | [
"0.7654462",
"0.75639415",
"0.7505977",
"0.74105865",
"0.7396801",
"0.71272033",
"0.7072902",
"0.69134814",
"0.6836898",
"0.67818326",
"0.67818326",
"0.67413074",
"0.67319477",
"0.67284095",
"0.66831315",
"0.66411316",
"0.65386975",
"0.6509908",
"0.6501521",
"0.6458814",
"0.6... | 0.59397495 | 65 |
Compute softmax probability over raw logits. | def M49J(cCrA):
if not cCrA:
return []
jB5X = None
for p1kx in cCrA:
if jB5X is None or p1kx > jB5X:
jB5X = p1kx
KPVz = []
mq4h = 0.0
for p1kx in cCrA:
WKvO = epAf.exp(p1kx - jB5X)
KPVz.append(WKvO)
mq4h += WKvO
BFeB = []
for p1kx in KP... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N93T(WKvO):\n nwEM = oyIN.exp(WKvO)\n return nwEM / oyIN.sum(nwEM)",
"def N93T(WKvO):\n A3sN = oyIN.array(WKvO)\n xbFY = oyIN.exp(WKvO)\n return xbFY / sum(xbFY)",
"def N93T(g4y1):\n BFeB = oyIN.exp(g4y1)\n BFeB /= oyIN.sum(BFeB, axis=0)[oyIN.newaxis, :]\n return BFeB",
"def N93T(... | [
"0.7719119",
"0.7703024",
"0.7702844",
"0.7688321",
"0.7677464",
"0.7666627",
"0.7666627",
"0.76138234",
"0.7608393",
"0.75940377",
"0.7590872",
"0.75784117",
"0.757828",
"0.7574457",
"0.7565043",
"0.75643724",
"0.75629324",
"0.75555575",
"0.75555575",
"0.75555575",
"0.755555... | 0.0 | -1 |
Test running command 'netlookup subtract' with no subnets in arguments | def PiPT(Ehsq):
B6sC = _oft()
ryE4 = ['netlookup', 'subtract', GTsw]
with Ehsq.context() as QpfX:
IgQM(B6sC, QpfX, ryE4, exit_code=1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IBU3(pVAQ, Ehsq, zCUc, mIXf):\n B6sC = _oft()\n ryE4 = ['netlookup', 'subtract', GTsw, mIXf]\n with Ehsq.context() as QpfX:\n IgQM(B6sC, QpfX, ryE4, exit_code=0)\n vbGs = pVAQ.readouterr()\n assert vbGs.err == ''\n assert len(vbGs.out.splitlines()) > 0",
"def tYQU(pVAQ, Ehsq, zCUc, R... | [
"0.77587587",
"0.7635609",
"0.7084993",
"0.6302656",
"0.6272366",
"0.6232334",
"0.62268305",
"0.6145294",
"0.6027609",
"0.5969381",
"0.5938036",
"0.58693135",
"0.5818498",
"0.5815863",
"0.579946",
"0.5781163",
"0.57450175",
"0.5731728",
"0.56986374",
"0.5622922",
"0.5622675",... | 0.81927127 | 0 |
Test running 'netlookup subtract' command with invalid address values and networks to subtract | def tYQU(pVAQ, Ehsq, zCUc, R25B):
B6sC = _oft()
ryE4 = ['netlookup', 'subtract', GTsw, R25B]
with Ehsq.context() as QpfX:
IgQM(B6sC, QpfX, ryE4, exit_code=1)
vbGs = pVAQ.readouterr()
assert len(vbGs.err.splitlines()) == 1
assert vbGs.out == '' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IBU3(pVAQ, Ehsq, zCUc, mIXf):\n B6sC = _oft()\n ryE4 = ['netlookup', 'subtract', GTsw, mIXf]\n with Ehsq.context() as QpfX:\n IgQM(B6sC, QpfX, ryE4, exit_code=0)\n vbGs = pVAQ.readouterr()\n assert vbGs.err == ''\n assert len(vbGs.out.splitlines()) > 0",
"def PiPT(Ehsq):\n B6sC = ... | [
"0.79214704",
"0.77665734",
"0.71630085",
"0.6055139",
"0.591273",
"0.5849006",
"0.5841514",
"0.5780265",
"0.57139343",
"0.5680476",
"0.56288505",
"0.5615075",
"0.55828816",
"0.55685705",
"0.55471915",
"0.5543619",
"0.55287814",
"0.55114233",
"0.5509118",
"0.54921347",
"0.548... | 0.81425565 | 0 |
Deprecated way to construct an elliptic curve. | def pozk(Nq1b, V6IE):
from sage.misc.superseded import deprecation
deprecation(3416, 'use Jacobian(C) instead')
from sage.schemes.elliptic_curves.jacobian import Jacobian
return Jacobian(Nq1b) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kQ2F(mWFP='secp256r1'):\n if mWFP not in w2YV:\n raise ValueError('Unknown curve')\n return V3xq.generate_private_key(curve=w2YV[mWFP], backend=JLXL())",
"def AY7g(YKHO, DpZH, H5ew, **c_sp):\n A3Vt, WKvO = H5ew\n if A3Vt is HlHH.QQ:\n from .ell_rational_field import EllipticCurve_ra... | [
"0.68211055",
"0.6293135",
"0.62561256",
"0.6152047",
"0.6108511",
"0.5980539",
"0.5926587",
"0.58709586",
"0.5851918",
"0.57889724",
"0.5739999",
"0.5735108",
"0.5721907",
"0.55185753",
"0.5482118",
"0.5480206",
"0.5474706",
"0.5418186",
"0.54138297",
"0.5376769",
"0.5375441... | 0.6286263 | 2 |
(list, object) > int Returns index of the value if it is in the list. Otherwise 1. | def jUbz(vC9B, BWXx):
tTpl = len(vC9B) - 1
Fg_i = 0
while tTpl - Fg_i > 1:
x1fj = (Fg_i + tTpl) // 2
H5ew = vC9B[x1fj]
if BWXx < H5ew:
tTpl = x1fj - 1
elif BWXx > H5ew:
Fg_i = x1fj + 1
else:
return x1fj
if vC9B[Fg_i] == BWXx:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d6pt(Uj1v, BWXx):\n for P2GO in range(len(Uj1v)):\n if Uj1v[P2GO] == BWXx:\n return P2GO\n return None",
"def d6pt(YKHO, BWXx):\n YKHO.__validate_value(BWXx)\n for d6pt, Ty9i in enumerate(YKHO.__list):\n if Ty9i == BWXx:\n return d6pt",
"def neBz(YKHO, list, ... | [
"0.7490516",
"0.7439186",
"0.7153286",
"0.7148641",
"0.6692753",
"0.66424334",
"0.66360354",
"0.6622841",
"0.6558355",
"0.65301293",
"0.65211374",
"0.6517865",
"0.64806134",
"0.6457434",
"0.64192706",
"0.641803",
"0.64075285",
"0.6403693",
"0.64026415",
"0.6381451",
"0.636967... | 0.0 | -1 |
(list, object) > bool Returns whether or not the value is in the list. | def EeGs(vC9B, BWXx):
Oa1e = list(vC9B)
while len(Oa1e) > 2:
YRbF = len(Oa1e) // 2
H5ew = Oa1e[YRbF]
if BWXx < H5ew:
Oa1e = Oa1e[:YRbF]
elif BWXx > H5ew:
Oa1e = Oa1e[YRbF:]
else:
return True
return Oa1e[0] == BWXx or Oa1e[1] == BWXx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mZmz(BWXx, d7pR):\n return BWXx in d7pR",
"def sjXf(YKHO, BWXx):\n return BWXx in YKHO.values",
"def qxpF(BWXx):\n return True",
"def FYXB(YKHO, LihS):\n return LihS in list(YKHO)",
"def FYXB(YKHO, BWXx):\n EmMj = False\n for YRbF in range(len(YKHO.data)):\n if YKHO.data[YRbF] ... | [
"0.7914151",
"0.74202615",
"0.73516726",
"0.72362846",
"0.7136208",
"0.70844555",
"0.7070305",
"0.70541096",
"0.7053552",
"0.70188075",
"0.69917583",
"0.6986972",
"0.6965379",
"0.6965379",
"0.6955131",
"0.6943398",
"0.69408166",
"0.6931493",
"0.6923744",
"0.6919824",
"0.69175... | 0.0 | -1 |
return the dot product of two vectors | def qhEX(WKvO, Ty9i, cqqy):
_bzp = WKvO.flatten()
GyqS = Ty9i.flatten()
iefv = OziS.mul_impl(GyqS, _bzp)
return OziS.sum_impl(iefv) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BJ1H(ENWa, ZoT5):\n return sum((XOOk * pHXX for XOOk, pHXX in zip(ENWa, ZoT5)))",
"def BJ1H(jzdc, Fg_i):\n if len(jzdc) != len(Fg_i):\n raise Exception('Input vectors must be of same length, not %d and %d' % (len(jzdc), len(Fg_i)))\n return float(sum([jzdc[YRbF] * Fg_i[YRbF] for YRbF in range... | [
"0.87734985",
"0.8756417",
"0.87003887",
"0.8695957",
"0.862431",
"0.86155766",
"0.86149144",
"0.85854644",
"0.8562527",
"0.85107267",
"0.8476932",
"0.8443784",
"0.84131616",
"0.8389263",
"0.83795774",
"0.83722675",
"0.83408594",
"0.83052945",
"0.83046186",
"0.8281802",
"0.82... | 0.7108971 | 97 |
Sends a 401 response that enables basic auth | def H0Di():
return oGir('Could not verify your access level for that URL.\nYou have to login with proper credentials', 401, {'WWW-Authenticate': 'Basic realm="Login Required"'}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NLCy():\n return oGir('Not Authorized', 401, {'WWW-Authenticate': 'Basic realm=\"api\"'})",
"def NLCy():\n return oGir('', 401, {'WWW-Authenticate': 'Basic realm=\"Login Required\"'})",
"def NLCy():\n return oGir('You have to login with proper credentials', 401, {'WWW-Authenticate': 'Basic realm=\... | [
"0.8093736",
"0.80926424",
"0.7958403",
"0.7852648",
"0.7843114",
"0.7824419",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
... | 0.74152935 | 45 |
Return flattened list of all targeting objects in self. By default all targeting objects are returned. Only one of includes_only or excludes_only may be True. | def PWgb(YKHO):
FYrf = []
bGrB, x6A0 = YKHO.get_data()
for a1PO in x6A0:
if isinstance(a1PO, WMkk):
FYrf += [a1PO]
elif isinstance(a1PO, DPrS):
FYrf += a1PO.flatten()
return FYrf | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LN1V(YKHO):\n MB6m = set(YKHO.flatten())\n YBft = set(YKHO._get_includes())\n j28w = MB6m - YBft\n return (list(YBft), list(j28w))",
"def GHFD(YKHO):\n FYrf = []\n khtY, x6A0 = YKHO.get_data()\n if khtY == YKHO.OPERATOR.NOT:\n return FYrf\n for a1PO in x6A0:\n if isinsta... | [
"0.6925103",
"0.6320384",
"0.57629085",
"0.5554401",
"0.5519762",
"0.550233",
"0.54872006",
"0.5448141",
"0.54426533",
"0.5405811",
"0.5403925",
"0.53145957",
"0.52995247",
"0.52929246",
"0.52929246",
"0.52929246",
"0.52929246",
"0.52929246",
"0.52929246",
"0.5288983",
"0.528... | 0.6522181 | 1 |
Get the median of a list of values | def BjRM(hkxX):
lKXT = int(len(hkxX) / 2)
if len(hkxX) % 2 == 0:
BjRM = (hkxX[lKXT - 1] + hkxX[lKXT]) / 2
else:
BjRM = hkxX[lKXT]
return BjRM | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qPfM(qQiX):\n return oyIN.median(qQiX)",
"def BjRM(Ty9i: List[float]) -> float:\n return cjmi(Ty9i) if len(Ty9i) % 2 == 0 else tchW(Ty9i)",
"def BjRM(hkxX):\n lKXT = int(len(hkxX) / 2)\n if len(hkxX) % 2 == 0:\n BjRM = (hkxX[lKXT - 1] + hkxX[lKXT]) / 2\n else:\n BjRM = hkxX[lKX... | [
"0.856921",
"0.84415704",
"0.8278074",
"0.8212018",
"0.8115945",
"0.80988985",
"0.80986464",
"0.8095384",
"0.8089248",
"0.8082627",
"0.7885181",
"0.78799623",
"0.7876769",
"0.78682256",
"0.77975774",
"0.779382",
"0.7740889",
"0.77263594",
"0.77061564",
"0.7684539",
"0.7634215... | 0.82220733 | 3 |
Set learning rate and momentum parameter for generator updates. | def X63k(YKHO, Xsfr=0.02, H0zq=0.9):
zfxz = oyIN.zeros((1,))
WVUz = zfxz + Xsfr
YKHO.lr_gn.set_value(WVUz.astype(e89i.config.floatX))
bl0a = zfxz + H0zq
YKHO.mo_gn.set_value(bl0a.astype(e89i.config.floatX))
return | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KcD7(YKHO, tspZ, H0zq, WMj5):\n YKHO.optimizer = EW5f(lr=tspZ, momentum=H0zq, decay=WMj5)",
"def fggk(YKHO):\n YKHO.scheduler.step(YKHO.clock.epoch)",
"def fggk(YKHO):\n YKHO.scheduler.step()\n tspZ = YKHO.optimizer.param_groups[0]['lr']\n print('learning rate = %.7f' % tspZ)",
"def fggk(Y... | [
"0.74228674",
"0.7329358",
"0.72947824",
"0.7290991",
"0.7290991",
"0.7277119",
"0.72454304",
"0.7237406",
"0.7035165",
"0.70293164",
"0.7000631",
"0.6989692",
"0.6987262",
"0.6976322",
"0.695302",
"0.69255",
"0.691151",
"0.68654853",
"0.68213147",
"0.67984426",
"0.6776933",
... | 0.68282753 | 18 |
Set learning rate and momentum parameter for discriminator updates. | def bHa4(YKHO, Xsfr=0.02, H0zq=0.9):
zfxz = oyIN.zeros((1,))
WVUz = zfxz + Xsfr
YKHO.lr_in.set_value(WVUz.astype(e89i.config.floatX))
bl0a = zfxz + H0zq
YKHO.mo_in.set_value(bl0a.astype(e89i.config.floatX))
return | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WVy8(YKHO):\n YKHO.n_steps += 1\n tspZ = YKHO.factor * YKHO._get_lr_scale()\n for Lwm5 in YKHO._optimizer.param_groups:\n Lwm5['lr'] = tspZ",
"def kVtO(YKHO, mVUw):\n YKHO.SGD.set_learning_rate(mVUw)",
"def d9M4(YKHO, qtWj):\n YKHO.lr = oTIY(epoch=qtWj, opt=YKHO.opt)\n if isinstanc... | [
"0.71230865",
"0.7075697",
"0.70593333",
"0.6855824",
"0.6855824",
"0.68059623",
"0.67984474",
"0.67955375",
"0.6752505",
"0.6743082",
"0.67331773",
"0.67205024",
"0.67056483",
"0.66563624",
"0.6650629",
"0.6643029",
"0.6630967",
"0.6628735",
"0.66276056",
"0.6617988",
"0.655... | 0.623723 | 72 |
Sets the torch device depending on whether cuda is avaiable or not. | def Xw1V(YKHO, lDLs=True):
if lDLs and ht2j.cuda.is_available():
YKHO.cuda = True
YKHO.device = ht2j.device('cuda')
else:
YKHO.cuda = False
YKHO.device = ht2j.device('cpu')
if YKHO.verbose:
if not lDLs:
print('Using CPU device')
elif not YKHO.cuda:... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Xw1V(sva5):\n return ht2j.device('cuda' if ht2j.cuda.is_available() and sva5.gpu == 1 else 'cpu')",
"def Xw1V(begE, DDLl='autograd'):\n if DDLl == 'autograd':\n return None\n elif DDLl == 'pytorch':\n try:\n Vq3K.cuda.set_device(begE)\n except:\n pass",
"... | [
"0.81103677",
"0.80256677",
"0.7868739",
"0.7843636",
"0.7546385",
"0.7499286",
"0.74311036",
"0.7422318",
"0.73199517",
"0.7247979",
"0.69833183",
"0.6976772",
"0.696156",
"0.69106805",
"0.68663025",
"0.6863663",
"0.6838263",
"0.6838263",
"0.6838263",
"0.6838263",
"0.6825775... | 0.8050536 | 1 |
Returns all the possible directions of a player in the game as a list of tuples. | def uapV():
return [(1, 0), (0, 1), (-1, 0), (0, -1)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TUcM(YKHO):\n return []",
"def TUcM(YKHO):\n UZlw = []\n for XSoh in gHhh.possible_directions:\n BZN_ = gHhh.dirs_to_moves[XSoh]\n if 0 <= YKHO.location[0] + BZN_[0] < len(YKHO.grid) and 0 <= YKHO.location[1] + BZN_[1] < len(YKHO.grid[0]) and (YKHO.grid[YKHO.location[0] + BZN_[0]][YKHO... | [
"0.6781066",
"0.64884204",
"0.6440459",
"0.637943",
"0.6214856",
"0.6214856",
"0.6214856",
"0.6214856",
"0.6214856",
"0.6214856",
"0.6214856",
"0.6097705",
"0.59716326",
"0.58972955",
"0.5876937",
"0.5826856",
"0.58092165",
"0.5807536",
"0.5756365",
"0.5753964",
"0.57327217",... | 0.6883715 | 0 |
Checking if this player's board is end game board. | def liv1(YKHO):
ufJO = YKHO.is_game_won()
dqeH = YKHO.game_is_tied()
return ufJO or dqeH | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LA18(YKHO, iBIi):\n if YKHO.if_board_full(iBIi):\n return True\n if not YKHO.get_all_possible_moves(iBIi, 'DARK') and (not YKHO.get_all_possible_moves(iBIi, 'LIGHT')):\n return True\n return False",
"def xlrp(YKHO):\n return any([YRbF != 0 for YRbF in YKHO.board[0]])",
"def II1Q(Y... | [
"0.8172282",
"0.80690825",
"0.7710843",
"0.7679913",
"0.7551429",
"0.7535583",
"0.7451725",
"0.7346067",
"0.7346067",
"0.7323978",
"0.7293765",
"0.7132977",
"0.7093803",
"0.7090218",
"0.7085496",
"0.70617443",
"0.70607",
"0.7038597",
"0.69829273",
"0.6975814",
"0.68917024",
... | 0.7630672 | 4 |
Calculate the great circle distance between two points on the earth (specified in decimal degrees) | def GeVo(GgQG, igSk, tk0B, TGuP):
GgQG, igSk, tk0B, TGuP = map(Y_1E, [GgQG, igSk, tk0B, TGuP])
H91H = tk0B - GgQG
n_9K = TGuP - igSk
jzdc = YUNn(n_9K / 2) ** 2 + YhSR(igSk) * YhSR(TGuP) * YUNn(H91H / 2) ** 2
Z9rn = 2 * P099(PZyS(jzdc))
Mkmy = 6371
return Z9rn * Mkmy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KzuF(rCSf, hjIX, FNKk, T3JP):\n hjIX = r8hN.radians(hjIX)\n rCSf = r8hN.radians(rCSf)\n T3JP = r8hN.radians(T3JP)\n FNKk = r8hN.radians(FNKk)\n Csk6 = 2 * 6367.45 * r8hN.asin(r8hN.sqrt(GeVo(FNKk - rCSf) + r8hN.cos(rCSf) * r8hN.cos(FNKk) * GeVo(T3JP - hjIX)))\n return Csk6",
"def T97B(GgQG, ... | [
"0.81462395",
"0.7864918",
"0.7633203",
"0.76057166",
"0.7596984",
"0.7596038",
"0.7593975",
"0.75714296",
"0.7564067",
"0.75561523",
"0.75298584",
"0.7517076",
"0.74938124",
"0.7466481",
"0.74516803",
"0.7433787",
"0.73918307",
"0.73571837",
"0.73487705",
"0.73308617",
"0.73... | 0.0 | -1 |
Returns the Euclidean distance of two points in the Cartesian Plane. | def Ayfi(lCHq, ANJu):
return ((lCHq[0] - ANJu[0]) ** 2 + (lCHq[1] - ANJu[1]) ** 2) ** 0.5 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def usGr(YKHO):\n return PZyS(pow(YKHO.pose1.x - YKHO.pose2.x, 2) + pow(YKHO.pose1.y - YKHO.pose2.y, 2))",
"def usGr(o4D3, si3g, ajwV, skBL):\n Ayfi = epAf.sqrt((ajwV - o4D3) ** 2 + (skBL - si3g) ** 2)\n return Ayfi",
"def usGr(WKvO, LVAh):\n return PZyS(sum((pow(jzdc - Fg_i, 2) for jzdc, Fg_i in z... | [
"0.77338606",
"0.7510308",
"0.74254733",
"0.7400938",
"0.73753047",
"0.7374873",
"0.73701894",
"0.73421",
"0.7308016",
"0.72965765",
"0.7244358",
"0.7219322",
"0.72136164",
"0.7209289",
"0.720309",
"0.71987426",
"0.71977013",
"0.7192439",
"0.7190426",
"0.71600986",
"0.7131179... | 0.0 | -1 |
Returns the firmware ID integer [in] self Pointer to the current object | def n3Ng(YKHO):
NdZ8 = YKHO._get_slt_entry(1)
BFFJ = YKHO.get_data(NdZ8)
if NdZ8 % MuDO.addr_per_word != 0:
BFFJ >>= 16
return BFFJ & 65535 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EZ2z(YKHO):\n r_6l = YKHO.debuginfo.get_var_strict('$_build_identifier_integer').address\n BFFJ = YKHO.debuginfo.get_dm_const(r_6l, 0)\n if MuDO.addr_per_word == 4:\n if r_6l % MuDO.addr_per_word != 0:\n BFFJ >>= 16\n BFFJ &= 65535\n return BFFJ",
"def xHbC(YKHO):\n re... | [
"0.6659042",
"0.66225123",
"0.65802544",
"0.65732455",
"0.65732455",
"0.65598106",
"0.6551785",
"0.65372795",
"0.64972204",
"0.64972204",
"0.64972204",
"0.64972204",
"0.64972204",
"0.64972204",
"0.64972204",
"0.64972204",
"0.64972204",
"0.64972204",
"0.64972204",
"0.64972204",
... | 0.70307577 | 0 |
Get file/dir name of the last path component of the URL | def uRWV(bD7m, Nlxd=[], L5tE=False):
pmON = yCoA(NoPH(bD7m).path)
RVjQ = pmON.split('/')
if L5tE:
while len(RVjQ) > 1 and (not RVjQ[-1]):
RVjQ = RVjQ[:-1]
if Nlxd:
while RVjQ and RVjQ[-1] in Nlxd:
RVjQ = RVjQ[:-1]
if RVjQ:
return RVjQ[-1]
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Eg2n(bD7m: str) -> str:\n bD7m = bD7m.strip('/')\n Aofo = c2KQ('/(\\\\w+\\\\.\\\\w+)[?|$]', bD7m)\n if Aofo:\n return Aofo[-1]\n return bD7m.split('/')[-1]",
"def wvvX(bD7m):\n return bD7m[bD7m.rfind('/') + 1:]",
"def OaLd(bD7m):\n return Hy7s.path.basename(KVWQ.urlparse(bD7m).path... | [
"0.8238025",
"0.8194668",
"0.80590534",
"0.79775417",
"0.79524755",
"0.7868575",
"0.78201467",
"0.77797383",
"0.77455467",
"0.76903766",
"0.764131",
"0.7639165",
"0.7430447",
"0.74091035",
"0.7397713",
"0.7360638",
"0.7259495",
"0.7237766",
"0.72253394",
"0.72237957",
"0.7213... | 0.7490954 | 12 |
Given rfc2822 date/time format, return seconds since epoch | def e71Z(GXef):
return kuDJ(iUqm(GXef)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LrXp(KCHu):\n JRYC = d5IO.parser.parse(KCHu)\n p6zu = int(JRYC.replace(tzinfo=rIAI.utc).timestamp())\n return p6zu",
"def IMJE(_c1T):\n g75m = _c1T - qtWj\n return g75m.days * 86400 + g75m.seconds + float(g75m.microseconds) / 1000000",
"def IMJE(_c1T):\n g75m = _c1T - qtWj\n return g75... | [
"0.7403787",
"0.6994438",
"0.6994438",
"0.69930565",
"0.685609",
"0.67435235",
"0.6649992",
"0.6621337",
"0.6596144",
"0.6519827",
"0.6499239",
"0.6476053",
"0.64504117",
"0.64360934",
"0.64318186",
"0.6411012",
"0.6402909",
"0.6397291",
"0.6361673",
"0.63393",
"0.6302481",
... | 0.7470458 | 0 |
returns a list of all tables present in a folder of dimas because dimas may each have a different set of tables, this function goes through the list of tables per dima and appends any table not previously seen into an internal list which is ultimately returned. | def Bpe0(OHj0):
pZ4I = OHj0
N3WB = Hy7s.listdir(pZ4I)
D6Z9 = []
for mdeK in N3WB:
if Hy7s.path.splitext(mdeK)[1] == '.mdb' or Hy7s.path.splitext(mdeK)[1] == '.accdb':
KAOR = Zq4h(Hy7s.path.join(pZ4I, mdeK))
for k9X4, zNig in KAOR.actual_list.items():
if k9... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d_72(YKHO):\n Cc7Y = \"SELECT * FROM pg_catalog.pg_tables WHERE schemaname != 'pg_catalog' AND schemaname != 'information_schema';\"\n YKHO.cur.execute(Cc7Y)\n wjRY = YKHO.cur.fetchall()\n D6Z9 = []\n for jzdc in wjRY:\n D6Z9.append(jzdc[1])\n return D6Z9",
"def uHXw(YKHO):\n retu... | [
"0.6735903",
"0.6700059",
"0.64749414",
"0.6401587",
"0.63755095",
"0.6251253",
"0.6218822",
"0.62172234",
"0.6214256",
"0.62109447",
"0.61893195",
"0.61316866",
"0.61200345",
"0.60726804",
"0.6050303",
"0.6016076",
"0.60112864",
"0.60105884",
"0.598312",
"0.58760774",
"0.582... | 0.6572763 | 2 |
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`. | def LwSz(Bcwd, KndY, leAC='Confusion matrix', iMGt=QrM1.cm.Blues):
QrM1.imshow(Bcwd, interpolation='nearest', cmap=iMGt)
QrM1.title(leAC)
QrM1.colorbar()
wIWT = oyIN.arange(len(KndY))
QrM1.xticks(wIWT, KndY, rotation=30)
QrM1.yticks(wIWT, KndY)
knl1 = Bcwd.max() / 2.0
for YRbF, r845 in H... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LwSz(Bcwd, KndY=[0, 1], NkkI=False, leAC='Confusion matrix', RMso=False):\n if NkkI:\n Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]\n print('Normalized confusion matrix')\n else:\n print('Confusion matrix, without normalization')\n if RMso:\n print(Bcwd)"... | [
"0.819363",
"0.8094859",
"0.8028102",
"0.8018164",
"0.799278",
"0.79902315",
"0.7979656",
"0.7974647",
"0.79595697",
"0.7956129",
"0.7936602",
"0.79336774",
"0.7933392",
"0.79303294",
"0.79252326",
"0.7923459",
"0.79230803",
"0.79221183",
"0.79218185",
"0.7921176",
"0.7916744... | 0.0 | -1 |
Gated recurrent unit (GRU) with nunits cells. | def nrOS(YKHO, g4y1, QTBn, rrBf=None):
with ZylS.variable_scope(rrBf or type(YKHO).__name__):
with ZylS.variable_scope('Gates'):
Mkmy, P6bq = ZylS.split(1, 2, z8o0([g4y1, QTBn], 2 * YKHO._num_units, True, 1.0))
Mkmy, P6bq = (ZylS.nn.sigmoid(Mkmy), ZylS.nn.sigmoid(P6bq))
with ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pNpi(cuu0, hr1G):\n VmPb = ZylS.nn.rnn_cell.GRUCell(cuu0)\n if hr1G:\n Aofo = ZylS.nn.rnn_cell.DropoutWrapper(VmPb, output_keep_prob=1 - hr1G)\n return Aofo",
"def LXM1(YKHO, cuu0):\n return S14z.LayerNormGRUCell(cuu0, w_initializer=YKHO.uniform_initializer, u_initializer=ZnqD, b_initializ... | [
"0.72175235",
"0.6655495",
"0.62976027",
"0.62721103",
"0.58990526",
"0.5838161",
"0.57049847",
"0.56842643",
"0.56727964",
"0.56181496",
"0.56154644",
"0.5609967",
"0.55854005",
"0.5582328",
"0.55492055",
"0.55422336",
"0.55379236",
"0.5510886",
"0.5496667",
"0.54436517",
"0... | 0.49715042 | 72 |
Checks if currently occupied seat should become empty. | def DPXA(MKnG: List[str], YRbF: int, r845: int) -> bool:
rNz_ = (MKnG[YRbF - 1][r845] == '#') + (MKnG[YRbF - 1][r845 - 1] == '#') + (MKnG[YRbF - 1][r845 + 1] == '#') + (MKnG[YRbF + 1][r845] == '#') + (MKnG[YRbF + 1][r845 - 1] == '#') + (MKnG[YRbF + 1][r845 + 1] == '#') + (MKnG[YRbF][r845 - 1] == '#') + (MKnG[YRbF][... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qiBc(YKHO):\n if YKHO.allocated_spaces == 0:\n return True\n else:\n return False",
"def _u17(YKHO):\n if YKHO.allocated_spaces == YKHO.capacity:\n return True\n elif YKHO.allocated_spaces < YKHO.capacity:\n return False",
"def LWCs(YKHO):\n return len(YKHO.__occu... | [
"0.7437178",
"0.73682714",
"0.734311",
"0.73328054",
"0.72996753",
"0.70801324",
"0.70765346",
"0.70733654",
"0.7031329",
"0.7031329",
"0.6998726",
"0.69886214",
"0.69592613",
"0.6955051",
"0.6933424",
"0.6933424",
"0.6832477",
"0.6823872",
"0.68231386",
"0.68132746",
"0.6802... | 0.0 | -1 |
get yvalue of marker in projection iproj | def l8g9(YKHO, XmC7):
return YKHO.yProj[XmC7] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bDS1(YKHO):\n return YKHO.proj.getY()",
"def LVAh(YKHO):\n return YKHO._kml['y']",
"def LVAh(YKHO):\n return YKHO.coords[1]",
"def yDCK(YKHO):\n return YKHO.coords[1]",
"def boAb(YKHO):\n return YKHO.actual_coordinates[1]",
"def YBz0(YKHO):\n return YKHO.y",
"def LVAh(YKHO):\n ... | [
"0.7142606",
"0.67305857",
"0.67297214",
"0.6583838",
"0.6561016",
"0.65312874",
"0.6529615",
"0.6420082",
"0.6401691",
"0.639421",
"0.6375033",
"0.6273069",
"0.6258696",
"0.62484866",
"0.62446666",
"0.62278455",
"0.6225121",
"0.6202938",
"0.619198",
"0.61858374",
"0.6178276"... | 0.74080366 | 0 |
Generate a test dataframe. | def qLIb(AwTT=8):
jQ3Z = xv8q(speakers=AwTT, genders=['M', 'F'], factors=dict(group=['HV', 'LV'], test=['pre', 'post'], vowel=['a', 'e', 'i', 'o', 'u']))
return jQ3Z | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ExEi(YKHO):\n UHFx = 500\n YdD0 = []\n BWXx = []\n wzkt = qcWV.datetime.now()\n for YRbF in range(UHFx):\n QiSI = wzkt - qcWV.timedelta(days=qukk(30), hours=qukk(20))\n NGUd = ajWY(1, 9999)\n YdD0.append(QiSI.strftime('%Y-%m-%d %H:%M:%S'))\n BWXx.append(NGUd)\n Csk... | [
"0.72119564",
"0.71324366",
"0.71303165",
"0.709831",
"0.7094657",
"0.689761",
"0.6897407",
"0.68377",
"0.6835536",
"0.6696262",
"0.66905826",
"0.6660093",
"0.6643918",
"0.66403705",
"0.66339",
"0.6631358",
"0.6624133",
"0.6574618",
"0.6558131",
"0.65438545",
"0.65243506",
... | 0.7222912 | 0 |
Missing column raises value error. | def aTSq(YKHO):
jQ3Z = YKHO.df.copy()
WuUW = YKHO.normalizer(f0=['f0'], f1=['f1'], f2=['f2'], f3=['f3'], **YKHO.kwargs)
WuUW.normalize(jQ3Z)
YKHO.assertListEqual(WuUW.params['formants'], ['f0', 'f1', 'f2', 'f3']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wrDR(YKHO):\n QBPu = YKHO.spark.createDataFrame(data=[('a',)], schema=JGNz([I0u1('baz', M9Gz())]))\n with cR0t(EoGv):\n YKHO.check.run(QBPu)",
"def h2dT(YKHO):\n YKHO.assertRaises(ValueError, YKHO.table.where, 'True')",
"def wysk(YKHO):\n jQ3Z = rLdf.DataFrame({'notlat': [1, 2, 3], 'lon'... | [
"0.76126474",
"0.7157405",
"0.7103793",
"0.6851812",
"0.6728142",
"0.65092444",
"0.65023357",
"0.64211464",
"0.6418578",
"0.63758487",
"0.63549376",
"0.6326887",
"0.6316502",
"0.63009286",
"0.62852997",
"0.6267968",
"0.62452155",
"0.6219084",
"0.6199182",
"0.6198687",
"0.6193... | 0.0 | -1 |
Get the current installed version. Returns the version or None if no version file exists. | def Aq2d(YKHO):
w5up = YKHO.get_version(YKHO.get_module_and_path(YKHO._main_dir))
return w5up | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kaPv():\n Bicb = Hy7s.path.dirname(Hy7s.path.realpath(xAKo))\n shAH = Hy7s.path.join(Bicb, R2BB)\n with open(shAH, 'r') as YgMx:\n return YgMx.read().strip()",
"def xhfZ(YKHO):\n try:\n VqRE = f'{bn_Y}/VERSION'\n with open(VqRE, 'r') as nUeQ:\n Nqlg = nUeQ.readline... | [
"0.8095902",
"0.76076704",
"0.7592984",
"0.75670975",
"0.75570583",
"0.75379413",
"0.7379542",
"0.733805",
"0.73287916",
"0.72015077",
"0.7171196",
"0.7165244",
"0.71251667",
"0.71168816",
"0.7110701",
"0.7095698",
"0.70243037",
"0.69658905",
"0.695611",
"0.69354236",
"0.6930... | 0.73910004 | 6 |
Load the resnet101 model pretrained on ImageNet | def LK9j(YKHO, mimT, VwBe=False):
aqBD = ZylS.train.latest_checkpoint(mimT)
with ZylS.Session(config=YKHO.config) as cb_Q:
DbxN = [ZylS.global_variables_initializer(), ZylS.local_variables_initializer()]
cb_Q.run(DbxN)
if VwBe:
YFyZ = [Ty9i for Ty9i in ZylS.global_variables()... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bNPE(LG94=2):\n print('Load pretrained ResNet 101.')\n C3ST = K0Xe(pretrained=True)\n fhcK = [C3ST.conv1, C3ST.bn1, C3ST.relu, C3ST.maxpool]\n fhcK += [getattr(C3ST, 'layer{}'.format(YRbF + 1)) for YRbF in range(LG94)]\n C3ST = ht2j.nn.Sequential(*fhcK)\n if ht2j.cuda.is_available():\n ... | [
"0.8064356",
"0.8008273",
"0.7961586",
"0.7885667",
"0.7885667",
"0.7885667",
"0.7885667",
"0.7870148",
"0.78621346",
"0.77309686",
"0.7551257",
"0.7546857",
"0.75162166",
"0.74979",
"0.74630153",
"0.7414404",
"0.7409193",
"0.7409193",
"0.7197343",
"0.7164848",
"0.71325177",
... | 0.6505143 | 88 |
Add a vertex to the graph. | def ohmD(YKHO, oqUi):
YKHO.vertices[oqUi] = set()
'\n if vertex_id not in self.vertices:\n self.vertices[vertex_id] = {}\n\n else:\n return "Vertex is already in Graph"\n ' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ohmD(YKHO, SLBp):\n raise NotImplementedError",
"def ohmD(YKHO, SLBp):\n if isinstance(SLBp, Yegm):\n YKHO.vertices.append(SLBp)\n return\n raise TypeError('Is not vertex instance!')",
"def ohmD(YKHO, niHF: n):\n rJkO = Yegm(niHF)\n YKHO._graph[rJkO.name] = rJkO",
"def ohmD(Y... | [
"0.87015903",
"0.84329987",
"0.8422056",
"0.840923",
"0.83646226",
"0.8317027",
"0.825337",
"0.808519",
"0.8081489",
"0.8038682",
"0.8035422",
"0.78834563",
"0.78711975",
"0.7838118",
"0.7838118",
"0.77608305",
"0.7757061",
"0.77158874",
"0.7711681",
"0.76663774",
"0.76616603... | 0.71924305 | 46 |
Return the status of the compute instance. | def acTL(YKHO, KAOR, lhKE):
if YKHO.compute_service is None:
G9jH.warning('Service unavailable: unable to start GCE VM: %s (%s)', KAOR, lhKE)
return
U34r = YKHO.compute_service.instances().get(project=k5i4.get_application_id(), instance=KAOR, zone=lhKE).execute()
return U34r[PmzY] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VLTN(YKHO):\n if YKHO.vm.get_cloud_status() != 'ACTIVE':\n return 'stopped'\n YKHO.vm.wait_ready()\n jGRS = YKHO.vm.run_command('ctool status', indent=0, prefix='')\n return jGRS.strip()",
"def jGRS(YKHO) -> qe4Y.Output['outputs.JobStatus']:\n return qe4Y.get(YKHO, 'status')",
"def Qs... | [
"0.73471135",
"0.7160243",
"0.69160175",
"0.68961394",
"0.68961394",
"0.68775284",
"0.68765116",
"0.6867322",
"0.6859501",
"0.6848467",
"0.6848467",
"0.6848467",
"0.6834241",
"0.6834241",
"0.6834241",
"0.6834241",
"0.6834241",
"0.6834241",
"0.6834241",
"0.6834241",
"0.6834241... | 0.8565394 | 0 |
Annotate articles using annotations json files. | def oKyU(PSbX):
e1Jb = Hy7s.listdir('data')
XgyP = nkyg()
eFEN = {}
for d6pt, gIsw in enumerate(e1Jb):
l3QS = qQXR.load(open(f'{PSbX}/articles/{gIsw}', 'r'))
print(f'{d6pt} - {l3QS['source']['id']}')
l3QS['label'] = XgyP.get(l3QS['source']['id'], None)
eFEN[l3QS['id']] = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Xtvh(LKAL, koL7):\n try:\n QQQv = E0Qh(LKAL)\n j_E3 = {}\n j_E3['paper_id'] = QQQv['paper_id']\n for Q7me, PvOi in _Fei.JSON_TEXT_MAP.items():\n MMe4 = Zct3(QQQv, [Q7me, 'entities'], default={})\n DuqQ = Zct3(QQQv, PvOi[1], default=PvOi[2])\n if M... | [
"0.6431345",
"0.64294845",
"0.6428023",
"0.6102727",
"0.6102437",
"0.60699654",
"0.6040102",
"0.6018383",
"0.60061306",
"0.5958754",
"0.59436",
"0.5913444",
"0.5909411",
"0.58803177",
"0.5831984",
"0.58196276",
"0.57776195",
"0.5769035",
"0.57619584",
"0.5752534",
"0.57462245... | 0.7815861 | 0 |
Remove stopwords from lines. | def wlUG(YKHO, _mt8):
return YKHO._doPerLine(_mt8, YKHO.removeStopwords) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wkDh(YKHO):\n s2mk = str(YKHO.doc).split()\n zLya = [eOtH for eOtH in s2mk if eOtH.lower() not in YKHO.stopword_list]\n YKHO.doc = ' '.join(zLya)",
"def ceXP(YKHO, BA9O=True, z5la=False):\n YKHO.textFile = YKHO.removeStopWords(text=YKHO.textFile, sort=BA9O, lc=z5la)",
"def AQLE(YKHO, V22M):\n ... | [
"0.7864564",
"0.773994",
"0.7738421",
"0.7503501",
"0.7501072",
"0.7354269",
"0.73199433",
"0.7313171",
"0.731213",
"0.7311197",
"0.728651",
"0.7267128",
"0.7253867",
"0.7249775",
"0.7240815",
"0.72347844",
"0.7202243",
"0.7201557",
"0.7190195",
"0.71899515",
"0.7173134",
"... | 0.7925392 | 0 |
Remove non valid (dictionary) words from lines. | def Fu0b(YKHO, _mt8):
return YKHO._doPerLine(_mt8, YKHO.removeNonDictionaryWords) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KtZW(YKHO, V22M):\n rw6h = [yzQ0.strip() for yzQ0 in V22M.split(' ')]\n kgme = []\n for GIN8 in rw6h:\n if GIN8.lower() in YKHO.dictionary:\n kgme.append(GIN8)\n return ' '.join(kgme)",
"def l4Z4(zFiD):\n try:\n gZgb = 'abcdefghijklmnopqrstuvwqyz '\n rU5H = list... | [
"0.75094044",
"0.65037674",
"0.64140123",
"0.62894666",
"0.62682337",
"0.614901",
"0.6137755",
"0.602115",
"0.600726",
"0.6004002",
"0.5996085",
"0.59231675",
"0.58709854",
"0.5848661",
"0.58485305",
"0.5821262",
"0.5814029",
"0.58028007",
"0.57997364",
"0.5784998",
"0.577965... | 0.78282195 | 0 |
Remove numbers from lines. | def o4mI(YKHO, _mt8):
return YKHO._doPerLine(_mt8, YKHO.removeNumbers) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gTsR(OZKa: str) -> str:\n oi6k = ' ' * 6\n Aofo = ''\n for zFiD in OZKa.splitlines():\n b_bB = oi6k + zFiD[6:72].rstrip()\n Aofo += b_bB + '\\n'\n return Aofo",
"def sfFj(YKHO):\n YKHO.doc = ZbWC.sub('[0-9]', '', YKHO.doc)",
"def aJ9a(yPpP, _RR0):\n with open(yPpP, 'r+') as ... | [
"0.7703879",
"0.7392791",
"0.70746034",
"0.7025942",
"0.7009733",
"0.68820417",
"0.68615",
"0.6765951",
"0.67536426",
"0.67536426",
"0.67536426",
"0.6735944",
"0.6724722",
"0.67224526",
"0.67015064",
"0.6620004",
"0.65745974",
"0.6524549",
"0.6472473",
"0.64109653",
"0.640440... | 0.79615754 | 0 |
Remove apostrophes from string, replace with no space. | def zstP(YKHO, V22M):
return YKHO.__apostropheRegex.sub('', V22M) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fW5r(l5Ny: str) -> str:\n fqdu = ZbWC.compile(\"'\")\n return fqdu.sub(' ', l5Ny)",
"def r5Li(mjUg, IRZO=False):\n if IRZO:\n return ZbWC.sub(\"'\", \"' \", mjUg, flags=ZbWC.UNICODE)\n return ZbWC.sub(\"'[ ]+\", \"'\", mjUg, flags=ZbWC.UNICODE)",
"def wQTV(KCHu):\n KCHu = KCHu.replace... | [
"0.8106764",
"0.74617136",
"0.7287106",
"0.7152773",
"0.7135621",
"0.698787",
"0.6982936",
"0.6968641",
"0.6897641",
"0.6887271",
"0.6884099",
"0.6870498",
"0.6862608",
"0.6862608",
"0.6862608",
"0.68227553",
"0.68227553",
"0.68227553",
"0.67770875",
"0.67469656",
"0.6744332"... | 0.77596164 | 1 |
Remove apostrophes from string, replace with no space. | def wWV_(YKHO, _mt8):
return YKHO._doPerLine(_mt8, YKHO.removeApostrophes) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fW5r(l5Ny: str) -> str:\n fqdu = ZbWC.compile(\"'\")\n return fqdu.sub(' ', l5Ny)",
"def zstP(YKHO, V22M):\n return YKHO.__apostropheRegex.sub('', V22M)",
"def r5Li(mjUg, IRZO=False):\n if IRZO:\n return ZbWC.sub(\"'\", \"' \", mjUg, flags=ZbWC.UNICODE)\n return ZbWC.sub(\"'[ ]+\", \"... | [
"0.81055146",
"0.7758357",
"0.7461573",
"0.728601",
"0.71531105",
"0.71331555",
"0.69889706",
"0.6982105",
"0.69677263",
"0.6895639",
"0.68866587",
"0.68838227",
"0.6868516",
"0.68617475",
"0.68617475",
"0.68617475",
"0.6822003",
"0.6822003",
"0.6822003",
"0.67751116",
"0.674... | 0.0 | -1 |
Redirect / to home | def or8S(N0q9):
return Yd7Q('/home') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vja_():\n return vKnz(nKyW(tajT, _external=True))",
"def C_QL():\n return vKnz('index.html')",
"def C_QL():\n if Oa1e.user:\n return vKnz(f'/user/{Oa1e.user.id}')\n else:\n return vKnz('/landing')",
"def oUar(QePW):\n bD7m = QePW.route_url('home', _app_url=NxLh(QePW))\n re... | [
"0.8082355",
"0.78268355",
"0.78140163",
"0.7697245",
"0.7662372",
"0.7662372",
"0.76204866",
"0.7586416",
"0.75657976",
"0.7239277",
"0.7239277",
"0.7239277",
"0.7199949",
"0.71403354",
"0.7117525",
"0.7111367",
"0.7101667",
"0.7037962",
"0.69972193",
"0.6955822",
"0.6952345... | 0.69453245 | 21 |
Iterate over items of dictionaries grouped by their keys. | def jGnF(*fgcx):
for H5ew in set(eNCK(*fgcx)):
yield (H5ew, tuple((Csk6[H5ew] for Csk6 in fgcx))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pDqX(YKHO, fgcx, *sjXb):\n qDyV = YKHO._group_by_keys(fgcx, *sjXb)\n YKHO._add_nested(*qDyV)",
"def cABs(YKHO, fgcx, *sjXb):\n jvSB = YKHO._node\n gGq6 = MUE7(sjXb)\n if not gGq6:\n yield NSB4(value=fgcx, prev=jvSB)\n else:\n G1Hx = gGq6.popleft()\n for BWXx, uOe2 in wk... | [
"0.6725235",
"0.6567386",
"0.64867306",
"0.6466305",
"0.6280895",
"0.6240501",
"0.60855174",
"0.5997162",
"0.5971412",
"0.5961661",
"0.59095",
"0.5824047",
"0.5793823",
"0.5755697",
"0.5678185",
"0.5667236",
"0.5649095",
"0.564064",
"0.56278694",
"0.5627846",
"0.5627846",
"... | 0.5807228 | 12 |
Check whether a string is image filename. | def sXG2(ZfUD: ValueType, ROpF: List) -> x1iM:
if len(ZfUD.shape) > 0:
ZfUD = str(ZfUD[0])
if ZfUD.endswith(('.jpg', '.jpeg', '.png')):
import cv2
Xn71 = cv2.imread(ZfUD)
if Xn71 is not None:
return list(Xn71.shape)
return ROpF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ETKF(Ux0P: str) -> str:\n Fst3 = Ux0P.rsplit('.', 1)[-1].lower()\n assert Fst3 in l8Tj, f'Invalid image: {Ux0P}. Allowed extensions: {l8Tj}'\n return Fst3",
"def zX_T(YKHO, i3ZT):\n zZcM = YKHO.parser.getAttribute(i3ZT, attr='src')\n if not zZcM:\n return False\n if YKHO.badimages_na... | [
"0.7608436",
"0.76025814",
"0.7444619",
"0.7416114",
"0.73984385",
"0.7390316",
"0.73726195",
"0.73578465",
"0.73092675",
"0.7267071",
"0.7263729",
"0.72166276",
"0.7208612",
"0.7204594",
"0.7137469",
"0.7007611",
"0.6992768",
"0.6909233",
"0.69069165",
"0.6838164",
"0.677672... | 0.0 | -1 |
Add a product to a Wishlist This endpoint will add a product to a wishlist based on the customer ID, Wishlist ID, an product ID specified in the path | def iwil(E1kb, JNoc, Ii1o):
if xp_p.check_custid(E1kb):
Ol8d = xp_p.find_by_id(E1kb, JNoc)
if Ol8d:
Aofo = xp_p.addProduct(E1kb, JNoc, Ii1o)
Ylbp = xp_p.find_by_id(E1kb, JNoc)
return Yxsy(pz3A(Ylbp), jGRS.HTTP_200_OK)
else:
Ol8d = {'Error': 'Wi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bRw9(QePW, Mc9N):\n Lx3t = Iofl(msfn, pk=Mc9N)\n lU60 = Iofl(KqKN, user=QePW.user)\n if Lx3t not in lU60.products.all():\n lU60.products.add(Lx3t)\n yEHD.info(QePW, f'{Lx3t.name} has been added to your wishlist.')\n else:\n yEHD.error(QePW, 'Error, you already have this item in... | [
"0.78311646",
"0.7714367",
"0.72921324",
"0.7126104",
"0.6870437",
"0.6560975",
"0.65350527",
"0.6525585",
"0.6482619",
"0.64470387",
"0.64369",
"0.6409642",
"0.62782234",
"0.62294513",
"0.61490035",
"0.61102015",
"0.60411954",
"0.6031813",
"0.60058576",
"0.5950916",
"0.58347... | 0.83785206 | 0 |
List products of a Wishlist This endpoint will list products of a Wishlist based on the customer id and Wishlist id specified in the path | def fkT1(E1kb, JNoc):
if xp_p.check_custid(E1kb):
Ol8d = xp_p.find_by_id(E1kb, JNoc)
if Ol8d:
return Yxsy(pz3A(Ol8d), jGRS.HTTP_200_OK)
else:
Ol8d = {'Error': 'Wishlist with the given ID not found'}
return Yxsy(pz3A(Ol8d), jGRS.HTTP_404_NOT_FOUND)
else... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lU60(QePW):\n DumB = []\n CBIr = Iofl(BFpK, user=QePW.user)\n lU60 = KqKN.objects.get_or_create(user=CBIr)\n V4tR = lU60[0]\n RM6T = mAj8.objects.filter(wishlist=V4tR).exists()\n if RM6T:\n vXOI = T6Eh(mAj8, wishlist=V4tR)\n for YEnM in vXOI:\n Lx3t = Iofl(msfn, name=... | [
"0.68854594",
"0.6711203",
"0.6709914",
"0.6668284",
"0.63757807",
"0.62108207",
"0.61958843",
"0.6093503",
"0.60550845",
"0.59716594",
"0.5942139",
"0.59314245",
"0.59195757",
"0.5884176",
"0.5883211",
"0.5881444",
"0.5870758",
"0.58315784",
"0.57774055",
"0.5734042",
"0.571... | 0.6725888 | 1 |
Extract Pytorch tensors from nifti images. | def GSyo() -> None:
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JRK4(YKHO, Yw_3):\n if Yw_3.ndim != 4 or Yw_3.shape[0] <= 0 or Yw_3.shape[0] > YKHO.batch_size or (Yw_3.shape[1] not in [1, 3]):\n raise ValueError(f'Input images should be with shape [batch_size, channel, height, width], where `batch_size` no larger than {YKHO.batch_size}, `channel` equals to 1 or 3... | [
"0.6757566",
"0.64020675",
"0.6265425",
"0.6083146",
"0.60794044",
"0.60552996",
"0.6045613",
"0.6037987",
"0.5963121",
"0.5944206",
"0.58701",
"0.5844615",
"0.57813996",
"0.5765604",
"0.57654303",
"0.5755759",
"0.5753248",
"0.5702996",
"0.569438",
"0.56833714",
"0.5641909",
... | 0.0 | -1 |