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 |
|---|---|---|---|---|---|---|
bytes transfer to hex str format | def y_tY(BWXx: bytes) -> str:
return BWXx.hex().upper() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RRqo(Fg_i):\n return Fg_i.hex()",
"def RQyJ(TL2b):\n return T_Uj.encode(TL2b, 'hex_codec').decode('ISO-8859-1')",
"def y_tY(Fg_i):\n return Fg_i.hex()",
"def y_tY(bytes):\n return MRxC.hexlify(bytes).decode('ascii')",
"def Vhvp(bytes, sdCG='', g8rx=' ', J3uN=''):\n if bytes is not bytear... | [
"0.76258963",
"0.7186787",
"0.71394753",
"0.707626",
"0.70520705",
"0.7040708",
"0.69780505",
"0.6955076",
"0.69468737",
"0.69040716",
"0.6901755",
"0.6887589",
"0.6830405",
"0.6809746",
"0.68061775",
"0.67979175",
"0.6749242",
"0.6718403",
"0.6715741",
"0.6707108",
"0.667074... | 0.7079874 | 3 |
Returns the string representation of the model | def gTzM(YKHO):
return CgYo.pformat(YKHO.to_dict()) | {
"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.8393829",
"0.83557564",
"0.8296152",
"0.8133522",
"0.81153053",
"0.8100911",
"0.8100133",
"0.8098902",
"0.8098902",
"0.80937666",
"0.80937666",
"0.80937666",
"0.80937666",
"0.8086338",
"0.8086338",
"0.8086338",
"0.8086338",
"0.8086338",
"0.8067774",
"0.80598664",
"0.805856... | 0.0 | -1 |
Update metrics result of this epoch. | def TVEJ(YKHO, dixj: Optional[dict]=None, **B2fa):
for Djk_ in (dixj, B2fa):
if Djk_ is not None:
YKHO._metrics_results.update(Djk_)
YKHO._has_score = True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sUFK(YKHO, dixj):\n YKHO._loss_values.append(dixj.loss)\n for G1Hx, Ty9i in dixj.metrics.items():\n if G1Hx not in YKHO._metric_values:\n YKHO._metric_values[G1Hx] = []\n YKHO._metric_values[G1Hx].append(Ty9i)",
"def NFIY(YKHO):\n pass",
"def u97f(YKHO):\n for G1Hx in Y... | [
"0.7676112",
"0.6913831",
"0.67472774",
"0.6728392",
"0.66727203",
"0.6619421",
"0.6524648",
"0.6517446",
"0.6478097",
"0.6437193",
"0.6377974",
"0.634768",
"0.632945",
"0.6292943",
"0.62772083",
"0.6259115",
"0.6240399",
"0.6235798",
"0.62125456",
"0.61850613",
"0.61808234",... | 0.695451 | 1 |
r"""Add a scalar (`float` or `int`) to summary. | def fPA6(YKHO, TZ9E: str, qmyf: Union[float, int]):
U34r = {TZ9E: qmyf}
if YKHO._is_local_main_process and (not YKHO.tracker_finished) and (YKHO.axes is not None):
M7hG.log(U34r, step=YKHO.axes.train_step, commit=False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BxUN(YKHO, TZ9E, BWXx, YPaw):\n YKHO.writer.add_scalar(TZ9E, BWXx, YPaw)",
"def BxUN(YKHO, TZ9E, BWXx, YPaw):\n YKHO.writer.add_scalar(TZ9E, BWXx, YPaw)",
"def fPA6(YKHO, TZ9E, BWXx):\n QxIo = YKHO.tf.Summary(value=[YKHO.tf.Summary.Value(tag=YKHO.name(TZ9E), simple_value=BWXx)])\n YKHO.writer.a... | [
"0.7828589",
"0.77991277",
"0.7786075",
"0.7631655",
"0.7429748",
"0.70885366",
"0.70885366",
"0.70885366",
"0.70885366",
"0.70885366",
"0.70885366",
"0.70811445",
"0.69417936",
"0.6903583",
"0.6805453",
"0.6584323",
"0.6390533",
"0.6389924",
"0.63739276",
"0.63648456",
"0.63... | 0.6541697 | 16 |
Return the root dashboard. | def qF9t():
return tk5Y | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Dck1():\n return TvZl('restodashboard/home/dashboard.html', title='Dashboard')",
"def Dck1():\n return TvZl('home/dashboard.html', title='Dashboard')",
"def Dck1():\n return TvZl('home/dashboard.html', title='Dashboard')",
"def Dck1():\n return TvZl('home/dashboard.html', title='Dashboard')",... | [
"0.7481347",
"0.73021007",
"0.72741747",
"0.7202137",
"0.70913786",
"0.7086827",
"0.70701456",
"0.705286",
"0.7034349",
"0.7018275",
"0.70143926",
"0.6942129",
"0.6896677",
"0.6884927",
"0.6859417",
"0.6782351",
"0.67616004",
"0.67454636",
"0.67210823",
"0.6674404",
"0.664604... | 0.8913599 | 0 |
Parse requirements file and return a collection of requirements | def K73q(*qIxc, **B2fa):
raise NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K73q() -> list:\n bTRL = Hy7s.path.join(L2rN, 'requirements.txt')\n with open(bTRL, 'rt') as eHNT:\n jeGQ = eHNT.read().splitlines()\n return jeGQ",
"def VnMZ(aQWm: str='requirements.txt') -> a1PO.List[str]:\n fA3L = []\n with y8r7.joinpath(aQWm).open() as pGGD:\n for uiGr in [zF... | [
"0.8389816",
"0.8243144",
"0.81999564",
"0.81042403",
"0.8099259",
"0.80654734",
"0.80453455",
"0.7998632",
"0.79925513",
"0.79798144",
"0.7977106",
"0.79727083",
"0.7970074",
"0.7970074",
"0.79656595",
"0.7957113",
"0.7953379",
"0.79449844",
"0.7904522",
"0.7902449",
"0.7829... | 0.7538445 | 61 |
True if is a safe method or user is the owner | def m4il(YKHO, QePW, tTee, YEnM):
return QePW.method in w0rQ.SAFE_METHODS or QePW.user == YEnM.owner | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I6_b(YKHO, CBIr):\n return YKHO.user == CBIr",
"def YfUz(YKHO, CBIr):\n return CBIr.key == YKHO.user",
"def I6_b(YKHO, CBIr):\n if not CBIr:\n return False\n if CBIr == YKHO.created_by or CBIr == YKHO.compiled_by:\n return True",
"def kinv(QePW, YEnM):\n if QePW.method in w0r... | [
"0.7544256",
"0.7538417",
"0.75219536",
"0.7498482",
"0.7465188",
"0.74561316",
"0.7402689",
"0.73132896",
"0.7304036",
"0.7280847",
"0.72221",
"0.7219161",
"0.7184273",
"0.7177799",
"0.7159049",
"0.71164846",
"0.70553225",
"0.7043035",
"0.704192",
"0.70345235",
"0.70193136",... | 0.72212785 | 11 |
Constructor for the Linked List object. | def FIMM(YKHO, OxJJ=()):
YKHO.head = None
YKHO._counter = 0
if isinstance(OxJJ, (str, tuple, list)):
for ZfUD in OxJJ:
YKHO.push(ZfUD) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n YKHO._linkedlist = _sfu()\n YKHO.head = YKHO._linkedlist.head\n YKHO._length = YKHO._linkedlist._length\n YKHO.tail = None",
"def FIMM(YKHO, nPrm=None):\n YKHO.__list = RRVT(nPrm)",
"def FIMM(YKHO):\n YKHO.linkedlist = list()",
"def FIMM(YKHO):\n YKHO.list = _sfu()",
... | [
"0.8336075",
"0.8020757",
"0.7970266",
"0.79380196",
"0.7913874",
"0.7883151",
"0.7868605",
"0.78574795",
"0.78434557",
"0.7786184",
"0.7786113",
"0.77722526",
"0.77408206",
"0.77329654",
"0.7730986",
"0.77181584",
"0.77045834",
"0.7700176",
"0.7687182",
"0.76724786",
"0.7672... | 0.0 | -1 |
Test updating of a shoppinglist | def rT_6(YKHO):
Ylbp = P4t4.test_client(YKHO)
Ylbp.post('/signup', data=dict(firstname='firstname', lastname='lastname', username='username', email='hey@gmail.com', password='123'), follow_redirects=True)
Ylbp.post('/login', data=dict(username='hey@gmail.com', password='123'), follow_redirects=True)
Ylb... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xEEn(YKHO):\n YKHO.add_user()\n YKHO.add_list()\n YKHO.add_item()\n with YKHO.client:\n geh0 = YKHO.client.post('/auth/login', content_type='application/json', data=qQXR.dumps(dict(email='ivo@ivo.com', password='Baron1234')))\n Amyp = qQXR.loads(geh0.data.decode())\n MOPg = {'A... | [
"0.8105076",
"0.81025434",
"0.80652905",
"0.78068745",
"0.7677455",
"0.7676753",
"0.76697886",
"0.76483375",
"0.753826",
"0.753826",
"0.75125074",
"0.7483897",
"0.729112",
"0.7238776",
"0.72260314",
"0.7194216",
"0.71839267",
"0.7129924",
"0.7100575",
"0.7091438",
"0.7073938"... | 0.81414014 | 0 |
This will first reduce the Target indx value to Negative Infinity, swaps this negative value to the top of the tree to maintain MinHeap property. Then extracts the Minimum element from the existing tree and returns it. | def PfFp(YKHO, cIIR):
YKHO.decrease_key(cIIR, float('-inf'))
YKHO.extract_minimum() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def w8Dw(YKHO):\n epBp = YKHO._min\n if epBp is not None:\n WKvO = epBp.child\n if WKvO is not None:\n while True:\n _xec = WKvO.right\n WKvO.parent = None\n YKHO._insert_to_root_list(WKvO)\n WKvO = _xec\n if ... | [
"0.7431685",
"0.7296556",
"0.71743435",
"0.7072989",
"0.7015811",
"0.69776636",
"0.69406193",
"0.6913201",
"0.68363047",
"0.6814342",
"0.6804447",
"0.67859924",
"0.6738985",
"0.67109334",
"0.67067933",
"0.67052114",
"0.67031527",
"0.67028797",
"0.6701681",
"0.66861486",
"0.66... | 0.0 | -1 |
Normalize slope for Bresenham's line algorithm. >>> s = np.array([[2, 2, 2, 0]]) >>> _bresenhamline_nslope(s) array([[1., 1., 1., 0.]]) >>> s = np.array([[0, 0, 0, 0]]) >>> _bresenhamline_nslope(s) array([[ 0., 0., 0., 0.]]) >>> s = np.array([[0, 0, 9, 0]]) >>> _bresenhamline_nslope(s) array([[ 0., 0., 1., 0.]]) | def dnA5(VMex):
NXpY = oyIN.amax(oyIN.abs(VMex), axis=1).reshape(-1, 1)
UzHW = (NXpY == 0).all(1)
NXpY[UzHW] = oyIN.ones(1)
bvD6 = oyIN.array(VMex, dtype=oyIN.double) / NXpY
bvD6[UzHW] = oyIN.zeros(VMex[0].shape)
return bvD6 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dnA5(VMex):\n NXpY = oyIN.amax(oyIN.abs(VMex), axis=1).reshape(-1, 1)\n UzHW = (NXpY == 0).all(1)\n NXpY[UzHW] = oyIN.ones(1)\n bvD6 = oyIN.array(VMex, dtype=oyIN.double) / NXpY\n bvD6[UzHW] = oyIN.zeros(VMex[0].shape)\n return bvD6",
"def iDya(_nn5):\n NWgO = _nn5.shape[1]\n fciZ = o... | [
"0.8614176",
"0.6419106",
"0.641458",
"0.63442993",
"0.63347757",
"0.631475",
"0.63054144",
"0.62330574",
"0.6194708",
"0.6125728",
"0.6122925",
"0.61105204",
"0.6079313",
"0.60078",
"0.59992045",
"0.59819573",
"0.5971555",
"0.59126145",
"0.5908379",
"0.5884698",
"0.58651036"... | 0.8598712 | 1 |
Sets the operator symbol and makes the second number active. | def iCbf(YKHO, khtY):
YKHO._operator = khtY
YKHO._number2 = 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gjDl(YKHO, seET):\n if ',' in seET:\n print(' WARNING: %s -- operator %s contained a comma. Using default: \"=\".' % (YKHO.var, seET))\n return '='\n elif seET in ['=', '<', '>', '<=', '>=', '!=']:\n return seET\n else:\n print(' WARNING: %s -- operator %s not found. Using ... | [
"0.62486506",
"0.6189327",
"0.6189327",
"0.6189327",
"0.6189327",
"0.59444857",
"0.590889",
"0.58736223",
"0.58581394",
"0.5806699",
"0.57994777",
"0.5743481",
"0.57273525",
"0.5703703",
"0.5688992",
"0.56819403",
"0.5673032",
"0.5659841",
"0.56588626",
"0.56588626",
"0.56588... | 0.7376837 | 0 |
Constructor for ABNF. please check RFC for arguments. | def FIMM(YKHO, Fwbn=0, ZtQr=0, llo0=0, PIwJ=0, kuMQ=cdIN, ZHfW=1, nPrm=''):
YKHO.fin = Fwbn
YKHO.rsv1 = ZtQr
YKHO.rsv2 = llo0
YKHO.rsv3 = PIwJ
YKHO.opcode = kuMQ
YKHO.mask = ZHfW
YKHO.data = nPrm
YKHO.get_mask_key = Hy7s.urandom | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n Ilxn = KLCG(ppkj, zwVL + '_')\n _Jiq = KLCG(zwVL + '_' + \"'\" + '*')\n zNEp = KLCG(xYvp + '-')\n aWHQ = KLCG(xYvp + '-' + '.')\n vBn6 = KLCG(Rwjg + ' ' + '\\t')\n wr2q = GVaG('ATOM') | GVaG('HETATM')\n ExgE = GVaG('TER') | GVaG('END') | GVaG('REMARK')\n ZRqA = cQ68(ycUa()... | [
"0.7099281",
"0.69209445",
"0.6902561",
"0.68820924",
"0.68111134",
"0.6675561",
"0.66695035",
"0.6620937",
"0.66159165",
"0.65862393",
"0.65862393",
"0.65860826",
"0.65842676",
"0.65842676",
"0.6560014",
"0.6558444",
"0.6558444",
"0.6558444",
"0.6558444",
"0.6558444",
"0.655... | 0.0 | -1 |
User cannot be created with the sign up form if password is empty or is None | def WcM5(YKHO):
nPrm = {'first_name': 'john', 'last_name': 'smith', 'email': 'johnsmith@gmail.com', 'password1': '', 'password2': '', 'gender': 'M', 'category': 1}
L03z = UTOl(data=nPrm)
YKHO.assertFalse(L03z.is_valid())
YKHO.assertIsNotNone(mv1M.objects.filter(email='johnsmith@gmail.com'), msg='Testing... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Tpey(YKHO):\n YKHO.assertEqual(FYrf.FAILURE, YKHO.users.sign_up('userC', None, None, 'userC@gmail.com'))",
"def vEWC(YKHO):\n YKHO.assertEqual(FYrf.FAILURE, YKHO.users.sign_up(None, None, None, 'both_none@gmail.com'))",
"def FhnH(YKHO):\n YKHO.assertEqual(FYrf.FAILURE, YKHO.users.sign_up('userB', ... | [
"0.80310977",
"0.80263263",
"0.7801413",
"0.7787425",
"0.77251023",
"0.7659948",
"0.75346786",
"0.75206083",
"0.74828935",
"0.74354196",
"0.73781985",
"0.73705137",
"0.7279213",
"0.7278388",
"0.72683203",
"0.72181875",
"0.72125465",
"0.7194402",
"0.7181793",
"0.71727514",
"0.... | 0.7447606 | 9 |
User cannot be created with the sign up form if email is empty or invalid | def Q7CN(YKHO):
nPrm = {'first_name': 'john', 'last_name': 'smith', 'email': 'johnsmith', 'password1': 'ComplicatedPass1', 'password2': 'ComplicatedPass1', 'gender': 'M', 'category': 1}
L03z = UTOl(data=nPrm)
YKHO.assertFalse(L03z.is_valid())
YKHO.assertIsNotNone(mv1M.objects.filter(email='johnsmith'), ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vOeY(YKHO):\n YKHO.assertEqual(FYrf.FAILURE, YKHO.users.sign_up('userF', 'myPassword', 'myPassword', 'userFgmail.com'))",
"def TKfJ(YKHO):\n YKHO.assertEqual(FYrf.FAILURE, YKHO.users.sign_up('userG', 'myPassword', 'myPassword', 'userG@gmailcom'))",
"def Pkdu(YKHO):\n YKHO.assertEqual(FYrf.FAILURE,... | [
"0.77966225",
"0.7771508",
"0.76875716",
"0.76266056",
"0.76163495",
"0.76122475",
"0.7592468",
"0.7530693",
"0.7521815",
"0.752102",
"0.7513025",
"0.75032115",
"0.7488902",
"0.74882734",
"0.74879885",
"0.74841565",
"0.74781555",
"0.7474523",
"0.7467049",
"0.7464408",
"0.7447... | 0.7771196 | 2 |
Tests if the correctly inputted superuser is created | def d0pB(YKHO):
mv1M.objects.create_superuser(email='superuser_normal@user.com', password='superuser')
LQG1 = mv1M.objects.get(email='superuser_normal@user.com')
YKHO.assertIsNotNone(LQG1)
YKHO.assertTrue(LQG1, 'superuser_normal@user.com') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MgmU(YKHO) -> None:\n Q5YQ = mv1M.objects.create_superuser(email='test@gmail.com', username='test', employee_id='DT1001', password='wsxwsx@123')\n YKHO.assertTrue(Q5YQ.is_admin)\n YKHO.assertTrue(Q5YQ.is_superuser)\n YKHO.assertTrue(Q5YQ.is_active)\n YKHO.assertTrue(Q5YQ.is_staff)",
"def rCAj(... | [
"0.79659516",
"0.78377026",
"0.7820727",
"0.7815441",
"0.77524644",
"0.77056396",
"0.7695346",
"0.7665783",
"0.76498985",
"0.7640486",
"0.76207423",
"0.76099694",
"0.76033396",
"0.7595871",
"0.75560147",
"0.75506055",
"0.75130266",
"0.75093764",
"0.75058424",
"0.749041",
"0.7... | 0.75238645 | 16 |
Gets the absolute path to the speaker pickle of that name. | def RIwi(dvBM, format='.pickle'):
return CqG9('speaker_pickles', dvBM + format) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dvBM(IznC):\n AQSv = IznC.split('/')\n if len(AQSv) < 2:\n return ''\n return AQSv[-2]",
"def vmST(YKHO) -> str:\n return Hy7s.path.join(YKHO._default_directory(), f'{YKHO.name}.pkl')",
"def NVxF(mWFP):\n Ux0P = Hy7s.path.abspath(Hy7s.path.join('.', 'journals', mWFP + '.jrl'))\n re... | [
"0.687484",
"0.6835444",
"0.66168845",
"0.64180976",
"0.64155346",
"0.6344159",
"0.6264828",
"0.6205257",
"0.62004244",
"0.6191009",
"0.6187328",
"0.61496556",
"0.61249375",
"0.6086847",
"0.6085708",
"0.6085658",
"0.60805565",
"0.6064546",
"0.6030206",
"0.6026061",
"0.6006248... | 0.633436 | 6 |
Inserts a word into the trie. | def JPHp(YKHO, GIN8: str) -> None:
Q6kx = YKHO.root
for hcXw in GIN8:
o3cf = True
for aUGN in Q6kx.children:
if aUGN.char == hcXw:
o3cf = False
Q6kx = aUGN
if o3cf:
Esd_ = ep_x(hcXw)
Q6kx.children.append(Esd_)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JPHp(YKHO, GIN8: str) -> None:\n jvSB = YKHO.node\n for YRbF in GIN8:\n if YRbF not in jvSB.char:\n jvSB.char[YRbF] = ep_x()\n jvSB = jvSB.char[YRbF]\n if jvSB.isword is False:\n jvSB.isword = True",
"def JPHp(YKHO, GIN8: str) -> None:\n XP5J = YKHO.root\n for Y... | [
"0.89349246",
"0.8875727",
"0.88754433",
"0.88664436",
"0.8845666",
"0.88351166",
"0.8829387",
"0.88241696",
"0.88215303",
"0.88025844",
"0.87970716",
"0.87917984",
"0.87870646",
"0.8786165",
"0.8785743",
"0.87801075",
"0.8779744",
"0.87764865",
"0.87708014",
"0.8767584",
"0.... | 0.86432046 | 40 |
Returns if the word is in the trie. | def TgwQ(YKHO, GIN8: str) -> bool:
Q6kx = YKHO.root
if len(Q6kx.children) == 0:
return False
for hcXw in GIN8:
o3cf = True
for aUGN in Q6kx.children:
if aUGN.char == hcXw:
o3cf = False
Q6kx = aUGN
break
if o3cf:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FYXB(YKHO, GIN8):\n GIN8 = GIN8.strip()\n tk5Y = YKHO.root\n for Z9rn in GIN8:\n if Z9rn not in tk5Y:\n return False\n tk5Y = tk5Y[Z9rn]\n return tk5Y.end_of_word",
"def DUe0(YKHO, ZOCz, GIN8):\n if type(GIN8) != str:\n raise TypeError('Trie only works on str!')... | [
"0.82740057",
"0.8270583",
"0.826732",
"0.82178044",
"0.81918275",
"0.81761354",
"0.8172193",
"0.81346285",
"0.79840845",
"0.7975794",
"0.7968388",
"0.795622",
"0.78835267",
"0.787911",
"0.7868057",
"0.7837609",
"0.78219956",
"0.78153425",
"0.7814055",
"0.7797514",
"0.779291"... | 0.73306096 | 94 |
Returns if there is any word in the trie that starts with the given prefix. | def BYxH(YKHO, y0cW: str) -> bool:
Q6kx = YKHO.root
if len(Q6kx.children) == 0:
return False
for hcXw in y0cW:
o3cf = True
for aUGN in Q6kx.children:
if aUGN.char == hcXw:
o3cf = False
Q6kx = aUGN
break
if o3cf:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BYxH(YKHO, y0cW):\n GIN8 = y0cW\n if not GIN8:\n return True\n nsYX = GIN8[0]\n if nsYX not in YKHO.trie_map:\n return False\n Tifd = YKHO.trie_map[nsYX]\n for YRbF in range(1, len(GIN8)):\n LihS = GIN8[YRbF]\n if LihS not in Tifd.childMap:\n return Fals... | [
"0.86418957",
"0.8456077",
"0.8439758",
"0.84152204",
"0.8414917",
"0.8406607",
"0.83812594",
"0.8369774",
"0.83355415",
"0.8326945",
"0.83266926",
"0.8239315",
"0.8172047",
"0.81602836",
"0.81522566",
"0.81466633",
"0.811517",
"0.80111045",
"0.79831576",
"0.79831576",
"0.795... | 0.8228612 | 12 |
Return the number of threads running in parallel sections export omp_num_threads=X to change Examples >>> import nnp >>> print('running on {} threads'.format(nnp.util.misc.num_threads())) | def l54n():
return getattr(_nyz, 'f90wrap_num_threads')() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RcgH():\n if HwRy.platform == 'win32':\n return int(Hy7s.environ['NUMBER_OF_PROCESSORS'])\n else:\n return int(Hy7s.popen('grep -c cores /proc/cpuinfo').read())",
"def HyLP():\n try:\n return jQX2.omp_get_max_threads()\n except AttributeError:\n return 1",
"def eyQK(... | [
"0.8068183",
"0.7938283",
"0.7905028",
"0.7883675",
"0.777059",
"0.7754548",
"0.76625204",
"0.7536648",
"0.74727726",
"0.74727726",
"0.7468888",
"0.7450821",
"0.74194294",
"0.7390617",
"0.7211555",
"0.7153792",
"0.7131112",
"0.7064212",
"0.7064212",
"0.70361084",
"0.7020884",... | 0.7980952 | 1 |
Appends a numerical question to the series of questions. | def GI0C(YKHO, leAC, Jfe3, ANfV, LNo8='', C7_O='', Kmi0=279, l5eN=486, D1sU=0):
_jzK = jth9.deepcopy(YKHO._question_template)
_jzK.find(NzBC.QNAME_TAG).find(NzBC.TEXT_TAG).text = leAC
c_WT = _jzK.find(NzBC.QTEXT_TAG)
CCMX = c_WT.find(NzBC.TEXT_TAG)
CCMX.text = ''
if LNo8 is not '' and C7_O is no... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wjvr(YKHO, bAls):\n if isinstance(bAls, Y4Gy):\n YKHO.question.append(bAls)\n else:\n raise TypeError(bAls + 'Must be of type Question')",
"def wWM5(YKHO, Ghho, jopa, Ql2Z, bAls, Goi2, adof=None):\n pass",
"def wWM5(YKHO, bAls):\n YKHO.questions.append(bAls)",
"def ofwu(YKHO, bA... | [
"0.65790784",
"0.6382527",
"0.6327125",
"0.6298966",
"0.62979054",
"0.6258725",
"0.61879086",
"0.61757356",
"0.6122561",
"0.60791063",
"0.60786223",
"0.6070088",
"0.5988577",
"0.5986348",
"0.59289765",
"0.5920018",
"0.5919939",
"0.5900424",
"0.5853663",
"0.58389616",
"0.58241... | 0.5346448 | 55 |
Convert an argument string into its boolean value. | def M0mR(d7pR):
if d7pR.lower() in ('yes', 'true', 't', 'y', '1'):
return True
elif d7pR.lower() in ('no', 'false', 'f', 'n', '0'):
return False
else:
raise j1Jz.ArgumentTypeError('Boolean value expected.') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fgVc(Ty9i):\n if isinstance(Ty9i, bool):\n return Ty9i\n if Ty9i.lower() == 'true':\n return True\n elif Ty9i.lower() == 'false':\n return False\n else:\n raise j1Jz.ArgumentTypeError(f'Boolean string or boolean expected; received {Ty9i}.')",
"def FLBk(d7pR):\n if i... | [
"0.83744705",
"0.8295638",
"0.8198858",
"0.8167074",
"0.8131941",
"0.8101945",
"0.8096926",
"0.8096926",
"0.8096926",
"0.8096926",
"0.8088957",
"0.8087811",
"0.80859447",
"0.80813944",
"0.807788",
"0.8077644",
"0.8077644",
"0.8077644",
"0.8077644",
"0.8058115",
"0.8049313",
... | 0.8238158 | 2 |
Test login redirects for correct and incorrect logins. | def UHFF(YKHO):
geh0 = YKHO.client.post(gxEw('website:login'), {'username': ['test_user'], 'password': ['secret']})
YKHO.assertEqual(geh0.status_code, 302)
YKHO.client.logout()
UBAa = YKHO.client.post(gxEw('website:login'), {'username': ['test_user'], 'password': ['secrdset']})
YKHO.assertIn('Login ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DWk6(YKHO):\n Ylbp = YKHO.client.get('/login')\n YKHO.assertEqual(Ylbp.status, xJXl['301'])\n Mgh8 = Ylbp.headers['Location'].replace('http://localhost', '')\n YKHO.assertEqual(Mgh8, YKHO.login_location)\n Ylbp = YKHO.client.get(Mgh8)\n YKHO.assertEqual(Ylbp.status, xJXl['200'])\n Ylbp = Y... | [
"0.8174516",
"0.8129547",
"0.81087565",
"0.80906284",
"0.8084651",
"0.7996774",
"0.79725254",
"0.79725254",
"0.79703224",
"0.7963041",
"0.79065216",
"0.78756857",
"0.78672874",
"0.7767007",
"0.7755672",
"0.77463335",
"0.77463335",
"0.77463335",
"0.77463335",
"0.7744754",
"0.7... | 0.7744377 | 20 |
Returns True if self has contains no items, False otherwise. | def oMcT(YKHO):
return len(YKHO) == 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FBfn(YKHO):\n return not bool(YKHO.items_)",
"def XE3e(YKHO):\n return len(list(YKHO)) > 0",
"def lsmZ(YKHO):\n return not YKHO.items",
"def FBfn(YKHO):\n return YKHO.items == []",
"def FBfn(YKHO):\n return YKHO.items == []",
"def FBfn(YKHO):\n return YKHO.items == []",
"def FBfn(... | [
"0.8699327",
"0.86858433",
"0.8660959",
"0.86307895",
"0.86307895",
"0.86307895",
"0.86307895",
"0.86178213",
"0.86079496",
"0.85992813",
"0.8596413",
"0.85710937",
"0.85582745",
"0.85582745",
"0.85582745",
"0.85582745",
"0.85559714",
"0.8555287",
"0.85390604",
"0.85390604",
... | 0.0 | -1 |
Creats a new Argument with a given key. If value and/or type arguments are present, the value/type of this Argument will be set. | def FIMM(YKHO, H5ew, BWXx=None, type=None):
YKHO._key = H5ew
assert isinstance(H5ew, str) and len(H5ew) > 0
YKHO._value = None
YKHO._required_type = None
YKHO.set_value(BWXx)
if type is not None:
YKHO.use_type(type)
r8hN = a8sV.match(H5ew)
if not r8hN:
raise ValueError('I... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def O1R3(YKHO, H5ew, BWXx):\n H5ew = str(H5ew)\n if acLI(BWXx) and (not isinstance(BWXx, Zidz)):\n BWXx = Zidz(H5ew, value=BWXx)\n assert isinstance(BWXx, Zidz), 'Can only set Argument in ArgumentCollection.__setitem__.'\n super().__setitem__(H5ew, BWXx)",
"def Vtxw(YKHO, H5ew, BWXx):\n YKH... | [
"0.68164444",
"0.65310967",
"0.6208093",
"0.59555894",
"0.5882506",
"0.5881397",
"0.58245045",
"0.57744783",
"0.5771785",
"0.5691649",
"0.5691649",
"0.56694376",
"0.56694376",
"0.56694376",
"0.56694376",
"0.56694376",
"0.56694376",
"0.56694376",
"0.56694376",
"0.56694376",
"0... | 0.7734681 | 0 |
Assigns ``value`` to self.value. If a type has already been set before, the new value must conform to the requirements of it (i.e. isinstance(value, type) must be True). | def j6Nn(YKHO, BWXx):
if YKHO._required_type is not None and BWXx is not None:
if not isinstance(BWXx, YKHO._required_type):
raise TypeError('Argument {0} must be of type {1}, but found type {2}!'.format(YKHO.key, YKHO._required_type.__name__, type(BWXx).__name__))
return
YKHO._value... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AOIJ(YKHO, BWXx):\n YKHO.value = BWXx\n YKHO._value_type = type(BWXx)",
"def j6Nn(YKHO, BWXx):\n BWXx = YKHO._try_cast(BWXx, YKHO.accepted_type)\n if BWXx != None:\n YKHO.value = BWXx\n YKHO.is_set = True\n return True\n return False",
"def fX1C(YKHO, BWXx):\n YKHO._v... | [
"0.8468034",
"0.7752327",
"0.75830173",
"0.75356483",
"0.7279627",
"0.72608954",
"0.7210674",
"0.7209412",
"0.7209149",
"0.71936893",
"0.718194",
"0.71611834",
"0.7144034",
"0.7143095",
"0.7093617",
"0.7047275",
"0.7047275",
"0.7047275",
"0.7041419",
"0.7036159",
"0.7030302",... | 0.8167872 | 1 |
Returns torch.utils.data.DataLoader for custom coco dataset. | def RuZU(tk5Y, qQXR, SZFh, Ep8u, hXNa, I7Gy):
N8JC = Qon4(root=tk5Y, json=qQXR, transform=SZFh)
zQKy = ht2j.utils.data.DataLoader(dataset=N8JC, batch_size=Ep8u, shuffle=hXNa, num_workers=I7Gy)
return (zQKy, N8JC) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qFG4(i0XC: str, Ep8u: int) -> pVAc:\n rrl5 = i0XC + '/train2017'\n XOtI = i0XC + '/annotations/instances_train2017.json'\n m5yU = n9y7(root=i0XC, annFile=XOtI, transform=Ymkf.Compose([Ymkf.ToTensor()]))\n print('Number of samples: ', len(m5yU))\n print(f'Image size: {m5yU}')\n K1Op = pVAc(m5y... | [
"0.7260363",
"0.70331776",
"0.67572784",
"0.67572784",
"0.6710751",
"0.6578966",
"0.6565552",
"0.6458821",
"0.6433103",
"0.63774216",
"0.63230723",
"0.6308522",
"0.6308522",
"0.6308522",
"0.63042176",
"0.6288664",
"0.62803966",
"0.62534106",
"0.62387615",
"0.6225159",
"0.6221... | 0.7490918 | 0 |
points uniformly distributed on unit sphere | def EzTm():
WKvO, LVAh, epBp = [tuKI.gauss(0.0, 1.0) for YRbF in range(3)]
Mkmy = (WKvO * WKvO + LVAh * LVAh + epBp * epBp) ** 0.5
return kOAW.Vector([WKvO / Mkmy, LVAh / Mkmy, epBp / Mkmy]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fDZP():\n\n def NkkI(Ty9i):\n CkYf = XTiz.linalg.norm(Ty9i)\n if CkYf == 0:\n return Ty9i\n else:\n return Ty9i / CkYf\n Ty9i = XTiz.zeros(3)\n for YRbF in range(3):\n G1Hx = 15\n XTiz.random.seed()\n H6nk = XTiz.random.standard_normal(si... | [
"0.80570585",
"0.75951236",
"0.74607736",
"0.7338619",
"0.7306303",
"0.7224585",
"0.72125965",
"0.7130926",
"0.71168584",
"0.71072966",
"0.7042282",
"0.7019298",
"0.70117193",
"0.70117193",
"0.6992211",
"0.6986452",
"0.69756764",
"0.69223",
"0.6906834",
"0.6844512",
"0.684451... | 0.0 | -1 |
Embeds an mp4 file in the notebook. | def iw_V(Ux0P):
f6W2 = open(Ux0P, 'rb').read()
Hufe = WR89.b64encode(f6W2)
TZ9E = '\n <video width="640" height="480" controls>\n <source src="data:video/mp4;base64,{0}" type="video/mp4">\n Your browser does not support the video tag.\n </video>'.format(Hufe.decode())
return | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iw_V(Ux0P):\n f6W2 = open(Ux0P, 'rb').read()\n Hufe = WR89.b64encode(f6W2)\n TZ9E = '\\n <video width=\"640\" height=\"480\" controls>\\n <source src=\"data:video/mp4;base64,{0}\" type=\"video/mp4\">\\n Your browser does not support the video tag.\\n </video>'.format(Hufe.decode())\n ... | [
"0.78102374",
"0.7756738",
"0.71089125",
"0.70328194",
"0.6677568",
"0.6486407",
"0.59511995",
"0.59232783",
"0.5858418",
"0.58216226",
"0.5743158",
"0.56679773",
"0.561612",
"0.56036204",
"0.5551844",
"0.55205035",
"0.5454416",
"0.5449186",
"0.5378365",
"0.5353703",
"0.53268... | 0.7890824 | 0 |
Function to plot difference map between two DEMs from masked array. Replaces fill values with nan. Use hsfm.geospatial.mask_array_with_nan(array,nodata_value) to create an appropriate masked array as input. | def Dk0U(PCkh, QSHQ=None, iMGt='RdBu', zjw2=1, EoX5=99, QVq7=None, xx9t=None, aNZO=None):
if QVq7 == None:
mrS7, ZMSp = oyIN.nanpercentile(PCkh, [zjw2, EoX5])
QVq7 = max([abs(mrS7), abs(ZMSp)])
if not isinstance(aNZO, type(None)):
Xn71 = aNZO.imshow(PCkh, cmap=iMGt, clim=(-QVq7, QVq7), e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ypYw(PCkh, QSHQ=None, iMGt='inferno', UNYr=None):\n Xj17 = Pkim.geospatial.calculate_hillshade(PCkh)\n LZpg, aNZO = QrM1.subplots(1, figsize=(10, 10))\n Xn71 = aNZO.imshow(PCkh, cmap=iMGt)\n aNZO.imshow(Xj17, cmap='gray', alpha=0.5)\n LZpg.colorbar(Xn71, extend='both')\n if UNYr is not None:\... | [
"0.60051364",
"0.59763145",
"0.5796039",
"0.5780662",
"0.5635409",
"0.55850697",
"0.5581974",
"0.5556481",
"0.55091584",
"0.54788136",
"0.5478462",
"0.5459703",
"0.5451631",
"0.5451298",
"0.54059404",
"0.53786814",
"0.5353623",
"0.5307448",
"0.5296214",
"0.52894044",
"0.52655... | 0.69594646 | 0 |
Convolution of reversed h with each line of u. Numpy implementation. | def OYaa(MKlR, WKvO):
cDK5, bGrB = WKvO.shape
return oyIN.r_[[oyIN.convolve(MKlR[::-1], WKvO[YRbF], mode='valid') for YRbF in range(cDK5)]] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yIp6(WKvO, MKlR):\n GPal = 2 * len(MKlR)\n jzdc = WKvO[:GPal][::-1]\n Fg_i = WKvO[-GPal:][::-1]\n KCHu = oyIN.r_[jzdc, WKvO, Fg_i]\n LVAh = oyIN.convolve(KCHu, MKlR, mode='same')\n LVAh = LVAh - LVAh.mean()\n return LVAh[GPal:-GPal]",
"def bcll(MKlR, P6bq):\n P6bq = oyIN.atleast_2d(P6... | [
"0.75129867",
"0.73709285",
"0.72738063",
"0.7077047",
"0.66749144",
"0.65441686",
"0.64824736",
"0.63690645",
"0.63218623",
"0.63213074",
"0.62192947",
"0.61215943",
"0.60906196",
"0.60574216",
"0.6056676",
"0.6051617",
"0.60202706",
"0.59883195",
"0.5983383",
"0.5983383",
"... | 0.64647776 | 7 |
Convolution of reversed h with each line of u. Torch implementation. | def BgQP(MKlR, WKvO):
x1O9 = 0
cDK5, bGrB = WKvO.shape
yBos = TyOk(WKvO.view(cDK5, 1, -1), MKlR.view(1, 1, -1), padding=x1O9)
return yBos.view(cDK5, -1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yIp6(WKvO, MKlR):\n GPal = 2 * len(MKlR)\n jzdc = WKvO[:GPal][::-1]\n Fg_i = WKvO[-GPal:][::-1]\n KCHu = oyIN.r_[jzdc, WKvO, Fg_i]\n LVAh = oyIN.convolve(KCHu, MKlR, mode='same')\n LVAh = LVAh - LVAh.mean()\n return LVAh[GPal:-GPal]",
"def yIp6(WKvO, MKlR):\n return oyIN.convolve(WKvO... | [
"0.6999966",
"0.68040514",
"0.6766749",
"0.6705529",
"0.6591303",
"0.65851784",
"0.64346284",
"0.6409962",
"0.63961434",
"0.6365969",
"0.6352153",
"0.6146966",
"0.6095498",
"0.6095498",
"0.60349584",
"0.6017163",
"0.5988877",
"0.59674984",
"0.5960547",
"0.59365636",
"0.592140... | 0.5641571 | 43 |
Flip keys and values of the dictionary Need to take care of duplicate names and lists of names | def QwQ5(K9mL):
W2pY = {}
for G1Hx, Ty9i in K9mL.items():
if Ty9i in [None, 'special']:
continue
if G1Hx in [None]:
continue
if isinstance(Ty9i, (list, tuple)):
for BWXx in Ty9i:
W2pY[BWXx] = G1Hx
else:
W2pY[str(Ty9i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Fsdm(Csk6):\n return dict(((Ty9i, G1Hx) for G1Hx, Ty9i in Csk6.items()))",
"def fh2j(Csk6):\n return {Ty9i: G1Hx for G1Hx, Ty9i in Csk6.items()}",
"def QwQ5(Csk6):\n yvT9 = {}\n for H5ew, BWXx in Csk6.items():\n if BWXx not in yvT9:\n yvT9[BWXx] = []\n yvT9[BWXx].append... | [
"0.7599264",
"0.75736934",
"0.72994125",
"0.7214587",
"0.7055034",
"0.70343673",
"0.68663424",
"0.68486863",
"0.67947143",
"0.6793225",
"0.6757811",
"0.66979456",
"0.66922975",
"0.66756165",
"0.6674607",
"0.6631496",
"0.65717834",
"0.65140086",
"0.65003765",
"0.6461897",
"0.6... | 0.74235815 | 2 |
Takes in the commandline arguments list (args), and returns a nice argparse result with fields for all the options. | def dCXb(qIxc):
wvEv = j1Jz.ArgumentParser(description=__doc__, formatter_class=j1Jz.RawDescriptionHelpFormatter)
wvEv.add_argument('out_dir', help='directory to fill with alignments, statistics files, and hubs')
wvEv.add_argument('in_dirs', nargs='+', help='region directories to use')
wvEv.add_argument... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dCXb(qIxc):\n twdW = j1Jz.ArgumentParser(description='Carve up some API docs in list or wiki format')\n twdW.add_argument('key', help='Your API key')\n twdW.add_argument('-f', '--format', choices=['list', 'wiki'], default='list', help='Print out API docs in condensed list form or wikitext')\n twdW.... | [
"0.701199",
"0.7004735",
"0.6999281",
"0.6991882",
"0.69548196",
"0.69026434",
"0.68935865",
"0.6890404",
"0.6876658",
"0.6865212",
"0.6861601",
"0.68528193",
"0.68522626",
"0.6842364",
"0.6841059",
"0.6821396",
"0.6819664",
"0.68134665",
"0.68076986",
"0.6807618",
"0.6773875... | 0.0 | -1 |
Given two dictionaries, merge them into a new dict as a shallow copy. | def ywpZ(WKvO, LVAh):
epBp = WKvO.copy()
epBp.update(LVAh)
return epBp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IYhE(jzdc, Fg_i):\n Aofo = jzdc.copy()\n Aofo.update(Fg_i)\n return Aofo",
"def roQF(WbPA, S69B):\n epBp = WbPA.copy()\n epBp.update(S69B)\n return epBp",
"def yQxF(WKvO, LVAh):\n epBp = WKvO.copy()\n epBp.update(LVAh)\n return epBp",
"def yQxF(WbPA, S69B):\n lXgg = WbPA.cop... | [
"0.8707653",
"0.8660855",
"0.8569578",
"0.85590625",
"0.8556923",
"0.8550882",
"0.85067827",
"0.85067827",
"0.85067827",
"0.85067827",
"0.85067827",
"0.85067827",
"0.85067827",
"0.85067827",
"0.85067827",
"0.85067827",
"0.85067827",
"0.85067827",
"0.85067827",
"0.85067827",
"... | 0.8558924 | 4 |
Returns critical Omega given M and R. | def rHxo(YKHO, E3D9, A3Vt):
return oyIN.sqrt(E3D9 * YKHO.grav / A3Vt ** 3) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s_di(Kt_s, bMbF, r8hN=2.0):\n OInx = tKbj * Kt_s / (r8hN * _VQY)\n a67k = mqMr * bMbF / (2.0 * OInx)\n return a67k",
"def zXsZ(E3D9, YYsj, rYO3='Hz'):\n E3D9 = E3D9 * uwaB.Msol\n A3Vt = YYsj * uwaB.Rsol\n qw75 = oyIN.sqrt(8 * uwaB.GG * E3D9 / (27.0 * A3Vt ** 3))\n if rYO3.lower() != 'hz'... | [
"0.7031121",
"0.682285",
"0.6803944",
"0.6574491",
"0.6081636",
"0.6057646",
"0.60329825",
"0.60265505",
"0.6012538",
"0.5987544",
"0.5985666",
"0.5973115",
"0.59686184",
"0.59293133",
"0.59286344",
"0.5917625",
"0.5890338",
"0.5887786",
"0.58726084",
"0.5869934",
"0.58602184... | 0.7322646 | 0 |
Returns cumulative moment of inertia I as a function of r (the WD moment of inertial is the largest I returned). | def F9d6(Mkmy, oZuG):
pTn1 = vldj(Mkmy, Mkmy ** 4 * oZuG, kind='linear') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pdQl(Mkmy, oZuG):\n return 8.0 * oyIN.pi / 3.0 * jKUV.cumtrapz(Mkmy ** 4 * oZuG, x=Mkmy, initial=0.0)",
"def FEAO(Mkmy=0.07, YRbF=0.03):\n return (1.0 + Mkmy) / (1.0 + YRbF) - 1.0",
"def uLj7(YKHO):\n Nq1b = YKHO.covariance()\n return YKHO.density_ * (oyIN.trace(Nq1b) * oyIN.eye(3) - Nq1b)",
... | [
"0.6833325",
"0.64455616",
"0.6415556",
"0.62843645",
"0.6142951",
"0.6128059",
"0.60602736",
"0.6048189",
"0.596619",
"0.5934212",
"0.59088826",
"0.5882177",
"0.584632",
"0.584632",
"0.5845173",
"0.5843911",
"0.5775633",
"0.57639056",
"0.5729492",
"0.5720968",
"0.5688334",
... | 0.0 | -1 |
Calculate area of circle. | def f0tD(Mkmy):
mM0K = 3.14
return mM0K * (Mkmy * Mkmy) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f0tD(YKHO) -> float:\n return YKHO.circle_area(YKHO.radius)",
"def UdRN(r1VO):\n f0tD = epAf.pi * r1VO ** 2\n return f0tD",
"def f0tD(YKHO):\n return YKHO.radius ** 2 * mM0K",
"def LA4l(Mkmy):\n return epAf.pi * Mkmy * Mkmy",
"def yX2h(r1VO):\n return mM0K * r1VO * r1VO",
"def f0tD(... | [
"0.8527375",
"0.83508545",
"0.8227502",
"0.8217479",
"0.82116824",
"0.8190556",
"0.8190556",
"0.8190556",
"0.81790304",
"0.81618094",
"0.8152492",
"0.8152492",
"0.8124779",
"0.8120569",
"0.81203824",
"0.811104",
"0.81011933",
"0.8098512",
"0.8096185",
"0.8093877",
"0.8093877"... | 0.74081624 | 63 |
The list of points making up this Polygon. | def VX1z(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LTIa(YKHO) -> list:\n return list(YKHO._get_points())",
"def zxJV(YKHO):\n Ylbp = []\n Ylbp.extend(YKHO.points)\n return Ylbp",
"def LTIa(YKHO) -> h8nf[x1iM]:\n return YKHO._points",
"def LTIa(YKHO) -> x1iM[AjYs]:\n return YKHO._points",
"def LTIa(YKHO):\n return [vC9B.point for vC... | [
"0.8517181",
"0.82651055",
"0.82214594",
"0.8192602",
"0.80878997",
"0.80046964",
"0.80011815",
"0.80011815",
"0.80011815",
"0.80011815",
"0.7834434",
"0.78186184",
"0.78179276",
"0.7790934",
"0.7753704",
"0.7752227",
"0.7743279",
"0.7743279",
"0.76939595",
"0.7693923",
"0.76... | 0.7827349 | 11 |
Find all intersections between two curves. Curves are defined by lists of ordered pairs (x, y). Returns an empty list if no intersections are found. | def gdGu(YKHO, zSGI, XaH4):
uMII = []
if len(zSGI) > 1 and len(XaH4) > 1:
for TPao in range(len(zSGI) - 1):
for fVVZ in range(len(XaH4) - 1):
roVE = y3ji([(zSGI[TPao][0], zSGI[TPao][1]), (zSGI[TPao + 1][0], zSGI[TPao + 1][1])])
aQpk = y3ji([(XaH4[fVVZ][0], XaH... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A3Yv(o4D3, si3g, ajwV, skBL, EBgd, HpuQ, Lq8X, U0Zt):\n bcP8, xEOs = (o4D3 - ajwV, skBL - si3g)\n r8hN = o4D3 * (si3g - skBL) + si3g * (ajwV - o4D3)\n jzdc, Fg_i, Z9rn, Csk6 = Hudj.calcCubicParameters((EBgd.x, EBgd.y), (HpuQ.x, HpuQ.y), (Lq8X.x, Lq8X.y), (U0Zt.x, U0Zt.y))\n cd6V = xEOs * jzdc[0] + ... | [
"0.700396",
"0.6851938",
"0.67363113",
"0.6702606",
"0.6594725",
"0.6544948",
"0.6491536",
"0.64262134",
"0.64221203",
"0.6413366",
"0.6347743",
"0.6326199",
"0.631826",
"0.6315595",
"0.6307403",
"0.62942487",
"0.62050956",
"0.6187475",
"0.61791396",
"0.6148385",
"0.6148385",... | 0.68419975 | 2 |
Normalize column using Modified Standard Score | def RsET(iVRZ):
BjRM = apD8(iVRZ)
oLcg = sum([abs(WKvO - BjRM) for WKvO in iVRZ]) / len(iVRZ)
Aofo = [(WKvO - BjRM) / oLcg for WKvO in iVRZ]
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n2ri(jQ3Z):\n return jQ3Z.apply(lambda iVRZ: (iVRZ - iVRZ.mean()) / iVRZ.std())",
"def YE9v(jQ3Z):\n EM7T = jQ3Z.std(axis=1)\n sVs2 = jQ3Z.mean(axis=1)\n return jQ3Z.add(-sVs2, axis=0).mul(1 / EM7T, axis=0)",
"def NkkI(iVRZ):\n return (iVRZ - oyIN.mean(iVRZ)) / oyIN.std(iVRZ)",
"def n2ri(j... | [
"0.8308639",
"0.7903619",
"0.7865616",
"0.78015125",
"0.78015125",
"0.7701865",
"0.7661509",
"0.7622651",
"0.7621321",
"0.7619811",
"0.7550204",
"0.73564047",
"0.7347853",
"0.72868127",
"0.72467923",
"0.72460324",
"0.724253",
"0.72340417",
"0.72295696",
"0.72275627",
"0.72061... | 0.0 | -1 |
get_gfs_forecast_info(gfs_url) This function assembles an array tuples containing the model forecast field datetime as well as the index of the forecast field. This facilitates to concurrent downloads of model data. | def EbON(NsHn):
B2Dn = uRlK.urlopen(NsHn).read()
Z9JV = rKuS(B2Dn, 'html.parser')
Z9JV.prettify()
VGwp = oyIN.array([])
for DNwW in Z9JV.findAll('a', href=True):
cNei = DNwW['href']
kUBT = ZbWC.search('gfs(\\d{8})$', cNei)
if kUBT:
uB0X = kUBT.group(1)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WfJi(bD7m):\n bD7m = bD7m.encode('utf-8')\n ps_8 = jLPM.WeatherBuf(hKhs)\n hGN5 = ps_8(bD7m)\n if not hGN5:\n HwRy.stderr.write('Failed to retrieve URL: {}\\n'.format(bD7m))\n return None\n tVen = ZbWC.search(QVwU, hGN5)\n if not tVen:\n HwRy.stderr.write('Failed to parse... | [
"0.5584086",
"0.5474635",
"0.5281243",
"0.518314",
"0.5167172",
"0.5147156",
"0.5102789",
"0.50490946",
"0.50368214",
"0.5027818",
"0.4981104",
"0.4972335",
"0.4970831",
"0.4954187",
"0.49385107",
"0.49109614",
"0.4891405",
"0.4881405",
"0.48465654",
"0.48358575",
"0.48302308... | 0.7795926 | 0 |
Return a dictionary representation for the PoseTrack18 format. The fields 'image_id' and 'id' must be added to the result. | def vAIF(YKHO):
BR8K = []
cCrA = []
Pzzm = len([1 for AmU3 in YKHO.landmarks if 'score' in AmU3.keys()]) > 0
for yMJi in c6fn:
try:
try:
VofE = Q4IO.index(yMJi)
except ValueError:
VofE = -1
Ct9O = [CWnC for CWnC in YKHO.landmark... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vAIF(YKHO):\n Aofo = {'images': [], 'annotations': []}\n for LNo8 in YKHO.frames:\n UaMf = LNo8.to_new()\n UaMf['vid_id'] = YKHO.posetrack_video_id\n UaMf['nframes'] = len(YKHO.frames)\n UaMf['id'] = int(LNo8.frame_id)\n Aofo['images'].append(UaMf)\n for PckF, a7... | [
"0.6544876",
"0.6341522",
"0.6319016",
"0.61198926",
"0.6118427",
"0.6016904",
"0.5979775",
"0.5967506",
"0.58697516",
"0.58697516",
"0.581693",
"0.57699984",
"0.5761754",
"0.5753591",
"0.5739232",
"0.5702625",
"0.56975216",
"0.5694739",
"0.5693993",
"0.5682478",
"0.5668173",... | 0.565066 | 23 |
Return a dictionary representation for the PoseTrack18 format. The field 'vid_id' must still be added. | def vAIF(YKHO):
U5bT = {'file_name': YKHO.posetrack_filename, 'has_no_densepose': True, 'is_labeled': len(YKHO.people) > 0, 'frame_id': YKHO.frame_id}
if YKHO.ignore_regions:
U5bT['ignore_regions_x'] = YKHO.ignore_regions[0]
U5bT['ignore_regions_y'] = YKHO.ignore_regions[1]
return U5bT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _fYl(YKHO, cll5=False):\n Ylbp = super(RN9x, YKHO).as_dict(short=cll5)\n Ylbp['number'] = YKHO.number\n Ylbp['status'] = YKHO.status\n Ylbp['voltage'] = YKHO.voltage\n return Ylbp",
"def Napc(YKHO):\n return {'name': YKHO.name, 'id': YKHO.id, 'video': YKHO.id}",
"def MNRr(YKHO):\n retu... | [
"0.6196946",
"0.60290295",
"0.598423",
"0.59042656",
"0.58710504",
"0.5624293",
"0.558536",
"0.55553174",
"0.5551852",
"0.552616",
"0.54902476",
"0.5445341",
"0.54452544",
"0.5431005",
"0.5427355",
"0.5426375",
"0.54203564",
"0.5414258",
"0.54073",
"0.5350177",
"0.5348882",
... | 0.66088414 | 0 |
Converts magnitude to flux in Jy | def jr9H(FOSW, n8o7):
shSu = n8o7 * 10 ** (-0.4 * FOSW)
return shSu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gXUD(JyBM):\n return 2.5 * (23 - oyIN.log10(JyBM)) - 48.6",
"def bzaD(YKHO, shSu):\n return vlPw(shSu) + YKHO.zeropoint",
"def wayq(YXbZ, B_ud):\n return 10.0 ** ((B_ud - YXbZ) / 2.5)",
"def vTKw(Z8Da, qJa9):\n if type(Z8Da) == rYO3.quantity.Quantity:\n if not Z8Da.unit == rYO3.Unit('J... | [
"0.73812467",
"0.72015905",
"0.7178395",
"0.69929516",
"0.6954529",
"0.6759857",
"0.6611313",
"0.66047275",
"0.65998244",
"0.6543958",
"0.6514007",
"0.64617485",
"0.6451565",
"0.6344929",
"0.6330298",
"0.63214695",
"0.6309465",
"0.6302274",
"0.6284474",
"0.6199531",
"0.618680... | 0.71565706 | 3 |
Converts flux (Jy) to magnitudes | def Knmv(shSu, n8o7):
FOSW = -2.5 * oyIN.log10(shSu / n8o7)
return FOSW | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bzaD(YKHO, shSu):\n return vlPw(shSu) + YKHO.zeropoint",
"def gXUD(JyBM):\n return 2.5 * (23 - oyIN.log10(JyBM)) - 48.6",
"def wayq(YXbZ, B_ud):\n return 10.0 ** ((B_ud - YXbZ) / 2.5)",
"def ROL0(YKHO, shSu, Ebru):\n return -2.5 * epAf.log10(shSu / YKHO.zpbandflux(Ebru))",
"def jr9H(FOSW, n... | [
"0.7564437",
"0.7246705",
"0.68997306",
"0.6707262",
"0.66955817",
"0.664933",
"0.6619437",
"0.6604225",
"0.65831083",
"0.64919716",
"0.64720607",
"0.64664596",
"0.64301157",
"0.64037746",
"0.6401289",
"0.63924414",
"0.63614845",
"0.63036865",
"0.62797636",
"0.62683314",
"0.6... | 0.6586879 | 8 |
Convert Galactic coordinates to carthesian coordinates with the center of the Milky Way as the origin of the carthesian coordinates. | def JBBV(tjUW, aPd6, lWPh):
Fg_i = oyIN.deg2rad(tjUW)
vC9B = oyIN.deg2rad(aPd6)
EcVT = RSHB.MW_Rsun - lWPh * oyIN.cos(vC9B) * oyIN.cos(Fg_i)
fuBA = -1.0 * lWPh * oyIN.sin(vC9B) * oyIN.cos(Fg_i)
Nk6w = lWPh * oyIN.sin(Fg_i)
return (EcVT, fuBA, Nk6w) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ROhf(WKvO):\n Mkmy = oyIN.sqrt(oyIN.sum(WKvO ** 2))\n rVnq = oyIN.arctan2(WKvO[1], WKvO[0])\n q7In = oyIN.arccos(WKvO[2] / Mkmy)\n return (Mkmy, rVnq % (2 * oyIN.pi), q7In % oyIN.pi)",
"def xryH(Csk6):\n vAIo = Csk6['Galactic']\n if '--' in vAIo:\n vAIo = '0 0'\n FDPT, QnmL = 2 * ... | [
"0.60739875",
"0.60366535",
"0.58602166",
"0.585806",
"0.58535904",
"0.58131754",
"0.5780477",
"0.57709837",
"0.5763191",
"0.5756899",
"0.5729643",
"0.57180387",
"0.56853247",
"0.5675488",
"0.5652296",
"0.5638794",
"0.56376153",
"0.5631465",
"0.55956346",
"0.5594642",
"0.5520... | 0.5200144 | 51 |
return the voltage wich goes from 0 to 1.8 | def gGVv(YKHO):
return UnfG() * 1.8 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m8jn(YKHO):\n return float(YKHO.ask('MEASure:SCALar:VOLTage:DC?'))",
"def m8jn(YKHO):\n JF3C = YKHO.aio.read()\n return JF3C / 4095.0 * 5.0",
"def U4IO(eHNT):\n return eHNT * 5",
"def m8jn(YKHO):\n return float(YKHO.query('VOLT?'))",
"def m8jn(YKHO) -> float:\n YKHO.__send_message('SO... | [
"0.7884709",
"0.7879083",
"0.7859371",
"0.7676219",
"0.7665508",
"0.76201415",
"0.7596938",
"0.7589774",
"0.7589774",
"0.7589774",
"0.7589774",
"0.7589774",
"0.75629663",
"0.75601405",
"0.75351465",
"0.7528363",
"0.74648225",
"0.74636245",
"0.7462266",
"0.7439713",
"0.7435025... | 0.85007066 | 0 |
Return the instance id. Useful to debug the singleton patern | def id(YKHO):
return id(YKHO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o_gm(YKHO) -> str:\n pass",
"def MqWi(Emd4):\n o_gm = str(Hy7s.getppid()) + '_' + cHms().name\n if o_gm not in Emd4._instances:\n o_gm = str(Hy7s.getpid()) + '_' + cHms().name\n return o_gm",
"def MqWi(Emd4):\n o_gm = str(Hy7s.getppid()) + '_' + cHms().name\n if o_gm not in Emd4._i... | [
"0.79224074",
"0.77727395",
"0.77727395",
"0.7678296",
"0.7678296",
"0.7678296",
"0.7678296",
"0.7678296",
"0.7678296",
"0.7678296",
"0.76355606",
"0.7621696",
"0.75983584",
"0.75340706",
"0.7478285",
"0.7474296",
"0.7474296",
"0.7474296",
"0.7474296",
"0.7474296",
"0.7474296... | 0.0 | -1 |
Get sparse indices and values as numpy arrays. | def UUts(YKHO) -> AzJI[oyIN.ndarray, oyIN.ndarray]:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qqTd(YKHO):\n return YKHO._data",
"def PuUs(YKHO, BWXx: 'np.ndarray'):\n rkoI = oyIN.nonzero(BWXx)\n wEf2 = BWXx[rkoI]\n _0VL = oyIN.transpose(rkoI)\n return {'indices': _0VL, 'values': wEf2, 'shape': list(BWXx.shape)}",
"def SdwH(jzdc):\n return oyIN.array([jzdc.indices.__getslice__(*WKv... | [
"0.73694104",
"0.6995339",
"0.6816805",
"0.67888314",
"0.677035",
"0.6732739",
"0.66454667",
"0.6523543",
"0.64901453",
"0.64226884",
"0.6418713",
"0.6358044",
"0.63236713",
"0.6286738",
"0.61425984",
"0.6132597",
"0.6101182",
"0.60910136",
"0.6056652",
"0.605086",
"0.6050147... | 0.7199327 | 1 |
Get sparse indices as numpy array. | def c1v5(YKHO) -> oyIN.ndarray:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SdwH(jzdc):\n return oyIN.array([jzdc.indices.__getslice__(*WKvO) for WKvO in oyIN.column_stack((jzdc.indptr[:-1], jzdc.indptr[1:]))])",
"def CJFq(nPrm):\n WfCS = oyIN.arange(nPrm.size)\n E3D9 = lqeT((WfCS, (nPrm.ravel(), WfCS)), shape=(nPrm.max() + 1, nPrm.size))\n return [oyIN.unravel_index(rdl... | [
"0.7893835",
"0.7478",
"0.71645415",
"0.70786494",
"0.70045507",
"0.6790267",
"0.6751072",
"0.6743374",
"0.6548626",
"0.6537458",
"0.6377006",
"0.63539773",
"0.63251615",
"0.62640417",
"0.62498325",
"0.6243015",
"0.62075394",
"0.6178061",
"0.6174705",
"0.61436987",
"0.6129599... | 0.6598542 | 8 |
Get values as numpy array. | def cuNb(YKHO) -> oyIN.ndarray:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qw7D(YKHO):\n return oyIN.array(YKHO.value)",
"def hkxX(YKHO):\n return YKHO.to_numpy()",
"def hkxX(YKHO) -> oyIN.ndarray:\n qmLP.warn('We recommend using `{}.to_numpy()` instead.'.format(type(YKHO).__name__))\n return YKHO.to_numpy()",
"def hkxX(YKHO):\n return YKHO.array",
"def MF4b(YK... | [
"0.81670237",
"0.80512464",
"0.77306753",
"0.76736546",
"0.7654325",
"0.7615518",
"0.7609026",
"0.75488037",
"0.74975055",
"0.74776095",
"0.74605674",
"0.7440069",
"0.7427971",
"0.7419872",
"0.74053025",
"0.7367681",
"0.73382884",
"0.7336178",
"0.728202",
"0.7277314",
"0.7276... | 0.81662697 | 1 |
First index of the array. | def rvPk(YKHO) -> int:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def swSU(QLR1):\n return QLR1.ix[0]",
"def _Wu0(YKHO: Array, /) -> int:\n Ylbp = YKHO._array.__index__()\n return Ylbp",
"def AT7I(YKHO, ezWE):\n return YKHO.get_magic_index_helper(ezWE, 0, len(ezWE))",
"def ILP8(YKHO, d6pt):\n or8S = 0\n for YBiN in YKHO.endpoint_index[1:]:\n if d6p... | [
"0.7328485",
"0.7000088",
"0.6984263",
"0.6814838",
"0.6754168",
"0.66936845",
"0.66180515",
"0.65966094",
"0.65847397",
"0.65355843",
"0.6507017",
"0.6466306",
"0.6432246",
"0.6430896",
"0.64021295",
"0.6382066",
"0.6372784",
"0.63371867",
"0.63080955",
"0.6295795",
"0.62666... | 0.7433942 | 0 |
Removes an edge between source and destination vertex. | def iyca(YKHO, JZXy, e1vZ):
if JZXy not in YKHO.vertices:
raise ValueError('Source vertex not found')
elif e1vZ not in YKHO.vertices[JZXy]:
raise ValueError('Destination vertex not found')
YKHO.vertices[JZXy].pop(e1vZ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iyca(YKHO, JZXy, e1vZ):\n del YKHO.edges[JZXy, e1vZ]\n del YKHO._outgoing[JZXy][e1vZ]\n del YKHO.incoming[e1vZ][JZXy]",
"def iyca(YKHO, JZXy: n, yFgu: n):\n try:\n YKHO._graph[JZXy].remove_connection(yFgu)\n except KeyError:\n pass\n if not YKHO._directed:\n try:\n ... | [
"0.8370718",
"0.8123323",
"0.76200193",
"0.75744075",
"0.7561308",
"0.74058795",
"0.7378797",
"0.7335769",
"0.7334988",
"0.73253036",
"0.7293471",
"0.7290408",
"0.72693574",
"0.723797",
"0.7222196",
"0.7205942",
"0.7160906",
"0.7140363",
"0.7128297",
"0.70553786",
"0.7046956"... | 0.87420857 | 0 |
Save the current song to the database. | def sS1j(YKHO):
if not YKHO.current_song:
return
i34x = YKHO.current_song
YKHO.setWaitCursor()
try:
_Yjh = []
for rdlD in YKHO.curs.execute('SELECT character_num FROM song_chord_link WHERE song_id=%i' % i34x.id):
_Yjh.append(rdlD[0])
for xJtk in i34x.iterateAl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wvyD(YKHO):\n YKHO.sp.current_user_saved_tracks_add([YKHO.get_current_song_info()['uri']])",
"def xkzz(id):\n Wusu(QePW, id=id, cur=DpUl, conn=w2B8)\n return vKnz('/songs/')",
"def wiPd(YKHO):\n oXtW = IXC8.getboolean('year_only')\n Gfn6 = IXC8.getboolean('albumartist')\n fzry = IXC8.getb... | [
"0.78099924",
"0.73682994",
"0.7109666",
"0.7069017",
"0.7012046",
"0.6885392",
"0.68605584",
"0.68492097",
"0.68252707",
"0.6800838",
"0.6797013",
"0.6797013",
"0.6797013",
"0.6797013",
"0.6797013",
"0.6797013",
"0.6797013",
"0.6797013",
"0.6797013",
"0.6797013",
"0.6797013"... | 0.67609775 | 40 |
Returns a list of selected songs (their song_ids) | def b9e_(YKHO):
cWlH = []
for d6pt in YKHO.ui.songs_view.selectionModel().selectedRows():
d6pt = YKHO.songs_proxy_model.mapToSource(d6pt)
tXZk = YKHO.songs_model.getRowSongID(d6pt.row())
cWlH.append(tXZk)
return cWlH | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eHbb(YKHO):\n\n def sXdp(bTKY):\n tKA0 = {}\n tKA0['uri'] = bTKY.get_playback_uri()\n tKA0['artist'] = YKHO.db.entry_get(bTKY, sO65.PROP_ARTIST)\n tKA0['title'] = YKHO.db.entry_get(bTKY, sO65.PROP_TITLE)\n return tKA0\n KZGB = FohR.Source.get_entry_view(YKHO.shell.props... | [
"0.74665064",
"0.7306777",
"0.7110436",
"0.6993142",
"0.69717604",
"0.69477224",
"0.6686897",
"0.6584939",
"0.6553779",
"0.64917326",
"0.64830816",
"0.64371604",
"0.63942045",
"0.63842005",
"0.63823944",
"0.6359435",
"0.635611",
"0.63519335",
"0.6318913",
"0.63169754",
"0.629... | 0.77127105 | 0 |
Append the given songbook to the currently open songbook. | def OKeb(YKHO, Ux0P):
YKHO.setWaitCursor()
try:
YKHO.clearUndoStack()
YKHO.ui.songs_view.selectionModel().clearSelection()
F3ZB = iHv3.connect(Ux0P)
sKhN = None
for rdlD in F3ZB.execute('SELECT number, title, subtitle, text, key_note_id, key_is_major FROM songs ORDER BY i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UH4i(YKHO):\n kXM2 = x5x0.QFileDialog.getOpenFileName(YKHO.win, 'Select a songbook to append', wDYU.QDir.home().path(), 'Songbook format (*.songbook)')\n if kXM2:\n YKHO.appendSongbookFile(kXM2)",
"def E4mv(YKHO, jI4j):\n YKHO.books.append(jI4j)",
"def E4mv(YKHO, jI4j):\n YKHO.books.appe... | [
"0.74903315",
"0.7283314",
"0.7283314",
"0.7154653",
"0.69310683",
"0.64270484",
"0.63643396",
"0.6324606",
"0.6310671",
"0.6263294",
"0.61854285",
"0.6169304",
"0.61622655",
"0.615539",
"0.61192775",
"0.6085656",
"0.60813415",
"0.6002391",
"0.60019314",
"0.59100795",
"0.5894... | 0.6670914 | 5 |
Check weather stock view table exists | def AdE8(YKHO, _IAY):
w2B8 = YKHO.db_engine.connect()
try:
mLGw = rLdf.read_sql("\n SELECT count(1) as num FROM pg_tables\n WHERE schemaname='{0}' and tablename='{1}'\n ".format(ibSR.SCHEMA_STOCK_VIEW_DATA, Dy8w.TABLE_TICK_STOCK_VIEW_PREFI... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PJaC(YKHO):\n Ylbp = VoXU('GET', YKHO.taburl, None)\n return True if Ylbp.status_code == 200 else False",
"def gZ17():\n NCls = iHv3.connect(pths)\n N1p7 = NCls.cursor()\n Aofo = N1p7.execute(\"select name from sqlite_master where type='table' and name=?;\", ('metri... | [
"0.6785855",
"0.66319615",
"0.65958995",
"0.6548",
"0.6508912",
"0.64909595",
"0.6453451",
"0.64195365",
"0.64095426",
"0.64017034",
"0.634623",
"0.6341777",
"0.6331345",
"0.63275945",
"0.63178086",
"0.6315768",
"0.63134676",
"0.6304206",
"0.62744224",
"0.6270524",
"0.6267016... | 0.7110341 | 0 |
Converts a target files item list to a partition set. The item list contains items that might look like 'SYSTEM/' or 'VENDOR/' or 'OTA/androidinfo.txt'. Items that end in '/' are assumed to match entire directories where 'SYSTEM' or 'VENDOR' is a directory name that identifies the contents of a partition of the same na... | def DBN0(xpKR):
yksW = set()
for ZfUD in xpKR:
for mXDZ in (Uevc, NxPA, zhaa):
_PGE = mXDZ.search(ZfUD.strip())
if _PGE:
Qrt_ = _PGE.group(1).lower()
if Qrt_ not in ('meta', 'images', 'prebuilt_images'):
yksW.add(Qrt_)
retur... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DBN0(xpKR):\n yksW = set()\n for ZfUD in xpKR:\n _PGE = Uevc.search(ZfUD.strip())\n cIfP = _PGE.group(1).lower() if _PGE else None\n if cIfP:\n yksW.add(cIfP)\n return yksW",
"def ywIS(xpKR):\n yksW = set()\n for ZfUD in xpKR:\n kUBT = GclN.search(ZfUD.st... | [
"0.7186704",
"0.7096164",
"0.53259474",
"0.52488315",
"0.5166154",
"0.5001079",
"0.49994895",
"0.49939364",
"0.4970993",
"0.49428585",
"0.49343428",
"0.49131277",
"0.48304388",
"0.48142907",
"0.47708043",
"0.4766675",
"0.4759004",
"0.4730424",
"0.47268742",
"0.47057492",
"0.4... | 0.80429065 | 0 |
Fetch the instance's zone. | def GpUZ():
try:
uDyx = Wcrw('computeMetadata/v1/instance/zone')
lhKE = ZbWC.search('/([^/]+)$', uDyx).groups()[0]
return {'zone': lhKE}
except hyvS:
return {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lhKE(YKHO):\n return YKHO._zone",
"def lhKE(YKHO):\n return YKHO._zone",
"def lgMt(YKHO, t788=True):\n lhKE = YKHO.fetch('zone')\n if lhKE is not None and t788:\n lhKE = lhKE.split('/')[-1]\n return lhKE",
"def lhKE(YKHO):\n return type(YKHO).importeur.salle.get_zone(YKHO._nom_zo... | [
"0.7732927",
"0.7732927",
"0.7606125",
"0.75205064",
"0.7454636",
"0.7358985",
"0.7310457",
"0.7310457",
"0.7310457",
"0.7310457",
"0.7310457",
"0.72907853",
"0.72907853",
"0.72571856",
"0.72352374",
"0.72352374",
"0.7219144",
"0.7219144",
"0.7177419",
"0.7167511",
"0.7100131... | 0.70507336 | 23 |
Init GameBoard Class with board and palace information. The board is a dict of lists. | def FIMM(YKHO):
YKHO._board = {WKvO: list(('__' for bGrB in range(10))) for WKvO in ('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i')}
YKHO._blue_palace = ['d10', 'e10', 'f10', 'd9', 'e9', 'f9', 'd8', 'e8', 'f8']
YKHO._red_palace = ['d1', 'e1', 'f1', 'd2', 'e2', 'f2', 'd3', 'e3', 'f3']
YKHO._blue_diag_palac... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, iBIi, BH3N):\n YKHO.input_board = iBIi\n if BH3N == aq04:\n YKHO.letter_values = Xb5n\n YKHO.bonus_tiles = NOrG\n YKHO.trie = fnnK\n elif BH3N == Wed7:\n YKHO.letter_values = kPy_\n YKHO.bonus_tiles = HVFx\n YKHO.trie = YR9Q\n else:\n rais... | [
"0.72349596",
"0.7141378",
"0.7118796",
"0.70422083",
"0.7032905",
"0.6994026",
"0.69913465",
"0.69908005",
"0.69804865",
"0.6971159",
"0.6960076",
"0.6959202",
"0.6918509",
"0.69052285",
"0.6881469",
"0.6879231",
"0.6872972",
"0.685052",
"0.6832509",
"0.68279344",
"0.6818012... | 0.7365629 | 0 |
Return list of all palace squares on the board. Palaces squares are string locations | def Gy8U(YKHO):
s6Lk = YKHO._red_palace + YKHO._blue_palace
return s6Lk | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Fmau():\n y4m8 = []\n for YRbF in range(0, 8):\n for r845 in range(0, 8):\n y4m8.append((YRbF, r845))\n return y4m8",
"def M5OM():\n return [(1, YRbF, r845) for YRbF in range(8) for r845 in range(8)]",
"def E0Vq(iBIi: List[List[int]]) -> x1iM[x1iM[x1iM[int]]]:\n d6pt = [(0,... | [
"0.6803357",
"0.6744111",
"0.6547523",
"0.63941014",
"0.6349163",
"0.63404596",
"0.6326876",
"0.6301972",
"0.63002545",
"0.6285786",
"0.6283905",
"0.62251747",
"0.61860394",
"0.618484",
"0.6174457",
"0.61295396",
"0.6107157",
"0.6079775",
"0.605718",
"0.6037243",
"0.601552",
... | 0.5877109 | 36 |
If the given team is in check, returns True, otherwise return False | def uOqR(YKHO, dZPi):
bi2n = YKHO.get_all_enemy_moves(dZPi)
if dZPi == 'blue' and YKHO._blue_general in bi2n:
return True
elif dZPi == 'red' and YKHO._red_general in bi2n:
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vSR4(YKHO):\n try:\n return c5ow.project_team is True\n except AttributeError:\n return False",
"def sJZf(YKHO, dZPi):\n if dZPi in YKHO.all_teams.keys():\n bo34.info(\"Team '%s' is valid\", dZPi)\n return True\n bo34.error(\"Team '%s' is not valid\", dZPi)\n return... | [
"0.74078953",
"0.74013835",
"0.72043425",
"0.71340895",
"0.70076334",
"0.6947773",
"0.6911125",
"0.6909025",
"0.6816438",
"0.6776545",
"0.6769029",
"0.66756934",
"0.66353786",
"0.6615418",
"0.6520505",
"0.65003186",
"0.6454615",
"0.6442869",
"0.643837",
"0.6417329",
"0.640631... | 0.8018073 | 0 |
If a given team is in checkmate, returns True, otherwise returns False | def HTyd(YKHO, dZPi):
for H5ew, BWXx in YKHO._janggi_board.get_board().items():
rdlD = 1
for Fyji in BWXx:
if Fyji != '__' and Fyji.get_team() == dZPi:
Rci7 = H5ew + str(rdlD)
oLdq = Fyji.valid_moves(Rci7, YKHO.get_janggi_board())
for BZN_ ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uOqR(YKHO, dZPi):\n bi2n = YKHO.get_all_enemy_moves(dZPi)\n if dZPi == 'blue' and YKHO._blue_general in bi2n:\n return True\n elif dZPi == 'red' and YKHO._red_general in bi2n:\n return True\n else:\n return False",
"def sibv(YKHO, dZPi):\n YKHO.undo_move()\n oLdq = YKHO... | [
"0.7659282",
"0.76222795",
"0.7173278",
"0.7023589",
"0.69201565",
"0.69090086",
"0.69081396",
"0.68707526",
"0.6777982",
"0.6753258",
"0.6749542",
"0.6635525",
"0.6635058",
"0.6600934",
"0.6518793",
"0.6468741",
"0.64656913",
"0.6464322",
"0.6439785",
"0.63529587",
"0.629875... | 0.7685175 | 0 |
Test that several temperatures are correct. | def N__I(Oa1e, a1PO):
assert ovGo(Oa1e) == a1PO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OAIL(YKHO):\n H6SK = XTiz.array([200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000])\n wRCy = XTiz.array([False, True, True, True, True, True, True, True, True, True], XTiz.bool)\n for Kt_s, deVW in zip(H6SK, wRCy):\n SH3v = YKHO.arrhenius.isTemperatureValid(Kt_s)\n YKHO.assertEqual... | [
"0.77845985",
"0.77845985",
"0.77623266",
"0.774638",
"0.774638",
"0.77288586",
"0.77124375",
"0.77124375",
"0.75922304",
"0.7357962",
"0.72400194",
"0.7126966",
"0.6964008",
"0.6926448",
"0.68415934",
"0.683462",
"0.6748953",
"0.67469406",
"0.67362356",
"0.6733351",
"0.67314... | 0.74102527 | 9 |
Assert that Numbers are tepid. | def Kpyp(Oa1e):
assert ry4R(Oa1e) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e9BK(YKHO):\n YKHO.assertTrue(YKHO.atom.number == YKHO.atom.element.number)",
"def ADDZ():\n assert nWni",
"def Jj_u():\n for UnuI in (12.6,):\n with Qg87.assert_raises(TypeError):\n L80n(UnuI)",
"def U2oH(YKHO):\n YKHO.assertEqual(ye72('1'), True)\n YKHO.assertEqual(ye72... | [
"0.71888167",
"0.66233915",
"0.6556842",
"0.6423898",
"0.64004385",
"0.6352806",
"0.635174",
"0.6339955",
"0.62519765",
"0.62118864",
"0.61768615",
"0.61464524",
"0.6112415",
"0.60865",
"0.60760075",
"0.60696495",
"0.60615236",
"0.60607153",
"0.6056092",
"0.6050915",
"0.60430... | 0.6054323 | 19 |
Return True iff the two newformmodell dicts have the same ell and the sam vector of ap mod ell. | def V5Oq(JDfe, QIB5):
return JDfe['ell'] == QIB5['ell'] and JDfe['ap'] == QIB5['ap'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n if not oyIN.array_equal(YKHO.unique_qnums, Elif.unique_qnums):\n return False\n if not oyIN.array_equal(YKHO.ind_labels, Elif.ind_labels):\n return False\n if len(YKHO.syms) != len(Elif.syms):\n return False\n for G1Hx in range(len(YKHO.syms)):\n if Y... | [
"0.6375751",
"0.6370889",
"0.63525695",
"0.6333152",
"0.6322722",
"0.6300431",
"0.6252063",
"0.62351984",
"0.6198945",
"0.6182593",
"0.617097",
"0.61526",
"0.6151939",
"0.6151471",
"0.614546",
"0.6141945",
"0.61286634",
"0.6100385",
"0.6099876",
"0.60899484",
"0.6066199",
"... | 0.5810137 | 68 |
If the "Stop" button is pressed (NOT the wizard's cancel button, which isn't shown on this page), cancel the installation task via its saved handle and disable the stop button. | def tJxO(YKHO, oD_N):
YKHO.task.cancel()
YKHO.btn_cancel_unpack.setEnabled(False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nGSE(YKHO):\n YKHO.sim_stop_flag = True",
"def EXMb(YKHO, oD_N):\n YKHO.progressRunning(False)\n YKHO.clean_close()",
"def StyX(YKHO):\n if YKHO.subwin_mainWidget.debugCheck.isChecked():\n YKHO.systemOutput.insertPlainText('Stopping Debug Mode\\n')\n else:\n YKHO.systemOutput.i... | [
"0.67467105",
"0.6679814",
"0.65299636",
"0.6497387",
"0.6447918",
"0.63900363",
"0.6355708",
"0.6320682",
"0.62189925",
"0.6213003",
"0.62037534",
"0.61750644",
"0.6144189",
"0.6120757",
"0.6120757",
"0.61187446",
"0.61092603",
"0.61035943",
"0.60769236",
"0.60587156",
"0.60... | 0.76712555 | 0 |
Creates hash from password Applies passlib context based on bcrypt algorithm on plain passoword. It takes about 0.3s for default 12 rounds of SECURITY_BCRYPT_DEFAULT_ROUNDS. | def kaVN(jTXt: str) -> str:
return YSi4.hash(jTXt) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def L0jR(jTXt, Y4bG):\n return B8ni.hashpw(jTXt, B8ni.gensalt(Y4bG))",
"def B8ni(jTXt: str):\n return psWq.hash(jTXt)",
"def B8ni(jTXt: str):\n return gLHo.hash(jTXt)",
"def B8ni(jTXt: str) -> str:\n return psWq.hash(jTXt)",
"def qzFd(jTXt):\n Y4bG = wk5E.config.get('BCRYPT_ROUNDS', 12)\n ... | [
"0.76416296",
"0.7474491",
"0.74344695",
"0.73548",
"0.72210425",
"0.7213521",
"0.7109228",
"0.7091273",
"0.70383835",
"0.6969672",
"0.6964525",
"0.69504136",
"0.69481254",
"0.69478744",
"0.69067574",
"0.68988556",
"0.68708676",
"0.6867498",
"0.68574715",
"0.6856867",
"0.6856... | 0.64132625 | 86 |
Add prescribed NPIs to the dict of prescriptions. | def KVMI(YKHO, IO8_, mbyn, TuoA, _VeM):
Wdeb, aGvo = (TuoA.split(' / ') + [oyIN.nan])[:2]
if aGvo == 'nan':
aGvo = oyIN.nan
IO8_['CountryName'].append(Wdeb)
IO8_['RegionName'].append(aGvo)
IO8_['Date'].append(mbyn)
for MAgO, fmxk in zip(kSHb, _VeM):
IO8_[MAgO].append(fmxk) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVMI(YKHO, IO8_, mbyn, TuoA, _VeM):\n Wdeb, aGvo = (TuoA.split(' / ') + [oyIN.nan])[:2]\n if aGvo == 'nan':\n aGvo = oyIN.nan\n IO8_['CountryName'].append(Wdeb)\n IO8_['RegionName'].append(aGvo)\n IO8_['Date'].append(mbyn)\n for MAgO, fmxk in zip(kSHb, _VeM):\n IO8_[MAgO].append... | [
"0.5969426",
"0.5755168",
"0.5663414",
"0.5485882",
"0.5387636",
"0.5381058",
"0.5271012",
"0.5248984",
"0.5248984",
"0.51682884",
"0.5111005",
"0.50867265",
"0.507827",
"0.5075101",
"0.50578004",
"0.49877572",
"0.49740374",
"0.49504492",
"0.49267292",
"0.49128914",
"0.491182... | 0.5951829 | 1 |
Add prescribed NPIs to the dict of prescriptions. | def kRpX(YKHO, IO8_, mbyn, TuoA, _VeM):
Wdeb, aGvo = (TuoA.split(' / ') + [oyIN.nan])[:2]
if aGvo == 'nan':
aGvo = oyIN.nan
IO8_['CountryName'].append(Wdeb)
IO8_['RegionName'].append(aGvo)
IO8_['Date'].append(mbyn)
for MAgO, fmxk in zip(kSHb, _VeM):
IO8_[MAgO].append(fmxk) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVMI(YKHO, IO8_, mbyn, TuoA, _VeM):\n Wdeb, aGvo = (TuoA.split(' / ') + [oyIN.nan])[:2]\n if aGvo == 'nan':\n aGvo = oyIN.nan\n IO8_['CountryName'].append(Wdeb)\n IO8_['RegionName'].append(aGvo)\n IO8_['Date'].append(mbyn)\n for MAgO, fmxk in zip(kSHb, _VeM):\n IO8_[MAgO].append... | [
"0.5969426",
"0.5951829",
"0.5663414",
"0.5485882",
"0.5387636",
"0.5381058",
"0.5271012",
"0.5248984",
"0.5248984",
"0.51682884",
"0.5111005",
"0.50867265",
"0.507827",
"0.5075101",
"0.50578004",
"0.49877572",
"0.49740374",
"0.49504492",
"0.49267292",
"0.49128914",
"0.491182... | 0.5755168 | 2 |
Computes the precision for the specified values of k | def vjyh(hlel, pan_, hz5a=(1,)):
Gq8e = max(hz5a)
Ep8u = pan_.size(0)
bGrB, nvEb = hlel.topk(Gq8e, 1, True, True)
nvEb = nvEb.t()
gXXc = nvEb.eq(pan_.view(1, -1).expand_as(nvEb))
Ylbp = []
for G1Hx in hz5a:
R2Dg = gXXc[:G1Hx].view(-1).float().sum(0)
Ylbp.append(R2Dg.mul_(100.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhd_(u5Ef, G1Hx):\n return len(u5Ef) / G1Hx",
"def sEak(Mkmy, G1Hx):\n assert G1Hx >= 1\n Mkmy = oyIN.asarray(Mkmy)[:G1Hx]\n return oyIN.mean(Mkmy)",
"def sEak(YKHO, G1Hx):\n fdMZ = YKHO.pred_rankings.rdd.map(lambda SjLr: (SjLr[2], SjLr[1]))\n Wbxz = rRQi(fdMZ)\n return Wbxz.precisionA... | [
"0.8003211",
"0.79748034",
"0.79735845",
"0.7941222",
"0.78642285",
"0.7803938",
"0.7707779",
"0.7621563",
"0.7593218",
"0.75612706",
"0.752028",
"0.7430132",
"0.74122673",
"0.7375894",
"0.7374447",
"0.7321427",
"0.7254542",
"0.7236769",
"0.72279894",
"0.7204469",
"0.7137302"... | 0.0 | -1 |
Ensure user can partially update their user object. | def Ni9D(YKHO):
nPrm = {'subscribed_to_id': []}
geh0 = YKHO.client.patch(path='/users/me/', data=nPrm, format='json')
YKHO.assertEqual(geh0.status_code, jGRS.HTTP_200_OK) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WNtt(YKHO):\n bD7m = gxEw('user-detail', kwargs={'pk': YKHO.user.pk})\n YKHO.client.force_authenticate(user=YKHO.user2)\n nPrm = {'first_name': 'Wayne', 'last_name': 'Gretzky'}\n geh0 = YKHO.client.patch(bD7m, data=nPrm)\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_404_NOT_FOUND)\n CBIr = m... | [
"0.68077135",
"0.6761562",
"0.67212874",
"0.66886646",
"0.66840714",
"0.6606357",
"0.65144414",
"0.6487628",
"0.6432463",
"0.64289623",
"0.64289623",
"0.64289623",
"0.6419971",
"0.6403452",
"0.6401993",
"0.6387179",
"0.6360965",
"0.62840116",
"0.6280362",
"0.62752116",
"0.627... | 0.6105771 | 32 |
Ensure that admin email addresses are not returned with a host if the user is not an admin of that host. | def pUsq(YKHO):
geh0 = YKHO.client.get(path='/hosts/2/')
YKHO.assertNotContains(response=geh0, text='admins') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def esq9(CBIr):\n if CBIr is not True:\n raise sUXu({'message': xsp2['not_allowed']})",
"def l4un(D3lj=None):\n if D3lj:\n ZrNc = Nc2H.objects(email=D3lj).first()\n if ZrNc and ZrNc.group == 'admin':\n return True\n else:\n dp9S = Nc2H.objects(group='admin'... | [
"0.64039403",
"0.6342128",
"0.63275",
"0.6221243",
"0.6212437",
"0.6167083",
"0.6167083",
"0.61463046",
"0.61024874",
"0.59852",
"0.59791696",
"0.59602004",
"0.5919367",
"0.5919367",
"0.5919367",
"0.5910435",
"0.5909849",
"0.58960223",
"0.58852494",
"0.58460116",
"0.5835272",... | 0.628867 | 3 |
Ensure user can update a host the user is admin of. | def IsIF(YKHO):
nPrm = {'name': 'Test Host 2', 'category_id': 1, 'admins_id': [1], 'open_to_id': [1]}
geh0 = YKHO.client.put(path='/hosts/1/', data=nPrm)
YKHO.assertEqual(geh0.status_code, jGRS.HTTP_200_OK) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sS8_(YKHO):\n nPrm = {'name': 'Test Host 2', 'category_id': 1, 'admins_id': [1], 'open_to_id': [1]}\n geh0 = YKHO.client.put(path='/hosts/2/', data=nPrm)\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_403_FORBIDDEN)",
"def l4un(CBIr):\n if not CBIr.is_admin:\n eTsH(403)",
"async def admi... | [
"0.7376326",
"0.6740623",
"0.66414386",
"0.66254526",
"0.657612",
"0.65694374",
"0.6472484",
"0.64681524",
"0.64681524",
"0.64681524",
"0.6316434",
"0.62584966",
"0.6217095",
"0.620572",
"0.6133693",
"0.61270964",
"0.61086154",
"0.6087156",
"0.6012581",
"0.59843105",
"0.59651... | 0.5551323 | 75 |
Ensure user cannot update a host the user is not an admin of. | def sS8_(YKHO):
nPrm = {'name': 'Test Host 2', 'category_id': 1, 'admins_id': [1], 'open_to_id': [1]}
geh0 = YKHO.client.put(path='/hosts/2/', data=nPrm)
YKHO.assertEqual(geh0.status_code, jGRS.HTTP_403_FORBIDDEN) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l4un(CBIr):\n if not CBIr.is_admin:\n eTsH(403)",
"def loyv():\n if not HLlu:\n jCFN('Host file is inaccessible!')\n exit(1)",
"def l4un():\n if not c5ow.username == 'admin':\n eTsH(403)",
"def esq9(CBIr):\n if CBIr is not True:\n raise sUXu({'message': xsp2... | [
"0.6854395",
"0.6690613",
"0.66489965",
"0.66000974",
"0.65428",
"0.65428",
"0.65428",
"0.6522927",
"0.6336129",
"0.63144827",
"0.61901414",
"0.61636114",
"0.6130492",
"0.6105806",
"0.609875",
"0.60813105",
"0.60687506",
"0.6044889",
"0.603899",
"0.60254544",
"0.59780675",
... | 0.71102285 | 0 |
Ensure user cannot update a host the user is not an admin of. | def moJv(YKHO):
nPrm = {'category_id': 1}
geh0 = YKHO.client.patch(path='/hosts/2/', data=nPrm)
YKHO.assertEqual(geh0.status_code, jGRS.HTTP_403_FORBIDDEN) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sS8_(YKHO):\n nPrm = {'name': 'Test Host 2', 'category_id': 1, 'admins_id': [1], 'open_to_id': [1]}\n geh0 = YKHO.client.put(path='/hosts/2/', data=nPrm)\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_403_FORBIDDEN)",
"def l4un(CBIr):\n if not CBIr.is_admin:\n eTsH(403)",
"def loyv():\n ... | [
"0.7109988",
"0.6855455",
"0.6690762",
"0.6650104",
"0.66009694",
"0.65437174",
"0.65437174",
"0.65437174",
"0.6524019",
"0.6336979",
"0.6314434",
"0.61904454",
"0.61638266",
"0.6131029",
"0.61047214",
"0.60991216",
"0.6082407",
"0.6068212",
"0.6045127",
"0.60400826",
"0.5977... | 0.60244936 | 20 |
Ensure user can update an event the user is an admin of. | def IsIF(YKHO):
nPrm = {'title': 'Test Host 2', 'category_id': 1, 'hosts_id': [1], 'open_to_id': [1]}
geh0 = YKHO.client.put(path='/events/1/', data=nPrm)
YKHO.assertEqual(geh0.status_code, jGRS.HTTP_200_OK) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def admin_required(CBIr: User=JHvC(c5ow)):\n if not CBIr.admin:\n raise lTSI(message='Operation not permitted')",
"def RJ9i(YKHO):\n YKHO.login(admin=False)\n bD7m = gxEw('bulletin:plugins:api:event-list')\n geh0 = YKHO.client.post(bD7m, YKHO.new_event_data, format='json')\n YKHO.asse... | [
"0.69173336",
"0.68214244",
"0.6819277",
"0.6804506",
"0.6643692",
"0.66405183",
"0.66405183",
"0.66405183",
"0.6623842",
"0.6540974",
"0.6530885",
"0.65275013",
"0.6433938",
"0.6403424",
"0.64000016",
"0.63636374",
"0.63539207",
"0.63397866",
"0.63397866",
"0.6322744",
"0.63... | 0.0 | -1 |
Ensure user cannot update an event the user is not an admin of. | def sS8_(YKHO):
nPrm = {'title': 'Test Host 2', 'category_id': 1, 'hosts_id': [1], 'open_to_id': [1]}
geh0 = YKHO.client.put(path='/events/2/', data=nPrm)
YKHO.assertEqual(geh0.status_code, jGRS.HTTP_403_FORBIDDEN) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RJ9i(YKHO):\n YKHO.login(admin=False)\n bD7m = gxEw('bulletin:plugins:api:event-list')\n geh0 = YKHO.client.post(bD7m, YKHO.new_event_data, format='json')\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_403_FORBIDDEN)",
"def l4un(CBIr):\n if not CBIr.is_admin:\n eTsH(403)",
"def esq9(C... | [
"0.66867036",
"0.6576728",
"0.6520692",
"0.6505445",
"0.6499175",
"0.6496201",
"0.6453755",
"0.639163",
"0.639163",
"0.639163",
"0.6341691",
"0.6306556",
"0.6251128",
"0.6193897",
"0.61869866",
"0.61723334",
"0.61546695",
"0.6112804",
"0.6096641",
"0.60850465",
"0.60785615",
... | 0.6318022 | 11 |
Ensure user can partially update an event the user is an admin of. | def Ni9D(YKHO):
nPrm = {'category_id': 1}
geh0 = YKHO.client.patch(path='/events/1/', data=nPrm)
YKHO.assertEqual(geh0.status_code, jGRS.HTTP_200_OK) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def admin_required(CBIr: User=JHvC(c5ow)):\n if not CBIr.admin:\n raise lTSI(message='Operation not permitted')",
"def RJ9i(YKHO):\n YKHO.login(admin=False)\n bD7m = gxEw('bulletin:plugins:api:event-list')\n geh0 = YKHO.client.post(bD7m, YKHO.new_event_data, format='json')\n YKHO.asse... | [
"0.66813487",
"0.6527646",
"0.6524475",
"0.6488005",
"0.6466208",
"0.6441727",
"0.641181",
"0.6390687",
"0.6312257",
"0.6311319",
"0.6302766",
"0.6288968",
"0.6288968",
"0.6288968",
"0.62518305",
"0.6232824",
"0.6232824",
"0.62327784",
"0.62027925",
"0.6148676",
"0.6143761",
... | 0.0 | -1 |
Ensure user cannot partially update an event the user is not an admin of. | def moJv(YKHO):
nPrm = {'category_id': 1}
geh0 = YKHO.client.patch(path='/events/2/', data=nPrm)
YKHO.assertEqual(geh0.status_code, jGRS.HTTP_403_FORBIDDEN) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RJ9i(YKHO):\n YKHO.login(admin=False)\n bD7m = gxEw('bulletin:plugins:api:event-list')\n geh0 = YKHO.client.post(bD7m, YKHO.new_event_data, format='json')\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_403_FORBIDDEN)",
"def CC_e(YKHO):\n S_7w().create([(u'otheruser', u'password', u'User', u'us... | [
"0.63501585",
"0.62714684",
"0.6256711",
"0.6250876",
"0.6249188",
"0.6233115",
"0.62058353",
"0.61238414",
"0.6087077",
"0.60567236",
"0.60567236",
"0.60567236",
"0.6042018",
"0.5984785",
"0.5981654",
"0.5967449",
"0.59439397",
"0.5941636",
"0.590472",
"0.58985126",
"0.58772... | 0.65457976 | 0 |
Ensure user cannot delete an event the user is not an admin of. | def CZ7V(YKHO):
geh0 = YKHO.client.delete(path='/events/2/')
YKHO.assertEqual(geh0.status_code, jGRS.HTTP_403_FORBIDDEN) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PBkL(YKHO):\n geh0 = YKHO.connect_admin_user_fixture()\n geh0 = YKHO.testapp.get('/tools/user/1/delete', status=302)\n vKnz = geh0.follow()\n YKHO.assertEqual(vKnz.status, '200 OK')\n YKHO.assertEqual(vKnz.request.path, '/')\n YKHO.assertTrue('Insufficient permissions!' in vKnz.body)",
"def... | [
"0.7107599",
"0.69056803",
"0.6834848",
"0.6663845",
"0.6645414",
"0.6629803",
"0.6625802",
"0.6603106",
"0.65483254",
"0.64531004",
"0.64347786",
"0.64347786",
"0.64347786",
"0.6413942",
"0.6402739",
"0.63840914",
"0.6377048",
"0.6320544",
"0.63130015",
"0.62951493",
"0.6235... | 0.76669747 | 0 |
Returns the string representation of the model | def gTzM(YKHO):
return CgYo.pformat(YKHO.to_dict()) | {
"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.8043786 | 29 |
Visual Subplot, adapted from Amir's code. Plots array of images in grid with shared axes. Very nice for zooming. | def XdCu(Yw_3, sxTv=None, OVXX=(None, None), fw23=0, k1TJ=None, Ew8X=False, gQuf=False):
if sxTv is None:
sxTv = (1, len(Yw_3))
LZpg, FgGO = QrM1.subplots(*sxTv, sharex='all', sharey='all', squeeze=False)
HN6s, co3n = sxTv
if fw23 == 1:
PsIy = lambda YRbF, r845: r845 * HN6s + YRbF
el... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YmgL(zXUK, JYga=10, usx6=1, HQcv=True, leAC=None):\n ZLJ_ = len(zXUK) // usx6\n LZpg = QrM1.figure(figsize=(JYga * ZLJ_, JYga))\n for YRbF in range(1, ZLJ_ * usx6 + 1):\n LZpg.add_subplot(usx6, ZLJ_, YRbF)\n QrM1.imshow(zXUK[YRbF - 1])\n if leAC is not None:\n QrM1.title(leAC)\... | [
"0.71799964",
"0.70165104",
"0.7012503",
"0.699967",
"0.69637233",
"0.6902878",
"0.68480366",
"0.67976826",
"0.67961174",
"0.676881",
"0.6761809",
"0.6757634",
"0.675006",
"0.6730446",
"0.6727658",
"0.67186284",
"0.67007715",
"0.6685723",
"0.66824156",
"0.6681192",
"0.6678558... | 0.64440125 | 56 |
Render a page for staff users to configure the application. | def wOGa(YKHO, QePW):
QpfX = YKHO.each_context(QePW)
if 'messages' in QePW.session:
QpfX['messages'] = QePW.session['messages']
del QePW.session['messages']
return _1tc(QePW, 'admin/configuration.html', QpfX) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IC8O():\n if cuiw.get('user'):\n return TvZl('homepage.html')\n else:\n return TvZl('login_create.html')",
"def nEo4():\n return TvZl('settings.html', title='Settings')",
"def SnL_():\n return TvZl('PersonalLandingPage.html')",
"def IC8O():\n return TvZl('index.html', survey=... | [
"0.6907273",
"0.6867563",
"0.68329275",
"0.6602536",
"0.6548992",
"0.6504931",
"0.6461717",
"0.6436649",
"0.64304423",
"0.6424195",
"0.6418514",
"0.64036137",
"0.6401796",
"0.63994175",
"0.63720894",
"0.6355735",
"0.6354916",
"0.63503003",
"0.6345292",
"0.6344911",
"0.6344750... | 0.0 | -1 |
Returns RE state if possible (RE is a RunEngine object), otherwise returns ``None``. | def Y_JJ(YKHO):
try:
QTBn = str(YKHO._RE.state)
except Exception:
QTBn = None
return QTBn | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oZj4(YKHO):\n if YKHO.recurr == 'RNN':\n return fhcK.SimpleRNN\n if YKHO.recurr == 'GRU':\n return fhcK.GRU\n if YKHO.recurr == 'LSTM':\n return fhcK.LSTM\n NmYP.print_err('Recurrent layer {} not valid'.format(YKHO.recurr))",
"def aB7b(YKHO):\n if YKHO.k_regularizer == 'L2... | [
"0.53770584",
"0.5321054",
"0.5314392",
"0.5297229",
"0.52955717",
"0.52910274",
"0.52754545",
"0.5234955",
"0.5194021",
"0.51647854",
"0.51533574",
"0.5103716",
"0.5097568",
"0.5097568",
"0.5094253",
"0.50860316",
"0.5054448",
"0.50432044",
"0.5023487",
"0.50024307",
"0.4998... | 0.6863783 | 0 |
Returns the state information of RE Worker environment. | def N6kq(YKHO):
HQgd = YKHO._running_plan_info['item_uid'] if YKHO._running_plan_info else None
fB4D = YKHO._running_task_uid
jFUY = YKHO._running_plan_exec_state == iSdO.COMPLETED
Y_JJ = YKHO.re_state
X6ws = YKHO.re_deferred_pause_requested
npw8 = YKHO._env_state.value
vQr4 = YKHO._re_repor... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k8jS(YKHO):\n return dict(factory=YKHO._worker_factory, agents=YKHO._agents, envs=YKHO._envs)",
"def QTBn(YKHO):\n return YKHO.gym_env.s",
"async def get_tool_state(YKHO):\n raise NotImplementedError",
"def ja6o(YKHO):\n YKHO.jmx_dict = YKHO.get_jmx_dict(YKHO.jmx_url)\n YKHO.state = YKHO._... | [
"0.75177824",
"0.69875413",
"0.69151455",
"0.6847263",
"0.6847263",
"0.68294555",
"0.681095",
"0.68032396",
"0.67488295",
"0.6711695",
"0.6708954",
"0.67000496",
"0.669117",
"0.66563696",
"0.6648547",
"0.663633",
"0.6631808",
"0.6600685",
"0.6599952",
"0.6599952",
"0.65844876... | 0.0 | -1 |
Attribute that returns the list of Review | def kSgn(YKHO):
q04w = []
HzE9 = FYrf.storage.all(E1cg)
for jogF in HzE9:
if YKHO.id == jogF.place_id:
q04w.append(jogF)
return q04w | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g6Dz(YKHO) -> x1iM[E1cg]:\n raise NotImplementedError",
"def g6Dz(YKHO):\n raise NotImplementedError",
"def kSgn(YKHO):\n return YKHO.xform_instance.reviews.all()",
"def kSgn(YKHO):\n from models import storage\n N0U_ = []\n for H5ew, BWXx in storage.all('Review').items():\n if B... | [
"0.79364926",
"0.7516077",
"0.7469114",
"0.73016316",
"0.72975224",
"0.72679067",
"0.7170115",
"0.71334434",
"0.7084149",
"0.70747083",
"0.7015121",
"0.70015496",
"0.6982908",
"0.69416803",
"0.6938195",
"0.68282413",
"0.6716333",
"0.65544176",
"0.6526761",
"0.6477455",
"0.641... | 0.7180558 | 6 |
Returns a list of field names provided by a selected schema | def V_D6(YKHO, uPxI):
uPxI = DZA_(uPxI)
YKHO.update_fields(uPxI)
return list(YKHO.field_name_to_id_cache[uPxI].keys()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nQuP(uPxI):\n return [' '.join([Jyyj['@name'], cTA5.get(Jyyj['@mysql_type'], Jyyj['@mysql_type']).upper()]) for Jyyj in uPxI.get('field_list').get('field')]",
"def zJN_(Emd4) -> x1iM[str]:\n return list(Emd4.schema().get('properties', {}).keys())",
"def tJ1d(YKHO) -> bdIy[str]:\n return qe4Y.get(Y... | [
"0.81853706",
"0.7509316",
"0.74912184",
"0.71717465",
"0.7040317",
"0.7006433",
"0.6969421",
"0.69556326",
"0.68483514",
"0.6845326",
"0.6839616",
"0.68337333",
"0.68129027",
"0.68109244",
"0.68087894",
"0.6704842",
"0.66997254",
"0.6676737",
"0.66755605",
"0.6651063",
"0.66... | 0.81869704 | 0 |
Returns an upper triangular matrix filled with ones | def pFJj(zNig):
ZHfW = 1 - ZylS.linalg.band_part(ZylS.ones((zNig, zNig)), -1, 0)
return ZHfW | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PSz7(YKHO):\n nrWA = oyIN.zeros((YKHO.N, YKHO.N))\n for YRbF in range(0, YKHO.N):\n for r845 in range(YRbF, YKHO.N):\n nrWA[YRbF, r845] = 1\n return nrWA.transpose()",
"def aAbl(YKHO):\n usx6 = YKHO.LU.Rows\n ZLJ_ = YKHO.LU.Columns\n EcVT = aLMY(usx6, ZLJ_)\n for YRbF i... | [
"0.707945",
"0.6693815",
"0.6549681",
"0.65420634",
"0.64046776",
"0.6403212",
"0.63706",
"0.6346417",
"0.63188684",
"0.63188004",
"0.63025445",
"0.626702",
"0.62616265",
"0.6253723",
"0.6253487",
"0.62469983",
"0.62397367",
"0.6224181",
"0.62207264",
"0.6207542",
"0.61841786... | 0.0 | -1 |
Calculate the attention weights. q, k, v must have matching leading dimensions. | def fUzg(vexM, G1Hx, Ty9i, ZHfW):
LwVP = ZylS.matmul(vexM, G1Hx.T)
WiZd = G1Hx.shape[-1]
_q8E = LwVP / oyIN.sqrt(WiZd)
if ZHfW is not None:
_q8E += ZHfW * -1000000000.0
print(_q8E)
HfyR = ZylS.nn.softmax(_q8E, axis=-1)
hlel = ZylS.matmul(HfyR, Ty9i)
return (hlel, HfyR) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VmjZ(YKHO, m5mS):\n aBeJ = []\n for YRbF in range(YKHO._n_net):\n aBeJ.append(YKHO._reward + YKHO._discount * (1 - YKHO._done) * ZylS.reduce_max(YKHO._target_qvals[YRbF], axis=1) - m5mS)\n PQwe = ZylS.stack(aBeJ)\n EAsV(PQwe, [YKHO._n_net, None])\n jbXL = ZylS.matmul(PQwe, PQwe, transpose... | [
"0.6793924",
"0.6731974",
"0.6661675",
"0.6621524",
"0.652192",
"0.64601576",
"0.6446517",
"0.6392448",
"0.63358504",
"0.6327063",
"0.6320031",
"0.6306086",
"0.6273978",
"0.6273059",
"0.6243442",
"0.61627555",
"0.61569816",
"0.6151146",
"0.6149039",
"0.6141579",
"0.61353016",... | 0.0 | -1 |
Truncates a string to max length | def WUms(vIwR, u54L=40):
return vIwR[:u54L] + (vIwR[u54L:] and '...') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CHEN(Xpp3, QI1n):\n if len(Xpp3) > QI1n:\n g9xt = len(Xpp3) - QI1n // 2\n AHER = Xpp3[:QI1n // 2]\n OoTz = Xpp3[g9xt:]\n Xpp3 = AHER + OoTz\n return Xpp3",
"def G34s(BWXx: Union[str, None, int], BcCR: int) -> uLKX[str, None, int]:\n LXG0 = BWXx\n if isinstance(LXG0, by... | [
"0.81916946",
"0.8151762",
"0.80856645",
"0.80557877",
"0.79640996",
"0.79603916",
"0.7953023",
"0.7953023",
"0.7908815",
"0.7816897",
"0.7804395",
"0.77799076",
"0.77772194",
"0.77689165",
"0.76674306",
"0.7645371",
"0.7641438",
"0.76407367",
"0.76308936",
"0.7629779",
"0.76... | 0.73224074 | 40 |
Returns the home page | def b8V_():
return TvZl('home.html', **i7V_) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vja_(YKHO) -> str:\n return qe4Y.get(YKHO, 'home_page')",
"def vja_(YKHO) -> str:\n return qe4Y.get(YKHO, 'home_page')",
"def kZiy():\n return TvZl('homepage.html')",
"def kZiy():\n return TvZl('home.html')",
"def C_QL():\n return TvZl('home.html')",
"def vja_(YKHO) -> str:\n return... | [
"0.8632775",
"0.8632775",
"0.85202545",
"0.8515081",
"0.84982216",
"0.8388289",
"0.8329791",
"0.8277516",
"0.8275518",
"0.8261093",
"0.8261093",
"0.82253236",
"0.8221162",
"0.8220123",
"0.82081",
"0.819825",
"0.8190719",
"0.81607926",
"0.8158344",
"0.8155354",
"0.8153568",
... | 0.0 | -1 |
Getter for the list of activities (i.e. all the activities that are in the repository) | def zn9O(YKHO):
return YKHO._activities_list | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nCrw(YKHO):\n zn9O = YKHO.__activity_repository.get_all_activities_list()\n return zn9O",
"def FnFi(YKHO):\n return YKHO._activities_list",
"def nZ2i(YKHO):\n return LeZt.Activity.objects.all().order_by('name')",
"def dCYV(YKHO):\n return [WKvO for WKvO in YKHO._objects.values() if isinsta... | [
"0.81183714",
"0.8084092",
"0.7987473",
"0.7785782",
"0.7780744",
"0.754502",
"0.73639333",
"0.7282961",
"0.7215632",
"0.69892263",
"0.6942736",
"0.6909443",
"0.6819736",
"0.6708958",
"0.66297156",
"0.6605843",
"0.65792984",
"0.6521011",
"0.64325976",
"0.6394784",
"0.63679814... | 0.841777 | 0 |
Setter for the list of activities. Raises ActivityRepositoryError if the supposed new list of activities is actually not a list, or if it does not contain activities. | def zn9O(YKHO, jDjL):
if isinstance(jDjL, list) is False:
raise jpQv('The list of activities was assigned an invalid data type!\n')
for BOKP in jDjL:
if isinstance(BOKP, nmsT) is False:
raise jpQv('The list does not contain activities!\n')
YKHO._activities_list = jDjL | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wlmD(YKHO, dCYV: List[Activity]) -> None:\n T9Qm('activities', dCYV, nmsT, can_be_none=False)\n YKHO.activities = dCYV",
"def zn9O(YKHO, jDjL):\n YKHO._activities_list = jDjL\n YKHO.__save_activities_from_memory_to_file()",
"def FIMM(YKHO, dCYV: list=None) -> None:\n YKHO.activities = dCYV",... | [
"0.78214407",
"0.69841343",
"0.6599634",
"0.616843",
"0.6040542",
"0.57894003",
"0.57495934",
"0.57456577",
"0.5676738",
"0.56720585",
"0.56388247",
"0.5611737",
"0.5559221",
"0.5514979",
"0.54875207",
"0.54278135",
"0.5419764",
"0.5360706",
"0.5324535",
"0.5324535",
"0.53074... | 0.7629899 | 1 |
Setter for the list of persons in the repository. Raises PersonRepositoryError if the new value of the list of persons is actually not a list or if the list does not contain objects of type Person. | def azSe(YKHO, uP4h):
if isinstance(uP4h, list) is False:
raise EghZ('The list of persons was assigned an invalid data type!\n')
for YiWX in uP4h:
if isinstance(YiWX, nj3W) is False:
raise EghZ('The list does not contain persons!\n')
YKHO._person_list = uP4h | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X259(YKHO, X259: List[str]):\n YKHO._persons = X259",
"def bZt5(YKHO):\n YKHO._person_list = [nj3W(100, 'Joshua Bates', '287967392'), nj3W(150, 'Dillon Mendez', '659892114'), nj3W(200, 'Amber Cotton', '367282906'), nj3W(350, 'Isabel Fox', '947285735'), nj3W(500, 'Evie Rogers', '59825723'), nj3W(700, 'J... | [
"0.706726",
"0.6706125",
"0.6322957",
"0.5745159",
"0.55628145",
"0.551422",
"0.54784006",
"0.5392494",
"0.5287434",
"0.5282104",
"0.52644426",
"0.525617",
"0.5174134",
"0.5093826",
"0.50818694",
"0.49663803",
"0.49540126",
"0.4919503",
"0.49176106",
"0.48630077",
"0.48621657... | 0.74743414 | 0 |
The activation function for a perceptron | def rpSA(YKHO, WKvO):
return oyIN.where(WKvO >= 0.0, 1, -1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ECMu(WKvO):\n return 1 / (1 + oyIN.exp(-WKvO))",
"def YDYE(WKvO):\n return 1 / (1 + ht2j.exp(-WKvO))",
"def YDYE(WKvO):\n return 1 / (1 + ht2j.exp(-WKvO))",
"def YDYE(WKvO):\n return 1 / (1 + ht2j.exp(-WKvO))",
"def YDYE(WKvO):\n return 1 / (1 + ht2j.exp(-WKvO))",
"def YDYE(YKHO, epBp)... | [
"0.76756966",
"0.76479787",
"0.7586743",
"0.7586743",
"0.75530326",
"0.74411666",
"0.7418095",
"0.7409417",
"0.72612745",
"0.7227222",
"0.7199519",
"0.71744525",
"0.7159036",
"0.71367794",
"0.71323264",
"0.7095685",
"0.7073148",
"0.7023617",
"0.70018846",
"0.6998286",
"0.6986... | 0.64294124 | 80 |