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
Returns an integer value from the hex input. Returns None if the value cannot be converted.
def b4Q0(Ax2O): if XknL(Ax2O): return Ax2O elif YgOi(Ax2O): return UK34(lc3M(Ax2O), 16) else: return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xCpn(WKvO):\n try:\n return int(WKvO, 16)\n except ValueError:\n return float('nan')", "def xCpn(YKHO, nPrm):\n return BlNT.unpack('<I', nPrm)[0]", "def o4TR(KCHu):\n return int(KCHu, 16) if KCHu else None", "def wqIk(zu_r):\n assert isinstance(zu_r, str)\n return int(zu_r...
[ "0.7878884", "0.7541093", "0.7457942", "0.7437304", "0.74092805", "0.73692894", "0.72905236", "0.7204437", "0.7204233", "0.71557516", "0.704644", "0.7008737", "0.68516916", "0.6816306", "0.678256", "0.672039", "0.66762286", "0.66745174", "0.6633957", "0.6545436", "0.65446544"...
0.76923496
1
Always returns a tuple. If the provided object is None, a noniterable, or a string, the tuple will have 1 item, which is the provided object. If the provided object is a dictionary, then each returned tuple is the result of the .items() method of that dictionary. If the provided object is another iterable type, then th...
def zNO0(YEnM): vVL7 = [] if isinstance(YEnM, tuple) and len(YEnM) == 1 and (taYM(YEnM[0]) is False): return YEnM elif taYM(YEnM) is False: vVL7.append(YEnM) elif iSMM(YEnM): vVL7 = [ZfUD for ZfUD in YEnM.items()] elif taYM(YEnM): for ZfUD in YEnM: if taYM...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LAY6(YEnM):\n if YEnM is None:\n return tuple()\n if isinstance(YEnM, iu5r) and (not isinstance(YEnM, jKi7.string_types)):\n return tuple(YEnM)\n return (YEnM,)", "def XR1G(YEnM):\n if isinstance(YEnM, (str, bytes)):\n return (YEnM,)\n else:\n try:\n retu...
[ "0.7552073", "0.7393024", "0.73822576", "0.7344428", "0.7276906", "0.71609235", "0.6770313", "0.66382885", "0.61524314", "0.61240804", "0.61240804", "0.60393214", "0.599839", "0.5842212", "0.5840622", "0.5830406", "0.57823426", "0.57636195", "0.57183546", "0.5662122", "0.5631...
0.65438795
8
Returns the provided values, as a tuple. Note that a tuple is always returned, even if nothing, or just a single value, is passed to the function. Values should be in the same order they were provided, but I haven't performed any regression testing to verify this. If the provided values are nonstring iterables, they ar...
def jMea(hkxX=None): if hkxX is None: return tuple() elif taYM(hkxX): kRNa = zNO0(hkxX) return kRNa else: return (hkxX,)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LAY6(T6S7):\n if not Sbtt(T6S7):\n T6S7 = (T6S7,)\n return tuple(T6S7)", "def HBgw(BWXx: Union[_V, Sequence[_V]]) -> bdIy[z4xL]:\n if isinstance(BWXx, tuple):\n return BWXx\n if isinstance(BWXx, list):\n return tuple(BWXx)\n return (BWXx,)", "def qKi0(BWXx):\n\n def L...
[ "0.7181146", "0.7089867", "0.7011371", "0.6975522", "0.68978524", "0.6857649", "0.68257636", "0.6776885", "0.6750046", "0.6743179", "0.6708799", "0.6691782", "0.66916966", "0.66916966", "0.6680304", "0.66295123", "0.655329", "0.6540188", "0.64973646", "0.6490269", "0.6477119"...
0.82774
0
Returns true if lookupKey is in this object. Case does not matter.
def FYXB(YKHO, W84R): return YKHO.has_key(W84R)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FYXB(YKHO, diJD):\n try:\n YKHO.__getitem__(diJD)\n return True\n except KeyError:\n return False", "def ygzH(YKHO, W84R):\n return YKHO.get_key(W84R) is not None", "def I_WC(YKHO, ccBJ):\n return ccBJ in YKHO", "def FYXB(YKHO, H5ew):\n return H5ew in YKHO._mapping", ...
[ "0.8707606", "0.8113717", "0.7544922", "0.7254971", "0.72467613", "0.72228855", "0.7221829", "0.7161848", "0.71409065", "0.7092052", "0.70844513", "0.7078225", "0.7074637", "0.7070705", "0.7070705", "0.70280874", "0.7020779", "0.6985456", "0.69839454", "0.6980686", "0.6980686...
0.87299246
0
Returns the value corresponding to the lookupKey.
def OP2O(YKHO, W84R): W84R = YKHO.get_key(W84R) if W84R is not None: return YKHO.__colorValues__[W84R] else: raise AttributeError('No such property: %s' % W84R)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OP2O(YKHO, diJD):\n BWXx = YKHO.get_value_by_lookup_key(diJD, return_proof=False)\n if BWXx is None:\n raise KeyError('The item with given lookup key was not found.')\n else:\n return BWXx", "def ccBJ(YKHO, H5ew):\n return YKHO.get(H5ew, None)", "def Zmkp(YKHO) -> str:\n BWXx =...
[ "0.8005136", "0.78936017", "0.75187176", "0.74299866", "0.7239145", "0.7236535", "0.7236535", "0.717595", "0.71691287", "0.71691287", "0.70174253", "0.69947094", "0.6993527", "0.697222", "0.69336504", "0.69287884", "0.69038063", "0.6880552", "0.68800575", "0.6814963", "0.6793...
0.6605924
36
Returns true if lookupKey is in this object. Case does not matter.
def ygzH(YKHO, W84R): return YKHO.get_key(W84R) is not None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FYXB(YKHO, W84R):\n return YKHO.has_key(W84R)", "def FYXB(YKHO, diJD):\n try:\n YKHO.__getitem__(diJD)\n return True\n except KeyError:\n return False", "def I_WC(YKHO, ccBJ):\n return ccBJ in YKHO", "def FYXB(YKHO, H5ew):\n return H5ew in YKHO._mapping", "def FYXB(Y...
[ "0.87299246", "0.8707606", "0.7544922", "0.7254971", "0.72467613", "0.72228855", "0.7221829", "0.7161848", "0.71409065", "0.7092052", "0.70844513", "0.7078225", "0.7074637", "0.7070705", "0.7070705", "0.70280874", "0.7020779", "0.6985456", "0.69839454", "0.6980686", "0.698068...
0.8113717
2
weight_variable generates a weight variable of a given shape.
def E9N2(YKHO, ROpF): RqgG = ZylS.truncated_normal(ROpF, stddev=0.1) return ZylS.Variable(RqgG)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def E9N2(ROpF):\n return ZylS.get_variable(name='weight', shape=ROpF, initializer=ZylS.truncated_normal_initializer(stddev=0.1))", "def E9N2(ROpF):\n return ZylS.get_variable('weights', ROpF, initializer=ZylS.contrib.layers.xavier_initializer())", "def E9N2(ROpF):\n RqgG = ZylS.truncated_normal(ROpF, ...
[ "0.8430733", "0.8416174", "0.8408999", "0.8343361", "0.82988006", "0.82945484", "0.828571", "0.827499", "0.82513815", "0.81629854", "0.8158656", "0.8156894", "0.8156894", "0.8156894", "0.8156894", "0.8156894", "0.8156894", "0.8156894", "0.8156894", "0.8156894", "0.8156894", ...
0.7815714
57
conv2d returns a 2d convolution layer with full stride.
def b_zE(YKHO, WKvO, XcU5): return ZylS.nn.conv2d(WKvO, XcU5, strides=[1, 1, 1, 1], padding='SAME')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def b_zE(YKHO, rb7a, M6vu, _0fC, hVLt=SU7A, YDYE=kZdx, FJYT=IRWS):\n return YKHO.add(yHwh(rb7a, M6vu, _0fC, hVLt, YDYE, FJYT))", "def adXX(K8MZ, *qIxc, **B2fa):\n B2fa['use_bias'] = K8MZ.use_bias\n B2fa['kernel_regularizer'] = K8MZ.l2_regularizer\n return yHwh(*qIxc, **B2fa)", "def b_zE(YKHO, *qIxc...
[ "0.7762944", "0.7729757", "0.7693895", "0.7693895", "0.762935", "0.7578933", "0.755952", "0.75423235", "0.75253934", "0.74996185", "0.7497662", "0.7479321", "0.7478032", "0.7471439", "0.7465642", "0.7455609", "0.74510777", "0.74352723", "0.74352723", "0.74352723", "0.74352723...
0.720979
51
bias_variable generates a bias variable of a given shape.
def Y7ph(YKHO, ROpF): RqgG = ZylS.constant(0.1, shape=ROpF) return ZylS.Variable(RqgG)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Y7ph(ROpF):\n RqgG = ZylS.constant(0.1, shape=ROpF)\n return ZylS.Variable(RqgG, name='bias')", "def Y7ph(ROpF):\n with ZylS.name_scope('biases'):\n RqgG = ZylS.constant(0.1, shape=ROpF)\n Es0b = ZylS.Variable(RqgG)\n return Es0b", "def Y7ph(ROpF):\n RqgG = ZylS.constant(0.1, s...
[ "0.8450208", "0.843371", "0.84225553", "0.8418631", "0.83956254", "0.8339686", "0.8330452", "0.83270395", "0.83270395", "0.83270395", "0.83270395", "0.83270395", "0.83270395", "0.83270395", "0.83270395", "0.83270395", "0.83270395", "0.8325915", "0.8306395", "0.8306395", "0.83...
0.8149706
42
Persists the model in redis. Automatically generates a primary key value if one was not provided
def xkzz(YKHO): YKHO._set_primary_key() V85b = YKHO._calculate_hash_key() w2B8 = lWLw.get_connection() nPrm = YKHO.to_dict() nPIK = w2B8.pipeline() nPIK = nPIK.hmset(V85b, nPrm['hash']) wqHy = {'hash': V85b, 'strings': {}} for mWFP, BWXx in nPrm['strings'].items(): mfnp = YKHO._c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set(YKHO):\n YKHO.pk = YKHO.__primary_key__ or str(qxeD.uuid4)\n YKHO.__redis_client__.set(YKHO.key, YKHO.__serializer__(YKHO.to_primitive()), YKHO.__expire__)", "def set(YKHO):\n YKHO.pk = YKHO.__primary_key__ or str(qxeD.uuid4)\n YKHO.__redis_client__.hset(YKHO.__set_key__, YKHO.key, YKHO.__ser...
[ "0.72159433", "0.6906345", "0.66683257", "0.6573048", "0.65594715", "0.6553447", "0.65172195", "0.6515559", "0.6371215", "0.63625574", "0.63001466", "0.6214229", "0.62095803", "0.6202289", "0.61690366", "0.61261517", "0.6110095", "0.6093419", "0.6088943", "0.6077135", "0.6057...
0.63595206
10
Set up the SQLAlchemy session for this request. The session object is stored as ``req.context.session``.
def y7BL(YKHO, qv1X, _hkX): if qv1X.method not in YKHO._options.no_session_methods: qv1X.context.session = YKHO._manager.get_session(qv1X, _hkX) if YKHO._options.sticky_binds and (not getattr(qv1X.context, 'request_id', None)): qv1X.context.request_id = YKHO._options.request_id_func() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def n0tD(YKHO, QePW):\n QePW.user = YKHO.user\n C934 = C6QX()\n C934.process_request(QePW)\n QePW.session.save()", "def cuiw(P4t4, QePW):\n from middleman import db\n UzPC = db.engine.connect()\n Kh6j = UzPC.begin()\n xAU6 = dict(bind=UzPC)\n aRDv = db.create_scoped_session(options=xAU...
[ "0.7197093", "0.68307936", "0.6678", "0.65253866", "0.6474138", "0.6458418", "0.64497", "0.643434", "0.6419108", "0.63966715", "0.63804305", "0.63760537", "0.63760537", "0.63144195", "0.63144195", "0.6313729", "0.62963253", "0.62963253", "0.62963253", "0.62963253", "0.6296325...
0.63682246
13
Cleans up the session if one was provided. Finalizes the session by calling commit if `req_succeeded` is True, rollback otherwise. Finally it will close the session.
def JJ6d(YKHO, qv1X, _hkX, Eorv, cRdF): def HySU(): qv1X.context.session = None del cuiw.info['req'] del cuiw.info['resp'] cuiw.close() cuiw = getattr(qv1X.context, 'session', None) if cuiw: try: if cRdF: cuiw.commit() else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JJ6d(YKHO, QePW, geh0, Eorv, cRdF):\n if YKHO.application.db.config['commit_on_response']:\n YKHO.application.db.session.commit()\n ' removing db session from the registry '\n YKHO.application.db.Session.remove()\n wubT(WY3t)", "def DDI8(YKHO):\n if YKHO.session is None:\n return...
[ "0.6157625", "0.6017939", "0.59958136", "0.59819144", "0.5953852", "0.5953084", "0.5950155", "0.5763208", "0.5740703", "0.57256705", "0.5700372", "0.5669608", "0.5660753", "0.5627384", "0.5624186", "0.5583079", "0.5571637", "0.5560151", "0.55596936", "0.55596936", "0.5558827"...
0.6659473
0
Check if a table is exists.
def n2Bh(YKHO): with YKHO.conn: with YKHO.conn.cursor() as DpUl: DpUl.execute('SELECT EXISTS(SELECT * FROM information_schema.tables WHERE table_name=%s)', (YKHO.table_name,)) return DpUl.fetchone()[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def n2Bh(YKHO, mWFP):\n xDcj = \"\\n IF OBJECT_ID('{name:s}', 'U') IS NOT NULL\\n SELECT 'Table Exists'\\n \".format(name=mWFP)\n YKHO.cursor.execute(xDcj)\n try:\n YKHO.cursor.fetchone()\n except:\n return False\n else:\n return True", "def n2...
[ "0.8759417", "0.86885196", "0.8645008", "0.85493505", "0.8547254", "0.8542149", "0.8536619", "0.85250765", "0.8507384", "0.8484063", "0.8478331", "0.8448222", "0.84395397", "0.84205514", "0.8411178", "0.84094286", "0.8405868", "0.84053963", "0.8394144", "0.83589846", "0.83128...
0.8405596
17
Check registration with same username
def Wkr8(YKHO, p_Ie): Edpv = QQYR() bky0 = IQJa() in4j = UPip() nYq7 = UPip() YKHO.builder.del_user_by_email(in4j) YKHO.builder.del_user_by_email(nYq7) p_Ie.registration(Edpv, in4j, bky0, bky0, True) p_Ie.go_reg_again() p_Ie.registration(Edpv, nYq7, bky0, bky0, True) GfdN = p_Ie....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def akAD(YKHO):\n YKHO.client.post(YKHO.user_url, YKHO.test_username, format='json')\n geh0 = YKHO.client.post(YKHO.user_url, YKHO.test_username2, format='json')\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_400_BAD_REQUEST)", "def xzCw(YKHO):\n ZJSq = super(eUF5, YKHO).validate() and YKHO.password ...
[ "0.74606293", "0.73507315", "0.72842896", "0.72836286", "0.72182703", "0.72053206", "0.72043663", "0.7188392", "0.7187429", "0.71667373", "0.7133373", "0.7130863", "0.71172667", "0.71089363", "0.70954716", "0.7085777", "0.70832044", "0.70728886", "0.70640415", "0.7059866", "0...
0.7232099
4
Unauthorized request to Deposit Insert API
def g1Xf(YKHO): with YKHO.client: geh0 = XQL1(YKHO, YKHO.username, YKHO.password, YKHO.data[0]) nPrm = qQXR.loads(geh0.data.decode()) YKHO.assertEqual(nPrm.get('message'), 'Unauthorized access') YKHO.assert401(geh0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def w4V3(YKHO):\n iQ7K(YKHO, YKHO.username, YKHO.password)\n nPrm = YKHO.data[0]\n nPrm.update({'currency': None})\n geh0 = XQL1(YKHO, YKHO.username, YKHO.password, nPrm)\n nPrm = qQXR.loads(geh0.data.decode())\n YKHO.assertEqual(nPrm.get('status'), 'failed')\n YKHO.assert400(geh0)", "def j0...
[ "0.656836", "0.65315974", "0.62832636", "0.62408674", "0.61563367", "0.61161613", "0.61080056", "0.61032355", "0.6049245", "0.60156626", "0.6002095", "0.59973913", "0.5993051", "0.5958053", "0.5926886", "0.5926634", "0.5923546", "0.59136117", "0.5877722", "0.58700114", "0.580...
0.6779622
0
check winner when user puts four marks over vertical
def vgBB(YKHO): iBIi = yELo() iBIi.check_move(P_ka(x=0, y=0, mark=2)) iBIi.check_move(P_ka(x=0, y=1, mark=2)) iBIi.check_move(P_ka(x=0, y=2, mark=2)) iBIi.check_move(P_ka(x=0, y=3, mark=2)) YKHO.assertEqual(iBIi.check_winner(P_ka(mark=2)), True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ND5o(YKHO):\n if YKHO.board[7] == YKHO.board[8] == YKHO.board[9] != ' ':\n YKHO.print_board()\n print(f'***{YKHO.board[7]} is the winner!***')\n YKHO.count_wins(YKHO.board[7])\n return True\n elif YKHO.board[4] == YKHO.board[5] == YKHO.board[6] != ' ':\n YKHO.print_boar...
[ "0.74144906", "0.712371", "0.7068998", "0.7040746", "0.70226824", "0.6943531", "0.6911804", "0.6902956", "0.69016", "0.6879114", "0.6878732", "0.68762946", "0.6873047", "0.6860591", "0.68579674", "0.6849", "0.6846234", "0.6846234", "0.6839402", "0.6838547", "0.6819568", "0....
0.7175906
1
check winner when user puts four marks over horizontal
def UHFZ(YKHO): iBIi = yELo() iBIi.check_move(P_ka(x=0, y=0, mark=1)) iBIi.check_move(P_ka(x=1, y=0, mark=1)) iBIi.check_move(P_ka(x=2, y=0, mark=1)) iBIi.check_move(P_ka(x=3, y=0, mark=1)) YKHO.assertEqual(iBIi.check_winner(P_ka(mark=1)), True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ND5o(YKHO):\n if YKHO.board[7] == YKHO.board[8] == YKHO.board[9] != ' ':\n YKHO.print_board()\n print(f'***{YKHO.board[7]} is the winner!***')\n YKHO.count_wins(YKHO.board[7])\n return True\n elif YKHO.board[4] == YKHO.board[5] == YKHO.board[6] != ' ':\n YKHO.print_boar...
[ "0.7492034", "0.72230244", "0.72176737", "0.71315354", "0.71114784", "0.70277536", "0.7021474", "0.70070004", "0.6999952", "0.6985469", "0.6985469", "0.6974962", "0.6959324", "0.6955566", "0.69503856", "0.69466263", "0.69459677", "0.6937922", "0.6921642", "0.6921088", "0.6916...
0.71374136
3
check neither winner over vertical
def WQo6(YKHO): iBIi = yELo() iBIi.check_move(P_ka(x=0, y=0, mark=2)) iBIi.check_move(P_ka(x=0, y=1, mark=2)) iBIi.check_move(P_ka(x=0, y=3, mark=2)) YKHO.assertEqual(iBIi.check_winner(P_ka(mark=2)), False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LDy_(YKHO):\n s5Gs = False\n for f6_R in range(YKHO._active_game_end_row):\n for jMzg in range(YKHO._active_game_start_column - 1, YKHO._active_game_end_column):\n gTDc = []\n ZrpU = True\n for UHFx in range(YKHO._counters):\n try:\n ...
[ "0.76907563", "0.7663889", "0.75787127", "0.75509584", "0.752389", "0.7483403", "0.73888695", "0.7310105", "0.7258635", "0.72289366", "0.7197796", "0.71782", "0.71470124", "0.71244067", "0.7104697", "0.70962167", "0.7057533", "0.70041686", "0.69188154", "0.6903496", "0.689389...
0.6966731
18
Return dictionary version of this ActionTrace.
def _fYl(YKHO) -> dict[str, ImMB]: Aofo = YKHO.as_short_dict() gXuE = {} if YKHO._trace: for H5ew, gIz1 in YKHO._trace.items(): gXuE[H5ew] = [ZfUD.as_dict() for ZfUD in gIz1] Aofo.update({'trace': gXuE, 'config': YKHO._config, 'blueprint_inputs': YKHO._blueprint_inputs, 'context': YK...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OMkA(YKHO):\n return {'type': 'action', 'classname': YKHO.__class__.__name__, 'debug_data': YKHO._debug_data}", "def xCw4(YKHO):\n return dict(phase_name=YKHO.phase_name, phase_type=YKHO.phase_type, actions=YKHO.actions)", "def MNRr(YKHO):\n return {'action': YKHO.name, 'state': YKHO.state, 'hero_...
[ "0.79638296", "0.72766703", "0.7092839", "0.6992434", "0.68566906", "0.68187064", "0.6804236", "0.6792165", "0.6792165", "0.6792165", "0.6792165", "0.6792165", "0.6792165", "0.6792165", "0.6792165", "0.6792165", "0.6792165", "0.6742618", "0.6742618", "0.6730412", "0.6701387",...
0.6987644
4
Return a brief dictionary version of this ActionTrace.
def ks2g(YKHO) -> dict[str, ImMB]: lz7s = None if YKHO._trace: lz7s = list(YKHO._trace)[-1] Aofo = {'last_step': lz7s, 'run_id': YKHO.run_id, 'state': YKHO._state, 'script_execution': YKHO._script_execution, 'timestamp': {'start': YKHO._timestamp_start, 'finish': YKHO._timestamp_finish}, 'domain': Y...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OMkA(YKHO):\n return {'type': 'action', 'classname': YKHO.__class__.__name__, 'debug_data': YKHO._debug_data}", "def xCw4(YKHO):\n return dict(phase_name=YKHO.phase_name, phase_type=YKHO.phase_type, actions=YKHO.actions)", "def MNRr(YKHO):\n return {'action': YKHO.name, 'state': YKHO.state, 'hero_...
[ "0.8038023", "0.70558816", "0.68600905", "0.6711391", "0.6687588", "0.6617802", "0.6518233", "0.6399602", "0.6347349", "0.6343133", "0.6334686", "0.6305432", "0.62614775", "0.62381005", "0.6229664", "0.6220111", "0.621313", "0.6189327", "0.61888003", "0.6182349", "0.6166283",...
0.6354101
8
The equation Ax=b is solved based on the conditioness of A. If A is well conditioned, then use exact method. Otherwise use Singular Value Decomposition.
def qi9k(YKHO): import numpy as oyIN if YKHO._ill_condition_: P6bq, KCHu, fHKj = oyIN.linalg.svd(YKHO.A) YKHO.x = oyIN.dot(oyIN.dot(fHKj.transpose() * (1 / KCHu), P6bq.transpose()), YKHO.b) else: YKHO.x = oyIN.linalg.solve(YKHO.A, YKHO.b)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eGi5(YKHO, k0lF, Fg_i):\n pass", "def OvqB():\n k0lF = oyIN.array([[8, 2, 4], [2, -12, 6], [4, 6, 1]])\n Fg_i = oyIN.array([4, 9, 2])\n return oyIN.linalg.solve(k0lF, Fg_i)", "def eGi5(YKHO, k0lF, Fg_i, **B2fa):\n WKvO = UEJO(k0lF, Fg_i, **B2fa)\n return WKvO", "def cmNb(Fg_i, jzdc):\n ...
[ "0.6479664", "0.64402425", "0.63735175", "0.6315453", "0.63060725", "0.61158115", "0.6043581", "0.6022185", "0.60090476", "0.59851277", "0.5984101", "0.5973221", "0.5857865", "0.58283615", "0.57882565", "0.5757805", "0.57153046", "0.57076275", "0.5669998", "0.566242", "0.5611...
0.6822311
0
Advance the iterator nsteps ahead. If n is `None`, consume entirely.
def E_nZ(oHE7, exwG=None): if exwG is None: MUE7(oHE7, maxlen=0) else: next(uOgj(oHE7, exwG, exwG), None)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ucSA(YKHO, exwG=1):\n for bGrB in range(exwG):\n YKHO.next()", "def E_nZ(oHE7, exwG):\n if exwG is None:\n MUE7(oHE7, maxlen=0)\n else:\n next(uOgj(oHE7, exwG, exwG), RA38)", "def E_nZ(WhY1: Iterable[Any], exwG: Optional[int]=None) -> None:\n if exwG is None:\n g760....
[ "0.7850273", "0.7478984", "0.7255627", "0.717492", "0.7136577", "0.70795035", "0.70369476", "0.7013641", "0.7006597", "0.6819109", "0.67879623", "0.67443645", "0.6729223", "0.670236", "0.6686645", "0.66765326", "0.6667495", "0.6666172", "0.66639256", "0.66006285", "0.6544261"...
0.6994215
10
Returns True if iterable contains no elements >>> is_empty(()) True >>> is_empty(x for x in range(5) if x > 42) True
def FBfn(OxJJ): return next(iter(OxJJ), RA38) is RA38
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FBfn(OxJJ: Iteratable, tj_t: bool=True) -> bool:\n oHE7 = iter(OxJJ)\n if tj_t:\n YRbF = 0\n for bGrB in oHE7:\n YRbF += 1\n return YRbF == 0\n else:\n next(oHE7)\n return False", "def lsmZ(fUYa: Iterable[A]) -> bool:\n return not bool(fUYa)", "def ...
[ "0.7923656", "0.7664312", "0.7526381", "0.75252074", "0.7490302", "0.74092853", "0.7386098", "0.73583347", "0.73556066", "0.7349717", "0.7320362", "0.7320362", "0.7320362", "0.7320362", "0.7311978", "0.73051506", "0.73038447", "0.73038447", "0.73038447", "0.7299774", "0.72997...
0.820207
0
Returns True if all values are True >>> none([False, 0, [], None, ""]) True
def Ywqg(OxJJ): return not any(OxJJ)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def k5kO(*qIxc) -> bool:\n return all((d7pR is None for d7pR in qIxc))", "def zb2l(YKHO, IC2L):\n KcAH = True\n for BWXx in IC2L:\n if BWXx is not None:\n KcAH = False\n return KcAH", "def IQn2(*qIxc) -> bool:\n return all((d7pR is not None for d7pR in qIxc))", "def b8lC(YKHO...
[ "0.7542234", "0.74551785", "0.74040115", "0.7283706", "0.72688633", "0.7250231", "0.7236494", "0.7183401", "0.7066446", "0.7035595", "0.68455833", "0.6839522", "0.6837346", "0.6837346", "0.68240154", "0.6806058", "0.6774526", "0.67718667", "0.6729719", "0.6675821", "0.6664927...
0.7018564
10
Calculates the FPR at a particular TRP for outofdistribution detection. The lower the value the better.
def ibWh(lUD2: np.ndarray, IjzX: np.ndarray, Wbxj: float) -> float: if len(lUD2) * len(IjzX) == 0: return oyIN.NAN a1PO = oyIN.quantile(lUD2, 1 - Wbxj) OS6F = (IjzX >= a1PO).mean() return OS6F
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def c3be(YKHO):\n return oyIN.float64(YKHO.FP) / YKHO.N", "def q4E3(BS9c, qnGP):\n return float(BS9c) / float(qnGP)", "def c3be(*qIxc, **B2fa):\n HRJ_, ytgA, pWm4, FYKK = ZflB(*qIxc, **B2fa)\n return ytgA / (ytgA + pWm4) if ytgA + pWm4 != 0 else 0", "def hO2W(YKHO):\n return oyIN.float64(YKHO....
[ "0.76118124", "0.72015595", "0.7053207", "0.694549", "0.69325006", "0.6783989", "0.6651895", "0.66450137", "0.6580568", "0.64952564", "0.64568317", "0.63855773", "0.6383888", "0.6375078", "0.6323146", "0.6257493", "0.6254632", "0.6224092", "0.62158775", "0.6215465", "0.619012...
0.7243559
1
Returns a single object from the DB that matches the given criteria, or None if no objects were found. kw is a dictionary of field > value criteria.
def GgQQ(**YSA3): YSA3['_start'] = 0 YSA3['_limit'] = 1 p9NO = jZU2.get_all(**YSA3) if p9NO: return p9NO[0] return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def A3Na(Emd4, **B2fa):\n return GhOX.query(Emd4).filter_by(**B2fa).first()", "def A3Na(YKHO, **B2fa):\n assert len(B2fa) > 0\n return YKHO._query().filter_by(**B2fa).first()", "def rTS8(rV9y, *qIxc, **B2fa):\n SR0I = gWcE(rV9y)\n try:\n return SR0I.get(*qIxc, **B2fa)\n except SR0I.mod...
[ "0.6359264", "0.62846464", "0.6236258", "0.6234173", "0.61958206", "0.61190975", "0.61190975", "0.61190975", "0.61039656", "0.6099086", "0.609211", "0.60500985", "0.6038752", "0.59922874", "0.59775555", "0.597004", "0.5906778", "0.58711755", "0.58693653", "0.58222514", "0.582...
0.0
-1
Checks whether `url` is a valid URL.
def SGVO(YKHO, bD7m): U5Jc = uRlK.parse.urlparse(bD7m) WXXa = ['http', 'https'] return bool(U5Jc.netloc) and bool(U5Jc.scheme) and (U5Jc.scheme in WXXa)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yaqE(bD7m):\n return True if f8eG.match(bD7m) else False", "def SGVO(bD7m):\n aBkf = _FIc.URLValidator()\n try:\n aBkf(bD7m)\n except _FIc.ValidationError:\n return False\n else:\n return True", "def Sxk4(bD7m):\n if not ZbWC.search('^(http|https|ftp)' + '\\\\://[a-z0...
[ "0.8939179", "0.8780518", "0.87553483", "0.86886775", "0.86520433", "0.86460173", "0.8619089", "0.85934895", "0.8589099", "0.8505128", "0.8439438", "0.8439245", "0.8436709", "0.8436638", "0.8415732", "0.8406938", "0.83978635", "0.83957845", "0.8382483", "0.83688885", "0.83594...
0.8126945
47
Replace `url` with empty space "". Tokenize and lemmatize input `text`. Converts to lower case and strips whitespaces.
def wr3U(l5Ny): c38g = GFnk() gwet = 'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+' QfPA = ZbWC.findall(gwet, l5Ny) for bD7m in QfPA: l5Ny = l5Ny.replace(bD7m, '') hwHU = di0c.words('english') s2mk = dFss(ZbWC.sub('[^a-zA-Z0-9]', ' ', l5Ny.lower().stri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ws_3(l5Ny):\n return bgbl(l5Ny)", "def ws_3(l5Ny):\n return bgbl(l5Ny)", "def RG0J(l5Ny):\n bD7m = ZbWC.compile('https?://\\\\S+ |www\\\\.\\\\S+')\n return bD7m.sub(' ', l5Ny)", "def kRs7(l5Ny):\n return bD7m.sub('', l5Ny)", "def wr3U(l5Ny: str) -> str:\n gwet = 'http[s]?://(?:[a-zA-Z...
[ "0.7458556", "0.7458556", "0.72418463", "0.7122739", "0.7112181", "0.7110054", "0.704019", "0.7032933", "0.7026921", "0.7012748", "0.7012748", "0.70011604", "0.69572735", "0.69252163", "0.68946606", "0.6863506", "0.67829597", "0.6751937", "0.6727803", "0.67217475", "0.6720114...
0.5992718
75
Plot the grey scale images of pixel data
def CWSF(JvFH, gzUd): aWvE = JvFH.split(',') zSfy = XTiz.asfarray(aWvE[1:]).reshape((28, 28)) l5Ny = 'Original Label: ' + str(aWvE[0]) + ' ' + 'Predicted Label: ' + str(gzUd) QrM1.title(l5Ny) QrM1.imshow(zSfy, cmap='Greys', interpolation='None') QrM1.show()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kj9G(LNo8):\n if len(LNo8.shape) == 2:\n QrM1.imshow(LNo8, cmap='gray')\n else:\n QrM1.imshow(LNo8)\n QrM1.axis('off')", "def Ogbo(LNo8):\n QrM1.figure(figsize=(12, 10), dpi=80)\n QrM1.imshow(LNo8)\n QrM1.show()", "def ajBc(VXjJ: np.array, wytA=(12, 9)):\n QrM1.figure(fig...
[ "0.7538757", "0.726784", "0.7165654", "0.71484065", "0.71022815", "0.7043638", "0.70261014", "0.69809955", "0.69357485", "0.68495", "0.68256295", "0.6809008", "0.6806355", "0.67423576", "0.67319965", "0.67223775", "0.6699675", "0.6698578", "0.6686224", "0.6684611", "0.6676029...
0.0
-1
Use 2 parameter linear regression to solve for start parameters, using max(x), min(x) and 1 for d, c, and f
def FcmE(YKHO, WKvO, LVAh): Csk6 = oyIN.max(LVAh) if YKHO.model_type == '3pl': Z9rn = 0 elif YKHO.model_type in ['4pl', '5pl']: Z9rn = oyIN.max([0, oyIN.min(LVAh)]) Hgyt = (Csk6 - LVAh) / (LVAh - Z9rn) NSTF = WKvO.copy() QyVM = (Hgyt > 0) & (NSTF > 0) & (Hgyt < oyIN.inf) Hgyt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def u5rr(bySB, hkxX):\n C3ST = eRGJ()\n C3ST.fit(ydI2(bySB), hkxX)\n return (BlB8, NArs)", "def RPzV(KQWz, Opza):\n if not isinstance((KQWz, Opza), (oyIN.generic, oyIN.ndarray)):\n if isinstance((KQWz, Opza), (list, tuple)):\n KQWz, Opza = (oyIN.array(KQWz), oyIN.array(Opza))\n ...
[ "0.6706969", "0.660801", "0.6533863", "0.6495024", "0.64836204", "0.647107", "0.6459772", "0.63875765", "0.63700736", "0.6364838", "0.6361351", "0.6317616", "0.63033044", "0.62971413", "0.6256189", "0.62454957", "0.6245204", "0.62445015", "0.6230701", "0.62224376", "0.6217622...
0.70328087
0
r""" Calculates the elementwise determinant of the log jacobian. Householder flow
def mylo(YKHO, WKvO, LVAh): return ht2j.zeros(WKvO.size()[:-1], dtype=WKvO.dtype, layout=WKvO.layout, device=WKvO.device)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MA1q(WKvO):\n return RLq4().forward()", "def mylo(YKHO, WKvO, LVAh):\n HVyp, t7Wz = YKHO._cached_x_y\n if WKvO is not HVyp or LVAh is not t7Wz:\n YKHO(WKvO)\n return YKHO._cached_logDetJ.sum(-1)", "def hUrD(YKHO, epBp, q7In):\n ssxF = epBp.shape[0]\n LBLJ = YKHO.T * 3.0 * oyIN.log(...
[ "0.75820494", "0.7046532", "0.6934128", "0.69049984", "0.68177474", "0.67841834", "0.67235285", "0.670042", "0.6648556", "0.6642164", "0.663347", "0.65904677", "0.64891106", "0.63157225", "0.63157225", "0.62610435", "0.6254222", "0.6246925", "0.624523", "0.6229696", "0.622568...
0.69419986
2
Freezes the state of a session into a pruned computation graph. Creates a new computation graph where variable nodes are replaced by constants taking their current value in the session. The new graph will be pruned so subgraphs that are not necessary to compute the requested outputs are removed. session The TensorFlow ...
def _w3s(cuiw, j1Hi=None, OnZF='main_output', lUZN=True): pNZh = cuiw.graph with pNZh.as_default(): hq9i = list(set((Ty9i.op.name for Ty9i in ZylS.global_variables())).difference(j1Hi or [])) OnZF = OnZF or [] OnZF += [Ty9i.op.name for Ty9i in ZylS.global_variables()] uDSE = pNZh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _w3s(cuiw, j1Hi=None, OnZF=None, lUZN=True):\n from tensorflow.python.framework.graph_util import convert_variables_to_constants\n pNZh = cuiw.graph\n with pNZh.as_default():\n hq9i = list(set((Ty9i.op.name for Ty9i in ZylS.global_variables())).difference(j1Hi or []))\n OnZF = OnZF or []...
[ "0.8350933", "0.8350933", "0.834293", "0.8325345", "0.83203864", "0.8315598", "0.8315598", "0.8315598", "0.8315598", "0.83109385", "0.83109385", "0.83109385", "0.83109385", "0.83102256", "0.83025795", "0.8295273", "0.8243807", "0.7724233", "0.63688517", "0.63453877", "0.62962...
0.83327407
3
This function normalizes the distance map between 0 and 100 Attributes
def XUZM(xfoo): JCoA = oyIN.amax(xfoo) xfoo = xfoo / JCoA xfoo *= 100 return xfoo
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NkkI(eTiE):\n wjRY = oyIN.abs(eTiE).sum(axis=1, keepdims=True)\n return oyIN.abs(eTiE) / wjRY", "def jnV4(YKHO, Ayfi: int) -> float:\n aq_o = max(len(YKHO.pair.doc_1), len(YKHO.pair.doc_2))\n return round(1 - Ayfi / aq_o, 4)", "def NkkI(Csk6):\n r8hN = 0.0\n for yzQ0 in Csk6.values():\n ...
[ "0.6889737", "0.6783052", "0.66641104", "0.64695406", "0.63540757", "0.634857", "0.6325612", "0.6259803", "0.6247309", "0.62315416", "0.61812973", "0.61745334", "0.61693054", "0.61620957", "0.6125442", "0.6116888", "0.61142486", "0.6107579", "0.60962033", "0.60827047", "0.607...
0.7894752
0
Returns `model_fn` closure for TPUEstimator.
def zl0v(YKHO, H0j9, USzt, b0Ix, okF6=None, phrK=None, as3x=False, K0do='adamw', y_SV=False): def JnVv(bySB, Crrw, Tuqy, NArs): """The `model_fn` for TPUEstimator.""" ZylS.logging.info('*** Features ***') for mWFP in sorted(bySB.keys()): ZylS.logging.info(' name = %s ,shape = %s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rNzv(QjBU):\n\n def Csmj(bySB, Crrw, Tuqy, NArs):\n \"\"\"Model function.\"\"\"\n del Crrw, NArs\n qqWV = C3ST.BaseModel(QjBU, mode=Tuqy, features=bySB)\n if Tuqy == QUnY.ModeKeys.INFER:\n xnXT = qqWV.predicted_ids\n xnXT = ZylS.transpose(xnXT, [2, 1, 0])\n ...
[ "0.67876256", "0.67231953", "0.6708339", "0.6708339", "0.6704804", "0.6642739", "0.66179776", "0.6606682", "0.64987177", "0.64855075", "0.64845395", "0.64673865", "0.6446065", "0.6385782", "0.63442314", "0.6340337", "0.63192046", "0.62871474", "0.6259095", "0.6225923", "0.622...
0.0
-1
The `model_fn` for TPUEstimator.
def JnVv(bySB, Crrw, Tuqy, NArs): ZylS.logging.info('*** Features ***') for mWFP in sorted(bySB.keys()): ZylS.logging.info(' name = %s ,shape = %s' % (mWFP, bySB[mWFP].shape)) LT6S = Tuqy == uE5J.estimator.ModeKeys.TRAIN Pha6 = bySB['input_ids'] VNiV = bySB['label_ids'] if okF6 != None: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ZPn8(YKHO, bySB, Crrw, ND3i):\n oYbx = gnPz.fn_args(YKHO._model_fn)\n B2fa = {}\n GPtr = jth9.deepcopy(YKHO._config)\n NArs = jth9.deepcopy(YKHO._params)\n if 'labels' in oYbx:\n B2fa['labels'] = Crrw\n elif Crrw is not None:\n raise ValueError('model_fn does not take labels, bu...
[ "0.72362834", "0.7198053", "0.71058893", "0.70971304", "0.7038464", "0.7038464", "0.697475", "0.69312525", "0.6887504", "0.67796916", "0.66569746", "0.6626366", "0.66256857", "0.6591902", "0.65852433", "0.65476555", "0.6534668", "0.6486356", "0.6484161", "0.64805233", "0.6425...
0.0
-1
Finds nearest power of 2 number to a given number
def hP53(WKvO): if WKvO == 0: return 0 LzSr = epAf.ceil(epAf.log(WKvO) / epAf.log(2)) return int(epAf.pow(2, LzSr))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LcVR(exwG):\n return pow(2, int(epAf.log(exwG, 2) + 0.5))", "def hzxu(WKvO: int) -> int:\n LVAh = 2\n while LVAh < WKvO:\n LVAh *= 2\n return LVAh", "def VLbE(WKvO):\n jzdc = oyIN.power(2, oyIN.ceil(oyIN.log2(WKvO)))\n Fg_i = oyIN.power(2, oyIN.floor(oyIN.log2(WKvO)))\n if abs(j...
[ "0.859297", "0.845237", "0.82107013", "0.79800993", "0.79691863", "0.7962076", "0.7955714", "0.79087955", "0.78506666", "0.7717021", "0.7688468", "0.7684385", "0.76625776", "0.7639136", "0.7583191", "0.75815904", "0.7565239", "0.7560668", "0.75302655", "0.75235057", "0.751676...
0.8152411
3
Tests the actor details endpoint 404
def JF6J(YKHO): QiwA = 10000 geh0 = YKHO.client.get(f'/api/actors/{QiwA}/details', headers=YKHO.director_header) nPrm = qQXR.loads(geh0.data) YKHO.assertEqual(geh0.status_code, 404) YKHO.assertEqual(nPrm['message'], 'resource not found') YKHO.assertEqual(nPrm['success'], False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dgTF(YKHO):\n Ylbp = YKHO.client().get('/actors/100', headers=YKHO.assistant_header)\n nPrm = qQXR.loads(Ylbp.data)\n YKHO.assertEqual(Ylbp.status_code, 404)\n YKHO.assertEqual(nPrm['success'], False)", "def _hn1(vY7J):\n geh0 = vY7J.get('/expense/4', status=404)\n assert geh0.status_code =...
[ "0.8057153", "0.736934", "0.7229944", "0.7189062", "0.71291935", "0.71283835", "0.7055764", "0.69707114", "0.6956155", "0.6952968", "0.6945839", "0.6945243", "0.6938865", "0.6927341", "0.69106007", "0.69087327", "0.6900655", "0.6886438", "0.6877757", "0.6872127", "0.685001", ...
0.8665331
0
Tests actor creation failure
def Wcln(YKHO): j4lQ = Zrzj.query.all() aZac = {} geh0 = YKHO.client.post('/api/actors', json=aZac, headers=YKHO.director_header) nPrm = qQXR.loads(geh0.data) cjZ9 = Zrzj.query.all() YKHO.assertEqual(geh0.status_code, 422) YKHO.assertEqual(nPrm['success'], False) YKHO.assertTrue(len(cjZ9...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eLFX(YKHO):\n Ylbp = YKHO.client().post('/actors', json=YKHO.new_actor)\n YKHO.assertEqual(Ylbp.status_code, 401)", "def DhAL(YKHO):\n Z7zz = Zrzj.query.all()\n geh0 = YKHO.client.post('/api/actors', json=YKHO.actor, headers=YKHO.director_header)\n nPrm = qQXR.loads(geh0.data)\n YKHO.assert...
[ "0.74873495", "0.71960765", "0.7126118", "0.7086088", "0.7059783", "0.6945235", "0.6714873", "0.6609158", "0.65492004", "0.65348256", "0.65052915", "0.64665055", "0.64492756", "0.6439133", "0.6382819", "0.63475174", "0.6346494", "0.63198805", "0.6281413", "0.62631", "0.624234...
0.77629656
0
Tests update an actor success
def YCID(YKHO): QiwA = 1 r7tU = {'name': 'updated actor name', 'website': 'http://www.updated-website-link.com/actor'} geh0 = YKHO.client.patch(f'/api/actors/{QiwA}', json=r7tU, headers=YKHO.director_header) nPrm = qQXR.loads(geh0.data) YKHO.assertEqual(geh0.status_code, 200) YKHO.assertEqual(nP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TfB7(YKHO):\n pass", "def bsDe(YKHO):\n Fu87 = {'age': 99}\n Ylbp = YKHO.client().patch('/actors/1', json=Fu87, headers=ITtF)\n nPrm = qQXR.loads(Ylbp.data)\n YKHO.assertEqual(Ylbp.status_code, 200)\n YKHO.assertTrue(nPrm['success'])", "def IsIF(YKHO):\n pass", "def IsIF(YKHO):\n ...
[ "0.7388953", "0.72069806", "0.7170402", "0.7170402", "0.7160336", "0.71496534", "0.6968426", "0.6945496", "0.6935605", "0.6916445", "0.6915247", "0.6842258", "0.678268", "0.67516553", "0.67382586", "0.6728003", "0.6694138", "0.6650266", "0.6645885", "0.6640712", "0.6634666", ...
0.81299573
0
Linear search for list/array If x is not in l, return False Else, return the index
def TrX4(vC9B, WKvO): for YRbF in range(len(vC9B)): if vC9B[YRbF] == WKvO: return YRbF return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TrX4(M1i2, ZfUD):\n for YRbF in range(len(M1i2)):\n if Dpgk == M1i2[YRbF]:\n return YRbF\n return False", "def TrX4(WKvO, M1i2):\n OnWS = 0\n while OnWS < len(M1i2):\n if WKvO == M1i2[OnWS]:\n return OnWS\n OnWS += 1\n return -1", "def ZRI5(aPd6, WK...
[ "0.7068906", "0.7061915", "0.7047377", "0.70335805", "0.69833", "0.69529796", "0.69472", "0.6921384", "0.69211674", "0.69146866", "0.68697023", "0.6843724", "0.68383205", "0.6793652", "0.6791898", "0.6783437", "0.6780333", "0.67628133", "0.6758467", "0.6732064", "0.6723796", ...
0.831199
0
Return the holdings found on the holdings page.
def gv3L(YKHO) -> x1iM[igFR]: Z9JV = rKuS(YKHO.page, 'html.parser') m3D4 = Z9JV.find_all(attrs={'class': 'holding-inner-container'}) AEBU = set([jugv(cUV8) for cUV8 in m3D4[1:]]) return [hFiK.to_dict() for hFiK in AEBU]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yrJh(YKHO):\n return YKHO._holdings", "def DVci(nLFR):\n try:\n _hkX = nLFR.holdings()\n if _hkX['status'] == 'success':\n SpbS(f'Current holdings are: {_hkX['data']}')\n else:\n raise Exception(f'Status:{_hkX['status']}, Error:{_hkX['error_type']}, Error Mess...
[ "0.77038914", "0.7560286", "0.71468633", "0.6939533", "0.6908012", "0.69056284", "0.6803659", "0.65238744", "0.65197086", "0.6439919", "0.639231", "0.63608587", "0.63501257", "0.60507", "0.6046568", "0.6034425", "0.59972614", "0.59679955", "0.5964791", "0.5948105", "0.5905415...
0.81815326
0
Splits the current QuadTree instance four ways through the midpoint. Returns A list of four "sub" QuadTree instances, corresponding with the first, second, third, and fourth quartiles, respectively.
def lpha(YKHO): JRC0, IA3S, LChT, dCLF = YKHO.bounds kEK1, OPNK = ((JRC0 + IA3S) / 2, (LChT + dCLF) / 2) hbUd = (JRC0, kEK1, OPNK, dCLF) BzON = (JRC0, kEK1, LChT, OPNK) iv7Q = (kEK1, IA3S, OPNK, dCLF) aJfp = (kEK1, IA3S, LChT, OPNK) return [salA(YKHO.data, bounds=hbUd), salA(YKHO.data, bound...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tFpc(YKHO):\n YKHO._child_quads = list()\n D5g7 = [YKHO._left_bottom[0], YKHO._left_bottom[1] + YKHO._halve_size]\n Ae2G = YKHO._left_bottom\n QZcN = [YKHO._left_bottom[0] + YKHO._halve_size, YKHO._left_bottom[1] + YKHO._halve_size]\n FohR = [YKHO._left_bottom[0] + YKHO._halve_size, YKHO._left_b...
[ "0.6486648", "0.6213532", "0.61090004", "0.5917518", "0.5751392", "0.5703982", "0.5662125", "0.5623792", "0.547481", "0.5466544", "0.5426481", "0.5407811", "0.54025966", "0.5373036", "0.5369666", "0.535689", "0.5331402", "0.53151786", "0.53048176", "0.5293491", "0.5292953", ...
0.7917151
0
Yield items from any nested iterable. Used by ``QuadTree.flatten`` to onedimensionalize a list of sublists. cf.
def PWgb(DumB): for WKvO in DumB: if isinstance(WKvO, iu5r): yield from PWgb(WKvO) else: yield WKvO
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MKPt(zGKt):\n for YRbF in zGKt:\n if isinstance(YRbF, (list, tuple)):\n for r845 in MKPt(YRbF):\n yield r845\n else:\n yield YRbF", "def MKPt(OxJJ):\n for DumB in OxJJ:\n for ZfUD in DumB:\n yield ZfUD", "def GL6G(bCES):\n for ge...
[ "0.73432434", "0.7287838", "0.726453", "0.7141747", "0.7065719", "0.7064324", "0.7057015", "0.70526403", "0.7038518", "0.6991512", "0.69907945", "0.6972162", "0.6971919", "0.6941278", "0.6908331", "0.6870057", "0.6864585", "0.682927", "0.6823004", "0.6786495", "0.6768306", ...
0.70887923
4
Initialize a Distance class
def FIMM(YKHO): super().__init__()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO, Ayfi, nPs7):\n YKHO.distance = Ayfi\n YKHO.nearestNeighbor = nPs7", "def FIMM(YKHO, hgjH: Location, Ayfi: float) -> None:\n YKHO.center = hgjH\n YKHO.distance = Ayfi", "def FIMM(YKHO, Ayfi, aC0l, **qIxc):\n YKHO.representation = 'distance'\n YKHO.distance = Ayfi\n YKHO.refer...
[ "0.8098148", "0.7777319", "0.7511083", "0.7461962", "0.7359537", "0.7294895", "0.7273708", "0.71602654", "0.71221566", "0.7090681", "0.7022707", "0.7022624", "0.7004343", "0.6972952", "0.69608307", "0.69516456", "0.68896115", "0.6887274", "0.68535805", "0.6830927", "0.6830927...
0.0
-1
Get BGP config NOT IMPLEMENTED.
def hsps(YKHO, uOe2='', AAbN=''): return super(RKnC, YKHO).get_bgp_config()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iPWw(YKHO):\n return YKHO.__bgp", "def iPWw(YKHO):\n return YKHO.__bgp", "def iPWw(YKHO):\n return YKHO.__bgp", "def iPWw(YKHO):\n return YKHO.__bgp", "def iPWw(YKHO):\n return YKHO.__bgp", "def iPWw(YKHO):\n return YKHO.__bgp", "def iPWw(YKHO):\n return YKHO.__bgp", "def hE3...
[ "0.6856411", "0.6856411", "0.6856411", "0.6856411", "0.6856411", "0.6856411", "0.6856411", "0.6742468", "0.6695238", "0.6695238", "0.6649395", "0.6649395", "0.6649395", "0.6623218", "0.66171914", "0.6616589", "0.6606772", "0.6593395", "0.6593395", "0.65880394", "0.65848434", ...
0.7582504
0
Get general device information.
def R4ak(YKHO): U5bT = R4ak(self=YKHO) return U5bT
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mikw():\n return wk86.URI['GET_DEVICE_INFO']", "def GWuV(YKHO):\n return YKHO._device.device_info", "def GWuV(YKHO):\n return YKHO._api.device_info", "def GWuV(YKHO):\n return {'name': YKHO._name, 'identifiers': {(Sugg, YKHO._mac)}, 'manufacturer': 'Gree', 'connections': {(cgki, YKHO._mac)}}"...
[ "0.7958265", "0.77104867", "0.7704932", "0.76699704", "0.7662048", "0.7662048", "0.7587733", "0.7515243", "0.7515243", "0.7515243", "0.7515243", "0.7515243", "0.74976575", "0.74953634", "0.74844027", "0.74835145", "0.7475011", "0.74693984", "0.74628395", "0.74602145", "0.7458...
0.0
-1
Get network instances NOT IMPLEMENTED.
def Fjhn(YKHO, mWFP=''): return super(RKnC, YKHO).get_network_instances()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Qkrg(YKHO):\n return YKHO.__network_instances", "def Qkrg(YKHO):\n return YKHO.__network_instances", "def Qkrg(YKHO):\n return YKHO.__network_instances", "def Qkrg(YKHO):\n return YKHO.__network_instances", "def Qkrg(YKHO):\n return YKHO.__network_instances", "def lbzt(YKHO) -> x1iM[ec...
[ "0.8163881", "0.8163881", "0.8163881", "0.8163881", "0.8163881", "0.751134", "0.74567664", "0.7410379", "0.72067255", "0.70983994", "0.7060386", "0.69285285", "0.69138455", "0.69069785", "0.6894531", "0.6878117", "0.6816166", "0.67975545", "0.6780671", "0.67648613", "0.675579...
0.70544314
11
Finds the actual path to a named command. The first one on $PATH wins.
def lr1t(mWFP): for Xf84 in Hy7s.environ.get('PATH', '').split(':'): SkC9 = Hy7s.path.join(Xf84, mWFP) if Hy7s.path.exists(SkC9): return SkC9
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def B7aI(mWFP):\n if Hy7s.path.exists(mWFP):\n return Hy7s.path.abspath(mWFP)\n pmON = Nygx(mWFP)\n if pmON is not None:\n fytP('resolved command %r to path %r' % (mWFP, pmON))\n return pmON\n return mWFP", "def B7aI(mWFP):\n if Hy7s.path.exists(mWFP):\n return Hy7s.pat...
[ "0.7919445", "0.7919445", "0.75377", "0.7536112", "0.7445661", "0.7361025", "0.7313584", "0.72445846", "0.72121614", "0.7076106", "0.7033003", "0.70097375", "0.6987182", "0.69449323", "0.6903157", "0.689726", "0.6850528", "0.67868054", "0.6776743", "0.67496824", "0.67496824",...
0.7254385
7
Returns the string representation of the model
def gTzM(YKHO): import simplejson as qQXR if jKi7.PY2: import sys U3hF(sys) sys.setdefaultencoding('utf-8') return qQXR.dumps(yInN(YKHO), ensure_ascii=False)
{ "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 return YKHO.text", "def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\...
[ "0.86418265", "0.85103965", "0.7853324", "0.77442306", "0.7712258", "0.76979405", "0.765959", "0.7637644", "0.76218504", "0.7607561", "0.7606604", "0.7606604", "0.7606604", "0.75990754", "0.7585653", "0.758149", "0.7570811", "0.7567585", "0.75392604", "0.75392604", "0.7527967...
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 return not YKHO.__eq__(Elif)", "def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif", "def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif", "def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True", "def Vdqg(...
[ "0.8392633", "0.8354901", "0.82950056", "0.8132309", "0.81149805", "0.8099986", "0.809911", "0.8097883", "0.8097883", "0.8092252", "0.8092252", "0.8092252", "0.8092252", "0.8085141", "0.8085141", "0.8085141", "0.8085141", "0.8085141", "0.8066694", "0.80594814", "0.805757", ...
0.0
-1
Check if the current schema has a table matching the given table name
def RPa5(YKHO, tyNF): return YKHO._accessor.has_table(tyNF)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def n2Bh(YKHO, uPxI, GTA_):\n return True", "def hRPm(uPxI: str, GTA_: str) -> bool:\n return len([tyNF for tyNF in xU0C if tyNF.table_name == GTA_ and tyNF.schema == uPxI]) == 1", "def n2Bh(GTA_: str='user') -> bool:\n ckTe = tq_1(eHpk)\n return ckTe.has_table(GTA_)", "def n2Bh(YKHO, mWFP):\n ...
[ "0.8518378", "0.8437516", "0.8356141", "0.83514357", "0.8303433", "0.8229661", "0.8136239", "0.8132072", "0.8117859", "0.8107286", "0.8104587", "0.80630773", "0.8059824", "0.8015882", "0.7994705", "0.7975715", "0.7972709", "0.79513156", "0.7926022", "0.790997", "0.7907099", ...
0.73335046
61
Save any GenericDatabase compatible object to the database, inserting or updating that row.
def Bz8S(YKHO, ZfUD): try: GTA_ = ZfUD.table_name() if not isinstance(GTA_, str): raise ValueError(f'Row table_name must be an instance of string, not {type(GTA_).__name__}') rdlD = ZfUD.to_row() ZLJ_ = [] for d6pt, iVRZ in enumerate(YKHO._schemadef['tables'][GTA_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def store(YKHO, YEnM: T):\n try:\n with YKHO.db as NCls:\n hkxX = YKHO.mapper.get_insert_data(YEnM)\n V_D6 = ', '.join(hkxX.keys())\n zbDt = ','.join(['?'] * len(hkxX))\n xDcj = f'INSERT OR REPLACE INTO {YKHO.table_name} ({V_D6}) VALUES ({zbDt})'\n ...
[ "0.72674674", "0.72477627", "0.6986438", "0.69678414", "0.69056374", "0.68278927", "0.68130434", "0.6812974", "0.6794668", "0.6782946", "0.6782946", "0.67529154", "0.6750155", "0.6722718", "0.66787446", "0.66787446", "0.66787446", "0.66787446", "0.66787446", "0.66787446", "0....
0.0
-1
Constructs a standard axes aligned simplex.
def xjgD(fhm5, dSXk, MTad, HYjr, AW69): tpio = hnFq.size(dSXk) tpio = tpio if ZylS.is_tensor(tpio) else int(tpio) poMF = tpio + 1 ErQy = ZylS.reshape(ZylS.eye(tpio, tpio, dtype=vqUI.base_dtype(dSXk.dtype)), hnFq.concat([[tpio], hnFq.shape(dSXk)], axis=0)) jtGT = dSXk + MTad * ErQy Dgdj = ZylS.co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def puqg(ZYDH, vgEw, iKuP, jnV6):\n jDK_ = oyIN.zeros((ZYDH + 1, 3), dtype=float)\n nhBs = oyIN.linspace(0, vgEw, num=ZYDH + 1, endpoint=True)\n kGOI = oyIN.linspace(0, iKuP, num=ZYDH + 1, endpoint=True)\n LTyj = oyIN.linspace(0, jnV6, num=ZYDH + 1, endpoint=True)\n jDK_[:, 0] = nhBs\n jDK_[:, 1]...
[ "0.5932818", "0.5663437", "0.56072646", "0.5520069", "0.5444015", "0.54062945", "0.5298862", "0.5216884", "0.51555634", "0.5154664", "0.5124488", "0.5124488", "0.50867146", "0.50726205", "0.50594", "0.5053319", "0.5041466", "0.5040151", "0.50369215", "0.50331306", "0.5029708"...
0.0
-1
Given an integer length, return a dictionary whose keys lie in range(length) and whose corresponding values are lists of zeros with length matching the key
def GrbY(u54L): utSC = {} q18A = [] for cXyw in range(u54L): utSC[cXyw] = [0] * cXyw return utSC
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uQh2(_U3a: dict, hU8D: object, u54L: int) -> dict:\n if hU8D not in _U3a:\n _U3a[hU8D] = [None] * u54L\n return _U3a", "def GUif(WhGz):\n OAT1 = {}\n for aWuw in WhGz:\n u54L = len(aWuw)\n if OAT1.get(u54L, False):\n OAT1[u54L][aWuw] = WhGz[aWuw]\n else:\n ...
[ "0.6999883", "0.67552847", "0.6399302", "0.6359727", "0.6291078", "0.62888944", "0.6222774", "0.61980915", "0.61234236", "0.5960273", "0.5867445", "0.5845955", "0.5836597", "0.582437", "0.5798116", "0.57923543", "0.5764413", "0.5738365", "0.57290214", "0.5697925", "0.56859076...
0.82023925
0
Test transition to the search result page from the search form.
def Kb4G(TI1B): CVIH = Kjhj(TI1B) CVIH.get_page('http://demo-opencart.ru/index.php') CVIH.enter_word('Hello') CVIH.click_on_the_search_button_cascade() assert 'route=product/search' in CVIH.get_current_url
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _fqc(YKHO):\n geh0 = YKHO.client.get('/searchPage/', follow=True)\n YKHO.assertEqual(geh0.status_code, 200)", "def oLG3(YKHO) -> None:\n YKHO.dr.open_home_page()\n fNjO = tuKI.choice('Aviation Hotel Data National Market Strategy Business'.split())\n with YKHO.restraint('Search section is missi...
[ "0.7400536", "0.7357959", "0.7208486", "0.71734065", "0.71093124", "0.70961154", "0.70405155", "0.70404184", "0.70310473", "0.69775945", "0.69669354", "0.6951859", "0.6872521", "0.68559694", "0.6854837", "0.6671637", "0.6656173", "0.6650453", "0.66163766", "0.65951097", "0.65...
0.64909947
25
Returns a list of sources belonging to a particular image from the detected_source table.
def sW1M(w2B8, r8m5): DpUl = w2B8.cursor(cursor_factory=ehoX.extras.DictCursor) DpUl.execute('SELECT * FROM detected_source WHERE image_id = %s', (r8m5,)) usx6 = DpUl.fetchall() w2B8.commit() DpUl.close() zP1c = [] for rdlD in usx6: zP1c.append(W2UD.DetectedSource()) W2UD.dic...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def R_TQ(VXjJ, qFop=5, hG8N=5):\n import sep\n if isinstance(VXjJ, VEDo.ma.MaskedArray):\n LNo8 = VXjJ.filled(fill_value=J2zk(VXjJ)).astype('float32')\n else:\n LNo8 = VXjJ.astype('float32')\n Vjev = sep.Background(LNo8)\n knl1 = qFop * Vjev.globalrms\n c7pe = sep.extract(LNo8 - Vje...
[ "0.68236184", "0.6789603", "0.6688335", "0.6677049", "0.65726006", "0.6570321", "0.64826053", "0.6481613", "0.6449474", "0.64467275", "0.64194834", "0.63995177", "0.6347035", "0.6347035", "0.63204867", "0.6318796", "0.6318796", "0.6318796", "0.6318796", "0.6318796", "0.631719...
0.79563856
0
Returns a list of sources belonging to a particular image from the assoc_source table.
def twcP(w2B8, c7pe): DpUl = w2B8.cursor(cursor_factory=ehoX.extras.DictCursor) usx6 = [] for zZcM in c7pe: try: DeaU = zZcM.assoc_id except AttributeError: DeaU = zZcM DpUl.execute('SELECT * FROM assoc_source WHERE id = %s', (DeaU,)) usx6.append(DpUl....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sW1M(w2B8, r8m5):\n DpUl = w2B8.cursor(cursor_factory=ehoX.extras.DictCursor)\n DpUl.execute('SELECT * FROM detected_source WHERE image_id = %s', (r8m5,))\n usx6 = DpUl.fetchall()\n w2B8.commit()\n DpUl.close()\n zP1c = []\n for rdlD in usx6:\n zP1c.append(W2UD.DetectedSource())\n ...
[ "0.76416105", "0.6660646", "0.6607174", "0.6600668", "0.6565765", "0.64846694", "0.6383165", "0.6369434", "0.6369434", "0.63432777", "0.630301", "0.6300328", "0.62717587", "0.6239087", "0.6235008", "0.62142384", "0.62142384", "0.62142384", "0.62142384", "0.62142384", "0.62101...
0.74468106
1
Puts all human players ids in a list
def f2fv(Sgw_, qCOk): for xFT1 in Sgw_: if xFT1['ai'] == None: qCOk.append(xFT1['id'])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ELxn(YKHO):\n return [WKvO[0] for WKvO in YKHO.players]", "def DAjN():\n w2B8 = Ykhp()\n Z9rn = w2B8.cursor()\n Z9rn.execute('SELECT id from standing')\n Bwa6 = list(Hs6x.chain(*Z9rn.fetchall()))\n w2B8.close()\n return Bwa6", "def A07C(YKHO):\n return [XP5J['id'] for XP5J in YKHO.r...
[ "0.7901233", "0.7550534", "0.7256739", "0.7039212", "0.6975706", "0.6873993", "0.67736876", "0.671529", "0.66454655", "0.6642293", "0.6629861", "0.66297317", "0.6615504", "0.6583453", "0.6522096", "0.6509799", "0.6495361", "0.648634", "0.6475911", "0.64672786", "0.6458394", ...
0.7361194
2
Create a convolutional layer.
def FIMM(YKHO, JPZV, Ot1W, Tuqy='valid', _0fC=1, YDYE=QZir): YKHO.filter_num = JPZV YKHO.kernel_size = Ot1W YKHO.w = None YKHO.b = None YKHO.stride = _0fC YKHO.mode = Tuqy YKHO.activation = YDYE() YKHO.cache = {'in': None, 'z': None, 'a': None} YKHO.pad = 0 if Tuqy == 'max': ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yIp6(vHnr, KUnM, Ot1W=[3, 3], YDYE=ZylS.nn.relu):\n gEmA = ZylS.layers.conv2d(inputs=vHnr, filters=KUnM, kernel_size=Ot1W, activation=YDYE)\n V7tI(gEmA, 'convolution')\n return gEmA", "def o6Bz(g4y1, WZcn, fhcK=1, h7Vl=None, wDQ7=True):\n raise NotImplementedError", "def IZ5u(YKHO, XLMv):\n ...
[ "0.77000403", "0.75953376", "0.7593418", "0.7432603", "0.7417644", "0.7389617", "0.7360013", "0.7335458", "0.73294747", "0.73181146", "0.7291208", "0.7205829", "0.71604717", "0.71368325", "0.713481", "0.70896447", "0.70896447", "0.7044839", "0.7029707", "0.7022352", "0.701048...
0.0
-1
Return the SwHuman with the specified ID, if any.
def GH5J(id): bseI = OkHp._get_characters().get(id) if isinstance(bseI, zarJ): return bseI else: return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NMoC(YKHO, id):\n GH5J = RQsY.query.get(id)\n if GH5J is None:\n return []\n return {'data': QROO(GH5J, True)}", "def jRq6(YKHO, id):\n Ol8d = 'Found instance of {} object with id: {}'\n if YKHO.network is not None:\n if YKHO.network.uuid == id:\n YKHO.wapp_log.debug(O...
[ "0.6387285", "0.5942446", "0.58078676", "0.57697064", "0.57640445", "0.5740622", "0.5726774", "0.56711125", "0.5521018", "0.55179167", "0.5512247", "0.5505235", "0.549272", "0.54884803", "0.548372", "0.5482706", "0.5472959", "0.5471883", "0.54643285", "0.54578084", "0.5450735...
0.8045983
0
Replace sys.std(out|err) with a wrapper during execution, restored after. In addition, a new combinedstreams output (another wrapper) will appear at ``sys.stdall``. This stream will resemble what a user sees at a terminal, i.e. both out/err streams intermingled.
def nTy_(JfyU): @zaGL(JfyU) def h3Xc(*qIxc, **B2fa): HwRy.stdall = ZbrP() rXth, HwRy.stdout = (HwRy.stdout, ZbrP(cc=HwRy.stdall)) WQWa, HwRy.stderr = (HwRy.stderr, ZbrP(cc=HwRy.stdall)) try: return JfyU(*qIxc, **B2fa) finally: HwRy.stdout = rXth ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uDM_():\n LFdf = HwRy.stdin\n zJsh = HwRy.stdout\n if not HwRy.stdin.isatty():\n HwRy.stdin = Nysx('/dev/tty', 'r', 0)\n if not HwRy.stdout.isatty():\n HwRy.stdout = Nysx('/dev/tty', 'w', 0)\n return (LFdf, zJsh)", "def BeD1():\n zJsh = None\n if not hasattr(HwRy.stdout, 'f...
[ "0.6816964", "0.66208285", "0.65926814", "0.65509725", "0.65301573", "0.6477684", "0.6398036", "0.6330362", "0.63214606", "0.6247165", "0.6239524", "0.61904466", "0.6178683", "0.613352", "0.60891664", "0.6082368", "0.60487634", "0.6011882", "0.59974533", "0.5991551", "0.59722...
0.64716107
6
Split a list `lst` into n blocks, as equal as possible in size.
def lpha(yv6U, exwG): G1Hx, r8hN = divmod(len(yv6U), exwG) return [yv6U[YRbF * G1Hx + min(YRbF, r8hN):(YRbF + 1) * G1Hx + min(YRbF + 1, r8hN)] for YRbF in range(exwG)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Yl3E(yv6U, zNig):\n TKeT = []\n for YRbF in range(0, len(yv6U), zNig):\n TKeT.append(yv6U[YRbF:YRbF + zNig])\n return TKeT", "def eHxA(yv6U, exwG):\n for YRbF in range(0, len(yv6U), exwG):\n yield yv6U[YRbF:YRbF + exwG]", "def YgIA(vC9B, exwG):\n G1Hx = len(vC9B) / exwG\n Mk...
[ "0.8346139", "0.8254446", "0.8206435", "0.8206435", "0.82021654", "0.81992215", "0.8161335", "0.81223243", "0.8112083", "0.8096104", "0.8084363", "0.8079593", "0.80764866", "0.80670905", "0.80567294", "0.8044445", "0.8036331", "0.8034524", "0.80302364", "0.8021337", "0.801724...
0.81601495
7
Plots the Expected annual Returns over annual Volatility of the stocks of the portfolio.
def nblz(YKHO): LPXl = rPq8(data=YKHO._data, freq=YKHO._freq) BanD = dBu6(data=YKHO._data, freq=YKHO._freq) QrM1.scatter(BanD, LPXl, marker='o', s=100, label='Stocks') for YRbF, FUjE in enumerate(LPXl.index): QrM1.annotate(FUjE, (BanD[YRbF], LPXl[YRbF]), xytext=(10, 0), textcoords='offset points...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CpK4(TZ5Z, TY0w, Je5s):\n LZpg = QrM1.figure(figsize=(8, 8))\n hh7H = LZpg.add_subplot(211)\n for fvDH in TZ5Z.columns:\n if fvDH != 'date':\n hh7H.plot(TZ5Z['date'], TZ5Z[fvDH], label=fvDH)\n hh7H.plot(Je5s['date'], Je5s['actual'], linestyle='None', marker='.', markersize=1, labe...
[ "0.6627492", "0.65407735", "0.63177514", "0.62271804", "0.61237925", "0.6107052", "0.610248", "0.60888034", "0.60706526", "0.60520613", "0.60123193", "0.6005208", "0.60030866", "0.59876096", "0.5974328", "0.5959421", "0.59537756", "0.59478134", "0.59292394", "0.5911845", "0.5...
0.7234849
0
Test creating an mmgrid on a mesh with uneven grid spacing
def HmZy(YKHO): kPTS = [-3, 0, 0.1, 0.2, 3] vg0C = Halj(*[kPTS] * 3) Cs6h = mTjV.mmGrid(vg0C) Cs6h.generate(5) for GSof, WKvO in XTiz.ndenumerate(Cs6h.grid): YKHO.assertAlmostEqual(sum(WKvO['mats']), 1.0, msg='Normality at ijk={0}:\n sum({1}) = {2} != 1.0'.format(GSof, WKvO['mats'], sum(W...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def YsU2():\n COGw = 1\n Baah = 5\n y6qv = (-20, 20)\n yHNO = (20, 60)\n tk32 = j1tA(COGw, Baah, y6qv, yHNO)\n tk32 = tk32[:, 0]\n assert len(tk32.shape) == 1\n NNGb = b18J(tk32)\n bGrB = NNGb.make_esmf_field()\n a9Hh = EAfv(NNGb, NNGb)\n NG8U = Zxt2.sparse.identity(Baah * COGw)\n ...
[ "0.6981844", "0.69743687", "0.68698454", "0.68061996", "0.6737807", "0.673534", "0.6725115", "0.672182", "0.6696915", "0.6688537", "0.6672708", "0.6655968", "0.66525376", "0.66414124", "0.6595373", "0.6558916", "0.6513743", "0.65121466", "0.6509116", "0.6504277", "0.6496621",...
0.728186
0
Adds one vector to the other. >>> v = vector2D(10, 20) >>> v2 = vector2D(10, 6) >>> v.addVector2D(v2) >>> print(v.x) 20 >>> print(v.y) 26
def fgS1(YKHO, he6J): if repr(he6J) == 'Vector2D': YKHO.add(he6J.x, he6J.y) else: raise AttributeError('vector2D.addVector2D requires a 2DVector!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def H2v5(YKHO, ZoT5):\n YKHO.x += ZoT5.x\n YKHO.y += ZoT5.y", "def FOdN(YKHO, ZoT5):\n PImZ = YKHO._x + ZoT5._x\n xukM = YKHO._y + ZoT5._y\n return lNLu((PImZ, xukM))", "def FOdN(YKHO, Elif):\n return fIXy(YKHO.x() + Elif.x(), YKHO.y() + Elif.y())", "def H2v5(YKHO, OhjO):\n VMbZ = []\n ...
[ "0.83834654", "0.829044", "0.8091104", "0.80712485", "0.80631065", "0.79474634", "0.7850251", "0.7799292", "0.7798727", "0.77841425", "0.7779863", "0.7771636", "0.7756199", "0.77549857", "0.7702473", "0.7674861", "0.7674861", "0.7674861", "0.7618669", "0.7593082", "0.75874895...
0.80361676
5
Subtacts one vector from the other. >>> v = vector2D(10, 20) >>> v2 = vector2D(10, 6) >>> v.subVector2D(v2) >>> print(v.x) 0 >>> print(v.y) 14
def RQr5(YKHO, he6J): if repr(he6J) == 'Vector2D': YKHO.sub(he6J.x, he6J.y) else: raise AttributeError('vector2D.subVector2D requires a 2DVector!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qjfR(YKHO, ZoT5):\n pPTb = YKHO._x - ZoT5._x\n eSY5 = YKHO._y - ZoT5._y\n return lNLu((pPTb, eSY5))", "def qjfR(YKHO, Elif):\n return fIXy(YKHO.x - Elif.x, YKHO.y - Elif.y)", "def qjfR(YKHO, Elif: Vector) -> lNLu:\n return lNLu(YKHO._x - Elif._x, YKHO._y - Elif._y)", "def qjfR(YKHO, Elif):...
[ "0.86092556", "0.82050663", "0.79928327", "0.79863274", "0.7952839", "0.79516315", "0.7886042", "0.78845835", "0.7877457", "0.7867988", "0.78676987", "0.7828875", "0.7801236", "0.77994174", "0.77809966", "0.7769746", "0.77555335", "0.7712825", "0.7656101", "0.7637579", "0.762...
0.80548364
2
Calculates the magnitude (length) of the vector. >>> v = vector2D(3, 4) >>> v.mag() 5.0
def FOSW(YKHO): return round(epAf.sqrt(YKHO.x * YKHO.x + YKHO.y * YKHO.y), 10)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wjKu(YKHO, *qIxc):\n return leuP.Geom_Vector_Magnitude(YKHO, *qIxc)", "def pDZv(YKHO):\n FOSW = epAf.sqrt(YKHO.x ** 2 + YKHO.y ** 2)\n return FOSW", "def OlCw(YKHO):\n FOSW = oyIN.sqrt(YKHO.r ** 2 + YKHO.i ** 2)\n return FOSW", "def FOSW(YKHO):\n YXbZ = (YKHO.x ** 2 + YKHO.y ** 2) ** 0....
[ "0.73638827", "0.72875065", "0.71354693", "0.70897377", "0.70282793", "0.70079905", "0.6978929", "0.69375503", "0.69149536", "0.6899048", "0.68667954", "0.6836972", "0.68268204", "0.682228", "0.68188393", "0.6802884", "0.6795319", "0.6793005", "0.67584604", "0.6752712", "0.67...
0.6641953
27
Calculates the squared magnitude (length) of the vector (Faster) >>> v = vector2D(3, 4) >>> v.magSq() 25
def m8pQ(YKHO): return YKHO.x * YKHO.x + YKHO.y * YKHO.y
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xwI4(YKHO):\n return YKHO.v.magnitude_squared()", "def xwI4(YKHO):\n return YKHO.v.magnitude_squared()", "def AaNF(YKHO, *qIxc):\n return leuP.Geom_Vector_SquareMagnitude(YKHO, *qIxc)", "def oUQz(YKHO):\n xYf9 = 0\n for YRbF in range(YKHO.dim):\n xYf9 = xYf9 + abs(YKHO.data[YRbF] **...
[ "0.7601437", "0.7601437", "0.74662334", "0.7413468", "0.72839904", "0.725985", "0.72550076", "0.72512823", "0.72290003", "0.7212784", "0.7165339", "0.7129682", "0.7058391", "0.7052416", "0.7043655", "0.7025585", "0.7022308", "0.69594806", "0.6920449", "0.6895712", "0.68941575...
0.69603074
17
Calculates the distance between the Vector and a point. >>> v = vector2D(3, 4) >>> v.dist(10, 6) 7.2801098893
def pImw(YKHO, m2os, bmPF): jzdc = m2os - YKHO.x Fg_i = bmPF - YKHO.y return round(epAf.sqrt(jzdc * jzdc + Fg_i * Fg_i), 10)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wMp3(YKHO, he6J):\n if repr(he6J) == 'Vector2D':\n return YKHO.dist(he6J.x, he6J.y)\n else:\n raise AttributeError('vector2D.distVector2D requires a 2DVector!')", "def pImw(o4D3, si3g, ajwV=None, skBL=None):\n if isinstance(o4D3, lNLu) and isinstance(si3g, lNLu):\n EBgd = o4D3\n...
[ "0.81848586", "0.7550465", "0.75173163", "0.74911904", "0.74708146", "0.74533623", "0.7365806", "0.73396146", "0.7229733", "0.7196004", "0.7185114", "0.7150846", "0.711982", "0.71012044", "0.70551795", "0.70479435", "0.70311254", "0.70143175", "0.69847345", "0.6966406", "0.69...
0.0
-1
Calculates the distance between two Vectors. >>> v = vector2D(3, 4) >>> v2 = vector2D(10, 6) >>> v.distVector2D(v2) 7.2801098893
def wMp3(YKHO, he6J): if repr(he6J) == 'Vector2D': return YKHO.dist(he6J.x, he6J.y) else: raise AttributeError('vector2D.distVector2D requires a 2DVector!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qKJ5(YKHO, lSjb, v8Fa):\n yk4i = lSjb - v8Fa\n Ayfi = oyIN.dot(oyIN.transpose(yk4i), yk4i)\n return Ayfi", "def pImw(o4D3, si3g, ajwV=None, skBL=None):\n if isinstance(o4D3, lNLu) and isinstance(si3g, lNLu):\n EBgd = o4D3\n HpuQ = si3g\n o4D3 = EBgd.x\n si3g = EBgd.y\n...
[ "0.81025255", "0.7896416", "0.7848903", "0.78136", "0.76938987", "0.7693585", "0.76845306", "0.76741225", "0.7668687", "0.75735414", "0.7572683", "0.7511883", "0.74702245", "0.7465415", "0.74504226", "0.7433816", "0.7391294", "0.73749363", "0.7332079", "0.73260087", "0.731120...
0.78399396
3
Normalise the vector to a magnitude of mag_limit. >>> v = vector2D(4, 7) >>> v.normalise() >>> print(v) (0.49613893835674455, 0.868243142124303) >>> v = vector2D(4, 7) >>> v.normalise(5) >>> print(v) (2.480694691783723, 4.341215710621515)
def kwsU(YKHO, Byr5=1): r8hN = YKHO.mag() UH90 = r8hN / Byr5 YKHO.div(UH90, UH90)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kwsU(YKHO, Byr5=1):\n r8hN = YKHO.mag()\n UH90 = r8hN / Byr5\n YKHO.div(UH90, UH90, UH90)", "def NkkI(YKHO):\n YXbZ = YKHO._get_magnitude()\n if YXbZ == 0.0:\n raise ZeroDivisionError(\"can't normalize vector of magnitude 0!\")\n return YKHO.divide(YXbZ)", "def AKms(iArr):\n min...
[ "0.7840714", "0.690777", "0.6847159", "0.682434", "0.6780443", "0.6695963", "0.66823673", "0.6659528", "0.6576895", "0.6559045", "0.654363", "0.65263695", "0.64992183", "0.647", "0.645598", "0.64401674", "0.6435469", "0.6424365", "0.64148426", "0.6401695", "0.63728213", "0....
0.78468704
0
Calculates the angle in radians between the Vector and a point. >>> v = vector2D(3, 4) >>> v.angleBetween(24, 4) 0.7233555441
def jjQs(YKHO, m2os, bmPF): TifC = YKHO.dot(m2os, bmPF) gpRq = YKHO.mag() E43s = D7bV(m2os, bmPF).mag() return round(TifC / (gpRq * E43s), 10)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xpeN(hQHm, jlSq):\n YylR = oyIN.math.atan2(oyIN.linalg.det([hQHm, jlSq]), oyIN.dot(hQHm, jlSq))\n return oyIN.degrees(YylR)", "def UZ_v(YKHO):\n hQHm = eHNT.vector(0, 0, 1)\n jlSq = eHNT.vector(0, 2, 0)\n YKHO.assertEqual(eHNT.angle_between(hQHm, jlSq), oyIN.pi / 2)\n YKHO.assertEqual(eHNT....
[ "0.7363543", "0.7233626", "0.7232336", "0.72242975", "0.72022176", "0.7200363", "0.7200363", "0.71948034", "0.7173823", "0.7162651", "0.71262395", "0.70356697", "0.7030152", "0.69824916", "0.6943491", "0.69243515", "0.6884005", "0.6880789", "0.6834386", "0.68213576", "0.68026...
0.6666402
25
Linear interpolate the vector to another vector >>> v = vector2D(3, 4) >>> v2 = vector2D(6, 3) >>> v.lerpVector2D(v2, 0.5) >>> print(v) (4.5, 3.5)
def jswf(YKHO, he6J, sBDg): if repr(he6J) == 'Vector2D': return YKHO.lerp(he6J.x, he6J.y, sBDg) else: raise AttributeError('vector2D.lerpVector2D requires a 2DVector!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bGOl(jzdc, Fg_i, Z5kt: float):\n Ty9i = Fg_i - jzdc\n mhAC = Ty9i * (oyIN.array([1, 1, 1]) / oyIN.linalg.norm(Ty9i))\n Ayfi = oyIN.linalg.norm(Fg_i - jzdc)\n return jzdc + mhAC * (Ayfi * Z5kt)", "def LeDf(jzdc, Fg_i, wA3x):\n return jzdc + wA3x * (Fg_i - jzdc)", "def qAjl(T8d8, hQHm, a1PO):\...
[ "0.7182721", "0.690692", "0.6847993", "0.68087894", "0.6646847", "0.6646847", "0.6624389", "0.65340614", "0.64721704", "0.6439038", "0.6384508", "0.6384508", "0.63670033", "0.6289445", "0.6242705", "0.6197423", "0.61934745", "0.61812854", "0.61685044", "0.61455584", "0.613112...
0.778765
0
Return a copy of the vector. >>> v = vector3D(10, 20, 30) >>> c = v.copy() >>> print(c.x) 10 >>> print(c.y) 20 >>> print(c.z) 30
def jth9(YKHO): return IKE4(YKHO.x, YKHO.y, YKHO.z)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jth9(YKHO):\n return lNLu(YKHO.x, YKHO.y, YKHO.z)", "def jth9(YKHO):\n return AbJb(YKHO.x, YKHO.y, YKHO.z, YKHO.w)", "def jth9(YKHO):\n return UZNU(YKHO.x, YKHO.y, YKHO.z)", "def jth9(YKHO):\n return lNLu(YKHO.x, YKHO.y, YKHO.z)", "def i3ak(YKHO):\n return AbJb(YKHO.x, YKHO.y, YKHO.z, YK...
[ "0.83431816", "0.82313484", "0.81427026", "0.81097084", "0.79086703", "0.7817909", "0.76548475", "0.7338757", "0.728453", "0.7240089", "0.72330374", "0.7229231", "0.71856725", "0.70096904", "0.69612384", "0.6948469", "0.6924097", "0.6866393", "0.68332773", "0.6826077", "0.678...
0.8747982
0
Adds x, y and x components to the vector. >>> v = vector3D(10, 20, 30) >>> v.add(10, 6, 4) >>> print(v.x) 20 >>> print(v.y) 26 >>> print(v.z) 34
def H2v5(YKHO, m2os, bmPF, Hci7): YKHO.x += m2os YKHO.y += bmPF YKHO.z += Hci7
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def T4S9(YKHO, he6J):\n if repr(he6J) == 'Vector3D':\n YKHO.add(he6J.x, he6J.y, he6J.z)\n else:\n raise AttributeError('vector3D.addVector3D requires a 3DVector!')", "def H2v5(hQHm, jlSq):\n WKvO = hQHm.x + jlSq.x\n LVAh = hQHm.y + jlSq.y\n epBp = hQHm.z + jlSq.z\n bUZ8 = S9OZ(WKv...
[ "0.7761868", "0.7495019", "0.73799443", "0.73598105", "0.73317444", "0.7320747", "0.7310605", "0.7184979", "0.7094013", "0.6991656", "0.6979707", "0.69701445", "0.69430923", "0.6901517", "0.68839765", "0.6863786", "0.68573713", "0.6845544", "0.67577285", "0.6737056", "0.67317...
0.7171571
8
Adds one vector to the other. >>> v = vector3D(10, 20, 30) >>> v2 = vector3D(10, 6, 4) >>> v.addVector3D(v2) >>> print(v.x) 20 >>> print(v.y) 26 >>> print(v.z) 34
def T4S9(YKHO, he6J): if repr(he6J) == 'Vector3D': YKHO.add(he6J.x, he6J.y, he6J.z) else: raise AttributeError('vector3D.addVector3D requires a 3DVector!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def H2v5(hQHm, jlSq):\n WKvO = hQHm.x + jlSq.x\n LVAh = hQHm.y + jlSq.y\n epBp = hQHm.z + jlSq.z\n bUZ8 = S9OZ(WKvO, LVAh, epBp)\n return bUZ8", "def FOdN(YKHO, Elif) -> 'Vector3':\n if SZ2k._is_vector3like(Elif):\n return SZ2k(YKHO.x + Elif[0], YKHO.y + Elif[1], YKHO.z + Elif[2])\n r...
[ "0.7998181", "0.7969874", "0.7968315", "0.77120245", "0.7572954", "0.7537685", "0.75173116", "0.7501815", "0.7474423", "0.7460649", "0.7421169", "0.73699224", "0.7355732", "0.7354639", "0.72707856", "0.72681826", "0.7198823", "0.7142075", "0.71305406", "0.7112877", "0.7073744...
0.79079664
3
Subtacts one vector from the other. >>> v = vector3D(10, 20, 30) >>> v2 = vector3D(10, 6, 4) >>> v.subVector3D(v2) >>> print(v.x) 0 >>> print(v.y) 14 >>> print(v.z) 26
def jhom(YKHO, he6J): if repr(he6J) == 'Vector3D': YKHO.sub(he6J.x, he6J.y, he6J.z) else: raise AttributeError('vector3D.subVector3D requires a 3DVector!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def finE(hQHm, jlSq):\n WKvO = hQHm.x - jlSq.x\n LVAh = hQHm.y - jlSq.y\n epBp = hQHm.z - jlSq.z\n bUZ8 = S9OZ(WKvO, LVAh, epBp)\n return bUZ8", "def qjfR(YKHO, jlSq):\n bUZ8 = lNLu(YKHO.x - jlSq.x, YKHO.y - jlSq.y, YKHO.z - jlSq.z)\n return bUZ8", "def finE(cntZ, Elif):\n if isinstance...
[ "0.8366641", "0.80006593", "0.78686297", "0.7852785", "0.78274477", "0.782524", "0.7785036", "0.7746507", "0.77324975", "0.77306026", "0.76458406", "0.76093674", "0.75095177", "0.7505782", "0.7503669", "0.74646497", "0.73930186", "0.7381035", "0.7369987", "0.7368261", "0.7347...
0.8075439
1
Multiples the x, y and z components by the supplied coords. >>> v = vector3D(10, 20, 30) >>> v.mult(10, 6, 4) >>> print(v.x) 100 >>> print(v.y) 120 >>> print(v.z) 120
def hObQ(YKHO, m2os, bmPF, Hci7): YKHO.x *= m2os YKHO.y *= bmPF YKHO.z *= Hci7
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def QbX3(YKHO, he6J):\n if repr(he6J) == 'Vector3D':\n YKHO.mult(he6J.x, he6J.y, he6J.z)\n else:\n raise AttributeError('vector3D.multVector3D requires a 3DVector!')", "def E_tF(YKHO, mLGw):\n if isinstance(mLGw, int) or isinstance(mLGw, float):\n return SZ2k(YKHO.x * mLGw, YKHO.y *...
[ "0.7767276", "0.68396866", "0.65893644", "0.65856934", "0.646846", "0.64417046", "0.640049", "0.6312845", "0.6258001", "0.6139112", "0.609704", "0.6096832", "0.60843366", "0.60766345", "0.60505235", "0.6044629", "0.6038055", "0.60201555", "0.5969297", "0.5955418", "0.59413195...
0.7942552
0
Multiples two vectors together. >>> v = vector3D(10, 20, 30) >>> v2 = vector3D(10, 6, 4) >>> v.multVector3D(v2) >>> print(v.x) 100 >>> print(v.y) 120 >>> print(v.z) 120
def QbX3(YKHO, he6J): if repr(he6J) == 'Vector3D': YKHO.mult(he6J.x, he6J.y, he6J.z) else: raise AttributeError('vector3D.multVector3D requires a 3DVector!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AdrB(hQHm, jlSq):\n kYGz = isinstance(hQHm, S9OZ)\n ftz7 = isinstance(jlSq, S9OZ)\n bUZ8 = S9OZ()\n if kYGz and (not ftz7):\n bUZ8.x = hQHm.x * jlSq\n bUZ8.y = hQHm.y * jlSq\n bUZ8.z = hQHm.z * jlSq\n elif not kYGz and ftz7:\n bUZ8.x = hQHm * jlSq.x\n bUZ8.y = ...
[ "0.73177445", "0.6917025", "0.683151", "0.6761323", "0.6697825", "0.66746616", "0.65681744", "0.6562572", "0.651312", "0.6508775", "0.65027547", "0.64611405", "0.64393175", "0.6423886", "0.63558066", "0.63433105", "0.6325645", "0.6280918", "0.6259634", "0.62122524", "0.620040...
0.81853557
0
Calculates the magnitude (length) of the vector. >>> v = vector3D(3, 4, 12) >>> v.mag() 13.0
def FOSW(YKHO): return round(epAf.sqrt(YKHO.x * YKHO.x + YKHO.y * YKHO.y + YKHO.z * YKHO.z), 10)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wjNy(e290):\n return oyIN.linalg.norm(zczK.vector3_to_array(e290))", "def YXbZ(YKHO):\n return epAf.sqrt(YKHO.x ** 2 + YKHO.y ** 2 + YKHO.z ** 2)", "def YXbZ(YKHO):\n return epAf.sqrt(epAf.pow(YKHO.x, 2) + epAf.pow(YKHO.y, 2) + epAf.pow(YKHO.z, 2))", "def YXbZ(Ty9i):\n if 'magnitude' not in T...
[ "0.7402013", "0.7267228", "0.72463423", "0.7238027", "0.7174174", "0.71140605", "0.71070284", "0.70694435", "0.69337976", "0.6914969", "0.6901149", "0.6850436", "0.6797661", "0.6778955", "0.67438394", "0.6679342", "0.6660787", "0.6659711", "0.6642497", "0.6635951", "0.6621936...
0.70704067
7
Calculates the squared magnitude (length) of the vector (Faster) >>> v = vector3D(3, 4 ,12) >>> v.magSq() 169
def m8pQ(YKHO): return YKHO.x * YKHO.x + YKHO.y * YKHO.y + YKHO.z * YKHO.z
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def YXbZ(Ty9i: Vector) -> float:\n return epAf.sqrt(Lzxs(Ty9i))", "def xwI4(YKHO):\n return YKHO.w ** 2 + YKHO.x ** 2 + YKHO.y ** 2 + YKHO.z ** 2", "def YXbZ(Ty9i: Vector) -> float:\n return epAf.sqrt(Lzxs(Ty9i))", "def xwI4(YKHO):\n return YKHO.v.magnitude_squared()", "def xwI4(YKHO):\n ret...
[ "0.7593978", "0.7398072", "0.73855704", "0.7349401", "0.7349401", "0.7298508", "0.72061783", "0.7128284", "0.71170825", "0.7068494", "0.70629174", "0.7054402", "0.7050867", "0.70321333", "0.7031985", "0.7007784", "0.6983082", "0.698279", "0.697601", "0.6971227", "0.69505227",...
0.7489246
1
Calculates the distance between the Vector and a point. >>> v = vector3D(3, 4, 5) >>> v.dist(10, 6, 4) 7.3484692283
def pImw(YKHO, m2os, bmPF, Hci7): jzdc = m2os - YKHO.x Fg_i = bmPF - YKHO.y Z9rn = Hci7 - YKHO.z return round(epAf.sqrt(jzdc * jzdc + Fg_i * Fg_i + Z9rn * Z9rn), 10)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qGYP(YKHO, he6J):\n if repr(he6J) == 'Vector3D':\n return YKHO.dist(he6J.x, he6J.y, he6J.z)\n else:\n raise AttributeError('vector3D.distVector3D requires a 3DVector!')", "def Ayfi(YKHO, Ty9i):\n if isinstance(Ty9i, SZ2k):\n Jw7X = YKHO.x - Ty9i.x\n eUWA = YKHO.y - Ty9i.y...
[ "0.8190551", "0.7919904", "0.7310789", "0.71021646", "0.7054434", "0.7003184", "0.69655067", "0.69612384", "0.69137365", "0.6907477", "0.68937385", "0.6888332", "0.6885402", "0.6874302", "0.68485117", "0.6845677", "0.6839673", "0.6828789", "0.67912036", "0.67641705", "0.67499...
0.6738849
22
Calculates the distance between two Vectors. >>> v = vector3D(3, 4, 5) >>> v2 = vector3D(10, 6, 4) >>> v.distVector3D(v2) 7.3484692283
def qGYP(YKHO, he6J): if repr(he6J) == 'Vector3D': return YKHO.dist(he6J.x, he6J.y, he6J.z) else: raise AttributeError('vector3D.distVector3D requires a 3DVector!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Ayfi(YKHO, Ty9i):\n if isinstance(Ty9i, SZ2k):\n Jw7X = YKHO.x - Ty9i.x\n eUWA = YKHO.y - Ty9i.y\n aUJK = YKHO.z - Ty9i.z\n return epAf.sqrt(Jw7X * Jw7X + eUWA * eUWA + aUJK * aUJK)\n else:\n raise Exception('Expected Vector3, gotted {}'.format(type(Ty9i)))", "def Ayf...
[ "0.77415925", "0.765562", "0.75989157", "0.7587443", "0.71868783", "0.7179721", "0.716164", "0.71286637", "0.70823747", "0.70442915", "0.7030093", "0.7011479", "0.6979965", "0.6911439", "0.6865362", "0.6839866", "0.6828769", "0.6821451", "0.6807369", "0.6795203", "0.6769241",...
0.7845576
0
Normalise the vector to a magnitude of mag_limit. >>> v = vector3D(4, 7, 9) >>> v.normalise() >>> print(v) (0.33104235544079846, 0.5793241220213973, 0.7448452997417965) >>> v = vector3D(4, 7, 9) >>> v.normalise(5) >>> print(v) (1.655211777203992, 2.8966206101069862, 3.7242264987089824)
def kwsU(YKHO, Byr5=1): r8hN = YKHO.mag() UH90 = r8hN / Byr5 YKHO.div(UH90, UH90, UH90)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kwsU(YKHO, Byr5=1):\n r8hN = YKHO.mag()\n UH90 = r8hN / Byr5\n YKHO.div(UH90, UH90)", "def u1KP(Ty9i):\n EAGD = ht2j.sqrt((Ty9i ** 2).sum(1, keepdim=True))\n EAGD = ht2j.clamp(EAGD, min=1e-08)\n Ty9i = Ty9i / EAGD\n return Ty9i", "def NkkI(YKHO):\n YXbZ = YKHO._get_magnitude()\n ...
[ "0.7595224", "0.70348895", "0.69946456", "0.69300824", "0.6884989", "0.68715143", "0.68068504", "0.6742039", "0.67266214", "0.6726481", "0.6716982", "0.6686235", "0.6637098", "0.6610819", "0.6602869", "0.65592456", "0.6512271", "0.6469247", "0.6438526", "0.6429282", "0.640046...
0.7588512
1
Calculates the angle in radians between the Vector and a point. >>> v = vector3D(2, 4 ,6) >>> v.angleBetween(0, 5, 10) 0.9561828875
def jjQs(YKHO, m2os, bmPF, Hci7): TifC = YKHO.dot(m2os, bmPF, Hci7) gpRq = YKHO.mag() E43s = IKE4(m2os, bmPF, Hci7).mag() return round(TifC / (gpRq * E43s), 10)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VF65(YKHO, he6J):\n if repr(he6J) == 'Vector3D':\n return YKHO.angleBetween(he6J.x, he6J.y, he6J.z)\n else:\n raise AttributeError('vector3D.angleBetweenVector3D requires a 3DVector!')", "def jjQs(YKHO, Ty9i):\n return fH9s(YKHO.normalized().dot(Ty9i.normalized()))", "def UZ_v(YKHO):...
[ "0.7218698", "0.7172791", "0.7091813", "0.6936566", "0.69106174", "0.69106174", "0.6894974", "0.68844855", "0.6820564", "0.6771805", "0.67644256", "0.6708082", "0.6695387", "0.6671099", "0.6607532", "0.6595311", "0.65812045", "0.65166515", "0.65045106", "0.65002006", "0.64516...
0.6689603
13
Calculates the angle in radians between the Vector and a point. >>> v = vector3D(2, 4, 6) >>> v2 = vector3D(0, 5, 10) >>> v.angleBetweenVector3D(v2) 0.9561828875
def VF65(YKHO, he6J): if repr(he6J) == 'Vector3D': return YKHO.angleBetween(he6J.x, he6J.y, he6J.z) else: raise AttributeError('vector3D.angleBetweenVector3D requires a 3DVector!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def YylR(YKHO, bUZ8) -> float:\n if isinstance(bUZ8, lNLu):\n return _IXK(fH9s(YKHO.dot(bUZ8) / (abs(YKHO) * abs(bUZ8))))\n else:\n raise NotImplementedError()", "def hoLo(YKHO, he6J):\n if repr(he6J) == 'Vector2D':\n return YKHO.angleBetween(he6J.x, he6J.y)\n else:\n rais...
[ "0.6930255", "0.67783725", "0.67088264", "0.6704553", "0.6683729", "0.66476846", "0.66402596", "0.66402596", "0.66293776", "0.6610459", "0.65624434", "0.65556735", "0.6536364", "0.6518274", "0.6509664", "0.64974165", "0.6494988", "0.64900416", "0.647145", "0.6437023", "0.6435...
0.80351317
0
Linear interpolate the vector to another vector >>> v = vector3D(3, 4, 5) >>> v2 = vector3D(6, 3, 1) >>> v.lerpVector3D(v2, 0.5) >>> print(v) (4.5, 3.5, 3.0)
def TNGg(YKHO, he6J, sBDg): if repr(he6J) == 'Vector3D': return YKHO.lerp(he6J.x, he6J.y, he6J.z, sBDg) else: raise AttributeError('vector3D.lerpVector3D requires a 3DVector!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bGOl(jzdc, Fg_i, Z5kt: float):\n Ty9i = Fg_i - jzdc\n mhAC = Ty9i * (oyIN.array([1, 1, 1]) / oyIN.linalg.norm(Ty9i))\n Ayfi = oyIN.linalg.norm(Fg_i - jzdc)\n return jzdc + mhAC * (Ayfi * Z5kt)", "def jswf(YKHO, he6J, sBDg):\n if repr(he6J) == 'Vector2D':\n return YKHO.lerp(he6J.x, he6J....
[ "0.68696964", "0.68515843", "0.6740357", "0.6708209", "0.6670741", "0.66488624", "0.66488624", "0.6573447", "0.6561786", "0.6430325", "0.63857543", "0.63787717", "0.6242388", "0.6242388", "0.6236869", "0.61504376", "0.6068962", "0.6053351", "0.6037064", "0.5987859", "0.597538...
0.7719018
0
Return this DrawingObject's position.
def MZFS(YKHO): return YKHO.position
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dQgj(YKHO) -> fzCY:\n if YKHO._graphics_obj is not None:\n return YKHO._graphics_obj.pos()", "def Iuzb(YKHO):\n return DhiK(YKHO.x, YKHO.y)", "def dQgj(YKHO):\n return YKHO.canvas.coords(YKHO.rect)", "def dQgj(YKHO) -> PvyL:\n return YKHO._position", "def dQgj(YKHO):\n return YKHO...
[ "0.8584614", "0.84588104", "0.841534", "0.84104353", "0.8384642", "0.83589476", "0.8346031", "0.83327025", "0.83211184", "0.83158046", "0.83158046", "0.8315127", "0.8315127", "0.8315127", "0.8315127", "0.8315127", "0.8313685", "0.8291513", "0.8291513", "0.8291513", "0.8291513...
0.80146104
59
Return this DrawingObject's size.
def R8e4(YKHO): return YKHO.size
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def jiw9(YKHO):\n return YKHO._height", "def zNig(YKHO):\n return YKHO.height * YKHO.width", "def jiw9(YKHO):\n return YKHO.window.get_size()", "def zNig(YKHO):\n return YKHO.width", "def zNig(YKHO):\n return YKHO.width", "def zNig(YKHO) -> DEza:\n return DEza(YKHO.width, YKHO.height)",...
[ "0.7989762", "0.78508365", "0.7831879", "0.78256387", "0.78256387", "0.78069943", "0.7806869", "0.7806869", "0.7806869", "0.7806869", "0.7806869", "0.7806869", "0.7806869", "0.7806869", "0.7806869", "0.7806869", "0.7806869", "0.7806869", "0.7806869", "0.7748433", "0.7690872",...
0.7445102
32
Test case for list_live_videos
def ZgFa(YKHO): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pMx0(YKHO):\n pass", "def jnTK(YKHO):\n SFIC = list(nNXP.get_videos_for_course(YKHO.course_id))\n YKHO.assertEqual(len(SFIC), 1)\n YKHO.assertEqual(SFIC[0]['edx_video_id'], uwaB.VIDEO_DICT_FISH['edx_video_id'])\n SFIC = list(nNXP.get_videos_for_course('unknown'))\n YKHO.assertEqual(len(SFIC...
[ "0.8214558", "0.7360135", "0.73380244", "0.7335691", "0.7285021", "0.7260971", "0.71442544", "0.7132964", "0.70904624", "0.70320594", "0.6946368", "0.6903029", "0.68483007", "0.6834991", "0.68124706", "0.68111026", "0.6794877", "0.6789837", "0.6731999", "0.6726363", "0.671158...
0.94563115
0
Test case for update_applicant
def vHnH(YKHO): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def soeu(YKHO):\n pass", "def ttGf(YKHO):\n pass", "def U4IF(YKHO):\n pass", "def RPNm(YKHO):\n pass", "def HNvn(YKHO):\n pass", "def lDhF(YKHO):\n pass", "def lDhF(YKHO):\n pass", "def lDhF(YKHO):\n pass", "def PZ5Z(YKHO):\n YKHO.client.force_authenticate(user=YKHO.atten...
[ "0.7499805", "0.7266846", "0.7183428", "0.71308595", "0.68463695", "0.6711272", "0.6711272", "0.6711272", "0.6683373", "0.66632026", "0.6634959", "0.6627147", "0.66015327", "0.6558628", "0.6518257", "0.65146214", "0.6514381", "0.65054786", "0.6494962", "0.6487867", "0.6487683...
0.93768907
0
Get the verification key as PEM
def tAi8(YKHO) -> str: if YKHO.sk is None: raise AssertionError("Can't get key. No key created/loaded") hfGu = YKHO.sk.get_verifying_key() MikR = hfGu.to_pem() return MikR.decode()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tAi8(YKHO):\n if YKHO.sk is None:\n raise m9oU(\"Can't get key. No key created/loaded\")\n hfGu = YKHO.sk.get_verifying_key()\n MikR = hfGu.to_pem()\n return MikR", "def jiiG(YKHO, H5ew: StoredKey) -> str:\n YKHO._lock_transation()\n try:\n with open(H5ew.filename, 'r') as zeD...
[ "0.7408553", "0.7319689", "0.7305469", "0.72948885", "0.71990085", "0.70530087", "0.7013574", "0.6910695", "0.6894017", "0.6892181", "0.6842505", "0.6791175", "0.6741385", "0.66969174", "0.668595", "0.6571561", "0.6560579", "0.655611", "0.6545614", "0.6535411", "0.65295213", ...
0.77491814
0
Convert column to datetime object, on inplace Profiling object
def OLXh(YKHO, fvDH: str): try: YKHO[fvDH] = YKHO[fvDH].map(lambda Csk6: qcWV.strptime(Csk6, '%d/%m/%Y') if not isinstance(Csk6, rLdf._libs.tslibs.timestamps.Timestamp) else Csk6) except TypeError as e: print(fvDH, "isn't a string column or doesn't contain date")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def QDJk(YKHO, iVRZ, AB0K):\n if not AB0K in YKHO.datetime_kinds:\n raise IO8e\n GRvh = iVRZ + '_' + AB0K\n exec('self.df[new_column_name] = pd.to_datetime(self.df[column_name]).dt.' + AB0K)\n YKHO.df.info()\n return YKHO.df", "def I_Ry(sS2s, y5HZ):\n sS2s = sS2s.copy(deep=True)\n sS2...
[ "0.66642714", "0.6660218", "0.65932524", "0.6476437", "0.6431539", "0.63983804", "0.6397254", "0.63403606", "0.6333567", "0.6222646", "0.61527675", "0.61084646", "0.61036545", "0.5998607", "0.59813577", "0.59813577", "0.5966325", "0.5878157", "0.5871665", "0.5851866", "0.5810...
0.65196526
3
Is the atom convex?
def nW4t(YKHO) -> bool: return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def YJey(YKHO):\n return EmBi(YKHO.points)", "def YPNu(YKHO):\n hgjH = YKHO.center()\n UV8M, vHO5 = (hgjH[0], hgjH[1])\n bLm4 = []\n vC9B = len(YKHO.points)\n for YRbF in range(vC9B - 1):\n k0lF = YKHO.points[(YRbF + vC9B - 1) % vC9B]\n tjUW = YKHO.points[YRbF % vC9B]\n Nq1...
[ "0.7156249", "0.69137913", "0.6730658", "0.66750747", "0.6520804", "0.6502987", "0.64501804", "0.63954717", "0.63856095", "0.6304762", "0.62934536", "0.62818307", "0.62786746", "0.6216392", "0.61426544", "0.6112377", "0.61010164", "0.6083562", "0.6078377", "0.6064661", "0.606...
0.6494192
6
Is the atom concave?
def SGlc(YKHO) -> bool: return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SGlc(YKHO) -> bool:\n return False", "def SGlc(YKHO):\n return True", "def SGlc(YKHO):\n return True", "def DkD4(YKHO) -> bool:\n return True", "def DkD4(YKHO):\n return True", "def LzMw(YKHO) -> h8nf[bool]:\n pass", "def DkD4(YKHO):\n return False", "def nW4t(YKHO):\n ret...
[ "0.85676485", "0.85328543", "0.85328543", "0.7485007", "0.7442193", "0.73707205", "0.7328793", "0.6905089", "0.6876388", "0.6876388", "0.6870023", "0.6736151", "0.63243806", "0.62729526", "0.6134355", "0.6104031", "0.6095182", "0.606742", "0.59985757", "0.59335095", "0.592722...
0.8627779
0
r""" Computes the noise level sigma to reach a total budget of (target_epsilon, target_delta) at the end of epochs, with a given sample_rate
def ysTD(*, k17a: float, ojPw: float, fQqb: float, HasU: Optional[int]=None, paSp: Optional[int]=None, J0pe: str='rdp', QMma: float=0.01, **B2fa) -> float: if (paSp is None) == (HasU is None): raise ValueError('get_noise_multiplier takes as input EITHER a number of steps or a number of epochs') if paSp ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isHM(YKHO):\n PCpl = 0.01\n YKHO.prob_distr.likelihood.sum_of_square(YKHO.current_val)\n for tsEk in YKHO.prob_distr.likelihood.data.keys():\n jzdc = 0.5 * (PCpl + YKHO.prob_distr.likelihood.data[tsEk].num_points)\n Fg_i = 0.5 * (PCpl * YKHO.prob_distr.likelihood.data[tsEk].std_y[0] ** 2...
[ "0.6233986", "0.61858267", "0.60091215", "0.5996419", "0.5996419", "0.5996238", "0.5951745", "0.5943044", "0.5889588", "0.5869683", "0.58162135", "0.58162135", "0.5779178", "0.57783973", "0.57678676", "0.57560855", "0.5754835", "0.57450557", "0.5738983", "0.5735234", "0.57178...
0.7434553
0
Add a song to the playlist
def H2v5(NvAR, i34x): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pVNq(YKHO, GJPU):\n YKHO.song_list.append(GJPU)", "def QVyL(aw0L):\n H4yH.user_playlist_add_tracks('legosail2424', DVw8, [aw0L])", "def pVNq(YKHO, i34x, dQgj=None):\n if dQgj is None:\n YKHO.tracks.append(i34x)\n else:\n YKHO.tracks.insert(dQgj, i34x)", "def pVNq(YKHO, i34x):\n ...
[ "0.835998", "0.8282485", "0.8153891", "0.81538254", "0.80669534", "0.8030239", "0.79074293", "0.7814445", "0.7806539", "0.7772842", "0.77456665", "0.7740964", "0.7713918", "0.76939374", "0.7685419", "0.7544416", "0.75302404", "0.7511173", "0.7414601", "0.74062514", "0.7376225...
0.89795536
0
Remove a song from the playlist
def kSdD(NvAR, i34x): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def EJfJ(oeNL):\n x0hE.delete(oeNL)", "def Ld9P(YKHO, tXZk, *qIxc):\n try:\n lHob = YKHO.songs_list.index(tXZk)\n if lHob <= YKHO.song_num:\n YKHO.song_num -= 1\n YKHO.songs_list.remove(tXZk)\n except:\n return False\n return True", "def Yslp(djGJ: RemovePlayl...
[ "0.79291576", "0.79286706", "0.78517413", "0.7817993", "0.7702253", "0.76978475", "0.76610667", "0.7612576", "0.76107866", "0.761026", "0.76083255", "0.76083255", "0.75891143", "0.7585441", "0.7567368", "0.7560043", "0.7560043", "0.7362426", "0.73287654", "0.72832006", "0.727...
0.9126096
0
For converting a received boolean value to a Python bool.
def G7pX(wEf2): if isinstance(wEf2, str): wEf2 = wEf2.upper() return wEf2.startswith('ON') or wEf2.startswith('T') or wEf2.startswith('1') else: return bool(wEf2)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DUUG(BWXx):\n if BWXx == 'True':\n return True\n elif BWXx == 'False':\n return False\n else:\n return BWXx", "def JiQe(BWXx):\n if type(BWXx) == 'bool':\n return BWXx\n if str(BWXx) == 'True':\n return True\n if str(BWXx) == 'False':\n return False...
[ "0.8486718", "0.8442399", "0.83914423", "0.83902305", "0.8335658", "0.83159286", "0.8299578", "0.8292661", "0.827987", "0.82758284", "0.82682806", "0.8250789", "0.8208169", "0.8187584", "0.8151575", "0.8148475", "0.8130254", "0.8113871", "0.81026644", "0.8093359", "0.8078521"...
0.0
-1
Ensures a user cannot create a recipe in a specified category with invalid recipe details
def kxM0(YKHO): YKHO.set_up() with YKHO.client as udfG: geh0 = udfG.post('/api/v1/category/1/recipes', headers=YKHO.auth_header, data=bj71, content_type='application/json') YKHO.assertEqual(geh0.status_code, 422) Bv0m = qQXR.loads(geh0.data.decode()) YKHO.assertEqual(Bv0m['messag...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Vs7D(YKHO):\n YKHO.set_up()\n with YKHO.client as udfG:\n geh0 = udfG.post('/api/v1/category/2/recipes', headers=YKHO.auth_header, data=KnNd, content_type='application/json')\n YKHO.assert400(geh0, 'Invalid status code: ' + str(geh0.status_code))\n Bv0m = qQXR.loads(geh0.data.decode(...
[ "0.79223037", "0.7599807", "0.70306575", "0.6964918", "0.6929284", "0.69125783", "0.6838253", "0.6824864", "0.66010016", "0.65835255", "0.65736866", "0.6556835", "0.6479255", "0.6478181", "0.6470336", "0.64374226", "0.6404969", "0.63844526", "0.6371728", "0.6347189", "0.63396...
0.74375564
2