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 |
|---|---|---|---|---|---|---|
Zero parameter automatic Canny edge detection courtesy of | def oZf1(LNo8, WTkW=0.4):
Ty9i = oyIN.median(LNo8)
LSh8 = int(max(0, (1.0 - WTkW) * Ty9i))
CN9P = int(min(255, (1.0 + WTkW) * Ty9i))
MvDL = AxMz(LNo8, LSh8, CN9P)
return MvDL | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def U2EP(YKHO):\n YKHO.frame = jbYn.Canny(YKHO.frame, 100, 200)",
"def AbVF(LNo8, kVwb=100, JgLq=150):\n return XC5k.Canny(LNo8, kVwb, JgLq)",
"def u9sK():\n _z_f = XC5k.imread('images\\\\OC14.tiff')\n mC4V = XC5k.Canny(_z_f, 100, 200)\n _z_f = XC5k.resize(_z_f, (612, 512))\n mC4V = XC5k.resi... | [
"0.76493996",
"0.72182775",
"0.7216294",
"0.72023165",
"0.72023165",
"0.72023165",
"0.72023165",
"0.72023165",
"0.72023165",
"0.72023165",
"0.72023165",
"0.72023165",
"0.72023165",
"0.72023165",
"0.72023165",
"0.72023165",
"0.72023165",
"0.72023165",
"0.71943456",
"0.7187973",
... | 0.64813304 | 34 |
Judge whether the VectorSet contains a given vector. | def FYXB(YKHO, iArr: Vector) -> bool:
for he6J in YKHO.__elements:
if he6J == iArr:
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fgIQ(YKHO, Ty9i: Tuple[float, float]) -> bool:\n assert len(Ty9i) == 2\n return bool(_e0h.cpBBContainsVect(YKHO, Ty9i))",
"def FYXB(YKHO, Ty9i):\n for YRbF in YKHO:\n if Ty9i in YRbF:\n return True\n False",
"def xc3U(YKHO, *qIxc):\n return gEqO.qvector_lvar_t_has(YKHO, *qI... | [
"0.710292",
"0.6935895",
"0.6644651",
"0.65584636",
"0.6549296",
"0.64888877",
"0.64488",
"0.6423306",
"0.6423306",
"0.6422749",
"0.6325735",
"0.63245225",
"0.63245225",
"0.6309977",
"0.62081075",
"0.6133481",
"0.6102702",
"0.61008435",
"0.6097306",
"0.60970557",
"0.6063051",... | 0.83577657 | 0 |
Judge whether this VectorSet is equal to a given VectorSet. | def xa14(YKHO, cmJd) -> bool:
return {*map(tuple, YKHO.__elements)} == {*map(tuple, cmJd)} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, aU5d):\n if not isinstance(aU5d, MQP4):\n raise TypeError\n if len(YKHO.itemlist) != len(aU5d.itemlist):\n return False\n for U6D_ in YKHO.itemlist:\n if U6D_ not in aU5d.itemlist:\n return False\n return True",
"def xa14(YKHO, Elif):\n if not isinsta... | [
"0.7329616",
"0.72963536",
"0.7153364",
"0.7101648",
"0.70883745",
"0.70731133",
"0.69106615",
"0.6772446",
"0.6772446",
"0.6728485",
"0.6657832",
"0.6651126",
"0.66088957",
"0.6591927",
"0.65618545",
"0.65610933",
"0.6553453",
"0.6489576",
"0.6486279",
"0.6461076",
"0.643107... | 0.67989606 | 7 |
Performs the forward pass of the L1 loss function. | def KVH6(YKHO, _Iob, eZic):
Aofo = None
Aofo = abs(_Iob - eZic)
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QHBB(EcVT, SGPK):\n pass",
"def Io4v(g4y1, gH2v='mean', **B2fa):\n qIxc = Wov5.parse(locals())\n qIxc['reduction'] = gH2v.upper()\n CqFm = uL8A.L1Loss\n if QpfX.executing_eagerly():\n return CqFm.instantiate(reduction=qIxc['reduction']).apply(g4y1)\n else:\n return CqFm.blend(... | [
"0.6900068",
"0.68213624",
"0.67145723",
"0.6687107",
"0.66505486",
"0.6643757",
"0.66029626",
"0.65981174",
"0.65748453",
"0.6572366",
"0.6550759",
"0.652202",
"0.6506907",
"0.65013653",
"0.6500998",
"0.64785224",
"0.64723045",
"0.64703393",
"0.6449808",
"0.6448741",
"0.6446... | 0.6485144 | 15 |
Performs the backward pass of the L1 loss function. | def ZD5u(YKHO, _Iob, eZic):
ICX2 = None
ICX2 = oyIN.where(not oyIN.all(_Iob == 0), 0, 1e-18)
return ICX2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fIbT(YKHO, N77f):\n YKHO.optimizer.zero_grad()\n YKHO.optimizer.backward(N77f)\n YKHO.optimizer.step()",
"def P0TR(N77f):\n N77f.backward()",
"def SU2j(YKHO, N77f):\n YKHO.opt.zero_grad()\n N77f.backward()\n YKHO.opt.step()",
"def BgaU(YKHO):\n YKHO.loss_D.backward()",
"def u97B... | [
"0.7829394",
"0.7614116",
"0.7377019",
"0.7323652",
"0.730343",
"0.7257266",
"0.7231584",
"0.72029597",
"0.71579987",
"0.710414",
"0.70944566",
"0.7085781",
"0.70661736",
"0.6946666",
"0.6946666",
"0.69433695",
"0.6833876",
"0.6812968",
"0.67766273",
"0.6764659",
"0.674349",
... | 0.62443656 | 84 |
Performs the backward pass of the loss function. | def ZD5u(YKHO, _Iob, eZic):
ICX2 = None
ICX2 = -1 * (oyIN.multiply(eZic, oyIN.divide(1, _Iob)) - oyIN.multiply(1 - eZic, oyIN.divide(1, 1 - _Iob)))
return ICX2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fIbT(YKHO, N77f):\n YKHO.optimizer.zero_grad()\n YKHO.optimizer.backward(N77f)\n YKHO.optimizer.step()",
"def P0TR(N77f):\n N77f.backward()",
"def SU2j(YKHO, N77f):\n YKHO.opt.zero_grad()\n N77f.backward()\n YKHO.opt.step()",
"def ZD5u(YKHO, N77f):\n bmnz.my_timer.start_profile('B... | [
"0.85558826",
"0.8452244",
"0.80646175",
"0.80081743",
"0.79074144",
"0.782004",
"0.7805677",
"0.7795026",
"0.7746016",
"0.768947",
"0.7677231",
"0.7633204",
"0.7633204",
"0.7600017",
"0.7560247",
"0.7532067",
"0.7532067",
"0.74631304",
"0.74398345",
"0.74051845",
"0.7382091"... | 0.69497526 | 50 |
Validate characters for the provided alias. | def X4HY(YKHO):
vbQv = YKHO.cleaned_data.get('alias')
if not bool(ZbWC.compile('^[a-zA-Z0-9-]+$').match(vbQv)):
raise H6V6.ValidationError('Alias contains invalid characters')
return vbQv | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DyhL(hcXw, mWFP, SGPK):\n if hcXw in mWFP:\n raise NameError('Invalid character in the variable name: ' + mWFP)\n for ZfUD in SGPK.keys():\n if hcXw in ZfUD:\n raise NameError('Invalid character in the variable parameters: ' + ZfUD)",
"def puir(L03z, Jyyj):\n if not Jyyj.dat... | [
"0.66764194",
"0.662183",
"0.6502785",
"0.64648443",
"0.6438361",
"0.6437747",
"0.6382608",
"0.6377143",
"0.6376573",
"0.6256093",
"0.6225624",
"0.6191249",
"0.61696607",
"0.6159029",
"0.61316186",
"0.61009514",
"0.6095541",
"0.6092223",
"0.60531527",
"0.6037803",
"0.6018155"... | 0.78793395 | 0 |
Test that a user can add a bucket | def DecD(YKHO):
with YKHO.client:
YKHO.create_bucket(YKHO.get_user_token()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Irqc(YKHO):\n bBr4.bucket.Bucket.create('new_bucket', YKHO.context)\n WE7e = bBr4.bucket.Bucket('new_bucket')\n YKHO.assert_(WE7e.is_authorized(YKHO.context))\n hqD_ = QpfX.RequestContext('user2', 'proj2')\n YKHO.assertFalse(WE7e.is_authorized(hqD_))\n ii1P = QpfX.RequestContext('admin_user',... | [
"0.7763606",
"0.77099466",
"0.7086688",
"0.7003638",
"0.6886021",
"0.6864985",
"0.68597794",
"0.68041325",
"0.6786825",
"0.6734436",
"0.66748255",
"0.66228974",
"0.65437603",
"0.6510135",
"0.65068775",
"0.6502714",
"0.6474747",
"0.6473299",
"0.6466394",
"0.6443089",
"0.642757... | 0.80832076 | 0 |
Test there is no bucket/no bucket returned with given Id | def t3XC(YKHO):
with YKHO.client:
eOtH = YKHO.get_user_token()
geh0 = YKHO.client.get('/bucketlists/1', headers=dict(Authorization='Bearer ' + eOtH))
nPrm = qQXR.loads(geh0.data.decode())
YKHO.assertEqual(geh0.status_code, 200)
YKHO.assertTrue(nPrm['status'] == 'success')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C62X(YKHO):\n Ylbp = YKHO.client().get(f'/bucketlist/99')\n YKHO.assertEqual(Ylbp.status_code, 404)",
"def c3k_(YKHO):\n pass",
"def cXKT(YKHO):\n with YKHO.client:\n geh0 = YKHO.client.delete('/bucketlists/1', headers=dict(Authorization='Bearer ' + YKHO.get_user_token()))\n nPrm ... | [
"0.7713271",
"0.71432155",
"0.7107075",
"0.70750123",
"0.6986567",
"0.6849585",
"0.6821341",
"0.6737777",
"0.6546235",
"0.6531086",
"0.65217876",
"0.65036184",
"0.6452373",
"0.64255",
"0.64049375",
"0.63744843",
"0.63696444",
"0.63232464",
"0.6296747",
"0.62818104",
"0.625737... | 0.77902484 | 0 |
Show tha a 404 response is returned when an un existing bucket is being deleted. | def cXKT(YKHO):
with YKHO.client:
geh0 = YKHO.client.delete('/bucketlists/1', headers=dict(Authorization='Bearer ' + YKHO.get_user_token()))
nPrm = qQXR.loads(geh0.data.decode())
YKHO.assertEqual(geh0.status_code, 404)
YKHO.assertTrue(nPrm['status'] == 'failed')
YKHO.assertTr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uqTw(*bGrB, **IaaG):\n tTpl = gP7g.exception.S3ResponseError(400, 'missing')\n tTpl.error_code = 'NoSuchBucket'\n raise tTpl",
"def _4cr(YKHO):\n h2IT.add(h2IT.Response(method='DELETE', url='https://connection.keboola.com/v2/storage/buckets/1?force=False&async=False', json={}))\n cMrz = '1'\n ... | [
"0.684705",
"0.67667437",
"0.6481858",
"0.64196914",
"0.64190435",
"0.63951874",
"0.62681764",
"0.6158347",
"0.61309874",
"0.6055331",
"0.6046032",
"0.6043882",
"0.60398084",
"0.599907",
"0.5997249",
"0.59945416",
"0.5963344",
"0.59540546",
"0.59325296",
"0.5919325",
"0.59189... | 0.7230822 | 0 |
Test that the Bucket details(name) is updated | def ikWH(YKHO):
with YKHO.client:
eOtH = YKHO.get_user_token()
geh0 = YKHO.client.post('/bucketlists', data=qQXR.dumps(dict(name='Travel')), headers=dict(Authorization='Bearer ' + eOtH), content_type='application/json')
nPrm = qQXR.loads(geh0.data.decode())
YKHO.assertEqual(geh0.stat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zY_w(YKHO):\n pass",
"def YmAT(YKHO):\n pass",
"def hj16(YKHO):\n with YKHO.client:\n eOtH = YKHO.get_user_token()\n Ylbp = YKHO.client.put('/bucketlists/bucketid', headers=dict(Authorization='Bearer ' + eOtH), data=qQXR.dumps(dict(name='Adventure')), content_type='application/json')... | [
"0.8708406",
"0.79123294",
"0.76828593",
"0.76591843",
"0.7471502",
"0.742757",
"0.7048196",
"0.6995496",
"0.6977668",
"0.68588907",
"0.68556577",
"0.682883",
"0.6799105",
"0.678763",
"0.67652243",
"0.675332",
"0.67003673",
"0.66971505",
"0.66387427",
"0.6615255",
"0.65860766... | 0.87999487 | 0 |
Test the bucket to be updated does not exist. | def klsU(YKHO):
with YKHO.client:
eOtH = YKHO.get_user_token()
Ylbp = YKHO.client.put('/bucketlists/1', headers=dict(Authorization='Bearer ' + eOtH), data=qQXR.dumps(dict(name='Adventure')), content_type='application/json')
nPrm = qQXR.loads(Ylbp.data.decode())
YKHO.assertEqual(Ylbp.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s85n(YKHO):\n YKHO.client.post('/buckets', content_type='application/json', data=YKHO.bucket, headers=YKHO.header)\n YKHO.client.post('/buckets/1/items', content_type='application/json', data=YKHO.item, headers=YKHO.header)\n geh0 = YKHO.client.delete('/buckets/2/items/1', headers=YKHO.header)\n YK... | [
"0.71295375",
"0.6940976",
"0.6899412",
"0.6776305",
"0.677003",
"0.67556757",
"0.6668342",
"0.66050065",
"0.6603274",
"0.6497684",
"0.6497437",
"0.64860666",
"0.64646524",
"0.6431992",
"0.64307004",
"0.64276284",
"0.6400218",
"0.63427407",
"0.6283145",
"0.6276225",
"0.627147... | 0.7745154 | 0 |
Test that the content type used for the request is application/json | def imJt(YKHO):
with YKHO.client:
eOtH = YKHO.get_user_token()
Ylbp = YKHO.client.put('/bucketlists/1', headers=dict(Authorization='Bearer ' + eOtH), data=qQXR.dumps(dict(name='Adventure')))
nPrm = qQXR.loads(Ylbp.data.decode())
YKHO.assertEqual(Ylbp.status_code, 202)
YKHO.as... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T9Qk():\n return QePW.content_type == 'application/json'",
"def eHEG(QePW: HttpRequest):\n lY0q = QePW.content_type\n return lY0q == 'application/json' or (lY0q.startswith('application/') and lY0q.endswith('+json'))",
"def eHEG(YKHO):\n ZYEE = YKHO.mimetype or YKHO.headers.get('Accept')\n if... | [
"0.8551049",
"0.8006421",
"0.7867867",
"0.76065797",
"0.75816983",
"0.7569212",
"0.7562776",
"0.74854827",
"0.7244852",
"0.7199992",
"0.71933126",
"0.7142546",
"0.7047551",
"0.69829714",
"0.6978315",
"0.69091946",
"0.6815024",
"0.6762803",
"0.6756431",
"0.6753268",
"0.6690397... | 0.7023403 | 13 |
Test that a Bucket is deleted successfully | def Mb7M(YKHO):
with YKHO.client:
eOtH = YKHO.get_user_token()
geh0 = YKHO.client.post('/bucketlists', data=qQXR.dumps(dict(name='Travel')), headers=dict(Authorization='Bearer ' + eOtH), content_type='application/json')
nPrm = qQXR.loads(geh0.data.decode())
YKHO.assertEqual(geh0.stat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mMq2(YKHO):\n pass",
"def _4cr(YKHO):\n h2IT.add(h2IT.Response(method='DELETE', url='https://connection.keboola.com/v2/storage/buckets/1?force=False&async=False', json={}))\n cMrz = '1'\n a32B = YKHO.buckets.delete(cMrz, asynchronous=False)\n assert a32B is None",
"def hB5L(R22P):\n R22P.... | [
"0.8918379",
"0.8679143",
"0.81490856",
"0.80459154",
"0.79044837",
"0.7776505",
"0.77320004",
"0.763795",
"0.7605917",
"0.75812054",
"0.75642914",
"0.7472303",
"0.73590463",
"0.7358934",
"0.733549",
"0.72955567",
"0.72792494",
"0.72073174",
"0.7198382",
"0.7176627",
"0.71275... | 0.8728136 | 1 |
Create a new application object. The database and CLI are automatically wired up. If ``config_filename`` or ``config_object`` are not ``None`` they | def LUif(AeFH=None, Sbbm=None):
P4t4 = L2w0(__name__)
P4t4.config.from_object('psephology.config.default')
if AeFH is not None:
P4t4.config.from_pyfile(AeFH)
if Sbbm is not None:
P4t4.config.from_object(Sbbm)
NCls.init_app(P4t4)
USZ9.init_app(P4t4, NCls, render_as_batch=True)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LUif(mb_k=sToe):\n P4t4 = L2w0(__name__)\n P4t4.config.from_object(mb_k)\n hJ8g(P4t4)\n zqKm(P4t4)\n Wwlc(P4t4)\n sOaE(P4t4)\n Xjfs(P4t4)\n return P4t4",
"def LUif(Sbbm=PSrQ):\n P4t4 = L2w0(__name__.split('.')[0], static_folder='../client/build/static', template_folder='../client/b... | [
"0.7304309",
"0.724927",
"0.7132455",
"0.7007617",
"0.69696975",
"0.68736166",
"0.68637097",
"0.6826989",
"0.67556334",
"0.674993",
"0.6724784",
"0.6704176",
"0.66930896",
"0.6637348",
"0.6634328",
"0.6627209",
"0.6620914",
"0.6619785",
"0.6618544",
"0.6595053",
"0.65865695",... | 0.78656185 | 0 |
Assume embeddiing has nbatch x max_atom x n_dims mask has nbatch x max_atom | def Fw3A(YKHO, Q1PJ, ZHfW, mWFP=''):
with ZylS.variable_scope('attn_' + mWFP):
nMvt = YKHO.get_trans_param('K')
T8ck = YKHO.get_trans_param('Q')
cAlv = YKHO.get_trans_param('V')
sBqy = ZylS.einsum('nml,lk->nmk', Q1PJ, nMvt)
xfFo = ZylS.einsum('nml,lk->nmk', Q1PJ, T8ck)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dBuj(Q1PJ, tsWk):\n lam0 = IPme.last_dim_weighted_sum(Q1PJ, 'w')\n lam0 = IPme.mask_logits(lam0, tsWk)\n lam0 = ZylS.expand_dims(ZylS.nn.softmax(lam0), 1)\n return ZylS.squeeze(ZylS.matmul(lam0, Q1PJ), 1)",
"def KVH6(YKHO, input, ZHfW, u54L):\n BcCR = u54L.max()\n Ep8u = input.shape[0]\n ... | [
"0.6692591",
"0.6459019",
"0.6335892",
"0.6118211",
"0.60688734",
"0.60625243",
"0.60481936",
"0.59835744",
"0.5980937",
"0.5863645",
"0.58461136",
"0.5833285",
"0.5815252",
"0.5805961",
"0.57885605",
"0.5788423",
"0.577147",
"0.57709837",
"0.5766963",
"0.5750837",
"0.5749588... | 0.5996511 | 7 |
Creates the classification visualizer. | def FIMM(YKHO, dsCP: int=5, *qIxc, **B2fa):
super().__init__('Real time classification visualizer', *qIxc, **B2fa)
Cj4z = YKHO.inputs_specs['classification_data']
YKHO.class_names = Cj4z['class_names']
YKHO.top_n = dsCP | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yera(YKHO):\n M05X(Hy7s.path.join(YKHO.__path, 'test.csv'), YKHO.__rang, YKHO.__numeric, YKHO.__statistics, YKHO.__k, YKHO.__classes, YKHO.__abs_n, YKHO)\n YKHO.view.Build_Button.configure(state='active')",
"def SoTS(GxsC):\n vHj7 = qcWV.now().strftime('%Y-%m-%d_%H-%M-%S')\n gIsw = 'raw_dump_{0}.... | [
"0.6425579",
"0.61953336",
"0.61389655",
"0.6129537",
"0.59203684",
"0.5904309",
"0.58877313",
"0.5859866",
"0.5830613",
"0.5827389",
"0.5809543",
"0.5774925",
"0.5754018",
"0.56999975",
"0.56976795",
"0.5654992",
"0.5654484",
"0.5652847",
"0.56334454",
"0.56249714",
"0.56149... | 0.60467935 | 4 |
Helper function to append composite tensors to each other in the 0 axis. In order to support batching within a fit/evaluate/predict call, we need to be able to aggregate within a CompositeTensor. Unfortunately, the CT API currently does not make this easy especially in V1 mode, where we're working with CompositeTensor ... | def S6Tz(pan_, rw9J):
if type(pan_) is not type(rw9J):
raise RuntimeError('Unable to concatenate %s and %s' % (type(pan_), type(rw9J)))
if isinstance(pan_, BtZX.SparseTensor):
return hixH.sparse_concat(sp_inputs=[pan_, rw9J], axis=0)
elif isinstance(pan_, c1ZF.RaggedTensor):
return _... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MPiJ(cRc2, jDK_=0):\n raise NotImplementedError",
"def SJtA():\n WKvO = ZylS.keras.Input(shape=[10, 10, 3])\n o4D3 = ZylS.keras.layers.Conv2D(5, (2, 2))(WKvO)\n ajwV = ZylS.keras.layers.Conv2D(6, (2, 2))(WKvO)\n rNcn = ZylS.keras.layers.Conv2D(7, (2, 2))(WKvO)\n epBp = ZylS.keras.layers.con... | [
"0.6782832",
"0.6158586",
"0.6154764",
"0.6153678",
"0.61383915",
"0.6124244",
"0.60853636",
"0.5964189",
"0.5964189",
"0.5943198",
"0.58413076",
"0.5831469",
"0.5757137",
"0.5747809",
"0.5743722",
"0.5737976",
"0.57355106",
"0.5723419",
"0.5676435",
"0.5659987",
"0.5649936",... | 0.6515346 | 1 |
Legacy utility method to slice input arrays. | def Zf4n(YKHO, Cj_Q, Q4JG, RuGV, IXlb):
try:
YKHO.results[Q4JG:RuGV] = Cj_Q
except Exception as e:
YKHO._errors.append(tTpl)
finally:
IXlb.set() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def B7J_(DumB, XOOk, pHXX=None):\n if pHXX is None:\n return DumB[XOOk:]\n else:\n return DumB[XOOk:pHXX]",
"def o4H4(YKHO, g4y1, dTLt):\n _9an = dTLt.get('begin')\n Os4s = dTLt.get('end')\n MPlV = dTLt.get('axis', tuple(range(len(_9an))))\n F5ei = RsfQ.sym.slice_axis(g4y1[0], axi... | [
"0.72107875",
"0.6629543",
"0.6146551",
"0.6092164",
"0.60912913",
"0.6087721",
"0.60780793",
"0.60098535",
"0.5985206",
"0.5980164",
"0.59576505",
"0.59540904",
"0.5948342",
"0.5926323",
"0.5893846",
"0.58470637",
"0.58464056",
"0.5782253",
"0.5768264",
"0.57507706",
"0.5708... | 0.0 | -1 |
Returns the metric function corresponding to the given metric input. | def P7BO(AcYW, oLRV=None, GT2U=None):
if AcYW not in ['accuracy', 'acc', 'crossentropy', 'ce']:
return mOem.get(AcYW)
GRgJ = isinstance(GT2U, N8L0.SparseCategoricalCrossentropy) or (isinstance(GT2U, N8L0.LossFunctionWrapper) and GT2U.fn == N8L0.sparse_categorical_crossentropy)
tl1N = isinstance(GT2U... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CMtP(AcYW):\n Wbxz = {'accuracy': vjyh, 'acc': vjyh, 'mean_squared_error': SDab, 'mse': SDab, 'sum_squared_error': SrJB, 'sse': SrJB, 'mean_absolute_error': W4jA, 'mae': W4jA, 'r_squared': whQk, 'r2': whQk, 'recall': W4lg, 'sensitivity': W4lg, 'true_positive_rate': W4lg, 'tpr': W4lg, 'specificity': m7GV, 's... | [
"0.79478264",
"0.773909",
"0.7693249",
"0.7484452",
"0.74728703",
"0.7415086",
"0.67947537",
"0.65703934",
"0.65485346",
"0.6375187",
"0.6344244",
"0.6344244",
"0.6344244",
"0.6344244",
"0.6344244",
"0.6344244",
"0.6344244",
"0.6344244",
"0.6344244",
"0.63227123",
"0.63181776... | 0.707597 | 6 |
Validates `steps` argument based on input data's type. The cases when `steps` value must be provided are when 1. input data passed is an iterator. 2. model was built on top of symbolic tensors, input data is not required and is `None`. 3. input data passed is a symbolic tensor. | def nQ9L(WbAn, paSp, XjZk):
Py6b = isinstance(WbAn, (Mv2k.Iterator, Mv2k.IteratorBase))
if WbAn is None or Py6b or NaqN(WbAn) or (isinstance(WbAn, list) and (not WbAn)):
if paSp is None:
tGlI = 'a Dataset iterator' if Py6b else 'data tensors'
raise ValueError('When using {input_t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f5_K(C3ST, __n6, paSp, HasU=1, XjZk='steps'):\n assert isinstance(__n6, eh_L.DatasetV2)\n if C3ST._in_multi_worker_mode() and __n6.options().experimental_distribute.auto_shard_policy != zojh.AutoShardPolicy.OFF:\n return None\n zNig = DDLl.get_value(SF_z.cardinality(__n6))\n if zNig == SF_z.... | [
"0.59339863",
"0.58530223",
"0.5575207",
"0.55042255",
"0.54675263",
"0.543106",
"0.5414612",
"0.5392719",
"0.5344477",
"0.5334092",
"0.53208137",
"0.5320611",
"0.5308681",
"0.5301851",
"0.5241938",
"0.52040267",
"0.5100234",
"0.50522053",
"0.50399315",
"0.50380796",
"0.50061... | 0.79893106 | 0 |
Prepares sample weight modes for the model. | def KFJQ(w7xO, a5Ec):
if isinstance(a5Ec, g760.abc.Mapping):
mypU.check_for_unexpected_keys('sample_weight_mode', a5Ec, [tTpl.output_name for tTpl in w7xO])
for eyHp in w7xO:
if not eyHp.should_skip_target_weights():
if eyHp.output_name not in a5Ec:
ra... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vTXJ(YKHO):\n for r8hN in YKHO.modules():\n if isinstance(r8hN, U78l.ConvTranspose2d):\n U78l.init.kaiming_normal_(r8hN.weight)\n elif isinstance(r8hN, U78l.BatchNorm2d):\n U78l.init.constant_(r8hN.weight, 1.0)\n U78l.init.constant_(r8hN.bias, 0.0)",
"def vB9... | [
"0.6787136",
"0.67559147",
"0.673324",
"0.6547644",
"0.63690925",
"0.63519377",
"0.6348145",
"0.63220274",
"0.63203686",
"0.62991184",
"0.6271092",
"0.6253546",
"0.6243629",
"0.6194683",
"0.61855793",
"0.61775434",
"0.6174475",
"0.6174475",
"0.6174475",
"0.6166436",
"0.614962... | 0.74049 | 0 |
Unpack validation data based input type. The validation data is not touched if its dataset or dataset iterator. For other type of input (Numpy or tensor), it will be unpacked into tuple of 3 which is x, y and sample weights. | def ryL0(G91x, BiUq=True):
if isinstance(G91x, (Mv2k.Iterator, Mv2k.IteratorBase, eh_L.DatasetV2, Nhuv.Sequence)) or not hasattr(G91x, '__len__'):
HzBr = G91x
Cnwh = None
FA13 = None
elif len(G91x) == 2:
try:
HzBr, Cnwh = G91x
FA13 = None
except Va... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def P4tW(oHE7):\n try:\n QNle = oHE7.get_next()\n except UAju.OutOfRangeError:\n raise RuntimeError('Your dataset iterator ran out of data; Make sure that your dataset can generate required number of samples.')\n if isinstance(QNle, (list, tuple)):\n if len(QNle) not in [2, 3]:\n ... | [
"0.68664455",
"0.6166854",
"0.60683525",
"0.59711117",
"0.59358513",
"0.5912676",
"0.57879007",
"0.57307273",
"0.5716732",
"0.56955814",
"0.5685819",
"0.5651088",
"0.56367314",
"0.5515616",
"0.5505022",
"0.5504365",
"0.5449258",
"0.5449258",
"0.54394317",
"0.54169995",
"0.541... | 0.7501216 | 0 |
Returns the loss value & metrics values for the model in test mode. | def b7La(YKHO, C3ST, WKvO=None, LVAh=None, Ep8u=None, PJWX=1, xF06=None, paSp=None, oL5I=None, **B2fa):
raise NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ObOY(YKHO, Zwka, s8RJ, PJWX=2):\n YSue, O0vV = YKHO.model.evaluate(Zwka, s8RJ, verbose=PJWX)\n return (YSue, O0vV)",
"def QOe9(YKHO):\n YKHO.eval()\n FPWK = YKHO.data.test_mask\n Crrw = YKHO.data.y\n hlel = YKHO.forward(YKHO.data)\n Bt1A = vuvg.nll_loss(hlel[FPWK], Crrw[FPWK])\n DAUD ... | [
"0.70213044",
"0.67979884",
"0.6788402",
"0.67791986",
"0.6728958",
"0.6678472",
"0.66340625",
"0.66176784",
"0.6560534",
"0.65578383",
"0.65578353",
"0.65380776",
"0.65049046",
"0.6456377",
"0.6447112",
"0.6443894",
"0.64180607",
"0.64137375",
"0.6403959",
"0.6340312",
"0.63... | 0.0 | -1 |
Check if a given string contains whitespaces. | def B2ZZ(vIwR):
if not isinstance(vIwR, SfON):
print(str(vIwR) + ' (' + str(type(vIwR)) + ') is not a string!')
return False
R3Nt = False
for hcXw in vIwR:
R3Nt |= hcXw.isspace()
return R3Nt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZezY(vIwR):\n ycBG = vIwR.split()\n return len(ycBG) > 1",
"def ZezY(KCHu):\n for Z9rn in vIwR.whitespace:\n if Z9rn in KCHu:\n return True\n return False",
"def VwKB(hcXw):\n if hcXw == ' ' or hcXw == '\\t' or hcXw == '\\n' or (hcXw == '\\r'):\n return True\n ACi... | [
"0.8325304",
"0.83044946",
"0.7461919",
"0.7412087",
"0.7411359",
"0.7358462",
"0.72656137",
"0.726428",
"0.72127455",
"0.71294475",
"0.69387496",
"0.69273835",
"0.6861504",
"0.67393714",
"0.66792136",
"0.6621741",
"0.66149664",
"0.6581993",
"0.6578152",
"0.6538422",
"0.65273... | 0.8583922 | 0 |
Check if a given surface dictonary is valid. In the sence, that the contained data is consistent. Checks for correct polyline, surface and volume definitions Point duplicates are not checked. | def T4eZ(_gxl, Xthj, PJWX=True):
if PJWX:
print(' checking surface for validity')
print(' -----------------------------')
if not isinstance(_gxl, dict):
if PJWX:
print(' srf is not of type dict')
return False
RZ41 = set(_gxl)
if RZ41 == DjeQ:
if PJW... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A1Mv(c9Fj, sLDC, PJWX=True):\n if PJWX:\n print(' checking polyline for validity')\n print(' ------------------------------')\n if not isinstance(c9Fj, dict):\n if PJWX:\n print(' ply is not of type dict')\n return False\n fr2r = set(c9Fj)\n if fr2r == UijS... | [
"0.61833507",
"0.61710864",
"0.59076947",
"0.5878474",
"0.58475614",
"0.5732541",
"0.5693828",
"0.5688629",
"0.5670729",
"0.56633466",
"0.5647805",
"0.5646256",
"0.5634864",
"0.5624424",
"0.5621362",
"0.5607812",
"0.5600887",
"0.5567264",
"0.5545857",
"0.55367696",
"0.55341",... | 0.72668934 | 0 |
Get the decoder model. | def BeOM(YKHO, mWFP, Fi_Q, bAsM=False, Kz5H=None, XcU5=None, Fg_i=None, **B2fa):
if bAsM:
XcU5 = YKHO.transpose_initializers(YKHO.layer_weights)
else:
XcU5 = YKHO.transpose_initializers(XcU5 or YKHO.W)
Fg_i = YKHO.transpose_initializers(YKHO.b)
GhuM = YKHO.input_shapes[0]
oLRV = GhuM... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wLnK(YKHO):\n raise NotImplementedError()",
"def YrZb(ad8h: Model, LDJ4: int) -> wOed:\n tpio = 256\n KppT = iHrl(tpio, return_sequences=True, return_state=True)\n GBdh = l6ZH(LDJ4, activation='softmax')\n miyH = ad8h.input[0]\n p83V, lLvX, Mrsp = ad8h.layers[2].output\n TYj5 = [lLvX, Mr... | [
"0.73370683",
"0.67943585",
"0.67807484",
"0.6561833",
"0.6492715",
"0.6368078",
"0.6362944",
"0.6335992",
"0.6335992",
"0.63025224",
"0.6300246",
"0.62971294",
"0.628067",
"0.6262798",
"0.6215624",
"0.6190132",
"0.6188353",
"0.61860156",
"0.6185913",
"0.6185913",
"0.6185913"... | 0.0 | -1 |
Return a list of the local policies | def OKeV(YKHO):
return YKHO.con.list_policies(Scope='Local') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MImZ():\n Qabx = som_.values()\n return Qabx",
"def OKeV(YKHO):\n x0hE = YKHO.connect(JBXb)\n return x0hE.list_policies()",
"def som_(YKHO):\n return YKHO._data.get('policies')",
"def som_(YKHO):\n return YKHO._policies",
"def fguu(YKHO):\n return tuple(YKHO._policies.keys())",
"... | [
"0.74049133",
"0.7387466",
"0.6957433",
"0.69073826",
"0.6891879",
"0.6777323",
"0.6552722",
"0.6544682",
"0.6470436",
"0.6445166",
"0.641071",
"0.63633364",
"0.63262874",
"0.62828547",
"0.6272366",
"0.61944973",
"0.6175624",
"0.6136246",
"0.6113518",
"0.6105507",
"0.6082833"... | 0.8060352 | 0 |
Serialize a dict to JSON. | def fyZH(YKHO, BWXx: Optional[dict], pMVb: str) -> h8nf[str]:
if BWXx is not None:
YEnM: h8nf[str] = ZMzz.dumps(BWXx)
else:
YEnM = BWXx
return YEnM | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uFP2(Op6c):\n return qQXR.dumps(Op6c)",
"def uFP2(mUif: dict):\n return qQXR.dumps(Mkmy)",
"def V_Cx(Csk6):\n FUjE = '{'\n for G1Hx in Csk6:\n FUjE += f'\"{G1Hx}\":'\n if isinstance(Csk6[G1Hx], dict):\n FUjE += V_Cx(Csk6[G1Hx])\n if isinstance(Csk6[G1Hx], str):\n... | [
"0.80408686",
"0.7433592",
"0.7214761",
"0.71581805",
"0.70764846",
"0.6927942",
"0.6894137",
"0.6888428",
"0.6849501",
"0.68391097",
"0.6801657",
"0.66795933",
"0.66752046",
"0.66752046",
"0.66499937",
"0.66101366",
"0.6604802",
"0.6604802",
"0.6588156",
"0.65229344",
"0.651... | 0.0 | -1 |
Given new batch x and kl divergence for previous minibatch l_old compute l_new and perform statistical test Returns l_new and indicator of significance (0 or 1) | def vhjU(YKHO, WKvO, A8z8):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bISY(YKHO, oB1e, i4CU):\n FSSM = oB1e['prob']\n FP_n = i4CU['prob']\n return oyIN.sum(FSSM * (oyIN.log(FSSM + E0fg) - oyIN.log(FP_n + E0fg)), axis=2)",
"def dzAH(Y8eF, aMgO):\n aMgO = ui9o.convert_to_tensor_v2_with_dispatch(aMgO)\n Y8eF = qkSJ.cast(Y8eF, aMgO.dtype)\n Y8eF = DDLl.clip(Y8eF,... | [
"0.6649235",
"0.66004366",
"0.6290447",
"0.6256187",
"0.6230011",
"0.6192192",
"0.6158242",
"0.6120937",
"0.6067348",
"0.6055149",
"0.6041087",
"0.6019769",
"0.6001965",
"0.5993864",
"0.5960585",
"0.59601283",
"0.5935002",
"0.59210587",
"0.58922064",
"0.5889051",
"0.5880926",... | 0.0 | -1 |
Creates the list of environments to read | def eYjt(YEnM, sEAN):
xjKY = [YEnM.get('DEFAULT_ENV_FOR_DYNACONF')]
ibIG = YEnM.get('ENVVAR_PREFIX_FOR_DYNACONF') or 'DYNACONF'
if ibIG not in xjKY:
xjKY.append(ibIG)
if YEnM.current_env and YEnM.current_env not in xjKY:
xjKY.append(YEnM.current_env)
if sEAN and sEAN not in xjKY:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NS0n() -> x1iM[Jcv3]:\n KFiq = GkAb(xAKo).parent.resolve().parents[1] / GkAb(bREm)\n if not KFiq.exists():\n raise FileNotFoundError(f'Program requires the environments file to function. Expect file in\\n{KFiq.as_posix()}')\n Twf1 = []\n try:\n with KFiq.open('rt', encoding='utf-8') a... | [
"0.7622789",
"0.750219",
"0.7284712",
"0.71755797",
"0.7108447",
"0.66121197",
"0.6584707",
"0.65297395",
"0.64933014",
"0.6480451",
"0.6373208",
"0.6339303",
"0.632256",
"0.6308522",
"0.6295996",
"0.6282537",
"0.62542",
"0.62076545",
"0.60843724",
"0.60797125",
"0.60684603",... | 0.57863575 | 49 |
Parse a JSON literal. | def kLRn(depL: str) -> uLKX[bool, None]:
ccBJ = {'true': True, 'false': False, 'null': None}
if depL in ccBJ:
return ccBJ[depL]
else:
raise ValueError(f'Unknown JSON literal: {depL}') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Nw5e(zEKB):\n return FDBH(HjBM.loads(zEKB))",
"def hfK9(zEKB: str) -> object:\n s2mk = wr3U(zEKB)\n BWXx = Gs92(s2mk)\n if len(s2mk) != 0:\n raise _OuM(f'Invalid JSON at {s2mk[0].value} (line {s2mk[0].line} column {s2mk[0].column})')\n return BWXx",
"def tU6l(KCHu):\n return qQXR.l... | [
"0.6902593",
"0.6771398",
"0.6647518",
"0.66263795",
"0.6503923",
"0.64619076",
"0.6460247",
"0.64163506",
"0.6382355",
"0.633544",
"0.633544",
"0.633544",
"0.6329697",
"0.6329697",
"0.6329697",
"0.63275075",
"0.6314731",
"0.63070565",
"0.6297665",
"0.6296732",
"0.6247262",
... | 0.0 | -1 |
Get a specific comment to be updated, the primary key and the title will be taken off the Url. | def m07J(YKHO):
return gxEw('post-detail', kwargs={'pk': YKHO.get_object().question.pk, 'title': YKHO.get_object().question.title}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZsdS(YKHO, pQGt, **qIxc):\n return YKHO.fetch('/comment/' + pQGt, **qIxc)",
"def qKKT():\n bo34.info('vars: %r' % QePW.vars)\n bo34.info('vars_comment_text: %r' % QePW.vars.comment_text)\n bo34.info('vars id: %r' % QePW.vars.comment_id)\n bo34.info('comment_text: %r' % NCls(NCls.Comments.id ==... | [
"0.6965776",
"0.6900841",
"0.6809709",
"0.6746965",
"0.6733224",
"0.67144364",
"0.66943145",
"0.66239774",
"0.64527833",
"0.6398007",
"0.63505644",
"0.63204175",
"0.62310016",
"0.6200477",
"0.6180449",
"0.6180449",
"0.61686206",
"0.6146795",
"0.61176103",
"0.6110255",
"0.6093... | 0.0 | -1 |
Returns an int64_list from a bool / enum / int / uint. | def Oety(BWXx):
RDhP = ZylS.train.Feature(int64_list=ZylS.train.Int64List(value=BWXx))
return RDhP | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Kmpz(FiiE):\n Aofo = []\n for d7pR in FiiE:\n if isinstance(d7pR, (list, tuple)):\n Aofo.append(Kmpz(d7pR))\n elif d7pR is True:\n Aofo.append(1)\n elif d7pR is False:\n Aofo.append(0)\n else:\n Aofo.append(d7pR)\n return Aofo",
... | [
"0.6880445",
"0.6595397",
"0.64601403",
"0.6447067",
"0.63662434",
"0.62912166",
"0.62706554",
"0.62156785",
"0.6104905",
"0.5951909",
"0.5947005",
"0.590078",
"0.58633447",
"0.58633447",
"0.5856222",
"0.58450794",
"0.58430177",
"0.5829417",
"0.580021",
"0.57930773",
"0.57930... | 0.5438856 | 70 |
Initialize weights for the network | def kgk6(YKHO, r8hN):
mPQc = r8hN.__class__.__name__
if hasattr(r8hN, 'weight') and (mPQc.find('Conv') == 0 or mPQc.find('Linear') == 0):
U78l.init.normal_(r8hN.weight.data, mean=0.0, std=0.02)
if hasattr(r8hN, 'bias') and r8hN.bias is not None:
U78l.init.constant_(r8hN.bias.data, va... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C0Lv(YKHO):\n pass",
"def sTi3(YKHO):\n dIoi.WeightsInitializer.initialize_layer_or_model(YKHO._batch)",
"def vB93(YKHO):\n YKHO.apply(YKHO._init_weights)",
"def vB93(YKHO):\n YKHO.apply(YKHO._init_weights)\n YKHO.tie_weights()",
"def vJuA(YKHO):\n raise NotImplementedError",
"def s... | [
"0.8968514",
"0.8656998",
"0.8628366",
"0.86096615",
"0.8597106",
"0.840778",
"0.83443516",
"0.82856405",
"0.82795066",
"0.8276653",
"0.826437",
"0.8250069",
"0.82463634",
"0.82372063",
"0.82357705",
"0.8221339",
"0.8187596",
"0.8108354",
"0.807981",
"0.8069943",
"0.80248153"... | 0.0 | -1 |
Initialize weights for the network | def ICxv(YKHO, r8hN):
mPQc = r8hN.__class__.__name__
if hasattr(r8hN, 'weight') and (mPQc.find('Conv') == 0 or mPQc.find('Linear') == 0):
U78l.init.kaiming_normal_(r8hN.weight.data, a=0, mode='fan_in')
if hasattr(r8hN, 'bias') and r8hN.bias is not None:
U78l.init.constant_(r8hN.bias.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C0Lv(YKHO):\n pass",
"def sTi3(YKHO):\n dIoi.WeightsInitializer.initialize_layer_or_model(YKHO._batch)",
"def vB93(YKHO):\n YKHO.apply(YKHO._init_weights)",
"def vB93(YKHO):\n YKHO.apply(YKHO._init_weights)\n YKHO.tie_weights()",
"def vJuA(YKHO):\n raise NotImplementedError",
"def s... | [
"0.8968514",
"0.8656998",
"0.8628366",
"0.86096615",
"0.8597106",
"0.840778",
"0.83443516",
"0.82856405",
"0.82795066",
"0.8276653",
"0.826437",
"0.8250069",
"0.82463634",
"0.82372063",
"0.82357705",
"0.8221339",
"0.8187596",
"0.8108354",
"0.807981",
"0.8069943",
"0.80248153"... | 0.0 | -1 |
`x` is tensor (numpy or tensorflow). All indices are batchindices except the last one which is the index of the variable. E.g. `x` of shape [10, 30, 2] means 10 x 30 batch of twodimensional vectors [x0, x1]. If in addition `degs` = [3, 5], then the resulting shape is [10, 30, 3, 5]. | def _3Cj(WKvO, mYEH):
def gJAv(WKvO, mghH):
return WKvO[..., None] ** oyIN.arange(mghH)
assert WKvO.shape[-1] == len(mYEH)
mYEH = [int(Csk6) for Csk6 in mYEH]
U5bT = 1
for YRbF in range(WKvO.shape[-1]):
Y7fn = WKvO[..., YRbF]
mghH = mYEH[YRbF]
gKbV = gJAv(Y7fn, mghH)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QGFp(WKvO):\n\n def Ro40(eUWA):\n return eUWA\n return (ZylS.ones_like(WKvO), Ro40)",
"def LLWw(WKvO: torch.Tensor) -> ht2j.Tensor:\n if WKvO.dim() == 1:\n return WKvO.unsqueeze(0)\n else:\n return WKvO",
"def SqOW(WKvO):\n return WKvO.view(1, WKvO.size()[0], WKvO.size()... | [
"0.59445673",
"0.58664787",
"0.5821761",
"0.57950664",
"0.5706409",
"0.56556743",
"0.562092",
"0.5593077",
"0.556896",
"0.5540579",
"0.553841",
"0.5519701",
"0.5499014",
"0.5471686",
"0.54087466",
"0.5402171",
"0.5400286",
"0.5385653",
"0.5383942",
"0.53508496",
"0.53472656",... | 0.49555814 | 91 |
Return a polynomial representing 1 with the same batch_ndim and degrees as `p`. | def QWLD(XP5J):
ROpF = jeeb.shape(XP5J.coef)
b9oy = XP5J.batch_ndim
ooTa = ROpF[:b9oy]
yDqo = jeeb.np_dtype(XP5J.coef)
a0GJ = oyIN.zeros(oyIN.prod(XP5J.degs), yDqo)
a0GJ[0] = 1
a0GJ = a0GJ.reshape([1] * b9oy + XP5J.degs)
a0GJ = jeeb.ones(ooTa, yDqo)[(Ellipsis,) + (None,) * XP5J.var_ndim]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def es7x(YKHO, XP5J):\n k0lF = YKHO\n r8hN, exwG = k0lF.shape\n if r8hN != exwG:\n raise zRkN('Matrix must be square')\n if not XP5J:\n return YKHO.zeros(YKHO.shape, YKHO.domain)\n elif len(XP5J) == 1:\n return XP5J[0] * YKHO.eye(YKHO.shape, YKHO.domain)\n pdhd = k0lF.eye(k0l... | [
"0.59998965",
"0.59041935",
"0.58631235",
"0.58592504",
"0.57598746",
"0.5698995",
"0.5633111",
"0.55932",
"0.5588688",
"0.55770296",
"0.5563133",
"0.5554835",
"0.54827064",
"0.5444806",
"0.5442225",
"0.5420345",
"0.53798246",
"0.5343605",
"0.5343305",
"0.5262891",
"0.5259685... | 0.7240781 | 0 |
This will plot accuracies and lossesfor both training and validation sessions for given history objects. If no history object is given, values will be fetched from Tensorboard logs. | def DEDX(QUrH=None):
LZpg = nlwp.make_subplots(rows=2, cols=2, subplot_titles=('Training accuracy', 'Validation accuracy', 'Training loss ', 'Validation loss'))
def BXpE(ZGE9, YAq3, S0XL, N77f, AIKr, HasU):
tTpl = list(range(HasU))
qfpW = tuKI.choice(Jxeo)
jU_O = Uwmy(tTpl, YAq3, ZGE9, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mNgJ(YKHO, FLXQ):\n print(FLXQ.history.keys())\n QrM1.plot(FLXQ.history['acc'])\n QrM1.plot(FLXQ.history['val_acc'])\n QrM1.title('model accuracy')\n QrM1.ylabel('accuracy')\n QrM1.xlabel('epoch')\n QrM1.legend(['train', 'test'], loc='upper left')\n QrM1.show()\n QrM1.plot(FLXQ.histo... | [
"0.790461",
"0.76937914",
"0.7595231",
"0.75737894",
"0.7488978",
"0.7449181",
"0.74018705",
"0.73820513",
"0.736483",
"0.72692233",
"0.7268121",
"0.72586584",
"0.7253943",
"0.7237364",
"0.72056174",
"0.720518",
"0.7198059",
"0.717756",
"0.71769917",
"0.71229887",
"0.7097975"... | 0.72701424 | 9 |
Escape all special characters. | def Cjxc(uvd8):
RSBG, uvd8 = Hy7s.path.splitdrive(uvd8)
if isinstance(uvd8, bytes):
uvd8 = YTyz.sub(b'[\\1]', uvd8)
else:
uvd8 = qR5Z.sub('[\\1]', uvd8)
return RSBG + uvd8 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oR5Y(l5Ny):\n l5Ny.replace('\\\\', '\\\\\\\\')\n IguF = ['~', '#', '&', '%', '_']\n for Z9rn in IguF:\n l5Ny = l5Ny.replace(Z9rn, '\\\\' + Z9rn)\n return l5Ny",
"def a_4o(YKHO, l5Ny):\n if not l5Ny:\n return '_'\n l5Ny = l5Ny.replace('_', '__')\n l5Ny = l5Ny.replace(' ', '_... | [
"0.8386262",
"0.78267103",
"0.7764801",
"0.74527055",
"0.7433216",
"0.72004306",
"0.7125831",
"0.7110628",
"0.7108127",
"0.71056813",
"0.7041395",
"0.6976508",
"0.6954215",
"0.6944749",
"0.6915148",
"0.6856603",
"0.6835639",
"0.68339455",
"0.6803731",
"0.6748764",
"0.6731587"... | 0.0 | -1 |
Whether the camera has hit an edge by moving in its present direction. | def b68B(YKHO):
return YKHO.will_hit_edge(YKHO._direction) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qGGi(YKHO, XSoh):\n return YKHO.position <= 0 and XSoh.is_left() or (YKHO.position >= YKHO.scene.step_count - 1 and XSoh.is_right())",
"def BFll(YKHO):\n VXOZ = YKHO.screen.get_rect()\n if YKHO.rect.right >= VXOZ.right or YKHO.rect.left <= 0:\n return True",
"def BFll(YKHO):\n VXOZ = YKH... | [
"0.8193928",
"0.7175331",
"0.71696216",
"0.71264863",
"0.70965314",
"0.70731205",
"0.68800735",
"0.6857221",
"0.6844524",
"0.6709939",
"0.6637558",
"0.66200465",
"0.6596718",
"0.65851676",
"0.6534672",
"0.64095145",
"0.633984",
"0.63365954",
"0.6258987",
"0.6246556",
"0.62464... | 0.7520673 | 1 |
Whether the camera will hit an edge by moving in the specified direction. | def qGGi(YKHO, XSoh):
return YKHO.position <= 0 and XSoh.is_left() or (YKHO.position >= YKHO.scene.step_count - 1 and XSoh.is_right()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b68B(YKHO):\n return YKHO.will_hit_edge(YKHO._direction)",
"def SLKL(YKHO, XSoh):\n assert XSoh\n return YKHO._walls & XSoh == 0",
"def XhVf(YKHO, XSoh, ybTX):\n xm0c = YKHO.x\n AA1S = YKHO.y\n if XSoh == LgK1.LEFT:\n xm0c -= 1\n elif XSoh == LgK1.RIGHT:\n xm0c += 1\n ... | [
"0.68149406",
"0.6714008",
"0.6636918",
"0.65822124",
"0.6548928",
"0.6546583",
"0.6526378",
"0.65106666",
"0.6504178",
"0.6465445",
"0.6436435",
"0.63311815",
"0.62684625",
"0.62330055",
"0.6230071",
"0.62063885",
"0.61752844",
"0.61351204",
"0.6127719",
"0.6120612",
"0.6075... | 0.8607627 | 0 |
This function returns a new list where all elements are the items from the given list that have the given value | def mNSi(HHw1, lVjQ):
vUEd = []
for fEM0 in HHw1:
if fEM0 == lVjQ:
vUEd.append(fEM0)
return vUEd | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DDx7(m2Zb, yv6U):\n return list((WKvO for WKvO in yv6U if m2Zb(WKvO)))",
"def Ade2(H5ew: str, hkxX: list, xUwc: list):\n wLKY = []\n for ZfUD in xUwc:\n if any((wEf2 in hkxX for wEf2 in ZfUD[H5ew])):\n wLKY.append(ZfUD)\n return wLKY",
"def yYHv(Jsz5, ZfUD):\n return ZfUD i... | [
"0.7010567",
"0.6448184",
"0.64334023",
"0.64259267",
"0.6417931",
"0.6359927",
"0.6348337",
"0.6283698",
"0.62663895",
"0.6260493",
"0.6209742",
"0.6151634",
"0.6140078",
"0.61143804",
"0.61000973",
"0.6064853",
"0.6023389",
"0.5999483",
"0.5986986",
"0.5921217",
"0.59184676... | 0.5897425 | 21 |
This function determines what is the index of the second smallest item in the list or, if the list contains more than one of the smallest item, the second index of that item | def B5um(zs2f):
if len(zs2f) == 0:
return -1
d6pt = 0
_bQ4 = False
p9ri = zs2f[0]
for wEf2 in zs2f:
if _bQ4 == True and wEf2 == p9ri:
return d6pt
if txXZ(zs2f, wEf2) == 0 and len(mNSi(zs2f, wEf2)) > 1:
_bQ4 = True
p9ri = wEf2
elif t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cOcx(aPd6):\n Y8Kb = sorted(aPd6)\n CL9V = Y8Kb[0]\n _PK4 = Y8Kb[1]\n q0f4 = aPd6.index(CL9V)\n xj02 = aPd6.index(_PK4)\n return (q0f4, xj02)",
"def UA9m(Emd4, yv6U: list) -> int:\n return yv6U.index(min(yv6U))",
"def eJqX(aPd6, YRbF):\n dYpS = YRbF\n for r845 in range(YRbF + 1, ... | [
"0.78681004",
"0.7591011",
"0.73733485",
"0.73343384",
"0.72756165",
"0.71797305",
"0.69286144",
"0.6924723",
"0.6912953",
"0.6903721",
"0.68822765",
"0.6843311",
"0.68114185",
"0.67890126",
"0.6787188",
"0.6779859",
"0.6768543",
"0.67614603",
"0.67528063",
"0.67402005",
"0.6... | 0.8168971 | 0 |
This function generates a random letter out of four gene letters | def cl17():
I0Re = tuKI.randint(0, 3)
if I0Re == 0:
return 'A'
elif I0Re == 1:
return 'C'
elif I0Re == 2:
return 'G'
elif I0Re == 3:
return 'T'
return '' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iO1x(YKHO):\n zhGC = 97\n gHYk = 122\n return ''.join(map(lambda YRbF: chr(tuKI.randint(zhGC, gHYk)), range(tuKI.randint(4, 8)))).upper()",
"def CeEB():\n D5g7 = []\n sZqf = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'\n for vC9B in sZqf:\n D5g7.append(vC9B)\n pMup = ''.... | [
"0.79278743",
"0.78764945",
"0.75701547",
"0.74830693",
"0.7445514",
"0.7310548",
"0.72965133",
"0.72545236",
"0.7231837",
"0.71715516",
"0.7141235",
"0.7065663",
"0.70482403",
"0.7029514",
"0.70033383",
"0.69822323",
"0.69698006",
"0.6930069",
"0.6852957",
"0.68225116",
"0.6... | 0.8103309 | 0 |
Adds the cog, a bot, and a message to the instance for usage in tests. | def FCbF(YKHO):
YKHO.bot = uO4L()
YKHO.cog = OG1j(bot=YKHO.bot)
YKHO.msg = Js6S(id=555, content='hello world')
YKHO.msg.channel.mention = '#lemonade-stand'
YKHO.msg.author.__str__ = CFMy(return_value=YKHO.msg.author.name)
YKHO.msg.author.avatar_url_as.return_value = 'picture-lemon.png' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eCGt(JyK9: util.CustomBot):\n JyK9.add_cog(Zkx3(JyK9))",
"def FIMM(YKHO, JyK9):\n YKHO.bot = JyK9",
"def FIMM(YKHO, JyK9):\n YKHO.bot = JyK9",
"def eCGt(JyK9):\n JyK9.add_cog(icN0(JyK9))",
"def eCGt(JyK9):\n JyK9.add_cog(Zkx3(JyK9))",
"def FIMM(YKHO, Ol8d=None):\n YKHO.message = Ol8... | [
"0.64705855",
"0.6182543",
"0.6182543",
"0.61740786",
"0.61396563",
"0.6089406",
"0.6089406",
"0.60554856",
"0.60535806",
"0.60535806",
"0.60535806",
"0.60293895",
"0.59951943",
"0.59951943",
"0.598639",
"0.598639",
"0.598639",
"0.5914436",
"0.591286",
"0.5909725",
"0.5909725... | 0.5561635 | 60 |
Should consider timestamps valid if they're greater than the Discord epoch. | def G2u6(YKHO):
M_Ra = ('XsyRkw', 'Xrim9Q', 'XsyR-w', 'XsySD_', 'Dn9r_A')
for E3oo in M_Ra:
with YKHO.subTest(timestamp=E3oo):
Aofo = OG1j.is_valid_timestamp(E3oo)
YKHO.assertTrue(Aofo) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def L3lV(YKHO, E3oo):\n if E3oo is None:\n return True\n if not isinstance(E3oo, float):\n return False\n if E3oo > JNNN.system_to_ntp_time(ITS7.time() + 86400 * 365):\n return False\n else:\n return True",
"def NxKh(YKHO):\n M_Ra = (('B4Yffw', 'DISCORD_EPOCH - TOKEN_EP... | [
"0.7199118",
"0.71054965",
"0.689157",
"0.68540245",
"0.6769624",
"0.67334926",
"0.66043407",
"0.6305988",
"0.62948304",
"0.6260071",
"0.6246471",
"0.6226302",
"0.620991",
"0.61817294",
"0.6162438",
"0.61170405",
"0.60911506",
"0.6076477",
"0.60401005",
"0.6036342",
"0.603166... | 0.6996692 | 2 |
None should be returned if no matches have valid user IDs or timestamps. | def mX4l(YKHO, qxS6, _1ls, ldRb, iSGV):
qxS6.finditer.return_value = [TMAJ.create_autospec(PrRj, spec_set=True, instance=True)]
_1ls.return_value = TMAJ.create_autospec(_J2v, spec_set=True, instance=True)
ldRb.return_value = False
iSGV.return_value = False
en4D = OG1j.find_token_in_message(YKHO.msg)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kUBT(QePW, uJjO):\n c5ow = Wqvn.objects.get(id=QePW.user.id)\n TdpF = Wqvn.objects.get(id=uJjO)\n if not wk0V.objects.filter(first_user=c5ow, second_user=TdpF):\n wk0V.objects.create(first_user=c5ow, second_user=TdpF)\n if wk0V.objects.filter(first_user=TdpF, second_user=c5ow):\n aioA... | [
"0.55831546",
"0.5540892",
"0.54392993",
"0.5371876",
"0.53610516",
"0.5323951",
"0.5273652",
"0.5219466",
"0.51108557",
"0.5107562",
"0.50823647",
"0.5074098",
"0.50719935",
"0.50039816",
"0.50008196",
"0.4978977",
"0.49758294",
"0.4974587",
"0.496083",
"0.4959822",
"0.49501... | 0.46495456 | 68 |
Shouldn't send any messages if the token message can't be deleted. | async def test_take_action_delete_failure(YKHO, e57K):
gKSi = OG1j(YKHO.bot)
e57K.return_value = TMAJ.create_autospec(_PJD, spec_set=True, instance=True)
YKHO.msg.delete.side_effect = oEgM(CFMy(), CFMy())
eOtH = TMAJ.create_autospec(_J2v, spec_set=True, instance=True)
await gKSi.take_action(YKHO.msg... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c15w(YKHO, tO9_, OaeV):\n if tO9_.id == OaeV.message.id:\n return False\n if tO9_.content.startswith(OaeV.prefix):\n return True\n if tO9_.author == YKHO.bot.user:\n return True\n return False",
"def gcmQ(YKHO):\n pass",
"def rXeX(YKHO):\n MgeT = YKHO.create_thread()\... | [
"0.6513734",
"0.6468861",
"0.6425789",
"0.6348263",
"0.6347383",
"0.6327653",
"0.63240975",
"0.63198626",
"0.63058007",
"0.6284851",
"0.627325",
"0.62696606",
"0.6266855",
"0.62583494",
"0.6257216",
"0.6255099",
"0.62217915",
"0.6186382",
"0.61690444",
"0.6142666",
"0.614046"... | 0.6340498 | 5 |
Gets product with given code | def AI9R(YKHO, Wxnj):
kbGe = list(filter(lambda Z9rn: Z9rn.code == Wxnj, YKHO.list_products()))
if not len(kbGe):
return None
return kbGe[0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AI9R(YKHO, Ilxn):\n for XP5J in YKHO['products']:\n if Ilxn in XP5J.get('ids', []):\n return XP5J\n return None",
"def _oqe(YKHO, Wxnj):\n ps_8 = YKHO._collection.find_one({'code': Wxnj})\n return ps_8",
"def CxaC(YKHO, Wxnj):\n if Wxnj not in YKHO._baskets:\n raise ... | [
"0.78304857",
"0.7034293",
"0.69267976",
"0.6862473",
"0.66131866",
"0.6580624",
"0.63800466",
"0.6379591",
"0.63251394",
"0.6314203",
"0.62995523",
"0.62912405",
"0.62605095",
"0.6222106",
"0.6214287",
"0.6142249",
"0.6118086",
"0.6115655",
"0.60886323",
"0.60845894",
"0.605... | 0.85042363 | 0 |
Tell the log watcher to cease watching for new logs. This method merely signals to the thread that it should stop, so you must call the thread's join() method afterwards to wait for the thread to exit. It is an error to call stop() on a thread which isn't alive (running). | def JCyR(YKHO) -> None:
assert YKHO.is_alive(), 'Thread not alive'
YKHO.stopped.set() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qRNS(YKHO):\n YKHO.kill_event.set()",
"def zEzs(YKHO):\n YKHO._log_queue.put_nowait(None)\n YKHO._log_subprocess.join()",
"def JCyR(YKHO) -> None:\n YKHO._stop_event.set()\n try:\n YKHO.join()\n except RuntimeError:\n pass",
"def yvBH(YKHO):\n a1PO, tTpl = YKHO.workers[... | [
"0.73727757",
"0.70296603",
"0.6596195",
"0.65642303",
"0.6478179",
"0.64583683",
"0.6441928",
"0.6416651",
"0.6384832",
"0.62932366",
"0.6259451",
"0.6259144",
"0.6232398",
"0.619668",
"0.6174086",
"0.615723",
"0.61523664",
"0.6141746",
"0.61232233",
"0.6118948",
"0.6115477"... | 0.6616209 | 2 |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" | def type(YKHO) -> str:
return qe4Y.get(YKHO, 'type') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qjbs(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'resource_type')",
"def Qjbs(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'resource_type')",
"def Qjbs(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'resource_type')",
"def Qjbs(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, '... | [
"0.7918516",
"0.7918516",
"0.7866337",
"0.7866337",
"0.7866337",
"0.7866337",
"0.7866337",
"0.7708053",
"0.75534964",
"0.7282099",
"0.70591027",
"0.6979169",
"0.69202054",
"0.6868452",
"0.67303157",
"0.67049116",
"0.6654272",
"0.6646357",
"0.65510035",
"0.65426683",
"0.654266... | 0.66396123 | 58 |
setup environment for test | def Sv8W(YKHO, NKcE):
HwRy.argv.clear()
HwRy.argv.append('')
HwRy.argv.append('spam') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FCbF(YKHO):\n ct9j()",
"def HTzG(YKHO):\n pass",
"def SjAq():\n global TestEnv\n MQa_(GD0I)",
"def SjAq():\n global TestEnv\n MQa_(GD0I)",
"def FCbF(YKHO) -> None:\n YKHO.helper = inme()\n YKHO.test_name = 'PYFUNCEBLE_TESTING'\n YKHO.temp_env_file = gbPf.NamedTemporaryFile('w... | [
"0.86360085",
"0.8105623",
"0.76520115",
"0.76520115",
"0.75336707",
"0.7496305",
"0.7444822",
"0.7433704",
"0.74211895",
"0.7348237",
"0.7348237",
"0.7330926",
"0.7294719",
"0.72612566",
"0.7256958",
"0.7233404",
"0.7226662",
"0.7215199",
"0.7186369",
"0.7153597",
"0.7121118... | 0.0 | -1 |
Constructs an MTLabel with a max_width. If needed label text is trimmed and '...' is added for the user to known that more text exists. | def pkfF(l5Ny, dQgj, hhRS, gpgb):
XMTi = False
VOXX = WELf(label=l5Ny, pos=dQgj, font_size=hhRS, autowidth=True)
while VOXX.width > gpgb:
l5Ny = l5Ny[:-1]
XMTi = True
VOXX = WELf(label='%s...' % l5Ny, pos=dQgj, font_size=hhRS, autowidth=True)
if XMTi:
l5Ny = '%s...' % l5N... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W6TY(YKHO):\n iuQj = YKHO.form.max_label_width\n uiPR = YKHO.form.adjust_label_width\n YKHO.form.adjust_label_width = True\n xOUm = YKHO.get_allowed_width_fields()\n Crrw = [Jyyj.label or N_zS(mWFP) for mWFP, Jyyj in xOUm.items()]\n Fk7e = (max((len(R3gR) for R3gR in Crrw)) + 1) // 2\n B2o... | [
"0.62319475",
"0.6069337",
"0.6040795",
"0.59638476",
"0.5784685",
"0.5692705",
"0.5612587",
"0.55609554",
"0.5560724",
"0.5560151",
"0.54527587",
"0.54442596",
"0.5441481",
"0.5439613",
"0.54230607",
"0.5348873",
"0.5347342",
"0.5288962",
"0.5285591",
"0.5252384",
"0.5248244... | 0.770177 | 0 |
Get the current state to allow pickling. | def k8jS(YKHO) -> cuzp[str, ImMB]:
KCHu = YKHO.__dict__.copy()
KCHu['_parent'] = None
return KCHu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bGIA(YKHO):\n return YKHO.__state",
"def bGIA(YKHO):\n return YKHO.__state",
"def bGIA(YKHO):\n return YKHO.__state",
"def bGIA(YKHO):\n return YKHO.__state",
"def bGIA(YKHO):\n return YKHO.__state",
"def bGIA(YKHO):\n return YKHO.__state",
"def bGIA(YKHO):\n return YKHO.__stat... | [
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"0.8335613",
"... | 0.0 | -1 |
Return True if this is entirely made of comments. | def Frqk(YKHO) -> bool:
return all((pG0V.is_comment for pG0V in YKHO.segments)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Frqk(YKHO):\n return YKHO.__type & RCTM == RCTM",
"def Uxwm(YKHO) -> bool:\n xDcj = (qJWj('message_cid') == YKHO.channel_id) & (qJWj('message_mid') == YKHO.message_id) & (qJWj('altype') == int(P5kV.COMMENT))\n return YKHO.handle.table(zTwG).get(xDcj) is not None",
"def u9l3(YKHO, oeNL):\n oeNL ... | [
"0.739846",
"0.6917695",
"0.68073714",
"0.6661247",
"0.66303885",
"0.6581225",
"0.6422114",
"0.6416056",
"0.63950133",
"0.6346781",
"0.62816787",
"0.6268705",
"0.6184703",
"0.6115147",
"0.60998917",
"0.6093087",
"0.60793895",
"0.60661095",
"0.60586643",
"0.6040571",
"0.600023... | 0.8195251 | 0 |
The set of types for this segment. | def nykE(YKHO) -> fHNa[str]:
return YKHO._class_types | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def r3q6(YKHO) -> fHNa[str]:\n M2C2 = {YKHO.type}\n for KCHu in YKHO.segments:\n M2C2 |= KCHu.type_set()\n return M2C2",
"def dSf7(YKHO):\n return YKHO.types",
"def JrSg(YKHO):\n if not YKHO._refreshed:\n YKHO.refresh()\n return YKHO._setTypes",
"def SnBA(YKHO) -> x1iM[str]:\n... | [
"0.854263",
"0.76198685",
"0.75361145",
"0.7497864",
"0.7319929",
"0.7302782",
"0.7300577",
"0.7243883",
"0.70606035",
"0.6997625",
"0.6806734",
"0.6737915",
"0.6649156",
"0.6611323",
"0.66104186",
"0.66036224",
"0.65993774",
"0.65686166",
"0.64918643",
"0.64121085",
"0.64064... | 0.69683105 | 10 |
Make an uppercase string from the segments of this segment. | def BFOz(YKHO) -> str:
return YKHO.raw.upper() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M1kB(YKHO, l5Ny):\n return l5Ny.upper()",
"def CN9P(YKHO):\n if not YKHO._upper_string:\n YKHO._upper_string = ''.join(YKHO.upper_word_list)\n return YKHO._upper_string",
"def yfUa(l5Ny):\n return l5Ny.upper()",
"def CN9P(YKHO, BWXx):\n return YKHO.text(BWXx).upper()",
"def yYN6(Y... | [
"0.6990272",
"0.681089",
"0.6764799",
"0.67455757",
"0.66785884",
"0.660239",
"0.6521966",
"0.65207255",
"0.64983475",
"0.64810383",
"0.6463355",
"0.64238447",
"0.64022404",
"0.6397483",
"0.6379049",
"0.6364804",
"0.6311865",
"0.6301639",
"0.6247128",
"0.62433237",
"0.6239316... | 0.6506304 | 8 |
Returns a list of raw segments in this segment. | def vvLa(YKHO) -> x1iM['RawSegment']:
return YKHO.get_raw_segments() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xDpY(YKHO) -> x1iM['RawSegment']:\n return [ZfUD for KCHu in YKHO.segments for ZfUD in KCHu.raw_segments]",
"def pi1E(YKHO):\n return YKHO._segments",
"def PXIy(YKHO):\n return YKHO._segments",
"def l6qL(YKHO) -> x1iM[int]:\n ...",
"def PXIy(YKHO):\n return (YKHO._subset((YRbF, YRbF + 1)... | [
"0.89217323",
"0.7611614",
"0.75400317",
"0.71691585",
"0.70996237",
"0.70900214",
"0.7032567",
"0.6854717",
"0.66147834",
"0.6408108",
"0.62217736",
"0.6150271",
"0.6144512",
"0.6143868",
"0.61018723",
"0.60947424",
"0.5964384",
"0.59556687",
"0.59516644",
"0.5932096",
"0.59... | 0.9032639 | 0 |
Returns the type of this segment as a string. | def FRul(YKHO) -> str:
return YKHO.type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def type(YKHO) -> str:\n return YKHO.type_",
"def UkSm(YKHO):\n return YKHO.properties.get('TypeAsString', None)",
"def Rw7c(YKHO) -> str:\n return YKHO.type if not YKHO.subtype else f'{YKHO.type}:{YKHO.subtype}'",
"def type(YKHO) -> str:\n return YKHO._type",
"def type(YKHO) -> str:\n retur... | [
"0.76600385",
"0.7646128",
"0.76402175",
"0.7615016",
"0.7615016",
"0.7615016",
"0.75902027",
"0.7568275",
"0.74221957",
"0.7410149",
"0.7410149",
"0.7410149",
"0.7410149",
"0.7410149",
"0.7410149",
"0.7410149",
"0.7410149",
"0.7410149",
"0.7410149",
"0.7410149",
"0.7410149",... | 0.75980914 | 6 |
Returns the number of segments in this segment. | def eYMo(YKHO, KXP7: bool=False) -> int:
if YKHO.segments:
z08i = 0 if KXP7 else 1
return z08i + sum((pG0V.count_segments(raw_only=KXP7) for pG0V in YKHO.segments))
else:
return 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ECor(YKHO):\n return len(YKHO.segment_lengths)",
"def JeH7(YKHO) -> int:\n ...",
"def Re8D(YKHO):\n return YKHO.getHierView().numSegments()",
"def nyh4(YKHO):\n return sum((len(ZhDw.transcript_file.segments) for ZhDw in YKHO.exemplars))",
"def lT_z(YKHO):\n return len(YKHO._break_points)... | [
"0.8736593",
"0.86064184",
"0.8550998",
"0.8135904",
"0.80854666",
"0.8023354",
"0.76189035",
"0.76010066",
"0.7477544",
"0.7139224",
"0.69297445",
"0.69123036",
"0.6826159",
"0.67922395",
"0.67548394",
"0.67472404",
"0.67464334",
"0.674568",
"0.6697717",
"0.66120046",
"0.659... | 0.7428703 | 9 |
Get a point marker at the end of this segment. | def pTNQ(YKHO) -> xiUu:
assert YKHO.pos_marker
return YKHO.pos_marker.end_point_marker() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b394():\n L4pN = k4mo.Path.unit_circle()\n wBZ5 = k4mo.Path.unit_circle()\n _19w = oyIN.concatenate([L4pN.vertices, 0.5 * wBZ5.vertices])\n cwhV = oyIN.concatenate([L4pN.codes, wBZ5.codes])\n _5yy = k4mo.Path(_19w, cwhV)\n return _5yy",
"def o2nU(YKHO) -> xiUu:\n assert YKHO.pos_marker\n... | [
"0.6776815",
"0.6464169",
"0.6409012",
"0.63753617",
"0.6248417",
"0.6149185",
"0.6043708",
"0.6018482",
"0.6018482",
"0.5940929",
"0.5890808",
"0.58825964",
"0.58809257",
"0.58085954",
"0.5804449",
"0.57882285",
"0.5785911",
"0.5782149",
"0.57790124",
"0.5746689",
"0.5735670... | 0.80931246 | 0 |
Get a location tuple at the end of this segment. | def t2M7(YKHO) -> AzJI[int, int]:
assert YKHO.pos_marker
return YKHO.pos_marker.working_loc_after(YKHO.raw) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hbd3(YKHO) -> tuple:\n return YKHO.__location",
"def aZJI(YKHO):\n return YKHO.locs[YKHO.indices[-1], 2:4]",
"def Os4s(YKHO):\n return tuple(YKHO._lo_atom + YKHO._n_atoms)",
"def pTNQ(YKHO) -> xiUu:\n assert YKHO.pos_marker\n return YKHO.pos_marker.end_point_marker()",
"def QWYR(YKHO):\n... | [
"0.725516",
"0.7186247",
"0.676839",
"0.64660573",
"0.6440116",
"0.6429935",
"0.6425954",
"0.6370832",
"0.6349226",
"0.62889653",
"0.6275488",
"0.6273651",
"0.6222283",
"0.6192089",
"0.6180465",
"0.6176467",
"0.61470884",
"0.610674",
"0.6077248",
"0.60709953",
"0.6063837",
... | 0.78040665 | 0 |
If segment's first/last child is noncode, return index. | def qV_E(Emd4, PXIy: Sequence[BaseSegment]) -> h8nf[int]:
if PXIy:
for or8S in [0, -1]:
if not Emd4._is_code_or_meta(PXIy[or8S]):
return or8S
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vn7Z(YKHO, aUGN):\n for kS1Y, ZfUD in enumerate(YKHO.children):\n if ZfUD == aUGN:\n return kS1Y\n return -1",
"def WDvq(YKHO, aUGN):\n YKHO.__initChild()\n return YKHO.__child.index(aUGN)",
"def nfdH(YKHO, aUGN):\n if aUGN in YKHO._children:\n return YKHO._children.... | [
"0.6962888",
"0.67124027",
"0.66232204",
"0.66118443",
"0.65579426",
"0.6513389",
"0.6436912",
"0.6412968",
"0.629415",
"0.628788",
"0.62688285",
"0.62464863",
"0.62307394",
"0.62279636",
"0.62221324",
"0.62015045",
"0.6198111",
"0.6157464",
"0.61390793",
"0.60355496",
"0.602... | 0.69708115 | 0 |
set visual line mode | def S_he():
Ty9i = F5fP()
Ty9i.set_visual_line_mode() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m0hk():\n global DRAW_MODE, CURRENT_LABEL, SHAPE_SIZE\n global mouse_pos, line_start_pos\n if vQhy == 'line':\n jbYn.line(kvNi, fTqp, CKpD, D5qf, thickness=VYS0)\n fTqp = CKpD\n vQhy = 'line'",
"def FEap(YKHO, *qIxc):\n return nxZz.ShapeUpgrade_ConvertCurve3dToBezier_SetLineMode(YKHO... | [
"0.77540654",
"0.6578946",
"0.65723634",
"0.64950174",
"0.64909756",
"0.6314431",
"0.61965615",
"0.6056458",
"0.6017599",
"0.59943366",
"0.59737146",
"0.59569526",
"0.59237283",
"0.5893564",
"0.58656424",
"0.58580154",
"0.5857274",
"0.58324796",
"0.5822347",
"0.58171254",
"0.... | 0.7912044 | 0 |
Read a json file from disk | def BNwM(pmON):
Ylbp = open(pmON, 'r').read()
G9jH.info('Loading file using a pyspark.read.json')
r4ng = tZVM.instance.sc().parallelize([Ylbp])
return tZVM.instance.spark().read.json(r4ng) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Nwr9(pmON):\n with open(pmON) as wM3v:\n nPrm = qQXR.load(wM3v)\n return nPrm",
"def PSj2(pmON):\n with open(pmON, 'r') as eHNT:\n return qQXR.load(eHNT)",
"def PSj2(VqRE):\n return qQXR.loads(open(VqRE).read())",
"def J_n5(pmON):\n with open(pmON, 'r') as nUeQ:\n retu... | [
"0.82362807",
"0.8048279",
"0.7991998",
"0.7940178",
"0.7895708",
"0.78932476",
"0.7859092",
"0.7827093",
"0.78208643",
"0.78180754",
"0.7811745",
"0.7799813",
"0.779392",
"0.77658135",
"0.77469414",
"0.7729011",
"0.77231073",
"0.7694719",
"0.7689512",
"0.7680625",
"0.7679204... | 0.0 | -1 |
Returns Context Variable Containing Datetime format currently used | def DAsM(QpfX):
return {'DATETIME_FORMAT': gCuF.DATETIME_FORMAT.replace('%', '')} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cTxh():\n return qcWV.now().strftime(dDFw)",
"def f1rh():\n return B72W().strftime('%Y%m%d-%H%M%S')",
"def m6Z7(FMLJ='%Y-%m-%d'):\n return qcWV.datetime.now().strftime(FMLJ)",
"def ATe7(YKHO):\n B1Il = qcWV.now()\n return B1Il.strftime('%Y%m%d_%H%M')",
"def slWZ():\n return qcWV.now()... | [
"0.6721154",
"0.6569885",
"0.65225536",
"0.6467806",
"0.6395182",
"0.6353798",
"0.6301972",
"0.62919945",
"0.62804306",
"0.6274833",
"0.6271068",
"0.62617344",
"0.62222946",
"0.6212745",
"0.6208396",
"0.6187156",
"0.61462224",
"0.6104347",
"0.60950416",
"0.60893005",
"0.60630... | 0.6463138 | 4 |
Determine if we currently running on stage production | def qydK(QpfX):
return {'STAGE': gCuF.STAGE_KEYWORD} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QRFO(GikI):\n return GikI == 'live' or GikI == 'debug' or GikI == 'prod'",
"def rQGt(YKHO):\n return YKHO.get_current_environment() == zAej.PRODUCTION",
"def tL9Q(YKHO):\n if not YKHO.is_valid_platform() and (not YKHO.in_build()):\n return False\n gKPz = 'production' if YKHO.on_dedicated... | [
"0.8059704",
"0.8003619",
"0.79296434",
"0.78778523",
"0.7639554",
"0.7552264",
"0.7349679",
"0.726895",
"0.7240907",
"0.7211174",
"0.70496035",
"0.6964209",
"0.6913246",
"0.6748909",
"0.67400396",
"0.6736634",
"0.671447",
"0.6659144",
"0.65128654",
"0.6434043",
"0.6423795",
... | 0.0 | -1 |
Implement the == operator for schema nodes. | def xa14(YKHO, Elif):
try:
qner = Elif.to_dict()
except AttributeError:
return False
return YKHO.to_dict() == qner | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aPi6(YKHO, *qIxc):\n return _VfD.XMLNode_equals(YKHO, *qIxc)",
"def xa14(YKHO, Elif):\n return type(YKHO) == type(Elif) and YKHO.node is Elif.node",
"def xa14(YKHO, Q6kx):\n if Q6kx == None or YKHO.element != Q6kx.element:\n return False\n return YKHO.index == Q6kx.index",
"def xa14(YK... | [
"0.74729407",
"0.72615176",
"0.72106946",
"0.7158029",
"0.7158029",
"0.7158029",
"0.7158029",
"0.7158029",
"0.71447957",
"0.7132398",
"0.7111416",
"0.7091245",
"0.7091245",
"0.70528233",
"0.70517385",
"0.7048379",
"0.68620634",
"0.67977536",
"0.6773673",
"0.67592543",
"0.6746... | 0.0 | -1 |
Create a new instance from a dict representation. | def jG8h(Emd4, lLIB):
if lLIB['node_type'] != Emd4.__name__:
raise ValueError('Invalid node type in dict.')
return Emd4(**lLIB['config']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, ... | [
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"0.8501901",
"... | 0.0 | -1 |
Return the node representation as a dict. The representation dict includes a field ``node_type`` with the node class name and a field ``config`` with a dict of the configuration options. | def MNRr(YKHO):
raise NotImplementedError('To be implemented in subclass.') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MNRr(YKHO):\n GPtr = {'min_length': YKHO.min_length, 'max_length': YKHO.max_length}\n return {'node_type': 'String', 'config': GPtr}",
"def MNRr(YKHO):\n lLIB = {'node_type': 'List', 'config': {'subnode': YKHO.subnode.to_dict(), 'max_length': YKHO.max_length, 'min_length': YKHO.min_length}}\n ret... | [
"0.7439757",
"0.72291726",
"0.7189523",
"0.7125301",
"0.71190107",
"0.66892266",
"0.6674597",
"0.663788",
"0.6624867",
"0.6596693",
"0.64881855",
"0.647873",
"0.64703506",
"0.64636385",
"0.62812376",
"0.6258251",
"0.61272234",
"0.610568",
"0.6085757",
"0.6078085",
"0.60757333... | 0.0 | -1 |
Return the node representation as a dict. The representation dict includes a field ``node_type`` with the node class name and a field ``config`` with a dict of the configuration options. | def MNRr(YKHO):
GPtr = {'dtype': YKHO.dtype, 'unit': YKHO.unit, 'max_shape': YKHO.max_shape, 'min_shape': YKHO.min_shape, 'ndim': YKHO.ndim, 'max_value': YKHO.max_value, 'min_value': YKHO.min_value, 'depends_on': YKHO.depends_on}
return {'node_type': 'Array', 'config': GPtr} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MNRr(YKHO):\n GPtr = {'min_length': YKHO.min_length, 'max_length': YKHO.max_length}\n return {'node_type': 'String', 'config': GPtr}",
"def MNRr(YKHO):\n lLIB = {'node_type': 'List', 'config': {'subnode': YKHO.subnode.to_dict(), 'max_length': YKHO.max_length, 'min_length': YKHO.min_length}}\n ret... | [
"0.74416345",
"0.72305924",
"0.71915764",
"0.71269107",
"0.7120841",
"0.6689397",
"0.6675947",
"0.6640161",
"0.6622743",
"0.65991944",
"0.64861286",
"0.6481253",
"0.6471709",
"0.6466092",
"0.62808806",
"0.61303455",
"0.61083245",
"0.608912",
"0.6081169",
"0.6077734",
"0.60446... | 0.62605065 | 15 |
Return the node representation as a dict. The representation dict includes a field ``node_type`` with the node class name and a field ``config`` with a dict of the configuration options. | def MNRr(YKHO):
GPtr = {'min_length': YKHO.min_length, 'max_length': YKHO.max_length}
return {'node_type': 'Bytes', 'config': GPtr} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MNRr(YKHO):\n GPtr = {'min_length': YKHO.min_length, 'max_length': YKHO.max_length}\n return {'node_type': 'String', 'config': GPtr}",
"def MNRr(YKHO):\n lLIB = {'node_type': 'List', 'config': {'subnode': YKHO.subnode.to_dict(), 'max_length': YKHO.max_length, 'min_length': YKHO.min_length}}\n ret... | [
"0.7442022",
"0.7231194",
"0.71909934",
"0.7127399",
"0.6690997",
"0.6674581",
"0.6639316",
"0.6626117",
"0.65985435",
"0.6489566",
"0.64804006",
"0.64713436",
"0.6465782",
"0.62811035",
"0.62604296",
"0.61286867",
"0.61084473",
"0.60882753",
"0.6079824",
"0.60770315",
"0.604... | 0.71207815 | 4 |
Return the node representation as a dict. The representation dict includes a field ``node_type`` with the node class name and a field ``config`` with a dict of the configuration options. | def MNRr(YKHO):
return {'node_type': 'Bool', 'config': {}} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MNRr(YKHO):\n GPtr = {'min_length': YKHO.min_length, 'max_length': YKHO.max_length}\n return {'node_type': 'String', 'config': GPtr}",
"def MNRr(YKHO):\n lLIB = {'node_type': 'List', 'config': {'subnode': YKHO.subnode.to_dict(), 'max_length': YKHO.max_length, 'min_length': YKHO.min_length}}\n ret... | [
"0.7439757",
"0.72291726",
"0.7189523",
"0.71190107",
"0.66892266",
"0.6674597",
"0.663788",
"0.6624867",
"0.6596693",
"0.64881855",
"0.647873",
"0.64703506",
"0.64636385",
"0.62812376",
"0.6258251",
"0.61272234",
"0.610568",
"0.6085757",
"0.6078085",
"0.60757333",
"0.6041382... | 0.7125301 | 3 |
Create a new instance from a dict representation. | def jG8h(Emd4, lLIB):
if lLIB['node_type'] != 'Compilation':
raise ValueError('Invalid node type in dict.')
crj1 = {mWFP: Lwa4(Gf6P) for mWFP, Gf6P in lLIB['config']['subnodes'].items()}
GPtr = {G1Hx: Ty9i for G1Hx, Ty9i in lLIB['config'].items() if G1Hx != 'subnodes'}
return Emd4(subnodes=crj1,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, ... | [
"0.85012746",
"0.85012746",
"0.85012746",
"0.85012746",
"0.85012746",
"0.85012746",
"0.85012746",
"0.85012746",
"0.85012746",
"0.85012746",
"0.85012746",
"0.85012746",
"0.85012746",
"0.85012746",
"0.85012746",
"0.85012746",
"0.85012746",
"0.85012746",
"0.85012746",
"0.85012746"... | 0.0 | -1 |
Return the node representation as a dict. The representation dict includes a field ``node_type`` with the node class name and a field ``config`` with a dict of the configuration options. | def MNRr(YKHO):
me0v = {mWFP: Q6kx.to_dict() for mWFP, Q6kx in YKHO.subnodes.items()}
return {'node_type': 'Compilation', 'config': {'subnodes': me0v, 'optionals': YKHO.optionals}} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MNRr(YKHO):\n GPtr = {'min_length': YKHO.min_length, 'max_length': YKHO.max_length}\n return {'node_type': 'String', 'config': GPtr}",
"def MNRr(YKHO):\n lLIB = {'node_type': 'List', 'config': {'subnode': YKHO.subnode.to_dict(), 'max_length': YKHO.max_length, 'min_length': YKHO.min_length}}\n ret... | [
"0.7439757",
"0.72291726",
"0.7125301",
"0.71190107",
"0.66892266",
"0.6674597",
"0.663788",
"0.6624867",
"0.6596693",
"0.64881855",
"0.647873",
"0.64703506",
"0.64636385",
"0.62812376",
"0.6258251",
"0.61272234",
"0.610568",
"0.6085757",
"0.6078085",
"0.60757333",
"0.6041382... | 0.7189523 | 2 |
Return the node representation as a dict. The representation dict includes a field ``node_type`` with the node class name and a field ``config`` with a dict of the configuration options. | def MNRr(YKHO):
GPtr = {'set_on_create': YKHO.set_on_create}
return {'node_type': 'Date', 'config': GPtr} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MNRr(YKHO):\n GPtr = {'min_length': YKHO.min_length, 'max_length': YKHO.max_length}\n return {'node_type': 'String', 'config': GPtr}",
"def MNRr(YKHO):\n lLIB = {'node_type': 'List', 'config': {'subnode': YKHO.subnode.to_dict(), 'max_length': YKHO.max_length, 'min_length': YKHO.min_length}}\n ret... | [
"0.7442022",
"0.7231194",
"0.71909934",
"0.7127399",
"0.71207815",
"0.6690997",
"0.6674581",
"0.6626117",
"0.65985435",
"0.6489566",
"0.64804006",
"0.64713436",
"0.6465782",
"0.62811035",
"0.62604296",
"0.61286867",
"0.61084473",
"0.60882753",
"0.6079824",
"0.60770315",
"0.60... | 0.6639316 | 7 |
Return the node representation as a dict. The representation dict includes a field ``node_type`` with the node class name and a field ``config`` with a dict of the configuration options. | def MNRr(YKHO):
GPtr = {'set_on_create': YKHO.set_on_create}
return {'node_type': 'DateTime', 'config': GPtr} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MNRr(YKHO):\n GPtr = {'min_length': YKHO.min_length, 'max_length': YKHO.max_length}\n return {'node_type': 'String', 'config': GPtr}",
"def MNRr(YKHO):\n lLIB = {'node_type': 'List', 'config': {'subnode': YKHO.subnode.to_dict(), 'max_length': YKHO.max_length, 'min_length': YKHO.min_length}}\n ret... | [
"0.74422324",
"0.72310513",
"0.7191288",
"0.71277833",
"0.7121494",
"0.6689465",
"0.6676102",
"0.66403353",
"0.6624315",
"0.6599147",
"0.64876497",
"0.64708906",
"0.64651513",
"0.628331",
"0.6260746",
"0.6129604",
"0.61087316",
"0.60883707",
"0.6080056",
"0.6078302",
"0.60436... | 0.64814466 | 11 |
Initialize a List schema node. | def FIMM(YKHO, SdXw, BcCR=None, Lx0h=None):
YKHO.subnode = SdXw
YKHO.max_length = BcCR
YKHO.min_length = Lx0h | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, Q6kx, eipq):\n o61b.__init__(YKHO, Q6kx, eipq, 'listDefine', 'List Define')\n YKHO.entries = []\n YKHO.lookup = {}\n BWXx = 0\n yKcO = None\n DgAC = c0_7(Q6kx, 'members')\n for bTKY in filter(lambda exwG: exwG.nodeType == exwG.ELEMENT_NODE, DgAC.childNodes):\n ShoO = eipq... | [
"0.6160854",
"0.6115168",
"0.6073686",
"0.60375786",
"0.6020626",
"0.60057247",
"0.5933338",
"0.59222776",
"0.5869465",
"0.58475715",
"0.58248115",
"0.5792297",
"0.5774524",
"0.57720494",
"0.5767941",
"0.5752878",
"0.5749302",
"0.5738745",
"0.5711914",
"0.57090586",
"0.567531... | 0.0 | -1 |
Create a new instance from a dict representation. | def jG8h(Emd4, lLIB):
if lLIB['node_type'] != 'List':
raise ValueError('Invalid node type in dict.')
SdXw = Lwa4(lLIB['config']['subnode'])
GPtr = {G1Hx: Ty9i for G1Hx, Ty9i in lLIB['config'].items() if G1Hx != 'subnode'}
return Emd4(SdXw, **GPtr) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, ... | [
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"0.8499637",
"... | 0.0 | -1 |
Return the node representation as a dict. The representation dict includes a field ``node_type`` with the node class name and a field ``config`` with a dict of the configuration options. | def MNRr(YKHO):
lLIB = {'node_type': 'List', 'config': {'subnode': YKHO.subnode.to_dict(), 'max_length': YKHO.max_length, 'min_length': YKHO.min_length}}
return lLIB | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MNRr(YKHO):\n GPtr = {'min_length': YKHO.min_length, 'max_length': YKHO.max_length}\n return {'node_type': 'String', 'config': GPtr}",
"def MNRr(YKHO):\n me0v = {mWFP: Q6kx.to_dict() for mWFP, Q6kx in YKHO.subnodes.items()}\n return {'node_type': 'Compilation', 'config': {'subnodes': me0v, 'optio... | [
"0.74422324",
"0.7191288",
"0.71277833",
"0.7121494",
"0.6689465",
"0.6676102",
"0.66403353",
"0.6624315",
"0.6599147",
"0.64876497",
"0.64814466",
"0.64708906",
"0.64651513",
"0.628331",
"0.6260746",
"0.6129604",
"0.61087316",
"0.60883707",
"0.6080056",
"0.6078302",
"0.60436... | 0.72310513 | 1 |
Return the node representation as a dict. The representation dict includes a field ``node_type`` with the node class name and a field ``config`` with a dict of the configuration options. | def MNRr(YKHO):
GPtr = {'dtype': YKHO.dtype, 'unit': YKHO.unit, 'max_value': YKHO.max_value, 'min_value': YKHO.min_value}
return {'node_type': 'Scalar', 'config': GPtr} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MNRr(YKHO):\n GPtr = {'min_length': YKHO.min_length, 'max_length': YKHO.max_length}\n return {'node_type': 'String', 'config': GPtr}",
"def MNRr(YKHO):\n lLIB = {'node_type': 'List', 'config': {'subnode': YKHO.subnode.to_dict(), 'max_length': YKHO.max_length, 'min_length': YKHO.min_length}}\n ret... | [
"0.7439757",
"0.72291726",
"0.7189523",
"0.7125301",
"0.71190107",
"0.66892266",
"0.6674597",
"0.663788",
"0.6624867",
"0.6596693",
"0.64881855",
"0.647873",
"0.64703506",
"0.62812376",
"0.6258251",
"0.61272234",
"0.610568",
"0.6085757",
"0.6078085",
"0.60757333",
"0.6041382"... | 0.64636385 | 13 |
Return the node representation as a dict. The representation dict includes a field ``node_type`` with the node class name and a field ``config`` with a dict of the configuration options. | def MNRr(YKHO):
GPtr = {'min_length': YKHO.min_length, 'max_length': YKHO.max_length}
return {'node_type': 'String', 'config': GPtr} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MNRr(YKHO):\n lLIB = {'node_type': 'List', 'config': {'subnode': YKHO.subnode.to_dict(), 'max_length': YKHO.max_length, 'min_length': YKHO.min_length}}\n return lLIB",
"def MNRr(YKHO):\n me0v = {mWFP: Q6kx.to_dict() for mWFP, Q6kx in YKHO.subnodes.items()}\n return {'node_type': 'Compilation', 'c... | [
"0.72305924",
"0.71915764",
"0.71269107",
"0.7120841",
"0.6689397",
"0.6675947",
"0.6640161",
"0.6622743",
"0.65991944",
"0.64861286",
"0.6481253",
"0.6471709",
"0.6466092",
"0.62808806",
"0.62605065",
"0.61303455",
"0.61083245",
"0.608912",
"0.6081169",
"0.6077734",
"0.60446... | 0.74416345 | 0 |
Return the node representation as a dict. The representation dict includes a field ``node_type`` with the node class name and a field ``config`` with a dict of the configuration options. | def MNRr(YKHO):
GPtr = {'set_on_create': YKHO.set_on_create}
return {'node_type': 'Time', 'config': GPtr} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MNRr(YKHO):\n GPtr = {'min_length': YKHO.min_length, 'max_length': YKHO.max_length}\n return {'node_type': 'String', 'config': GPtr}",
"def MNRr(YKHO):\n lLIB = {'node_type': 'List', 'config': {'subnode': YKHO.subnode.to_dict(), 'max_length': YKHO.max_length, 'min_length': YKHO.min_length}}\n ret... | [
"0.7442022",
"0.7231194",
"0.71909934",
"0.7127399",
"0.71207815",
"0.6690997",
"0.6674581",
"0.6639316",
"0.6626117",
"0.6489566",
"0.64804006",
"0.64713436",
"0.6465782",
"0.62811035",
"0.62604296",
"0.61286867",
"0.61084473",
"0.60882753",
"0.6079824",
"0.60770315",
"0.604... | 0.65985435 | 9 |
Create a new node from its ``node_dict``. This is effectively a shorthand for choosing the correct node class and then calling its ``from_dict`` method. | def Lwa4(lLIB):
EfR7 = {mWFP: Emd4 for mWFP, Emd4 in globals().items() if tq_1.isclass(Emd4) and issubclass(Emd4, ty6f)}
if lLIB['node_type'] not in EfR7:
raise ValueError('Invalid node type specified.')
PGEZ = EfR7[lLIB['node_type']]
return PGEZ.from_dict(lLIB) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jG8h(Emd4, lLIB):\n if lLIB['node_type'] != Emd4.__name__:\n raise ValueError('Invalid node type in dict.')\n return Emd4(**lLIB['config'])",
"def jG8h(Emd4, Csk6):\n A7od = Csk6['type']\n if A7od == Emd4.__name__:\n raise Exception('Cannot instantiate abstract class \"Node\"')\n ... | [
"0.8566032",
"0.7684564",
"0.75125474",
"0.72912705",
"0.6761311",
"0.66024286",
"0.6496452",
"0.64643914",
"0.6423483",
"0.62548316",
"0.62548316",
"0.62548316",
"0.62548316",
"0.62548316",
"0.62548316",
"0.62548316",
"0.62548316",
"0.62548316",
"0.62548316",
"0.62548316",
"... | 0.74205935 | 3 |
Create a new node from its JSON representation. | def bO7d(nMY2):
return Lwa4(qQXR.loads(nMY2)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lYpi(qQXR):\n raise NotImplementedError('Returns instance')",
"def pktP(Emd4, Fg_i):\n return Emd4.from_dict(qQXR.loads(Fg_i))",
"def pktP(Emd4, ixH4):\n return Emd4.from_dict(qQXR.loads(ixH4))",
"def pktP(Emd4, Q6kx):\n A0Gq = QATa()\n A0Gq.story_id = HI3v(Q6kx, 'id')\n A0Gq.name = ofp... | [
"0.6749755",
"0.6290951",
"0.628192",
"0.6257354",
"0.60901785",
"0.608538",
"0.6084188",
"0.60559815",
"0.6036828",
"0.60300213",
"0.5965382",
"0.5965382",
"0.5965382",
"0.5907138",
"0.5907138",
"0.59011143",
"0.5884044",
"0.58633643",
"0.5856813",
"0.585468",
"0.5818817",
... | 0.75141054 | 0 |
Returns True if the passed user has passed permission for this instance. Otherwise False. | def qHTF(YKHO, CBIr, Uvf2, Tf5Y=None):
if Tf5Y is None:
Tf5Y = []
return w0rQ.utils.has_permission(YKHO, CBIr, Uvf2, Tf5Y) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M1EP(YKHO, CBIr):\n return True",
"def qHTF(Emd4, IuXB, CBIr):\n return IuXB in Emd4.get_permissions(CBIr)",
"def ZCvK(YKHO, CBIr, hfWS, oUZx, ouvA):\n if oUZx[1] == 'for_all':\n return True\n if oUZx[1] == 'for_mods' and hfWS:\n return True\n if type(oUZx[1]) == NCls.Command:\... | [
"0.8283404",
"0.7908732",
"0.7861734",
"0.78259146",
"0.78118193",
"0.7801385",
"0.76495403",
"0.76378196",
"0.76199204",
"0.75947",
"0.75038147",
"0.75000054",
"0.7480346",
"0.7479189",
"0.7473837",
"0.744742",
"0.7434219",
"0.73997945",
"0.7391658",
"0.7349404",
"0.73440117... | 0.7171924 | 42 |
Convert a Ditz timestamp to a BE timestamp. | def XrpE(S0TS):
G9jH.debug('in_time = %s', S0TS)
yvT9 = S0TS.strftime('%a, %d %b %Y %H:%M:%S %z+0000')
G9jH.debug('out = %s, out')
return yvT9 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X2x9(YKHO, E3oo):\n return int(E3oo * 1000000.0)",
"def YjBD(YKHO):\n try:\n WgTK = kJUT.parse(E3oo)\n yIp6 = int((WgTK - YKHO.epoch_1904).total_seconds())\n YKHO.out_hfs_be = '{0:08x}'.format(yIp6)\n except Exception as e:\n if not qIxc.log:\n pass\n el... | [
"0.6227305",
"0.61929035",
"0.61863",
"0.61290854",
"0.6086191",
"0.6040755",
"0.5997102",
"0.5989433",
"0.5986509",
"0.5965704",
"0.5926505",
"0.5904821",
"0.5891226",
"0.58841735",
"0.58613324",
"0.5850126",
"0.5844812",
"0.58103627",
"0.579728",
"0.5790927",
"0.5775074",
... | 0.0 | -1 |
Correct problems with Ditz YAML. Ditz doesn't put double quotes around titles starting with the "`" character, and encodes nonASCII characters in a nonstandard way. This function rewrites a Ditz quasiYAML into a wellformed YAML string which can be read by yaml.load without problems. | def _ws7(CK6b):
Aofo = ZbWC.sub('title: (`.*)\n', 'title: "\\1"\\n', CK6b)
hHld = ZbWC.findall('((\\\\x..)+)', Aofo)
for IguF, bGrB in hHld:
jShR = IguF.decode('string_escape').decode('utf-8')
Aofo = Aofo.replace(IguF, jShR)
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BONs(yYx7):\n for H5ew in yYx7:\n wOb_ = kJm3()\n nPrm = {}\n nPrm[H5ew] = yYx7[H5ew]\n XN37.dump_yaml(nPrm, wOb_, typ='rt')\n wOb_ = wOb_.getvalue()\n hGN5 = ZbWC.sub(j9KE, '<b>\\\\1</b>\\\\2', wOb_)\n yYx7[H5ew] = hGN5\n return yYx7",
"def P2SG(YKHO):\... | [
"0.5691163",
"0.5608269",
"0.5356055",
"0.52969724",
"0.5272399",
"0.5244335",
"0.5191273",
"0.50636977",
"0.50494516",
"0.49811327",
"0.4936989",
"0.4883389",
"0.4865876",
"0.4854402",
"0.4847249",
"0.4826937",
"0.48266217",
"0.48062685",
"0.47994736",
"0.4782841",
"0.477632... | 0.72684824 | 0 |
Sets the flux for the LightCurve. | def WZi7(YKHO, **B2fa):
from .utils import read_lc_file
vpU5 = False
QTq5 = None
if 'usecols' in B2fa:
QTq5 = B2fa['usecols']
XWwe = 0
if 'skiprows' in B2fa:
XWwe = int(B2fa['skiprows'])
if 'file' in B2fa:
try:
Dr4l = read_lc_file(B2fa['file'], usecols=QTq... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Alzi(YKHO):\n try:\n YKHO.flux = YKHO.flux_obs\n except:\n raise ValueError('Reset is only possible when a LightCurve is instantiated with time and flux.')\n return",
"def WZi7(YKHO, shSu, SRYB):\n YKHO._properties['flux'] = oyIN.float(shSu)\n YKHO._properties['var'] = oyIN.float... | [
"0.753703",
"0.73755616",
"0.6691866",
"0.6272665",
"0.6103615",
"0.59867424",
"0.5962357",
"0.5954845",
"0.58685625",
"0.58322674",
"0.58055216",
"0.57954043",
"0.57822",
"0.5765943",
"0.57379305",
"0.57374907",
"0.5722315",
"0.5676114",
"0.5656412",
"0.5628673",
"0.555676",... | 0.5908917 | 8 |
Sets the object distance. | def g7Jv(YKHO, pImw):
pImw = P6bq.Quantity(pImw, unit=P6bq.AU)
if pImw.value < 0:
qmLP.warn('distance cannot be negative. Using absolute value.')
YKHO.dist = oyIN.absolute(pImw.value) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ayfi(YKHO, Ayfi):\n YKHO._distance = Ayfi",
"def Ayfi(YKHO, Ayfi):\n YKHO._distance = Ayfi",
"def Ayfi(YKHO, Ayfi):\n YKHO._distance = Ayfi",
"def YbHA(YKHO):\n Ayfi = YKHO.gui.doubleSpinBox_distance.value()\n PXGI = YKHO.gui.comboBox_unit.currentText()\n LSii = r902(str(Ayfi) + PXGI)\n... | [
"0.741672",
"0.741672",
"0.741672",
"0.7346829",
"0.6572938",
"0.6328819",
"0.61095697",
"0.60270905",
"0.60199684",
"0.5885509",
"0.5881777",
"0.5839233",
"0.58255285",
"0.5806414",
"0.5771256",
"0.572016",
"0.56607294",
"0.5653694",
"0.56498516",
"0.5642306",
"0.55980253",
... | 0.67865855 | 4 |
Determines the magnitude drop of the occultation. | def GRtE(YKHO, Rtd4, wU0C):
from .utils import GRtE
Qtbw, x__K = GRtE(Rtd4, wU0C)
YKHO.mag_drop = Qtbw
YKHO.bottom_flux = x__K | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZnHf(YKHO):\n return YKHO._absolute_magnitude",
"def YXbZ(YKHO):\n return YKHO.real ** 2 + XTiz.inner(YKHO.pure, YKHO.pure)",
"def PKV0(YKHO):\n return YKHO.magnitude()",
"def _7Vg(YKHO):\n print(3284 * epAf.pow(YKHO.concentration, -0.158))\n return 3284 * epAf.pow(YKHO.concentration, -0.1... | [
"0.6362259",
"0.6342887",
"0.63426393",
"0.63260937",
"0.630266",
"0.6274245",
"0.6228945",
"0.6201521",
"0.6198432",
"0.6165679",
"0.61574244",
"0.61482805",
"0.6145389",
"0.6103653",
"0.6062506",
"0.60443956",
"0.6019284",
"0.60037607",
"0.60013896",
"0.60013896",
"0.596915... | 0.688157 | 0 |
Looks for all the blobs in the bucket that begin with the prefix and returns the available folder. This can be used to list all blobs in a "folder", e.g. "public/". The delimiter argument can be used to restrict the results to only the "files" in the given "folder". Without the delimiter, the entire tree under | def on61(b_kJ: str, l7rj: str, TDw3=None) -> str:
WE7e = xmDt(l7rj)
y0cW = 'model_output/' + b_kJ
snt0 = None
while not snt0:
dIng = WE7e.list_blobs(prefix=y0cW, delimiter=TDw3)
dIng = list(dIng)
if len(dIng) > 0:
r8hN = b_kJ.split('_')
try:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I3lW(YKHO, WE7e, AGPF, TDw3=''):\n Fg_i = YKHO.conn.get_bucket(WE7e)\n H0q3 = Fg_i.list(AGPF, TDw3)\n return [H5ew.name for H5ew in H0q3 if '$folder$' not in H5ew.name]",
"def ehTj(l7rj, y0cW=None, TDw3=None):\n ntiA = S8SU.Client()\n dIng = ntiA.list_blobs(l7rj, prefix=y0cW, delimiter=TDw3)\n... | [
"0.70891166",
"0.68545735",
"0.66423535",
"0.65049565",
"0.63648283",
"0.6339433",
"0.63098526",
"0.6251281",
"0.6191405",
"0.60998994",
"0.6023948",
"0.6012974",
"0.59783745",
"0.5893421",
"0.583977",
"0.5740943",
"0.5739943",
"0.5735244",
"0.56723374",
"0.56504613",
"0.5648... | 0.59004825 | 13 |
Finds the first match that has a Compound as a value. | def tpBq(hHld):
for r8hN in hHld:
if isinstance(r8hN.value, FYrf.Compound):
return r8hN
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Kb3I(YKHO, jZ4I, UXqs):\n Ylbp = YKHO._find_all(jZ4I, UXqs, max_results=1)\n if len(Ylbp):\n return Ylbp[0]\n return None",
"def L4Qu(rM3N: str, LeZt: List[str]):\n return NBjn.extractOne(rM3N, LeZt)[0]",
"def zVRb(YKHO, hRzw: str) -> h8nf[CC10]:\n return YKHO.session.query(CC10).filt... | [
"0.6016543",
"0.5834336",
"0.5678704",
"0.5657585",
"0.5643023",
"0.5508956",
"0.54367584",
"0.53814363",
"0.53302",
"0.53271663",
"0.53266215",
"0.52743524",
"0.5270677",
"0.52337503",
"0.5143348",
"0.5133931",
"0.51282066",
"0.5121478",
"0.51175827",
"0.51169",
"0.50980425"... | 0.8777652 | 0 |
Calculates a learning rate of the initial LR decayed by 10 every 30 epochs | def e_63(tspZ, K0do, qtWj):
tspZ = bYD2 * 0.1 ** (qtWj // 10)
for Lwm5 in K0do.param_groups:
Lwm5['lr'] = tspZ
return tspZ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b0Ix(qtWj):\n YKHO.lr = YKHO.lr / 1.00000001\n return YKHO.lr",
"def cBsx(YKHO, yKTC, qtWj):\n \"\"\"\n Dan's Methos\n \"\"\"\n yj8H = yKTC * 0.001\n Z9rn = oyIN.power(yj8H / yKTC, 1.0 / YKHO.__maxEpoch)\n return yKTC * oyIN.power(Z9rn, qtWj)",
"def b0Ix(qtWj):\n return C... | [
"0.82223254",
"0.8086511",
"0.803759",
"0.803759",
"0.7834619",
"0.78295976",
"0.78064525",
"0.7795517",
"0.778973",
"0.778973",
"0.778973",
"0.778973",
"0.77371264",
"0.77239877",
"0.7662104",
"0.7593775",
"0.75899374",
"0.75884485",
"0.757662",
"0.75717473",
"0.75522095",
... | 0.744859 | 24 |
Computes the precision for the specified values of k | def vjyh(hlel, pan_, hz5a=(1,)):
Gq8e = max(hz5a)
Ep8u = pan_.size(0)
bGrB, nvEb = hlel.topk(Gq8e, 1, True, True)
nvEb = nvEb.t()
gXXc = nvEb.eq(pan_.view(1, -1).expand_as(nvEb))
Ylbp = []
for G1Hx in hz5a:
R2Dg = gXXc[:G1Hx].view(-1).float().sum(0, keepdim=True)
Ylbp.append(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhd_(_ger, nvEb, G1Hx):\n G1Hx = min(len(nvEb), G1Hx)\n OCOs = min(len(_ger), G1Hx)\n return sum([int(nvEb[YRbF] in _ger) for YRbF in range(G1Hx)]) / OCOs",
"def sEak(Mkmy, G1Hx):\n assert G1Hx >= 1\n Mkmy = oyIN.asarray(Mkmy)[:G1Hx] != 0\n if Mkmy.size != G1Hx:\n raise ValueError('R... | [
"0.7643094",
"0.7419047",
"0.74181783",
"0.7270927",
"0.7245956",
"0.7244712",
"0.72375613",
"0.722149",
"0.72102135",
"0.7058916",
"0.6851902",
"0.6786465",
"0.67835456",
"0.67682284",
"0.67274547",
"0.6717998",
"0.6717998",
"0.6717998",
"0.6717998",
"0.6717998",
"0.6717998"... | 0.0 | -1 |
Return an initialized dict so empty rows or columns in the Sudoku are correctly handled. | def Ma2G(Csk6, Ydso, vgXP=0):
return {H5ew: [] for H5ew in range(vgXP, Ydso ** 2 + vgXP)} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _lNx(H2v2, TVTK):\n iBIi = {}\n for YRbF in range(H2v2):\n for r845 in range(TVTK):\n dQgj = (YRbF, r845)\n iBIi[dQgj] = 0\n return iBIi",
"def WSly() -> cuzp[yZ_w, _UKz]:\n y4m8: cuzp[yZ_w, _UKz] = {}\n for Fr3f in range(yELo._NUM_COLS):\n for WflQ in range... | [
"0.691303",
"0.6503695",
"0.642644",
"0.61995727",
"0.6198556",
"0.61782855",
"0.6109561",
"0.60498834",
"0.6048783",
"0.6027217",
"0.60227877",
"0.6010691",
"0.6005722",
"0.59985423",
"0.5913935",
"0.5909166",
"0.58611274",
"0.58490217",
"0.58396024",
"0.58266664",
"0.582605... | 0.5262787 | 90 |
Return dicts with updated digit removed from missing digits. | def TFC9(WgYu, fgcx, ARsY):
rdlD, fvDH, exwG = WgYu
TquA, Bcwd, vg0C = fgcx
MuIv = ARsY
TquA[rdlD].remove(exwG)
Bcwd[fvDH].remove(exwG)
vg0C[ARsY[rdlD, fvDH]].remove(exwG)
del MuIv[rdlD, fvDH]
return fgcx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cFC6(YKHO, hkxX, FlUN, Ko6S):\n hkxX[FlUN] = hkxX[FlUN].replace(Ko6S, '')\n return hkxX",
"def zJeh(hkxX):\n vMy3 = [FlUN for FlUN in hkxX.keys() if len(hkxX[FlUN]) == 1]\n for FlUN in vMy3:\n Ko6S = hkxX[FlUN]\n for jYLz in k5Tt[FlUN]:\n Qj8D = hkxX[jYLz].replace(Ko6S, '... | [
"0.61933106",
"0.61880916",
"0.6021302",
"0.6021302",
"0.5980913",
"0.5635354",
"0.5601633",
"0.54836386",
"0.54461795",
"0.5436395",
"0.5378042",
"0.5349286",
"0.53485453",
"0.5339401",
"0.53085923",
"0.5305944",
"0.5299588",
"0.5290143",
"0.52666515",
"0.52202797",
"0.51958... | 0.0 | -1 |
Reduces the size of the matrix, erasing the zero values. | def P7A5(nPrm):
KQOt = rLdf.DataFrame(nPrm)
gZN8 = oyIN.flatnonzero(oyIN.diag(KQOt))
YmGw = KQOt.iloc[gZN8, gZN8]
return (gZN8, YmGw) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y7Bk(YKHO):\n for LVAh in range(len(YKHO.matrix)):\n for WKvO in range(len(YKHO.matrix[0])):\n YKHO.matrix[LVAh - 1][WKvO - 1] = (0, 0, 0)",
"def Y7Bk(YKHO):\n YKHO._length = 0\n YKHO._resize_arr(1)",
"def WseC(YKHO):\n YKHO._w2i_matrix = YKHO._i2w_matrix = None",
"def SiRx(... | [
"0.7029638",
"0.66807014",
"0.6656752",
"0.65129143",
"0.64787734",
"0.6444722",
"0.63964504",
"0.62870175",
"0.62544125",
"0.621797",
"0.6210601",
"0.61580896",
"0.6134495",
"0.6127081",
"0.6102331",
"0.6094252",
"0.6091178",
"0.6091023",
"0.6057329",
"0.6043073",
"0.6041758... | 0.0 | -1 |
Get ELBO for this layer | def qCRr(YKHO, u54L):
PTBy = 0.5 * (ZylS.reduce_sum(ZylS.sqrt(ZylS.reduce_sum(YKHO.batch_mu ** 2, axis=1))) + ZylS.reduce_sum(YKHO.batch_Tr_C) - ZylS.reduce_sum(YKHO.batch_ld_C) - u54L)
ayC5 = 0.5 / YKHO.k * ZylS.sqrt(ZylS.reduce_sum(YKHO.W ** 2)) * ZylS.sqrt(ZylS.reduce_sum(YKHO.G ** 2))
return -(ayC5 + PT... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qCRr(YKHO, dEjK):\n YKHO.coord_update()\n G4o1 = ZylS.reduce_sum(-0.5 * (YKHO.mu ** 2 + YKHO.sigma ** 2) * (YKHO.alpha / YKHO.beta) + 0.5 * (ZylS.digamma(YKHO.alpha) - ZylS.log(YKHO.beta)) - 0.5 * ZylS.log(2 * oyIN.pi))\n G4o1 += ZylS.reduce_sum((YKHO.a - 1) * (ZylS.digamma(YKHO.alpha) - ZylS.log(YKHO... | [
"0.68285304",
"0.659543",
"0.60152537",
"0.58310217",
"0.5678733",
"0.550667",
"0.54124963",
"0.537104",
"0.53311837",
"0.5244197",
"0.52229315",
"0.5187892",
"0.5183694",
"0.5146262",
"0.5131166",
"0.51201504",
"0.51093227",
"0.50982654",
"0.50919646",
"0.508655",
"0.5080843... | 0.5614302 | 5 |