query
stringlengths
10
3.6k
document
stringlengths
19
61.4k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Test that a string with unmatching quotes is not unquoted.
def GOfP(): KCHu = 'May the force be with you.' assert '"' + KCHu == x65n('"{}'.format(KCHu)) assert KCHu + "'" == x65n("{}'".format(KCHu))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GtUU(KCHu):\n return KCHu[0] in ('\"', \"'\") and KCHu[0] == KCHu[-1]", "def X5sS():\n KCHu = 'May the force be with you.'\n assert KCHu == x65n('\"{}\"'.format(KCHu))\n assert KCHu == x65n(\"'{}'\".format(KCHu))", "def xvvY():\n r8hN = MjOo.UNQUOTED_STRING.search(\"'foo'\")\n assert r8hN...
[ "0.7553513", "0.7415109", "0.721644", "0.7039987", "0.69660974", "0.68846446", "0.6863422", "0.68281215", "0.66982895", "0.6693896", "0.6626856", "0.6547748", "0.64626735", "0.64626735", "0.64571565", "0.64078444", "0.6401615", "0.6396029", "0.639438", "0.638219", "0.6378835"...
0.77382153
0
Returns a dataframe of the number of tweets on a given date. Dates form the dataframe index and number of tweets
def LyCQ(jQ3Z): import pandas as rLdf jQ3Z['Day'] = [_c1T.split(' ')[0] for _c1T in jQ3Z['Date']] NcCd = jQ3Z.groupby('Day')['Tweets'].count() SOGP = rLdf.DataFrame(NcCd) SOGP.index.name = 'Date' return SOGP
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aGtE(YKHO):\n KAEr = -1\n try:\n KBuT = 1\n yo7_ = qcWV.now()\n kepv = yo7_ - fCoM(days=KBuT)\n bD7m = YKHO.tweet_count_url\n B2Dn = G4JS.get(bD7m)\n cntZ = '[new Date(\"' + kepv.strftime(GGme) + '\"),'\n XVAW = ']'\n yKcO = B2Dn.text.rindex(cntZ) +...
[ "0.6903421", "0.6492228", "0.6360804", "0.623692", "0.62300044", "0.6102836", "0.6100907", "0.60637456", "0.59530777", "0.57991433", "0.5798461", "0.5764619", "0.56803524", "0.5680042", "0.56692505", "0.5650778", "0.5626859", "0.5589989", "0.5578537", "0.5566274", "0.55527043...
0.7856862
0
Returns a dataframe of a tokenised list placed in a column named "Without Stop Words" with removed english stop words from stop_words_dict{}
def QXd6(jQ3Z): jeF6 = jQ3Z['Tweets'].apply(lambda WKvO: WKvO.lower().split()) jQ3Z['Without Stop Words'] = jeF6.apply(lambda WKvO: [GIN8 for GIN8 in WKvO if GIN8 not in ljiF['stopwords']]) return jQ3Z
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def QXd6(jQ3Z):\n jQ3Z['Without Stop Words'] = jQ3Z['Tweets'].apply(lambda WKvO: [ZfUD for ZfUD in str(WKvO).lower().split() if ZfUD not in ljiF['stopwords']])\n return jQ3Z", "def QXd6(jQ3Z):\n\n def aWDa(rdlD):\n return [GIN8 for GIN8 in rdlD.lower().split() if GIN8 not in ljiF['stopwords']]\n ...
[ "0.80642545", "0.78821224", "0.7296512", "0.72056156", "0.70640606", "0.70599496", "0.70336217", "0.7018506", "0.69947547", "0.6968283", "0.6962176", "0.69361794", "0.69361794", "0.69361794", "0.69361794", "0.69361794", "0.69361794", "0.69361794", "0.6921139", "0.6921139", "0...
0.8132749
0
Generates the appropriate decay function for a given variable. The decays that can be generated are static (no decay over time), linear and exponential.
def Yx7j(mWFP): WMj5 = input('What kind of decay for {}? [s/l/e]'.format(mWFP)) or 'e' if WMj5 == 's': BWXx = float(input('Static value: ')) return zLIf(BWXx) if WMj5 == 'l': BWXx = float(input('Start value: ')) mVUw = float(input('Rate:')) return LWaF(BWXx, mVUw) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def woQq(WKvO, DbxN, a4i2):\n return DbxN * XTiz.power(1 - a4i2, WKvO)", "def sDY6():\n mWFP = 'exponential_decay'\n KMvS = 0.96\n Rf07 = 100000", "def i_5M(DbxN, lWPh, Csk6):\n return DbxN + (1 - DbxN) * 2 ** (-Csk6 / lWPh)", "def cq_l(EOE5, Aak1, BkRq):\n OhBy = EOE5 * oyIN.power(0.1, Aak...
[ "0.67885405", "0.6325008", "0.61602545", "0.6090205", "0.6032089", "0.59067196", "0.5877244", "0.5868476", "0.5858183", "0.5834881", "0.581956", "0.57878536", "0.57474506", "0.57277334", "0.5726116", "0.57164365", "0.5709092", "0.566921", "0.56468356", "0.56240547", "0.558390...
0.57348514
13
Determines the Lorentz factor for an object given its speed as a fraction of the speed of light.
def Sb1b(): iBLD = float(input('Enter object velocity (as a fraction of c): ')) aM8h = 1 / (1 - iBLD ** 2) ** 0.5 print('Lorentz factor: ', aM8h)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PCoy(YKHO, TYz5):\n t7Zg = 4\n if TYz5 <= 3:\n return 0\n else:\n return 0.8", "def V0iX(y917):\n iBLD = CkYf(y917)\n if iBLD > Rpax:\n return 'speed has to be less than speed of light!'\n else:\n return 1.0 / PZyS(1.0 - (iBLD / Rpax) ** 2)", "def ERGf(YKHO):\n...
[ "0.64924586", "0.64243466", "0.6400184", "0.6077206", "0.6060806", "0.5984979", "0.5979432", "0.59775585", "0.5969063", "0.5932755", "0.59194976", "0.5882547", "0.58639663", "0.58623147", "0.58600175", "0.58479947", "0.5824096", "0.580517", "0.5799943", "0.57997435", "0.57732...
0.73851174
0
Removes and returns the last item from the list, which is also the top item of the stack. The run for this method is 0(1), or constant time, because all it does is index to the last item of the list.
def BEuN(YKHO): return YKHO.items.pop()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BEuN(YKHO):\n if len(YKHO.list) > 0:\n ycBG = YKHO.list[YKHO.length() - 1]\n YKHO.list.pop(YKHO.length() - 1)\n return ycBG\n else:\n raise ValueError", "def BEuN(YKHO):\n if YKHO.is_empty():\n raise rWmY('Stack is empty')\n SADC = YKHO._head._element\n YKHO....
[ "0.839947", "0.7941157", "0.7859411", "0.7819421", "0.7810187", "0.77593106", "0.77357984", "0.77096224", "0.76939875", "0.76908976", "0.7657813", "0.76535636", "0.7635259", "0.76175296", "0.75850266", "0.7525513", "0.75033855", "0.74832207", "0.7482256", "0.7482256", "0.7479...
0.0
-1
The client isn't an authorized user.
def yjI4(YKHO): ehIZ = tvfC.objects.create(name='tenant 1', owner='John', owner_contact='206.867.5309') tH0x = H1v1.objects.create(tenant_name='ee', username='ffffffffuuuuu', password='gah', auth_url='http://route66.com', tenant=ehIZ) eOtH = IYhU() CBIr = egNl().objects.get(username=OetC[0]) CBIr.te...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DLYc(YKHO):\n pass", "def J8sO(L4fd):\n oAWu = jqy8.is_authorized(Ede2, authorizer='test')\n assert oAWu is False", "def xRk5(YKHO):\n with YKHO.client:\n geh0 = YKHO.client.get(YKHO.client_url)\n YKHO.assertEqual(geh0.status_code, 401)", "def oTiY(YKHO):\n YKHO.client.logout...
[ "0.7617124", "0.6995436", "0.6990063", "0.68986017", "0.68629086", "0.6862134", "0.68544894", "0.68466914", "0.683093", "0.683093", "0.683093", "0.683093", "0.683093", "0.6804257", "0.6800036", "0.67863995", "0.6773315", "0.67639434", "0.6733636", "0.67268324", "0.67260665", ...
0.0
-1
Update a nonexistent OpenStack cloud of a tenant.
def plhH(YKHO): ehIZ = tvfC.objects.create(name='tenant', owner='John', owner_contact='206.867.5309') eOtH = IYhU(tenant=ehIZ) geh0 = YKHO.client.put(dRvo % (ehIZ.uuid, va4h), qQXR.dumps({'tenant_name': 'fool'}), content_type='application/json', HTTP_AUTHORIZATION=ylOF % eOtH) YKHO.assertContains(geh0, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VBk8(mxuv, qIxc):\n ehIZ = BfDw.find_resource(mxuv.tenants, qIxc.tenant)\n B2fa = {}\n if qIxc.name:\n B2fa.update({'name': qIxc.name})\n if qIxc.description is not None:\n B2fa.update({'description': qIxc.description})\n if qIxc.enabled:\n B2fa.update({'enabled': RZBP.bool_...
[ "0.6068847", "0.5951331", "0.5930339", "0.5843521", "0.58100736", "0.57134414", "0.5690894", "0.5466733", "0.5447609", "0.5427748", "0.5393841", "0.5390952", "0.53762954", "0.5346893", "0.53311104", "0.53224814", "0.5253617", "0.52219635", "0.52110684", "0.52110684", "0.52053...
0.6624871
0
Init an Request class.
def FIMM(YKHO, sEAN, xAU6=None): super(VNUm, YKHO).__init__(sEAN, xAU6) YKHO.is_admin = None YKHO.context = QpfX.RequestContext.from_environ(YKHO.env) if YKHO.is_admin is None: YKHO.is_admin = Qabx.check_is_admin(YKHO)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def E2Sy(YKHO, QePW, *qIxc, **B2fa):\n nNdW = YKHO.get_parser_context(QePW)\n return VNUm(QePW, parsers=YKHO.get_parsers(), authenticators=YKHO.get_authenticators(), negotiator=YKHO.get_content_negotiator(), parser_context=nNdW)", "def FIMM(YKHO, QePW):\n YKHO._request = QePW", "def FIMM(YKHO, QePW):\...
[ "0.77364844", "0.77264893", "0.7716089", "0.7705694", "0.75410163", "0.74173117", "0.74129117", "0.7397337", "0.73625374", "0.7313111", "0.7312102", "0.7312102", "0.72787946", "0.72573495", "0.7250119", "0.7232985", "0.723272", "0.7180283", "0.71433663", "0.714211", "0.707163...
0.62789434
94
compute the sum of squared errors
def Ptm0(YKHO): Ptm0 = 0 for e6ux in YKHO.centroids: for nPrm in YKHO.classifications[e6ux]: Ptm0 += oyIN.linalg.norm(nPrm - YKHO.centroids[e6ux]) ** 2 return Ptm0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def i8nm(nJ9F, o4D3):\n return Zciu()(nJ9F, o4D3)", "def iAxY(UAju):\n return JBMS([P1dF ** 2 for P1dF in UAju]) ** 0.5", "def i8nm(fUYa, bEXe, Cwt5, UqYS):\n return sum((P1dF(WKvO, LVAh, Cwt5, UqYS) ** 2 for WKvO, LVAh in zip(fUYa, bEXe)))", "def BKL_(si3g, skBL):\n return sum((skBL - si3g) ** 2...
[ "0.74362737", "0.73466843", "0.73365676", "0.71183264", "0.7115701", "0.70724404", "0.7061975", "0.7051414", "0.70289105", "0.70063525", "0.70063525", "0.6993239", "0.6974591", "0.6962072", "0.6847872", "0.68283176", "0.68034196", "0.6800545", "0.6798068", "0.6784313", "0.677...
0.0
-1
Return a grayscale image of the given expression.
def FgOn(lsX7, TVTK=300): H2v2 = TVTK def vSzX(WKvO, LVAh): """Convert absolute coordinates to relative coords between (-1, -1) and (1, 1).""" BqsV = TVTK / 2 cQS8 = H2v2 / 2 ydZk = (WKvO - BqsV) / BqsV OhBR = (LVAh - cQS8) / cQS8 return (ydZk, OhBR) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KcW0(Xn71):\n return Xn71", "def qWz7(LNo8):\n xV4z = oyIN.copy(LNo8)\n F3_L = 0.299 * LNo8[2] + 0.587 * LNo8[1] + 0.114 * LNo8[0]\n xV4z[0] = F3_L\n xV4z[1] = F3_L\n xV4z[2] = F3_L\n return xV4z", "def nrOS(YKHO, LNo8, ZHfW=None):\n return (uGYG.ImageOps.grayscale(LNo8), ZHfW)", ...
[ "0.68454397", "0.67365634", "0.6668942", "0.6622988", "0.65480864", "0.64782715", "0.64732933", "0.64732933", "0.64730114", "0.64342964", "0.64342964", "0.64342964", "0.64342964", "0.64342964", "0.6428309", "0.6400178", "0.6398969", "0.6398969", "0.63537365", "0.63468874", "0...
0.6711233
2
Set seed for numpy RNG
def FIMM(YKHO, yokr: int=None): YKHO.seed = yokr YKHO.rng = oyIN.random.default_rng(seed=yokr)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def e3of():\n oyIN.random.seed(1223)", "def yokr(yokr=None):\n oyIN.random.seed(yokr)", "def yokr():\n oyIN.random.seed(0)", "def e3of(yokr):\n oyIN.random.seed(yokr)", "def yokr(yokr):\n oyIN.random.seed(yokr)", "def lrYb(YKHO, yokr):\n YKHO.rng = XTiz.random.RandomState(yokr)", "def...
[ "0.86889327", "0.84864056", "0.84669393", "0.8455949", "0.84225196", "0.8418245", "0.8392723", "0.83652985", "0.8320202", "0.83114076", "0.8303495", "0.82740736", "0.8227249", "0.8223177", "0.82028705", "0.81476927", "0.81476927", "0.8134423", "0.811464", "0.811464", "0.81146...
0.78182274
37
Test if two Depths are equal.
def xa14(YKHO, Elif): if YKHO.start == Elif.start and YKHO.end == Elif.end: I1mm = True else: I1mm = False return I1mm
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def e_da(YKHO):\n YKHO.assert_(len(YKHO.depths) == len(set(YKHO.depths)))", "def hHbZ(YKHO, zO88):\n return YKHO.set_subtree(YKHO.root) == zO88.set_subtree(zO88.root)", "def xur9(KpMP):\n if _li9:\n assert abs(KpMP.instance.depth() - KpMP.depth) < 2\n else:\n assert KpMP.instance.dept...
[ "0.71474844", "0.65923834", "0.64462316", "0.64277065", "0.6380688", "0.6366627", "0.6362895", "0.6338226", "0.62637484", "0.6228823", "0.62253386", "0.621947", "0.62005264", "0.6177615", "0.6167877", "0.61552626", "0.6127262", "0.6126703", "0.612213", "0.6118901", "0.6105484...
0.0
-1
Test if this Depth encloses other Depth.
def opb3(YKHO, Elif): fs7l, ijpg = YKHO.__temp_pos_depths(Elif) if fs7l.start <= ijpg.start and fs7l.end >= ijpg.end: I1mm = True else: I1mm = False return I1mm
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def opb3(YKHO, Elif):\n return Elif == YKHO or (Elif.parent and YKHO.encloses(Elif.parent))", "def eWsz(YKHO, Elif):\n fs7l, ijpg = YKHO.__temp_pos_depths(Elif)\n if ijpg.start <= fs7l.start and ijpg.end >= fs7l.end:\n I1mm = True\n else:\n I1mm = False\n return I1mm", "def opb3(YK...
[ "0.7396897", "0.6972304", "0.6422064", "0.6355828", "0.6265669", "0.62612003", "0.615675", "0.614264", "0.6079648", "0.60693175", "0.60572803", "0.60202235", "0.59803534", "0.59641355", "0.5951803", "0.59469676", "0.5923554", "0.5920283", "0.5918688", "0.59060127", "0.5903979...
0.8141181
0
Test if other Depth encloses this Depth.
def eWsz(YKHO, Elif): fs7l, ijpg = YKHO.__temp_pos_depths(Elif) if ijpg.start <= fs7l.start and ijpg.end >= fs7l.end: I1mm = True else: I1mm = False return I1mm
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def opb3(YKHO, Elif):\n fs7l, ijpg = YKHO.__temp_pos_depths(Elif)\n if fs7l.start <= ijpg.start and fs7l.end >= ijpg.end:\n I1mm = True\n else:\n I1mm = False\n return I1mm", "def opb3(YKHO, Elif):\n return Elif == YKHO or (Elif.parent and YKHO.encloses(Elif.parent))", "def jI2t(YK...
[ "0.8358661", "0.7586108", "0.6655921", "0.65271795", "0.63854814", "0.63762206", "0.6329673", "0.63097674", "0.62826157", "0.6268846", "0.6262025", "0.6247454", "0.623231", "0.61850727", "0.61839247", "0.618388", "0.61730576", "0.6151955", "0.61501974", "0.6147252", "0.613773...
0.71806335
2
Get collection that contains all "entity inputs" of a given data. With "entity input", one refers to the inputs that are part of an entity.
def edy9(nPrm): from resolwe.flow.models import Collection DF7T = set() for _H3b, V_D6 in ZjwR(nPrm.input, nPrm.process.input_schema): mWFP = _H3b['name'] BWXx = V_D6[mWFP] if 'type' not in _H3b: continue if _H3b['type'].startswith('data:'): BWXx = [BW...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NCeF(YKHO):\n return YKHO._collect(YKHO.input)", "def z80K(YKHO, nPrm):\n wKSC = []\n for dvBq in oUls.INPUTS:\n wKSC.append(nPrm[dvBq])\n return ht2j.cat(wKSC, 1)", "def Zo7w(YKHO):\n gMbG = YKHO.api.get(YKHO.results_url).json()['input_summary']\n return [x3i3(Csk6, YKHO.api) for ...
[ "0.66845953", "0.6584214", "0.6274622", "0.62718874", "0.62716657", "0.6241566", "0.61884546", "0.6160614", "0.6155738", "0.6155738", "0.6155738", "0.6155738", "0.6129623", "0.6129623", "0.61201984", "0.6058711", "0.6035326", "0.59876204", "0.5982109", "0.5982109", "0.5982109...
0.80603623
0
Initializes a separate numpy random number generator object. Its state is initialized using `seed`, if provided, or a newly generated seed if not. Should a random number generator function be provided (`seeder_rng`), it will be used to generate the seed. Otherwise, `numpy.random.randint` will be used as the seeder. Val...
def Gqub(yokr=None, rHiP=None, *qIxc, **B2fa): if yokr is None: VkUi = oyIN.random.randint if rHiP is None else rHiP Xk2t = 2 ** 31 yokr = VkUi(-Xk2t, Xk2t - 1) yokr += Xk2t xlLU = oyIN.random.RandomState(yokr) return (xlLU, yokr)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lrYb(YKHO, yokr):\n YKHO.rng = XTiz.random.RandomState(yokr)", "def iMGS(YKHO):\n yokr = None\n if 'rng_seed' in YKHO.__dict__:\n yokr = YKHO.rng_seed\n bo34.info('Seeding random number generator with: %s', str(yokr))\n oyIN.random.seed(yokr)", "def FIMM(YKHO, yokr: int=None):\n ...
[ "0.7528689", "0.7295128", "0.72610253", "0.7184287", "0.7175486", "0.71472484", "0.7086828", "0.70829713", "0.7001997", "0.7001997", "0.6942342", "0.6886236", "0.68842614", "0.6839835", "0.68196243", "0.68033165", "0.67987776", "0.6788742", "0.67870754", "0.67816526", "0.6765...
0.8356961
0
Create a course that will happen in 2080. This second course is not defined as a fixture since it only needs to be called once.
def PEK0(Gdsx): x_zK = G6ow.objects.get_or_create(name='Course')[0] SWox = rIAI.datetime(2080, 2, 2).astimezone(yl4j.utc) C7pn = rIAI.datetime(2080, 4, 27).astimezone(yl4j.utc) GQfX = QRWf(title='second testing course', body=giSr('<p>February 2080 History of Digital Humanities</p>'), start_time=SWox, en...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lxl4(YKHO):\n SGPK = ['config', 'conn', 'semester', 'course']\n GikI = 'course'\n YKHO.create_test_runner(SGPK, GikI)", "def R62J():\n zVa7 = b8V_()\n GQfX = {'name': '8th Grade Maths', 'section': 'Period 3', 'descriptionHeading': 'Welcome to 9th Grade Maths', 'description': \"We'll be learnin...
[ "0.7791023", "0.7697001", "0.76221985", "0.7540987", "0.73475754", "0.73056364", "0.72782403", "0.7189369", "0.71020764", "0.7004277", "0.6951768", "0.69424146", "0.6885704", "0.68443495", "0.6711826", "0.66964924", "0.66952336", "0.66872144", "0.66653", "0.66419077", "0.6608...
0.0
-1
Tests the basic creation of a user (successful creation).
def mfT8(YKHO): geh0 = Xhhj(YKHO) YKHO.assertEquals(geh0.content, '{"id":1,"username":"test0@jhu.edu","location_reminders":[],"time_reminders":[]}') YKHO.assertEqual(geh0.status_code, jGRS.HTTP_201_CREATED) geh0 = YKHO.client.get('/users/1/') YKHO.assertEquals(geh0.content, '{"id":1,"username":"test...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qtiS(YKHO):\n YKHO._test_create_new_user()", "def cDXr(YKHO):\n pass", "def F3wO(YKHO):\n pass", "def cDXr():\n CBIr = mxst.create_user('user@email.com')\n assert CBIr is not None\n assert CBIr.password is not None\n assert CBIr.last_password_change is not None", "def CW30(YKHO):\n...
[ "0.88428706", "0.88290197", "0.84075475", "0.8400187", "0.8374801", "0.8352506", "0.8347907", "0.82408804", "0.8238211", "0.8229318", "0.82153726", "0.8213802", "0.8212534", "0.82034653", "0.8191721", "0.81867456", "0.8138816", "0.8130065", "0.81281066", "0.8117426", "0.81161...
0.82110983
13
Tests that creating au user wothout a username or a password fails.
def faYC(YKHO): nPrm = {'username': '', 'password': 'PaSsWoRd2', 'mem_groups': [], 'sub_groups': []} geh0 = YKHO.client.post('/users/', nPrm, format='json') YKHO.assertEquals(geh0.content, '{"username":["This field may not be blank."]}') YKHO.assertEquals(geh0.status_code, 400) X9Rj = {'username': '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ZGqr(YKHO, udfG, zONa):\n from app.auth.services import create_user\n mWFP = 'Test User'\n D3lj = 'test_user@email.com'\n jTXt = 'TestPassword'\n CBIr = create_user(mWFP, D3lj, jTXt)\n assert str(CBIr[0]) == 'Email already exists'\n assert CBIr[1] is None", "def NVJo(YKHO):\n nPrm = {...
[ "0.7845611", "0.7818087", "0.77622616", "0.7746485", "0.7708641", "0.7674146", "0.7632353", "0.7544022", "0.75211334", "0.74646163", "0.7449883", "0.7440625", "0.74100125", "0.74058175", "0.73979485", "0.73823833", "0.73635274", "0.7363372", "0.73628557", "0.7362334", "0.7359...
0.0
-1
Test that making a time reminder without a time fails.
def H2dH(YKHO): geh0 = Xhhj(YKHO) nPrm = {'time': '', 'name': 'test without time', 'description': 'we are testing', 'location_descriptor': 'Hogwarts school of oose'} geh0 = YKHO.client.post('/users/7/timereminders/', nPrm, format='json') YKHO.assertEquals(geh0.content, '{"time":["Datetime has wrong form...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def V8F1(YKHO):\n geh0 = Xhhj(YKHO)\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_201_CREATED)\n _rf1 = {'time': '1996-12-05T06:32:00', 'name': 'make a time reminder', 'description': 'this is a test description', 'location_descriptor': 'TEST'}\n geh0 = YKHO.client.post('/users/4/timereminders/', _rf1,...
[ "0.712266", "0.711387", "0.69424605", "0.6857006", "0.6848239", "0.6745597", "0.6712886", "0.6598333", "0.6524846", "0.6518356", "0.6515896", "0.6512047", "0.6484026", "0.64237094", "0.6420337", "0.6405106", "0.63955563", "0.63605374", "0.6310635", "0.6294107", "0.6289064", ...
0.7330367
0
Test that notifications don't display when they're not supposed to.
def YNid(YKHO): geh0 = Xhhj(YKHO) YKHO.assertEqual(geh0.status_code, jGRS.HTTP_201_CREATED) ITS7 = qcWV.datetime.now() uVdj = ITS7 + qcWV.timedelta(0, 7200) jmHs = str(uVdj) uJT9 = jmHs[:-10] a1PO = uJT9[:10] + 'T' + uJT9[11:] _rf1 = {'time': uJT9, 'name': 'make a last resort reminder', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TWVH(YKHO):\n tTpl = CAfg.objects.all()[0]\n bc9O(tTpl.content_type, tTpl.watch_id, 'My Subject', 'My Content', (tTpl.email,))\n NaW5(1, len(cpYK.outbox))", "def rZMG(YKHO):\n for YRbF in range(0, 3):\n f5t3 = LfNE(recipient=YKHO.user, contents='Test notification %i' % YRbF)\n f5t3....
[ "0.776588", "0.7618493", "0.7006292", "0.6937882", "0.6894136", "0.6785878", "0.6775199", "0.66914237", "0.66610336", "0.660593", "0.6605604", "0.65880185", "0.6577619", "0.65683585", "0.6543526", "0.6539626", "0.6506512", "0.65056497", "0.64984107", "0.6494956", "0.6459618",...
0.0
-1
Test that reminders work when assuming highway driving.
def x4cG(YKHO): geh0 = Xhhj(YKHO) YKHO.assertEqual(geh0.status_code, jGRS.HTTP_201_CREATED) ITS7 = qcWV.datetime.now() uVdj = ITS7 + qcWV.timedelta(0, 3540) jmHs = str(uVdj) uJT9 = jmHs[:-10] a1PO = uJT9[:10] + 'T' + uJT9[11:] nPrm = {'time': uJT9, 'name': 'make a last resort reminder ov...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def F6It(YKHO):\n geh0 = Xhhj(YKHO)\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_201_CREATED)\n ITS7 = qcWV.datetime.now()\n uVdj = ITS7 + qcWV.timedelta(0, 2400)\n jmHs = str(uVdj)\n uJT9 = jmHs[:-10]\n a1PO = uJT9[:10] + 'T' + uJT9[11:]\n nPrm = {'time': uJT9, 'name': 'make a last resor...
[ "0.7109132", "0.71060807", "0.70220274", "0.69725275", "0.6856481", "0.6620313", "0.65099704", "0.6481528", "0.6414144", "0.6410519", "0.63727075", "0.6334426", "0.6333604", "0.6325276", "0.63183486", "0.62483245", "0.62451565", "0.6244839", "0.6235966", "0.6227948", "0.62233...
0.70962816
2
Test that we return time based reminders at correct time.
def bTnJ(YKHO): geh0 = Xhhj(YKHO) YKHO.assertEqual(geh0.status_code, jGRS.HTTP_201_CREATED) ITS7 = qcWV.datetime.now() uVdj = ITS7 + qcWV.timedelta(0, 15) jmHs = str(uVdj) uJT9 = jmHs[:-10] a1PO = uJT9[:10] + 'T' + uJT9[11:] nPrm = {'time': uJT9, 'name': 'make a time reminder', 'descript...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def YNid(YKHO):\n geh0 = Xhhj(YKHO)\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_201_CREATED)\n ITS7 = qcWV.datetime.now()\n uVdj = ITS7 + qcWV.timedelta(0, 7200)\n jmHs = str(uVdj)\n uJT9 = jmHs[:-10]\n a1PO = uJT9[:10] + 'T' + uJT9[11:]\n _rf1 = {'time': uJT9, 'name': 'make a last resor...
[ "0.7571559", "0.7471527", "0.7283932", "0.72740346", "0.7233287", "0.7218442", "0.7160294", "0.7156467", "0.69190216", "0.6840683", "0.6766064", "0.66341174", "0.66241467", "0.66110826", "0.65736854", "0.65041596", "0.6485882", "0.6456987", "0.64544815", "0.64464045", "0.6440...
0.5955133
97
Test that login without usernmame or password won't work.
def wGFM(YKHO): geh0 = YKHO.client.post('/api-token-auth/', {}, format='json') YKHO.assertEquals(geh0.content, '{"username":["This field is required."],"password":["This field is required."]}')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _r7T(YKHO):\n dsbO = mv1M.login('testuserbad', 'pass123')\n YKHO.assertFalse(dsbO)", "def CVkz(YKHO):\n Aofo = mv1M.login('', '')\n YKHO.assertEqual(Aofo, fmVn)", "def RYIK(YKHO):\n Z9rn = i9zE()\n MC83 = Z9rn.login(username='test_user', password='yo')\n YKHO.assertFalse(MC83)\n MC8...
[ "0.85352975", "0.84348756", "0.83943486", "0.8333711", "0.82716423", "0.8267442", "0.8242098", "0.8197801", "0.81834346", "0.81778777", "0.8158607", "0.807358", "0.8050943", "0.8033011", "0.7995737", "0.79839003", "0.79686236", "0.7966446", "0.79620326", "0.7940652", "0.79189...
0.7535625
75
Test that login without password won't work.
def siCu(YKHO): nPrm = {'username': 'test.jhu.edu'} geh0 = YKHO.client.post('/api-token-auth/', nPrm, format='json') YKHO.assertEquals(geh0.content, '{"password":["This field is required."]}')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RYIK(YKHO):\n Z9rn = i9zE()\n MC83 = Z9rn.login(username='test_user', password='yo')\n YKHO.assertFalse(MC83)\n MC83 = Z9rn.login(username='best_user', password='secret')\n YKHO.assertFalse(MC83)", "def m0p0(YKHO):\n dsbO = mv1M.login('testuser', 'pass1234toomany')\n YKHO.assertFalse(dsb...
[ "0.8509291", "0.84294015", "0.82982713", "0.82626015", "0.8258336", "0.82134855", "0.8194031", "0.81612724", "0.8104445", "0.8104147", "0.81010014", "0.80919445", "0.8071828", "0.8037466", "0.8020712", "0.8019845", "0.80103236", "0.79823506", "0.7973652", "0.79536295", "0.793...
0.81134146
8
Test that login without username won't work.
def g5WF(YKHO): nPrm = {'password': 'mypassword'} geh0 = YKHO.client.post('/api-token-auth/', nPrm, format='json') YKHO.assertEquals(geh0.content, '{"username":["This field is required."]}')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _r7T(YKHO):\n dsbO = mv1M.login('testuserbad', 'pass123')\n YKHO.assertFalse(dsbO)", "def g5WF(YKHO):\n V9Rh = YKHO.login_user(YKHO.un_named_user_to_login)\n YKHO.assertEqual(V9Rh.status_code, 400)\n YKHO.assertEqual(V9Rh.json()['errors']['email'], ['This field may not be blank.'])", "def xi...
[ "0.8788588", "0.8539779", "0.84620553", "0.84455985", "0.83689475", "0.834636", "0.8340546", "0.8323179", "0.8290879", "0.82392776", "0.82172734", "0.81687546", "0.81666076", "0.8163802", "0.8154263", "0.80522966", "0.8036142", "0.80207825", "0.80085343", "0.79927045", "0.799...
0.78875476
29
Test a successful login.
def Jug3(YKHO): nPrm = {'username': 'myname@jhu.edu', 'password': 'mypassword'} geh0 = YKHO.client.post('/users/', nPrm, format='json') nPrm = {'username': 'myname@jhu.edu', 'password': 'mypassword'} geh0 = YKHO.client.post('/api-token-auth/', nPrm, format='json') YKHO.assertEquals(geh0.status_code,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pUEP(YKHO):\n Z9rn = i9zE()\n MC83 = Z9rn.login(username='test_user', password='secret')\n YKHO.assertTrue(MC83)", "def Pxdh(YKHO) -> None:\n YKHO.login.visit()\n YKHO.login.login(xyx6.Superuser.USERNAME, xyx6.Superuser.PASSWORD)\n assert YKHO.login.driver.current_url == FNGx(path='/')", ...
[ "0.8642734", "0.8640947", "0.86160916", "0.8431325", "0.8391055", "0.83112687", "0.82513446", "0.8247648", "0.8242592", "0.8231679", "0.8231613", "0.82175654", "0.8206908", "0.8205361", "0.8203706", "0.8178879", "0.817673", "0.81733054", "0.81718326", "0.8159316", "0.8159316"...
0.8209448
12
Return tuples of n consecutive elements in iterable as a generator. >>> tups = window([1, 2, 3, 4], 2) >>> next(tups) (1, 2) >>> next(tups) (2, 3) >>> next(tups) (3, 4)
def KnxT(OxJJ, exwG): vexM = MUE7() WhY1 = iter(OxJJ) while True: try: vexM.append(next(WhY1)) if len(vexM) == exwG: yield tuple(vexM) vexM.popleft() except StopIteration: break
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KnxT(Q6uT, exwG=2):\n WhY1 = iter(Q6uT)\n Aofo = tuple(uOgj(WhY1, exwG))\n if len(Aofo) == exwG:\n yield Aofo\n for LihS in WhY1:\n Aofo = Aofo[1:] + (LihS,)\n yield Aofo", "def KnxT(Q6uT, exwG=2):\n WhY1 = iter(Q6uT)\n Aofo = tuple(uOgj(WhY1, exwG))\n if len(Aofo) =...
[ "0.8211181", "0.8211181", "0.8208332", "0.8208332", "0.81872976", "0.80838406", "0.7915056", "0.791412", "0.75317234", "0.7243346", "0.72039276", "0.72016263", "0.7182536", "0.7041502", "0.6891724", "0.6807642", "0.6738493", "0.6664294", "0.6639849", "0.64561063", "0.6451961"...
0.78518194
8
Function to create dataloader objects for training, validation and test datasets.
def UgZ6(tslg, Ep8u, BL0z, NArs): dsE5 = cQtd('debug_mode', NArs['global'], False) btbT = cQtd('ignore_index', NArs['training'], -1) assert tslg.is_dir(), f'Could not locate: {tslg}' assert len([eHNT for eHNT in tslg.glob('**/*.hdf5')]) >= 1, f"Couldn't locate .hdf5 files in {tslg}" eAYh = yU06(samp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _3yi(ppBc, cQKG, Ep8u):\n ppBc = XTiz.array(ppBc)\n cQKG = XTiz.array(cQKG)\n nIKz = x3i3(ppBc, cQKG)\n AHI0 = pVAc(nIKz, batch_size=Ep8u, shuffle=True)\n return AHI0", "def KgqZ(YKHO):\n gzVs = YKHO.get_dataset(YKHO.root, YKHO.dataset.lower(), YKHO.category, YKHO.input_shape)\n gMbG = g...
[ "0.7836011", "0.77698207", "0.7723119", "0.77228117", "0.7717038", "0.7716688", "0.76763713", "0.7672674", "0.7661407", "0.76337624", "0.76307", "0.76125914", "0.7608475", "0.7594557", "0.75719875", "0.7552137", "0.7510214", "0.7505713", "0.7505713", "0.74716216", "0.74664867...
0.7234176
48
Returns the indices of the top_k element per row for a sparse matrix. Considers only the nonzero entries.
def ehxY(WKvO, sWMb): sWMb = oyIN.minimum(sWMb, (WKvO != 0).sum(1).A1) exwG = WKvO.shape[0] f6_R = oyIN.repeat(oyIN.arange(exwG), sWMb) D1Qf = zdF5(WKvO.indices, WKvO.indptr, WKvO.data, sWMb) D1Qf = oyIN.concatenate(D1Qf) TIUs = oyIN.column_stack((f6_R, D1Qf)) return TIUs
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eZOX(SppC, nMvt, jDK_):\n if jDK_ == 0:\n begg = oyIN.arange(SppC.shape[1 - jDK_])\n T4Z5 = oyIN.argpartition(-SppC, nMvt, axis=jDK_)[0:nMvt, :]\n QNDI = SppC[T4Z5, begg]\n gAzU = oyIN.argsort(-QNDI, axis=jDK_)\n fq5K = QNDI[gAzU, begg]\n gAzU = T4Z5[0:nMvt, :][gAzU...
[ "0.7584571", "0.7211153", "0.7164206", "0.71269876", "0.7080463", "0.699455", "0.68905056", "0.6880806", "0.67457575", "0.6686712", "0.6683605", "0.66754293", "0.6650963", "0.66509473", "0.662247", "0.6615393", "0.6600333", "0.65259206", "0.6521755", "0.64787525", "0.6451275"...
0.70747143
5
Computes the propagation matrix (1alpha)(I alpha D^{sigma} A D^{sigma1})^{1}.
def fkX8(eQUr, Cwt5=0.85, WTkW=1, Ziit=None): exwG = eQUr.shape[0] mghH = eQUr.sum(1).A1 QJtj = H4yH.diags(oyIN.power(mghH, -WTkW)) z3BR = H4yH.diags(oyIN.power(mghH, WTkW - 1)) bwxo = H4yH.eye(exwG) - Cwt5 * QJtj @ eQUr @ z3BR Fg_i = oyIN.eye(exwG) if Ziit is not None: Fg_i = Fg_i[:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cN0R(Csk6, kTwQ):\n return -MpoN(Csk6, kTwQ, 1)", "def fkX8(YKHO, aPd6):\n e0Kb = aPd6.size\n fX91 = YKHO.Model.sus.size\n yGTL = Lhel * (1.0 + YKHO.Model.sus)\n nFdY = oyIN.sqrt(aPd6 ** 2 - YKHO.Sensor.omega ** 2 * Lhel * OvLk)\n P6bq = oyIN.sqrt(aPd6[:, None] ** 2 - YKHO.Sensor.omega ** 2...
[ "0.6078855", "0.60099053", "0.59153533", "0.5888138", "0.58182895", "0.577277", "0.57690275", "0.5763193", "0.5709941", "0.56336105", "0.56253797", "0.562247", "0.5609307", "0.5607156", "0.55964416", "0.5556777", "0.5545934", "0.5519962", "0.5519604", "0.55091244", "0.5496121...
0.6840327
0
Patch for string and tuple escaping
async def test_issue_16(UzPC): w2B8 = UzPC Z9rn = await w2B8.cursor() await Z9rn.execute('drop table if exists issue16') await Z9rn.execute('create table issue16 (name varchar(32) primary key, email varchar(32))') try: await Z9rn.execute("insert into issue16 (name, email) values ('pete', 'fl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Cizj(YKHO, *qIxc, **B2fa):\n pass", "def kESA(BWXx: str):\n G7db = \"'\"\n W4uF = '\"'\n NbjQ = BWXx\n if G7db in BWXx and W4uF in BWXx:\n BWXx = BWXx.replace(G7db, '\\\\' + G7db)\n NbjQ = f\"'{BWXx}'\"\n elif G7db in BWXx:\n NbjQ = f'\"{BWXx}\"'\n elif W4uF in BWXx:...
[ "0.69648296", "0.65716875", "0.65310615", "0.64259005", "0.63414884", "0.62814593", "0.6271151", "0.6247503", "0.6079882", "0.6048571", "0.596655", "0.5942303", "0.59397835", "0.5908911", "0.5898073", "0.5891662", "0.58895797", "0.5889381", "0.5841153", "0.58280283", "0.58186...
0.0
-1
Returns remote copy command.
def kJLV(JZXy, pan_, DNHh=None): if Hy7s.environ.get('RSYNC_BINARY'): HCmI = [Hy7s.environ['RSYNC_BINARY'], '-r', '--links'] if DNHh is not None: for ZfUD in DNHh: HCmI.extend(['--exclude', ZfUD]) HCmI.extend([JZXy, pan_]) return HCmI try: neaT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SFhb(YKHO):\n HCmI = 'scp'\n if YKHO.options:\n HCmI = '{} {} {} {}'.format(HCmI, YKHO.options, YKHO.source, YKHO.dest)\n else:\n HCmI = '{} {} {}'.format(HCmI, YKHO.source, YKHO.dest)\n return HCmI", "def m9P1(YKHO, ncbJ, WSuV, kj4l):\n assert ncbJ is not None\n assert WSuV i...
[ "0.72537005", "0.72322714", "0.7182369", "0.68661106", "0.6848141", "0.6543377", "0.64085466", "0.63603944", "0.63596183", "0.625973", "0.6172338", "0.6113702", "0.60399306", "0.6001829", "0.59673136", "0.59665287", "0.59156764", "0.5909506", "0.5885426", "0.58718044", "0.586...
0.74407995
0
Checks if filepath exists.
def nNVN(FPsO, KcEq, pmON): return FPsO(KcEq, 'test -e {}'.format(pmON))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hZSK(YKHO, Ux0P):\n if Hy7s.path.isfile(Ux0P):\n return True\n else:\n return False", "def poxP(VqRE):\n return Hy7s.path.isfile(VqRE)", "def poxP(VqRE: str) -> bool:\n if GkAb(VqRE).is_file():\n return True\n else:\n return False", "def IeRR(pmON):\n return ...
[ "0.8392589", "0.8304647", "0.82372135", "0.82141775", "0.82046777", "0.8197812", "0.81377435", "0.8122893", "0.8112369", "0.8095683", "0.8086303", "0.8079085", "0.8057938", "0.8052348", "0.80508417", "0.8050076", "0.7966925", "0.7961838", "0.7960508", "0.79511863", "0.7944717...
0.0
-1
Create a ``CustomJS`` instance from a Python function. The function is translated to JavaScript using PScript.
def B1xE(Emd4, JfyU): from bokeh.util.deprecation import deprecated deprecated("'from_py_func' is deprecated and will be removed in an eventual 2.0 release. Use CustomJS directly instead.") if not isinstance(JfyU, kI0w): raise ValueError('CustomJS.from_py_func needs function object.') tBxE = K94...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def js_code(YKHO, qaFv: str, OeVk='result.result.value', B2fa=None, vYBr=mXIT):\n qaFv = '(()=>{%s})()' % qaFv\n return await YKHO.js(qaFv, value_path=OeVk, kwargs=B2fa, timeout=vYBr)", "def UVwY(NZQz=None, Dokz=None, **tjNK):\n\n def cXOW(NZQz):\n if isinstance(NZQz, str):\n q2J...
[ "0.63904697", "0.617038", "0.6105474", "0.603536", "0.58798957", "0.5849638", "0.5804336", "0.57789356", "0.5739417", "0.5695253", "0.567372", "0.5629565", "0.55712295", "0.5539617", "0.55299085", "0.5495344", "0.54891557", "0.5458155", "0.54540545", "0.5444881", "0.5411922",...
0.7900152
0
Intersection of two lists of elements
def bsvE(jzdc, Fg_i, Zw78=False): Z9rn = list(set(jzdc) & set(Fg_i)) if Zw78: Z9rn.sort() return Z9rn
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RIsH(jzdc, Fg_i):\n return list(set(jzdc) & set(Fg_i))", "def iQin(jzdc, Fg_i):\n return [geyT for geyT in jzdc if geyT in Fg_i]", "def W9Po(jzdc, Fg_i):\n return list(set(jzdc) & set(Fg_i))", "def zVQj(ssB9, pwdg):\n cB3J = KGJO.List([])\n\n def GDMi(U6D_, cntZ):\n cntZ = KGJO.List...
[ "0.8260724", "0.80371934", "0.79294693", "0.7860056", "0.7838413", "0.7756893", "0.7740409", "0.76789683", "0.7670415", "0.76582515", "0.76582515", "0.76214117", "0.76198846", "0.7617542", "0.7602089", "0.75612295", "0.75612295", "0.75612295", "0.75612295", "0.75612295", "0.7...
0.6716478
85
Returns the client's wallet and network provider.
def kT1P(YKHO) -> uBwj: return YKHO._provider
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dvE_(YKHO):\n return YKHO.wallet", "def dvE_(YKHO):\n raise NotImplementedError", "def dvE_(YKHO):\n return YKHO.http_get(OrYn.INFO_URL)", "def Ob5P(YKHO):\n return YKHO.coin_description.Wallet", "def hGMD(ldlt):\n return ldlt.wallet", "def hGMD(YKHO):\n ZrNc = tHSi()\n cAvH = Zr...
[ "0.6770562", "0.6653513", "0.64987147", "0.64069444", "0.62835616", "0.6197641", "0.60621035", "0.6011532", "0.59703374", "0.5914299", "0.58481807", "0.5846544", "0.5839201", "0.57809335", "0.5771263", "0.56914544", "0.56733507", "0.566619", "0.5662069", "0.56562537", "0.5644...
0.0
-1
Loads the Django application's settings. You can override this method to provide your own loading mechanism. Simply return an instance of your settings module.
def TuHQ(YKHO): mWFP = Hy7s.environ['DJANGO_SETTINGS_MODULE'] B5hb, VlDb = mWFP.rsplit('.', 1) Gcbu, pmON, JBZA = PQrP.find_module(VlDb, [B5hb.replace('.', '/')]) try: return PQrP.load_module(VlDb, Gcbu, pmON, JBZA) finally: if Gcbu: Gcbu.close()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TuHQ(YKHO):\n mWFP = Hy7s.environ['DJANGO_SETTINGS_MODULE']\n B5hb, VlDb = mWFP.rsplit('.', 1)\n Gcbu, pmON, JBZA = PQrP.find_module(VlDb, [B5hb.replace('.', '/')])\n try:\n return PQrP.load_module(VlDb, Gcbu, pmON, JBZA)\n finally:\n if Gcbu:\n Gcbu.close()", "def UaU...
[ "0.7951935", "0.79134303", "0.78268194", "0.7500537", "0.72347975", "0.70507556", "0.7028604", "0.69223225", "0.6886457", "0.68051314", "0.6774816", "0.6765929", "0.6682789", "0.66445875", "0.6548055", "0.65365356", "0.6514615", "0.6505813", "0.64990264", "0.6442221", "0.6393...
0.7942887
1
The original box coordinate output is normalized, i.e [0, 1]. This converts it back to the original coordinate based on the image size.
def h1D9(YKHO, oUSw, H2v2, TVTK): Z_jk = oyIN.zeros_like(oUSw) Z_jk[:, 0] = oUSw[:, 0] * H2v2 Z_jk[:, 1] = oUSw[:, 1] * TVTK Z_jk[:, 2] = oUSw[:, 2] * H2v2 Z_jk[:, 3] = oUSw[:, 3] * TVTK return Z_jk
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def V26d(FlUN, N0ky):\n o4D3, si3g, ajwV, skBL = FlUN\n XcU5, C7Ls = nU6V(N0ky)\n FlUN = (o4D3 / XcU5, si3g / C7Ls, ajwV / XcU5, skBL / C7Ls)\n return FlUN", "def i1YS(LNo8, FlUN):\n h3cg, BQGg, Z3uP, bYzl = FlUN\n nbX2, t4ML = LNo8.shape[:2]\n assert BQGg <= bYzl, 'xmin is greater than xmax...
[ "0.68895507", "0.68823856", "0.6878484", "0.6758262", "0.67034847", "0.6613324", "0.65971166", "0.65668404", "0.64848393", "0.64411837", "0.6426367", "0.6422139", "0.64162266", "0.6411812", "0.6386912", "0.6385492", "0.6353656", "0.6345075", "0.6288712", "0.6288014", "0.62840...
0.0
-1
Sets the learning rate to the initial LR decayed by 10 every 30 epochs
def e_63(gCuF, K0do, YPaw, AIZ9): Rf07 = gCuF.reduction_factor ** (1.0 / AIZ9) tspZ = gCuF.learning_rate * (1.0 / Rf07) ** YPaw for Lwm5 in K0do.param_groups: Lwm5['lr'] = tspZ return tspZ
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def e_63(K0do, qtWj):\n nIX4 = nIX4 * 0.1 ** ((qtWj - 117) // 30)", "def e_63(K0do, qtWj, qIxc):\n tspZ = qIxc.lr * 0.1 ** (qtWj // 30)\n K0do.state_dict()['param_groups'][-1]['lr'] = tspZ", "def e_63(ma4o, K0do, qtWj, ctbl):\n tspZ = ma4o * 0.1 ** (qtWj // int(epAf.ceil(30.0 / ctbl)))\n for Lwm...
[ "0.7991837", "0.7940576", "0.78895533", "0.78278863", "0.7822731", "0.78170556", "0.7810941", "0.78027624", "0.77914375", "0.7788607", "0.7782131", "0.7765793", "0.77645", "0.77609223", "0.7749379", "0.7739108", "0.7731853", "0.77242327", "0.77121335", "0.7708826", "0.7704794...
0.0
-1
Return a datetime representing the current selected date.
def SuM2(YKHO): if not YKHO._selection: return else: lO87, x0eS = (YKHO._date.year, YKHO._date.month) return YKHO.datetime(lO87, x0eS, int(YKHO._selection[0]))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def m6Z7():\n rg4j = qcWV.today()\n return rg4j", "def N7Tw(YKHO):\n _c1T = qcWV.date.today().timetuple()[:3]\n return _c1T", "def B72W(YKHO):\n YKHO.current_date = qcWV.now().strftime('%Y-%m-%d %H:%M:%S')\n return YKHO.current_date", "def m6Z7(YKHO):\n yo7_ = JRYC.datetime.now()\n re...
[ "0.7820717", "0.76426727", "0.7489953", "0.7351591", "0.7315397", "0.7284024", "0.7284024", "0.7173089", "0.7160128", "0.71477294", "0.71331155", "0.7026517", "0.70260996", "0.699085", "0.6982293", "0.69310194", "0.6919505", "0.69174236", "0.68886364", "0.6882679", "0.6853155...
0.7065414
11
Construct a TensorFlow feed dictionary from a sample batch.
def vzKO(YKHO, dfHy, Wc9F): YorA = PWgb(Wc9F) o5BS = PWgb(YKHO._placeholders) jpYY = {o5BS[H5ew]: YorA[H5ew] for H5ew in o5BS.keys() if H5ew in YorA.keys()} jpYY[YKHO._placeholders['rewards']] = oyIN.zeros(Wc9F['rewards'].shape) yN5Y = YKHO._get_goal_feed_dict(batch_size=YorA[next(iter(YorA))].shape...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _AyZ(C3ST, Wc9F):\n kdJa = {C3ST.x: Wc9F[0], C3ST.y: Wc9F[1], C3ST.keep_prob: 0.5}\n return kdJa", "def Ozfc(YKHO, InGT, A9AF, YajY):\n kdJa = {YKHO.inputs_placeholder: InGT, YKHO.seq_lens_placeholder: YajY}\n if YKHO.mode == 'train':\n kdJa[YKHO.targets_placeholder] = A9AF\n return kdJ...
[ "0.7451793", "0.7263594", "0.723339", "0.71480715", "0.706301", "0.7020541", "0.6985542", "0.6985182", "0.69587475", "0.68675923", "0.6777799", "0.67474395", "0.6738549", "0.66459566", "0.66316694", "0.6626958", "0.6577981", "0.65654695", "0.6557393", "0.65472406", "0.6539946...
0.68364465
10
Perform forward step in the neural network.
def pftB(YKHO, WKvO): jzdc = WKvO YKHO.memory['a0'] = jzdc for YRbF, gEmA in enumerate(YKHO.layers, start=1): eGwT = jzdc hYvg = gEmA['activation'] QfV9 = YKHO.activation_function(hYvg) yzQ0 = YKHO.param_values['w' + str(YRbF)] Fg_i = YKHO.param_values['b' + str(YRbF)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KVH6(YKHO):\n YKHO.fake, YKHO.latent_i, YKHO.latent_o = YKHO.netg(YKHO.input)\n YKHO.pred_real, YKHO.feat_real = YKHO.netd(YKHO.input)\n YKHO.pred_fake, YKHO.feat_fake = YKHO.netd(YKHO.fake.detach())", "def RHoK(YKHO, EcVT: np.ndarray) -> oyIN.ndarray:\n return yvT9", "def ug5M(YKHO, EcVT):\n ...
[ "0.7529063", "0.7446618", "0.7397021", "0.73690605", "0.73328835", "0.7310731", "0.7310731", "0.73061174", "0.72702825", "0.72366", "0.7233209", "0.7227693", "0.7202093", "0.7161567", "0.7139786", "0.7123488", "0.71179694", "0.70879364", "0.70722795", "0.7069895", "0.70534563...
0.6827205
57
Update of weights in every layer based on stored gradients.
def NPKv(YKHO): for YRbF, bGrB in enumerate(YKHO.layers, start=1): vBj5 = YKHO.grad_values['dcost_w' + str(YRbF)] Ud1c = YKHO.grad_values['dcost_b' + str(YRbF)] YKHO.param_values['w' + str(YRbF)] -= YKHO.lr * vBj5 YKHO.param_values['b' + str(YRbF)] -= YKHO.lr * Ud1c.sum(axis=0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MyUA(YKHO):\n for Zxma in Ni9Y(len(YKHO.weights)):\n for YRbF in Ni9Y(len(YKHO.weights[Zxma])):\n for r845 in Ni9Y(len(YKHO.weights[Zxma][YRbF])):\n YKHO.weights[Zxma][YRbF][r845] -= YKHO.learn_rate * YKHO.weight_gradients[Zxma][YRbF][r845]", "def MyUA(YKHO):\n fhcK = [...
[ "0.84160155", "0.8139034", "0.8015744", "0.77602047", "0.7732226", "0.7636019", "0.76107675", "0.7525292", "0.75219554", "0.74977523", "0.7444381", "0.7427451", "0.73867136", "0.738521", "0.7371003", "0.73371947", "0.7313745", "0.7268787", "0.7226455", "0.71897024", "0.715046...
0.86270785
0
Return the Config option based on environment variables. If override_default is passed, that configuration is used instead. If there is no match or nothing set then the environment defaults to 'dev'.
def tgzD(rGYF=None): if rGYF is None: GikI = Hy7s.environ.get('FM_API_CONFIG', default='dev') else: GikI = rGYF if GikI == 'dev': return Yv3P if GikI == 'prod': return sToe if GikI == 'test': return LV7V return Yv3P
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tgzD(IH1p, WmM4):\n if IH1p is not None:\n BWXx = Hy7s.environ.get(IH1p, None)\n if BWXx is not None:\n return BWXx\n return WmM4", "def yVun(MTKo: dict) -> ImMB:\n return Ypqz.get(MTKo['config_key'], MTKo['default'])", "def tgzD():\n try:\n sEAN = Cu40('RUN_ENV'...
[ "0.71795905", "0.6981715", "0.69283944", "0.67256826", "0.67167205", "0.66760564", "0.66429025", "0.66051966", "0.6503507", "0.6475587", "0.6458864", "0.64342076", "0.64257586", "0.6421974", "0.6415186", "0.6414187", "0.6406097", "0.6378725", "0.636275", "0.63433135", "0.6341...
0.83569324
0
``torch.nn.functional.log_softmax(vector)`` does not work if some elements of ``vector`` should be masked. This performs a log_softmax on just the nonmasked portions of ``vector``. Passing ``None`` in for the mask is also acceptable; you'll just get a regular log_softmax. ``vector`` can have an arbitrary number of dime...
def n1Tc(iArr: torch.Tensor, ZHfW: torch.Tensor, tpio: int=-1) -> ht2j.Tensor: if ZHfW is not None: ZHfW = ZHfW.float() while ZHfW.dim() < iArr.dim(): ZHfW = ZHfW.unsqueeze(1) iArr = iArr + (ZHfW + 1e-45).log() return ht2j.nn.functional.log_softmax(iArr, dim=tpio)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Ibo7(iArr: torch.Tensor, ZHfW: torch.BoolTensor, tpio: int=-1, vf0w: bool=False) -> ht2j.Tensor:\n if ZHfW is None:\n Aofo = ht2j.nn.functional.softmax(iArr, dim=tpio)\n else:\n while ZHfW.dim() < iArr.dim():\n ZHfW = ZHfW.unsqueeze(1)\n if not vf0w:\n Aofo = ht...
[ "0.77986103", "0.7566264", "0.7272041", "0.71280867", "0.7101164", "0.7101164", "0.7101164", "0.7101164", "0.7101164", "0.7098993", "0.70078087", "0.6796153", "0.6704498", "0.670391", "0.66618866", "0.66165185", "0.65707856", "0.65392685", "0.6470162", "0.6416407", "0.6413205...
0.8881014
0
Return whether the stroke has been smoothed already or not.
def mF5X(YKHO): return YKHO._is_smoothed
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kNVk(YKHO):\n if not YKHO.in_stroke():\n return False\n if YKHO.count < YKHO.min_count:\n return False\n if XAQN.trace('in_stroke'):\n XAQN.lg('stroke_count=%d, x=%d, y=%d xlen=%d ylen=%d' % (YKHO.count, YKHO.x, YKHO.y, YKHO.xlen, YKHO.ylen))\n if YKHO.part.is_edge():\n ...
[ "0.7115451", "0.654724", "0.6430204", "0.62810016", "0.62810016", "0.62467337", "0.61367834", "0.5991857", "0.59717226", "0.59440243", "0.594323", "0.5866024", "0.5866024", "0.5866024", "0.5866024", "0.5848339", "0.5833493", "0.58191234", "0.57507217", "0.5743503", "0.5741396...
0.8008571
0
Given the two sets, returns their intersection.
def iQin(YVv6, rA0f): return YVv6 & rA0f
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iQin(lNWu):\n return xBlr.reduce(set.intersection, [KCHu for KCHu in lNWu])", "def iQin(MWrr, MOlU):\n return [YRbF for YRbF in MWrr if YRbF in MOlU]", "def iQin(YKHO, rA0f):\n XMlP = zA7d()\n for YRbF in YKHO:\n if YRbF in rA0f and YRbF not in XMlP:\n XMlP.add(YRbF)\n retu...
[ "0.8473983", "0.8450384", "0.8246959", "0.8160835", "0.81059057", "0.80907935", "0.7986594", "0.786696", "0.78175396", "0.7805922", "0.7787706", "0.7787706", "0.77553463", "0.7746811", "0.7746811", "0.7746811", "0.7746811", "0.7746811", "0.77428126", "0.7740088", "0.77167076"...
0.8622553
0
Given the two sets, returns set1 set2.
def VLpm(YVv6, rA0f): return YVv6 - rA0f
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def b65I(MWrr, MOlU):\n so93 = [YRbF for YRbF in MWrr] + [YRbF for YRbF in MOlU]\n return LMFB(so93)", "def b65I(YKHO, rA0f):\n b65I = zA7d()\n for YRbF in YKHO:\n if YRbF not in b65I:\n b65I.add(YRbF)\n for YRbF in rA0f:\n if YRbF not in b65I:\n b65I.add(YRbF)\...
[ "0.8003292", "0.7659741", "0.7442108", "0.73107415", "0.7257998", "0.72443646", "0.71996385", "0.717787", "0.7116206", "0.711006", "0.7077526", "0.6897204", "0.6880892", "0.687987", "0.6841639", "0.68158543", "0.67878115", "0.6777944", "0.6766006", "0.6752729", "0.6742798", ...
0.6987762
11
Returns a decorator. For the given argument names, the decorator converts the arguments into NeuronCriteria objects via ``copy_as_neuroncriteria()``. If the decorated function also accepts a 'client' argument, that argument is used to initialize the NeuronCriteria.
def I0PJ(*wT3J): def mrMx(eHNT): @xBlr.wraps(eHNT) def h3Xc(*qIxc, **B2fa): aBy1 = tq_1.getcallargs(eHNT, *qIxc, **B2fa) for mWFP in wT3J: aBy1[mWFP] = xI4p(aBy1[mWFP], aBy1.get('client', None)) return eHNT(**aBy1) h3Xc.__signature__ = tq...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KQ9O(**BJsk):\n\n def mrMx(JfyU):\n\n def _gRY(*qIxc, **B2fa):\n YXmU = jth9(BJsk)\n YXmU.update(B2fa)\n return JfyU(*qIxc, **YXmU)\n return _gRY\n return mrMx", "def oQ6x(*xzxA):\n\n def xv2J(JfyU):\n setattr(JfyU, '__is_behavior__', True)\n ...
[ "0.5773402", "0.56254697", "0.5603208", "0.55746895", "0.54491675", "0.5404544", "0.53161114", "0.5296967", "0.5266397", "0.52353877", "0.52281165", "0.5166291", "0.5143999", "0.50938004", "0.5089342", "0.5080787", "0.50288767", "0.5021202", "0.50202525", "0.50163525", "0.499...
0.8337663
0
If the given argument is a NeuronCriteria object, copy it. Otherwise, attempt to construct a NeuronCriteria object, using the argument as either the bodyId or the type AND instance.
def xI4p(YEnM, x0hE=None): if isinstance(YEnM, rLdf.DataFrame): assert 'bodyId' in YEnM.columns, 'If passing a DataFrame as NeuronCriteria, it must have "bodyId" column' return k2C5(bodyId=YEnM['bodyId'].values, client=x0hE) if YEnM is None: return k2C5(client=x0hE) if isinstance(YEn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO, c4jb='n', *, MbAA=None, KAOR=None, type=None, njyT=False, jGRS=None, N2Dn=None, AvJO=0, Bi_9=0, pJTG=None, oI99=None, lzie=None, mtmy=1, IYqC=1, UXqs='Neuron', YT31='all', x0hE=None):\n assert isinstance(c4jb, str), f'Bad matchvar argument (should be str): {c4jb}. Did you mean to pass this as bod...
[ "0.5491136", "0.5446771", "0.52992564", "0.5285532", "0.52203465", "0.50975156", "0.5083796", "0.50634825", "0.49501303", "0.49412134", "0.4939093", "0.49324462", "0.48680872", "0.48641336", "0.48581266", "0.48236942", "0.47918597", "0.47861528", "0.47856203", "0.47677627", "...
0.76099247
0
Construct the ```WITH...WHERE``` statements that apply the "directed ROI" conditions specified by this criteria's ``inputRois`` and ``outputRois`` members. These conditions are expensive to evaluate, so it's usually a good idea to position them LAST in your cypher query, once the result set has already been narrowed do...
def uNpI(YKHO, *vars, y0cW=0, Tj1O=True): if not YKHO.inputRois and (not YKHO.outputRois): return '' if isinstance(y0cW, int): y0cW = y0cW * ' ' if len(YKHO.inputRois) == 0: USrB = 0 elif YKHO.roi_req == 'any': USrB = 1 elif YKHO.roi_req == 'all': USrB = 'size...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uNpI(YKHO, *vars, y0cW=0, Tj1O=True):\n if not YKHO.inputRois and (not YKHO.outputRois):\n return ''\n if isinstance(y0cW, int):\n y0cW = y0cW * ' '\n if len(YKHO.inputRois) == 0:\n USrB = 0\n elif YKHO.roi_req == 'any':\n USrB = 1\n elif YKHO.roi_req == 'all':\n ...
[ "0.64850396", "0.53236", "0.52047086", "0.51398534", "0.5118506", "0.5048707", "0.5004183", "0.49839008", "0.49598923", "0.49495623", "0.4929303", "0.48891178", "0.48834437", "0.48831397", "0.48457408", "0.48336178", "0.48311594", "0.48285127", "0.48040602", "0.4784744", "0.4...
0.64668036
1
Return an expression to match a particular field against a list of values, to be used within the WHERE clause.
def FO_w(Jyyj, hkxX, njyT=False, c4jb='n', LUJe=None): assert isinstance(hkxX, g760.abc.Iterable), f'Please pass a list or a variable name, not {hkxX}' assert LUJe is None or isinstance(LUJe, str) assert not njyT or not LUJe, 'valuevar is not allowed if using a regex' if len(hkxX) == 0: return '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FO_w(Jyyj, hkxX, njyT=False, c4jb='n'):\n assert not njyT or len(hkxX) <= 1, f\"Can't use regex mode with more than one value: {hkxX}\"\n if len(hkxX) == 0:\n return ''\n if len(hkxX) > 1:\n return f'{c4jb}.{Jyyj} in {[*hkxX]}'\n if njyT:\n return f\"{c4jb}.{Jyyj} =~ '{hkxX[0]}...
[ "0.7360815", "0.6989208", "0.68751913", "0.6865255", "0.63377887", "0.6230191", "0.61843455", "0.6156243", "0.61460507", "0.61036325", "0.60742116", "0.6017575", "0.5923178", "0.5866802", "0.5866802", "0.583503", "0.5739722", "0.5589132", "0.55864275", "0.5570474", "0.5556347...
0.73112994
1
True if vector x is monotonically ascendent, false otherwise
def NypO(WKvO): return oyIN.alltrue(oyIN.greater_equal(WKvO[1:], WKvO[0:-1]))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def m2jG(WKvO):\n ezF6 = oyIN.ediff1d(WKvO)\n return oyIN.all(ezF6 > 0)", "def n_ei(YKHO):\n cntZ = True\n THkp = None\n for YRbF in range(len(YKHO)):\n if not YKHO.getmask(YRbF):\n jvSB = YKHO.getdata(YRbF)\n if not cntZ:\n if THkp > jvSB:\n ...
[ "0.7129598", "0.6955636", "0.6942834", "0.67212903", "0.6623918", "0.6507611", "0.64650375", "0.64243925", "0.6403306", "0.63685125", "0.63594747", "0.6291069", "0.6276305", "0.6265155", "0.6256652", "0.6228541", "0.6216129", "0.6202627", "0.60967606", "0.60733116", "0.605244...
0.7679744
0
Returns the error function erf(x) erf(x)=2/np.sqrt(pi)\int_0^x \int e^t^2 dt
def tVah(WKvO): return 1.0 - zd5H(WKvO)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tVah(WKvO):\n jzdc = 2 / mM0K ** (1 / 2)\n Fg_i = WKvO - WKvO ** 3 / 3 + WKvO ** 5 / 10 - WKvO ** 7 / 42 + WKvO ** 9 / 216\n return jzdc * Fg_i", "def tVah(YKHO, WKvO):\n return 2 / WGTe.pi ** 0.5 * (WKvO - WKvO ** 3 / 3 + WKvO ** 5 / 10 - WKvO ** 7 / 42 + WKvO ** 9 / 216)", "def tVah(WKvO):\n ...
[ "0.7788388", "0.7648937", "0.76227427", "0.7590787", "0.7509205", "0.7449545", "0.7343038", "0.68990535", "0.6779", "0.662319", "0.6533085", "0.6500451", "0.6498402", "0.6402474", "0.6392793", "0.6362703", "0.62953174", "0.6274972", "0.6257602", "0.6242408", "0.62355757", "...
0.74940217
5
Calculates the x sigma value corresponding to p p=int_{x}^{+x} g(x) dx
def cqvd(XP5J): if XP5J < 0.0 or XP5J > 1.0: print('Wrong value for p(', XP5J, ')!') HwRy.exit() YPaw = 1e-05 ohxs = oyIN.arange(0.0, 4.0 + YPaw, YPaw) mmCC = 1.0 / oyIN.sqrt(2.0 * oyIN.pi) * oyIN.exp(awRs(-ohxs ** 2, 2.0)) jBSs = oyIN.add.accumulate(mmCC) * YPaw XP5J = awRs(XP5J...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IAWS(WKvO, nJ9F, WTkW):\n return oyIN.exp(-((WKvO - nJ9F) / WTkW) ** 2 / 2.0)", "def xkW5(WKvO):\n return kLQb(WKvO) / (1 + kLQb(WKvO)) ** 2", "def xkW5(WKvO):\n return kLQb(WKvO) / (1 + kLQb(WKvO)) ** 2", "def IAWS(WKvO, yGTL: float=0.0, WTkW: float=1.0) -> int:\n return 1 / PZyS(2 * mM0K * ...
[ "0.6990774", "0.68902725", "0.68902725", "0.688899", "0.6871667", "0.6841309", "0.6821648", "0.6819157", "0.67906994", "0.67878366", "0.67686296", "0.6750258", "0.6742156", "0.67375046", "0.66826385", "0.66751647", "0.66595924", "0.66121936", "0.6600476", "0.6595698", "0.6590...
0.0
-1
Configure the sensors with the default settings and state. For use after calling `reset()`
def uIcm(YKHO): YKHO._set_calibration_consts() YKHO.pressure_resolution = Q0SE.OSR_8192 YKHO.humidity_resolution = sOO7.OSR_4096
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qAjc(YKHO):\n uBeC: int = (YKHO.__filterCoeff << 1) + (YKHO.__standbyTime << 1 + 3)\n YKHO.write_single_byte(X8ij.CONFIG, uBeC)\n cFpO: int = YKHO.__powerMode + (YKHO.__pressureMode << 2) + (YKHO.__temperatureMode << 2 + 3)\n YKHO.write_single_byte(X8ij.CONTROL, cFpO)\n rqMl = YKHO.read_multiple...
[ "0.70963424", "0.7003466", "0.6814152", "0.6724032", "0.65474564", "0.64794314", "0.64794314", "0.64794314", "0.64794314", "0.64794314", "0.64794314", "0.64794314", "0.64794314", "0.6440666", "0.64358646", "0.64358646", "0.64358646", "0.64358646", "0.63601077", "0.634057", "0...
0.0
-1
Pressure and Temperature, measured at the same time
def FWQV(YKHO): LBto, YjU2 = YKHO._read_temp_pressure() YKHO._scale_temp_pressure(LBto, YjU2) return (YKHO._temperature, YKHO._pressure)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ovGo(YKHO):\n return YKHO.pressure_and_temperature[0]", "def diNy(nPrm):\n ITS7 = nPrm[:, 0]\n W8O1 = nPrm[:, 3]\n UsF5 = nPrm[:, 5]\n return (ITS7, W8O1, UsF5)", "def ovGo(YKHO) -> float:\n YKHO.measurement(Np2f)\n YKHO._measurement = 0\n ITS7.sleep(0.05)\n return YKHO._data() *...
[ "0.70270705", "0.699166", "0.69491774", "0.6935941", "0.6920407", "0.69153535", "0.6815268", "0.68068033", "0.6786429", "0.6750981", "0.67400974", "0.6731845", "0.66859937", "0.66803235", "0.6644177", "0.6639952", "0.6617699", "0.66127604", "0.660516", "0.6591199", "0.6586694...
0.72127295
0
The current relative humidity in % rH
def phmJ(YKHO): YKHO._buffer[0] = Oc8v with YKHO.humidity_i2c_device as OFQE: OFQE.write(YKHO._buffer, end=1) N5MO(0.016) with YKHO.humidity_i2c_device as OFQE: OFQE.readinto(YKHO._buffer, end=3) ECuc = Z0GS('>H', YKHO._buffer)[0] NhEL = Z0GS('>B', YKHO._buffer, offset=2)[0] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def phmJ(YKHO) -> float:\n YKHO.measurement(I0Hj)\n YKHO._measurement = 0\n ITS7.sleep(0.016)\n return YKHO._data() * 125.0 / 65536.0 - 6.0", "def phmJ(YKHO) -> float:\n return YKHO.humidity", "def phmJ(YKHO) -> float:\n return YKHO.humidity", "def phmJ(YKHO):\n YKHO._readdata()\n ret...
[ "0.7938988", "0.78366685", "0.78366685", "0.77644616", "0.77329797", "0.7678238", "0.7619531", "0.75705796", "0.75569826", "0.7512288", "0.7464011", "0.7459173", "0.74510795", "0.73340183", "0.7310884", "0.7307324", "0.72860676", "0.72771114", "0.7235482", "0.7235482", "0.723...
0.71147513
27
The humidity sensor's measurement resolution
def IVGs(YKHO): return YKHO._humidity_resolution
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dU0H(YKHO) -> float:\n YKHO._perform_reading()\n BmBh = (YKHO._t_fine * 5 + 128) / 256\n CIn9 = YKHO._adc_hum - YKHO._humidity_calibration[0] * 16 - BmBh * YKHO._humidity_calibration[2] / 200\n AhCl = YKHO._humidity_calibration[1] * (BmBh * YKHO._humidity_calibration[3] / 100 + BmBh * (BmBh * YKHO....
[ "0.78777623", "0.76921135", "0.75513774", "0.7516911", "0.74032253", "0.7390406", "0.7388537", "0.73832947", "0.73808557", "0.7377004", "0.7359714", "0.7353337", "0.7353337", "0.7348833", "0.7270112", "0.7159369", "0.71454275", "0.71452016", "0.7121497", "0.7120103", "0.71182...
0.83753
0
Returns a tensor stored in preprocess_vars_cache or using generator_func. If the tensor was previously generated and appears in the PreprocessorCache, the previously generated tensor will be returned. Otherwise, a new tensor is generated using generator_func and stored in the cache.
def e6VR(bfrC, koa4, zdN8, H5ew=''): if zdN8 is not None: SRYB = zdN8.get(koa4, H5ew) if SRYB is None: SRYB = bfrC() zdN8.update(koa4, H5ew, SRYB) else: SRYB = bfrC() return SRYB
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def j4_O(YKHO):\n YKHO.skipTest('b/149094965')\n\n class Context(object):\n \"\"\"Context class for demonstrating the issue.\"\"\"\n\n def FIMM(YKHO):\n YKHO._cached_value = None\n\n def eHNT(YKHO, WKvO):\n Aofo = WKvO + 1\n if YKHO._cached_value is not N...
[ "0.60778695", "0.5914474", "0.5798639", "0.54889303", "0.5369692", "0.53254974", "0.5314716", "0.520346", "0.51934355", "0.5183958", "0.5173412", "0.51642185", "0.5135371", "0.5132098", "0.51152515", "0.511153", "0.50989914", "0.5078557", "0.5053907", "0.50523233", "0.5049507...
0.73296946
0
Takes a picture and saves it to the file system. Asserts that there is a file where the picture was saved.
def icc7(YKHO): YKHO.testCam.take_picture() YKHO.assertTrue(Hy7s.path.isfile(YKHO.testCam.latest_capture))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aZBm(YKHO):\n YKHO.assertTrue(True)", "def n3w5(Tz44, VqRE):\n \"\"\"Note that the filepath on Windows is a bit buggy, and ''s after the User\n account name need to be double slashes.\"\"\"\n eHNT = open(VqRE, 'wb')\n eHNT.write(Tz44)\n eHNT.close()\n \"Note, if the file is corru...
[ "0.7396467", "0.694401", "0.6916377", "0.68905187", "0.68837893", "0.6880302", "0.6687972", "0.6627534", "0.6609136", "0.66065276", "0.66010916", "0.65885836", "0.6547872", "0.6444241", "0.6407097", "0.638839", "0.63636714", "0.63618016", "0.63374025", "0.6324071", "0.6310546...
0.7089485
1
Compute the softmax of each element along an axis of X.
def N93T(YKHO, EcVT, q7In=1.0, jDK_=None): LVAh = oyIN.atleast_2d(EcVT) if jDK_ is None: jDK_ = next((r845[0] for r845 in enumerate(LVAh.shape) if r845[1] > 1)) LVAh = LVAh * float(q7In) LVAh = LVAh - oyIN.expand_dims(oyIN.max(LVAh, axis=jDK_), jDK_) LVAh = oyIN.exp(LVAh) GM4D = oyIN.exp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def N93T(WKvO):\n WKvO = oyIN.transpose(WKvO)\n return oyIN.transpose(oyIN.exp(WKvO) / oyIN.sum(oyIN.exp(WKvO), axis=0))", "def N93T(WKvO):\n if WKvO.ndim == 1:\n uw5A = oyIN.exp(WKvO - oyIN.max(WKvO))\n return uw5A / uw5A.sum(axis=0)\n else:\n uw5A = oyIN.exp(WKvO.T - oyIN.max(W...
[ "0.85829306", "0.85623956", "0.8485314", "0.8471719", "0.8463859", "0.84578127", "0.8438464", "0.84282345", "0.8422317", "0.83954877", "0.8395339", "0.83913296", "0.83822906", "0.83557016", "0.8347192", "0.8332008", "0.83197165", "0.8319276", "0.8315076", "0.8313633", "0.8312...
0.0
-1
Returns the length of a vector
def u54L(Ty9i): return epAf.sqrt(pxL1(Ty9i, Ty9i))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def i1gc(iArr):\n return oyIN.sqrt(oyIN.sum(oyIN.square(iArr)))", "def i1gc(Ty9i):\n return oyIN.sqrt(oyIN.sum(oyIN.square(Ty9i)))", "def LDcD(iArr):\n zX1d = oyIN.array(iArr) ** 2\n y0lJ = zX1d.sum()\n LDcD = oyIN.sqrt(y0lJ)\n return LDcD", "def Bq2S(iArr):\n i1gc = epAf.sqrt(oyIN.dot(i...
[ "0.86639863", "0.8648299", "0.83666146", "0.83394945", "0.831263", "0.82732785", "0.82447", "0.82368684", "0.8211464", "0.8194457", "0.80704963", "0.8058566", "0.8045441", "0.8024629", "0.79951924", "0.7968428", "0.79578555", "0.7904601", "0.7899597", "0.7890239", "0.78683144...
0.80554616
12
Returns the euklidian distance of two vectors
def ycqS(hQHm, jlSq): return oyIN.linalg.norm([YRbF - r845 for YRbF in hQHm for r845 in jlSq])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dFfD(WKvO, LVAh):\n if len(WKvO) != len(LVAh):\n raise SyntaxError('Vectors must all be the same length')\n return epAf.sqrt(sum([(WKvO[YRbF] - LVAh[YRbF]) ** 2 for YRbF in range(len(WKvO))]))", "def XouW(ENWa, ZoT5):\n MWGM = 0\n if len(ENWa) == len(ZoT5):\n fL9k = zip(ENWa, ZoT5)\...
[ "0.83255744", "0.7900814", "0.7894143", "0.7851151", "0.78220534", "0.7742752", "0.7742752", "0.77287686", "0.77232033", "0.7711151", "0.7695119", "0.7685627", "0.7678674", "0.76642525", "0.7639129", "0.76344436", "0.7629133", "0.7623636", "0.7622736", "0.7605008", "0.7603277...
0.77426857
7
Generate a random string of length `length` using ascii uppercase chars.
def e7Tf(u54L=8): return ''.join((tuKI.choice(vIwR.ascii_uppercase) for WKvO in range(u54L)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BWvy(u54L=6):\n return ''.join((tuKI.choice(vIwR.ascii_uppercase) for bGrB in range(u54L)))", "def e7Tf(u54L):\n KoG3 = vIwR.ascii_letters\n dEzN = ''.join((tuKI.choice(KoG3) for YRbF in range(u54L)))\n return dEzN", "def lx9M(u54L):\n return ''.join((tuKI.choice(vIwR.ascii_lowercase) for bG...
[ "0.8543201", "0.84268886", "0.8397868", "0.83315617", "0.82796586", "0.8252446", "0.82316357", "0.81600004", "0.81338215", "0.8114357", "0.81113803", "0.8109805", "0.8089764", "0.80851966", "0.803307", "0.8024754", "0.7999092", "0.79828227", "0.7979466", "0.7976673", "0.79644...
0.86656857
0
total sales per product
def LeF4(YKHO, QePW, *qIxc, **B2fa): wzkt = qcWV.datetime.now() lO87 = YKHO.request.GET.get('year', wzkt.year) xDcj = YKHO.request.query_params.get('q') geh0 = YKHO.get_total_sales(lO87, xDcj) return oGir({'result': geh0, 'num_pages': 1})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def m4UP():\n iDov.objects.all().delete()\n Ldyl = {}\n for bSsb in diXh.objects.filter(product__isnull=False):\n if bSsb.product.is_variant():\n Lx3t = bSsb.product.parent\n if Lx3t is None:\n continue\n else:\n Lx3t = bSsb.product\n if...
[ "0.8213919", "0.75945336", "0.73971885", "0.73043555", "0.7215661", "0.697823", "0.6901951", "0.68531686", "0.6822272", "0.6755909", "0.6751535", "0.6719994", "0.6621266", "0.6616159", "0.65854144", "0.65642536", "0.6507319", "0.6475126", "0.6474776", "0.6470158", "0.6436198"...
0.6410546
22
Returns current rank of given player
async def get_ranks(YKHO, KwDD, n10L: int): sWzk, TS6x = (None, None) for rdlD in KwDD[1:]: if int(rdlD[xrXl - 1]) == n10L: sWzk = rdlD[a901 - 1] TS6x = rdlD[aGND - 1] break return (sWzk, TS6x)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eIZX(YKHO):\n if not YKHO.attributes.get('playerRank'):\n YKHO._sessionAttributes['playerRank'] = '00'\n return YKHO._sessionAttributes['playerRank']", "def heCU(YKHO):\n HRrY = uwaB.RANKS[uwaB.PLAYERS_LIST_DATABASES[YKHO.database]['ranks_country']]\n for OzkW, fdMZ in HRrY.items():\n ...
[ "0.7628121", "0.7579795", "0.74449205", "0.74111456", "0.7385567", "0.7342303", "0.7279836", "0.72429985", "0.7130717", "0.6948944", "0.69411016", "0.68701696", "0.68628913", "0.684094", "0.6837264", "0.68330306", "0.683125", "0.6814203", "0.68110824", "0.6802351", "0.6802351...
0.0
-1
Get the array of fields used in the songs table
def oPTu(): return ['song_id', 'title', 'artist_id', 'year', 'duration']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def k0vB(YKHO):\n with YKHO.con:\n DpUl = YKHO.con.cursor(_ig9.cursors.DictCursor)\n DpUl.execute('SELECT * FROM Songs WHERE Songs.Usable LIKE 1')\n Ylbp = DpUl.fetchall()\n for Csk6 in Ylbp:\n Csk6['File_Path'] = YKHO.unescape(Csk6['File_Path'])\n Csk6['Artist'...
[ "0.6922006", "0.6868431", "0.6839789", "0.6785034", "0.6757858", "0.6757858", "0.67334497", "0.66366905", "0.66262376", "0.66185343", "0.65807736", "0.6521955", "0.6504391", "0.6489958", "0.6484212", "0.64783746", "0.6454801", "0.6454652", "0.64420617", "0.64353186", "0.64027...
0.6408047
20
Get the array of fields used in the artists table
def QkX9(): return ['artist_id', 'artist_name as artist', 'artist_latitude as latitude', 'artist_longitude as longitude', 'artist_location as location']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TnMw(YKHO, k9X4):\n xDcj = 'desc {t}'.format(t=k9X4)\n Ylbp = YKHO.get_query(xDcj)\n return [ETu_['Field'] for ETu_ in Ylbp]", "def V_D6(YKHO):\n fqao = []\n for tbxe in u7qe.objects.filter(documentation=YKHO):\n fqao.append(tbxe.field)\n return fqao", "def V_D6(YKHO):\n raise N...
[ "0.67164105", "0.6529767", "0.65110135", "0.65044594", "0.6494725", "0.6258838", "0.62207204", "0.62040544", "0.6191296", "0.61861575", "0.61861575", "0.61501527", "0.6141604", "0.61305255", "0.6130128", "0.6105066", "0.61009973", "0.6091801", "0.6090425", "0.60701454", "0.60...
0.6558343
1
create spark session singleton
def Yu9h(): ujem = lBG2.builder.config('spark.jars.packages', 'org.apache.hadoop:hadoop-aws:2.7.0').getOrCreate() return ujem
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KfiN():\n return lBG2.builder.config(conf=Mwml()).getOrCreate()", "def Yu9h():\n return lBG2.builder.appName('Sales processor').master('local[*]').getOrCreate()", "def Yu9h():\n return lBG2.builder.getOrCreate()", "def HLQO(Emd4):\n return lBG2.builder.master('local[4]').appName('local-testin...
[ "0.8047757", "0.8015288", "0.79329634", "0.787245", "0.7763101", "0.7752179", "0.7729954", "0.76908123", "0.7672434", "0.7650795", "0.76412165", "0.7624253", "0.7622908", "0.76163346", "0.7602559", "0.75862867", "0.75841004", "0.75759256", "0.7575383", "0.7532003", "0.7522131...
0.75396127
19
Truncate time from epoch in milliseconds to time from epoch in seconds.
def Zb98(i8WE): return qcWV.fromtimestamp(i8WE / 1000.0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def o7Mo(FGW3):\n JRYC = qcWV.datetime.fromtimestamp(FGW3 / 1000.0, tz=UZor)\n JRYC = JRYC.replace(**JkNW)\n return round((JRYC - YKHO.epoch).total_seconds() * 1000.0)", "def twRc(ITS7):\n if isinstance(ITS7, float) or isinstance(ITS7, int):\n return ITS7\n elif isinstance(ITS7, qcWV.dateti...
[ "0.7446144", "0.656421", "0.63697374", "0.6313896", "0.6227488", "0.6192688", "0.612549", "0.6117474", "0.6078833", "0.6078278", "0.60747313", "0.60669774", "0.60567355", "0.60547185", "0.6046703", "0.6029291", "0.60089546", "0.60014766", "0.60014766", "0.5939846", "0.5906284...
0.0
-1
This function determines if the substring exists within the string. Returns True or False.
def DiGy(mDk5: str, u1uJ: str) -> bool: return u1uJ in mDk5
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def XD5H(YKHO, vIwR, Npeo):\n QyVM = vIwR.find(Npeo)\n if QyVM >= 0:\n return True\n return False", "def ug2Q(Npeo, vIwR):\n return Npeo in vIwR", "def jAkH(Npeo):\n return KMTh(Npeo)", "def Rlx2(NPoT, Npeo):\n return Npeo.value in NPoT.value", "def ug2Q(mXDZ: str, vIwR: str) -> bo...
[ "0.85382265", "0.8506639", "0.83371586", "0.80810577", "0.7949128", "0.7793986", "0.7723369", "0.7624956", "0.75228184", "0.74973977", "0.74907005", "0.7446318", "0.73179543", "0.7288552", "0.7196879", "0.71880925", "0.7175945", "0.7172507", "0.71029687", "0.71029687", "0.702...
0.8347386
2
This is function allows us to create an app object with whatever config we need (app factory that allows different configs to be utilized for app instantiation).
def LUif(Zu8l): P4t4 = L2w0(__name__) _Fei = Hy7s.path.join(Hy7s.getcwd(), 'config', Zu8l + '.py') P4t4.config.from_pyfile(_Fei) OHct.init_app(P4t4) NCls.init_app(P4t4) CWnC.init_app(P4t4) from .main import main as CBFj P4t4.register_blueprint(CBFj) with P4t4.app_context(): N...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LUif(BENM):\n P4t4 = yPQU\n P4t4.config.from_object(BENM)\n return P4t4", "def LUif(Tuqy):\n P4t4 = KAOR.app\n P4t4.config.from_pyfile('config.py')\n P4t4.config.from_object(ivaI[Tuqy])\n return P4t4", "def z_uJ():\n P4t4 = L2w0(__name__)\n P4t4.config.from_object(PSrQ)\n P4t4...
[ "0.8682859", "0.8455997", "0.84558463", "0.8450591", "0.8450591", "0.83596855", "0.8323882", "0.83128405", "0.82712924", "0.82286364", "0.81852305", "0.8183613", "0.8157124", "0.8145369", "0.81369865", "0.8127934", "0.80942523", "0.80901587", "0.8082536", "0.8079666", "0.8079...
0.0
-1
Get the logger that logs to master. Note that if the master logs here, you will see the message twice, since it still goes to the normal log handlers too.
def NMoC(Emd4): if Emd4.logger is None: Emd4.logger = G9jH.getLogger('realtime') Emd4.logger.setLevel(G9jH.DEBUG) Emd4.logger.addHandler(mQrV(Hy7s.environ['RT_LOGGING_HOST'], int(Hy7s.environ['RT_LOGGING_PORT']))) return Emd4.logger
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kSPQ(mWFP: str=None):\n if JPOh.is_main_process():\n return G9jH.getLogger(mWFP)\n else:\n return ToN4()", "def XIAT(YKHO):\n if YKHO.logger:\n return YKHO.logger\n elif YKHO.server:\n return YKHO.server.logger\n else:\n return mpPo", "def fZx2(YKHO):\n ...
[ "0.83267987", "0.7644338", "0.7407878", "0.7407878", "0.7338924", "0.7284477", "0.72763515", "0.72649753", "0.7255787", "0.72187805", "0.7213282", "0.72013813", "0.71718436", "0.71590096", "0.7145088", "0.71166605", "0.7096193", "0.7096161", "0.7096161", "0.7090669", "0.70686...
0.0
-1
Yields each of the subdirectories and files in the given input path, non recursively. Gives bare file/directory names with no paths.
def cBIF(YKHO, O38l): raise NotImplementedError()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zjv5(pmON):\n if Hy7s.path.isdir(pmON):\n for pGQh, iIh5, iumf in Hy7s.walk(pmON):\n for Ux0P in iumf:\n if not Ux0P[0] == '.':\n yield Hy7s.path.join(pGQh, Ux0P)\n else:\n yield pmON", "def zjv5(pmON):\n if Hy7s.path.isdir(pmON):\n f...
[ "0.7663966", "0.76390904", "0.75867546", "0.75867546", "0.75824845", "0.74539816", "0.745265", "0.7441693", "0.74341583", "0.7378713", "0.7378713", "0.7378713", "0.7378713", "0.7378713", "0.73646647", "0.73490155", "0.73245835", "0.73055166", "0.7253966", "0.7253206", "0.7209...
0.0
-1
Return the state to use for pickling. We don't want to try and pickle an open Azure connection.
def k8jS(YKHO): return (YKHO.account_name, YKHO.account_key, YKHO.container_name, YKHO.name_prefix)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def k8jS(YKHO):\n raise oEkK('\\n'.join(['Pickling client objects is explicitly not supported.', 'Clients have non-trivial state that is local and unpickleable.']))", "def k8jS(YKHO):\n raise Exception(\"Don't pickle me!\")", "def k8jS(YKHO):\n if YKHO._register_checksums:\n raise NotImplemente...
[ "0.73083603", "0.6863219", "0.674515", "0.6567716", "0.6477011", "0.64483297", "0.6380536", "0.63109255", "0.6299572", "0.6280329", "0.6268783", "0.62040323", "0.6199897", "0.6199897", "0.61882615", "0.61882615", "0.61882615", "0.61882615", "0.61882615", "0.61882615", "0.6188...
0.0
-1
Make sure we have an Azure connection, and set one up if we don't.
def WD1p(YKHO): if YKHO.connection is None: BwtU.get().info('Connecting to account {}, using container {} and prefix {}'.format(YKHO.account_name, YKHO.container_name, YKHO.name_prefix)) YKHO.connection = MuPh(account_name=YKHO.account_name, account_key=YKHO.account_key)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def D29Q(YKHO):\n if not YKHO.credentials:\n try:\n YKHO.credentials = uZ6M(client_id=YKHO.application_id, secret=YKHO.secret_key, tenant=YKHO.tenant_id)\n except Exception as e:\n YIoF('AZURE credentials are wrong and failed with error:%s' % str(tTpl))\n if not YKHO.compu...
[ "0.76282126", "0.76132643", "0.67848194", "0.6497567", "0.63174653", "0.6187383", "0.5927278", "0.59078574", "0.58437127", "0.5829085", "0.5811322", "0.57973355", "0.57632124", "0.57181543", "0.57129014", "0.56826496", "0.56549037", "0.5644017", "0.5614103", "0.56027275", "0....
0.59884244
6
Takes in the commandline arguments list (args), and returns a nice argparse result with fields for all the options.
def dCXb(qIxc): wvEv = j1Jz.ArgumentParser(description=__doc__, formatter_class=j1Jz.RawDescriptionHelpFormatter) W7aK.Runner.addToilOptions(wvEv) wvEv.add_argument('server_list', type=j1Jz.FileType('r'), help='TSV file continaing <region>\t<url> lines for servers to test') wvEv.add_argument('sample_sto...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dCXb(qIxc):\n twdW = j1Jz.ArgumentParser(description='Carve up some API docs in list or wiki format')\n twdW.add_argument('key', help='Your API key')\n twdW.add_argument('-f', '--format', choices=['list', 'wiki'], default='list', help='Print out API docs in condensed list form or wikitext')\n twdW....
[ "0.70116955", "0.70044094", "0.7000264", "0.6992321", "0.6954171", "0.690199", "0.6893028", "0.6889417", "0.6877213", "0.68647695", "0.6860858", "0.68530977", "0.68529516", "0.68425524", "0.68419564", "0.6822059", "0.6820398", "0.6813669", "0.68078715", "0.6807596", "0.677412...
0.0
-1
Returns a function which implements cosine learning rate decay.
def Zbi8(ECSy: float, z4eA: int, Cwt5: float=0.0) -> P8oC.Schedule: if not z4eA > 0: raise ValueError('The cosine_decay_schedule requires positive decay_steps!') def b6Gq(UHFx): UHFx = oLG2.minimum(UHFx, z4eA) WPxz = 0.5 * (1 + oLG2.cos(oLG2.pi * UHFx / z4eA)) x4uD = (1 - Cwt5) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pwoX(qtWj, b0Ix):\n return b0Ix / 1.1", "def Vi3Z(DJmW: float, uH9w: int):\n\n def RE0Q(YPaw: tf.Tensor=None) -> ZylS.Tensor:\n if YPaw is None:\n YPaw = ZylS.train.get_or_create_global_step()\n return ZylS.train.cosine_decay_restarts(DJmW, YPaw, uH9w)\n return RE0Q", "def...
[ "0.7027574", "0.6951503", "0.69428295", "0.67146283", "0.6649657", "0.6583675", "0.6574603", "0.6561752", "0.6487041", "0.64262044", "0.64256525", "0.6355824", "0.63536334", "0.6350977", "0.6334606", "0.63044065", "0.62976176", "0.6297356", "0.61946684", "0.61820364", "0.6162...
0.63688
11
Linear warmup followed by cosine decay.
def vImO(ECSy: float, qn6y: float, wbn8: int, z4eA: int, OEGN: float=0.0) -> P8oC.Schedule: QXkN = [m9zl(init_value=ECSy, end_value=qn6y, transition_steps=wbn8), Zbi8(init_value=qn6y, decay_steps=z4eA - wbn8, alpha=OEGN / qn6y)] return _Wfi(QXkN, [wbn8])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eUMz(zUem: int, Kt_s: int, YIsw: float=1e-08) -> YrBT:\n\n def eHNT(WKvO):\n if WKvO < 0:\n raise ValueError(f'``x`` must be ≥0 but is {WKvO}.')\n elif WKvO < zUem:\n return YIsw + WKvO * (1.0 - YIsw) / zUem\n elif WKvO < zUem + Kt_s:\n return 1 / 2 * (1...
[ "0.6565324", "0.6336492", "0.6336492", "0.628197", "0.62449855", "0.6217749", "0.6203042", "0.60109216", "0.5880908", "0.5822579", "0.5803439", "0.58026004", "0.56984544", "0.56966376", "0.56785357", "0.56731856", "0.56719774", "0.56651795", "0.5649542", "0.5647352", "0.56442...
0.5795781
12
Convert floatlike inputs to dtype, rest pass through.
def wvry(WKvO, yDqo): if yOcR.dtypes.scalar_type_of(WKvO) == float: return oLG2.asarray(WKvO, dtype=yDqo) return WKvO
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Swnb(YKHO):\n WKvO = oyIN.array([-1, 1])\n Q9Un = oyIN.array(oyIN.meshgrid(slcO.float_dtype_list, slcO.float_dtype_list)).T.reshape(-1, 2)\n for TtHW, g3AB in Q9Un:\n WKvO = WKvO.astype(TtHW)\n LVAh = rrLg.processing_utils._convert(WKvO, g3AB)\n assert LVAh.dtype == oyIN.dtype(g3A...
[ "0.7441043", "0.7326578", "0.6974195", "0.6699968", "0.6658239", "0.66318476", "0.66217464", "0.66191834", "0.6526841", "0.64463556", "0.6431501", "0.6420938", "0.6382799", "0.63563156", "0.63346547", "0.6294347", "0.62747705", "0.62212753", "0.6217749", "0.61634463", "0.6121...
0.69202477
3
Returns int(val) if val is integer, returns val otherwise.
def Fgji(wEf2): if Myyj(wEf2): return int(float(wEf2)) else: return wEf2
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def v9KP(YKHO, wEf2):\n if isinstance(wEf2, bool):\n raise ValueError(\"A boolean isn't an integer\")\n if isinstance(wEf2, int):\n return wEf2\n if isinstance(wEf2, str):\n if kUBT.LooksLikeInteger(wEf2):\n return int(wEf2)\n else:\n raise ValueError(\"%r...
[ "0.8262156", "0.796959", "0.7802663", "0.7706211", "0.76731503", "0.7655797", "0.76285297", "0.76219815", "0.7605495", "0.75891805", "0.7543204", "0.74703914", "0.7455615", "0.73855567", "0.735637", "0.73413444", "0.73411804", "0.7327595", "0.732753", "0.7295058", "0.7231627"...
0.8456286
0
Returns float(val) if val is numeric, returns val otherwise.
def z4SA(wEf2): try: wEf2 = float(wEf2) except: return False return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def luh1(wEf2):\n try:\n mLGw = float(wEf2)\n return mLGw\n except ValueError:\n return wEf2", "def WxAy(wEf2):\n if Myyj(wEf2):\n return int(float(wEf2))\n elif z4SA(wEf2):\n return float(wEf2)\n else:\n return wEf2", "def brW7(wEf2):\n if isinstance...
[ "0.80346054", "0.7800944", "0.7567333", "0.7528429", "0.74914193", "0.74796224", "0.74426895", "0.7414639", "0.7349034", "0.7342076", "0.73218447", "0.7294865", "0.7280335", "0.7258405", "0.7243744", "0.7194627", "0.7191695", "0.71875775", "0.7182545", "0.71688044", "0.713833...
0.74385417
7
Removes lists contained in another list.
def E6bj(mUat, lsmZ=None, b3sz=0): if isinstance(mUat, str): mUat = hLdi(mUat) if hasattr(mUat, '__iter__') and (not isinstance(mUat, str)): S06t = [] for BDwY in mUat: if isinstance(BDwY, str): BDwY = hLdi(BDwY) while hasattr(BDwY, '__iter__') and...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AomS(rClg, rpVW):\n for K3Cj in rpVW:\n if K3Cj in rClg:\n rClg.remove(K3Cj)\n return rClg", "def StJK(nwEZ):\n if type(nwEZ) == list and len(nwEZ) > 0 and (_uwh(nwEZ, list) == True):\n nwEZ.sort()\n HbfQ = list((nwEZ for nwEZ, bGrB in WhY1.groupby(nwEZ)))\n re...
[ "0.739862", "0.67635596", "0.6633941", "0.64027876", "0.63223577", "0.6299353", "0.6232652", "0.62082154", "0.61823297", "0.6131236", "0.610959", "0.6078721", "0.6056682", "0.6048852", "0.6029413", "0.5995189", "0.5993149", "0.5986335", "0.59701896", "0.59443873", "0.59441864...
0.61335206
9
Return a list with only integers, extracted from list of strings. e.g., ['S 1', 'S 2', 'S 1'] returns [1,2,1].
def xpmc(Wxnj, k53R=[], WLFB=True): sxvS = [] NGB6 = [] for or8S, Z9rn in enumerate(Wxnj): if WLFB is True: Z9rn = Z9rn.replace(' ', '') for YRbF in mZmz(k53R): if Z9rn.find(YRbF) == 0: Z9rn = Z9rn.replace(YRbF, '') if Myyj(Z9rn): s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gXtX(KCHu: str) -> x1iM[int]:\n return XqC_(int, ZbWC.findall('-?\\\\d+', KCHu))", "def pwKa(kcsq):\n return [int(WKvO) for WKvO in kcsq]", "def D_xK(NPoT):\n hlel = []\n EGaG = str(NPoT)\n EGaG = EGaG.replace(' ', '')\n if EGaG.isdigit():\n Y8Kb = Sy0b(NPoT)\n for ZfUD in Y...
[ "0.7616435", "0.7411282", "0.7332424", "0.7332084", "0.7168076", "0.7167728", "0.71629876", "0.713655", "0.713655", "0.71125317", "0.7095978", "0.70827293", "0.70241314", "0.6995147", "0.69461685", "0.6930143", "0.6909493", "0.6909057", "0.6889397", "0.6884034", "0.68581724",...
0.64062196
38
The ARM ID of the Log Analytics Workspace that is used for monitoring
def pmZ6(YKHO) -> qe4Y.Output[h8nf[str]]: return qe4Y.get(YKHO, 'log_analytics_workspace_arm_id')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Adb4(YKHO) -> str:\n return qe4Y.get(YKHO, 'workspace_resource_id')", "def Qjbq(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'log_analytics_workspace_id')", "def Qjbq(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'log_analytics_workspace_id')", "def Qjbq(YKHO) -> h8nf[qe4Y...
[ "0.7585109", "0.73738754", "0.73738754", "0.7303033", "0.7303033", "0.7289923", "0.7289923", "0.7289923", "0.7195093", "0.7195093", "0.7100691", "0.7091287", "0.70057017", "0.6958997", "0.6958997", "0.689527", "0.6731629", "0.66512775", "0.6646352", "0.6630282", "0.66073084",...
0.8012893
0
The workspace ID of the log analytics workspace to be used for monitoring
def Qjbq(YKHO) -> qe4Y.Output[h8nf[str]]: return qe4Y.get(YKHO, 'log_analytics_workspace_id')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NPt0(YKHO) -> str:\n return qe4Y.get(YKHO, 'workspace_id')", "def NPt0(YKHO) -> str:\n return qe4Y.get(YKHO, 'workspace_id')", "def NPt0(YKHO) -> str:\n return qe4Y.get(YKHO, 'workspace_id')", "def Qjbq(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'log_analytics_workspace_id')", ...
[ "0.82297206", "0.82297206", "0.82297206", "0.8138228", "0.8138228", "0.81284624", "0.7885538", "0.7874745", "0.7874745", "0.77561635", "0.75912213", "0.7579407", "0.7574904", "0.7574904", "0.75661516", "0.7423718", "0.74123013", "0.74123013", "0.73495984", "0.73495984", "0.72...
0.8124163
6
The name of the resource group the SAP Monitor resources get deployed into.
def yqc_(YKHO) -> qe4Y.Output[str]: return qe4Y.get(YKHO, 'managed_resource_group_name')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TRLE(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_group_name')", "def TRLE(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_group_name')", "def TRLE(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'resource_group_name')", "def TRLE(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'reso...
[ "0.7662619", "0.7662619", "0.748483", "0.748483", "0.748483", "0.748483", "0.748483", "0.748483", "0.748483", "0.748483", "0.748483", "0.748483", "0.748483", "0.748483", "0.748483", "0.748483", "0.748483", "0.748483", "0.748483", "0.748483", "0.748483", "0.748483", "0.748...
0.71587396
38
The subnet which the SAP monitor will be deployed in
def exd0(YKHO) -> qe4Y.Output[h8nf[str]]: return qe4Y.get(YKHO, 'monitor_subnet')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VWZy(YKHO) -> str:\n return qe4Y.get(YKHO, 'subnet')", "def VWZy(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'subnet')", "def VWZy(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'subnet')", "def IrNQ(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'node_svc_subnet')", "def VWZy(YKHO) -...
[ "0.78342456", "0.7597453", "0.72827274", "0.72272784", "0.7224956", "0.7224956", "0.7224956", "0.7224956", "0.7219807", "0.7154876", "0.7092194", "0.70898", "0.70844406", "0.70844406", "0.70346546", "0.70148695", "0.7010498", "0.7010498", "0.7003173", "0.6997844", "0.6964355"...
0.7762169
1
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
def type(YKHO) -> qe4Y.Output[str]: return qe4Y.get(YKHO, 'type')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Qjbs(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_type')", "def Qjbs(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_type')", "def Qjbs(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_type')", "def Qjbs(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_type')", "def Qjbs(YKHO) -> str:\n ...
[ "0.82019424", "0.82019424", "0.82019424", "0.82019424", "0.82019424", "0.82019424", "0.82019424", "0.82019424", "0.82019424", "0.82019424", "0.82019424", "0.82019424", "0.82019424", "0.82019424", "0.8096315", "0.79813987", "0.79813987", "0.79813987", "0.79813987", "0.79813987",...
0.0
-1
Read file contents, or read from StringIO object.
def _gq4(IznC): if isinstance(IznC, kJm3): IznC.seek(0) l5Ny = IznC.read() return kJm3(l5Ny) if not isinstance(IznC, GkAb): IznC = GkAb(IznC).resolve() Fst3 = IznC.suffix.casefold() if Fst3 in ['.gzip', '.gz', '.bz2', '.zip']: kGys = Ylmd(IznC) elif Fst3 in ['...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ER_k(pmON):\n with open(pmON, 'rb') as ytgA:\n return ytgA.read()", "def Ueki(YKHO):\n if 'content' in YKHO.__dict__ and YKHO.content is not None:\n return YKHO.content\n else:\n try:\n with open(YKHO.file, 'r', encoding='utf8') as eHNT:\n hGN5 = eHNT.r...
[ "0.6906407", "0.6845072", "0.6756526", "0.6661467", "0.6554122", "0.6549384", "0.6549384", "0.6543931", "0.6529882", "0.65251654", "0.65204966", "0.6512726", "0.65030336", "0.6478545", "0.64755225", "0.64755225", "0.6475415", "0.6452293", "0.64516616", "0.6432203", "0.6428857...
0.6827623
2
Removes the element that is first in the queue.
def pU95(YKHO): if YKHO.head: Q6kx = YKHO.head if YKHO.head == YKHO.tail: YKHO.head = YKHO.tail = None else: YKHO.head = Q6kx.next YKHO.head.prev = None return Q6kx.value else: return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BEuN(YKHO):\n if len(YKHO._queue) <= 0:\n raise ValueError('Queue is empty. Cannot call remove')\n U6D_ = YKHO._queue[0]\n del YKHO._queue[0]\n return U6D_", "def Ksvm(YKHO):\n if YKHO.is_empty():\n raise rWmY('Queue is empty')\n ANfV = YKHO._data[YKHO._front]\n YKHO._data[...
[ "0.82441837", "0.8151195", "0.79785615", "0.7946564", "0.7932844", "0.7832772", "0.78182304", "0.7807664", "0.78027916", "0.77893156", "0.7760702", "0.77019185", "0.7697737", "0.768336", "0.76818496", "0.7652373", "0.7641879", "0.76342094", "0.76206464", "0.7598289", "0.75814...
0.0
-1
Returns a reference to the first item, does not remove.
def cntZ(YKHO): return YKHO.head != None and YKHO.head.value or None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cntZ(YKHO):\n if len(YKHO.list) < 1:\n return None\n return YKHO.list[0]", "def cntZ(YKHO):\n if len(YKHO) == 0:\n return None\n return YKHO[0]", "def nNP9(Emd4):\n return Emd4.query.first()", "def cntZ(YKHO, WmM4=None):\n if len(YKHO._items) > 0:\n return YKHO._ite...
[ "0.8208773", "0.8140366", "0.7926425", "0.778214", "0.777028", "0.7719491", "0.7717406", "0.76998377", "0.76863956", "0.75990725", "0.75599533", "0.7530039", "0.75196624", "0.7507577", "0.7468419", "0.74562305", "0.7428422", "0.7425916", "0.74068785", "0.7402197", "0.73952407...
0.0
-1
Property to access the users projects namespace
def llaM(YKHO) -> tlt4: return YKHO._projects
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kMaH(YKHO) -> str:\n ...", "def _63S(YKHO) -> str:\n return qe4Y.get(YKHO, 'namespace')", "def _63S(YKHO) -> str:\n return qe4Y.get(YKHO, 'namespace')", "def _63S(YKHO) -> str:\n return qe4Y.get(YKHO, 'namespace')", "def _63S(YKHO) -> str:\n return qe4Y.get(YKHO, 'namespace')", "def _6...
[ "0.7867874", "0.672809", "0.672809", "0.672809", "0.672809", "0.672809", "0.672809", "0.672809", "0.6633362", "0.6633362", "0.6633362", "0.6633362", "0.6633362", "0.66285384", "0.66190827", "0.66190827", "0.66190827", "0.66190827", "0.66190827", "0.66190827", "0.66190827", ...
0.0
-1
Returns a rendered template for the index/report page.
def d6pt(): SjZU = Qptt.query.order_by('name').all() ZBvn = 'dist_accord_active' sj1X = 'dist_accord_inactive' tJ1V = 'distid=%s' nPrm = qotn(districts=SjZU, active_accordion_id=ZBvn, inactive_accordion_id=sj1X, type='district', user=c5ow, extra=tJ1V) return TvZl('report.html', datadump=nPrm, us...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NMoC(YKHO):\n return YKHO.render_template('index')", "def t7ng():\n return TvZl('index.html')", "def t7ng():\n return TvZl('index.html')", "def t7ng():\n return TvZl('index.html')", "def t7ng():\n return TvZl('index.html')", "def t7ng():\n return TvZl('index.html')", "def t7ng():\...
[ "0.74113595", "0.7354311", "0.7352574", "0.7348892", "0.7348892", "0.7348892", "0.7348892", "0.7345603", "0.73135054", "0.7302126", "0.7189688", "0.7176133", "0.7172631", "0.71531445", "0.71443933", "0.71443933", "0.7140005", "0.7140005", "0.7140005", "0.7140005", "0.7140005"...
0.0
-1
Return a dictionary representing the benchmark result. After JSONserialization, that dictionary is expected to validate against the JSON schema that the Conbench API expects on the endpoint for benchmark result submission.
def DFB2(YKHO) -> cuzp: s_cZ = lKKu(YKHO) if bool(s_cZ.get('machine_info')) != bool(not s_cZ['cluster_info']): qmLP.warn('Result not publishable! `machine_info` xor `cluster_info` must be specified') if not s_cZ['stats'] and (not s_cZ['error']): qmLP.warn('Result not publishable! `stats` and...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MNRr(YKHO):\n return {'result': {'errors': YKHO._errors, 'logs': YKHO._logs, 'memory': YKHO._memory, 'messages': YKHO._messages}}", "def KvZq(yKIT) -> dict:\n X4tg = yKIT.job_runtime.with_unit('s').get()[0] if yKIT.job_runtime is not None else None\n tJWH = yKIT.simulated_time.with_unit('us').get()[...
[ "0.6644177", "0.6590498", "0.64400923", "0.62616146", "0.6184284", "0.6169347", "0.6164184", "0.61534667", "0.6139721", "0.61281365", "0.61238223", "0.61217165", "0.6112951", "0.6081151", "0.60803294", "0.6061406", "0.60417885", "0.6038868", "0.60307246", "0.59826195", "0.598...
0.5670942
56
Add permission 'perm' to user 'self' for object(s) instance. instance variable may be an object or a queryset.
def p9uo(YKHO, KAOR, IuXB): if type(KAOR).__name__ == 'QuerySet': for object in KAOR: if YKHO.has_row_perm(object, IuXB, True): pass Uvf2 = CXiN() Uvf2.content_object = object Uvf2.user = YKHO Uvf2.name = IuXB Uvf2.save(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IKwo(YKHO, Uvf2, hHsW, YEnM):\n try:\n G29H = aPmC(Uvf2, hHsW, YEnM)\n except (AttributeError, NameError, bvEq.exceptions.NotUserNorGroup) as err:\n bo34.warn('Cannot assign perm {0} to {1} for {2}.'.format(hHsW, Uvf2, YEnM))\n return None\n return G29H", "def YmV_(CBIr, IuXB, Y...
[ "0.65260243", "0.6479131", "0.6411798", "0.6360213", "0.621073", "0.6199536", "0.61388224", "0.61283726", "0.6103383", "0.6078343", "0.60545534", "0.60506994", "0.60380936", "0.6024793", "0.5996882", "0.5947033", "0.58939373", "0.5889089", "0.5873171", "0.5867609", "0.5849937...
0.7025161
0
Remove permission 'perm' to user self for object instance. instance variable may be an object or a queryset.
def tLpn(YKHO, KAOR, IuXB): if type(KAOR).__name__ == 'QuerySet': for object in KAOR: if not YKHO.has_row_perm(object, IuXB, True): pass m5r4 = DDS9.objects.get_for_model(object) awnO = CXiN.objects.filter(user=YKHO, content_type__pk=m5r4.id, object_id=obj...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Wryp(YKHO, IuXB):\n return YKHO.remove_from_property_list('permission', IuXB, CXiN)", "def zWwb(CBIr, IuXB, YEnM):\n C3ST = YEnM.__class__\n w0rQ = VJ23[C3ST]\n try:\n zDGP = w0rQ.objects.get(user=CBIr, obj=YEnM)\n if getattr(zDGP, IuXB):\n sw4W.send(sender=CBIr, perm=IuX...
[ "0.70942575", "0.70523936", "0.674576", "0.67318785", "0.65561956", "0.6459295", "0.6439431", "0.6369676", "0.63504195", "0.63279074", "0.6306314", "0.6296275", "0.6296275", "0.62799793", "0.624865", "0.62042385", "0.61864066", "0.6139458", "0.6124299", "0.61216974", "0.61178...
0.6845552
2