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
utitlity function which converts datetime object to string by using given format
def wozj(eGVy, DAsM): return eGVy.strftime(DAsM)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hLAQ(_c1T, x8us=qiyp):\n return _c1T.strftime(x8us)", "def hLAQ(YEnM):\n return YEnM.strftime('%Y-%m-%d %H:%M:%S')", "def hLAQ(YEnM):\n if not YEnM:\n return False\n return YEnM.strftime(Vjr_)", "def QK8D(pdbK):\n if pdbK is None:\n return 'None'\n return pdbK.strftime('%Y...
[ "0.774227", "0.75884473", "0.74928164", "0.7473095", "0.739007", "0.7299268", "0.7299268", "0.7295642", "0.7279088", "0.72779906", "0.7252911", "0.72221386", "0.72100514", "0.7144959", "0.7118181", "0.7088526", "0.7084137", "0.70834726", "0.70770425", "0.7042669", "0.70410705...
0.7968772
0
function to find out if the iterator values are strictly increasing
def hfzg(hkxX): return all([YRbF <= r845 for YRbF, r845 in zip(hkxX, hkxX[1:])])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def U4Ag(nPrm):\n return (oyIN.diff(nPrm) > 0).all() == True", "def cyVS(Q6uT):\n for YRbF, r845 in enumerate(Q6uT[:-1]):\n if r845 >= Q6uT[YRbF + 1]:\n return False\n return True", "def Mg38(jzdc):\n return oyIN.all(oyIN.diff(jzdc) > 0)", "def hfzg(Q6uT):\n for YRbF in range...
[ "0.7550674", "0.742065", "0.7380579", "0.7330071", "0.7295085", "0.69785655", "0.6967177", "0.69096357", "0.6828117", "0.6765246", "0.66230834", "0.65786606", "0.6456287", "0.64211696", "0.6420313", "0.63956785", "0.6387355", "0.63474953", "0.63260007", "0.630477", "0.6302267...
0.74788445
1
function to find out if the iterator values are strictly decreasing
def dhsH(hkxX): return all([YRbF >= r845 for YRbF, r845 in zip(hkxX, hkxX[1:])])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Mg38(jzdc):\n return oyIN.all(oyIN.diff(jzdc) > 0)", "def hfzg(hkxX):\n return all([YRbF <= r845 for YRbF, r845 in zip(hkxX, hkxX[1:])])", "def b9KO(YKHO) -> bool:\n return YKHO[::-1].is_monotonic_increasing", "def bAZc(aWuw, U3Fm=False):\n return f3N3(list(reversed(aWuw)), U3Fm)", "def Cd8...
[ "0.75458854", "0.72780436", "0.7247122", "0.72342974", "0.71599364", "0.7133871", "0.70926654", "0.7085752", "0.70222306", "0.6850934", "0.6847655", "0.68165034", "0.6760362", "0.67144686", "0.6692387", "0.6684923", "0.6496994", "0.64900136", "0.648634", "0.6305804", "0.61978...
0.78962004
0
Returns the z for which P(Z >= z) = probability
def vRHY(Q7Be: float, yGTL: float=0, WTkW: float=1) -> float: return K0SZ(1 - Q7Be, yGTL, WTkW)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def guBC(epBp):\n RdgZ = 6.0\n if epBp == 0.0:\n WKvO = 0.0\n else:\n LVAh = 0.5 * epAf.fabs(epBp)\n if LVAh >= RdgZ * 0.5:\n WKvO = 1.0\n elif LVAh < 1.0:\n yzQ0 = LVAh * LVAh\n WKvO = ((((((((0.000124818987 * yzQ0 - 0.001075204047) * yzQ0 + 0....
[ "0.7842882", "0.75300777", "0.7506635", "0.73198897", "0.678861", "0.6602982", "0.64032084", "0.6326456", "0.6299229", "0.62925357", "0.6259421", "0.6219085", "0.6216597", "0.6143424", "0.6125308", "0.60966885", "0.6074466", "0.6065904", "0.6032191", "0.59980464", "0.5996478"...
0.0
-1
Test successful and failed container spawns
def SfeG(YKHO): Ct_r = {'job_dir': '/jobs/2020', 'job_type': '', 'job_parameters': '', 'timeout': 0} YKHO._mock_os.makedirs.side_effect = OSError() with YKHO.assertRaises(sxQx.SpawnerError, msg='Cannot create job directory ' + Ct_r['job_dir']): YKHO._container_spawner.spawn(job_args=Ct_r) YKHO._...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def n3iD(YKHO):\n YKHO.log('%s STARTED' % YKHO._testID)\n YKHO.log('Create a two container on that node, should succeed.')\n YKHO.cont1_name = YKHO.random_string()\n YKHO.containers = {YKHO.cont1_name: {'hostname': YKHO.cont1_name, 'flist': YKHO.cont_flist, 'storage': YKHO.cont_storage}}\n YKHO.cont...
[ "0.7310803", "0.7193672", "0.7153792", "0.6946781", "0.68586415", "0.67054707", "0.66968685", "0.6683956", "0.65811104", "0.6398159", "0.63944906", "0.63114107", "0.6302709", "0.62845296", "0.62816197", "0.62734425", "0.62709486", "0.6251736", "0.62441754", "0.6203492", "0.62...
0.6690945
7
Return True if N is prime number. >>> is_prime(7) True >>> is_prime(10) False >>> is_prime(1) False
def T1qg(exwG): def XWzv(d6pt): if d6pt == exwG: return True elif exwG % d6pt == 0 or exwG == 1: return False else: return XWzv(d6pt + 1) return XWzv(2)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FBNJ(exwG):\n return T1qg(exwG)", "def FBNJ(exwG):\n return T1qg(exwG)", "def T1qg(exwG):\n return kU5Q(exwG)", "def JVAb(Emd4, exwG):\n if exwG <= 1:\n return False\n if exwG <= 3:\n return True\n if exwG % 2 == 0 or exwG % 3 == 0:\n return False\n YRbF = 5\n ...
[ "0.85019106", "0.8492053", "0.82565874", "0.8243938", "0.8200872", "0.81477684", "0.81238955", "0.810259", "0.8102104", "0.809813", "0.80880064", "0.8062325", "0.80484855", "0.8036164", "0.8013056", "0.79856193", "0.79842776", "0.79748416", "0.7970765", "0.7969587", "0.796861...
0.7573713
66
A hole number is a number in which every other digit dips below the digits immediately adjacent to it. >>> check_hole_number(123) False >>> check_hole_number(3241968) True >>> check_hole_number(3245968) False
def sNkd(exwG): if exwG // 10 == 0: return True return exwG // 10 % 10 < exwG % 10 and exwG // 10 % 10 < exwG // 100 % 10 and sNkd(exwG // 100)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Hpa0(YKHO):\n BHGE = YKHO.number\n v2qf = 0\n Zc6P = False\n p6S0 = []\n for WKvO in str(BHGE):\n p6S0.append(int(WKvO))\n for Csk6 in reversed(p6S0):\n assert 0 <= Csk6 <= 9\n if Zc6P:\n Csk6 *= 2\n if Csk6 > 9:\n Csk6 -= 9\n v...
[ "0.66089475", "0.6524737", "0.6501561", "0.6289364", "0.6287634", "0.62772197", "0.6240159", "0.61689353", "0.61232096", "0.60461533", "0.6029135", "0.5990273", "0.59401137", "0.57957417", "0.57953656", "0.57865435", "0.5781659", "0.5775289", "0.5756116", "0.57402855", "0.570...
0.81741446
0
Generates sample Data frame with IDs, Timestamps and Values. For example see doctest file.
def nF2h(YKHO, sB1G: str, LGze: int=100, Wo3y: Optional[List[int]]=None) -> hxoQ: if Wo3y is None: YKHO._set_seed() Wo3y = [tuKI.randint(1, 5) for YRbF in range(100)] gYE7 = rLdf.DataFrame() exwG = len(Wo3y) E3oo, BWXx = zip(*YKHO.generate_year_data(data_type=sB1G, n=exwG, max_int=LGze))...
{ "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.7315561", "0.687136", "0.65831095", "0.63964635", "0.6392277", "0.6379468", "0.63008595", "0.6298811", "0.62672", "0.61975276", "0.61879694", "0.61879694", "0.61844665", "0.61438197", "0.6103917", "0.60850954", "0.6079151", "0.60590446", "0.60191536", "0.60087585", "0.6002...
0.63883775
5
Construct Note from dct.
def jG8h(Emd4, fK8P): if fK8P.pop('type') != Emd4.__name__: FMLJ = 'Can not construct Note from dict %s' raise ValueError(FMLJ % fK8P) return Emd4(**fK8P)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jG8h(Emd4, fK8P):\n pass", "def jG8h(Emd4, _eoY):\n ufBE = set(Emd4.SERIALIZED_ATTRIBUTE_TYPES.keys()) - set(_eoY.keys())\n if len(ufBE) > 0:\n raise aIO3('Some required properties are missing: {}'.format(ufBE))\n for xC3W in Emd4.SERIALIZED_ATTRIBUTE_TYPES:\n if not type(_eoY[xC3W]...
[ "0.62324816", "0.5825756", "0.5774063", "0.5663643", "0.5614052", "0.55089915", "0.5474682", "0.5443261", "0.5397188", "0.5305946", "0.52507657", "0.5241753", "0.52146935", "0.5207193", "0.51884204", "0.5182707", "0.5166838", "0.5165633", "0.5133356", "0.51174647", "0.5113889...
0.7634096
0
Construct Note from JSON string.
def pktP(Emd4, vIwR): fK8P = qQXR.loads(vIwR) return Emd4.from_dict(fK8P)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rmNw(Emd4, nMY2):\n return Emd4.from_json(HjBM.loads(nMY2))", "def K3BH(q4cj):\n sWfS = qQXR.loads(q4cj)\n return sWfS", "def BXU7(YKHO, l5Ny):\n try:\n AIu6 = qQXR.loads(l5Ny)\n except Exception as e:\n G9jH.error(f'Exception: {tTpl}')\n G9jH.error(f'datapoint: {l5Ny}')...
[ "0.6801496", "0.6657323", "0.6346291", "0.63246197", "0.63137436", "0.6251102", "0.62326396", "0.62253714", "0.6223952", "0.62132555", "0.6209065", "0.6195011", "0.6195011", "0.6191375", "0.6179499", "0.6179499", "0.6179499", "0.61794966", "0.6161784", "0.6157292", "0.6157292...
0.683505
0
Serialize as JSON string.
def oD7C(YKHO): return qQXR.dumps(YKHO.to_dict())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KbCx(YKHO):\n return qQXR.dumps(YKHO.asDict(), sort_keys=True)", "def lPbk(YKHO):\n xzoI = YKHO.toDict()\n return qQXR.dumps(xzoI, ensure_ascii=False)", "def oD7C(YKHO) -> str:\n return qQXR.dumps(YKHO.to_dict())", "def oD7C(YKHO) -> str:\n return qQXR.dumps(YKHO.to_dict())", "def oD7C(Y...
[ "0.82893336", "0.8268846", "0.8192226", "0.8192226", "0.8192226", "0.8192226", "0.8192226", "0.8192226", "0.8192226", "0.8192226", "0.8192226", "0.8183975", "0.8171755", "0.8154721", "0.8148741", "0.8131409", "0.8111274", "0.80836797", "0.80651903", "0.8052366", "0.8039835", ...
0.7798914
62
Return a project's localconfig contents (or default if missing).
def D_HL(zkL1: Path) -> cuzp[str, ImMB]: _rPQ: cuzp[str, ImMB] try: with open(GkAb(zkL1, 'config/localconfig.json')) as apum: _rPQ = qQXR.loads(apum.read()) except FileNotFoundError: _rPQ = {} return _rPQ
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gHym():\n if gHym.CONFIG is None:\n import json\n with open('project.json') as ytgA:\n gHym.CONFIG = json.load(ytgA)\n return gHym.CONFIG", "def gHym(O0al, XyVJ=True):\n return uGXi(O0al, use_cache=XyVJ) or rtio(O0al, use_cache=XyVJ) or yDgW()", "def uGXi(O0al, XyVJ=True):...
[ "0.70170414", "0.6907102", "0.69056165", "0.68427473", "0.65916365", "0.6476708", "0.6332859", "0.6320358", "0.63101274", "0.6295776", "0.6251484", "0.62400305", "0.62280333", "0.6227188", "0.6201059", "0.61987144", "0.60728556", "0.6068038", "0.6026095", "0.5989678", "0.5964...
0.7654283
0
Utility to recursively delete keys with no value.
def Oyo4(Csk6): for H5ew, BWXx in list(Csk6.items()): if BWXx is None or BWXx == '': del Csk6[H5ew] elif isinstance(BWXx, dict): Oyo4(BWXx) return Csk6
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def V0Bq(Csk6):\n for H5ew in Csk6.keys():\n if Csk6[H5ew] is None:\n del Csk6[H5ew]\n return Csk6", "def kcGM(fGC9):\n if isinstance(fGC9, dict):\n for H5ew, BWXx in list(fGC9.items()):\n if isinstance(BWXx, dict):\n kcGM(BWXx)\n elif BWXx i...
[ "0.74256355", "0.7168771", "0.7042284", "0.70100415", "0.68680394", "0.68507105", "0.6827919", "0.6616483", "0.655199", "0.64822036", "0.6479535", "0.64350367", "0.6399073", "0.63745147", "0.63300365", "0.6262614", "0.62390226", "0.6160876", "0.6158151", "0.6118191", "0.60781...
0.6968649
4
r"""Creates a fullyconnected (ReLU by default) layer with
def Ioxh(UBMT, MY1T, Fmaf, m1Hg=ZylS.nn.relu, mWFP=None): with ZylS.name_scope(mWFP): Deam = ZylS.truncated_normal((MY1T, Fmaf), stddev=0.1) _mSQ = ZylS.Variable(Deam, name='weights') h0_e = ZylS.constant(0.0, shape=[Fmaf], dtype=ZylS.float32) HabP = ZylS.Variable(h0_e, name='biases'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def K9uC(input, zNig):\n return ZylS.nn.relu(VoJx(input, zNig))", "def tuA3(vHnr, gqIb, YDYE=ZylS.nn.relu, lzjZ='', nfqd=False):\n if not lzjZ:\n lzjZ = ''.join((str(WKvO) for WKvO in oyIN.random.randint(9, size=10)))\n yzQ0 = ZylS.Variable(ZylS.truncated_normal([int(vHnr.shape[1]), gqIb]), name=...
[ "0.72926354", "0.67506754", "0.67497474", "0.66754407", "0.66752756", "0.65914243", "0.6540724", "0.6511563", "0.6476631", "0.64698637", "0.6435268", "0.63652444", "0.6349807", "0.63429374", "0.6271413", "0.62618846", "0.62441677", "0.62283623", "0.6225963", "0.6219159", "0.6...
0.57921433
80
Takes in a list of images and returns softmax probabilities.
def LI2u(YKHO, Yw_3, IZ_Z=True): if IZ_Z: zlg1 = [B6HJ(Xn71, (224, 224)) for Xn71 in Yw_3] else: zlg1 = Yw_3 kdJa = {YKHO.input_images: zlg1} return cb_Q.run(MYHg.output, kdJa)[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def N93T(g4y1):\n BFeB = oyIN.exp(g4y1)\n BFeB /= oyIN.sum(BFeB, axis=0)[oyIN.newaxis, :]\n return BFeB", "def N93T(g4y1):\n return oyIN.exp(g4y1) / float(sum(oyIN.exp(g4y1)))", "def N93T(g4y1):\n return oyIN.exp(g4y1) / float(sum(oyIN.exp(g4y1)))", "def N93T(WKvO):\n ROpF = WKvO.shape\n ...
[ "0.72290164", "0.69299406", "0.69299406", "0.685859", "0.6712751", "0.67075914", "0.66937083", "0.6678799", "0.6661235", "0.66478896", "0.6638762", "0.6592364", "0.6569064", "0.65556556", "0.65505946", "0.6539283", "0.6539103", "0.65384495", "0.6513558", "0.64980525", "0.6497...
0.0
-1
Generate a random string of fixed length
def BWvy(FVpJ=10): KoG3 = vIwR.ascii_lowercase return ''.join((Acvy(KoG3) for YRbF in range(FVpJ)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def YzjY(u54L: int):\n FLLz = vIwR.ascii_letters + vIwR.digits\n return ''.join(tuKI.choices(FLLz, k=u54L))", "def e7Tf(u54L=6):\n exwG = int(u54L / 2 + 1)\n WKvO = MRxC.hexlify(Hy7s.urandom(exwG))\n KCHu = WKvO[:u54L]\n return KCHu.decode('utf-8')", "def e7Tf(u54L):\n return ''.join((tuKI...
[ "0.8680464", "0.8573714", "0.85486245", "0.85297275", "0.85209286", "0.84331024", "0.8432044", "0.84157014", "0.84120053", "0.8389201", "0.8345882", "0.8343962", "0.83406156", "0.83348686", "0.83240855", "0.82986933", "0.82911193", "0.8281826", "0.82818025", "0.82811046", "0....
0.79591393
53
Overlay the individual fibers within an IFU on a plot.
def eyuD(YKHO, aNZO, NrEI=None, QQ7z=None, Ld7p=True, **B2fa): if YKHO.wcs is None: raise aZXS('No WCS found. Cannot overlay fibers.') if NrEI: assert isinstance(NrEI, (float, int)), 'diameter must be a number' NrEI = (NrEI or 2.0) / float(YKHO.header['SCALE']) AGXW = YKHO.bundle.fibers...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def B8D2(lO3O):\n o36Q = lO3O.feature_importances_\n print(len(o36Q))\n o36Q = 100 * (o36Q / o36Q.max())\n r4jz = oyIN.argsort(o36Q)\n oeNL = oyIN.arange(len(o36Q))\n print(oeNL)\n QrM1.figure()\n QrM1.barh(oeNL, o36Q[r4jz], align='center')\n QrM1.savefig('featureImporances.png')", "de...
[ "0.6331801", "0.5841936", "0.58298343", "0.5817217", "0.58132106", "0.5781872", "0.5672604", "0.56334144", "0.56060505", "0.55776566", "0.5554674", "0.55494976", "0.55289525", "0.55170166", "0.55066127", "0.5495125", "0.54643756", "0.5442674", "0.5439164", "0.54361653", "0.54...
0.54800206
16
Overlay the sky fibers on a plot
def I1PF(YKHO, aNZO, NrEI=None, Ld7p=True, **B2fa): if YKHO.wcs is None: raise aZXS('No WCS found. Cannot overlay sky fibers.') if YKHO.bundle.skies is None: YKHO.bundle.get_sky_coordinates() if NrEI: assert isinstance(NrEI, (float, int)), 'diameter must be a number' NrEI = (NrE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kj9G(YKHO):\n YKHO.plotOfHeatingCurrent().plot()", "def ZMiI(YKHO):\n YKHO.CombinedPlotHelper(minc=70, maxc=170, num=50)", "def kj9G(YKHO):\n YKHO.fig = QrM1.figure('black hole')\n YKHO.fig.clf()\n YKHO.ax = QrM1.subplot()\n if YKHO.img2 is not None:\n YKHO.ax.imshow(YKHO.img2)\n ...
[ "0.65283877", "0.64167815", "0.64050853", "0.63602334", "0.6350044", "0.62508094", "0.6211702", "0.6174098", "0.6173661", "0.6167938", "0.6144616", "0.61092955", "0.6090199", "0.60846317", "0.60665613", "0.6061195", "0.60602343", "0.60559255", "0.6053103", "0.6047373", "0.604...
0.6217057
6
Instantiate NOV class with test values. The additional parameters can be passed to test NOV under different carbon conditions.
def BUNG(Emd4, j1RG, n9GZ, AMJL, HCap, uqOv): return Yw1Q(discount_rate=Emd4.DISCOUNT_RATE, lifetime=Emd4.LIFETIME, unit_size=Emd4.UNIT_SIZE, capacity_factor=Emd4.CAPACITY_FACTOR, variable_cost_esc_rate=Emd4.VARIABLE_COST_ESC_RATE, fuel_esc_rate=Emd4.FUEL_ESC_RATE, carbon_esc_rate=Emd4.CARBON_ESC_RATE, variable_om=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nzOw(Emd4, **B2fa):\n YEnM = super(LHg7, Emd4).create_test_instance(**B2fa)\n YEnM.choose_sensitivity_matrix('auto')\n return YEnM", "def wsej():\n iDNd = t7jS(population_size=500, generations=1000, mutation_rate=0.05, crossover_rate=0.9, scoring='accuracy', num_cv_folds=10, verbosity=1, random_s...
[ "0.63493186", "0.6026954", "0.59564155", "0.588115", "0.5875367", "0.58316797", "0.5806599", "0.578889", "0.5755929", "0.57557577", "0.57468635", "0.57283837", "0.5688957", "0.56883466", "0.56550163", "0.5638191", "0.5634541", "0.56184834", "0.5611818", "0.5609465", "0.560147...
0.6004321
2
Text representation of the RateLimitedIP object.
def qQNS(YKHO, YEnM): return jKi7.text_type(YEnM)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zAg0(YKHO):\n if not YKHO.parsed:\n return ''\n uD_4 = []\n uD_4.append('IPP version : %s.%s' % YKHO.version)\n uD_4.append('IPP operation Id : 0x%04x' % YKHO.operation_id)\n uD_4.append('IPP request Id : 0x%08x' % YKHO.request_id)\n for JV_b in YKHO.attributes_types:\n for xC3W...
[ "0.6826606", "0.6542127", "0.6510034", "0.63695925", "0.625228", "0.6201073", "0.619602", "0.6191498", "0.61246216", "0.6117054", "0.6117054", "0.6117054", "0.6117054", "0.6117054", "0.6117054", "0.6117054", "0.6117054", "0.6117054", "0.6117054", "0.6117054", "0.6117054", "...
0.0
-1
Loads the MPEG7 Shape dataset, containing 1400 images of 70 classes (20 images per class). Returns
def sXMH(): dx6l = Hy7s.path.join(Sd6D, 'MPEG7') iumf = Hy7s.listdir(dx6l) iumf.sort() nPrm = [] pan_ = oyIN.empty([len(iumf)]) pBYc = '' V3Tb = -1 d6pt = 0 for d6pt, Ux0P in enumerate(iumf): nPrm.append(IaTv(xDSY.imread(Hy7s.path.join(dx6l, Ux0P)))) UQrQ = Ux0P.split...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tdch(YKHO, UHFx, WD4p, V090, ke2_, bN2o):\n YKHO.add_class('shapes', 1, 'red_s')\n YKHO.add_class('shapes', 2, 'red_m')\n YKHO.add_class('shapes', 3, 'red_l')\n YKHO.add_class('shapes', 4, 'yellow_s')\n YKHO.add_class('shapes', 5, 'yellow_m')\n YKHO.add_class('shapes', 6, 'yellow_l')\n YKH...
[ "0.6238543", "0.60697573", "0.60312223", "0.60145223", "0.594461", "0.59373033", "0.5933787", "0.58944863", "0.5872117", "0.5820331", "0.577066", "0.5760281", "0.57535404", "0.575338", "0.57426155", "0.5738027", "0.5737724", "0.57094383", "0.5707139", "0.5698266", "0.56765753...
0.7233063
0
Parse attribute list and return a list of attribute tuples.
def yNPn(str): return K53F.scan(str)[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PDoX(tk5Y):\n kjNI = []\n for bGrB, BWXx in enumerate(tk5Y[0][2]):\n hkS8 = URbA(BWXx)\n kjNI.append(hkS8)\n return kjNI", "def s8PD(LaVg):\n o8Kj = []\n while LaVg:\n a1PO = ord(LaVg[0])\n vC9B = ord(LaVg[1])\n if vC9B < 2:\n break\n Csk6, ...
[ "0.67604405", "0.66291606", "0.6610874", "0.652041", "0.6257682", "0.62263906", "0.61935157", "0.61172664", "0.6112285", "0.61068577", "0.6081897", "0.6030436", "0.60205835", "0.60033137", "0.5950777", "0.5943913", "0.593525", "0.59156185", "0.5847191", "0.58143216", "0.58031...
0.5172441
64
Six months before September should be March
def pSvI(YKHO): x0eS, lO87 = wBUL(9, 2000, -6) YKHO.assertEqual(x0eS, 3) YKHO.assertEqual(lO87, 2000)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def HC22(YKHO):\n x0eS, lO87 = wBUL(3, 2000, -6)\n YKHO.assertEqual(x0eS, 9)\n YKHO.assertEqual(lO87, 1999)", "def KrLt(YKHO):\n x0eS, lO87 = wBUL(3, 2000, 6)\n YKHO.assertEqual(x0eS, 9)\n YKHO.assertEqual(lO87, 2000)", "def hPGc(YKHO):\n x0eS, lO87 = wBUL(9, 2000, 6)\n YKHO.assertEqual...
[ "0.7512543", "0.7421695", "0.73840296", "0.66225696", "0.66225696", "0.6583417", "0.64840406", "0.6358635", "0.63089365", "0.63039184", "0.6261856", "0.6220307", "0.6168135", "0.6108113", "0.61015356", "0.60928607", "0.6042373", "0.59938365", "0.59928393", "0.5985336", "0.598...
0.74320894
1
Return the value that the user entered. After a valid value has been entered, and OK button pushed (or enter pressed), this method may be used to retrieve the value. Returns ``None`` in all other situations.
def RZMD(YKHO): if YKHO.__cancelled: return None else: return YKHO.__value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Zmkp(YKHO):\n return input('Enter your choice :')", "def BWXx(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'value')", "def BWXx(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'value')", "def BWXx(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'value')", "def BWX...
[ "0.75344014", "0.70560366", "0.70560366", "0.70560366", "0.70560366", "0.70560366", "0.70560366", "0.70560366", "0.70560366", "0.70560366", "0.70560366", "0.70560366", "0.70560366", "0.70560366", "0.70560366", "0.70560366", "0.70560366", "0.70560366", "0.70560366", "0.6802181",...
0.63783395
53
Called when the Ok button is pushed. The entered value is stored and the dialog is closed. The value may be retrieved via the
def Fiaa(YKHO, chmV): YKHO.__value = YKHO.__spinCtrl.GetValue() if YKHO.IsModal(): YKHO.EndModal(lnPd.ID_OK) else: YKHO.SetReturnCode(lnPd.ID_OK) YKHO.Close()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def v7CM(YKHO):\n KCHu = YKHO.number_entry.get().strip()\n try:\n YKHO.answer = int(KCHu)\n except:\n YKHO.answer = -1\n YKHO.top.destroy()", "def FE9A(YKHO):\n dsE5('in ok')\n YKHO.values = {}\n for dBYd, bTKY in YKHO.entries.items():\n YKHO.values[dBYd] = int(bTKY.get(...
[ "0.74385154", "0.7001327", "0.67999", "0.67887443", "0.6726846", "0.67087746", "0.6690613", "0.6593956", "0.65083736", "0.64723635", "0.64355904", "0.64278936", "0.63801193", "0.61930543", "0.61930543", "0.6182514", "0.61489725", "0.61373425", "0.61329293", "0.6093706", "0.60...
0.71695644
1
Tests generic entity update service.
async def test_camera_generic_update(ajET: HomeAssistant, pZL6: MockEntityFixture, yDvq: tuple[ProtectCamera, str]): assert await C3TX(ajET, 'homeassistant', {}) QTBn = ajET.states.get(yDvq[1]) assert QTBn and QTBn.state == 'idle' pZL6.api.update = zrRO(return_value=None) await ajET.services.async_c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lXbK(YKHO):\n pass", "def IsIF(YKHO):\n pass", "def IsIF(YKHO):\n pass", "def IsIF(YKHO):\n pass", "def Tbie(YKHO):\n pass", "def J2G_(YKHO):\n pass", "def qRhm(YKHO):\n pass", "def b6pt(YKHO):\n pass", "def mmy9(YKHO):\n pass", "def XoLx(YKHO):\n pass", "def I...
[ "0.78955746", "0.74771196", "0.74771196", "0.74771196", "0.73415947", "0.7259309", "0.7237386", "0.72158635", "0.70355064", "0.6952744", "0.690349", "0.6883567", "0.68404555", "0.6800107", "0.67964864", "0.67232513", "0.66835916", "0.6668856", "0.66458815", "0.660955", "0.659...
0.0
-1
View for getting all products
def CnKV(QePW, *qIxc, qWbT=''): cpkr = [] Ldyl = msfn.objects.all() vqgW = (('size', 'options'), ('price', 'range'), ('colours', 'options'), ('year', 'range'), ('collection', 'equals')) MSMx = [] for Jyyj, hHFW in vqgW: if hHFW == 'range': kpLf = Ldyl.filter().values_list(Jyyj).o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wv_W(QePW):\n Ldyl = msfn.objects.all()\n return _1tc(QePW, 'products.html', {'products': Ldyl})", "def wv_W(QePW):\n Ldyl = msfn.objects.all()\n return _1tc(QePW, 'products.html', {'products': Ldyl})", "def Ldyl(QePW):\n return _1tc(QePW, 'core/products.html', {'products': msfn.objects.all(...
[ "0.85889775", "0.8584514", "0.80839807", "0.8077228", "0.787021", "0.77327776", "0.768992", "0.7624601", "0.76196074", "0.76125556", "0.7586354", "0.7580423", "0.7580109", "0.7515487", "0.75078064", "0.73868835", "0.7373729", "0.73090434", "0.72592443", "0.72338676", "0.72303...
0.0
-1
View for getting specific product
def AI9R(QePW, f9CE): Lx3t = Iofl(msfn, pk=f9CE) QpfX = {'product': Lx3t, 'MEDIA_URL': gCuF.MEDIA_URL} return _1tc(QePW, 'products/single_product.html', QpfX)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jybv(QePW, Lx3t):\n Lx3t = c0_m.objects.get(product=Lx3t)\n QpfX = {'product': Lx3t}\n return _1tc(QePW, 'products/product_detail.html', QpfX)", "def mbwC(QePW, Mc9N):\n Lx3t = Iofl(msfn, pk=Mc9N)\n QpfX = {'product': Lx3t}\n return _1tc(QePW, 'products/product_detail.html', QpfX)", "def ...
[ "0.8373205", "0.7817594", "0.76996857", "0.76296955", "0.7609186", "0.74996454", "0.73481274", "0.73322934", "0.72361946", "0.7232319", "0.72304326", "0.7212379", "0.71471024", "0.7089532", "0.70353025", "0.70193565", "0.70091385", "0.70040834", "0.6959846", "0.69372743", "0....
0.78225577
1
API keys can't be forgotten. This could deauthorize the API key, but there probably isn't any utility in giving API keys a way to deauthorize themselves. Anyway, returns no headers.
def SjNj(YKHO, QePW): return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kw0X():\n jsZc.pop('Authorization', None)", "def VS6V(YKHO, WCzf):\n QePW = VNUm(YKHO.environ)\n QePW.body = YKHO.get_request_body()\n geh0 = YKHO.xmodule.grade_handler(QePW, '')\n VvTL = YKHO.get_response_values(geh0)\n O0Fa = {'action': None, 'code_major': 'failure', 'description': 'OAuth...
[ "0.6803548", "0.65408015", "0.6535182", "0.6461532", "0.6452847", "0.6445998", "0.640515", "0.6388619", "0.6388471", "0.63728386", "0.6372567", "0.6298591", "0.6297153", "0.6248177", "0.6215019", "0.6143284", "0.612622", "0.6100605", "0.60865784", "0.6069149", "0.60669965", ...
0.0
-1
API keys can't be forgotten. This could deauthorize the bearer token, but there probably isn't any utility in giving bearer tokens a way to deauthorize themselves. Anyway, returns no headers.
def SjNj(YKHO, QePW): return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kw0X():\n jsZc.pop('Authorization', None)", "def SjNj(YKHO, QePW):\n return [('WWW-Authenticate', 'Bearer realm=\"%s\"' % YKHO.realm)]", "def VS6V(YKHO, WCzf):\n QePW = VNUm(YKHO.environ)\n QePW.body = YKHO.get_request_body()\n geh0 = YKHO.xmodule.grade_handler(QePW, '')\n VvTL = YKHO.get...
[ "0.6942778", "0.6841196", "0.6626936", "0.6558509", "0.6550465", "0.6452305", "0.64482224", "0.6423576", "0.6401126", "0.6384306", "0.6382608", "0.6358418", "0.6335653", "0.632815", "0.6316709", "0.624477", "0.62446594", "0.6240657", "0.62227833", "0.6205216", "0.6193267", ...
0.0
-1
Test create_app without passing test config.
def p9Uw(x0hE, QePW): Ylbp = x0hE.get('/token?uid=1') assert Ylbp.status_code == 400 assert 'User does not exist' in Ylbp.data.decode('utf-8')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def g5pL():\n assert not LUif().testing\n assert LUif({'TESTING': True}).testing", "def zmu8():\n assert not mvm2.create_app().testing\n assert mvm2.create_app({'TESTING': True}).testing", "def zmu8():\n assert not LUif().testing\n assert LUif(LV7V).testing", "def x4Zm(P4t4):\n assert P4...
[ "0.8850087", "0.813269", "0.8125104", "0.8035616", "0.80110157", "0.7688096", "0.7623751", "0.7605146", "0.7599213", "0.7562456", "0.7501943", "0.735687", "0.73023415", "0.7252003", "0.72149676", "0.71856964", "0.7180324", "0.7176667", "0.7162609", "0.7160988", "0.7152597", ...
0.0
-1
Test create_app without passing test config.
def WggM(x0hE, QePW): Ylbp = x0hE.get('/token?uid={}'.format(gCuF.FIREBASE_UID)) assert Ylbp.status_code == 200 assert len(Ylbp.data) > 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def g5pL():\n assert not LUif().testing\n assert LUif({'TESTING': True}).testing", "def zmu8():\n assert not mvm2.create_app().testing\n assert mvm2.create_app({'TESTING': True}).testing", "def zmu8():\n assert not LUif().testing\n assert LUif(LV7V).testing", "def x4Zm(P4t4):\n assert P4...
[ "0.8850087", "0.813269", "0.8125104", "0.8035616", "0.80110157", "0.7688096", "0.7623751", "0.7605146", "0.7599213", "0.7562456", "0.7501943", "0.735687", "0.73023415", "0.7252003", "0.72149676", "0.71856964", "0.7180324", "0.7176667", "0.7162609", "0.7160988", "0.7152597", ...
0.0
-1
Return slice of df containing all rows with df[date_col].dt.year >= first_year. Returns df if first_year is None.
def ecpN(jQ3Z, fVhC=None, WJFk='start_date'): if fVhC is None: return jQ3Z if fVhC <= jQ3Z[WJFk].min().year: return jQ3Z return jQ3Z[jQ3Z[WJFk] >= f'{fVhC}-01-01']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ecpN(jQ3Z, fVhC=None, WJFk='start_date'):\n if fVhC is None:\n return jQ3Z\n ulWt = jQ3Z[WJFk].dt.year\n if fVhC <= ulWt.min():\n return jQ3Z\n return jQ3Z[ulWt >= fVhC]", "def LN13(f4IJ, Nl3a, lO87):\n f4IJ[Nl3a] = rLdf.to_datetime(f4IJ[Nl3a])\n f4IJ = f4IJ[f4IJ[Nl3a] > rLdf....
[ "0.8692967", "0.6916101", "0.6475987", "0.6318579", "0.6097049", "0.59132314", "0.5876796", "0.5793554", "0.5776828", "0.56945443", "0.5652291", "0.5467824", "0.54667866", "0.54383206", "0.540031", "0.539278", "0.5352745", "0.53379816", "0.5273453", "0.5232996", "0.5201749", ...
0.870499
0
Load forecast data from file and returns as a dataframe.
def Z8Tu(gIsw, tZMg=None): QVeo = rLdf.read_hdf(gIsw) if 'start_date' in QVeo.columns: QVeo.start_date = rLdf.to_datetime(QVeo.start_date) if 'target_date' in QVeo.columns: QVeo.target_date = rLdf.to_datetime(QVeo.target_date) if tZMg is not None: QVeo = FAMq(QVeo, tZMg) retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UlWi(Sd0C: str, gnAD: Dict[str, Any]) -> rLdf.DataFrame:\n jQ3Z = rLdf.read_csv(Sd0C, skiprows=gnAD['header_line_num'] - 1, usecols=['date', 'rain'])\n jQ3Z['date'] = rLdf.to_datetime(jQ3Z['date'])\n jQ3Z['year'] = jQ3Z['date'].dt.year\n jQ3Z['month'] = jQ3Z['date'].dt.month\n jQ3Z['day'] = jQ3Z...
[ "0.72931594", "0.71401757", "0.7119044", "0.6954168", "0.68516535", "0.68484163", "0.6710672", "0.6687381", "0.6608117", "0.6607454", "0.6607454", "0.6607454", "0.6549507", "0.65311193", "0.651707", "0.6504314", "0.65013427", "0.6475853", "0.6474795", "0.64581454", "0.6438564...
0.69432443
4
Return the config. Use this method to get the bot config
def tgzD(YKHO) -> cuzp[str, ImMB]: if YKHO.config is None: YKHO.config = YKHO.load_config() return YKHO.config
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GPtr(YKHO):\n if YKHO.__config is None:\n YKHO.__config = YKHO._get_config(YKHO.bot)\n return YKHO.__config", "def tgzD(YKHO):\n return YKHO.config", "def zoFt(YKHO):\n return YKHO.config", "def tgzD():\n return X8Rg", "def GPtr(YKHO):\n return YKHO[OtOl]", "def GPtr(YKHO):\n...
[ "0.8794691", "0.8260136", "0.80892885", "0.7926577", "0.79057753", "0.78236943", "0.7821813", "0.7821813", "0.7821813", "0.7821813", "0.7821813", "0.7821813", "0.7821813", "0.7821813", "0.7821813", "0.7821813", "0.7821813", "0.7821813", "0.7821813", "0.7821813", "0.7821813", ...
0.79455966
3
Importing letter of alphabet 'abcdefghijklmnopqrstuvwxyz'
def JLNR(): yWbd = vIwR.ascii_lowercase return yWbd
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KCQ5(FGW3):\n return chr(FGW3 + 96)", "def KCQ5(FGW3):\n return chr(FGW3 + 96)", "def oN24(sZqf):\n BWXx = ord(sZqf.lower()) - ord('a') + 10\n return BWXx + BWXx // 11", "def rrO6(sZqf):\n m_vm = ''\n YPaw = 1\n if sZqf in JSRc:\n m_vm = m_vm + JSRc[JSRc.index(sZqf) + YPaw % l...
[ "0.6978001", "0.6978001", "0.6896066", "0.67410505", "0.66355014", "0.6502094", "0.64975846", "0.64975846", "0.648248", "0.64425176", "0.6426691", "0.6404602", "0.63999647", "0.6371025", "0.6351236", "0.6351236", "0.6351236", "0.6312614", "0.6283822", "0.6275287", "0.62707174...
0.62079656
24
Given a date, return the nearest business day that could be a potential payday.
def WahT(_c1T: date_class, rhBO: list) -> FDJ4: while _c1T in rhBO: Nmjk = 1 Pvgo = (_c1T + fCoM(days=Nmjk)).weekday() while Pvgo in {5, 6}: Nmjk += 1 Pvgo = (_c1T + fCoM(days=Nmjk)).weekday() huA4 = 1 Pvgo = (_c1T - fCoM(days=huA4)).weekday() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SYhP(_c1T: date_class, Gjtu: timedelta, rhBO: list, vsWQ: date_class, vaRa: WeekNamePlaceholder) -> FDJ4:\n ibNn = vsWQ\n if _c1T < vsWQ:\n Gjtu = fCoM(days=-1 * Gjtu.days)\n while ibNn > _c1T:\n ibNn = gcg3(payday=ibNn, frequency=Gjtu, holidays=rhBO, default_payday=vaRa)\n el...
[ "0.72994125", "0.66964525", "0.6624541", "0.62566423", "0.6221044", "0.61572963", "0.59895384", "0.5964122", "0.5822103", "0.57903045", "0.5770065", "0.5733709", "0.55682606", "0.55450153", "0.5544446", "0.5538581", "0.5505692", "0.5485728", "0.54665524", "0.5438866", "0.5437...
0.7196114
1
Read a text file and parse it, return a list of lines.
def _rvh(eZ_W): Nqlg = [] with open(eZ_W, 'r') as nUeQ: for zFiD in nUeQ: Nqlg.append(zFiD.rstrip()) return Nqlg
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hfK9(Ux0P):\n with open(Ux0P) as nUeQ:\n Nqlg = [zFiD.strip() for zFiD in nUeQ]\n return Nqlg", "def trZt(pmON: str) -> x1iM[str]:\n if Hy7s.path.isfile(pmON):\n with open(pmON, 'r') as eHNT:\n Nqlg = eHNT.readlines()\n else:\n raise DQrD(f'Could not find file {pmO...
[ "0.7932721", "0.79067385", "0.7891527", "0.7867271", "0.7822065", "0.77384955", "0.773432", "0.77172756", "0.76860225", "0.766936", "0.7649198", "0.76408565", "0.76102936", "0.75584584", "0.75584584", "0.75020856", "0.74872154", "0.74838406", "0.7434301", "0.743358", "0.74242...
0.74622184
18
Read and preprocess an image with data augmentation (random transform).
def xk4M(XP5J): return tIgX(XP5J, True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xk4M(XP5J, UGKP=False):\n VXjJ = cE34(cQHb + XP5J, mode='RGB')\n ruSK = VXjJ\n if Tuqy == 'background':\n nPrm = {'image': VXjJ}\n elif Tuqy == 'instance' or Tuqy == 'code':\n ruSK = cE34(c2_J + XP5J.replace('.jpg', '.png'))\n nPrm = {'image': VXjJ, 'mask': ruSK}\n if UGKP:\...
[ "0.70983887", "0.6943158", "0.688551", "0.68004996", "0.674634", "0.67293", "0.669832", "0.66739017", "0.6640704", "0.66043407", "0.65809053", "0.657818", "0.65741193", "0.65732604", "0.6542803", "0.6535964", "0.65216327", "0.64716566", "0.6438178", "0.64301634", "0.64249456"...
0.5977028
84
Read and preprocess an image without data augmentation (use for testing).
def g1g6(XP5J): return tIgX(XP5J, False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def biH0(YKHO, VXjJ):\n t9mp = LNo8.load_img(VXjJ, target_size=(299, 299))\n t9mp = LNo8.img_to_array(t9mp)\n t9mp = oyIN.expand_dims(t9mp, axis=0)\n t9mp = fjyB(t9mp)\n return t9mp", "def eaip(YKHO, j0Yw):\n LNo8 = ZylS.io.decode_raw(j0Yw, ZylS.float64)\n if YKHO.rescale is not None:\n ...
[ "0.7602969", "0.7248016", "0.722284", "0.71843404", "0.7184335", "0.71565145", "0.71435726", "0.7083108", "0.707574", "0.7067366", "0.7060635", "0.6975651", "0.6953753", "0.6905524", "0.69026303", "0.6898259", "0.68915087", "0.68718076", "0.68572867", "0.6855969", "0.68412083...
0.6213208
99
First scale the data using StandardScaler if scaled == False
def bKD6(Tnap, e3Zm, ql1R, LCkP, fDEt, k8L3=False): if not k8L3: Y5YY = txNa() Tnap = Y5YY.fit_transform(Tnap) ql1R = Y5YY.transform(ql1R) U78l = ZmNt() U78l = IBQ5(U78l, Tnap, e3Zm, ql1R, LCkP, fDEt) return U78l
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _ERn(YKHO):\n nGWB = []\n for fvDH in YKHO.X.columns:\n if YKHO.X[fvDH].dtype != 'object':\n nGWB.append(fvDH)\n Y5YY = ZvG6.StandardScaler().fit(YKHO.X[nGWB])\n YKHO.X[nGWB] = Y5YY.transform(YKHO.X[nGWB])", "def I9fa(Lcqa, Z5wO):\n rxT9 = txNa().fit(Lcqa)\n Lcqa = rxT9.tr...
[ "0.7218791", "0.7191713", "0.70394105", "0.6975558", "0.6961362", "0.6930918", "0.69271106", "0.68575054", "0.6831504", "0.68284446", "0.6819331", "0.6818507", "0.67920756", "0.6757513", "0.67507", "0.6730819", "0.67110133", "0.67094827", "0.6705719", "0.66934055", "0.6671914...
0.0
-1
First scale the data using StandardScaler if not scaled and maybe resample
def gqM8(Tnap, e3Zm, ql1R, LCkP, fDEt, k8L3=False): if not k8L3: Y5YY = txNa() Tnap = Y5YY.fit_transform(Tnap) ql1R = Y5YY.transform(ql1R) gqM8 = _VRL(C=10, cache_size=1500, class_weight='balanced') gqM8 = IBQ5(gqM8, Tnap, e3Zm, ql1R, LCkP, fDEt) return gqM8
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Lwtl(YKHO):\n pass", "def VsGh(YKHO):\n pass", "def hWT_(EcVT):\n Y5YY = txNa()\n nukC = Y5YY.fit_transform(EcVT)\n return nukC", "def yETL():\n m6Me = xDSY.read_raw_fif(CCG0)\n YTVa = iOFt(jkf2)\n pvLb = DNP8(m6Me.info, meg=True, stim=False, ecg=False, eog=False, exclude='bads')\...
[ "0.7301517", "0.6632437", "0.6613051", "0.6595125", "0.6588132", "0.6546846", "0.65277237", "0.6515841", "0.651", "0.6504241", "0.6502828", "0.64754426", "0.6463376", "0.6435751", "0.6428781", "0.64133346", "0.6412797", "0.63972056", "0.6386845", "0.63795465", "0.6376913", ...
0.0
-1
Clip all gradients at this point in time. The norm is computed over all gradients together, as if they were concatenated into a single vector. Gradients are modified inplace.
def qS8m(YKHO, wTln: Union[float, int], J1Nm: Union[float, int]=2.0, moMn: Optional[List[List[int]]]=None) -> ht2j.Tensor: assert YKHO._is_root, 'clip_grad_norm should only be called on the root (parent) instance' YKHO.assert_state(Rmu8.IDLE) wTln = float(wTln) J1Nm = float(J1Nm) u1Ug = YKHO.params_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cSMg(YKHO):\n SGPK = list(filter(lambda XP5J: XP5J.grad is not None, YKHO.machine.parameters()))\n for XP5J in SGPK:\n XP5J.grad.data.clamp_(-10, 10)", "def MaHD(C3ST, AxoL):\n wxBC = 0\n for XP5J in C3ST.parameters():\n if XP5J.requires_grad:\n gMJ6 = XP5J.grad.data.norm...
[ "0.7234078", "0.70931065", "0.7087318", "0.7041712", "0.6994368", "0.69793355", "0.6918789", "0.689754", "0.68667644", "0.6675523", "0.6618761", "0.66097236", "0.6588387", "0.65814036", "0.6564941", "0.6551267", "0.6439358", "0.63258845", "0.63132817", "0.62862694", "0.627521...
0.63820463
17
Return the local shard of a full tensor.
def yhDQ(YKHO, vhpA: torch.Tensor) -> AzJI[ht2j.Tensor, int]: vhpA = YKHO._flatten_and_pad_to_world_size(vhpA, YKHO.world_size * YKHO._shard_size_multiple) YIjs = vhpA.size(0) // YKHO.world_size _9an, Os4s = (YKHO.rank * YIjs, (YKHO.rank + 1) * YIjs) vhpA = vhpA[_9an:Os4s].clone() return vhpA
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OWrw(YKHO):\n return YKHO._shard", "def mLmj(WKvO, vcKF=None, im5q=None):\n if vcKF is not None:\n assert isinstance(vcKF, aNls), 'Argument process_mesh {} is not an instance of ProcessMesh'.format(vcKF)\n else:\n vcKF = sxJx()\n assert vcKF is not None, 'Specify the process mes...
[ "0.6099813", "0.5874232", "0.58428824", "0.58428824", "0.56802654", "0.5587651", "0.55354303", "0.53458536", "0.53412724", "0.53174275", "0.52987903", "0.52757055", "0.52561295", "0.5252544", "0.52365756", "0.52323824", "0.5217135", "0.5161181", "0.515733", "0.51558495", "0.5...
0.77070284
0
A context manager to disable gradient synchronizations across FSDP processes. Within this context, gradients will be accumulated on module variables, which will later be synchronized in the first forwardbackward pass after exiting the context.
def zQs5(YKHO) -> jd6F: YKHO._lazy_init() assert YKHO._is_root, 'no_sync on inner FSDP is not supported' YKHO.assert_state(Rmu8.IDLE) WPiV = [] for r8hN in YKHO.modules(): if isinstance(r8hN, RcWs): WPiV.append((r8hN, r8hN._require_backward_grad_sync)) r8hN._require_b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rZm1(fAfT: FullyShardedDataParallel) -> None:\n for nVrR in fAfT._handles:\n XP5J = nVrR.flat_param\n if XP5J.requires_grad:\n if hasattr(XP5J, '_post_backward_hook_state'):\n sHcG(len(XP5J._post_backward_hook_state) == 2, 'p._post_backward_hook_state fields are not v...
[ "0.6891195", "0.6799861", "0.63945884", "0.6231746", "0.6104134", "0.60445285", "0.60245174", "0.59870183", "0.59758", "0.594575", "0.58647954", "0.5838866", "0.5829284", "0.58135855", "0.5702212", "0.56986016", "0.5696088", "0.5667963", "0.56588745", "0.5657598", "0.56567985...
0.70270365
0
Set up a list to avoid registering prebackward hooks incorrectly. And a list to apply optimization barrier on backward pass tensors.
def fSH3(YKHO) -> None: assert YKHO._is_root, 'This should only be called on the root' YKHO._output_pre_backward_hook_registered = set() YKHO._backward_opt_barrier_tensors = [] YKHO._backward_opt_barrier_tensor_ids = set() for exwG, r8hN in YKHO.named_modules(): if exwG != '' and isinstance(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GGCJ(YKHO):\n\n def a4zE(xqoZ):\n\n def yB7G(*Tnh1):\n YKHO._fp32_optim_grad_sync_needed = True\n if hasattr(xqoZ, 'main_grad'):\n with ht2j.no_grad():\n if xqoZ.grad is not None:\n xqoZ.main_grad += xqoZ.grad\n ...
[ "0.6892539", "0.6817105", "0.67764384", "0.6743315", "0.6634035", "0.6633885", "0.658463", "0.6562383", "0.6494526", "0.62982607", "0.60378724", "0.6013717", "0.60000384", "0.5945345", "0.5854405", "0.5826044", "0.57632494", "0.5634424", "0.54802567", "0.547969", "0.5438676",...
0.7160828
0
Add tensor to backward pass optimization barrier list if it is not there.
def VC68(YKHO, vhpA: torch.Tensor) -> None: if id(vhpA) not in YKHO._backward_opt_barrier_tensor_ids: YKHO._backward_opt_barrier_tensor_ids.add(id(vhpA)) YKHO._backward_opt_barrier_tensors.append(vhpA)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DlVC(khtY, vtNT):\n return vtNT", "def iUpX(YKHO, l7mh: List[torch.Tensor], UFGs: List[torch.Tensor], QrZ3: List[torch.Tensor]):\n if len(l7mh) + len(UFGs) + len(QrZ3) == 0:\n return\n YKHO.optimization_barrier_op(l7mh + UFGs + QrZ3)", "def neJW(YKHO, QrZ3: List[torch.Tensor]) -> None:\n ...
[ "0.6255564", "0.6100858", "0.60640955", "0.5995273", "0.5924337", "0.59193915", "0.590711", "0.58544457", "0.5831913", "0.58308136", "0.5783415", "0.57667774", "0.5748316", "0.57216793", "0.56783605", "0.56430024", "0.56299055", "0.56154805", "0.55834407", "0.5558023", "0.555...
0.78098917
0
Register hook to `dependency_tensors` to put their gradient tensors into self._backward_opt_barrier_tensors for backward pass optimization barrer.
def neJW(YKHO, QrZ3: List[torch.Tensor]) -> None: if not ht2j.is_grad_enabled(): return def p4s2(JQ0x: torch.Tensor): YKHO._try_adding_to_backward_opt_barrier_lists(JQ0x) YKHO.optimization_barrier_op([JQ0x]) return JQ0x.view(JQ0x.size()) for a1PO in QrZ3: if a1PO.req...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iWGt(YKHO) -> None:\n if not ht2j.is_grad_enabled():\n return\n for XP5J in YKHO.full_params:\n if XP5J.requires_grad:\n if hasattr(XP5J, '_shard_bwd_hook'):\n continue\n wB_4 = XP5J.expand_as(XP5J)\n assert wB_4.grad_fn is not None\n ...
[ "0.68092126", "0.6792964", "0.6702238", "0.62400526", "0.6212433", "0.61180437", "0.6086423", "0.6000124", "0.5954072", "0.588943", "0.58467245", "0.5840487", "0.56945574", "0.5615899", "0.54912275", "0.54761446", "0.54718", "0.5419614", "0.54047835", "0.54047835", "0.5376192...
0.8301252
0
Register backward hooks to reshard params and reducescatter grads. This is called during forward pass. The goal is to attach a hook on each of the parameter's gradient generating function (``grad_acc`` below) so that the hook is called after all gradients for that param are computed.
def iWGt(YKHO) -> None: if not ht2j.is_grad_enabled(): return for XP5J in YKHO.full_params: if XP5J.requires_grad: if hasattr(XP5J, '_shard_bwd_hook'): continue wB_4 = XP5J.expand_as(XP5J) assert wB_4.grad_fn is not None E3IS = wB_4...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GGCJ(YKHO):\n\n def a4zE(xqoZ):\n\n def yB7G(*Tnh1):\n YKHO._fp32_optim_grad_sync_needed = True\n if hasattr(xqoZ, 'main_grad'):\n with ht2j.no_grad():\n if xqoZ.grad is not None:\n xqoZ.main_grad += xqoZ.grad\n ...
[ "0.7462905", "0.69060594", "0.688766", "0.6856517", "0.6834197", "0.6677355", "0.6671704", "0.65846634", "0.65497565", "0.6516998", "0.64897394", "0.6291849", "0.62878025", "0.6284139", "0.62600726", "0.600069", "0.5904114", "0.5796979", "0.57926524", "0.57776725", "0.5722192...
0.7972718
0
Flatten and pad a tensor to a given world size (for reducescatter).
def yABp(YKHO, vhpA: torch.Tensor, aDYX: int) -> ht2j.Tensor: if YKHO._shard_param_on_dim_0: if vhpA.size(0) % aDYX != 0: x_5g = aDYX - vhpA.size(0) % aDYX vhpA = vuvg.pad(vhpA, [0, 0] * (vhpA.dim() - 1) + [0, x_5g]) return vhpA vhpA = vhpA.flatten() if vhpA.numel() %...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Xso3(input, zNig):\n nyWF = ZylS.concat([input[:, :, -zNig[1]:, :], input, input[:, :, 0:zNig[1], :]], 2)\n nyWF = ZylS.concat([nyWF[:, -zNig[0]:, :, :], nyWF, nyWF[:, 0:zNig[0], :, :]], 1)\n return nyWF", "def hVLt(input, x_5g):\n if not x_5g:\n return input\n return ZylS.pad(input, [[...
[ "0.7144496", "0.6669238", "0.6487876", "0.64263964", "0.63391405", "0.6281128", "0.626849", "0.62397903", "0.620776", "0.6170778", "0.6129287", "0.6126736", "0.6097369", "0.60817534", "0.6074656", "0.60084975", "0.6001042", "0.5991514", "0.5981589", "0.59411633", "0.58645254"...
0.8523019
0
Does a GET request to /v2/payments/{payment_id}. Retrieves details for a specific payment.
def g51h(YKHO, q0JL): return super().new_api_call_builder.request(bSFI().server('default').path('/v2/payments/{payment_id}').http_method(gJZr.GET).template_param(XDS4().key('payment_id').value(q0JL).should_encode(True)).header_param(XDS4().key('accept').value('application/json')).auth(bIS6('global'))).response(jX4C...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GKJL(q0JL):\n pu1N = xiv5()\n geh0, IaaG = pu1N.get(iAwL.url(iAwL.PAYMENT_RESOURCE, resource_id=q0JL))\n return JKCy.Payment(**geh0)", "def NMoC(YKHO, q0JL=None):\n if q0JL:\n fytm = SSCD.query.filter_by(id=q0JL).first()\n if rpdr and rpdr.user_id == c5ow.id:\n return {'p...
[ "0.8498946", "0.83088595", "0.82039946", "0.78867936", "0.7605686", "0.7395516", "0.7149845", "0.6852734", "0.66524243", "0.64836586", "0.63389045", "0.63348454", "0.6306717", "0.6261567", "0.61714005", "0.613381", "0.6007443", "0.5942717", "0.5718822", "0.57019156", "0.56429...
0.8058351
3
r""" Return a LaTeX representation of ``self``.
def eMsG(YKHO): return '\\mathbb{P}_{%s}' % _svw(YKHO.Delta())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wHJl(YKHO):\n if YKHO.latex == YKHO.sans_parens:\n xM0K = u'\"{}\"'.format(YKHO.latex)\n else:\n xM0K = u'\"{}\" or \"{}\"'.format(YKHO.latex, YKHO.sans_parens)\n if YKHO.tall:\n GDMi = u'<[{}]>'\n else:\n GDMi = u'<{}>'\n return GDMi.format(xM0K)", "def eMsG(YKHO):...
[ "0.78418356", "0.7727769", "0.7695589", "0.7374604", "0.73041743", "0.72596556", "0.7253343", "0.7157525", "0.7135335", "0.71022457", "0.70961916", "0.70766973", "0.70650357", "0.70599365", "0.70599365", "0.68704855", "0.68538725", "0.6848989", "0.68271786", "0.68046254", "0....
0.7157886
7
r""" Return the reflexive polytope associated to ``self``.
def uGwy(YKHO): return YKHO._Delta_polar.polar()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def YA5r(YKHO):\n return YKHO.defining_polynomials()[0]", "def YA5r(YKHO):\n return YKHO.defining_polynomials()[0]", "def UpWF(YKHO, hlel='hom'):\n if YKHO.affine_dimension() > 2:\n raise NotImplementedError('can only embed in reflexive polygons')\n sSFW, pi4H, Rezl = YKHO._find_isomorphism_...
[ "0.6094851", "0.6094851", "0.6053461", "0.6000702", "0.5915638", "0.58915544", "0.58879536", "0.5867651", "0.5833705", "0.5827252", "0.58218575", "0.5821365", "0.57832044", "0.5697129", "0.5687417", "0.5648143", "0.56409824", "0.56409824", "0.56391615", "0.5584487", "0.554051...
0.0
-1
Compute the average precision, given the recall and precision curves.
def pAZd(AOzf, rhd_): YuCV = oyIN.concatenate(([0.0], AOzf, [1.0])) BsPE = oyIN.concatenate(([0.0], rhd_, [0.0])) print('><<<<<<<<>>>>>>>>>>>>>') print(YuCV) print(BsPE) print('><<<<<<<<>>>>>>>>>>>>>') for YRbF in range(BsPE.size - 1, 0, -1): BsPE[YRbF - 1] = oyIN.maximum(BsPE[YRbF -...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rY83(rhd_, AOzf):\n rhd_ = oyIN.concatenate([[0.0], rhd_, [0.0]])\n for YRbF in range(len(rhd_) - 1, 0, -1):\n rhd_[YRbF - 1] = oyIN.maximum(rhd_[YRbF - 1], rhd_[YRbF])\n AOzf = oyIN.concatenate([[0.0], AOzf, [1.0]])\n b3vN = oyIN.where(AOzf[1:] != AOzf[:-1])[0]\n ILBk = (AOzf[b3vN + 1] -...
[ "0.83714455", "0.8136858", "0.77525085", "0.77255106", "0.7718583", "0.76943123", "0.7692928", "0.7650776", "0.7650776", "0.7627588", "0.75597596", "0.7537287", "0.727422", "0.7251301", "0.7228867", "0.7209946", "0.72006965", "0.7182446", "0.7162544", "0.7130612", "0.70859635...
0.74771714
12
>>> _isnumber_with_thousands_separator(".") False >>> _isnumber_with_thousands_separator("1") True >>> _isnumber_with_thousands_separator("1.") True >>> _isnumber_with_thousands_separator(".1") True >>> _isnumber_with_thousands_separator("1000") False >>> _isnumber_with_thousands_separator("1,000") True >>> _isnumber_w...
def eRDk(vIwR): try: vIwR = vIwR.decode() except (UnicodeDecodeError, AttributeError): pass return bool(ZbWC.match(bqeY, vIwR))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ye72(BWXx):\n try:\n float(BWXx.replace(',', ''))\n except ValueError:\n return False\n return True", "def yz_j(KCHu) -> bool:\n try:\n float(KCHu)\n except ValueError:\n return False\n else:\n return True", "def yz_j(BWXx):\n try:\n float(BWXx...
[ "0.6542095", "0.6294855", "0.61424583", "0.6099551", "0.6082271", "0.6065819", "0.6065819", "0.6065819", "0.605616", "0.60495883", "0.60338634", "0.6010475", "0.59945637", "0.5984697", "0.59356755", "0.58544415", "0.5844431", "0.5810023", "0.5809045", "0.57973355", "0.5790351...
0.8396988
0
>>> _isnumber("123.45") True >>> _isnumber("123") True >>> _isnumber("spam") False >>> _isnumber("123e45678") False >>> _isnumber("inf") True
def w2yD(vIwR): if not Bjo8(float, vIwR): return False elif isinstance(vIwR, (str, bytes)) and (epAf.isinf(float(vIwR)) or epAf.isnan(float(vIwR))): return vIwR.lower() in ['inf', '-inf', 'nan'] return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ye72(KCHu):\n try:\n float(KCHu)\n return True\n except ValueError:\n return False", "def ye72(vIwR):\n try:\n float(vIwR)\n return True\n except ValueError:\n return False", "def ye72(KCHu):\n try:\n float(KCHu)\n return True\n exce...
[ "0.87432945", "0.87063056", "0.87037754", "0.87037754", "0.87037754", "0.86839", "0.86623156", "0.8658077", "0.8587047", "0.8549031", "0.8478405", "0.8423849", "0.84080803", "0.83790374", "0.8373497", "0.8343268", "0.8341039", "0.83257306", "0.83168423", "0.8314271", "0.82663...
0.85281724
10
Symbols after a decimal point, 1 if the string lacks the decimal point. >>> _afterpoint("123.45") 2 >>> _afterpoint("1001") 1 >>> _afterpoint("eggs") 1 >>> _afterpoint("123e45") 2 >>> _afterpoint("123,456.78") 2
def sVyh(vIwR): if w2yD(vIwR) or eRDk(vIwR): if yipq(vIwR): return -1 else: oeNL = vIwR.rfind('.') oeNL = vIwR.lower().rfind('e') if oeNL < 0 else oeNL if oeNL >= 0: return len(vIwR) - oeNL - 1 else: return -...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Q2nn(BWXx):\n if isinstance(BWXx, str):\n Aofo = format(float(BWXx), '.2f')\n return Aofo\n elif isinstance(BWXx, float):\n Aofo = format(BWXx, '.2f')\n return float(Aofo)\n elif isinstance(BWXx, int):\n BWXx = float(BWXx)\n print(BWXx)\n Aofo = format(...
[ "0.5807374", "0.54738426", "0.5101628", "0.50197816", "0.5018497", "0.4993644", "0.49502248", "0.49051082", "0.4896271", "0.48899698", "0.4850698", "0.48095798", "0.4798857", "0.47888988", "0.47621077", "0.4738099", "0.4732712", "0.47234747", "0.47089487", "0.47002798", "0.46...
0.78380966
0
Center string. >>> _padboth(6, '\u044f\u0439\u0446\u0430') == ' \u044f\u0439\u0446\u0430 ' True
def Y3k2(TVTK, KCHu): FMLJ = '{0:^%ds}' % TVTK return FMLJ.format(KCHu)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hgjH(l5Ny, TVTK=72, qK9g=' '):\n u54L = len(l5Ny)\n y0cW = (TVTK - u54L) // 2\n ZI14 = TVTK - y0cW - u54L\n return y0cW * ' ' + l5Ny + ZI14 * ' '", "def pWy_(aWuw: str) -> str:\n return aWuw.ljust(3, 'X')", "def jVor(j93S, Nqp_):\n return ' ' * (40 - len(j93S) - len(Nqp_))", "def hv4d(l...
[ "0.7140216", "0.63684124", "0.63169694", "0.6292559", "0.62823284", "0.62645966", "0.6213063", "0.61896425", "0.6170726", "0.6164957", "0.61557645", "0.61284983", "0.6115836", "0.6107988", "0.61054456", "0.61", "0.6041634", "0.6007407", "0.5999633", "0.59379756", "0.5920162",...
0.65963936
1
A type safe wrapper for converting a bytestring to str. This is essentially just a wrapper around .decode() intended for use with things like map(), but with some
def FIwO(KCHu, tZ2K='utf8', UAju='ignore'): if isinstance(KCHu, bytes): return KCHu.decode(encoding=tZ2K, errors=UAju) return str(KCHu)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def D6ho(KCHu, tZ2K='utf-8'):\n if isinstance(KCHu, bytes):\n return KCHu.decode(tZ2K)\n return KCHu", "def D6ho(KCHu, tZ2K='utf-8'):\n if jKi7.PY3 and isinstance(KCHu, bytes):\n return KCHu.decode(tZ2K)\n return KCHu", "def D6ho(KCHu, tZ2K='utf-8'):\n if jKi7.PY3 and isinstance(KC...
[ "0.8154812", "0.81371343", "0.81371343", "0.8084186", "0.79103696", "0.78460264", "0.7819046", "0.7566766", "0.7456021", "0.74405515", "0.7419448", "0.73675716", "0.73517245", "0.73455", "0.73379016", "0.73228925", "0.731033", "0.72620136", "0.7245369", "0.72316766", "0.71974...
0.78993315
5
Returns the attributes for this machine.
def h6gc(): A3l8 = GGmw.gethostname().lower().split('.', 1)[0] return cHxK.get_attributes(A3l8)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lZBZ(YKHO):\n return YKHO.attributes", "def lZBZ(YKHO):\n return YKHO.attributes", "def iLfU(YKHO):\n return YKHO._attr", "def h6gc(YKHO):\n return YKHO.attributes", "def lZBZ(YKHO):\n pass", "def h6gc(YKHO):\n w2IS = YKHO._get_api_endpoint() + '/attributes'\n dixj = YKHO.tq.get(...
[ "0.77701336", "0.77701336", "0.77157146", "0.76253116", "0.76118535", "0.7567369", "0.74726593", "0.7454361", "0.74511325", "0.74102587", "0.74102587", "0.74102587", "0.7380915", "0.73561007", "0.7328756", "0.72709304", "0.71834505", "0.71631664", "0.7157943", "0.71349585", "...
0.7069597
25
Returns the reference config.
def GPtr(YKHO, begE: Device, rhd_: Precision, aDYX: int, f_Y8: int): EPL3 = F4cJ(size=16) FUPx = F4cJ(size=16) return {'model': KKvy(), 'train_dataloader': pVAc(dataset=EPL3, batch_size=4, sampler=pImw.get_sampler(EPL3)), 'eval_dataloader': pVAc(dataset=FUPx, sampler=pImw.get_sampler(FUPx)), 'max_duration':...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tgzD(YKHO):\n return YKHO.config", "def wLv7(YKHO):\n return YKHO.__config", "def wLv7(YKHO):\n return YKHO.__config", "def wLv7(YKHO):\n return YKHO.__config", "def wLv7(YKHO):\n return YKHO.__config", "def wLv7(YKHO):\n return YKHO.__config", "def wLv7(YKHO):\n return YKHO.__...
[ "0.7303697", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "...
0.0
-1
Returns the reference config.
def GPtr(YKHO): EPL3 = F4cJ() FUPx = F4cJ() return {'model': KKvy(), 'train_dataloader': pVAc(dataset=EPL3, batch_size=4, sampler=pImw.get_sampler(EPL3)), 'eval_dataloader': pVAc(dataset=FUPx, sampler=pImw.get_sampler(FUPx)), 'max_duration': '2ep', 'autoresume': True, 'loggers': []}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tgzD(YKHO):\n return YKHO.config", "def wLv7(YKHO):\n return YKHO.__config", "def wLv7(YKHO):\n return YKHO.__config", "def wLv7(YKHO):\n return YKHO.__config", "def wLv7(YKHO):\n return YKHO.__config", "def wLv7(YKHO):\n return YKHO.__config", "def wLv7(YKHO):\n return YKHO.__...
[ "0.7303697", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "0.7259904", "...
0.0
-1
Get current date in YEARMONTHDAY format.
def slWZ(): JRYC = qcWV.now() return JRYC.strftime('%Y-%m-%d')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DeyU() -> str:\n return qcWV.now().strftime('%Y-%m-%d')", "def gVTZ(YKHO):\n vHj7 = qcWV.datetime.now()\n CjKC = str(vHj7.day)\n x0eS = str(vHj7.month)\n CjKC = YKHO.check_and_repair_right_format(CjKC)\n x0eS = YKHO.check_and_repair_right_format(x0eS)\n return str(vHj7.year) + x0eS + CjK...
[ "0.7229084", "0.7136875", "0.700063", "0.69979775", "0.6876184", "0.6743486", "0.6676277", "0.66296995", "0.6571405", "0.65098035", "0.6506451", "0.64529675", "0.6418477", "0.637093", "0.63606524", "0.63559055", "0.6345028", "0.632469", "0.62799686", "0.6268996", "0.6266585",...
0.63688594
14
Get the value of the Literal.
def UnfG(YKHO): raise NotImplementedError('Define in derived class')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UnfG(YKHO):\n return _VfD.ASTNode_getValue(YKHO)", "def BWXx(YKHO):\n KCHu = str(YKHO.input.text())\n if YKHO._is_string_:\n return KCHu\n else:\n return eval(KCHu)", "def UnfG(YKHO):\n return YKHO.text()", "def BWXx(YKHO) -> str:\n if hasattr(YKHO, '_value'):\n ret...
[ "0.69176006", "0.67216945", "0.6705249", "0.6699813", "0.6699813", "0.6666605", "0.66269714", "0.6625353", "0.6616099", "0.660955", "0.6537174", "0.6530694", "0.6529157", "0.6523697", "0.6523697", "0.6511547", "0.6511547", "0.6511547", "0.6502566", "0.6499618", "0.6499618", ...
0.0
-1
This implementation is slightly faster than tensor2img. It now only supports torch tensor with shape (1, c, h, w).
def HcxB(vhpA, KA6l=True, xOWs=(0, 1)): hlel = vhpA.squeeze(0).detach().clamp_(*xOWs).permute(1, 2, 0) hlel = (hlel - xOWs[0]) / (xOWs[1] - xOWs[0]) * 255 hlel = hlel.type(ht2j.uint8).cpu().numpy() if KA6l: hlel = XC5k.cvtColor(hlel, XC5k.COLOR_RGB2BGR) return hlel
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RALQ(vhpA):\n LNo8 = vhpA.to('cpu').clone().detach()\n LNo8 = LNo8.numpy().squeeze()\n LNo8 = LNo8.transpose(1, 2, 0)\n LNo8 = LNo8 * oyIN.array((0.229, 0.224, 0.225)) + oyIN.array((0.485, 0.456, 0.406))\n LNo8 = LNo8.clip(0, 1)\n return LNo8", "def uaVh(VXjJ):\n a1PO = Ymkf.ToPILImage()...
[ "0.6861531", "0.6811791", "0.6708912", "0.66678745", "0.6659391", "0.65594685", "0.65594685", "0.65582573", "0.65407014", "0.65360963", "0.6518375", "0.64753115", "0.6453792", "0.6434146", "0.64291716", "0.6420121", "0.6359532", "0.6333421", "0.63196564", "0.63155043", "0.631...
0.68518776
1
Read an image from bytes.
def flFv(hGN5, I1mm='color', fSkI=False): yySS = oyIN.frombuffer(hGN5, oyIN.uint8) V5ZY = {'color': XC5k.IMREAD_COLOR, 'grayscale': XC5k.IMREAD_GRAYSCALE, 'unchanged': XC5k.IMREAD_UNCHANGED} VXjJ = XC5k.imdecode(yySS, V5ZY[I1mm]) if fSkI: VXjJ = VXjJ.astype(oyIN.float32) / 255.0 return VXjJ
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eCdp(eQJI):\n VXjJ = hnIv.open(aKaX(eQJI))\n qw7D = oyIN.asarray(VXjJ, dtype=oyIN.uint8)\n return qw7D", "def q5aE(p4m8):\n VXjJ = hiw8.imread(uri=p4m8)\n return VXjJ", "def q5aE(YKHO, ZfUD):\n assert ZfUD['image_dtype'] == 'uint16'\n Ux0P = Hy7s.path.join(YKHO.home(ZfUD['basename']))\...
[ "0.7084831", "0.6854387", "0.6825468", "0.68083876", "0.6657157", "0.6639139", "0.66016585", "0.65861046", "0.65771484", "0.6494287", "0.64901775", "0.6479835", "0.6388642", "0.63756", "0.63729894", "0.63712287", "0.63273114", "0.63086474", "0.6303887", "0.6285786", "0.627715...
0.7081325
1
Any arguments that are ultimately represented as bytes can be specified either as bytes or as strings. However we enforce that any string arguments must only contain characters in the plain ASCII range. chr(0)...chr(127). If you need to use characters outside that range then be precise, and use a bytewise argument.
def jq9I(BWXx: Union[bytes, str], *, mWFP: str) -> bytes: if isinstance(BWXx, str): try: return BWXx.encode('ascii') except UnicodeEncodeError: raise TypeError(f'{mWFP} strings may not include unicode characters.') elif isinstance(BWXx, bytes): return BWXx aJN...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jg3g(YKHO):\n P6bq = u'Unicode string: 孔子'\n Fg_i = O0dp(P6bq, 'utf-8')\n YKHO.assertEqual(Fg_i, P6bq.encode('utf-8'))", "def bytes(*qIxc, **B2fa):\n pass", "def ryFt(*qIxc, JfyU=None):\n JfyU = JfyU or tq_1.stack()[2][3]\n for SRYB in qIxc:\n if not isinstance(SRYB, (bytes, g760.a...
[ "0.68610555", "0.66094005", "0.65707976", "0.65583795", "0.6472137", "0.64531964", "0.6402997", "0.63600063", "0.6323508", "0.62645555", "0.6244428", "0.6208456", "0.61847144", "0.61819243", "0.60637915", "0.6059526", "0.6049556", "0.60121655", "0.6010169", "0.59964514", "0.5...
0.6883881
0
Convienence function that ensure all items in request or response headers are either bytes or strings in the plain ASCII range.
def wnOx(BWXx: Union[HeadersAsMapping, HeadersAsSequence, None]=None, *, mWFP: str) -> x1iM[AzJI[bytes, bytes]]: if BWXx is None: return [] elif isinstance(BWXx, GySg): return [(jq9I(G1Hx, name='header name'), jq9I(Ty9i, name='header value')) for G1Hx, Ty9i in BWXx.items()] elif isinstance(B...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aJrt():\n MOPg = {'Content-Type': 'image/png'}\n geh0 = PDOK.Response(200, content=b'xyz', headers=MOPg)\n assert geh0.text == 'xyz'\n assert geh0.encoding == 'ascii'", "def yEKi():\n hGN5 = b'Hello, world!'\n MOPg = {'Content-Type': 'text/plain'}\n geh0 = ODPQ.Response(200, content=hGN5...
[ "0.61406654", "0.6128241", "0.60466325", "0.5971178", "0.5905622", "0.5893737", "0.58359456", "0.5821749", "0.58020806", "0.5740074", "0.5693007", "0.5682882", "0.5676924", "0.56732374", "0.56628203", "0.55564576", "0.5556294", "0.5547389", "0.553744", "0.5423602", "0.5386306...
0.5176623
38
Getter for the missing value character in the data.
def v3uw(YKHO): return YKHO.MISSING
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Zmkp(YKHO, bseI):\n return -YKHO.item.get_value(bseI)", "def RlXw(YKHO):\n RlXw = YKHO.data.isna().sum()\n if RlXw:\n BwEg = RlXw / YKHO.data.count()\n return f'N={RlXw},{round(BwEg, 2)}%'\n else:\n return 'no missing values'", "def Zmkp(YKHO, bseI):\n raise NotImplement...
[ "0.6499473", "0.6200618", "0.5944398", "0.57941484", "0.5711948", "0.5632841", "0.5621153", "0.5607849", "0.55804276", "0.5569528", "0.55688655", "0.5538723", "0.5531943", "0.5518225", "0.5484424", "0.5484208", "0.5478072", "0.54432297", "0.5432", "0.54280126", "0.542577", ...
0.5534694
12
Initialises model parameters prior to fitting. Extends the base classes method. See _BaseHMM.py for more information.
def rXTc(YKHO): super()._init_model_params() if 'e' in YKHO.init_params: if YKHO.init_type == 'uniform': if YKHO.nr_no_train_de == 0: YKHO.B = [oyIN.full((YKHO.n_states, YKHO.n_features[YRbF]), 1.0 / YKHO.n_features[YRbF]) for YRbF in range(YKHO.n_emissions)] else...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def EToq(YKHO) -> None:\n U78l.init.uniform_(YKHO.emb.weight, YKHO.init_lower, YKHO.init_upper)\n U78l.init.uniform_(YKHO.fc_e2h[1].weight, YKHO.init_lower, YKHO.init_upper)\n U78l.init.uniform_(YKHO.fc_e2h[1].bias, YKHO.init_lower, YKHO.init_upper)\n for PxR3 in range(YKHO.n_lyr):\n YKHO.stack_...
[ "0.72519994", "0.7052896", "0.7048691", "0.6986132", "0.6973283", "0.68647254", "0.6856685", "0.682334", "0.68105865", "0.676604", "0.6740836", "0.6720289", "0.67196655", "0.67066276", "0.67060673", "0.6703218", "0.6699637", "0.6697226", "0.66911834", "0.66875273", "0.6671801...
0.72751135
0
Returns the minimax action using self.depth and self.evaluationFunction
def bk5W(YKHO, Ov5A): return YKHO.alphaBetaState(Ov5A, 0, 0, -float('inf'), float('inf'))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bk5W(YKHO, Ov5A: GameState):\n SkJr = float('-inf')\n XeOP = None\n for BZN_ in Ov5A.getLegalActions(0):\n gnPz = SR1K(YKHO.evaluationFunction, 1, 0, Ov5A.generateSuccessor(0, BZN_), YKHO.depth)\n if gnPz > SkJr or SkJr == float('-inf'):\n SkJr = gnPz\n XeOP = BZN_\...
[ "0.7482665", "0.7383559", "0.71806973", "0.7110041", "0.70884514", "0.70694935", "0.70683014", "0.7048308", "0.70055133", "0.69651455", "0.69642085", "0.69604385", "0.6945924", "0.68998593", "0.6895832", "0.688605", "0.6826282", "0.6767276", "0.6758028", "0.6751636", "0.67054...
0.0
-1
Get word embedding op from embedding op
def U8ZT(VuJa: tf.Operation) -> ZylS.Tensor: assert VuJa.type == 'AddV2' H2v5 = VuJa.inputs[0].op assert H2v5.type == 'AddV2' _E99 = H2v5.inputs[0].op assert _E99.type == 'Identity' v6ln = _E99.inputs[0].op assert v6ln.type == 'ResourceGather' return v6ln.outputs[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def B6Xr(YKHO, WbAn, uPG6):\n VKhi = YKHO._options\n i0vx = ZylS.Variable(ZylS.random_uniform((YKHO.vocab_size, VKhi.embed_dim), -1.0, 1.0))\n Q1PJ = []\n ycBG = ZylS.zeros([VKhi.batch_size, VKhi.embed_dim])\n wn5A = []\n for exwG in range(VKhi.sentence_sample):\n ycBG = ZylS.add(ycBG, Zyl...
[ "0.73252714", "0.70400095", "0.70283526", "0.6983", "0.6885749", "0.66525847", "0.6644698", "0.6599045", "0.65726596", "0.6536544", "0.64794534", "0.64469", "0.6425379", "0.6407107", "0.6404322", "0.6374274", "0.6371897", "0.636494", "0.6342331", "0.63066983", "0.62021065", ...
0.78313375
0
Get token embedding op from embedding op
def C5aG(VuJa: tf.Operation) -> ZylS.Tensor: assert VuJa.type == 'AddV2' mjyW = VuJa.inputs[1].op assert mjyW.type == 'Identity' LgVB = mjyW.inputs[0].op assert LgVB.type == 'ResourceGather' return LgVB.outputs[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def U8ZT(VuJa: tf.Operation) -> ZylS.Tensor:\n assert VuJa.type == 'AddV2'\n H2v5 = VuJa.inputs[0].op\n assert H2v5.type == 'AddV2'\n _E99 = H2v5.inputs[0].op\n assert _E99.type == 'Identity'\n v6ln = _E99.inputs[0].op\n assert v6ln.type == 'ResourceGather'\n return v6ln.outputs[0]", "def...
[ "0.7492029", "0.6493747", "0.6358026", "0.631711", "0.6278309", "0.62704146", "0.62359965", "0.6210149", "0.6179377", "0.61283904", "0.5958456", "0.5938996", "0.59338063", "0.5889382", "0.5872871", "0.5870001", "0.58656967", "0.5820393", "0.57991546", "0.5778024", "0.57558745...
0.789456
0
This function takes the text from a tweet and preproceses it. It cleans it according to GloVe's twitter word embeddings
def oRP1(Mau6): Mau6 = ZbWC.sub('\n', ' ', Mau6) Mau6 = ZbWC.sub('https?:\\/\\/\\S+|www\\.(\\w+\\.)+\\S*', '<url>', Mau6) Mau6 = ZbWC.sub('/', ' / ', Mau6) Mau6 = ZbWC.sub('[\'"’,]', '', Mau6) Mau6 = ZbWC.sub('@\\w+', '<user>', Mau6) Mau6 = ZbWC.sub("[8:=;]['`\\-]?[\\)d]|[\\(d]['`\\-]?[8:=;]", '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def biH0(l5Ny):\n l5Ny = HEoB(l5Ny)\n l5Ny = N6mP(l5Ny)\n l5Ny = fFuo(l5Ny)\n l5Ny = wW3a(l5Ny)\n l5Ny = hTYY(l5Ny)\n l5Ny = Lguo(l5Ny)\n l5Ny = HEoB(l5Ny)\n return l5Ny", "def qUbW(Mau6):\n rq7K = HRJ_.clean(Mau6)\n b0j5 = VF6o()\n zw3H = b0j5.tokenize(rq7K)\n QoN4 = NugN(zw3...
[ "0.7898617", "0.7452399", "0.74481386", "0.73230374", "0.73230374", "0.73198974", "0.7201898", "0.7147456", "0.70362544", "0.7003467", "0.70001364", "0.6980996", "0.6792771", "0.67732376", "0.67599154", "0.67211235", "0.6709763", "0.6595905", "0.6584331", "0.6566347", "0.6550...
0.6568438
19
Return string representation suitable for object reconstruction.
def wHJl(YKHO): KCHu = YKHO.name if YKHO.param != 'None': KCHu += ' with parameter ' + YKHO.param KCHu += '; ' + YKHO.applyTo if YKHO.applyTo != 'global': KCHu += ': ' + YKHO.conditions return KCHu
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zAg0(YKHO):\n V2FA = str(YKHO.__class__.__name__) + ': ('\n RTjS = str(YKHO.head_vertex) + ', '\n vuuP = str(YKHO.tail_vertex) + ', '\n sRK6 = str(YKHO.weight) + ')'\n _NCl = RTjS + vuuP + sRK6\n ZCQy = V2FA + _NCl\n return ZCQy", "def zAg0(YKHO):\n V2FA = str(YKHO.__class__.__name__)...
[ "0.7550448", "0.7550448", "0.75484604", "0.7421932", "0.74141777", "0.74141777", "0.74141777", "0.74141777", "0.74141777", "0.74141777", "0.74141777", "0.74141777", "0.74141777", "0.74141777", "0.74141777", "0.74141777", "0.74141777", "0.74141777", "0.74141777", "0.74141777", ...
0.0
-1
Calculates the binary cross entropy on the aggregated outputs of each batch. Use the max when y_true == 1 but the mean when y_true== 0
def W32j(oljl, ly9N): Y8eF = nMvt.mean(oljl, axis=0) if Y8eF == 1: aMgO = nMvt.max(ly9N, axis=0) return nMvt.mean(nMvt.binary_crossentropy(aMgO, Y8eF)) elif Y8eF == 0: return nMvt.mean(nMvt.binary_crossentropy(ly9N, oljl)) else: print('unexpected value of y_true', Y8eF) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PT9r(Y8eF, Rfzd):\n return oyIN.sum(Y8eF * oyIN.log(Rfzd) + (1 - Y8eF) * oyIN.log(1 - Rfzd))", "def PT9r(Y8eF, aMgO, SGf8=1e-15):\n assert Y8eF.shape == aMgO.shape\n aMgO = oyIN.clip(aMgO, SGf8, 1 - SGf8)\n return -oyIN.mean(Y8eF * oyIN.log(aMgO) + (1 - Y8eF) * oyIN.log(1 - aMgO))", "def cV77(Y...
[ "0.751932", "0.72573495", "0.7256394", "0.7213564", "0.7079301", "0.7046794", "0.704372", "0.7015776", "0.70154345", "0.6973653", "0.6913271", "0.68767905", "0.68608356", "0.6846285", "0.68144524", "0.6803912", "0.67933303", "0.67887545", "0.6745289", "0.6744104", "0.67302287...
0.7119242
4
Initialize. Motion events will be sent to the specified address.
def FIMM(YKHO, GGmw, UTX6): YKHO.socket = GGmw YKHO.address = UTX6 YKHO.num_events = 0 YKHO.lock = tUN0() YKHO.states = [(0, 0, 0)] YKHO.cw = set(ixC1(uIbo, k4sx, circular=True)) YKHO.ccw = set(ixC1(pHEB, k4sx, circular=True))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DbxN(YKHO, UTX6, bIwZ):\n a9eO.init()\n a9eO.joystick.init()\n YKHO.controller = a9eO.joystick.Joystick(0)\n YKHO.controller.init()\n YKHO.event_dict = {}\n YKHO.sock = GGmw.socket(GGmw.AF_INET, GGmw.SOCK_STREAM)\n ermL = (UTX6, bIwZ)\n print('connecting to {} port {}'.format(UTX6, bIwZ...
[ "0.677801", "0.5957114", "0.5936195", "0.59334797", "0.5925841", "0.5915736", "0.58898205", "0.58710676", "0.5822217", "0.5795484", "0.5687509", "0.5686153", "0.56733733", "0.56579643", "0.5615253", "0.5614057", "0.55953777", "0.55924404", "0.55872995", "0.5583893", "0.557670...
0.62987953
1
Generate all unique strict subsequences of the specified length, optionally treating "sequence" as an infinite circular array.
def ixC1(aWuw, u54L, ggXm=False): if ggXm: for YRbF in Ni9Y(len(aWuw)): nyal = aWuw[YRbF:YRbF + u54L] yield (nyal + aWuw[0:u54L - len(nyal)]) else: for YRbF in Ni9Y(len(aWuw) - u54L + 1): yield aWuw[YRbF:YRbF + u54L]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xd15(jWe2, u54L):\n return Hs6x.dropwhile(lambda Q6uT: len(Q6uT) != u54L, jWe2)", "def E6VQ(aWuw, u54L, T2Pq=object()):\n if u54L <= 0:\n grAr = [T2Pq]\n else:\n grAr = []\n for YRbF, ZfUD in enumerate(aWuw, 1):\n N8Ed = aWuw[YRbF:]\n fm1I = E6VQ(N8Ed, u54L...
[ "0.6368506", "0.6311978", "0.6050164", "0.6010195", "0.59332037", "0.59234065", "0.59106314", "0.58832335", "0.5871862", "0.58509177", "0.58509177", "0.58460057", "0.58445215", "0.58355874", "0.58320427", "0.5810086", "0.57959014", "0.57931554", "0.5789068", "0.5789068", "0.5...
0.7536472
0
Returns true if both objects are equal
def xa14(YKHO, Elif): if not isinstance(Elif, FI1U): return False return YKHO.__dict__ == Elif.__dict__
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)", "def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)", "def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False", "def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", ...
0.0
-1
Returns true if both objects are not equal
def Vdqg(YKHO, Elif): return not YKHO == Elif
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True", "def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)", "def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)", "def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)", ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748" ]
0.0
-1
Produce a limited stream of values from an iterator. If `n` is 0 or None, don't limit the iterator at all.
def qoqK(oHE7, exwG=None): if not exwG: return oHE7 hlel = [] iter = (YRbF for YRbF in oHE7) for WKvO in range(0, exwG): try: hlel.append(next(iter)) except StopIteration: pass return hlel
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qoqK(oHE7, exwG=None):\n for YRbF, Ty9i in enumerate(oHE7):\n yield Ty9i\n if YRbF + 1 == exwG:\n break", "def qoqK(OxJJ, exwG):\n for UHFx, U6D_ in enumerate(OxJJ):\n if UHFx >= exwG:\n break\n else:\n yield U6D_", "def X73w(oHE7, exwG):\n...
[ "0.81798553", "0.74154925", "0.7374941", "0.7370469", "0.7360399", "0.73495483", "0.73299736", "0.7025565", "0.70048577", "0.70048577", "0.69829243", "0.69468176", "0.69468176", "0.68507653", "0.6839687", "0.6787767", "0.6747792", "0.6710701", "0.6693136", "0.6641916", "0.662...
0.8477086
0
Implement this method to return the value of the resolvable_property.
def ujYQ(YKHO, E5BI: 'stack.Stack', FKFl: Type['stack.Stack']) -> ImMB: pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def property(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'property')", "def xBs1(YKHO):\n return xBs1(YKHO.val())", "def nrOS(YKHO, d7pR):\n return YKHO.get_property(d7pR)", "def Zmkp(YKHO, schV):\n if schV.start_protocol is not None and schV.start_protocol != YKHO.id:\n raise ...
[ "0.6821072", "0.6674497", "0.65914404", "0.6552484", "0.6529322", "0.6522357", "0.6455077", "0.6387297", "0.6386354", "0.6372815", "0.6333942", "0.6287543", "0.6242844", "0.62190586", "0.61920977", "0.6168353", "0.6135813", "0.6102774", "0.60980004", "0.6090925", "0.6087045",...
0.0
-1
Obtains the resolved value for this property. Any resolvers that resolve to None will have their key/index removed from their dict/list where they are. Other resolvers will have their key/index's value replace with the resolved value to avoid redundant resolutions.
def ujYQ(YKHO, E5BI: 'stack.Stack', FKFl: Type['stack.Stack']) -> QTnD: qaaQ = [] def xBs1(hkS8: Union[dict, list], H5ew: Union[int, str], BWXx: Resolver): try: Aofo = YKHO.resolve_resolver_value(BWXx) if Aofo is None: YKHO.logger.debug(f'Removing item {H5ew} bec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xBs1(YKHO):\n return xBs1(YKHO.val())", "def ae7T(YKHO, C7Pp: 'Resolver') -> ImMB:\n try:\n return C7Pp.resolve()\n except KlTL:\n raise\n except Exception:\n if T_wY():\n zA1A = XPQp(C7Pp, YKHO.placeholder_type)\n YKHO.logger.debug(f'Error encountered w...
[ "0.7109319", "0.69254684", "0.681345", "0.6485417", "0.6276801", "0.62258667", "0.62212586", "0.62188625", "0.6188876", "0.6116443", "0.60962147", "0.60665053", "0.58822995", "0.5876782", "0.5803398", "0.5701613", "0.5642112", "0.5637307", "0.5591054", "0.5574686", "0.5560353...
0.5994172
12
Gets the fullyresolved value from the property. Resolvers will be replaced on the stack instance with their resolved value to avoid redundant resolutions.
def ujYQ(YKHO, E5BI: 'stack.Stack', FKFl: Type['stack.Stack']) -> ImMB: JF3C = getattr(E5BI, YKHO.name) if isinstance(JF3C, gtg6): BWXx = YKHO.resolve_resolver_value(JF3C) setattr(E5BI, YKHO.name, BWXx) else: BWXx = JF3C return BWXx
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xBs1(YKHO):\n return xBs1(YKHO.val())", "def ujYQ(YKHO, E5BI: 'stack.Stack', FKFl: Type['stack.Stack']) -> ImMB:\n pass", "def b_bQ(YKHO):\n return YKHO.__resolved", "def ae7T(YKHO, C7Pp: 'Resolver') -> ImMB:\n try:\n return C7Pp.resolve()\n except KlTL:\n raise\n except E...
[ "0.7285139", "0.66580427", "0.6612513", "0.6549235", "0.62745225", "0.6198444", "0.61238134", "0.587929", "0.5878775", "0.57903653", "0.5783566", "0.5770237", "0.57174873", "0.565451", "0.5651387", "0.5585604", "0.5579232", "0.5528005", "0.55224043", "0.5508488", "0.5504958",...
0.7360377
0
Function to change the gain of the ALS sensors that are connected to the multiplexer. The variable i2c_sensor_gain can take the values 0 (gain = 1), 1 (gain = 8), 2 (gain = 16), and 3 (gain = 130).
def vZQW(mM0K, lGp_, pAsB, AlNz, L7o4): for xErb in AlNz: HIIG(mM0K, lGp_, xErb) pAsB.ambient_light_gain = L7o4
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def B0PJ(mM0K, lGp_, pAsB, AlNz, mb4J):\n for xErb in AlNz:\n HIIG(HIIG, xErb)\n pAsB.ambient_light_gain = mb4J", "def _34T(YKHO, qEMd):\n if qEMd in range(0, 26):\n YKHO._tx_vga2_gain = qEMd\n else:\n HwRy.stderr.write(\"\\nERROR : %s tx_vga2_gain must be an integer between ...
[ "0.7838934", "0.64619696", "0.62360793", "0.60507804", "0.60504", "0.59876555", "0.58884364", "0.5822884", "0.58117855", "0.5805836", "0.5804934", "0.5782361", "0.5706696", "0.5682449", "0.5656912", "0.5602207", "0.5523741", "0.5509937", "0.5496614", "0.5455737", "0.5440469",...
0.7360746
1
Function to change the gain of the ALS sensors that are connected to the multiplexer. variable i2c_sensor_gain can take the values 0 (gain = 1), 1 (gain = 8), 2 (gain = 16), and 3 (gain = 130).
def B0PJ(mM0K, lGp_, pAsB, AlNz, mb4J): for xErb in AlNz: HIIG(HIIG, xErb) pAsB.ambient_light_gain = mb4J
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vZQW(mM0K, lGp_, pAsB, AlNz, L7o4):\n for xErb in AlNz:\n HIIG(mM0K, lGp_, xErb)\n pAsB.ambient_light_gain = L7o4", "def _34T(YKHO, qEMd):\n if qEMd in range(0, 26):\n YKHO._tx_vga2_gain = qEMd\n else:\n HwRy.stderr.write(\"\\nERROR : %s tx_vga2_gain must be an integer be...
[ "0.7423357", "0.647509", "0.62754184", "0.61743975", "0.60917413", "0.5993012", "0.5929322", "0.582763", "0.58223754", "0.5807776", "0.57847136", "0.57804906", "0.5722536", "0.57046103", "0.56889284", "0.56758404", "0.5574301", "0.5529423", "0.5527807", "0.55193484", "0.54938...
0.7888089
0
Function to calculate the output of a Proportional Integral Derivative Controller (PIDcontroller).
def na8p(ZpWb, P1dF, WbTE=0.17): jge4 = ZpWb[0] EgCm = ZpWb[1] BpuP = ZpWb[2] P1dF = oyIN.array(P1dF) AyMO = jge4 * P1dF[-1] GTTi = EgCm * WbTE * oyIN.sum(P1dF) SSvY = BpuP * (P1dF[-1] - P1dF[-2]) / WbTE hlel = oyIN.sqrt((AyMO + GTTi + SSvY) * 22) return hlel
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pHLo(YKHO):\n etR_ = YKHO.m_enabled\n Z1uT = YKHO.m_pidInput\n if etR_:\n input = Z1uT.PIDGet()\n YKHO.m_error = YKHO.m_setpoint - input\n if YKHO.m_continuous:\n if epAf.fabs(YKHO.m_error) > (YKHO.m_maximumInput - YKHO.m_minimumInput) / 2:\n if YKHO.m_er...
[ "0.75438035", "0.7284141", "0.63271904", "0.60335207", "0.59820825", "0.58844215", "0.58684385", "0.58636576", "0.5832575", "0.58089423", "0.5777085", "0.57294345", "0.57272094", "0.5721611", "0.5721611", "0.5721611", "0.56734157", "0.56707466", "0.56363714", "0.5604463", "0....
0.7203142
2
Function to check if the test box is stably heated to the desired temperature.
def ikia(P1dF): P1dF = oyIN.array(P1dF) P1dF = oyIN.abs(P1dF) if len(P1dF) < 30 or sum(P1dF[-30:-1]) > 15: return False else: return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GfdN(YKHO, ycBG=None):\n if ycBG == None:\n ycBG = YKHO._temp.get_tempC()\n DJrb = sEAN['thermostat']['targetTemp']\n tO9_ = '{} {} {} {}'.format('Temp:', ycBG, ' Target Temp:', DJrb)\n YKHO._logger.debug(tO9_)\n if ycBG > DJrb:\n YKHO._fan.set(dS1l.ON)\n else:\n YKHO._fa...
[ "0.67318016", "0.67288387", "0.654851", "0.650819", "0.6489996", "0.6416259", "0.63839024", "0.6372449", "0.6358308", "0.62952006", "0.6276", "0.6274441", "0.6263037", "0.6260504", "0.62506723", "0.61792487", "0.61712414", "0.6156235", "0.6138915", "0.6138915", "0.6138915", ...
0.0
-1
Asks user to specify a city, month, and day to analyze.
def RxGd(): x0eS = 0 CjKC = 0 print("Hello! Let's explore some US bikeshare data!") j5sA = input('\n Would you like to see data from Chicago, New York or Washington? \n').lower() while j5sA not in OerS: j5sA = input('Wrong input! \nWrite a city from the following list: Chicago, New York, Was...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NoUH(j5sA, x0eS, CjKC):\n print('The city you have entered is: ', j5sA)\n print('The month you have entered is: ', x0eS)\n print('The day you have entered is: ', CjKC)", "def RxGd():\n j5sA = None\n x0eS = None\n CjKC = None\n while CjKC == None:\n j5sA = input('Please enter a cit...
[ "0.66714007", "0.65354675", "0.64593667", "0.6374057", "0.6348314", "0.63097656", "0.62868035", "0.6259136", "0.62316", "0.62130964", "0.62050414", "0.6181105", "0.6171822", "0.61686903", "0.6158568", "0.61582303", "0.61532456", "0.61444426", "0.6131269", "0.610484", "0.61025...
0.5775211
66
Loads data for the specified city and filters by month and day if applicable.
def UlWi(j5sA, PwRp, x0eS, CjKC): print('\nLoading data and preprocessing...') SWox = ITS7.time() jQ3Z = rLdf.read_csv(OerS[j5sA]) jQ3Z['start_year'] = [int(BWXx[0:4]) for BWXx in jQ3Z['Start Time']] jQ3Z['start_month'] = [int(BWXx[5:7]) for BWXx in jQ3Z['Start Time']] jQ3Z['start_day'] = [int(B...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UlWi(j5sA, x0eS, CjKC):\n jQ3Z = rLdf.read_csv(OerS[j5sA])\n jQ3Z['Start Time'] = rLdf.to_datetime(jQ3Z['Start Time'])\n jQ3Z['month'] = jQ3Z['Start Time'].dt.month\n jQ3Z['hour'] = jQ3Z['Start Time'].dt.hour\n jQ3Z['day_of_week'] = jQ3Z['Start Time'].dt.weekday_name\n if x0eS == 0 and CjKC =...
[ "0.81320685", "0.8108889", "0.8045821", "0.8042514", "0.80090284", "0.80071104", "0.79991937", "0.7998333", "0.7988789", "0.797905", "0.79737365", "0.79610896", "0.7956163", "0.7947432", "0.79463065", "0.7908287", "0.7908229", "0.7904569", "0.7900715", "0.78930074", "0.788921...
0.0
-1
Displays statistics on the most frequent times of travel.
def dWJR(jQ3Z): print('\nCalculating The Most Frequent Times of Travel...\n') SWox = ITS7.time() s532 = sqsR[jQ3Z['start_month'].mode()[0]] print('The most common month has been ' + s532 + '.') YKob = jcLZ[jQ3Z['day_of_week'].mode()[0]] print('The most common day of the week has been ' + YKob + ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dWJR(jQ3Z):\n print('\\nDisplaying the statistics on the most frequent times of travel...\\n')\n SWox = ITS7.time()\n hFPs = jQ3Z['Month'].mode()[0]\n print('For the selected filter, the month with the most travels is: ' + str(X_bn[hFPs - 1]).title() + '.')\n DSEJ = jQ3Z['Weekday'].mode()[0]\n ...
[ "0.80247396", "0.80233026", "0.7915788", "0.78266186", "0.7822246", "0.78143597", "0.77659196", "0.7740343", "0.773628", "0.77344066", "0.76867086", "0.7668633", "0.7651731", "0.7644636", "0.76399267", "0.76367253", "0.7625196", "0.7623158", "0.7612803", "0.76002145", "0.7583...
0.0
-1
Displays statistics on the most popular stations and trip.
def Huc_(jQ3Z): print('\nCalculating The Most Popular Stations and Trip...\n') SWox = ITS7.time() FWQF = jQ3Z['Start Station'].mode()[0] print('The most common start station has been ' + FWQF + '.') Kbqi = jQ3Z['End Station'].mode()[0] print('The most common end station has been ' + Kbqi + '.') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Huc_(jQ3Z):\n print('\\nCalculating The Most Popular Stations and Trip...\\n')\n SWox = ITS7.time()\n print(_8rG(jQ3Z))\n print(oFx8(jQ3Z))\n print(_Ek3(jQ3Z))\n print('\\nThis took %s seconds.' % (ITS7.time() - SWox))\n print('-' * 40)", "def Huc_(nPrm):\n print('\\nCalculating The M...
[ "0.7815675", "0.7662213", "0.7553417", "0.74914914", "0.74748665", "0.7446617", "0.7428588", "0.74237514", "0.74177027", "0.7400495", "0.7387161", "0.7385634", "0.73647535", "0.735934", "0.73566747", "0.73548365", "0.7351854", "0.7351274", "0.735057", "0.73421645", "0.7340198...
0.6806197
96
Displays statistics on the total and average trip duration.
def kDMA(jQ3Z): print('\nCalculating Trip Duration...\n') SWox = ITS7.time() jQ3Z['travel_time'] = jQ3Z['end_sec'] - jQ3Z['start_sec'] + 60 * (jQ3Z['end_min'] - jQ3Z['start_min']) + 3600 * (jQ3Z['end_hour'] - jQ3Z['start_hour']) RGHr = jQ3Z['travel_time'].sum() print('The total travel time has been ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kDMA(nPrm):\n print('\\nCalculating Trip Duration...\\n')\n SWox = ITS7.time()\n DbBi = nPrm['Trip Duration'].sum()\n print('The Total Travel Time is {} Hours'.format(DbBi / 3600))\n IEfE = nPrm['Trip Duration'].mean()\n print('The Average Travel Time is {} Minutes'.format(IEfE / 60))\n pr...
[ "0.814274", "0.8025143", "0.80041367", "0.79496753", "0.7937415", "0.79312176", "0.7926815", "0.7915187", "0.79142886", "0.7908032", "0.79055744", "0.7900715", "0.7891682", "0.78894734", "0.7886722", "0.78851086", "0.7884266", "0.7882474", "0.78738385", "0.78686154", "0.78664...
0.0
-1
Adapted from load_file of sklearn, this loads files from directories and subdirectories
def uYiW(o9uy, JBZA=None, LeZt=None, mGqa=True, hXNa=True, tZ2K=None, p4k2=None, NPdI=None, MVdX='strict', t3eI=0): from os.path import isdir from os import listdir from os.path import join pan_ = [] HOVt = [] iumf = [] ucBt = [eHNT for eHNT in sorted(listdir(o9uy)) if isdir(join(o9uy, eHNT)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LmMY(YKHO):\n Crrw = []\n _73Q = []\n lCkm = KbUi.map_patients_to_labels(YKHO.xml_dir, YKHO.category)\n for eHNT in Hy7s.listdir(YKHO.cui_dir):\n oFUB = eHNT.split('.')[0]\n qaEx = Hy7s.path.join(YKHO.cui_dir, eHNT)\n LInS = open(qaEx).read()\n fNPE = lCkm[oFUB]\n ...
[ "0.69829124", "0.68089914", "0.6581123", "0.639368", "0.63810444", "0.63791573", "0.6326334", "0.63139087", "0.63093185", "0.6302252", "0.6216079", "0.62111765", "0.61799574", "0.6154709", "0.61505216", "0.6145987", "0.6115458", "0.61113006", "0.6105166", "0.61003083", "0.609...
0.0
-1
Return a string representation of this hub.
def wHJl(YKHO) -> str: return f'<Hub host={YKHO.host} app_id={YKHO.app_id}>'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CZBi(YKHO):\n return YKHO.__repr__()", "def Napc(YKHO):\n return str(YKHO)", "def Napc(YKHO):\n return str(YKHO)", "def yLCI(YKHO):\n return YKHO.__str__()", "def Sa1R(YKHO) -> str:\n raise NotImplementedError", "def zAg0(YKHO):\n return H9e7(YKHO._bytes)", "def zAg0(YKHO):\n r...
[ "0.76874536", "0.75883555", "0.7518112", "0.74743575", "0.74606997", "0.7375215", "0.7335236", "0.7328006", "0.7328006", "0.72803766", "0.72379076", "0.722928", "0.722928", "0.722928", "0.722928", "0.722928", "0.722928", "0.722928", "0.722928", "0.722928", "0.722928", "0.72...
0.8189225
0
Return the current hub mode.
def Tuqy(YKHO) -> h8nf[str]: for Tuqy in YKHO._modes: if Tuqy.active: return Tuqy.name return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yQBk(YKHO):\n return YKHO._api.get_mode()", "def yQBk(YKHO) -> str:\n return YKHO.send(YKHO.cmd.GET_MODE)", "def yQBk(YKHO):\n return YKHO.mode", "def bTfd(YKHO):\n return YKHO.mode", "def Tuqy(YKHO) -> str:\n return qe4Y.get(YKHO, 'mode')", "def Tuqy(YKHO) -> str:\n return qe4Y.get...
[ "0.7597531", "0.7474025", "0.74090165", "0.7387282", "0.73510855", "0.73510855", "0.7252343", "0.72167367", "0.71695316", "0.71257424", "0.71257424", "0.71257424", "0.7121371", "0.7121371", "0.7106695", "0.7106695", "0.7106695", "0.7063384", "0.70419866", "0.70129037", "0.700...
0.6946213
23
Extracts ngrams from the current string if n <= len(string)
def axXj(vIwR, exwG, yHH9=0, kcwm=True): if exwG > len(vIwR): return [] HyjZ = [] YPaw = exwG - yHH9 HyjZ = [vIwR[YRbF:YRbF + exwG] for YRbF in range(0, len(vIwR) - YPaw + 1, YPaw)] if kcwm: HyjZ = list(set(HyjZ)) HyjZ = [Oa1e + '\n' for Oa1e in HyjZ] return HyjZ
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def HzOP(exwG, vIwR):\n pCSA = []\n YRbF = 0\n while YRbF + exwG < len(vIwR):\n pCSA.append(vIwR[YRbF:YRbF + exwG])\n YRbF += 1\n return pCSA", "def pCSA(l5Ny, exwG):\n return eNCK(*[RihX(l5Ny, YRbF) for YRbF in range(exwG + 1)])", "def RisN(Q6uT, exwG):\n return", "def JzP5(Y...
[ "0.84467524", "0.7935012", "0.78996223", "0.7893587", "0.7778176", "0.76662934", "0.7563878", "0.74601954", "0.7435136", "0.74344337", "0.73883104", "0.73075396", "0.727432", "0.72036266", "0.71773434", "0.71773434", "0.7166321", "0.71659625", "0.71629286", "0.71037745", "0.7...
0.79329044
2
Test bad request to route /auth/signup
def vo9u(YKHO): nPrm = {'password': 'pwd', 'email': 'Josh'} nPrm = qQXR.dumps(nPrm) geh0 = YKHO.client.post('api/v2/auth/signup', content_type='application/json', data=nPrm) nPrm = qQXR.loads(geh0.data) YKHO.assertEqual(nPrm, {Ol8d: 'Username not provided'}) YKHO.assertEqual(geh0.status_code, 40...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UpZi(YKHO):\n im04 = YKHO.app.get('/signup')\n YKHO.assertEqual(im04.status_code, 200, 'signup page did not load as expected')", "def Ysh1(YKHO):\n geh0 = YKHO.client.post('/api/v1/register')\n nPrm = geh0.get_json()\n YKHO.assertEqual(geh0.status_code, 400)\n YKHO.assertEqual(nPrm['status'...
[ "0.7829825", "0.743015", "0.7381255", "0.7249407", "0.72054344", "0.7204305", "0.7167168", "0.7158418", "0.7111919", "0.7109361", "0.7106784", "0.70954984", "0.7045709", "0.7015991", "0.7006945", "0.6996461", "0.69855917", "0.6965271", "0.6910544", "0.68998796", "0.6895965", ...
0.64562297
79
Tests POST requests to api/v2/parcels with no token, invalid token or unauthorized user
def MIug(YKHO): geh0 = YKHO.client.post('api/v2/parcels', data=qQXR.dumps(KLx3['order'])) nPrm = qQXR.loads(geh0.data) YKHO.assertEqual(nPrm, {Ol8d: 'Token missing'}) YKHO.assertEqual(geh0.status_code, 401) nPrm = qQXR.dumps(YKHO.order) geh0 = YKHO.client.post('/api/v2/parcels', data=nPrm, conte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MIug(YKHO):\n geh0 = YKHO.client.post('api/v1/parcels', data=qQXR.dumps(KLx3['order']))\n nPrm = qQXR.loads(geh0.data)\n YKHO.assertEqual(nPrm, {Ol8d: 'Token missing'})\n YKHO.assertEqual(geh0.status_code, 401)\n nPrm = qQXR.dumps(YKHO.order)\n geh0 = YKHO.client.post('/api/v1/parcels', data=...
[ "0.72694004", "0.690783", "0.679436", "0.67260045", "0.64535475", "0.64454746", "0.63695604", "0.63090456", "0.6298224", "0.62966996", "0.62864226", "0.62805974", "0.6280423", "0.6260072", "0.62193733", "0.6206236", "0.6177117", "0.6173735", "0.6169496", "0.6159602", "0.61513...
0.73168087
0
Tests POST requests to api/v2/parcels with no token, invalid token or unauthorized user
def ukCL(YKHO): geh0 = YKHO.client.get('api/v2/parcels', headers=YKHO.user_token_dict) nPrm = qQXR.loads(geh0.data) YKHO.assertEqual(nPrm, {Ol8d: 'You are not authorized to perform this operation'}) YKHO.assertEqual(geh0.status_code, 403)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MIug(YKHO):\n geh0 = YKHO.client.post('api/v2/parcels', data=qQXR.dumps(KLx3['order']))\n nPrm = qQXR.loads(geh0.data)\n YKHO.assertEqual(nPrm, {Ol8d: 'Token missing'})\n YKHO.assertEqual(geh0.status_code, 401)\n nPrm = qQXR.dumps(YKHO.order)\n geh0 = YKHO.client.post('/api/v2/parcels', data=...
[ "0.73205584", "0.7273098", "0.6908061", "0.6794303", "0.67267287", "0.64467967", "0.63710636", "0.6309213", "0.63001466", "0.62997603", "0.6287899", "0.62821615", "0.628114", "0.6262289", "0.6220885", "0.62079954", "0.6178712", "0.61756676", "0.6169968", "0.6161615", "0.61525...
0.6454965
5