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
Set user's password without save.
def dxAJ(YKHO): CBIr = Nc2H() CBIr.password = 'is_god' assert isinstance(CBIr.password, RdJv), 'password should be hashed' assert CBIr.password == 'is_god'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zZft(YKHO, zN5h):\n pass", "def G3s8(YKHO, jTXt):\n YKHO.password = jTXt", "def cDCx(YKHO, CBIr, jTXt):\n CBIr.password = wVXF.make_password(jTXt)", "def G3s8(YKHO, jTXt):\n YKHO.PASSWORD = jTXt", "def G3s8(YKHO, jTXt):\n YKHO.PASS = jTXt", "def faAE(YKHO):\n YKHO.test_user.set_pass...
[ "0.8370104", "0.7977953", "0.7948715", "0.78393275", "0.78218645", "0.78083926", "0.778647", "0.7753911", "0.77458394", "0.7745551", "0.7718007", "0.771477", "0.7713753", "0.7675904", "0.7666784", "0.7649039", "0.7626858", "0.7587661", "0.75855166", "0.7577332", "0.7577332", ...
0.7268963
45
Set user's password with save.
def Infb(YKHO): CBIr = Nc2H.objects.get(email='lemmy@imotorhead.com') CBIr.password = 'is_god' CBIr.save() assert isinstance(CBIr.password, RdJv), 'password should be hashed' assert CBIr.password == 'is_god'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zZft(YKHO, zN5h):\n pass", "def faAE(YKHO):\n YKHO.test_user.set_password(YKHO.create_user_data()['password1'])\n YKHO.test_user.save()", "def xkzz(YKHO, jSYO=True):\n CBIr = super(WyRb, YKHO).save(commit=False)\n CBIr.set_password(YKHO.cleaned_data['password1'])\n if jSYO:\n CBIr....
[ "0.7905599", "0.78841126", "0.7843748", "0.77898395", "0.7770465", "0.7722984", "0.74430025", "0.7440685", "0.74249965", "0.73715544", "0.7369432", "0.73550016", "0.7341939", "0.73407733", "0.7327272", "0.7318722", "0.73134434", "0.73026556", "0.7298048", "0.72918826", "0.723...
0.76471704
6
Evaluate the absolute error for poses to a ground truth.
def J3nK(wCpP: List[Tuple[str, kapture.PoseTransform]], Ay8d: List[Tuple[str, kapture.PoseTransform]]) -> x1iM[AzJI[str, float, float]]: C4Pv = {mWFP: shtX for mWFP, shtX in Ay8d} Aofo = [(mWFP,) + QmYF(shtX, C4Pv[mWFP]) for mWFP, shtX in wCpP] return Aofo
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pK4W(YKHO, QTBn):\n SWJz = YKHO.get_leading_power_error(QTBn)\n if oyIN.isfinite(SWJz):\n return -float(SWJz)\n else:\n return YKHO._default_value", "def kflP(YKHO, ws_r: np.ndarray) -> float:\n SOCJ(array=ws_r, name='action_dist', expected_dim=3)\n if ws_r.shape[0] != YKHO.n_rou...
[ "0.6493396", "0.61360085", "0.6067173", "0.60115486", "0.60107553", "0.5945455", "0.59215415", "0.5891091", "0.5891091", "0.58867097", "0.58620715", "0.58589554", "0.5834993", "0.5828642", "0.5801907", "0.5773756", "0.5757872", "0.5755355", "0.5686975", "0.56765413", "0.56764...
0.6143336
1
Converts a mangled C++ name to a valid python identifier.
def ixcB(mWFP): mWFP = mWFP.replace('$', 'DOLLAR') mWFP = mWFP.replace('.', 'DOT') if mWFP.startswith('__'): return '_X' + mWFP elif mWFP[0] in '01234567879': return '_' + mWFP return mWFP
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IUMn(YKHO, mWFP):\n for G1Hx, Ty9i in [('<', '_'), ('>', '_'), ('::', '__'), (',', ''), (' ', ''), ('$', 'DOLLAR'), ('.', 'DOT'), ('@', '_'), (':', '_'), ('-', '_')]:\n if G1Hx in mWFP:\n mWFP = mWFP.replace(G1Hx, Ty9i)\n if mWFP.startswith('__'):\n return '_X' + mWFP\n ...
[ "0.71853274", "0.70570505", "0.6908706", "0.6741958", "0.6688559", "0.66267854", "0.6577075", "0.6554791", "0.6535899", "0.6521695", "0.6342569", "0.6283068", "0.6270476", "0.6172326", "0.6117909", "0.6055", "0.5973267", "0.5972315", "0.59421307", "0.59408534", "0.5926178", ...
0.6219825
13
returns an item having no 'value' key
def so0v(): return {'name': 'box'}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OILa():\n return {'value': 340}", "def Q3zR():\n return {'name': 'box', 'value': 'thirty'}", "def ncX1(YKHO, BWXx):\n MKlR = YKHO.hash_value(BWXx)\n return YKHO.values[MKlR]", "def ObIv(YKHO):\n xUwc = xFvL()\n Aofo = xUwc.values()\n YKHO.assertIdentical(ce9s, type(Aofo))\n YKHO.a...
[ "0.6959445", "0.6882983", "0.63159955", "0.6311257", "0.62987405", "0.62560177", "0.61644316", "0.61462814", "0.6102566", "0.60479707", "0.60385144", "0.5951182", "0.57839084", "0.5733387", "0.57045144", "0.5689173", "0.56776094", "0.5670749", "0.5611334", "0.5579161", "0.557...
0.71848667
0
GIVEN a flask application WHEN a user adds an item with incorrect value THEN check that a bad request response is provided
def P3ut(udfG, Q3zR): ZfUD = {'name': 'table top', 'value': 'thirty'} geh0 = udfG.post(zDeW, data=qQXR.dumps(Q3zR), content_type='application/json') nPrm = qQXR.loads(geh0.get_data()) assert geh0.status_code == 400 assert nPrm['error'] == P4t4.BAD_REQUEST
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LnGL(YKHO):\n with YKHO.flask_app.app_context():\n YKHO.register()\n YKHO.new_application()\n Ylbp = YKHO.update_application(new_name='')\n assert 'This field is required' in Ylbp.data\n Ylbp = YKHO.update_application(new_short_name='')\n assert 'This field is requi...
[ "0.6625819", "0.651897", "0.64484036", "0.64032555", "0.6320849", "0.62915367", "0.6266476", "0.6252747", "0.6248677", "0.6164203", "0.6164105", "0.6149116", "0.6111299", "0.6110656", "0.60990953", "0.6057881", "0.60342103", "0.6030507", "0.6018995", "0.6004213", "0.6002298",...
0.6651751
0
GIVEN a flask application WHEN a user updates a valid item THEN check that a valid response is provided
def C6EE(udfG, ZfUD): geh0 = udfG.put(xIrV, data=qQXR.dumps(ZfUD), content_type='application/json') nPrm = qQXR.loads(geh0.get_data()) assert geh0.status_code == 200 assert nPrm['item']['name'] == ZfUD['name'] assert nPrm['item']['value'] == ZfUD['value']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jesw(YKHO, FM6F, TMAJ):\n with YKHO.flask_app.app_context():\n NkJr = HiPY(qQXR.dumps(YKHO.pkg_json_not_found), 200, {'content-type': 'application/json'})\n FM6F.return_value = NkJr\n YKHO.register()\n YKHO.new_application()\n Ylbp = YKHO.update_application(method='GET')\n...
[ "0.7009168", "0.66727924", "0.6579731", "0.65227413", "0.6362692", "0.6354952", "0.63390976", "0.6278084", "0.6226785", "0.6207882", "0.6200606", "0.6158867", "0.6131634", "0.61084455", "0.6092587", "0.5999919", "0.59828687", "0.59695166", "0.5921381", "0.5919343", "0.591663"...
0.57789195
38
GIVEN a flask application WHEN a user updates a non existent item id THEN check that a valid 404 response is provided
def wr5g(udfG, ZfUD): geh0 = udfG.put(claI, data=qQXR.dumps(ZfUD), content_type='application/json') nPrm = qQXR.loads(geh0.get_data()) assert geh0.status_code == 404 assert nPrm['error'] == P4t4.NOT_FOUND
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FuNt(YKHO):\n YKHO.register()\n Ylbp = YKHO.app.get('/app/noapp/update', follow_redirects=True)\n assert Ylbp.status == '404 NOT FOUND', Ylbp.status\n Ylbp = YKHO.update_application(short_name='noapp')\n assert Ylbp.status == '404 NOT FOUND', Ylbp.status", "def Vzhs(geh0: HTTPResponse) -> bool...
[ "0.7389095", "0.7101388", "0.70127696", "0.66654366", "0.6602685", "0.6506175", "0.63723445", "0.63387007", "0.6292213", "0.62813187", "0.6258391", "0.6184267", "0.6177875", "0.6160117", "0.61584467", "0.6145705", "0.6143569", "0.6135169", "0.61084354", "0.6086671", "0.607960...
0.70387673
2
GIVEN a flask applicatin WHEN a user updates an item, providing an incorrect content type THEN check that a valid 400 response is provided
def SNnz(udfG, ZfUD): geh0 = udfG.put(xIrV, data=qQXR.dumps(ZfUD)) nPrm = qQXR.loads(geh0.get_data()) assert geh0.status_code == 400 assert nPrm['error'] == P4t4.BAD_REQUEST
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DEwC(udfG, Q3zR):\n geh0 = udfG.put(xIrV, data=qQXR.dumps(Q3zR), content_type='application/json')\n nPrm = qQXR.loads(geh0.get_data())\n assert geh0.status_code == 400\n assert nPrm['error'] == P4t4.BAD_REQUEST", "def wr5g(udfG, ZfUD):\n geh0 = udfG.put(claI, data=qQXR.dumps(ZfUD), content_typ...
[ "0.7235813", "0.6553306", "0.6545673", "0.64651114", "0.64642936", "0.6398381", "0.6358209", "0.6335581", "0.6256608", "0.6228232", "0.6225134", "0.6224841", "0.6201355", "0.61985964", "0.61769384", "0.6174337", "0.61457133", "0.6143786", "0.61370873", "0.60921085", "0.607999...
0.7248537
0
GIVEN a flask application WHEN a user updates an item, providing an incorrect value type THEN check that a valid 400 response is provided
def DEwC(udfG, Q3zR): geh0 = udfG.put(xIrV, data=qQXR.dumps(Q3zR), content_type='application/json') nPrm = qQXR.loads(geh0.get_data()) assert geh0.status_code == 400 assert nPrm['error'] == P4t4.BAD_REQUEST
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LnGL(YKHO):\n with YKHO.flask_app.app_context():\n YKHO.register()\n YKHO.new_application()\n Ylbp = YKHO.update_application(new_name='')\n assert 'This field is required' in Ylbp.data\n Ylbp = YKHO.update_application(new_short_name='')\n assert 'This field is requi...
[ "0.6851784", "0.6587387", "0.64580625", "0.6382713", "0.6377108", "0.633658", "0.6260496", "0.62319046", "0.6226128", "0.62143725", "0.62043226", "0.6198981", "0.6102735", "0.60989565", "0.6066915", "0.6061347", "0.6051372", "0.60408425", "0.60354966", "0.6024505", "0.6002906...
0.7405215
0
GIVEN a flask application WHEN a user deletes an item that does not exist THEN check that a valid 404 response is provided
def q8Ur(udfG): geh0 = udfG.delete(xIrV) nPrm = qQXR.loads(geh0.get_data()) assert geh0.status_code == 404 assert nPrm['error'] == P4t4.NOT_FOUND
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ye4e(YKHO):\n _hkX = YKHO.app.delete('/users/thisuserdoesntexist')\n assert _hkX.status_code == 404", "def pQn5(YKHO):\n YKHO.register()\n Ylbp = YKHO.app.get('/app/noapp/delete', follow_redirects=True)\n assert Ylbp.status == '404 NOT FOUND', Ylbp.data\n Ylbp = YKHO.delete_application(shor...
[ "0.7317368", "0.72177124", "0.71755594", "0.6655081", "0.6627839", "0.6609978", "0.65999764", "0.6529177", "0.65287083", "0.6412621", "0.6401429", "0.6392713", "0.6333492", "0.6331474", "0.6297594", "0.6268003", "0.6259176", "0.6254021", "0.6249084", "0.62441254", "0.6241765"...
0.6776175
3
Renders the home view of the app
def kZiy(QePW): return _1tc(QePW, 'home.html', {'GOOGLE_API_KEY': _xUG})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bVaH():\n return TvZl('index.html')", "def kZiy():\n return TvZl('home_page.html')", "def kZiy():\n return TvZl('home.html')", "def kZiy():\n return TvZl('home.html')", "def kZiy():\n return TvZl('home.html')", "def kZiy():\n return TvZl('home.html')", "def kZiy():\n return TvZ...
[ "0.8555407", "0.8488411", "0.8413842", "0.8340244", "0.8340244", "0.8340244", "0.8340244", "0.8340244", "0.8340244", "0.8340244", "0.8340244", "0.8340244", "0.8340244", "0.8340244", "0.8340244", "0.8340244", "0.8340244", "0.8340244", "0.8340244", "0.8330458", "0.8330458", "...
0.0
-1
Return matrix to rotate about axis defined by point and direction.
def bULF(YylR, XSoh, AU8u=None): vdar = epAf.sin(YylR) ey4b = epAf.cos(YylR) XSoh = j8U8(XSoh[:3]) A3Vt = oyIN.diag([ey4b, ey4b, ey4b]) A3Vt += oyIN.outer(XSoh, XSoh) * (1.0 - ey4b) XSoh *= vdar A3Vt += oyIN.array([[0.0, -XSoh[2], XSoh[1]], [XSoh[2], 0.0, -XSoh[0]], [-XSoh[1], XSoh[0], 0.0]]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def j9ts(YylR, XSoh, AU8u=None):\n vdar = epAf.sin(YylR)\n ey4b = epAf.cos(YylR)\n XSoh = j8U8(XSoh[:3])\n A3Vt = XTiz.diag([ey4b, ey4b, ey4b])\n A3Vt += XTiz.outer(XSoh, XSoh) * (1.0 - ey4b)\n XSoh *= vdar\n A3Vt += XTiz.array([[0.0, -XSoh[2], XSoh[1]], [XSoh[2], 0.0, -XSoh[0]], [-XSoh[1], XS...
[ "0.7728551", "0.73258036", "0.7262272", "0.7243947", "0.6818176", "0.68091345", "0.674825", "0.66802233", "0.6598905", "0.6585141", "0.6514585", "0.6479495", "0.64701617", "0.64399165", "0.6438013", "0.6398001", "0.63943183", "0.6366432", "0.6365902", "0.6365282", "0.63568646...
0.7375879
1
Sample noise from gaussian distribution with parameters means and covs
def csG7(NArs, cM24='numpy', Ep8u=100): if cM24 == 'tensorflow': B9EC, QKTk = ZylS.split(NArs, 2, axis=-1) ROpF = ZylS.shape(B9EC) SGf8 = ZylS.random.normal(ROpF, dtype=ZylS.float32) ARTs = B9EC + ZylS.multiply(SGf8, ZylS.sqrt(1e-10 + QKTk)) elif cM24 == 'numpy': B9EC, QK...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TZWt(LNo8):\n WTkW = LNo8.std()\n for Npgh in range(LNo8.shape[2]):\n WTkW = min(WTkW, LNo8[:, :, Npgh].std())\n LNo8 = L84Y(LNo8, var=WTkW ** 2)\n return LNo8", "def yjo7(YKHO, gGnb):\n if 'sigma' in YKHO.gaussian_component:\n WTkW = YKHO.gaussian_component['sigma']\n ret...
[ "0.72112334", "0.7184942", "0.71693134", "0.7144554", "0.70815593", "0.70332384", "0.69560814", "0.69505167", "0.6892077", "0.6797149", "0.6775827", "0.6758287", "0.67192024", "0.66998935", "0.66853905", "0.6666638", "0.66629636", "0.66487336", "0.6634397", "0.6624826", "0.66...
0.7035633
5
set the message to field of the message data to be too long
def d_QV(QpfX): QpfX.bdd_helper.message_data['msg_to'][0] = 'x' * (uwaB.MAX_TO_LEN + 1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gGzG(YKHO, Jyyj, qw32, BWXx):\n if qw32 not in {8, 9, 10}:\n YKHO._message_length += len(Jyyj) + 1\n if YKHO._message_length >= YKHO._max_length:\n raise CDgv(f'message too long: {YKHO._message_length}')", "def Ql1B(tO9_, E0wO, SQg1='...'):\n if len(tO9_) > E0wO:\n tO9_ = tO9_[:...
[ "0.75982594", "0.6912993", "0.6690516", "0.65358305", "0.6464621", "0.64632267", "0.64477795", "0.6445162", "0.64210004", "0.61839885", "0.6012873", "0.59908015", "0.5970882", "0.5957988", "0.59407127", "0.5919903", "0.5918912", "0.5886433", "0.58727854", "0.5840071", "0.5823...
0.75016
1
Creates Channel instance from data, which are channel contents parsed by Marconppa.core.parse.lark
def r_hq(Emd4, nPrm): azoT = {} kReO = {} for YRbF in nPrm.keys(): if YRbF == 'Enabled': etR_ = l2i4.from_waveform_dict(nPrm['Enabled']) elif type(nPrm[YRbF]) is dict and (not YRbF == 'Enabled'): kReO[YRbF] = l2i4.from_waveform_dict(wave_form_dict=nPrm[YRbF]) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def HZHS(Emd4, nPrm):\n YKHO = object.__new__(Emd4)\n YKHO.id = nKsJ(nPrm)\n YKHO._set_icon(nPrm)\n YKHO.bot = DLPb(nPrm)\n YKHO.description = IMPW(nPrm)\n YKHO.name = LvoP(nPrm)\n return YKHO", "def Gs92(YKHO, nPrm):\n mLim = kIUb.Category()\n mLim.name = nPrm.name\n mLim.dataUrl =...
[ "0.6344082", "0.62770414", "0.6124182", "0.6100969", "0.5772407", "0.5748528", "0.5712783", "0.5621832", "0.5610919", "0.55837476", "0.55604476", "0.5531649", "0.54476166", "0.5444936", "0.53936535", "0.53854156", "0.53696924", "0.53603363", "0.52876216", "0.52803725", "0.526...
0.66053873
0
Rowwise normalization, assumes number of rows in all matrices are same
def NkkI(*INK1, NKcE='l1', OsUG=False): if len(INK1) == 0: return None maxY = [r8hN.shape[1] for r8hN in INK1] vb7U = oyIN.hstack(INK1) if NKcE == 'l1': vb7U /= vb7U.sum(axis=1).reshape(-1, 1) elif NKcE == 'l2': vb7U = vb7U ** 2 vb7U /= vb7U.sum(axis=1).reshape(-1, 1)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def U95B(WKvO):\n ywwl = WKvO.shape[0]\n WKvO /= oyIN.sqrt(oyIN.sum(WKvO ** 2, axis=1)).reshape((ywwl, 1)) + 1e-30\n return WKvO", "def U95B(WKvO):\n qRo7 = oyIN.sqrt(oyIN.sum(WKvO ** 2, axis=1))\n sHpf = oyIN.reshape(qRo7, (-1, 1))\n WKvO /= sHpf\n return WKvO", "def U95B(WKvO):\n XsBg...
[ "0.75488883", "0.7532844", "0.75252324", "0.74362904", "0.7345702", "0.72406524", "0.71726876", "0.71670806", "0.71199", "0.7117851", "0.70422256", "0.69521815", "0.6940228", "0.692185", "0.68722206", "0.68722206", "0.68430114", "0.68232256", "0.68122333", "0.6810206", "0.680...
0.6761125
24
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`.
def LwSz(Bcwd, KndY, NkkI=False, leAC='Confusion matrix', iMGt=QrM1.cm.Blues): if NkkI: Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis] print('Normalized confusion matrix') else: print('Confusion matrix, without normalization') print(Bcwd) QrM1.imshow(Bcwd, interp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LwSz(Bcwd, KndY=[0, 1], NkkI=False, leAC='Confusion matrix', RMso=False):\n if NkkI:\n Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]\n print('Normalized confusion matrix')\n else:\n print('Confusion matrix, without normalization')\n if RMso:\n print(Bcwd)"...
[ "0.8195649", "0.8095532", "0.803007", "0.8019817", "0.7994959", "0.7991904", "0.79818887", "0.79766536", "0.7961735", "0.7957412", "0.79385704", "0.7935568", "0.79352015", "0.7932079", "0.79270303", "0.7925357", "0.79243845", "0.7923781", "0.792341", "0.79226786", "0.7918532"...
0.7815597
97
ARN to be used for invoking Lambda Function from API Gateway to be used in aws_api_gateway_integration's `uri`.
def TiBd(YKHO) -> str: return qe4Y.get(YKHO, 'invoke_arn')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DmI7(cuiw, Oa_R):\n if cuiw is None:\n return None\n x0hE = cuiw.client('lambda')\n geh0 = x0hE.get_function(FunctionName=Oa_R)\n if geh0 is None:\n return None\n else:\n return geh0['Configuration']['FunctionArn']", "def b3K3(zn0c: str, j4nt: str, P7Yg: str=None) -> str:\...
[ "0.6594228", "0.6574651", "0.6182666", "0.61284226", "0.60756713", "0.5967239", "0.5939838", "0.59359926", "0.59165627", "0.59165627", "0.59165627", "0.59165627", "0.59165627", "0.59165627", "0.59165627", "0.59165627", "0.59165627", "0.59165627", "0.59165627", "0.59165627", "...
0.7131957
0
Make sure the string is alphanumeric. We do this to sanitize our table names (since DBAPI parameter substitution doesn't work for table names).
def eeCI(YKHO, vIwR): if not vIwR.isalnum(): raise ValueError('Table name cannot include non-alphanumerics.') return vIwR
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zT1A(vIwR):\n vIwR = XKrx(vIwR.replace(' ', '_').lower())\n return ZbWC.sub('[^0-9a-z_]', '', vIwR)", "def RMvb(YKHO, GTA_):\n return ''.join((chr for chr in GTA_ if chr.isalnum()))", "def dpvd(KCHu):\n if len(KCHu) < 1 or len(KCHu) > 63:\n raise ValueError('Database user name must be 1 ...
[ "0.7241796", "0.7110954", "0.6877788", "0.6602363", "0.64133453", "0.6387862", "0.638604", "0.63723433", "0.6363177", "0.63207275", "0.631537", "0.63034743", "0.6271295", "0.6261939", "0.6257038", "0.6216058", "0.61869186", "0.61620057", "0.60696435", "0.60495406", "0.6042183...
0.8332586
0
Return the argument `string` converted to a byte string if it's a unicode string. Otherwise just return the string.
def D92J(vIwR): return ii9h(b'', vIwR)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PQSR(vIwR):\n return vIwR.encode('utf8') if isinstance(vIwR, str) else vIwR", "def yjOm(vIwR):\n if isinstance(vIwR, str):\n return vIwR.decode('utf-8')\n else:\n return vIwR", "def ntSl(vIwR):\n assert isinstance(vIwR, exCv)\n if HwRy.version_info[0] >= 3:\n if isinstan...
[ "0.8278024", "0.7736119", "0.7689373", "0.7395637", "0.73836964", "0.7364347", "0.7337859", "0.73056084", "0.7291564", "0.7269342", "0.7209619", "0.7171058", "0.71597844", "0.71165085", "0.7064262", "0.70489335", "0.7032391", "0.6983224", "0.6981754", "0.6957466", "0.69491947...
0.7509173
3
Return the argument `string` converted to a unicode string if it's a byte string. Otherwise just return the string.
def zX3X(vIwR): return ii9h('', vIwR)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yjOm(vIwR):\n if isinstance(vIwR, str):\n return vIwR.decode('utf-8')\n else:\n return vIwR", "def P77x(vIwR):\n Aofo = vIwR\n try:\n if vIwR is not None and (not isinstance(vIwR, jKi7.text_type)):\n Aofo = vIwR.decode('utf-8')\n except (TypeError, UnicodeDecode...
[ "0.8249616", "0.79847986", "0.7885491", "0.774407", "0.770393", "0.7655451", "0.7518738", "0.74957335", "0.74674356", "0.7411469", "0.7306435", "0.7280405", "0.72704726", "0.7210421", "0.7196348", "0.7085675", "0.7072564", "0.7067109", "0.70505875", "0.70435506", "0.7020564",...
0.79086107
2
Return the argument `string` converted to a the default string type for the Python version. For unicode strings, `LOSSLESS_ENCODING` is used for encoding or decoding.
def lfi7(vIwR): return ii9h(Gv0t.default_string_type(), vIwR)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def D5YO(vIwR):\n if not isinstance(vIwR, jKi7.string_types):\n if jKi7.PY3:\n try:\n vIwR = str(vIwR, 'utf-8')\n except Exception:\n try:\n vIwR = str(vIwR, 'latin-1')\n except Exception:\n vIwR = vI...
[ "0.7082454", "0.6812608", "0.6803907", "0.66702986", "0.65263957", "0.64519304", "0.6444418", "0.634512", "0.62910765", "0.6289816", "0.6205547", "0.6198973", "0.61961764", "0.61776716", "0.615632", "0.61370057", "0.6123959", "0.61216235", "0.6115156", "0.60863787", "0.607011...
0.7913541
0
The Amazon Resource Name (ARN) of the listener.
def FELR(YKHO) -> h8nf[str]: return qe4Y.get(YKHO, 'listener_arn')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def W0tD(ZzAz):\n return '{}{}'.format(tsvl.PREFIX_LISTENER, ZzAz)", "def Saed(YKHO) -> str:\n return qe4Y.get(YKHO, 'listener_description')", "def Zgk0(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'event_source_arn')", "def ZzAz(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'lis...
[ "0.6687682", "0.65637684", "0.6509131", "0.6478412", "0.6478412", "0.6437506", "0.6421728", "0.6421728", "0.6396982", "0.6396982", "0.6396982", "0.6338194", "0.6299437", "0.62569517", "0.6231384", "0.6220336", "0.6177935", "0.6177935", "0.6177935", "0.6177935", "0.6177935", ...
0.8437001
0
Helper for getting the single output feature of a model.
def Gsei(C3ST: BaseModel) -> KOqt: return next(iter(C3ST.output_features.values()))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VGba(C3ST, Mekx):\n o4Jx, bySB = C3ST.get_output_and_feature(Mekx, training=False)\n return (o4Jx, bySB)", "def j9V1(C3ST, Mekx):\n o4Jx = C3ST(Mekx, training=False)\n return o4Jx", "def YEmk(C3ST, Mekx):\n bySB = C3ST.get_feature(Mekx, training=False)\n return bySB", "def jeJz(C3ST, j3...
[ "0.7442841", "0.67368835", "0.65878844", "0.642245", "0.6183685", "0.6183685", "0.61482877", "0.6128813", "0.60387766", "0.58651304", "0.5817236", "0.58047664", "0.57686275", "0.5737404", "0.5733157", "0.5697566", "0.56953955", "0.5663911", "0.5657049", "0.5656346", "0.565088...
0.8817143
0
Compute softmax values for each sets of scores in x.
def N93T(WKvO: npt.NDArray) -> eQHC.NDArray: Z5xZ = oyIN.max(WKvO, axis=1).reshape(-1, 1) O48W = oyIN.exp(WKvO - Z5xZ) return O48W / oyIN.sum(O48W, axis=1).reshape(-1, 1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def N93T(YKHO, cCrA):\n MvhI = oyIN.sum(oyIN.exp(cCrA), axis=1, keepdims=True)\n N93T = oyIN.exp(cCrA) / MvhI\n return N93T", "def N93T(cCrA):\n XeFQ = oyIN.exp(cCrA)\n return XeFQ / oyIN.sum(XeFQ)", "def N93T(WKvO):\n j1LR = oyIN.exp(oyIN.asarray(WKvO))\n return j1LR / j1LR.sum(0)", "de...
[ "0.77987385", "0.7762009", "0.7761647", "0.77591646", "0.76599663", "0.76599663", "0.76599663", "0.76599663", "0.75852114", "0.743222", "0.7408266", "0.739256", "0.73172486", "0.7269417", "0.7262718", "0.72612756", "0.72568876", "0.7230255", "0.7215012", "0.720197", "0.720152...
0.73593086
12
Tests password grant client using invalid access_token. Should get the value of the RESPONSE variable as response.
def bZrY(YKHO): YKHO.legacy_client._client.access_token = 'invalidaccesstoken' geh0 = YKHO.legacy_client.request('GET', TDhU(zDeW, cRR7)) YKHO.assertEquals(geh0.content, l3V7)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TZfL(YKHO, udfG):\n geh0 = udfG.post('/api/auth/reset', json=dict(reset_password_token=str(VuvO(identity=Nc2H(uuid=qxeD.uuid4()))), password='Azerty!123'))\n Ylbp = qQXR.loads(geh0.data)\n assert geh0.status_code == 401\n assert Ylbp['status'] == False", "def eqUZ(YKHO):\n YKHO.url = '/auth'\n...
[ "0.7945359", "0.7509812", "0.7192609", "0.70503557", "0.7032285", "0.7015873", "0.6997684", "0.69743353", "0.69549245", "0.69501334", "0.6931089", "0.6873215", "0.68258214", "0.6778011", "0.6744043", "0.67386097", "0.67342347", "0.6731648", "0.67307115", "0.66999334", "0.6698...
0.6848939
12
Find the shortest distance between two lines in the form y(t1) = r1 + v1 t1 and y(t2) = r2 + v2 t2 If the two lines are parallel then distance will be correct but there are infinitely many (t1, t2) that gives that distance, of which the function will pick only one of For bounded t1 and t2, see shortest_distance_bounded
def ghVW(J1b4: np.ndarray, hQHm: np.ndarray, CYjz: np.ndarray, jlSq: np.ndarray, SGf8: float=1e-05) -> AzJI[float, AzJI[float, float]]: if oyIN.abs(oyIN.dot(hQHm, jlSq)) < oyIN.linalg.norm(hQHm) * oyIN.linalg.norm(jlSq) - SGf8: A3Vt = CYjz - J1b4 k0lF = oyIN.array([[oyIN.dot(hQHm, hQHm), -oyIN.dot(h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def i8Vw(J1b4: np.ndarray, hQHm: np.ndarray, CYjz: np.ndarray, jlSq: np.ndarray, SGf8: float=1e-05) -> AzJI[float, AzJI[float, float]]:\n j2vy, (pzNB, Kmrr) = ghVW(J1b4, hQHm, CYjz, jlSq, eps=SGf8)\n if not (0 <= pzNB <= 1 and 0 <= Kmrr <= 1):\n HGCR = J1b4 - CYjz\n krFF = oyIN.dot(hQHm, jlSq)\...
[ "0.7688705", "0.72383654", "0.703323", "0.70010114", "0.68556476", "0.68519527", "0.6795732", "0.67852193", "0.6650775", "0.6583123", "0.6526396", "0.65094787", "0.6466398", "0.6451611", "0.64506114", "0.6424365", "0.6417061", "0.6410363", "0.63699245", "0.63277406", "0.63201...
0.7512283
1
Find the shortest distance between two lines in the form y(t1) = r1 + v1 t1 and y(t2) = r2 + v2 t2 where 0 <= t1, t2 <= 1 If the two lines are parallel then there may be infinitely many (t1, t2) that gives minimal distance but the function will only give one of the valid solutions For unbounded t1 and t2, see shortest_...
def i8Vw(J1b4: np.ndarray, hQHm: np.ndarray, CYjz: np.ndarray, jlSq: np.ndarray, SGf8: float=1e-05) -> AzJI[float, AzJI[float, float]]: j2vy, (pzNB, Kmrr) = ghVW(J1b4, hQHm, CYjz, jlSq, eps=SGf8) if not (0 <= pzNB <= 1 and 0 <= Kmrr <= 1): HGCR = J1b4 - CYjz krFF = oyIN.dot(hQHm, jlSq) V...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ghVW(J1b4: np.ndarray, hQHm: np.ndarray, CYjz: np.ndarray, jlSq: np.ndarray, SGf8: float=1e-05) -> AzJI[float, AzJI[float, float]]:\n if oyIN.abs(oyIN.dot(hQHm, jlSq)) < oyIN.linalg.norm(hQHm) * oyIN.linalg.norm(jlSq) - SGf8:\n A3Vt = CYjz - J1b4\n k0lF = oyIN.array([[oyIN.dot(hQHm, hQHm), -oy...
[ "0.775275", "0.7173928", "0.6953018", "0.6942969", "0.69399667", "0.68104494", "0.67582613", "0.6741229", "0.6726619", "0.6711318", "0.6623188", "0.66149825", "0.66066223", "0.6599096", "0.6532751", "0.6495348", "0.6459801", "0.64263487", "0.64104116", "0.6399223", "0.6380627...
0.7179989
1
Returns starting state of the board.
def W9gz(): return [[KAvf, KAvf, KAvf], [KAvf, KAvf, KAvf], [KAvf, KAvf, KAvf]]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rEkR(YKHO):\n return oyIN.zeros(YKHO.board_size, dtype=oyIN.int8)", "def rEkR():\n return H66R.Board()", "def jKlz(YKHO):\n return (YKHO.startingPosition, (False, False, False, False))", "def D3Ar(YKHO):\n gnPz.raiseNotDefined()", "def D3Ar(YKHO):\n gnPz.raiseNotDefined()", "def D3Ar(Y...
[ "0.8081514", "0.7890486", "0.7534929", "0.72789717", "0.72789717", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", ...
0.0
-1
True if `node` is a process class. A process class is a class whose bases contain the name $KW_PROCESS_DEF.
def SvT4(Q6kx): if isinstance(Q6kx, s5dF): for Fg_i in Q6kx.bases: if isinstance(Fg_i, av29) and Fg_i.id == vyXH: return True return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def as9g(object):\n if not tq_1.isclass(object):\n return False\n if MP1F(object):\n return False\n return type not in tq_1.getmro(object)", "def as9g(object):\n return isinstance(object, (type, SnBA.ClassType))", "def s3SO(Emd4: Class) -> bool:\n pass", "def NC32(object):\n i...
[ "0.655758", "0.65332294", "0.65198153", "0.6371962", "0.6361161", "0.6326915", "0.6168784", "0.6137304", "0.6049639", "0.603711", "0.59486866", "0.59046435", "0.5879915", "0.5852993", "0.5834936", "0.5803222", "0.57775855", "0.5755141", "0.57380825", "0.5737106", "0.57368344"...
0.9123996
0
Convenience method to instantiate an expression node.
def CViS(YKHO, nJGx, jZ4I, NArs=None, huG4=False): if NArs is None: VN2L = nJGx(YKHO.current_parent, ast=jZ4I) else: VN2L = nJGx(YKHO.current_parent, ast=jZ4I, **NArs) if not huG4: YKHO.push_state(VN2L) return VN2L
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def EAP8(lsX7: str) -> Ziit.ExpNode:\n s2mk = wr3U(lsX7)\n Q6kx = n3LG(s2mk)\n return Q6kx", "def NTmi(Q6kx, **B2fa):\n return PZJO('Exp', Q6kx, B2fa)", "def CxaR(YKHO):\n Q6kx = YKHO.ast_node\n if len(Q6kx.body) == 1 and isinstance(Q6kx.body[0], jZ4I.Expr):\n return jZ4I.Expression(Q6...
[ "0.66690403", "0.65890986", "0.6388806", "0.63711005", "0.62891746", "0.62891746", "0.6280932", "0.62340486", "0.6224012", "0.61840016", "0.6148236", "0.6148236", "0.60829765", "0.5976024", "0.5886891", "0.5849652", "0.5801457", "0.5801457", "0.5801206", "0.5791902", "0.57440...
0.72887707
0
Parse all branches in an await statement. 'stmtobj' is the DistNode instance of the await statement to be populated; 'node' is the input Python AST node corresponding to the outermost 'If' statement. This method is common code to parse the second to last branches of AwaitStmt and LoopingAwaitStmt, since the first branc...
def zPno(YKHO, jN2x, Q6kx): Yb4p = False mkVU = [Q6kx] while True: if len(mkVU) == 0: break elif len(mkVU) == 1 and isinstance(mkVU[0], gvyR): Q6kx = mkVU[0] YKHO.debug('checking await branch {}'.format(ChRH(Q6kx))) if ByMQ(qGE7, 0, 1, Q6kx.tes...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CM2c(YKHO, Q6kx: Node) -> bDy6[NTRO]:\n yield from YKHO.line()\n afYC = iter(Q6kx.children)\n for aUGN in afYC:\n yield from YKHO.visit(aUGN)\n if aUGN.type == eOtH.ASYNC or aUGN.type == vx22:\n break\n qadz = next(afYC)\n if m8PN.improved_async_statements_handling in YK...
[ "0.5492106", "0.5315386", "0.5305906", "0.51987165", "0.5159142", "0.5027113", "0.498277", "0.48006976", "0.47863525", "0.47139806", "0.46591306", "0.46243605", "0.45984608", "0.4474116", "0.44683757", "0.4454898", "0.44446585", "0.44364792", "0.43934777", "0.43777758", "0.43...
0.80681074
0
Transforms an H5py Attributes set to a dict. Converts unicode string keys into standard strings and each value into a numpy array.
def XY_U(l4wq): JZs_ = j4hm.Nifti1Header() for G1Hx in list(l4wq.keys()): JZs_[str(G1Hx)] = oyIN.array(l4wq[G1Hx]) return JZs_
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MNRr(YKHO, azoT: Iterable[str]=('xyz', 'viewdir', 'imgsz', 'f', 'c', 'k', 'p')) -> cuzp[str, tuple]:\n return {H5ew: XN37.numpy_to_native(getattr(YKHO, H5ew)) for H5ew in azoT}", "def x8I_(YKHO, XigM):\n FWeX = XigM.dtype.kind\n YKHO.type = YKHO.hdfdtype2taurusdtype.get(FWeX)\n return oyIN.array(...
[ "0.6273163", "0.6238491", "0.60178626", "0.59820515", "0.59540015", "0.5917772", "0.5784124", "0.56589144", "0.5649177", "0.55536574", "0.5443483", "0.54375136", "0.5435946", "0.53815705", "0.53619564", "0.5360929", "0.5357357", "0.5350832", "0.53446954", "0.5331633", "0.5331...
0.4993594
55
Constructs a new object and sets the err_code.
def FIMM(YKHO, mWkm=None): YKHO.err_code = mWkm if YKHO.err_code in [mS46.value for mWFP, mS46 in Xj2n.__members__.items()]: eHh0 = 'An error was reported by NRFJPROG DLL: {} {}.'.format(YKHO.err_code, Xj2n(YKHO.err_code).name) else: eHh0 = 'An error was reported by NRFJPROG DLL: {}.'.format...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO, sIWq):\n YKHO.code = 400\n YKHO.from_email = sIWq\n xxyF.__init__(YKHO)", "def FIMM(YKHO, HCmI, OeU2, XObx):\n YKHO.cmd = HCmI\n YKHO.returncode = OeU2\n YKHO.stderr = XObx\n super(xxyF, YKHO).__init__('%s(%d):\\n%s' % (HCmI, OeU2, XObx))", "def FIMM(YKHO, Ol8d: str, Wxnj: i...
[ "0.7250533", "0.7121805", "0.67407286", "0.67291516", "0.6727062", "0.6712496", "0.65943885", "0.6573297", "0.65446734", "0.653595", "0.64752626", "0.6393396", "0.63846684", "0.6342004", "0.6335791", "0.63228005", "0.63133067", "0.62776124", "0.62608504", "0.62608504", "0.626...
0.7363331
0
Reads one uint32_t from the given address.
def p4Y5(YKHO, rRzo): if not YKHO._is_u32(rRzo): raise ValueError('The addr parameter must be an unsigned 32-bit value.') rRzo = gk2W.c_uint32(rRzo) nPrm = gk2W.c_uint32() Aofo = YKHO._lib.NRFJPROG_read_u32(rRzo, gk2W.byref(nPrm)) if Aofo != Xj2n.SUCCESS: raise yiLL(Aofo) return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OjKU(YKHO):\n bytes = YKHO.data[:4]\n BWXx = BlNT.unpack('!I', bytes)[0]\n YKHO.data = YKHO.data[4:]\n return BWXx", "def OjKU(YKHO, vYBr=0):\n return BlNT.unpack('!I', YKHO.read(4, vYBr))[0]", "def nPqU(ChRH, rRzo):\n return ChRH.ROM[rRzo]", "def yxzW(YKHO, dmhX='<'):\n return YKHO....
[ "0.74605775", "0.72654206", "0.72361827", "0.72340083", "0.7198595", "0.69844973", "0.6983256", "0.689552", "0.689552", "0.6859159", "0.6682239", "0.64660364", "0.64456624", "0.6412558", "0.6404227", "0.6378974", "0.6332016", "0.6254665", "0.6211742", "0.61968654", "0.6163783...
0.73873127
1
Reads the number of RAM sections in the device.
def dDeE(YKHO): UHFx = gk2W.c_uint32() Aofo = YKHO._lib.NRFJPROG_read_ram_sections_count(gk2W.byref(UHFx)) if Aofo != Xj2n.SUCCESS: raise yiLL(Aofo) return UHFx.value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Q_2M(YKHO):\n bNr0 = gk2W.c_uint32(YKHO.read_ram_sections_count())\n N7N_ = (gk2W.c_uint32 * bNr0.value)()\n Aofo = YKHO._lib.NRFJPROG_read_ram_sections_size(gk2W.byref(N7N_), bNr0)\n if Aofo != Xj2n.SUCCESS:\n raise yiLL(Aofo)\n return list(N7N_)", "def HvYj(YKHO):\n return YKHO.RAM...
[ "0.7352075", "0.6750111", "0.6580009", "0.65029943", "0.6450874", "0.64242095", "0.64123845", "0.64123845", "0.6306166", "0.6302806", "0.6284676", "0.6202259", "0.614262", "0.61313456", "0.6099081", "0.6061234", "0.60554683", "0.6038339", "0.60124433", "0.6008071", "0.5995252...
0.790749
0
Reads the size in bytes of the RAM sections in the device.
def Q_2M(YKHO): bNr0 = gk2W.c_uint32(YKHO.read_ram_sections_count()) N7N_ = (gk2W.c_uint32 * bNr0.value)() Aofo = YKHO._lib.NRFJPROG_read_ram_sections_size(gk2W.byref(N7N_), bNr0) if Aofo != Xj2n.SUCCESS: raise yiLL(Aofo) return list(N7N_)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DLL8(YKHO):\n return gTEQ('PrlVmCfg_GetRamSize', YKHO.handle)", "def OD_Z(YKHO) -> qe4Y.Output[float]:\n return qe4Y.get(YKHO, 'ram_size')", "def PooQ(YKHO):\n return gTEQ('PrlSrvCfg_GetHostRamSize', YKHO.handle)", "def bk0L(YKHO):\n return gTEQ('PrlStat_GetTotalRamSize', YKHO.handle)", "de...
[ "0.76060396", "0.7243078", "0.7214628", "0.71283555", "0.69231516", "0.6875077", "0.6868923", "0.680422", "0.678019", "0.6732679", "0.6701869", "0.6700879", "0.6689206", "0.66586924", "0.6651337", "0.6593511", "0.6593511", "0.65704083", "0.6569436", "0.65309244", "0.64161175"...
0.76325065
0
Reads the version of the device connected to the emulator.
def biG5(YKHO): DpZH = gk2W.c_int() Aofo = YKHO._lib.NRFJPROG_read_device_version(gk2W.byref(DpZH)) if Aofo != Xj2n.SUCCESS: raise yiLL(Aofo) return Ep3v(DpZH.value).name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def get_version(YKHO):\n RKD7.info('get_version')\n DpZH = ''\n hlel = await YKHO.send_command(YKHO.cmd_get_version)\n DpZH = hlel.split('Version ')[1].split(',')[0]\n RKD7.info(f'get_version: version: {DpZH}')\n return DpZH", "async def get_version(YKHO):\n RKD7.info('get_version')\n ...
[ "0.74363184", "0.7408226", "0.69415605", "0.6938506", "0.6823203", "0.66631424", "0.6620424", "0.6445345", "0.6418246", "0.63731045", "0.63592994", "0.6358473", "0.63533896", "0.6347753", "0.6342288", "0.63346815", "0.630771", "0.62881714", "0.628783", "0.62597597", "0.623962...
0.7234476
2
Ensure correct exception is raised when invalid email specified.
def rWfs(YKHO): for doNR in YKHO.bad_emails: with cR0t(mK0T): _ger = k44P(doNR)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NDUF(YKHO):\n pass", "def Bt7w(YKHO, D3lj):\n CBIr = mv1M.query.filter_by(email=D3lj.data).first()\n if CBIr is not None:\n raise sUXu('Please use a different email address.')", "def qvpV(YKHO):\n YAq3 = TVpy(YKHO.org_name, YKHO.user_id)\n fRTZ = '*@domain.loc'\n YKHO.assertRaises(...
[ "0.7454961", "0.7422428", "0.73768336", "0.7277472", "0.7224521", "0.71356344", "0.7091218", "0.7074175", "0.7058544", "0.70581603", "0.69338495", "0.6890561", "0.6887649", "0.68856263", "0.6860983", "0.6849489", "0.68414706", "0.6829037", "0.6808504", "0.6803273", "0.6792323...
0.62169564
96
Ensure correct exception is raised for invalid email via settings.
def qvf7(YKHO): for doNR in YKHO.bad_emails: with cR0t(mK0T): gCuF.GTMETRIX_REST_API_EMAIL = doNR _ger = k44P()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NDUF(YKHO):\n pass", "def KguP(YKHO):\n fRTZ = '*@domain.loc'\n rRzo = JvNO(YKHO.org_name, YKHO.user_id)\n YKHO.assertRaises(P1dF.InputError, rRzo.get, fRTZ)", "def qvpV(YKHO):\n YAq3 = TVpy(YKHO.org_name, YKHO.user_id)\n fRTZ = '*@domain.loc'\n YKHO.assertRaises(P1dF.InputError, YAq3....
[ "0.7331171", "0.6790501", "0.67648584", "0.6653664", "0.6649247", "0.64694893", "0.64140385", "0.64044905", "0.6383289", "0.63709015", "0.62525195", "0.6233839", "0.6228184", "0.6219368", "0.62145823", "0.61761713", "0.6173339", "0.6140917", "0.6128471", "0.6126067", "0.61086...
0.6298328
10
Ensure correct exception is raised when email is None.
def p4UP(YKHO): gCuF.GTMETRIX_REST_API_EMAIL = None with cR0t(xipf): _ger = k44P()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NDUF(YKHO):\n pass", "def Bt7w(YKHO, D3lj):\n CBIr = mv1M.query.filter_by(email=D3lj.data).first()\n if CBIr is not None:\n raise sUXu('Please use a different email address.')", "def Q5xs(YKHO):\n with trZe.raises(ValueError) as wrFM:\n biYH.objects._create_user(None, None, False,...
[ "0.70582503", "0.680179", "0.674283", "0.6674118", "0.6627228", "0.6544808", "0.65004957", "0.6496558", "0.6476551", "0.6432398", "0.64202744", "0.64022255", "0.639223", "0.6388189", "0.63824826", "0.63722885", "0.6336065", "0.628049", "0.6271358", "0.6251391", "0.6246619", ...
0.71447194
0
Ensure correct exception is raised when API key is None.
def O8jw(YKHO): gCuF.GTMETRIX_REST_API_KEY = None with cR0t(QPhB): _ger = k44P()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Rn14(YKHO):\n YKHO.assertRaises(Exception, Zojl.init, None, '123')", "def WOzG(YKHO):\n try:\n qDWf()\n YKHO.fail(msg='A None api key must raise an error')\n except ValueError:\n YKHO.assertTrue(True)", "def WOzG(YKHO):\n try:\n qDWf()\n YKHO.fail(msg='A None ...
[ "0.77560174", "0.76446766", "0.76446766", "0.7602997", "0.7458726", "0.7422191", "0.7373884", "0.7192134", "0.71258014", "0.7118628", "0.7076128", "0.70733726", "0.701515", "0.6926657", "0.6896923", "0.6856009", "0.68159527", "0.67521113", "0.6700488", "0.66895646", "0.665630...
0.7506823
4
Property that returns the name (ref) of this font.
def bf9h(YKHO) -> str: return YKHO._ref
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uLFj(YKHO):\n return _VfD.TextGlyph_getElementName(YKHO)", "def o9av(YKHO):\n return YKHO['font']", "def o9av(YKHO):\n return YKHO['font']", "def o9av(YKHO):\n return YKHO['font']", "def o9av(YKHO):\n return YKHO.m_font", "def o9av(YKHO):\n return YKHO.m_font", "def uLFj(YKHO):\n ...
[ "0.7318253", "0.72829306", "0.72829306", "0.72829306", "0.71841156", "0.71841156", "0.70032424", "0.69875574", "0.69780207", "0.6975267", "0.69513994", "0.69286174", "0.689845", "0.6875197", "0.6855921", "0.6830856", "0.6830856", "0.6830856", "0.68273556", "0.68273556", "0.68...
0.0
-1
Testing .should_render with authenticated user in readonly mode
def Q1re(YKHO) -> None: YKHO.request.user = mv1M.objects.get(username='doc') mF0i = YKHO._create_request_context(user=YKHO.request.user) gCuF = {'site_read_only': True} with KT5P(S2Xd.feature_id, False): with YKHO.siteconfig_settings(gCuF): if getattr(YKHO, 'read_only_always_show', F...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tH9u(YKHO) -> None:\n with KT5P(S2Xd.feature_id, False):\n YKHO.request.user = mv1M.objects.get(username='doc')\n YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(mv1M.objects.get(username='doc'))))", "def v_hO(YKHO) -> None:\n YKHO.assertFalse(YKHO.action.sh...
[ "0.74514544", "0.733686", "0.73367846", "0.731717", "0.72554845", "0.7090943", "0.7090943", "0.7042401", "0.6940355", "0.6940355", "0.68994427", "0.68871844", "0.68871844", "0.68701977", "0.68701977", "0.6814364", "0.677291", "0.6734949", "0.66852564", "0.6663528", "0.6537689...
0.80076516
0
Testing .should_render with superuser in readonly mode
def A7FJ(YKHO) -> None: YKHO.request.user = mv1M.objects.get(username='admin') mF0i = YKHO._create_request_context(user=YKHO.request.user) gCuF = {'site_read_only': True} with KT5P(S2Xd.feature_id, False): with YKHO.siteconfig_settings(gCuF): YKHO.assertTrue(YKHO.action.should_render...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Q1re(YKHO) -> None:\n YKHO.request.user = mv1M.objects.get(username='doc')\n mF0i = YKHO._create_request_context(user=YKHO.request.user)\n gCuF = {'site_read_only': True}\n with KT5P(S2Xd.feature_id, False):\n with YKHO.siteconfig_settings(gCuF):\n if getattr(YKHO, 'read_only_alwa...
[ "0.797763", "0.75428736", "0.7526946", "0.73408777", "0.73408777", "0.7320224", "0.71348166", "0.71348166", "0.7109874", "0.7090042", "0.7058259", "0.7058259", "0.70454884", "0.70380366", "0.69843984", "0.6957058", "0.69528633", "0.6949069", "0.6949069", "0.6828154", "0.68024...
0.80491155
0
Testing AddGeneralCommentAction.should_render with authenticated user
def tH9u(YKHO) -> None: with KT5P(S2Xd.feature_id, False): YKHO.request.user = mv1M.objects.get(username='doc') YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(mv1M.objects.get(username='doc'))))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JB5D(YKHO) -> None:\n YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(user=YKHO.create_user())))", "def v_hO(YKHO) -> None:\n YKHO.assertFalse(YKHO.action.should_render(context=YKHO._create_request_context(user=YKHO.create_user(), can_edit_reviewrequest=False)))", "def ...
[ "0.7207594", "0.71631515", "0.7016978", "0.66650844", "0.66650844", "0.6650457", "0.6641605", "0.661972", "0.6585243", "0.652319", "0.6433386", "0.6395934", "0.63753045", "0.6296443", "0.62556934", "0.6254704", "0.619638", "0.6138733", "0.61252654", "0.6124634", "0.6124634", ...
0.6983535
3
Testing AddGeneralCommentAction.should_render with authenticated user
def VPqp(YKHO) -> None: with KT5P(S2Xd.feature_id, False): YKHO.assertFalse(YKHO.action.should_render(context=YKHO._create_request_context()))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JB5D(YKHO) -> None:\n YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(user=YKHO.create_user())))", "def v_hO(YKHO) -> None:\n YKHO.assertFalse(YKHO.action.should_render(context=YKHO._create_request_context(user=YKHO.create_user(), can_edit_reviewrequest=False)))", "def ...
[ "0.7207006", "0.71624136", "0.7014683", "0.6983014", "0.6664293", "0.6664293", "0.6649253", "0.6640937", "0.6618635", "0.6583004", "0.65242714", "0.64344454", "0.6396997", "0.63738066", "0.62975335", "0.6254493", "0.6253624", "0.6196815", "0.6137627", "0.6125279", "0.6123602"...
0.0
-1
Testing DeleteAction.should_render with standard user
def DHEm(YKHO) -> None: YKHO.assertFalse(YKHO.action.should_render(context=YKHO._create_request_context(user=YKHO.create_user(), delete_reviewrequest=False)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _4cr(YKHO, x0hE, DW23):\n CBIr = DW23[0]\n bD7m = gxEw('users:delete', args=(CBIr.pk,))\n geh0 = x0hE.get(bD7m)\n assert geh0.status_code == 405\n geh0 = x0hE.post(bD7m)\n assert geh0.status_code == 302\n assert geh0.url == gxEw('users:list')\n assert not egNl().objects.filter(pk=CBIr.p...
[ "0.70547354", "0.70107913", "0.7004414", "0.69771314", "0.69582945", "0.6956348", "0.6901423", "0.6901423", "0.6869667", "0.6846094", "0.6804972", "0.6790064", "0.6781285", "0.6732302", "0.6727654", "0.67233634", "0.67095923", "0.66421187", "0.66409165", "0.6590441", "0.65790...
0.0
-1
Testing SubmitAction.should_render with delete_reviewrequest permission
def xiUU(YKHO) -> None: YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(user=YKHO.create_user())))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kfVs(YKHO) -> None:\n YKHO.assertFalse(YKHO.action.should_render(context=YKHO._create_request_context(status=RDXT.SUBMITTED, can_edit_reviewrequest=False)))", "def kfVs(YKHO) -> None:\n YKHO.assertFalse(YKHO.action.should_render(context=YKHO._create_request_context(status=RDXT.SUBMITTED)))", "def UAq...
[ "0.75271714", "0.7344784", "0.7235159", "0.7139551", "0.70953876", "0.70604724", "0.70341945", "0.68519115", "0.6822009", "0.67859674", "0.67341405", "0.66789305", "0.65090257", "0.635289", "0.63489854", "0.6322629", "0.62811244", "0.62464947", "0.61629283", "0.6130923", "0.6...
0.6204196
18
Testing DownloadDiffAction.should_render on diff viewer revision page
def Kc0e(YKHO) -> None: YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(url_name='view-diff-revision')))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Exbh(YKHO) -> None:\n YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(url_name='view-diff')))", "def B649(YKHO) -> None:\n YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(url_name='view-diff-revision')))", "def bkHZ(YKHO) -> None:\n YKH...
[ "0.83775145", "0.8289545", "0.78473103", "0.71890813", "0.7097729", "0.6764223", "0.650113", "0.64987487", "0.6482964", "0.6395149", "0.6214179", "0.62034947", "0.6025509", "0.5973645", "0.5962278", "0.59599113", "0.5933343", "0.5931815", "0.5916268", "0.5905906", "0.57801276...
0.8616411
0
Testing DownloadDiffAction.should_render on review request page with repository but no diff
def okrM(YKHO) -> None: lnN1 = YKHO.create_review_request(create_repository=True) YKHO.assertFalse(YKHO.action.should_render(context=YKHO._create_request_context(review_request=lnN1, url_name='review-request-detail')))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Exbh(YKHO) -> None:\n YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(url_name='view-diff')))", "def benG(YKHO) -> None:\n lnN1 = YKHO.create_review_request(create_repository=True)\n YKHO.create_diffset(lnN1)\n YKHO.assertTrue(YKHO.action.should_render(context=YKHO....
[ "0.7754138", "0.7713281", "0.7699996", "0.7438683", "0.7124885", "0.7084052", "0.69895416", "0.6968374", "0.6928051", "0.6649646", "0.6631256", "0.66295385", "0.6499621", "0.64620256", "0.64596045", "0.64441293", "0.644155", "0.6379703", "0.6350943", "0.6334656", "0.62594265"...
0.6945492
8
Testing DownloadDiffAction.should_render on review request page with repository and diff history
def benG(YKHO) -> None: lnN1 = YKHO.create_review_request(create_repository=True) YKHO.create_diffset(lnN1) YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(review_request=lnN1, url_name='review-request-detail')))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Exbh(YKHO) -> None:\n YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(url_name='view-diff')))", "def B649(YKHO) -> None:\n YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(url_name='view-diff-revision')))", "def Kc0e(YKHO) -> None:\n YKH...
[ "0.77910864", "0.7777426", "0.7682554", "0.7187873", "0.6929177", "0.69143766", "0.66998", "0.6668523", "0.661293", "0.657886", "0.6427038", "0.64234275", "0.64174855", "0.6410569", "0.6212819", "0.6206998", "0.618092", "0.6180652", "0.61484027", "0.612429", "0.6051135", "0...
0.7816348
0
Testing DownloadDiffAction.should_render on review request page without repository
def Fp3u(YKHO) -> None: YKHO.assertFalse(YKHO.action.should_render(context=YKHO._create_request_context(url_name='review-request-detail')))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Exbh(YKHO) -> None:\n YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(url_name='view-diff')))", "def benG(YKHO) -> None:\n lnN1 = YKHO.create_review_request(create_repository=True)\n YKHO.create_diffset(lnN1)\n YKHO.assertTrue(YKHO.action.should_render(context=YKHO....
[ "0.7697551", "0.7670038", "0.7613932", "0.7427935", "0.71732986", "0.7168049", "0.7008761", "0.69408983", "0.6758537", "0.6706286", "0.66249204", "0.6513537", "0.64972883", "0.6437695", "0.6418223", "0.6402991", "0.633593", "0.63318497", "0.630383", "0.6290195", "0.625938", ...
0.7407111
4
Testing EditReviewAction.should_render with authenticated user
def tH9u(YKHO) -> None: with KT5P(S2Xd.feature_id, False): YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(user=mv1M.objects.get(username='doc'))))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JB5D(YKHO) -> None:\n YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(user=YKHO.create_user())))", "def v_hO(YKHO) -> None:\n YKHO.assertFalse(YKHO.action.should_render(context=YKHO._create_request_context(user=YKHO.create_user(), can_edit_reviewrequest=False)))", "def ...
[ "0.8599244", "0.76221794", "0.75852954", "0.7081106", "0.70259064", "0.68972456", "0.68813974", "0.68464667", "0.6834606", "0.6803036", "0.6798159", "0.6798159", "0.6784587", "0.6759837", "0.66952646", "0.6682992", "0.666559", "0.66337097", "0.6616717", "0.65788424", "0.65348...
0.6661435
17
Testing EditReviewAction.should_render with authenticated user
def VPqp(YKHO) -> None: with KT5P(S2Xd.feature_id, False): YKHO.assertFalse(YKHO.action.should_render(context=YKHO._create_request_context()))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JB5D(YKHO) -> None:\n YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(user=YKHO.create_user())))", "def v_hO(YKHO) -> None:\n YKHO.assertFalse(YKHO.action.should_render(context=YKHO._create_request_context(user=YKHO.create_user(), can_edit_reviewrequest=False)))", "def ...
[ "0.8599678", "0.7624998", "0.7587424", "0.70835865", "0.70292944", "0.69008857", "0.6884847", "0.6847483", "0.6838115", "0.68066674", "0.6802112", "0.6802112", "0.6788367", "0.6762419", "0.6697853", "0.66866815", "0.66681165", "0.6663902", "0.6663902", "0.66350853", "0.661863...
0.0
-1
Testing EditReviewAction.should_render with authenticated user in readonly mode
def Q1re(YKHO) -> None: with KT5P(S2Xd.feature_id, False): super().test_should_render_with_user_in_read_only()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JB5D(YKHO) -> None:\n YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(user=YKHO.create_user())))", "def Q1re(YKHO) -> None:\n YKHO.request.user = mv1M.objects.get(username='doc')\n mF0i = YKHO._create_request_context(user=YKHO.request.user)\n gCuF = {'site_read_only...
[ "0.83706677", "0.7599034", "0.7584141", "0.75592184", "0.725162", "0.7045682", "0.7045682", "0.7036535", "0.7022729", "0.69853616", "0.6905408", "0.68588436", "0.6828346", "0.6818323", "0.6783553", "0.6658626", "0.662889", "0.65211576", "0.652105", "0.6498449", "0.6498449", ...
0.6394639
23
Testing EditReviewAction.should_render with superuser in readonly mode
def A7FJ(YKHO) -> None: with KT5P(S2Xd.feature_id, False): super().test_should_render_with_superuser_in_read_only()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JB5D(YKHO) -> None:\n YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(user=YKHO.create_user())))", "def v_hO(YKHO) -> None:\n YKHO.assertFalse(YKHO.action.should_render(context=YKHO._create_request_context(user=YKHO.create_user(), can_edit_reviewrequest=False)))", "def ...
[ "0.83639276", "0.76599526", "0.76423806", "0.76321733", "0.74272186", "0.7270355", "0.7104314", "0.7066008", "0.70650584", "0.70097446", "0.6995623", "0.6946107", "0.6946107", "0.68171036", "0.67885864", "0.6787406", "0.6756553", "0.6676307", "0.6676307", "0.6650827", "0.6616...
0.660424
21
Testing ShipItAction.should_render with authenticated user in readonly mode
def Q1re(YKHO) -> None: with KT5P(S2Xd.feature_id, False): super().test_should_render_with_user_in_read_only()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Q1re(YKHO) -> None:\n YKHO.request.user = mv1M.objects.get(username='doc')\n mF0i = YKHO._create_request_context(user=YKHO.request.user)\n gCuF = {'site_read_only': True}\n with KT5P(S2Xd.feature_id, False):\n with YKHO.siteconfig_settings(gCuF):\n if getattr(YKHO, 'read_only_alwa...
[ "0.75318605", "0.7349973", "0.72334635", "0.7210595", "0.7160369", "0.70847636", "0.7055283", "0.7055283", "0.6923289", "0.67042536", "0.664933", "0.6550036", "0.65016043", "0.65016043", "0.64827687", "0.64827687", "0.6451957", "0.63858503", "0.6344336", "0.6324199", "0.62915...
0.6545128
12
Testing UpdateMenuAction.should_render for normal user
def v_hO(YKHO) -> None: YKHO.assertFalse(YKHO.action.should_render(context=YKHO._create_request_context(user=YKHO.create_user(), can_edit_reviewrequest=False)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def v_hO(YKHO) -> None:\n YKHO.assertFalse(YKHO.action.should_render(context=YKHO._create_request_context(can_change_status=False, user=YKHO.create_user())))", "def k9oV(YKHO) -> None:\n YKHO.assertTrue(YKHO.action.should_render(context=YKHO._create_request_context(can_change_status=True, user=YKHO.create_...
[ "0.7358709", "0.69584554", "0.6839753", "0.6834072", "0.6668127", "0.66482276", "0.6533988", "0.6523498", "0.65175974", "0.63896227", "0.63859", "0.6342983", "0.6247167", "0.61903006", "0.61903006", "0.6144086", "0.61329347", "0.61329347", "0.60927844", "0.6068036", "0.603191...
0.6862708
2
Creates a local `PasswordPolicy` instance Parameters can be supplied on creation of the instance or given by setting the properties on the instance after creation. Parameters marked as `required` must be set for one or more operations on the entity. For details on when they are required please see the documentation for...
def FIMM(YKHO, QtIL=None, JW3T=None): super().__init__(_client=QtIL) YKHO._minimum_length = V_D6.IntegerField(value=JW3T)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(Ro_8, kFeU: str, qIxc: Optional[PolicyPasswordDefaultArgs]=None, VKhi: Optional[pulumi.ResourceOptions]=None):\n ...", "def Bjvo(wvEv):\n wvEv.add_argument('--password-policy-min-length', type=int, required=False, default=None, help='Minimum number of characters allowed in the password.')", "def...
[ "0.61535984", "0.5872361", "0.5814216", "0.54333234", "0.5307084", "0.52602905", "0.52050066", "0.5192926", "0.5150016", "0.51398796", "0.5077292", "0.5067204", "0.50543684", "0.5034869", "0.5034869", "0.49692696", "0.4968326", "0.49046943", "0.48645148", "0.4864281", "0.4857...
0.0
-1
When the game is over clear the screen and display a game over message
def zxFP(): Vjhr.fill(a9eO.Color('black'), (0, 0, lpFQ[0], lpFQ[1])) Fa7c, VRm2 = SIDP.render('Game Over', eJVO) tQR6, elcS = SIDP.render('Press [Enter] to play again', eJVO) dtS8 = Fa7c.get_width() Uk87 = Fa7c.get_height() IOG9 = tQR6.get_width() rj3P = tQR6.get_height() PtQH = (lpFQ[0]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VtS_(YKHO):\n if YKHO.alive:\n return\n YKHO.screen.fill(HRmL.BLACK)\n YKHO.draw_text('GAME OVER', BbuA, font=Zjvh, size=48, color=HRmL.WHITE)\n kaeV = 'Press any key to play again'\n xBPq = (QpEI, J_4V - fAlY)\n YKHO.draw_text(kaeV, xBPq, color=HRmL.WHITE)\n a9eO.display.flip()\n ...
[ "0.80920416", "0.78605276", "0.783621", "0.7732328", "0.77193934", "0.76720893", "0.76268965", "0.7622656", "0.7472521", "0.74137056", "0.73719174", "0.73044", "0.72926575", "0.728372", "0.72714436", "0.7237865", "0.7228063", "0.72257113", "0.7140525", "0.70916843", "0.707990...
0.74491936
9
Returns the length of the dataset.
def szAg(YKHO): if YKHO.mode.lower() == 'train': return len(YKHO.train_data) elif YKHO.mode.lower() == 'val': return len(YKHO.val_data) elif YKHO.mode.lower() == 'test': return len(YKHO.test_data) else: raise RuntimeError('Unexpected dataset mode. Supported modes are: tra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def szAg(YKHO):\n return YKHO._dataset.size(dirs=YKHO._dirs)", "def hU8i(YKHO):\n return YKHO.dataset.size", "def u54L(YKHO) -> int:\n return len(YKHO.data)", "def zNig(YKHO) -> int:\n return YKHO.da.length()", "def zNig(YKHO) -> int:\n return YKHO.da.length()", "def zNig(YKHO) -> int:\n ...
[ "0.83699137", "0.82944065", "0.82489866", "0.8196022", "0.8165865", "0.8165865", "0.8165865", "0.8165865", "0.8165246", "0.8165246", "0.8165246", "0.8137399", "0.8098832", "0.8098466", "0.8093488", "0.8084871", "0.80494523", "0.79925597", "0.79760975", "0.7974805", "0.7961297...
0.7864654
32
Return True if ``i`` is contained in FreeGroup.
def FYXB(YKHO, YRbF): if not isinstance(YRbF, txLi): return False uOe2 = YRbF.group return YKHO == uOe2
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sjXf(YKHO, Oa1e):\n if not isinstance(Oa1e, txLi):\n return False\n elif YKHO != Oa1e.group:\n return False\n else:\n return True", "def FYXB(YKHO, YRbF):\n if not isinstance(YRbF, HJa_):\n raise TypeError('A PermutationGroup contains only Permutations as elements, not...
[ "0.7190415", "0.6773943", "0.65448916", "0.6507174", "0.6496256", "0.6340962", "0.6328278", "0.60016507", "0.5907625", "0.5897921", "0.586647", "0.568023", "0.5636958", "0.5635286", "0.56333977", "0.56119436", "0.55686116", "0.55582297", "0.5503539", "0.5497165", "0.54368114"...
0.86510825
0
No ``FreeGroup`` is equal to any "other" ``FreeGroup``.
def xa14(YKHO, Elif): return YKHO is Elif
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xa14(YKHO, Elif):\n uOe2 = YKHO.group\n if not isinstance(Elif, uOe2.dtype):\n return False\n return tuple.__eq__(YKHO, Elif)", "def xa14(YKHO, Elif):\n if not isinstance(Elif, RGKx):\n return False\n return YKHO.__dict__ == Elif.__dict__", "def Vdqg(YKHO, Elif):\n if not is...
[ "0.680781", "0.6629172", "0.649419", "0.6467049", "0.6384119", "0.63658315", "0.6360766", "0.63132966", "0.63064766", "0.6254017", "0.622681", "0.6146064", "0.6144021", "0.6121116", "0.6029886", "0.59881395", "0.5987677", "0.5944904", "0.5887829", "0.58711296", "0.5870397", ...
0.5505167
74
Return the index of the generator `gen` from ``(f_0, ..., f_(n1))``. Examples ======== >>> from sympy.combinatorics import free_group >>> F, x, y = free_group("x, y") >>> F.index(y) 1 >>> F.index(x) 0
def d6pt(YKHO, eK5b): if isinstance(eK5b, YKHO.dtype): return YKHO.generators.index(eK5b) else: raise ValueError('expected a generator of Free Group %s, got %s' % (YKHO, eK5b))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TgVd(YKHO, d6pt):\n pQTq = 0\n for uOe2 in YKHO.groups:\n if uOe2[0] == d6pt:\n pQTq = uOe2[1]\n break\n return pQTq", "def JmRq(moMn, XBhG):\n fSV7 = oyIN.where(moMn == float(XBhG))[0]\n return fSV7", "def MBgc(YKHO, SjLr):\n d6pt = YKHO._features_index.get(S...
[ "0.66409075", "0.5960486", "0.5729509", "0.5537799", "0.5483446", "0.53788847", "0.53269875", "0.52567786", "0.52378565", "0.5236926", "0.5199934", "0.5187903", "0.5177708", "0.5170345", "0.5170345", "0.5109942", "0.51041853", "0.5096748", "0.5087298", "0.50445455", "0.500817...
0.76296705
0
Returns if the group is Abelian. Examples ======== >>> from sympy.combinatorics import free_group >>> f, x, y, z = free_group("x y z") >>> f.is_abelian False
def ZyVS(YKHO): return YKHO.rank in (0, 1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ZyVS(YKHO):\n if YKHO._is_abelian is not None:\n return YKHO._is_abelian\n YKHO._is_abelian = True\n i9El = [XP5J._array_form for XP5J in YKHO.generators]\n for WKvO in i9El:\n for LVAh in i9El:\n if LVAh <= WKvO:\n continue\n if not M8Md(WKvO, LVA...
[ "0.677203", "0.5576917", "0.541992", "0.539555", "0.53742665", "0.521224", "0.5192372", "0.51815444", "0.51405585", "0.50329155", "0.49684983", "0.49408498", "0.49355304", "0.49182686", "0.48758173", "0.48634103", "0.4836765", "0.48366687", "0.4835472", "0.4828485", "0.480235...
0.7342095
0
r"""Returns whether the word is cyclically reduced or not. A word is cyclically reduced if by forming the cycle of the word, the word is not reduced, i.e a word w = `a_1 ... a_n` is called cyclically reduced if `a_1 \ne a_n^{1}`. Examples ======== >>> from sympy.combinatorics import free_group >>> F, x, y = free_group(...
def dLWl(YKHO): if not YKHO: return True return YKHO[0] != YKHO[-1] ** (-1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OgLE(YKHO):\n return YKHO._.b[0] == 2 and YKHO._.c[-1] in [1, 2] and all((WKvO == 1 for WKvO in YKHO._.b[1:-1] + YKHO._.c[1:-1]))", "def VWe0(YKHO, yzQ0):\n jtyf = len(YKHO)\n V70B = len(yzQ0)\n if jtyf != V70B:\n return False\n s1k6 = YKHO.identity_cyclic_reduction()\n xMw6 = yzQ0.i...
[ "0.6900463", "0.67388237", "0.6497785", "0.64112645", "0.632175", "0.6258167", "0.6223497", "0.6168997", "0.6069463", "0.5856837", "0.58147407", "0.5768923", "0.5700124", "0.5636912", "0.5630098", "0.5530994", "0.5505602", "0.5505602", "0.5478468", "0.54674065", "0.5448675", ...
0.7015829
0
Return if the project can be transfered to another member.
def MqtM(bNKA, PXKw): if bNKA.owner is None: return {'can_be_updated': False, 'reason': s1U7} if bNKA.owner == PXKw: return (True, None) if bNKA.is_private: EK6c = PXKw.owned_projects.filter(is_private=True).count() a00E = PXKw.max_private_projects iLGG = bGrB("You ca...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def m4il(YKHO, QePW, tTee, YEnM):\n if TbPK.objects.filter(project=YEnM, user=QePW.user):\n return True\n else:\n return False", "def zfi7(bNKA):\n if bNKA.owner is None:\n return {'can_be_updated': False, 'reason': s1U7}\n if bNKA.is_private:\n EK6c = bNKA.owner.owned_pro...
[ "0.63639104", "0.6322275", "0.61260897", "0.6048867", "0.6004571", "0.5937367", "0.59325814", "0.5924727", "0.5855072", "0.584445", "0.58444226", "0.58417124", "0.5816573", "0.58079535", "0.5795928", "0.57497674", "0.57416356", "0.5723752", "0.5709887", "0.5696954", "0.566198...
0.74156016
0
Tokenizes each sentence in a given text.
def wr3U(l5Ny): l5Ny.lower() l5Ny = ZbWC.sub('[^a-zA-Z0-9]', ' ', l5Ny) V22M = dFss(l5Ny) V22M = [yzQ0 for yzQ0 in V22M if yzQ0 not in di0c.words('english')] fbkw = [GFnk().lemmatize(yzQ0) for yzQ0 in V22M] return V22M
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wr3U(l5Ny):\n yAmx = W66f(l5Ny)\n return yAmx.tokens()", "def EwIn(l5Ny):\n return N3rN(l5Ny)", "def Nub_(l5Ny):\n Rhv4 = Dhdw.sent_tokenize(l5Ny)\n YkkV = [Dhdw.word_tokenize(yAmx) for yAmx in Rhv4]\n TB3m = [Dhdw.pos_tag(yAmx) for yAmx in YkkV]\n Rhv4 = Dhdw.ne_chunk_sents(TB3m, bina...
[ "0.84118587", "0.8093714", "0.7868064", "0.78056514", "0.77664", "0.7671708", "0.7608955", "0.7574081", "0.7526311", "0.7507174", "0.75069135", "0.7493405", "0.7488409", "0.74365354", "0.7431596", "0.7421613", "0.7403201", "0.73916394", "0.73871404", "0.73830426", "0.73816246...
0.7162911
57
Return True if the user is authenticated.
def rts1(YKHO): return YKHO.authenticated
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rts1(YKHO):\n return YKHO.user is not None and YKHO.state == yTCL.authenticated", "def rts1(YKHO):\n return bool(Vu5X())", "def rts1(YKHO):\n return True", "def rts1(YKHO):\n return True", "def rts1(YKHO):\n return True", "def rts1(YKHO):\n return True", "def rts1(YKHO):\n retu...
[ "0.8739372", "0.87086535", "0.86574197", "0.86574197", "0.86574197", "0.86574197", "0.86574197", "0.86574197", "0.86574197", "0.8613915", "0.8609252", "0.8578436", "0.83723366", "0.83587176", "0.8258534", "0.82273275", "0.8209421", "0.8200795", "0.8174884", "0.81280386", "0.8...
0.8580474
17
False, as anonymous users aren't supported.
def wDqn(): return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wDqn(YKHO):\n return False", "def wDqn(YKHO):\n return False", "def wDqn(YKHO):\n return False", "def wDqn(YKHO):\n return False", "def wDqn(YKHO):\n return False", "def wDqn(YKHO):\n return False", "def wDqn(YKHO):\n return False", "def wDqn(YKHO):\n return False", "def...
[ "0.8379807", "0.8359887", "0.8359887", "0.8359887", "0.8359887", "0.8359887", "0.8359887", "0.8359887", "0.8359887", "0.8359887", "0.8359887", "0.8359887", "0.8359887", "0.8359887", "0.8359887", "0.8359887", "0.8359887", "0.8359887", "0.8359887", "0.8359887", "0.8359887", "...
0.8561902
0
Converts TFRecord files into a shuffled TensorFlow Dataset.
def m7q1(Ux0P, cOlQ, PSbX=''): if type(Ux0P) != str or type(PSbX) != str: raise TypeError('The name of the file and the name of the folder must be strings.') Ux0P, YBcr = Ux0P.split('.') if YBcr != 'tfrecord': raise ValueError('Only TFRecord files can be read.') RRlC = [] GcVX = 0 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oUGu(BuvW, Ep8u, Tuqy):\n\n def Gs92(lGjS):\n \"\"\"Parse serialized example and return feature_dict and label.\n\n Args:\n serialized_example: tf.example to parse.\n\n Returns:\n Parsed features dictionary and label.\n \"\"\"\n W5Xi = {'dayofweek': Z...
[ "0.70708394", "0.6984583", "0.6954118", "0.69068485", "0.68694144", "0.6803351", "0.67904186", "0.6775984", "0.67526853", "0.66990167", "0.6654804", "0.6641447", "0.6617425", "0.65913147", "0.6586793", "0.65395486", "0.6520876", "0.6498638", "0.6494804", "0.6481804", "0.64751...
0.60523534
63
Converts TFRecord files into a shuffled TensorFlow Dataset.
def UgNg(Ux0P, sN96=(), PSbX=''): if type(Ux0P) != str or type(PSbX) != str: raise TypeError('The name of the file and the name of the folder must be strings.') Ux0P, YBcr = Ux0P.split('.') if YBcr != 'tfrecord': raise ValueError('Only TFRecord files can be read.') RRlC = [] GcVX = 0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oUGu(BuvW, Ep8u, Tuqy):\n\n def Gs92(lGjS):\n \"\"\"Parse serialized example and return feature_dict and label.\n\n Args:\n serialized_example: tf.example to parse.\n\n Returns:\n Parsed features dictionary and label.\n \"\"\"\n W5Xi = {'dayofweek': Z...
[ "0.7071222", "0.6984681", "0.6954484", "0.6907981", "0.6869055", "0.68028486", "0.67925924", "0.6776728", "0.67525876", "0.67019", "0.6655968", "0.66426855", "0.6617795", "0.65901035", "0.6587326", "0.653948", "0.65190196", "0.6499118", "0.6496618", "0.6484091", "0.6474525", ...
0.6170709
42
r"""return first item from list if found otherwise none okk
def nNP9(SFIC): return next(iter(SFIC or []), None)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cntZ(DumB):\n return next(iter(DumB or []), None)", "def cntZ(DumB):\n return DumB[0]", "def cntZ(vC9B):\n return next(iter(vC9B), None)", "def aeD7(qnba, Ghgm):\n for ut_L in qnba:\n if Ghgm['pid'] == ut_L['pid']:\n return ut_L\n return None", "def cntZ(fUYa):\n if ...
[ "0.79093784", "0.7856811", "0.78539026", "0.77249295", "0.75646484", "0.75646484", "0.75035685", "0.74602383", "0.7361084", "0.7292255", "0.7148363", "0.7148363", "0.71095866", "0.7075033", "0.7048509", "0.703273", "0.7010336", "0.6988924", "0.6936167", "0.69057256", "0.68409...
0.7417115
8
conv2d returns a 2d convolution layer with full stride.
def b_zE(YKHO, WKvO, XcU5): return ZylS.nn.conv2d(WKvO, XcU5, strides=[1, 1, 1, 1], padding='SAME')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DYf_():\n VXjJ = oyIN.array([[0.3, 0.5, 0.7, 0.9], [0.1, 0.3, 0.5, 0.7], [0.9, 0.7, 0.5, 0.3]])\n rPXJ = oyIN.array([[1, 0], [1, 0]])\n rPXJ = oyIN.flipud(oyIN.fliplr(rPXJ))\n return cxpp(VXjJ, rPXJ, mode='valid')", "def gZ8A(WKvO, XcU5):\n return ZylS.nn.conv2d(input=WKvO, filter=XcU5, stride...
[ "0.7630156", "0.7626982", "0.7578824", "0.7464681", "0.7457871", "0.7457871", "0.74261373", "0.74261373", "0.74261373", "0.74261373", "0.7386211", "0.73378277", "0.7330424", "0.7329812", "0.73138624", "0.73019135", "0.7296958", "0.72700316", "0.7246276", "0.72318506", "0.7196...
0.7208653
20
weight_variable generates a weight variable of a given shape.
def E9N2(YKHO, ROpF, XuY2): RqgG = ZylS.truncated_normal(ROpF, stddev=0.1) return ZylS.get_variable(name=XuY2, initializer=RqgG)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def E9N2(ROpF):\n RqgG = ZylS.truncated_normal(ROpF, stddev=0.1)\n return ZylS.get_variable('weight', initializer=RqgG, regularizer=ZylS.nn.l2_loss)", "def E9N2(ROpF):\n RqgG = ZylS.truncated_normal(ROpF)\n return ZylS.Variable(RqgG)", "def JJi2(ROpF):\n RqgG = ZylS.truncated_normal(ROpF, stddev...
[ "0.82676965", "0.8235079", "0.8158509", "0.81565243", "0.8139453", "0.8139453", "0.8139453", "0.8137277", "0.8134324", "0.8134324", "0.8134324", "0.8134324", "0.8134324", "0.8134324", "0.8134324", "0.8134324", "0.8134324", "0.8134324", "0.8120561", "0.8064735", "0.79782254", ...
0.79819095
20
Get the lattice constants of the state. Returns
def SaIS(YKHO): return YKHO._graph_state.get_lattice_constants()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jicI(YKHO):\n return (YKHO.a, YKHO.b, YKHO.c, YKHO.alpha * Y_1E, YKHO.beta * Y_1E, YKHO.gamma * Y_1E)", "def tux7(YKHO):\n return YKHO._lattice", "def OMHJ(YKHO):\n return (YKHO.D1, YKHO.D2, YKHO.A1, YKHO.A2, YKHO.F1, YKHO.F2, YKHO.S12)", "def uwaB(YKHO):\n return YKHO._constants", "def uwa...
[ "0.6866264", "0.66561985", "0.65907115", "0.6516603", "0.64904904", "0.6471194", "0.64104176", "0.6378221", "0.61902696", "0.61383915", "0.5984384", "0.593454", "0.5927517", "0.58042145", "0.5797073", "0.5797073", "0.57853884", "0.57301885", "0.56958234", "0.568637", "0.56670...
0.85337126
0
Get the number of vertices in the topology graph. Returns
def X7h0(YKHO): return YKHO._graph_state.get_num_vertices()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nAk3(YKHO):\n return YKHO._nVertices", "def poMF(YKHO):\n return len(YKHO.__graph_dict.keys())", "def poMF(YKHO):\n return YKHO._top_exp.number_of_vertices()", "def VVUP(YKHO) -> int:\n raise NotImplementedError", "def qppV(YKHO):\n return YKHO.__size", "def GthF(YKHO) -> int:\n ret...
[ "0.8494007", "0.84706014", "0.84362966", "0.8408586", "0.8352349", "0.82162935", "0.82021534", "0.82021534", "0.81882036", "0.8073063", "0.8004586", "0.79659986", "0.7869201", "0.7819893", "0.77238595", "0.76018393", "0.7486051", "0.7473548", "0.72208834", "0.7087607", "0.708...
0.8829969
0
Get the number of edges in the topology graph. Returns
def IgjN(YKHO): return YKHO._graph_state.get_num_edges()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fOCg(YKHO) -> int:\n return YKHO.graph.number_of_edges()", "def L1_y(YKHO) -> int:\n return YKHO._n_edges", "def oklI(YKHO):\n try:\n return YKHO.edges\n except:\n print('ERROR: No graph exists')", "def epQE(YKHO):\n return sum(map(lambda WKvO: len(WKvO), YKHO.__adj))", "de...
[ "0.8686444", "0.8638674", "0.847325", "0.8345188", "0.83200467", "0.8304378", "0.829368", "0.8270642", "0.82480764", "0.8228368", "0.82062995", "0.820033", "0.8175072", "0.8133289", "0.81150794", "0.8088452", "0.8087728", "0.8086729", "0.8018403", "0.79606706", "0.787471", ...
0.85895705
2
Yield the atoms of the molecule being constructed. Yields
def wH6I(YKHO): yield from YKHO._molecule_state.get_atoms()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wH6I(YKHO):\n yield from YKHO._atoms", "def Nnxq(YKHO):\n for jKyr in YKHO.iter_fragments():\n for XUbj in jKyr.iter_atoms():\n yield XUbj", "def Nnxq(YKHO):\n for jKyr in YKHO.fragment_list:\n for XUbj in jKyr.atom_list:\n yield XUbj", "def Vs4Q(YKHO):\n f...
[ "0.8011574", "0.78660303", "0.78034097", "0.7753432", "0.7739809", "0.75989985", "0.7531456", "0.7494171", "0.74786854", "0.7377939", "0.7361573", "0.7354699", "0.7341813", "0.7309324", "0.72983533", "0.7130057", "0.7130057", "0.7050334", "0.7050334", "0.6969389", "0.6953987"...
0.81352127
0
Yield the building blocks. Building blocks are yielded in an order based on their position in the topology graph. For two equivalent topology graphs, but with different building blocks, equivalently positioned building blocks will be yielded at the same time. Yields
def Mkii(YKHO): yield from YKHO._graph_state.get_building_blocks()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rmyT(YKHO):\n if YKHO._ast:\n for XkN1 in YKHO._ast[2]:\n yield XkN1", "def Mkii(YKHO, ABDL=1, dsE5=False):\n\n def SSK5(Op6c, dJcc, kjUW):\n RNEE, wlQl = kjUW\n if Op6c[RNEE] == 0:\n return (RNEE, wlQl)\n elif Op6c[wlQl] == 0:\n return (wlQl...
[ "0.6349287", "0.62876844", "0.6051521", "0.6021396", "0.59326154", "0.5890511", "0.5828531", "0.57174164", "0.56966513", "0.56827176", "0.5629966", "0.5613233", "0.55688125", "0.55533314", "0.5526669", "0.55260444", "0.5520337", "0.5511756", "0.54762584", "0.546514", "0.54404...
0.74806494
0
Convert UTC date to milliseconds If using offset strings add "UTC" to date string e.g. "now UTC", "11 hours ago UTC"
def ACWr(mbyn): qtWj = qcWV.utcfromtimestamp(0).replace(tzinfo=FXGE.utc) Csk6 = mcOP.parse(mbyn) if Csk6.tzinfo is None or Csk6.tzinfo.utcoffset(Csk6) is None: Csk6 = Csk6.replace(tzinfo=FXGE.utc) return int((Csk6 - qtWj).total_seconds() * 1000.0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def QkJD(_c1T):\n return _c1T + (qcWV.utcnow() - qcWV.now())", "def oZmq(VwNh):\n return VwNh + UJxm", "def JyU8(UJxm):\n vgXP = abs(UJxm)\n ROt1 = str(vgXP // 3600)\n if len(ROt1) == 1:\n ROt1 = str(0) + ROt1\n yVtz = str(vgXP % 3600 // 60)\n if len(yVtz) == 1:\n yVtz = str(...
[ "0.64481956", "0.634694", "0.6254732", "0.6003736", "0.5982545", "0.59646976", "0.5949488", "0.5901419", "0.58542246", "0.58535445", "0.5822483", "0.5822483", "0.5817604", "0.5816955", "0.58017975", "0.5787012", "0.57715726", "0.5726599", "0.5696866", "0.56891525", "0.5687866...
0.6040377
3
Determines the number of excess connections and nodes between two genomes.
def IHxq(ut8I, UPFq): UHFx = 0 Yih4 = max(ut8I.nodes.keys()) VvpA = max(UPFq.nodes.keys()) for YRbF in range(max(Yih4, VvpA) + 1): MxXY = ut8I.nodes.get(YRbF, None) cWFu = UPFq.nodes.get(YRbF, None) if MxXY is None and Yih4 < YRbF and (cWFu is not None) or (cWFu is None and VvpA ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rbeR(ut8I, UPFq):\n UHFx = 0\n Yih4 = max(ut8I.nodes.keys())\n VvpA = max(UPFq.nodes.keys())\n for YRbF in range(max(Yih4, VvpA) + 1):\n MxXY = ut8I.nodes.get(YRbF, None)\n cWFu = UPFq.nodes.get(YRbF, None)\n if not (MxXY is None or cWFu is None):\n UHFx += 1\n Yi...
[ "0.7361382", "0.72803974", "0.70326364", "0.6851672", "0.6647004", "0.65134394", "0.65020245", "0.6424856", "0.6422673", "0.6420795", "0.6410791", "0.64107877", "0.6343099", "0.6336188", "0.6334963", "0.6332288", "0.6295267", "0.6267459", "0.6256581", "0.62542903", "0.6234851...
0.7764498
0
Determines the number of disjoint connections and nodes between two genomes.
def bEc3(ut8I, UPFq): UHFx = 0 Yih4 = max(ut8I.nodes.keys()) VvpA = max(UPFq.nodes.keys()) for YRbF in range(max(Yih4, VvpA) + 1): MxXY = ut8I.nodes.get(YRbF, None) cWFu = UPFq.nodes.get(YRbF, None) if MxXY is None and Yih4 > YRbF and (cWFu is not None) or (cWFu is None and VvpA ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rbeR(ut8I, UPFq):\n UHFx = 0\n Yih4 = max(ut8I.nodes.keys())\n VvpA = max(UPFq.nodes.keys())\n for YRbF in range(max(Yih4, VvpA) + 1):\n MxXY = ut8I.nodes.get(YRbF, None)\n cWFu = UPFq.nodes.get(YRbF, None)\n if not (MxXY is None or cWFu is None):\n UHFx += 1\n Yi...
[ "0.74092317", "0.7306025", "0.67916024", "0.67113155", "0.6644957", "0.6625719", "0.6597679", "0.65031475", "0.64326185", "0.6404905", "0.63642615", "0.63510627", "0.6263144", "0.61996305", "0.6192155", "0.6192069", "0.61820394", "0.617884", "0.61564946", "0.61513907", "0.611...
0.79438657
0
Parse a yaml configuration string
def FIMM(YKHO, Uh4y): zSgH = eJb6.safe_load(xDSY.StringIO(Uh4y)) if 'filters' not in zSgH: zSgH = dict(filters=[zSgH]) YKHO._configs = [] for q_DO in zSgH['filters']: GPtr = ppXd(valid_from=None, volume_follows=False, copy_last_price=False, copy_last_volume=False, qualifier_include_filte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def D_M9(Muml):\n try:\n return qQXR.loads(Muml, object_pairs_hook=U8Lr)\n except ValueError:\n DWkG = v1rv\n DWkG.add_constructor(eJb6.resolver.BaseResolver.DEFAULT_MAPPING_TAG, kVn0)\n DWkG.add_multi_constructor('!', _MzP)\n return eJb6.load(Muml, DWkG)", "def AADa(Ul2G...
[ "0.70751566", "0.6905611", "0.68781406", "0.685709", "0.6741789", "0.66602236", "0.66593003", "0.656402", "0.6539586", "0.65306675", "0.6517556", "0.65078825", "0.645184", "0.6443837", "0.6442316", "0.6359812", "0.63446283", "0.6340231", "0.63296056", "0.63150954", "0.6307937...
0.0
-1
Plot the correlation matrix for all features listed in the cols param
def W8uy(__n6: pd.DataFrame, WfCS: List[str]): LZpg = Xlvp.imshow(__n6[WfCS].corr()) LZpg.update_layout(autosize=False, width=900, height=1000) LZpg.show() return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def E_PS(jQ3Z, WfCS, pan_, Z6Cv=(6, 6), pmON=None):\n eHNT, aNZO = QrM1.subplots(1, figsize=Z6Cv)\n aNZO.set_xlabel('Feature Correlation')\n fDz8 = h60h(labels=list(WfCS))\n fDz8.fit(jQ3Z[WfCS], jQ3Z[pan_])\n eHNT.tight_layout()\n if pmON != None:\n eHNT.savefig(pmON + '/features_correlati...
[ "0.75140464", "0.74514484", "0.74052197", "0.7236237", "0.717602", "0.71594715", "0.69576234", "0.6952677", "0.6909094", "0.68331105", "0.6783362", "0.6749775", "0.67407316", "0.671042", "0.6673981", "0.6672141", "0.6605096", "0.6584971", "0.65831524", "0.6552678", "0.6522828...
0.7818899
0
String for representing the Model object.
def zAg0(YKHO): return YKHO.typeImo
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zAg0(YKHO):\n return super().__str__() + YKHO.model.__str__()", "def zAg0(YKHO):\n return 'DataModel(name={},attributes={},description={})'.format(YKHO.name, {jzdc.name: str(jzdc) for jzdc in YKHO.attributes}, YKHO.description)", "def zAg0(YKHO):\n Ylbp = ['>>> Model %(model_name)s <<<']\n Ylbp...
[ "0.82368803", "0.79901737", "0.7849152", "0.78468513", "0.77520275", "0.7625378", "0.7625378", "0.76225406", "0.76225406", "0.75483394", "0.7522958", "0.7470355", "0.7469358", "0.7447144", "0.7447144", "0.74314755", "0.7427648", "0.7389925", "0.7351721", "0.73424315", "0.7322...
0.0
-1
Plots a confusion matrix given some input
def LwSz(Bcwd, ksbg, leAC='Confusion matrix', iMGt=QrM1.cm.Blues): QrM1.imshow(Bcwd, interpolation='nearest', cmap=iMGt) QrM1.title(leAC) QrM1.colorbar() wIWT = oyIN.arange(len(ksbg)) HOVt = ksbg QrM1.xticks(wIWT, HOVt, rotation=45) QrM1.yticks(wIWT, HOVt) QrM1.tight_layout() QrM1.yl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LwSz(YKHO):\n pTn1 = beib.from_learner(YKHO.learn)\n pTn1.plot_confusion_matrix()", "def LwSz(Bcwd, tGDF):\n JI1i = QrM1.figure(figsize=(10, 10))\n QrM1.imshow(Bcwd, interpolation='nearest', cmap=QrM1.cm.Blues)\n QrM1.title('Confusion matrix')\n QrM1.colorbar()\n wIWT = oyIN.arange(len(t...
[ "0.8161471", "0.80150074", "0.79347026", "0.78729504", "0.78694254", "0.7867225", "0.7858596", "0.78459156", "0.7795161", "0.7775234", "0.77735937", "0.77645767", "0.77563524", "0.7726299", "0.7716574", "0.7710101", "0.77078474", "0.77045697", "0.7690752", "0.7680288", "0.766...
0.7593767
52
Tokenization using NLTK tokenizer
def x1CH(l5Ny): s2mk = [] for _dZy in Dhdw.sent_tokenize(l5Ny): for GIN8 in Dhdw.word_tokenize(_dZy): if len(GIN8) < 2: continue s2mk.append(GIN8.lower()) return s2mk
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def b0j5(YKHO):\n b0j5 = M9Fq('\\\\w+')\n YKHO.tweet_tokenized_train = [b0j5.tokenize(WKvO.lower()) for WKvO in YKHO.tweet_prepro_train]\n YKHO.tweet_tokenized_test = [b0j5.tokenize(WKvO.lower()) for WKvO in YKHO.tweet_prepro_test]", "def Yvzw(_dZy):\n b0j5 = H6bL()\n jWWN = b0j5.tokenize(_dZy.low...
[ "0.7267561", "0.7218116", "0.7192194", "0.7191581", "0.71773136", "0.7127248", "0.7081596", "0.7074144", "0.70685524", "0.7062013", "0.7062013", "0.6992854", "0.6986077", "0.6974034", "0.69734263", "0.694933", "0.69455796", "0.69289595", "0.6919697", "0.69157934", "0.69099385...
0.0
-1
Obtain the most important words for a class
def pZr8(C3ST, KxLt, f9pM=0, yLbG=10): bySB = KxLt.get_feature_names() Kxor = sorted(enumerate(C3ST.coef_[f9pM]), key=lambda WKvO: WKvO[1], reverse=True) return [[bySB[WKvO[0]], WKvO[1]] for WKvO in Kxor[:yLbG]]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PVsK(QL6K):\n TdDM = mBkc([zv9r.split()[-1] for zv9r in QL6K])\n print('main words:', '\\n', TdDM)\n print('top 50 main words:', '\\n', TdDM.most_common(50))\n return list(TdDM)", "def WqQ8(qIxc, _73Q, OJS7):\n t7hl = mBkc()\n for aTqo in _73Q:\n for yzQ0 in aTqo['question']:\n ...
[ "0.7045568", "0.6916421", "0.6706692", "0.6560265", "0.6364509", "0.63523245", "0.63223714", "0.6310918", "0.63019496", "0.62716067", "0.6197724", "0.6181018", "0.6135581", "0.6112092", "0.61117387", "0.6111627", "0.6109262", "0.61037457", "0.6081116", "0.6039679", "0.603842"...
0.57231677
53
Returns initializer that initializes array with the allzero array.
def TxWX(yDqo=None): return RIrr(0.0, dtype=yDqo)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JjWg(YKHO, ROpF):\n return oyIN.zeros((ROpF[0], ROpF[1]))", "def uzII(YKHO):\n return oyIN.zeros(YKHO.shape, YKHO.dtype)", "def sbx9(YKHO):\n return oyIN.zeros([YKHO.nx])", "def ICcV(ROpF, yDqo, mWFP):\n nPrm = mOsS(mWFP, True, ROpF, yDqo)\n grSj = nPrm.to_dlpack()\n ezWE = vuvg.zerocop...
[ "0.6827694", "0.6806285", "0.6550301", "0.654935", "0.65310127", "0.65004337", "0.64385927", "0.64043725", "0.6366739", "0.63465846", "0.63086647", "0.6273209", "0.6272587", "0.6268909", "0.62589014", "0.62511927", "0.62347555", "0.62199867", "0.62038255", "0.61950916", "0.61...
0.0
-1
An instance of BankAccount object.
def UCcY(): return fExc('Test User', 1000.0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def myGV():\n return fExc()", "def ZrNc(YKHO):\n return tHSi(YKHO)", "def ZrNc(YKHO):\n return tHSi(YKHO)", "def zxAQ(gFsc: dict) -> fExc:\n myGV = fExc(gFsc['bank_account_number'], gFsc['bank_name'], gFsc['bank_balance'])\n return myGV", "def ZrNc(YKHO, Z31E):\n return tHSi(YKHO, Z31E)",...
[ "0.83124053", "0.75329465", "0.75081885", "0.73725003", "0.7358681", "0.7349119", "0.70814943", "0.68626934", "0.6776419", "0.6775096", "0.6754097", "0.6712957", "0.6706183", "0.66772014", "0.65859956", "0.64276075", "0.6424409", "0.6419647", "0.6418199", "0.64170915", "0.627...
0.8185616
1
separates a dict into haskeys and nothaskeys pairs, using either a list of keys or a filtering function.
def UZkn(fK8P, sjXb=None, LHet=None): xc3U = {} WIcL = {} for H5ew in fK8P: fJ5H = False if sjXb is not None: fJ5H = H5ew in sjXb elif LHet is not None: fJ5H = LHet(H5ew) if fJ5H: xc3U[H5ew] = fK8P[H5ew] else: WIcL[H5ew]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def QZEs(Csk6, sjXb, pA98=dict):\n if hasattr(sjXb, '__call__'):\n eHNT = sjXb\n sjXb = filter(eHNT, Csk6.keys())\n return pA98(map(lambda G1Hx: (G1Hx, Csk6[G1Hx]), sjXb))", "def QZEs(nITe, ZVgY):\n return dict(((H5ew, BWXx) for H5ew, BWXx in list(nITe.items()) if H5ew in ZVgY))", "def Z...
[ "0.7068494", "0.6861831", "0.6750113", "0.6734329", "0.6704897", "0.66897655", "0.65348476", "0.6449124", "0.64393973", "0.6366392", "0.62941235", "0.61988235", "0.6183261", "0.61704093", "0.61321944", "0.61171293", "0.61014825", "0.60677016", "0.60602033", "0.6035641", "0.59...
0.6361867
10
The computer entity that is programmed for zero mercy
def zkCF(YKHO, yTr1): for mLGw in range(0, 8): Ztcf = YKHO.copy_board(yTr1) if YKHO.check_if_empty(Ztcf, mLGw): Ztcf[mLGw] = 'O' if YKHO.check_for_win(Ztcf, 'O'): return mLGw for mLGw in range(0, 8): Ztcf = YKHO.copy_board(yTr1) if YKHO.che...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Gyd5(YKHO):\n return YKHO.entities[len(YKHO.device_data[AmwT])]", "def JBZA(YKHO):\n return 'computer'", "def LEXu(YKHO):\n return YKHO._entity", "def LEXu(YKHO):\n return YKHO._entity", "def HYlv():\n return ahCL(u'', oJmW, 'icemac.addressbook.entities.Entities')", "def _blA():\n r...
[ "0.62016016", "0.5856308", "0.55960715", "0.55960715", "0.5583072", "0.5511388", "0.5485846", "0.5480992", "0.5473292", "0.5466145", "0.54443574", "0.5413429", "0.53965366", "0.53919804", "0.53836054", "0.53487015", "0.5334898", "0.53327817", "0.53262186", "0.5254537", "0.524...
0.0
-1
Return the vector of partial derivatives \partial C_x / \partial a for the output activations.
def KX7l(YKHO, XH02, LVAh): return 2 * (XH02 - LVAh)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tNbl(YKHO, g4y1, WlSc):\n vnM8 = g4y1['SOC']\n ovGo = g4y1['temperature']\n Jxbn = g4y1['P_bat']\n o5UJ = uBEc * YKHO.exponential\n _fy8 = -uBEc * YKHO.voc * oyIN.exp(Cwt5 * (ovGo[4, :] - wGZt) / wGZt) * Cwt5 / wGZt\n fw4i = oyIN.exp(vnM8[0, :]) / (oyIN.e - 1)\n YKHO.dI_dP = 1.0 / YKHO.V\n...
[ "0.6179747", "0.6113179", "0.6110102", "0.6063869", "0.6060675", "0.5840477", "0.58356196", "0.57909757", "0.5785478", "0.576321", "0.56648666", "0.56212157", "0.5613195", "0.56029624", "0.56029624", "0.56029624", "0.56029624", "0.5575484", "0.5562849", "0.5559713", "0.554512...
0.5345927
43
Derivative of the sigmoid function.
def hj5n(epBp): return U7YL.exp(-epBp) / (1 + U7YL.exp(-epBp)) ** 2
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NZml(WKvO):\n return WKvO * (1 - WKvO)", "def NZml(WKvO):\n return WKvO * (1.0 - WKvO)", "def NZml(WKvO):\n return m1Hg(WKvO) * (1 - m1Hg(WKvO))", "def BV7B(WKvO):\n return WKvO * (1 - WKvO)", "def BV7B(WKvO):\n return WKvO * (1 - WKvO)", "def NZml(WKvO):\n KCHu = m1Hg(WKvO)\n ox...
[ "0.8472813", "0.84482265", "0.839465", "0.8346568", "0.8346568", "0.8297082", "0.80527747", "0.77512693", "0.77058387", "0.74962187", "0.7465983", "0.74511427", "0.73991024", "0.73818743", "0.73804784", "0.7347313", "0.73190165", "0.73073244", "0.7189697", "0.71123916", "0.70...
0.0
-1
Builds and returns Dataloader.
def x1cL(i0XC, Ep8u, pU_9, hXNa=True, I7Gy=0): __n6 = KnzV(i0XC, pU_9) if i0XC.endswith('trn') == True: X8fE = __n6.train_collate else: X8fE = Xr5g zQKy = nPrm.DataLoader(dataset=__n6, batch_size=Ep8u, shuffle=hXNa, num_workers=I7Gy, collate_fn=X8fE) return zQKy
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JyoU(YKHO):\n ppBc = YKHO.data.get_train_data()\n if YKHO.args.use_dev:\n ppBc, sujI = YKHO.data.split_data(ppBc)\n Zwka = YKHO.data.get_test_data()\n EPL3 = YKHO.loader.build_dataset(ppBc, YKHO.args.train_max_seq_len)\n Pa1c = YKHO.loader.build_dataloader(EPL3, 'train')\n qby3 = YKHO....
[ "0.6889868", "0.688255", "0.6745007", "0.67274445", "0.67172325", "0.649437", "0.6482951", "0.6473919", "0.6442454", "0.6431744", "0.6392834", "0.6386863", "0.63354766", "0.62538815", "0.6204135", "0.61978376", "0.6108685", "0.61018723", "0.60760283", "0.60642105", "0.6062031...
0.0
-1
r""" Optionally Saves, updates and then reloads the miner training state.
def vauY(YKHO): scqr = YKHO.get_saved_state() if scqr == None or scqr['epoch_loss'] >= YKHO.epoch_loss: YKHO.save() YKHO.metagraph.load() YKHO.metagraph.sync() YKHO.metagraph.save() YKHO.reload()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cYbW(YKHO):\n if YKHO.train_state['epoch_index'] == 0:\n YKHO.save_model()\n YKHO.train_state['stop_early'] = False\n elif YKHO.train_state['epoch_index'] >= 1:\n tkpC, rMvA = YKHO.train_state['val_loss'][-2:]\n if rMvA >= YKHO.train_state['early_stopping_best_val']:\n ...
[ "0.6849049", "0.6589345", "0.6516164", "0.6449981", "0.63682586", "0.6184475", "0.61263484", "0.60954535", "0.6081368", "0.60764295", "0.60736096", "0.6058315", "0.6058315", "0.60204685", "0.5982164", "0.5971745", "0.5971745", "0.596791", "0.5949599", "0.59413695", "0.5936962...
0.5513232
69
r""" Returns a saved state dict or none.
def pKaX(YKHO): try: return ht2j.load('{}/model.torch'.format(YKHO.config.neuron.full_path)) except Exception as e: bo34.exception('Failed to reload model with error: {}', tTpl) return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TEc0(YKHO):\n return YKHO.__dict__.copy()", "def k8jS(YKHO):\n QTBn: cuzp[str, ImMB] = _qLf(YKHO.__dict__)\n del QTBn['__db']\n return QTBn", "def k8jS(YKHO):\n with YKHO.override_evaluator(None):\n VqA1 = YKHO.__loaded_from\n try:\n YKHO.__loaded_from = None\n ...
[ "0.7658194", "0.74543995", "0.73400223", "0.73151165", "0.7293509", "0.7267155", "0.7230697", "0.7130385", "0.71279794", "0.7095217", "0.707815", "0.70776665", "0.70526725", "0.70258474", "0.6978084", "0.69323516", "0.6908197", "0.690799", "0.6882391", "0.6842115", "0.6842115...
0.7108806
9