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
Computes the backward pass for a layer of rectified linear units (ReLUs).
def PPFh(zYcP, wyyA): Jw7X, WKvO = (None, wyyA) Jw7X = zYcP.copy() Jw7X[WKvO <= 0] = 0 return Jw7X
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PPFh(YKHO, gEpz, wyyA):\n WKvO = wyyA\n WKvO = oyIN.array(WKvO, copy=True)\n WKvO[WKvO <= 0] = 0\n WKvO[WKvO > 0] = 1\n cf5c = gEpz * WKvO\n return cf5c", "def ZD5u(OaeV, pwN3):\n N77f, lQ3t, P6bq, OCi3 = OaeV.saved_tensors\n begE = P6bq.device\n SGf8 = 1e-10\n Ro40, = ht2j.auto...
[ "0.70412636", "0.694716", "0.6897693", "0.6847592", "0.6847592", "0.6846935", "0.6841099", "0.68178034", "0.6766849", "0.6754919", "0.67536426", "0.67530656", "0.67419785", "0.6713423", "0.6708748", "0.6699276", "0.6696307", "0.6696307", "0.66860896", "0.6665928", "0.6665928"...
0.6739244
13
Forward pass for batch normalization. During training the sample mean and (uncorrected) sample variance are computed from minibatch statistics and used to normalize the incoming data. During training we also keep an exponentially decaying running mean of the mean and variance of each feature, and these averages are use...
def d3MU(WKvO, KMvS, UqYS, Y7R2): Tuqy = Y7R2['mode'] SGf8 = Y7R2.get('eps', 1e-05) H0zq = Y7R2.get('momentum', 0.9) XiAs = WKvO.shape if len(XiAs) > 2: ywwl, Nq1b, C7Ls, XcU5 = WKvO.shape WKvO = oyIN.swapaxes(WKvO, 1, 3) lWPh = Nq1b WKvO = oyIN.reshape(WKvO, [ywwl * ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NkkI(YKHO, WKvO, EvQg=True):\n if EvQg is not None:\n JBMS, I8JS = ZylS.nn.moments(WKvO, [0, 1, 2])\n ghdg = YKHO.mean.assign(JBMS)\n RPPm = YKHO.variance.assign(I8JS)\n with ZylS.control_dependencies([ghdg, RPPm]):\n return ZylS.nn.batch_norm_with_global_normalization...
[ "0.7338873", "0.70185083", "0.69407904", "0.69350904", "0.69315374", "0.68895227", "0.68717885", "0.6847517", "0.6767817", "0.6715243", "0.6704498", "0.6646542", "0.6600791", "0.659915", "0.6578266", "0.65171987", "0.65148103", "0.6461142", "0.6452949", "0.6411437", "0.638789...
0.6756687
9
A naive implementation of the forward pass for a maxpooling layer.
def LUxS(WKvO, cjPb): yvT9 = None ywwl, Nq1b, C7Ls, XcU5 = WKvO.shape ZdOB = cjPb['pool_height'] dvGM = cjPb['pool_width'] _0fC = cjPb['stride'] Mh8E = int(1 + (C7Ls - ZdOB) / _0fC) CRzg = int(1 + (XcU5 - dvGM) / _0fC) yvT9 = oyIN.zeros((ywwl, Nq1b, Mh8E, CRzg)) for exwG in range(yww...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gORb(WKvO, cjPb):\n yvT9 = None\n ywwl, Nq1b, C7Ls, XcU5 = WKvO.shape\n dvGM = cjPb['pool_width']\n ZdOB = cjPb['pool_height']\n _0fC = cjPb['stride']\n nAIO = int((XcU5 - dvGM) / _0fC + 1)\n Ya8v = int((C7Ls - ZdOB) / _0fC + 1)\n yvT9 = oyIN.zeros((ywwl, Nq1b, Ya8v, nAIO))\n for YRb...
[ "0.7848364", "0.7747396", "0.7589175", "0.7583903", "0.75477105", "0.7419348", "0.7406021", "0.73784006", "0.73185766", "0.7133479", "0.7100079", "0.7076823", "0.69906706", "0.6926053", "0.6922141", "0.687887", "0.6813063", "0.68046343", "0.679283", "0.679283", "0.67856866", ...
0.7224327
9
Soft undelete all objects included in this queryset.
def TQvE(YKHO): ei4T = YKHO.filter(deleted__isnull=False) if ei4T.count(): S0MI.debug('Soft undeleting %s objects: %s', YKHO.model.__name__, ', '.join((str(_sei) for _sei in ei4T.values_list('pk', flat=True)))) ei4T.update(deleted=None)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PTpj(YKHO):\n for YEnM in YKHO:\n nV7a(YEnM)\n YKHO.update(deleted=wzkt())", "def n6PS(YKHO):\n for bGrB in YKHO.all():\n YKHO.delete(bGrB)", "def TQvE(YKHO):\n if YKHO.deleted is not None:\n S0MI.debug('Soft-undeleting object %s %s', YKHO._meta.model.__name__, YKHO.pk)\n ...
[ "0.7775583", "0.7648506", "0.75364727", "0.70050657", "0.70050657", "0.69240206", "0.6891578", "0.68431973", "0.66635644", "0.6452652", "0.64517033", "0.64481574", "0.64269197", "0.64024746", "0.640173", "0.6346941", "0.6341191", "0.6325436", "0.6316071", "0.6282519", "0.6269...
0.8562543
0
Undelete this softdeleted object.
def TQvE(YKHO): if YKHO.deleted is not None: S0MI.debug('Soft-undeleting object %s %s', YKHO._meta.model.__name__, YKHO.pk) YKHO.deleted = None YKHO.save() return YKHO
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TQvE(YKHO):\n ei4T = YKHO.filter(deleted__isnull=False)\n if ei4T.count():\n S0MI.debug('Soft undeleting %s objects: %s', YKHO.model.__name__, ', '.join((str(_sei) for _sei in ei4T.values_list('pk', flat=True))))\n ei4T.update(deleted=None)", "def HeHG(YKHO, KAOR):\n YKHO.destroy(KAOR)...
[ "0.78353626", "0.7044692", "0.6946034", "0.6711948", "0.6290562", "0.6212208", "0.61986816", "0.6167826", "0.6163988", "0.6161209", "0.61515373", "0.612617", "0.612287", "0.612287", "0.612287", "0.612287", "0.612287", "0.612287", "0.612287", "0.612287", "0.612287", "0.61228...
0.88690126
0
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`.
def LwSz(Bcwd, KndY, leAC='Confusion matrix', iMGt=QrM1.cm.Blues): Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis] QrM1.imshow(Bcwd, interpolation='nearest', cmap=iMGt) QrM1.title(leAC, fontsize=30) QrM1.colorbar() wIWT = oyIN.arange(len(KndY)) QrM1.xticks(wIWT, KndY, rotation=90...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LwSz(Bcwd, KndY=[0, 1], NkkI=False, leAC='Confusion matrix', RMso=False):\n if NkkI:\n Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]\n print('Normalized confusion matrix')\n else:\n print('Confusion matrix, without normalization')\n if RMso:\n print(Bcwd)"...
[ "0.8194862", "0.80949175", "0.8029915", "0.8019153", "0.79941195", "0.7991258", "0.7980955", "0.7976606", "0.79610753", "0.79590565", "0.79378676", "0.7934962", "0.7934504", "0.79313844", "0.7926313", "0.7924577", "0.79241234", "0.7923211", "0.7923023", "0.7921931", "0.791787...
0.0
-1
Retrieves an article instance by slug
def ps_8(Emd4, s5ru): try: l3QS = wHLq.objects.get(slug=s5ru) except wHLq.DoesNotExist: raise Bx6I.NotFound(f'Article of slug {s5ru} nonexistent') else: return l3QS
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ps_8(Emd4, s5ru):\n try:\n l3QS = wHLq.objects.get(slug=s5ru)\n except wHLq.DoesNotExist:\n raise Bx6I.NotFound(f'Article with slug {s5ru} nonexistent')\n else:\n return l3QS", "def qH4N(YKHO, s5ru):\n l3QS = xwcw.objects.get(slug=s5ru)\n return l3QS", "def qH4N(YKHO, s5...
[ "0.85958314", "0.8506934", "0.8110329", "0.79361844", "0.78539926", "0.76428974", "0.71877354", "0.709687", "0.70077795", "0.6740493", "0.6717442", "0.66809005", "0.6593266", "0.6559878", "0.6551789", "0.65463233", "0.6518413", "0.6484419", "0.64334583", "0.6341164", "0.63099...
0.85910726
1
Retrieves all comments associated with an article
def NMoC(YKHO, QePW, s5ru): l3QS = O9Tq.fetch(s5ru) Tj1O = jY1u.objects.filter(article=l3QS) ZMzz = YKHO.serializer_class(Tj1O, many=True) geh0 = {'data': ZMzz.data} geh0.update({'comments count': Tj1O.count()}) return oGir(data=geh0, status=jGRS.HTTP_200_OK)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NBOS(nNXP: NytApi, h0TT: str, lo4R: Optional[str]=None, tmiY: int=100) -> x1iM[cuzp]:\n Tj1O = BTJM(nNXP, h0TT, pagination_size=tmiY)\n teV2(nNXP, h0TT, Tj1O, pagination_size=tmiY)\n if lo4R is not None:\n for aM_I in hAu3(Tj1O):\n aM_I['articleID'] = lo4R\n return Tj1O", "def w...
[ "0.8050328", "0.732948", "0.73149073", "0.6835663", "0.6629535", "0.65066797", "0.6407542", "0.6355919", "0.6319557", "0.6241318", "0.62000376", "0.6161543", "0.6161491", "0.61549735", "0.61095816", "0.6074199", "0.60129213", "0.59445703", "0.59358597", "0.59356374", "0.59193...
0.6543755
5
Queries for an existing comment object
def HBui(Emd4, H5ew, l3QS): try: aM_I = jY1u.objects.get(pk=H5ew, article=l3QS) except jY1u.DoesNotExist: raise Bx6I.NotFound(f'Comment of ID {H5ew} nonexistent') return aM_I
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ZsdS(YKHO, pQGt, **qIxc):\n return YKHO.fetch('/comment/' + pQGt, **qIxc)", "def podV(YKHO, NBcv):\n return YKHO.get_object('comment', NBcv)", "def AMX5(YKHO, id):\n try:\n return jY1u.objects.get(id=id)\n except jY1u.DoesNotExist:\n raise uhgT", "def podV(YKHO, pQGt):\n xUwc...
[ "0.6801074", "0.67693067", "0.6702177", "0.6696655", "0.66105837", "0.65742934", "0.6515823", "0.64759314", "0.6462417", "0.6450817", "0.64109236", "0.6364227", "0.6363132", "0.63257164", "0.6319082", "0.6303914", "0.62870663", "0.62663925", "0.62433016", "0.6201057", "0.6164...
0.6270821
17
Posts a reply to a comment
def m8z6(YKHO, QePW, s5ru, id): l3QS = O9Tq.fetch(s5ru) aM_I = QePW.data.get('comment', {}) UCCb = ZqB6.check_comment(id, l3QS) ZMzz = YKHO.serializer_class(data=aM_I) ZMzz.is_valid(raise_exception=True) UbGa = jGRS.HTTP_201_CREATED try: AcSN.objects.get(comment_to=UCCb, author=QePW....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OiYo(YKHO, aM_I):\n pass", "def d7o9(x0hE, qIxc):\n lcy9 = x0hE.post_comment_reply(qIxc.comment_id, qIxc.image_id, qIxc.comment)\n Qwwm({'comment_reply': lcy9})", "def OiYo(QePW, _sei=None):\n CBIr = QePW.user\n HB1n = T97t.objects.get(pk=_sei)\n GfdN = zEX2(CBIr)\n if GfdN == 'not_aut...
[ "0.8557212", "0.80830026", "0.7464502", "0.7454756", "0.73025185", "0.70379573", "0.6953753", "0.69517976", "0.69267356", "0.6920172", "0.6898812", "0.685946", "0.68350935", "0.67654383", "0.67534816", "0.67506546", "0.670308", "0.66353905", "0.66115403", "0.6559514", "0.6551...
0.6990167
6
Updates a reply to a comment
def QdZT(YKHO, QePW, s5ru, id, H5ew): l3QS = O9Tq.fetch(s5ru) o1A2 = QePW.data.get('comment', {}) _AKB = ZqB6.check_comment(id, l3QS) aM_I = YKHO.get_reply(parent=_AKB, child=H5ew) X9LZ = AcSN.objects.filter(comment_to=_AKB, body=o1A2.get('body')) if X9LZ: nPrm = {'message': "You've post...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def R_SC(mWFP, leAC, bLT7):\n Amyp = pHEk.get_reply(bLT7)\n if Amyp:\n if Amyp.user_id != c5ow.id:\n return vKnz(nKyW('post.post', name=mWFP, title=leAC))\n L03z = AHjh()\n if L03z.validate_on_submit():\n pHEk.update_reply(Amyp, L03z.reply.data)\n Dwep('S...
[ "0.7375476", "0.7176409", "0.7150972", "0.6933991", "0.6819595", "0.68132824", "0.6738296", "0.6662346", "0.6409086", "0.64086366", "0.6390998", "0.6361553", "0.6337784", "0.6322883", "0.63135684", "0.6293877", "0.6291488", "0.6286815", "0.6283177", "0.62692153", "0.62605363"...
0.7180171
1
Queries for a reply to a comment using the reply's primary key and the comment foreign key
def Drde(YKHO, _AKB, aUGN): try: Amyp = AcSN.objects.get(pk=aUGN, comment_to=_AKB) except AcSN.DoesNotExist: raise Bx6I.NotFound(f'Comment reply of ID {aUGN} nonexistent') return Amyp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oJld(Mkmy, aM_I, ulxk, B0gN):\n khoC, ANfV = B0gN.parseText(aM_I.body)\n if khoC and ANfV and (not ulxk.exists(aM_I.parent_id, khoC)):\n RKD7.info('replying to comment: %s %s with %s', aM_I.id, aM_I.author.name, khoC)\n aM_I.reply(ANfV)", "def yOx9(x0hE, qIxc):\n _G_z = x0hE.get_commen...
[ "0.68092936", "0.65351033", "0.64578533", "0.6399497", "0.6314453", "0.6314005", "0.62689596", "0.6100489", "0.6052141", "0.6008324", "0.600773", "0.5981933", "0.5968596", "0.5807133", "0.5802016", "0.57956845", "0.57856786", "0.5744666", "0.5736091", "0.57186806", "0.5715331...
0.74181384
0
Return the absolute path to the specified binary.
def AVwH(neaT, pmON=None): if pmON is None: pmON = Hy7s.environ.get('PATH', '') for XP5J in pmON.split(':'): XP5J = Hy7s.path.join(XP5J, neaT) if Hy7s.access(XP5J, Hy7s.X_OK): return XP5J return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dLv2():\n _bsB = uagh('where is the file located?')\n _bsB = Hy7s.path.abspath(_bsB)\n return _bsB", "def XKZ_(HCmI, wkCI=False):\n return Hy7s.path.join(eB0B, HCmI)", "def dzNk():\n neaT = RDuA.which(Os4z)\n if not Hy7s.path.exists(neaT):\n raise FileNotFoundError(f'Could not find...
[ "0.7471814", "0.744936", "0.73367304", "0.73123205", "0.72481656", "0.7173063", "0.7107043", "0.7100915", "0.707256", "0.70329857", "0.70031244", "0.6961139", "0.6915897", "0.6886918", "0.6846617", "0.6817588", "0.6805108", "0.6657711", "0.66264236", "0.6605834", "0.65735793"...
0.6856968
14
Look for a relative path, ascending through parent directories. Ascend through parent directories of current path looking for a relative
def qLYE(qGgV, XKL0, Iw6c=None): if Iw6c is None: Iw6c = Hy7s.path.exists for pmON in ojfc(XKL0): pan_ = Hy7s.path.join(pmON, qGgV) if Iw6c(pan_): return pan_ return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def f3qj(fX0p):\n pmON = GkAb.cwd()\n Ki_d = 5\n for RwuJ in range(Ki_d):\n pmON = pmON.parent\n if pmON / fX0p in pmON.iterdir():\n break\n if Ki_d == RwuJ:\n raise FileNotFoundError(f\"The directory {fX0p} could not be found in the {Ki_d} directories above this file's ...
[ "0.70760447", "0.69693434", "0.6941556", "0.69349515", "0.6843399", "0.68156123", "0.6702668", "0.66005063", "0.65006596", "0.6353335", "0.6341714", "0.6304848", "0.63002527", "0.62443334", "0.61926556", "0.61466026", "0.60806197", "0.6076745", "0.60734797", "0.6072998", "0.6...
0.66023016
7
Generate a tempdir, modifying the object, and env to use it. Specifically, if update_env is True, then from this invocation forward, python and all subprocesses will use this location for their tempdir. The matching _TempDirTearDown restores the env to what it was.
def KUjY(YKHO, y0cW='tmp', wNUn=True, oEge=None): YKHO.tempdir = gbPf.mkdtemp(prefix=y0cW, dir=oEge) Hy7s.chmod(YKHO.tempdir, 448) if wNUn: with gbPf._once_lock: YKHO._tempdir_value = gbPf._get_default_tempdir() YKHO._tempdir_env = tuple(((WKvO, Hy7s.environ.get(WKvO)) for WK...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def U9hK():\n\n class ctx(object):\n\n def DMw_(YKHO):\n YKHO.prevdir = Hy7s.getcwd()\n YKHO.tempdir = gbPf.mkdtemp()\n Hy7s.chdir(YKHO.tempdir)\n return YKHO.tempdir\n\n def U4F2(YKHO, *jzdc, **mQ1D):\n Hy7s.chdir(YKHO.prevdir)\n R...
[ "0.65600824", "0.6517266", "0.64446086", "0.6426027", "0.6386173", "0.6364851", "0.6364851", "0.6326897", "0.63160133", "0.6303309", "0.62600225", "0.6233043", "0.620513", "0.620513", "0.6190408", "0.61745065", "0.61622757", "0.61618954", "0.6155542", "0.6130545", "0.61290205...
0.7734488
0
ContextManager constraining all tempfile/TMPDIR activity to a tempdir
def Lcjt(y0cW='tmp', oEge=None, S8SU=None, coje=False): if S8SU is None: class foon(object): pass S8SU = eZ8K() KUjY(S8SU, base_dir=oEge, prefix=y0cW) try: yield S8SU.tempdir finally: c_sm(S8SU, coje)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Fb4b(QpfX):\n lp4b = gbPf.TemporaryDirectory()\n QpfX.tempdir = lp4b", "def GHau(OTY2):\n if OTY2:\n return QZXY.nullcontext(OTY2)\n else:\n return gbPf.TemporaryDirectory()", "def U9hK():\n\n class ctx(object):\n\n def DMw_(YKHO):\n YKHO.prevdir = Hy7s.getcwd...
[ "0.75509894", "0.72421664", "0.70320386", "0.6814566", "0.68072873", "0.6758299", "0.67368346", "0.6729706", "0.667541", "0.6672724", "0.6617201", "0.6547067", "0.65365887", "0.651003", "0.6509396", "0.6503801", "0.64694476", "0.6462623", "0.6427541", "0.64224917", "0.6421086...
0.7161609
2
Restore the environment variables to that of passed in dictionary.
def _CMP(sEAN): Hy7s.environ.clear() Hy7s.environ.update(sEAN)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ORiH():\n\n def wBIE(H5ew, BWXx):\n if BWXx is None:\n if H5ew in Hy7s.environ:\n del Hy7s.environ[H5ew]\n else:\n Hy7s.environ[H5ew] = BWXx\n wBIE('TF_XLA_FLAGS', Lj5j)\n wBIE('TF_FORCE_GPU_ALLOW_GROWTH', S9Qk)", "def sqnm():\n hkxX = tyeH('envi...
[ "0.726292", "0.6727779", "0.6704393", "0.66477937", "0.6630372", "0.64882445", "0.64762366", "0.64619315", "0.6332729", "0.63148457", "0.62082964", "0.61878765", "0.6185419", "0.61318153", "0.60417116", "0.60417116", "0.6012145", "0.600259", "0.598263", "0.59585905", "0.59412...
0.5716636
30
Initializer for StandardConvergerStandardInputTemplate. Note that inheriting from this class and overwriting methods is another option.
def FIMM(YKHO, qjaX, iJPl, XkNy, pqZQ, ZtYP=None): YKHO._convObjs = qjaX YKHO._createBasicObjFunct = iJPl YKHO._modCalcObjFunct = XkNy YKHO._stdInpFromCalcObjs = pqZQ if ZtYP is not None: for H5ew, wEf2 in ZtYP.items(): setattr(YKHO, H5ew, wEf2)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NDLB(YKHO):\n raise NotImplementedError('')", "def FIMM(YKHO, LFdf=None, zJsh=None):\n YKHO._stdin = LFdf or HwRy.stdin\n YKHO._stdout = zJsh or HwRy.stdout\n YKHO._builtins = YKHO._make_builtins()", "def FIMM(YKHO, **g4y1):\n super().__init__(**g4y1)\n YKHO.inputs.on_trait_change(YKHO._o...
[ "0.64910805", "0.60847557", "0.5736477", "0.57228565", "0.572092", "0.5719801", "0.5714915", "0.56754947", "0.559878", "0.5596769", "0.54730016", "0.54615384", "0.5456807", "0.54496306", "0.54333276", "0.54124266", "0.5407913", "0.54079115", "0.540288", "0.5385086", "0.537218...
0.0
-1
create list of batch indices
def UHy9(LVAh, Ep8u): KwjL = oyIN.random.permutation(len(LVAh)) fO_R = len(LVAh) // Ep8u JlfD = [] for I7JW in oyIN.array_split(KwjL, fO_R): JlfD.append([WKvO for WKvO in I7JW]) return JlfD
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ITSp(YKHO):\n Fg_i = YKHO.batch_size\n return [oyIN.arange(YRbF * Fg_i, YRbF * Fg_i + Fg_i) for YRbF in range(YKHO.num_batches)]", "def lpnX(Ep8u: int, baHf: int) -> ht2j.LongTensor:\n ZhZJ = ht2j.arange(Ep8u)\n ZhZJ = ZhZJ.view(-1, 1).expand(Ep8u, baHf)\n return ZhZJ", "def oNHd(mrMZ):\n ...
[ "0.84326243", "0.7300249", "0.7221809", "0.7161237", "0.71588814", "0.70744306", "0.68750566", "0.6825795", "0.6759448", "0.67435443", "0.67260003", "0.66654444", "0.6642343", "0.6627527", "0.6620131", "0.66059947", "0.66012627", "0.65474844", "0.6539724", "0.6534247", "0.651...
0.0
-1
Create an action for optional arguments which provides two defaults. Use as argument `action` to the argparse.ArgumentParser.add_argument` method. This defines a command line argument which, in addition to its normal default, has an additional default value which is taken when this optional argument is
def ge32(WmM4): class DefaultArg(j1Jz.Action): def nrOS(YKHO, wvEv, _63S, BWXx, _0Hy): if BWXx is None: setattr(_63S, YKHO.dest, WmM4) else: setattr(_63S, YKHO.dest, BWXx) return ZACf
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lqMv(*qIxc, **B2fa):\n if 'action' in B2fa:\n wEf2 = B2fa.pop('action')\n if wEf2 == 'store_true':\n B2fa['const'] = True\n B2fa['nargs'] = '?'\n elif wEf2 == 'store_false':\n B2fa['const'] = False\n B2fa['nargs'] = '?'\n else:\n ...
[ "0.68507427", "0.6403236", "0.6131243", "0.60557085", "0.5996159", "0.5989206", "0.5904569", "0.58817375", "0.5835471", "0.58206767", "0.58011943", "0.57539177", "0.57538146", "0.57301015", "0.57099235", "0.57055557", "0.57048225", "0.5684694", "0.5652228", "0.56350726", "0.5...
0.7133609
0
Reshape x so that the last dimension becomes two dimensions. The first of these two dimensions is n.
def DVD6(YKHO, WKvO, exwG): iPPn = list(WKvO.size()) XVAW = iPPn[-1] EZd9 = iPPn[:-1] + [exwG] + [XVAW // exwG if XVAW else None] U5bT = WKvO.view(EZd9) return U5bT.permute(0, 2, 1, 3)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VjTS(WKvO, exwG):\n OOcW = ihqc(WKvO)\n r8hN = OOcW[-1]\n if isinstance(r8hN, int) and isinstance(exwG, int):\n assert r8hN % exwG == 0\n return ZylS.reshape(WKvO, OOcW[:-1] + [exwG, r8hN // exwG])", "def VjTS(WKvO, exwG):\n iPPn = WKvO.get_shape().dims\n XVAW = iPPn[-1]\n EZd9 = ...
[ "0.73021156", "0.72806466", "0.727416", "0.72017586", "0.7137547", "0.7065171", "0.70424175", "0.69658244", "0.69242", "0.6820341", "0.6561438", "0.6518949", "0.6497071", "0.6470221", "0.6422806", "0.6359682", "0.6277855", "0.62476885", "0.62466705", "0.6239059", "0.623731", ...
0.74958134
0
Reshape x so that the last two dimension become one.
def _QYZ(YKHO, WKvO): iPPn = list(WKvO.size()) jzdc, Fg_i = iPPn[-2:] EZd9 = iPPn[:-2] + [jzdc * Fg_i if jzdc and Fg_i else None] U5bT = WKvO.contiguous().view(EZd9) return U5bT
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PWgb(WKvO):\n return q3V_(WKvO, (WKvO.shape[0], -1))", "def q3V_(WKvO, ROpF):\n return hekC(ROpF)(WKvO)", "def feNb(WKvO):\n assert WKvO.dim() == 4\n Ep8u, fHmP, MKlR, yzQ0 = WKvO.size()\n REGG = WKvO.view(Ep8u, fHmP, -1).transpose(1, 2).contiguous()\n REGG = REGG.view(Ep8u, MKlR, yzQ0, f...
[ "0.7624362", "0.7361735", "0.7356254", "0.73524576", "0.7211992", "0.71524197", "0.70263374", "0.69711345", "0.69283223", "0.6908497", "0.67825496", "0.6772853", "0.67166173", "0.67037886", "0.66884685", "0.66884685", "0.6648974", "0.6637822", "0.660816", "0.658997", "0.65652...
0.5980656
63
Test humidity sensor with device class humidity.
def Faf6(YKHO): with Po4F.dict(SUVV, {'HumiditySensor': YKHO.mock_type}): QTBn = wHLO('sensor.humidity', '20', {p9kg: 'humidity', lrpR: '%'}) AxHE(None, QTBn, 2, {})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zSsg(YKHO):\n uLVm = ZFAq(loop=YKHO.loop)\n XtFw = XTqt(uLVm, 'TestSensor', group_address_state='1/2/3', value_type='humidity')\n XtFw.sensor_value.payload = E2_e((14, 115))\n YKHO.assertEqual(XtFw.resolve_state(), 33.02)\n YKHO.assertEqual(XtFw.unit_of_measurement(), '%')\n YKHO.assertEqual(...
[ "0.7566833", "0.7559146", "0.75242794", "0.7332435", "0.7294313", "0.72768813", "0.705482", "0.6785941", "0.6698963", "0.6649476", "0.66266364", "0.661288", "0.6586842", "0.65737927", "0.65552545", "0.65416485", "0.65021384", "0.64758176", "0.64583695", "0.64450765", "0.64357...
0.76015294
0
Return True if given point is inside the region
def S8eX(YKHO, AU8u): gwAu = 0.6 WKvO = AU8u[0] LVAh = AU8u[1] if WKvO >= YKHO.xmin - gwAu and WKvO <= YKHO.xmax + gwAu and (LVAh >= YKHO.ymin - gwAu) and (LVAh <= YKHO.ymax + gwAu): return True return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Bre9(AU8u, fLbe):\n if AU8u[0] >= fLbe[0] and AU8u[0] < fLbe[1] and (AU8u[1] >= fLbe[2]) and (AU8u[1] < fLbe[3]):\n return True\n else:\n return False", "def lyjE(YKHO, AU8u):\n return YKHO.upperleft[0] <= AU8u[0] <= YKHO.upperright[0] and YKHO.upperleft[1] <= AU8u[1] <= YKHO.bottomlef...
[ "0.84268963", "0.82822615", "0.82822615", "0.80607045", "0.80080736", "0.79913193", "0.79300755", "0.79184914", "0.790464", "0.78905946", "0.78905946", "0.78729934", "0.7825603", "0.7789861", "0.77777475", "0.7722789", "0.7714577", "0.77041644", "0.76953435", "0.7682446", "0....
0.79659414
6
True if x is not equal to y
def d_5N(WKvO, LVAh): return not (LJE9(WKvO, LVAh) and LJE9(LVAh, WKvO))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Vdqg(YKHO, Elif):\n return YKHO.x != Elif.x or YKHO.y != Elif.y", "def Vdqg(YKHO, Elif):\n if YKHO.x != Elif.x or YKHO.y != Elif.y:\n return True\n else:\n return False\n pass", "def kUu4(yLHq, RKYb):\n return sfxH.not_equal(yLHq, RKYb)", "def Vdqg(LFlW, _tIi):\n return no...
[ "0.77232945", "0.75922924", "0.7589078", "0.7514516", "0.7490505", "0.7272956", "0.72537637", "0.72512174", "0.72395384", "0.7235421", "0.72253937", "0.72253937", "0.72160476", "0.71871483", "0.7186462", "0.71859884", "0.71859884", "0.71797", "0.7174977", "0.7163262", "0.7144...
0.7334514
5
Returns true if the object has been deleted, or if it is brand new and hasnt yet been generated.
def Bqp3(YKHO): return YKHO.air is None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def a3k1(YKHO):\n if YKHO.deleted:\n return True\n return False", "def AaTp(YKHO) -> bool:\n return qe4Y.get(YKHO, 'deleted')", "def PTpj(YKHO) -> bool:\n return False", "def a3k1(YKHO):\n return 'deleted_at' in YKHO._dict and bool(YKHO._dict['deleted_at'])", "def a3k1(YKHO):\n ret...
[ "0.78143626", "0.75699645", "0.7249292", "0.7163401", "0.71481985", "0.703286", "0.703286", "0.6986986", "0.68162465", "0.6770576", "0.67374504", "0.66846347", "0.6656306", "0.66060483", "0.65790814", "0.6549675", "0.6549675", "0.6544291", "0.6539444", "0.6522954", "0.6502663...
0.7244925
3
Get the goal state 1 list of tokens.
def umyk(YKHO): QUYH = [str(YRbF) for YRbF in range(1, YKHO.puzzle_length)] QUYH.append('0') return QUYH
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def s2mk(YKHO):\n return YKHO._tokens", "def thS1(YKHO):\n return YKHO.token_set", "def thS1(YKHO) -> x1iM[str]:\n return YKHO.tokens", "def s2mk(YKHO):\n return YKHO.__tokens", "def s2mk(YKHO):\n return YKHO._tokens", "def s2mk(YKHO):\n return YKHO._tokens", "def s2mk(YKHO):\n ret...
[ "0.7043598", "0.69490224", "0.6948903", "0.67569155", "0.6755311", "0.6755311", "0.6755311", "0.6578088", "0.65691566", "0.6439235", "0.64335614", "0.6382194", "0.6352393", "0.63347477", "0.6250971", "0.6225999", "0.622206", "0.6170228", "0.61680025", "0.61387247", "0.6131474...
0.63037497
14
Get the goal state 2 list of tokens.
def CzXB(YKHO): mltw = ['0'] * YKHO.puzzle_length ewCu = 1 for r845 in range(YKHO.puzzle_width): for YRbF in range(YKHO.number_of_rows): mltw[YRbF * YKHO.puzzle_width + r845] = str(ewCu) ewCu += 1 if ewCu == YKHO.puzzle_length: ewCu = 0 return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def thS1(YKHO) -> x1iM[str]:\n return YKHO.tokens", "def s2mk(YKHO):\n return YKHO._tokens", "def s2mk(YKHO):\n return YKHO.__tokens", "def s2mk(YKHO):\n return YKHO._tokens", "def s2mk(YKHO):\n return YKHO._tokens", "def s2mk(YKHO):\n return YKHO._tokens", "def thS1(YKHO):\n retur...
[ "0.66007215", "0.6578599", "0.6445192", "0.6396133", "0.6396133", "0.6396133", "0.6319831", "0.63155085", "0.6249407", "0.62064713", "0.6201021", "0.6070529", "0.60202503", "0.59695756", "0.59530824", "0.59368986", "0.59350616", "0.58843017", "0.58267516", "0.58257556", "0.58...
0.5832608
18
The "default" heuristic, defined by the assignment specifications. If the '0' tile is in the last index, return 0, otherwise return 1, for all states.
def OwND(YKHO, DghZ): d6pt = DghZ.index('0') if d6pt == YKHO.puzzle_length - 1: return 0 return 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def a9RP(QTBn, X3eO=None):\n return 0", "def Tgf6(QTBn, X3eO=None):\n return 0", "def a9RP(QTBn, X3eO=None):\n return 0", "def a9RP(QTBn, X3eO=None):\n return 0", "def a9RP(QTBn, X3eO=None):\n return 0", "def a9RP(QTBn, X3eO=None):\n return 0", "def a9RP(QTBn, X3eO=None):\n return ...
[ "0.6168579", "0.61673695", "0.6164148", "0.6164148", "0.6164148", "0.6164148", "0.6164148", "0.6164148", "0.6164148", "0.6164148", "0.6164148", "0.6164148", "0.6164148", "0.6164148", "0.6164148", "0.6164148", "0.6164148", "0.6164148", "0.6164148", "0.6164148", "0.6164148", ...
0.70699334
0
Sets the display_name of this UpsertLegalEntityRequest.
def qQNS(YKHO, qQNS): if qQNS is None: raise ValueError('Invalid value for `display_name`, must not be `None`') if qQNS is not None and len(qQNS) > 512: raise ValueError('Invalid value for `display_name`, length must be less than or equal to `512`') if qQNS is not None and len(qQNS) < 1: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def HJeF(YKHO, qQNS):\n YKHO._call('set_display_name', display_name=qQNS)", "def qQNS(YKHO, qQNS):\n YKHO._display_name = qQNS", "def qQNS(YKHO, qQNS):\n YKHO._display_name = qQNS", "def qQNS(YKHO, qQNS):\n YKHO._display_name = qQNS", "def qQNS(YKHO, qQNS):\n YKHO._display_name = qQNS", "d...
[ "0.69833905", "0.697926", "0.697926", "0.697926", "0.697926", "0.697926", "0.697926", "0.69392663", "0.6848441", "0.6848441", "0.6848441", "0.6848441", "0.6848441", "0.6848441", "0.6551265", "0.5899759", "0.587173", "0.58632195", "0.5842585", "0.57741594", "0.57472414", "0....
0.57641935
20
Returns true if both objects are equal
def xa14(YKHO, Elif): if not isinstance(Elif, ZJyO): 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.8457167", "0.8393036", "0.81455255", "0.8139734", "0.81333447", "0.8094964", "0.8093362", "0.8093362", "0.8093362", "0.80863476", "0.80863476", "0.8077286", "0.8077286", "0.806682" ]
0.0
-1
Return the mantissa and exponent of x as the pair (m, e).
def mKpF(WKvO): return (0.0, 0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kHJE(mLGw):\n try:\n w520 = epAf.floor(epAf.log10(abs(mLGw)))\n except ValueError:\n return (0, 0)\n vJbO = mLGw / 10 ** w520\n return (vJbO, int(w520))", "def RCDy(BWXx, y2Q4=y2Q4, ALsh=ALsh):\n YHkq, Efia = epAf.frexp(BWXx)\n if YHkq >= 0:\n Zihr = 0\n else:\n ...
[ "0.62576574", "0.59120786", "0.5799326", "0.5773877", "0.5749223", "0.57331926", "0.5609811", "0.55997044", "0.5560775", "0.55223507", "0.54639906", "0.53929675", "0.5374162", "0.530014", "0.530014", "0.5285618", "0.5237823", "0.5233033", "0.52218395", "0.5199668", "0.5194057...
0.53403705
13
Return the natural logarithm of the absolute value of the Gamma function at x.
def lMia(WKvO): return 0.0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KMvS(WKvO):\n return 0.0", "def vzar(SLsv, ITS7):\n kb1J = oyIN.clip(oyIN.log(max(SLsv[0], 0) / (SLsv[-1] + 1e-06)) / ITS7[-1], 0.001, 1000.0)\n return kb1J", "def KMvS(WKvO):\n dqC3 = ((WKvO + 0.055) / 1.055) ** 2.4 if WKvO > 0.04045 else WKvO / 12.92\n return dqC3", "def aIdf(WKvO, Cwt5,...
[ "0.7630428", "0.73520887", "0.7133683", "0.7055506", "0.70000726", "0.69280255", "0.69168675", "0.68913037", "0.6857785", "0.68464714", "0.6797368", "0.6790346", "0.6765616", "0.6745875", "0.67363745", "0.6714679", "0.6710858", "0.67030716", "0.66985625", "0.66793585", "0.667...
0.7845373
0
Get the length of the object wrapped by this partition.
def u54L(YKHO, KbSQ=True): if YKHO._length_cache is None: YKHO._length_cache = YKHO.apply(len)._data if isinstance(YKHO._length_cache, D1Oj) and KbSQ: YKHO._length_cache = Ut9S.materialize(YKHO._length_cache) return YKHO._length_cache
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def szAg(YKHO):\n if YKHO.length is None:\n YKHO.length = 0\n for bGrB in YKHO:\n YKHO.length += 1\n return YKHO.length", "def szAg(YKHO):\n if YKHO.length is None:\n YKHO.length = 0\n for bGrB in YKHO:\n YKHO.length += 1\n return YKHO.length", "def...
[ "0.75699544", "0.75699544", "0.75699544", "0.7559258", "0.7559258", "0.7527028", "0.7527028", "0.75111943", "0.750711", "0.74776655", "0.74681664", "0.7467868", "0.74654704", "0.7450176", "0.7449474", "0.74455565", "0.74455565", "0.7438276", "0.7438276", "0.74373716", "0.7431...
0.0
-1
Returns the field type that would likely be associated with each MongoEngine type.
def xPKf(Emd4, eHNT, WmM4=kJnf.CharField): Aofo = WmM4 if isinstance(eHNT, (gBn6.ComplexDateTimeField, gBn6.DateTimeField)): Aofo = kJnf.DateTimeField elif isinstance(eHNT, gBn6.BooleanField): Aofo = kJnf.BooleanField elif isinstance(eHNT, gBn6.FloatField): Aofo = kJnf.FloatField...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vF49(mWFP):\n if mWFP not in coEw:\n coEw[mWFP] = J2us.fields_get([mWFP], attributes=['type'])[mWFP]['type']\n return coEw.get(mWFP)", "def type(YKHO):\n return YKHO._field.type", "def ExPX(YKHO, vF49: Union[Type, str], Rr59: str) -> str:\n try:\n ksf8 = xnsO[vF49]\n except Key...
[ "0.7780395", "0.7389808", "0.7369339", "0.71276194", "0.70825595", "0.70779616", "0.69403815", "0.692038", "0.68395346", "0.67952377", "0.6672835", "0.6656459", "0.6592109", "0.6558388", "0.64808756", "0.6448031", "0.6416925", "0.64007765", "0.6383194", "0.6327399", "0.632739...
0.0
-1
Construct a PATCH request.
def hTyB(YKHO, pmON, nPrm=None, m5r4=x0hE.MULTIPART_CONTENT, **dDGN): nPrm = nPrm or {} GpkN = YKHO._encode_data(nPrm, m5r4) U5Jc = KVWQ.urlparse(pmON) QePW = {'CONTENT_LENGTH': len(GpkN), 'CONTENT_TYPE': m5r4, 'PATH_INFO': YKHO._get_path(U5Jc), 'QUERY_STRING': U5Jc[4], 'REQUEST_METHOD': 'PATCH', 'wsgi....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def irEl(YKHO, bD7m='', nPrm='', NArs={}, MOPg={}):\n return YKHO.httpRequest('PATCH', bD7m, nPrm, NArs, MOPg)", "def Po4F(YKHO, *qIxc, **B2fa):\n YKHO.request('patch', *qIxc, **B2fa)", "def Po4F(YKHO, YEnM):\n YKHO.require_item()\n QePW = Xqgu.Request('PATCH', YKHO.get_url(), YKHO.wrap_object(YEnM...
[ "0.6829371", "0.66681767", "0.66297865", "0.6587338", "0.6578215", "0.6562824", "0.65524215", "0.65524215", "0.65524215", "0.65524215", "0.65524215", "0.65524215", "0.65524215", "0.65524215", "0.65524215", "0.65524215", "0.65524215", "0.65524215", "0.65524215", "0.65524215", ...
0.74148107
0
Send a resource to the server using PATCH.
def jbwd(YKHO, pmON, nPrm=None, m5r4=x0hE.MULTIPART_CONTENT, NTN7=False, **dDGN): nPrm = nPrm or {} geh0 = super(x0hE.Client, YKHO).patch(pmON, data=nPrm, content_type=m5r4, **dDGN) if NTN7: geh0 = YKHO._handle_redirects(geh0, **dDGN) return geh0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Po4F(YKHO, Eorv, nPrm, pan_=None, b7IC='patch', **B2fa):\n return YKHO._modify_resource(Eorv, nPrm, pan_, b7IC, **B2fa)", "def Po4F(YKHO, *qIxc, **B2fa):\n YKHO.request('patch', *qIxc, **B2fa)", "def Po4F(Eorv, nPrm, **B2fa):\n _hkX = G4JS.patch(ZUIQ(Eorv, 'PATCH'), params=Ek6W(B2fa), data=qQXR.du...
[ "0.7256845", "0.72186434", "0.7136954", "0.6969061", "0.69669735", "0.6965865", "0.6957133", "0.6957133", "0.6957133", "0.69547486", "0.6877082", "0.68528956", "0.67895454", "0.67834586", "0.67329186", "0.67229724", "0.6714738", "0.6707765", "0.66935694", "0.667907", "0.66635...
0.65930605
22
Testing the injected variable representing the script.
def V144(YKHO): GPtr = c6i1(script='echo "PIPELINE_BASH_FILE=$PIPELINE_BASH_FILE"', model={}, env={}) zGKt = pa4n.creator({}, GPtr) hlel = [zFiD for zFiD in zGKt.process() if zFiD.lower().find('pipeline') >= 0] tDkU(len(hlel), ZWQj(1)) tDkU(hlel[0], Fv4C('PIPELINE_BASH_FILE=/root/scripts/pipeline-sc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MKnz(YKHO):\n B6sC = 'var %s = {foo: \"foo\"};' % J5Zp\n BfDw.run_script(B6sC)\n YKHO.assertEqual('foo', BfDw.run_script('%s.foo' % J5Zp))\n YKHO.assertEqual('true', BfDw.run_script('delete %s.foo' % J5Zp))", "def lbkK(YKHO):\n pass", "def BbtN(YKHO):\n YKHO._api.SetVariable('debug_file',...
[ "0.70464504", "0.65943426", "0.63664705", "0.62621444", "0.61888707", "0.61551434", "0.61534333", "0.6092367", "0.60421234", "0.60243803", "0.5981728", "0.5969614", "0.59538865", "0.59364724", "0.58996147", "0.5897441", "0.58768094", "0.586177", "0.5849991", "0.58340067", "0....
0.0
-1
Returns the name of the stock icon to use for the display. This assumes that this icon has already been registered as a stock icon.
def eLAH(YKHO): return 'geo-show-family'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _G4g(YKHO):\n if YKHO._name in [iE1B, m_GJ]:\n return DLSO\n else:\n return Pm5V", "def YHjh(YKHO):\n return ''", "def HheZ(YKHO):\n return 'platform_%s.gif' % ZbWC.sub('\\\\W', '_', YKHO.context.getPlatform()).lower()", "def uDDz(YKHO):\n return 'gramps-notes'", "def _G4g(...
[ "0.7458557", "0.72857326", "0.7218307", "0.71459764", "0.704603", "0.68933964", "0.6886491", "0.68848765", "0.6871405", "0.6871405", "0.6871405", "0.68594235", "0.68553084", "0.68553084", "0.6827701", "0.6811776", "0.6811776", "0.6811776", "0.6811776", "0.6811776", "0.6811776...
0.6528313
50
Indicates the navigation type. Navigation type can be the string name of any of the primary objects.
def uh97(YKHO): return 'Family'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LGkp(YKHO, nPrm):\n if nPrm.get('jsonmodel_type') == 'archival_object':\n if YKHO.aspace_helper.has_children(nPrm['uri']):\n return 'archival_object_collection'\n return nPrm.get('jsonmodel_type')", "def vcaS(YKHO) -> str:\n return qe4Y.get(YKHO, 'object_type')", "def vcaS(YKHO) ...
[ "0.6239871", "0.5907221", "0.5907221", "0.5907221", "0.5907221", "0.5907221", "0.5907221", "0.5907221", "0.5907221", "0.5907221", "0.5907221", "0.5907221", "0.5907221", "0.5907221", "0.5907221", "0.5907221", "0.5907221", "0.5878207", "0.5878207", "0.58725524", "0.5826654", ...
0.67244804
0
Returns the name of the model
def zAg0(YKHO): return YKHO.__name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ZGE9(YKHO) -> str:\n return YKHO._model_name", "def mWFP(YKHO) -> str:\n return YKHO.model.__name__", "def TbE8(YKHO) -> str:\n raise NotImplementedError", "def mWFP(YKHO) -> str:\n return YKHO._model.name", "def TbE8(YKHO) -> str:\n return YKHO._get_string(wLjv.Prop_RenderModelName_Stri...
[ "0.9076556", "0.8915749", "0.8857596", "0.8836577", "0.8675336", "0.8594061", "0.8528894", "0.8482568", "0.8470602", "0.83704686", "0.834358", "0.8303561", "0.8163223", "0.809987", "0.8073449", "0.80385673", "0.79918647", "0.78837323", "0.7801244", "0.7796645", "0.7771296", ...
0.0
-1
ConfigurationError exception should be raised if the option `[authz_policy] authz_file` is empty.
def zX14(YKHO): YKHO.env.config.set('authz_policy', 'authz_file', '') YKHO.assertRaises(KpxQ, YKHO.check_permission, 'WIKI_VIEW', 'änon', None, None)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wItQ(YKHO):\n YKHO.env.config.remove('authz_policy', 'authz_file')\n YKHO.assertRaises(KpxQ, YKHO.check_permission, 'WIKI_VIEW', 'änon', None, None)", "def jaL9(YKHO):\n TnRU = Hy7s.path.join(YKHO.env.path, 'some-nonexistent-file')\n YKHO.env.config.set('authz_policy', 'authz_file', TnRU)\n YK...
[ "0.7418602", "0.7259914", "0.65944797", "0.605611", "0.60378104", "0.5798308", "0.57452416", "0.5674308", "0.5660663", "0.557645", "0.55683213", "0.5517417", "0.5460611", "0.54594505", "0.5375839", "0.5356673", "0.5296177", "0.5212803", "0.51997113", "0.51782703", "0.51628655...
0.74941736
0
Returns a randomly chosen letter, with a trailing period if desired.
def RqgG(mjBf=False): sZqf = Ih2K.choice(vIwR.letters).upper() return sZqf if not mjBf else sZqf + '.'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fFlT(KoG3):\n return tuKI.choice(KoG3)", "def ORaO():\n return GLL2(char_choice=vIwR.ascii_letters)", "def ZI14():\n return Ih2K.choice(['Sr.', 'Jr.', 'II', 'III', 'IV', 'V'])", "def Q_QB():\n yvT9 = ''\n for bGrB in range(24):\n yvT9 += Acvy(C1SZ)\n return yvT9", "def wAgY(KoG...
[ "0.7242595", "0.7203279", "0.70668197", "0.7017358", "0.70149595", "0.68849945", "0.68665934", "0.68519855", "0.6819053", "0.6801439", "0.6744729", "0.67267376", "0.67146254", "0.67133594", "0.66855985", "0.6674079", "0.66668004", "0.66507673", "0.66083926", "0.6608264", "0.6...
0.8360207
0
Returns a randomly chosen female middle name.
def V1c9(): return CYhc()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mWFP():\n return Ih2K.choice([XWsy(), CYhc()])", "def elvO():\n return X_Jv(Z6Vd, 'Jane')", "def hoVi():\n return fF1T.choice(ZWCE.woman)", "def df82():\n return XWsy()", "def sd_a():\n return X_Jv(ztqh, 'John')", "def _ivo():\n if r3Cp(8):\n return Eahl()\n elif r3Cp(3):\...
[ "0.8246716", "0.81908685", "0.81641996", "0.8094339", "0.78628135", "0.7780701", "0.7705909", "0.7689909", "0.742177", "0.73689026", "0.73582405", "0.73445404", "0.7316687", "0.72910786", "0.7288012", "0.7259131", "0.72454214", "0.7171479", "0.71610135", "0.7115856", "0.70945...
0.7382717
9
Returns a randomly chosen male middle name.
def aWve(): return XWsy()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def df82():\n return XWsy()", "def mWFP():\n return Ih2K.choice([XWsy(), CYhc()])", "def sd_a():\n return X_Jv(ztqh, 'John')", "def HSJA():\n return fF1T.choice(ZWCE.man)", "def elvO():\n return X_Jv(Z6Vd, 'Jane')", "def _ivo():\n if r3Cp(8):\n return Eahl()\n elif r3Cp(3):\n ...
[ "0.8367928", "0.82412595", "0.810842", "0.80068403", "0.7857153", "0.77948576", "0.77776617", "0.7507554", "0.7503658", "0.7451521", "0.7386139", "0.7262262", "0.72318465", "0.7152687", "0.71390104", "0.7113378", "0.7105316", "0.7094616", "0.7092547", "0.70311207", "0.700438"...
0.748925
9
Returns a randomly chosen surname.
def gqe6(): N1p7.execute('SELECT * FROM surname order by RANDOM() limit 1') return N1p7.fetchone()[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zp3f():\n return fF1T.choice(ZWCE.lastname)", "def Eyo5():\n mWFP = NCls.get_database(tA6G).random_pop()\n if not mWFP:\n return NMEE()\n return '%s%s' % (tuKI.choice(('Mc', 'Mac')), mWFP)", "def WZwX():\n if r3Cp(3):\n return aUyX()\n elif KIk2():\n return Eyo5()\n ...
[ "0.7717693", "0.7543715", "0.74960935", "0.7489763", "0.7383605", "0.7324503", "0.73083574", "0.7167987", "0.71526", "0.7129584", "0.71090245", "0.71090245", "0.7105901", "0.7105901", "0.70044535", "0.6967047", "0.6962742", "0.6957423", "0.6872858", "0.686386", "0.6832383", ...
0.79233277
0
Returns name, middile initial and last name.
def uG31(zCU8=False): return '{} {} {}'.format(XWsy(), RqgG(zCU8), gqe6())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kStw(YKHO):\n return u'{} {}'.format(YKHO.pref_first_name(), YKHO.last_name[0])", "def xpqj(YKHO):\n return YKHO.name + YKHO.last_name", "def W0tD(YKHO):\n return '%s %s' % (YKHO.first_name, YKHO.last_name)", "def dsRp(YKHO):\n zp3f = YKHO.last_name\n c9ua = YKHO.first_name\n if not (zp...
[ "0.76969755", "0.7628068", "0.758169", "0.75484985", "0.7481741", "0.7446383", "0.7410312", "0.740742", "0.7397838", "0.7363687", "0.7361114", "0.7358503", "0.73548585", "0.733484", "0.73075145", "0.7291793", "0.7277758", "0.7270159", "0.7247055", "0.7243501", "0.7232884", ...
0.0
-1
This function will pick 2 random last names and hyphenate them. ie hyphenated_last_name() = 'PerryJenkins'
def ZDLe(): return '{}-{}'.format(zp3f(), zp3f())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Ddht():\n while True:\n c9ua = zp3f()\n a5w_ = zp3f()\n if c9ua == a5w_:\n continue\n else:\n Dokz = c9ua + '-' + a5w_\n return Dokz", "def zp3f():\n return fF1T.choice(ZWCE.lastname)", "def WnCw():\n cntZ = NCls.get_database(uQ5v).rando...
[ "0.7911714", "0.764533", "0.7499593", "0.7456344", "0.74059224", "0.73304564", "0.7203291", "0.715162", "0.71177554", "0.7068802", "0.7043231", "0.69416046", "0.69146496", "0.69057375", "0.6845594", "0.6670983", "0.66605157", "0.66398156", "0.6610154", "0.6591536", "0.6579901...
0.77629393
1
Picks a random language.
def rQow(): N1p7.execute('SELECT name from languages order by RANDOM() limit 1;') return N1p7.fetchone()[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MhiV(YKHO):\n Bicb = Hy7s.curdir\n pmON = Hy7s.path.join(Bicb, 'audio')\n IbeW = Hy7s.listdir(pmON)\n r6fT = ajWY(0, len(IbeW) - 1)\n return IbeW[r6fT]", "def yvMR(YKHO) -> str:\n return YKHO.random.choice(Lgss)", "def hA4w(egmC, kxYo, Jmdb):\n assert kxYo > 0\n buqX = tuKI.randint(...
[ "0.7954805", "0.7241465", "0.70558685", "0.6806038", "0.6501575", "0.6492072", "0.6434648", "0.63885784", "0.6337799", "0.6286942", "0.62583536", "0.62357235", "0.6202648", "0.6202648", "0.6202648", "0.60617673", "0.60598576", "0.60414195", "0.60321504", "0.5994602", "0.59840...
0.7702429
1
This function will return a last name from a list. ie last_name() = 'Smith'.
def zp3f(): return gqe6()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zp3f():\n return fF1T.choice(ZWCE.lastname)", "def CCKR(Br4M, DM04):\n SSA0 = Br4M[DM04]['NAME'].split()\n return SSA0[1]", "def CCKR(YKHO) -> str:\n return YKHO.last_name", "def UYB1(YKHO):\n return '%s%s%s' % (XvqG([('', 35), ('Mc', 3), ('von ', 1)]), Acvy(YKHO.second_chunks).title(), Ac...
[ "0.7647276", "0.73629326", "0.7323391", "0.7266351", "0.71562827", "0.7058044", "0.70577586", "0.7025582", "0.70250624", "0.70250624", "0.69927615", "0.69642025", "0.6958447", "0.69292766", "0.69292766", "0.69292766", "0.69292766", "0.6851672", "0.6808927", "0.6779976", "0.67...
0.77843976
0
This function will return a random street type.
def lTCv(): N1p7.execute('SELECT * FROM street_types order by RANDOM() limit 1;') return N1p7.fetchone()[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lTCv():\n return Ih2K.choice(['Abbey', 'Acres', 'Allée', 'Alley', 'Autoroute', 'Avenue', 'Bay', 'Beach', 'Bend', 'Boulevard', 'By-pass', 'Byway', 'Campus', 'Cape', 'Carré', 'Carrefour', 'Centre', 'Cercle', 'Chase', 'Chemin', 'Circle', 'Circuit', 'Close', 'Common', 'Concession', 'Corners', 'Côte', 'Cour', 'C...
[ "0.8542503", "0.71580154", "0.71548486", "0.59842634", "0.5979136", "0.5788351", "0.5741943", "0.5722414", "0.5707577", "0.5692631", "0.567315", "0.56668156", "0.56602377", "0.5652541", "0.56311953", "0.56243646", "0.56227005", "0.5603994", "0.5564704", "0.55142057", "0.54858...
0.8298395
1
This returns a suffix from a small list.
def ZI14(): return Ih2K.choice(['Sr.', 'Jr.', 'II', 'III', 'IV', 'V'])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ZI14(aWuw, vC9B):\n if vC9B > len(aWuw):\n return aWuw\n else:\n return aWuw[-vC9B:]", "def YfZ8(yv6U):\n khYv = ''\n for LihS in yv6U:\n khYv += '_'\n if type(LihS) != str:\n LihS = str(LihS)\n khYv += LihS\n return khYv", "def XREA(YKHO, y0cW):...
[ "0.71769714", "0.7000931", "0.6599814", "0.65312815", "0.6408614", "0.6148086", "0.61447895", "0.61160254", "0.6102459", "0.6033458", "0.5982443", "0.59704953", "0.5921727", "0.5921727", "0.5911996", "0.5910776", "0.5893895", "0.588884", "0.5859104", "0.58412117", "0.58412117...
0.6454487
4
This is a convenience function for creating timestamps.
def E3oo(_Cnz=False): if not _Cnz: return ITS7.strftime('%H:%M:%S%p %D', ITS7.localtime()) else: return ITS7.strftime(_Cnz, ITS7.localtime())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def YnO1(YKHO):\n bo34.debug('Get a timestamp')\n return ITS7.mktime(qcWV.today().timetuple())", "def IJ8b():\n return F803('%Y%m%dT%H%M%S')", "def a1kK():\n return (qcWV.utcnow() - qcWV(1970, 1, 1)).total_seconds()", "def qP9Q(YKHO):\n nec5 = ITS7.strftime('%Y%m%d_%H%M%S_', ITS7.localtime())\...
[ "0.72431684", "0.7117313", "0.7071348", "0.7046661", "0.6947904", "0.69334686", "0.6820246", "0.6788962", "0.67160976", "0.67107177", "0.67087317", "0.66923654", "0.66591537", "0.66340846", "0.650617", "0.64839303", "0.64302415", "0.633329", "0.62981635", "0.62974125", "0.626...
0.5925604
43
return the first index of item in array or None if item is not found
def TrX4(qw7D, ZfUD): return Ngua(qw7D, ZfUD)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KWqh(qw7D, ZfUD):\n qJWj = oyIN.where(qw7D == ZfUD)\n if len(qJWj) == 0:\n raise ValueError('{0} not found in array'.format(ZfUD))\n return qJWj[0][0]", "def Zgjh(ezWE, wEf2):\n if wEf2 is not None:\n return XTiz.searchsorted(ezWE, wEf2)\n else:\n return wEf2", "def tGyG...
[ "0.7654498", "0.76485795", "0.73254657", "0.7152995", "0.70068246", "0.6965024", "0.6964481", "0.6916574", "0.6872765", "0.6827316", "0.67693734", "0.6750015", "0.66990155", "0.668622", "0.66723377", "0.6657315", "0.66358805", "0.66342586", "0.661365", "0.6607807", "0.6569612...
0.60730076
60
return the index of item in sorted array or None if item is not found
def jUbz(qw7D, ZfUD): return aHV3(qw7D, ZfUD)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Zgjh(ezWE, wEf2):\n if wEf2 is not None:\n return XTiz.searchsorted(ezWE, wEf2)\n else:\n return wEf2", "def tGyG(ezWE):\n for H5ew, BWXx in enumerate(ezWE):\n if BWXx == H5ew:\n return BWXx\n return -1", "def jUbz(LihS: int, ezWE: Sequence) -> h8nf[int]:\n if...
[ "0.7911487", "0.723239", "0.70944625", "0.7049101", "0.70248735", "0.70152944", "0.6976257", "0.6937132", "0.691218", "0.6905791", "0.6879843", "0.6862452", "0.68274254", "0.6823422", "0.67618924", "0.6724244", "0.66873103", "0.6676464", "0.66450155", "0.65676993", "0.6559574...
0.60009736
72
Test string representation for Project Model
def sEj8(YKHO): bNKA = k_g4.make('ona.Project', name='Project Zero') YKHO.assertEqual(str(bNKA), 'Project Zero')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sEj8(YKHO):\n bNKA = FYrf.Project.objects.create(user=nIoS(), title='Videogame Project', description='Making a triple A videogame', price=50.0)\n YKHO.assertEqual(str(bNKA), bNKA.title)", "def U6Rx(YKHO):\n with YKHO.app.app_context():\n XP5J = bNKA(slug='project', name='Project', save=True)\...
[ "0.7752334", "0.7213779", "0.7055024", "0.7032889", "0.6979861", "0.6921673", "0.68282384", "0.6672846", "0.6638818", "0.66314745", "0.6605419", "0.6568851", "0.6551951", "0.6549202", "0.65460676", "0.65446436", "0.6530631", "0.65277904", "0.65263903", "0.6474234", "0.6466452...
0.8188227
0
List of tokens created from processed text.
def s2mk(YKHO): return YKHO.__tokens
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NInT(YKHO, l5Ny: str) -> x1iM[str]:\n s2mk = []\n for eOtH in ZbWC.findall(YKHO._pat, l5Ny):\n s2mk.extend((xAmD for xAmD in YKHO._bpe(eOtH).split(' ')))\n return s2mk", "def CJYp(l5Ny):\n return l5Ny.split()", "def thS1(YKHO, l5Ny):\n return tuple(YKHO._compiled_pattern.findall(l5Ny)...
[ "0.8176478", "0.80443", "0.79711527", "0.79468435", "0.7910405", "0.7893175", "0.78621083", "0.7778379", "0.7776586", "0.7624961", "0.7614397", "0.75975686", "0.75880516", "0.7578978", "0.75592965", "0.75521165", "0.7506349", "0.74804676", "0.7471548", "0.74435496", "0.743700...
0.7191767
34
Initialize a matmul layer that has 'num_nodes' nodes
def FIMM(YKHO, mWFP: str, EKkU: int, fhcK: List[Layer], V2dA: Optional[List[Layer]]=None, wiAm: int=G9jH.ERROR): super().__init__(name=mWFP, num_nodes=EKkU, layers=fhcK, posteriors=None, log_level=wiAm)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO, A7Zt, rDAo, YoQM, ktWS, oug5=True, X6rE=None):\n super(UXq_, YKHO).__init__()\n N_7k = len(rDAo)\n if N_7k == 0:\n YKHO.net = ht2j.nn.Linear(A7Zt, ktWS, bias=oug5)\n else:\n fhcK = []\n for exwG in range(N_7k):\n if exwG == 0:\n fhcK += [ht2...
[ "0.666574", "0.6395804", "0.623192", "0.61707485", "0.61090165", "0.60877216", "0.6057512", "0.58617854", "0.5851198", "0.58427095", "0.5817765", "0.581776", "0.5814572", "0.5804891", "0.5803346", "0.5772056", "0.5756266", "0.57516515", "0.574608", "0.57450485", "0.5744601", ...
0.0
-1
labeler function that returns meaningless labels. Convenient for pretraining, where the labels are totally unused
def pbcy(): def BuwZ(nPrm): return {**nPrm, 'outcome': ZylS.zeros([1]), 'y0': ZylS.zeros([1]), 'y1': ZylS.zeros([1]), 'treatment': ZylS.zeros([1])} return BuwZ
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DRwb(YKHO):\n\n class L2UTransformer(object):\n\n def SZFh(YKHO, LVAh):\n return oyIN.array([O5iP.upper() for O5iP in LVAh])\n Efo2 = njzQ(DZBc(), encoder=CB62())\n with trZe.warns(QMfB, match='could not determine class labels'):\n assert Efo2._labels() is None", "def Te1x(Y...
[ "0.7146166", "0.6918323", "0.68128586", "0.66789925", "0.667188", "0.66469276", "0.66469276", "0.66469276", "0.65993804", "0.658801", "0.65863127", "0.6551131", "0.6524671", "0.6508366", "0.64795214", "0.6417138", "0.6417138", "0.6417138", "0.6417138", "0.6417138", "0.6417138...
0.7491019
0
Return file object based on file_name
def ANzL(YKHO, gIsw): Uqbu = YKHO.files.filter_by(file_name=gIsw) return Uqbu[0] if 0 < len(Uqbu) else None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SJOK(YKHO, Ux0P):\n return fnT7.from_name(YKHO, Ux0P)", "def qwwZ(iwdW):\n bGrB, Fst3 = Hy7s.path.splitext(iwdW)\n if Fst3.lower() == '.spe':\n return gpan.SpeFile(iwdW)\n elif Fst3.lower() == '.spc':\n return gpan.SpcFile(iwdW)\n elif Fst3.lower() == '.cnf':\n return gpan...
[ "0.7975323", "0.7854524", "0.7580964", "0.7469616", "0.7382322", "0.70451075", "0.69777906", "0.6952943", "0.6951699", "0.69331473", "0.6800219", "0.6672949", "0.6638296", "0.6637399", "0.66129553", "0.6579716", "0.65158707", "0.64669615", "0.6409229", "0.63866496", "0.637743...
0.731095
5
Returns a list of tasks that have no predecessors
def W6VH(YKHO) -> OKZr: return OKZr([D5gV for D5gV in YKHO._tasks if not len(D5gV.predecessors)])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SoZd(YKHO):\n SoZd = []\n for p4_k in YKHO.inst.uses():\n if p4_k.op_name != 'OpPhi':\n SoZd.append(p4_k.basic_block)\n return SoZd", "def jcKt(YKHO, nJxI: Task) -> None:\n for D5gV in YKHO._tasks:\n if nJxI.is_predecessor_of(D5gV):\n D5gV.remove_predecessor(nJ...
[ "0.6753965", "0.66662055", "0.6440192", "0.6151322", "0.61292696", "0.60731226", "0.6049877", "0.60363233", "0.5946373", "0.5945425", "0.5939654", "0.59316474", "0.5898738", "0.5895866", "0.5883427", "0.58815837", "0.58763605", "0.5861356", "0.58612484", "0.5840523", "0.58227...
0.8865706
0
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`.
def LwSz(Bcwd, Crrw, NkkI=False, leAC='Confusion matrix', iMGt=QrM1.cm.Blues): QrM1.imshow(Bcwd, interpolation='nearest', cmap=iMGt) QrM1.title(leAC) QrM1.colorbar() wIWT = oyIN.arange(len(Crrw)) QrM1.xticks(wIWT, Crrw, rotation=45) QrM1.yticks(wIWT, Crrw) if NkkI: print('Normalized ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LwSz(Bcwd, KndY=[0, 1], NkkI=False, leAC='Confusion matrix', RMso=False):\n if NkkI:\n Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]\n print('Normalized confusion matrix')\n else:\n print('Confusion matrix, without normalization')\n if RMso:\n print(Bcwd)"...
[ "0.81920755", "0.8093736", "0.8028212", "0.8017333", "0.79923165", "0.7989431", "0.79789335", "0.7974398", "0.795948", "0.79555666", "0.7935652", "0.7932704", "0.7932632", "0.7929465", "0.7924336", "0.7922666", "0.79221356", "0.7921299", "0.79209703", "0.7920307", "0.7916008"...
0.0
-1
Function that returns all possible combinations of a given length, considering an excluded list of elements.
def EX9I(YKHO, yv6U, DNHh, u54L): for XuXy in Hs6x.combinations([tTpl for tTpl in yv6U if tTpl not in DNHh], u54L): yield list(XuXy)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Mvog(nPrm, Ea7H):\n return [Z9rn for Z9rn in Hs6x.combinations(nPrm, Ea7H)]", "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 - 1...
[ "0.7378369", "0.69922686", "0.6610251", "0.65539074", "0.6436269", "0.6396576", "0.6384093", "0.6333533", "0.63323766", "0.62846476", "0.6254326", "0.6236639", "0.6090494", "0.6070298", "0.60493356", "0.6040016", "0.60080713", "0.5994642", "0.59879476", "0.59775025", "0.59509...
0.6470623
4
Returns a string to be used as the name for an S3 bucket. As of this writing (20200512), directly referring to bucket ARNs and names in stacks causes circular dependencies between common and the bucketowning stack. Since we calculate the bucket name during the synthesis phase, values such as self.region and self.accoun...
def h47C(YKHO, TZ9E) -> str: zn0c = YKHO.node.try_get_context('region') ZrNc = YKHO.node.try_get_context('account') m57A = f'{zn0c}-{ZrNc}-{TZ9E}' KHO8 = HBct.md5(m57A.encode()).hexdigest() l7rj = f'integ-test-{YKHO.id}-{TZ9E}-{KHO8}' return l7rj
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def l7rj(YKHO) -> str:\n ...", "def l7rj(YKHO) -> str:\n return HEOD.get(YKHO, 'bucketName')", "def l7rj(YKHO) -> str:\n return HEOD.get(YKHO, 'bucketName')", "def l7rj(YKHO) -> str:\n return qe4Y.get(YKHO, 'bucket_name')", "def l7rj(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'bucket_...
[ "0.79094636", "0.7882844", "0.7882844", "0.7852468", "0.7622656", "0.7622656", "0.7622656", "0.7622656", "0.7622656", "0.7613365", "0.75062156", "0.748272", "0.748272", "0.748272", "0.748272", "0.748272", "0.748272", "0.748272", "0.748272", "0.748272", "0.748272", "0.728383...
0.76785344
4
loads the list of known datasets from a given folder
def pOsd(PSbX=None): D3Zs = ['raw_clean_32', 'Distress2010', 'NormativeDB', 'Tinnitus_EEG'] if PSbX is None: pU0Z = D3Zs else: pU0Z = [] with Hy7s.scandir(PSbX) as WhY1: for bTKY in WhY1: if not bTKY.name.startswith('.') and (not bTKY.is_file()) and (bTKY....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xuwW(pmON: github_api.GithubPath) -> x1iM[str]:\n if not pmON.exists():\n raise FileNotFoundError(f'Could not find datasets at {pmON}')\n return sorted([oxOY for oxOY in pmON.iterdir() if JxGx(oxOY)])", "def jogE(YKHO, TLI7, pU0Z):\n RRlC = YKHO.loadDirectory(TLI7)\n Aofo = []\n for j3a...
[ "0.71243644", "0.70869225", "0.70654714", "0.70300823", "0.7016533", "0.69334185", "0.69263065", "0.6921224", "0.6906948", "0.688317", "0.68765426", "0.68543136", "0.6833656", "0.6785148", "0.67476135", "0.66857153", "0.6682972", "0.66733414", "0.6586321", "0.65761214", "0.65...
0.65977615
18
Sets the id of this EventType.
def id(YKHO, id): if YKHO.local_vars_configuration.client_side_validation and id is None: raise ValueError('Invalid value for `id`, must not be `None`') YKHO._id = id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def V_9M(YKHO, id):\n YKHO.__id = id", "def V_9M(YKHO, hbFX):\n YKHO.id_ = hbFX", "def W2tI(YKHO, *qIxc):\n return _VfD.Event_setId(YKHO, *qIxc)", "def V_9M(YKHO, id):\n YKHO.data['id'] = id", "def psjw(YKHO, id):\n YKHO.id = int(id)", "def V_9M(YKHO, id):\n if id is not None and (not i...
[ "0.7413128", "0.73614675", "0.72248137", "0.72199553", "0.7205373", "0.71232045", "0.70914483", "0.70914483", "0.70914483", "0.70914483", "0.70914483", "0.707845", "0.707845", "0.707845", "0.707845", "0.707845", "0.707845", "0.707845", "0.707845", "0.707845", "0.707845", "0...
0.0
-1
Sets the created of this EventType.
def _EYN(YKHO, _EYN): if YKHO.local_vars_configuration.client_side_validation and _EYN is None: raise ValueError('Invalid value for `created`, must not be `None`') YKHO._created = _EYN
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _EYN(YKHO, _EYN):\n if _EYN is None:\n raise ValueError('Invalid value for `created`, must not be `None`')\n YKHO._created = _EYN", "def _EYN(YKHO, _EYN):\n YKHO._created = _EYN", "def _EYN(YKHO, _EYN):\n YKHO._created = _EYN", "def _EYN(YKHO, _EYN):\n YKHO._created = _EYN", "def ...
[ "0.78300685", "0.780391", "0.780391", "0.780391", "0.780391", "0.780391", "0.780391", "0.780391", "0.780391", "0.780391", "0.780391", "0.780391", "0.780391", "0.780391", "0.7176892", "0.7176892", "0.7176892", "0.7176892", "0.7176892", "0.7176892", "0.7176892", "0.7095706", ...
0.686153
22
Sets the name of this EventType.
def mWFP(YKHO, mWFP): if YKHO.local_vars_configuration.client_side_validation and mWFP is None: raise ValueError('Invalid value for `name`, must not be `None`') if YKHO.local_vars_configuration.client_side_validation and mWFP is not None and (len(mWFP) < 1): raise ValueError('Invalid value for `...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oSgC(YKHO, *qIxc):\n return _VfD.Event_setName(YKHO, *qIxc)", "def jkf2(YKHO, jkf2):\n YKHO['event_name'] = jkf2", "def jkf2(YKHO, jkf2):\n YKHO._event_name = jkf2", "def WZrJ(YKHO, mWFP):\n YKHO._name = mWFP", "def WZrJ(YKHO, mWFP):\n YKHO.__name = mWFP", "def WZrJ(YKHO, mWFP):\n Y...
[ "0.79142314", "0.7751995", "0.7743061", "0.752352", "0.74894536", "0.74894536", "0.7464451", "0.7464426", "0.7440115", "0.7440115", "0.7440115", "0.7440115", "0.7440115", "0.74198544", "0.73965484", "0.7367737", "0.7362727", "0.7303555", "0.72325194", "0.72325194", "0.7232519...
0.0
-1
Sets the mime_type of this EventType.
def pKmM(YKHO, pKmM): if YKHO.local_vars_configuration.client_side_validation and pKmM is None: raise ValueError('Invalid value for `mime_type`, must not be `None`') BbPm = ['application/json', 'application/x-www-form-urlencoded', 'none'] if YKHO.local_vars_configuration.client_side_validation and p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pKmM(YKHO, pKmM):\n YKHO._mime_type = pKmM", "def djnB(YKHO, djnB):\n YKHO._attachment_mime_type = djnB", "def YapN(YKHO, YapN):\n YKHO._blob_mime_type = YapN", "def S8Fn(YKHO, S8Fn):\n YKHO._attachment_file_type = S8Fn", "def q5sG(YKHO, q5sG):\n BbPm = [yt98, yt98, yt98]\n YKHO._file...
[ "0.8534817", "0.74580055", "0.72189665", "0.65762305", "0.6302185", "0.6280117", "0.6280117", "0.62095344", "0.61835724", "0.61371624", "0.6053879", "0.59578204", "0.5828971", "0.5823409", "0.5786674", "0.57774925", "0.57571876", "0.5734133", "0.57257795", "0.56385547", "0.56...
0.740594
2
Returns true if both objects are equal
def xa14(YKHO, Elif): if not isinstance(Elif, G6ow): return False return YKHO.to_dict() == Elif.to_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): if not isinstance(Elif, G6ow): return True return YKHO.to_dict() != Elif.to_dict()
{ "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.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", ...
0.0
-1
Conv2D wrapper, with bias add and ReLu activation function
def b_zE(YKHO, WKvO, XcU5, Fg_i, FEri=1): Zxma = ZylS.nn.conv2d(WKvO, XcU5, strides=[1, FEri, FEri, 1], padding=q6mb) Zxma = ZylS.nn.bias_add(Zxma, Fg_i) Zxma = ZylS.nn.relu(Zxma) return Zxma
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cxer(g4y1, KUnM, WZcn, FEri, pDev):\n UJgg = 1 if nMvt.image_data_format() == 'channels_first' else -1\n WKvO = yHwh(KUnM, WZcn, padding='same', strides=FEri)(g4y1)\n WKvO = GVKG(axis=UJgg)(WKvO)\n return atlM(WKvO, pDev)", "def xLcY(YKHO, WKvO, yzQ0, Fg_i, _0fC=1, mWFP=None):\n WKvO = ZylS.nn...
[ "0.69144255", "0.6869261", "0.68603045", "0.6771322", "0.6764705", "0.6763808", "0.67508733", "0.6720809", "0.6677142", "0.6677142", "0.6618039", "0.65978426", "0.65954334", "0.65928644", "0.6556468", "0.65507543", "0.6537399", "0.6536172", "0.6497817", "0.64966166", "0.64893...
0.68860275
1
Get label to mat index mappings.
def vZe5(Crrw): return {UXqs: YRbF for YRbF, UXqs in enumerate(Crrw)}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Iotw(YKHO, M9Mk):\n return YKHO.indices_of('label', M9Mk)", "def FNd5(Crrw):\n ecF5 = dict()\n for YRbF, Ty9i in enumerate(oyIN.ravel(Crrw.data)):\n if Ty9i in ecF5.keys():\n ecF5.get(Ty9i).append(YRbF)\n else:\n ecF5[Ty9i] = [YRbF]\n return ecF5", "def Ux5p(...
[ "0.7051809", "0.6984512", "0.6893664", "0.6670937", "0.6664595", "0.6619766", "0.65581757", "0.6449272", "0.64057404", "0.63551646", "0.63132936", "0.62389386", "0.61545753", "0.61531657", "0.6113825", "0.61015135", "0.6078372", "0.6028266", "0.60125124", "0.59842646", "0.598...
0.7629585
0
Returns true if the string is a number or False otherwise
def ye72(FGW3): if type(FGW3) == type(1) or type(FGW3) == type(0.1) or type(FGW3) == type('') or type(u''): try: float(FGW3) return True except ValueError: return False except TypeError: return False else: return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ye72(vIwR):\n try:\n float(vIwR)\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.8854936", "0.879279", "0.86789924", "0.86555886", "0.8628976", "0.8625355", "0.8611347", "0.8611347", "0.8611347", "0.86027825", "0.8589621", "0.8550259", "0.8516888", "0.8478422", "0.84673643", "0.8412445", "0.8403247", "0.83807015", "0.8278528", "0.8272441", "0.8247956",...
0.7423526
69
Returns onehotencoded array of size N x C
def o83l(xJvR): xJvR = xJvR.squeeze() ik2X = len(oyIN.unique(xJvR)) Ylbp = oyIN.eye(ik2X)[xJvR.astype(int)] return Ylbp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KLLm(fuBA, dtin):\n qRSc = oyIN.zeros((fuBA.size, dtin))\n qRSc[oyIN.arange(fuBA.size), fuBA] = 1\n return qRSc.T", "def zGX0(WKvO, TFPw):\n return oyIN.eye(TFPw)[WKvO]", "def KLLm(qw7D, ywwl):\n qw7D = qw7D.astype(int)\n assert XTiz.max(qw7D) < ywwl\n assert XTiz.min(qw7D) >= 0\n K...
[ "0.84308505", "0.81625235", "0.8082208", "0.7946731", "0.7934992", "0.78157073", "0.7799698", "0.7775537", "0.77689964", "0.7746849", "0.7740138", "0.7724413", "0.7715345", "0.7706223", "0.76916957", "0.7666756", "0.76498514", "0.76338655", "0.7590643", "0.7578633", "0.756876...
0.6928322
93
List of ints specifying indices for binary features.
def oNVa(YKHO): D5nC = BfDw.get_binary_indices(YKHO.data_x, YKHO.non_num_idx) YKHO.binary_idx_list = oyIN.array(D5nC) YKHO.non_num_idx = oyIN.setdiff1d(YKHO.non_num_idx, YKHO.binary_idx_list)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oSaS(YKHO):\n ruSK = YKHO.load_mask()\n return [YRbF for YRbF, Ty9i in enumerate(ruSK) if Ty9i == 1]", "def _0VL(YKHO):\n if YKHO.num == 0:\n return []\n UOVU = []\n for YRbF in [0, 1, 2, 3, 4, 5, 6, 7]:\n rdlD = YKHO.num >> wgwu[YRbF] & F0Zk\n _0VL = yoDX[rdlD]\n f...
[ "0.7462112", "0.7373834", "0.7083068", "0.7028624", "0.7017072", "0.69672614", "0.6901751", "0.6733047", "0.6641008", "0.6533554", "0.6519904", "0.6491599", "0.6467682", "0.6442618", "0.642368", "0.6416651", "0.63947743", "0.6393453", "0.63868165", "0.63597393", "0.6357831", ...
0.75452685
0
List of ints specifying indices for numerical features.
def CEFq(YKHO): t4xi = len(YKHO.numerical_idx) if YKHO.binary_idx_list is not None: t4xi += len(YKHO.binary_idx_list) YKHO.len_numerical_feat = t4xi
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oSaS(YKHO):\n ruSK = YKHO.load_mask()\n return [YRbF for YRbF, Ty9i in enumerate(ruSK) if Ty9i == 1]", "def xvIg(YKHO):\n return YKHO._indices", "def BJma(y5hN):\n return oyIN.array(list(y5hN.values())).flatten().tolist()", "def W4FM(YKHO):\n _0VL = []\n for d6pt, ZfUD in enumerate(YKHO...
[ "0.7125732", "0.67494166", "0.6748896", "0.6708266", "0.6672246", "0.6666634", "0.66496754", "0.66132057", "0.66026926", "0.6560567", "0.6514331", "0.6504886", "0.6503922", "0.64621216", "0.64582556", "0.6449065", "0.6444436", "0.644208", "0.6428834", "0.6426765", "0.6389559"...
0.0
-1
Drop columns in array if there is only a single unique element in it plus np.nan.
def OdnG(YKHO, jQ3Z): Rb9k = jQ3Z.copy() F7gU = [] for YRbF in Rb9k.columns: VpG9 = Rb9k[YRbF].dropna().unique().size if VpG9 > 1: F7gU.append(YRbF) Rb9k = Rb9k[F7gU] return Rb9k
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def alPy(Sk_F):\n HsbC = pSfY(len(Sk_F[0]), dtype=bool)\n return [jzdc[HsbC] for jzdc in Sk_F]", "def Oe7i(nPrm):\n for YRbF in nPrm[:]:\n QyVM = nPrm.index(YRbF)\n for r845 in YRbF:\n if oyIN.isnan(r845):\n nPrm.remove(YRbF)\n break\n return nPr...
[ "0.75196254", "0.6794466", "0.6619757", "0.65998524", "0.655495", "0.6496642", "0.6493709", "0.6349335", "0.6285975", "0.622744", "0.620139", "0.61766136", "0.6163357", "0.6148076", "0.61369705", "0.61339676", "0.60335064", "0.60280085", "0.60248303", "0.59601843", "0.5903704...
0.70511913
1
Gets the total number of elapsed seconds in the day.
def z59i(): wj6w = qcWV.utcnow() nU14 = qcWV.combine(wj6w.date(), ITS7(0)) RA_F = wj6w - nU14 return RA_F.total_seconds()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def z0YJ(YKHO):\n return ((YKHO.days * 86400 + YKHO.seconds) * 10 ** 6 + YKHO.microseconds) / 10 ** 6", "def Zhzg(g75m):\n return (g75m.microseconds + (g75m.seconds + g75m.days * 24 * 3600) * 1000000.0) / 1000000.0", "def z0YJ(g75m):\n return (g75m.microseconds + (g75m.seconds + g75m.days * 24 * 3600)...
[ "0.81510127", "0.75990295", "0.75369143", "0.73405945", "0.731698", "0.7314861", "0.72670084", "0.7266481", "0.71389884", "0.7138954", "0.7074033", "0.6922083", "0.6887722", "0.6866305", "0.6835305", "0.6834427", "0.6829918", "0.6747456", "0.6744547", "0.67347586", "0.6716087...
0.7559496
2
encode a numpy.ndarray object.
def yhRz(nPrm, T4Wy='C', fhAL=None): if fhAL is None: fhAL = u6MP return VDOu.compress(nPrm.tobytes(order=T4Wy), fhAL)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wo5_(YKHO, qw7D):\n return WR89.b64encode(qw7D.tostring())", "def waqd(qw7D):\n return qQXR.dumps(d7j_(qw7D))", "def waqd(qw7D):\n return qQXR.dumps(d7j_(qw7D))", "def dtW3(jzdc: np.ndarray) -> str:\n return qQXR.dumps(jzdc.tolist())", "def giWH(YKHO, qw7D):\n NRcB = xDSY.BytesIO()\n ...
[ "0.7388475", "0.72840333", "0.72840333", "0.72325563", "0.70944256", "0.6864758", "0.6859525", "0.68453753", "0.6825534", "0.678497", "0.6737545", "0.67369246", "0.6732886", "0.67132276", "0.6693044", "0.6669051", "0.6662419", "0.6659878", "0.6631461", "0.6623487", "0.6599330...
0.0
-1
Shows the object readable name.
def Ku9n(YKHO): return YKHO.first_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ujht(YKHO):\n return YKHO.name", "def qQNS(YKHO, YEnM):\n return jKi7.text_type(YEnM)", "def zAg0(YKHO):\n return YKHO._name", "def zAg0(YKHO):\n return YKHO._name", "def zAg0(YKHO):\n return YKHO.__name", "def zAg0(YKHO):\n return '%s' % YKHO.name", "def zAg0(YKHO):\n return '...
[ "0.79824275", "0.7952787", "0.7620327", "0.7567258", "0.7565897", "0.75293285", "0.75293285", "0.75293285", "0.75293285", "0.75293285", "0.7505057", "0.7505057", "0.7505057", "0.7505057", "0.7505057", "0.7505057", "0.7505057", "0.7491893", "0.7491893", "0.7474296", "0.7432366...
0.0
-1
Create a header dict for requests. Uses abstract method self._handle_token().
def FDuj(YKHO, eOtH: str, jRxN: dict=None) -> dict: MOPg = YKHO._headers.copy() if isinstance(jRxN, dict): MOPg.update(jRxN) MOPg = {G1Hx: Ty9i for G1Hx, Ty9i in MOPg.items() if Ty9i is not None} eOtH = YKHO._handle_token(eOtH) if eOtH: MOPg['Authorization'] = 'Bearer ' + eOtH ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def XaJ7(YKHO, eOtH: str) -> dict:\n WBPg = LPpG.copy()\n WBPg['Authorization'] = f'Bearer {eOtH}'\n return WBPg", "def rcO0() -> QVHy:\n MOPg = QVHy()\n MOPg['Authorization'] = f'Token {Hy7s.environ['TOKEN']}'\n MOPg['Content-type'] = 'application/json'\n return MOPg", "def mw5p(YKHO):\n ...
[ "0.77233416", "0.77175784", "0.7619331", "0.74734694", "0.745365", "0.745365", "0.7437346", "0.74198985", "0.7418513", "0.7377463", "0.7373184", "0.7327852", "0.72947776", "0.72704124", "0.7254404", "0.72341573", "0.71817356", "0.7069325", "0.7065175", "0.70478094", "0.703856...
0.70295393
22
Adds dx to x and projects onto nonegative orthant. Modifies x inplace.
def UGM7(WKvO, Jw7X, KG9w): for YRbF in range(len(WKvO)): WKvO[YRbF] = oyIN.maximum(WKvO[YRbF] - KG9w * Jw7X[YRbF], 0.0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MPrI(YKHO, exwG):\n YKHO.A[exwG], YKHO.C, JIwb, jUYd = YKHO._mps_decompose_AC(YKHO.A[exwG])\n YKHO.normC *= JIwb\n YKHO.D[exwG + 1] = jUYd\n YKHO.pC = exwG + 1", "def Q1Vt(YKHO):\n YKHO.__dx *= -1", "def wcYe(YKHO):\n T8ck = oyIN.linalg.qr(YKHO.components.T)[0].T\n YKHO.components[...]...
[ "0.54029065", "0.5393102", "0.53596807", "0.531709", "0.5302657", "0.51897436", "0.51739675", "0.5171763", "0.5168066", "0.51651657", "0.51633316", "0.5145802", "0.51267904", "0.5125848", "0.51123387", "0.50996625", "0.5079069", "0.5048507", "0.5046948", "0.50266683", "0.5019...
0.0
-1
given an array of sorted numbers, return the len of the array after removing duplicates. Cannot use extra space. E.g remove_duplicates([2, 3, 3, 3, 6, 9, 9]) > 4
def dDv2(ezWE): if not ezWE: return 0 IXPI = None TK2h = 0 for ZbOB in range(len(ezWE)): if ezWE[ZbOB] != IXPI: TK2h += 1 IXPI = ezWE[ZbOB] return TK2h
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dDv2(xYvp: List[int]) -> int:\n if not xYvp:\n return 0\n id7O = 0\n for DkUh in range(1, len(xYvp)):\n if xYvp[id7O] != xYvp[DkUh]:\n id7O += 1\n xYvp[id7O] = xYvp[DkUh]\n return id7O + 1", "def QiC7(IqQl):\n return len(QVYe(IqQl))", "def KThM(YKHO, ezWE:...
[ "0.7054584", "0.6557031", "0.65025586", "0.64530194", "0.6446219", "0.6285838", "0.61946934", "0.61217576", "0.6063203", "0.6049841", "0.6023138", "0.60101676", "0.5958672", "0.58498824", "0.5844696", "0.5808737", "0.57510465", "0.5743431", "0.57402325", "0.57100475", "0.5707...
0.7217159
0
Extract a model from its distributed containers.
def vFZE(C3ST, PeVs: bool=True): xAU6 = (ht2j.nn.parallel.DistributedDataParallel, ht2j.nn.DataParallel) if UQZj(): xAU6 += (uJzW,) while isinstance(C3ST, xAU6): C3ST = C3ST.module if not PeVs: KVH6 = getattr(C3ST, 'forward') M0Be = C3ST.__dict__.pop('_original_forward', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def YrZb(YKHO):\n return YKHO.call_async(0, '_async_get_model').gen()", "def XZBf(_sql, C3ST):\n C3ST = _sql.raw(C3ST)\n C3ST = _sql.move(C3ST)\n if _sql._device_ids and len(_sql._device_ids) > 1:\n C3ST = NpF0(C3ST, device_ids=_sql._device_ids, output_device=_sql._main_device_id)\n else:\n...
[ "0.5688722", "0.54218143", "0.5330874", "0.5304086", "0.5158258", "0.515126", "0.5133338", "0.5120814", "0.51146066", "0.5066321", "0.5037615", "0.5027615", "0.50150514", "0.5002548", "0.49894935", "0.4984471", "0.49471045", "0.49388418", "0.49255636", "0.492262", "0.4920862"...
0.55487835
1
Recursively merges two dictionaries.
def roQF(JZXy, yFgu): for H5ew, BWXx in JZXy.items(): if isinstance(BWXx, dict): Q6kx = yFgu.setdefault(H5ew, {}) roQF(BWXx, Q6kx) else: yFgu[H5ew] = BWXx return yFgu
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PCMW(AjzU, _sQW):\n if _sQW is None:\n return\n for G1Hx, Ty9i in _sQW.items():\n if G1Hx not in AjzU:\n AjzU[G1Hx] = dict()\n if isinstance(Ty9i, dict):\n PCMW(AjzU[G1Hx], Ty9i)\n else:\n AjzU[G1Hx] = Ty9i", "def W0j7(AjzU, _sQW):\n for H...
[ "0.8181976", "0.8098495", "0.80977166", "0.8016462", "0.8014323", "0.7977815", "0.7961704", "0.7961704", "0.79225457", "0.78900236", "0.7867636", "0.7813001", "0.7757917", "0.7718618", "0.7710909", "0.77047026", "0.7698717", "0.7683261", "0.7636343", "0.76229715", "0.75825846...
0.7629517
19
Return a dash definition of an HTML table for a Pandas dataframe
def BJgQ(jQ3Z): tyNF = [] for d6pt, rdlD in jQ3Z.iterrows(): WmiI = [] for YRbF in range(len(rdlD)): WmiI.append(_R2e.Td([rdlD[YRbF]])) tyNF.append(_R2e.Tr(WmiI)) return tyNF
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BJgQ(SuM2, jQ3Z):\n FHnm = jQ3Z.loc[jQ3Z['NAME'].isin(SuM2)]\n tyNF = []\n for d6pt, rdlD in FHnm.iterrows():\n usx6 = []\n usx6.append(_R2e.Td([rdlD['NAME']]))\n usx6.append(_R2e.Td([_R2e.Img(src=rdlD['IMG_URL'])]))\n usx6.append(_R2e.Td([rdlD['FORM']]))\n usx6.appe...
[ "0.7303906", "0.715068", "0.7145016", "0.71170115", "0.6868719", "0.67809016", "0.67613304", "0.6704634", "0.669976", "0.66738397", "0.6633055", "0.6612183", "0.6597025", "0.6459958", "0.64555556", "0.6449526", "0.6445133", "0.6415424", "0.6381656", "0.6372886", "0.63684595",...
0.7628653
1
Yield successive nsized chunks from l.
def eHxA(vC9B, exwG): for YRbF in range(0, len(vC9B), exwG): yield vC9B[YRbF:YRbF + exwG]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xJ0H(YKHO, vC9B, exwG):\n for YRbF in range(0, len(vC9B) + 1, exwG):\n yield vC9B[YRbF:YRbF + exwG]", "def eHxA(YKHO, vC9B, exwG):\n for YRbF in range(0, len(vC9B), exwG):\n yield vC9B[YRbF:YRbF + exwG]", "def I7IE(vC9B, exwG):\n for YRbF in range(0, len(vC9B), exwG):\n yield ...
[ "0.8038813", "0.79248375", "0.7923423", "0.7885103", "0.78773195", "0.7815877", "0.77655786", "0.77556044", "0.77441615", "0.7731815", "0.77288336", "0.772473", "0.77028215", "0.76889825", "0.76889825", "0.7664208", "0.76570904", "0.7655856", "0.7655856", "0.76458347", "0.764...
0.7448925
61
Return the path of the david_data directory.
def Oh5_(nUtl: str=None): if not nUtl: nUtl = Hy7s.environ.get('DAVID_DATA', Hy7s.path.join('~', 'david_data')) nUtl = Hy7s.path.expanduser(nUtl) if not Hy7s.path.exists(nUtl): Hy7s.makedirs(nUtl) return nUtl
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def s8df():\n return fHZh[m1hO]", "def h_xa(YKHO) -> GkAb:\n return YKHO._data_dir", "def xe5l(YKHO):\n return YKHO.data_dir", "def fq70():\n return JGPV.DATA_DIRECTORY", "def uRIH(YKHO):\n return YKHO.get_raw('data_directory')", "def TNBq():\n return '..' + Hy7s.sep + 'data' + Hy7s.sep...
[ "0.79911995", "0.79468125", "0.7916519", "0.7873608", "0.78342336", "0.78231156", "0.7801691", "0.7751921", "0.77319187", "0.7721735", "0.7721735", "0.7707022", "0.770389", "0.7679155", "0.76777494", "0.7573083", "0.75606763", "0.7557315", "0.75190115", "0.7475164", "0.747035...
0.6772123
57
Generate random string .
def e7Tf(y0cW='', ZI14='', zNig=20): import random import string ntcI = zNig - len(y0cW) - len(ZI14) Jv62 = '' if ntcI > 0: Jv62 = ''.join((random.choice(string.ascii_uppercase + string.digits) for bGrB in range(ntcI))) else: print('Warning: Length of prefix and suffix more than ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KpEQ():\n return ''.join(QMfv(rU7A(32)).decode('utf-8'))", "def e7Tf():\n return ''.join((tuKI.choice(vIwR.ascii_lowercase + vIwR.digits) for bGrB in range(16)))", "def tEgU():\n return kxTZ().hex[:6].upper()", "def r4k0(OaeV, wuRi=''):\n bo34.info('DeprecationWarning: randomstr is deprecated...
[ "0.8635078", "0.84493166", "0.83262223", "0.8009337", "0.7946448", "0.79347456", "0.7920454", "0.7918671", "0.7908916", "0.7867601", "0.78303945", "0.7795594", "0.77655584", "0.7758686", "0.7748804", "0.77403396", "0.77213657", "0.7694533", "0.76429945", "0.76317865", "0.7601...
0.0
-1
return the path of the project directory.
def EL0N(): qaEx = Hy7s.path.abspath(xAKo) jNha = Hy7s.path.join(Hy7s.path.dirname(qaEx), '..') return Hy7s.path.abspath(jNha)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TdjZ():\n return GkAb(gCuF.PROJECT_DIR)", "def mgKE(YKHO):\n bo34.debug('Func: projectDir/getter')\n return YKHO._pathsDict['projectDir']", "def TdjZ(YKHO):\n eHKs = fHZh.concat(YKHO._gnbase, xdAI)\n if not EeDH.path.isdir(eHKs):\n raise OSError('GEONIS project directory {!r} does not...
[ "0.86510855", "0.85523444", "0.8470787", "0.8427606", "0.8418452", "0.8261944", "0.8234983", "0.8035564", "0.7970211", "0.78705966", "0.78632295", "0.786066", "0.785521", "0.78462315", "0.7801716", "0.7801716", "0.7746228", "0.7746228", "0.7746228", "0.7746228", "0.7703054", ...
0.8299746
5
Verify two json are equal.
def naaF(paSp, O0Fa, geh0): try: assert O0Fa.items() <= geh0.items() paSp.get_last_step().set_status(EloR.PASSED) except AssertionError as e: Ol8d = si3H.JSON_INCORRECT.format(str(tTpl)) paSp.get_last_step().set_status(EloR.FAILED, Ol8d)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _bjF(NenA, GZ8X):\n return Ampr.eq(NenA, GZ8X)", "def _bjF(IlMF, Lil9):\n return IlMF.items() <= Lil9.items()", "def SVF3(NenA, GZ8X):\n return aHEA(NenA) == aHEA(GZ8X)", "def xa14(YKHO, Elif) -> bool:\n if qQXR.dumps(YKHO.data, sort_keys=True) == qQXR.dumps(Elif.data, sort_keys=True):\n ...
[ "0.8282562", "0.7734557", "0.7525242", "0.73088014", "0.7283516", "0.72751945", "0.712147", "0.6985986", "0.6859054", "0.68366945", "0.67452747", "0.67416406", "0.665583", "0.6633823", "0.6633293", "0.6632718", "0.6615652", "0.65889376", "0.6576137", "0.6561503", "0.6551756",...
0.61074436
57
Return a pairwise json that gotten from wallet.
def Nm8L(UOEC: str=None, yIVm=None) -> dict: Aofo = {} if UOEC is not None: Aofo['my_did'] = UOEC if yIVm is not None: Aofo['metadata'] = yIVm return Aofo
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def f8fd(OUVF, ee8p, Y8uJ):\n oUZx = 'php hd-wallet-derive/hd-wallet-derive.php -g --mnemonic={mnemonic} --cols=path,address,privkey,pubkey --format=json --coin=“{coin}” --numderive= 2'\n XP5J = Yn3K.Popen(vau8, stdout=Yn3K.PIPE, shell=True)\n hlel, XObx = XP5J.communicate()\n Hvd9 = XP5J.wait()\n s...
[ "0.59901667", "0.5804148", "0.5752912", "0.5666241", "0.56342757", "0.56247604", "0.5562812", "0.55311173", "0.55222476", "0.5477982", "0.54693055", "0.5428445", "0.5361837", "0.5285944", "0.52683496", "0.52585196", "0.52457124", "0.52359855", "0.52246886", "0.51950514", "0.5...
0.5196326
19
Calculates entropy in probability distribution P.
def oqGu(V6IE): DdOm = V6IE.copy() DdOm[DdOm == 0] = oyIN.nan return oyIN.nansum(oyIN.multiply(DdOm, oyIN.log2(1 / DdOm)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pUHp(XP5J):\n return 2 ** oyIN.sum(-XP5J * oyIN.log2(XP5J + 1e-10))", "def oqGu(XP5J):\n assert (XP5J >= 0).all()\n assert abs(oyIN.sum(XP5J) - 1) < 1e-06\n return -oyIN.sum(XP5J * oyIN.log(XP5J + 1e-12))", "def oQVy(V6IE):\n Ylbp = 0.0\n ZHfW = V6IE != 0.0\n eHNT = lambda WKvO: WKvO *...
[ "0.8536388", "0.8431395", "0.82184947", "0.8098491", "0.80688846", "0.78975147", "0.7886234", "0.78607935", "0.7854597", "0.7843047", "0.78367263", "0.7820612", "0.7577854", "0.75214887", "0.74972475", "0.7486658", "0.74641824", "0.74573493", "0.7433797", "0.7383558", "0.7375...
0.8298413
2
Calculates conditional entropy in joint probability distribution P.
def kaxw(V6IE): DdOm = V6IE.copy() DdOm[DdOm == 0] = oyIN.nan Vfrv = oyIN.nansum(DdOm, axis=1) KofC = DdOm / Vfrv[:, None] return oyIN.nansum(oyIN.multiply(DdOm, oyIN.log2(1 / KofC)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def prbR(x8Nn, xsQQ):\n buli = oyIN.ma.log2(xsQQ).filled(0)\n o5So = oyIN.multiply(x8Nn, buli)\n C7Ls = -oyIN.sum(o5So)\n return C7Ls", "def T17z(V6IE):\n DdOm = V6IE.copy()\n DdOm[DdOm == 0] = oyIN.nan\n return oyIN.nansum(oyIN.multiply(DdOm, oyIN.log2(1 / DdOm)))", "def oqGu(V6IE):\n ...
[ "0.81030995", "0.779996", "0.75139546", "0.72964513", "0.7284838", "0.7206772", "0.7110792", "0.7035106", "0.6981679", "0.6935873", "0.6905336", "0.6887118", "0.68439007", "0.6809565", "0.67182827", "0.6695674", "0.66748357", "0.6630083", "0.66291535", "0.6533243", "0.6531881...
0.791429
1
If we have selected a new logo, it will be changed the logo name in site_properties
def ia7d(YKHO): AG5m = YKHO.request.form.get('image_selected') GG57 = OZpC(YKHO.context, 'portal_properties') QY5n = getattr(GG57, 'site_properties') if QY5n.hasProperty('logo_name'): QY5n.manage_changeProperties(logo_name=AG5m) return YKHO.doReturn(bGrB(u'Logo updated'), 'info')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WdkD(YKHO):\n return YKHO.company_logo or 'upload/default_avatar.gif'", "def nmOv(YKHO, nmOv: str):\n YKHO._logo = nmOv", "def qbGU(YKHO, **B2fa):\n YKHO.baxter.display.setImage(YKHO.baxter.datapath + 'logo1024.jpg')", "def p_oj(YKHO):\n H5ew = nNXP.portal.get_registry_record('plone.site_logo...
[ "0.6627549", "0.6627545", "0.6222198", "0.60418296", "0.5943676", "0.59340596", "0.59340596", "0.59340596", "0.59340596", "0.58221424", "0.58221424", "0.58139145", "0.5722555", "0.5717571", "0.5662804", "0.56527275", "0.56527275", "0.5647125", "0.5647009", "0.5579923", "0.552...
0.8527286
0
Add interceptor to the end of the internal list.
def SStx(Emd4, K0bS): Emd4._check(K0bS) Emd4._interceptors.append(K0bS)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JPHp(Emd4, d6pt, K0bS):\n Emd4._check(K0bS)\n Emd4._interceptors.insert(d6pt, K0bS)", "def nuvQ(YKHO, FGW3):\n YKHO.interceptions += FGW3\n YKHO.ssp += FGW3 * cSDF", "def wD17(YKHO, LiTy):\n if LiTy not in YKHO.observer_list:\n YKHO.observer_list.append(LiTy)", "def SStx(YKHO, objec...
[ "0.6123669", "0.55338955", "0.5289747", "0.5277503", "0.52753854", "0.524498", "0.5219246", "0.51981825", "0.518592", "0.5177225", "0.51431936", "0.5142524", "0.51294285", "0.51110685", "0.510856", "0.5094091", "0.50867295", "0.5083817", "0.5081685", "0.5078884", "0.5063323",...
0.7966266
0
Add interceptor to the given index in the internal list.
def JPHp(Emd4, d6pt, K0bS): Emd4._check(K0bS) Emd4._interceptors.insert(d6pt, K0bS)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SStx(Emd4, K0bS):\n Emd4._check(K0bS)\n Emd4._interceptors.append(K0bS)", "def feJh(YKHO, d6pt):\n YKHO.add_index_sig(uFSh.from_index(d6pt))", "def feJh(YKHO, d6pt):\n YKHO.add_index_sig(uFSh.from_index(d6pt))", "def JPHp(YKHO, d6pt: int, ZfUD: Any) -> cWhJ:\n super().insert(d6pt, ZfUD)\n ...
[ "0.6558803", "0.62259084", "0.62259084", "0.60555005", "0.5966407", "0.59287256", "0.59138817", "0.59138817", "0.59070206", "0.582478", "0.578067", "0.57742923", "0.576577", "0.5763571", "0.5726408", "0.57096267", "0.5688677", "0.5653646", "0.56492966", "0.56247634", "0.56200...
0.80589885
0
Return a list of interceptors.
def NBM6(Emd4): return Emd4._interceptors
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def M4GC(YKHO):\n return YKHO._interceptions", "def upGN(YKHO):\n return YKHO.interceptions", "def oi9Q():\n pass", "def BlB8(YKHO) -> oyIN.ndarray:\n return YKHO._intercept", "def jM3M(YKHO):\n return list(YKHO._registry.values())", "def FTZh(YKHO) -> x1iM:\n raise NotImplementedError(...
[ "0.652202", "0.64001137", "0.5994348", "0.5528268", "0.5525158", "0.5523417", "0.550799", "0.55015993", "0.54154575", "0.5402809", "0.5382086", "0.5359293", "0.5358335", "0.5321518", "0.5302534", "0.5293866", "0.5278781", "0.5264514", "0.51896423", "0.5177481", "0.5170946", ...
0.85444534
0