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 |
|---|---|---|---|---|---|---|
The detail view of a article with a pub_date in the past should display the article. | def k0MZ(YKHO):
Ye9w = GwRK(article_title='Past article.', days=-5)
geh0 = YKHO.client.get(gxEw('articles/index.html', args=(Ye9w.id,)))
YKHO.assertContains(geh0, Ye9w.article_title, status_code=200) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xZ1q(YKHO):\n GwRK(article_title='Past Articles.', days=-30)\n geh0 = YKHO.client.get(gxEw('articles/index.html'))\n YKHO.assertQuerysetEqual(geh0.context['latest_article_list'], ['<Article: Past article.>'])",
"def zwXu(YKHO):\n GwRK(article_title='Past article.', days=-30)\n GwRK(article_tit... | [
"0.6693326",
"0.64144677",
"0.63541436",
"0.6310394",
"0.6241575",
"0.62012994",
"0.61995757",
"0.6187577",
"0.61414725",
"0.60313517",
"0.59878474",
"0.5977478",
"0.5959588",
"0.5944961",
"0.5936584",
"0.5931593",
"0.5928938",
"0.5917766",
"0.5915265",
"0.5875562",
"0.583432... | 0.69241315 | 0 |
Creates an image from text | def JR_d(YKHO, l5Ny: str, D_Pw: str='silkscreen', KYa1='left'):
o9av = YKHO._get_font(D_Pw)
Nqlg = YKHO._get_lines(l5Ny, o9av)
Yw_3 = []
for zFiD in Nqlg:
zNig, (bGrB, EBA4) = o9av.font.getsize(zFiD)
oVhr = YKHO._get_text_position(zNig, KYa1)
oVhr['y'] -= EBA4
LNo8 = hnIv... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NkfZ(YKHO, l5Ny, taDc=None):\n YKHO.create_base_images()\n MZq3 = YKHO.format_input_text(l5Ny)\n G5mM = YKHO.define_text_format(MZq3)\n if taDc:\n G5mM.append(taDc)\n n9D4 = YKHO.define_y_position(G5mM)\n YKHO.insert_text_image(G5mM, n9D4)\n YKHO.created_image = hnIv.alpha_composite... | [
"0.77988845",
"0.7537105",
"0.7462812",
"0.73842424",
"0.7363591",
"0.7351986",
"0.73506576",
"0.73150337",
"0.7257267",
"0.7240194",
"0.72355443",
"0.7150783",
"0.70824665",
"0.70820194",
"0.7078266",
"0.70502025",
"0.7027616",
"0.69743425",
"0.6969807",
"0.6925885",
"0.6923... | 0.7272057 | 8 |
Test unsupported state machine cases | def t1og(YKHO):
YKHO.maxDiff = None
for Ol8d, JZXy, P1dF in YKHO.UNSUPPORTED_CASES:
with YKHO.subTest():
with YKHO.assertRaises(STYL, msg=Ol8d) as XObx:
G9jH.debug(qQXR.dumps(HfsV(JZXy)))
YKHO.assertIn(P1dF, str(XObx.exception), msg=Ol8d) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UpLv(YKHO):\n YKHO.assertRaises(ValueError, YKHO.monitor._toState, 'unknown')",
"def ZCuG(YKHO):\n YKHO.assertTrue(YKHO.fsm.isstate('green'))\n YKHO.assertTrue(YKHO.fsm.can('warn'))\n YKHO.assertFalse(YKHO.fsm.can('panic'))\n YKHO.assertTrue(YKHO.fsm.cannot('panic'))\n YKHO.assertFalse(YKHO... | [
"0.6997634",
"0.6873745",
"0.657548",
"0.65575475",
"0.6310989",
"0.63042575",
"0.62430423",
"0.6157906",
"0.61234015",
"0.6123119",
"0.6091753",
"0.6063109",
"0.60312355",
"0.6029152",
"0.60246515",
"0.6021045",
"0.5981219",
"0.59699804",
"0.59699804",
"0.5949356",
"0.594576... | 0.7581949 | 0 |
Check if apply_diagonal_inplace fails for nondiagonal Hamiltonians | def MXHg(lt9K):
uTbN = XTiz.random.rand(6, 6)
with trZe.raises(ValueError):
lt9K.apply_diagonal_inplace(uTbN) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GJGv(rIIa, lt9K):\n PZod.settings.use_accelerated_code = rIIa\n vDP4 = XTiz.ones(8, dtype=XTiz.complex128)\n bf9h = jth9.deepcopy(lt9K)\n print(bf9h.coeff)\n lt9K.apply_diagonal_inplace(vDP4)\n print(lt9K.coeff)\n assert XTiz.allclose(bf9h.coeff * 3.0, lt9K.coeff)\n bf9h = jth9.deepcopy... | [
"0.67365825",
"0.66578674",
"0.64607865",
"0.64535356",
"0.6390027",
"0.6344493",
"0.63032967",
"0.62714785",
"0.6253628",
"0.62479675",
"0.6243337",
"0.6229739",
"0.6229739",
"0.6229739",
"0.6218079",
"0.62116885",
"0.6208861",
"0.6177764",
"0.61034954",
"0.60722",
"0.606169... | 0.7156571 | 0 |
Check application of S^2 operator | def Tem4():
Q5yx = P7gA.FqeData(2, 1, 3)
Q5yx.set_wfn(strategy='ones')
Q5yx.apply_inplace_s2()
assert XTiz.allclose(Q5yx.coeff, XTiz.asarray([[0.75 + 0j, 0.75 + 0j, 1.75 + 0j], [0.75 + 0j, -0.25 + 0j, 0.75 + 0j], [1.75 + 0j, 0.75 + 0j, 0.75 + 0j]], dtype=XTiz.complex128)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QOe9(j93S, Nqp_):\n o4D3 = gnPz.applyPermutation(gnPz.ip, j93S)\n ajwV = gnPz.applyPermutation(gnPz.ip, Nqp_)\n Ylbp = [WKvO ^ LVAh for WKvO, LVAh in zip(o4D3, ajwV)]\n aevO = ''\n for khtY in Ylbp:\n aevO += '%02x' % khtY\n return aevO",
"def _uJw():\n exwG = wZLS('n', even=True)... | [
"0.6533221",
"0.63410944",
"0.63379604",
"0.6195158",
"0.6178264",
"0.6132191",
"0.60257626",
"0.6015095",
"0.59708333",
"0.59134567",
"0.58842087",
"0.5866595",
"0.5866595",
"0.5866595",
"0.5866595",
"0.5860933",
"0.58562213",
"0.58503735",
"0.5848568",
"0.5848568",
"0.58485... | 0.0 | -1 |
Tests a user can update his business to the system. | def ETFT(YKHO):
geh0 = YKHO.app.post('/api/business', data=qQXR.dumps(dict(business_name=' ', country='rwanda', userid=1)), content_type='application/json')
YKHO.assertEqual(geh0.status_code, 405)
_6Yp = qQXR.loads(geh0.data.decode('UTF-8'))
YKHO.assertIn('Cannot be blank', _6Yp['Message']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lDhF(YKHO):\n pass",
"def lDhF(YKHO):\n pass",
"def lDhF(YKHO):\n pass",
"def LIS_(YKHO):\n YKHO.client.login(username=Flx6, password=jZk6)\n bD7m = gxEw('usermanagement_edit', kwargs={'pk': '2'})\n geh0 = YKHO.client.get(bD7m)\n YKHO.assertContains(geh0, 'Ali-beth')\n YKHO.assert... | [
"0.79084826",
"0.79084826",
"0.79084826",
"0.76089185",
"0.7495785",
"0.74796164",
"0.74576706",
"0.7382335",
"0.73805296",
"0.7380435",
"0.72914326",
"0.7228891",
"0.7182364",
"0.7125393",
"0.71205753",
"0.7117871",
"0.7064911",
"0.706282",
"0.7053591",
"0.70485526",
"0.7024... | 0.0 | -1 |
Tests a user can update his business to the system. | def dUZs(YKHO):
YKHO.app.post('/api/business', data=qQXR.dumps(dict(userid=1, business_name='testbusiness_name', country='test_country')), content_type='application/json')
geh0 = YKHO.app.put('/api/businesses/1', data=qQXR.dumps(dict(business_name='testbusiness', country='rwanda', userid=1)), content_type='appl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lDhF(YKHO):\n pass",
"def lDhF(YKHO):\n pass",
"def lDhF(YKHO):\n pass",
"def LIS_(YKHO):\n YKHO.client.login(username=Flx6, password=jZk6)\n bD7m = gxEw('usermanagement_edit', kwargs={'pk': '2'})\n geh0 = YKHO.client.get(bD7m)\n YKHO.assertContains(geh0, 'Ali-beth')\n YKHO.assert... | [
"0.79084826",
"0.79084826",
"0.79084826",
"0.76089185",
"0.7495785",
"0.74796164",
"0.7382335",
"0.73805296",
"0.7380435",
"0.72914326",
"0.7228891",
"0.7182364",
"0.7125393",
"0.71205753",
"0.7117871",
"0.7064911",
"0.706282",
"0.7053591",
"0.70485526",
"0.70242584",
"0.7016... | 0.74576706 | 6 |
Tests a user can update his business to the system. | def K5Q1(YKHO):
geh0 = YKHO.app.put('/api/businesses/5', data=qQXR.dumps(dict(business_name='testbusiness', country='malawi', userid=5)), content_type='application/json')
YKHO.assertEqual(geh0.status_code, 404)
_6Yp = qQXR.loads(geh0.data.decode('UTF-8'))
YKHO.assertIn('no business record to update', _6... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lDhF(YKHO):\n pass",
"def lDhF(YKHO):\n pass",
"def lDhF(YKHO):\n pass",
"def LIS_(YKHO):\n YKHO.client.login(username=Flx6, password=jZk6)\n bD7m = gxEw('usermanagement_edit', kwargs={'pk': '2'})\n geh0 = YKHO.client.get(bD7m)\n YKHO.assertContains(geh0, 'Ali-beth')\n YKHO.assert... | [
"0.79084826",
"0.79084826",
"0.79084826",
"0.76089185",
"0.7495785",
"0.74796164",
"0.74576706",
"0.7382335",
"0.73805296",
"0.7380435",
"0.72914326",
"0.7228891",
"0.7182364",
"0.7125393",
"0.71205753",
"0.7117871",
"0.7064911",
"0.706282",
"0.7053591",
"0.70485526",
"0.7024... | 0.0 | -1 |
Tests a user can update his business to the system. | def XBZB(YKHO):
YKHO.app.post('/api/business', data=qQXR.dumps(dict(userid=1, business_name='testbusiness_name', country='test_country')), content_type='application/json')
geh0 = YKHO.app.get('/api/businesses/1', data=qQXR.dumps(dict(business_Id=1)), content_type='application/json')
YKHO.assertEqual(geh0.st... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lDhF(YKHO):\n pass",
"def lDhF(YKHO):\n pass",
"def lDhF(YKHO):\n pass",
"def LIS_(YKHO):\n YKHO.client.login(username=Flx6, password=jZk6)\n bD7m = gxEw('usermanagement_edit', kwargs={'pk': '2'})\n geh0 = YKHO.client.get(bD7m)\n YKHO.assertContains(geh0, 'Ali-beth')\n YKHO.assert... | [
"0.79084826",
"0.79084826",
"0.79084826",
"0.76089185",
"0.7495785",
"0.74796164",
"0.74576706",
"0.7382335",
"0.73805296",
"0.7380435",
"0.72914326",
"0.7228891",
"0.7182364",
"0.7125393",
"0.71205753",
"0.7117871",
"0.7064911",
"0.706282",
"0.7053591",
"0.70485526",
"0.7024... | 0.0 | -1 |
Tests a user can update his business to the system. | def AGCC(YKHO):
geh0 = YKHO.app.get('/api/businesses/10', data=qQXR.dumps(dict(business_Id=10)), content_type='application/json')
YKHO.assertEqual(geh0.status_code, 404)
_6Yp = qQXR.loads(geh0.data.decode('UTF-8'))
YKHO.assertIn('No business record found', _6Yp['Message']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lDhF(YKHO):\n pass",
"def lDhF(YKHO):\n pass",
"def lDhF(YKHO):\n pass",
"def LIS_(YKHO):\n YKHO.client.login(username=Flx6, password=jZk6)\n bD7m = gxEw('usermanagement_edit', kwargs={'pk': '2'})\n geh0 = YKHO.client.get(bD7m)\n YKHO.assertContains(geh0, 'Ali-beth')\n YKHO.assert... | [
"0.79084826",
"0.79084826",
"0.79084826",
"0.76089185",
"0.7495785",
"0.74796164",
"0.74576706",
"0.7382335",
"0.73805296",
"0.7380435",
"0.72914326",
"0.7228891",
"0.7182364",
"0.7125393",
"0.71205753",
"0.7117871",
"0.7064911",
"0.706282",
"0.7053591",
"0.70485526",
"0.7024... | 0.0 | -1 |
Tests a user can update his business to the system. | def HCnW(YKHO):
YKHO.app.post('/api/business', data=qQXR.dumps(dict(userid=1, business_name='testbusiness_name', country='test_country')), content_type='application/json')
geh0 = YKHO.app.delete('/api/businesses/1', data=qQXR.dumps(dict(business_Id=1)), content_type='application/json')
YKHO.assertEqual(geh0... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lDhF(YKHO):\n pass",
"def lDhF(YKHO):\n pass",
"def lDhF(YKHO):\n pass",
"def LIS_(YKHO):\n YKHO.client.login(username=Flx6, password=jZk6)\n bD7m = gxEw('usermanagement_edit', kwargs={'pk': '2'})\n geh0 = YKHO.client.get(bD7m)\n YKHO.assertContains(geh0, 'Ali-beth')\n YKHO.assert... | [
"0.79084826",
"0.79084826",
"0.79084826",
"0.76089185",
"0.7495785",
"0.74796164",
"0.74576706",
"0.7382335",
"0.73805296",
"0.7380435",
"0.72914326",
"0.7228891",
"0.7182364",
"0.7125393",
"0.71205753",
"0.7117871",
"0.7064911",
"0.706282",
"0.7053591",
"0.70485526",
"0.7024... | 0.0 | -1 |
Tests a user can update his business to the system. | def ljd2(YKHO):
geh0 = YKHO.app.delete('/api/businesses/15', data=qQXR.dumps(dict(business_Id=15)), content_type='application/json')
YKHO.assertEqual(geh0.status_code, 404)
_6Yp = qQXR.loads(geh0.data.decode('UTF-8'))
YKHO.assertIn('No business record found to remove', _6Yp['Message']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lDhF(YKHO):\n pass",
"def lDhF(YKHO):\n pass",
"def lDhF(YKHO):\n pass",
"def LIS_(YKHO):\n YKHO.client.login(username=Flx6, password=jZk6)\n bD7m = gxEw('usermanagement_edit', kwargs={'pk': '2'})\n geh0 = YKHO.client.get(bD7m)\n YKHO.assertContains(geh0, 'Ali-beth')\n YKHO.assert... | [
"0.79084826",
"0.79084826",
"0.79084826",
"0.76089185",
"0.7495785",
"0.74796164",
"0.74576706",
"0.7382335",
"0.73805296",
"0.7380435",
"0.72914326",
"0.7228891",
"0.7182364",
"0.7125393",
"0.71205753",
"0.7117871",
"0.7064911",
"0.706282",
"0.7053591",
"0.70485526",
"0.7024... | 0.0 | -1 |
Apply "is not equal" operation to a query field. | def eezM(xDcj, Jyyj, BWXx):
return xDcj.filter(Jyyj != BWXx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def D46g(YKHO, filter, x7JD):\n return filter.field + '!=' + x7JD[0]",
"def KebS(YKHO, BWXx) -> 'SearchQueryBuilder':\n YKHO.__items.add('NOT {}'.format(Cizj(BWXx)))\n return YKHO",
"def Z5r3(YKHO, Jyyj, lsX7):\n return not YKHO.compareBase(field=Jyyj, expression=lsX7, func=ZbWC.search)",
"def xj... | [
"0.7266688",
"0.69586813",
"0.691986",
"0.6848532",
"0.67921317",
"0.6765354",
"0.67619425",
"0.6746161",
"0.66881484",
"0.66726625",
"0.66726625",
"0.6597014",
"0.6578994",
"0.6553075",
"0.65293527",
"0.65293527",
"0.65231323",
"0.64846504",
"0.6459723",
"0.6432155",
"0.6425... | 0.8453638 | 0 |
The name of the output channel. | def YwkQ(YKHO) -> str:
return YKHO._data[GDa9.CHANNEL_KEY] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R5yJ(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'channel_name')",
"def mWFP(YKHO, YwkQ):\n return None",
"def R5yJ(YKHO) -> str:\n return YKHO._values.get('channel_name')",
"def R5yJ(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'channel_name')",
"def R5yJ(YKHO) -> qe4Y.In... | [
"0.8301295",
"0.80421007",
"0.7817034",
"0.76872724",
"0.76872724",
"0.76108664",
"0.758092",
"0.7536203",
"0.75047046",
"0.745306",
"0.73826224",
"0.72891176",
"0.72523314",
"0.72523314",
"0.7224498",
"0.6975989",
"0.6975989",
"0.69611233",
"0.69554025",
"0.6845919",
"0.6774... | 0.73124176 | 11 |
Compute the sharpness of the image as the standard deviation of the image. | def cxQG(LNo8):
return 1.0 / oyIN.std(LNo8) / ((oyIN.max(LNo8) - oyIN.min(LNo8)) / 2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IJH7(LNo8):\n qw7D = oyIN.asarray(LNo8, dtype=oyIN.int32)\n oDSd, b0rV = oyIN.gradient(qw7D)\n edma = oyIN.sqrt(b0rV ** 2 + oDSd ** 2)\n IJH7 = oyIN.average(edma)\n return IJH7",
"def IJH7(C3ST, rNYq):\n JBMS, LwKx = C3ST(rNYq.state, rNYq.action)\n NXpY = ht2j.diagonal(LwKx, dim1=-1, dim... | [
"0.73969465",
"0.7062422",
"0.69245154",
"0.67787015",
"0.6702064",
"0.6582487",
"0.6578476",
"0.656855",
"0.6441183",
"0.64128554",
"0.6399833",
"0.63819754",
"0.6319192",
"0.63172114",
"0.6306072",
"0.6264204",
"0.62517893",
"0.62286586",
"0.62033254",
"0.61994547",
"0.6180... | 0.6785592 | 3 |
Compute the sharpness as sum of sobel detected edge intensities. | def xfUS(LNo8):
o0ZM = Zxt2.ndimage.filters.sobel(LNo8, axis=0, mode='constant')
BhJz = Zxt2.ndimage.filters.sobel(LNo8, axis=1, mode='constant')
return oyIN.sum(oyIN.hypot(o0ZM, BhJz)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qvfg(LNo8):\n cwXX = XC5k.Sobel(LNo8, ddepth=XC5k.CV_64F, dx=1, dy=0, ksize=3, scale=1, delta=0)\n LcQ_ = XC5k.Sobel(LNo8, ddepth=XC5k.CV_64F, dx=0, dy=1, ksize=3, scale=1, delta=0)\n RIDU = XC5k.norm(cwXX)\n _8qN = XC5k.norm(LcQ_)\n sum = RIDU * RIDU + _8qN * _8qN\n Aofo = sum / LNo8.size\n ... | [
"0.73177207",
"0.68042046",
"0.67678267",
"0.66978616",
"0.6452985",
"0.6363239",
"0.63545054",
"0.63247484",
"0.62853765",
"0.6269659",
"0.62350017",
"0.614249",
"0.6133627",
"0.6105889",
"0.60489374",
"0.6040176",
"0.6033617",
"0.60169166",
"0.6008661",
"0.59852016",
"0.597... | 0.57530177 | 34 |
Compute the sharpness as sum of absolute gradient intensities. | def lNa6(LNo8):
Csk6 = oyIN.roll(LNo8, -1, axis=1)
return oyIN.sum(oyIN.abs(LNo8[:, :-1] - Csk6[:, :-1])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IJH7(LNo8):\n qw7D = oyIN.asarray(LNo8, dtype=oyIN.int32)\n oDSd, b0rV = oyIN.gradient(qw7D)\n edma = oyIN.sqrt(b0rV ** 2 + oDSd ** 2)\n IJH7 = oyIN.average(edma)\n return IJH7",
"def WEsz(VXjJ, **B2fa):\n if VXjJ is None:\n return [-1] * 5\n cKXd = jUwU(VXjJ, (9, 9))\n IZ6w = ... | [
"0.765291",
"0.7273162",
"0.6794351",
"0.66215956",
"0.65487593",
"0.6287617",
"0.6099074",
"0.6099074",
"0.5968591",
"0.5942199",
"0.5917849",
"0.5853038",
"0.579256",
"0.5754896",
"0.57042634",
"0.5696635",
"0.5635443",
"0.56320316",
"0.5567183",
"0.5566079",
"0.5566079",
... | 0.6576017 | 4 |
Compute the sharpness as sum of squared gradient intensities. | def Ld49(LNo8):
Csk6 = oyIN.roll(LNo8, -1, axis=1)
Mkmy = LNo8[:, :-1] - Csk6[:, :-1]
return oyIN.sum(Mkmy * Mkmy) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IJH7(LNo8):\n qw7D = oyIN.asarray(LNo8, dtype=oyIN.int32)\n oDSd, b0rV = oyIN.gradient(qw7D)\n edma = oyIN.sqrt(b0rV ** 2 + oDSd ** 2)\n IJH7 = oyIN.average(edma)\n return IJH7",
"def WEsz(VXjJ, **B2fa):\n if VXjJ is None:\n return [-1] * 5\n cKXd = jUwU(VXjJ, (9, 9))\n IZ6w = ... | [
"0.73124444",
"0.6876769",
"0.66888946",
"0.665562",
"0.6514096",
"0.6247392",
"0.623737",
"0.6161295",
"0.59749955",
"0.5974865",
"0.5900536",
"0.5889357",
"0.58345145",
"0.5820016",
"0.578767",
"0.57746726",
"0.5769871",
"0.57368684",
"0.5686956",
"0.5686368",
"0.56749207",... | 0.66064835 | 4 |
Checks if the collection is flat | def iXwL(QxcP, **B2fa):
bo34 = G9jH.getLogger('ipublish')
_Fei = QxcP['irods'].get_config(B2fa)
bo34.debug(_Fei)
H5ew = {'irods_zone': aoDI(_Fei), 'irods_collection': _Fei['irods_collection']}
nPrm = QxcP['cache'].read(H5ew)
nPrm = nPrm.get('irods_data', [])
if len(nPrm) != 1 or nPrm[0]['pat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nukR(YKHO):\n return len(YKHO.subnodes) == 0",
"def JiBx(YKHO):\n return YKHO.flattener is not None",
"def g7cR(YKHO):\n return len(YKHO.store.collections()) > 0",
"def tfp8(YKHO):\n n5sN = wxcl([[1, 2, 3], [4, 5]])\n YKHO.assertEqual(n5sN, [1, 2, 3, 4, 5])",
"def nukR(YKHO):\n for eD... | [
"0.7136756",
"0.67912185",
"0.65833354",
"0.6357589",
"0.6348326",
"0.6345076",
"0.60263777",
"0.60069644",
"0.5984005",
"0.59097254",
"0.58525723",
"0.58471113",
"0.5810459",
"0.57928514",
"0.57848865",
"0.5784255",
"0.57798576",
"0.5754914",
"0.5746215",
"0.5734601",
"0.569... | 0.61298394 | 6 |
Gets the user's spending amounts for each category and stores them in a dictionary | def w2bP(BaHi):
yRiB = {'housing': None, 'utilities': None, 'food': None, 'transportation': None, 'entertainment': None, 'personal': None}
EAcx = {'housing': '(rent, mortgage, etc)', 'utilities': '(cell phone, internet, etc)', 'food': '(groceries, restaurants, etc)', 'transportation': '(gas, public transit, etc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ao3P(YKHO):\n J_Es = GXnK.parse('sales-data.xml')\n tk5Y = J_Es.getroot()\n U5bT = {}\n for RsIL in tk5Y.findall('./person'):\n H5ew = RsIL.find('category').text\n if not H5ew in U5bT:\n U5bT[H5ew] = float(RsIL.find('amount').text)\n else:\n U5bT[H5ew] += ... | [
"0.64923733",
"0.6277904",
"0.62690175",
"0.61842775",
"0.60181695",
"0.5947739",
"0.58103424",
"0.57051456",
"0.5690489",
"0.56500214",
"0.56489456",
"0.5633819",
"0.5604601",
"0.55920666",
"0.55905217",
"0.55751467",
"0.5565464",
"0.5559566",
"0.5543577",
"0.55244875",
"0.5... | 0.53573763 | 38 |
Asks the user to choose how much they want to adjust the budget and gets their choice. | def SJiL(BaHi):
print('How much savings do you want for this new budget?')
print('1 = Conservative, 2 = Moderate, 3 = Intense')
ITS7.sleep(1)
U2D9 = input('Please enter the number that best corresponds to how much you want me to adjust the budget: ')
while COhz(U2D9) == False:
print("I'm sor... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y9X7():\n P1dF = False\n while True:\n yPVe()\n print(\"What's your budget?\")\n if P1dF:\n print(\"Sorry I didn't understand. Please enter a number greater than 0.\")\n P1dF = False\n else:\n print('')\n Ir2T = input()\n if Ir2T.... | [
"0.6824457",
"0.6696959",
"0.66299516",
"0.659686",
"0.6553531",
"0.65380526",
"0.62126917",
"0.620325",
"0.61619633",
"0.6152538",
"0.61251867",
"0.61120355",
"0.60908085",
"0.6087463",
"0.6067431",
"0.6058673",
"0.60558045",
"0.605067",
"0.6030948",
"0.6026604",
"0.60060495... | 0.0 | -1 |
Checks to see if user's ranking list contains all the categories. | def Xzlj(ONtf):
zQ4k = ['housing', 'utilities', 'food', 'transportation', 'entertainment', 'personal']
if set(ONtf) == set(zQ4k):
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zFwK(YKHO):\n return YKHO.categories_for_event().count() > 0",
"def XT3F():\n assert eHNT.are_all_categories_listed(['housing', 'utilities', 'food', 'transportation', 'entertainment', 'personal']) == True\n assert eHNT.are_all_categories_listed(['utilities', 'personal', 'entertainment', 'transportat... | [
"0.636865",
"0.6253223",
"0.6082747",
"0.57384753",
"0.5643803",
"0.5604761",
"0.55900836",
"0.5531224",
"0.55101407",
"0.54998696",
"0.5485056",
"0.5459443",
"0.54522544",
"0.544929",
"0.544469",
"0.54422307",
"0.54333866",
"0.54113865",
"0.5408705",
"0.54017967",
"0.5393001... | 0.81106734 | 0 |
Utilzies the user's rankings, savings intensity choice, and current spending amts to create a new budget. | def q9Z_(tTAp, y3ms, yRiB):
Hba8 = [0.0, 0.05, 0.05, 0.1, 0.15, 0.2]
atpt = [0.0, 0.05, 0.1, 0.15, 0.25, 0.35]
ilJt = [0.0, 0.1, 0.2, 0.3, 0.4, 0.5]
cXL6 = {'1': Hba8, '2': atpt, '3': ilJt}
Ojt1 = cXL6[y3ms]
_Ss4 = []
for YRbF in range(len(Ojt1)):
fcnK = Ojt1[YRbF]
qo2T = tTA... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rAR_():\n iPnC = ['housing', 'transportation', 'personal', 'entertainment', 'food', 'utilities']\n yRiB = {'housing': '450.50', 'transportation': '750.00', 'personal': '134.56', 'entertainment': '100.10', 'food': '310.00', 'utilities': '211.11'}\n t1wM = '1'\n P7yH = [450.5, 712.5, 127.83, 90.09, 2... | [
"0.63227457",
"0.6308912",
"0.62647593",
"0.6105768",
"0.6013936",
"0.59848624",
"0.5959369",
"0.59324175",
"0.5911779",
"0.58955085",
"0.5782972",
"0.5714623",
"0.56981534",
"0.56967616",
"0.56256473",
"0.55873764",
"0.55421877",
"0.55249876",
"0.551739",
"0.5510818",
"0.550... | 0.69645983 | 0 |
Generate Random Strings of variable length | def E_k4(zNig=6, gLiZ=vIwR.ascii_uppercase + vIwR.digits):
return ''.join((tuKI.choice(gLiZ) for WKvO in range(zNig))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a2Ud(u54L=10):\n SuXy = vIwR.ascii_letters + vIwR.digits\n dEzN = ''.join((tuKI.choice(SuXy) for YRbF in range(u54L)))\n return dEzN",
"def YzjY(YKHO, u54L):\n zZas = vIwR.ascii_uppercase + vIwR.digits\n return ''.join(tuKI.sample(zZas, u54L))",
"def eQ3c(u54L):\n KCHu = [vC9B for vC9B in... | [
"0.8397863",
"0.8303284",
"0.8287621",
"0.8275001",
"0.81506485",
"0.8142324",
"0.81001675",
"0.80901015",
"0.8057802",
"0.80443907",
"0.80338615",
"0.8024005",
"0.80071753",
"0.7992077",
"0.79898566",
"0.79843044",
"0.79816157",
"0.79786026",
"0.79735255",
"0.7960239",
"0.79... | 0.78622824 | 34 |
Add a scalar summary for every tensor in a collection. | def SIhl(mWFP, rrBf):
xUwc = ZylS.get_collection(mWFP, rrBf)
for WKvO in xUwc:
ZylS.summary.scalar(rInL.tensor_name(WKvO), WKvO)
return xUwc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ol3k(YKHO, QxIo, g760=None):\n YKHO._summary_list.append(QxIo)\n if not YKHO._no_add_to_collections:\n g760 = YKHO._collections if g760 is None else tuple(g760)\n for Z9rn in g760:\n ZylS.add_to_collection(Z9rn, QxIo)\n return QxIo",
"def BxUN(TZ9E, hAEw):\n TZ9E = gr2I(T... | [
"0.6645748",
"0.65162224",
"0.64471126",
"0.6431542",
"0.6431542",
"0.6431542",
"0.6431542",
"0.6431542",
"0.6431542",
"0.6347266",
"0.63458747",
"0.63422173",
"0.62661105",
"0.6256684",
"0.62206995",
"0.62206995",
"0.6213428",
"0.61981386",
"0.6194695",
"0.6151775",
"0.61304... | 0.7116627 | 0 |
Finds factors of n suitable for image montage. | def MFHL(exwG):
for YRbF in range(int(PZyS(float(exwG))), 0, -1):
if exwG % YRbF == 0:
return (YRbF, int(exwG / YRbF)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Llmz(exwG):\n return (G1Hx for G1Hx, Ty9i in S2wa(exwG))",
"def KZyX(exwG):\n if exwG == 1:\n return 1\n UHFx = 0\n qoqK = int(exwG ** 0.5) + 1\n for YRbF in range(1, qoqK):\n if exwG % YRbF == 0:\n UHFx += 2\n return UHFx",
"def MAdn(exwG):\n yWhq = {1, exwG}\... | [
"0.83740515",
"0.814618",
"0.8106456",
"0.79349583",
"0.79305303",
"0.7920732",
"0.7912615",
"0.7912615",
"0.78708446",
"0.7847422",
"0.780558",
"0.77924746",
"0.7772454",
"0.7765651",
"0.7758976",
"0.7742196",
"0.7737436",
"0.77308106",
"0.772471",
"0.77038115",
"0.77004963"... | 0.755734 | 44 |
Returns True if the tile data is equal in tile_data_1 and tile_data_2. For most formats, this is a simple bytewise equality check. For zipped metatiles, we need to check the contents, as the zip format includes metadata such as timestamps and doesn't control file ordering. | def ICCn(QH7S, o4PG, FMLJ):
if FMLJ and FMLJ == Pqln:
return IEZX(QH7S, o4PG)
else:
return QH7S == o4PG | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IEZX(QH7S, o4PG):\n try:\n CYNQ = kJm3.StringIO(QH7S)\n Iuu5 = kJm3.StringIO(o4PG)\n with AvK2.ZipFile(CYNQ, mode='r') as rz0x:\n with AvK2.ZipFile(Iuu5, mode='r') as sXNl:\n return LJqv(rz0x, sXNl)\n except (oyw0, AvK2.BadZipFile, AvK2.LargeZipFile):\n ... | [
"0.8693623",
"0.7264002",
"0.704998",
"0.697319",
"0.65612745",
"0.6556312",
"0.6508111",
"0.63352704",
"0.63325924",
"0.6316338",
"0.63029736",
"0.62731755",
"0.6181138",
"0.6156961",
"0.6142287",
"0.6131269",
"0.61267364",
"0.61214757",
"0.6112907",
"0.60887766",
"0.6074943... | 0.84802157 | 1 |
Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix inorder arguments and keyword arguments. | def FIMM(YKHO, *qIxc, **c_sp):
if qIxc or c_sp:
super(klHy, YKHO).__init__(*qIxc, **c_sp)
if YKHO.laserpkt is None:
YKHO.laserpkt = tgYm.msg.LaserPacket()
if YKHO.imupkt is None:
YKHO.imupkt = [tgYm.msg.ImuPacket() for bGrB in range(12)]
if YKHO.gpspkt is None... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, Ol8d=None):\n if Ol8d is not None:\n YKHO.message = Ol8d",
"def FIMM(YKHO, Ol8d=None):\n YKHO.message = Ol8d",
"def FIMM(YKHO, Ol8d=None):\n YKHO.message = Ol8d",
"def FIMM(YKHO, Ol8d=None):\n super().__init__()\n YKHO.message = Ol8d",
"def FIMM(YKHO, *qIxc, **c_sp):\n ... | [
"0.8166562",
"0.77207243",
"0.77207243",
"0.76532763",
"0.75729614",
"0.75445384",
"0.74859685",
"0.74710035",
"0.7457984",
"0.7446914",
"0.7446092",
"0.74336267",
"0.7415086",
"0.7408329",
"0.7391827",
"0.7375837",
"0.7363319",
"0.7325938",
"0.732446",
"0.732446",
"0.732446"... | 0.67581505 | 99 |
Create a deck of 108 Uno cards. Return a list of UnoCard namedtuples (for cards w/o suit use None in the namedtuple) | def ltUN():
khoC = []
for iCfd in TW5D:
mjat(khoC.append, iCfd)
for BWXx in 'Wild,Wild Draw Four'.split(',') * 4:
khoC.append(GoEc(None, BWXx))
return khoC | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JJor():\n return [(iCfd, BWXx) for iCfd in ('heart', 'diamond', 'spade', 'club') for BWXx in range(1, 14)]",
"def g6JR(YKHO):\n nf_0 = []\n for iCfd in ['clubs', 'spades', 'hearts', 'diamonds']:\n for mLGw in range(1, 14):\n nf_0.append(F1Hz(mLGw, iCfd))\n return nf_0",
"def J... | [
"0.744285",
"0.7296481",
"0.722413",
"0.7166133",
"0.71484935",
"0.71361685",
"0.71003336",
"0.7070832",
"0.7068857",
"0.70211565",
"0.7008253",
"0.6930574",
"0.68957317",
"0.689418",
"0.6887968",
"0.6809207",
"0.6806489",
"0.677039",
"0.6753195",
"0.67049307",
"0.6692108",
... | 0.77354974 | 0 |
Gets the no. of routes without backtracking for an xXy grid. | def i6X4(WKvO, LVAh):
UHFx = 0
global counts
for YRbF in range(WKvO - 1, -1, -1):
for r845 in range(LVAh - 1, -1, -1):
UHFx = 0
AU8u = (YRbF, r845)
BWz1[AU8u] = n3BY(YRbF, r845, WKvO, LVAh, UHFx)
return n3BY(0, 0, WKvO, LVAh, UHFx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kVv1(Cs6h, rdlD, fvDH):\n if rdlD == usx6 - 1 and fvDH == WfCS - 1:\n return 1\n elif Cs6h[rdlD][fvDH] == AacT:\n return 0\n else:\n Mkmy = Z9rn = 0\n if rdlD < usx6 - 1:\n Mkmy = kVv1(Cs6h, rdlD + 1, fvDH)\n if fvDH < WfCS - 1:\n Z9rn = kVv1(Cs... | [
"0.66767824",
"0.6467212",
"0.6445761",
"0.63824344",
"0.6335407",
"0.62334883",
"0.6218656",
"0.621647",
"0.6202881",
"0.6187494",
"0.6135404",
"0.6126696",
"0.6101485",
"0.6095492",
"0.60914457",
"0.6073359",
"0.60515577",
"0.60435843",
"0.6040713",
"0.603646",
"0.60261667"... | 0.6581291 | 1 |
Gets the 1st day of that month and year. | def EavE(lO87, x0eS, YEgp):
bfKH = [1, 2, 4, 6, 8, 9, 11]
B0R_ = [5, 7, 10, 12]
if x0eS in bfKH:
rmrb = YEgp + 3
' if month == 4 or month == 6 or month == 9 or month == 11:\n\tnextDay = lastMD + 3'
if x0eS in B0R_:
rmrb = YEgp + 2
if x0eS == 3:
if lO87 % 4 == 0:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PPvI(Csk6: date) -> _c1T:\n return _c1T(year=Csk6.year, month=Csk6.month, day=1)",
"def PPvI(wEf2):\n return _c1T(wEf2.year, wEf2.month, 1)",
"def dghw(YKHO, lO87, x0eS, CjKC=1):\n LVAh = lO87\n r8hN = x0eS\n Csk6 = CjKC\n nxyw = LVAh - (14 - r8hN) / 12\n WKvO = nxyw + nxyw / 4 - nxyw ... | [
"0.78694445",
"0.7785127",
"0.7580929",
"0.7208753",
"0.7157894",
"0.6938497",
"0.6860314",
"0.67092603",
"0.6621163",
"0.65894175",
"0.6585346",
"0.6585236",
"0.6569088",
"0.65391356",
"0.6492578",
"0.64742076",
"0.64690495",
"0.643502",
"0.6353228",
"0.63480103",
"0.6329170... | 0.0 | -1 |
Get a string representation of the model object | def zAg0(YKHO):
Ylbp = ''
for hkS8, BWXx in YKHO.__dict__.iteritems():
if type(hkS8) is tFgz or type(hkS8) is M9Gz or type(hkS8) is Bme3 or (type(hkS8) is Pjxn):
Ylbp += ' %s=%s \n' % (hkS8, BWXx)
return Ylbp | {
"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 str(YKHO.obj)",
"def zAg0(YKHO):\n return YKHO.object_repr",
"def zAg0(YKHO) -> str:\n return lSJJ(YKHO)",
"def zAg0(YKHO):\n return str(YKHO.__dict__)",
"def zAg0(YKHO):... | [
"0.8378169",
"0.81546104",
"0.79704875",
"0.78869075",
"0.78227794",
"0.7702102",
"0.7702102",
"0.7702102",
"0.76962966",
"0.76604307",
"0.76302457",
"0.76302457",
"0.7607977",
"0.75940907",
"0.75940907",
"0.7565086",
"0.75478786",
"0.75478786",
"0.75478786",
"0.7530702",
"0.... | 0.7192416 | 92 |
Remove all road between two road nodes | def HphX(YKHO, pu_z: str, HHsV: str):
U5bT = []
ckRy = YKHO.bfs_paths(pu_z, HHsV)
for pmON in ckRy:
for IZ2i, Q6kx in enumerate(pmON[:-1], 1):
akzC = YKHO.remove_road(XFKR(Q6kx, pmON[IZ2i]))
U5bT += akzC
return U5bT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Eik1(YKHO, i4Va, rUTj):\n pass",
"def JrYp(YKHO, n0tA, THyE):\n HMUk, vjJT = n0tA\n TNF5, HWOi = THyE\n YKHO._graph.pop(frozenset({(HMUk, vjJT), (TNF5, HWOi)}))",
"def FTr5(i4Va: _BaseNode, rUTj: _BaseNode) -> None:\n pass",
"def XWCm(YKHO, FJhS, Yk_P):\n Yn8Y.safe_dict_delete(YKHO.chil... | [
"0.6837341",
"0.68035984",
"0.6796648",
"0.6745629",
"0.6744889",
"0.65653616",
"0.64453053",
"0.64386046",
"0.64319223",
"0.6430646",
"0.6430373",
"0.6385628",
"0.63745797",
"0.6367459",
"0.6320827",
"0.627321",
"0.6257582",
"0.624466",
"0.62256986",
"0.61999387",
"0.6197517... | 0.72706723 | 0 |
Normalize a dense adjacency matrix as `A < D^(1/2) (A+epsI) D^(1/2)`, in which `D` is computed from `A+epsI` For sparse version, check the following `normalize_sparse_adj_matrix()`. | def T7v7(k0lF, SGf8=1.0):
KV9e = k0lF.shape[0]
k0lF = k0lF + SGf8 * oyIN.eye(KV9e)
ykHV = k0lF.sum(axis=0)
ZHfW = ykHV == 0
ykHV[ZHfW] = oyIN.inf
RxlS = 1.0 / oyIN.sqrt(ykHV)
if isinstance(RxlS, oyIN.matrix):
RxlS = oyIN.asarray(RxlS).squeeze()
RxlS = oyIN.diag(RxlS)
k0lF = o... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def De9t(eQUr: torch.Tensor) -> ht2j.Tensor:\n uy8I = ht2j.triu(eQUr, diagonal=1) + ht2j.triu(eQUr, diagonal=1).T\n uy8I.data[ht2j.arange(eQUr.shape[0]), ht2j.arange(eQUr.shape[0])] = 1\n mghH = ht2j.diag(ht2j.pow(uy8I.sum(axis=1), -1 / 2))\n uy8I = mghH @ uy8I @ mghH\n return uy8I",
"def ujN0(eQU... | [
"0.7843574",
"0.7805326",
"0.7642241",
"0.76379234",
"0.76333326",
"0.76299995",
"0.7624129",
"0.7609854",
"0.7599718",
"0.7599718",
"0.7551097",
"0.7505179",
"0.7505179",
"0.7505179",
"0.7505179",
"0.7505179",
"0.7505179",
"0.7505179",
"0.7505179",
"0.7505179",
"0.7505179",
... | 0.8413937 | 0 |
Normalize a sparse adjacency matrix as `A < D^(1/2) (A+epsI) D^(1/2)`, in which `D` is computed from `A+epsI` For dense version, check the above `normalize_dense_adj_matrix()`. | def fflc(vfqZ, d3QA, KV9e=None, SGf8=1.0, wYGh=False):
if KV9e is None:
KV9e = vfqZ.max() - vfqZ.min() + 1
k0lF = Zi12.coo_matrix((d3QA, (vfqZ[0, :], vfqZ[1, :])), shape=(KV9e, KV9e)).tocsr()
k0lF = k0lF + SGf8 * Zi12.eye(KV9e, format='csr')
ykHV = k0lF.sum(axis=0)
ZHfW = ykHV == 0
ykHV[... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T7v7(k0lF, SGf8=1.0):\n KV9e = k0lF.shape[0]\n k0lF = k0lF + SGf8 * oyIN.eye(KV9e)\n ykHV = k0lF.sum(axis=0)\n ZHfW = ykHV == 0\n ykHV[ZHfW] = oyIN.inf\n RxlS = 1.0 / oyIN.sqrt(ykHV)\n if isinstance(RxlS, oyIN.matrix):\n RxlS = oyIN.asarray(RxlS).squeeze()\n RxlS = oyIN.diag(RxlS... | [
"0.8338227",
"0.7764521",
"0.7724574",
"0.7659721",
"0.7609011",
"0.7602799",
"0.7583265",
"0.75168604",
"0.75168604",
"0.75168604",
"0.75168604",
"0.75168604",
"0.75168604",
"0.75168604",
"0.75168604",
"0.75168604",
"0.75168604",
"0.75168604",
"0.75168604",
"0.75168604",
"0.... | 0.7825821 | 1 |
Loads the data from the file path as a pandas dataframe without further processing. | def UlWi(qaEx):
return rLdf.read_csv(qaEx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UlWi(pmON: str) -> rLdf.DataFrame:\n if pmON is None:\n return None\n else:\n return rLdf.read_csv(pmON)",
"def UlWi(i0XC: str) -> rLdf.DataFrame:\n nPrm = rLdf.read_csv(i0XC)\n assert isinstance(nPrm, rLdf.DataFrame)\n return nPrm",
"def Jr46(WJHQ):\n Fst3 = eHWi(WJHQ).lowe... | [
"0.82504916",
"0.79340225",
"0.7882434",
"0.7864641",
"0.7780879",
"0.7724929",
"0.77009946",
"0.76503444",
"0.76080567",
"0.75755966",
"0.75509995",
"0.7547192",
"0.75401235",
"0.753862",
"0.7494282",
"0.7465569",
"0.74312943",
"0.7423695",
"0.74000776",
"0.7395257",
"0.7387... | 0.8020262 | 1 |
Get parent path of current file. | def O79t():
return Hy7s.path.abspath(Hy7s.path.dirname(xAKo)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def slOJ(YKHO):\n return GkAb(Hy7s.path.split(YKHO.get_absolute())[0])",
"def _AKB(YKHO) -> str:\n return Hy7s.path.dirname(YKHO.filename)",
"def PAwq(YKHO):\n return Hy7s.path.split(YKHO.get_absolute())[0]",
"def _AKB(YKHO, pmON):\n return Hy7s.path.dirname(pmON)",
"def Xn8b(YKHO):\n return... | [
"0.85900116",
"0.8483412",
"0.83682334",
"0.83554053",
"0.83409226",
"0.8229664",
"0.81142086",
"0.808672",
"0.80113024",
"0.76796603",
"0.75907177",
"0.7573825",
"0.75197166",
"0.75191003",
"0.75029564",
"0.74112564",
"0.74112564",
"0.73969644",
"0.73759824",
"0.7344341",
"0... | 0.6945693 | 41 |
Get parent path of current file. | def psZw():
return Hy7s.path.abspath(Hy7s.path.join(Hy7s.path.dirname(xAKo), Hy7s.path.pardir)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def slOJ(YKHO):\n return GkAb(Hy7s.path.split(YKHO.get_absolute())[0])",
"def _AKB(YKHO) -> str:\n return Hy7s.path.dirname(YKHO.filename)",
"def PAwq(YKHO):\n return Hy7s.path.split(YKHO.get_absolute())[0]",
"def _AKB(YKHO, pmON):\n return Hy7s.path.dirname(pmON)",
"def Xn8b(YKHO):\n return... | [
"0.8589278",
"0.8482355",
"0.8367003",
"0.83543664",
"0.83404297",
"0.8228598",
"0.811321",
"0.808528",
"0.7679351",
"0.7590791",
"0.75731766",
"0.75198174",
"0.7517547",
"0.7501786",
"0.7408774",
"0.7408774",
"0.73964703",
"0.7375109",
"0.7342932",
"0.7329579",
"0.72763926",... | 0.8010637 | 8 |
Wrapper function, takes the string to pad as argument. | def h3Xc(vIwR: str) -> str:
if XSoh == 'left':
return ' ' * dvgN + vIwR
elif XSoh == 'right':
return vIwR + dvgN * ' '
else:
return ' ' * dvgN + vIwR + ' ' * dvgN | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zt95(vIwR):\n return vIwR.ljust(512)",
"def zt95(Y0Fj, Pb4f, dvgN, WKvO):\n if WKvO is None:\n WKvO = ' '\n hlel = Y0Fj\n dvgN = dvgN - len(Y0Fj)\n if dvgN > 0:\n hlel = hlel + WKvO * dvgN\n else:\n hlel = hlel + WKvO\n hlel = hlel + Pb4f\n return hlel",
"def Qx... | [
"0.8057432",
"0.7727097",
"0.7726769",
"0.77212346",
"0.76774377",
"0.75967336",
"0.7563473",
"0.7541386",
"0.7536822",
"0.748931",
"0.7473478",
"0.74410874",
"0.74252254",
"0.7386986",
"0.7378402",
"0.73709583",
"0.7343487",
"0.733163",
"0.73072803",
"0.72949976",
"0.7283708... | 0.0 | -1 |
Definition for singlylinked list. | def FIMM(YKHO, wEf2=0, next=None):
YKHO.val = wEf2
YKHO.next = next | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, nPrm=None):\n YKHO.__list = RRVT(nPrm)",
"def FIMM(YKHO):\n YKHO.head = uxdU()\n YKHO.head.next = YKHO.head\n YKHO.head.prev = YKHO.head\n YKHO.current = None",
"def sdCG(YKHO) -> Msxl:\n raise NotImplementedError",
"def FIMM(YKHO):\n YKHO.head = Msxl()",
"def FIMM(YKHO)... | [
"0.68798375",
"0.68603957",
"0.67666966",
"0.6660002",
"0.66408193",
"0.66330016",
"0.66204596",
"0.6561625",
"0.6553764",
"0.65498126",
"0.6544352",
"0.6544352",
"0.6544352",
"0.6544352",
"0.65329224",
"0.6532529",
"0.6532529",
"0.65309966",
"0.65309966",
"0.65309966",
"0.65... | 0.0 | -1 |
Merge two sorted linked lists. | def QQg8(YKHO, jtyf, V70B):
HkCf = J3uN = Msxl()
while jtyf and V70B:
if jtyf.val <= V70B.val:
J3uN.next, jtyf = (jtyf, jtyf.next)
else:
J3uN.next, V70B = (V70B, V70B.next)
J3uN = J3uN.next
J3uN.next = jtyf or V70B
return HkCf.next | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mAzL(Emd4, jzdc, Fg_i):\n Aofo = _sfu()\n while jzdc.head and Fg_i.head:\n if jzdc.head.value < Fg_i.head.value:\n Aofo.move_node(jzdc)\n else:\n Aofo.move_node(Fg_i)\n while jzdc.head:\n Aofo.move_node(jzdc)\n while Fg_i.head:\n Aofo.move_node(Fg_i... | [
"0.8263646",
"0.8103567",
"0.7938172",
"0.792939",
"0.7913998",
"0.79123783",
"0.7885323",
"0.7863714",
"0.7749493",
"0.7651764",
"0.75899094",
"0.75873876",
"0.7549193",
"0.7527367",
"0.74944615",
"0.74685806",
"0.74622244",
"0.7445363",
"0.74380946",
"0.74123836",
"0.739277... | 0.74751437 | 15 |
Render website's home page. | def kZiy():
return TvZl('home.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kZiy():\n return TvZl('homepage.html')",
"def C_QL():\n return TvZl('home.html')",
"def C_QL():\n return TvZl('homepage.html')",
"def kZiy():\n return TvZl('homepage.html')",
"def kZiy():\n return TvZl('homepage.html')",
"def kZiy():\n return TvZl('home.html')",
"def C_QL():\n ... | [
"0.8819581",
"0.87503684",
"0.8623934",
"0.8596466",
"0.8596466",
"0.8571988",
"0.8557671",
"0.8557671",
"0.85497755",
"0.85256004",
"0.8489358",
"0.8483156",
"0.8475702",
"0.8474153",
"0.84737927",
"0.84619766",
"0.8438196",
"0.8428517",
"0.8418825",
"0.8418701",
"0.83995277... | 0.0 | -1 |
Testing the successful creation of a recipe with a tag | def pMQ4(YKHO):
R9U6 = eo18(user=YKHO.user, name='Sweet')
GTT9 = eo18(user=YKHO.user, name='Dessert')
pB3N = {'title': 'Chocolate cake', 'tags': [R9U6.id, GTT9.id], 'time_minutes': 20, 'price': 10}
Ylbp = YKHO.client.post(tQ6t, pB3N)
YSCM = LC16.objects.get(id=Ylbp.data['id'])
dJ1p = YSCM.tags.a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xsEp(YKHO):\n R9U6 = eo18(user=YKHO.user, name='Tag 1')\n GTT9 = eo18(user=YKHO.user, name='Tag 2')\n pB3N = {'title': 'Test recipe with two tags', 'tags': [R9U6.id, GTT9.id], 'time_minutes': 30, 'price': 10.0}\n Ylbp = YKHO.client.post(tQ6t, pB3N)\n YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_... | [
"0.81335413",
"0.8053168",
"0.80439407",
"0.8029995",
"0.80137837",
"0.8011887",
"0.7991178",
"0.79824173",
"0.7978664",
"0.7966629",
"0.79565775",
"0.7951313",
"0.79483396",
"0.793613",
"0.7926539",
"0.792269",
"0.7771043",
"0.7574011",
"0.7510418",
"0.74418825",
"0.7373446"... | 0.82740927 | 0 |
Testing the successful creation of a recipe with a tag | def WlbR(YKHO):
KZtG = wm3X(user=YKHO.user, name='Rice')
ciPx = wm3X(user=YKHO.user, name='Salt')
pB3N = {'title': 'Rice with chicken', 'time_minutes': 30, 'price': 2, 'ingredients': [KZtG.id, ciPx.id]}
Ylbp = YKHO.client.post(tQ6t, pB3N)
YSCM = LC16.objects.get(id=Ylbp.data['id'])
zKHR = YSCM.i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pMQ4(YKHO):\n R9U6 = eo18(user=YKHO.user, name='Sweet')\n GTT9 = eo18(user=YKHO.user, name='Dessert')\n pB3N = {'title': 'Chocolate cake', 'tags': [R9U6.id, GTT9.id], 'time_minutes': 20, 'price': 10}\n Ylbp = YKHO.client.post(tQ6t, pB3N)\n YSCM = LC16.objects.get(id=Ylbp.data['id'])\n dJ1p = ... | [
"0.8274595",
"0.81342477",
"0.8054019",
"0.80446",
"0.8030598",
"0.801447",
"0.801246",
"0.7991829",
"0.7983052",
"0.79789925",
"0.79672647",
"0.79571795",
"0.79519933",
"0.7949064",
"0.79367316",
"0.79272795",
"0.79233414",
"0.77715504",
"0.7574635",
"0.75122035",
"0.7441678... | 0.63636875 | 95 |
Load an image dataset as NumPy arrays. | def tyeH(mC1D, r63W, hXNa=True, yokr=None, xQgD='uint8', MZAh='uint32'):
if len(r63W) == 0:
raise ValueError('At least one set name is required.')
LUcm = [bvDQ(Hy7s.path.join(mC1D, WZrJ)) for WZrJ in r63W]
for YRbF in range(1, len(LUcm)):
if LUcm[YRbF] != LUcm[0]:
raise RuntimeEr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rSAI(YKHO, IznC):\n with open(IznC, 'rb') as eHNT:\n XgyP = eHNT.read(16)\n nPrm = oyIN.fromfile(eHNT, dtype=oyIN.int8)\n return nPrm",
"def xUK7(YKHO):\n import numpy\n VXjJ = YKHO.load_pil()\n return numpy.ndarray((VXjJ.size[1], VXjJ.size[0], 3), 'B', VXjJ.tostring())",
"def ... | [
"0.76654303",
"0.71832824",
"0.7175685",
"0.71698767",
"0.70637244",
"0.6969245",
"0.6928644",
"0.6922014",
"0.6909758",
"0.68956715",
"0.68947524",
"0.68947524",
"0.68947524",
"0.68947524",
"0.68791336",
"0.68791336",
"0.6869529",
"0.6854045",
"0.684745",
"0.6833928",
"0.683... | 0.0 | -1 |
Create a new instance of the ListAlerts Choreo. A TembooSession object, containing a valid set of Temboo credentials, must be supplied. | def FIMM(YKHO, VwzT):
super(DL9W, YKHO).__init__(VwzT, '/Library/PagerDuty/Alerts/ListAlerts') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def buNo(YKHO):\n HhvO = None\n Mkmy = None\n try:\n Mkmy = G4JS.get(NKsR.ALERT_URL)\n except G4JS.exceptions.RequestException:\n raise RuntimeError('Error while connecting to ' + NKsR.ALERT_URL)\n if not Mkmy.status_code == G4JS.codes.ok:\n raise RuntimeError('Bad response from... | [
"0.6161478",
"0.61472726",
"0.5740926",
"0.558929",
"0.55127555",
"0.55064565",
"0.54969114",
"0.5400421",
"0.53465164",
"0.52994853",
"0.5284164",
"0.52552587",
"0.51979005",
"0.5184248",
"0.5138971",
"0.5118746",
"0.5072515",
"0.5031267",
"0.5005023",
"0.49962932",
"0.49352... | 0.53919995 | 8 |
Retrieve the value for the "Response" output from this Choreo execution. ((json) The response from PagerDuty.) | def _O3m(YKHO):
return YKHO._output.get('Response', None) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def geh0(YKHO) -> GySg[str, str]:\n return qe4Y.get(YKHO, 'response')",
"def EbXM(YKHO):\n return YKHO._response",
"def geh0(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'response')",
"def geh0(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'response')",
"def geh0(YKHO) -> h8nf[qe4Y.Input[str]]:\n ... | [
"0.74454564",
"0.7394807",
"0.73355323",
"0.73355323",
"0.7278684",
"0.7246779",
"0.71971285",
"0.71971285",
"0.7183787",
"0.7181452",
"0.713776",
"0.70669085",
"0.70669085",
"0.69252574",
"0.69252574",
"0.6920986",
"0.6783062",
"0.6737738",
"0.6720047",
"0.6665109",
"0.66518... | 0.83464265 | 1 |
finds path to templates directory | def zi6X():
for tk5Y, AQSv, RRlC in Hy7s.walk('.'):
if 'templates' in tk5Y:
return tk5Y | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IE2W(pmON):\n return Hy7s.path.join(pmON, 'templates')",
"def uddY():\n VZuY = Hy7s.path.dirname(Hy7s.path.realpath(HwRy.argv[0]))\n DqlU = Hy7s.path.join(VZuY, 'templates')\n return DqlU",
"def eZd9(YKHO):\n return YKHO._build_path('templates')",
"def iXnC(YKHO) -> GkAb:\n return GkAb(... | [
"0.8244616",
"0.8183625",
"0.81454176",
"0.8133994",
"0.80329204",
"0.7938259",
"0.7923899",
"0.79066",
"0.7812078",
"0.77414674",
"0.7690031",
"0.7638605",
"0.7625576",
"0.7569353",
"0.74641794",
"0.7435547",
"0.7435547",
"0.73835",
"0.7290086",
"0.7269763",
"0.72537845",
... | 0.81513345 | 2 |
Return the CPU temp as a float | def LJii():
Aofo = Hy7s.popen('vcgencmd measure_temp').readline()
return float(Aofo.replace('temp=', '').replace("'C\n", '')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eHHr():\n X0yN = 'unknown'\n with open('/sys/class/thermal/thermal_zone0/temp', 'r') as MZf5:\n X0yN = float(MZf5.read()) / 1000.0\n return X0yN",
"def eHHr():\n X0yN = 'unknown'\n with open('/sys/class/thermal/thermal_zone0/temp', 'r') as MZf5:\n X0yN = float(MZf5.read()) / 1000... | [
"0.7970044",
"0.7970044",
"0.78814584",
"0.7807327",
"0.7805978",
"0.77754575",
"0.7758266",
"0.7738567",
"0.7680877",
"0.7668126",
"0.76301944",
"0.7610894",
"0.76004547",
"0.7566676",
"0.7500146",
"0.7434765",
"0.7398451",
"0.73946905",
"0.7374097",
"0.7345095",
"0.7303901"... | 0.8205006 | 0 |
Changes a string value to a boolean | def NHHh(w2Td):
return bool(w2Td in ['True', 'true', 'Yes', 'yes', 'Y', 'y']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bool(vIwR):\n if vIwR == 'True':\n return True\n if vIwR == 'False':\n return False\n raise ValueError('invalid boolean input value')",
"def oOc6(BWXx):\n BWXx = BWXx.lower()\n if BWXx in ('yes', 'true', 't', '1'):\n return True\n if BWXx in ('no', 'false', 'f', '0'):\n... | [
"0.8202825",
"0.7983462",
"0.7889872",
"0.78770334",
"0.78683025",
"0.7865276",
"0.78392255",
"0.7825885",
"0.7822262",
"0.78193545",
"0.78174174",
"0.7807791",
"0.78070205",
"0.7784011",
"0.7760462",
"0.7759489",
"0.77344066",
"0.7732416",
"0.7732354",
"0.77303755",
"0.77228... | 0.0 | -1 |
Sets the temperature every 5 seconds | def _K63(tuD8, a1qd):
try:
while True:
ovGo = tuD8.get_temperature()
X0yN = LJii()
ovGo = int(ovGo - (X0yN - ovGo) / 5.466)
a1qd.value = ovGo
ITS7.sleep(10)
except KeyboardInterrupt:
print('cancelled') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HUOc(YKHO):\n with YKHO.lock:\n YKHO.checksweep()\n if not YKHO.sweep_running:\n YKHO.ITC.setTemperature(YKHO.set_temperature)\n else:\n YKHO.setSweep(YKHO.set_temperature, YKHO.sweep_ramp)\n YKHO.ITC.SweepStart()\n YKHO.ITC.getValue(0)",
"d... | [
"0.70743364",
"0.70111275",
"0.6813868",
"0.6808085",
"0.67925745",
"0.6717397",
"0.6688878",
"0.6673985",
"0.6649829",
"0.6605653",
"0.6592379",
"0.65826035",
"0.6574137",
"0.6542863",
"0.65381217",
"0.6479186",
"0.64458823",
"0.6435004",
"0.64305013",
"0.64267385",
"0.64210... | 0.0 | -1 |
Get list of all inputparameters of eventhandler | def PPbR(YKHO):
tvqc = YTVa.getEvents(YKHO.event)
if YKHO.position < 2:
return tvqc.parameters
elif YKHO.position == '':
if len(tvqc.getHandlers()) > 0:
ql1v = tvqc.getHandlers()[-1]
return ql1v.getParameterList() + tvqc.parameters
else:
return []
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TY_v(m0IA):\n aadv = tq_1.signature(m0IA)\n SGPK = aadv.parameters\n TjuQ = list(SGPK)\n return TjuQ",
"def HkzR(YKHO) -> x1iM:\n return YKHO._input_params",
"def g4y1(YKHO) -> x1iM[str]:\n return list(aadv(YKHO.delta).parameters.keys())",
"def rwTO(YKHO):\n for xqoZ in YKHO.input_pa... | [
"0.7201729",
"0.68041337",
"0.66312534",
"0.65707177",
"0.6516453",
"0.65021557",
"0.6491629",
"0.64171785",
"0.6392495",
"0.63855124",
"0.6377573",
"0.63767976",
"0.6367072",
"0.63368285",
"0.6326117",
"0.62989694",
"0.6298812",
"0.6298812",
"0.6298812",
"0.62893647",
"0.625... | 0.78305376 | 0 |
Validate configuration matches a specific python version. If the ``actual_py_version`` is not provided, it will default to the major/minor version of the currently running python interpreter. | def fbKZ(GPtr, HLVS=None):
aSos = GPtr.lambda_python_version
if HLVS is None:
HLVS = 'python%s.%s' % HwRy.version_info[:2]
if HLVS != aSos:
qmLP.warn('You are currently running %s, but the closest supported version on AWS Lambda is %s\nPlease use %s, otherwise you may run into deployment iss... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Un_d(aEqx):\n if aEqx not in ('universal', 'python2', 'python3'):\n raise o2Bo('Unknown expected python version string: %s' % aEqx)\n if HwRy.version_info[:2] < (2, 7):\n raise iUPG('python interpreter version', '>=2.7', HwRy.version)\n if aEqx == 'universal':\n return\n if aEq... | [
"0.7408974",
"0.6890368",
"0.6698329",
"0.64015883",
"0.6386059",
"0.63620937",
"0.63551784",
"0.62737596",
"0.6211223",
"0.6183389",
"0.6183389",
"0.61329275",
"0.61306137",
"0.6127884",
"0.6118407",
"0.60785514",
"0.60779643",
"0.59750843",
"0.59635365",
"0.59454066",
"0.59... | 0.7447902 | 0 |
render players_index.html, take in dataframe of players, select players with certain position | def zt0J(Bwa6, dQgj, MTKo, nzu_, MZf5):
h_Bk = oyIN.array(Bwa6.PLAYER[Bwa6['POS'] == dQgj.upper()])
h_Bk.sort()
exwG = len(h_Bk)
tMZy = int(exwG / 4 + 1)
ZTvI = [h_Bk[:tMZy], h_Bk[tMZy:tMZy * 2], h_Bk[tMZy * 2:tMZy * 3], h_Bk[tMZy * 3:]]
UHFx = f7Dd.count_position(Bwa6)
sEAN = zAej(loader=Hi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Bwa6():\n return TvZl('players.html')",
"def GaCN(YKHO):\n qMX7 = {}\n Bwa6 = YKHO.soup.find_all('tr', class_='Cur-p')\n for or8S, oyg0 in enumerate(Bwa6):\n j4zu = {}\n for H5ew, o8Kj in YKHO.html_labels.items():\n j4zu[H5ew] = oyg0.find(attrs=o8Kj).text\n dZPi = ... | [
"0.6808355",
"0.65306383",
"0.64373744",
"0.6414142",
"0.6209504",
"0.6109073",
"0.60793954",
"0.6065336",
"0.60315007",
"0.59827447",
"0.59502274",
"0.59416777",
"0.5933473",
"0.589416",
"0.588864",
"0.5877834",
"0.5853776",
"0.58502483",
"0.5847716",
"0.58351463",
"0.582946... | 0.7076363 | 0 |
ServerError is raised if there is an internal server error (500). | async def test_list_subscriptions_failure():
with trZe.raises(g8kN):
async with DMju() as cuiw:
x0hE = X3mf(cuiw, base_url=ruq7)
bGrB = [finE async for finE in x0hE.list_subscriptions()] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def __server_error(YKHO, QePW, BQDi):\n return YKHO.__templates.TemplateResponse('500.html', {'request': QePW}, status_code=500)",
"def r1yd(tTpl):\n return (pz3A({'message': 'Internal server error'}), 500)",
"def r1yd(tTpl):\n return geh0('failed', 'Internal server error', 500)",
"def r1yd(XO... | [
"0.79665095",
"0.79384154",
"0.7913776",
"0.7872948",
"0.7847333",
"0.77596074",
"0.77418786",
"0.7720262",
"0.76959825",
"0.7691373",
"0.767516",
"0.7658578",
"0.7657374",
"0.76364946",
"0.7619855",
"0.7617562",
"0.7608097",
"0.75876594",
"0.75642973",
"0.75526357",
"0.75371... | 0.0 | -1 |
Test post while user is not authorized | def cHhy(YKHO):
bD7m = gxEw('api-media-elements')
Z9rn = i9zE()
Z9rn.login(username='testuser', password='password')
geh0 = Z9rn.post(bD7m, {}, HTTP_X_REQUESTED_WITH='XMLHttpRequest')
YKHO.assertEqual(geh0.status_code, 403) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mIlK(YKHO):\n x0hE = i9zE()\n geh0 = x0hE.post(gxEw('api:new-post'), data=qQXR.dumps({}), content_type='application/json')\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_401_UNAUTHORIZED)",
"def pvta(YKHO):\n YKHO.test_create_post_if_authorized()\n YKHO.client.logout()\n m8z6 = T97t.objects... | [
"0.77343196",
"0.7492387",
"0.7491616",
"0.7344403",
"0.73357993",
"0.7319241",
"0.73075503",
"0.73075503",
"0.73075503",
"0.73075503",
"0.73075503",
"0.73075503",
"0.73075503",
"0.73075503",
"0.7181579",
"0.716042",
"0.71420693",
"0.71118784",
"0.70973295",
"0.7092229",
"0.7... | 0.7184314 | 14 |
Normalizes a path which is separated by backward or forward slashes to be separated by forward slashes. | def gXY8(lsX7):
return '/'.join(ZbWC.split('[\\\\\\/]', lsX7)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VCg9(pmON: str):\n if pmON[-1] != '/':\n pmON += '/'\n return pmON",
"def s5sT(pmON):\n pmON = pmON.strip('/')\n pmON = '/' + pmON + '/' if pmON else '/'\n return pmON",
"def s5sT(pmON):\n if pmON:\n if pmON[0] != '/':\n pmON = '/' + pmON\n if pmON[-1] != '... | [
"0.8148492",
"0.8140963",
"0.8128235",
"0.8046503",
"0.7983497",
"0.79233736",
"0.7922969",
"0.7805713",
"0.77268416",
"0.77248955",
"0.7670113",
"0.76572764",
"0.75176424",
"0.7408813",
"0.7394704",
"0.73829573",
"0.7374238",
"0.7365038",
"0.7300574",
"0.72768325",
"0.726119... | 0.0 | -1 |
Will return a boolean if any address equals one given | def LSjZ(YKHO, H2v5):
if YKHO.add1 == H2v5:
return True
if YKHO.add2 == H2v5:
return True
if YKHO.add3 == H2v5:
return True
if YKHO.add4 == H2v5:
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vsCk(Yn3U):\n return all((WKvO == Yn3U[0] for WKvO in Yn3U))",
"def UAlu(YKHO, rRzo, KYrJ):\n if rRzo == 'any':\n return True\n if not KYrJ:\n return True\n for D8Ke in KYrJ:\n if rRzo.subnet_of(D8Ke):\n return True\n return False",
"def pgSp(YKHO, UTX6: int) ... | [
"0.7755936",
"0.74214435",
"0.7383623",
"0.72683626",
"0.70516396",
"0.70105046",
"0.689643",
"0.68824476",
"0.68612033",
"0.6758294",
"0.6726694",
"0.6714847",
"0.66783154",
"0.66472435",
"0.6644587",
"0.6637437",
"0.6615677",
"0.6568244",
"0.6553959",
"0.6537258",
"0.648240... | 0.7230415 | 4 |
Test calling the "businessdays" endpoint. | def Nu7d(nNXP):
FRY1(nNXP, fixtures='basic')
_hkX = nNXP.business_days('2020-01-01', '2020-02-01', country='AU')
assert _hkX.code == 200
assert isinstance(_hkX.headers, dict)
assert isinstance(_hkX.raw, bytes)
assert _hkX.json['status'] == 'success'
assert _hkX.json['data']['business_days'] ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UUjp(YKHO):\n geh0 = YKHO.client.get(gxEw('business-all', kwargs={'version': 'v1'}))",
"def YwY2(YKHO):\n YKHO.authenticate(YKHO.user_admin)\n CjKC = JgJ4.objects.create(day='monday')\n r8UL = YKHO.client.get(gxEw('v1:dayofweek-list'))\n aeup = YKHO.client.get(gxEw('v1:dayofweek-detail', args=... | [
"0.70183533",
"0.7002977",
"0.700101",
"0.67893094",
"0.6707972",
"0.66316175",
"0.6617909",
"0.65178025",
"0.6434997",
"0.6418252",
"0.6408912",
"0.63979745",
"0.63936865",
"0.6356165",
"0.6354597",
"0.6345301",
"0.63399196",
"0.62999505",
"0.6249849",
"0.62339765",
"0.62076... | 0.8727655 | 0 |
Test calling the "holidays" endpoint. | def wwMd(nNXP):
FRY1(nNXP, fixtures='basic')
_hkX = nNXP.holidays(year=2020, country='AU')
assert _hkX.code == 200
assert isinstance(_hkX.headers, dict)
assert isinstance(_hkX.raw, bytes)
assert _hkX.json['status'] == 'success'
assert isinstance(_hkX.json['data'], list) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Nu7d(nNXP):\n FRY1(nNXP, fixtures='basic')\n _hkX = nNXP.business_days('2020-01-01', '2020-02-01', country='AU')\n assert _hkX.code == 200\n assert isinstance(_hkX.headers, dict)\n assert isinstance(_hkX.raw, bytes)\n assert _hkX.json['status'] == 'success'\n assert _hkX.json['data']['busi... | [
"0.8053798",
"0.7168249",
"0.7034785",
"0.68706864",
"0.6866576",
"0.6830147",
"0.66850734",
"0.6657775",
"0.66045105",
"0.658288",
"0.6580761",
"0.65425426",
"0.6538182",
"0.65161103",
"0.64796585",
"0.6469529",
"0.64477783",
"0.64292645",
"0.64088863",
"0.6399758",
"0.63871... | 0.84790224 | 0 |
Test using a bad API token. | def wjco(nNXP, xAU6, Ehsq):
if not xAU6.live:
return
Ehsq.setattr(nNXP, 'token', '<bad-token>')
with trZe.raises(zRcu) as OpbK:
_hkX = nNXP.me()
assert OpbK.value.message == '401 Unauthorized' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wjco(YKHO):\n uJjO = dSPv.config('user_id')\n oBeo = YKHO.__class__.list_id\n Drzj = zVa7.get_request(GjSa, {u'user_id': uJjO, u'access_token': u'invalid token', u'list_id': oBeo})\n WKvO = YKHO.start_request_tests(Drzj)\n if WKvO.status_code != 401:\n p9K5 = WKvO.json().get(u'message')\n... | [
"0.8497021",
"0.7760089",
"0.77414834",
"0.77367973",
"0.77171564",
"0.76067734",
"0.7564646",
"0.7532678",
"0.7506932",
"0.74887973",
"0.74887973",
"0.74887973",
"0.74886346",
"0.7480111",
"0.7476946",
"0.74681884",
"0.74440676",
"0.74343514",
"0.741844",
"0.74178153",
"0.74... | 0.82557356 | 1 |
Split the extension from a pathname. Extends default os.path.splitext function, handling files with double extension Extension is everything from the last dot to the end, ignoring leading dots. | def gLx5(pmON):
for YBcr in ['.tar.gz', '.tar.bz', '.tar.bz2', '.tar.xz', '.tar.7z', '.tar.lz', '.tar.z', '.tar.lzma']:
if pmON.lower().endswith(YBcr):
return (pmON[:-len(YBcr)], pmON[-len(YBcr):])
return Hy7s.path.splitext(pmON) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gLx5(pmON):\n for YBcr in ['.nii.gz', '.mnc.gz']:\n if pmON.endswith(YBcr):\n return (pmON[:-len(YBcr)], pmON[-len(YBcr):])\n return Hy7s.path.splitext(pmON)",
"def efWQ(Ux0P):\n return Hy7s.path.splitext(Ux0P)[1]",
"def gLx5(pmON):\n for YBcr in ['.tar.gz', '.tar.bz2']:\n ... | [
"0.8315109",
"0.824633",
"0.82403755",
"0.8206357",
"0.8024961",
"0.7933233",
"0.7905178",
"0.7864205",
"0.7854152",
"0.78339875",
"0.7807322",
"0.7786002",
"0.7736706",
"0.770654",
"0.7687259",
"0.76243645",
"0.7620412",
"0.7598211",
"0.7574167",
"0.75052583",
"0.73819184",
... | 0.8168692 | 4 |
Return humanreadable state of the invoice. | def QTBn(YKHO, YEnM):
wspz = dict(aVkO.INVOICE_STATES)
return wspz[YEnM.state] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wOsD(YKHO):\n return YKHO._invoice_state",
"def wHJl(YKHO):\n ICy7 = str(YKHO._invoice_id)\n return ICy7",
"def zAg0(YKHO):\n ICy7 = str(YKHO._invoice_id)\n return ICy7",
"def w8Ef(YKHO):\n Mb1j = '################################################\\n'\n Mb1j = Mb1j + str(YKHO.get_date... | [
"0.7779933",
"0.6846517",
"0.6706867",
"0.6676551",
"0.66665095",
"0.6665616",
"0.6545204",
"0.6484565",
"0.6484565",
"0.6484565",
"0.6484565",
"0.6484565",
"0.6484565",
"0.6484565",
"0.6484565",
"0.6484565",
"0.6484565",
"0.6484565",
"0.6484565",
"0.6484565",
"0.6484565",
... | 0.7038392 | 1 |
This constructor declares a raw list of messages, ie, can be from multiple sources or in any window | def FIMM(YKHO, RA_F, TAWe, aqTm):
YKHO.raw_messages = []
YKHO.msg_counter = 0
YKHO.max_messages = aqTm
YKHO.delta = RA_F
YKHO.is_timer_on = False
YKHO.start_time = 0
YKHO.max_time = TAWe | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n YKHO.inbox = []\n YKHO.buffer = []",
"def lXH4(YKHO) -> x1iM[ImMB]:\n LNvb = ','.join(YKHO.device_spec.channels).encode('ascii', 'ignore')\n hkOU = Rjhm('SENSOR_MAP', LNvb)\n eJHm = (',' + str(int(YKHO.device_spec.sample_rate))).encode('ascii', 'ignore')\n ClIQ = Rjhm('DATA_RA... | [
"0.69315267",
"0.67647994",
"0.6643122",
"0.6571253",
"0.6550193",
"0.6505599",
"0.6419206",
"0.62985003",
"0.6290919",
"0.6223311",
"0.6219046",
"0.6192707",
"0.61537826",
"0.60847145",
"0.60614806",
"0.6061313",
"0.6046134",
"0.6046134",
"0.6046134",
"0.6046134",
"0.6046134... | 0.58051574 | 63 |
Returns the names of the categories. | def MGkr(YKHO):
return YKHO._category_odict.keys() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MGkr(YKHO):\n return YKHO._category_names",
"def LQuW(YKHO):\n LeZt = ''\n for YRbF in YKHO.category.all():\n LeZt += YRbF.name + ' '\n return LeZt",
"def LQuW(YKHO):\n LeZt = YKHO.session.query(qZuN).all()\n return [Ghho.name for Ghho in LeZt]",
"def lO9z(YKHO):\n K9NE = YKHO... | [
"0.89255977",
"0.8743657",
"0.85241127",
"0.8208229",
"0.8121188",
"0.7993101",
"0.79239094",
"0.79114234",
"0.786085",
"0.78578615",
"0.78503525",
"0.7848572",
"0.78021944",
"0.77700424",
"0.77700424",
"0.77700424",
"0.77700424",
"0.77700424",
"0.77645975",
"0.7759378",
"0.7... | 0.8718931 | 2 |
Compute softmax values for each sets of scores in x. | def N93T(WKvO):
uw5A = oyIN.exp(WKvO - oyIN.max(WKvO))
return uw5A / uw5A.sum(axis=0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oSvh(WKvO):\n S2MS = []\n if oyIN.array(WKvO).ndim == 1:\n hrCc = oyIN.exp(WKvO)\n RmXN = oyIN.sum(hrCc)\n xzMv = hrCc / RmXN\n dzye = xzMv\n else:\n dzye = oyIN.exp(cCrA) / oyIN.sum(oyIN.exp(cCrA), axis=0)\n return dzye",
"def N93T(WKvO):\n j1LR = oyIN.exp(o... | [
"0.8011412",
"0.7760833",
"0.7760833",
"0.76863474",
"0.76712537",
"0.76611257",
"0.7657704",
"0.7657704",
"0.7657704",
"0.7657704",
"0.7657704",
"0.7657704",
"0.7657704",
"0.7640335",
"0.7627424",
"0.75514656",
"0.7532562",
"0.7457792",
"0.73241115",
"0.73168015",
"0.7298793... | 0.0 | -1 |
Compute softmax values for each sets of scores in x. | def N93T(WKvO):
return oyIN.exp(WKvO) / oyIN.sum(oyIN.exp(WKvO), axis=0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oSvh(WKvO):\n S2MS = []\n if oyIN.array(WKvO).ndim == 1:\n hrCc = oyIN.exp(WKvO)\n RmXN = oyIN.sum(hrCc)\n xzMv = hrCc / RmXN\n dzye = xzMv\n else:\n dzye = oyIN.exp(cCrA) / oyIN.sum(oyIN.exp(cCrA), axis=0)\n return dzye",
"def N93T(WKvO):\n j1LR = oyIN.exp(o... | [
"0.8011412",
"0.7760833",
"0.7760833",
"0.76863474",
"0.76712537",
"0.76611257",
"0.7657704",
"0.7657704",
"0.7657704",
"0.7657704",
"0.7657704",
"0.7657704",
"0.7657704",
"0.7640335",
"0.7627424",
"0.75514656",
"0.7532562",
"0.7457792",
"0.73241115",
"0.73168015",
"0.7298793... | 0.0 | -1 |
Returns all the event logs ever added for this contract | def nfqd(YKHO):
return YKHO.process_logs(YKHO.__filter.get_all_entries()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EgMH(YKHO):\n return YKHO._event_logs",
"def WAju(YKHO):\n return YKHO.logEvents[:]",
"def bgMl(YKHO) -> bDy6[QRWf]:\n _hkX = YKHO.cluster.request('GET', f'{YKHO._BASE_URL}/version/{YKHO.id}/logs', stream=True)\n return LyCh.SSEClient(_hkX).events()",
"def wv6W(YKHO, kEE6):\n EMBQ = YKHO.e... | [
"0.8266345",
"0.8212164",
"0.77360636",
"0.7442142",
"0.7405415",
"0.7280909",
"0.71880394",
"0.7020895",
"0.6973358",
"0.69628006",
"0.69100595",
"0.68543106",
"0.68092024",
"0.68092024",
"0.67273974",
"0.6711781",
"0.6702971",
"0.66843706",
"0.6675745",
"0.6653456",
"0.6653... | 0.7189432 | 6 |
This method creates concrete actions (no variables) for all actions in the problem domain action schema and turns them into complete Action objects as defined in the aimacode.planning module. It is computationally expensive to call this method directly; however, it is called in the constructor and the results cached in... | def Q6sW(YKHO):
def U10Y():
"""Create all concrete Load actions and return a list
:return: list of Action objects
"""
_1kr = []
return _1kr
def W0BA():
"""Create all concrete Unload actions and return a list
:return: list of Action objects
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xdGs(YKHO):\n YKHO.start_action = qTjF(YKHO)\n YKHO.stop_action = Fysn(YKHO)\n YKHO.reset_action = WkWv(YKHO)\n YKHO.quit_action = BPVx(YKHO)\n YKHO.tasks_action = W6fl(YKHO)\n YKHO.settings_action = ccGF(YKHO)\n YKHO.about_action = jwx5(YKHO)\n YKHO.change_ui_action = Arvp(YKHO)",
"d... | [
"0.66752994",
"0.6652593",
"0.652237",
"0.65208876",
"0.6516189",
"0.62890434",
"0.6211032",
"0.6160664",
"0.6137022",
"0.61368835",
"0.6130231",
"0.6109235",
"0.61065775",
"0.6093905",
"0.6067079",
"0.6052615",
"0.60499996",
"0.60462993",
"0.6046145",
"0.5989798",
"0.5978631... | 0.8044345 | 0 |
Get the interface object for device by ID | def C2TH(YKHO, jf3N, bqRn):
bo34.info("Getting interfaces id '{}' for device id '{}'.".format(bqRn, jf3N))
for wohN in YKHO.get_interfaces_for_device(jf3N):
if wohN.id == bqRn:
return wohN
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NMoC(YKHO, bqRn):\n for wohN in YKHO:\n if str(wohN.interface_id) == str(bqRn):\n return wohN",
"def NMoC(YKHO, bqRn):\n for wohN in YKHO:\n if str(wohN.interface_id) == str(bqRn):\n return wohN",
"def YqR2(qpJ3):\n wohN = __import__('interfaces.{}'.format(qpJ3)... | [
"0.7627095",
"0.7627095",
"0.7389451",
"0.72489214",
"0.7162395",
"0.69537544",
"0.69417286",
"0.6918315",
"0.6914464",
"0.69011664",
"0.6821026",
"0.6821026",
"0.6821026",
"0.6821026",
"0.6821026",
"0.6821026",
"0.6821026",
"0.6821026",
"0.6821026",
"0.675081",
"0.67403644",... | 0.766705 | 0 |
Get the topology interfaces for a device | def OpMs(YKHO, jf3N):
bo34.info('Getting topology interfaces for device with ID {}'.format(jf3N))
try:
D3n2 = YKHO.get_uri('/securetrack/api/devices/topology_interfaces?mgmtId={}'.format(jf3N), expected_status_codes=200).response.content
except GX9K:
Ol8d = 'Failed to get the list of the top... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dylG(YKHO, jf3N):\n bo34.info('Getting topology interfaces for device with ID {}'.format(jf3N))\n try:\n yoae = '/securetrack/api/devices/topology_interfaces?genericDeviceId={}&mgmtId={}&is_generic=true'.format(jf3N, jf3N)\n D3n2 = YKHO.get_uri(yoae, expected_status_codes=200).response.cont... | [
"0.7156494",
"0.66250455",
"0.65580446",
"0.6483086",
"0.64641327",
"0.6461757",
"0.645115",
"0.64505446",
"0.64342976",
"0.64342064",
"0.6427622",
"0.6416943",
"0.63779795",
"0.6355821",
"0.63332933",
"0.6315176",
"0.6311555",
"0.6305423",
"0.63022906",
"0.6274782",
"0.62709... | 0.74008816 | 0 |
Get the zones descendants. | def XBwi(YKHO, sQRl, TvXf=lKJc):
bo34.info('Getting SecureTrack Zones descendants')
if isinstance(sQRl, list):
sQRl = ','.join(sQRl)
bD7m = '/securetrack/api/zones/{}/descendants?context={}'.format(sQRl, TvXf)
try:
D3n2 = YKHO.get_uri(bD7m, expected_status_codes=200).response.content
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CPZk(YKHO, zD4t=500):\n return YKHO.get_children_of_type(LEXu.Zone, zD4t)",
"def CPZk(YKHO):\n return YKHO.zones",
"def bVKv(YKHO):\n return YKHO.__zones.values()",
"def _j99(YKHO) -> x1iM[str]:\n return YKHO.__zones",
"def _j99(YKHO) -> 'list[IUZone]':\n return YKHO._zones",
"def hZZz... | [
"0.723979",
"0.7182246",
"0.6960607",
"0.68044853",
"0.6797813",
"0.6745044",
"0.6736382",
"0.66104203",
"0.655165",
"0.6460568",
"0.6460568",
"0.6426472",
"0.6426472",
"0.6408228",
"0.63133466",
"0.6295004",
"0.62868303",
"0.62851536",
"0.6244249",
"0.623234",
"0.6219552",
... | 0.7399681 | 0 |
Add route to host. | def q_q7(YKHO, D8Ke, M181):
YKHO.cmd('route add -host %s dev %s' % (D8Ke, M181)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jbgU(YKHO, PsCT):\n YKHO.routes[PsCT.name] = PsCT",
"def jbgU(YKHO, PsCT: str, tTee: FunctionType):\n YKHO.routes[PsCT] = [ZbWC.compile(PsCT), tTee]",
"def jbgU(YKHO, U8CY):\n YKHO.routes.add(tuple(U8CY))",
"def jbgU(YKHO, PsCT: Route):\n eVVj = SwOd.ip_network(PsCT.network)\n kdXA = SwOd.... | [
"0.7443937",
"0.70354384",
"0.70153654",
"0.67507875",
"0.67342335",
"0.6644436",
"0.6622789",
"0.65962416",
"0.6582227",
"0.64822847",
"0.64643055",
"0.6449087",
"0.64331764",
"0.64172447",
"0.6330003",
"0.62949556",
"0.62746584",
"0.61946595",
"0.6175437",
"0.61655176",
"0.... | 0.6904223 | 3 |
Return true if this is a zero slice. | def gbWg(KCHu: slice) -> bool:
return KCHu.stop == KCHu.start | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W7Vg(YEnM) -> bool:\n return isinstance(YEnM, slice) and YEnM.start is not None and (YEnM.stop is not None) and (YEnM.start == YEnM.stop)",
"def WTbL(YKHO):\n return YKHO.zlim[0] == YKHO.zlim[1]",
"def Slmz(YEnM) -> bool:\n return isinstance(YEnM, slice) and YEnM.start is None and (YEnM.stop is No... | [
"0.77700424",
"0.75263286",
"0.74504143",
"0.7401988",
"0.72179896",
"0.7182856",
"0.7035762",
"0.7008156",
"0.6953064",
"0.68960565",
"0.6879228",
"0.6879228",
"0.6873194",
"0.68600446",
"0.6853867",
"0.68466157",
"0.6839521",
"0.6838485",
"0.6805795",
"0.6798785",
"0.679418... | 0.85894144 | 0 |
Saves the environment info dictionary to a csv args env (energ_py environment) env_info (dict) the info dict returned from env.step() episode (int) | def fOy0(sEAN, QAkX, xgXB, beIy):
if hasattr(sEAN.observation_space, 'info') and hasattr(sEAN.state_space, 'info'):
G9jH.debug('saving env history')
b0mh = sEAN.state_space.info
pE8z = sEAN.observation_space.info
hlel = []
for H5ew, U34r in QAkX.items():
if isinst... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XpYY(Te0u):\n Te0u.writerow(['System family', Hy7s.name])\n Te0u.writerow(['System', a9EH.system()])\n Te0u.writerow(['Version', a9EH.release()])\n Te0u.writerow(['Python', '{}.{}'.format(HwRy.version_info.major, HwRy.version_info.minor)])\n Te0u.writerow(['Path to interpret', HwRy.executable])"... | [
"0.6239286",
"0.59862",
"0.5962608",
"0.58124495",
"0.57299095",
"0.57170314",
"0.56934124",
"0.5643108",
"0.56115466",
"0.5607244",
"0.55563587",
"0.5452931",
"0.54433113",
"0.54119897",
"0.536957",
"0.5367421",
"0.53626007",
"0.53599983",
"0.5315317",
"0.5313953",
"0.530779... | 0.7768981 | 0 |
Convert all query values to list of strings. Query parameters may be generated in different shapes, including integers, strings, list of strings, etc. It can also be an object, if the schema contains an object, but `style` and `explode` combo is not applicable. | def md28(xDcj: Optional[Dict[str, Any]]) -> cuzp[str, x1iM[str]]:
def MwXL(BWXx: Any) -> x1iM[str]:
if isinstance(BWXx, list):
return list(map(str, BWXx))
if isinstance(BWXx, str):
return [BWXx]
return [str(BWXx)]
return {H5ew: MwXL(BWXx) for H5ew, BWXx in (xDcj ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W991(YKHO):\n return ','.join([filter.value for filter in YKHO.filters] if YKHO.filters else [])",
"def wMP5(xDcj):\n qIxc = []\n for G1Hx, Ty9i in xDcj.items():\n try:\n if isinstance(Ty9i, exCv):\n qIxc.append((G1Hx, Ty9i))\n else:\n qIxc.... | [
"0.6253116",
"0.6243677",
"0.6201688",
"0.59016985",
"0.5856142",
"0.5854962",
"0.5833298",
"0.5726416",
"0.5647797",
"0.56424814",
"0.5625767",
"0.56141466",
"0.56049865",
"0.5577209",
"0.55604863",
"0.55593336",
"0.5556396",
"0.55444235",
"0.55247074",
"0.5475233",
"0.54455... | 0.6092048 | 3 |
Helper for initializing the RelationsInPair instance if one is not provided, and updating it with the wordlist if one is provided | def iyKg(pmON, rSDZ=None):
cfuW = cCda(pmON)
print('\nLoading filtered distributional resources. This takes a while for a large experiment.')
if rSDZ:
if 'GDeps' in yIVm['ld_scores'] and GPtr['corpus']:
rSDZ._distr_dict._reload_resource(resource='gdeps', wordlist=cfuW)
rSDZ._... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ULp6(mWFP, KJ7x, w5cT, hWpw, HJbV):\n BybM = koMu()\n BybM.name = mWFP\n BybM.reporters = KJ7x\n BybM.words_dict = w5cT\n BybM.tags = HJbV\n BybM.tagwords = hWpw\n return BybM",
"def FIMM(YKHO, ym5c, RDSs):\n YKHO.matched_words = ym5c\n YKHO.matched_phrases = RDSs\n YKHO.matches... | [
"0.5722122",
"0.5350541",
"0.5336256",
"0.5219515",
"0.5187883",
"0.5158479",
"0.51575595",
"0.5156972",
"0.5137425",
"0.50972664",
"0.5050257",
"0.50313926",
"0.50295436",
"0.5002746",
"0.49773464",
"0.4963766",
"0.49512535",
"0.49322388",
"0.49052072",
"0.48926207",
"0.4876... | 0.0 | -1 |
Returns a VTK PolyData object from a mesh. | def NGvm(qaEx, Wzmz=False):
x5C4 = ['.ply', '.obj', '.stl', '.off']
if EFYe(qaEx) and gLx5(qaEx)[1] in x5C4:
if gLx5(qaEx)[1] == '.ply':
N5Pj = YZpu.PLYReader()
elif gLx5(qaEx)[1] == '.obj':
N5Pj = YZpu.OBJReader()
elif gLx5(qaEx)[1] == '.stl':
N5Pj = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _3Dv(rR8k):\n e2gD = rR8k.vertices\n y_PJ = rR8k.faces\n J20S = []\n for YRbF in range(y_PJ.shape[0]):\n LTIa = e2gD[y_PJ[YRbF], :]\n J20S.append(TvmJ.Polygon(oyIN.array(LTIa)))\n return TvmJ.Surface(J20S)",
"def JNwQ(YKHO, rR8k, mWFP):\n\n def hQhq(r8hN):\n nPrm = {}\n... | [
"0.64165586",
"0.6394207",
"0.6282372",
"0.625345",
"0.6230812",
"0.62061614",
"0.62032735",
"0.6203197",
"0.61119837",
"0.6105381",
"0.6092465",
"0.60688406",
"0.6064428",
"0.5999805",
"0.5994656",
"0.598492",
"0.59760123",
"0.5903851",
"0.5891008",
"0.58833474",
"0.5878227"... | 0.0 | -1 |
Choose a unique random item from a variable number of lists. | def xiHE(DNHh, *qIxc):
ZfUD = h6sM(*qIxc)
while ZfUD in DNHh:
ZfUD = h6sM(*qIxc)
return ZfUD | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eybn(DumB: List[Any]) -> ImMB:\n return DumB[ajWY(0, len(DumB) - 1)]",
"def NYnK(IqQl):\n hlel = tuKI.choice(IqQl)\n return hlel",
"def yRwn(F6AI: List[A]) -> k0lF:\n return F6AI[tuKI.randrange(len(F6AI))]",
"def aPTa(ONJL):\n return tuKI.choice(ONJL)",
"def Ddot(vC9B):\n if not vC9B:... | [
"0.7610321",
"0.75075966",
"0.7399206",
"0.737558",
"0.7290913",
"0.71665996",
"0.71013707",
"0.70673484",
"0.70650285",
"0.69988173",
"0.6969551",
"0.6957006",
"0.6903835",
"0.6869168",
"0.6856402",
"0.6856402",
"0.6831045",
"0.6809426",
"0.6795495",
"0.67710125",
"0.6727791... | 0.0 | -1 |
Return true if fan is on. | def xklW(YKHO) -> str:
if YKHO.is_celsius():
return hMVl
return ELtl | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Debg(YKHO) -> bool:\n return YKHO._device.fan_speed != AU7g.OFF",
"def Debg(YKHO):\n return ExaA[YKHO._device['fan_speed']] in [qBOr, Eduf, Fda0]",
"def Debg(YKHO) -> bool:\n return YKHO.device.is_on",
"def Ypo0(YKHO):\n return YKHO.ask(':SYST:SELF:TEST:FAN?') == 'PASS'",
"def ZDXo(YKHO):\n... | [
"0.821798",
"0.78145707",
"0.75431556",
"0.74334586",
"0.7369301",
"0.72729164",
"0.72729164",
"0.72060066",
"0.7080356",
"0.70700836",
"0.704561",
"0.7034951",
"0.7034951",
"0.70249104",
"0.70194227",
"0.70194227",
"0.7015624",
"0.70150197",
"0.7012206",
"0.70087755",
"0.700... | 0.0 | -1 |
Return the current temperature. | def CMHP(YKHO) -> float | None:
if oMsj not in YKHO.tuya_device.status and NIKO not in YKHO.tuya_device.status:
return None
PT_q = YKHO.get_temp_current_scale()
if not PT_q:
return None
if YKHO.is_celsius():
ovGo = YKHO.tuya_device.status.get(oMsj)
if not ovGo:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CMHP(YKHO):\n return YKHO._current_temp",
"def CMHP(YKHO):\n return YKHO._cur_temp",
"def CMHP(YKHO):\n return YKHO._cur_temp",
"def CMHP(YKHO):\n return YKHO._temperature",
"def CMHP(YKHO) -> float:\n return YKHO.device['sensors']['temperature']",
"def CMHP(YKHO):\n return YKHO._cu... | [
"0.88459253",
"0.8834011",
"0.8834011",
"0.8827252",
"0.88014287",
"0.8787866",
"0.8787866",
"0.8787866",
"0.8787866",
"0.8787866",
"0.8787866",
"0.8787866",
"0.8787866",
"0.8787866",
"0.8781482",
"0.87779963",
"0.877693",
"0.87618834",
"0.875637",
"0.87354743",
"0.8715311",
... | 0.84879804 | 50 |
Return the current humidity. | def eVVu(YKHO) -> int:
return int(YKHO.tuya_device.status.get(NPD5, 0)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dU0H(YKHO):\n dU0H = YKHO._readHum()\n return dU0H",
"def dU0H(YKHO):\n return YKHO._humidity",
"def dU0H(YKHO):\n return YKHO._humidity",
"def dU0H(YKHO) -> float:\n return YKHO._device_information['telemetry']['current']['humidity']",
"def dU0H(YKHO):\n return YKHO._hum",
"def dU0... | [
"0.90387315",
"0.8981767",
"0.8981767",
"0.8921883",
"0.88994974",
"0.88764477",
"0.886938",
"0.8850217",
"0.88487846",
"0.8835589",
"0.88047147",
"0.88002187",
"0.8674209",
"0.8609897",
"0.8512545",
"0.85111094",
"0.84889036",
"0.84857816",
"0.8475744",
"0.84416366",
"0.8399... | 0.82058746 | 32 |
Split data into training and testing. | def Qb89(EcVT, LVAh, ugUs=0.2):
lpha = EcVT.shape[0] * ugUs
Z5wO = EcVT[:lpha, :, :, :]
H96n = LVAh[:lpha, :]
Lcqa = EcVT[lpha:, :, :, :]
VJv0 = LVAh[lpha:, :]
return (Lcqa, VJv0, Z5wO, H96n) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qb89(nPrm, jcFe):\n IMeE = int(jcFe * len(nPrm))\n b2G5 = len(nPrm) - IMeE\n EvQg = nPrm.head(IMeE)\n QOe9 = nPrm.tail(b2G5)\n return (EvQg, QOe9)",
"def hhTY(YKHO):\n EvQg = []\n QOe9 = []\n for ZfUD in YKHO.data:\n if ZfUD[0] == 'train':\n EvQg.append(ZfUD)\n ... | [
"0.83493423",
"0.8284765",
"0.8239031",
"0.82379764",
"0.8224969",
"0.81304526",
"0.8041162",
"0.8037863",
"0.8036809",
"0.8029045",
"0.8025916",
"0.8015267",
"0.7999982",
"0.79558736",
"0.7942657",
"0.793403",
"0.79314303",
"0.7921484",
"0.7920422",
"0.7899527",
"0.7894038",... | 0.0 | -1 |
Used to create dummy ratings for the courses by the admin. | def YmfC(PSmN, cCrA=[2, 3, 4, 5]):
RuJL = mv1M.objects.get(username='Admin@mail.com')
sDlr = CQpO.objects.all()
for YRbF in range(PSmN):
RrWF = t0o2()
RrWF.rating = tuKI.choice(cCrA)
RrWF.creator = RuJL
RrWF.course = tuKI.choice(sDlr)
RrWF.save()
print(f'{YRbF... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EvQg(YKHO):\n oyIN.random.shuffle(YKHO.ratings_indexes)\n YKHO.__update_step()",
"def FIMM(YKHO, C3ST):\n YKHO.model = C3ST\n YKHO.ratings_indexes = list(YKHO.model.ratings_indexes)",
"def NMoC(YKHO):\n S7Jr = YKHO.request.get('course_id')\n GQfX = FYrf.course_key(S7Jr).get()\n if not ... | [
"0.5579776",
"0.5551841",
"0.55039114",
"0.54503644",
"0.5367893",
"0.5302341",
"0.5248464",
"0.5246935",
"0.5223905",
"0.5212613",
"0.52060777",
"0.51874655",
"0.5120097",
"0.5111147",
"0.5107098",
"0.5086465",
"0.50763893",
"0.50758123",
"0.5069138",
"0.50621945",
"0.505740... | 0.64071393 | 0 |
Compute the median absolute deviation. Returns the median absolute deviation (MAD) of the array elements. The MAD is defined as ``median(abs(a median(a)))``. | def k06k(jzdc, jDK_=None):
jzdc = oyIN.array(jzdc, copy=False)
GX6U = oyIN.median(jzdc, axis=jDK_)
if jDK_ is not None:
GX6U = oyIN.expand_dims(GX6U, axis=jDK_)
return oyIN.median(oyIN.abs(jzdc - GX6U), axis=jDK_) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XNqj(jzdc):\n jzdc = oyIN.asfarray(jzdc).flatten()\n return oyIN.median(oyIN.abs(jzdc - oyIN.median(jzdc)))",
"def k06k(jzdc, m1lp=True):\n jzdc = XTiz.asarray(jzdc)\n GX6U = XTiz.median(jzdc)\n XNqj = XTiz.median(XTiz.abs(jzdc - GX6U))\n if m1lp:\n XNqj *= 1.4826\n return XNqj",
... | [
"0.8238253",
"0.81798863",
"0.8114259",
"0.81007284",
"0.7983902",
"0.78769356",
"0.7830679",
"0.7830637",
"0.7795776",
"0.7778048",
"0.77612156",
"0.75878084",
"0.75012803",
"0.74934876",
"0.7474353",
"0.74409425",
"0.74355274",
"0.71801823",
"0.71773684",
"0.7159335",
"0.70... | 0.8215499 | 1 |
Create an `Activity` proxy object. If this is a new activity, can pass `kwargs`. If the activity exists in the database, `document` should be an `ActivityDataset`. | def FIMM(YKHO, C13M=None, **B2fa):
if C13M is None:
YKHO._document = GZt3()
YKHO._data = B2fa
else:
YKHO._document = C13M
YKHO._data = YKHO._document.data
YKHO._data['code'] = YKHO._document.code
YKHO._data['database'] = YKHO._document.database | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NvB3(YKHO, rxHD, **B2fa):\n rxHD = nmsT(rxHD, backend=YKHO)\n rxHD.validate()\n LaRC = rxHD.get_parsed_dict()\n H5ew = YKHO._extract_id(LaRC)\n inpj = YKHO._activities.new(key=H5ew)\n inpj.data = LaRC\n inpj = YKHO.set_activity_indexes(YKHO.set_general_indexes(inpj))\n if LaRC['verb'] i... | [
"0.6959188",
"0.598848",
"0.5895465",
"0.57927287",
"0.5745847",
"0.5711586",
"0.56720656",
"0.566193",
"0.5626284",
"0.55854946",
"0.557844",
"0.5541418",
"0.5509593",
"0.54800355",
"0.547965",
"0.544929",
"0.5420009",
"0.5378572",
"0.534557",
"0.53199726",
"0.5300308",
"0... | 0.66306746 | 1 |
Returns a dockercompose 'up' command string. | def vP2v(UpPp=False, Cc7Y=False):
return 'docker-compose up {} {}'.format('--build' if Cc7Y else '', '-d' if UpPp else '').strip() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iQ28():\n return 'docker compose'",
"def vP2v():\n GPtr = PSrQ()\n Yn3K.run(['docker-compose', 'up', '-d'], cwd=GPtr.working_directory)",
"def vP2v(YKHO) -> str:\n return YKHO._up",
"def oTDq(Of2x=False):\n return 'docker-compose down {}'.format('-v' if Of2x else '')",
"def Cc7Y(YKHO):\n... | [
"0.726256",
"0.67598325",
"0.640048",
"0.60700315",
"0.58550394",
"0.5845746",
"0.5760417",
"0.5744868",
"0.56651044",
"0.5620158",
"0.56155086",
"0.56155086",
"0.5535653",
"0.55023164",
"0.54899126",
"0.54128504",
"0.5392939",
"0.5232418",
"0.5065915",
"0.5046107",
"0.504496... | 0.7989057 | 0 |
Return list of commands to execute for dockercompose bootstrapping. | def OHct(YKHO):
return (YKHO.pull, YKHO.up(detached=True), YKHO.build, YKHO.down(volumes=True), YKHO.up(detached=True)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tmd_(YKHO) -> list:\n qJiZ = []\n C7_O = YKHO._get_image_name()\n G1wx = YKHO._get_container_name()\n if 'build' in YKHO.config_options:\n JNZl = YKHO.config_options['build']\n Cc7Y = x2Ls(service_name=C7_O, build_config=JNZl)\n mYdS = Cc7Y.get_command()\n qJiZ.append(mY... | [
"0.65847343",
"0.6325285",
"0.6316841",
"0.6291918",
"0.62599784",
"0.62527895",
"0.60939944",
"0.60929334",
"0.60701877",
"0.604531",
"0.604382",
"0.5963243",
"0.59227186",
"0.5909942",
"0.58968943",
"0.5828809",
"0.5828725",
"0.5758727",
"0.5738998",
"0.5737713",
"0.5710733... | 0.6040438 | 11 |
Generates a unique conntrack zone for the passed in ID. | def Sy1h(YKHO, hilM):
try:
lhKE = YKHO._find_open_zone()
except Bx6I.CTZoneExhaustedError:
YKHO._free_zones_from_removed_ports()
lhKE = YKHO._find_open_zone()
YKHO._device_zone_map[hilM] = lhKE
na1r.debug('Assigned CT zone %(z)s to device %(dev)s.', {'z': lhKE, 'dev': hilM})
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ShR8(YKHO):\n return f'weatheralerts_{YKHO.zoneid}'",
"def DVVB(YKHO) -> str:\n return YKHO._zone_id",
"def DVVB(YKHO):\n return YKHO._gcp_instance.get('zone')",
"def DVVB(YKHO) -> str:\n return qe4Y.get(YKHO, 'zone_id')",
"def DVVB(YKHO) -> str:\n return qe4Y.get(YKHO, 'zone_id')",
"d... | [
"0.6310007",
"0.6263388",
"0.62066257",
"0.6157661",
"0.6157661",
"0.6157661",
"0.61183995",
"0.60009676",
"0.59816116",
"0.59691185",
"0.5856909",
"0.5838713",
"0.5838713",
"0.5806638",
"0.57734805",
"0.57170165",
"0.5715023",
"0.5715023",
"0.5715023",
"0.5715023",
"0.571502... | 0.6299928 | 1 |
Sets the package_version of this RequiredSoftwarePolicyConfiguration. | def eJy1(YKHO, eJy1):
YKHO._package_version = eJy1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tJi2(YKHO, tJi2):\n YKHO._software_version = tJi2",
"def AimV(YKHO, Etq1):\n YKHO['package']['version'] = Etq1\n YKHO.parser.set('package', 'version', Etq1)\n with open(YKHO.config_file, 'w') as nVrR:\n YKHO.parser.write(nVrR)",
"def v_xh(YKHO, DpZH=None):\n if DpZH is not None:\n ... | [
"0.6873038",
"0.6778117",
"0.6597115",
"0.65202945",
"0.64411354",
"0.64350337",
"0.6401239",
"0.6382664",
"0.6369537",
"0.6281873",
"0.6193351",
"0.6108159",
"0.60907465",
"0.6076693",
"0.6076693",
"0.6026248",
"0.6026248",
"0.60152847",
"0.5973955",
"0.5973955",
"0.5973955"... | 0.79992014 | 0 |
Sets the installation_code of this RequiredSoftwarePolicyConfiguration. | def Njqh(YKHO, Njqh):
YKHO._installation_code = Njqh | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xGo7(YKHO, Wxnj):\n YKHO.__code = Wxnj",
"def xGo7(YKHO, Wxnj):\n YKHO.code = Wxnj",
"def yLZU(YKHO, A97Q, Wxnj):\n YKHO.assert_package_exists()\n if not YKHO.package_verif_set:\n YKHO.package_verif_set = True\n A97Q.package.verif_code = Wxnj\n else:\n raise NIWX('Packag... | [
"0.6405479",
"0.63999",
"0.6274987",
"0.62481576",
"0.62338346",
"0.6162552",
"0.6146595",
"0.6146595",
"0.6146595",
"0.6146595",
"0.6146595",
"0.6146595",
"0.6146595",
"0.6146595",
"0.6146595",
"0.6146595",
"0.6146595",
"0.6092766",
"0.6026717",
"0.6026717",
"0.60240334",
... | 0.83178854 | 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.864179",
"0.85105866",
"0.7853924",
"0.77452",
"0.7712474",
"0.76976854",
"0.76601666",
"0.7638181",
"0.7621996",
"0.76074743",
"0.76074743",
"0.76074743",
"0.7607432",
"0.7599404",
"0.75858897",
"0.7582702",
"0.75715727",
"0.75683635",
"0.7539386",
"0.7539386",
"0.7528709... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.8392633",
"0.8354901",
"0.82950056",
"0.8132309",
"0.81149805",
"0.8099986",
"0.809911",
"0.8097883",
"0.8097883",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8066694",
"0.80594814",
"0.805757",
... | 0.0 | -1 |
Assemble a list of variablelength vectors into a padded 2D matrix of dimensions (n, max_len). | def LykF(F_On, wzH_):
if F_On.shape[0] > wzH_:
dur0 = int(oyIN.ceil(wzH_ * 0.75))
F_On = oyIN.concatenate((F_On[:dur0], F_On[F_On.shape[0] - wzH_ + dur0:]))
return oyIN.pad(F_On, ((0, max(0, wzH_ - F_On.shape[0])), (0, 0)), 'constant') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rOxt(mrgz, u54L, CPLx=0):\n Ylbp = oyIN.full(u54L, CPLx)\n for YRbF, he6J in enumerate(mrgz):\n Ylbp[YRbF, :len(he6J)] = he6J\n return Ylbp",
"def G55S(he6J, exwG):\n return [Ty9i.reshape((1, len(Ty9i))).repeat(exwG, axis=0) for Ty9i in he6J]",
"def VGCk(Zuws, BWXx=0.0, yDqo=oyIN.float32... | [
"0.7085002",
"0.69278795",
"0.6667386",
"0.6422228",
"0.6281154",
"0.6237378",
"0.61548287",
"0.6109767",
"0.6084593",
"0.6051297",
"0.6037929",
"0.60342336",
"0.6025707",
"0.60138315",
"0.5998937",
"0.5893152",
"0.5879707",
"0.58796597",
"0.58479834",
"0.58405054",
"0.583854... | 0.717722 | 0 |
Load trained fastText model from given path and cache it in memory. This function has to be called only once. Calling it multiple times will do nothing. | def g3MJ(uqvc):
global _fasttext_model
if not o6X1:
o6X1 = U5yq.load_model(uqvc) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g3MJ(pmON):\n try:\n import fastText\n except ImportError:\n raise Exception('Unable to import fastText. Please install fastText for Python: https://github.com/facebookresearch/fastText')\n return fastText.load_model(pmON)",
"def tyeH(YKHO, pmON):\n YKHO.model = NByr.load(pmON)",
... | [
"0.8065045",
"0.8044608",
"0.7321574",
"0.7086492",
"0.7086089",
"0.7017123",
"0.70020837",
"0.69653094",
"0.69501007",
"0.6944638",
"0.68748057",
"0.6855554",
"0.6849972",
"0.68026364",
"0.6769503",
"0.67587554",
"0.673017",
"0.6707142",
"0.6670889",
"0.66219276",
"0.6620609... | 0.83999425 | 0 |
function that takes a list and returns a new list that contains all but the first and last elements >>> a = [1,2,3,4] >>> middle(a) [2, 3] >>> b = [2,6,8,7] >>> middle(b) [6, 8] >>> c = [2,4,6,8] >>> middle(c) [4, 6] >>> d = [4,8,3,7] >>> middle(d) [8, 3] >>> e = [1,6,6,9] >>> middle(e) [6, 6] | def Hpmo(a1PO):
x1fj = a1PO[:]
del x1fj[0]
del x1fj[len(x1fj) - 1]
return x1fj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hpmo(qgK3):\n BdN0 = []\n for YRbF in qgK3:\n if YRbF != qgK3[0] and YRbF != qgK3[-1]:\n BdN0.append(YRbF)\n return BdN0",
"def Hpmo(iHrl):\n BdN0 = []\n for mLGw in iHrl[1:-1]:\n BdN0.append(mLGw)\n return BdN0",
"def Hpmo(ROk8):\n BdN0 = ROk8[1:-1]\n retur... | [
"0.784078",
"0.7781549",
"0.759033",
"0.7365964",
"0.70459306",
"0.6901742",
"0.6736529",
"0.6646502",
"0.65730304",
"0.6562913",
"0.65592563",
"0.6487049",
"0.64153695",
"0.6403191",
"0.6385134",
"0.6385134",
"0.63276416",
"0.6320648",
"0.63139164",
"0.6279571",
"0.62710446"... | 0.67243654 | 7 |
function that will take a list of integers, and return a new list with only even numbers >>> a = [3,1,4,1,5,9,2,6,5] >>> even_only(a) [4, 2, 6] >>> b = [6,2,1,0,5] >>> even_only(b) [6, 2, 0] >>> c = [4,5,6,7,8] >>> even_only(c) [4, 6, 8] >>> d = [0,1,8,4,6,3,5,9] >>> even_only(d) [0, 8, 4, 6] >>> e = [0,1,7,6,5,3,9] >>... | def Pbi3(list):
vf3I = []
for FGW3 in list:
if FGW3 % 2 == 0:
vf3I.append(FGW3)
return vf3I | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Pbi3(ROk8):\n BdN0 = []\n for YRbF in ROk8:\n if YRbF % 2 == 0:\n BdN0.append(YRbF)\n return BdN0",
"def gYEJ(mSrU: list[int]) -> list[int]:\n bYQo: list[int] = list()\n for FGW3 in mSrU:\n if FGW3 % 2 == 0:\n bYQo.append(FGW3)\n return bYQo",
"def Pbi3... | [
"0.7819736",
"0.7634535",
"0.75834787",
"0.7431056",
"0.7387088",
"0.7375314",
"0.7361992",
"0.73146766",
"0.72850627",
"0.72309154",
"0.7185638",
"0.71547145",
"0.70857674",
"0.7078768",
"0.7026588",
"0.6996592",
"0.69885504",
"0.69568855",
"0.69184667",
"0.69040143",
"0.680... | 0.7996518 | 0 |
function that takes a list and returns True if there is any element that appears more than once >>> has_duplicates([1,2,3,4,5]) False >>> has_duplicates([1,2,3,4,5,2]) True >>> has_duplicates([1,4,6,8,7]) False >>> has_duplicates([1,1,2]) True >>> has_duplicates([8,7,6,5,4]) False | def xscp(a1PO):
jzdc = 0
for WKvO in a1PO:
for LVAh in a1PO:
if WKvO == LVAh:
jzdc = jzdc + 1
if jzdc > len(a1PO):
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nves(list):\n return len(list) != len(set(list))",
"def xscp(Q6uT: list):\n for geyT in Q6uT:\n if Q6uT.count(geyT) > 1:\n return True\n return False",
"def xscp(JTgH):\n BdN0 = []\n for mLGw in JTgH:\n if mLGw in BdN0:\n pass\n else:\n B... | [
"0.85164446",
"0.8461381",
"0.82737434",
"0.8254418",
"0.8220377",
"0.8187384",
"0.81504416",
"0.81148076",
"0.8109168",
"0.80596524",
"0.7948876",
"0.7922048",
"0.79160285",
"0.7900715",
"0.7896533",
"0.7835981",
"0.78190017",
"0.7789289",
"0.7772506",
"0.7742465",
"0.772023... | 0.772638 | 20 |
Returns the List of this player's ships. | def Ghvf(YKHO) -> x1iM[riCe]:
return YKHO._ships | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _pRX(YKHO):\n raise NotImplementedError",
"def u9Q1(YKHO):\n return YKHO._sunken_ships",
"def Ghvf():\n pass",
"def bevG(YKHO):\n return YKHO.ships",
"def OU05(YKHO):\n return YKHO.connection.cursor().execute(jQuN.get_shoe_list).fetchall()",
"def Sgw_(YKHO) -> x1iM[mVZ4]:\n return B... | [
"0.72449785",
"0.67255384",
"0.65543425",
"0.6517709",
"0.6298882",
"0.6204942",
"0.61650497",
"0.61569864",
"0.61232585",
"0.6115167",
"0.60693836",
"0.60693836",
"0.60207367",
"0.60020113",
"0.5972711",
"0.5903497",
"0.58791214",
"0.5864607",
"0.58115304",
"0.57983404",
"0.... | 0.7891047 | 0 |
Decrease how many remaining ships this player has left, by one. | def y7kq(YKHO):
if YKHO._remaining_ships > 0:
YKHO._remaining_ships -= 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def D7Fm(YKHO) -> int:\n return YKHO._remaining_ships",
"def uIrn(YKHO):\n YKHO.positions = YKHO.positions[1:]\n YKHO.healths -= 1",
"def BJld(YKHO):\n YKHO.ships_left = YKHO.settings.ship_limit",
"def R58G(YKHO):\n YKHO._quantity_available -= 1\n return YKHO._quantity_available",
"def dl... | [
"0.6618058",
"0.6478887",
"0.6419743",
"0.63603115",
"0.6330202",
"0.63281876",
"0.6260958",
"0.6249384",
"0.6247695",
"0.6247695",
"0.6247695",
"0.624296",
"0.61755556",
"0.6106478",
"0.6093298",
"0.6079123",
"0.6045715",
"0.6004201",
"0.59748966",
"0.59493375",
"0.59356517"... | 0.80306995 | 0 |