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
Dummy batchnorm node to test out the epsilon attribute.
def XKCu(_hZ2): OKpq = BlLG.helper.make_node('BatchNormalization', inputs=['x', 's', 'bias', 'mean', 'var'], outputs=['y'], epsilon=_hZ2) WKvO = BlLG.helper.make_tensor_value_info('x', BlLG.TensorProto.FLOAT, [1, 3, 5, 5]) KCHu = BlLG.helper.make_tensor_value_info('s', BlLG.TensorProto.FLOAT, [3]) oug5 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _VtR():\n hejS = oyIN.array([2])\n REV8 = oyIN.array([4])\n F2Ej = 10\n d3gB = oyIN.ceil(F2Ej / hejS.astype(float)).astype(int)\n Lu13 = REV8 // 2 + 1\n jnJ0 = d3gB * Lu13\n rVnq = AxtZ(REV8, hejS, jnJ0, F2Ej)\n fuBA = oyIN.zeros((d3gB * Lu13).item())\n tz_r = 0.03\n eYzO(u8tG(fuB...
[ "0.6329374", "0.6322482", "0.62643915", "0.61873496", "0.6078735", "0.60601515", "0.6038859", "0.60074395", "0.5996199", "0.5992439", "0.59778684", "0.5967285", "0.59650326", "0.5943957", "0.59239453", "0.59143305", "0.58948165", "0.5884885", "0.588173", "0.5868323", "0.58671...
0.6273767
2
Cursor moves to the previous ocurrence of a character.
def Z4tJ(crAz): b8V_, DbIN, bx_5, ty0B, gJd6 = crAz bx_5.go_to_line(2) bx_5.moveCursor(FT5P.StartOfLine, FT5P.KeepAnchor) gJd6.keyPress(bx_5, uaAZ.Key_Right) gJd6.keyPress(bx_5, uaAZ.Key_Right) e3hl = ty0B.get_focus_widget() zFiD, fvDH = bx_5.get_cursor_line_column() gJd6.keyClicks(e3hl,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ucSA(YKHO):\n YKHO.pos -= 1\n if YKHO.pos < 0:\n YKHO.current_char = None\n else:\n YKHO.current_char = YKHO.text[YKHO.pos]", "def i7pc(YKHO, tvqc=None):\n YKHO.cursor.toPreviousWord()", "def ucSA(YKHO):\n YKHO._pos += 1\n if YKHO._pos > len(YKHO.text) - 1:\n YKHO.cur...
[ "0.76961696", "0.7634841", "0.7467467", "0.73928535", "0.73928535", "0.72467744", "0.72010833", "0.72010833", "0.72010833", "0.72010833", "0.72010833", "0.7167895", "0.70193195", "0.689628", "0.68571246", "0.683426", "0.6789373", "0.6722689", "0.6720881", "0.6710608", "0.6611...
0.0
-1
Cursor moves to the previous ocurrence of a character.
def qtFZ(crAz): b8V_, DbIN, bx_5, ty0B, gJd6 = crAz bx_5.stdkey_backspace() bx_5.go_to_line(3) bx_5.moveCursor(FT5P.StartOfLine, FT5P.KeepAnchor) e3hl = ty0B.get_focus_widget() gJd6.keyClicks(e3hl, '10l') gJd6.keyClicks(e3hl, 'v') gJd6.keyClicks(e3hl, 'F') gJd6.keyClicks(e3hl, 'e') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ucSA(YKHO):\n YKHO.pos -= 1\n if YKHO.pos < 0:\n YKHO.current_char = None\n else:\n YKHO.current_char = YKHO.text[YKHO.pos]", "def i7pc(YKHO, tvqc=None):\n YKHO.cursor.toPreviousWord()", "def ucSA(YKHO):\n YKHO._pos += 1\n if YKHO._pos > len(YKHO.text) - 1:\n YKHO.cur...
[ "0.76967084", "0.7636189", "0.7467923", "0.7393872", "0.7393872", "0.7247236", "0.7201521", "0.7201521", "0.7201521", "0.7201521", "0.7201521", "0.7168381", "0.7019652", "0.68964565", "0.6857629", "0.68341756", "0.67897403", "0.6724013", "0.67213666", "0.6711606", "0.66108924...
0.0
-1
Estimate advantage using critic and rewards.
def NkNL(YKHO, NRcB: Memory) -> ht2j.tensor: W061 = NRcB.norm_obs with ht2j.no_grad(): tC3d = YKHO.calculate_q_val(NRcB) ft8x = YKHO.critic(W061) T5Tw = tC3d - ft8x.squeeze() return T5Tw
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vutX(YKHO, NRcB: Memory):\n W061 = NRcB.norm_obs\n YFaX = NRcB.norm_next_obs\n vOGg = ht2j.tensor(NRcB.rewards, dtype=ht2j.float32, device=YKHO.device)\n _ins = ht2j.tensor(NRcB.done, dtype=ht2j.float32, device=YKHO.device)\n YKHO.loss['critic'] = 0.0\n for bGrB in range(YKHO.critic_num_targe...
[ "0.68419117", "0.67399645", "0.67301714", "0.6679594", "0.6660559", "0.66158986", "0.6506489", "0.6480352", "0.6450226", "0.6418204", "0.6398243", "0.6367814", "0.6347486", "0.6323217", "0.63213027", "0.6319808", "0.63099974", "0.6305297", "0.630445", "0.6291476", "0.6255259"...
0.0
-1
Get a specific analysis_grid object
def KxTn(qxeD): return 'do some magic!'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yGgQ(YKHO, xNnA):\n if xNnA not in YKHO.__grid:\n raise ValueError('Could not find grid %s' % xNnA)\n return YKHO.__grid[xNnA]", "def yGgQ(YKHO):\n return YKHO.data", "def yGgQ(QpfX, CGRu):\n HEjw = QpfX.scene.sprytile_mats\n for H71B in HEjw:\n for Cs6h in H71B.grids:\n ...
[ "0.6912744", "0.66163504", "0.6588512", "0.65785915", "0.6573132", "0.65218455", "0.65218455", "0.65218455", "0.62571526", "0.6246874", "0.6159387", "0.6112117", "0.6112117", "0.6112117", "0.6112117", "0.60860515", "0.6031625", "0.60231113", "0.6019427", "0.5959", "0.59528387...
0.0
-1
Gets the pull requests for the given repository.
def k8Im(qsJ6, boHx): return NMoC('/repos/{0}/{1}/pulls'.format(qsJ6, boHx))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ZUb8(YKHO):\n return YKHO.git.get_organization(YKHO.repository).get_repo(YKHO.project).get_pulls()", "def x6NH(YKHO, wbiw, RDp6):\n return list(YKHO.repos[wbiw][RDp6].get_pulls())", "def k8Im(qsJ6, boHx, NArs, Jpbe):\n bD7m = ''.join([Jp8J, qsJ6, '/', boHx, '/pulls'])\n return SHut(bD7m, NArs, ...
[ "0.7847218", "0.77176946", "0.7705121", "0.7182902", "0.700963", "0.6918799", "0.68604755", "0.6802282", "0.67384696", "0.66221875", "0.64239347", "0.6387844", "0.63545114", "0.63320035", "0.6323523", "0.62024814", "0.61718273", "0.6167748", "0.61271185", "0.6124618", "0.6100...
0.78344584
1
Use this helper functon to flatten a dict holding API response data and namespace the attributes.
def TqeK(Csk6) -> x1iM[cuzp]: def lHli(H5ew, wEf2): if isinstance(wEf2, dict): return [(H5ew + '.' + G1Hx, Ty9i) for G1Hx, Ty9i in TqeK(wEf2).items()] else: return [(H5ew, wEf2)] DumB = [ZfUD for G1Hx, Ty9i in Csk6.items() for ZfUD in lHli(G1Hx, Ty9i)] return dict(Du...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KxGb(YKHO, nPrm, VWe_=':', r7XA=False):\n hlel = []\n for ZfUD in nPrm:\n hlel.append(YKHO.flatten_dict(ZfUD, sep=VWe_, pretty=r7XA))\n return hlel", "def qnkS(YKHO):\n\n def MKPt(xPYE, m07n):\n \"\"\"\n Flatten the object if possible, else just add the object to the dict...
[ "0.64124113", "0.62401205", "0.61551833", "0.6081509", "0.6061665", "0.60387003", "0.60285455", "0.6011523", "0.5997874", "0.59184736", "0.58491164", "0.58072954", "0.580369", "0.5735631", "0.5725182", "0.57087916", "0.56978303", "0.5689437", "0.56650996", "0.56494623", "0.56...
0.0
-1
Writes assets to assets.csv Any attributes you add to the headers list will automatically be written to the CSV The API returns many attributes so familiarize with the response data!
def qr_6(upa_: List[Dict], Ux0P: str) -> None: MOPg = ['id', 'name', 'type', 'inserted_at', 'item_count', 'comment_count', 'filesize', 'shared', 'private', 'versions', 'parent_id', 'project_name', 'project_id', 'team_name', 'creator.name', 'creator.email'] Rf06 = [] for jzdc in upa_: Rf06.append(Tqe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _FRv(YKHO):\n rdlD = {'header1': 'foo', 'header2': 'bar'}\n YKHO.csv_helper.write(rdlD)\n YKHO.csv_helper.file.close()", "def GisS(YKHO, YQs6):\n ZLJ_ = YKHO.context.restrictedTraverse('columns_view').ordered\n jVe6 = m6_J.writer(YKHO.request.response, **YKHO._get_fmtparam())\n jVe6.writero...
[ "0.63713896", "0.6269015", "0.62686706", "0.6235473", "0.6208718", "0.61582905", "0.6145254", "0.61402756", "0.61272347", "0.61272347", "0.60908026", "0.6076068", "0.6060218", "0.60319436", "0.60273844", "0.6002379", "0.60019135", "0.59877294", "0.59875906", "0.59707034", "0....
0.7102722
0
Return an ordered list of indices. Batches will be constructed based on this order.
def oKXt(YKHO): if YKHO.shuffle: _0VL = oyIN.random.permutation(len(YKHO)) else: _0VL = oyIN.arange(len(YKHO)) if YKHO.tgt_sizes is not None: _0VL = _0VL[oyIN.argsort(YKHO.tgt_sizes[_0VL], kind='mergesort')] return _0VL[oyIN.argsort(YKHO.src_sizes[_0VL], kind='mergesort')]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oKXt(YKHO):\n if YKHO._ordered_indices is None:\n YKHO._ordered_indices = U8Lr([(H5ew, __n6.ordered_indices()) for H5ew, __n6 in YKHO.datasets.items()])\n return oyIN.arange(len(YKHO))", "def _0VL(YKHO):\n return sorted(YKHO.__indices.keys())", "def oKXt(YKHO):\n if YKHO.shuffle:\n ...
[ "0.7721245", "0.76368505", "0.7606505", "0.7606505", "0.7463237", "0.7423176", "0.7378751", "0.7377872", "0.73498243", "0.7307816", "0.7303942", "0.72898304", "0.726318", "0.72431284", "0.72234374", "0.71863836", "0.7178673", "0.71652013", "0.7164776", "0.7135735", "0.7089640...
0.67610073
38
Creates rotation matrix fromEuler angles.
def aE9r(zbxI: float, lR5V: float, oUfG: float) -> oyIN.ndarray: o0ZM, BhJz, Rv0k = (epAf.sin(zbxI), epAf.sin(lR5V), epAf.sin(oUfG)) UV8M, vHO5, rAGV = (epAf.cos(zbxI), epAf.cos(lR5V), epAf.cos(oUfG)) EqBn, gtI8 = (UV8M * rAGV, UV8M * Rv0k) Sa_m, KG9w = (o0ZM * rAGV, o0ZM * Rv0k) SppC = ENiP.copy() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OJzE(q7In):\n return A3Vt.from_euler('xyz', q7In).as_matrix()", "def yf8C(YylR):\n xTkQ, H2HG, rKSe = (-YylR[0], -YylR[1], -YylR[2])\n Zl7o = oyIN.array([[1, 0, 0], [0, epAf.cos(xTkQ), -epAf.sin(xTkQ)], [0, epAf.sin(xTkQ), epAf.cos(xTkQ)]])\n xEPK = oyIN.array([[epAf.cos(H2HG), 0, epAf.sin(H2HG)]...
[ "0.7949924", "0.7849404", "0.74938077", "0.7472001", "0.72348356", "0.7205802", "0.71671265", "0.71581817", "0.7111325", "0.7110401", "0.7102697", "0.7073861", "0.70610034", "0.69522524", "0.6921833", "0.68574053", "0.68046445", "0.6757251", "0.6722099", "0.6721345", "0.67135...
0.6316366
47
Count number of ghost entities. Number of nodes, faces, and cells for ghost can be determined according to boundary connectivities. Nubmer of ghost cells is exactly the number of boundary faces. Number of exterior faces for ghost cells is the total number of faces of ghost cells minus the number of boundary faces (whic...
def oVXv(YKHO): wCK9 = YKHO.bndfcs[:, 0] yN8D = YKHO.fccls[wCK9, 0] dOE8 = YKHO.nbound YSvA = YKHO.cltpn[yN8D] pw8u = 0 for q2J1 in sRHT[1:]: tpio = q2J1[1] Qnpo = q2J1[1 + tpio] W4w7 = (YSvA == q2J1[0]).sum() pw8u += (Qnpo - 1) * W4w7 snLy = YKHO.clnds[yN8D, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ap_s(yvY1):\n return oyIN.diff(yvY1.cells.facePos, axis=0)", "def fhKa(YKHO):\n return Latg.interior_node_count(YKHO.shape)", "def OtzW(yvY1):\n return yvY1.number_of_nodes()", "def fOCg(yvY1):\n return yvY1.number_of_edges()", "def btFB(YKHO):\n return len(YKHO.cells)", "def fHmP(Oa1e...
[ "0.690104", "0.67829627", "0.6759865", "0.6548582", "0.6376745", "0.6345198", "0.63247555", "0.6323073", "0.629283", "0.6278852", "0.6240641", "0.62399685", "0.6203941", "0.6201099", "0.61971366", "0.6156357", "0.6153411", "0.6149251", "0.61246437", "0.61157894", "0.61079943"...
0.8516077
0
Reparameterization trick by sampling from an isotropic unit Gaussian. This function combines `args` (which must be a mean and a log of variance) into a single distribution. We then sample from that distribution to produce a latent vector.
def gx_E(qIxc): y906, bKZA = qIxc Wc9F = nMvt.shape(y906)[0] tpio = nMvt.int_shape(y906)[1] _hZ2 = nMvt.random_normal(shape=(Wc9F, tpio)) ee6l = nMvt.exp(0.5 * bKZA) mvm2 = y906 + ee6l * _hZ2 return mvm2
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def d39J(YKHO, qIxc):\n y906, bKZA = qIxc\n return uXlY(y906, bKZA, (YKHO.latent_cont_dim,))", "def NgvF(qIxc):\n y906, Eigf = qIxc\n Ep8u = nMvt.shape(y906)[0]\n E1ho = nMvt.shape(y906)[1]\n _hZ2 = nMvt.random_normal(shape=(Ep8u, E1ho))\n return y906 + nMvt.exp(0.5 * Eigf) * _hZ2", "def d...
[ "0.6873951", "0.68621874", "0.67872804", "0.6733952", "0.6589177", "0.65105987", "0.65105987", "0.65105987", "0.65071154", "0.6483419", "0.6483419", "0.64825916", "0.64628714", "0.64628714", "0.64628714", "0.64593166", "0.64593166", "0.64593166", "0.64593166", "0.64593166", "...
0.5954689
61
Same as `sample` but instead of sampling from the normal distribution, samples from the given Gaussian. mu and sigma must be tuples of floats, of shape self._latent_dim.
def tEhu(YKHO, yGTL: tuple, WTkW: tuple): return oyIN.random.normal(yGTL, WTkW)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def QDeL(yGTL, WTkW, mLGw=1, yokr=0):\n ADdS = oyIN.random.RandomState(yokr)\n gGnb = ADdS.normal(yGTL, WTkW, size=mLGw)\n return gGnb", "def aU90(YKHO, yGTL, SRYB=1, Ep8u=None):\n assert 'variational' in YKHO.config, \"If you want to sample from a gaussian distribution to create images you need the ...
[ "0.75896543", "0.7491438", "0.7215935", "0.70771116", "0.6999455", "0.6974767", "0.6935199", "0.69038504", "0.68870807", "0.6886571", "0.6881656", "0.68539125", "0.6831523", "0.6783745", "0.6770815", "0.6751691", "0.674895", "0.6730991", "0.6728686", "0.67181504", "0.6713953"...
0.85499233
0
Initialize Count objects with attrs set to 0
def gash(): Z9rn = kbH2() assert Z9rn.success == 0 for hkS8 in ['error', 'failure']: assert isinstance(getattr(Z9rn, hkS8), oRi_)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO):\n YKHO.num_counts = {}", "def FIMM(YKHO, SZFh=_E99):\n YKHO.entries = 0.0\n YKHO.transform = B4us(SZFh)\n super(kbH2, YKHO).__init__()", "def FIMM(YKHO):\n YKHO.count = 0", "def NMMh(jxGD, mWFP, gitN, o8Kj):\n jxGD._counters = []\n for _AKB in gitN:\n if not isinst...
[ "0.69014686", "0.6811474", "0.67844176", "0.6751921", "0.663521", "0.6627025", "0.66220117", "0.6532286", "0.65097135", "0.64503807", "0.64002734", "0.6396351", "0.63816863", "0.63430655", "0.63280874", "0.6306312", "0.6296918", "0.62671185", "0.6259666", "0.6252226", "0.6193...
0.63889
12
Adding a new failure initializes its count to 0
def Ww9d(): Z9rn = kbH2() assert Z9rn.failure[42] == 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def duIK(YKHO, QOe9, XObx):\n YKHO.failures += 1", "def WcAT(YKHO):\n YKHO.num_failing_tests += 1", "def Dvew(YKHO):\n YKHO.__current_test.increment_failure()", "def XKQY(YKHO, QOe9, XObx):\n YKHO.errors += 1", "def nSIo():\n Z9rn = kbH2()\n H5ew = 42\n for YRbF in range(10):\n ...
[ "0.8376615", "0.77203685", "0.76829", "0.7511094", "0.7330762", "0.7314556", "0.71997803", "0.71578044", "0.71546626", "0.706508", "0.704526", "0.70304495", "0.7002709", "0.69779915", "0.6963828", "0.69633853", "0.6961954", "0.6863867", "0.68187803", "0.6799144", "0.6780756",...
0.7181569
7
Returns the filter name for a filter function or `None` if there is no such filter.
def ihRa(YKHO, filter): if filter not in wza7: for xuBC in LVz3.values(): for H5ew, BWXx in xuBC.filters.iteritems(): wza7[BWXx] = H5ew return wza7.get(filter, None)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ihRa(YKHO):\n pass", "def ihRa(YKHO):\n pass", "def mWFP(YKHO):\n try:\n return YKHO.filter_['name']\n except KeyError:\n raise WirG(\"Can't find name of a filter\")", "def v35O(YKHO, YaI2):\n eHNT = getattr(YKHO, YaI2)\n if eHNT is None:\n Y5xg.log.warning('menu_Ev...
[ "0.7439667", "0.7439667", "0.706557", "0.7022882", "0.6985202", "0.6878898", "0.63580203", "0.6174469", "0.6144509", "0.6125499", "0.6086496", "0.6058813", "0.60524356", "0.60524356", "0.6020596", "0.59870374", "0.59870374", "0.59870374", "0.59870374", "0.5974146", "0.5974146...
0.7437931
2
Return a new spontaneous environment. A spontaneous environment is an unnamed and unaccessible (in theory) environment that is used for templates generated from a string and not from the file system.
def LDwq(*qIxc): try: sEAN = AHFh.get(qIxc) except TypeError: return zAej(*qIxc) if sEAN is not None: return sEAN AHFh[qIxc] = sEAN = zAej(*qIxc) sEAN.shared = True return sEAN
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def YdjR() -> p_Fd.EnvNamespace:\n global _memoized_environment\n if KLLJ is None:\n KLLJ = g_zB().parse_env()\n return KLLJ", "def FzMY(BH3N='SonicTheHedgehog-Genesis', QTBn='GreenHillZone.Act1', E5BI=True, LWNN=True):\n print('Entering make_local_env')\n sEAN = PL4F.make(game=BH3N, state=...
[ "0.6178852", "0.582297", "0.58017355", "0.5801187", "0.57622695", "0.57607424", "0.573848", "0.5716172", "0.5693593", "0.5660355", "0.56117713", "0.55992806", "0.557932", "0.55778974", "0.55560595", "0.5548945", "0.5518569", "0.5509944", "0.5500823", "0.54867435", "0.5436777"...
0.676693
0
Create a copy of this extension bound to another environment.
def XkiF(YKHO, GikI): im04 = object.__new__(YKHO.__class__) im04.__dict__.update(YKHO.__dict__) im04.environment = GikI return im04
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jth9(YKHO):\n return YKHO.__class__(YKHO._environ.copy(), YKHO._cwd, **YKHO._specials)", "def i3ak(YKHO):\n return zAej(YKHO.parent, YKHO.expressions)", "def i3ak(YKHO) -> 'Environment':\n jth9 = _qLf(YKHO)\n return jth9", "def jth9(YKHO):\n Z9rn = MeO1()\n Z9rn._command_prefixes = list...
[ "0.6796598", "0.669417", "0.662295", "0.65191895", "0.6448015", "0.63306546", "0.6127458", "0.60715157", "0.60535246", "0.5979267", "0.59031934", "0.5863902", "0.5849119", "0.5805249", "0.5785536", "0.5780335", "0.5768969", "0.57448715", "0.57448435", "0.5744026", "0.57413644...
0.7423717
0
Enforce HTML escaping. This will probably double escape variables.
def ou9L(BWXx): if hasattr(BWXx, '__html__'): BWXx = BWXx.__html__() return IguF(g9qP(BWXx))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IguF(_R2e):\n return _R2e.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('\"', '&quot;').replace(\"'\", '&#39;')", "def IguF(_R2e):\n return BY_x(ILZP(_R2e).replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('\"', '&quot;').replace(\"'\", '&#39;'))", "def...
[ "0.7165896", "0.7135821", "0.7135821", "0.7070322", "0.7067027", "0.70598054", "0.70378935", "0.70023406", "0.6992241", "0.69279927", "0.69217277", "0.69199574", "0.68852234", "0.68734926", "0.68601364", "0.68278044", "0.67916334", "0.67916334", "0.6782555", "0.6766736", "0.6...
0.7548405
0
Return a random item from the sequence.
def ZeQR(GikI, Q6uT): try: return Acvy(Q6uT) except IndexError: return GikI.undefined('No random item, sequence was empty.')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Noc6(DumB):\n dQgj = tuKI.randint(0, len(DumB) - 1)\n return DumB[dQgj]", "def ZeQR(QpfX, Q6uT):\n try:\n return tuKI.choice(Q6uT)\n except IndexError:\n return QpfX.environment.undefined('No random item, sequence was empty.')", "def UIrZ(YKHO):\n return YKHO.items[int(tuKI.ran...
[ "0.81007624", "0.786229", "0.7732202", "0.75758094", "0.7563769", "0.75004715", "0.7427244", "0.73271024", "0.7275496", "0.7193072", "0.71488404", "0.7139045", "0.70634925", "0.70617366", "0.6991367", "0.69837517", "0.68981576", "0.68972987", "0.67906183", "0.6751946", "0.673...
0.7945404
1
Return a truncated copy of the string. The length is specified with the first parameter which defaults to ``255``. If the second parameter is ``true`` the filter will cut the text at length. Otherwise it will discard the last word. If the text was in fact truncated it will append an ellipsis sign (``"..."``). If you wa...
def DW2Q(KCHu, u54L=255, T8TQ=False, Os4s='...'): if len(KCHu) <= u54L + len(Os4s): return KCHu elif T8TQ: return KCHu[:u54L - len(Os4s)] + Os4s V22M = KCHu.split(' ') Aofo = [] r8hN = 0 for GIN8 in V22M: r8hN += len(GIN8) + 1 if r8hN > u54L - len(Os4s): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def G34s(l5Ny: str, KLk8: int=1024) -> str:\n B6O7 = '[…]'\n return f'{l5Ny[:KLk8 - len(B6O7)]}{B6O7}' if len(l5Ny) > KLk8 - len(B6O7) else l5Ny", "def tzwu(KCHu, u54L=30):\n KCHu = str(KCHu)\n if len(KCHu) > u54L - 3:\n return KCHu[0:u54L - 3] + '...'\n else:\n return KCHu", "def ...
[ "0.74275035", "0.7287972", "0.72152233", "0.71597767", "0.71178424", "0.7096474", "0.7084277", "0.7008044", "0.6989541", "0.6985368", "0.6985368", "0.6985368", "0.6985368", "0.6985368", "0.6985368", "0.6985368", "0.6985368", "0.6985304", "0.6985304", "0.6985304", "0.69602305"...
0.7390419
1
Convert the value into an integer. If the conversion doesn't work it will return ``0``. You can override this default using the first parameter.
def YtHH(BWXx, WmM4=0): try: return int(BWXx) except (TypeError, ValueError): try: return int(float(BWXx)) except (TypeError, ValueError): return WmM4
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iLIN(wEf2, WmM4=0):\n try:\n return int(wEf2)\n except (ValueError, TypeError):\n return WmM4", "def tCsr(BWXx):\n YKHO.verbose('trying to convert value to integer : %s', BWXx)\n return int(str(BWXx))", "def Wa8K(BWXx, WmM4):\n try:\n return int(BWXx)\n except ValueEr...
[ "0.784842", "0.7762645", "0.77492756", "0.753095", "0.7515309", "0.74820536", "0.74279314", "0.7414731", "0.74025565", "0.7369712", "0.7354567", "0.73055595", "0.7305107", "0.7285974", "0.72821856", "0.728084", "0.7276819", "0.726958", "0.7193282", "0.7183013", "0.7157635", ...
0.74513596
6
Strip SGML/XML tags and replace adjacent whitespace by one space.
def ykdh(BWXx): if hasattr(BWXx, '__html__'): BWXx = BWXx.__html__() return DfCi(g9qP(BWXx)).striptags()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GXhp(QToG):\n for LihS in QToG.iter():\n if LihS.text is not None:\n LihS.text = ZbWC.sub('\\\\s+', ' ', LihS.text)\n if LihS.tail is not None:\n LihS.tail = ZbWC.sub('\\\\s+', ' ', LihS.tail)", "def PKBK(YKHO, nPrm):\n try:\n nPrm = nPrm.replace('<t>', '')\n ...
[ "0.7170024", "0.7110212", "0.6982153", "0.6876738", "0.6856163", "0.6782614", "0.67808026", "0.6661934", "0.66467535", "0.6605773", "0.6600938", "0.658622", "0.65752417", "0.6550281", "0.65428424", "0.6478056", "0.64735824", "0.6451718", "0.6422146", "0.64211136", "0.6381462"...
0.0
-1
A filter that batches items. It works pretty much like `slice` just the other way round. It returns a list of lists with the given number of items. If you provide a second parameter this
def aCB5(BWXx, nj7g, Dc_Q=None): Aofo = [] jbXL = [] for ZfUD in BWXx: if len(jbXL) == nj7g: yield jbXL jbXL = [] jbXL.append(ZfUD) if jbXL: if Dc_Q is not None and len(jbXL) < nj7g: jbXL += [Dc_Q] * (nj7g - len(jbXL)) yield jbXL
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nJ0e(WhY1: Iterable[T], ztRo: int) -> bDy6[x1iM]:\n WhY1 = iter(WhY1)\n return iter(lambda: list(uOgj(WhY1, ztRo)), [])", "def _iMd(OxJJ, exwG):\n return list(Hs6x.islice(OxJJ, exwG))", "def nJ0e(WhY1: Iterable, ztRo: int) -> bDy6[x1iM]:\n WhY1 = iter(WhY1)\n return iter(lambda: list(uOgj(Wh...
[ "0.6811991", "0.67928624", "0.6749563", "0.6654493", "0.6650946", "0.66492426", "0.6621125", "0.65979105", "0.65979105", "0.65979105", "0.6587703", "0.6587703", "0.6584184", "0.65434253", "0.6518004", "0.64935994", "0.64885825", "0.6461391", "0.6456867", "0.6390831", "0.63822...
0.0
-1
Mark the value as safe which means that in an environment with automatic escaping enabled this variable will not be escaped.
def XmUE(BWXx): return DfCi(BWXx)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aSeI(YKHO, BWXx):\n return BWXx", "def ujGA(BWXx):\n frSm = BfDw.safe_stringify(BWXx)\n assert frSm == '1'\n assert type(frSm) == str", "def NCC9(BWXx, KXjL='/'):\n BWXx = F5lT(BWXx)\n if isinstance(BWXx, str):\n return HDLy(BWXx, KXjL)\n else:\n return BWXx", "def kKmM...
[ "0.6849693", "0.6786452", "0.6659994", "0.6578046", "0.6576659", "0.6576659", "0.6515398", "0.64527684", "0.6444084", "0.6437834", "0.6355819", "0.6291151", "0.6230333", "0.6120261", "0.61166936", "0.6110609", "0.6106374", "0.6075517", "0.60747343", "0.60248893", "0.6020108",...
0.6378261
10
Get an attribute of an object. ``foo|attr("bar")`` works like ``foo["bar"]`` just that always an attribute is returned and items are not looked up.
def pAAg(GikI, YEnM, mWFP): try: mWFP = str(mWFP) except UnicodeError: pass else: try: BWXx = getattr(YEnM, mWFP) except AttributeError: pass else: if GikI.sandboxed and (not GikI.is_safe_attribute(YEnM, mWFP, BWXx)): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def G7Ug(YEnM, hkS8):\n try:\n return getattr(YEnM, hkS8)\n except AttributeError:\n return", "def ACKN(*qIxc, **B2fa):\n pass", "def G7Ug(hkS8):\n\n def NMoC(KCHu, exwG):\n return KCHu.node[exwG].get(hkS8)\n return NMoC", "def xC3W(*qIxc, **YSA3):\n return seET(*qIxc, ...
[ "0.7508022", "0.74332637", "0.7127676", "0.71106184", "0.7102135", "0.70496833", "0.70332444", "0.70040226", "0.6972311", "0.6942159", "0.68908066", "0.6879657", "0.68616104", "0.6842755", "0.67988247", "0.6749751", "0.6730848", "0.6675526", "0.6673232", "0.66713303", "0.6667...
0.6596727
27
Returns a set of all variables in the AST that will be looked up from the context at runtime. Because at compile time it's not known which variables will be used depending on the path the execution takes at runtime, all variables are returned. >>> from jinja2 import Environment, meta >>> env = Environment() >>> ast = e...
def rfe6(jZ4I): Y5qA = G6ap(jZ4I.environment) Y5qA.visit(jZ4I) return Y5qA.undeclared_identifiers
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sMR7(YKHO):\n if YKHO.is_file():\n JZXy = YKHO._env.loader.get_source(YKHO._env, YKHO._template)[0]\n else:\n JZXy = YKHO._content\n jZ4I = YKHO._env.parse(JZXy)\n kc1W = e5kH.find_undeclared_variables(jZ4I)\n return kc1W", "def AJ20(YKHO, rPXJ):\n bo34.debug('loading template...
[ "0.71553224", "0.70572007", "0.69854254", "0.6965932", "0.68963814", "0.68882734", "0.68689215", "0.6668268", "0.65865666", "0.65751046", "0.6457784", "0.6452341", "0.64270526", "0.6422301", "0.6419751", "0.6405953", "0.640528", "0.6391977", "0.63762283", "0.6371394", "0.6279...
0.76916987
0
Iterates over all direct child nodes of the node. This iterates over all fields and yields the values of they are nodes. If the value of a field is a list all the nodes in that list are returned.
def wNRb(YKHO, DNHh=None, ZN4Y=None): for Jyyj, ZfUD in YKHO.iter_fields(DNHh, ZN4Y): if isinstance(ZfUD, list): for exwG in ZfUD: if isinstance(exwG, o7DN): yield exwG elif isinstance(ZfUD, o7DN): yield ZfUD
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wNRb(Q6kx):\n for mWFP in Q6kx._fields:\n Jyyj = getattr(Q6kx, mWFP, None)\n if isinstance(Jyyj, jZ4I.AST):\n yield Jyyj\n elif isinstance(Jyyj, list):\n for ZfUD in Jyyj:\n yield ZfUD", "def wNRb(Q6kx):\n for mWFP, Jyyj in rr5x(Q6kx):\n ...
[ "0.869913", "0.8367435", "0.80401033", "0.75580454", "0.7480554", "0.74190205", "0.72599715", "0.7145408", "0.69991493", "0.6900486", "0.6869967", "0.68565047", "0.67948854", "0.6776285", "0.66852534", "0.65588206", "0.6522195", "0.64561224", "0.6449041", "0.6435911", "0.6397...
0.79832613
3
Check if an object is safely callable. Per default a function is considered safe unless the `unsafe_callable` attribute exists and is True. Override this method to alter the behavior, but this won't affect the `unsafe` decorator from this module.
def i4wP(YKHO, YEnM): return not (getattr(YEnM, 'unsafe_callable', False) or getattr(YEnM, 'alters_data', False))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VBj0(YEnM):\n if hasattr(ONrU, 'callable'):\n qlq6 = callable(YEnM)\n else:\n qlq6 = hasattr(YEnM, '__call__')\n return qlq6", "def VBj0(YEnM):\n return hasattr(YEnM, '__call__')", "def z8OS(YEnM, *, L8u5=False):\n if L8u5 and YEnM is None:\n return\n if not callable(...
[ "0.71125036", "0.6936632", "0.69099915", "0.6863471", "0.6599959", "0.64979136", "0.64318645", "0.6376975", "0.63767797", "0.63608575", "0.6359673", "0.63530016", "0.6298594", "0.6296761", "0.6289621", "0.62617934", "0.62119323", "0.6203426", "0.6119456", "0.6102213", "0.6094...
0.8584134
0
Return true if the variable is odd.
def lMy_(BWXx): return BWXx % 2 == 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kYZq(YKHO):\n return YKHO.number % 2 == 1", "def kYZq(BWXx):\n return BWXx % 2 == 1", "def kYZq(WKvO):\n if WKvO % 2 != 0:\n return True\n return False", "def XHAY(YKHO, BWXx):\n return BWXx % 2 == 1", "def XHAY(WKvO):\n return WKvO % 2 != 0", "def kYZq(WKvO):\n return WKv...
[ "0.8514286", "0.8504993", "0.84915173", "0.8433705", "0.83977824", "0.83955646", "0.8378103", "0.832661", "0.8267628", "0.82015145", "0.81664366", "0.81479245", "0.8140947", "0.8093884", "0.8057603", "0.8051923", "0.8029645", "0.80020666", "0.8001811", "0.7993922", "0.7991198...
0.7793731
44
Return true if the variable is even.
def EVW3(BWXx): return BWXx % 2 == 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WOgS(FGW3):\n return bool(FGW3 % 2 == 0)", "def Q5eN(YKHO, wEf2):\n if wEf2 % 2 == 0:\n return True\n else:\n return False", "def ubP8(WKvO: int) -> bool:\n return WKvO % 2 == 0", "def ubP8(WKvO):\n if WKvO % 2 == 0:\n return True\n return False", "def ubP8(mLGw):...
[ "0.8670294", "0.85823643", "0.85698414", "0.8539113", "0.85206956", "0.85206956", "0.85172075", "0.8515124", "0.8513937", "0.8513788", "0.8508222", "0.8508222", "0.8498395", "0.8498395", "0.8498395", "0.8498395", "0.84880906", "0.8487015", "0.84467226", "0.8420358", "0.839738...
0.80159754
34
Check if a variable is divisible by a number.
def nBIY(BWXx, mLGw): return BWXx % mLGw == 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nBIY(BWXx: int, mLGw: int) -> bool:\n return BWXx % mLGw == 0", "def bJ9I(BWXx, mLGw):\n return BWXx % mLGw == 0", "def Tb_q(FGW3, aM8h):\n return FGW3 % aM8h == 0", "def BhOo(mLGw: int, di96: int) -> bool:\n return mLGw % di96 == 0", "def Tb_q(exwG: int, di96: int) -> bool:\n return exw...
[ "0.84586084", "0.84473944", "0.8380892", "0.8330492", "0.81818014", "0.79509306", "0.7808384", "0.779218", "0.7675185", "0.7612897", "0.75107044", "0.75103563", "0.7482281", "0.74602747", "0.7430109", "0.74218464", "0.74041975", "0.7401359", "0.7395569", "0.73888236", "0.7346...
0.84052014
2
Return true if the variable is a sequence. Sequences are variables that are iterable.
def jnOd(BWXx): try: len(BWXx) BWXx.__getitem__ except: return False return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ysuw(WKvO):\n return isinstance(WKvO, g760.abc.Sequence)", "def FDfP(YEnM):\n return isinstance(YEnM, g760.Iterable)", "def FDfP(YEnM):\n return GfZ5(YEnM) and isinstance(YEnM, g760.Sequence)", "def FDfP(wEf2: Any) -> bool:\n return isinstance(wEf2, (Qn3v, list, tuple))", "def xvHC(BWXx):\n...
[ "0.807734", "0.76543355", "0.76479155", "0.7642297", "0.76187223", "0.7509732", "0.7428671", "0.74099344", "0.73971605", "0.73971605", "0.7396363", "0.735418", "0.7294563", "0.7284393", "0.7256814", "0.72550446", "0.7211662", "0.6991865", "0.6940057", "0.6929591", "0.6916875"...
0.65448445
31
Return a shallow copy of the instance.
def jth9(YKHO): im04 = YKHO.__class__(YKHO.capacity) im04._mapping.update(YKHO._mapping) im04._queue = MUE7(YKHO._queue) return im04
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jth9(YKHO):\n return YKHO.shallow_copy()", "def jth9(YKHO):\n return YKHO.__class__(YKHO, copy=True)", "def jth9(YKHO):\n return YKHO.__class__.new_from_obj(YKHO, copy=True)", "def jth9(YKHO):\n return YKHO.__class__(YKHO)", "def jth9(YKHO):\n return YKHO.__class__(YKHO)", "def jth9(YK...
[ "0.8823328", "0.8766085", "0.8728402", "0.8481949", "0.8481949", "0.8481949", "0.8481949", "0.8481949", "0.8471607", "0.84665173", "0.84665173", "0.84529257", "0.84529257", "0.84287846", "0.84287846", "0.8424527", "0.8423883", "0.8423883", "0.8423883", "0.8423883", "0.8423883...
0.0
-1
Return the current size of the cache.
def szAg(YKHO): return len(YKHO._mapping)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oc1B(YKHO):\n return YKHO._cache_size", "def jiw9(YKHO):\n return len(YKHO._cache)", "def oc1B(YKHO):\n return len(YKHO)", "def cuis():\n return qThI.vips_cache_get_size()", "def oc1B(YKHO) -> qe4Y.Output[h8nf[int]]:\n return qe4Y.get(YKHO, 'cache_size')", "def ceoV(YKHO) -> float:\n ...
[ "0.9102113", "0.90351707", "0.88606757", "0.8835639", "0.8693744", "0.8484435", "0.82998043", "0.82998043", "0.82623005", "0.822862", "0.8132913", "0.8112105", "0.8074668", "0.7970791", "0.7951308", "0.7949046", "0.7918628", "0.7914175", "0.78376615", "0.78118247", "0.7771888...
0.0
-1
Goes one item ahead and returns it.
def UDAb(YKHO): im04 = YKHO.current YKHO.pos = (YKHO.pos + 1) % len(YKHO.items) return im04
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WBna(YKHO):\n try:\n ZfUD = YKHO.items[YKHO.index]\n except IndexError:\n YKHO.index = 0\n return None\n YKHO.index += 1\n if YKHO.index >= len(YKHO.items):\n YKHO.index = 0\n return ZfUD", "def a3Tc(YKHO):\n return YKHO.popleft()", "def rKoN(YKHO):\n YKHO._...
[ "0.75740916", "0.75003964", "0.73609495", "0.72617805", "0.71962345", "0.71696925", "0.7144865", "0.7120479", "0.6975158", "0.6847737", "0.68467265", "0.6844727", "0.68443483", "0.68164843", "0.681359", "0.681359", "0.681359", "0.67977333", "0.67856574", "0.6784806", "0.67848...
0.6744297
24
Creates an IAM client with the AWS credentials in the application's config files. The AWS credentials must be of a user with admin access or with the IAMFullAccess and AmazonRedshiftFullAccess applied.
def FeOQ(YKHO): x0hE = iVGz.client(service_name='iam', region_name=LZ7t, aws_access_key_id=vOEy, aws_secret_access_key=tNsW) bo34.info('Client created') return x0hE
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def x0hE(YKHO) -> iVGz.session.Session.client:\n try:\n x0hE = iVGz.client('secretsmanager', endpoint_url=Hy7s.environ.get('CN_AWS_SECRETS_ENDPOINT_URL') or None)\n return x0hE\n except E1YJ:\n raise RuntimeError('AWS region is not specified. Please specify the region in a file pointed b...
[ "0.6808485", "0.6600634", "0.6560406", "0.64270353", "0.64208907", "0.63962865", "0.6347157", "0.63335586", "0.6319746", "0.62837327", "0.6247723", "0.6234225", "0.6226546", "0.62036043", "0.6196661", "0.6192655", "0.6143801", "0.61315125", "0.6122558", "0.6119952", "0.610826...
0.73567253
0
Attaches a list of policies to the AWS role created by the application. The policy list is assigned as a property of this class and includes S3 read access to ingest raw data as standard, but additional policies may be added as the need arises.
def RwuP(YKHO): h2IT = [] for Qabx in YKHO.aws_role_policies: try: geh0 = YKHO.client.attach_role_policy(RoleName=YKHO.dwh_db_role, PolicyArn=Qabx['arn']) except YKHO.client.exceptions.EntityAlreadyExistsException: bo34.info(f"'{Qabx['name']}' already on '{YKHO.dwh_db_rol...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def som_(YKHO, som_):\n YKHO._policies = som_", "def Le8r(YKHO, Le8r):\n YKHO._policy_lists = Le8r", "def j8Iw(h1Ur):\n try:\n print('1.2 Attaching Policy')\n ENHu.attach_role_policy(RoleName=h1Ur, PolicyArn='arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess')\n ENHu.attach_role_poli...
[ "0.6764459", "0.6733292", "0.6625059", "0.65893", "0.6553313", "0.6541143", "0.6283676", "0.6280728", "0.62567747", "0.62567747", "0.6198187", "0.61688095", "0.61467034", "0.61461926", "0.5959358", "0.59518844", "0.58812404", "0.5877327", "0.58246326", "0.5788742", "0.5779937...
0.66939217
2
Detach the policies from the data warehouse role associated with this application. This function is invoked from the teardown() method of this class when the application is in `dry_run` mode.
def i_au(YKHO): h2IT = [] for Qabx in YKHO.aws_role_policies: try: geh0 = YKHO.client.detach_role_policy(RoleName=YKHO.dwh_db_role, PolicyArn=Qabx['arn']) except YKHO.client.exceptions.NoSuchEntityException: bo34.info(f"'{Qabx['name']}' already detached!") bo34.in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mTtn(YKHO):\n YKHO.detach_role_policies()\n YKHO.delete_dwh_role()\n bo34.info('Teardown completed')", "def HySU(YKHO):\n if YKHO.arn:\n h1Ur = ZbWC.match(WbxG, YKHO.arn).group(1)\n uPxV = YKHO.iam_client.list_attached_role_policies(RoleName=h1Ur)\n for mAB6 in uPxV['Attached...
[ "0.7582203", "0.7131957", "0.59353787", "0.59236515", "0.5880707", "0.5872854", "0.5860134", "0.58027416", "0.57603264", "0.57509726", "0.5636607", "0.560371", "0.5573861", "0.55337864", "0.55048364", "0.5469694", "0.5468541", "0.5468541", "0.5468541", "0.5468541", "0.5468541...
0.68996966
2
Create the home page
def ihbd(YKHO): tk5Y = I0sS.objects.get(depth=1) ppGd = Meyq.objects.first() if ppGd is None: YKHO.stdout.write(YKHO.style.SUCCESS('Creating home page.')) ppGd = Meyq(**HT_r) tk5Y.add_child(instance=ppGd) ppGd = Meyq.objects.first() else: YKHO.stdout.write(YKHO.st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def C_QL():\n return TvZl('home.html')", "def kZiy():\n return TvZl('homepage.html')", "def kZiy():\n return TvZl('home.html')", "def kZiy():\n return TvZl('home.html')", "def kZiy():\n leAC = 'Home Page'\n return TvZl('home.html', title=leAC)", "def kZiy():\n rPXJ = TvZl('home.html'...
[ "0.8426033", "0.83974016", "0.8386863", "0.8311888", "0.8285504", "0.82632095", "0.8245665", "0.8245665", "0.82092154", "0.820211", "0.8198463", "0.8198463", "0.8192747", "0.8185509", "0.8184341", "0.81593895", "0.8142261", "0.81421494", "0.8138126", "0.8135674", "0.8135674",...
0.0
-1
checks if string 1 is a substring of string 2
def ikBy(qoGC, VyPo): for YRbF in range(len(qoGC)): if qoGC[YRbF] == VyPo[0]: for r845 in range(len(VyPo)): if qoGC[YRbF + r845] != VyPo[r845]: break else: return True return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ikBy(qoGC, VyPo, _7nK=0):\n return T6jl(qoGC, VyPo, _7nK)", "def ikBy(qoGC, VyPo, _7nK=0):\n return T6jl(qoGC, VyPo, _7nK)", "def QJtP(YKHO, j93S, Nqp_):\n if len(Nqp_) == 0:\n return False\n for YRbF in Ni9Y(len(j93S) - len(Nqp_) + 1):\n if j93S[YRbF] == Nqp_[0] and YRbF + len(Nq...
[ "0.85333705", "0.85333705", "0.8527757", "0.851229", "0.8477255", "0.8475051", "0.8408858", "0.8374703", "0.83692116", "0.8206978", "0.7641329", "0.76292056", "0.75621015", "0.7523111", "0.7510525", "0.7448044", "0.7349371", "0.72838086", "0.717438", "0.7113035", "0.7096787",...
0.8259716
9
Normalise channels between [1, 1]
def fjyB(WKvO, **B2fa): return WKvO / 128.0 - 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OEry(xMux):\n return zzB6(32, xMux)", "def OEry(xMux):\n return U78l.GroupNorm(16, xMux)", "def Ekx3(WKvO):\n if oyIN.ndim(WKvO) == 3:\n YDR7 = oyIN.shape(WKvO)[0]\n elif oyIN.ndim(WKvO) == 4:\n YDR7 = oyIN.shape(WKvO)[1]\n else:\n print('ERROR: input image dimensions no...
[ "0.76564634", "0.7611416", "0.7240358", "0.7007745", "0.70020956", "0.6931016", "0.6859767", "0.68065274", "0.67501837", "0.6673856", "0.66731495", "0.6647358", "0.6631171", "0.6582996", "0.6581676", "0.6551005", "0.64990264", "0.6473076", "0.6466457", "0.64620453", "0.644955...
0.0
-1
Return repo object by name. If repo object already created, it'll be returned from inner index. Otherwise, it'll be created.
def dCdx(YKHO, RDp6): boHx = YKHO._repos.get(RDp6) if boHx is None: boHx = F4UB.get_repo(RDp6) YKHO._repos[RDp6] = boHx return boHx
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def boHx(YKHO):\n return YKHO._get_single('repo', coerce=cf_A.to_unicode())", "def QDsF(P4t4, mWFP):\n return Clzd(P4t4).filter_by(name=mWFP).first()", "def F3jJ(YKHO):\n return YKHO._get_single('repo', coerce=cf_A.to_unicode())", "def JvFA(YKHO, mWFP):\n N5MO(QV0I)\n return mY2R(YKHO.organiza...
[ "0.70561", "0.69556165", "0.68578845", "0.6614739", "0.6508024", "0.6490547", "0.644145", "0.6431086", "0.6219767", "0.6214114", "0.61786693", "0.6161631", "0.6152961", "0.6146544", "0.61282945", "0.6121793", "0.5943412", "0.5919736", "0.5909693", "0.5908629", "0.5860127", ...
0.6491384
5
Performs a softmax over the attention values.
def p8N7(hkxX): Wve5 = ZylS.shape(hkxX) qcT8 = ZylS.reshape(tensor=hkxX, shape=[-1, Wve5[2]]) l4eH = ZylS.nn.softmax(qcT8) return ZylS.reshape(l4eH, Wve5)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def N93T(WKvO):\n return oyIN.exp(WKvO) / oyIN.sum(oyIN.exp(WKvO), axis=0)", "def N93T(WKvO):\n WKvO = oyIN.transpose(WKvO)\n return oyIN.transpose(oyIN.exp(WKvO) / oyIN.sum(oyIN.exp(WKvO), axis=0))", "def N93T(WKvO):\n return oyIN.exp(WKvO) / oyIN.sum(oyIN.exp(WKvO), axis=1, keepdims=True)", "de...
[ "0.7925775", "0.7894358", "0.78897154", "0.7886005", "0.78812885", "0.78187895", "0.7807203", "0.78045744", "0.7778349", "0.77727926", "0.77683103", "0.776693", "0.77661633", "0.77661633", "0.77661633", "0.77661633", "0.77661633", "0.77661633", "0.77661633", "0.77661633", "0....
0.0
-1
Add user that make request to serializer data
def Wzk0(YKHO, ZMzz): if YKHO.request.user: ZMzz.save(creator=YKHO.request.user) else: raise wPvU()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Wzk0(YKHO, ZMzz):\n YEnM = ZMzz.save()\n YEnM.users.add(YKHO.request.user)", "def Wzk0(YKHO, ZMzz):\n ZMzz.save(user_id=YKHO.request.user)", "def Wzk0(YKHO, ZMzz):\n ZMzz.save(user_id=YKHO.request.user)", "def Wzk0(YKHO, ZMzz):\n CBIr = YKHO.request.user\n ZMzz.save(created_by=YKHO.requ...
[ "0.7491308", "0.70332116", "0.70332116", "0.7015509", "0.6999711", "0.6999711", "0.6999711", "0.6999711", "0.6999711", "0.6999711", "0.6999711", "0.6999711", "0.6999711", "0.6999711", "0.6999711", "0.6999711", "0.6999711", "0.6999711", "0.6999711", "0.6999711", "0.6999711", ...
0.62854385
91
md5 hash of a file is hash of its contents hash of empty file is 'd41d8cd98f00b204e9800998ecf8427e'
def znmK(nUeQ): xORj = HBct.md5() KuP7 = 4096 with open(nUeQ, 'rb') as PFCt: for yOAJ in iter(lambda: PFCt.read(KuP7), b''): xORj.update(yOAJ) return xORj.hexdigest()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pQm7(gIsw):\n with open(gIsw, 'rb') as eHNT:\n OZKa = eHNT.read()\n dQiW = HBct.md5(OZKa).hexdigest()\n return dQiW", "def uPUs(nUeQ):\n return HBct.md5(open(nUeQ, 'rb').read()).hexdigest()", "def OFjX(Ux0P):\n pFtS = HBct.md5()\n with open(Ux0P, 'rb') as eHNT:\n for yOA...
[ "0.84592235", "0.8336631", "0.8320332", "0.8266517", "0.8211318", "0.8209217", "0.81860566", "0.8174399", "0.81229067", "0.8108541", "0.8104981", "0.80805916", "0.80754703", "0.80649686", "0.80604374", "0.8056997", "0.80354995", "0.8032872", "0.80260384", "0.7978848", "0.7976...
0.7844282
28
Returns the number of labels inferred from labels_or_logits.
def Tk06(zaHW): if zaHW.get_shape().ndims <= 1: return 1 return zaHW.get_shape()[1].value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def svPB(YKHO):\n return len(YKHO._labels)", "def svPB(YKHO):\n return len(YKHO.get_labels())", "def svPB(YKHO):\n return len(YKHO.get_labels())", "def yMkk(YKHO):\n return len(YKHO._labels)", "def OR2u(YKHO):\n return len(YKHO.labels)", "def U9dU(YKHO):\n return len(YKHO.labels)", "d...
[ "0.7735397", "0.7701017", "0.7701017", "0.7688334", "0.76690435", "0.7601235", "0.75646317", "0.7409607", "0.72591585", "0.7233578", "0.72192043", "0.70643723", "0.70258147", "0.6999572", "0.69084615", "0.685214", "0.6785368", "0.6772563", "0.6763666", "0.67613965", "0.67526"...
0.88693696
0
This function is responsible checking if file name contains required extensions
def XT0o(Ux0P): return '.' in Ux0P and Ux0P.rsplit('.', 1)[1].lower() in UWr8
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KwnL(Ux0P):\n return Hy7s.path.splitext(Ux0P)[1] in ['.apk', '.ipa', '.zip']", "def XT0o(Emd4, uRP3):\n return '.' in uRP3 and uRP3.rsplit('.', 1)[1].lower() in Emd4.ALLOWED_EXTENSIONS", "def XT0o(Ux0P):\n return '.' in Ux0P and Ux0P.rsplit('.', 1)[-1].lower() in UWr8", "def XT0o(Ux0P: str) -> s...
[ "0.8127771", "0.8014845", "0.79907507", "0.79836226", "0.7973348", "0.7973348", "0.7965545", "0.7965545", "0.7957315", "0.79526913", "0.79515207", "0.79066545", "0.7886785", "0.7874424", "0.78707296", "0.7860645", "0.7860645", "0.7860645", "0.785562", "0.78517663", "0.7836469...
0.7908454
13
Gets all links from one site and return them into a list
def QFT9(YKHO, Z9JV): if YKHO.check_page_content(Z9JV) == False: return None oMJa = Z9JV.find_all(class_='offer-wrapper') wPdp = [Ltg2.find('a').get('href') for Ltg2 in oMJa if Ltg2.find('a').get('href') != '#'] return wPdp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LVHu(QZnA):\n return []", "def YzyF(_R2e):\n wvEv = g_HT()\n wvEv.feed(_R2e)\n return wvEv.links", "def LVHu(YKHO):\n with open(YKHO.html_main) as nPrm:\n YKHO.feed(nPrm.read())\n return YKHO.links", "def LVHu(YKHO):\n with open(YKHO.html_main) as nPrm:\n YKHO.feed(nPrm...
[ "0.7636295", "0.75685954", "0.75458175", "0.75458175", "0.7529281", "0.7516715", "0.7449254", "0.74482864", "0.74444", "0.7425606", "0.7375396", "0.7362795", "0.73245376", "0.73242164", "0.7324132", "0.73000944", "0.7296518", "0.72908735", "0.7290215", "0.728954", "0.72779953...
0.0
-1
Preprocesses a given comment by removing some characters
def cCWX(aM_I): aM_I = aM_I.encode('ascii', errors='ignore').decode() aM_I = ZbWC.sub('[^A-Za-z,. ]+', '', aM_I) return aM_I
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CVra(aM_I):\n if aM_I == '':\n pass\n elif aM_I in Fv3c:\n aM_I = ''\n elif 'pynastran' in aM_I.lower():\n aM_I = ''\n return aM_I", "def CVra(aM_I):\n aM_I = aM_I.translate({ord(Z9rn): '' for Z9rn in '#'})\n aM_I = ZbWC.sub('@[a-z0-9]*\\\\s', '', aM_I)\n aM_I = ' '....
[ "0.76053566", "0.7585055", "0.7299912", "0.72977144", "0.72166604", "0.72166604", "0.72113687", "0.7154021", "0.71431696", "0.712763", "0.71050054", "0.70504546", "0.70277184", "0.7026446", "0.7000041", "0.6994149", "0.6975864", "0.69511306", "0.69340056", "0.69234467", "0.69...
0.7145909
8
Normalize a list of sample image data in the range of 0 to 1
def NkkI(WKvO): acux = 1 BOBI = 0 return (WKvO - BOBI) * float(acux - BOBI) / (255 - 0) + BOBI
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Ku21(nPrm):\n for YRbF in range(0, len(nPrm)):\n nPrm[YRbF] = oyIN.true_divide(nPrm[YRbF], 255)\n return nPrm", "def NkkI(nPrm, Ytix, qoiF):\n Ytix, qoiF = (oyIN.array(Ytix), oyIN.array(qoiF))\n ezF6 = Ytix - qoiF\n for YRbF in oyIN.arange(nPrm.shape[1]):\n nPrm[:, YRbF] = (nPrm[...
[ "0.83538014", "0.77985626", "0.7747861", "0.76735926", "0.76516217", "0.7604868", "0.75516546", "0.75104374", "0.7497337", "0.7452633", "0.7441065", "0.74360853", "0.7432487", "0.7361382", "0.7322473", "0.73032486", "0.73029804", "0.72553664", "0.7252519", "0.724177", "0.7240...
0.0
-1
Find an empty spot on a board.
def h2Pq(YKHO, iBIi): for rdlD in iBIi: for mLGw in rdlD: if mLGw == '.': return (iBIi.index(rdlD), rdlD.index(mLGw)) return (-1, -1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AbU4(iBIi):\n for YRbF in range(len(iBIi)):\n for r845 in range(len(iBIi[0])):\n if iBIi[YRbF][r845] == 0:\n return (YRbF, r845)\n return None", "def dpSy(YKHO, iBIi):\n for rdlD in range(len(iBIi)):\n for fvDH in range(len(iBIi)):\n if iBIi[rdlD][f...
[ "0.8142768", "0.80224204", "0.7913684", "0.76585454", "0.7547117", "0.7531724", "0.7478249", "0.7449791", "0.7407481", "0.73690605", "0.7327208", "0.7277268", "0.7272186", "0.72339755", "0.7154089", "0.7108138", "0.71017504", "0.708438", "0.70760036", "0.7064416", "0.7062882"...
0.75396156
5
Check if the number can be inserted into the square.
def scjn(YKHO, iBIi, RXWL, DT55, mLGw): RXWL = int(3 * epAf.floor(RXWL / 3)) DT55 = int(3 * epAf.floor(DT55 / 3)) for YRbF in range(RXWL, RXWL + 3): for r845 in range(DT55, DT55 + 3): if iBIi[YRbF][r845] == mLGw: return False return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zp2F(YKHO, ezWE, rdlD, iVRZ, mLGw):\n if mLGw < 1 or mLGw > 9:\n return False\n rdlD = rdlD - rdlD % 3\n iVRZ = iVRZ - iVRZ % 3\n for YRbF in range(3):\n for r845 in range(3):\n if ezWE[rdlD + YRbF][iVRZ + r845] == mLGw:\n return False\n return True", "d...
[ "0.71348125", "0.70848864", "0.70704526", "0.7053878", "0.6981197", "0.6860278", "0.6857477", "0.68521047", "0.68435216", "0.67854077", "0.67721736", "0.6764891", "0.6759797", "0.67314494", "0.67210156", "0.6697305", "0.6656046", "0.6642774", "0.6603866", "0.6603128", "0.6578...
0.65504766
22
a function help ocr file with input is a file and return result in string
def ltZH(qaEx, T7CJ, TvYs, glDn=0, IcE6=False): global debug pmON = GkAb(qaEx) Ux0P = pmON.stem Fst3 = pmON.suffix Oc_Y = pmON.parent Aofo = '' if Fst3 in S5cI: ZWCE = [] UHFx = 0 UHFx, bGrB = h9oJ(pmON, Oc_Y, True) for G1Hx in range(1, UHFx + 1): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FLau(Ux0P):\n l5Ny = Z537.image_to_string(hnIv.open(Ux0P))\n return l5Ny", "def dwr7(eHpk, gIsw, rQow, kmfe):\n aM69.ocr(eHpk, gIsw, rQow, kmfe)", "def dwr7(Ux0P):\n try:\n qxPZ = hnIv.open(Ux0P)\n print(Z537.image_to_string(qxPZ))\n except IOError:\n print('File not fou...
[ "0.7531113", "0.75079936", "0.7430103", "0.7427242", "0.73599446", "0.73547184", "0.7352375", "0.7276553", "0.72577524", "0.7233449", "0.7233449", "0.7233449", "0.7233449", "0.7233449", "0.71882755", "0.7110581", "0.69228363", "0.68824977", "0.68636984", "0.67693216", "0.6738...
0.6511322
25
Determine which NumPy integer data types are valid for this finite field. At a minimum, valid dtypes are ones that can hold x for x in [0, order).
def dPVv(Emd4) -> list[oyIN.dtype]: m1c7 = [yDqo for yDqo in Z1rp if oyIN.iinfo(yDqo).max >= Emd4._order - 1] if len(m1c7) == 0: m1c7 = [oyIN.object_] return m1c7
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def s_60(*m1c7):\n Sk_F = [oyIN.zeros(2, yDqo) for yDqo in m1c7]\n mwXN = [jzdc.dtype.kind for jzdc in Sk_F]\n if not set(mwXN).issubset('iubfcO'):\n raise TypeError('dtype must be valid numpy dtype int, uint, float, complex or object')\n return oyIN.array(Sk_F).dtype", "def JkfY(Op6c):\n i...
[ "0.672397", "0.62549895", "0.6248542", "0.6240944", "0.61473334", "0.61372054", "0.6121148", "0.60655", "0.60640424", "0.5951257", "0.5928649", "0.5914953", "0.5903982", "0.58766496", "0.58697194", "0.5866054", "0.58605117", "0.5842674", "0.5821534", "0.5818888", "0.580924", ...
0.7142556
0
Using WordNet returns the synonym group for a given word
def k1mg(YKHO, GIN8): xdgl = [] if YKHO._valid_word(word=GIN8): UyRf = [] try: UyRf = X1AK.synsets(GIN8) except Exception: UyRf = [] KCHu = set((JPYg.name().split('.')[0].encode('utf-8') for JPYg in UyRf)) if len(KCHu) != 0: xdgl = [WKv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fd_d(GIN8):\n PVn9 = None\n try:\n for H9lX in X1AK.synsets(GIN8):\n for vC9B in H9lX.lemmas():\n PVn9.append(vC9B.name())\n except Exception as e:\n print(tTpl)\n return None\n return PVn9", "def ZKLx(YKHO, GIN8):\n return X1AK.synsets(GIN8)", ...
[ "0.7966493", "0.75901663", "0.75367486", "0.7121025", "0.70914274", "0.6979451", "0.6977721", "0.6945775", "0.6751371", "0.66892046", "0.6676806", "0.66716594", "0.6585578", "0.6570714", "0.6553366", "0.648347", "0.64643", "0.63530827", "0.6345851", "0.6329674", "0.63077575",...
0.80657756
0
Get the current user.
def lq67(): return zN5h.getpwuid(Hy7s.getuid())[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TKWP(YKHO):\n return DW23.get_current_user()", "def W84Y(YKHO):\n return YKHO.get_user(YKHO._auth.current_user_name)", "def W84Y(YKHO):\n return YKHO._current_user", "def W84Y():\n global user\n if CBIr is None:\n CBIr = N2qU.client.get_current_user()\n return CBIr", "def c5ow(...
[ "0.9059382", "0.90488195", "0.8846194", "0.87643605", "0.8759692", "0.8753344", "0.8648282", "0.8557783", "0.852644", "0.85017383", "0.85004824", "0.85004824", "0.85004824", "0.84996825", "0.84793586", "0.84554034", "0.84314764", "0.841798", "0.84151226", "0.84102434", "0.841...
0.0
-1
Gets the filesystem paths of the folder for the given partition (or for the entire folder)
def C7wQ(YKHO, Qrt_=''): return YKHO.get_partition_info(Qrt_)['paths']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VWrm(YKHO):\n ckRy = []\n for begE in YKHO._listdir(YKHO.devices):\n try:\n biap = EHLc(YKHO.devices, begE, YKHO.mount_check)\n except ValueError as err:\n YKHO.logger.warning('%s', XObx)\n continue\n Bfi2 = Hy7s.path.join(biap, xKW2)\n if not ...
[ "0.68609345", "0.6616278", "0.6452461", "0.63980067", "0.6396325", "0.6370943", "0.63669866", "0.6363797", "0.6274942", "0.61951494", "0.61425364", "0.6036402", "0.60092986", "0.60073197", "0.5996704", "0.5992851", "0.5989044", "0.5983314", "0.59819853", "0.5964514", "0.59613...
0.7621718
0
Writes a JSONserializable (mostly dict or list) object as JSON to a file within the folder
def uP8n(YKHO, Ux0P, YEnM): YKHO.upload_data(Ux0P, qQXR.dumps(YEnM).encode('utf-8'))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uP8n(YEnM, Sd0C):\n ubGK(BKva.dirname(Sd0C))\n with open(Sd0C, 'w') as eHNT:\n qQXR.dump(YEnM, eHNT, indent=4, separators=(',', ': '))", "def uP8n(YEnM, TcNg):\n ubGK(Hy7s.path.dirname(TcNg))\n with open(TcNg, 'w') as eHNT:\n qQXR.dump(YEnM, eHNT, indent=4, separators=(',', ': '))",...
[ "0.83322394", "0.83285457", "0.8301851", "0.8205034", "0.8189762", "0.81564236", "0.8141947", "0.8141231", "0.8098197", "0.8032118", "0.8026003", "0.7981874", "0.7967742", "0.79537493", "0.7933834", "0.7930941", "0.7910584", "0.78464645", "0.7844414", "0.7844414", "0.78351295...
0.76968867
39
Save metrics on this folder. The metrics are saved with the type "external"
def EPWW(YKHO, UMY8): return LdXW('metrics/managed-folders/save-external-values', data={'projectKey': YKHO.project_key, 'folderId': YKHO.get_id(), 'data': qQXR.dumps(UMY8)}, err_msg='Failed to save external metric values')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _0En(YKHO):\n if not Hy7s.path.isdir(YKHO.directory):\n Hy7s.makedirs(YKHO.directory)\n with open(YKHO.filepath, 'wb') as eHNT:\n t2lc.dump(YKHO.metrics, eHNT)\n PRqg.write('Saving metrics on disk')", "def aqKu(YKHO) -> None:\n jGg3: x1iM[str] = [f'{jhiz},{raIR},{dYjC}']\n for gn...
[ "0.71433526", "0.6657083", "0.66236115", "0.6560307", "0.64946467", "0.64765036", "0.6417773", "0.6342652", "0.6320369", "0.63195336", "0.6310251", "0.6210024", "0.59565157", "0.5908385", "0.5863042", "0.5858975", "0.5854006", "0.5766734", "0.5740548", "0.5737995", "0.5692572...
0.6407192
7
Returns 403 if the user doesn't have the specified permission level. If not authenticated, 403 is returned. If the user is authenticated but is not of the required permission level, 403 is returned. Otherwise, they are allowed to access the decorated view.
def eMNC(Uvf2): def mrMx(eHNT): @zaGL(eHNT) def SzLu(*qIxc, **B2fa): if not c5ow.can(Uvf2): eTsH(403) return eHNT(*qIxc, **B2fa) return SzLu return mrMx
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cgLn(IuXB, *qIxc, **B2fa):\n B2fa['redirect_to_login'] = False\n return Vhqh(IuXB, *qIxc, **B2fa)", "def Vhqh(Uvf2):\n\n def mrMx(tTee):\n\n @zaGL(tTee)\n def Nlkd(*qIxc, **B2fa):\n try:\n with Uvf2.require():\n return tTee(*qIxc, **B2fa)\n ...
[ "0.72948813", "0.72833234", "0.710761", "0.70941293", "0.7066487", "0.7032998", "0.6872005", "0.68595105", "0.6858649", "0.6795668", "0.67893565", "0.6783494", "0.6750406", "0.67450696", "0.6726239", "0.66801006", "0.66580313", "0.6653387", "0.65846753", "0.65755737", "0.6570...
0.68011516
9
Returns 404 if the user doesn't have the specified permission level. If not authenticated, 404 is returned. If the user is authenticated but is not of the required permission level, 404 is returned. Otherwise, they are allowed to access the decorated view.
def iTtL(Uvf2): def mrMx(eHNT): @zaGL(eHNT) def SzLu(*qIxc, **B2fa): if not c5ow.can(Uvf2): eTsH(404) return eHNT(*qIxc, **B2fa) return SzLu return mrMx
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Vhqh(Uvf2):\n\n def mrMx(tTee):\n\n @zaGL(tTee)\n def Nlkd(*qIxc, **B2fa):\n try:\n with Uvf2.require():\n return tTee(*qIxc, **B2fa)\n except wPvU:\n return UhOT(401, message='401 Unauthorized')\n return Nlkd\n r...
[ "0.7301768", "0.7110497", "0.7040785", "0.6757426", "0.6742408", "0.67222005", "0.66953737", "0.66951114", "0.6692005", "0.6673074", "0.6671191", "0.6657288", "0.6602984", "0.65706944", "0.6556533", "0.6537744", "0.6504536", "0.64315706", "0.64225096", "0.63924164", "0.636876...
0.72258127
1
Returns 403 if the user is not an administrator. If not authenticated, 403 is returned. If the user is authenticated but is not an administrator, 403 is returned. Otherwise, they are allowed to access the decorated view.
def lwru(eHNT): return eMNC(CXiN.ADMINISTER)(eHNT)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def XRr9(JfyU):\n\n @zaGL(JfyU)\n def Nlkd(*qIxc, **B2fa):\n if not c5ow.has_role('ADMIN'):\n if not c5ow.is_user(B2fa.get('id')):\n eTsH(401)\n return JfyU(*qIxc, **B2fa)\n return Nlkd", "def MgXm(JfyU):\n\n @zaGL(JfyU)\n def Nlkd(*qIxc, **B2fa):\n i...
[ "0.7434933", "0.73272353", "0.7267968", "0.7261401", "0.72215956", "0.71353287", "0.71274596", "0.71047235", "0.70470005", "0.70450914", "0.70321053", "0.70073116", "0.69859654", "0.6976532", "0.6969199", "0.6962034", "0.6933424", "0.6920094", "0.6870748", "0.6849268", "0.684...
0.0
-1
Returns 404 if the user is not an administrator. If not authenticated, 404 is returned. If the user is authenticated but is not an administrator, 404 is returned. Otherwise, they are allowed to access the decorated view.
def Xv5B(eHNT): return iTtL(CXiN.ADMINISTER)(eHNT)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MgXm(JfyU):\n\n @zaGL(JfyU)\n def Nlkd(*qIxc, **B2fa):\n if not c5ow.is_admin(B2fa.get('id')):\n eTsH(401)\n return JfyU(*qIxc, **B2fa)\n return Nlkd", "def XRr9(JfyU):\n\n @zaGL(JfyU)\n def Nlkd(*qIxc, **B2fa):\n if not c5ow.has_role('ADMIN'):\n if n...
[ "0.7569953", "0.752049", "0.7246468", "0.7097543", "0.7045046", "0.7028697", "0.6979923", "0.6961681", "0.69317675", "0.6913067", "0.69066244", "0.68852997", "0.68852997", "0.68505406", "0.6850212", "0.68375474", "0.68375474", "0.68297076", "0.68224204", "0.679832", "0.679766...
0.0
-1
Returns 404 if the user is not currently authenticated. This was specifically created to block the auth.login view if it's not needed. It may also be useful for hiding other views that shouldn't need to be accessed if the user isn't logged in.
def eeOh(eHNT): @zaGL(eHNT) def SzLu(*qIxc, **B2fa): if not c5ow.is_authenticated: eTsH(404) return eHNT(*qIxc, **B2fa) return SzLu
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oJmd(QePW):\n if ITdw(QePW):\n return untr()\n bD7m = QePW.route_url('login', _query=(('next', QePW.path),))\n return MEVA(location=bD7m)", "def OqnC(YKHO):\n if not YKHO.request.user.is_authenticated or YKHO.request.user.is_anonymous:\n bD7m = YKHO.request.build_absolute_uri()\n ...
[ "0.76493454", "0.719169", "0.7176418", "0.7012364", "0.6982966", "0.69123", "0.6880319", "0.6734259", "0.672685", "0.67130995", "0.6661052", "0.6654392", "0.6654392", "0.6654392", "0.6654392", "0.6654392", "0.6654392", "0.6654392", "0.6654392", "0.6654392", "0.6650281", "0....
0.62838197
41
Returns 404 if the user is currently authenticated. This was specifically created to block the auth.register view if it's not needed. It may also be useful for hiding other views that shouldn't need to be accessed if the user is logged in. It's no longer used to block auth.register due to unintended behavior of display...
def xZ9Q(eHNT): @zaGL(eHNT) def SzLu(*qIxc, **B2fa): if c5ow.is_authenticated: eTsH(404) return eHNT(*qIxc, **B2fa) return SzLu
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oJmd(QePW):\n if ITdw(QePW):\n return untr()\n bD7m = QePW.route_url('login', _query=(('next', QePW.path),))\n return MEVA(location=bD7m)", "def OqnC(YKHO):\n if not YKHO.request.user.is_authenticated or YKHO.request.user.is_anonymous:\n bD7m = YKHO.request.build_absolute_uri()\n ...
[ "0.71098995", "0.6845104", "0.67642885", "0.67143697", "0.64590806", "0.6421011", "0.6393876", "0.6368596", "0.63637614", "0.63515043", "0.63374364", "0.6324369", "0.629587", "0.6278483", "0.624944", "0.62258554", "0.620342", "0.6203074", "0.61945796", "0.618583", "0.6141877"...
0.6439283
5
Redirects to home page if the user is currently authenticated. This was specifically created to block the auth.register view if it's not needed. It may also be useful for hiding other views that shouldn't need to be accessed if the user is logged in.
def U0wD(eHNT): @zaGL(eHNT) def SzLu(*qIxc, **B2fa): if c5ow.is_authenticated: return vKnz(nKyW('main.index')) return eHNT(*qIxc, **B2fa) return SzLu
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NMoC(YKHO, *qIxc, **B2fa):\n if YKHO.request.user.is_authenticated():\n return vKnz('')\n return super(BsPH, YKHO).get(*qIxc, **B2fa)", "def NMoC(YKHO, *qIxc, **B2fa):\n if YKHO.request.user.is_authenticated():\n return vKnz('')\n return super(BsPH, YKHO).get(*qIxc, **B2fa)", "def...
[ "0.7861605", "0.7861605", "0.77246", "0.7362801", "0.7353865", "0.73348725", "0.7320975", "0.7315259", "0.7300758", "0.7212984", "0.71942496", "0.71856654", "0.7170083", "0.71511066", "0.7147111", "0.71364534", "0.71239805", "0.7098481", "0.70466626", "0.69925225", "0.6987991...
0.6918691
21
return true if pipeline should be triggered, else false based on values in LATEST item
def h2TV(fsbt): return fsbt['FileSizeKb'] >= 1024
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def w5hS(YKHO) -> h8nf[qe4Y.Input[bool]]:\n return qe4Y.get(YKHO, 'only_allow_merge_if_pipeline_succeeds')", "def w5hS(YKHO) -> h8nf[qe4Y.Input[bool]]:\n return qe4Y.get(YKHO, 'only_allow_merge_if_pipeline_succeeds')", "def w5hS(YKHO) -> qe4Y.Output[bool]:\n return qe4Y.get(YKHO, 'only_allow_merge_if_...
[ "0.65533584", "0.65533584", "0.64868283", "0.6113967", "0.6092104", "0.6092104", "0.5943349", "0.59267545", "0.5907192", "0.5875778", "0.58505315", "0.58505315", "0.5808496", "0.57790995", "0.5775701", "0.5766486", "0.5746493", "0.5734394", "0.5686727", "0.56674063", "0.56476...
0.63497233
3
Adds a maxout op which is a max pooling performed in filter/channel dimension. This can also be used after fullyconnected layers to reduce number of features.
def _DOk(g4y1, cuu0, jDK_=None, Bf31=None, rrBf=None): with IPme.name_scope(rrBf, 'MaxOut', [g4y1]) as Sa_m: g4y1 = IPme.convert_to_tensor(g4y1) ROpF = g4y1.get_shape().as_list() if jDK_ is None: jDK_ = -1 Qi3c = ROpF[jDK_] if Qi3c % cuu0: raise ValueE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rWRv(WKvO, wOkA):\n return ZylS.nn.max_pool(WKvO, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME', name=wOkA)", "def ia4U(YKHO, **B2fa):\n vHnr = YKHO.input_layer if not YKHO.all_layers else YKHO.all_layers[-1]\n YKHO.n_maxpool_layers += 1\n mWFP = 'maxpool%i' % YKHO.n_maxpool_layers\n ...
[ "0.69972426", "0.696945", "0.69374585", "0.69188625", "0.6685397", "0.6632175", "0.66230434", "0.6603302", "0.65902007", "0.65874296", "0.65857905", "0.65787446", "0.654482", "0.654204", "0.6524793", "0.6524793", "0.6522368", "0.6519492", "0.65145844", "0.64894223", "0.648937...
0.6815548
4
Update your parameters using Adam for nepochs
def sEDD(_3NM, ympj=50, Cwt5=0.025, PKKQ=(0.3, 0.3, 0.3), uBQv=(0.9, 0.999), _hZ2=1e-08): yzQ0 = oyIN.asarray(PKKQ) r8hN = oyIN.zeros(yzQ0.shape) Ty9i = oyIN.zeros(yzQ0.shape) amCV = PKKQ IBIz = oyIN.zeros(yzQ0.shape) b6G4 = oyIN.zeros(yzQ0.shape) UYNh = [] for tTpl in range(ympj): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pu93(YKHO):\n if YKHO.num_episodes_to_train_left > 0.7 * YKHO.num_episodes_to_train:\n YKHO.epsilon -= YKHO.small_decrement\n elif YKHO.num_episodes_to_train_left > 0.3 * YKHO.num_episodes_to_train:\n YKHO.epsilon -= YKHO.big_decrement\n elif YKHO.num_episodes_to_train_left > 0:\n ...
[ "0.7311612", "0.72675747", "0.72675747", "0.7003354", "0.6959724", "0.69075966", "0.68749404", "0.6851151", "0.68410665", "0.6825409", "0.6824588", "0.6814051", "0.68093675", "0.6805263", "0.6802419", "0.6801201", "0.6786164", "0.6746939", "0.67439085", "0.67282605", "0.67252...
0.0
-1
Return whether an object is a class of the correct type and is not prefixed with an underscore.
def EyMX(YKHO, YEnM): return tq_1.isclass(YEnM) and (not YEnM.__name__.startswith('_')) and issubclass(YEnM, YKHO.loadable_cls_type)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def G_RE(YKHO, **B2fa):\n if not YKHO._isKeyDict(_l=['_cn', '_o'], **B2fa):\n B2fa['msg'] = \"you must define the '_o' and '_cn' keys, stupid!\"\n YKHO.error(**B2fa)\n return False\n return B2fa['_o'].getClassname() == B2fa['_cn']", "def BaNb(rUYH):\n if rUYH[-2:] == '_t':\n ...
[ "0.71088725", "0.70351017", "0.6830503", "0.6808163", "0.67708665", "0.6711683", "0.6699144", "0.6634453", "0.6451891", "0.63873345", "0.634926", "0.63347316", "0.633211", "0.6327632", "0.6267789", "0.6222187", "0.62179416", "0.6209122", "0.6205138", "0.62008506", "0.6175594"...
0.7083805
1
Get the classes from a module that match the type we want.
def CMrj(YKHO, LCet): KndY = [] yR_P = mCgp.import_module(LCet) for NvjT in dir(yR_P): if NvjT.startswith('_'): continue fEM0 = getattr(yR_P, NvjT) if YKHO._is_correct_class(fEM0): KndY.append(fEM0) return KndY
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IZjd(yR_P):\n PcQR = yR_P.__dict__\n return (PcQR[Z9rn] for Z9rn in PcQR if isinstance(PcQR[Z9rn], type) and PcQR[Z9rn].__module__ == yR_P.__name__)", "def KndY(yR_P):\n return [mWFP for mWFP, nPrm in vars(yR_P).items() if type(nPrm) == kUyL]", "def dI3q(yR_P):\n Csk6 = yR_P.__dict__\n retur...
[ "0.8064945", "0.79920167", "0.7867603", "0.78601336", "0.7790463", "0.7470173", "0.7217676", "0.70853484", "0.69364107", "0.6839414", "0.67012066", "0.6693653", "0.6682787", "0.6659151", "0.66577286", "0.6639736", "0.66300756", "0.6623367", "0.6607521", "0.65953827", "0.65953...
0.78400826
4
Get the classes of the type we want from all modules found in the directory that defines this class.
def WWoh(YKHO): KndY = [] for pGQh, bGrB, iumf in Hy7s.walk(YKHO.path): PsRC = Hy7s.path.relpath(pGQh, YKHO.path) if PsRC == '.': pGbw = '' else: pGbw = '.%s' % '.'.join(PsRC.split(Hy7s.sep)) for IznC in iumf: tk5Y, YBcr = Hy7s.path.splitext(Iz...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KndY(YKHO):\n YKHO._load_classes()\n return YKHO._classes", "def KndY(YKHO) -> list:\n return [Hy7s.path.basename(VsIP) for VsIP in YKHO.__classes]", "def F63l(YKHO):\n KndY = {}\n yR_P = ANWz.import_module(YKHO.namespace)\n for ag0A in M7QU.iter_modules(yR_P.__path__, yR_P.__name__ + '.'...
[ "0.7937273", "0.7821563", "0.7777945", "0.77745694", "0.7638481", "0.76266253", "0.76213175", "0.74888843", "0.74888337", "0.7467294", "0.74173564", "0.73876315", "0.73813367", "0.73787314", "0.73621523", "0.7340782", "0.7324273", "0.73237306", "0.7309426", "0.7258161", "0.72...
0.8510275
0
Get loadable classes from a list of names. Each name can be a full module path or the full path to a method that returns classes to use. The latter behavior is useful to specify a method that returns a list of classes to use in a default case.
def QlzR(YKHO, MKV3): KndY = [] for HGq1 in MKV3: YEnM = mCgp.import_class(HGq1) if YKHO._is_correct_class(YEnM): KndY.append(YEnM) elif tq_1.isfunction(YEnM): for Emd4 in YEnM(): KndY.append(Emd4) else: h9sr = 'Not a class of t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Xblw(YKHO, tGDF):\n KndY = []\n for mWFP in tGDF:\n KndY.extend(YKHO._import_class_or_module(mWFP))\n return KndY", "def Xblw(YKHO, tGDF):\n KndY = []\n for mWFP in tGDF:\n KndY.extend(YKHO._import_class_or_module(mWFP))\n return KndY", "def S6mN(KZ52, t8Jk):\n G_Gx = []\...
[ "0.70935863", "0.70935863", "0.63741666", "0.62976366", "0.6253433", "0.62456375", "0.6213744", "0.61633116", "0.61633116", "0.61633116", "0.5988714", "0.5967643", "0.59561783", "0.5871936", "0.58690387", "0.58682215", "0.5857086", "0.5849174", "0.57837915", "0.57678384", "0....
0.66753227
2
Draw random samples from a multivariate normal distribution.
def mvm2(YKHO): if YKHO.mean.ndim == YKHO.cov.ndim: return Kt_s.random.randn(YKHO.mean.shape) * Kt_s.sqrt(YKHO.cov) + YKHO.mean else: return Kt_s.random.randn(YKHO.mean.shape) * Kt_s.linalg.cholesky(YKHO.cov) + YKHO.mean
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MgKA(yGTL, WTkW, Csk6=2):\n WTkW = oyIN.array(WTkW)\n yGTL = oyIN.array(yGTL)\n assert nap9(WTkW) == True\n assert WTkW.shape[0] == WTkW.shape[1]\n assert WTkW.shape[0] == yGTL.shape[0]\n exwG = WTkW.shape[0]\n vC9B = oyIN.ndarray((exwG, exwG))\n yuE1(WTkW, vC9B)\n epBp = oyIN.zeros(...
[ "0.7086603", "0.6923081", "0.6914483", "0.6902708", "0.6787683", "0.6638282", "0.6630553", "0.66188055", "0.6616203", "0.65929747", "0.6579307", "0.65754735", "0.65754735", "0.65754735", "0.65754735", "0.65455467", "0.6461732", "0.644835", "0.63739485", "0.6363216", "0.634379...
0.0
-1
Retrieve the root path for the given project. If root folder is not created yet, will create it.
def b_c3(YKHO, bNKA, *CfDx): if hasattr(bNKA, 'name'): bNKA = bNKA.name pnZl = Hy7s.path.join(oI1B.TVB_STORAGE, YKHO.PROJECTS_FOLDER, bNKA) if CfDx is not None: pnZl = Hy7s.path.join(pnZl, *CfDx) if not Hy7s.path.exists(pnZl): YKHO.check_created(pnZl) return pnZl
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Lw5n():\n VqRE = Hy7s.path.split(Hy7s.path.abspath(xAKo))[0]\n return GkAb(Hy7s.path.normpath(Hy7s.path.join(VqRE, '../../')))", "def mSqg(YKHO):\n return YKHO._project_dir", "def phdL(Emd4):\n if Emd4.__rootdir__ != None:\n return Emd4.__rootdir__\n pmON = Hy7s.getcwd()\n W06G = Z...
[ "0.7993793", "0.7808599", "0.76745653", "0.7659727", "0.765258", "0.75482035", "0.754421", "0.75032455", "0.74473214", "0.73924476", "0.738154", "0.7368323", "0.73555046", "0.73555046", "0.7336418", "0.7336418", "0.7336418", "0.7336418", "0.73034835", "0.728591", "0.725167", ...
0.0
-1
Computes the name/path of the folder where to store images.
def uyVz(YKHO, B5PH, H_p6): N9lA = YKHO.get_operation_folder(B5PH, H_p6) b1Mm = Hy7s.path.join(N9lA, YKHO.IMAGES_FOLDER) if not Hy7s.path.exists(b1Mm): YKHO.check_created(b1Mm) return b1Mm
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oRvA():\n return mkwf + '/dataset'", "def QMAG():\n Odyn = Hy7s.path.dirname(Hy7s.path.abspath(xAKo))\n Kp4Y = Hy7s.path.join(Odyn, 'dataset')\n return Kp4Y", "def zXTF(KAOR, Ux0P):\n return '{0}/{1}'.format(str(KAOR.category), Ux0P)", "def jw5Q(KAOR, Ux0P):\n return 'images/{0}/{1}/{2}...
[ "0.7970965", "0.7820758", "0.7802886", "0.76271105", "0.75979424", "0.7539826", "0.7539826", "0.74897707", "0.74651706", "0.72551966", "0.7249897", "0.7249659", "0.7235406", "0.720213", "0.7195261", "0.718792", "0.7187141", "0.7177625", "0.71586496", "0.7121647", "0.7113899",...
0.0
-1
Return the environment object. By default, the standard gym.make is used. This will work with any environments that are registered.
def SaM_(YKHO, hipr): return ch3p.make(hipr)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PEX4(nbhT):\n NI5L = ch3p.make(nbhT)\n return E0HU(NI5L)", "def GikI(YKHO) -> ch3p.Env:\n return YKHO._environment", "def xwQb():\n\n def PPff():\n sEAN = ch3p.make(I6G3).env\n return sEAN\n return PPff", "def giNa(i2I_, yokr=42):\n sEAN = ch3p.make(i2I_)\n sEAN.seed(yo...
[ "0.8122078", "0.7964737", "0.77822423", "0.7592653", "0.75852203", "0.74788624", "0.7370657", "0.73068166", "0.7251406", "0.7240074", "0.71357274", "0.7116994", "0.70995134", "0.709059", "0.6990341", "0.6976437", "0.69545966", "0.6934801", "0.6925372", "0.6883376", "0.6868785...
0.6537591
43
Returns the difference between [,index1] and [,index2] in 2D array.
def _eoL(nPrm, oZf4=0, YBiN=1): return nPrm[:, oZf4] - nPrm[:, YBiN]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qTTS(EcVT, fuBA):\n if len(fuBA) > 0:\n Nk6w = NszK(EcVT, fuBA)\n return EcVT[oyIN.invert(Nk6w)]\n else:\n return EcVT", "def RJTk(EcVT, fuBA):\n if len(fuBA) > 0:\n Nk6w = IGjx(EcVT, fuBA)\n return EcVT[oyIN.invert(Nk6w)]\n else:\n return EcVT", "def b...
[ "0.63850665", "0.63426155", "0.6239153", "0.61822337", "0.6170302", "0.61669713", "0.616423", "0.6067677", "0.60229623", "0.6013691", "0.5994336", "0.59875464", "0.59842145", "0.5946801", "0.590802", "0.58841896", "0.58810425", "0.5848849", "0.582541", "0.58244234", "0.579146...
0.7170036
0
Posts guild stats to bot lists
async def poststats(YKHO, OaeV): raTX = ZOrr.utils.get(YKHO.bot.emojis, name='check') duFh = ZOrr.utils.get(YKHO.bot.emojis, name='notcheck') djCu = await OaeV.send('Hold on a sec...') G9jH.info('poster: forcing post') z99A = await OaeV.send('Posting to discordbots.org...') if YKHO.bot.config['d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def post_bot_stats(YKHO):\n x0hE = YKHO.client_reference()\n if x0hE is not None:\n zAr_ = len(x0hE.guilds)\n O_th = x0hE.shard_count\n if O_th < 1:\n O_th = 1\n nPrm = {GH92: zAr_, uQ41: O_th, hg2U: 0}\n await YKHO._post_bot_stats(nPrm)", "async def upda...
[ "0.77858007", "0.7400219", "0.730099", "0.72467804", "0.710945", "0.7005265", "0.68895054", "0.6884253", "0.68702", "0.6847056", "0.6826327", "0.6799607", "0.67399544", "0.6590776", "0.6519686", "0.644927", "0.6402296", "0.6359474", "0.6307676", "0.62536347", "0.6232392", "...
0.65649045
14
function that normalizes each row of the matrix x to have unit length.
def aB7J(WKvO: np.ndarray): return oyIN.nan_to_num(WKvO / oyIN.linalg.norm(WKvO, ord=2, axis=1, keepdims=True))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def U95B(WKvO):\n return WKvO / oyIN.linalg.norm(WKvO, axis=1)[:, None]", "def U95B(WKvO):\n assert WKvO.shape == (WKvO.shape[0], WKvO.shape[1])\n WzsH = oyIN.linalg.norm(WKvO, axis=1, keepdims=True)\n WKvO = WKvO / WzsH\n return WKvO", "def U95B(WKvO):\n WzsH = oyIN.linalg.norm(WKvO, axis=1,...
[ "0.85635364", "0.8435067", "0.8362519", "0.83593357", "0.8238242", "0.82160395", "0.7982183", "0.7844923", "0.7730866", "0.7615112", "0.7567788", "0.7473363", "0.7461505", "0.73203593", "0.73058456", "0.7305425", "0.7299641", "0.7273705", "0.72689486", "0.72476506", "0.721355...
0.81065845
6
Get the absolute path to the resource, works for dev and for PyInstaller
def JFat(t_yv): try: XSj5 = HwRy._MEIPASS except Exception: XSj5 = Hy7s.path.abspath('.') return Hy7s.path.join(XSj5, t_yv)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gZBG():\n return khtY.abspath(khtY.join(khtY.dirname(xAKo), 'resources') + khtY.sep)", "def JFat(t_yv):\n try:\n XSj5 = HwRy._MEIPASS\n except Exception:\n XSj5 = Hy7s.path.abspath('.')\n return Hy7s.path.join(XSj5, t_yv)", "def pvk3(t_yv):\n try:\n XSj5 = HwRy._MEIPASS\...
[ "0.8612878", "0.81515604", "0.81485933", "0.8134131", "0.80582964", "0.8044884", "0.8030166", "0.80179554", "0.80165654", "0.8016362", "0.8016362", "0.8016362", "0.8016362", "0.8005256", "0.79996383", "0.79994637", "0.79994637", "0.79994637", "0.79994637", "0.79994637", "0.79...
0.7974895
33
A tumblelog entry is published if its status is in the PUBLISHED_ENTRY_STATES list in BloggingSettings (which can be overriden in the main settings file by setting BLOGGING_PUBLISHED_ENTRY_STATES) the pub_date attribute is not in the future.
def xBxz(YKHO): return YKHO.get_query_set().filter(status__in=wssj.PUBLISHED_ENTRY_STATES).exclude(pub_date__gt=qcWV.datetime.now())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Z_kM(YKHO):\n qh4Q = YKHO.entry.publish()\n YKHO.assertIsNotNone(qh4Q)", "def FhQf(YKHO):\n return YKHO.status == EloR.published and YKHO.timestamp <= LgWF.now()", "def FhQf(YKHO):\n return YKHO.publish_time and YKHO.publish_time <= qcWV.now()", "def Wgdd(vC92, KAOR, _EYN, **B2fa):\n if ge...
[ "0.68284535", "0.6411282", "0.63284415", "0.6247805", "0.6165935", "0.6165935", "0.6138926", "0.613697", "0.6134847", "0.6115707", "0.60850763", "0.6004865", "0.5937156", "0.5937156", "0.5937156", "0.5937156", "0.58819515", "0.587577", "0.5803252", "0.5789018", "0.5750557", ...
0.72724795
0
Creates the request header with Authorization value expected by canvas
def jXlU(): return {'Authorization': 'Bearer {}'.format(GikI.TOKEN)}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nrOS(YKHO, QePW):\n QePW.headers['Authorization'] = ' '.join((YKHO.header_format, YKHO.token))\n return QePW", "def OANM(YKHO, xqoZ):\n H2rA = YKHO.signer.algorithm + ' ' + 'Credential=' + YKHO.signer.getAccessKey() + '/' + YKHO.make_credential_scope(xqoZ) + ', ' + 'SignedHeaders=' + YKHO.make_signe...
[ "0.76323736", "0.74922836", "0.74676687", "0.74446714", "0.7298438", "0.72666985", "0.72464186", "0.722678", "0.7211972", "0.7155169", "0.71415824", "0.71364164", "0.71071035", "0.7106968", "0.7106968", "0.70860004", "0.7082183", "0.7068879", "0.7054144", "0.7014019", "0.7010...
0.7798351
0
Returns this blog's URL and domain.
def tcAz(OUVJ, ZJ03=None): for YPpA in tU6l(OUVJ.user_json).get('user', {}).get('blogs', []): if ZJ03 and ZJ03 == YPpA.get('name') or (not ZJ03 and YPpA.get('primary')): return ([YPpA['url']], [gnPz.domain_from_link(YPpA['url']).lower()]) return ([], [])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rK2Y(YKHO):\n raise NotImplementedError", "def zrIJ(YKHO):\n ht58, GbKX, *bGrB = YKHO.components\n return m7V9(uRlK.parse.urlunsplit((ht58, GbKX, '', '', '')))", "def UWNm(YKHO) -> str:\n return YKHO.request.host_url", "def zrIJ(YKHO):\n hyEb = KVWQ(YKHO.url)\n return '%s://%s' % (hyEb....
[ "0.7258827", "0.7230118", "0.71630955", "0.71500623", "0.7129801", "0.7069671", "0.7066249", "0.70388865", "0.7034683", "0.7034683", "0.70151436", "0.69939226", "0.69614464", "0.69461876", "0.69245803", "0.6902549", "0.6862701", "0.6839611", "0.68372905", "0.6787548", "0.6774...
0.0
-1
Clears the node from the inverse components map and the forward components map.
def kbhD(YKHO, Q6kx): cMkz = YKHO.inverse_components[Q6kx] del YKHO.inverse_components[Q6kx] YKHO.components[cMkz].remove(Q6kx) if len(YKHO.components[cMkz]) == 0: del YKHO.components[cMkz]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Y7Bk(YKHO):\n YKHO._adj.clear()\n YKHO._node.clear()\n YKHO._map.clear()\n YKHO.graph.clear()", "def Y7Bk(YKHO):\n YKHO._nodes = set()\n YKHO._name_to_nodes = {}\n YKHO._obj_to_nodes = {}\n YKHO._obj_name_to_nodes = {}\n YKHO._mesh_nodes = set()\n YKHO._point_light_nodes = set()...
[ "0.71507406", "0.71404666", "0.7006739", "0.7002659", "0.693371", "0.6919786", "0.6873921", "0.6802273", "0.68000084", "0.67288226", "0.67259383", "0.67106026", "0.67002213", "0.6696676", "0.66829586", "0.6674696", "0.66349804", "0.65931076", "0.6584476", "0.6581409", "0.6544...
0.7220518
0
GetActivatedUsers() > ReadOnlyCollection[ContentUser] Returns a list of the activated users.
def hSdB(): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hSdB():\n pass", "def iOuf(YKHO):\n return YKHO.filter(is_active=True)", "def iOuf(YKHO):\n for CBIr in YKHO.users:\n if CBIr.active:\n yield CBIr", "def VE4R(YKHO) -> x1iM[mv1M]:\n return YKHO._users", "def VE4R(YKHO) -> list:\n return YKHO.__users", "def hfrA(YKHO):...
[ "0.77536184", "0.73435074", "0.7050648", "0.7012112", "0.693769", "0.68638736", "0.67884135", "0.6747557", "0.6747557", "0.6721796", "0.66933286", "0.6662826", "0.6662826", "0.66625214", "0.66618544", "0.6651844", "0.6639136", "0.6631776", "0.6605083", "0.65965176", "0.658704...
0.74299777
1
Entity instances referring to the same entity always have the same OID, revision, and field values, and are also equal.
def NlVx(YKHO): bkz0 = NCls.execute(NCls.Realm.t.create(name='Foo')) assert bkz0.s.oid == 1 assert bkz0.s.rev == 0 assert bkz0.name == 'Foo' wdhe = NCls.execute(bkz0.t.update(name='Bar')) assert wdhe.s.oid == 1 assert wdhe.s.rev == 1 assert wdhe.name == 'Bar' assert bkz0 == wdhe ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BkoA():\n QPNW = XPox(id=1000, sub_id='sub_1000', name='joe', populate_all=k0id)\n BYVc = XPox(id=1000, sub_id='sub_1000', name='adrian', populate_all=k0id)\n assert QPNW == BYVc\n dKqh = IVLh(id='2000', name='carol', populate_all=k0id)\n V0Dp = IVLh(id='2000', name='martin', populate_all=k0id)\...
[ "0.7038842", "0.6791411", "0.6647749", "0.6646856", "0.6312108", "0.6309596", "0.62335926", "0.6232678", "0.62170917", "0.62083966", "0.62026095", "0.6191446", "0.61701125", "0.6157041", "0.6061147", "0.60179394", "0.5966235", "0.5940111", "0.59308416", "0.59075195", "0.59053...
0.65345466
4
Take the FFT of a regular grid. Assumes multiple frames.
def jt8x(BkYD): aM8h = oyIN.product(BkYD.shape[-2:]) m6Me = oyIN.fft.fft2(oyIN.array(BkYD)) G3kw = 'complex' if G3kw == 'real': IAfL = oyIN.real(m6Me) elif G3kw == 'absolute': IAfL = oyIN.absolute(m6Me) elif G3kw in ['complex', 'complex_real']: IAfL = m6Me else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MRlR(nPrm):\n nPrm = hVLt(nPrm)\n nPrm = oyIN.asarray(nPrm, dtype=float)\n exwG = nPrm.shape[0]\n if exwG <= 32:\n return GN36(nPrm)\n else:\n C_CQ = MRlR(nPrm[1::2])\n vf3I = MRlR(nPrm[::2])\n aM8h = oyIN.exp(-2j * oyIN.pi * oyIN.arange(exwG) / exwG)\n return ...
[ "0.65519106", "0.6542247", "0.6410122", "0.63243467", "0.62839645", "0.6255946", "0.6194326", "0.61794424", "0.60982156", "0.60749185", "0.60545033", "0.6016192", "0.6007301", "0.5981926", "0.5943711", "0.5934999", "0.59312826", "0.5926498", "0.5918797", "0.5870985", "0.58510...
0.5444205
71
Compute the number of grid points to get as close as possible to a particular spacing.
def Kd6J(YKHO, M8d_, qizI): return oyIN.array([round(YRbF) for YRbF in oyIN.mean(M8d_, axis=0) / qizI])[:2].astype(int)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vKvO(YKHO):\n return YKHO.gd.N_c", "def s_6m(YKHO) -> int:\n raise NotImplementedError('Not implemented yet.')", "def U4F5(YKHO):\n return oyIN.product([len(list(jDK_.values())[0]) for jDK_ in YKHO.axes])", "def SuSg(YKHO):\n F6d5 = PZyS(len(YKHO.text.colors))\n if F6d5 % 1 == 0:\n ...
[ "0.7321451", "0.7087113", "0.70461977", "0.6914151", "0.68442994", "0.6639053", "0.66153204", "0.6593183", "0.6583731", "0.65618366", "0.65419257", "0.65360945", "0.64662653", "0.6402672", "0.63664216", "0.63620883", "0.6361957", "0.6309194", "0.6298461", "0.629439", "0.62922...
0.7085686
2
Test that weather addition result in correct compound weather and emoji
def MstQ(): H7KE = jYEv('rain') BadC = jYEv('sun') dcxj = H7KE + BadC assert str(dcxj) == 'Sun, Rain' assert dcxj.emoji() == '🌈'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def O731():\n BadC = jYEv('sun')\n r_1b = jYEv('wind')\n s1k6 = r_1b + BadC\n xMw6 = BadC + r_1b\n assert str(s1k6) == str(xMw6) == 'Sun, Wind'\n assert s1k6.emoji() == xMw6.emoji() == '☀️💨'", "def xvKh(YKHO, yzQ0, Z9rn, Ylbp):\n sum = yzQ0 + Z9rn\n j9tF = nGb9({G1Hx: round(Ty9i, 10) if ...
[ "0.6730038", "0.6460137", "0.6281557", "0.62370175", "0.61360383", "0.6092507", "0.5925238", "0.5867748", "0.5821267", "0.57998663", "0.57623374", "0.5721148", "0.5672157", "0.5667908", "0.5625557", "0.56040674", "0.5597921", "0.55798817", "0.5577289", "0.55407876", "0.553712...
0.80866724
0
Returns true if clause has premise p
def f53G(YKHO, XP5J): if XP5J in YKHO.predicates: return True else: return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CsgF(YKHO, XP5J):\n return [Z9rn for Z9rn in YKHO.clauses if Z9rn.op == '==>' and XP5J in lXkf(Z9rn.args[0])]", "def OtRG(YKHO, XP5J):\n if YKHO.has_premise(XP5J):\n YKHO.predicates.remove(XP5J)", "def mgfm(YKHO, XP5J):\n return YKHO.a * XP5J.x + YKHO.b * XP5J.y + YKHO.c == 0", "def bJYl(...
[ "0.7359885", "0.67211926", "0.62189484", "0.60588473", "0.60393476", "0.5999654", "0.5985376", "0.5973048", "0.58983284", "0.58517826", "0.57736754", "0.57715666", "0.57382214", "0.5730654", "0.57292825", "0.5686448", "0.56342274", "0.5629258", "0.56281054", "0.56110644", "0....
0.86712044
0
Returns the even occuring element within a list of integers
def e2Zq(ezWE): dict = {} for mLGw in ezWE: if mLGw in dict: dict[mLGw] += 1 else: dict[mLGw] = 1 for mLGw in dict: if not dict[mLGw] & 1: return mLGw
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pQ1W(IqQl: list) -> int:\n for YRbF in IqQl:\n if YRbF % 2 == 0:\n return YRbF\n else:\n raise ValueError", "def KXw8(yv6U: list) -> int:\n return [G1Hx for G1Hx, Ty9i in mBkc(yv6U).items() if Ty9i % 2 != 0][-1]", "def KXw8(muhn):\n ANfV = 0\n for YRbF in range(len(m...
[ "0.78017944", "0.77196324", "0.766678", "0.76496005", "0.7579635", "0.74978775", "0.74036306", "0.72332126", "0.7198722", "0.7195681", "0.707258", "0.7062073", "0.70317364", "0.6998972", "0.6989592", "0.69276315", "0.688497", "0.686491", "0.6841293", "0.68100214", "0.67694235...
0.7123071
10
String representation of the model.
def zAg0(YKHO): return str(YKHO.id)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zAg0(YKHO):\n return str(YKHO.__model)", "def zAg0(YKHO):\n return str(YKHO.model)", "def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\t' + _2sc + ' instance\\n'\n oOUF += '--...
[ "0.83542144", "0.8350998", "0.80266356", "0.7939946", "0.7888102", "0.7829347", "0.7792001", "0.77553594", "0.77446085", "0.77446085", "0.774293", "0.77246594", "0.772151", "0.7688688", "0.7688688", "0.76778334", "0.76715124", "0.76479137", "0.76479137", "0.76479137", "0.7611...
0.0
-1
Load an image converting from grayscale or alpha as needed. Adapted from KChen
def oShT(Ux0P, qfpW=True, wMua=False): if wMua: VXjJ = hnIv.open(Ux0P) else: VXjJ = xDSY.imread(Ux0P, as_gray=not qfpW) if wMua: return VXjJ if VXjJ.ndim == 2: VXjJ = VXjJ[:, :, oyIN.newaxis] if qfpW: VXjJ = oyIN.tile(VXjJ, (1, 1, 3)) elif VXjJ.sha...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DZ0a(Ux0P: str, nTji: Optional[Union[bool, int]]=False) -> int:\n pass", "def fbMT(C7_O):\n LNo8 = hnIv.open(C7_O)\n LNo8 = LNo8.convert('RGB')\n LNo8 = DWkG(LNo8).float()\n LNo8 = NkkI(LNo8).float()\n LNo8 = LNo8.unsqueeze(0)\n return LNo8", "def AXOg(eHNT, sLB9=False):\n from ..io...
[ "0.7144838", "0.7016087", "0.7002167", "0.6989325", "0.6949039", "0.68736285", "0.6868703", "0.68461585", "0.6792533", "0.6774051", "0.6771289", "0.67692566", "0.6769188", "0.6756157", "0.67494196", "0.6748218", "0.6739129", "0.67332965", "0.67080647", "0.6705651", "0.6694677...
0.6562548
41
Context manager for changing the current working directory. Will return to original directory even on error.
def n0iL(ddn9): N8sm = Hy7s.getcwd() Hy7s.chdir(Hy7s.path.expanduser(ddn9)) try: yield finally: Hy7s.chdir(N8sm)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aOxl():\n\n @QZXY.contextmanager\n def Psj8(dir):\n try:\n lbsy = Hy7s.getcwd()\n yield Hy7s.chdir(dir)\n finally:\n Hy7s.chdir(lbsy)\n return Psj8", "def RJDP(ddn9):\n N8sm = Hy7s.getcwd()\n Hy7s.chdir(ddn9)\n yield\n Hy7s.chdir(N8sm)", "...
[ "0.7963663", "0.78121895", "0.77293575", "0.76400054", "0.75955045", "0.75807095", "0.7545098", "0.75284404", "0.75231165", "0.7515849", "0.75008184", "0.7474929", "0.7474929", "0.74644786", "0.7429028", "0.7424483", "0.742253", "0.742253", "0.7389275", "0.73291826", "0.73157...
0.7025908
40
Converts a Python str (ASCII) to a C string literal. >>> str_to_c_string('abc\x8c') '"abc\\\\x8c"'
def yvRt(vIwR): return repr(vIwR).replace("'", '"')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ylYC(vIwR):\n return gk2W.c_char_p(vIwR.encode('utf-8'))", "def eVlB(l5Ny):\n l5Ny = l5Ny.replace('\\\\', '\\\\\\\\')\n l5Ny = l5Ny.replace('\\n', '\\\\n')\n l5Ny = l5Ny.replace('\\r', '')\n l5Ny = l5Ny.replace('\"', '\\\\\"')\n return l5Ny", "def umrk(I_Ra):\n if len(I_Ra) > 0:\n ...
[ "0.77975416", "0.6983021", "0.69241697", "0.68252784", "0.67032266", "0.6582977", "0.6509787", "0.6467785", "0.6434267", "0.6419677", "0.6397498", "0.6269791", "0.6245815", "0.6102517", "0.607999", "0.60511124", "0.59830683", "0.59830683", "0.59178567", "0.58710986", "0.58434...
0.79624075
0
Function to take arbitrary lists and split them to chunks of 1000 max.
def yOAJ(aNS8, Lli3): Lli3 = max(1, Lli3) return [aNS8[YRbF:YRbF + Lli3] for YRbF in range(0, len(aNS8), Lli3)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kzv7(ybN4, exwG):\n return list(eHxA(ybN4, exwG))", "def eHxA(bCES, mTYt):\n dixj = []\n for YRbF in range(0, len(bCES), mTYt):\n dixj.append(bCES[YRbF:YRbF + mTYt])\n return dixj", "def AyNP(YKHO, yv6U, exwG=100):\n for YRbF in range(0, len(yv6U), exwG):\n yield yv6U[YRbF:YRbF...
[ "0.78569263", "0.7810893", "0.7809438", "0.7803168", "0.7778709", "0.77354306", "0.75609547", "0.7552468", "0.75447327", "0.75414467", "0.7520141", "0.7516814", "0.7493473", "0.7492751", "0.7489535", "0.74824566", "0.74818283", "0.74801433", "0.7474876", "0.7466546", "0.74560...
0.7592941
6
alias for self.repository. Use for interface compat with CatalogImageDocker
def boHx(YKHO): return YKHO.repository
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bFeS(YKHO):\n return YKHO._repository_name", "def Nshl(YKHO) -> h8nf[qe4Y.Input['ServiceSourceConfigurationImageRepositoryArgs']]:\n return qe4Y.get(YKHO, 'image_repository')", "def FIMM(YKHO, F3jJ):\n YKHO.repository = F3jJ", "def gqXR(YKHO):\n return f'{gCuF.COMPONENTS_REGISTRY_URL}/{gCuF.C...
[ "0.68005484", "0.6501224", "0.64559", "0.6444677", "0.6413536", "0.6413536", "0.64106005", "0.63925433", "0.63598204", "0.6342983", "0.6335892", "0.63015014", "0.62985307", "0.624973", "0.6214022", "0.61852044", "0.6147674", "0.6142188", "0.614213", "0.6122637", "0.6082824", ...
0.64243937
4
Password that will be used by vSphere to authenticate to the host.
def jTXt(YKHO) -> qe4Y.Input[str]: return qe4Y.get(YKHO, 'password')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jTXt(YKHO) -> str:\n return qe4Y.get(YKHO, 'password')", "def jTXt(YKHO) -> str:\n return qe4Y.get(YKHO, 'password')", "def jTXt(YKHO) -> str:\n return qe4Y.get(YKHO, 'password')", "def jTXt(YKHO) -> str:\n return qe4Y.get(YKHO, 'password')", "def jTXt(YKHO):\n return YKHO._get('password...
[ "0.738367", "0.738367", "0.738367", "0.738367", "0.7292352", "0.7272804", "0.72542113", "0.71259713", "0.7094046", "0.7082906", "0.7082906", "0.7082906", "0.7082906", "0.7082906", "0.7082906", "0.7082906", "0.7082906", "0.7082906", "0.7082906", "0.7082906", "0.7082906", "0....
0.66994894
54