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
Verifies the matrices input to the constructor are valid. Namely that they have the correct dimension and are of the correct size.
def z0lW(YKHO, SppC, T4Wy): ROpF = oyIN.shape(SppC) zNig = oyIN.size(SppC) Htse = len(ROpF) if Htse != 2: jMN5 = f'Invalid number of dimensions ({Htse}) of {T4Wy} matrix. Must be exactly 2.' raise a5Tj(jMN5) if zNig == 0: jMN5 = f'Input for {T4Wy} matrix is empty.' ra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MZ5v():\n GeTY = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]\n A3Vt = zTi3.check_matrix(GeTY)\n SjMt(type(A3Vt), oyIN.ndarray)\n SjMt(A3Vt.dtype, oyIN.float64)\n zmW0 = oyIN.eye(3, dtype=int)\n A3Vt = zTi3.check_matrix(zmW0)\n SjMt(type(A3Vt), oyIN.ndarray)\n SjMt(A3Vt.dtype, oyIN.float64)\n d...
[ "0.7092925", "0.7081533", "0.6861642", "0.68299127", "0.66504246", "0.6575466", "0.65492", "0.65021735", "0.6453702", "0.64181834", "0.6350612", "0.63066745", "0.6243306", "0.62196493", "0.6219351", "0.62112993", "0.62034065", "0.61877036", "0.61798847", "0.61647403", "0.6159...
0.62284935
13
Calculate ious between 2 sets of bounding boxes.
def RjuK(jzdc: np.ndarray, Fg_i: np.ndarray) -> oyIN.ndarray: if jzdc.ndim == 1: jzdc = oyIN.expand_dims(jzdc, axis=0) if Fg_i.ndim == 1: Fg_i = oyIN.expand_dims(Fg_i, axis=0) assert jzdc.shape[0] == 1 or jzdc.shape[1] == 1 or jzdc.shape[0] == Fg_i.shape[0] XMlP = oyIN.array([oyIN.maximu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VQ3Z(Bsc6, IUcw):\n Bsc6 = oyIN.array(Bsc6, oyIN.float32)\n IUcw = oyIN.array(IUcw, oyIN.float32)\n hzH7 = oyIN.maximum(Bsc6[:, 0], IUcw[:, 0])\n eUGk = oyIN.minimum(Bsc6[:, 0] + Bsc6[:, 2] - 1, IUcw[:, 0] + IUcw[:, 2] - 1)\n qki8 = oyIN.maximum(eUGk - hzH7 + 1, oyIN.zeros_like(Bsc6[:, 0]))\n ...
[ "0.838403", "0.79358643", "0.78555566", "0.7832804", "0.7827173", "0.7827173", "0.7823096", "0.78191894", "0.77358013", "0.7707601", "0.7689905", "0.765328", "0.7650662", "0.764062", "0.7630192", "0.75576484", "0.75301754", "0.751802", "0.74724", "0.74578667", "0.745178", "...
0.6839707
63
Get one board item
def OP2O(YKHO, YRbF): if not (isinstance(YRbF, int), 0 < YRbF < 10): raise IndexError('Index should be 0 < int < 10, not %s' % YRbF) return YKHO.__values[YRbF]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NMoC(YKHO, d6pt):\n return YKHO.board[d6pt]", "def kTCt(YKHO, DumB, LVAh, WKvO):\n if YKHO.maze[LVAh][WKvO] != ' ' and YKHO.maze[LVAh][WKvO] in DumB:\n return YKHO.maze[LVAh][WKvO]\n else:\n return None", "def Iov8(YKHO):\n return YKHO.getItem(0)", "def l80C(YKHO, rdlD, fvDH):\n...
[ "0.7098689", "0.66091263", "0.6552224", "0.64883924", "0.6486414", "0.6442375", "0.6423522", "0.6415295", "0.6415295", "0.63490134", "0.6321418", "0.63005775", "0.627153", "0.62689775", "0.62689775", "0.62665313", "0.62419206", "0.6235657", "0.6232224", "0.62227714", "0.62174...
0.0
-1
Return locators of DashboardContainer.
def GgBO(YKHO): return uG8F.DashboardWidget
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def e7YI(YKHO):\n return JKCy.Dashboards(YKHO)", "def e7YI(YKHO) -> dict:\n return PSrQ.get_dashboards()", "def uSz2(YKHO) -> KFoa:\n return YKHO._widgets", "def yqYz(YKHO):\n return YKHO.__containers", "def AdfU(YKHO):\n return YKHO.q(css=C1zu.BODY_SELECTOR).map(lambda geyT: C1zu(YKHO.brows...
[ "0.66383785", "0.63376087", "0.5810995", "0.55801463", "0.55237746", "0.54589236", "0.5451895", "0.54436105", "0.5376329", "0.5299837", "0.52755165", "0.5230462", "0.5208505", "0.5191929", "0.51867664", "0.51803154", "0.5110818", "0.5107517", "0.51026326", "0.5087864", "0.508...
0.8140773
0
Called when the user specifies an intent for this skill
def E97p(McO3, cuiw): print('on_intent requestId=' + McO3['requestId'] + ', sessionId=' + cuiw['sessionId']) E2VF = McO3['intent'] q8Qy = McO3['intent']['name'] if q8Qy == 'ConfirmYesOrNo': return QVLq(E2VF, cuiw) elif q8Qy == 'CheckAnswer': return E4sG(E2VF, cuiw) elif q8Qy == '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def E97p(McO3, cuiw):\n E2VF = McO3['intent']\n q8Qy = McO3['intent']['name']\n if q8Qy not in eduI:\n q8Qy = 'NullSkill'\n if q8Qy in eduI:\n try:\n return eduI[q8Qy].execute(E2VF, cuiw)\n except Exception as e:\n wVCK.print_exc()\n return srwk().r...
[ "0.71420133", "0.69547683", "0.6947687", "0.6904298", "0.68916833", "0.6762635", "0.67533505", "0.67214155", "0.67193514", "0.6714963", "0.6697724", "0.6691365", "0.66685253", "0.66434884", "0.66413116", "0.6637183", "0.66071934", "0.659293", "0.6574297", "0.65689635", "0.655...
0.65511
22
Returns a 2D list (x,y order) of Color instances forming a rainbow grid.
def VEqi(DbyF, Itb_=100, ht58=None): if ht58 == None or len(ht58) < 5: ht58 = [Jw9H.firebrick, Jw9H.orangered, Jw9H.darkgoldenrod, Jw9H.olivedrab, Jw9H.ReportLabBlue, Jw9H.purple] ht58 = map(Jw9H.Whiter, ht58, [0.01 * Itb_] * len(ht58)) yzQ0, MKlR = DbyF Cs6h = list() for WKvO in Ni9Y(yzQ0):...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Jw9H(YKHO):\n return [(0, 30, 255), (0, 30, 120)]", "def fRt4(YKHO):\n WKvO = oyIN.linspace(0, 1, YKHO.length)\n LVAh = WKvO ** YKHO.gamma\n BWXx = oyIN.linspace(0, 1, len(YKHO.colors))\n Mkmy = oyIN.interp(LVAh, BWXx, YKHO.colors[:, 0])\n Oa1e = oyIN.interp(LVAh, BWXx, YKHO.colors[:, 1])\n...
[ "0.71153075", "0.7082364", "0.683329", "0.68308556", "0.67883456", "0.6770876", "0.6768966", "0.6710245", "0.6667389", "0.66423357", "0.6587759", "0.65487933", "0.6524343", "0.65196866", "0.6495592", "0.64787835", "0.64762986", "0.64577943", "0.64474887", "0.6348424", "0.6343...
0.63807166
19
Returns a list of Color instances forming a linear rainbow.
def wC8r(u54L, Itb_=100, ht58=None): if ht58 == None or len(ht58) < 2: ht58 = [Jw9H.firebrick, Jw9H.orangered, Jw9H.darkgoldenrod, Jw9H.olivedrab, Jw9H.ReportLabBlue, Jw9H.purple] ht58 = map(Jw9H.Whiter, ht58, [0.01 * Itb_] * len(ht58)) zFiD = list() IMqW = ht58[:] for YRbF in Ni9Y(u54L): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fRt4(exwG):\n qfpW = Bcwd.rainbow(oyIN.linspace(0, 1, exwG))\n return qfpW", "def Ol6_(exwG):\n F4JO = []\n KCHu, Ty9i = (0.75, 0.9)\n Z9rn = KCHu * Ty9i\n r8hN = Ty9i - Z9rn\n for MKlR in oyIN.arange(25, 385, 360.0 / exwG).astype(int):\n y_mn = MKlR / 60.0\n WKvO = Z9rn * ...
[ "0.7086317", "0.7059586", "0.7009241", "0.6722111", "0.66597915", "0.65825224", "0.6564333", "0.6550826", "0.65156215", "0.6505393", "0.6485287", "0.6483748", "0.6400803", "0.63780415", "0.63561976", "0.6355887", "0.63304996", "0.6277926", "0.62613267", "0.62559", "0.62477225...
0.6399597
13
Calculates the area of a triangle.
def a1HB(y4fz, EBgd, HpuQ): return 0.5 * (-EBgd[1] * HpuQ[0] + y4fz[1] * (-EBgd[0] + HpuQ[0]) + y4fz[0] * (EBgd[1] - HpuQ[1]) + EBgd[0] * HpuQ[1])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def x5JU(tXIo):\n return 0.5 * L3jt(En6R(tXIo, False))", "def cGOR(tXIo):\n jzdc = T97B(tXIo[0], tXIo[1])\n Fg_i = T97B(tXIo[0], tXIo[2])\n Z9rn = T97B(tXIo[1], tXIo[2])\n assert jzdc >= 0.0\n assert Fg_i >= 0.0\n assert Z9rn >= 0.0\n KCHu = (jzdc + Fg_i + Z9rn) / 2.0\n try:\n r...
[ "0.85175955", "0.8409884", "0.84009516", "0.83530307", "0.8344421", "0.82872856", "0.8254128", "0.8103333", "0.80790335", "0.8029053", "0.8011744", "0.7903753", "0.78288335", "0.78248346", "0.78085166", "0.77907896", "0.771046", "0.770271", "0.7579557", "0.74689156", "0.73563...
0.7800442
15
Calculate the great circle distance between two points on the earth (specified in decimal degrees) in meters
def GeVo(GgQG, igSk, tk0B, TGuP): GgQG, igSk, tk0B, TGuP = map(Y_1E, [GgQG, igSk, tk0B, TGuP]) H91H = tk0B - GgQG n_9K = TGuP - igSk jzdc = YUNn(n_9K / 2) ** 2 + YhSR(igSk) * YhSR(TGuP) * YUNn(H91H / 2) ** 2 Z9rn = 2 * P099(PZyS(jzdc)) Mkmy = 6371000 return Z9rn * Mkmy
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KzuF(rCSf, hjIX, FNKk, T3JP):\n hjIX = r8hN.radians(hjIX)\n rCSf = r8hN.radians(rCSf)\n T3JP = r8hN.radians(T3JP)\n FNKk = r8hN.radians(FNKk)\n Csk6 = 2 * 6367.45 * r8hN.asin(r8hN.sqrt(GeVo(FNKk - rCSf) + r8hN.cos(rCSf) * r8hN.cos(FNKk) * GeVo(T3JP - hjIX)))\n return Csk6", "def T97B(GgQG, ...
[ "0.81600857", "0.7973732", "0.7909746", "0.7767874", "0.773428", "0.76952547", "0.7680172", "0.766428", "0.76400167", "0.762264", "0.75921285", "0.7574346", "0.7573492", "0.75550604", "0.7530495", "0.7528566", "0.7525182", "0.7521887", "0.7514674", "0.75053495", "0.7501662", ...
0.0
-1
Find and return an element from list_one that is in list_two, or None otherwise.
def BWIM(h58A, tzTH): for U6D_ in h58A: if U6D_ in tzTH: return U6D_ return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def neBz(ISMy, WKvO):\n return ISMy.index(WKvO) if WKvO in ISMy else None", "def jjjU(h58A, tzTH):\n for U6D_ in h58A:\n if U6D_ in tzTH:\n return True\n return False", "def J6T8(Kt9y, I_KI):\n for ZfUD in Kt9y:\n for Q7me in I_KI:\n if ZfUD == Q7me:\n ...
[ "0.7291919", "0.70711523", "0.663474", "0.64640707", "0.6353226", "0.63091815", "0.62511986", "0.620057", "0.6120527", "0.60925275", "0.60792065", "0.6064487", "0.5992774", "0.5981744", "0.59807014", "0.5971388", "0.5941875", "0.5933334", "0.5868476", "0.58389354", "0.5809855...
0.90661705
0
Returns the player at the current_player index.
def ouU8(YKHO): return eHpk.Engine.game_manager.players[YKHO.current_player_index]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tRnr(YKHO) -> mVZ4:\n return YKHO.players[YKHO.player]", "def mCd_(YKHO):\n return YKHO.in_game_players[YKHO.curr_player_index]", "def mCd_(YKHO):\n return YKHO.current_player", "def mCd_(YKHO):\n return YKHO.current_player", "def GFCh(YKHO, or8S):\n return YKHO.players[or8S]", "def ve...
[ "0.85247403", "0.84867454", "0.8089613", "0.8042499", "0.7999638", "0.7894455", "0.78784364", "0.7857053", "0.7855146", "0.775659", "0.76662445", "0.76130474", "0.73694444", "0.73577935", "0.73577935", "0.7336021", "0.73230714", "0.71914965", "0.71793675", "0.71743417", "0.71...
0.8460903
2
Returns the player not at the current_player index.
def t7fg(YKHO): return eHpk.Engine.game_manager.players[(YKHO.current_player_index + 1) % 2]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Cc2h(YKHO, oyg0):\n return YKHO.PLAYER2 if YKHO.current_player == YKHO.PLAYER1 else YKHO.PLAYER1", "def mCd_(YKHO):\n return YKHO.in_game_players[YKHO.curr_player_index]", "def ouU8(YKHO):\n return eHpk.Engine.game_manager.players[YKHO.current_player_index]", "def tRnr(YKHO) -> mVZ4:\n return...
[ "0.737167", "0.7131816", "0.7096614", "0.70372105", "0.68343145", "0.6818243", "0.6818243", "0.6782323", "0.67675865", "0.67497075", "0.6729883", "0.6569479", "0.65664333", "0.654347", "0.6529054", "0.6516115", "0.64820546", "0.64467186", "0.6422826", "0.6398652", "0.6378352"...
0.6998858
4
Returns whether there is too much exposed positivity. When this is True, most gained positivity and negativity will have minimal effect on the final exposed positivity.
def EUi9(): f5vV.getExposedPositivity() return f5vV.__positivity_overload
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def x9Kl(YKHO):\n return True", "def x9Kl(YKHO):\n return True", "def x9Kl(YKHO):\n return True", "def tRYN(b4WV=False):\n if f5vV.__positivity_overload:\n f5vV.__exposed_positivity = -abs(f5vV.__exposed_positivity)\n IuIt = 0.3 if f5vV.__positivity_overload else 0.5 if f5vV.__exposed_p...
[ "0.6964317", "0.6964317", "0.6964317", "0.6766569", "0.6447039", "0.6383533", "0.6247913", "0.6242311", "0.6190138", "0.6129724", "0.6112472", "0.6062943", "0.60620004", "0.6042483", "0.5994696", "0.5980057", "0.59514254", "0.59485793", "0.5940164", "0.59387416", "0.5891779",...
0.6105147
11
Returns first item of Queue
def O5s9(YKHO): return YKHO.get(timeout=YKHO._timeout)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cntZ(YKHO):\n if YKHO.is_empty():\n raise rWmY('Queue is empty')\n return YKHO._head._element", "def cntZ(YKHO):\n if YKHO.is_empty():\n raise rWmY('Queue is empty')\n return YKHO._head._element", "def cntZ(YKHO):\n if YKHO.head is None:\n raise Exception('nothing in que...
[ "0.8646616", "0.85619503", "0.8462579", "0.8446519", "0.83684456", "0.8339236", "0.82566625", "0.82474124", "0.82455635", "0.82194525", "0.82194525", "0.815598", "0.8095108", "0.80591875", "0.8045845", "0.80279404", "0.7963286", "0.793172", "0.7915238", "0.78741187", "0.78522...
0.0
-1
Return a timestamp with timezone + offset from UTC.
def ItX3(Wpq0=None, x8Ov=None): if Wpq0 is None: Wpq0 = vZQm.USE_UTC if x8Ov is None: x8Ov = vZQm.TIMESTAMP_FORMAT if Wpq0: tZt3 = qcWV.datetime.utcnow().strftime(x8Ov) yl4j = 'UTC' vgXP = '+0000' else: tZt3 = ITS7.strftime(x8Ov) yl4j = ITS7.tzname...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oZmq(VwNh):\n return VwNh + UJxm", "def mVXc():\n fCoM = qcWV.datetime.now() - qcWV.datetime.utcnow()\n return fCoM.total_seconds()", "def mVXc(E3oo: str):\n Hgg4 = E3oo[-5]\n Ony8 = int(E3oo[-4:-2])\n pbSB = int(E3oo[-2:])\n M4NW = Ony8 * 3600 + pbSB * 60\n return qcWV.timezone(qcW...
[ "0.7433074", "0.73768806", "0.72411853", "0.70669967", "0.6964763", "0.69542", "0.6848605", "0.68214977", "0.67412233", "0.67288506", "0.67257375", "0.6690586", "0.6689317", "0.66553754", "0.6645071", "0.66416734", "0.66349083", "0.66243285", "0.6573624", "0.6570437", "0.6564...
0.0
-1
Find the area of a squareof length l
def eqzy(vC9B): WKvO = vC9B * vC9B return WKvO
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def k3BH(x74K):\n x74K = float(x74K)\n return x74K ** 2", "def CUf1(vC9B):\n jzdc = epAf.pi * (vC9B / 2) ** 2\n return jzdc", "def GagE(u54L: int, TVTK: int) -> int:\n f0tD = u54L * TVTK\n return f0tD", "def eqzy(LyOL: float) -> float:\n if LyOL < 0:\n raise ValueError('area_squar...
[ "0.722552", "0.7187845", "0.7180649", "0.7022802", "0.6958173", "0.6950832", "0.68668664", "0.6794327", "0.6739669", "0.6708414", "0.669203", "0.6688077", "0.66623485", "0.65867233", "0.6567442", "0.6510015", "0.64988595", "0.64899653", "0.64615846", "0.6446765", "0.644286", ...
0.8211714
0
r"""Inner products Compute inner product of target df with weights defined by df_weights.
def _TAS(jQ3Z, PzWW, y0cW='dot', mWFP=None, SStx=True): if PzWW.shape[0] == 0: raise ValueError('df_weights cannot be empty') if isinstance(mWFP, str): if not mWFP in PzWW.columns: raise ValueError('name must be column of df_weights or None') yk4i = set(PzWW.columns).difference(s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KDI4(YKHO, _mSQ, jQ3Z):\n return jQ3Z.dot(_mSQ)", "def eN5c(Cwt5, vuvg, UqYS):\n return oyIN.dot(Cwt5, oyIN.dot(vuvg, UqYS))", "def uYbU(Ty9i, yzQ0):\n return sum((nFf2 * eeAb for nFf2, eeAb in zip(Ty9i, yzQ0)))", "def aKAg(WKvO, LVAh):\n return WKvO[:, 0] * LVAh[:, 1] - WKvO[:, 1] * LVAh[:, ...
[ "0.6295097", "0.58483356", "0.58083713", "0.57746404", "0.5707739", "0.55239964", "0.5392665", "0.5383726", "0.53795326", "0.5377908", "0.53418595", "0.53397274", "0.5321953", "0.53100884", "0.52883166", "0.52815783", "0.5267212", "0.52589446", "0.524968", "0.5248345", "0.524...
0.7229548
0
As part of the ONNX export steps, export an ONNX JIT graph from a PyTorch model.
def uI9F(C3ST: Union[torch.nn.Module, torch.jit.ScriptModule], qIxc: Tuple[Any, ...], B2fa: Mapping[str, Any], Ii0a: _experimental.ExportOptions) -> KupS.Graph: bwrw = Ii0a.opset_version aRkE = Ii0a.operator_export_type qvO0 = Ii0a.export_modules_as_functions Y9ns = Ii0a.training PJWX = Ii0a.verbose...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ysrX(C3ST: Union[torch.nn.Module, torch.jit.ScriptModule], qIxc: Tuple[Any, ...], B2fa: Mapping[str, Any], Ii0a: _experimental.ExportOptions) -> KupS.Graph:\n Y9ns = Ii0a.training\n PJWX = Ii0a.verbose\n with BfDw.exporter_context(C3ST, Y9ns, PJWX):\n OBwQ = XO2S(qIxc, B2fa)\n C3ST = BfD...
[ "0.70717394", "0.7003602", "0.6919874", "0.65289587", "0.6481931", "0.6401786", "0.6372519", "0.6334548", "0.63218355", "0.63095725", "0.61849207", "0.61846924", "0.60905296", "0.6084929", "0.6033109", "0.6025242", "0.6022837", "0.59617805", "0.5839391", "0.5795472", "0.57910...
0.7447055
0
Get the string representation of the graph segment at the given line.
def apsx(YKHO, zFiD: int) -> str: if zFiD == 0: dEzN = YKHO._node_count_segment_str() dEzN += ' ' * (YKHO._max_segment_columns() - len(dEzN)) return dEzN if zFiD == 1: dEzN = YKHO._graph_id_segment_str() dEzN += ' ' * (YKHO._max_segment_columns() - len(dEzN)) retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UDfR(YKHO, zFiD: int) -> str:\n return YKHO._graph_segment_str_at_line(zFiD) + YKHO._connector_segment_str_at_line(zFiD) + YKHO._children_str_at_line(zFiD)", "def SNBe(YKHO, zFiD: int) -> str:\n if YKHO.upper_printer is None and YKHO.lower_printer is None:\n return ''\n RcvX = YKHO.upper_prin...
[ "0.84052145", "0.7082392", "0.62768054", "0.6202979", "0.61267936", "0.6089198", "0.60790336", "0.59044695", "0.5781088", "0.5705206", "0.5699645", "0.56802934", "0.56470674", "0.5602683", "0.56013346", "0.5593939", "0.5544465", "0.55049354", "0.55038095", "0.54433304", "0.53...
0.86530006
0
Get the connector segment string at the given line.
def SNBe(YKHO, zFiD: int) -> str: if YKHO.upper_printer is None and YKHO.lower_printer is None: return '' RcvX = YKHO.upper_printer._total_rows() if YKHO.upper_printer else 1 PQLD = YKHO.lower_printer._total_rows() if YKHO.lower_printer else 1 if zFiD == 0: return ' __' elif zFiD < ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UDfR(YKHO, zFiD: int) -> str:\n return YKHO._graph_segment_str_at_line(zFiD) + YKHO._connector_segment_str_at_line(zFiD) + YKHO._children_str_at_line(zFiD)", "def apsx(YKHO, zFiD: int) -> str:\n if zFiD == 0:\n dEzN = YKHO._node_count_segment_str()\n dEzN += ' ' * (YKHO._max_segment_colum...
[ "0.8142881", "0.77663434", "0.7021813", "0.64705944", "0.643713", "0.594314", "0.59329474", "0.59100515", "0.58801776", "0.58458024", "0.57537276", "0.56640345", "0.5659923", "0.5655234", "0.5621238", "0.5586678", "0.5576753", "0.5563469", "0.5558511", "0.5546472", "0.5496147...
0.8051007
1
Calculates the cumulative average of an integer list (mylist). Returns float list of cumulative averages.
def NTze(qFa0): _3JK, LlAH = ([0], []) for YRbF, WKvO in enumerate(qFa0, 1): _3JK.append(_3JK[YRbF - 1] + WKvO) Qjmd = _3JK[YRbF] / YRbF LlAH.append(Qjmd) return LlAH
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qE0M(qFa0, ywwl):\n import numpy as oyIN\n _3JK = oyIN.cumsum(oyIN.insert(qFa0, 0, 0))\n return (_3JK[ywwl:] - _3JK[:-ywwl]) / float(ywwl)", "def JBMS(aqea):\n X6r0 = sum(aqea) / len(aqea)\n return X6r0", "def V_SC(vHnn):\n return oyIN.sum(vHnn, axis=0) / len(vHnn)", "def hArq(YKHO, WKv...
[ "0.74904275", "0.7280376", "0.7020438", "0.6965659", "0.6951529", "0.69461846", "0.691331", "0.6891476", "0.6870263", "0.68657035", "0.6825449", "0.6818536", "0.6778757", "0.6756168", "0.66948974", "0.66550565", "0.6654918", "0.664965", "0.660334", "0.65722626", "0.65722626",...
0.839474
0
Gets all actions actor can execute.
def xlpn(YKHO): xASv = YKHO.actions.stream[:] for cIT_ in YKHO.equipment: xASv.extend(cIT_.actions) return xASv
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eqLF(YKHO):\n return YKHO.actions", "def CA6v(YKHO):\n return YKHO.actions", "def Q6sW(YKHO):\n return YKHO.agent.get_actions()", "def Q6sW(YKHO):\n return []", "def xASv(YKHO):\n return YKHO._action_list", "def xtag(YKHO):\n return YKHO.robot.actions", "def xASv(YKHO):\n retur...
[ "0.80402154", "0.7977002", "0.79381967", "0.78552645", "0.76636326", "0.7521305", "0.7518468", "0.7476215", "0.74451894", "0.73561805", "0.7350422", "0.7350422", "0.7350422", "0.7305836", "0.7305836", "0.72430027", "0.72323674", "0.7223573", "0.7128844", "0.70877904", "0.7086...
0.73243445
13
Checks if the actor is in the board.
def huqp(YKHO): return YKHO.is_alive()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ufIw(YKHO, oeNL: np.ndarray) -> bool:\n if 0 > oeNL[0] or oeNL[0] >= P5Bq:\n return False\n if 0 > oeNL[1] or oeNL[1] >= P5Bq:\n return False\n return True", "def JYgA(YKHO, rdlD, fvDH):\n return 0 <= rdlD < YKHO.rows and 0 <= fvDH < YKHO.cols", "def SSUM(WKvO: int, LVAh: int) -> ...
[ "0.723219", "0.71502286", "0.6948068", "0.6892193", "0.68031263", "0.6802798", "0.6696202", "0.66851825", "0.6680227", "0.66663915", "0.66328514", "0.6597319", "0.65712327", "0.6554115", "0.6549036", "0.653004", "0.6527398", "0.6525062", "0.64564174", "0.64482886", "0.6448205...
0.7708494
0
Parses training set token file captions and builds a Vocabulary object
def ZFlL(VhND): CtWL = yH2p() V22M = dict() for KzVY in VhND: for GIN8 in KzVY.split(): if GIN8 not in V22M.keys(): V22M[GIN8] = 1 else: V22M[GIN8] += 1 if V22M[GIN8] > R1Tz: CtWL.add_word(GIN8) CtWL.add_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ZFlL(YKHO):\n if YKHO.test_file is None:\n print('test_file is None')\n MVVZ = [YKHO.train_file, YKHO.dev_file]\n else:\n MVVZ = [YKHO.train_file, YKHO.dev_file, YKHO.test_file]\n _73Q = []\n for gIsw in MVVZ:\n _73Q += E1BS.load_data(gIsw)\n Eab6 = []\n for PU1l i...
[ "0.635036", "0.6339905", "0.63299465", "0.62779975", "0.6273613", "0.6209305", "0.6128679", "0.6119946", "0.6114273", "0.61115164", "0.6110889", "0.6106678", "0.6044847", "0.604367", "0.6037272", "0.601951", "0.59479666", "0.5942583", "0.59401524", "0.5939968", "0.5918677", ...
0.6524987
0
Creates an instance of this model from a dictionary
def rQfz(Emd4, cmPJ): if cmPJ is None: return None id = cmPJ.get('id') lSxO = cmPJ.get('providerId') dlCL = cmPJ.get('serverTime') oJFe = cmPJ.get('activeFrom') LFjE = cmPJ.get('activeTo') oKFZ = cmPJ.get('rpmOverValue') SROS = cmPJ.get('overSpeedValue') sUp9 = cmPJ.get('exce...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rQfz(Emd4, cmPJ):\n if cmPJ is None:\n return None\n id = cmPJ.get('id')\n mWFP = cmPJ.get('name')\n tDvy = cmPJ.get('type')\n fFb7 = cmPJ.get('usageBytes')\n return Emd4(id, mWFP, tDvy, fFb7)", "def eLpg(Emd4, cmPJ):\n return Emd4(**cmPJ)", "def eLpg(Emd4, cmPJ):\n return Em...
[ "0.83181584", "0.8168118", "0.8168118", "0.8118749", "0.8089047", "0.79787344", "0.7949278", "0.79231393", "0.7898951", "0.78923255", "0.788838", "0.7882321", "0.7882212", "0.7876749", "0.78585315", "0.7836853", "0.7801407", "0.7801407", "0.7801407", "0.7801407", "0.7801407",...
0.74542487
93
If both score and maximum are Numeric and maximum is nonzero, returns (1.0score/maximum)
def UxnO(YKHO): if isinstance(YKHO.score, mSrU.Number) and YKHO.getMaximum(): return 1.0 * YKHO.score / YKHO.getMaximum() return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def QPm3(p1kx, jB5X):\n return float(p1kx) / float(jB5X) * 100", "def NrPp(p1kx):\n if not p1kx:\n return 0\n AtHF = 1\n if p1kx >= 95:\n AtHF = 3\n elif p1kx >= 75:\n AtHF = 2\n return AtHF", "def cPSY(YKHO):\n if YKHO.max_score is None:\n p1kx = 0\n for...
[ "0.73041356", "0.645031", "0.64307195", "0.6391435", "0.63274276", "0.6303551", "0.6295152", "0.62238383", "0.61322004", "0.6129875", "0.6124716", "0.6106472", "0.6083808", "0.60755694", "0.6037542", "0.6023888", "0.6018282", "0.6013166", "0.60124177", "0.6008612", "0.5997559...
0.67022604
1
Checks if a Grade OR Grade name is in the gradelist by equality. !!Will return True if gradelist includes a COPY of a Grade, not just the exact instance!! To check for an exact object, use isin() function.
def FYXB(YKHO, WKvO): PCzT('_gradelist[..].__contains__(', WKvO, ')') JDQV = YKHO._grades if not isinstance(WKvO, sCLt): JDQV = [vexM.name for vexM in YKHO._grades] PCzT('_gradelist[..].__contains__.nems = ', *JDQV) for YRbF in JDQV: if WKvO == YRbF: return True retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NszK(YKHO, e8AZ):\n return bool(e8AZ in YKHO._grades)", "def AFDG(Jtns, qnba):\n for ZfUD in qnba:\n if Jtns.this == ZfUD.this:\n return True\n return False", "def mZmz(jL5E, XwEP):\n return jL5E in XwEP", "def sjXf(Emd4, yLHq, RKYb):\n return RKYb in yLHq", "def GfdN(J...
[ "0.71633863", "0.59750175", "0.5847662", "0.5823442", "0.5785771", "0.5770725", "0.5709626", "0.5697266", "0.56769514", "0.5666033", "0.5613327", "0.5588519", "0.5577164", "0.5574862", "0.556671", "0.55552155", "0.55417234", "0.55312955", "0.5506754", "0.5459112", "0.542991",...
0.77065367
0
Convert yaml config (dictlike) to list, required by argparse.
def xzCw(YKHO, GPtr=None): for G1Hx, Ty9i in GPtr.items(): assert G1Hx in YKHO.arguments, f'{G1Hx} is not a valid argument. Support arguments are {YKHO.format_arguments()}.' if YKHO.arguments[G1Hx].type is not None: try: YKHO.arguments[G1Hx].val = YKHO.arguments[G1Hx].typ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sjr4(Zu8l=vg61):\n Aofo = []\n GPtr = enR0.ConfigParser()\n if not GPtr.read([Zu8l]):\n return []\n for XLMv in xhQK:\n for mWFP, VKhi in ((exwG, z1Rg) for exwG, z1Rg in xhQK[XLMv].items() if GPtr.has_option(XLMv, exwG)):\n BWXx = GPtr.get(XLMv, mWFP)\n if BWXx !...
[ "0.67910606", "0.6375457", "0.6346535", "0.6305611", "0.6206049", "0.61323076", "0.60638773", "0.59130245", "0.5904598", "0.5819104", "0.5808294", "0.58066005", "0.57881504", "0.5753953", "0.57271546", "0.571875", "0.56436217", "0.5635816", "0.55854744", "0.55651987", "0.5530...
0.0
-1
adds a vertex to the segment, but only if the current number of vertices is <2
def ohmD(YKHO, Ty9i, YRbF=None): if len(YKHO) < 2: return y3ji.add_vertex(YKHO, Ty9i, YRbF)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ohmD(YKHO, Ty9i):\n Ty9i = {'x': Ty9i[0], 'y': Ty9i[1]}\n if Ty9i not in YKHO:\n YKHO.append(Ty9i)\n return len(YKHO) - 1\n return YKHO.index(Ty9i)", "def ohmD(YKHO, Ty9i: str) -> None:\n if YKHO.contains_vertex(Ty9i):\n return\n else:\n YKHO.adj_list[Ty9i] = []", ...
[ "0.70420414", "0.69086635", "0.6851704", "0.67827034", "0.67576873", "0.67482436", "0.6734005", "0.6702797", "0.6652426", "0.66287196", "0.66121316", "0.6583922", "0.6581953", "0.65410626", "0.65323913", "0.65196615", "0.6519206", "0.65023625", "0.64565384", "0.64426965", "0....
0.6622369
10
Destroy (DROP) MySQL database according to env's settings.py
def ya0_(): p9bx = sEAN.project.get('database', None) if not p9bx: hbZn.settings_module(sEAN.project['settings']) p9bx = POek.DATABASES['default'] with gCuF(Afoa('warnings'), warn_only=True): Aofo = iXC1(RHHO % '"DROP DATABASE %(NAME)s;"' % p9bx)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DunT():\n NCls.drop_all()", "def XLNb(YKHO):\n with YKHO.context():\n d487.db.session.remove()\n d487.db.drop_all()", "def OfVt() -> None:\n if Hy7s.environ.get('DATABASE_URL').startswith('sqlite:///'):\n bhMc, DyrH = Hy7s.environ.get('DATABASE_URL').split('sqlite:///')\n ...
[ "0.81514573", "0.80824697", "0.8069935", "0.79548544", "0.79548544", "0.79548544", "0.79548544", "0.79548544", "0.79548544", "0.79548544", "0.79548544", "0.79548544", "0.78579026", "0.78170145", "0.7785647", "0.7748717", "0.7689776", "0.75986856", "0.75589913", "0.7555239", "...
0.79611
3
Path to current project' directory
def qHA8(): return NW1j(sQK_)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TdjZ():\n pmON = GkAb(xAKo).parent.parent\n I7OS = pmON.parent\n return I7OS", "def TdjZ():\n return GkAb(gCuF.PROJECT_DIR)", "def phdL():\n return GkAb(xAKo).parent.parent", "def phdL():\n return str(GkAb(xAKo).parent.parent)", "def phdL():\n return str(GkAb(xAKo).parent.parent)",...
[ "0.81076676", "0.81033856", "0.8071574", "0.8067549", "0.8067549", "0.8053351", "0.8030514", "0.8009783", "0.7962687", "0.79454094", "0.79400474", "0.79400474", "0.79400474", "0.79400474", "0.7917521", "0.79075396", "0.7816699", "0.76604986", "0.76300454", "0.7582095", "0.758...
0.75889593
19
Get root window offset x in pixels value
def NZ85(YKHO) -> int: YKHO.tk_ref.update() return YKHO.tk_ref.winfo_x()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FKsd(YKHO):\n return YKHO.left + YKHO.width / 2", "def YH9x(YKHO):\n return YKHO.rect.x", "def OJN8():\n nPrm = W8mS.Display().screen().root.query_pointer()._data\n return (nPrm['root_x'], nPrm['root_y'])", "def Ji5Z(YKHO):\n eDIY = C6dK.get_viewport_geometry()\n if not eDIY:\n e...
[ "0.7086193", "0.70678", "0.6916751", "0.68929476", "0.68337524", "0.68171316", "0.6795325", "0.6730493", "0.67054427", "0.66988146", "0.6660558", "0.66240424", "0.66141987", "0.661367", "0.65857667", "0.6583111", "0.6569718", "0.656971", "0.6559385", "0.6528468", "0.65105647"...
0.73783016
0
Get root window offset y in pixels value
def EBA4(YKHO) -> int: YKHO.tk_ref.update() return YKHO.tk_ref.winfo_y()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LVAh(YKHO):\n return YKHO.top", "def LVAh(YKHO) -> int:\n return YKHO.data.y_centre >> 4", "def Tdk1(YKHO):\n return YKHO.dy * YKHO.ny - YKHO.oy", "def ueuK(l_yL):\n LAGc = int(l_yL.winfo_screenwidth() / 2 - l_yL.winfo_width() / 2)\n Az31 = int(l_yL.winfo_screenheight() / 2 - l_yL.winfo_he...
[ "0.7093761", "0.678765", "0.67828536", "0.67789066", "0.6717105", "0.66968894", "0.66646636", "0.6645341", "0.6592633", "0.656043", "0.6549996", "0.65466845", "0.64999706", "0.64662504", "0.64648527", "0.64276797", "0.6411839", "0.64024204", "0.63900775", "0.63900775", "0.638...
0.69583344
1
Get background window color code
def pmez(YKHO) -> str: return YKHO.tk_ref.config()['background'][-1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def QPVU(YKHO):\n return HRmL(YKHO.GetBackground())", "def hxMe(YKHO) -> int:\n return YKHO.background_color.value", "def gdTH(YKHO):\n return YKHO._colBack", "def dnR4(YKHO):\n return YKHO._bg", "def _TAj(YKHO) -> g74T.Color:\n return YKHO._bg_color", "def QPVU(YKHO) -> z4e6:\n return ...
[ "0.7358467", "0.72067285", "0.7135927", "0.6991623", "0.6970105", "0.69349015", "0.69228125", "0.69082576", "0.6882807", "0.68824273", "0.68249756", "0.67627877", "0.6756248", "0.67287844", "0.66812974", "0.66482306", "0.66292626", "0.64926845", "0.6467775", "0.6464415", "0.6...
0.68817556
10
Get window opacity value
def Cwt5(YKHO) -> float: return float(YKHO.tk_ref.wm_attributes('-alpha'))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BCp6(YKHO):\n return YKHO._opacity", "def BCp6(YKHO):\n return YKHO._rgba[3]", "def BCp6(YKHO) -> int:\n return YKHO._opacity", "def BCp6(YKHO):\n if YKHO.isIsolateHidden():\n return 0.1\n BCp6 = super(xn4r, YKHO).opacity()\n gEmA = YKHO.layer()\n if gEmA:\n return gEmA...
[ "0.776012", "0.7683137", "0.7206621", "0.7165742", "0.71427315", "0.66770184", "0.63506687", "0.6261115", "0.613176", "0.61137563", "0.6068755", "0.60621333", "0.6045102", "0.59971917", "0.5948554", "0.59362876", "0.5923617", "0.590486", "0.5873989", "0.5859798", "0.5859798",...
0.6722343
5
Return a string representing the type of processor this is.
def NHZE(YKHO): return 'sentiment Analysys'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def type(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'type')", "def type(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'type')", "def type(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'type')", "def type(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'type')", "def type(YK...
[ "0.72038543", "0.72038543", "0.72038543", "0.72038543", "0.72038543", "0.72038543", "0.72038543", "0.72038543", "0.72038543", "0.72038543", "0.72038543", "0.72038543", "0.72038543", "0.72038543", "0.72038543", "0.72038543", "0.72038543", "0.72038543", "0.72038543", "0.72038543"...
0.0
-1
Tests that an existing username doesn't validate, and that the passwords must match.
def gs6M(YKHO): nPrm = {'username': YKHO.user.username, 'first_name': 'Fred', 'last_name': 'Bob', 'email': 'fredbob@fakezzzz.com', 'password': 'foobar', 'confirm_password': 'foobar2', 'gender': 'male', 'birth_date': '01-01-1900', 'diagnosis_month': 'january', 'diagnosis_year': 1920, 'city': 'Seattle', 'state': 'Was...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iS7x(jTXt, NtEF=None):\n if jTXt == NtEF:\n raise UAju.AccountPasswordInvalid(L8Py.PASSWORD_CANT_EQUAL_USERNAME_MSG)", "def QoUL(NtEF):\n if len(NtEF) < YVsF:\n return False\n else:\n return True", "def Ngt6(YKHO):\n YKHO.assertFalse(mv1M.authenticate('invalid', 'allison'))...
[ "0.78363156", "0.7447824", "0.7357257", "0.7346728", "0.7270943", "0.725259", "0.72039783", "0.71992797", "0.7193521", "0.7193098", "0.71703076", "0.7150465", "0.714641", "0.7134052", "0.7131879", "0.7125677", "0.70975477", "0.7096642", "0.7069448", "0.7062072", "0.7057744", ...
0.0
-1
Test the creation of a genesis block node
def jaeT(): Guz6 = HBct.md5('foobarbaz').hexdigest() eNCK = BTTw(genesis=o7DN(data=None, hash_str=Guz6)) xi7g = eNCK.genesis assert eNCK assert eNCK.size == 1 assert Guz6 == xi7g.hash eNCK.new_node(data='hello') sdz1 = HBct.md5(Guz6 + 'hello').hexdigest() assert eNCK.size == 2 as...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qOly(YKHO):\n BZTK = YKHO.blockchain.last_block['index']\n YKHO.assertEqual(BZTK, 1)", "def cb0j():\n return n3Kt(0, '0', 1465154705, 'my genesis block!!', '816534932c2b7154836da6afc367695e6337db8a921823784c14378abed4f7d7')", "def FTpT() -> None:\n G9jH.debug('Generating the genesis block')\n ...
[ "0.7819148", "0.7445598", "0.7236912", "0.7189134", "0.71651155", "0.7105297", "0.7028575", "0.69849217", "0.6949131", "0.6949131", "0.6888543", "0.6843824", "0.6669649", "0.66393816", "0.663245", "0.6533989", "0.6400462", "0.6386923", "0.63730156", "0.6323687", "0.63196254",...
0.6808092
12
Return if number is even
def hG1u(): return lambda FGW3: FGW3 % 2
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ubP8(FGW3):\n return FGW3 % 2 == 0", "def ubP8(FGW3):\n return FGW3 % 2 == 0", "def ubP8(mLGw):\n return mLGw % 2 == 0", "def ubP8(FGW3: int) -> bool:\n return FGW3 % 2 == 0", "def ubP8(FGW3):\n if FGW3 % 2 == 0:\n return True\n else:\n return False", "def ubP8(exwG):\...
[ "0.92352504", "0.9172888", "0.91108567", "0.9035362", "0.9021767", "0.8954234", "0.89302605", "0.8882825", "0.8877168", "0.88769245", "0.8730764", "0.87288564", "0.8598773", "0.85757196", "0.8555381", "0.85367066", "0.84599614", "0.83930504", "0.8373534", "0.83687836", "0.829...
0.84003925
17
Test review_status is not set to None
def voSm(YKHO, Jyyj, vXX7): TKJb = Rqdq.RiskFactory() geh0 = YKHO.api.put(TKJb, TKJb.id, {Jyyj: None}) YKHO.assert400(geh0) YKHO.assertEqual(geh0.json['message'], vXX7 + ' for the object is not specified') TKJb = NCls.session.query(Uk9h.Risk).get(TKJb.id) YKHO.assertIsNotNone(TKJb.external_id)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qtj1(YKHO):\n YKHO.assertFalse(P3Cm.review_is_done(None))\n YKHO.assertFalse(P3Cm.review_is_done(0))\n YKHO.assertFalse(P3Cm.review_is_done(FYrf.REVIEW_PENDING))\n YKHO.assertFalse(P3Cm.review_is_done(FYrf.REVIEW_ISSUES_OPEN))\n YKHO.assertTrue(P3Cm.review_is_done(FYrf.REVIEW_ISSUES_ADDRESSED))\...
[ "0.6827959", "0.647804", "0.62051964", "0.6155368", "0.6114608", "0.6092222", "0.5962013", "0.59106934", "0.59091425", "0.58898354", "0.58887047", "0.5879549", "0.5879415", "0.5866186", "0.5855767", "0.58552426", "0.5848049", "0.5843173", "0.5831067", "0.5822958", "0.5801428"...
0.0
-1
Test review_status is updated
def ZWzR(YKHO): TKJb = Rqdq.RiskFactory() Qj8D = Uk9h.Review.STATES.REVIEWED YKHO.api.put(TKJb, TKJb.id, {'review_status': Qj8D, 'review_status_display_name': 'some status'}) TKJb = NCls.session.query(Uk9h.Risk).get(TKJb.id) YKHO.assertEquals(TKJb.review_status, Qj8D)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def f01g(YKHO):\n Bt8i = YKHO._runid\n G9jH.debug('Get all run results from the db for runid: ' + str(Bt8i))\n Ve_G = SVRw(YKHO._cc_client, Bt8i)\n YKHO.assertIsNotNone(Ve_G)\n YKHO.assertNotEqual(len(Ve_G), 0)\n VFBo = Ve_G[0]\n Tj1O = YKHO.__get_system_comments(VFBo.reportId)\n YKHO.asser...
[ "0.74658114", "0.7328057", "0.7305364", "0.70519245", "0.7044138", "0.6748748", "0.6718127", "0.66477513", "0.65562135", "0.6540447", "0.65403163", "0.648796", "0.648796", "0.648796", "0.6470997", "0.6443893", "0.64409816", "0.6400049", "0.6371026", "0.63256574", "0.6309867",...
0.7885294
0
Return list of allowed actions that can be made in state
def xASv(YKHO, QTBn): """*** YOUR CODE HERE ***""" if QTBn[2] == 0: aP1r = (QTBn[0], QTBn[1] + 1, 0) Qzqo = (QTBn[0], QTBn[1], 3) utub = (QTBn[0], QTBn[1], 1) elif QTBn[2] == 1: aP1r = (QTBn[0] - 1, QTBn[1], 1) Qzqo = (QTBn[0], QTBn[1], 0) utub = (QTBn[0], QTB...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hOfQ(YKHO) -> x1iM[str]:\n return list(YKHO.action_map().keys())", "def z8Ay(YKHO, QTBn):\n return YKHO.actionFn(QTBn)", "def z8Ay(YKHO, QTBn):\n return YKHO.actionFn(QTBn)", "def CA6v(YKHO, QTBn):\n pass", "def REUT(YKHO, QTBn):\n return [pY1r, EGw7, Ny9c, ckxV]", "def xASv(YKHO) -> l...
[ "0.80085504", "0.79716265", "0.79417676", "0.79149675", "0.77498865", "0.75869966", "0.7553659", "0.73761845", "0.7372146", "0.7369084", "0.7338548", "0.73349386", "0.72808", "0.7274748", "0.7234828", "0.7199594", "0.7196472", "0.7191541", "0.7190196", "0.71601564", "0.710926...
0.0
-1
Return list of allowed actions that can be made in state
def xASv(YKHO, QTBn): """*** YOUR CODE HERE ***""" if QTBn[2] == 0: aP1r = (QTBn[0], QTBn[1] + 1, 0) Qzqo = (QTBn[0], QTBn[1], 3) utub = (QTBn[0], QTBn[1], 1) elif QTBn[2] == 1: aP1r = (QTBn[0] - 1, QTBn[1], 1) Qzqo = (QTBn[0], QTBn[1], 0) utub = (QTBn[0], QTB...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hOfQ(YKHO) -> x1iM[str]:\n return list(YKHO.action_map().keys())", "def z8Ay(YKHO, QTBn):\n return YKHO.actionFn(QTBn)", "def z8Ay(YKHO, QTBn):\n return YKHO.actionFn(QTBn)", "def CA6v(YKHO, QTBn):\n pass", "def REUT(YKHO, QTBn):\n return [pY1r, EGw7, Ny9c, ckxV]", "def xASv(YKHO) -> l...
[ "0.80080545", "0.79724884", "0.79427665", "0.7915108", "0.77509886", "0.75867707", "0.75549436", "0.7375182", "0.73727214", "0.7369071", "0.73384315", "0.7334771", "0.72818077", "0.7273697", "0.7233691", "0.7200625", "0.71959543", "0.7189994", "0.71897995", "0.7159678", "0.71...
0.0
-1
Clears the token used for authentication, optionally revoking it before doing so
def erK4(YKHO, ffZv=False): if ffZv: YKHO.revoke_self_token() YKHO.token = None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fFx9(YKHO):\n YKHO.token_revoke()", "def zWwb(YKHO):\n if YKHO.access_token is None:\n raise nWKG('no token available to revoke')\n YKHO._authenticator.revoke_token(YKHO.access_token, 'access_token')\n YKHO._clear_access_token()", "def ffZv(eOtH):\n eOtH.delete_instance()", "def erK...
[ "0.699886", "0.6988337", "0.69808465", "0.6736623", "0.67299676", "0.6729785", "0.6695616", "0.6671741", "0.6616997", "0.6612316", "0.6590165", "0.65330905", "0.6531848", "0.65001166", "0.6495223", "0.64951557", "0.6485257", "0.6467337", "0.64505357", "0.64215493", "0.6373636...
0.7287816
0
Extract the radius/number from a gr file name
def R5h3(t2j6, WmM4=0): kUBT = ZbWC.findall('(\\d+)', t2j6) if len(kUBT) > 0 and str(t2j6).endswith(str(kUBT[-1]) + '.gr'): return int(kUBT[-1]) return WmM4
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TAU9(YKHO, Ux0P, _NR1=3):\n Ux0P = Hy7s.path.splitext(Ux0P)[0]\n Ux0P = Hy7s.path.split(Ux0P)[1]\n Ux0P = Ux0P.split('_', 3)[2]\n NrEI = Ux0P\n return NrEI", "def dBvB(gIsw):\n aPr_ = gIsw.partition('.')[0]\n cntZ, CsFy = aPr_.split('_')\n mLGw = CsFy.replace('genome', '')\n mLGw =...
[ "0.6218466", "0.619093", "0.5922256", "0.5865497", "0.5842589", "0.5825127", "0.5793829", "0.57658607", "0.57283086", "0.5720184", "0.5660492", "0.56551856", "0.5621069", "0.559087", "0.5586727", "0.5586727", "0.5501733", "0.5439403", "0.5438494", "0.54140836", "0.5407844", ...
0.7896371
0
Returns a set of child types for this node.
def wXP6(YKHO): SnBA = set() for aUGN in YKHO.children: SnBA.add(aUGN.__class__) return SnBA
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def HvMl(YKHO) -> set[wz4H]:\n Aofo: set[wz4H] = set()\n for aUGN in YKHO.children:\n Aofo.update(aUGN.iterate_types())\n return Aofo", "def dwlV(YKHO, afYC):\n QCss = []\n for aUGN in afYC:\n QCss.append(YKHO.expression_type(aUGN))\n return QCss", "def pW9n(YKHO: _R) -> set[oWh...
[ "0.802526", "0.77076083", "0.74828744", "0.72904575", "0.7166985", "0.7166286", "0.67760295", "0.6697054", "0.6688063", "0.6539489", "0.6536056", "0.65282494", "0.6519497", "0.64816654", "0.6465576", "0.6446824", "0.6445795", "0.644176", "0.6430468", "0.64127594", "0.6410112"...
0.85920405
0
Yields all views from the default namespace.
def Oz8R(YKHO): return YKHO._get_types_from_default_ns(Rv6M)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RCd1(YKHO):\n return JKCy.Views(YKHO)", "def RCd1(YKHO):\n return CWuy(YKHO)", "def RCd1(YKHO):\n return YKHO._views", "def vwuN(YKHO):\n return eoaG(YKHO.backend, 'views.py', {'classes': YKHO._classes, 'host': YKHO.parser.specification.get('host'), 'basePath': YKHO.parser.specification.get('...
[ "0.6305015", "0.5921781", "0.57997704", "0.5744849", "0.5742531", "0.5710597", "0.5622336", "0.5610357", "0.55628407", "0.55369264", "0.5525779", "0.5492689", "0.5474114", "0.5473362", "0.54466695", "0.54427856", "0.5409916", "0.53552926", "0.53291935", "0.52488995", "0.52387...
0.6071496
1
Returns True if this namespace is a default namespace.
def Lb9e(YKHO): return YKHO.db.get_default_namespace() == YKHO
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eoCS(YKHO) -> bool:\n return YKHO._is_default", "def eoCS(YKHO):\n return YKHO._tag == 'default'", "def eoCS(YKHO) -> bool:\n return qe4Y.get(YKHO, 'is_default')", "def eoCS(YKHO):\n return YKHO._is_default", "def eoCS(YKHO):\n return YKHO._is_default", "def eoCS(YKHO) -> h8nf[bool]:\n...
[ "0.7529933", "0.74788034", "0.7474201", "0.7359902", "0.7341513", "0.73407036", "0.722246", "0.722246", "0.722246", "0.71842754", "0.7124434", "0.7119654", "0.70840245", "0.7013174", "0.6952865", "0.6849853", "0.6849853", "0.6849853", "0.6849853", "0.6849853", "0.68089837", ...
0.8875803
0
ritorna la lista dei capitoli in formato html
def cSxs(YKHO, Ux0P): jI4j = R5qo.read_epub(Ux0P) cgAD = [] for ZfUD in jI4j['get_items'](): if ZfUD.get_type() == V0Pg.ITEM_DOCUMENT: cgAD.append(ZfUD.get_content()) return cgAD
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AHMZ(YKHO):\n YKHO.print_avec_separateur(' ')", "def r934(ELpq):\n jbXL = ''\n jbXL += '\\t\\t<para style=\"P3\" spaceAfter=\"35\">\\n'\n jbXL += '\\t\\t\\t<font color=\"white\"> </font>\\n'\n jbXL += '\\t\\t</para>\\n'\n jbXL += '\\t\\t<para style=\"P4\"><b>' + str(ELpq) + '</b></para>\\n'...
[ "0.61880934", "0.5958886", "0.5889623", "0.5849276", "0.58281255", "0.5794499", "0.5769871", "0.57318735", "0.57087636", "0.569148", "0.5636235", "0.56323564", "0.5631737", "0.56202096", "0.56136453", "0.5577249", "0.5564397", "0.5561009", "0.5560176", "0.555746", "0.5540109"...
0.0
-1
Returns empty string if variable is None.
def UMnH(JIUj): if JIUj: return JIUj else: return ''
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qOEb():\n return ''", "def hKOG(d7pR: Any) -> h8nf[str]:\n if isinstance(d7pR, str):\n if len(d7pR) > 0:\n return str(d7pR)\n return None", "def _Iyo(BWXx):\n if BWXx is None:\n return ''\n return BWXx", "def dQKU(wEf2):\n return str(wEf2) if wEf2 is not None el...
[ "0.74008626", "0.7107872", "0.6961987", "0.6845725", "0.6668899", "0.65816134", "0.65009713", "0.6476864", "0.64393395", "0.6369905", "0.6308882", "0.62487453", "0.6243484", "0.62226486", "0.6197948", "0.61903614", "0.6175144", "0.61509717", "0.61348283", "0.60806584", "0.605...
0.0
-1
Get last login details.
def BdTf(): try: nPrm = [] urx7 = '([a-zA-Z]+\\s[a-zA-Z]+\\s+[0-9]+\\s[0-9]+:[0-9]+)\\s+(.*)' lYLb = '^[a-zA-Z0-9]+\\s' hlel = Yn3K.check_output('last') hlel = hlel.decode('utf-8').split('\n') for zFiD in hlel: NtEF = ZbWC.findall(lYLb, zFiD) i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aKXi(YKHO) -> str:\n return qe4Y.get(YKHO, 'last_password')", "def qVeo(YKHO, _xNI):\n _xNI.get('https://stage-api.ona.io/api/v1/user', json=YKHO.ona_response)\n i_PC = Y8oF()\n QePW = i_PC.get('/api/v1/user')\n HKZg = YKHO.user.last_login\n GQWL = YKHO.auth.authenticate_credentials('token'...
[ "0.7084093", "0.6472656", "0.6429118", "0.64025444", "0.6307611", "0.620598", "0.6186773", "0.61438644", "0.6132095", "0.61278623", "0.6110024", "0.60809165", "0.6065298", "0.60400856", "0.602912", "0.6025116", "0.60082597", "0.5976135", "0.59363395", "0.59353906", "0.5930701...
0.60996956
11
Return the device state attributes.
def R1i3(YKHO): return YKHO._attrs
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def R1i3(YKHO):\n return YKHO.attributes", "def R1i3(YKHO):\n return YKHO._attributes", "def R1i3(YKHO):\n return YKHO.attr", "def R1i3(YKHO):\n return YKHO.attr", "def R1i3(YKHO):\n return YKHO._state_attrs", "def R1i3(YKHO):\n return YKHO._state_attrs", "def R1i3(YKHO):\n return ...
[ "0.93173087", "0.9245708", "0.92147964", "0.92147964", "0.9210798", "0.9210798", "0.91909975", "0.91909975", "0.91909975", "0.91909975", "0.91909975", "0.91909975", "0.91909975", "0.91909975", "0.91909975", "0.91909975", "0.91909975", "0.91909975", "0.91909975", "0.91441494", ...
0.92207897
2
Convert a scipy sparse matrix to a torch sparse tensor.
def FXf_(On0F): On0F = On0F.tocoo().astype(oyIN.float32) _0VL = ht2j.from_numpy(oyIN.vstack((On0F.row, On0F.col)).astype(oyIN.int64)) hkxX = ht2j.from_numpy(On0F.data) ROpF = ht2j.Size(On0F.shape) return ht2j.sparse.FloatTensor(_0VL, hkxX, ROpF)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TWjY(YKHO, SppC: sp.csr_matrix):\n SppC = SppC.tocoo()\n WKvO = ht2j.sparse.FloatTensor(ht2j.LongTensor(oyIN.array([SppC.row, SppC.col])), ht2j.FloatTensor(SppC.data.astype(oyIN.float32)), SppC.shape).to(YKHO.device)\n return WKvO", "def FXf_(On0F):\n _0VL = ht2j.from_numpy(oyIN.vstack((On0F.row,...
[ "0.8300125", "0.8148143", "0.80456305", "0.8032249", "0.80297565", "0.80297565", "0.80297565", "0.80297565", "0.80297565", "0.80297565", "0.80297565", "0.80297565", "0.80297565", "0.80297565", "0.80297565", "0.80297565", "0.80297565", "0.80130917", "0.79970765", "0.79970765", ...
0.79647905
24
Convert a scipy sparse matrix to a torch sparse tensor.
def FXf_(On0F): On0F = On0F.tocoo().astype(oyIN.float32) _0VL = ht2j.from_numpy(oyIN.vstack((On0F.row, On0F.col)).astype(oyIN.int64)) hkxX = ht2j.from_numpy(On0F.data) ROpF = ht2j.Size(On0F.shape) return ht2j.sparse.FloatTensor(_0VL, hkxX, ROpF)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TWjY(YKHO, SppC: sp.csr_matrix):\n SppC = SppC.tocoo()\n WKvO = ht2j.sparse.FloatTensor(ht2j.LongTensor(oyIN.array([SppC.row, SppC.col])), ht2j.FloatTensor(SppC.data.astype(oyIN.float32)), SppC.shape).to(YKHO.device)\n return WKvO", "def FXf_(On0F):\n _0VL = ht2j.from_numpy(oyIN.vstack((On0F.row,...
[ "0.8301762", "0.8148899", "0.80461955", "0.80328023", "0.80137724", "0.79976094", "0.79976094", "0.79855764", "0.79855764", "0.79855764", "0.7977371", "0.7965371", "0.77549213", "0.771334", "0.74287164", "0.74287164", "0.7353825", "0.7198796", "0.7158548", "0.69889534", "0.69...
0.8030319
16
Compute dot product of vectors A & B
def qIr8(cGbx, JDuQ): Yipr = cGbx.centroid_vector Vkf3 = JDuQ.centroid_vector u4CY = cGbx.length GYnF = JDuQ.length pxL1 = 0.0 for H5ew, BWXx in Yipr.iteritems(): if H5ew in Vkf3: pxL1 += BWXx * Vkf3[H5ew] return float(pxL1 / (u4CY * GYnF))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BJ1H(jzdc, Fg_i):\n if len(jzdc) != len(Fg_i):\n raise Exception('Input vectors must be of same length, not %d and %d' % (len(jzdc), len(Fg_i)))\n return float(sum([jzdc[YRbF] * Fg_i[YRbF] for YRbF in range(len(jzdc))]))", "def BJ1H(jzdc, Fg_i):\n return oyIN.vdot(jzdc.arr, Fg_i.arr)", "def...
[ "0.8661418", "0.8555408", "0.838249", "0.83734024", "0.8328429", "0.82212085", "0.82144165", "0.8211341", "0.8193126", "0.8183287", "0.815596", "0.8117115", "0.80995876", "0.80624926", "0.8049583", "0.8040964", "0.8017601", "0.797728", "0.7955631", "0.79285604", "0.79197115",...
0.0
-1
Create empty testing trie.
def _csl(): from trie import Trie trie = Trie() return trie
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def whF1(_csl):\n assert _csl.root.children == {}\n assert _csl._size == 0", "def _csl():\n ZOCz = etby()\n return ZOCz", "def bAqF():\n Q6kx = ep_x('h')\n assert Q6kx.value == 'h'\n assert Q6kx.children == {}", "def rPF0():\n from trie import Trie\n trie = Trie()\n trie.insert(...
[ "0.8069461", "0.8001973", "0.7242687", "0.7125927", "0.7105793", "0.69713306", "0.692341", "0.68773925", "0.68733966", "0.6825118", "0.67627084", "0.675214", "0.675214", "0.67337686", "0.6715608", "0.6680349", "0.6665456", "0.6660182", "0.66541314", "0.66287696", "0.66287696"...
0.7934639
2
Function takes a string, and if it has a `.` assumes it is a float, else it must be an int. We apply proper conversion function to the string making it a number.
def vynC(KCHu): NKcE = {'float': vIwR.atof, 'int': vIwR.atoi} if not type(KCHu) is M9Gz: return 0 if '.' in KCHu: return NKcE['float'](KCHu) else: return NKcE['int'](KCHu, 10)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oNf4(YKHO, str):\n if str.count('.') == 0:\n return int(str)\n if str.count('.') == 1:\n return float(str)\n return str", "def mLGw(KCHu: str):\n try:\n return int(KCHu)\n except ValueError:\n return float(KCHu)", "def KrkO(KCHu):\n try:\n return int(KCH...
[ "0.81439275", "0.80715656", "0.78507686", "0.77837646", "0.77771693", "0.76121897", "0.7583545", "0.7563765", "0.7524552", "0.75077814", "0.750153", "0.7352278", "0.7350473", "0.7245666", "0.7227321", "0.71945244", "0.717014", "0.716775", "0.71644163", "0.71644163", "0.715081...
0.7922769
2
Function takes a string given back by kstat command and creates a key/value mapping of all items in the string. We split string on newlines `\n`, which is a per metric delimiter. And for each individual metric we split that string on tabs `\t`, since that is what separates key from value.
def wgUV(ie8c): crWc = {} Wlzn = ie8c.split('\n') if len(Wlzn) < 1: return {} for bTKY in Wlzn: try: G1Hx, Ty9i = bTKY.split('\t') G1Hx = c4n6(G1Hx) if G1Hx in crWc: G1Hx = gn1S(0, G1Hx, crWc) crWc[G1Hx] = vynC(Ty9i) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Xh5d(WooN):\n Aofo = dict()\n Nqlg = [YRbF.strip() for YRbF in WooN.split(',')]\n for zFiD in Nqlg:\n G1Hx, Ty9i = zFiD.split(':')\n Aofo[G1Hx] = Ty9i\n return Aofo", "def ph90(XP5J):\n eHNT = '/'.join([XP5J, 'kernel/kstat-p-td-10-6.out'])\n H4si(eHNT)\n ph90 = {}\n r8hN...
[ "0.63116443", "0.5993951", "0.53836644", "0.536574", "0.5346141", "0.53166217", "0.52213335", "0.5204446", "0.51734835", "0.51659495", "0.51624554", "0.51586246", "0.5055843", "0.5007188", "0.49962723", "0.4996204", "0.49873018", "0.49569792", "0.49507147", "0.49501076", "0.4...
0.75862825
0
comparator takes two arguments, both being metrics such as `anonfree_0=0`, `anonfree_1=0` and returns a 1 or a 1 depending upon if the number that follows underscore `_` is larger in a or b.
def GFDZ(jzdc, Fg_i): jzdc = ZbWC.split('[_=]', jzdc)[-2] Fg_i = ZbWC.split('[_=]', Fg_i)[-2] if jzdc > Fg_i: return 1 elif jzdc < Fg_i: return -1 else: return 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gZFB(jzdc, Fg_i):\n return (jzdc > Fg_i) - (jzdc < Fg_i)", "def eLty(jzdc, Fg_i):\n U5bT = 0\n if isinstance(jzdc, list):\n for H5ew in qIxc.sort:\n if H5ew >= len(jzdc):\n U5bT = -1\n break\n elif H5ew >= len(Fg_i):\n U5bT = ...
[ "0.65495247", "0.6273699", "0.61901987", "0.618433", "0.6111911", "0.61081874", "0.6081195", "0.6067617", "0.6032414", "0.5995582", "0.59620243", "0.58793074", "0.58745986", "0.57829523", "0.56796813", "0.55987024", "0.55398417", "0.55204886", "0.5519674", "0.54581475", "0.54...
0.7609379
0
Set the session description
def rbTd(YKHO, l5Ny): YKHO.textEdit.setHtml(l5Ny)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AqxA(YKHO, JBZA):\n YKHO.__description = JBZA", "def AqxA(YKHO, JBZA):\n YKHO.description = JBZA", "def AqxA(YKHO, G_YN):\n YKHO._current_test_descr = G_YN", "def AqxA(YKHO, JBZA):\n YKHO.__description = JBZA", "def AqxA(YKHO, HOap):\n gTEQ('PrlVirtNet_SetDescription', YKHO.handle, HOap)...
[ "0.70972836", "0.7020007", "0.69936186", "0.6963085", "0.69266814", "0.68628764", "0.68568087", "0.68513757", "0.68398005", "0.68225795", "0.68025523", "0.68025523", "0.68025523", "0.68025523", "0.6732479", "0.6732479", "0.6732479", "0.6732479", "0.6732479", "0.6732479", "0.6...
0.74422276
0
Get the session description
def iDGX(YKHO): return YKHO.textEdit.toHtml()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def viLs(YKHO):\n return YKHO._get_attribute('sessionInfo')", "def viLs(YKHO):\n return YKHO._get_attribute('sessionInfo')", "def hloL(cuiw, e5kH, QOe9):\n assert not cuiw.empty, 'Session cannot be empty!'\n D1wa = cuiw['type'].iloc[0]\n jCeH = D1wa == 'Assessment'\n O1gd = PLGf(cuiw, e5kH) i...
[ "0.7459041", "0.72568417", "0.68514824", "0.67624974", "0.67097914", "0.66012126", "0.6560667", "0.64767367", "0.6353673", "0.6353673", "0.6335216", "0.63141453", "0.62628233", "0.62497854", "0.62497854", "0.62497854", "0.62497854", "0.62453496", "0.6221566", "0.6221566", "0....
0.7579908
0
Filename for image instance
def vUs2(YKHO): return '{acc}-{ser:04}-{ins:04}'.format(acc=YKHO.tags['AccessionNumber'] or YKHO.tags['StudyInstanceUID'], ser=YKHO.tags['SeriesNumber'], ins=YKHO.tags['InstanceNumber'])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def XKel(YKHO):\n return Hy7s.path.join(YKHO.__folder, YKHO.__name + '.jpg')", "def zAg0(YKHO):\n return '{filename}'.format(filename=YKHO.image.original_filename)", "def C7_O(YKHO) -> str:\n return YKHO._image_name", "def parx(YKHO, Ux0P):\n pmON = 'images/{folder}/{filename}'.format(folder=YKHO...
[ "0.7939681", "0.7801211", "0.77819073", "0.7525538", "0.75020635", "0.75015986", "0.7480913", "0.7464028", "0.741866", "0.7399048", "0.7381185", "0.7322192", "0.7311984", "0.72855026", "0.724738", "0.72352684", "0.7204876", "0.71969026", "0.71901476", "0.7168529", "0.716194",...
0.0
-1
The Relative Strength Index (RSI) is a momentum indicator which is measures the magnitude of recent price changes to evaluate overbought or oversold conditions. If RSI 70, Coin is exposed to overbought. This case is interpretable as the price of this coin will going up
def wS4F(YKHO, KnxT): DDI8 = YKHO.df.close RA_F = DDI8.diff().dropna() YKHO.df['change'] = RA_F P6bq = RA_F * 0 Csk6 = P6bq.copy() P6bq[RA_F > 0] = RA_F[RA_F > 0] Csk6[RA_F < 0] = -RA_F[RA_F < 0] P6bq[P6bq.index[KnxT - 1]] = oyIN.mean(P6bq[:KnxT]) P6bq = P6bq.drop(P6bq.index[:KnxT - ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LWoh(YKHO, wV6l=14):\n return oQRR.RSI(YKHO.data.close, wV6l)", "def gi43(YKHO, Sm0u=14):\n cZoC = YKHO.daily_returns(YKHO.daily[['Adj Close']]).tail(14)\n B1Rh = cZoC[cZoC > 0].dropna()\n hZNO = cZoC[cZoC < 0].dropna()\n WCaQ = (B1Rh.sum() / Sm0u + hZNO.sum() / Sm0u)['Adj Close']\n gi43 = ...
[ "0.7295669", "0.68439615", "0.6760943", "0.644682", "0.6381766", "0.63246286", "0.6253218", "0.6224118", "0.6209536", "0.60715145", "0.6056572", "0.6036526", "0.5978041", "0.59477395", "0.5930426", "0.59171873", "0.59018606", "0.5891379", "0.58791107", "0.5842883", "0.5807654...
0.66091007
3
Returns true if both objects are equal
def xa14(YKHO, Elif): if not isinstance(Elif, Tjvi): return False return YKHO.__dict__ == Elif.__dict__
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)", "def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)", "def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False", "def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", ...
0.0
-1
Returns true if both objects are not equal
def Vdqg(YKHO, Elif): return not YKHO == Elif
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True", "def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)", "def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)", "def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)", ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748" ]
0.0
-1
Function to hide the code cells in a notebook.
def WOSH(Zode=True): _R2e(' <script>\n code_show=%s;\n function code_toggle() {\n if (code_show){\n $(\'div.input\').hide();\n } else {\n $(\'div.input\').show();\n }\n code_show = !cod...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qZ7q(fytP):\n FUjE = open(yemu + 'hide_code.py', 'r', encoding='utf-8').read()\n fytP['cells'] += [GPal.v4.new_code_cell(FUjE)]\n fytP.cells[-1].metadata = {'editable': False, 'deletable': False, 'tags': ['run_start']}\n return", "def OpJE(YKHO):\n if YKHO.subnotebook and YKHO.subnotebook.winf...
[ "0.7112237", "0.68534327", "0.659966", "0.6587749", "0.6468249", "0.6437872", "0.6437872", "0.6403394", "0.6332046", "0.63291913", "0.6174006", "0.6172084", "0.6133993", "0.6122096", "0.6111658", "0.60922164", "0.60807323", "0.60753614", "0.6040076", "0.6039905", "0.60220015"...
0.71274674
0
takes a camera that has had it's position altered (typically by an axis) and bakes it's altered world space into a new camera node
def q86U(YKHO): try: if nUiC.selectedNode().Class() == 'Camera2': YKHO.__bakeWorldSpace(nUiC.selectedNode()) else: nUiC.message('Selected node must be a Camera node') except: nUiC.message('Error - no node selected.')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _NCN(YKHO, EcVT):\n raise NotImplementedError", "def ml5B(YKHO) -> None:\n YKHO.world.camera.update(cam_base_pos=(0, -3, 0), cam_dist=1.2 * YKHO.world.env_dim, cam_yaw=0, cam_pitch=-60)", "def nfPp(YKHO):\n shtX = _qLf(YKHO.data['poses']['marker'])\n bD__ = _qLf(shtX)\n bD__.pose.position.x ...
[ "0.6688075", "0.66381145", "0.6591994", "0.65888757", "0.65076095", "0.64004433", "0.63798857", "0.63750744", "0.62982184", "0.6235511", "0.6187716", "0.6187313", "0.61619914", "0.61239475", "0.6119716", "0.6096442", "0.60927886", "0.60667163", "0.6007746", "0.5989382", "0.59...
0.6980743
0
Calculate the IoU(Intersection over Union) for each class
def zdD0(QzFq): oyIN.seterr(divide='ignore', invalid='ignore') Ylbp = oyIN.diag(QzFq) / (QzFq.sum(1) + QzFq.sum(0) - oyIN.diag(QzFq)) oyIN.seterr(divide='warn', invalid='warn') Ylbp[oyIN.isnan(Ylbp)] = 0.0 return Ylbp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FVUk(AUuH, wbZ3):\n SGf8 = 1e-06\n gEYM = ht2j.where(AUuH > 0, ht2j.ones_like(AUuH), ht2j.zeros_like(AUuH))\n iQin = gEYM * wbZ3\n b65I = gEYM + wbZ3 - iQin\n if len(AUuH.shape) == 4:\n aOkw = iQin.sum(dim=[1, 2, 3]) / (b65I.sum(dim=[1, 2, 3]) + SGf8)\n else:\n aOkw = iQin.sum()...
[ "0.68877643", "0.67869514", "0.6752201", "0.6631859", "0.65857345", "0.6425162", "0.6418296", "0.6408841", "0.64022124", "0.63992167", "0.63788486", "0.63663274", "0.6277821", "0.6273821", "0.6273821", "0.61528766", "0.6145444", "0.6142657", "0.6142657", "0.6142657", "0.61324...
0.0
-1
estimate mdegree error for s2
def QMy2(j93S: float, Nqp_: float, aPd6: float, r8hN: float): return (Nqp_ - j93S) / (aPd6 ** r8hN - 1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iAxY(V35R):\n return oyIN.sqrt(2 * V35R)", "def clq4(tTpl):\n \"\"\"Corresponds to sqrt(2*MSE)\"\"\"\n return oyIN.sqrt(2 * F6sv(tTpl))", "def MWm6(Kkkm, sS4j, vUWt=False, sfaX=None):\n if vUWt:\n return sum(abs(Kkkm - sS4j) * sfaX ** 2) / (2.0 * sum(abs(Kkkm) * sfaX ** 2))\n else:\n ...
[ "0.6182853", "0.61715615", "0.6012186", "0.59022266", "0.58656794", "0.58440846", "0.5806266", "0.5766214", "0.57342297", "0.5731087", "0.5699197", "0.5680345", "0.5665767", "0.566393", "0.5659827", "0.5639306", "0.5628909", "0.5608101", "0.5607554", "0.5579472", "0.557748", ...
0.0
-1
Calculate the global gradient angle of an Error Grid based on the slope of beta_1 / beta_2 from a linear regression fit.
def FYGD(SG6Y: xr.DataArray, aqel: float=None): lQ3t, PM67 = xG9u.utils.error_grids.fit_lin_reg(SG6Y, calc_SSE=True) yWjl, yfE2 = lQ3t.coef_ dMYj = yWjl / yfE2 if aqel: dMYj *= aqel jQ3Z = SG6Y.size - 3 vQAj = SG6Y.coords['n_high'].values FmPj = oyIN.sqrt(oyIN.sum((vQAj - oyIN.mean(v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ICX2(VXjJ):\n yvY1 = oyIN.zeros(VXjJ.shape)\n q7In = oyIN.zeros(VXjJ.shape)\n G3_m = Jqe0(VXjJ)\n YO1Y = IOuF(VXjJ)\n yvY1 = oyIN.sqrt(oyIN.square(G3_m) + oyIN.square(YO1Y))\n q7In = oyIN.degrees(oyIN.arctan2(YO1Y, G3_m)) % 360\n return (yvY1, q7In)", "def ICX2(VXjJ):\n yvY1 = oyIN.ze...
[ "0.59149516", "0.5859289", "0.5844551", "0.5737306", "0.5718493", "0.56655866", "0.5659932", "0.56284887", "0.5601761", "0.5529818", "0.551096", "0.5509079", "0.54673326", "0.5466726", "0.5466726", "0.5444149", "0.5425494", "0.53982365", "0.53951985", "0.53383833", "0.5302447...
0.537984
19
Calculate slope ratio `tau` based on the angle of the EG's gradient
def Lksf(qf6e: xr.DataArray, aqel): lQ3t = gm8p(qf6e) trHt, l2jw = lQ3t.coef_[:2] if trHt < 0 or l2jw < 0: raise vRDW('Error Grid implies improvement from removing samples') l2jw /= aqel fjgj = l2jw / trHt jmzt = oyIN.ceil(fjgj) if jmzt <= 1: E4N8('Low-fidelity not expected t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ICX2(YKHO, q7In):\n jzdc = -(6 * YKHO.scale ** 2)\n Fg_i = 3 * YKHO.scale ** 2 + oyIN.exp(2 * q7In)\n Fg_i *= oyIN.log(3 * YKHO.scale ** 2 * oyIN.exp(-2 * q7In) + 1)\n return jzdc / Fg_i", "def niXP(g1hA, Y8M5):\n M6pt = oyIN.linalg.norm(g1hA - Y8M5)\n UUZ1 = oyIN.linalg.norm(g1hA) + oyIN.l...
[ "0.6138993", "0.59789145", "0.5823093", "0.57981944", "0.5776396", "0.5776195", "0.5705586", "0.5691279", "0.56193495", "0.5604529", "0.55807406", "0.55803937", "0.55803937", "0.5576848", "0.55563194", "0.5526826", "0.54907715", "0.5488648", "0.5478156", "0.5473899", "0.54634...
0.55953866
10
Plot gradient descent thetas as line over dataset scatterplot.
def C8fL(WKvO, LVAh, q7In): CAzz = oyIN.arange(5, 23) Jd40 = q7In[0] + q7In[1] * CAzz QrM1.figure(figsize=(14, 8), dpi=80) QrM1.scatter(WKvO[:, 1], LVAh, s=30, c='r', marker='x', linewidths=1) QrM1.plot(CAzz, Jd40, label='Hypothesis: h(x) = {0:.2f} + {1:.2f}x'.format(float(q7In[0]), float(q7In[1])))...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mNrq(YKHO):\n paSp = oyIN.arange(len(YKHO.cost_values))\n QrM1.plot(paSp, YKHO.cost_values, '-o')\n QrM1.xlabel('Steps')\n QrM1.ylabel('Cost value')\n QrM1.title('Cost value per step using Gradient Descent')\n QrM1.show()", "def nhQm():\n lGZJ = eFKG(EcVT, LVAh)[1]\n OnWS = oyIN.arang...
[ "0.64846843", "0.6428969", "0.62900597", "0.6232624", "0.611364", "0.59771335", "0.5971597", "0.5903416", "0.58416146", "0.58318317", "0.5830278", "0.5746247", "0.5720636", "0.5682795", "0.56789297", "0.5666363", "0.5622674", "0.56197906", "0.56176585", "0.5616535", "0.561597...
0.60491
5
Calculates a drawprobability from the given ``draw_margin``.
def O9dg(UqYO, zNig, sEAN=None): if sEAN is None: sEAN = ibIG() return 2 * sEAN.cdf(UqYO / (epAf.sqrt(zNig) * sEAN.beta)) - 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Tqk5(xVLS, zNig, sEAN=None):\n if sEAN is None:\n sEAN = ibIG()\n return sEAN.ppf((xVLS + 1) / 2.0) * epAf.sqrt(zNig) * sEAN.beta", "def bRe2(YKHO, yk4i, UqYO):\n gdEx = abs(yk4i)\n jzdc, Fg_i = (UqYO - gdEx, -UqYO - gdEx)\n ciZM = YKHO.cdf(jzdc) - YKHO.cdf(Fg_i)\n lypQ = YKHO.pdf(Fg...
[ "0.7593655", "0.68792844", "0.67414105", "0.5885246", "0.55345535", "0.52636254", "0.5198962", "0.5196778", "0.5170926", "0.5135531", "0.5047053", "0.5020059", "0.500568", "0.493318", "0.49274144", "0.48958668", "0.48439947", "0.48370042", "0.4830074", "0.48175776", "0.481126...
0.82602787
0
Calculates a drawmargin from the given ``draw_probability``.
def Tqk5(xVLS, zNig, sEAN=None): if sEAN is None: sEAN = ibIG() return sEAN.ppf((xVLS + 1) / 2.0) * epAf.sqrt(zNig) * sEAN.beta
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def O9dg(UqYO, zNig, sEAN=None):\n if sEAN is None:\n sEAN = ibIG()\n return 2 * sEAN.cdf(UqYO / (epAf.sqrt(zNig) * sEAN.beta)) - 1", "def bRe2(YKHO, yk4i, UqYO):\n gdEx = abs(yk4i)\n jzdc, Fg_i = (UqYO - gdEx, -UqYO - gdEx)\n ciZM = YKHO.cdf(jzdc) - YKHO.cdf(Fg_i)\n lypQ = YKHO.pdf(Fg_i...
[ "0.7477747", "0.6223534", "0.61708325", "0.56069916", "0.54442436", "0.5376421", "0.53312016", "0.5297077", "0.516239", "0.5148191", "0.51478463", "0.5144056", "0.51400197", "0.51288056", "0.5122004", "0.5095994", "0.50904644", "0.5081961", "0.50438356", "0.4950263", "0.49299...
0.83216906
0
Returns true if both objects are equal
def xa14(YKHO, Elif): if not isinstance(Elif, YrjA): return False return YKHO.__dict__ == Elif.__dict__
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)", "def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)", "def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False", "def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", ...
0.0
-1
Returns true if both objects are not equal
def Vdqg(YKHO, Elif): return not YKHO == Elif
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True", "def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)", "def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)", "def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)", ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748" ]
0.0
-1
Returns a randomly generated short string.
def TJC9(): mI3O = tuKI.randint(0, 10) HKmd = ''.join((tuKI.choice(vIwR.ascii_letters) for bGrB in range(mI3O))) return HKmd
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def e7Tf():\n return ''.join((tuKI.choice(vIwR.ascii_lowercase + vIwR.digits) for bGrB in range(16)))", "def eHHU(gJUm, nSFH):\n u54L = ajWY(gJUm, nSFH)\n KCHu = ''\n dBuj = vIwR.ascii_letters + ' '\n for YRbF in range(u54L):\n vC9B = ajWY(0, len(dBuj) - 1)\n KCHu += dBuj[vC9B]\n ...
[ "0.76891124", "0.7688244", "0.74997", "0.7357174", "0.7332623", "0.7164021", "0.7114868", "0.7057856", "0.7044874", "0.7026395", "0.702491", "0.7014001", "0.6987521", "0.69705874", "0.6970573", "0.6966217", "0.6953872", "0.6950722", "0.69503194", "0.6936458", "0.69298416", ...
0.66551876
66
Returns all the protocol classes defined by the schema.
def Sve9(YKHO): for mWFP, YEnM in tq_1.getmembers(iquo): if tq_1.isclass(YEnM): Wmjn = iquo.ProtocolElement if issubclass(YEnM, Wmjn) and YEnM is not Wmjn: yield YEnM
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kxkk(YKHO):\n KndY = list(YKHO.extended_class_only_graph.nodes())\n KndY = [siC4(yaEe, YKHO) for yaEe in KndY]\n return KndY", "def PdBI(YKHO):\n return list(YKHO.query(_e60))", "def fKtG(YKHO):\n if YKHO.codebase:\n yR_P = YKHO.codebase.instantiate(YKHO.service_module_name)\n else...
[ "0.7062367", "0.6723887", "0.6395686", "0.633504", "0.6221008", "0.6120504", "0.60440546", "0.6010665", "0.6001568", "0.5988963", "0.5941727", "0.5941727", "0.5941727", "0.5941727", "0.5941727", "0.5941727", "0.5941727", "0.5941727", "0.5941727", "0.5941727", "0.5941727", "...
0.7551249
0
Returns a new instance with the required values set.
def ePr7(YKHO, Emd4): KAOR = Emd4() YKHO.setRequiredValues(KAOR) return KAOR
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def PEX4(Emd4, **B2fa):\n return Emd4().fill(**B2fa)", "def jth9(YKHO):\n BdN0 = object.__new__(type(YKHO))\n BdN0.required = YKHO.required\n BdN0.title = YKHO.title\n BdN0.type = YKHO.type\n hkxX = YKHO.values\n if hkxX is not None:\n hkxX = (*hkxX,)\n BdN0.values = hkxX\n retu...
[ "0.68121654", "0.6690383", "0.65534925", "0.65429395", "0.6465763", "0.6300176", "0.624437", "0.6218838", "0.62093496", "0.61966723", "0.6189887", "0.61832947", "0.6104517", "0.60942787", "0.608893", "0.60486805", "0.6022631", "0.6022631", "0.6022631", "0.6022631", "0.6015613...
0.0
-1
Returns the version string of the 'openhtf' package.
def kaPv(): try: return RkCj.get_distribution('openhtf') except RkCj.DistributionNotFound: return 'Unknown - Perhaps openhtf was not installed via setup.py or pip.'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def toLl():\n return '%i.%i.%i' % BtDU", "def toLl():\n return '%i.%i.%i' % BtDU", "def IexU():\n Oh8Q = ILov()\n if Oh8Q:\n return 'pyhole v%s (%s) - https://github.com/jk0/pyhole' % (MKKM, Oh8Q)\n return 'pyhole v%s - https://github.com/jk0/pyhole' % MKKM", "def kaPv() -> str:\n re...
[ "0.73133636", "0.73133636", "0.72330105", "0.7172031", "0.7097414", "0.70967686", "0.70698535", "0.7027617", "0.70062065", "0.69715357", "0.69603556", "0.6935816", "0.6935816", "0.69340885", "0.68973804", "0.68837523", "0.68592685", "0.6825335", "0.67367655", "0.6730656", "0....
0.8056936
0
Returns the first true value in the iterable. If no true value is found, returns default If pred is not None, returns the first item for which pred(item) is true.
def A_QS(Emd4, OxJJ, WmM4=None, nvEb=None): return next(filter(nvEb, OxJJ), WmM4)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def A_QS(OxJJ, WmM4=False, nvEb=None):\n return next(filter(nvEb, OxJJ), WmM4)", "def cntZ(OxJJ: Iterable[T1], lgNN: Callable[[T1], bool]) -> uLKX[W8O1, None]:\n for WKvO in OxJJ:\n if lgNN(WKvO):\n return WKvO\n return None", "def aqF5(hkxX, WmM4=None):\n for BWXx in hkxX:\n ...
[ "0.87022644", "0.7288942", "0.7259494", "0.69324744", "0.6794274", "0.6624067", "0.6258699", "0.62093365", "0.6182306", "0.61817974", "0.60582894", "0.59692484", "0.593946", "0.5907112", "0.5882776", "0.5742157", "0.5742157", "0.56672215", "0.5650616", "0.56438434", "0.558820...
0.84863067
1
Evaluate the fitness of a state vector.
def b7La(YKHO, QTBn): wkbQ = oyIN.sum(QTBn) YKHO.num_evals += 1 return wkbQ
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def b7La(YKHO, QTBn):\n wkbQ = 0\n for YRbF in range(1, len(QTBn)):\n if QTBn[YRbF] != QTBn[YRbF - 1]:\n wkbQ += 1\n return wkbQ", "def b7La(YKHO, QTBn):\n if len(QTBn) != len(YKHO.weights):\n raise Exception('The state array must be the same size as the' + ' weight and value...
[ "0.75081766", "0.7447023", "0.71910894", "0.6742266", "0.65359807", "0.6515264", "0.63796794", "0.63756007", "0.6305913", "0.6243057", "0.62399966", "0.6224244", "0.6218143", "0.6212684", "0.6119431", "0.61112726", "0.6109357", "0.61066234", "0.6089871", "0.6062419", "0.60015...
0.80098045
0
Return the problem type. Returns
def krYj(YKHO): return YKHO.prob_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tKA5(YKHO):\n return YKHO._problem_type", "def S5vz():\n tKA5 = input('What type of problem do you want?')\n return tKA5", "def fqCX(YKHO):\n Ylbp, vfD5 = YKHO.__obj.getprobtype()\n if Ylbp != 0:\n Aofo, tO9_ = YKHO.__getlasterror(Ylbp)\n raise xxyF(piss(Ylbp), tO9_)\n qNxy ...
[ "0.9160186", "0.7815036", "0.73731285", "0.72935814", "0.6773175", "0.67403567", "0.6690188", "0.6674199", "0.6661264", "0.6547367", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0....
0.0
-1
Evaluate the fitness of a state vector.
def b7La(YKHO, QTBn): xlFA = len(QTBn) zKuU = oyIN.ceil(YKHO.t_pct * xlFA) XvLw = YKHO.tail(0, QTBn) gw6c = YKHO.head(1, QTBn) if XvLw > zKuU and gw6c > zKuU: sL3H = xlFA else: sL3H = 0 wkbQ = max(XvLw, gw6c) + sL3H YKHO.num_evals += 1 return wkbQ
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def b7La(YKHO, QTBn):\n wkbQ = oyIN.sum(QTBn)\n YKHO.num_evals += 1\n return wkbQ", "def b7La(YKHO, QTBn):\n wkbQ = 0\n for YRbF in range(1, len(QTBn)):\n if QTBn[YRbF] != QTBn[YRbF - 1]:\n wkbQ += 1\n return wkbQ", "def b7La(YKHO, QTBn):\n if len(QTBn) != len(YKHO.weight...
[ "0.80098045", "0.75081766", "0.7447023", "0.6742266", "0.65359807", "0.6515264", "0.63796794", "0.63756007", "0.6305913", "0.6243057", "0.62399966", "0.6224244", "0.6218143", "0.6212684", "0.6119431", "0.61112726", "0.6109357", "0.61066234", "0.6089871", "0.6062419", "0.60015...
0.71910894
3
Return the problem type. Returns
def krYj(YKHO): return YKHO.prob_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tKA5(YKHO):\n return YKHO._problem_type", "def S5vz():\n tKA5 = input('What type of problem do you want?')\n return tKA5", "def fqCX(YKHO):\n Ylbp, vfD5 = YKHO.__obj.getprobtype()\n if Ylbp != 0:\n Aofo, tO9_ = YKHO.__getlasterror(Ylbp)\n raise xxyF(piss(Ylbp), tO9_)\n qNxy ...
[ "0.9160186", "0.7815036", "0.73731285", "0.72935814", "0.6773175", "0.67403567", "0.6690188", "0.6674199", "0.6661264", "0.6547367", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0....
0.0
-1
Evaluate the fitness of a state vector.
def b7La(YKHO, QTBn): if len(QTBn) != len(YKHO.weights): raise Exception('The state array must be the same size as the' + ' weight and values arrays.') V3oS = oyIN.sum(QTBn * YKHO.weights) V1Vz = oyIN.sum(QTBn * YKHO.values) if V3oS <= YKHO._w: wkbQ = V1Vz else: wkbQ = 0 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def b7La(YKHO, QTBn):\n wkbQ = oyIN.sum(QTBn)\n YKHO.num_evals += 1\n return wkbQ", "def b7La(YKHO, QTBn):\n wkbQ = 0\n for YRbF in range(1, len(QTBn)):\n if QTBn[YRbF] != QTBn[YRbF - 1]:\n wkbQ += 1\n return wkbQ", "def b7La(YKHO, QTBn):\n xlFA = len(QTBn)\n zKuU = oy...
[ "0.80098045", "0.75081766", "0.71910894", "0.6742266", "0.65359807", "0.6515264", "0.63796794", "0.63756007", "0.6305913", "0.6243057", "0.62399966", "0.6224244", "0.6218143", "0.6212684", "0.6119431", "0.61112726", "0.6109357", "0.61066234", "0.6089871", "0.6062419", "0.6001...
0.7447023
2
Return the problem type. Returns
def krYj(YKHO): return YKHO.prob_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tKA5(YKHO):\n return YKHO._problem_type", "def S5vz():\n tKA5 = input('What type of problem do you want?')\n return tKA5", "def fqCX(YKHO):\n Ylbp, vfD5 = YKHO.__obj.getprobtype()\n if Ylbp != 0:\n Aofo, tO9_ = YKHO.__getlasterror(Ylbp)\n raise xxyF(piss(Ylbp), tO9_)\n qNxy ...
[ "0.9160186", "0.7815036", "0.73731285", "0.72935814", "0.6773175", "0.67403567", "0.6690188", "0.6674199", "0.6661264", "0.6547367", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0.65317446", "0....
0.0
-1
Apply one step of gradient descent on the loss function `loss`, with stepsize `step_size`, and returns the updated parameters of the neural network.
def x2Fr(YKHO, N77f, Rf07=0.5, X4mj=False): vtNT = ht2j.autograd.grad(N77f, YKHO.parameters(), create_graph=not X4mj) vGU_ = U8Lr() for (mWFP, xqoZ), Ro40 in zip(YKHO.named_parameters(), vtNT): vGU_[mWFP] = xqoZ - Rf07 * Ro40 return vGU_
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def x2Fr(YKHO, N77f, Rf07=0.5, X4mj=False):\n YKHO.optim.zero_grad()\n N77f.backward()\n U78l.utils.clip_grad_norm(YKHO.parameters(), YKHO.grad_clip_norm)\n YKHO.optim.step()\n '\\n for (name, param) in self.named_parameters():\\n updated_params[name] = param.clone()\\n ...
[ "0.67761815", "0.66956115", "0.65015525", "0.6250007", "0.62382925", "0.62381643", "0.6238152", "0.6236581", "0.6222566", "0.6208493", "0.6163873", "0.6115026", "0.6065297", "0.6038957", "0.60363066", "0.60363066", "0.6027113", "0.6026331", "0.6010901", "0.60023475", "0.59567...
0.68324673
0
Returns starting state of the board.
def W9gz(): iBIi = [[KAvf, KAvf, KAvf], [KAvf, KAvf, KAvf], [KAvf, KAvf, KAvf]] return iBIi
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rEkR(YKHO):\n return oyIN.zeros(YKHO.board_size, dtype=oyIN.int8)", "def rEkR():\n return H66R.Board()", "def jKlz(YKHO):\n return (YKHO.startingPosition, (False, False, False, False))", "def D3Ar(YKHO):\n gnPz.raiseNotDefined()", "def D3Ar(YKHO):\n gnPz.raiseNotDefined()", "def D3Ar(Y...
[ "0.8081514", "0.7890486", "0.7534929", "0.72789717", "0.72789717", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", "0.72262055", ...
0.6802382
61
Returns player who has the next turn on a board.
def oyg0(iBIi): UHFx = 0 usx6 = 3 ZLJ_ = 3 for YRbF in range(usx6): for r845 in range(ZLJ_): if iBIi[YRbF][r845] != KAvf: UHFx += 1 if UHFx % 2 == 0: oyg0 = EcVT else: oyg0 = LTX_ return oyg0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Zia_(iBIi, UwI3):\n RUgX = VlLD.opponent(UwI3)\n if VlLD.any_legal_move(RUgX, iBIi):\n return RUgX\n elif VlLD.any_legal_move(UwI3, iBIi):\n return UwI3\n return None", "def Zia_(YKHO, iBIi, UwI3):\n RUgX = YKHO.opponent(UwI3)\n iiQJ = YKHO.any_legal_move(RUgX, iBIi)\n v5zX...
[ "0.7910555", "0.75213116", "0.74201775", "0.7369738", "0.7194517", "0.6977835", "0.6960541", "0.6925484", "0.69202083", "0.6902865", "0.68449634", "0.68402296", "0.68379575", "0.6823635", "0.6776662", "0.6776662", "0.6771359", "0.67104214", "0.670563", "0.66565573", "0.661637...
0.0
-1
Returns the optimal action for the current player on the board.
def SR1K(iBIi): z9Wv = xASv(iBIi) NuF9 = [] if oyg0(iBIi) == EcVT: Ty9i = -10 else: Ty9i = 10 for XeOP in z9Wv: if oyg0(iBIi) == EcVT: YW6D = emQY(Aofo(iBIi, XeOP)) if YW6D > Ty9i: Ty9i = YW6D NuF9.clear() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ePBn(YKHO):\n if YKHO.bestAction is None:\n YKHO.calculate_best_action()\n return YKHO.bestAction", "def bk5W(YKHO, Ov5A: GameState):\n SkJr = float('-inf')\n XeOP = None\n for BZN_ in Ov5A.getLegalActions(0):\n gnPz = SR1K(YKHO.evaluationFunction, 1, 0, Ov5A.generateSuccessor(0,...
[ "0.7766856", "0.76323676", "0.75855315", "0.75285065", "0.75175256", "0.74667144", "0.7460485", "0.74263537", "0.7416421", "0.73943585", "0.7375846", "0.7333894", "0.73147565", "0.7306611", "0.7284639", "0.72650313", "0.72650313", "0.7250975", "0.72331834", "0.7203267", "0.71...
0.0
-1
Split an event log dataframe by time to peform splitvalidation. prefered method time splitting removing incomplete traces. If the testing set is smaller than the 10% of the log size the second method is sort by traces start and split taking the whole traces no matter if they are contained in the timeframe or not
def jtOD(YKHO, zNig: float, zqYm: bool) -> None: wAJt = Uqbu.LogSplitter(YKHO.log) EvQg, QOe9 = wAJt.split_log('timeline_contained', zNig, zqYm) S7Ob = len(YKHO.log) if len(QOe9) < int(S7Ob * 0.1): EvQg, QOe9 = wAJt.split_log('timeline_trace', zNig, zqYm) H5ew = 'end_timestamp' if zqYm else ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def W_9F(EcVT, NI2E=0.1):\n kPGE = int(len(EcVT) * (1 - NI2E))\n return (EcVT[:kPGE], EcVT[kPGE:])", "def yiXA(jQ3Z, iCg1=None):\n YUjG = jQ3Z.index.get_level_values(1).unique()\n sxLm = YUjG[-iCg1]\n EvQg = jQ3Z[jQ3Z.index.get_level_values(1) < sxLm]\n QOe9 = jQ3Z[jQ3Z.index.get_level_values(1...
[ "0.64267266", "0.6192035", "0.61151654", "0.58443666", "0.582601", "0.57716763", "0.5668337", "0.56510764", "0.56505275", "0.5618496", "0.5566262", "0.5548292", "0.5527727", "0.5519892", "0.55147856", "0.55078566", "0.55035275", "0.545697", "0.54563254", "0.54225177", "0.5366...
0.71883243
0
Return the action next action selected by the agent. Outputs
def mq_y(YKHO, _hZ2, XEHX): Kt_s = XEHX.T if tuKI.random() < _hZ2: uZAq = oyIN.full(YKHO.num_agents, -1, dtype=int) for YRbF in range(YKHO.num_agents): uZAq[YRbF] = tuKI.choice(YKHO.actions[YRbF]) else: TTI7 = [] for YRbF in range(YKHO.num_agents): TTI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def XeOP(YKHO):\n HUMG = YKHO.strategy.get_next_move(YKHO)\n return HUMG", "def mq_y(YKHO):\n eUNT = None\n while eUNT is None:\n Acvy = input('Action: ')\n eUNT = d5fj.get(Acvy)\n return eUNT", "def V5uW(YKHO):\n XeOP = None\n if len(YKHO.action_sequence) >= 1:\n XeOP...
[ "0.77348566", "0.76988024", "0.7441929", "0.74284875", "0.7412045", "0.7385118", "0.714362", "0.70616716", "0.70453864", "0.7011706", "0.70064795", "0.6931277", "0.69082123", "0.68556374", "0.6845028", "0.68296814", "0.68015426", "0.67955905", "0.6794064", "0.6776298", "0.676...
0.68580794
13
Build a Pyspark session Returns A Pyspark object
def Yu9h(): try: ujem = lBG2.builder.config('spark.jars.packages', Hy7s.environ['SAS_JAR']).enableHiveSupport().getOrCreate() except Exception as e: bo34.error('Pyspark session failed to be created...') raise return ujem
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Hv6k():\n return lBG2.builder.appName('Transforming the historical parking occupancy and blockface datasets').getOrCreate()", "def r04n():\n _8AX = lBG2.builder.appName('PySpark Product Price Aggregration').master('local[*]').config('spark.jars.packages', 'org.apache.spark:spark-sql-kafka-0-10_2.12:3.0...
[ "0.83327085", "0.8046334", "0.79543847", "0.7754394", "0.7748665", "0.7748665", "0.7748665", "0.7748665", "0.7748665", "0.7748665", "0.7748665", "0.7748665", "0.7748665", "0.77421665", "0.7740549", "0.7740549", "0.7740549", "0.7740549", "0.77382874", "0.7731292", "0.7698544",...
0.74778855
26
Create DataFrame from the parsed Data dictionary file
def aQZG(IRmK, fE52=2, mB6j=7, AAHb=None, V_s1=None): return rLdf.Series(KVoG(IRmK, fE52, mB6j)).to_frame().rename(columns={0: AAHb}).reset_index().rename(columns={'index': V_s1})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aGny(YKHO, WJHQ):\n rqYC, Be8Z = YKHO.create_dicts(WJHQ)\n P5Wa = YKHO.create_dataframe(rqYC, ['line'])\n QE7V = YKHO.create_dataframe(Be8Z, ['relation'])\n P5Wa['relation'] = QE7V['relation']\n return (P5Wa, QE7V)", "def xP2o(YKHO):\n uJLV = YKHO.parse_root(YKHO.root)\n hBFO = {}\n f...
[ "0.7004567", "0.69562083", "0.68595755", "0.6774606", "0.6704738", "0.6596856", "0.6540819", "0.6505419", "0.6505325", "0.6492833", "0.64542645", "0.6427116", "0.6425097", "0.6395477", "0.63791543", "0.6372056", "0.63535446", "0.63303703", "0.63155377", "0.62897986", "0.62727...
0.0
-1
Test the MockQueue class.
def btio(): S6Fl = PRqg() vexM = P6bq.MockQueue(S6Fl) vexM.put(100) assert vexM.bar.n == 100
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def XyLF(YKHO):\n gGq6 = g5js()\n YKHO.assertEqual(gGq6.size(), 0)\n gGq6.enqueue(1)\n gGq6.enqueue(2)\n gGq6.enqueue(3)\n YKHO.assertEqual(gGq6.size(), 3)", "def JQZy(jm08):\n gGq6 = jm08()\n assert gGq6.is_empty()\n gGq6.enqueue(1)\n gGq6.enqueue(2)\n assert gGq6.dequeue() == 1...
[ "0.78922653", "0.77418065", "0.7635926", "0.76101106", "0.7594009", "0.75306976", "0.75189656", "0.751147", "0.7507623", "0.74678576", "0.7400566", "0.73481435", "0.73302376", "0.72987705", "0.72449917", "0.7224505", "0.7149678", "0.71354973", "0.7114766", "0.7086792", "0.707...
0.8438599
0
Return filenames for dataset.
def I3lW(LT6S, h_xa): if LT6S: return [Hy7s.path.join(h_xa, 'train-%05d-of-01024' % YRbF) for YRbF in range(XIIz)] else: return [Hy7s.path.join(h_xa, 'validation-%05d-of-00128' % YRbF) for YRbF in range(Twj7)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def I3lW(LT6S, h_xa):\n if LT6S:\n return [Hy7s.path.join(h_xa, 'LIP_train5.record')]\n else:\n return [Hy7s.path.join(h_xa, 'LIP_val5.record')]", "def a7k4():\n d0zu = Hy7s.path.join(vPBo.dataset_dir, vPBo.src_dir)\n iumf = [Hy7s.path.join(d0zu, eHNT) for eHNT in Hy7s.listdir(d0zu) if ...
[ "0.7766535", "0.7426739", "0.7408156", "0.7402582", "0.7402582", "0.7394561", "0.73676705", "0.73119813", "0.7289597", "0.727325", "0.72470963", "0.7212114", "0.71790224", "0.7169908", "0.7137002", "0.70765924", "0.7013712", "0.69706774", "0.694884", "0.6901375", "0.68103343"...
0.7420046
2
Creates an evenly spaced interval to use as a range of filtration values.
def pPZX(YKHO, NXpY=None, ihZH=None) -> oyIN.array: if NXpY is None: NXpY = YKHO.scale if ihZH is not None: return oyIN.linspace(0, ihZH, YKHO.filtration_size) if YKHO.homology_dimension == 0: bQ6z = NXpY * (2 / YKHO.number_of_points ** (1.0 / YKHO.dimension)) return oyIN.lin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def W9rs(yKcO, JCyR, YPaw):\n return oyIN.arange(yKcO, JCyR + YPaw / 2, YPaw)", "def FL9q(qw7D, VOlW: int):\n tOFf = []\n for YRbF in range(VOlW):\n tOFf.append(qw7D[YRbF::VOlW])\n return oyIN.array(tOFf)", "def cLcw(zpTo, HPJI, Gjtu):\n sTsX, KTl_ = zpTo\n wcVJ, MuLo = HPJI\n exwG ...
[ "0.5999482", "0.59812516", "0.5974637", "0.59200054", "0.5787575", "0.5768546", "0.57667994", "0.57047313", "0.5643463", "0.556981", "0.5543695", "0.55368435", "0.5516855", "0.55143434", "0.55001307", "0.54809254", "0.5479813", "0.54748803", "0.54722136", "0.546426", "0.54590...
0.6317225
0
Create a vector from a number LSB FIRST!!!!!!!!!!!!!!!
def cVNq(FGW3: int, zA0y=32): KCHu = bin(FGW3)[2:] if len(KCHu) < zA0y: KCHu = '0' * (zA0y - len(KCHu)) + KCHu hlel = [0] * zA0y for YRbF in range(len(KCHu)): hlel[YRbF] = int(KCHu[YRbF]) hlel.reverse() return hlel
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NW_w(exwG):\n return [exwG >> 12, exwG >> 4 & 15, exwG >> 8 & 15, exwG & 15]", "def pyBn(exwG, NrJS):\n KCHu = bin(exwG).replace('0b', '')\n KCHu = KCHu.rjust(NrJS, '0')\n dg7v = rLdf.Series(list(KCHu))\n dg7v = dg7v.astype(int)\n return dg7v.replace(0, -1)", "def gly3(M87E):\n return ...
[ "0.7085845", "0.62972724", "0.6276475", "0.6213324", "0.6041432", "0.59361655", "0.5902283", "0.58999306", "0.58699346", "0.58599424", "0.5828952", "0.58046937", "0.57877666", "0.57858515", "0.5780399", "0.57767344", "0.57587343", "0.5728288", "0.5721875", "0.57189244", "0.56...
0.7434745
0
Test if the input is "this" Color, not a subclass.
def PWWw(Emd4, YEnM: Any) -> bool: return type(YEnM) is Emd4
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JDSQ(Emd4, YEnM: Any) -> bool:\n return isinstance(YEnM, HRmL)", "def LB8I(YKHO, qfpW: ColorLike) -> bool:\n if isinstance(qfpW, HRmL):\n return YKHO.color == qfpW\n elif isinstance(qfpW, str):\n return str(YKHO.color) == qfpW\n elif isinstance(qfpW, int):\n return int(YKHO.c...
[ "0.776884", "0.7128117", "0.69108284", "0.6559909", "0.647652", "0.6433103", "0.63495064", "0.63337225", "0.6310386", "0.6266546", "0.6242059", "0.61742085", "0.6167546", "0.61622715", "0.61456996", "0.6129218", "0.6100601", "0.6030644", "0.60186315", "0.60119116", "0.6007696...
0.7999573
0