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
Whether import is from Python `builtins` module.
def xOQZ(YKHO) -> bool: return YKHO.source.startswith(YKHO.builtins_import_string)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MP1F(object):\n if tq_1.isbuiltin(object):\n return True\n return getattr(object, '__module__', None) == 'builtins'", "def JS2f(mWFP):\n try:\n __import__(mWFP)\n return True\n except ImportError:\n return False", "def pT28(FYKK) -> bool:\n return getattr(FYKK, Kp...
[ "0.7769979", "0.7204395", "0.70813054", "0.6808869", "0.67874414", "0.6704766", "0.66938317", "0.6655915", "0.65290385", "0.6506746", "0.6412168", "0.6361563", "0.6315668", "0.62910324", "0.62482315", "0.61838263", "0.6172486", "0.6084502", "0.6044414", "0.599626", "0.5993880...
0.8617272
0
Get list of global variable names in exodus file.
def PDZg(YKHO): return [b''.join(WFmf).strip().decode() for WFmf in YKHO._f.variables['name_glo_var'][:]]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rnFd(YKHO):\n return YKHO.globals.values()", "def ZyYh():\n pmON = wvEv.parse_args().path\n bo34.info('Using the file: {}'.format(pmON))\n if not Hy7s.path.exists(pmON):\n tO9_ = 'The file ({}) does not exist.'.format(pmON)\n raise RuntimeError(tO9_)\n with vW_q.open(pmON) as eHN...
[ "0.7005294", "0.6926549", "0.69198376", "0.67853296", "0.67798495", "0.6777889", "0.66388804", "0.66081005", "0.6588747", "0.65842366", "0.64675844", "0.645544", "0.6445328", "0.6369555", "0.6356497", "0.63554895", "0.63462335", "0.6332596", "0.63029397", "0.62456274", "0.623...
0.74201846
0
Tests tuple in which, in comparison order does not matter.
def nOWr() -> None: assert YmqE((1, 2, 3)) == (3, 2, 1) assert YmqE((1, 3)) != (3,) assert YmqE((1, 2, 3)) == (1, 2, 3) assert YmqE((1, 2, 3)) == (2, 3, 1) assert not YmqE((7, 2, 3)).__eq__((1, 2, 5))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eRgZ(a1PO):\n if not isinstance(a1PO, tuple):\n return a1PO\n assert all((WKvO == a1PO[0] for WKvO in a1PO))\n return a1PO[0]", "def R6Ul(YKHO):\n YKHO.assertFalse(any((H5ew in YKHO.resultDict and YKHO.resultDict[H5ew] == EuHP[H5ew] for H5ew in EuHP)))", "def XirM():\n\n @Y84L\n de...
[ "0.7438869", "0.7215219", "0.7138882", "0.6944386", "0.6940476", "0.68486047", "0.68054307", "0.6765844", "0.6594706", "0.65943456", "0.65751874", "0.6561736", "0.64943", "0.64874905", "0.64801335", "0.6458465", "0.64491165", "0.6411613", "0.63956076", "0.63847715", "0.633042...
0.78470224
0
Tests mock for SQLAlchemy with scalar when rows are empty.
def zSC9() -> None: vfoF = M6eu() nPrm = vfoF.query(wOed).scalar() assert nPrm is None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GVEy() -> None:\n Y0EQ = 'test'\n vfoF = M6eu(data=[([TMAJ.call.query(wOed.name), TMAJ.call.filter(wOed.pk1 == 3)], [(Y0EQ,)])])\n EtR3 = vfoF.query(wOed.name).filter(wOed.pk1 == 3).scalar()\n assert Y0EQ == EtR3", "def OedY() -> None:\n vfoF = M6eu()\n jywp = wOed(pk1='123', name='test')\n...
[ "0.8088177", "0.7255612", "0.66960675", "0.6680683", "0.6672585", "0.6467992", "0.63236195", "0.6287787", "0.628413", "0.6246249", "0.6107963", "0.610712", "0.5974273", "0.59724617", "0.5951871", "0.59417254", "0.5919405", "0.5903869", "0.58950835", "0.5891279", "0.5888563", ...
0.8431401
0
Tests mock for SQLAlchemy with scalar for getting an attribute.
def GVEy() -> None: Y0EQ = 'test' vfoF = M6eu(data=[([TMAJ.call.query(wOed.name), TMAJ.call.filter(wOed.pk1 == 3)], [(Y0EQ,)])]) EtR3 = vfoF.query(wOed.name).filter(wOed.pk1 == 3).scalar() assert Y0EQ == EtR3
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eOtz() -> None:\n vfoF = M6eu()\n vfoF.add(wOed(pk1='123', name='test'))\n CBIr = vfoF.query(wOed).get(('123',))\n assert CBIr is not None", "def OedY() -> None:\n vfoF = M6eu()\n jywp = wOed(pk1='123', name='test')\n vfoF.add(jywp)\n hnQI = vfoF.query(wOed).scalar()\n assert jywp ...
[ "0.6941098", "0.6464978", "0.64299685", "0.64219916", "0.6375519", "0.63062084", "0.6149681", "0.6095504", "0.60744876", "0.6042962", "0.5965748", "0.5943618", "0.59241813", "0.5885507", "0.58711976", "0.57113004", "0.5672664", "0.5628886", "0.56203496", "0.5602872", "0.55819...
0.80826706
0
Convert UNIX timestamp to date of game. Timestamp is in UTC time. If before 10am, assign to previous day
def KGYW(i8WE): qcWV = JRYC.datetime.fromtimestamp(i8WE, tz=JRYC.timezone.utc) _c1T = qcWV.date() if qcWV.hour < 10: _c1T -= JRYC.timedelta(1) return _c1T
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nerg(n0eM):\n LVAh, r8hN, Csk6, ROt1, min, kRsb = ITS7.gmtime(n0eM)[:6]\n return qcWV.datetime(LVAh, r8hN, Csk6, ROt1, min, kRsb, 0, BRdn)", "def YnO1(YKHO):\n bo34.debug('Get a timestamp')\n return ITS7.mktime(qcWV.today().timetuple())", "def j9uU() -> qcWV:\n return k_T9(0)", "def _uaQ(_...
[ "0.59150136", "0.587712", "0.5839828", "0.5767954", "0.57527727", "0.57394856", "0.57302254", "0.5723907", "0.57170767", "0.56959844", "0.56266594", "0.5583265", "0.55781156", "0.55321723", "0.55050194", "0.5493355", "0.5462932", "0.5449407", "0.54479223", "0.5440364", "0.543...
0.6825801
0
get the top k indexes of elements in list
def Econ(cyvW, G1Hx, DChu=True, dgIT=None): bS0K = sorted(range(len(cyvW)), key=lambda YRbF: cyvW[YRbF], reverse=DChu)[:G1Hx] Aofo = list() if dgIT is not None: for d6pt in bS0K: if cyvW[d6pt] <= dgIT: break Aofo.append(d6pt) else: Aofo = bS0K ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kcc4(ezWE, G1Hx):\n return oyIN.sort(oyIN.argpartition(oyIN.array(ezWE), -G1Hx)[-G1Hx:])", "def EnqK(DEZP, G1Hx):\n bExK = oyIN.argpartition(-DEZP, G1Hx - 1)[:G1Hx]\n c5gT = oyIN.argsort(DEZP[bExK])[::-1]\n return bExK[c5gT]", "def H42b(_0VL, V22M, G1Hx):\n noZV = oyIN.argpartition(_0VL, -G1...
[ "0.81564945", "0.75693125", "0.7451825", "0.7416087", "0.7389833", "0.73073125", "0.7287712", "0.7287541", "0.71782684", "0.71492666", "0.7050277", "0.7016585", "0.6957951", "0.6935773", "0.69040745", "0.6887736", "0.68736106", "0.6822242", "0.6808193", "0.67954326", "0.67589...
0.7762503
1
n = len(grid) m = len(grid[0]) Add extra column at start and end to make the DP code below easier as we wont have to worry about array index going out of bounds dp = [[[1 for i in range(m + 2)] for j in range(m + 2)] for k in range(2)] curr = 1
def l8Qh(YKHO, Cs6h: List[List[int]]) -> int: exwG, r8hN = (len(Cs6h), len(Cs6h[0])) TifC = [[0] * (r8hN + 2) for bGrB in range(r8hN + 2)] TifC[0][r8hN - 1] = Cs6h[0][0] + Cs6h[0][r8hN - 1] for YRbF in range(1, exwG): jbXL = [[0] * (r8hN + 2) for bGrB in range(r8hN + 2)] for r845 in rang...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ZQuR(ezWE, exwG, BWXx):\n TifC = [[False for YRbF in range(BWXx + 1)] for r845 in range(exwG + 1)]\n for YRbF in range(exwG + 1):\n for r845 in range(BWXx + 1):\n if r845 == 0:\n TifC[YRbF][r845] = True\n elif YRbF == 0:\n TifC[YRbF][r845] = Fals...
[ "0.6929614", "0.6894414", "0.6581324", "0.6387183", "0.63011676", "0.61915535", "0.615863", "0.61510926", "0.6119725", "0.6109836", "0.61079246", "0.608929", "0.60850555", "0.6052707", "0.604016", "0.6006788", "0.59918404", "0.5986282", "0.59667504", "0.5948518", "0.59244055"...
0.5936244
20
Create start state s_0 by creating an instance of chess.Board without parameters.
def rEkR(): return H66R.Board()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def W9gz() -> yELo:\n iBIi = ('rnbqkbnr', 'pppppppp', '........', '........', '........', '........', 'PPPPPPPP', 'RNBQKBNR')\n return iBIi", "def FIMM(YKHO, KCHu=None):\n if KCHu is None:\n YKHO.state = oyIN.array([0] * P5Bq)\n YKHO.reset()\n else:\n YKHO.state = KCHu.copy()", ...
[ "0.7175675", "0.7163925", "0.69524217", "0.68722296", "0.6820933", "0.67646563", "0.6751897", "0.67451715", "0.66671586", "0.65852535", "0.6583955", "0.6528703", "0.6526843", "0.6517267", "0.64318043", "0.64065593", "0.6396193", "0.63906384", "0.6380939", "0.63762546", "0.636...
0.7407132
0
Takes a string or bytes instance Returns bytes, encoding strings in utf8 as necessary
def wKbV(KCHu): if isinstance(KCHu, bytes): return KCHu if isinstance(KCHu, bytes): return KCHu.encode('utf-8') raise TypeError(KCHu)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VZEj(KCHu):\n if isinstance(KCHu, bytes):\n return KCHu\n return bytes(KCHu, encoding='latin_1')", "def PQSR(vIwR):\n return vIwR.encode('utf8') if isinstance(vIwR, str) else vIwR", "def umXX(BWXx):\n assert BWXx is None or isinstance(BWXx, SnBA.StringTypes)\n if isinstance(BWXx, SnBA...
[ "0.78789115", "0.786755", "0.7853331", "0.781696", "0.77882993", "0.77628845", "0.775935", "0.7742865", "0.76835704", "0.76126474", "0.75809926", "0.7560572", "0.75466776", "0.75369805", "0.748969", "0.7446199", "0.7407698", "0.73765635", "0.7370925", "0.7366173", "0.7313073"...
0.72077256
27
Gets the command string to the left of the autocomp activation character.
def TOaJ(YKHO, zFiD=None, fvDH=None): if None in (zFiD, fvDH): zFiD, fvDH = YKHO.GetCurLine() fvDH = YKHO.GetColumn(YKHO.GetCurrentPos()) HCmI = YKHO._code['compsvc'].GetCommandString(YKHO, zFiD, fvDH) return HCmI
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oUZx(YKHO) -> str:\n HCmI = ''\n if YKHO.argv:\n HCmI = YKHO.argv[0]\n return HCmI", "def r0E3():\n if j579():\n return 'Command'\n else:\n return 'Ctrl'", "def zTot(YKHO):\n return YKHO.c_dict['COMMAND']", "def e2CE():\n print(\"Use arrows (or 'E', 'S', 'W',\" +...
[ "0.65989995", "0.65966505", "0.6444107", "0.6407239", "0.636327", "0.6315185", "0.63031125", "0.6292603", "0.62836796", "0.62830573", "0.6268605", "0.6266396", "0.6228238", "0.6149656", "0.6137546", "0.61362547", "0.6132986", "0.61143917", "0.609516", "0.6082235", "0.6074455"...
0.5542928
69
Return a reference to the document object represented in this buffer.
def FaAD(YKHO): return YKHO.file
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WjZY(YKHO):\n return YKHO.document", "def CAWp(YKHO):\n return YKHO.current_buffer.document", "def gvhb(YKHO):\n return YKHO._doc", "def gvhb(YKHO):\n return YKHO.p", "def C13M(YKHO):\n xDcj = {'_id': aA6B(YKHO.document_id)}\n return yQaM(dVja('documents').find_one(xDcj))", "def C13...
[ "0.7754489", "0.7752174", "0.73847544", "0.71739477", "0.71615356", "0.6927931", "0.6892295", "0.6892246", "0.68866545", "0.6709929", "0.6632898", "0.65285605", "0.6519638", "0.6512118", "0.6395905", "0.63928676", "0.63756174", "0.6363685", "0.6352276", "0.6347696", "0.630649...
0.70110404
5
Returns the full path name of the current file
def MgDA(YKHO): return YKHO.file.GetPath()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Jso9(YKHO):\n return Hy7s.path.basename(YKHO.filePath)", "def g_2H(YKHO):\n return str(YKHO.get_file())", "def W0tD(YKHO) -> str:\n return Hy7s.path.split(Hy7s.getcwd())[-1]", "def dpOl(YKHO):\n return ''", "def qaEx() -> str:\n jC5G = tq_1.stack()\n mgFW = tq_1.getframeinfo(jC5G[1][0...
[ "0.84706455", "0.7943912", "0.7880384", "0.7726042", "0.7687154", "0.761016", "0.76094806", "0.7597246", "0.7569293", "0.75638306", "0.7559089", "0.75495315", "0.7462976", "0.74420065", "0.74420065", "0.74420065", "0.74420065", "0.74420065", "0.743451", "0.74292463", "0.74153...
0.7777628
3
Get the keyword set for the current document.
def I0_V(YKHO): return YKHO._code['keywords']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Enyi(YKHO):\n return", "def wUfe(YKHO) -> fHNa[str]:\n return YKHO._keywords", "def uEKq(YKHO):\n return list(YKHO.keyword_headlines().keys())", "def wUfe(YKHO):\n return YKHO._keywords", "def wUfe(YKHO):\n return YKHO._keywords", "def wUfe(YKHO):\n return YKHO.__keywords", "def e...
[ "0.69609123", "0.67799413", "0.66237193", "0.6587038", "0.6587038", "0.65765136", "0.63525665", "0.6314063", "0.6294022", "0.6271629", "0.62711895", "0.6235446", "0.618823", "0.6141747", "0.6077335", "0.6065039", "0.6063697", "0.60342526", "0.59869814", "0.59662396", "0.59306...
0.64262956
6
Hide autocomp/calltip popup windows if any are active
def zfhj(YKHO): if YKHO.AutoCompActive(): YKHO.AutoCompCancel() YKHO.CallTipCancel()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Afoa(YKHO):\n super().hide()\n qmLP.warn('Use of show() and hide() methods of UIToolTip objects is not supported.')", "def fg_2():\n pass", "def W4Cl(YKHO):\n YKHO.activeWindow().callTip()", "def NlJX(YKHO):\n Gqqd = YKHO.GetPages()\n for B2Dn in Gqqd:\n if B2Dn.active:\n ...
[ "0.6634318", "0.65855145", "0.65289015", "0.6328443", "0.6278066", "0.6205472", "0.6155302", "0.6144133", "0.6141024", "0.6083898", "0.6074375", "0.6073089", "0.60657525", "0.6031467", "0.5998974", "0.5980013", "0.5957826", "0.5945813", "0.5933806", "0.59165543", "0.5911912",...
0.84292096
0
Add entire contents of the map (or scope) to this scope.
def a4gM(YKHO, map): YKHO.map.update(map)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SStx(YKHO, r8hN=None):\n if r8hN is None:\n r8hN = {}\n if YKHO.mapper is not None:\n r8hN = YKHO.mapper(r8hN)\n YKHO._maps.insert(0, r8hN)", "def qDjj(YKHO) -> None:\n YKHO.scope_stack.appendleft(oRi_(lambda: 0))", "def _jXH(YKHO, J8oL):\n YKHO.mappings.append(J8oL)", "def H...
[ "0.5950232", "0.56513035", "0.5554205", "0.5496433", "0.54815125", "0.5428497", "0.53264177", "0.52691275", "0.5252456", "0.5252456", "0.52465665", "0.5212838", "0.5211486", "0.5210575", "0.52035135", "0.5187728", "0.51600635", "0.51319045", "0.51128864", "0.5108049", "0.5099...
0.65408236
0
Adds a temp var with a particular name. Adds the same var only once.
def xry0(YKHO, type, mWFP): ycBG = ' %s %s;' % (type, mWFP) YKHO.temps.add(ycBG)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def C4rf(YKHO, mWFP):\n YKHO.all_variables.add(mWFP)", "def XuY2(YKHO, mWFP):\n if mWFP in YKHO.__var_names and (not YINM.allowed()):\n YKHO.warning('The variable name \"%s\" is already defined!' % mWFP)\n YKHO.__var_names.add(mWFP)\n YKHO.__local_names.add(mWFP)\n return mWFP", "def C4rf...
[ "0.7145549", "0.682994", "0.68005913", "0.68005913", "0.67591023", "0.66517466", "0.6591053", "0.6449306", "0.63693726", "0.63074255", "0.62553465", "0.6225449", "0.6217692", "0.6182188", "0.60841864", "0.6065289", "0.5878625", "0.5867975", "0.5795167", "0.5795078", "0.578651...
0.5981792
16
Constructs 4D homogeneous rotation matrix given the rotation angles (degrees) around the x, y and zaxis. Rotation is implemented in XYZ order.
def bULF(ydZk, OhBR, dnz0): ydZk = oyIN.pi * ydZk / 180 OhBR = oyIN.pi * OhBR / 180 dnz0 = oyIN.pi * dnz0 / 180 UV8M, vHO5, rAGV = oyIN.cos([ydZk, OhBR, dnz0]) o0ZM, BhJz, Rv0k = oyIN.sin([ydZk, OhBR, dnz0]) Zl7o = oyIN.array([[1, 0, 0, 0], [0, UV8M, -o0ZM, 0], [0, o0ZM, UV8M, 0], [0, 0, 0, 1]])...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def swgz(H6ix, IUkI, kjsp):\n return oyIN.array([[1, 0, 0], [0, oyIN.cos(H6ix), -oyIN.sin(H6ix)], [0, oyIN.sin(H6ix), oyIN.cos(H6ix)]]).dot([[oyIN.cos(IUkI), 0, oyIN.sin(IUkI)], [0, 1, 0], [-oyIN.sin(IUkI), 0, oyIN.cos(IUkI)]]).dot([[oyIN.cos(kjsp), -oyIN.sin(kjsp), 0], [oyIN.sin(kjsp), oyIN.cos(kjsp), 0], [0, ...
[ "0.77897334", "0.7526077", "0.7479741", "0.7239904", "0.7133518", "0.71079236", "0.70733625", "0.7063366", "0.7020628", "0.7007095", "0.6998829", "0.69801474", "0.6944173", "0.6944173", "0.6929848", "0.6881783", "0.68540263", "0.6847796", "0.68283296", "0.68283296", "0.682832...
0.67861193
24
Constructs a 4D homogeneous translation matrix given translations along each axis in 3D.
def sDby(UShr, Yrvv, yl4j): Kt_s = oyIN.array([[1, 0, 0, UShr], [0, 1, 0, Yrvv], [0, 0, 1, yl4j], [0, 0, 0, 1]]) return Kt_s
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iot0(UShr: float, Yrvv: float, yl4j: float) -> oyIN.matrix:\n return oyIN.matrix([[1, 0, 0, UShr], [0, 1, 0, Yrvv], [0, 0, 1, yl4j], [0, 0, 0, 1]])", "def g5rt(I2Vp: torch.Tensor, hgjH: torch.Tensor, NXpY: torch.Tensor, bLm4: torch.Tensor, h8FC: Optional[torch.Tensor]=None, oqNF: Optional[torch.Tensor]=No...
[ "0.73995066", "0.7138529", "0.7031038", "0.6940252", "0.68516237", "0.6737939", "0.6498432", "0.6344508", "0.62567097", "0.62078106", "0.61975265", "0.61405706", "0.6091014", "0.60847783", "0.60373956", "0.5968538", "0.59646744", "0.5951252", "0.5924158", "0.5915942", "0.5880...
0.63440347
8
Constructs a 4D homogeneous scaling matrix given coefficients for along each axis in 3D.
def PCvE(o0ZM, BhJz, Rv0k): o4sw = oyIN.array([[o0ZM, 0, 0, 0], [0, BhJz, 0, 0], [0, 0, Rv0k, 0], [0, 0, 0, 1]]) return o4sw
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kAD3(YTKZ, jCkM, tDjx, EJog, X0Mf):\n SZFh = [[YTKZ, 0.0, 0.0, tDjx], [0.0, jCkM, 0.0, EJog], [0.0, 0.0, 1.0, X0Mf], [0.0, 0.0, 0.0, 1.0]]\n return SZFh", "def ffG5(ZXB0, Y5YY):\n qm1u, Sq1H, K11F = ZXB0.shape\n qn2n = ZXB0.reshape((qm1u * Sq1H, K11F))\n qn2n = Y5YY.transform(qn2n)\n ZXB0 =...
[ "0.64456284", "0.6251178", "0.6069709", "0.6032151", "0.5829363", "0.5779725", "0.57516825", "0.5743453", "0.5716767", "0.56997925", "0.5549493", "0.5491846", "0.54084843", "0.5355805", "0.5355507", "0.52865636", "0.528564", "0.5279906", "0.52771086", "0.5242258", "0.5242258"...
0.58104616
5
Constructs a 4D homogeneous camera matrix used to convert points defined in XYZ world coordinates into UVW camera coordinates.
def hkak(tTpl, XP5J, a1PO): Kt_s = oyIN.array([[1, 0, 0, -tTpl[0]], [0, 1, 0, -tTpl[1]], [0, 0, 1, -tTpl[2]], [0, 0, 0, 1]]) yzQ0 = tTpl - XP5J yzQ0 = yzQ0 / oyIN.linalg.norm(yzQ0) P6bq = oyIN.cross(a1PO, yzQ0) P6bq = P6bq / oyIN.linalg.norm(P6bq) Ty9i = oyIN.cross(yzQ0, P6bq) A3Vt = oyIN.ar...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eQvH(ofmy, hLRM, begE=None):\n \"\"\"\"\"\"\n ofmy = Ea7F(ofmy)\n GjzC = ht2j.tensor([0, 1, 0], dtype=ht2j.float, device=begE).expand_as(ofmy)\n ikN8 = Ea7F(ht2j.cross(GjzC, ofmy, dim=-1))\n GjzC = Ea7F(ht2j.cross(ofmy, ikN8, dim=-1))\n bULF = ht2j.eye(4, device=begE).unsqueeze(0).repeat(ofmy...
[ "0.656684", "0.64433134", "0.6431393", "0.61653274", "0.61488014", "0.61158794", "0.60222054", "0.6007472", "0.60003954", "0.59789073", "0.5974462", "0.595589", "0.59053206", "0.58979625", "0.58119667", "0.57961875", "0.57760084", "0.5726807", "0.56944716", "0.5690399", "0.56...
0.63592356
3
Constructs a 4D homogeneous orthographic projection which takes the orthographic view volume in camera coordinates and projects points in the zdirection onto the view plane.
def UrT2(TVTK, H2v2, yzQ0=5, MKlR=5, exwG=0.01, eHNT=5): aQZR = oyIN.array([[2 / yzQ0, 0, 0, 0], [0, 2 / MKlR, 0, 0], [0, 0, 2 / (exwG - eHNT), -(exwG + eHNT) / (exwG - eHNT)], [0, 0, 0, 1]]) dP7o = oyIN.array([[TVTK / 2, 0, 0, (TVTK - 1) / 2], [0, H2v2 / 2, 0, (H2v2 - 1) / 2], [0, 0, 1, 0], [0, 0, 0, 1]]) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def HJVe(YKHO):\n MRLX, eJY7, Kd7Q, Tm7K, _zTI, Algd, BaTS, xOQL, lg4w, e42p, s2DS, zEvH, EXpf, Mv4x, N41D, LlaE = YKHO.mlist\n WKvO = lM1u(MRLX, _zTI, lg4w)\n LVAh = lM1u(eJY7, Algd, e42p)\n epBp = lM1u(Kd7Q, BaTS, s2DS)\n pMBr = WKvO.length()\n pMBr *= pMBr\n LVAh = LVAh - WKvO * LVAh / pMBr...
[ "0.703008", "0.6563406", "0.64877576", "0.6414314", "0.63702804", "0.626806", "0.61560285", "0.60030985", "0.59109914", "0.58733064", "0.5817149", "0.57849216", "0.578156", "0.5760139", "0.57500225", "0.57060647", "0.56950665", "0.56950665", "0.56950665", "0.5677936", "0.5675...
0.66393363
1
Removes tabs and newlines from string.
def f4S4(vIwR): return ''.join(ZbWC.split('\t+|\n+', vIwR))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bPnd(l5Ny):\n return l5Ny", "def Yczo(YKHO, vIwR):\n return ZbWC.sub('\\\\s+', ' ', vIwR).strip()", "def MNTu(FUjE: str) -> str:\n GveK = ''\n SGfD = xDSY.StringIO(FUjE)\n JXAE = SGfD.readline()\n while JXAE:\n tKz9 = JXAE.lstrip(' \\t')\n GveK += tKz9\n JXAE = SGfD.r...
[ "0.7131498", "0.6815469", "0.68133026", "0.67697644", "0.67097414", "0.66640854", "0.6655165", "0.66426", "0.6469221", "0.6413262", "0.64002585", "0.6316176", "0.6282253", "0.62691593", "0.62503856", "0.6229829", "0.6224153", "0.6211109", "0.6211109", "0.6199217", "0.61830556...
0.7090024
1
The number of seconds since the current time that the Timer object was created. If stop() was called, it is the number of seconds from the instance creation until stop() was called.
def N8Pq(YKHO): return YKHO.__last_time() - YKHO.__start
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def U4J1(YKHO):\n return YKHO.__stopped", "def C6wh(YKHO):\n Os4s = YKHO.end or rIAI.now()\n Aofo = Os4s - YKHO.start\n return Aofo.seconds", "def g3G6(YKHO) -> float:\n return YKHO.time_stop - YKHO.time_start", "def uvMl(YKHO):\n if YKHO._initial is None:\n E4N8('called span() on a ...
[ "0.7374453", "0.7228181", "0.7172592", "0.7143886", "0.71120405", "0.7111584", "0.7099551", "0.7083851", "0.7075201", "0.7041047", "0.70302045", "0.70089567", "0.70064896", "0.70007235", "0.69817567", "0.69696903", "0.69371533", "0.69265455", "0.6866689", "0.6861071", "0.6860...
0.6807719
29
Total elapsed time formatted into full time units, such as minutes, hours, days, and weeks. Merely for humanreadable convenience.
def ff8g(YKHO): D7KI = (('weeks', 604800), ('days', 86400), ('hours', 3600), ('mins', 60), ('secs', 1)) C6wh = YKHO.elapsed Aofo = [] for mWFP, UHFx in D7KI: BWXx = int(C6wh // UHFx) if BWXx: C6wh -= BWXx * UHFx if BWXx == 1: mWFP = mWFP.rstrip('s'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RnSk(YKHO):\n N8Pq = YKHO.__end_time - YKHO.__start_time\n PXGI = 'seconds'\n if N8Pq >= 3600:\n PXGI = 'minutes'\n Wave = N8Pq / 3600\n O66n = Wave % 60\n Wave = pBSp(Wave)\n print(YKHO.name, 'took', str(Wave), 'hours and', '{0:.2f}'.format(O66n), PXGI, 'to complete...
[ "0.7248333", "0.71959794", "0.70962316", "0.70399606", "0.7036604", "0.689992", "0.68363327", "0.679965", "0.674469", "0.66846013", "0.6675882", "0.6617891", "0.6611681", "0.6570431", "0.6543147", "0.6524653", "0.649252", "0.64885646", "0.647779", "0.6453928", "0.63972926", ...
0.7440106
0
Nicely format the elapsed time
def zAg0(YKHO): return str(YKHO.elapsed) + ' sec'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def e1_U(xwLr):\n return ITS7.strftime('%H:%M:%S', ITS7.gmtime(ITS7.perf_counter() - xwLr))", "def l0Us(YKHO):\n U4J1 = ITS7.time()\n JRmW = U4J1 - YKHO.start_time\n print(f'-- time elapsed: {JRmW:.5f} s', flush=True)", "def DvFO(YKHO) -> str:\n a1PO = YKHO.elapsed_time\n O66n = int(a1PO / 60...
[ "0.8056446", "0.761588", "0.7571828", "0.74103373", "0.73772144", "0.7280322", "0.7274481", "0.7256777", "0.7241627", "0.7139499", "0.71394044", "0.712192", "0.71147853", "0.7085338", "0.6965322", "0.68510187", "0.6800423", "0.6781992", "0.6763407", "0.6739775", "0.6739775", ...
0.78823423
1
Turn left or right, and update self.facing.
def q56S(YKHO, DWJ0): if DWJ0 == 'r': YKHO.facing += 1 else: YKHO.facing -= 1 if YKHO.facing > 3: YKHO.facing = YKHO.facing - 4 elif YKHO.facing < 0: YKHO.facing = YKHO.facing + 4
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nmwV(YKHO):\n YKHO.facing_direction -= YKHO.config\n if YKHO.facing_direction < 0:\n YKHO.facing_direction += 8\n YKHO.x, YKHO.y = YKHO.compute_positions()", "def SWXD(YKHO):\n if YKHO.facing == 0:\n YKHO.facing = 3\n YKHO.x -= YKHO.stepLeft\n elif YKHO.facing == 1:\n ...
[ "0.83907086", "0.78416497", "0.7721693", "0.7714201", "0.7560327", "0.74728197", "0.74133885", "0.7395737", "0.73637086", "0.7318562", "0.7317247", "0.7316994", "0.7266569", "0.7187408", "0.71710896", "0.7102229", "0.70881844", "0.70572394", "0.7041981", "0.7001698", "0.69212...
0.0
-1
Get the config for this program, returning a dict with the settings.
def wLv7(): UiCc = {'venv_command': 'virtualenv', 'venv_dir_name': 'python_env', 'debug': False} GPtr = {} bO6T = Hy7s.path.join(Hy7s.path.expanduser('~'), '.ashconfig') if Hy7s.path.exists(bO6T): Nu1S = open(bO6T, 'r') GPtr = qQXR.loads(Nu1S.read()) Nu1S.close() Aofo = UiCc....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tgzD(YKHO) -> cuzp[str, ImMB]:\n if YKHO.config is None:\n YKHO.config = YKHO.load_config()\n return YKHO.config", "def tgzD(YKHO) -> cuzp[str, ImMB]:\n if YKHO.config is None:\n YKHO.config = YKHO.load_config()\n return YKHO.config", "def eMhT(YKHO) -> dict:\n return YKHO.conf...
[ "0.7874162", "0.7874162", "0.7721656", "0.7705732", "0.7681489", "0.7639969", "0.75157416", "0.7498866", "0.746978", "0.746348", "0.74596083", "0.7454312", "0.74264735", "0.7420661", "0.73547137", "0.73503673", "0.7348374", "0.7323422", "0.7281526", "0.72723025", "0.72705215"...
0.7183027
29
Returns the sector for occupation
def gfr8(YKHO): return YKHO.sub_sector.sector
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gfr8(YKHO) -> str:\n return YKHO._sector", "def uy44(YKHO):\n bhRE = 'SECTOR'\n cYHW = ['Rank A: Real-Time Performance', 'Rank B: 1 Day Performance', 'Rank C: 5 Day Performance', 'Rank D: 1 Month Performance', 'Rank E: 3 Month Performance', 'Rank F: Year-to-Date (YTD) Performance', 'Rank G: 1 Year P...
[ "0.7832576", "0.6933661", "0.6229794", "0.6073522", "0.6045569", "0.6008484", "0.6003909", "0.5953048", "0.59001565", "0.58677125", "0.58618003", "0.5746578", "0.57450277", "0.57260764", "0.5676001", "0.561831", "0.5585232", "0.55805814", "0.5546895", "0.55357665", "0.5526631...
0.8010936
0
Get the last name.
def CCKR(mWFP): ZWCE = mWFP.split(' ') Kb69 = [ZWCE[-1]] for mWFP in reversed(ZWCE[:-1]): if mWFP[0] == mWFP[0].lower(): Kb69.append(mWFP) else: break return ' '.join(reversed(Kb69))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CCKR(YKHO) -> str:\n return YKHO.last_name", "def CCKR(YKHO):\n return YKHO._last_name", "def zp3f(YKHO):\n return YKHO._last_name", "def zp3f(YKHO):\n return YKHO._last_name", "def zp3f(YKHO):\n return YKHO._last_name", "def zp3f(YKHO):\n return YKHO._last_name", "def Tm8r(YKHO):...
[ "0.91555804", "0.91361827", "0.8858747", "0.8858747", "0.8858747", "0.8858747", "0.8841243", "0.8810566", "0.8767634", "0.87093616", "0.87093616", "0.87093616", "0.87093616", "0.87093616", "0.87020123", "0.8692867", "0.86670375", "0.86670375", "0.85378474", "0.84221745", "0.8...
0.7320188
74
Given a RGB list, it will return RGBA. Given a RGBA list, it will return the same RGBA.
def sIQN(qfpW: Color) -> K1MH: if len(qfpW) == 4: return YWvJ(K1MH, qfpW) elif len(qfpW) == 3: return (qfpW[0], qfpW[1], qfpW[2], 255) else: raise ValueError("This isn't a 3 or 4 byte color")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fRt4(F4JO):\n iaF0 = []\n jzdc = [0.5, 0.5, 0.6, 0.4, 0.3, 0.2]\n YRbF = 0\n for Z9rn in F4JO:\n iaF0.append(list(Jw9H.to_rgba(Z9rn)))\n iaF0[YRbF][3] = jzdc[YRbF]\n YRbF += 1\n return iaF0", "def Hdmd(YKHO, Mkmy, Oa1e, Fg_i):\n MKlR, KCHu, Ty9i = h478.rgb_to_hsv(Mkmy, ...
[ "0.73821336", "0.67090815", "0.66064924", "0.658714", "0.6526058", "0.6471333", "0.6413131", "0.63349825", "0.62323904", "0.62301177", "0.6216219", "0.6178115", "0.61683345", "0.614354", "0.6100281", "0.60829926", "0.6061172", "0.6057479", "0.60466146", "0.6018253", "0.599965...
0.58129615
33
Given a 3 or 4 RGB/RGBA color where each color goes 0255, this returns a RGBA tuple where each item is a scaled float from 0 to 1.
def EhCH(qfpW: Color) -> AzJI[float, float, float, float]: if len(qfpW) == 4: return (qfpW[0] / 255, qfpW[1] / 255, qfpW[2] / 255, qfpW[3] / 255) elif len(qfpW) == 3: return (qfpW[0] / 255, qfpW[1] / 255, qfpW[2] / 255, 1.0) else: raise ValueError("This isn't a 3 or 4 byte color")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kctv(qfpW: C3I) -> afeA:\n Mkmy, Oa1e, Fg_i = qfpW\n return (Mkmy / 255, Oa1e / 255, Fg_i / 255)", "def LyyR(WKvO):\n JDof = int(1000 * WKvO % 255)\n FdQZ = int(10000 * WKvO % 255)\n L_To = int(100000 * WKvO % 255)\n return (JDof, FdQZ, L_To)", "def OHiQ(WKvO, LVAh, epBp):\n d7Eb = oyI...
[ "0.71369964", "0.7089543", "0.70342153", "0.70069474", "0.69829077", "0.6957394", "0.6884102", "0.6754152", "0.6747241", "0.66614246", "0.66549826", "0.66485894", "0.6643773", "0.6641664", "0.6620446", "0.66188705", "0.66138583", "0.6580415", "0.6579433", "0.6558158", "0.6554...
0.7273119
0
Return a random sample of size elements from the set values with the specified probabilities
def Mzxq(hkxX, WErR, zNig): Pyrc = oyIN.add.accumulate(WErR) _0VL = oyIN.digitize(LYYN(zNig), Pyrc) mvm2 = [] for QyVM in _0VL: mvm2.append(_qLf(hkxX[QyVM])) return mvm2
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mvm2(BFeB):\n BFeB = BFeB / BFeB.sum()\n return oyIN.random.choice(oyIN.arange(len(BFeB)), p=BFeB.flatten())", "def mvm2(YKHO, WErR):\n return YKHO.sample_bernoulli(WErR)", "def rjMc(WErR, WJ3Z=oU0S):\n XP5J = oyIN.squeeze(WErR)\n XP5J[oyIN.argsort(XP5J)[:-WJ3Z]] = 0\n XP5J = XP5J / oyIN....
[ "0.773701", "0.7685272", "0.7265837", "0.70998913", "0.6991657", "0.6874625", "0.6835768", "0.6806354", "0.6799155", "0.67314327", "0.67314327", "0.67265946", "0.6653857", "0.66339856", "0.6592515", "0.6589461", "0.65481406", "0.65452516", "0.65274304", "0.651309", "0.6485539...
0.7155044
3
Should return a 400 when users do not exist
def AZyN(YKHO): vC92 = NqOl() nPrm = {'senderId': vC92.id, 'recipientId': 999, 'text': '...'} geh0 = YKHO.client.post(gxEw('messages:list'), content_type='application/json', data=nPrm) YKHO.assertEqual(400, geh0.status_code)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GUN5(YKHO):\n geh0 = YKHO.client.post(YKHO.url)\n F7cZ = 400\n YKHO.assertEqual(F7cZ, geh0.status_code)", "def smdM(YKHO):\n IMdO('neilb', 'neilb14@mailinator.com')\n with YKHO.client:\n geh0 = YKHO.client.get('/users/999')\n nPrm = qQXR.loads(geh0.data.decode())\n YKHO.as...
[ "0.76681226", "0.75198215", "0.73395085", "0.71774733", "0.7155559", "0.71433884", "0.71291727", "0.70543295", "0.70141894", "0.69891006", "0.69761795", "0.69621897", "0.6936803", "0.6925479", "0.68853277", "0.68737656", "0.68721706", "0.6866711", "0.68602943", "0.68190134", ...
0.0
-1
Returns `seq` as tuple or the singular element. Which is returned is determined by how the AttentionMechanism(s) were passed to the constructor.
def O1u1(YKHO, Q6uT): a1PO = tuple(Q6uT) if YKHO._is_multi: return a1PO else: return a1PO[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def O1u1(YKHO, Q6uT):\n a1PO = tuple(Q6uT)\n if YKHO._is_multi:\n return a1PO\n else:\n return a1PO[0]", "def mSt5(d7pR, n4z0=None):\n\n def _h7H(a1PO):\n if a1PO:\n if a1PO is tuple:\n return (d7pR,) if d7pR else tuple()\n elif a1PO is dict:\...
[ "0.6939912", "0.5811643", "0.5799722", "0.57843417", "0.5691608", "0.5684094", "0.5639943", "0.5623543", "0.5592669", "0.55210155", "0.54793924", "0.54213285", "0.5358898", "0.5354659", "0.533129", "0.533129", "0.533129", "0.533129", "0.533129", "0.533129", "0.533129", "0.5...
0.69283915
2
Helper function to turn all cells to the same value
def nzPU(Cs6h): usx6 = Cs6h.shape[0] WfCS = Cs6h.shape[1] for rdlD in range(usx6): for fvDH in range(WfCS): if Cs6h[rdlD, fvDH] != 1 and Cs6h[rdlD, fvDH] != 0: Cs6h[rdlD, fvDH] = 1 return Cs6h
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DFQW(YKHO, WKvO, LVAh):\n YKHO.cells[WKvO][LVAh] = 1 if not YKHO.cells[WKvO][LVAh] else 0", "def j6Nn(YKHO, BWXx):\n for rdlD in YKHO.rows:\n rdlD.set_values(BWXx)", "def bJxd(YKHO):\n str = []\n for Mkmy in YKHO.rows:\n for Z9rn in YKHO.cols:\n Ty9i = YKHO.values[Mkmy ...
[ "0.56222826", "0.5539462", "0.5469502", "0.5456232", "0.54366046", "0.5435179", "0.5418345", "0.5413742", "0.541372", "0.5346108", "0.5304557", "0.5287137", "0.5277188", "0.5259613", "0.52584255", "0.52323335", "0.5229255", "0.5216543", "0.513518", "0.51315093", "0.51315093",...
0.0
-1
Provides the root page
def d6pt(QePW): bo34 = G9jH.getLogger('dri.custom') C3ST = H3OA(QePW) bo34.info('request from %s' % C3ST['platform']) if QePW.user.is_authenticated(): C3ST['username'] = QePW.user.username else: C3ST['username'] = '__ANONYMOUS' return SGJU('frontend/m.html', C3ST, context_instanc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def I4Wu(YKHO) -> dM29:\n return YKHO._root_page", "def LIOs():\n return (TvZl('index.html'), 200)", "def tk5Y():\n return TvZl('root.html')", "def tk5Y():\n return TvZl('index.html')", "def tk5Y():\n return TvZl('index.html')", "def tk5Y():\n return TvZl('index.html')", "def tk5Y(YKH...
[ "0.849095", "0.83811444", "0.8245176", "0.80568844", "0.80568844", "0.80568844", "0.76346093", "0.7584435", "0.7513413", "0.74725497", "0.7437352", "0.74009526", "0.73994344", "0.73428357", "0.7320466", "0.72995067", "0.7297373", "0.728499", "0.7283204", "0.72448516", "0.7244...
0.0
-1
This extension indicates the suspected date/time the private key was compromised or the certificate became invalid. This would usually be before the revocation date, which is when the CA processed the revocation.
def sxVS(YKHO): if YKHO._processed_extensions is False: YKHO._set_extensions() return YKHO._invalidity_date_value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def HT9M(YKHO):\n _EYN = qcWV.datetime(2019, 1, 1, tzinfo=qcWV.timezone.utc)\n Ymu7 = qcWV.datetime(2019, 1, 2, tzinfo=qcWV.timezone.utc)\n H5ew = pe5E('user2', 'ldasfkk', 'Inactive', _EYN, Ymu7)\n with trZe.raises(AssertionError):\n H5ew.audit(5, 1, 1, 1)", "def ikAP(YKHO):\n U_bC = qcWV.n...
[ "0.5781822", "0.567098", "0.5645613", "0.5575619", "0.5365794", "0.5358108", "0.530108", "0.52100646", "0.5204799", "0.51714444", "0.5145594", "0.51134306", "0.51095545", "0.50828993", "0.5037756", "0.50318545", "0.49901834", "0.49711666", "0.49694875", "0.49510258", "0.49503...
0.47214004
56
Ensure a search is absent
def eHdN(mWFP, z39Z='splunk'): U5bT = {'name': mWFP, 'changes': {}, 'result': True, 'comment': '{} is absent.'.format(mWFP)} pan_ = PHIk['splunk_search.get'](mWFP, profile=z39Z) if pan_: if qqwM['test']: U5bT = {} U5bT['name'] = mWFP U5bT['comment'] = 'Would delet...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MX5V(YKHO):\n cjfR = []\n dixj = YKHO.searcher.search('asdasdasdas')\n YKHO.assertListEqual(dixj, cjfR)", "def dT75(Spoo):\n with trZe.raises(XdKQ):\n Spoo.search(location=None, query=None)", "def gl_2(YKHO):\n YKHO._raise_not_supported()", "def SdwW(YKHO):\n YKHO.strategy._is_se...
[ "0.7274467", "0.69201213", "0.6856707", "0.6780216", "0.6722034", "0.67181987", "0.66916144", "0.66897696", "0.6593837", "0.65421075", "0.6486469", "0.6433917", "0.6427549", "0.6419896", "0.6407969", "0.63993263", "0.6392781", "0.6368896", "0.6344802", "0.6343901", "0.6326062...
0.5536898
82
Returns an array of indices where the indices are computed such that indices[..., i + 1, ...] indices[..., i, ...] >= spacing instantaneous_period[..., i, ...] for all i. The returned indices do not contain the first spacing period and last spacing period indices. Here i is indexing the time_axis. Since the number of v...
def wV1I(F8ps, HHea=1, JRYC=1, _bvr=-1): m6JG = oyIN.ceil(HHea * (2 * oyIN.pi / F8ps * JRYC)).astype(int) _0VL = [oyIN.take(m6JG, 0, _bvr)] _0VL[-1][_0VL[-1] >= F8ps.shape[_bvr] - 1] = -1 while oyIN.any(_0VL[-1] >= 0): _0VL.append(_0VL[-1] + oyIN.take(m6JG, _0VL[-1], _bvr)) _0VL[-1][oyIN...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dLk7(Vk29, QTg7, _Yxk=True):\n if _Yxk:\n Vk29 = sV4M(Vk29)\n w4Sv = rLdf.period_range(Vk29[0], Vk29[-1], freq=QTg7)\n h3V3 = int(cGpL(Vk29))\n eN6L = int(FL1v(QTg7) / h3V3)\n HrDx = eN6L * 2\n W4LA = 0\n UMN4 = {}\n for pQ4c in w4Sv:\n ixQc = W4LA + HrDx\n bq90 = V...
[ "0.62710446", "0.5572225", "0.53506887", "0.5339127", "0.5328395", "0.5326511", "0.5269407", "0.52231854", "0.5222472", "0.52003497", "0.5142711", "0.5119126", "0.5116413", "0.5085673", "0.50808406", "0.49289274", "0.48887897", "0.48330262", "0.48299977", "0.48104307", "0.480...
0.8512424
0
Convert a list of sed pairs to a string for the sed command.
def bwrX(kgDL): Hamc = '; '.join(['s/%s/%s/g' % q2Xo for q2Xo in kgDL]) if kgDL: Hamc += ';' return Hamc
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def S5pY(oUZx):\n return ' '.join((N89E.quote(YRbF) for YRbF in oUZx))", "def _qeC(GTfc):\n ZWCE = [i7JJ(YRbF) for YRbF in zip(*GTfc)]\n return ', '.join(ZWCE)", "def Yn5r(YKHO, list):\n yAmx = '\\n'\n for YRbF in range(0, len(list)):\n if YRbF == len(list) - 1:\n yAmx += \"'\"...
[ "0.590633", "0.5718408", "0.5235378", "0.52312064", "0.5191583", "0.5184724", "0.5184099", "0.51792705", "0.51644224", "0.5142555", "0.5140919", "0.50996995", "0.50992095", "0.506604", "0.5050447", "0.4996769", "0.4983027", "0.4980119", "0.49611506", "0.4957372", "0.495534", ...
0.80745894
0
Return a string of length num_bytes, made of random bytes suitable for cryptographic use (because randomfloat draws from a os provided random source). WARNING If python implements float as a C single precision floating point number instead of a double precision then there will not be 53 bits of data in the coefficient.
def zFM9(j9v1, g92x=None): if g92x is None: g92x = MfZA() GTvk = '' for YB8B in range(j9v1 / 6 + 1): AhHL = int(g92x * 2 ** 53) AhHL = AhHL >> 5 tHZN = ZAvi(AhHL) if len(tHZN) < 6: tHZN = '\x00' * (6 - len(tHZN)) + tHZN GTvk += tHZN return GTvk...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def YlPx(mLGw):\n return XTiz.fromstring(Hy7s.urandom(mLGw), dtype=XTiz.uint8)", "def YlPx(ywwl):\n return jUs4.Random.get_random_bytes(ywwl)", "def gDz0(YKHO, j9v1: int) -> bytes:\n if j9v1 > 1024:\n bo34.warning('Requesting a large number of bytes. This may take a while: {num_bytes}')\n nP...
[ "0.66996133", "0.6584932", "0.65840244", "0.6543467", "0.64583164", "0.6288619", "0.5916267", "0.58964574", "0.58914614", "0.5891183", "0.58809507", "0.5829821", "0.58171844", "0.58127975", "0.5785366", "0.56840634", "0.5668295", "0.565096", "0.5643558", "0.5635315", "0.55740...
0.8050053
0
Return a list that has no duplicate items list_a The list to operate on TypeError if list_a is not a list. None. A list containing the unique items in list_a
def UwEG(iHrl): tisH = [] for ZfUD in iHrl: if ZfUD not in tisH: tisH.append(ZfUD) return tisH
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kcwm(IqQl):\n try:\n vaOw = []\n for WKvO in IqQl:\n if WKvO not in vaOw:\n vaOw.append(WKvO)\n return vaOw\n except TypeError as detail:\n return 'int object is not iterable'", "def ONhe(BDwY):\n return list(set(BDwY))", "def kcwm(Kt9y):\n ...
[ "0.7303466", "0.7286975", "0.71356225", "0.7121483", "0.711358", "0.7083522", "0.70649517", "0.69522727", "0.68819344", "0.6857622", "0.68518835", "0.6772112", "0.6742464", "0.6721509", "0.67207545", "0.66689694", "0.66335154", "0.6628316", "0.66202205", "0.6606312", "0.65833...
0.8459525
0
Encode a string to go in the query fragment of a URL.
def Lfdx(w95j, AaKD=''): if type(w95j) is not str: raise TypeError("urllib_quote_plus' inputstring parameter must be a string, not '" + str(type(w95j)) + "'") if type(AaKD) is not str: raise TypeError("urllib_quote_plus' safestring parameter must be a string, not '" + str(type(AaKD)) + "'") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OJc6(D3T3):\n return uRlK.parse.quote(D3T3, safe=\"%/:=&?~#+!$,;'@()*[]|\")", "def hLQ7(YKHO, l5Ny):\n try:\n return uRlK.quote(l5Ny.replace(u'and', u'&'), safe='').replace(u'%20', u'+')\n except:\n print('Using python3')\n return uRlK.parse.quote(l5Ny.replace(u'and', u'&'), saf...
[ "0.70569295", "0.70454586", "0.69930124", "0.68769807", "0.6838194", "0.67498964", "0.66761625", "0.6597267", "0.6576176", "0.6555812", "0.6551991", "0.650856", "0.6501401", "0.64935625", "0.6439764", "0.6439764", "0.6417391", "0.6368108", "0.6310636", "0.63014597", "0.627381...
0.0
-1
Unquote a urlencoded string.
def XZu5(w95j): if type(w95j) is not str: raise TypeError("urllib_unquote's inputstring parameter must be a string, not '" + str(type(w95j)) + "'") lg5p = '' while True: NBiO = w95j.rfind('%') if NBiO < 0: break qSOg = w95j[NBiO + 1:NBiO + 3] if len(qSOg) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tnoA(KCHu, tZ2K='utf-8'):\n return uRlK.unquote(KCHu).decode(tZ2K)", "def tnoA(zZcM, tZ2K='utf-8'):\n return uRlK.unquote(zZcM).decode(tZ2K)", "def sUVX(vIwR, p4k2='utf-8', UAju='replace', oV1P=''):\n im04 = oDGz(vIwR, oV1P)\n if p4k2 is not None:\n im04 = im04.decode(p4k2, UAju)\n re...
[ "0.82473546", "0.778585", "0.77454245", "0.74391717", "0.7417779", "0.7365394", "0.6996479", "0.69169354", "0.6908334", "0.6882838", "0.6852325", "0.6684939", "0.6674152", "0.6648583", "0.66089284", "0.6568208", "0.64435434", "0.63871217", "0.63474977", "0.62975204", "0.62915...
0.65503347
16
Unquote the urlencoded query fragment of a URL.
def vHxb(w95j): if type(w95j) is not str: raise TypeError("urllib_unquote_plus' inputstring parameter must be a string, not '" + str(type(w95j)) + "'") return XZu5(w95j.replace('+', ' '))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KVWQ(bD7m):\n GsJO = uRlK.parse.unquote(bD7m)\n return GsJO", "def MKos(YKHO, bD7m):\n if isinstance(bD7m, QMSQ):\n bD7m = bD7m.encode('utf-8')\n SQ3m = list(KVWQ.urlsplit(bD7m))\n if not SQ3m[3]:\n return bD7m\n xDcj = KVWQ.parse_qsl(SQ3m[3])\n xDcj = [vexM for vexM in xDc...
[ "0.6808747", "0.6630341", "0.65743923", "0.65590864", "0.6541089", "0.65012944", "0.6488638", "0.6437236", "0.6354556", "0.6348515", "0.6346561", "0.632208", "0.6321765", "0.63087386", "0.62827224", "0.6231945", "0.6185669", "0.6174215", "0.6159867", "0.6154405", "0.6104001",...
0.0
-1
Returns False for 'don't trust', None for 'use your discretion' and True for everything is okay. The second item in the return value is a list of reasons / justifications newsigneddata must contain full request by default, oldsigneddata must contain only the full previous request (for compatibility issues). if oldsigne...
def YLsQ(X8YX, uupw, odoG=None, rkFd=True): ZXk5 = [] if not gllk(uupw, odoG): ZXk5.append('Bad signature') return (False, ZXk5) _1d9, dV6Y, B2MI, d9lj, GB6N, jdrO = TVyQ(uupw) ZXk5 = ZXk5 + e8VP(uupw, odoG) if X8YX != None: if rkFd: RIwW, nxCo, oq0D, V8zq, mKFQ, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def El8L(hjAD, uupw, odoG=None):\n return YLsQ(hjAD, uupw, publickey=None, oldsigneddata_is_fullrequest=False)", "def CIBi(nPrm, njXK):\n if vpka:\n return True\n if YEKD(nPrm, njXK):\n return True\n return False", "def pyZy(YKHO):\n p0en, FgOS = YKHO._get_two_bundles(bundle1_incep...
[ "0.7777103", "0.53076535", "0.5171078", "0.50925547", "0.5047929", "0.5044387", "0.49383107", "0.49322924", "0.49233347", "0.49089885", "0.4890658", "0.48669547", "0.48355365", "0.48250213", "0.477888", "0.47549137", "0.47467527", "0.474322", "0.47350755", "0.47142226", "0.47...
0.7780654
0
Creates mapping from layer name to its index in the layers array.
def ROft(eVVj): F2lP = {} for YRbF, gEmA in enumerate(eVVj.layer): if gEmA.name in F2lP: raise AssertionError('Network should not have duplicate layer names') F2lP[gEmA.name] = YRbF return F2lP
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TTrE(nUeQ):\n ZWCE = {}\n for YRbF in range(len(nUeQ[0])):\n print(nUeQ[0][YRbF][0][0][0])\n ZWCE[nUeQ[0][YRbF][0][0][0][0]] = YRbF\n print('Success layer_index')\n return ZWCE", "def _A78(CeQK, lzjZ):\n for d6pt, bD7m in zip(range(len(CeQK.layers)), CeQK.layers):\n if lzj...
[ "0.68279344", "0.65490454", "0.6522157", "0.64500403", "0.62212235", "0.6023958", "0.59797055", "0.5969139", "0.5950468", "0.58173084", "0.5750115", "0.5750115", "0.5750115", "0.57330936", "0.5692017", "0.5664986", "0.5640263", "0.56366575", "0.5568411", "0.5563068", "0.55561...
0.5603997
18
Close the connection and reclaim to connection pool
def DDI8(YKHO): if getattr(YKHO, '_db', None): YKHO._db.close() YKHO._db = None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DDI8(YKHO):\n YKHO.conn.close()\n gigf.collect()", "def DDI8(YKHO):\n if YKHO._con is not None:\n YKHO._pool.returnConnection(YKHO._con)\n YKHO._con = None", "def HuIG(YKHO):\n MAqI.__pool__.pop(YKHO.id)\n YKHO.connected = False", "def mzWe(YKHO):\n if YKHO.connection:\n ...
[ "0.84006894", "0.8184836", "0.811713", "0.8027628", "0.78066635", "0.7768433", "0.77576584", "0.7756549", "0.7750243", "0.77219373", "0.7713075", "0.7708889", "0.7680378", "0.7677778", "0.76644766", "0.76640046", "0.7648282", "0.7648282", "0.7638025", "0.7627721", "0.7584692"...
0.0
-1
Test content view with an invalid url
def ueHs(YKHO): from .views import WikiViews QePW = kO5c.DummyRequest() QePW.POST = {'wiki_url': JY7R} GMe4 = WikiViews(QePW) U34r = GMe4.content() YKHO.assertTrue('error_message' in U34r)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NVIw(YKHO):\n i_PC = b9AL()\n QePW = i_PC.get('/downloads')\n P1dF = False\n try:\n geh0 = RCd1.download(QePW, 'fake_id')\n except:\n P1dF = True\n YKHO.assertTrue(P1dF)", "def n9_3(YKHO):\n from .views import WikiViews\n QePW = kO5c.DummyRequest()\n QePW.POST = {'wik...
[ "0.7461196", "0.7330342", "0.71264124", "0.6979722", "0.68899745", "0.68126285", "0.6792618", "0.67626464", "0.6703165", "0.66923916", "0.66893643", "0.6642208", "0.6637848", "0.6635446", "0.6605738", "0.65887916", "0.6510099", "0.6510099", "0.6510099", "0.6510099", "0.649673...
0.84053254
0
Retrieves podcast episodes by username.
def Lbka(NtEF, *, B2Dn=1): try: return uqiM(username=NtEF, page=B2Dn) except Bx6I.NotFound as exc: return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LZNr(bD7m, mWFP):\n for IGX5 in AEPt.get_podcast_episodes(bD7m):\n JBbi.add_item(IGX5['title'], 'play_podcast', IGX5['url'], extra_info=IGX5)", "def yHt6(YKHO, zZWi, **B2fa):\n U34r('Getting episodes for Nyaa/{}'.format(zZWi))\n if 'domain' not in YKHO.config or not YKHO.config['domain']:\n ...
[ "0.60400665", "0.6015998", "0.58328587", "0.5791422", "0.577275", "0.56913024", "0.56771183", "0.56032795", "0.55588555", "0.54486614", "0.54289275", "0.53564847", "0.5319116", "0.5303787", "0.5302216", "0.5298815", "0.52370447", "0.5230516", "0.5222261", "0.52210414", "0.521...
0.8410669
0
Update your policy. Behavior may differ based on what stage of training your in. If you're in training mode then you should check if you should update your network parameters based on the current step and the value you set for train_freq. Inside, you'll want to sample a minibatch, calculate the target values, update yo...
def PwnR(YKHO): hDWi = YKHO.replay_memory.sample(batch_size=32) UnZC = hDWi['current_state_samples'] DQcA = hDWi['next_state_samples'] e2xd = oyIN.zeros([1, 84, 84, 4]) e2xd[0, ...] = oyIN.dstack([mvm2.state for mvm2 in UnZC]) yBe5 = oyIN.zeros([1, 84, 84, 4]) yBe5[0, ...] = oyIN.dstack([mvm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lfe6(YKHO):\n tZht = tuKI.sample(YKHO.data_buffer, YKHO.batch_size)\n Pqjz = [nPrm[0] for nPrm in tZht]\n wYn6 = [nPrm[1] for nPrm in tZht]\n e33S = [nPrm[2] for nPrm in tZht]\n N77f, oqGu = YKHO.policy_value_net.train_step(Pqjz, wYn6, e33S, YKHO.learn_rate)\n return (N77f, oqGu)", "def Pwn...
[ "0.73503506", "0.7006701", "0.69865555", "0.68984425", "0.6843435", "0.6673789", "0.6540192", "0.6507718", "0.6493951", "0.6476405", "0.6395478", "0.6389557", "0.6325243", "0.6318873", "0.63146526", "0.6299186", "0.6290823", "0.6275576", "0.6273195", "0.62586766", "0.62358016...
0.6913679
3
Sets cost and capacity for the batteries.
def OjpK(YKHO): for YRbF, FefQ in enumerate(sorted(YKHO.batteries.values(), key=seET.attrgetter('weight'))): setattr(FefQ, 'cap', YKHO.caps[YKHO.big_iterations][YRbF]) if YKHO.caps[YKHO.big_iterations][YRbF] is 450: sSN_ = 900 elif YKHO.caps[YKHO.big_iterations][YRbF] is 900: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wG0n(YKHO):\n W0yv = YKHO.sam_sys_inputs['resource_potential'] / YKHO._RESOURCE_POTENTIAL_MULT * 1000\n VjeQ = YKHO.sam_sys_inputs.pop('capital_cost_per_kw', None)\n if VjeQ is not None:\n rFCz = VjeQ * W0yv\n bo34.debug('Setting the capital_cost to ${:,.2f}'.format(rFCz))\n YKHO....
[ "0.6384189", "0.63597924", "0.633854", "0.63364667", "0.6129922", "0.6119545", "0.6074736", "0.60039765", "0.59370995", "0.5867402", "0.5830723", "0.5813903", "0.57950574", "0.5731161", "0.57254714", "0.569206", "0.56478125", "0.5582783", "0.5543123", "0.5499928", "0.5497146"...
0.7383766
0
Integration test for the GradingPeriodsAPI.list_grading_periods_courses method.
def gopD(YKHO): S7Jr = None Mkmy = YKHO.client.list_grading_periods_courses(S7Jr)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def o32N(YKHO):\n Z31E = None\n Mkmy = YKHO.client.list_grading_periods_accounts(Z31E)", "def NQhL(YKHO):\n S7Jr = None\n id = None\n Mkmy = YKHO.client.delete_grading_period_courses(id, S7Jr)", "def C2Um(YKHO):\n QePW = YKHO.factory.get('/course/')\n QePW.user = YKHO.user\n Xyuk = FS5M...
[ "0.7108761", "0.7059082", "0.65951127", "0.6310765", "0.62711495", "0.6216145", "0.61631775", "0.59279877", "0.5824827", "0.5781228", "0.57209325", "0.56694126", "0.5661068", "0.5652117", "0.5602861", "0.5600922", "0.5556388", "0.5550436", "0.55304736", "0.55053717", "0.54378...
0.894887
0
Integration test for the GradingPeriodsAPI.update_single_grading_period method.
def hYpR(YKHO): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dRzy(YKHO):\n S7Jr = None\n id = None\n Mkmy = YKHO.client.get_single_grading_period(id, S7Jr)", "def ULd3(YKHO):\n YnnX = YKHO.test_period.status\n YKHO.test_period.status = 'FINALIZED'\n YKHO.test_period.save()\n hUXl = Y3EF.objects.filter(employer=YKHO.test_user_employer.profile.emplo...
[ "0.69845796", "0.6812234", "0.6412379", "0.6157303", "0.60062796", "0.5985099", "0.59689444", "0.5940228", "0.59345084", "0.5927067", "0.59146667", "0.59098744", "0.58964896", "0.58612126", "0.58491373", "0.58360356", "0.58297294", "0.5810597", "0.5799645", "0.57896626", "0.5...
0.8215607
0
Integration test for the GradingPeriodsAPI.delete_grading_period_courses method.
def NQhL(YKHO): S7Jr = None id = None Mkmy = YKHO.client.delete_grading_period_courses(id, S7Jr)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tXsU(YKHO):\n Z31E = None\n id = None\n Mkmy = YKHO.client.delete_grading_period_accounts(id, Z31E)", "def gopD(YKHO):\n S7Jr = None\n Mkmy = YKHO.client.list_grading_periods_courses(S7Jr)", "def aR6R(YKHO, P4t4, Jpbe):\n P4t4.admin.add_new_course()\n HvD9 = QbEj.random()\n P4t4.cou...
[ "0.75833064", "0.6909592", "0.6792736", "0.6424348", "0.64069575", "0.63611716", "0.6360712", "0.62079555", "0.61742896", "0.616665", "0.6148095", "0.6141553", "0.6101076", "0.60638005", "0.60261947", "0.5979559", "0.5968472", "0.5917169", "0.5835212", "0.5814243", "0.5801908...
0.8991518
0
Integration test for the GradingPeriodsAPI.delete_grading_period_accounts method.
def tXsU(YKHO): Z31E = None id = None Mkmy = YKHO.client.delete_grading_period_accounts(id, Z31E)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NQhL(YKHO):\n S7Jr = None\n id = None\n Mkmy = YKHO.client.delete_grading_period_courses(id, S7Jr)", "def o32N(YKHO):\n Z31E = None\n Mkmy = YKHO.client.list_grading_periods_accounts(Z31E)", "def qklH(YKHO):\n pass", "def ehEp(YKHO):\n with YKHO.client:\n YKHO.client.post(nKyW...
[ "0.7284307", "0.6545909", "0.64688987", "0.62764364", "0.6233528", "0.61143774", "0.6093314", "0.60529953", "0.5863081", "0.58551776", "0.5769698", "0.57656384", "0.5757938", "0.5757938", "0.5721929", "0.5716139", "0.5716139", "0.5685281", "0.56666476", "0.5658521", "0.561058...
0.896754
0
Get credentials api key from os environment. Set environment variable named 'DEVELOPER_KEY' and put the credentials api key there.
def _Kcn(): try: oh0P = Hy7s.environ['DEVELOPER_KEY'] except YFWX as e: raise YFWX("environment var 'DEVELOPER_KEY' not found.", tTpl) return oh0P
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def p7gc():\n if not Hy7s.getenv('SPOON_API_KEY'):\n raise RuntimeError('SPOON_API_KEY is not set')\n return Hy7s.getenv('SPOON_API_KEY')", "def rLF4():\n try:\n return Hy7s.environ['GOOGLE_APPLICATION_CREDENTIALS']\n except Exception:\n raise ryun()", "def rJDA():\n YK1n = ...
[ "0.7215546", "0.71962875", "0.71143264", "0.6951302", "0.6931595", "0.6837858", "0.6803877", "0.66552377", "0.6547555", "0.6501168", "0.64675975", "0.6458996", "0.6375849", "0.6327537", "0.63211334", "0.6292651", "0.62908393", "0.62860316", "0.6285024", "0.625393", "0.6235968...
0.79030865
0
Assumes myList is sorted. Returns closest value to myNumber. If two numbers are equally close, return the smallest number.
def hKxl(jzdc, exwG): oeNL = SPuy(jzdc, exwG) if oeNL == 0: return jzdc[0] if oeNL == len(jzdc): return jzdc[-1] h3Aq = jzdc[oeNL - 1] DOuq = jzdc[oeNL] if DOuq - exwG < exwG - h3Aq: return DOuq else: return h3Aq
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hr4Z(TEEK, a6IY):\n oeNL = SPuy(TEEK, a6IY)\n if oeNL == 0:\n return TEEK[0]\n if oeNL == len(TEEK):\n return TEEK[-1]\n h3Aq = TEEK[oeNL - 1]\n DOuq = TEEK[oeNL]\n if DOuq - a6IY < a6IY - h3Aq:\n return DOuq\n else:\n return h3Aq", "def hr4Z(TEEK, a6IY):\n ...
[ "0.8773548", "0.8521784", "0.76910925", "0.7655947", "0.72878736", "0.7014442", "0.6730663", "0.6696116", "0.6679095", "0.663801", "0.6608539", "0.6563781", "0.65589035", "0.64773256", "0.64609545", "0.64382815", "0.6437101", "0.6386349", "0.6370029", "0.63542634", "0.6332671...
0.64118
17
Calculate the Hamming distance between two strings
def Nff8(j93S, Nqp_): assert len(j93S) == len(Nqp_) return sum((dg7v != iYf1 for dg7v, iYf1 in zip(j93S, Nqp_)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RkO6(Y0Fj, Pb4f):\n mDfF = 0\n for YRbF, P8oC in enumerate(Y0Fj):\n if P8oC != Pb4f[YRbF]:\n mDfF += 1\n return mDfF", "def AIZO(Y0Fj, Pb4f):\n rV1i = 0\n JoWv = len(Y0Fj)\n for YRbF in range(JoWv):\n if Y0Fj[YRbF] != Pb4f[YRbF]:\n rV1i = rV1i + 1\n re...
[ "0.8766253", "0.8736932", "0.86937994", "0.8684328", "0.8628626", "0.85640013", "0.85608804", "0.84767383", "0.84472585", "0.8428427", "0.83657295", "0.8365521", "0.83173376", "0.83006084", "0.82374394", "0.8078711", "0.80054915", "0.8000618", "0.79753214", "0.7959728", "0.79...
0.7625429
31
Creates logger to debug HTTP messages sent and responses received. Output should be sent to Nammu's console.
def WWrj(YKHO): bo34 = G9jH.getLogger() bo34.setLevel(G9jH.DEBUG) VFGo = G9jH.getLogger('requests.packages.urllib3') VFGo.setLevel(G9jH.DEBUG) VFGo.propagate = True return (bo34, VFGo)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bo34(QePW):\n RKD7 = G9jH.getLogger()\n DXgd = G9jH.StreamHandler()\n FMLJ = '%(asctime)s %(name)s %(levelname)s %(message)s'\n uaPq = G9jH.Formatter(FMLJ)\n DXgd.setFormatter(uaPq)\n RKD7.addHandler(DXgd)\n RKD7.setLevel(G9jH.DEBUG)\n RKD7.propagate = False\n return RKD7", "def jj...
[ "0.6708473", "0.65318024", "0.6449779", "0.64493966", "0.64345473", "0.64054173", "0.6301283", "0.6279755", "0.6192836", "0.6174732", "0.6146249", "0.61042714", "0.6061431", "0.60521466", "0.60218453", "0.6017474", "0.6008965", "0.60064375", "0.5996023", "0.5985881", "0.59766...
0.6460974
2
Test case to check if self.new_project is instance of Project
def nLZM(YKHO): YKHO.assertIsInstance(YKHO.new_project, oPx1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def an91(YKHO):\n x7xt = YKHO.project_template.take_template()\n YKHO.assertTrue(x7xt)", "def qbG8(Emd4, bNKA):\n if bNKA is None:\n raise TypeError('Sequence.project can not be None')\n if not isinstance(bNKA, oPx1):\n raise TypeError('The project should be and instance of oyProjectMan...
[ "0.75852174", "0.73515385", "0.7276486", "0.7265314", "0.7023589", "0.7023589", "0.7023589", "0.7004742", "0.69663554", "0.69524276", "0.69516253", "0.69476146", "0.67799765", "0.6769305", "0.67472154", "0.6684736", "0.6669059", "0.6604833", "0.6603394", "0.6594571", "0.65931...
0.8792662
0
Test case to ckeck if class method returns queryset of projects by user
def bHOE(YKHO): YKHO.new_project.save() llaM = oPx1.find_by_user(YKHO.new_user) YKHO.assertTrue(len(llaM) > 0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def k66M(YKHO):\n NtEF = YKHO.kwargs['username']\n return FYrf.Projects.objects.filter(username=NtEF).order_by('-id')", "def k66M(YKHO):\n SR0I = oPx1.objects.filter(contributor__user=YKHO.request.user.pk)\n return SR0I", "def lNXo(YKHO):\n fWfN, lVLC, G1HK = YKHO.arrange_projects()\n G1HK.pr...
[ "0.7231784", "0.72082376", "0.68474317", "0.6800799", "0.6752884", "0.6723066", "0.67031246", "0.6607588", "0.66003174", "0.66003174", "0.65997124", "0.65997124", "0.65718985", "0.6555672", "0.6537444", "0.6522701", "0.6517143", "0.6494893", "0.64805347", "0.6463387", "0.6462...
0.6810093
3
Test to check if object is being added to database with proper properties
def _cTh(YKHO): Slbv = E1cg(project=YKHO.new_project, user=YKHO.new_user, design=7, usability=6, content=5, comment='This is a nice website.') Slbv.save() kSgn = E1cg.objects.all() YKHO.assertTrue(len(kSgn) > 0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CW30(YKHO):\n YKHO.obj.save()\n YKHO.assertEqual(1, YKHO.obj.id)", "def ivsc(YKHO):\n p9bx = A9W_()", "def lbuW(YKHO):\n mS46 = J0qS.objects.create(**YKHO.data)\n GMnr = FZ5p(mS46)\n YKHO.data['ministry'] = YKHO.data['ministry'].pk\n for H5ew in YKHO.data.keys():\n YKHO.assertEq...
[ "0.7054895", "0.6906998", "0.6674186", "0.66502666", "0.66105974", "0.6564696", "0.65618926", "0.6508318", "0.64905477", "0.6478231", "0.6461382", "0.6412122", "0.640414", "0.640281", "0.63942283", "0.63834023", "0.63717294", "0.636524", "0.63594687", "0.63376", "0.63342226",...
0.0
-1
Returns template path in current site's theme if it finds one there otherwise returns same path.
def nnNj(t_yv): t_yv = Hy7s.path.normpath(t_yv) w7QH = MNnE() if not w7QH: return t_yv qm1k = ZbWC.sub('^/+', '', t_yv) UhR0 = w7QH.template_path / qm1k SOoY = w7QH.path / 'templates' / qm1k if SOoY.exists(): return str(UhR0) else: return t_yv
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UhR0(YKHO):\n return YKHO.get_config('templates')", "def yBtA():\n l75P = Hy7s.path.abspath(GkAb(xAKo).parent)\n return l75P", "def sA4G(YKHO):\n if YKHO.template_name:\n return YKHO.template_name\n if GkAb('_templates/global/WaitPage.html').exists():\n return 'global/WaitPage....
[ "0.69739556", "0.690675", "0.6891636", "0.67688745", "0.67627597", "0.67404675", "0.6713622", "0.66970164", "0.6595784", "0.6573577", "0.6527588", "0.65024334", "0.64771044", "0.6465", "0.63946366", "0.62714314", "0.6190552", "0.61054933", "0.60886174", "0.6078952", "0.606936...
0.7382813
0
Return current site theme object. Returns None if theming is disabled.
def nPYB(): if not oZTz(): return None QePW = sZip() if not QePW: return None return getattr(QePW, 'site_theme', None)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MNnE():\n if not oZTz():\n return None\n ErsK = nPYB()\n if not ErsK:\n return None\n try:\n return BTxr(name=ErsK.theme_dir_name, theme_dir_name=ErsK.theme_dir_name, themes_base_dir=L8Q6(ErsK.theme_dir_name), project_root=DuOF())\n except ValueError as error:\n bo34....
[ "0.8250695", "0.76589316", "0.698671", "0.6760024", "0.6483215", "0.64658403", "0.64248043", "0.62334526", "0.60471624", "0.60143644", "0.59761035", "0.5924598", "0.5914873", "0.58678544", "0.57791895", "0.5741412", "0.5683378", "0.5650629", "0.5650629", "0.5630643", "0.55620...
0.84940505
0
Return current theme object. Returns None if theming is disabled.
def MNnE(): if not oZTz(): return None ErsK = nPYB() if not ErsK: return None try: return BTxr(name=ErsK.theme_dir_name, theme_dir_name=ErsK.theme_dir_name, themes_base_dir=L8Q6(ErsK.theme_dir_name), project_root=DuOF()) except ValueError as error: bo34.exception('The...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vk7f(YKHO) -> str:\n return YKHO.theme or YKHO.account.theme", "def nPYB():\n if not oZTz():\n return None\n QePW = sZip()\n if not QePW:\n return None\n return getattr(QePW, 'site_theme', None)", "def beMP(YKHO):\n return zkaO.find(YKHO.theme)", "def f4ot(ooxR):\n retu...
[ "0.7741704", "0.7685231", "0.70820934", "0.68839675", "0.6833027", "0.6743844", "0.66950154", "0.64078367", "0.6382941", "0.6276829", "0.59897673", "0.59424835", "0.58195364", "0.5774384", "0.5774384", "0.5738433", "0.562897", "0.55609053", "0.55376756", "0.54944664", "0.5469...
0.8076537
0
True if current request has an associated SiteTheme, False otherwise.
def dVq3(): QePW = sZip() ErsK = getattr(QePW, 'site_theme', None) return bool(ErsK and ErsK.id)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def r4At():\n return ky0N.is_site_configuration_enabled()", "def Djdv(yocm, yJtM=None):\n for w7QH in W52U(themes_dir=yJtM):\n if w7QH.theme_dir_name == yocm:\n return True\n return False", "def ltjQ(w7QH: str) -> bool:\n GmB3 = ['dark', 'light']\n return w7QH in GmB3", "def ...
[ "0.7778505", "0.64130974", "0.62077755", "0.6121127", "0.60960716", "0.58464235", "0.58065736", "0.5786061", "0.5771539", "0.5771321", "0.5749466", "0.57431406", "0.57415074", "0.56331855", "0.55992913", "0.55985594", "0.5565457", "0.55493623", "0.55429244", "0.5526863", "0.5...
0.89896756
0
Returns absolute path to the directory that contains the given theme.
def L8Q6(jfX6, O47r=False): for yJtM in j77b(): if jfX6 in wZOZ(yJtM): return yJtM if O47r: return None raise ValueError("Theme '{theme}' not found in any of the following themes dirs, \nTheme dirs: \n{dir}".format(theme=jfX6, dir=j77b()))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yBtA():\n T442 = pmON.abspath(pmON.dirname(pmON.dirname(xAKo)))\n return T442", "def yBtA():\n l75P = Hy7s.path.abspath(GkAb(xAKo).parent)\n return l75P", "def uA6t(Ux0P):\n if gCuF.value(pe5E.Theme) == h3vY.Light.value:\n return (d0De / h3vY.Light.value / Ux0P).as_posix()\n return...
[ "0.83916837", "0.8235648", "0.70113474", "0.669696", "0.66495794", "0.6554418", "0.6434663", "0.64265186", "0.64180124", "0.6410468", "0.63965416", "0.6377103", "0.63733345", "0.6372273", "0.63592577", "0.6358978", "0.63468796", "0.63225657", "0.6283258", "0.6261193", "0.6254...
0.6767352
3
Returns True if a theme exists with the specified name.
def Djdv(yocm, yJtM=None): for w7QH in W52U(themes_dir=yJtM): if w7QH.theme_dir_name == yocm: return True return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ltjQ(w7QH: str) -> bool:\n GmB3 = ['dark', 'light']\n return w7QH in GmB3", "def N6fg(khoC, w7QH):\n for dxhl in khoC:\n if dxhl.CARDTYPE == w7QH:\n return True\n return False", "def T2V7(YKHO, mWFP):\n for w7QH in YKHO.themes:\n if w7QH.get('name', 'Error') == mWFP:...
[ "0.69477934", "0.67651", "0.6572805", "0.6489543", "0.6396061", "0.6382874", "0.63825196", "0.63773435", "0.6372545", "0.6346465", "0.6249786", "0.61879647", "0.6182132", "0.6150977", "0.6105677", "0.6104482", "0.6089566", "0.6001367", "0.5999713", "0.5909561", "0.59078085", ...
0.8665631
0
Given a configuration setting name, try to get it from the site configuration and then fall back on the settings. If site_config_name is not specified then "name" is used as the key for both collections.
def mHJR(mWFP, qpDA=None, PGs9=None): from openedx.core.djangoapps.site_configuration.models import SiteConfiguration if PGs9 is None: PGs9 = mWFP if qpDA is None: qpDA = qtY4() csFD = None if qpDA is not None: try: csFD = getattr(qpDA, 'configuration', None) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ccBJ(YKHO, mWFP):\n for GPtr in YKHO._config:\n if mWFP in GPtr:\n return GPtr[mWFP]\n raise AttributeError('%s not found' % mWFP)", "def NMoC(Zu8l):\n if Zu8l.lower() in tFs8.__CONFIG__:\n return tFs8.__CONFIG__[Zu8l.lower()]", "def WQFC(Zu8l: str='production'):\n if Z...
[ "0.6901054", "0.68115896", "0.6794572", "0.67648077", "0.6377811", "0.6297295", "0.6231046", "0.6217044", "0.61751527", "0.6167867", "0.61327803", "0.6120906", "0.61104524", "0.6046321", "0.6042534", "0.59831536", "0.5971346", "0.58899873", "0.58101517", "0.57999504", "0.5782...
0.74300796
0
Create an empty queue.
def FIMM(YKHO): YKHO.head = None YKHO.tail = None YKHO.size = 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hWEK():\n return g5js(0, None, None)", "def _OiT():\n return g5js()", "def _OiT():\n return g5js()", "def MsSo(YKHO):\n gGq6 = pAjc()\n YKHO.assertTrue(gGq6.empty())\n YKHO.assertEqual(gGq6.size(), 0)", "def IrVo() -> g5js:\n return laXl.Queue()", "def W_VD(YKHO, **B2fa):\n mW...
[ "0.90226257", "0.8610326", "0.8610326", "0.7646727", "0.73392534", "0.7214641", "0.7142951", "0.6982411", "0.6858135", "0.68511164", "0.6781897", "0.6774313", "0.6763828", "0.6726111", "0.66783184", "0.6677383", "0.6663354", "0.6637819", "0.66147155", "0.65712017", "0.6567653...
0.0
-1
Returns an iterator over all pairs in the dictionary.
def BVGD(YKHO): for SWVv, wVlF in YKHO._forwardMap.iteritems(): for WtVX in wVlF: yield (SWVv, WtVX) return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gQA2(kgDL):\n if isinstance(kgDL, dict):\n return kgDL.iteritems()\n else:\n return kgDL", "def BVGD(YKHO):\n return iter(((TI8K.key, TI8K.value) for TI8K in YKHO.keyvaluepair_set.all()))", "def R2Yl(OxJJ):\n if isinstance(OxJJ, GySg):\n OxJJ = OxJJ.items()\n return iter...
[ "0.77233595", "0.76620656", "0.74234", "0.74155945", "0.73725754", "0.7356539", "0.7354709", "0.73396003", "0.7335147", "0.72835", "0.7276098", "0.71971494", "0.7170003", "0.7133238", "0.7117946", "0.71056044", "0.70852494", "0.7075732", "0.7063353", "0.7037241", "0.70282096"...
0.67448527
42
View function for home page of site.
def d6pt(QePW): KBgZ = CQpO.objects.filter(ta={MHTt.full_name}) QpfX = dict() return _1tc(QePW, 'index.html', QpfX)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kZiy(QePW):\n return _1tc(QePW, 'compta/home.html')", "def vja_(QePW):\n return _1tc(QePW, 'ez_main/home_page.html')", "def kZiy(QePW):\n return _1tc(QePW, 'home.html')", "def C_QL(QePW):\n return _1tc(QePW, 'core/homepage.html')", "def C_QL(QePW):\n return SGJU('h1ds_core/homepage.html'...
[ "0.8493426", "0.84268916", "0.83415145", "0.83306193", "0.82976943", "0.8295291", "0.8276345", "0.82545686", "0.82155704", "0.8132563", "0.81246215", "0.81224865", "0.8121264", "0.81049734", "0.8098485", "0.80935514", "0.80935514", "0.80935514", "0.80935514", "0.80935514", "0...
0.0
-1
Return the corresponding comorbidity age interval for a specific age.
def Br6G(YRbF): for or8S, jzdc in enumerate(D7KI): if YRbF >= jzdc[0] and YRbF < jzdc[1]: return or8S return or8S
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def E6cm(DkIV):\n from numpy import arange, append\n if DkIV in ['Lyon', 'Lyon10', 'Lyon19']:\n PWKZ = 10.0 ** arange(6.0, 10.1, 0.1)\n elif DkIV in ['DMESTAR', 'DSEP14', 'DSEP08', 'DSEP']:\n PWKZ = arange(1000000.0, 20000000.0, 100000.0)\n PWKZ = append(PWKZ, arange(20000000.0, 10010...
[ "0.6455693", "0.640271", "0.6327247", "0.6300604", "0.6205258", "0.60999656", "0.6064718", "0.59822494", "0.596171", "0.5887836", "0.5883653", "0.5843932", "0.5843125", "0.58104235", "0.58104235", "0.5768421", "0.57676464", "0.5740681", "0.57178587", "0.571724", "0.56994736",...
0.6703571
0
Returns redundant entity columns. Returns list List containing redundant entity columns.
def qhY0(YKHO): return YKHO.__redundant_entity_attributes
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def H0WS(YKHO):\n ZLJ_ = []\n tyNF = YKHO.__parent_table\n for fvDH in YKHO.__column_list:\n ZLJ_.append(tyNF.table_column(fvDH).title())\n return ZLJ_", "def ZLJ_(YKHO) -> x1iM[str]:\n return YKHO._columns.tolist()", "def ZLJ_(YKHO) -> x1iM[str]:\n return [iVRZ.name for iVRZ in YKHO.p...
[ "0.6134326", "0.6031242", "0.60053396", "0.5987721", "0.59580076", "0.5910951", "0.5909695", "0.5873988", "0.58475816", "0.58324593", "0.58288604", "0.58193094", "0.5802081", "0.5792087", "0.5784093", "0.5740437", "0.5739823", "0.5734095", "0.5687649", "0.5684333", "0.5678777...
0.6497619
0
Returns the current status of the data frame. Returns DataFrame DataFrame with current state.
def o4pG(YKHO): return YKHO.__df
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pO4N(YKHO) -> hxoQ:\n return YKHO.writer.getAllStatus()", "def jQ3Z(YKHO):\n return YKHO._df", "def bOBl(YKHO):\n return YKHO._df", "def bOBl(YKHO):\n return YKHO._dataframe", "def Xt58(YKHO, DHvX=False):\n if YKHO.status is None or DHvX:\n jQ3Z = CwDs.concat(YKHO._get_status_data...
[ "0.6795013", "0.64420336", "0.6418395", "0.6346773", "0.6232229", "0.6191857", "0.61263585", "0.60699", "0.60471743", "0.5843687", "0.5806156", "0.5800556", "0.5733715", "0.5730203", "0.57008666", "0.5679983", "0.5662189", "0.5662189", "0.5653932", "0.5636732", "0.56089634", ...
0.599845
9
Returns a dictionary with the original textual attribute as key and the new temporary non redundant entity attributes as values. Returns dict Dictionary with textual attributes and nonredundant entity attributes as values.
def cD5Q(YKHO): DLvs = YKHO.__config.get_textual_attributes() P6n8 = {} for Ep7l in DLvs: P6n8[Ep7l] = [xC3W for xC3W in YKHO.__non_redundant_entity_attributes if Ep7l in xC3W] return P6n8
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def h6gc(YKHO):\n qXTy = {}\n qXTy['s'] = str(YKHO.s)\n if YKHO.t != None:\n qXTy['t'] = str(YKHO.t)\n qXTy['a'] = str(YKHO.a)\n qXTy['b'] = str(YKHO.b)\n qXTy['c'] = str(YKHO.c)\n qXTy['d'] = str(YKHO.d)\n return qXTy", "def fC_d(YKHO):\n return YKHO.__non_redundant_entity_attr...
[ "0.61704963", "0.6125045", "0.6108884", "0.5915138", "0.5908417", "0.57849437", "0.56523573", "0.5651087", "0.55761325", "0.5536961", "0.55347776", "0.5526084", "0.55090594", "0.5499553", "0.54907674", "0.5489312", "0.54405063", "0.5412314", "0.53534317", "0.53508794", "0.534...
0.66483885
0
Create a measurespace (i.e. loglikelihood) graph for a random variable or a list of random variables at a given point. The input `var` determines which loglikelihood graph is used and `rv_value` is that graph's input parameter. For example, if `var` is the output of a ``NormalRV`` ``Op``, then the output is a graph of ...
def nRL5(SRYB: Union[TensorVariable, List[TensorVariable]], cAnn: Optional[Union[TensorVariable, Dict[TensorVariable, TensorVariable]]]=None, *, v8WM: bool=True, X6rE: bool=True, T4M1: bool=True, sum: bool=True, **B2fa) -> uLKX[DKnh, x1iM[DKnh]]: if not isinstance(SRYB, (list, tuple)): SRYB = [SRYB] if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def YXpD(JBMS=0.0, I8JS=1.0, ROpF=None, Wuyu=None, yDqo=None, OaeV=None):\n pImw = Qo4C(mean=JBMS, variance=I8JS, rand_gen=Wuyu, dtype=yDqo, ctx=OaeV)\n pImw._generate_outputs(shape=ROpF)\n return pImw.random_variable", "def g4Yp(YKHO, SRYB):\n with ZylS.name_scope('summaries'):\n JBMS = ZylS....
[ "0.5476776", "0.5175515", "0.5175515", "0.5171044", "0.5137063", "0.51322067", "0.5106136", "0.50240594", "0.50226885", "0.501719", "0.5003001", "0.5002476", "0.4997248", "0.49942818", "0.49888542", "0.49850997", "0.49850997", "0.49756703", "0.4967799", "0.49664396", "0.49441...
0.5551725
0
Get CEPH Service Config
def nfmH(mWFP): HCmI = 'ceph --admin-daemon %s/%s.asok config show' % (MEs9, mWFP) yvT9 = Yn3K.Popen(HCmI, shell=True, stdin=Yn3K.PIPE, stdout=Yn3K.PIPE, stderr=Yn3K.STDOUT) return qQXR.loads(yvT9.stdout.read())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def R09q():\n global _service_config\n if not dI4s:\n Mkmy = G4JS.get('https://tech.lds.org/mobile/ldstools/config.json')\n Mkmy.raise_for_status()\n dI4s = Mkmy.json()\n return dI4s", "def xP7V():\n return GBug()", "def tgzD():\n return X8Rg", "def tgzD(YKHO):\n if YKH...
[ "0.7256941", "0.70819736", "0.7079839", "0.7012895", "0.6980297", "0.6898995", "0.6852244", "0.6821273", "0.6810551", "0.6810551", "0.6810551", "0.6810551", "0.6810551", "0.6810551", "0.6810551", "0.6810551", "0.6810551", "0.6810551", "0.6810551", "0.6810551", "0.6810551", ...
0.666912
81
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order.
def _LTO(xYvp, pan_): for YRbF in range(len(xYvp)): print(YRbF, '= i -->', xYvp[YRbF]) for r845 in range(len(xYvp)): print(r845, '= j -->', xYvp[r845]) mxlQ = xYvp[YRbF] + xYvp[r845] print(str(pan_) + ' = ' + str(xYvp[YRbF] + xYvp[r845]) + ' ?') if pan...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zP3h(xYvp, pan_):\n _0VL = []\n YRbF = 0\n YIN2 = False\n while not YIN2:\n UKCN = xYvp[YRbF]\n for r845 in range(YRbF + 1, len(xYvp)):\n UKCN += xYvp[r845]\n if UKCN == pan_:\n YIN2 = True\n _0VL = [YRbF, r845]\n brea...
[ "0.86316645", "0.81819457", "0.81629694", "0.8010719", "0.79435533", "0.7934517", "0.78285635", "0.78203166", "0.7808818", "0.7787377", "0.7759948", "0.77566195", "0.77133876", "0.7684208", "0.76838756", "0.7665235", "0.75577307", "0.75416005", "0.7492591", "0.73422474", "0.7...
0.7448171
19
Get a single user by id.
async def get(YKHO, id: UUID4) -> h8nf[RRex]: CBIr = await YKHO.async_deta_base.get(key=id) return YKHO.user_db_model(**CBIr) if CBIr else None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bt8D(YKHO, id):\n return YKHO.users.get(id)", "def NMoC(id):\n return mv1M.query.filter_by(id=id).first()", "def NMoC(YKHO, id):\n try:\n H6Ho.logger.debug('We are getting the user: %d', id)\n return ud_Z.get(id)\n except AssertionError as e:\n WWEd.abort(400, tTpl.args[0],...
[ "0.8954462", "0.86967933", "0.86164325", "0.85865873", "0.8586173", "0.84648013", "0.84557533", "0.8447721", "0.8442431", "0.84335", "0.8426591", "0.8410328", "0.8351894", "0.8344186", "0.8327877", "0.8327877", "0.8327877", "0.8327877", "0.8324929", "0.83147055", "0.82802576"...
0.0
-1
Get a single user by OAuth account id.
async def get_by_oauth_account(YKHO, FeDH: str, Z31E: str) -> h8nf[RRex]: CBIr = await NmJ9(YKHO.async_deta_base.fetch, query={'oauth_accounts.oauth_name': FeDH, 'oauth_accounts.account_id': Z31E}) return YKHO.user_db_model(**CBIr) if CBIr else None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TKWP(YKHO, uJjO):\n JiCo = LC4A.objects.filter(user__id=uJjO)\n if JiCo.exists():\n return JiCo.get().user", "def TKWP(YKHO, uJjO):\n try:\n return tHSi.objects.get(pk=uJjO)\n except tHSi.DoesNotExist:\n return None", "def bt8D(uJjO):\n return mv1M.query.get(uJjO)", "d...
[ "0.78990144", "0.75036436", "0.7502418", "0.74207425", "0.74126434", "0.7410573", "0.7401202", "0.73905855", "0.73869073", "0.737774", "0.737774", "0.737774", "0.737774", "0.73652303", "0.73590463", "0.7332562", "0.7290661", "0.7287023", "0.7285151", "0.7280264", "0.7269433",...
0.72821635
19
Split the worked days as an string into an array
def ISII(YKHO, Mwbj): if Mwbj == '': return [] Sm0u = [] for Zrpu in Mwbj.split(','): CjKC = [Zrpu[0:2], Zrpu[2:len(Zrpu)]] Sm0u.append(CjKC) return Sm0u
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hfK9(CjKC):\n nPrm = X6a0(CjKC).read().split('\\n')\n return [geyT for geyT in nPrm if geyT != '']", "def kDCZ(vpR1) -> list:\n return vpR1[0].split()[0].strip('-').split('-')", "def PVGq(YKHO, q2HS):\n r7XA = []\n UGRy = ''\n for hG_r in q2HS:\n if hG_r == ',':\n r7XA.a...
[ "0.6648418", "0.6288119", "0.61545366", "0.60354996", "0.59857017", "0.5920627", "0.5824163", "0.5806444", "0.5792925", "0.578244", "0.5714562", "0.56184655", "0.5605369", "0.55613935", "0.5529067", "0.547354", "0.5420463", "0.53940874", "0.538898", "0.5358761", "0.53407276",...
0.80634594
0
Iterate through a list in multiple chunks
def xJ0H(OxJJ, zNig, WJBW=None): qIxc = [iter(OxJJ)] * zNig return [''.join(WKvO) for WKvO in Hs6x.izip_longest(*qIxc, fillvalue=WJBW)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yOAJ(list, ym_X):\n for YRbF in range(0, len(list), ym_X):\n yield list[YRbF:YRbF + ym_X]", "def eHxA(yv6U, ztRo):\n for YRbF in range(0, len(yv6U), ztRo):\n yield yv6U[YRbF:YRbF + ztRo]", "def eHxA(xpKR, fcYF):\n for YRbF in range(0, len(xpKR), fcYF):\n yield xpKR[YRbF:YRbF +...
[ "0.81664073", "0.810052", "0.80503684", "0.80203366", "0.7996954", "0.79826033", "0.7979943", "0.7976209", "0.79708964", "0.7959113", "0.7954191", "0.79157376", "0.7904584", "0.7904584", "0.7897952", "0.7887762", "0.7887762", "0.788602", "0.7858051", "0.78436494", "0.78436494...
0.0
-1
Randomizes the order of data samples and their corresponding labels
def rJrZ(WKvO, LVAh): cZDQ = oyIN.random.permutation(LVAh.shape[0]) roYN = WKvO[cZDQ, :, :, :] Z3m2 = LVAh[cZDQ] return (roYN, Z3m2)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rw6h(YKHO):\n tuKI.shuffle(YKHO.y_train)\n tuKI.shuffle(YKHO.y_test)", "def YJ7r(nPrm):\n UZ9m = oyIN.sum(nPrm[:, -1] == 0)\n JkOS = nPrm[:UZ9m, :]\n gAbH = nPrm[UZ9m:, :]\n oyIN.random.shuffle(JkOS)\n oyIN.random.shuffle(gAbH)\n return nPrm", "def BkuM(nPrm, Crrw):\n or8S = oyIN...
[ "0.7610801", "0.72624075", "0.71498376", "0.71094793", "0.7101863", "0.70504063", "0.6969117", "0.6969117", "0.6969117", "0.69373816", "0.69088066", "0.6856464", "0.6789744", "0.6737744", "0.6674642", "0.6634555", "0.6630403", "0.6464263", "0.6435945", "0.6421794", "0.6305728...
0.0
-1
Tear down the window session.
def xSHO(YKHO): for KnxT in YKHO.windows: try: YraM(KnxT) except: pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RzLK(YKHO):\n YKHO.window.destroy()", "def erK4(YKHO):\n YKHO.session.disconnect()", "def AKJg(YKHO):\n YKHO.window.destroy()", "def DDI8(YKHO):\n YKHO.__session.remove()", "def DDI8(YKHO):\n YKHO.__session.remove()", "def DDI8(YKHO):\n YKHO.__session.remove()", "def f06n(YKHO) ->...
[ "0.73034996", "0.7263202", "0.7217267", "0.7154314", "0.7154314", "0.7154314", "0.70164263", "0.6843533", "0.68324625", "0.6829453", "0.67816484", "0.67408234", "0.6740363", "0.6721897", "0.67135805", "0.67056537", "0.67029417", "0.66633534", "0.6647558", "0.6647521", "0.6646...
0.6328118
67
Convert a Queue to a list.
def cTzE(gGq6): Aofo = [] while gGq6.qsize() != 0: Aofo.append(gGq6.get()) return Aofo
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bRbZ(YKHO):\n Aofo = []\n if YKHO.error_msg_queue_list:\n za4t = YKHO.error_msg_queue_list\n YKHO.error_msg_queue_list = []\n Aofo = [str(WKvO) for WKvO in za4t]\n return Aofo", "def MKed(YKHO, gGq6):\n return gGq6.messages()", "def If3l(YKHO):\n return YKHO.manager.get_...
[ "0.70222294", "0.6944747", "0.66907656", "0.665576", "0.6544217", "0.638578", "0.63504744", "0.63187265", "0.63187265", "0.62840843", "0.62839043", "0.6254567", "0.61805385", "0.6165609", "0.6155708", "0.61456215", "0.6137522", "0.6112747", "0.6108668", "0.6105196", "0.610191...
0.86860883
0
Fill in default param for a rule given a partial rule definition.
def Q39L(CdGe): befk = {H5ew: wEf2['default'] for H5ew, wEf2 in IZQW().items() if wEf2['location'] == 'any'} for H5ew, BWXx in befk.items(): if H5ew not in CdGe.keys(): CdGe[H5ew] = BWXx return CdGe
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dmfL(YKHO):\n for XP5J in YKHO._pars:\n setattr(YKHO, XP5J, YKHO.defaultparval)", "def FIMM(YKHO, eD8c):\n c4EF.__init__(YKHO)\n YKHO.__rule = h8nf(FPQ3(eD8c))", "def hyCD(YKHO, KBgZ, PObu, h30B, H7ow, T6S7, hAad, muwo=None, QpfX=None):\n if not muwo:\n return T6S7\n for H5ew i...
[ "0.5781016", "0.5557155", "0.5505991", "0.5500387", "0.5500387", "0.54522306", "0.5444261", "0.54140323", "0.53261024", "0.5317271", "0.5316408", "0.530644", "0.5263163", "0.52280134", "0.52188456", "0.5197475", "0.5196096", "0.5186147", "0.5173087", "0.51632136", "0.515841",...
0.7940189
0
Applies network layers and ops on input image(s) x.
def KVH6(YKHO, WKvO): c7pe = list() hksT = list() Fv2L = list() for G1Hx in YKHO.vgg._modules.keys(): if int(G1Hx) < 23: WKvO = YKHO.vgg._modules[G1Hx].cuda()(WKvO) KCHu = YKHO.L2Norm(WKvO) c7pe.append(KCHu) for G1Hx in YKHO.vgg._modules.keys(): if int(G1Hx) >= 23...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def L4s3(g4y1):\n return jX85(ZylS.sigmoid(jX85(g4y1, 64)), 1)", "def KVH6(YKHO, WKvO):\n for e4Jv in YKHO.task_module_name_path[YKHO.task_idx]:\n for gEmA in YKHO.task_modules[e4Jv]:\n WKvO = gEmA(WKvO)\n WKvO = WKvO.view(WKvO.size(0), -1)\n WKvO = YKHO.classification_layers[str(YK...
[ "0.65635645", "0.6369926", "0.6366342", "0.6353145", "0.6308525", "0.63080144", "0.6259044", "0.6207936", "0.61983746", "0.6192247", "0.6176785", "0.6163958", "0.61539495", "0.61442596", "0.61295325", "0.61276245", "0.6121304", "0.6115892", "0.61109567", "0.60991436", "0.6084...
0.0
-1
Fluorescence cross section function, `function` Returns a function of energy which returns the elemental cross section in cm2/g
def gtI8(YKHO): def T9Vn(OMef): return W37s(YKHO.Z, 'cs', OMef) return T9Vn
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Udnf(ut5U):\n Nq1b = gtI8 * oyIN.exp(-0.03 * ut5U)\n if ut5U > 400.0:\n Nq1b += gtI8 * oyIN.exp(-0.0066 * (ut5U - 400.0)) / 10.0\n return Nq1b", "def Udnf(SGf8, ut5U, q7In):\n\n def b7Yg(SGf8, ut5U, q7In):\n \"\"\"\n Return the parameter beta (formula 4 from Gould's article)\...
[ "0.65644467", "0.5691869", "0.55853605", "0.5571941", "0.5571941", "0.5555193", "0.53263503", "0.5190169", "0.51374584", "0.513654", "0.5133756", "0.51214474", "0.5094073", "0.5086819", "0.5074784", "0.5039325", "0.50341415", "0.50233346", "0.5006225", "0.50015736", "0.499206...
0.56669295
2
Find elements which have an emission line near an energy This function returns a dict keyed on element type of all elements that have an emission line with in `delta_e` of `line_e` at the given xray energy.
def sHtZ(llU9, ppNV, OMef, GDUz=None): if jz1G is None: raise mLMe(__name__) if GDUz is None: GDUz = range(1, 101) M1i2 = [pfED(ZfUD) for ZfUD in GDUz] I5tT = [tTpl.line_near(llU9, ppNV, OMef) for tTpl in M1i2] R8cc = dict() for tTpl, Nqlg in zip(M1i2, I5tT): if Nqlg: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def XBGl(YKHO, VYvU, ppNV, OMef):\n R8cc = dict()\n for G1Hx, Ty9i in jKi7.iteritems(YKHO.emission_line):\n if YKHO.cs(OMef)[G1Hx] == 0:\n continue\n if oyIN.abs(Ty9i - VYvU) < ppNV:\n R8cc[G1Hx] = Ty9i\n return R8cc", "def nBob(U6D_, cy0R, CKLA, BsL4=0.0001, laVC=Non...
[ "0.6890566", "0.51864946", "0.49466994", "0.49238998", "0.47822753", "0.47082967", "0.46743", "0.46268553", "0.45890433", "0.45606878", "0.45431775", "0.4514429", "0.45028222", "0.44868082", "0.44705603", "0.44673014", "0.44085833", "0.4383042", "0.4361299", "0.43463412", "0....
0.8064524
0
Returns true if both objects are equal
def xa14(YKHO, Elif): if not isinstance(Elif, vJc7): return False return YKHO.__dict__ == Elif.__dict__
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)", "def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)", "def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False", "def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", ...
0.0
-1
Returns true if both objects are not equal
def Vdqg(YKHO, Elif): return not YKHO == Elif
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True", "def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)", "def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)", "def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)", ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748" ]
0.0
-1
Get the time in seconds and microseconds.
def YdbC(): return m_eh(ITS7.time())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sKhq(YKHO):\n return YKHO._micros / 1000000.0", "def g9FU(YKHO):\n return YKHO._microsecond", "def m7L9(Emd4):\n wzkt = sQC5.Time.now()\n return wzkt.secs + wzkt.nsecs * 10 ** (-9)", "def O3L6():\n return int(round(ITS7.time() * 1000))", "def m7L9(YKHO) -> float:\n raise NotImplemente...
[ "0.7895765", "0.75350016", "0.74273354", "0.73904186", "0.7366115", "0.7243987", "0.72425616", "0.71470034", "0.71042734", "0.71008086", "0.7083687", "0.70560974", "0.70560974", "0.70560974", "0.70560974", "0.70560974", "0.70560974", "0.70496255", "0.7018299", "0.70106393", "...
0.6662191
53
Get the appkit event type of the event.
def aihU(tvqc): return tvqc.type()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hEKL(YKHO) -> int:\n return YKHO.data['args']['eventType']", "def FRul(YKHO):\n return YKHO.event_type", "def hEKL(YKHO) -> str:\n try:\n return wm1p.get(YKHO.transaction_event_code[0:3])\n except:\n return None", "def Cu0P(YKHO, orYi: dict):\n return orYi[JH6t]", "def type...
[ "0.84248817", "0.83605343", "0.8161515", "0.8114217", "0.7923565", "0.7861213", "0.7588584", "0.7536384", "0.74696636", "0.74315625", "0.73658353", "0.7169431", "0.7106793", "0.6859244", "0.6796005", "0.6721282", "0.66380686", "0.66108805", "0.66065896", "0.65558887", "0.6545...
0.8807509
1
Get the event type.
def aihU(tvqc): return tvqc.type()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FRul(YKHO):\n return YKHO.event_type", "def hEKL(YKHO) -> int:\n return YKHO.data['args']['eventType']", "def type(YKHO) -> str:\n return YKHO._event.get('type')", "def hEKL(YKHO) -> str:\n try:\n return wm1p.get(YKHO.transaction_event_code[0:3])\n except:\n return None", "...
[ "0.8985169", "0.8467276", "0.8374562", "0.8228404", "0.8068962", "0.802744", "0.7702575", "0.766007", "0.7643432", "0.74538356", "0.7443508", "0.7407904", "0.7091386", "0.69636214", "0.6895881", "0.68893313", "0.6873978", "0.68543404", "0.6805979", "0.680286", "0.6761327", ...
0.89203256
1
Return a zero or one for each bit of a numeric value up to the most significant 1 bit, beginning with the least significant bit.
def vpJN(FGW3): FGW3 = int(FGW3) while FGW3: yield (FGW3 & 1) FGW3 >>= 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nVyT(WKvO, exwG):\n return WKvO & pSfY(exwG)", "def Y83U(WKvO):\n return WKvO & -WKvO", "def oJjO(WKvO):\n return ~WKvO & WKvO + 1", "def bxd7(WKvO):\n return WKvO & WKvO - 1", "def fOxX(YKHO, BWXx):\n d6pt = 1\n while BWXx & 1 != 0:\n BWXx >>= 1\n d6pt += 1\n return ...
[ "0.7218882", "0.69481397", "0.6945783", "0.6882493", "0.6849647", "0.675651", "0.66885346", "0.6685206", "0.66657835", "0.66390216", "0.65522075", "0.6494297", "0.6474149", "0.6472726", "0.64550006", "0.6412663", "0.6372257", "0.63607484", "0.63521326", "0.63506055", "0.63250...
0.6480956
12
Turn the light off.
def l4XF(YKHO): YKHO._make_event(0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Z_rv(YKHO):\n xi8C.output(YKHO.gpio, False)", "def V8X5(YKHO):\n YKHO.turnOff()", "def fnTm(YKHO):\n YKHO._light = 'OFF'", "def Z_rv(YKHO, **B2fa):\n YKHO._light.set_color(0, 0, 0, 0)", "def fnTm(YKHO):\n YKHO._light = 'OFF'", "def Z_rv(YKHO, **B2fa: Any) -> None:\n YKHO._light.turn...
[ "0.9158525", "0.88893706", "0.88740003", "0.8852116", "0.8842971", "0.87965184", "0.864986", "0.85981315", "0.85843927", "0.85641575", "0.8526551", "0.8403609", "0.83990663", "0.8292084", "0.8271316", "0.82411224", "0.81950665", "0.8189084", "0.8162265", "0.8066985", "0.80102...
0.0
-1
Get the string name of the event.
def TEqX(YKHO, RUfL, Wxnj): if DYWq and RUfL == 'Key': try: Wxnj = YKHO.codes['wincodes'][Wxnj] except KeyError: pass try: return YKHO.codes[RUfL][Wxnj] except KeyError: raise L5j_("We don't know this event.", RUfL, Wxnj)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jkf2(YKHO):\n return YKHO._event_name", "def jkf2(YKHO):\n return dict.get(YKHO, 'event_name', None)", "def Q0HP(YKHO):\n return _VfD.Event_getName(YKHO)", "def Xq1e(YKHO):\n return YKHO.event_name", "def uLFj(YKHO):\n return _VfD.Event_getElementName(YKHO)", "def A5OS(YKHO, hEKL):\n ...
[ "0.8904927", "0.8853775", "0.8540532", "0.801993", "0.7489496", "0.7468177", "0.74679106", "0.74555635", "0.73820114", "0.7365086", "0.728913", "0.72624433", "0.7248294", "0.71927416", "0.71927416", "0.7141618", "0.7141618", "0.713293", "0.7107651", "0.7098852", "0.7098852", ...
0.0
-1