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
The timestamp as a string in its canonical format.
def cTyu(YKHO): return YKHO.video.timestring(YKHO.index)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kiHC(Emd4, E3oo):\n if not isinstance(E3oo, qcWV):\n raise TypeError('Expected datetime instance for timestamp')\n return E3oo.strftime('%m/%d/%Y - %H:%M:%S')", "def X2x9(YKHO):\n return str(F803('%Y-%m-%d %H:%M:%S'))", "def o5bA(YKHO, E3oo: float) -> str:\n return qcWV.datetime.fromtime...
[ "0.8037888", "0.7871392", "0.77909726", "0.7786979", "0.77340966", "0.7669428", "0.7597425", "0.7544887", "0.7535224", "0.7420791", "0.73605007", "0.73302996", "0.73162377", "0.73137367", "0.73027575", "0.72762984", "0.72605604", "0.7256883", "0.7255611", "0.72467417", "0.721...
0.0
-1
Loads and returns the frame as a NumPy ndarray.
def xUK7(YKHO): import numpy VXjJ = YKHO.load_pil() return numpy.ndarray((VXjJ.size[1], VXjJ.size[0], 3), 'B', VXjJ.tostring())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def v8Gf(pmON: str):\n GHNN = hnIv.open(pmON)\n return oyIN.array(GHNN)", "def Ueki(YKHO) -> oyIN.array:\n return YKHO.frame", "def v8Gf(pmON: str, IznC: str) -> oyIN.ndarray:\n Dl3U = IQkQ(pmON, IznC)\n swaY: oyIN.array = oyIN.zeros_like(Dl3U, dtype=oyIN.float32)\n swaY[:, :, :] = Dl3U / 255...
[ "0.74188703", "0.72996193", "0.70125943", "0.68904775", "0.67727566", "0.676004", "0.6747318", "0.6684308", "0.664113", "0.6610394", "0.65469015", "0.65382516", "0.65141726", "0.6479792", "0.64084464", "0.63634145", "0.62414265", "0.6231357", "0.6194586", "0.61944014", "0.619...
0.6840974
4
Returns the frame index of the frame with the exact timestamp ts, which is a float timestamp.
def o9HC(YKHO, i8WE): if YKHO._frame_times is None: YKHO._frame_times = {i8WE: YRbF for YRbF, i8WE in enumerate(YKHO.master_timestamps)} return YKHO._frame_times[i8WE]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pXN1(YKHO, i8WE):\n return YKHO[YKHO.timestamp_index(i8WE)]", "def pXN1(YKHO, i8WE):\n if YKHO._frame_times is None:\n YKHO._frame_times = [eHNT.timestamp for eHNT in YKHO]\n YRbF, Csk6 = (0, float('Inf'))\n while True:\n Ik_G = Csk6\n Csk6 = (i8WE - YKHO._frame_times[YRbF]) ...
[ "0.7441361", "0.7294697", "0.71891254", "0.68007076", "0.6686425", "0.6497623", "0.62341046", "0.61569715", "0.6074554", "0.6033406", "0.5910488", "0.58772033", "0.5776711", "0.57717335", "0.5763914", "0.56510645", "0.5627966", "0.5593814", "0.5578435", "0.5556818", "0.554869...
0.7778689
0
A string representing the result suitable for printing.
def wHJl(YKHO): KCHu = '' g2zq = YKHO.matched_tracks * 100.0 / YKHO.true_tracks KCHu += 'Found %d (%.1f %%) of %d tracks.\n' % (YKHO.matched_tracks, g2zq, YKHO.true_tracks) g2zq = YKHO.missed_tracks * 100.0 / YKHO.true_tracks KCHu += 'Missed %d (%.1f %%) of %d tracks.\n' % (YKHO.missed_tracks, g2zq,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def a8ab(YKHO):\n return '\\\\mc{%d}{%s}' % (YKHO.span, YKHO.result)", "def zAg0(YKHO):\n return '\\n'.join(YKHO.pprint())", "def ZtuL(YKHO):\n vIwR = 'Num. of nodes: %s, Num. of conns: %s, Fitness: %s\\n' % (len(YKHO.node_genes), len(YKHO.conn_genes), YKHO.fitness)\n for Q6kx in YKHO.node_genes:\n...
[ "0.7671536", "0.7565682", "0.7540471", "0.7408997", "0.7406153", "0.73816216", "0.73542833", "0.7312486", "0.72874403", "0.72814125", "0.72716486", "0.7262595", "0.72591", "0.72570974", "0.72334003", "0.7233366", "0.7208997", "0.71770877", "0.7173453", "0.71668607", "0.716580...
0.702182
38
The area of the rectangle.
def f0tD(YKHO): Jw7X = YKHO.width eUWA = YKHO.height if Jw7X <= 0 or eUWA <= 0: return 0 else: return Jw7X * eUWA
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def f0tD(YKHO):\n f0tD = YKHO.__width * YKHO.__height\n return f0tD", "def f0tD(YKHO):\n return YKHO.__height * YKHO.__width", "def f0tD(YKHO):\n return YKHO.__height * YKHO.__width", "def f0tD(YKHO):\n return YKHO.__width * YKHO.__height", "def f0tD(YKHO):\n return YKHO.__height * YKHO._...
[ "0.876052", "0.861025", "0.861025", "0.85722417", "0.85621965", "0.8555238", "0.8555238", "0.8555238", "0.8555238", "0.85334295", "0.85314065", "0.85314065", "0.8522748", "0.8522748", "0.8522748", "0.8516252", "0.8516252", "0.8516252", "0.8516252", "0.8516252", "0.8516252", ...
0.8318375
51
Return a list of commandline arguments reproducing the current optimization settings in sys.flags.
def lhzf(): qIxc = [] BWXx = HwRy.flags.optimize if BWXx > 0: qIxc.append('-' + 'O' * BWXx) return qIxc
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def H5P4():\n zqTz = {'debug': 'd', 'optimize': 'O', 'dont_write_bytecode': 'B', 'no_user_site': 's', 'no_site': 'S', 'ignore_environment': 'E', 'verbose': 'v', 'bytes_warning': 'b', 'py3k_warning': '3'}\n qIxc = []\n for I1mm, y7GR in zqTz.items():\n Ty9i = getattr(HwRy.flags, I1mm)\n if Ty...
[ "0.8050561", "0.7977209", "0.7081428", "0.7070639", "0.688395", "0.6873355", "0.6789332", "0.6698154", "0.6645089", "0.6480827", "0.6468976", "0.64314395", "0.64169854", "0.6401139", "0.6396453", "0.6385146", "0.6359642", "0.6321682", "0.63182735", "0.6317856", "0.6316485", ...
0.87065536
0
Return a list of commandline arguments reproducing the current settings in sys.flags, sys.warnoptions and sys._xoptions.
def H5P4(): zqTz = {'debug': 'd', 'dont_write_bytecode': 'B', 'no_user_site': 's', 'no_site': 'S', 'ignore_environment': 'E', 'verbose': 'v', 'bytes_warning': 'b', 'quiet': 'q'} qIxc = lhzf() for I1mm, y7GR in zqTz.items(): Ty9i = getattr(HwRy.flags, I1mm) if Ty9i > 0: qIxc.appen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qIxc(YKHO):\n VKhi = [(f'--{G1Hx}', Ty9i) for G1Hx, Ty9i in YKHO.options.items()]\n return list(PWgb(VKhi))", "def H5P4():\n zqTz = {'debug': 'd', 'optimize': 'O', 'dont_write_bytecode': 'B', 'no_user_site': 's', 'no_site': 'S', 'ignore_environment': 'E', 'verbose': 'v', 'bytes_warning': 'b', 'py3k_...
[ "0.78303254", "0.77380925", "0.74606013", "0.73159504", "0.7292191", "0.72709495", "0.71949804", "0.7182151", "0.71241057", "0.7099774", "0.70790446", "0.70489824", "0.704596", "0.7021515", "0.6989828", "0.6953653", "0.6934846", "0.6926262", "0.69121397", "0.6869985", "0.6828...
0.7355932
3
Creates a ipycytoscapewidget from a given graph. The returned widget already contains all nodes and edges from the graph. The graph is colored using an array of norm. rgbvalues based on seaborn perceptually uniform color map (rocket) or a user given custom color array.
def OrQV(yvY1, Yfjz=None, Xuoo=None, Nhq3=None, pP96=True): if not EoN0: raise HKdl('ipycytoscape') if Yfjz is not None: if Xuoo is not None: raise Exception('Provide either node_scores or node_partition - not both.') if len(Yfjz) != yvY1.upperNodeIdBound(): raise...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BgIW(yvY1, e_2d=eOte.Two, MdJM=None, rEXb=None, dmpE=None, ogdR=True, MiZ6=None):\n if e_2d == eOte.Two and (not Myqn):\n raise HKdl('ipycytoscape')\n if (e_2d == eOte.Three or e_2d == eOte.TwoForcePlotly) and (not cIG7):\n raise HKdl('Plotly')\n if MdJM is not None:\n if rEXb is ...
[ "0.69161403", "0.56204873", "0.5539969", "0.5487684", "0.5443157", "0.5370156", "0.5368894", "0.53537613", "0.52743196", "0.52307045", "0.5179103", "0.51408887", "0.5109825", "0.5037882", "0.50368196", "0.5009261", "0.49738505", "0.49669445", "0.49599755", "0.48955357", "0.48...
0.6257629
1
Setup unit test and load mock.
def FCbF(YKHO): with sisH.Mocker() as TMAJ: YKHO.token, bGrB = c386() YKHO._init_default_mocks(TMAJ, 'carson_me.json') YKHO.carson = J3V9(KE0A, bky0, YKHO.token) YKHO.first_building = YKHO.carson.first_building YKHO.user = YKHO.carson.first_building YKHO.first_camera ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FCbF(YKHO):\n YKHO.mock = TMAJ.Mock()\n YKHO.test = rq7v.Config()", "def FCbF(YKHO):\n global _MOCK\n assert HPHr is None\n HPHr = FqDj()", "def Zivn():\n xftX(True)\n wOoZ()\n Tpns.mock()", "def FCbF(YKHO):\n super(_znt, YKHO).setUp()\n YKHO.__mocks = cGGv()", "def FCbF(Y...
[ "0.79137737", "0.76820624", "0.76637983", "0.71488214", "0.70504856", "0.70174026", "0.7008609", "0.69656354", "0.69653845", "0.6961685", "0.68776894", "0.6876389", "0.6868718", "0.68681085", "0.6844897", "0.6834981", "0.679275", "0.67920184", "0.6759382", "0.6757909", "0.674...
0.0
-1
returns the centroid of give data points
def HGNZ(EcVT, pdhd): Gzv5 = len(nIKw(EcVT, 0)) r8hN = [0] * Gzv5 for d6pt in pdhd: WKvO = nIKw(EcVT, d6pt) for YRbF in range(Gzv5): r8hN[YRbF] += WKvO[YRbF] for YRbF in range(Gzv5): r8hN[YRbF] = r8hN[YRbF] / len(pdhd) return r8hN
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def e6ux(LTIa):\n zJeG = oyIN.mean(LTIa, 0)\n return zJeG", "def e6ux(nPrm, WKvO, LVAh):\n g0Hx = oyIN.dot(WKvO, oyIN.sum(nPrm, axis=1))\n dlau = oyIN.dot(LVAh, oyIN.sum(nPrm, axis=0))\n wjRY = oyIN.sum(oyIN.sum(nPrm))\n return (g0Hx / wjRY, dlau / wjRY)", "def __fe(YKHO):\n return oyIN.di...
[ "0.8614408", "0.84907883", "0.8334316", "0.8266804", "0.8200229", "0.81845814", "0.8183895", "0.8156957", "0.81341046", "0.8110704", "0.8092139", "0.8076359", "0.8032994", "0.7999473", "0.799175", "0.7970005", "0.7947844", "0.7913274", "0.7861472", "0.78486073", "0.7848401", ...
0.0
-1
This test checks for post proper (it means when an user passed the precise token) behavior.
async def test_post_token_ordinary_behavior(YKHO): _hkX = await YKHO.client.get('/get-token') if _hkX.status == 200: _hkX = await YKHO.client.post('/post-token', data={'token-field': 'A00'}) Aofo = await _hkX.json() YKHO.assertEqual('success', Aofo['status']) _hkX = await YKHO.client...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gwJu(YKHO):\n pass", "def vJby(YKHO):\n pass", "def AWhd(YKHO):\n nPrm = {'username': 'user', 'password': 'adminadmin'}\n geh0 = YKHO.client.post(gxEw('api_token_auth'), data=nPrm)\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_200_OK)\n YKHO.assertTrue('token' in geh0.data)", "def Uidu...
[ "0.8867968", "0.8705047", "0.7741912", "0.7668474", "0.76311827", "0.7521182", "0.7467128", "0.7431027", "0.73977345", "0.7390134", "0.7386568", "0.73271906", "0.73050326", "0.7291515", "0.7278412", "0.7278412", "0.7278412", "0.72415", "0.72300655", "0.7220698", "0.72174597",...
0.72088057
22
This test the response if an user banned.
async def test_banned_get_token(YKHO): YKHO.app['ban_list'][1].update({'127.0.0.1': 'banned'}) _hkX = await YKHO.client.get('/get-token') if _hkX.status == 200: _hkX = await _hkX.json() YKHO.assertEqual('banned', _hkX['status'])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def test_post_token_user_get_banned(YKHO):\n YKHO.app['ban_list'][1].update({'127.0.0.1': 'banned'})\n _hkX = await YKHO.client.post('/post-token', data={'token-field': 'A01'})\n _hkX = await _hkX.json()\n YKHO.assertEqual('banned', _hkX['status'])", "def HDeR(YKHO, Ol8d):\n YKHO.deactivate_...
[ "0.76195157", "0.68196034", "0.6798565", "0.67544", "0.6751184", "0.6747627", "0.6729254", "0.6706446", "0.6692497", "0.6630067", "0.65506864", "0.6538087", "0.65270877", "0.6526793", "0.6519945", "0.64788884", "0.6478757", "0.6456385", "0.6415904", "0.6414347", "0.64067405",...
0.718619
1
The test in case when an user tries to get image whilst being banned.
async def test_post_token_user_get_banned(YKHO): YKHO.app['ban_list'][1].update({'127.0.0.1': 'banned'}) _hkX = await YKHO.client.post('/post-token', data={'token-field': 'A01'}) _hkX = await _hkX.json() YKHO.assertEqual('banned', _hkX['status'])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KpWx(Odxl, pgUY, lPZB):\n qwnb = wwZl(uuid=lPZB, size='200,200')\n assert Odxl.get(qwnb, headers={'Authorization': 'deny'}).status_code == 404\n assert Odxl.get(qwnb).status_code == 200\n assert Odxl.get(qwnb, headers={'Authorization': 'deny'}).status_code == 404", "def qKpK(Odxl, pgUY, lPZB):\n ...
[ "0.70026296", "0.6849115", "0.6811089", "0.6622555", "0.660933", "0.65533787", "0.6545558", "0.6544748", "0.6355191", "0.6352631", "0.6329929", "0.62697285", "0.6191701", "0.6190536", "0.61865115", "0.6150111", "0.6143613", "0.6117064", "0.6112082", "0.6098513", "0.6093964", ...
0.0
-1
Returns the nearest vector in the sense of L2 distance whose values are in [0, 1] and whose sum is 1
def HK4f(pan_): assert False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jTUi(BZrQ, OhjO):\n return XTiz.linalg.norm(BZrQ - OhjO)", "def iLmR(BZrQ, OhjO):\n return XTiz.linalg.norm(BZrQ - OhjO, ord=1)", "def htgw(YKHO, hQHm, jlSq):\n return oyIN.linalg.norm(oyIN.array(hQHm) - oyIN.array(jlSq))", "def z9sV(o4D3, ajwV, si3g, skBL):\n return ((o4D3 - ajwV) ** 2 + (si...
[ "0.70623875", "0.70478404", "0.6809674", "0.6804146", "0.6784469", "0.676044", "0.66272897", "0.6618464", "0.6610855", "0.6548153", "0.6516045", "0.6505121", "0.6431874", "0.6428665", "0.64230865", "0.64080465", "0.6387366", "0.63386416", "0.6311687", "0.6306894", "0.6285623"...
0.6600831
9
Returns the nearest vector in the sense of L2 distance whose values are in [0, 1]
def nwp1(pan_): assert False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jTUi(BZrQ, OhjO):\n return XTiz.linalg.norm(BZrQ - OhjO)", "def iLmR(BZrQ, OhjO):\n return XTiz.linalg.norm(BZrQ - OhjO, ord=1)", "def mp07(jzdc, G1fF):\n assert type(jzdc) is nQNQ, 'arg `a` MUST be a Vector2d.'\n assert hasattr(G1fF, '__contains__'), 'arg2 MUST be an iterable of Vector2d objec...
[ "0.71231735", "0.70563006", "0.6996701", "0.6934538", "0.68661785", "0.68461657", "0.6737561", "0.6680757", "0.6638756", "0.662094", "0.66124374", "0.66042435", "0.66003263", "0.6577346", "0.6565003", "0.6542898", "0.64798003", "0.64518696", "0.64505786", "0.6348542", "0.6335...
0.67171574
7
create logger based on class_name
def lmAE(_2sc): bo34 = G9jH.getLogger('{0}'.format(_2sc)) JntZ = False VnlT = False oTZi = [] oTZi.append(aYqa()) Rci7 = m6FV + B_92 oTZi.append(irvb(Rci7, maxBytes=10000000, backupCount=10)) for DCgT in oTZi: DCgT.setLevel(G9jH.INFO) DCgT.setFormatter(uaPq) bo34....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ydYj(mWFP: str, _2sc: str) -> uOwU:\n return uOwU(_2sc, YT1Q.getChild(mWFP))", "def S6eR(Emd4=None, mWFP=None, pmON=None):\n iWxZ = iNRS({zTi3.BaseCommand: 'Command', zTi3.BaseVariable: 'Variable', zTi3.Root: 'Root', zTi3.Device: 'Device'})\n 'Init a logging object. Set global options.'\n G9jH.ba...
[ "0.74194676", "0.7357324", "0.73509157", "0.722061", "0.7179628", "0.71499765", "0.7117752", "0.7040383", "0.696165", "0.6953147", "0.6924327", "0.6920627", "0.6912554", "0.6912554", "0.69002146", "0.68928045", "0.6878239", "0.6870917", "0.68677443", "0.6851437", "0.6821714",...
0.76440465
0
Either makes a new key into bp_port_dict dictionary or return an existing key where stats and other values for that port are stored
def Ge4J(uWx8, CCrh): zl75 = None Wc6I = CCrh.split('/') AZN4 = Wc6I[1] rqe0 = Wc6I[2].replace('slot-', '') if 'pc-' in CCrh: '\n Handle class EtherServerIntFIoPc for PC between IOM and blade\n dn in EtherServerIntFIoPc sys/chassis-1/blade-7/fabric-A/pc-1290\n ' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def EqCb(YKHO):\n if not YKHO._conn:\n return\n Fb8A = {}\n YKHO._ports = Fb8A\n for mWFP, o3Vu in YKHO._port_cache.items():\n if mWFP not in YKHO._conn.ports:\n continue\n PJGE = YKHO._conn.ports[mWFP]\n if PJGE.port_no not in Fb8A:\n Fb8A[PJGE.port_no...
[ "0.60724664", "0.5972901", "0.5828743", "0.5828743", "0.57630235", "0.5743994", "0.56149423", "0.55567265", "0.5548561", "0.5511034", "0.54869944", "0.5482535", "0.5481328", "0.546911", "0.54378694", "0.5432333", "0.5428337", "0.5420848", "0.53887326", "0.538032", "0.5379409"...
0.66952413
0
Factorize n into exactly num_factors factors. Yield each factorization as a sorted tuple of factors.
def T2s4(exwG, ZBvT, UxKh=1): if ZBvT == 0: if exwG == 1: yield () else: for YRbF in range(UxKh, exwG + 1): if not exwG % YRbF: for eHNT in T2s4(exwG // YRbF, ZBvT - 1, YRbF): yield (YRbF, *eHNT)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Llmz(exwG):\n return sorted((WKvO for SjLr in ([YRbF, exwG // YRbF] for YRbF in range(1, int(exwG ** 0.5) + 1) if exwG % YRbF == 0) for WKvO in SjLr))", "def Llmz(exwG):\n for XP5J in I71t(int(exwG ** 0.5) + 1):\n if XP5J * XP5J > exwG:\n break\n while not exwG % XP5J:\n ...
[ "0.8235062", "0.8110889", "0.7802444", "0.7790663", "0.775742", "0.77338105", "0.77199", "0.7699483", "0.76783824", "0.76685876", "0.7644974", "0.7644851", "0.7602307", "0.7572537", "0.755629", "0.7525334", "0.7525334", "0.7515153", "0.7498722", "0.7484032", "0.7471763", "0...
0.822555
1
Give general solution to linear congruence ax=b (mod n)
def z8o0(exwG, jzdc, Fg_i): if jzdc == 0: raise Exception('Not a linear congruence.') Oa1e = ML2l(jzdc, exwG) if Fg_i % Oa1e: return [] jzdc, Fg_i, KCHu = (jzdc // Oa1e, Fg_i // Oa1e, exwG // Oa1e) WKvO = AWG7(KCHu, jzdc) * Fg_i % exwG rJDt = [] for YRbF in range(Oa1e): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reWy(jzdc, Fg_i, Z9rn, exwG):\n jzdc = zllO(jzdc)\n Fg_i = zllO(Fg_i)\n WKvO = zllO(Z9rn)\n exwG = zllO(exwG)\n WKvO = rIJu.random_element(0, exwG)\n LVAh = (Z9rn - jzdc * WKvO) * ~VlDb(Fg_i, exwG)\n LVAh = zllO(VlDb(LVAh, exwG))\n assert VlDb(jzdc * WKvO + Fg_i * LVAh, exwG) == VlDb(Z9...
[ "0.74682206", "0.7188956", "0.7008978", "0.6839559", "0.6771464", "0.6708091", "0.6623576", "0.66002834", "0.6595448", "0.6511357", "0.6505487", "0.648288", "0.64253443", "0.6405326", "0.63823396", "0.63550645", "0.63550645", "0.62750214", "0.6274273", "0.62525964", "0.625009...
0.7832874
0
Sets FMNIST in validation mode.
def wEf2(YKHO, lmrl): YKHO.normal_class = int(lmrl) YKHO.mode = 'val' YKHO.transform = YKHO.val_transform YKHO.val_idxs = [or8S for or8S in YKHO.shuffled_train_idx if YKHO.train_split[or8S][1] == YKHO.normal_class] YKHO.val_idxs = YKHO.val_idxs[int(0.9 * len(YKHO.val_idxs)):] YKHO.length = len(Y...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jO9f(YKHO):\n YKHO.testing = False", "def q4vz(YKHO, LT6S):\n pass", "def gH1O(YKHO):\n YKHO._train_flag = False", "def qYbd(YKHO):\n if YKHO._is_train:\n for r8hN in YKHO._models:\n r8hN.set_eval_mode()\n YKHO._is_train = False", "def IyYU(YKHO, Tuqy: bool):\n YKHO....
[ "0.66622317", "0.6576815", "0.64925027", "0.63772607", "0.6313568", "0.6248847", "0.62137854", "0.62137854", "0.6158411", "0.6027438", "0.5956194", "0.5956194", "0.5825743", "0.58114636", "0.58058846", "0.5791494", "0.57667625", "0.5759181", "0.574036", "0.5701367", "0.566112...
0.0
-1
Sets FMNIST in training mode.
def EvQg(YKHO, lmrl): YKHO.normal_class = int(lmrl) YKHO.mode = 'train' YKHO.transform = YKHO.train_transform YKHO.train_idxs = [or8S for or8S in YKHO.shuffled_train_idx if YKHO.train_split[or8S][1] == YKHO.normal_class] YKHO.train_idxs = YKHO.train_idxs[0:int(0.9 * len(YKHO.train_idxs))] YKHO.l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IyYU(YKHO, Tuqy: bool):\n YKHO.train(Tuqy)", "def lpIk(YKHO):\n if not YKHO._is_train:\n for r8hN in YKHO._models:\n r8hN.set_train_mode()\n YKHO._is_train = True", "def Lq2W(YKHO, Tuqy):\n pass", "def Lq2W(YKHO, Tuqy):\n pass", "def rtlt(YKHO):\n YKHO._mode = 'train...
[ "0.7659925", "0.754381", "0.7308888", "0.7308888", "0.7280051", "0.7160912", "0.70723313", "0.70356107", "0.68977153", "0.6841386", "0.6803046", "0.6768052", "0.6768052", "0.6701644", "0.6685779", "0.66437566", "0.6614325", "0.65846664", "0.6476841", "0.6471803", "0.64460105"...
0.0
-1
Finds the frame_id that has closest time to the query time.
def aw0L(YKHO, ITS7): assert not isinstance(ITS7, int), 'Expected float, %s' % type(ITS7) Pb5J = min(((Pb5J, a1PO) for Pb5J, a1PO in YKHO._times.items()), key=lambda tTpl: abs(ITS7 - tTpl[1]))[0] ESjr.debug('frame_id: %d, time: %g, query time: %g' % (Pb5J, YKHO.get_time(Pb5J), ITS7)) assert abs(ITS7 - Y...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oKTG(M5bm, t1MS):\n oQ6S = -1\n yk4i = HwRy.maxsize\n for d6pt in t1MS:\n if abs(t1MS[d6pt] - M5bm) < yk4i:\n yk4i = abs(t1MS[d6pt] - M5bm)\n oQ6S = d6pt\n return oQ6S", "def p8rr(YKHO, Pb5J):\n if YKHO.has_time(Pb5J):\n return YKHO.get_time(Pb5J)\n else:...
[ "0.66865015", "0.61678684", "0.6071872", "0.60041475", "0.57207185", "0.5664609", "0.5596583", "0.55638", "0.5551633", "0.5533751", "0.5463514", "0.5446021", "0.5419971", "0.5396419", "0.5389899", "0.53861517", "0.5365281", "0.5342262", "0.53385776", "0.5326512", "0.53243005"...
0.7976579
0
Finds the smallest frame_id of actor.
def M1g7(YKHO, QiwA): if QiwA >= YKHO.n_actors: raise RuntimeError('Actor id out of bounds: %d >= %d' % (QiwA, YKHO.n_actors)) VIPT = YKHO.get_frames() if QiwA == 0: return VIPT[0] cntZ = YKHO.unmod_frame_id(frame_id=YKHO._min_frame_id, actor_id=QiwA, frames_mod=YKHO._frames_mod) whi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xcq_(YKHO):\n return YKHO._min_frame_id", "def t36y(YKHO, QiwA):\n if QiwA >= YKHO.n_actors:\n raise RuntimeError('Actor id out of bounds: %d >= %d' % (QiwA, YKHO.n_actors))\n VIPT = YKHO.get_frames()\n if QiwA == YKHO.n_actors - 1:\n return VIPT[-1]\n cntZ = YKHO.unmod_frame_id(...
[ "0.71321505", "0.661267", "0.65510446", "0.6333372", "0.62391615", "0.62134117", "0.60758", "0.59497845", "0.59085596", "0.57341117", "0.5673253", "0.56662524", "0.56553805", "0.5604582", "0.55800235", "0.557843", "0.55757433", "0.5575491", "0.55650586", "0.5559672", "0.55465...
0.7596195
0
Calculates angles between joints and their parents
def Mpxx(YKHO, Pb5J=None, h25Q=True): DMwa = YKHO.get_frames() if Pb5J is None else [Pb5J] if YKHO._angles is not None and len(YKHO._angles): bLm4 = [] for jKpy, Pb5J in enumerate(DMwa): bLm4.append(YKHO._angles[Pb5J]) bLm4 = oyIN.array(bLm4, dtype=oyIN.float32) asser...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GJtA(YKHO):\n return YKHO.arm.joint_angles()", "def JTgP(Ojw_: Joint2D, BPqA: Joint2D) -> float:\n return epAf.atan2(Ojw_.y - BPqA.y, Ojw_.x - BPqA.x)", "def GJtA(YKHO):\n return _qLf(YKHO._joint_angle)", "def GJtA(YKHO):\n return _qLf(YKHO._joint_angle)", "def BNli(YKHO, ytH6):\n xIqF =...
[ "0.743022", "0.7373078", "0.72909373", "0.72909373", "0.7139476", "0.71141297", "0.71141297", "0.69950914", "0.69137174", "0.6817324", "0.6779159", "0.6752822", "0.6598521", "0.655301", "0.65392005", "0.6507224", "0.64668125", "0.6375924", "0.63716346", "0.63260055", "0.62750...
0.0
-1
Joint detection confidence for a frames and joints.
def la9G(YKHO): return YKHO._confidence
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def XRWk(YKHO, Pb5J, HMCV):\n return YKHO._confidence[Pb5J][HMCV]", "def _eEp(YKHO, Pb5J, HMCV, la9G):\n assert Pb5J in YKHO._frame_ids, 'No such frame: %d' % Pb5J\n try:\n YKHO._confidence[Pb5J][HMCV] = la9G\n except KeyError:\n YKHO._confidence[Pb5J] = {HMCV: la9G}", "def ibMe(YKHO,...
[ "0.72501796", "0.6217533", "0.607117", "0.5902863", "0.58624625", "0.5590777", "0.55329454", "0.5506074", "0.5499135", "0.5485554", "0.54758227", "0.5470184", "0.54647994", "0.5462549", "0.5372418", "0.5353646", "0.5347608", "0.5331768", "0.5331768", "0.5331768", "0.5331768",...
0.5319404
21
Returns the confidence of the joint at frame.
def XRWk(YKHO, Pb5J, HMCV): return YKHO._confidence[Pb5J][HMCV]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def la9G(YKHO) -> float:\n return qe4Y.get(YKHO, 'confidence')", "def la9G(YKHO) -> float:\n return qe4Y.get(YKHO, 'confidence')", "def la9G(YKHO) -> float:\n return qe4Y.get(YKHO, 'confidence')", "def la9G(YKHO) -> float:\n return qe4Y.get(YKHO, 'confidence')", "def la9G(YKHO):\n return YKH...
[ "0.7224293", "0.7224293", "0.7224293", "0.7224293", "0.7142782", "0.707412", "0.7019673", "0.7000548", "0.7000548", "0.7000548", "0.7000548", "0.69709086", "0.6692883", "0.6692883", "0.6692883", "0.6692883", "0.6544984", "0.6524119", "0.64457136", "0.64195114", "0.60656726", ...
0.82956725
0
True, if confidence is already normalized to 0..1.
def NJHM(YKHO): return hasattr(YKHO, '_confidence_normalized') and YKHO._confidence_normalized
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def liQo(YKHO):\n if YKHO.IS_AOA:\n NT23 = oyIN.zeros(len(YKHO.values), dtype=bool)\n for YRbF in range(len(YKHO.values)):\n P1dF = oyIN.abs(1 - oyIN.sum(YKHO.values[YRbF], axis=0))\n NT23[YRbF] = (P1dF < 0.0001).all()\n return NT23.all()\n else:\n P1dF = oyI...
[ "0.70083624", "0.67355007", "0.6488305", "0.63484555", "0.6148652", "0.61403924", "0.59721637", "0.5791966", "0.57775295", "0.57775295", "0.5761591", "0.5756324", "0.5738865", "0.5693813", "0.5688958", "0.56776357", "0.5660708", "0.5642898", "0.56427765", "0.5641222", "0.5634...
0.80216604
0
Estimates the smallest time difference between two frame_ids.
def fr6B(YKHO): return min(oyIN.diff(list(YKHO._times.values())))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ML3u(YKHO, Elif):\n return abs((YKHO.time - Elif.time).total_seconds())", "def atZV(P5pU, XvdE):\n if P5pU.overlaps(XvdE):\n assert False, (P5pU, XvdE)\n return 0\n if P5pU.end < XvdE.start:\n return XvdE.start - P5pU.end\n else:\n return P5pU.start - XvdE.end", "def...
[ "0.61224985", "0.59694827", "0.58971643", "0.5847663", "0.5836656", "0.5813037", "0.5770977", "0.574562", "0.5738394", "0.56453013", "0.5639572", "0.56318307", "0.56154966", "0.5613703", "0.5606898", "0.5593223", "0.55696243", "0.5569301", "0.556157", "0.5542296", "0.5536924"...
0.0
-1
Pairs of frame_ids where there is no information. At the transition times between actors, there might be frames where we already don't know anything about one actor but haven't seen the new actor yet. These spans are important to track to prevent interpolation and smoothing between actors.
def INMg(YKHO): return tuple(((YKHO.get_actor_last_frame(actor_id=QiwA), YKHO.get_actor_first_frame(actor_id=QiwA + 1) if QiwA + 1 < YKHO.n_actors else YKHO.get_frames()[-1] + 1) for QiwA in range(YKHO.n_actors)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sbKp(f4IJ):\n ma_7 = {0: [1, 2], 1: [0, 2], 2: [0, 1]}\n return ma_7[f4IJ]", "def e_s9(YKHO) -> x1iM[AzJI[int, int]]:\n J8oL = oRi_(lambda: 0)\n MKlR = YKHO.head\n for nPrm in YKHO.data:\n J8oL[nPrm[MKlR.index('frame_id')]] += 1\n return [(Pb5J, ZhDg) for Pb5J, ZhDg in J8oL.items()]"...
[ "0.59132934", "0.5591277", "0.5499799", "0.5493013", "0.5477602", "0.54476756", "0.54247814", "0.5416183", "0.5389614", "0.5355292", "0.53433007", "0.5342498", "0.5340716", "0.53026366", "0.52664894", "0.52628773", "0.5239792", "0.52298427", "0.52245337", "0.52161634", "0.520...
0.6487247
0
Transforms sentence into a list of indices. Pad with zeroes.
def wTS3(_dZy, PZkd, DuqQ, bW4_=51, CIys=5): KCHu = [] hVLt = CIys - 1 for YRbF in Ni9Y(hVLt): KCHu.append(0) V22M = _dZy.split() for GIN8 in V22M: if GIN8 in PZkd[DuqQ]: KCHu.append(PZkd[DuqQ][GIN8]) if len(KCHu) > bW4_: break while len(KCHu) < bW...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _xG4(YKHO, yAmx):\n D5k_ = [YKHO.word2index[GIN8] for GIN8 in yAmx.split()]\n vkh5 = D5k_ + [YKHO.pad_word_index] * (YKHO.text_maxlen - len(D5k_))\n if len(vkh5) != YKHO.text_maxlen:\n raise ValueError('For sentence: %s\\n, the length of sentence: %d exceeds the text_maxlen: %d. Consider ...
[ "0.6961406", "0.6585691", "0.6571423", "0.6569927", "0.6528359", "0.65267724", "0.65073395", "0.6483409", "0.6456488", "0.64280045", "0.64246833", "0.63974255", "0.6296621", "0.62567323", "0.6253438", "0.6248379", "0.6245358", "0.6234708", "0.6210976", "0.61743146", "0.617431...
0.0
-1
Return True if username exists; else False.
def V7zm(NtEF): return Yn3K.run(['id', '-u', NtEF]).returncode == 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def V7zm(YKHO, NtEF: str) -> bool:\n return NtEF in YKHO.__data", "def QbMN(YKHO, NtEF: str) -> bool:\n if YKHO.select_user_by_username(NtEF) is None:\n return False\n return True", "def V7zm(NtEF):\n CBIr = kXHQ(NtEF)\n if CBIr is None:\n return False\n return True", "def V7z...
[ "0.85476583", "0.8390922", "0.8325362", "0.8300506", "0.8275259", "0.8246219", "0.82400393", "0.811452", "0.8049195", "0.8025767", "0.79908234", "0.79908234", "0.79872185", "0.7967968", "0.79508126", "0.7939153", "0.7933838", "0.79256445", "0.79158854", "0.7911395", "0.790298...
0.77674043
28
Returns another proxy instance wrapping the same dictionary as this proxy.
def jth9(YKHO): return type(YKHO)(YKHO.__dict)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jth9(YKHO):\n return YKHO.__class__(**YKHO.dict())", "def jth9(YKHO):\n return YKHO._from_map(YKHO._dict)", "def jth9(YKHO) -> 'DotDict':\n return type(YKHO)(YKHO.__dict__.copy())", "def jth9(YKHO):\n return type(YKHO)(init_dict=YKHO.as_dict())", "def jth9(YKHO):\n return YKHO.fromDict(Y...
[ "0.69320196", "0.6915506", "0.67620087", "0.673246", "0.67116", "0.6640024", "0.65618116", "0.6496649", "0.6475487", "0.64465827", "0.6422826", "0.6419247", "0.63747644", "0.63352233", "0.6291652", "0.6278327", "0.6263558", "0.62510663", "0.6215706", "0.6201612", "0.61877453"...
0.6858552
2
Saves a to json
def U1ai(fGC9, FYKK): with open(FYKK, 'w') as eHNT: eHNT.write(qQXR.dumps(fGC9))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xkzz(YKHO):\n if not YKHO.to_save:\n return\n try:\n ytgA = open(YKHO.store, 'w')\n qQXR.dump(YKHO, ytgA)\n ytgA.close()\n except IOError:\n pass", "def U1ai(YKHO, nPrm, pmON):\n VqRE = Hy7s.path.join(YKHO.base_path, pmON)\n with open(VqRE, 'w+') as _RR0:\n ...
[ "0.7268997", "0.7206973", "0.71969885", "0.71872896", "0.7164041", "0.7142111", "0.71333194", "0.71035564", "0.71009624", "0.71009624", "0.7086065", "0.7079895", "0.7048463", "0.7039791", "0.7032616", "0.7032616", "0.70074713", "0.69839454", "0.6982326", "0.6976739", "0.69601...
0.0
-1
Repeat column h multiplied by 1
def kHRj(I7o1, MKlR): Mkmy, Z9rn = I7o1.shape I7o1 = oyIN.hstack((I7o1[:, 0:MKlR - 1], -I7o1[:, [MKlR - 1]], I7o1[:, MKlR - 1:Z9rn])) return I7o1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LHwl(C7Ls):\n pdhd = oyIN.diag([1, 1])\n return oyIN.kron(pdhd, C7Ls)", "def V90T(Fg_i, MKlR):\n if len(MKlR) == 1:\n Fg_i[0] += 1.0 / MKlR[0] ** 2\n else:\n Fg_i[:, 0] += 1.0 / MKlR[0] ** 2", "def bPAs(YKHO, exwG):\n pass", "def rDpi(mEjK, NSA6, UOf1, IRm0, bIja, vLYm):\n ...
[ "0.6340954", "0.6178071", "0.5959103", "0.5935605", "0.5873967", "0.58639", "0.57922935", "0.57917625", "0.57689726", "0.5712784", "0.56792957", "0.56783307", "0.56467974", "0.564512", "0.5634053", "0.56165797", "0.5611047", "0.5559333", "0.5518605", "0.5486437", "0.5480104",...
0.6190923
1
sqlparse default implementation of strip comments has a bad performance when parsing very large SQL due to the grouping. This is because the default implementation tries to format the SQL for prettyprinting. Impala shell use of strip comments is mostly for checking and not for altering the actual SQL, so having a prett...
def lvfG(Pe9W): E5BI = g4Ww.engine.FilterStack() E5BI.stmtprocess.append(g4Ww.filters.StripCommentsFilter()) E5BI.postprocess.append(g4Ww.filters.SerializerUnicode()) return ''.join(E5BI.run(Pe9W, 'utf-8')).strip()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KUzs(Pe9W):\n\n class StripLeadingCommentFilter(object):\n\n def FIMM(YKHO):\n YKHO.comment = None\n\n def i9Xz(YKHO, uTQu):\n \"\"\"\n Iterate through the list of tokens, appending each leading commment\n to self.comment, and then popping that element off t...
[ "0.76603526", "0.7407015", "0.6948983", "0.68917286", "0.6815457", "0.65676", "0.6540504", "0.6394253", "0.6370207", "0.62717354", "0.6234389", "0.6229004", "0.6025365", "0.5952997", "0.59431493", "0.5865419", "0.58177346", "0.58002675", "0.5797986", "0.57587016", "0.5754474"...
0.7733251
0
Closes the current Impala connection.
def ngVb(YKHO): if YKHO.imp_client: YKHO.imp_client.close_connection()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DDI8(YKHO):\n px6G.rpc.close_service(YKHO.service)", "def ngVb():\n DpUl.close()\n w2B8.close()", "def DDI8(YKHO):\n YKHO.conn.close()", "def DDI8(YKHO):\n YKHO._conn.close()", "def ngVb(YKHO):\n YKHO.conn['connection'].cursor().close()\n YKHO.conn['connection'].close()", "def DD...
[ "0.67605144", "0.67535514", "0.67148924", "0.67026895", "0.66736084", "0.66539514", "0.6645217", "0.66235846", "0.6614288", "0.6614288", "0.6614288", "0.6584189", "0.65837294", "0.65735435", "0.65645397", "0.65439713", "0.6535333", "0.65254074", "0.65254074", "0.65208316", "0...
0.6768195
0
Executes a query with a WITH clause, fetching all rows
def INHu(YKHO, qIxc): xDcj = YKHO._build_query_string(YKHO.last_leading_comment, YKHO.orig_cmd, qIxc) U5Jc = g4Ww.parse(xDcj)[0] kdD5 = g4Ww.sql.Statement(U5Jc.tokens).get_type() try: GsMN = YKHO.DML_REGEX.match(kdD5.lower()) return YKHO._execute_stmt(xDcj, bool(GsMN), print_web_link=Tru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JUdV(YKHO, *qIxc, **c_sp):\n Ylbp = OmGW(YKHO._engine, *qIxc, **c_sp)\n try:\n for rdlD in Ylbp:\n yield rdlD\n finally:\n Ylbp.close()", "async def query(YKHO, xDcj, *qIxc):\n async with YKHO.pool.acquire() as UzPC:\n async with UzPC.transaction():\n N1...
[ "0.7200242", "0.7043694", "0.6790953", "0.65746504", "0.65374905", "0.6476119", "0.6436796", "0.63165885", "0.6250677", "0.6200959", "0.61869144", "0.61512446", "0.6134972", "0.6133576", "0.6129882", "0.6107484", "0.60971403", "0.6094167", "0.6090853", "0.6090491", "0.6082704...
0.0
-1
Filter a leading comment in the SQL statement. This function returns a tuple containing (leading comment, line without the leading comment).
def KUzs(Pe9W): class StripLeadingCommentFilter(object): def FIMM(YKHO): YKHO.comment = None def i9Xz(YKHO, uTQu): """ Iterate through the list of tokens, appending each leading commment to self.comment, and then popping that element off the list. When we ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Ubtg(Nqlg: Sequence[bytes], Kor2: int, NqEh: int) -> h8nf[AzJI[int, int]]:\n return qoJS(Nqlg, Kor2, NqEh, b'(*', b'*)')", "def OuQZ(YKHO, zFiD=None):\n if zFiD is None:\n return None\n zNig = len(zFiD)\n for aM_I in uJdf:\n dQgj = zFiD.find(aM_I, 0, zNig)\n if dQgj >= 0 and ...
[ "0.66758317", "0.65865934", "0.6458045", "0.6395356", "0.63770556", "0.6366267", "0.6335133", "0.6259264", "0.6248094", "0.6225453", "0.62199986", "0.6217605", "0.621256", "0.6210513", "0.6204854", "0.6134337", "0.61327577", "0.6122488", "0.6113939", "0.6112052", "0.61096466"...
0.77921903
0
Iterate through the list of tokens, appending each leading commment to self.comment, and then popping that element off the list. When we hit the first noncomment and nonwhitespace token, then we're done the remainder after that point is the SQL statement.
def i9Xz(YKHO, uTQu): eOtH = uTQu.token_first() while eOtH: if YKHO._is_comment(eOtH) or YKHO._is_whitespace(eOtH): if YKHO.comment is None: YKHO.comment = eOtH.value else: YKHO.comment += eOtH.value uTQu.tokens.pop(0) eOtH ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hfK9(YKHO, Pe9W):\n YKHO.sql = Pe9W.strip()\n YKHO.comment = ''\n if YKHO.sql[0] == '#' or YKHO.sql[:2] == '--':\n if not YKHO.sql.count('\\n'):\n YKHO.comment = YKHO.sql\n YKHO._values = {'commment': YKHO.comment}\n YKHO.matched = True\n return ''\n ...
[ "0.6602308", "0.60748225", "0.60480976", "0.6006436", "0.58657825", "0.5843197", "0.58314496", "0.57905376", "0.5773341", "0.5553004", "0.5538045", "0.5521486", "0.5514022", "0.5469777", "0.5447671", "0.5447487", "0.54460657", "0.5437403", "0.5368307", "0.5361016", "0.5353794...
0.6935051
0
Clip a file name to its base string name
def lTym(gIsw=None): return Hy7s.path.basename(gIsw).replace('.py', '')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NVCy(mWFP):\n return mWFP.translate('___________________________________________+_-._0123456789______@ABCDEFGHIJKLMNOPQRSTUVWXYZ______abcdefghijklmnopqrstuvwxyz_____________________________________________________________________________________________________________________________________').replace('..'...
[ "0.75035006", "0.7192637", "0.71490663", "0.71236694", "0.7117169", "0.71168226", "0.7114585", "0.71017575", "0.7057373", "0.7033922", "0.7017502", "0.7017328", "0.7002339", "0.6997721", "0.696974", "0.69573706", "0.6955144", "0.6949449", "0.69443196", "0.6942917", "0.6934099...
0.0
-1
Make a new measurement collection. Takes meter ID of the meter taking the measurement. Add the time when the measurement was received as a datetime obj.
def FIMM(YKHO, ki_K: str, E3oo: datetime): YKHO.meter_id = ki_K YKHO.timestamp = E3oo YKHO.measurements = U8Lr()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NbR8(YKHO, nPrm):\n YKHO.db.resource.update({'_id': nPrm['resource_id']}, {'$set': {'project_id': nPrm['project_id'], 'user_id': nPrm['user_id'] or 'null', 'metadata': nPrm['resource_metadata'], 'source': nPrm['source']}, '$addToSet': {'meter': {'counter_name': nPrm['counter_name'], 'counter_type': nPrm['co...
[ "0.60258055", "0.586552", "0.5728295", "0.5641493", "0.55985147", "0.5564531", "0.55507886", "0.5482214", "0.5481797", "0.5441761", "0.54262733", "0.5422789", "0.54033095", "0.5400786", "0.54005605", "0.5346547", "0.5346511", "0.5317976", "0.5286743", "0.52848864", "0.5252312...
0.6270453
0
Sets the learning rate to the initial LR decayed by 10 every 30 epochs
def e_63(K0do, qtWj, tspZ): tspZ = tspZ * 0.1 ** (qtWj // 30) for Lwm5 in K0do.param_groups: Lwm5['lr'] = tspZ
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def e_63(K0do, qtWj):\n nIX4 = nIX4 * 0.1 ** ((qtWj - 117) // 30)", "def e_63(K0do, qtWj, qIxc):\n tspZ = qIxc.lr * 0.1 ** (qtWj // 30)\n K0do.state_dict()['param_groups'][-1]['lr'] = tspZ", "def e_63(ma4o, K0do, qtWj, ctbl):\n tspZ = ma4o * 0.1 ** (qtWj // int(epAf.ceil(30.0 / ctbl)))\n for Lwm...
[ "0.79913914", "0.7940271", "0.7889561", "0.7827654", "0.7822424", "0.78169405", "0.78104955", "0.7802542", "0.7791233", "0.77886415", "0.7781942", "0.77654004", "0.77644646", "0.7760775", "0.7748703", "0.77388716", "0.7732095", "0.7724198", "0.77117205", "0.77086747", "0.7704...
0.75593346
81
Computes the accuracy over the k top predictions for the specified values of k
def vjyh(hlel, pan_, hz5a=(1,)): with ht2j.no_grad(): Gq8e = max(hz5a) Ep8u = pan_.size(0) bGrB, nvEb = hlel.topk(Gq8e, 1, True, True) nvEb = nvEb.t() gXXc = nvEb.eq(pan_.view(1, -1).expand_as(nvEb)) Ylbp = [] for G1Hx in hz5a: R2Dg = gXXc[:G1Hx].v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vjyh(aMgO, ibJh, hz5a=(1,)):\n Gq8e = max(hz5a)\n Ep8u = ibJh.size(0)\n bGrB, nvEb = aMgO.topk(Gq8e, 1, True, True)\n nvEb = nvEb.t()\n gXXc = nvEb.eq(ibJh.view(1, -1).expand_as(nvEb))\n Ylbp = []\n for G1Hx in hz5a:\n R2Dg = gXXc[:G1Hx].view(-1).float().sum(0)\n Ylbp.append(...
[ "0.831739", "0.8285555", "0.82819945", "0.8281045", "0.8236264", "0.8233611", "0.8224855", "0.8224518", "0.821177", "0.8191236", "0.81868964", "0.8180899", "0.81805474", "0.81796813", "0.8178707", "0.817864", "0.817864", "0.81777275", "0.81768566", "0.8175496", "0.8172934", ...
0.0
-1
Get the response safely and show errors if it fails.
def pv1q(YKHO, geh0): try: zgjV = geh0.json() except qQXR.JSONDecodeError as e: try: if geh0.status_code == 404: print('404 error, check your url. {}'.format(geh0.url)) else: print('status_code: {}'.format(geh0.status_code)) except:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GkmR(YKHO):\n _hkX = YKHO.http.getresponse()\n YKHO.log.info('resp is %s', str(_hkX))\n if _hkX.status < 400:\n return _hkX\n else:\n l11g = _hkX.read()\n m5r4 = _hkX.getheader('Content-Type', 'text/plain')\n raise c1Bu(code=_hkX.status, content_type=m5r4, content=l11g)"...
[ "0.7798832", "0.7386129", "0.7060879", "0.7026685", "0.7001805", "0.6976092", "0.6931889", "0.6909785", "0.68903136", "0.68704826", "0.6831277", "0.6811691", "0.68018836", "0.6797889", "0.679629", "0.67696315", "0.6760488", "0.67593646", "0.6735961", "0.6722425", "0.67216593"...
0.68145305
11
normalizes the scores in x, works only for 1D
def NkkI(WKvO): uw5A = oyIN.exp(WKvO - oyIN.max(WKvO)) return uw5A / uw5A.sum()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Q7gV(WKvO):\n JBMS = oyIN.mean(WKvO, axis=0)\n NVEz = oyIN.std(WKvO, axis=0)\n ED6E = (WKvO - JBMS) / NVEz\n return ED6E", "def NkkI(YKHO, WKvO):\n EcVT = oyIN.asanyarray(WKvO)\n if EcVT.std() < YKHO.eps:\n return [0 for bTKY in EcVT]\n return (EcVT - EcVT.mean()) / EcVT.std()", ...
[ "0.75881374", "0.7556636", "0.7454738", "0.74230164", "0.74071765", "0.7387452", "0.7385905", "0.7297201", "0.7275362", "0.7275289", "0.727185", "0.7271744", "0.7265183", "0.7239815", "0.72279525", "0.7202696", "0.7184886", "0.7123103", "0.71215284", "0.7088651", "0.7079814",...
0.6675481
82
Given two group sizes, computes a "nesting map" between groups. This function will produce a bipartite map between two sets of "group nodes" that will be used downstream to partition nodes in a bigger graph. The map encodes which groups from the larger set are nested in certain groups from the smaller set. As currently...
def ZWOP(YKHO, c_IJ, XiBK): ZI7A = int(epAf.floor(c_IJ / XiBK)) uGy3 = c_IJ - XiBK * ZI7A - 1 oD7a = g760.defaultdict(list) oeNL = 0 for YRbF in range(XiBK): for bGrB in range(ZI7A + int(YRbF <= uGy3)): oD7a[YRbF].append(oeNL) oeNL += 1 return oD7a
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def loZ4(maxY):\n Fbjb = [YRbF for YRbF in range(round(min(maxY), -5), round(max(maxY), -5), 100000)]\n moMn = {G1Hx: [] for G1Hx in Fbjb}\n for YRbF in maxY:\n ZXMK = False\n for uOe2 in Fbjb:\n if YRbF in range(round(uOe2 - 50000), round(uOe2 + 50000)) and ZXMK == False:\n ...
[ "0.5933821", "0.5241084", "0.5219919", "0.51508313", "0.51266676", "0.5112302", "0.5089964", "0.4972716", "0.49567148", "0.49463204", "0.4906173", "0.48820844", "0.48700303", "0.48329854", "0.4830473", "0.4823539", "0.48113957", "0.48068982", "0.4792884", "0.47920713", "0.477...
0.7959614
0
Return the current local date and time as a string. The format is "%Y%m%d_%H%M%S".
def K5UO(): return qcWV.datetime.now().strftime('%Y%m%d_%H%M%S')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Srs4():\n return qcWV.now().strftime('%Y%m%d_%H%M%S')", "def fTxZ():\n PYuG = qcWV.utcnow()\n return QMSQ(PYuG.strftime('%Y%m%d%H%M%S'))", "def wpbf():\n Elpc = qcWV.datetime.now(rIAI('America/Los_Angeles'))\n return Elpc.strftime('%Y%m%d_%H%M%S')", "def AT3T():\n return qcWV.utcnow().s...
[ "0.8019337", "0.78388727", "0.7810074", "0.7789041", "0.77637845", "0.7759281", "0.7723885", "0.77039343", "0.76463705", "0.75937396", "0.75916684", "0.7590392", "0.75883013", "0.7586136", "0.7585858", "0.7569287", "0.75684434", "0.75334203", "0.7530655", "0.75100434", "0.750...
0.7723759
7
Return True iff commit1 is an ancestor (or equal to) commit2.
def hdkC(YKHO, _quA, GUOz): if _quA == GUOz: return True else: return int(CD35(['git', 'rev-list', '--count', '--ancestry-path', '%s..%s' % (_quA, GUOz)]).strip()) != 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hdkC(FJhS, Yk_P):\n try:\n with open(Hy7s.devnull, 'w') as EaG3:\n HCmI = URgV.split('git rev-list {commit_id}'.format(Yk_P))\n jmMJ = Yn3K.check_output(HCmI, stderr=EaG3)\n except Yn3K.CalledProcessError:\n return None\n else:\n return FJhS in jmMJ", "def ...
[ "0.752924", "0.71587986", "0.71503717", "0.6742916", "0.66712785", "0.6646248", "0.6632859", "0.6617409", "0.6593502", "0.64938307", "0.64902544", "0.6464426", "0.6456437", "0.6431484", "0.63731825", "0.6339135", "0.63065404", "0.62854207", "0.62733525", "0.62350005", "0.6216...
0.89437157
0
Return True iff a merge (of a single branch) is in progress.
def U4ri(YKHO): try: with open(Hy7s.path.join(YKHO.git_dir(), 'MERGE_HEAD')) as eHNT: kJiB = [zFiD.rstrip() for zFiD in eHNT] except IOError: return False return len(kJiB) == 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dFlF(_Fei):\n return dk1a(_Fei) != []", "def BHsn(jehQ):\n tgM5(['remote', 'update'])\n WY3t = tgM5(['rev-parse', '@']).rstrip()\n y5Cv = tgM5(['merge-base', WY3t, 'origin/master']).rstrip()\n if WY3t == y5Cv:\n return True\n return False", "def BHsn(YKHO, jehQ: str) -> bool:\n ...
[ "0.7385537", "0.70421857", "0.6902621", "0.67035747", "0.66985273", "0.65698737", "0.6562922", "0.649037", "0.64297193", "0.64020157", "0.6351532", "0.6337576", "0.6325028", "0.6315996", "0.63038385", "0.62543523", "0.6217004", "0.6205331", "0.61486894", "0.613598", "0.608407...
0.76731896
0
Return True iff this frontier has no completed parts.
def eRwN(YKHO): return bool(YKHO.blocks)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Fd4y(YKHO):\n return not YKHO.empty", "def C5TC(YKHO):\n return YKHO.partcount() > 0", "def zwEa(YKHO):\n try:\n lsmZ = YKHO.steps.empty\n except AttributeError:\n lsmZ = True\n return not lsmZ", "def xUQc(YKHO):\n if YKHO.incomplete_count > 0:\n return False\n i...
[ "0.748467", "0.74777234", "0.73740774", "0.7305058", "0.73030573", "0.7296109", "0.7296109", "0.727839", "0.7213458", "0.71669644", "0.71652204", "0.71373826", "0.7137098", "0.7100756", "0.70990163", "0.7089905", "0.7087682", "0.70604223", "0.7021217", "0.7006053", "0.6999485...
0.0
-1
Return True iff this frontier has no completed parts.
def ebnO(YKHO): return bool(YKHO.blocks)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Fd4y(YKHO):\n return not YKHO.empty", "def C5TC(YKHO):\n return YKHO.partcount() > 0", "def zwEa(YKHO):\n try:\n lsmZ = YKHO.steps.empty\n except AttributeError:\n lsmZ = True\n return not lsmZ", "def xUQc(YKHO):\n if YKHO.incomplete_count > 0:\n return False\n i...
[ "0.748467", "0.74777234", "0.73740774", "0.7305058", "0.73030573", "0.7296109", "0.7296109", "0.727839", "0.7213458", "0.71669644", "0.71652204", "0.71373826", "0.7137098", "0.7100756", "0.70990163", "0.7089905", "0.7087682", "0.70604223", "0.7021217", "0.7006053", "0.6999485...
0.0
-1
Return the MergeState instance containing this Block.
def Vn2w(YKHO): raise NotImplementedError()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rtFn(YKHO):\n if YKHO.force_auto_sync:\n YKHO.get('BlockState')\n return YKHO._BlockState", "def QTBn(YKHO) -> YxGp:\n return {'opened': YxGp.OPEN, 'closed': YxGp.CLOSED, 'merged': YxGp.MERGED}[YKHO.data['state']]", "def QTBn(YKHO) -> KznG:\n return YKHO._state", "def QTBn(YKHO) -> Kzn...
[ "0.72430176", "0.6684808", "0.66169107", "0.66169107", "0.6570404", "0.6570404", "0.65694046", "0.647655", "0.64712185", "0.6398157", "0.6398157", "0.63950276", "0.6383305", "0.6355126", "0.63488865", "0.63488865", "0.63488865", "0.63488865", "0.6332452", "0.6309517", "0.6309...
0.8090497
0
Return the area of this block, ignoring the known edges.
def sAdl(YKHO): return (YKHO.len1 - 1) * (YKHO.len2 - 1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def f0tD(YKHO):\n return rSWe(YKHO.dimensions).area()", "def f0tD(YKHO):\n return YKHO._n_edges * YKHO.edge_length * YKHO.apothem * 0.5", "def f0tD(YKHO):\n f0tD = 0\n for D70y in YKHO.edges:\n o4D3, si3g, bGrB = D70y[0]\n ajwV, skBL, bGrB = D70y[1]\n Jw7X = ajwV - o4D3\n ...
[ "0.8130473", "0.8112352", "0.80490184", "0.7958083", "0.7957095", "0.7935897", "0.79088086", "0.78727734", "0.7805919", "0.77960634", "0.77886474", "0.77886474", "0.77683693", "0.776511", "0.77472514", "0.77472514", "0.77472514", "0.7736014", "0.7735957", "0.7735957", "0.7735...
0.0
-1
Generate a diagram of this Block. The returned diagram, is a nested list of integers forming a 2D array, where the integer at diagram[i1][i2] is one of MERGE_UNKNOWN, MERGE_MANUAL, MERGE_AUTOMATIC, MERGE_BLOCKED, or MERGE_UNBLOCKED, representing the state of the commit at (i1, i2).
def FVmp(YKHO): Bud7 = [[None for fVVZ in range(YKHO.len2)] for TPao in range(YKHO.len1)] for fVVZ in range(YKHO.len2): for TPao in range(YKHO.len1): ETu_ = YKHO.get_value(TPao, fVVZ) Z9rn = YKHO.MergeState[ETu_.is_known(), ETu_.is_manual(), ETu_.is_blocked()] Bud7[TP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Bud7(YKHO):\n Dmgy = [len(yGTL) > 0 and yGTL[0] or 1 for yGTL in YKHO]\n GF7e = max((len(yGTL) for yGTL in YKHO))\n A2lD = []\n tPZg = ikk6.options('diagram_str')\n for rdlD in range(GF7e):\n zFiD = ''\n for Z9rn in range(len(YKHO)):\n if rdlD == 0 and YKHO[Z9rn] == []:\...
[ "0.6568692", "0.6526239", "0.61914915", "0.56325954", "0.5561746", "0.5558452", "0.541257", "0.53972363", "0.5396806", "0.5394994", "0.53117424", "0.5297293", "0.5259381", "0.52290446", "0.52233446", "0.51828957", "0.5162713", "0.5144369", "0.5139459", "0.51206857", "0.511314...
0.8331741
0
overrided to provide user_company instance to the serializer.
def atFv(YKHO): return {'request': YKHO.request, 'format': YKHO.format_kwarg, 'view': YKHO, 'user_company': YKHO.user_company}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yITd():\n q9zX = Oa1e.current_user.company\n return pz3A({'company': q9zX.to_json()})", "def xkzz(YKHO, *qIxc, **B2fa):\n if YKHO.pk is None:\n CBIr = W84Y()\n YKHO.company = CBIr.company\n super(rCUz, YKHO).save(*qIxc, **B2fa)", "def yITd(YKHO):\n return YKHO.env.user.company_...
[ "0.706675", "0.6661892", "0.6533083", "0.61000407", "0.6012132", "0.6012132", "0.6012132", "0.6012132", "0.6012132", "0.6012132", "0.6012132", "0.6012132", "0.59460115", "0.5945154", "0.5936048", "0.5929254", "0.5929254", "0.5929254", "0.5929254", "0.5929254", "0.5929254", ...
0.6697352
1
Ask the great 8ball for answer.
async def eight_ball(YKHO, OaeV): await OaeV.send(tuKI.choice(PenU))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def _8ball(YKHO, OaeV, *, bAls: str):\n h2IT = ['As I see it, yes', 'It is certain', 'It is decidedly so', 'Most likely', 'Outlook good', 'Signs point to yes', 'Without a doubt', 'Yes', 'Yes – definitely', 'You may rely on it', 'Reply hazy, try again', 'Ask again later', 'Better not tell you now', 'Cannot...
[ "0.7363419", "0.72881675", "0.72379595", "0.7211942", "0.71968156", "0.71376014", "0.71008825", "0.7078528", "0.70334756", "0.70312786", "0.6861804", "0.6782777", "0.6761294", "0.6725121", "0.6659491", "0.6623593", "0.66176116", "0.66036415", "0.6576441", "0.6575631", "0.6567...
0.0
-1
Obtains the custom configuration of the registered service.
def tgzD(YKHO): return YKHO.service.configuration
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rMPu(YKHO):\n raise NotImplementedError()", "def LNWl(bSEa):\n return tgzD('services', bSEa, sEeL)", "def tgzD(YKHO):\n raise NotImplementedError", "def tgzD(YKHO):\n raise NotImplementedError()", "def tgzD(YKHO):\n pass", "def wLv7(YKHO):\n return YKHO.__config", "def wLv7(YKHO):...
[ "0.8098685", "0.7333358", "0.720733", "0.7146811", "0.703329", "0.69815713", "0.69815713", "0.69815713", "0.69815713", "0.69815713", "0.69815713", "0.69815713", "0.69815713", "0.69815713", "0.69815713", "0.69815713", "0.69815713", "0.69815713", "0.69815713", "0.69815713", "0....
0.74264586
1
Create a node and append it to the end of the list.
def SStx(YKHO, BWXx): YKHO.size += 1 YKHO.tail = o7DN(BWXx, None, YKHO.tail) if not YKHO.head: YKHO.head = YKHO.tail else: YKHO.tail.prev.next = YKHO.tail
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SStx(YKHO, BWXx):\n Q6kx = o7DN(BWXx)\n jvSB = YKHO.head\n while jvSB._next:\n jvSB = jvSB._next\n jvSB._next = Q6kx\n YKHO._size += 1\n return Q6kx", "def _Elu(YKHO, BWXx=None):\n if isinstance(BWXx, o7DN):\n Esd_ = BWXx\n else:\n Esd_ = o7DN(BWXx)\n if YKHO._...
[ "0.75245273", "0.7453069", "0.74074405", "0.7372707", "0.7360841", "0.73264235", "0.73210603", "0.73181844", "0.73136914", "0.7307541", "0.7268923", "0.7264384", "0.7231248", "0.721452", "0.7200642", "0.7197606", "0.71884865", "0.71817154", "0.71643865", "0.71623176", "0.7155...
0.705515
28
Remove the head node and return its value.
def BEuN(YKHO): if not YKHO.head: raise IndexError('List is empty!') br_7 = YKHO.head.value YKHO.head = YKHO.head.next try: YKHO.head.prev = None except AttributeError: YKHO.tail = None YKHO.size -= 1 return br_7
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Ml0O(YKHO):\n if YKHO.size == 0:\n return None\n ZESx = YKHO.head.value\n if YKHO.size == 1:\n YKHO.head = YKHO.tail = None\n else:\n YKHO.head = YKHO.head.next\n YKHO.head.prev = None\n YKHO.size -= 1\n return ZESx", "def BEuN(YKHO):\n if YKHO.head is None:\n...
[ "0.82280225", "0.82131124", "0.81413156", "0.8092692", "0.80517685", "0.80080515", "0.7950386", "0.78940594", "0.786642", "0.7824583", "0.7804199", "0.7790185", "0.77733475", "0.7762946", "0.7690363", "0.76778907", "0.7610459", "0.75962573", "0.75422686", "0.7534851", "0.7524...
0.7268767
33
Remove the tail node and return its value.
def DkWr(YKHO): if not YKHO.tail: raise IndexError('List is empty!') br_7 = YKHO.tail.value YKHO.tail = YKHO.tail.prev try: YKHO.tail.next = None except AttributeError: YKHO.head = None YKHO.size -= 1 return br_7
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mVXt(YKHO):\n Ylbp = YKHO.tail.prev\n YKHO._remove_node(Ylbp)\n return Ylbp", "def mVXt(YKHO):\n Ylbp = YKHO.tail.prev\n YKHO._remove_node(Ylbp)\n return Ylbp", "def BEuN(YKHO):\n if YKHO.head is None:\n return None\n Q6kx = YKHO.head\n YKHO.head = YKHO.head.next\n retu...
[ "0.7846479", "0.7846479", "0.7830205", "0.7754591", "0.77533096", "0.77490073", "0.7747642", "0.77300525", "0.7728498", "0.76925516", "0.76793", "0.7678512", "0.76517934", "0.76443094", "0.76369226", "0.7629984", "0.7603724", "0.75447524", "0.75143546", "0.7498279", "0.749186...
0.0
-1
finds disposable income by finding the difference for income and expense of comparable date
def bKWL(): Hmfn = qtQV() - AQdd() print(Hmfn) b8V_()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UGiU():\n Qxek = VYQB()\n SO8l = Qxek.split('\\n')\n for KOdv, zFiD in enumerate(SO8l):\n for mLGw, mJwe in enumerate(SO8l):\n if mLGw != KOdv:\n if int(zFiD) + int(mJwe) == 2020:\n return int(zFiD) * int(mJwe)", "def OQSh():\n fO6p = kSAV() - O...
[ "0.61495143", "0.60522604", "0.6010209", "0.59512657", "0.5940549", "0.5854901", "0.5808976", "0.5806155", "0.5799693", "0.5792369", "0.5784335", "0.57660365", "0.57098347", "0.57032907", "0.56816155", "0.5658825", "0.56489336", "0.5647155", "0.5626043", "0.5608366", "0.55947...
0.5288259
62
finds average disposable income rounded to 2 decimal place
def vbQ3(): yk4i = qtQV() - AQdd() yu4q = yk4i / TkyS() yu4q = str(round(yu4q, 2)) print(yu4q) b8V_()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ubR_(YKHO):\n return (YKHO.open + YKHO.close) / 2", "def P86G(YKHO):\n return round(YKHO.amount_spent * 100 / YKHO.budget_amount, 2)", "def SGf8(bpXT, PxO4, d6Ds):\n return (bpXT - PxO4) / d6Ds", "def tqeo(YKHO):\n if YKHO.quantity == 0:\n return 0.0\n else:\n return YKHO.tot...
[ "0.7326493", "0.7235257", "0.7105756", "0.6761723", "0.66413575", "0.66184753", "0.6613697", "0.659386", "0.657848", "0.648535", "0.6468471", "0.64486825", "0.64452505", "0.6418734", "0.6384936", "0.63790953", "0.63685375", "0.6360933", "0.6318043", "0.6304229", "0.6248486", ...
0.76336825
0
Get values for all overridden PluginParameter objects in the instance.
def mI5I(YKHO): return YKHO._getAttributesByBase(kBI_)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def K7D_(YKHO):\n I2Si = EEBf()\n for mWFP in YKHO.paramNames:\n xqoZ = getattr(YKHO, mWFP)\n I2Si.store(mWFP, xqoZ.getValue(), xqoZ.doc)\n return I2Si", "def yKKv(YKHO):\n return jKi7.itervalues(YKHO._parameters)", "def yEAJ(YKHO):\n return YKHO._param_values", "def yEAJ(YKHO):\...
[ "0.66094816", "0.65513325", "0.6517864", "0.64511913", "0.6443635", "0.64082164", "0.63392234", "0.63391936", "0.6308412", "0.6308412", "0.6308412", "0.6308412", "0.6308412", "0.6308412", "0.6302111", "0.6287816", "0.6270958", "0.6252931", "0.6237143", "0.6223223", "0.6221773...
0.7537969
0
Test creating a new user with an email is successful
def jH7C(YKHO): CBIr = mv1M.objects.create_user(YKHO.email, YKHO.password, **YKHO.extra_fields) YKHO.assertEqual(CBIr.email, YKHO.email) YKHO.assertTrue(CBIr.check_password(YKHO.password))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WVkE(YKHO):\n D3lj = 'testemail@Airbase.io'\n jTXt = 'Test@123'\n CBIr = egNl().objects.create_user(email=D3lj, password=jTXt)\n YKHO.assertEqual(D3lj.lower(), CBIr.email)", "def jH7C(YKHO):\n syqx = {'email': 'test@ezmeetup.ca', 'password': 'testpass123', 'first_name': 'Firstname', 'last_name...
[ "0.8672073", "0.8617637", "0.8500683", "0.84636986", "0.8457432", "0.8433961", "0.8430116", "0.84137535", "0.84062374", "0.8382602", "0.83627594", "0.8332863", "0.83292705", "0.8326409", "0.8318782", "0.83105946", "0.8303849", "0.82958025", "0.82958025", "0.82924944", "0.8291...
0.84487695
5
Test the email for a new user is normalized
def saHt(YKHO): CBIr = mv1M.objects.create_user(YKHO.email, YKHO.password, **YKHO.extra_fields) YKHO.assertEqual(CBIr.email, YKHO.email.lower())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ho5W(YKHO):\n D3lj = 'test@TEST.FR'\n CBIr = egNl().objects.create_user(D3lj, 'testtest')\n YKHO.assertEqual(CBIr.email, D3lj.lower())", "def saHt(YKHO):\n D3lj = 'testing@GMAIL.COM'\n CBIr = egNl().objects.create_user(email=D3lj, password='testingModels123')\n YKHO.assertEqual(CBIr.email, ...
[ "0.8010578", "0.80075556", "0.8003202", "0.8000785", "0.7962156", "0.7947909", "0.79349196", "0.79011977", "0.7883605", "0.7879679", "0.7865574", "0.7860899", "0.7828299", "0.78214306", "0.7820776", "0.7815087", "0.78015363", "0.77948403", "0.77629817", "0.7762249", "0.775828...
0.7743551
24
Test creating user with no email raises error
def WhLD(YKHO): with YKHO.assertRaises(ValueError): mv1M.objects.create_user(None, YKHO.password)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CnXP(YKHO):\n with YKHO.assertRaises(ValueError):\n D3lj = None\n KaGP = 'test1234'\n egNl().objects.create_user(email=D3lj, password=KaGP)", "def dv9i(YKHO):\n with YKHO.assertRaises(ValueError):\n egNl().objects.create_user(None, 'test123')", "def V97d(YKHO):\n with t...
[ "0.8946626", "0.88823766", "0.8839374", "0.8826006", "0.87678343", "0.87338656", "0.8719586", "0.8719016", "0.8717694", "0.8716184", "0.87151146", "0.87151146", "0.8714722", "0.8714722", "0.8714722", "0.8714722", "0.8714722", "0.87111115", "0.8709845", "0.8703824", "0.8701919...
0.8913199
1
Test creating user with invalid email raises error
def V97d(YKHO): D3lj = 'invalid_email' with YKHO.assertRaises(sUXu): mv1M.objects.create_user(D3lj, YKHO.password)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zgTA(YKHO):\n with YKHO.assertRaises(ValueError):\n egNl().objects.create_user(None, 'ttetre')", "def V97d(YKHO):\n with trZe.raises(ValueError):\n egNl().objects.create_user(email=None, password='testpass123')", "def R697(YKHO):\n with YKHO.assertRaises(ValueError):\n mv1M.ob...
[ "0.9055748", "0.9045356", "0.90449363", "0.9034295", "0.90306556", "0.90151674", "0.9006843", "0.8998695", "0.89929694", "0.899294", "0.899294", "0.8988777", "0.8988777", "0.8988777", "0.8988777", "0.8988777", "0.89862704", "0.89739263", "0.8972888", "0.8970126", "0.8969638",...
0.8812588
41
Test creating user with no given first name required field.
def VEkm(YKHO): with YKHO.assertRaises(ValueError): mv1M.objects.create_user(YKHO.email, YKHO.password, first_name=None, last_name=YKHO.extra_fields['last_name'], mobile=YKHO.extra_fields['mobile'])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Lf4t(YKHO):\n nPrm = {'username': 'test', 'email': 'test@example.com', 'password': 'testpassword', 'first_name': '', 'last_name': 'Muster'}\n geh0 = YKHO.client.post(YKHO.api_url, nPrm, format='json')\n YKHO.assertEqual(mv1M.objects.count(), 0)\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_400_BAD...
[ "0.8289603", "0.8253337", "0.7923802", "0.78710544", "0.77550536", "0.7727656", "0.7688533", "0.7627482", "0.7618149", "0.7578438", "0.7572107", "0.7569321", "0.7562809", "0.75517845", "0.7522569", "0.752146", "0.7478476", "0.74175", "0.738859", "0.7381878", "0.73757035", "...
0.88737327
0
Test creating user with no given mobile number required field.
def TK2G(YKHO): with YKHO.assertRaises(ValueError): mv1M.objects.create_user(YKHO.email, YKHO.password, mobile=None, first_name=YKHO.extra_fields['first_name'], last_name=YKHO.extra_fields['last_name'])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cMkJ(YKHO):\n bD7m = gxEw('main:users')\n nPrm = {'first_name': 'awa', 'password': '123456789A'}\n Ylbp = YKHO.client.post(bD7m, nPrm, format='json')\n YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_400_BAD_REQUEST)\n YKHO.assertEqual(mv1M.objects.count(), 0)", "def X9gd(YKHO):\n bD7m = gxEw(...
[ "0.7726293", "0.74396", "0.74239933", "0.73917586", "0.73688304", "0.72661686", "0.7186662", "0.7131867", "0.7064424", "0.7053311", "0.7050611", "0.69849634", "0.69824296", "0.69786644", "0.6955853", "0.6950428", "0.6921646", "0.6919496", "0.69149333", "0.6907071", "0.6902724...
0.8698534
0
Test creating a new superuser
def B84k(YKHO): CBIr = egNl().objects.create_superuser(YKHO.email, YKHO.password, **YKHO.extra_fields) YKHO.assertTrue(CBIr.is_superuser) YKHO.assertTrue(CBIr.is_staff)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LqR1(YKHO):\n CBIr = egNl().objects.create_superuser('test@undeinveti.ro', 'test123')\n YKHO.assertTrue(CBIr.is_superuser)\n YKHO.assertTrue(CBIr.is_staff)", "def LqR1(YKHO):\n CBIr = egNl().objects.create_superuser('testsuper@gmail.com', 'test@123')\n YKHO.assertTrue(CBIr.is_superuser)\n Y...
[ "0.87034905", "0.86985886", "0.86361283", "0.86126035", "0.8606349", "0.8591782", "0.857967", "0.85259736", "0.85191494", "0.848048", "0.84751505", "0.8472082", "0.84552705", "0.8452226", "0.83610165", "0.8334969", "0.83251256", "0.83212703", "0.8318251", "0.8295097", "0.8293...
0.8252422
25
Computes P(k|y) assuming P(k) is uniform on k. So basically looks at the likelihoods P(y|k) and normalizes across k. [Here k is the latent state indicator, y is the observation.]
def l3Ey(i912, LVAh): tSJk = [Oa1e[LVAh] for Oa1e in i912] return tSJk / oyIN.sum(tSJk)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sImb(EcVT, maki):\n return (oyIN.dot(EcVT.T, maki) / oyIN.sum(maki, 0)).T", "def ljiQ(G1Hx, WKvO):\n return i01b(G1Hx, WKvO) / oyIN.sqrt(TFEx(G1Hx))", "def SwFD(WKvO):\n assert WKvO.shape == (OjcS,)\n return -ZylS.square((WKvO - bBdi) / BDjd) / 2.0", "def PPyB(WKvO, cC56, VJv0, vC9B, kLZm, JQ...
[ "0.6911079", "0.6287577", "0.61618483", "0.6097701", "0.6060921", "0.60346836", "0.6019447", "0.59583175", "0.59496695", "0.59377456", "0.59357184", "0.5931754", "0.5929618", "0.5925333", "0.58858067", "0.58727574", "0.587273", "0.5872043", "0.58615726", "0.58270603", "0.5823...
0.61724085
2
Limits the vector to the screen bounds. Returns true when mario was outside the screen.
def IOnG(YKHO, xFSv): def DZbg(WKvO, vELP, PtQX): """Clamp a single value to a range.""" return max(vELP, min(WKvO, PtQX)) R4Ic = DpX9(YKHO.scr_surf.get_size()) R8mN = DpX9(DZbg(xFSv.pos.x, 0, R4Ic.x), DZbg(xFSv.pos.y, 0, R4Ic.y)) if R8mN == xFSv.pos: return False else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SG_p(YKHO):\n if YKHO.x < 0 or YKHO.x > YKHO.SCREEN.get_width() or YKHO.y < 0 or (YKHO.y > YKHO.SCREEN.get_height()):\n return True\n return False", "def Ju2O(YKHO):\n if YKHO.rect.x < 0 or YKHO.rect.y < 0 or YKHO.rect.x > YKHO.screen.get_width() + YKHO.rect.width or (YKHO.rect.y > YKHO.scree...
[ "0.6978843", "0.68489414", "0.68402666", "0.68079555", "0.6744981", "0.66769713", "0.6671252", "0.6645783", "0.6518417", "0.64766544", "0.647215", "0.64363766", "0.64265877", "0.6363083", "0.6360163", "0.6349408", "0.62810934", "0.6268458", "0.6266511", "0.6252957", "0.624504...
0.74379724
0
Load mario and scale him.
def VZi5(YKHO): YKHO.mario_img = a9eO.image.load('mario.png') YKHO.mario_img = a9eO.transform.scale(YKHO.mario_img, (64, 64)) YKHO.mario_img.set_colorkey(YKHO.mario_img.get_at((0, 0)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JghP(YKHO):\n pmON = Hy7s.path.join('img', YKHO.img_path)\n YKHO.img = a9eO.image.load(pmON).convert_alpha()\n YKHO.scaled_img = a9eO.transform.rotozoom(YKHO.img, tuKI.randint(0, 360), YKHO.bodyscale)", "def pfP3(YKHO):\n YKHO.mario_state = 'mario_small'\n YKHO.mario_lives = 0\n YKHO.load_c...
[ "0.68970996", "0.67362034", "0.6565365", "0.63187444", "0.62384695", "0.61587685", "0.6150329", "0.6115331", "0.60957813", "0.60798544", "0.6011484", "0.6009508", "0.60007447", "0.59547704", "0.59159374", "0.5894137", "0.58707744", "0.585771", "0.58538955", "0.5834657", "0.58...
0.71100974
0
Return the precipitation data for the last year/ since no data is available for last year, extend the criterion by one more year
def cBYs(): cuiw = DMju(eHpk) QqSd = JRYC.date.today() - JRYC.timedelta(days=730) cBYs = cuiw.query(Ny6I.date, Ny6I.prcp).filter(Ny6I.date >= QqSd).all() aj9W = {_c1T: OScg for _c1T, OScg in cBYs} return pz3A(aj9W)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yLtf(jQ3Z, lO87):\n RCXt = jQ3Z[jQ3Z['Break_Yr'].isnull() | (jQ3Z['Break_Yr'] == lO87)]\n RCXt = RCXt[RCXt['Install_year'] <= lO87]\n RCXt['AGE'] = lO87 - RCXt['Install_year']\n RCXt['Nearby_breaks_1yr'] = RCXt[f'Breaks_nearby_{lO87 - 1}']\n print(RCXt[f'Breaks_nearby_{lO87 - 1}'].sum())\n pr...
[ "0.68083435", "0.6381424", "0.626098", "0.6240418", "0.60441", "0.60126865", "0.59706205", "0.5955278", "0.59515303", "0.59203917", "0.59153694", "0.5898468", "0.5894035", "0.588056", "0.58804125", "0.5876482", "0.5860011", "0.5831935", "0.5797838", "0.57815546", "0.575488", ...
0.5600576
39
Returns all the stores.
async def read_all() -> cuzp[int, dict]: zgjV = await siXk.read_json_data(ZqPK) return {int(id): nPrm for id, nPrm in zgjV.items()}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qQKZ(Emd4):\n return Emd4.query.all()", "def qQKZ():\n Ars9 = 'https://openapi.etsy.com/v2/shops?api_key={}'.format(rJDA)\n qv1X = Mkmy.get(Ars9)\n Ylbp = qv1X.json()\n UHFx = int(Ylbp['count'])\n gQVb = range(0, UHFx + 10000, 10000)\n pzVU = ['https://openapi.etsy.com/v2/shops?api_key='...
[ "0.8960385", "0.79451406", "0.78023255", "0.77538025", "0.7569961", "0.7463492", "0.74126816", "0.7411608", "0.7370543", "0.7361101", "0.72506565", "0.7109338", "0.7096212", "0.702478", "0.6932374", "0.68832856", "0.6873755", "0.67915934", "0.67497176", "0.6739017", "0.672354...
0.0
-1
Update held keys and the player.
def QdZT(YKHO): wzkt = ITS7.time() YKHO.keys = g74T.key.get_pressed() YKHO.player.update(YKHO.obstacles, YKHO.keys, wzkt) YKHO.room.update(YKHO.player, wzkt)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mRTw(YKHO) -> None:\n sjXb = a9eO.key.get_pressed()\n if sjXb[vxNK]:\n return True\n if not YKHO.player1.is_destroyed():\n if sjXb[YB_S]:\n YKHO.player1.move_left()\n if sjXb[l8db]:\n YKHO.player1.move_right()\n if sjXb[cx_j]:\n YKHO.player1...
[ "0.73949844", "0.72718126", "0.7131385", "0.69615424", "0.678208", "0.6779704", "0.6647446", "0.66450167", "0.6641273", "0.6632684", "0.658593", "0.65461874", "0.6541687", "0.65279615", "0.6518316", "0.6503953", "0.648651", "0.64626735", "0.6458375", "0.63968515", "0.63886863...
0.7926929
0
Draw all necessary objects to the display surface.
def JmFt(YKHO): YKHO.room.draw(YKHO.screen) if g74T.font: o9av = g74T.font.Font(None, 36) l5Ny = o9av.render('Health: ' + str(YKHO.player.health), YKHO.player.health, (1, 0, 0)) yaLC = l5Ny.get_rect(centerx=YKHO.screen.get_width() / 2) YKHO.screen.blit(l5Ny, yaLC) YKHO.player...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JmFt(YKHO):\n YKHO.screen.fill((0, 51, 102))\n YKHO.drawables = YKHO.model.get_drawables()\n for Csk6 in YKHO.drawables:\n mawX = Csk6.get_rect()\n C5Es = Csk6.get_surface()\n YKHO.screen.blit(C5Es, mawX)\n a9eO.display.update()", "def rCQN(YKHO):\n YKHO.drawVertices()\n ...
[ "0.8184174", "0.7931482", "0.789405", "0.78364116", "0.7752192", "0.76508385", "0.76379764", "0.7635789", "0.76121455", "0.7575667", "0.75733435", "0.7568593", "0.7565011", "0.7535467", "0.7530447", "0.75187314", "0.7512778", "0.75122106", "0.75008607", "0.7493168", "0.748804...
0.0
-1
Lorentzian function for Dpeak modelling
def DeCm(yzQ0, *XP5J): k0lF = XP5J[0] Fg_i = XP5J[1] Csk6 = XP5J[2] return 2 * k0lF / oyIN.pi * Csk6 / (4 * (yzQ0 - Fg_i) ** 2 + Csk6 ** 2)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pKW_(yzQ0):\n return 1 / yzQ0 * RKD7(1 + yzQ0)", "def UTj0(epBp):\n return oyIN.exp(30.5 * epBp ** 0.04 - 21.7)", "def wX2U(YKHO, NArs):\n H2v2, TVTK, jwfR = NArs\n return H2v2 / (1.0 + 4.0 / TVTK ** 2 * (YKHO.freqs - jwfR) ** 2)", "def l85E(YKHO):\n return aM69.ln_mrp_shape(YKHO.mmin, YKH...
[ "0.68314934", "0.67892545", "0.67270994", "0.6579153", "0.652826", "0.6517202", "0.6517202", "0.64977115", "0.6454831", "0.6394095", "0.63928866", "0.63806516", "0.6364751", "0.63393736", "0.63123226", "0.62665385", "0.6255849", "0.62294865", "0.6206324", "0.61759603", "0.617...
0.6455014
8
Return the mean probability of incidents
def UWbO(YKHO, lO87=None, hksT=None): jQ3Z = YKHO._df_processed_loc(year=lO87, loc=hksT) return jQ3Z['is_incident'].mean()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vpxZ(W061):\n return oyIN.average(W061)", "def QuEc(YKHO, ezWE: np.ndarray) -> float:\n exwG = YKHO.get_n_active_agents()\n TlDD = 0 if exwG == 0 else oyIN.sum(ezWE) / exwG\n return TlDD", "def JBMS(YKHO):\n if YKHO.counts.size <= 1 or max(YKHO.counts) == 0:\n return 0\n yk4i = YKH...
[ "0.6888054", "0.67977124", "0.67619324", "0.6733427", "0.6696315", "0.6616051", "0.6602503", "0.659846", "0.65690625", "0.6561121", "0.65598935", "0.65396893", "0.6532822", "0.6512915", "0.65029603", "0.64871323", "0.64866453", "0.6480209", "0.6470242", "0.6461911", "0.646061...
0.6159924
68
Given a list of causes found by self._classify_incident_cause, return the most common cause (useful when resampling)
def mYlQ(YKHO, G6Hp): G6Hp = list(filter('N/A'.__ne__, G6Hp)) if len(G6Hp) > 0: return max(set(G6Hp), key=G6Hp.count) else: return 'N/A'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def g9XW(YKHO, dixj):\n try:\n _H2U = mBkc([YRbF['country_code3'] for YRbF in dixj['hits']['hits']])\n PeVW = _H2U.most_common()[0][0]\n return PeVW\n except IndexError:\n return ''\n except TypeError:\n return ''", "def JUzN(Fp0q):\n uVVL = Dhdw.FreqDist(Fp0q)\n ...
[ "0.60471505", "0.57679236", "0.5729437", "0.57131076", "0.5654912", "0.565074", "0.56377006", "0.56134117", "0.5595807", "0.5511762", "0.544602", "0.544485", "0.5440072", "0.5420344", "0.54112697", "0.53914464", "0.5376562", "0.5372186", "0.5353173", "0.5353173", "0.53439724"...
0.723162
0
Return latitude[deg] from earth radius
def rZ7X(r1VO): SI6q = Z6OX(PZyS(1 / ENfy.e2 * (1 - r1VO ** 2 / ENfy.re_a ** 2))) return h728(SI6q)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def epfh(_UuI):\n return epAf.cos(_UuI * epAf.pi / 180) * 3947", "def LWM5(WQKa, Mkmy):\n return S9Pt(WQKa, Mkmy) / Mkmy", "def wAYv(tyXi):\n jzdc = xznh\n Fg_i = zsSA\n _6Mp = oyIN.sqrt(((jzdc ** 2 * oyIN.cos(tyXi)) ** 2 + (Fg_i ** 2 * oyIN.sin(tyXi)) ** 2) / ((jzdc * oyIN.cos(tyXi)) ** 2 + (Fg...
[ "0.7660141", "0.7296907", "0.7165064", "0.7162386", "0.71317995", "0.7049937", "0.7024231", "0.7012965", "0.7012784", "0.6921479", "0.69122994", "0.68577725", "0.67672366", "0.66248244", "0.6596133", "0.65942967", "0.65805", "0.6538263", "0.65202564", "0.65078115", "0.6501982...
0.77622414
0
Test the shortcut functions to convert a standard TensorFlow type to a tf.Examplecompatible tf.train.Feature
def q4pu(): import numpy as oyIN cBgb.config.dl_multi.set_cuda_properties(Bork.get_value(cBgb.config.settings._SETTINGS, 'param_cuda', dict())) I45O.info('Test the shortcut functions to convert a standard TensorFlow type to a tf.Example-compatible tf.train.Feature') print(cBgb.tfrecords_utils._bytes_fea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kIHM(RDhP):\n\n def yTmk(hkxX):\n eHNT = ZylS.train.Feature(int64_list=ZylS.train.Int64List(value=list(hkxX)))\n return eHNT\n bySB = g760.OrderedDict()\n bySB['input_ids'] = yTmk(RDhP.input_ids)\n bySB['input_mask'] = yTmk(RDhP.input_mask)\n bySB['segment_ids'] = yTmk(RDhP.segment...
[ "0.7250839", "0.7173055", "0.71248204", "0.68330175", "0.68087333", "0.67830426", "0.67681485", "0.67592126", "0.67592126", "0.67592126", "0.67592126", "0.67505515", "0.6749557", "0.6749557", "0.67411315", "0.673185", "0.673185", "0.6722429", "0.6714229", "0.67139643", "0.671...
0.706661
3
Petitions are constructed one card at a time, adding cards to petition_cards. Once a complete petition is assembled, the cards are marked as used in hand and an action unit is added. The first card for a petition can be anything where we have 3 (or 2 with a Circus) cards of the same role. Subsequent cards are restricte...
def vDBs(YKHO): YKHO.choices = YKHO.get_petition_filtered_hand() YKHO.choices.append(FSql(None, 'Cancel petition', True)) YKHO.prompt = 'Select cards for petition'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pvQ3(YKHO):\n YKHO.choices = jth9.deepcopy(YKHO.hand)\n for Z9rn in YKHO.choices:\n if Z9rn.item != 'Jack' and YKHO.role != NWkv(Z9rn.item):\n Z9rn.selectable = False\n YKHO.choices.append(FSql('Petition', 'Petition', True))\n YKHO.choices.append(FSql('Skip', 'Skip further Palace ...
[ "0.61820793", "0.5748075", "0.5632096", "0.56197155", "0.5596863", "0.55924195", "0.55754584", "0.5532492", "0.55079013", "0.5502422", "0.54994357", "0.5488014", "0.54623145", "0.54402316", "0.5435823", "0.5391847", "0.5379691", "0.53735965", "0.5368005", "0.5344761", "0.5318...
0.5554466
7
Gets a copy of the list of cards in the hand, but filters them so the cards that can't be added for the current petition are not selectable. This function does not change the list of cards in hand.
def Q2I6(YKHO): S418 = list(YKHO.petition_cards) if YKHO.petition_cards: ted0 = YKHO.petition_cards[0].role else: ted0 = None mrPm = [] for Acvy in YKHO.hand: dxhl = Acvy.item t4HI = Acvy.selectable a_L7 = ted0 is not None and dxhl.name != 'Jack' and (ted0 != ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def d56l(YKHO, Nep5):\n oMjv = [MKlR for MKlR in YKHO.hand_names]\n for eHNT in Nep5:\n rkoI = eHNT.split('=')\n if rkoI[0] == 'hand':\n if rkoI[1].startswith('-'):\n oMjv.remove(rkoI[1][1:])\n khoC = []\n for MKlR in oMjv:\n khoC.extend(YKHO.hand_cards[MK...
[ "0.7690017", "0.731626", "0.7227166", "0.71963257", "0.70291114", "0.70215505", "0.6999211", "0.6922836", "0.6796205", "0.67879105", "0.66883576", "0.6685818", "0.66826105", "0.66632515", "0.66632515", "0.66632515", "0.66632515", "0.6629949", "0.66199565", "0.6612133", "0.660...
0.7474133
1
Checks if the action builder is done. If so, return the action and clean up the action builder. Returns None if the action builder is not finished. Returns a GameAction object if it's done.
def W0a5(YKHO): if YKHO.builder and YKHO.builder.done: XeOP = YKHO.builder.action iqDX.debug('Finished action builder, completed action: ' + str(XeOP)) YKHO.builder = None return XeOP else: iqDX.debug('Require more input to finish action builder.') return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rEJe(YKHO):\n YKHO.turnsToGo -= 1\n if YKHO.done():\n YKHO.parent.actionLock = None\n return YKHO.action", "def AMEM(YKHO) -> 'Action':\n QTBn = YKHO.env.get_state(agent_name=YKHO.name)\n XeOP = YKHO._get_action(dIw3(QTBn))\n return XeOP", "def daEM(YKHO):\n d6pt = YKHO._ordered...
[ "0.65128064", "0.59404576", "0.5932437", "0.5840246", "0.5716007", "0.5710426", "0.5612595", "0.55472463", "0.5484809", "0.5460546", "0.54604256", "0.5458162", "0.5397577", "0.53754455", "0.5368764", "0.5355798", "0.53555846", "0.5350201", "0.53296024", "0.53099644", "0.53057...
0.82242215
0
Returns (card_from_stockpile, card_from_hand, from_deck).
def _fpo(YKHO): oyg0 = YKHO.get_player() YKHO.builder = hySM(oyg0.stockpile, oyg0.hand, YKHO.game._player_has_active_building(oyg0, 'Atrium'), YKHO.game._player_has_active_building(oyg0, 'Basilica'))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zSVz(nf_0):\n YSHT = []\n DKP4 = []\n for yT5x in range(1, 3):\n DKP4.append(nf_0.pop())\n YSHT.append(nf_0.pop())\n return (DKP4, YSHT)", "def khoC(YKHO: Hand) -> AzJI[F1Hz]:\n return YKHO._cards", "def SAR3():\n return [[fdMZ, iCfd] for fdMZ in HRrY for iCfd in SOXX]", "...
[ "0.65219957", "0.64176244", "0.62921953", "0.6251446", "0.6246586", "0.6239739", "0.6232346", "0.61494625", "0.60974264", "0.60744", "0.60682565", "0.60682565", "0.60261035", "0.59687984", "0.596749", "0.5948884", "0.594314", "0.5935224", "0.5912813", "0.5894861", "0.58878565...
0.0
-1
Turns a 1D Tensor into 2D
def uZ0y(jzdc: ndarray, type: str='col') -> gyIm: assert jzdc.ndim == 1, 'Input tensors must be 1 dimensional' if type == 'col': return jzdc.reshape(-1, 1) elif type == 'row': return jzdc.reshape(1, -1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def b7l5(vhpA):\n with ZylS.compat.v1.name_scope(name='reshape_to_2d'):\n fdMZ = vhpA.shape.rank if vhpA.shape is not None else None\n if fdMZ is not None and fdMZ != 2:\n if fdMZ >= 3:\n vhpA = ZylS.reshape(vhpA, ZylS.shape(input=vhpA)[0:2])\n else:\n ...
[ "0.74077815", "0.7398819", "0.7398819", "0.72096366", "0.7180462", "0.7167367", "0.7042664", "0.7042664", "0.70216256", "0.6998562", "0.69791096", "0.6898841", "0.6808585", "0.66704696", "0.6669331", "0.6605282", "0.65975565", "0.65099233", "0.6500868", "0.64938855", "0.64919...
0.6364432
48
Return true if the binary sensor is on.
def Debg(YKHO) -> bool | None: if (nPrm := YKHO.coordinator.data): return YKHO.entity_description.is_on(nPrm) return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Debg(YKHO) -> bool:\n return YKHO.wemo.has_sensor != 0 and YKHO.wemo.sensor_state == 0", "def Debg(YKHO):\n try:\n return YKHO._izzibridge.data[YKHO._sensor_type] == YKHO._active_state\n except KeyError:\n return False", "def Debg(YKHO):\n return YKHO._sub_device.status['status'] ...
[ "0.8006813", "0.77373874", "0.76504236", "0.76456195", "0.7634934", "0.76054114", "0.75806063", "0.7531971", "0.7521731", "0.75068915", "0.7483521", "0.7464437", "0.7464437", "0.7454919", "0.7437895", "0.7419232", "0.7412237", "0.73971796", "0.7395791", "0.7395791", "0.738233...
0.0
-1
Generates columns names that can be used in a dataframe normalized with json_normalize()
def C83x(H5ew=None, BWXx=None): Txl5 = [] if isinstance(BWXx, str): Txl5.append(H5ew + '.' + BWXx) if H5ew is not None else Txl5.append(BWXx) elif isinstance(BWXx, (dict, list, tuple)): ibDM = next(iter(BWXx)) for LXG0 in BWXx.get(ibDM): if H5ew is not None: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pEku(jQ3Z: pd.DataFrame, WfCS: List[str]=['origin_reference', 'origin_organism']) -> rLdf.DataFrame:\n jQ3Z = jQ3Z.copy()\n for Z9rn in WfCS:\n jzdc = rLdf.json_normalize(jQ3Z[Z9rn], sep='_')\n ZWCE = [f'{Z9rn}_{WKvO}' for WKvO in jzdc.columns]\n jQ3Z[ZWCE] = jzdc\n del jQ3Z[Z...
[ "0.69579095", "0.664148", "0.6581547", "0.65379876", "0.62982196", "0.6252455", "0.6188062", "0.6185996", "0.6162263", "0.60747856", "0.60706764", "0.60541856", "0.6010505", "0.597222", "0.59359866", "0.59346604", "0.59029585", "0.5888227", "0.58655876", "0.58652365", "0.5864...
0.63207626
4
Remove file extension. This function works recursively to remove all extensions found. If there is any dot in your filename, this function will remove its right side until no dot are left...
def lWJ1(VqRE: pathlib.Path) -> oAb3.Path: ddn9 = VqRE.with_name(VqRE.stem) if str(ddn9) == str(VqRE): return ddn9 else: return lWJ1(ddn9)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jIOF(Ux0P):\n if '.' in Ux0P:\n return '.'.join(Ux0P.split('.')[:-1])\n return Ux0P", "def pb7I(Ux0P):\n return oduh.removeExt(Ux0P, UWr8)", "def MXbr(gIsw):\n BJ1H = gIsw.rfind('.')\n if BJ1H > gIsw.rfind('\\\\'):\n return gIsw[:BJ1H]\n else:\n return gIsw", "def d...
[ "0.85125506", "0.8380947", "0.8310158", "0.8179359", "0.8151738", "0.80973405", "0.807789", "0.8048294", "0.7926631", "0.78540283", "0.7838263", "0.78197676", "0.7714454", "0.7624551", "0.75922215", "0.7535216", "0.750731", "0.7445794", "0.7430907", "0.735835", "0.72873026", ...
0.7098856
26
Kullback Leibler divergence for 1D Normal distributions. p = N(mu0, var0) q = N(mu1, var1) KL(p||q) = 1/2 (var0/var1 + (mu1mu0)^2/var1 1 + log(var1/var0))
def F2x9(KFFv: Tensor, AcON: Tensor, ryEI: Tensor, CIn9: Tensor, Pusg: bool=True) -> llWB: yk4i = ryEI - KFFv bISY = (AcON / CIn9 + yk4i ** 2 / CIn9 - 1 + (CIn9 / AcON).log()) * 0.5 if Pusg: return bISY.sum(-1) return bISY
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hR7p(yGTL, SgQ6):\n with ZylS.name_scope('KL_divergence'):\n return -0.5 * ZylS.reduce_sum(1 + 2 * SgQ6 - yGTL ** 2 - ZylS.exp(2 * SgQ6), 1)", "def dzAH(Iuka, xp8Y, Wmca, ZP3V):\n return ZylS.reduce_sum(0.5 * ZylS.math.log(ZP3V / xp8Y) + (xp8Y + ZylS.square(Iuka - Wmca)) / (2.0 * ZP3V) - 0.5)", ...
[ "0.7623856", "0.75127155", "0.74396336", "0.7345769", "0.72876465", "0.72668177", "0.7258798", "0.71024895", "0.709074", "0.70095086", "0.6972316", "0.69209296", "0.68978614", "0.68691474", "0.68429536", "0.68364334", "0.68285626", "0.6795794", "0.6793219", "0.6778093", "0.67...
0.72883487
4
Kullback Leibler divergence for 1D normal with parameter differences. p = N(mu, var) q = N(mu + delta_mu, var delta_var)
def c40c(_840: Tensor, BiJT: Tensor, SRYB: Tensor, Pusg: bool=True) -> llWB: bISY = (_840 ** 2 / SRYB + BiJT - BiJT.log() - 1) * 0.5 if Pusg: return bISY.sum(-1) return bISY
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hR7p(yGTL, SgQ6):\n with ZylS.name_scope('KL_divergence'):\n return -0.5 * ZylS.reduce_sum(1 + 2 * SgQ6 - yGTL ** 2 - ZylS.exp(2 * SgQ6), 1)", "def ru2t(yGTL, SgQ6):\n return -0.5 * RsfQ.sym.sum(1 + 2 * SgQ6 - yGTL * yGTL - RsfQ.sym.exp(2 * SgQ6), axis=1)", "def dzAH(Iuka, xp8Y, Wmca, ZP3V):\n...
[ "0.7407204", "0.68925077", "0.6888991", "0.682103", "0.6813052", "0.674552", "0.67383796", "0.66338074", "0.65740675", "0.65027094", "0.64891475", "0.6452716", "0.63886094", "0.6373538", "0.63645333", "0.632849", "0.62999207", "0.6281444", "0.626932", "0.6262242", "0.62278277...
0.6780805
5
When initialized with width and length, the Grid object should store a container of bools of those dimensions.
def LbQI(YKHO): kLQb = [[False, False, False], [False, False, False]] Oa1e = Cs6h.Grid(3, 2) u_ln = Oa1e._data YKHO.assertEqual(kLQb, u_ln)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Lm0U(TVTK, H2v2):\n return [[False for WKvO in range(TVTK)] for LVAh in range(H2v2)]", "def FIMM(YKHO, zNig):\n YKHO.values = [False] * zNig\n YKHO.size = zNig", "def FIMM(YKHO, IDGo, v5wB):\n YKHO._grid_height = IDGo\n YKHO._grid_width = v5wB\n YKHO._cells = [[KAvf for L9B9 in range(YKHO...
[ "0.64606667", "0.6209099", "0.6205019", "0.6205019", "0.6150476", "0.612205", "0.6119553", "0.5992626", "0.59598905", "0.5944221", "0.5905292", "0.58937967", "0.585061", "0.5839119", "0.5823823", "0.57996285", "0.57996285", "0.5794664", "0.5786735", "0.5771406", "0.5768454", ...
0.55993456
47
Creates a new application instance.
def FIMM(YKHO): YKHO._parser = j1Jz.ArgumentParser(description=YKHO.description, epilog=YKHO.epilog, add_help=False, conflict_handler='resolve', formatter_class=j1Jz.RawTextHelpFormatter) YKHO._subparsers = YKHO._parser.add_subparsers(title='Commands', dest='command', metavar='') YKHO._commands = {} YKH...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LUif(Emd4):\n return SCWY", "def LUif():\n return eLpg(mode='app')", "def LUif(YKHO):\n return P4t4", "def LUif():\n return yPQU", "def LUif():\n return z_uJ", "def eLpg():\n return P4t4", "def LUif(YKHO):\n raise NotImplementedError", "def LUif(YKHO):\n raise NotImplement...
[ "0.84665287", "0.8239398", "0.8126379", "0.79743147", "0.79524374", "0.7900179", "0.78861624", "0.78861624", "0.78805727", "0.78805727", "0.78780925", "0.772719", "0.772719", "0.7720245", "0.7696387", "0.76924574", "0.76345164", "0.7619565", "0.75641346", "0.7558359", "0.7551...
0.0
-1
Gets the application version.
def DpZH(YKHO): return BtDU
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DpZH(YKHO):\n if YKHO.version is None:\n fUpG = GPtr.applicationSettings(YKHO.app, YKHO.environment.SHOW)['version']\n if fUpG:\n YKHO.version = fUpG\n return fUpG\n return YKHO.version", "def lABb(P4t4) -> str:\n return P4t4['version']", "def kaPv(YKHO):\n r...
[ "0.85845435", "0.84636796", "0.8457675", "0.8354029", "0.82955676", "0.8219273", "0.81704277", "0.8155529", "0.8102844", "0.8102844", "0.8066505", "0.8063795", "0.80628526", "0.80498534", "0.8040929", "0.8010687", "0.8000777", "0.7998716", "0.79845744", "0.79843044", "0.79795...
0.0
-1
Gets the application description.
def JBZA(YKHO): return xmSp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Mlug(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'app_description')", "def Mlug(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'app_description')", "def Mlug(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'app_description')", "def Mlug(YKHO, B7c0, TZ9E='release'):\...
[ "0.8780229", "0.8442886", "0.8442886", "0.84344614", "0.79604703", "0.7491569", "0.7392656", "0.7337516", "0.7336266", "0.7283417", "0.72386265", "0.7232036", "0.7179959", "0.71644753", "0.7137891", "0.71225613", "0.7112355", "0.7112355", "0.7112355", "0.7112355", "0.7112355"...
0.0
-1
Gets the application epilog message.
def QY6I(YKHO): return 'Report bugs and feature requests to {}/issues.'.format(jGSG)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def QY6I(YKHO) -> laHg.Optional[str]:\n return None", "def QY6I(YKHO):\n return None", "def QrAE(YKHO):\n YlY2 = filter(None, (MKlR.obj.get_epilog() for MKlR in YKHO._hooks))\n if YlY2:\n SQ3m = [YKHO._epilog or '']\n SQ3m.extend(YlY2)\n return '\\n\\n'.join(SQ3m)\n return Y...
[ "0.7535766", "0.70639116", "0.66705793", "0.6294408", "0.6221012", "0.6119678", "0.6105396", "0.592476", "0.5855435", "0.57936496", "0.57020634", "0.5692578", "0.568554", "0.56589603", "0.5607389", "0.56041044", "0.5571684", "0.5571684", "0.556739", "0.55532664", "0.55514866"...
0.59514415
7
Gets the command name.
def mWFP(YKHO): raise NotImplementedError
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Asoz(YKHO):\n return YKHO._command_name", "def oPpw(YKHO):\n return YKHO._cmd_name", "def Asoz(YKHO):\n return YKHO.__class__.__name__.replace('Command', '').upper()", "def mWFP(YKHO):\n return YKHO.__class__.__name__.replace('Command', '').lower()", "def Asoz():\n return Hy7s.path.basen...
[ "0.8944172", "0.8892995", "0.85616875", "0.8263595", "0.81991345", "0.8087592", "0.78799635", "0.7798372", "0.7792229", "0.7634569", "0.7590774", "0.75072414", "0.74487144", "0.73025906", "0.72480655", "0.72181606", "0.7216382", "0.71953064", "0.7163352", "0.7160501", "0.7151...
0.0
-1
Gets the command description.
def JBZA(YKHO): return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aI8p(YKHO):\n return 'Command description.'", "def t5do(YKHO):\n QoB4 = YKHO._description or tq_1.getdoc(YKHO.__class__) or ''\n if QoB4 == tq_1.getdoc(TkY7):\n QoB4 = ''\n return QoB4", "def yoaG(YKHO) -> I2jr:\n return 'Command({})'.format(' + '.join([finE.describe() for finE in YKH...
[ "0.89131284", "0.82801384", "0.81162494", "0.8043084", "0.79868525", "0.76558256", "0.7608566", "0.7608566", "0.7608566", "0.7608566", "0.7608566", "0.7608566", "0.7608566", "0.7608566", "0.7608566", "0.7608566", "0.7608566", "0.7608566", "0.7608566", "0.7608566", "0.7608566"...
0.0
-1
Gets the command epilog message.
def QY6I(YKHO): return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def QY6I(YKHO) -> laHg.Optional[str]:\n return None", "def QY6I(YKHO):\n return 'Available subcommands: %s' % ' '.join(WYTC())", "def QrAE(YKHO):\n YlY2 = filter(None, (MKlR.obj.get_epilog() for MKlR in YKHO._hooks))\n if YlY2:\n SQ3m = [YKHO._epilog or '']\n SQ3m.extend(YlY2)\n ...
[ "0.75406426", "0.68697083", "0.6321462", "0.6285378", "0.62838453", "0.61089176", "0.6064236", "0.60390574", "0.6016698", "0.58291405", "0.5747245", "0.5669876", "0.5659625", "0.56365806", "0.56198615", "0.55824804", "0.5577197", "0.5555752", "0.5555752", "0.5511331", "0.5509...
0.69347
1