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 |
|---|---|---|---|---|---|---|
retrieve the number of subscribers of a subreddit | def zdW_(_5RM):
bD7m = 'https://www.reddit.com/r/{}/about.json'.format(_5RM)
MOPg = {'User-Agent': 'my-integration/1.2.3'}
geh0 = NMoC(url=bD7m, headers=MOPg)
if geh0.status_code == 200:
zs78 = geh0.json()
nPrm = zs78.get('data')
HV_K = nPrm.get('subscribers')
return HV_K... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zdW_(_5RM):\n WBPg = {'User-Agent': 'Chrome/90.0.4430.212 Safari/537.36'}\n qv1X = G4JS.get('https://www.reddit.com/r/{}/about.json'.format(_5RM), allow_redirects=False, headers=WBPg)\n if qv1X.status_code == 200:\n HV_K = qv1X.json().get('data').get('subscribers')\n return HV_K\n els... | [
"0.87893707",
"0.87762237",
"0.8750274",
"0.8747642",
"0.87215537",
"0.87118036",
"0.8690481",
"0.86867094",
"0.8682486",
"0.86785024",
"0.86742127",
"0.86682785",
"0.8634838",
"0.8620241",
"0.861384",
"0.8574577",
"0.8554686",
"0.8531662",
"0.8502006",
"0.8491157",
"0.837957... | 0.86229396 | 13 |
Get runid for an experiment. | def ut7x(pmON):
mWFP = GkAb(pmON).name
if not Hy7s.path.exists(GkAb(pmON).parent):
return '00001'
RRlC = Hy7s.listdir(GkAb(pmON).parent)
Bt8i = 0
for eHNT in RRlC:
try:
id, wEf2 = eHNT.split('_', 1)
Bt8i = max(Bt8i, int(id))
except:
pass
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KNdJ(YKHO):\n if YKHO.have_metadata is False:\n YKHO._get_metadata()\n YKHO.have_metadata = True\n try:\n return YKHO.keyinfo['tracking_id'].attrs['run_id']\n except:\n return None",
"def ByBU(YKHO):\n if YKHO._run_id is not None:\n return YKHO._run_id\n iXC1... | [
"0.7490979",
"0.7168973",
"0.71110874",
"0.7032822",
"0.7032498",
"0.6945545",
"0.6422959",
"0.6293841",
"0.60468614",
"0.6045846",
"0.60357565",
"0.603554",
"0.596559",
"0.5948923",
"0.5894417",
"0.586999",
"0.5818017",
"0.57944405",
"0.5714358",
"0.56367105",
"0.56298614",
... | 0.6122325 | 8 |
Fills the feed_dict. If the batch has fewer samples than the placeholder, it is padded with zeros. | def igwZ(McNG, jlga, Y6wO, fl4t, LDbx, LT6S, NAnm):
if McNG.shape[0] < vPBo.batch_size:
if LT6S:
return None
else:
E3D9 = vPBo.batch_size - McNG.shape[0]
McNG = oyIN.pad(McNG, ((0, E3D9), (0, 0), (0, 0), (0, 0)), 'constant', constant_values=0)
jlga = o... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ozfc(YKHO, InGT, bYtc, iY6y, ovYi=None, hr1G=1):\n kdJa = {}\n if ovYi is not None:\n kdJa[YKHO.labels_placeholder] = ovYi\n if InGT is not None:\n kdJa[YKHO.input_placeholder] = InGT\n if iY6y is not None:\n kdJa[YKHO.length_placeholder] = iY6y\n if hr1G is not None:\n ... | [
"0.6508451",
"0.6506305",
"0.6477034",
"0.63315076",
"0.6189684",
"0.6050192",
"0.6017698",
"0.5935921",
"0.58827037",
"0.58556026",
"0.58197844",
"0.5800368",
"0.5772726",
"0.5748977",
"0.5730423",
"0.562262",
"0.56177944",
"0.5577941",
"0.54708683",
"0.54559416",
"0.5453391... | 0.69885147 | 0 |
Standardize input strings by making nonascii spaces be ascii, and by converting treebankstyle brackets/parenthesis be characters once more. | def I3lj(vIwR):
return vIwR.replace('\xa0', ' ').replace('\\', '').replace('-LRB-', '(').replace('-RRB-', ')').replace('-LCB-', '{').replace('-RCB-', '}').replace('-LSB-', '[').replace('-RSB-', ']') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I3lj(vIwR):\n return vIwR.replace(u'\\xa0', ' ').replace('\\\\', '').replace('-LRB-', '(').replace('-RRB-', ')').replace('-LCB-', '{').replace('-RCB-', '}').replace('-LSB-', '[').replace('-RSB-', ']')",
"def _nPv(KCHu):\n _p7a = []\n KCHu = KCHu.replace(',', ' ')\n Ylbp = ''\n for Z9rn in KCHu... | [
"0.6748723",
"0.65540516",
"0.6457333",
"0.6452723",
"0.6301455",
"0.6299961",
"0.62826407",
"0.6277174",
"0.6239982",
"0.62362087",
"0.6235443",
"0.6213934",
"0.61738104",
"0.60826814",
"0.6039613",
"0.60315955",
"0.59249365",
"0.5903164",
"0.5890551",
"0.5861797",
"0.585742... | 0.67233497 | 1 |
Standardize input strings by making nonascii spaces be ascii, and by converting treebankstyle brackets/parenthesis be characters once more. | def I3lj(vIwR):
return vIwR.replace(u'\xa0', ' ').replace('\\', '').replace('-LRB-', '(').replace('-RRB-', ')').replace('-LCB-', '{').replace('-RCB-', '}').replace('-LSB-', '[').replace('-RSB-', ']') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I3lj(vIwR):\n return vIwR.replace('\\xa0', ' ').replace('\\\\', '').replace('-LRB-', '(').replace('-RRB-', ')').replace('-LCB-', '{').replace('-RCB-', '}').replace('-LSB-', '[').replace('-RSB-', ']')",
"def _nPv(KCHu):\n _p7a = []\n KCHu = KCHu.replace(',', ' ')\n Ylbp = ''\n for Z9rn in KCHu:... | [
"0.67221195",
"0.6556024",
"0.6459481",
"0.64517695",
"0.6303864",
"0.63007694",
"0.62836707",
"0.6279229",
"0.6241196",
"0.62384444",
"0.6237675",
"0.62145656",
"0.6173789",
"0.6082146",
"0.603995",
"0.60321844",
"0.5926097",
"0.5902878",
"0.5893448",
"0.58624965",
"0.585981... | 0.67476076 | 0 |
Test that invalid ensembles raise errors. | def J2le(ZM8d: Any) -> None:
YvK4 = evOl(ensemble=ZM8d)
with trZe.raises(ValueError, match='.*Invalid ensemble.*'):
YvK4.fit(AYI0, An13) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def boCO():\n for oUZx in bHfs:\n with trZe.raises(NwyO) as zK6_:\n oUZx(oid='some-irelevant-oid', community='public', ipaddress='invalid-hostname')\n assert 'does not appear to be a valid' in str(zK6_.value)\n with trZe.raises(NwyO) as zK6_:\n yJxN(oids=['some-irelevant-oid']... | [
"0.7004704",
"0.69955474",
"0.6849044",
"0.68303615",
"0.6752097",
"0.6744247",
"0.6741358",
"0.6691716",
"0.6662502",
"0.6653034",
"0.6644101",
"0.66314495",
"0.66027105",
"0.6597587",
"0.6586666",
"0.65835136",
"0.65737927",
"0.65631366",
"0.65289795",
"0.65210193",
"0.6518... | 0.70037544 | 1 |
Test that prediction intervals lower (upper) bounds give consistent results for ordered alphas. | def hKWn(OuMq: str) -> None:
YvK4 = evOl(**mA27[OuMq])
YvK4.fit(EcVT, LVAh)
aMgO, BORU = YvK4.predict(EcVT, alpha=[0.05, 0.1])
assert (BORU[:, 0, 0] <= BORU[:, 0, 1]).all()
assert (BORU[:, 1, 0] >= BORU[:, 1, 1]).all() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lL24():\n C3ST = sOxh(formula='y ~ x1', data=nPrm, ar=2, ma=2, family=KNlX())\n WKvO = C3ST.fit()\n N6Z1 = C3ST.predict(h=10, oos_data=pEy8, intervals=True)\n assert oyIN.all(N6Z1['99% Prediction Interval'].values >= N6Z1['95% Prediction Interval'].values)\n assert oyIN.all(N6Z1['95% Prediction ... | [
"0.7008983",
"0.6921854",
"0.6629614",
"0.6628991",
"0.6541392",
"0.6503705",
"0.636226",
"0.6283357",
"0.6096767",
"0.6088294",
"0.5940772",
"0.5924373",
"0.59009564",
"0.5830119",
"0.58078974",
"0.5780239",
"0.5753406",
"0.5746239",
"0.57426304",
"0.57033485",
"0.56873703",... | 0.60601026 | 10 |
Add headers to both force latest IE rendering engine or Chrome Frame, and also to cache the rendered page for 10 minutes. | def PYz4(Mkmy):
Mkmy.headers['Acess-Control-Allow-Origin'] = '*'
Mkmy.headers['Cache-Control'] = 'no-cache, no-store, must-revalidate'
Mkmy.headers['Pragma'] = 'no-cache'
Mkmy.headers['Expires'] = '0'
Mkmy.headers['Cache-Control'] = 'public, max-age=0'
return Mkmy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PYz4(geh0):\n geh0.headers['X-UA-Compatible'] = 'IE=Edge,chrome=1'\n geh0.headers['Cache-Control'] = 'public, max-age=60'\n return geh0",
"def PYz4(geh0):\n geh0.headers['X-UA-Compatible'] = 'IE=Edge,chrome=1'\n geh0.headers['Cache-Control'] = 'public, max-age=600'\n return geh0",
"def PY... | [
"0.82238686",
"0.8223043",
"0.8223043",
"0.8223043",
"0.8223043",
"0.81963",
"0.81638503",
"0.81638503",
"0.81638503",
"0.81638503",
"0.81638503",
"0.81638503",
"0.81638503",
"0.81638503",
"0.81638503",
"0.81638503",
"0.81638503",
"0.81638503",
"0.81638503",
"0.81638503",
"0.... | 0.6675408 | 76 |
Turns a regular string into a valid (sanatized) string that is safe for use as a file name. Method courtesy of cowlinator on StackOverflow | def XZ66(KCHu):
assert KCHu is not '' or KCHu is not None
KCHu = str(KCHu).strip().replace(' ', '_')
return ZbWC.sub('(?u)[^-\\w.]', '', KCHu) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YzRu(KCHu: str) -> str:\n global UNICODE_FILENAMES, FILESYSTEM_IS_LINUX\n if MvQY:\n KCHu = UDMn.sub('_', KCHu)\n else:\n KCHu = n29w.sub('_', KCHu)\n KCHu = qGho.split(KCHu)[0]\n if not PH7h:\n KCHu = qLW4.sub('_', KCHu)\n return KCHu",
"def XZ66(KCHu):\n KCHu =... | [
"0.76716447",
"0.75413036",
"0.7540056",
"0.7441016",
"0.72924304",
"0.7285585",
"0.72623646",
"0.7174796",
"0.7174796",
"0.7174796",
"0.71293354",
"0.7114902",
"0.7114902",
"0.7033923",
"0.700631",
"0.6984628",
"0.6972508",
"0.69627804",
"0.69307685",
"0.6894254",
"0.6804197... | 0.7424664 | 4 |
SpikingNetwork() Constructor for SpikingNetwork class. The SpikingNetwork class contains a collection of neurons, and the connections between those neurons. | def FIMM(YKHO):
YKHO.neurons = []
YKHO.connections = []
YKHO.t_history = [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qhd5(YKHO):\n raise NotImplementedError",
"def FIMM(YKHO, Ziit=None, mC4V=None):\n YKHO._nodes = []\n YKHO.nodes = Ziit\n YKHO._edges = []\n YKHO.edges = mC4V\n YKHO._create_connections()\n YKHO._sorted_nodes = None\n YKHO._node_wip = []",
"def TCIu(fhcK):\n return CDet(fhcK)",
... | [
"0.58834445",
"0.5857751",
"0.57161033",
"0.5706412",
"0.5669589",
"0.5645808",
"0.563864",
"0.5636151",
"0.5586804",
"0.5579512",
"0.55789185",
"0.5547211",
"0.5533607",
"0.55252385",
"0.55141115",
"0.55023617",
"0.5473347",
"0.5464233",
"0.5445459",
"0.5437679",
"0.5429262"... | 0.5557069 | 11 |
Get relative path of given file_path. | def mmOY(YKHO, qaEx: Union[str, os.PathLike]) -> h8nf[str]:
qaEx = GkAb(qaEx).absolute()
try:
return Hy7s.path.relpath(qaEx, YKHO.base_path)
except ValueError:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NE63(YKHO, qaEx):\n qaEx = Hy7s.path.abspath(qaEx)\n if YKHO.base_dir is not None:\n qaEx = qaEx.replace(Hy7s.path.abspath(YKHO.base_dir), '')\n assert qaEx[0] == '/'\n qaEx = qaEx[1:]\n return qaEx",
"def NE63(pmON: str):\n return Hy7s.path.relpath(pmON, phdL())",
"def Qth0(YKHO, ... | [
"0.8520076",
"0.8010845",
"0.78642064",
"0.7803581",
"0.77645516",
"0.7719742",
"0.73517203",
"0.73088115",
"0.7220092",
"0.71953005",
"0.71606654",
"0.71266824",
"0.71025205",
"0.7034532",
"0.69833493",
"0.6972556",
"0.6970623",
"0.69497347",
"0.6899141",
"0.68803144",
"0.68... | 0.7720322 | 5 |
Hydrate a dict/set while nicely handling errors. | def tiIM(YKHO, I1L0: typing.Union[dict[str, int], set[str]], QbNf: 'Categorization') -> laHg.Union[dict['Category', int], set['Category']]:
try:
if isinstance(I1L0, dict):
return {QbNf[Wxnj]: aM8h for Wxnj, aM8h in I1L0.items()}
else:
return {QbNf[Wxnj] for Wxnj in I1L0}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Yav4(tgCD, pWGZ):\n tgCD.wipe()\n dict = MNRr(pWGZ)\n dict = yaXY(dict)\n tgCD.dict = dict",
"def blJf(HUjY, d6pt, tGpS, SmrQ=[]):\n try:\n for jGGf in SmrQ:\n tGpS = tGpS.__getitem__(jGGf)\n HUjY[d6pt] = str(tGpS)\n return tGpS\n except:\n return ''",... | [
"0.5863379",
"0.5672946",
"0.54328823",
"0.54011786",
"0.53436315",
"0.5334652",
"0.53215295",
"0.5282999",
"0.5265902",
"0.5247211",
"0.5218455",
"0.52056223",
"0.5163514",
"0.5159744",
"0.5148958",
"0.513242",
"0.51254594",
"0.5115584",
"0.5100926",
"0.50891805",
"0.5080949... | 0.61847955 | 0 |
Returns all rules which involve the given categories. | def rebt(YKHO, LeZt: set['HierarchicalCategory'], ixj2: typing.Optional['Categorization']=None, a6UU: bool=False) -> list[m1o0]:
rebt: list[m1o0] = []
if not LeZt:
return rebt
if ixj2 is None:
ixj2 = next(iter(LeZt)).categorization
for eD8c in YKHO.rules:
if ixj2 == YKHO.categori... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UzBz(Ghho):\n c_NS = GGod().execute('SELECT * FROM ruleset WHERE category_id = ?', (Ghho,)).fetchall()\n return c_NS",
"def ptoK(YKHO):\n return YKHO._activity_category_rules",
"def zWGO(YKHO):\n c_NS = set()\n for uxij in YKHO.get_dicts():\n c_NS = wUfe.union(uxij['rules'])\n retu... | [
"0.73781073",
"0.62699336",
"0.6244929",
"0.61445254",
"0.61245614",
"0.61126804",
"0.60499126",
"0.60048413",
"0.5924794",
"0.5907226",
"0.58856577",
"0.5866383",
"0.57582927",
"0.57435775",
"0.5711128",
"0.5692245",
"0.56867796",
"0.5686372",
"0.56736314",
"0.5668175",
"0.5... | 0.69138217 | 1 |
A usersupplied email address to send case update notifications for. This should only be used in BYOID flows, where we cannot infer the user's email address directly from their EUCs. | def LpCf(YKHO) -> str:
return qe4Y.get(YKHO, 'contact_email') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hxmi() -> str:\n return Hy7s.environ.get('EMAIL_NOTIFICATION', '')",
"def RC0X(YKHO):\n return YKHO.reference[XMvj][NNfF]",
"def Hxmi(YKHO) -> str:\n return YKHO._email_address",
"def cHyp(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'user_email')",
"def Hxmi(YKHO) -> 'str':\n retu... | [
"0.6800963",
"0.67918104",
"0.6675029",
"0.6637772",
"0.6562847",
"0.65611213",
"0.65611213",
"0.65611213",
"0.6551857",
"0.6550386",
"0.6488691",
"0.643121",
"0.6427618",
"0.640023",
"0.640023",
"0.640023",
"0.640023",
"0.6396381",
"0.6375035",
"0.6374068",
"0.63728213",
"... | 0.6650474 | 3 |
Whether the case is currently escalated. | def I0tq(YKHO) -> bool:
return qe4Y.get(YKHO, 'escalated') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kEoG(YKHO) -> h8nf[qe4Y.Input[bool]]:\n return qe4Y.get(YKHO, 'allow_privilege_escalation')",
"def kEoG(YKHO) -> h8nf[qe4Y.Input[bool]]:\n return qe4Y.get(YKHO, 'allow_privilege_escalation')",
"def A7Ja(YKHO):\n return YKHO._terminate.isSet()",
"def GRll(YKHO) -> bool:\n return YKHO.cooldown ... | [
"0.6756851",
"0.6756851",
"0.655456",
"0.6466731",
"0.6466731",
"0.64366317",
"0.64095396",
"0.63888055",
"0.63750374",
"0.6334827",
"0.6334827",
"0.6318662",
"0.63014776",
"0.62806183",
"0.6267026",
"0.62587327",
"0.6247529",
"0.62142515",
"0.6177528",
"0.6150019",
"0.614986... | 0.8121611 | 0 |
Set the user's full name. | def gBdT(YKHO, BWXx):
raise NotImplementedError('set_fullname') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V_VB(YKHO, V_VB):\n YKHO._user_full_name = V_VB",
"def myG0(eOtH, gYhn, bWgT):\n if len(gYhn) > 50 or gYhn == '':\n raise P1dF.InputError(description='First name is not within 1-50 characters')\n if len(bWgT) > 50 or bWgT == '':\n raise P1dF.InputError(description='Last name is not wit... | [
"0.836563",
"0.75340545",
"0.7514459",
"0.74505484",
"0.7405372",
"0.7405372",
"0.7332618",
"0.73247784",
"0.72957754",
"0.72543204",
"0.72519",
"0.7229117",
"0.7208752",
"0.71451366",
"0.7137475",
"0.7065397",
"0.70451474",
"0.70353705",
"0.70353705",
"0.7022715",
"0.7022705... | 0.6964731 | 22 |
Get the user's full name. | def zFMy(YKHO):
raise NotImplementedError('get_fullname') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eHMM(YKHO):\n return YKHO.user.get_full_name() or None",
"def xpqj(YKHO):\n eHMM = '%s %s' % (YKHO.user.first_name.strip(), YKHO.user.last_name.strip())\n if len(eHMM.strip()) == 0:\n eHMM = YKHO.user.username\n return eHMM.strip()",
"def Q1ao(YKHO):\n mS46 = YKHO.get_user()\n if m... | [
"0.8865615",
"0.8864113",
"0.8771539",
"0.8744222",
"0.87359774",
"0.87359774",
"0.8711882",
"0.86309487",
"0.8567367",
"0.8471274",
"0.8394458",
"0.8369933",
"0.8216363",
"0.8214691",
"0.82139677",
"0.81876767",
"0.81876767",
"0.8171172",
"0.8169147",
"0.81618434",
"0.815664... | 0.0 | -1 |
Returns true if the user should be automatically logged in. | def gFu5(YKHO):
raise NotImplementedError('get_auto_login') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y8Sy(YKHO):\n return YKHO.auth.get_user_by_session() is not None",
"def Y8Sy():\n if c5ow.is_authenticated:\n return True\n return False",
"def MQ6L(YKHO):\n cuiw = YKHO.getSession()\n if cuiw is not None:\n return True\n return False",
"def Y8Sy(YKHO):\n return YKHO.us... | [
"0.80263686",
"0.7900795",
"0.77159154",
"0.7684851",
"0.767902",
"0.7595168",
"0.7582302",
"0.7556779",
"0.747085",
"0.74536145",
"0.74202716",
"0.74202716",
"0.74202716",
"0.74202716",
"0.74202716",
"0.74202716",
"0.74202716",
"0.7333102",
"0.73288363",
"0.72879565",
"0.727... | 0.0 | -1 |
Set the user's full name. | def gBdT(YKHO, BWXx):
YKHO.fullname = BWXx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V_VB(YKHO, V_VB):\n YKHO._user_full_name = V_VB",
"def myG0(eOtH, gYhn, bWgT):\n if len(gYhn) > 50 or gYhn == '':\n raise P1dF.InputError(description='First name is not within 1-50 characters')\n if len(bWgT) > 50 or bWgT == '':\n raise P1dF.InputError(description='Last name is not wit... | [
"0.836563",
"0.75340545",
"0.74505484",
"0.7405372",
"0.7405372",
"0.7332618",
"0.73247784",
"0.72957754",
"0.72543204",
"0.72519",
"0.7229117",
"0.7208752",
"0.71451366",
"0.7137475",
"0.7065397",
"0.70451474",
"0.70353705",
"0.70353705",
"0.7022715",
"0.7022705",
"0.6990638... | 0.7514459 | 2 |
Get the user's full name. | def zFMy(YKHO):
if YKHO.controller.oem_config:
return 'OEM Configuration (temporary user)'
return YKHO.fullname | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eHMM(YKHO):\n return YKHO.user.get_full_name() or None",
"def xpqj(YKHO):\n eHMM = '%s %s' % (YKHO.user.first_name.strip(), YKHO.user.last_name.strip())\n if len(eHMM.strip()) == 0:\n eHMM = YKHO.user.username\n return eHMM.strip()",
"def Q1ao(YKHO):\n mS46 = YKHO.get_user()\n if m... | [
"0.8865615",
"0.8864113",
"0.8771539",
"0.8744222",
"0.87359774",
"0.87359774",
"0.8711882",
"0.86309487",
"0.8567367",
"0.8471274",
"0.8394458",
"0.8369933",
"0.8216363",
"0.8214691",
"0.82139677",
"0.81876767",
"0.81876767",
"0.8171172",
"0.8169147",
"0.81618434",
"0.815664... | 0.0 | -1 |
Initialize an empty item list. | def FIMM(YKHO):
YKHO.item_list = [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO) -> None:\n YKHO._items = []",
"def FIMM(YKHO) -> None:\n YKHO._items = []",
"def FIMM(YKHO, DumB=None):\n if DumB is None:\n YKHO.items = []\n else:\n YKHO.items = DumB",
"def FIMM(YKHO):\n YKHO._items = [[] for bGrB in range(20)]",
"def FIMM(YKHO):\n YKHO.ite... | [
"0.79313976",
"0.79313976",
"0.7784088",
"0.7686438",
"0.74654937",
"0.74654937",
"0.74654937",
"0.74654937",
"0.74654937",
"0.74654937",
"0.74654937",
"0.740193",
"0.73612344",
"0.73095274",
"0.7286669",
"0.72692627",
"0.7160032",
"0.71577436",
"0.71389014",
"0.70649195",
"0... | 0.76415026 | 4 |
Set / Reset scoring window scoring frame | def fQfD(YKHO):
if YKHO.score_window is not None:
YKHO.score_window.setup_scores_frame() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N4wl(YKHO, hC_l):\n YKHO.score_window = hC_l",
"def NLKW(YKHO):\n YKHO.x_score = 0\n YKHO.o_score = 0",
"def NLKW(YKHO):\n YKHO._score = XP5J.params['initial_score']",
"def idBE(YKHO):\n YKHO.board = [0, 0, 0, 0, 0, 0, 0, 0, 0]\n YKHO.turn = 0\n YKHO.change_button_img_to_null()\n ... | [
"0.690555",
"0.67795366",
"0.669254",
"0.64537257",
"0.6246636",
"0.62142754",
"0.61463654",
"0.6099305",
"0.607451",
"0.605702",
"0.6043308",
"0.60260797",
"0.6023362",
"0.5991097",
"0.59890914",
"0.58949155",
"0.58801204",
"0.5836586",
"0.5820534",
"0.57899797",
"0.57812953... | 0.73630786 | 0 |
Get current message, if any else returns None | def LnrL(YKHO):
return YKHO.messages | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def S_Qd(YKHO):\n return YKHO.__message",
"def Eair(YKHO):\n return YKHO.msg",
"def Ol8d(YKHO):\n yEHD = YKHO.q(css='div.peer-grading-tools > div.message-container > p').text\n if len(yEHD) < 1:\n return None\n else:\n return yEHD[0]",
"def S_Qd(YKHO):\n if not YKHO.opened:\n ... | [
"0.7713072",
"0.7687069",
"0.76342",
"0.7616347",
"0.7616347",
"0.7505632",
"0.7505632",
"0.7427747",
"0.73403275",
"0.73399115",
"0.73140335",
"0.7308268",
"0.72979844",
"0.7284189",
"0.72592115",
"0.7166144",
"0.7166144",
"0.7166144",
"0.7166144",
"0.7166144",
"0.70780975",... | 0.0 | -1 |
Controller for the app home page. | def kZiy(QePW):
QpfX = {}
return _1tc(QePW, 'trailyzer/home.html', QpfX) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kZiy():\n pB3N = p_z1.get_payload()\n return TvZl('index.html', payload=pB3N)",
"def kZiy():\n return TvZl('index.html', title='Home Page', year=qcWV.now().year)",
"def kZiy(YKHO, *qIxc, **B2fa):\n pass",
"def kZiy(QePW):\n return _1tc(QePW, 'compta/home.html')",
"def d6pt():\n geh0.v... | [
"0.78027886",
"0.7685395",
"0.7654384",
"0.7584396",
"0.7558254",
"0.7547364",
"0.7488385",
"0.7459023",
"0.7447416",
"0.73899287",
"0.7388719",
"0.7388719",
"0.7388719",
"0.7388719",
"0.7388719",
"0.7388719",
"0.7388719",
"0.7388719",
"0.7388719",
"0.7388719",
"0.7383182",
... | 0.0 | -1 |
Send a Chat Message to the Sandbox Alerts room | def rxRX(k8SK):
bD7m = 'https://chat.googleapis.com/v1/spaces/alphanumberCode/messages?key=longAlphnumbericWebhookAddress'
gIBV = {'text': '{}'.format(k8SK)}
B9Lv = {'Content-Type': 'application/json; charset=UTF-8'}
HqbN = yWra()
geh0 = HqbN.request(uri=bD7m, method='POST', headers=B9Lv, body=PjZe(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tDJg(CBIr, dZmC):\n Ol8d = QePW.form['message']\n YwkQ.send_message(CBIr + dZmC, Ol8d)",
"def s_GD(YKHO, tO9_):\n YKHO.message('Me', tO9_)",
"def Ol8d(YKHO, tO9_):\n if tO9_['type'] in ('chat', 'normal'):\n tO9_.reply('Thanks for sending\\n%(body)s' % tO9_).send()",
"def rxRX(YKHO, tO9... | [
"0.68811464",
"0.6847516",
"0.6791102",
"0.67856354",
"0.6779874",
"0.6776946",
"0.67617124",
"0.670527",
"0.66660655",
"0.6625642",
"0.6602891",
"0.65517944",
"0.652683",
"0.6523102",
"0.6522914",
"0.6521489",
"0.65150696",
"0.6459722",
"0.64590627",
"0.6447592",
"0.6439197"... | 0.60029906 | 72 |
Converts a tensor to tf.float32 only if it is tf.bfloat16. | def pnTL(vhpA):
if vhpA.dtype == ZylS.bfloat16:
return ZylS.cast(vhpA, dtype=ZylS.float32)
else:
return vhpA | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oUVO(vhpA):\n\n def LV1j(vhpA):\n return vhpA.float()\n\n def Cn2h(vhpA):\n return hasattr(vhpA, 'dtype') and vhpA.dtype in (ht2j.float16, ht2j.bfloat16)\n return TAt6(LV1j, vhpA, test_type=Cn2h)",
"def N43f(PFdR):\n Qmlk = {}\n for G1Hx, Ty9i in PFdR.items():\n if isinsta... | [
"0.7858631",
"0.75724304",
"0.75203085",
"0.6883645",
"0.6862339",
"0.6683696",
"0.64042085",
"0.63160515",
"0.62945896",
"0.6264188",
"0.6259981",
"0.6140555",
"0.6127895",
"0.61273074",
"0.60588765",
"0.60186124",
"0.5874811",
"0.5841956",
"0.58403337",
"0.5755291",
"0.5749... | 0.9267631 | 0 |
WilsonMazeGenerator(int,int) > WilsonMazeGenerator Creates a maze generator with specified width and height. | def FIMM(YKHO, H2v2, TVTK):
YKHO.width = 2 * (TVTK // 2) + 1
YKHO.height = 2 * (H2v2 // 2) + 1
YKHO.grid = [[0 for r845 in range(YKHO.width)] for YRbF in range(YKHO.height)]
YKHO.visited = []
YKHO.unvisited = []
YKHO.path = dict()
YKHO.directions = [(0, 1), (1, 0), (0, -1), (-1, 0)]
YKHO... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _mu8(TVTK=16, H2v2=16) -> gHhh:\n TxAA = gHhh(width=TVTK, height=H2v2, algorithm=None)\n azXi = [[False for bGrB in range(TxAA.width)] for bGrB in range(TxAA.height)]\n azXi[0][0] = True\n\n def X7JX(WKvO, LVAh):\n \"\"\"\n Take a random walk from unit (sx,sy) until we run into a visi... | [
"0.6644459",
"0.65112656",
"0.5469168",
"0.5399776",
"0.5257867",
"0.5198335",
"0.5194906",
"0.51201385",
"0.5075116",
"0.50214875",
"0.5015187",
"0.49965477",
"0.4970762",
"0.49564216",
"0.49316835",
"0.49224162",
"0.4921961",
"0.4919343",
"0.4880007",
"0.48745543",
"0.48710... | 0.4761912 | 30 |
WilsonMazeGenerator(tuple,int) > boolean Checks if the adjacent cell in the direction specified by dirNum is within the grid | def MabE(YKHO, VmPb, Raxr):
HObc = YKHO.get_next_cell(VmPb, Raxr, 2)
ZL8z = HObc[0] < 0 or HObc[1] < 0
vplN = HObc[0] >= YKHO.height or HObc[1] >= YKHO.width
return not (ZL8z or vplN) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def suG6(YKHO, XSoh, TxAA):\n LVAh = YKHO.y\n WKvO = YKHO.x\n if XSoh in MAAb:\n LVAh = DkWr[XSoh](LVAh)\n elif XSoh in Qnup:\n WKvO = DkWr[XSoh](WKvO)\n if TxAA[LVAh][WKvO] == 1 or [WKvO, LVAh] in YKHO.fullpath() or (YKHO.moved() is False and XSoh in YKHO.dead_end_direction()[-1]):\n ... | [
"0.6736112",
"0.6709581",
"0.6619374",
"0.6578575",
"0.6566026",
"0.64671594",
"0.6303121",
"0.62695503",
"0.6235794",
"0.621208",
"0.61807805",
"0.6092523",
"0.6083636",
"0.608271",
"0.60804826",
"0.6057797",
"0.6052561",
"0.60356444",
"0.6002189",
"0.59939617",
"0.59804404"... | 0.6175531 | 11 |
Given an integer n, return the number of trailing zeroes in n!. A simple method is to first calculate factorial of n, then count trailing 0s in the result. But this can cause overflow for a big numbers as the factorial becomes large. Instead consider prime factors, a trailing zero is produced by 2 and 5. It turns out t... | def hRhb(exwG):
UHFx = 0
or8S = 5
while exwG / or8S >= 1:
UHFx += epAf.floor(exwG / or8S)
or8S *= 5
return UHFx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EiDV(exwG):\n ZnYu = 0\n for YRbF in range(5, exwG + 1, 5):\n while YRbF % 5 == 0:\n ZnYu += 1\n YRbF /= 5\n return ZnYu",
"def JsbH(YKHO, exwG):\n r9Hf = 0\n while exwG:\n exwG /= 5\n r9Hf += exwG\n return r9Hf",
"def Nk6w(exwG):\n zGcs = 0\n... | [
"0.8461389",
"0.7799396",
"0.6998401",
"0.6924921",
"0.66723603",
"0.66418034",
"0.66046816",
"0.6564725",
"0.6433274",
"0.6424956",
"0.63826513",
"0.637003",
"0.6348722",
"0.63473636",
"0.63061744",
"0.6303286",
"0.62940425",
"0.62662256",
"0.62402827",
"0.6230139",
"0.62080... | 0.8812515 | 0 |
Replace URLs found in a text string with nothing | def Yk6F(FUjE):
print(FUjE['fields']['tweet'])
return ' '.join(ZbWC.sub('([^0-9A-Za-z \t])|(\\w+:\\/\\/\\S+)', '', FUjE['fields']['tweet']).split()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ag64(l5Ny):\n l5Ny = ZbWC.sub('(?P<url>https?://[^\\\\s]+)', 'URL', l5Ny)\n return l5Ny",
"def EGZf(l5Ny):\n pass",
"def EGZf(l5Ny):\n l5Ny = ZbWC.sub('(?P<url>https?://[^\\\\s]+)', '', l5Ny)\n return l5Ny",
"def EGZf(YKHO, l5Ny):\n return ZbWC.sub('http.?://[^\\\\s]+[\\\\s]?', '', l5Ny... | [
"0.82637036",
"0.8165166",
"0.78912544",
"0.78639024",
"0.78076977",
"0.7626",
"0.755376",
"0.75102204",
"0.74541605",
"0.7348094",
"0.7279677",
"0.7253456",
"0.72465414",
"0.72315764",
"0.72257817",
"0.710745",
"0.7088032",
"0.70726097",
"0.70511425",
"0.7030343",
"0.699819"... | 0.6661439 | 26 |
Get all base classes of this type. | def z5vs(YKHO, a1PO):
if isinstance(a1PO, ZOfv.ClassType):
return sum((YKHO.get_superclasses(Z9rn) for Z9rn in a1PO.cls.bases), [a1PO])
elif isinstance(a1PO, ZOfv.AnythingType):
return [ZOfv.NamedType('builtins.object')]
elif isinstance(a1PO, ZOfv.GenericType):
return YKHO.get_superc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PAnI(YKHO):\n return YKHO.py_class.__bases__",
"def PAnI(YKHO):\n return (YKHO.py_class,)",
"def TZWK(X7zk: Union[str, Type]) -> x1iM[str]:\n if isinstance(X7zk, str):\n return [X7zk]\n KndY = [X7zk.__name__]\n for P8oC in X7zk.__bases__:\n KndY.extend(TZWK(P8oC))\n return B... | [
"0.7940958",
"0.7573388",
"0.7374689",
"0.7188194",
"0.7142438",
"0.7140361",
"0.7122095",
"0.70975757",
"0.70868087",
"0.70792526",
"0.70595324",
"0.69851553",
"0.69754046",
"0.6906301",
"0.6837811",
"0.67866105",
"0.67834294",
"0.67713517",
"0.674705",
"0.6719313",
"0.67127... | 0.7230338 | 3 |
Get all classes derived from this type. | def TPXT(YKHO, a1PO):
if isinstance(a1PO, ZOfv.ClassType):
Hh7E = YKHO.direct_subclasses.get(a1PO, [])
return sum((YKHO.get_subclasses(ZOfv.ClassType(Z9rn.name, Z9rn)) for Z9rn in Hh7E), [a1PO])
else:
raise NotImplementedError(f"Can't extract subclasses from {type(a1PO)}") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ty1Z(Emd4):\n return Emd4.__subclasses__() + [Oa1e for KCHu in Emd4.__subclasses__() for Oa1e in Ty1Z(KCHu)]",
"def ylai(YKHO):\n return YKHO._classes",
"def Vv4H(Emd4):\n for yIhv in Emd4.__bases__:\n if yIhv == T5Jd:\n continue\n yield yIhv",
"def B5QF(Emd4):\n retu... | [
"0.7483341",
"0.7475081",
"0.7439304",
"0.73830944",
"0.7355377",
"0.7335772",
"0.73074585",
"0.72801393",
"0.72661585",
"0.7258476",
"0.72548383",
"0.71463203",
"0.71250486",
"0.71210355",
"0.70994705",
"0.70031464",
"0.7003042",
"0.69794565",
"0.6977013",
"0.69547874",
"0.6... | 0.66609496 | 34 |
Derive a key from `password` and `salt` | def UrTU(NTfD: bytes, ywwl: int, jTXt: bytes) -> bytes:
sHja = txYz(salt=NTfD, length=32, n=ywwl, r=8, p=1, backend=Fyo1())
return sHja.derive(jTXt) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W50F(jTXt, NTfD):\n sHja = ePba.PBKDF2HMAC(algorithm=zr4t.SHA256(), length=32, salt=tZ2K.force_bytes(NTfD), iterations=100000, backend=Fyo1())\n return WR89.urlsafe_b64encode(sHja.derive(tZ2K.force_bytes(jTXt)))",
"def h3Eq(zN5h, NTfD=None):\n jTXt = WR89.urlsafe_b64encode(zN5h.encode())\n if NTf... | [
"0.7879021",
"0.7347333",
"0.7035354",
"0.7034277",
"0.6669516",
"0.6650094",
"0.662337",
"0.6578523",
"0.6548199",
"0.6518925",
"0.6511272",
"0.6511211",
"0.65002275",
"0.64481884",
"0.64217824",
"0.6402019",
"0.63275164",
"0.6314866",
"0.63141173",
"0.62975615",
"0.629168",... | 0.68373406 | 4 |
Set the learning rate at the start of each epoch. | def fwYm(YKHO):
YKHO.current_epoch += 1
YKHO.current_lr = YKHO.fn(YKHO.current_epoch)
YKHO.model.set_learning_rate(YKHO.current_lr)
YKHO.epochs += [YKHO.current_epoch]
YKHO.learning_rate += [YKHO.current_lr] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fggk(YKHO):\n YKHO.scheduler.step(YKHO.clock.epoch)",
"def kVtO(YKHO, mVUw):\n YKHO.SGD.set_learning_rate(mVUw)",
"def b0Ix(qtWj):\n YKHO.lr = YKHO.lr / 1.00000001\n return YKHO.lr",
"def e_63(ouZy, K0do, qtWj, dLlC):\n tspZ = ouZy * 0.3 ** (qtWj // 5)\n if qtWj == dLlC:\n tspZ =... | [
"0.7705306",
"0.7651053",
"0.74821275",
"0.74701077",
"0.74355876",
"0.74145925",
"0.739972",
"0.739972",
"0.7354069",
"0.7350152",
"0.73154724",
"0.7294975",
"0.7223198",
"0.72194284",
"0.71722084",
"0.7137065",
"0.7109468",
"0.7095874",
"0.7094856",
"0.707595",
"0.70735395"... | 0.76838917 | 1 |
Vectorizes the texts as sequence vectors with the prefitted Tokenizer Arguments | def Rdwy(z_aV, b0j5, BcCR):
p4dv = b0j5
WlA2 = p4dv.texts_to_sequences(z_aV)
WlA2 = aWuw.pad_sequences(WlA2, maxlen=BcCR)
return WlA2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def p_gW(YKHO, MnDN) -> l1oh:\n YKHO.encoder = MnDN\n YKHO.vectorized_texts = [YKHO.encoder.encode(a1PO) for a1PO in YKHO.tokenized_texts]",
"def JE4J(l5Ny):\n\n def yri_(l5Ny):\n \"\"\"Removes special characters from text.\"\"\"\n return ZbWC.sub('[,.?\";:\\\\-!@#$%^&*()]', '', l5Ny)\n\n ... | [
"0.7196426",
"0.68583566",
"0.68333024",
"0.6688538",
"0.6643502",
"0.65289974",
"0.65274346",
"0.6515027",
"0.65063655",
"0.65022886",
"0.6400072",
"0.6382236",
"0.638106",
"0.63786596",
"0.63733745",
"0.63478947",
"0.633347",
"0.6275407",
"0.6274319",
"0.62678015",
"0.62675... | 0.6314076 | 17 |
Return file handle of file regardless of zipped or not Text mode enforced for compatibility with python2 | def Cueq(apum, Tuqy='r', tZ2K='utf-8'):
Tuqy = Tuqy[0] + 't'
UVov = Tuqy
if hasattr(apum, 'write'):
return apum
if isinstance(apum, str):
if apum.endswith('.gz'):
return Ma59(apum, Tuqy)
if apum.endswith('.bz2'):
return dL19(apum, Tuqy)
return open... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LtB9(VqRE, Tuqy, *, Rrsh=None, tZ2K=None, UAju=None, wN2A=None):\n if Rrsh:\n aIHS = Tuqy.replace('b', '').replace('t', '')\n if Rrsh == 'gzip':\n eHNT = lGU7.GzipFile(VqRE, mode=aIHS)\n elif Rrsh == 'bz2':\n eHNT = FNO7.BZ2File(VqRE, mode=aIHS)\n elif Rrsh ... | [
"0.6709272",
"0.66114426",
"0.66103846",
"0.65045583",
"0.644547",
"0.643012",
"0.63988066",
"0.63582563",
"0.623052",
"0.61340666",
"0.61247677",
"0.61178184",
"0.609582",
"0.60492367",
"0.60492367",
"0.5969478",
"0.59637064",
"0.5933722",
"0.59231985",
"0.5922482",
"0.58563... | 0.6629213 | 1 |
Yield successive nsized chunks from l. | def eHxA(vC9B, exwG):
for YRbF in range(0, len(vC9B), exwG):
yield vC9B[YRbF:YRbF + exwG] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xJ0H(YKHO, vC9B, exwG):\n for YRbF in range(0, len(vC9B) + 1, exwG):\n yield vC9B[YRbF:YRbF + exwG]",
"def eHxA(YKHO, vC9B, exwG):\n for YRbF in range(0, len(vC9B), exwG):\n yield vC9B[YRbF:YRbF + exwG]",
"def I7IE(vC9B, exwG):\n for YRbF in range(0, len(vC9B), exwG):\n yield ... | [
"0.8038813",
"0.79248375",
"0.7923423",
"0.7885103",
"0.78773195",
"0.7815877",
"0.77655786",
"0.77556044",
"0.77441615",
"0.7731815",
"0.77288336",
"0.772473",
"0.77028215",
"0.76889825",
"0.76889825",
"0.7664208",
"0.76570904",
"0.7655856",
"0.7655856",
"0.76458347",
"0.764... | 0.7448925 | 68 |
Return the item at the top of the stack. >>> s = Stack([1, 2, 3]) >>> s.top() 3 >>> s Stack([1, 2, 3]) | def tlxW(YKHO) -> ImMB:
try:
return YKHO._data[-1]
except IndexError:
raise IndexError('top from an empty stack') from None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tlxW(YKHO):\n try:\n if YKHO.size() > 0:\n return YKHO.items[len(YKHO.items) - 1]\n else:\n raise IndexError('Cannot get top item, stack is empty.')\n except IndexError as err:\n print(XObx)\n raise",
"def tlxW(YKHO):\n if YKHO.is_empty():\n r... | [
"0.8579007",
"0.8465018",
"0.839501",
"0.8369853",
"0.82619125",
"0.8086473",
"0.8052915",
"0.8035772",
"0.8025528",
"0.8012489",
"0.7973554",
"0.7952454",
"0.79396147",
"0.78968126",
"0.7839041",
"0.78040516",
"0.775743",
"0.77243274",
"0.7713983",
"0.76433617",
"0.76209706"... | 0.81543523 | 5 |
Return True if the stack is empty, False otherwise. >>> s = Stack() >>> s.is_empty() True >>> s.push(1) >>> s.is_empty() False | def FBfn(YKHO) -> bool:
return len(YKHO._data) == 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FBfn(YKHO):\n return len(YKHO.the_stack) == 0",
"def FBfn(YKHO):\n return len(YKHO.stack) == 0",
"def FBfn(YKHO):\n if YKHO.num_items == 0:\n return True\n else:\n return False",
"def lsmZ(YKHO) -> bool:\n if len(YKHO.stack) == 0:\n return True\n else:\n retu... | [
"0.8432801",
"0.8380236",
"0.8330348",
"0.82722867",
"0.8239459",
"0.8219531",
"0.8204403",
"0.8183062",
"0.8101043",
"0.8101043",
"0.8094338",
"0.8085751",
"0.80774677",
"0.80716723",
"0.80324346",
"0.80225486",
"0.7979046",
"0.7956233",
"0.7956233",
"0.7938504",
"0.7884105"... | 0.0 | -1 |
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`. | def LwSz(Bcwd, KndY, NkkI=False, leAC='Confusion matrix', iMGt=QrM1.cm.Blues):
QrM1.imshow(Bcwd, interpolation='nearest', cmap=iMGt)
QrM1.title(leAC)
QrM1.colorbar()
wIWT = oyIN.arange(len(KndY))
QrM1.xticks(wIWT, KndY, rotation=0)
QrM1.yticks(wIWT, KndY)
if NkkI:
Bcwd = Bcwd.astype(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LwSz(Bcwd, KndY=[0, 1], NkkI=False, leAC='Confusion matrix', RMso=False):\n if NkkI:\n Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]\n print('Normalized confusion matrix')\n else:\n print('Confusion matrix, without normalization')\n if RMso:\n print(Bcwd)"... | [
"0.8194862",
"0.80949175",
"0.8029915",
"0.8019153",
"0.79941195",
"0.7991258",
"0.7980955",
"0.7976606",
"0.79610753",
"0.79590565",
"0.79378676",
"0.7934962",
"0.7934504",
"0.79313844",
"0.7926313",
"0.7924577",
"0.79241234",
"0.7923211",
"0.7923023",
"0.7921931",
"0.791787... | 0.7860299 | 40 |
Return a vector from `camera` to `target` in the camera's coordinate space. The camera's lens is assumed to be norm to the ZX plane. | def P3Bq(yDvq: bpy.types.Camera, pan_: bpy.types.Object):
EkB6, h42s, bGrB = yDvq.matrix_world.decompose()
jiCa, bGrB, bGrB = pan_.matrix_world.decompose()
O6Lf = jiCa - EkB6
DWJ0 = h42s.to_matrix().transposed()
O6Lf.rotate(DWJ0)
l_qu = R5H8((PZyS(2.0) / 2.0, PZyS(2.0) / 2.0, 0.0, 0.0))
O6Lf... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PN_m(yDvq, LO_8):\n vC9B, a1PO, bGrB, bGrB = LO_8\n bGrB, bGrB, yzQ0, MKlR = yDvq\n return a9eO.Rect(-vC9B + 300, -a1PO + 300, yzQ0, MKlR)",
"def te1C(yDvq, LO_8):\n vC9B, a1PO, bGrB, bGrB = LO_8\n bGrB, bGrB, yzQ0, MKlR = yDvq\n vC9B, a1PO, bGrB, bGrB = (-vC9B + 300, -a1PO + 300, yzQ0, MKl... | [
"0.63884884",
"0.62758213",
"0.6245489",
"0.5850526",
"0.5791176",
"0.5715452",
"0.56954753",
"0.5659828",
"0.56392825",
"0.5560927",
"0.5541822",
"0.5462892",
"0.5461469",
"0.5461048",
"0.54369617",
"0.54212433",
"0.5412418",
"0.5388569",
"0.53767955",
"0.53762454",
"0.53468... | 0.7434989 | 0 |
Return objects for the current authenticated user only | def k66M(YKHO):
return YKHO.queryset.filter(user=YKHO.request.user).order_by('-name') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k66M(YKHO):\n return super().get_queryset().filter(user=YKHO.request.user)",
"def k66M(YKHO, QePW):\n umWR = super().get_queryset(QePW)\n return umWR.filter(user=QePW.user)",
"def k66M(YKHO, *qIxc, **B2fa):\n umWR = super().get_queryset(*qIxc, **B2fa).filter(user=YKHO.request.user)\n return ... | [
"0.8128217",
"0.81258285",
"0.7882456",
"0.78440523",
"0.7745406",
"0.7604245",
"0.7604245",
"0.7497975",
"0.7285781",
"0.7250722",
"0.7198163",
"0.71906906",
"0.71667135",
"0.7160965",
"0.7144866",
"0.7118433",
"0.7115828",
"0.7115828",
"0.7115828",
"0.71137464",
"0.71114254... | 0.7315406 | 8 |
Initialize from session and code_data immutable object. The `code_data` contains serialization information required for msgpackrpc calls. It must be immutable for Buffer equality to work. | def FIMM(YKHO, cuiw, Gagv):
YKHO._session = cuiw
YKHO.code_data = Gagv
YKHO.handle = zSf6(Gagv[1])
YKHO.api = qAHT(YKHO, YKHO._api_prefix)
YKHO.vars = PSv8(YKHO, YKHO._api_prefix + 'get_var', YKHO._api_prefix + 'set_var')
YKHO.options = PSv8(YKHO, YKHO._api_prefix + 'get_option', YKHO._api_prefi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, Wxnj, QTBn, Ol8d, wdCM=None):\n YKHO.code = Wxnj\n YKHO.state = QTBn\n YKHO.message = Ol8d\n YKHO.extra_fields = wdCM",
"def FIMM(YKHO, Ln2I, Wxnj, qIxc):\n YKHO.rpcbridge = Ln2I\n YKHO.code = Wxnj\n YKHO.args = qIxc",
"def FIMM(YKHO, Wxnj: typing.Optional[int]=None, Ol8d: t... | [
"0.5879398",
"0.5713123",
"0.5527441",
"0.5527441",
"0.55160934",
"0.54913825",
"0.5484774",
"0.54762274",
"0.54057",
"0.5375171",
"0.5352091",
"0.5335564",
"0.53135514",
"0.5306922",
"0.52937436",
"0.5292928",
"0.5261718",
"0.5249401",
"0.5246991",
"0.5236905",
"0.5234419",
... | 0.69644886 | 0 |
Return True if `self` and `other` are the same object. | def xa14(YKHO, Elif):
return hasattr(Elif, 'code_data') and Elif.code_data == YKHO.code_data | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n if not isinstance(Elif, type(YKHO)):\n return False\n return hash(YKHO) == hash(Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n return YKHO ... | [
"0.8360874",
"0.83533716",
"0.8286548",
"0.8286548",
"0.82575476",
"0.8253887",
"0.82207596",
"0.82207596",
"0.8142174",
"0.8139335",
"0.8138741",
"0.81255716",
"0.80854064",
"0.80799276",
"0.80784136",
"0.8032802",
"0.8025345",
"0.80130005",
"0.80081916",
"0.80081916",
"0.79... | 0.0 | -1 |
Return a map value by key. | def OP2O(YKHO, H5ew):
return YKHO._get(H5ew) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zmkp(YKHO, H5ew):\n try:\n return YKHO.map[H5ew]\n except KeyError:\n raise KeyError('key is not in map')",
"def OP2O(YKHO, H5ew):\n bGrB, arot = YKHO._lookup(H5ew, YKHO._backing)\n if arot:\n return arot.value\n else:\n return XmvZ.absent",
"def _yR4(Op6c, H5ew):... | [
"0.7851039",
"0.70498586",
"0.6976407",
"0.69453937",
"0.68998337",
"0.6879719",
"0.6847617",
"0.6807728",
"0.6792951",
"0.6746719",
"0.6739714",
"0.6695614",
"0.66093856",
"0.6560921",
"0.65587354",
"0.655258",
"0.65507513",
"0.65304565",
"0.6521069",
"0.6485636",
"0.6475802... | 0.6094206 | 52 |
Return a sequence item by index. | def OP2O(YKHO, or8S):
if not isinstance(or8S, slice):
return YKHO._fetch()[or8S]
return YKHO._fetch()[or8S.start:or8S.stop] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OP2O(YKHO, d6pt):\n return YKHO.seq[d6pt]",
"def OP2O(YKHO, d6pt):\n return YKHO._main._sequence[d6pt]",
"def OP2O(YKHO, d6pt):\n if d6pt < 0 or d6pt >= len(YKHO.sequence):\n raise Exception('Index is out of bounds')\n return YKHO.sequence[d6pt]",
"def kTCt(YKHO, d6pt: int) -> sb5H:\n ... | [
"0.82708466",
"0.81686413",
"0.81345636",
"0.80521756",
"0.76788133",
"0.753526",
"0.7529076",
"0.75270367",
"0.7471223",
"0.7463311",
"0.7406007",
"0.72571605",
"0.725005",
"0.7242141",
"0.7242141",
"0.7231405",
"0.72278476",
"0.7194344",
"0.7129053",
"0.71186644",
"0.711079... | 0.6480734 | 93 |
Return an iterator for the sequence. | def Vs4Q(YKHO):
DumB = YKHO._fetch()
for ZfUD in DumB:
yield ZfUD | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vs4Q(YKHO):\n for WKvO in YKHO.seq:\n yield WKvO",
"def NTmb(YKHO, Q6uT):\n return iNkJ(YKHO._from_sequence(Q6uT))",
"def Vs4Q(YKHO) -> jd6F:\n yield from YKHO.sequence",
"def UDAb(YKHO):\n YKHO._k += 1\n if YKHO._k < len(YKHO._seq):\n return YKHO._seq[YKHO._k]\n else:\n ... | [
"0.7617125",
"0.7556803",
"0.7320426",
"0.6910532",
"0.6820452",
"0.6820452",
"0.6820452",
"0.67740774",
"0.6766284",
"0.6701768",
"0.6680752",
"0.6672772",
"0.6647852",
"0.6625429",
"0.6616575",
"0.66073567",
"0.65905553",
"0.65311444",
"0.6477479",
"0.64672935",
"0.64602023... | 0.6069484 | 63 |
Returns the number of vertices in this graph | def cxdz(YKHO) -> int:
return len(YKHO.Nodes) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X7h0(YKHO):\n return YKHO._graph_state.get_num_vertices()",
"def poMF(YKHO):\n return len(YKHO.__graph_dict.keys())",
"def nAk3(YKHO):\n return YKHO._nVertices",
"def poMF(YKHO):\n return YKHO._top_exp.number_of_vertices()",
"def qppV(YKHO):\n return YKHO.__size",
"def poMF(YKHO):\n ... | [
"0.9092417",
"0.89516836",
"0.8930787",
"0.88623077",
"0.8826155",
"0.88176703",
"0.88176703",
"0.87426937",
"0.8735254",
"0.86637056",
"0.86382085",
"0.86033094",
"0.84865",
"0.8350979",
"0.8237714",
"0.8161115",
"0.79114026",
"0.7854557",
"0.77824813",
"0.77266026",
"0.7521... | 0.6837896 | 55 |
This method returns the string representation of the object. | def zAg0(YKHO) -> str:
return f'Graph: | V |= {YKHO.v_size()}, | E |= {YKHO.e_size()}' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yLCI(YKHO):\n return YKHO.__str__()",
"def zAg0(YKHO):\n return str(YKHO.__dict__['_obj'])",
"def zAg0(YKHO):\n return str(YKHO.serialize())",
"def CZBi(YKHO):\n return YKHO.__repr__()",
"def zAg0(YKHO):\n return str(YKHO.obj)",
"def Napc(YKHO):\n return str(YKHO)",
"def Napc(YKHO... | [
"0.8519109",
"0.8448701",
"0.84233034",
"0.8389341",
"0.83585453",
"0.82917476",
"0.82511103",
"0.8228812",
"0.82008964",
"0.81932896",
"0.81932896",
"0.81877124",
"0.81877124",
"0.81877124",
"0.81877124",
"0.81877124",
"0.8177723",
"0.8164467",
"0.8164467",
"0.8164467",
"0.8... | 0.0 | -1 |
Returns the number of edges in this graph | def itm2(YKHO) -> int:
return YKHO.edgesize | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fOCg(YKHO) -> int:\n return YKHO.graph.number_of_edges()",
"def L1_y(YKHO) -> int:\n return YKHO._n_edges",
"def IgjN(YKHO):\n return YKHO._graph_state.get_num_edges()",
"def n8F9(YKHO):\n return sum((1 for bGrB in YKHO.iteredges()))",
"def n8F9(YKHO):\n return sum((len(Ty9i.adj) for Ty9... | [
"0.9113971",
"0.9064937",
"0.88517714",
"0.8824951",
"0.87737626",
"0.8768532",
"0.8702538",
"0.8693012",
"0.86387426",
"0.8601404",
"0.8600074",
"0.8576844",
"0.8503865",
"0.8493038",
"0.84049594",
"0.8363609",
"0.82958615",
"0.8288594",
"0.8249705",
"0.8233358",
"0.82291234... | 0.7442337 | 28 |
Adds an edge to the graph. | def rz7z(YKHO, FJhS: int, Yk_P: int, upAO: float) -> bool:
if FJhS in YKHO.Nodes and Yk_P in YKHO.Nodes and (Yk_P not in YKHO.Edges[FJhS]):
if YKHO.Edges[FJhS] is None:
YKHO.Edges[FJhS] = {}
YKHO.Edges[FJhS][Yk_P] = upAO
else:
YKHO.Edges[FJhS][Yk_P] = upAO
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rz7z(YKHO, D70y):\n if YKHO.has_edge(D70y) == 0:\n YKHO.__graph_dict[D70y[0]].append(D70y[1])",
"def F1KG(YKHO, D70y: Edge):\n YKHO.edges.append(D70y)",
"def rz7z(YKHO, D70y):\n assert D70y not in YKHO.edges\n YKHO.edges.append(D70y)",
"def rz7z(YKHO, D70y):\n zZcM = D70y.get_source... | [
"0.841144",
"0.83919084",
"0.8347221",
"0.8330175",
"0.82800245",
"0.8196861",
"0.81965816",
"0.81554943",
"0.806904",
"0.7990693",
"0.79418606",
"0.79395586",
"0.79385245",
"0.7935002",
"0.7914147",
"0.7814346",
"0.77845144",
"0.7768525",
"0.7742754",
"0.7682856",
"0.7616938... | 0.0 | -1 |
Returns value of self.sync_obj | def RFR6(YKHO):
return YKHO.sync_obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H69_(YKHO):\n return YKHO._sync",
"def NMoC(YKHO):\n with YKHO.mutex:\n return YKHO.value",
"def NXXP(YKHO):\n try:\n return YKHO._syncheck\n except Exception as e:\n raise tTpl",
"def zuF6(YKHO):\n return YKHO._sync_attrs",
"def OEc9(YKHO):\n return YKHO.get_sync... | [
"0.7532613",
"0.71233404",
"0.71123767",
"0.6571496",
"0.6563941",
"0.6552352",
"0.65381074",
"0.65333045",
"0.6508759",
"0.6446455",
"0.6444455",
"0.6425047",
"0.6403295",
"0.639481",
"0.6385154",
"0.636988",
"0.6368808",
"0.63551754",
"0.6347043",
"0.6335957",
"0.6303857",
... | 0.83968353 | 0 |
Create empty linked list | def FIMM(YKHO, BWXx=None):
YKHO.head = BWXx
YKHO.size = 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c4ic():\n from linked_list import Linked_List\n wnLx = Linked_List()\n return wnLx",
"def nuIp():\n from linked_list import Node\n return Node()",
"def FIMM(YKHO):\n Q6kx = Msxl(0)\n YKHO.head = Q6kx\n YKHO.tail = Q6kx\n YKHO.len = 0",
"def FIMM(YKHO, sdCG: ListNode):\n YKHO... | [
"0.7901278",
"0.7744079",
"0.7272829",
"0.71973795",
"0.7059948",
"0.7015057",
"0.6970204",
"0.69118553",
"0.68999165",
"0.6865938",
"0.6857656",
"0.68490404",
"0.68490404",
"0.67854464",
"0.676859",
"0.6768357",
"0.6763377",
"0.6748346",
"0.67063236",
"0.67008734",
"0.670026... | 0.0 | -1 |
Set/extend inflow domain to fit LES boundary and update NZ. Values between zMin and min(z) will be duplicated from | def LS_E(YKHO, LhiB=None, mZhA=None, mSbW=False, _PM_=False):
if LhiB is None:
LhiB = YKHO.z[0]
if mZhA is None:
mZhA = YKHO.z[-1]
if not mSbW:
if LhiB > YKHO.z[0]:
print('zMin not changed from', YKHO.z[0], 'to', LhiB)
return
if mZhA < YKHO.z[-1]:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def soLi(nPrm, epBp, PKKQ, Z9rn, Csk6, k0lF, tjUW):\n NArs = [PKKQ, Z9rn, Csk6, k0lF, tjUW]\n return I9d8(nPrm, NArs, epBp, Cu89)",
"def kQlB(YKHO):\n YKHO.lattice = Wg84(YKHO._residual_lattice, YKHO.latt_par)\n YKHO.qx = YKHO._q_x()\n YKHO.qz = YKHO._q_z()",
"def xiNt(YKHO):\n MDJ2 = YKHO.w_... | [
"0.56952125",
"0.54317564",
"0.5310037",
"0.52636683",
"0.5244745",
"0.5213841",
"0.51572603",
"0.51566625",
"0.5150791",
"0.5123717",
"0.50912863",
"0.50665504",
"0.5065041",
"0.50649047",
"0.50616413",
"0.5029366",
"0.502713",
"0.50269115",
"0.50213134",
"0.50210345",
"0.49... | 0.52264667 | 5 |
Generate a string up to a given length from provided random choices. | def BidR(mrPm, max):
return ''.join(map(str, [Acvy(mrPm) for bGrB in range(max)])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YzjY(u54L: int):\n FLLz = vIwR.ascii_letters + vIwR.digits\n return ''.join(tuKI.choices(FLLz, k=u54L))",
"def e7Tf(u54L=30):\n dLKT = C1SZ + BHGE\n return ''.join((Acvy(dLKT) for bGrB in Ni9Y(u54L)))",
"def Kq2p(u54L):\n return ''.join((tuKI.choice(vIwR.ascii_lowercase + vIwR.digits) for bG... | [
"0.8275436",
"0.82353926",
"0.822639",
"0.82070154",
"0.82049847",
"0.8105913",
"0.7986578",
"0.79737765",
"0.79495347",
"0.7948964",
"0.7942402",
"0.79421127",
"0.79396474",
"0.79367024",
"0.79305524",
"0.7920047",
"0.79088324",
"0.7858227",
"0.784629",
"0.78452134",
"0.7834... | 0.0 | -1 |
Extend the list of prime numbers so that the list contains all prime numbers less than n. | def QqlM(rPed, exwG):
jzdc = rPed[-1] + 1
Fg_i = exwG - jzdc
if Fg_i <= 0:
return
KwQv = ([1, 0] if jzdc & 1 else [0, 1]) * (Fg_i >> 1)
if Fg_i & 1:
KwQv.append(jzdc & 1)
AJ2z = iter(rPed)
next(AJ2z)
for XP5J in AJ2z:
vexM = XP5J * XP5J
if vexM > exwG:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rPed(exwG):\n return [YRbF for YRbF in Ni9Y(1, exwG + 1) if kU5Q(YRbF)]",
"def KYJZ(exwG):\n if exwG < 2:\n return []\n zNig = exwG // 2\n BQd4 = []\n BQd4.append(2)\n for YRbF in range(1, zNig):\n wEf2 = YRbF * 2 + 1\n d6pt = 0\n for ZfUD in BQd4:\n d... | [
"0.68559945",
"0.6827224",
"0.68198514",
"0.6744363",
"0.67228884",
"0.66946733",
"0.6675343",
"0.6625174",
"0.65861523",
"0.65768147",
"0.6505357",
"0.6505357",
"0.6502982",
"0.6495093",
"0.6487174",
"0.64756376",
"0.6402824",
"0.636972",
"0.63585246",
"0.6344029",
"0.633676... | 0.60337317 | 46 |
Initialize an iterator. First, it generates a list of all prime numbers less than n in ascending order. It includes approximately n / log(n) numbers. Whenever the iterator served all numbers in the list, it extends the list by adding more (also approximately n / log(n)) prime numbers into the list. The least possible v... | def FIMM(YKHO, exwG=10000):
if exwG < 3:
raise ValueError('too small n: {0}'.format(exwG))
YKHO._p = list(DzI6(exwG))
YKHO._len = len(YKHO._p)
YKHO._i = 0
YKHO._n = exwG
YKHO._a = exwG | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ehqz(exwG):\n UHFx = 0\n if exwG <= 7:\n l7mh = [2, 3, 5, 7, 11, 13, 17]\n return l7mh[:exwG]\n else:\n A2Fp = int(exwG * RKD7(exwG) + exwG * RKD7(RKD7(exwG)))\n return rPed(A2Fp)[:exwG]",
"def UtWo(exwG):\n YRbF = 1\n umMZ = []\n while YRbF < exwG:\n if T... | [
"0.7429786",
"0.73354256",
"0.7269877",
"0.71814346",
"0.7150953",
"0.7116848",
"0.7108565",
"0.71050495",
"0.703122",
"0.69874156",
"0.6947654",
"0.69446635",
"0.6936329",
"0.689148",
"0.68567795",
"0.68297666",
"0.68185437",
"0.68119967",
"0.6810227",
"0.67919075",
"0.67901... | 0.6760034 | 23 |
Return True if n passes the MillerRabin primality test, which means n is prime. It never returns False if n is prime. If n is composite, it returns False most of the time, but may return True with the probability p <= 4 k (in the worst case; usually much less than 4 k). | def T1qg(exwG, G1Hx=10):
if exwG == 2 or exwG == 3:
return True
if not exwG & 1 or exwG < 2:
return False
r8hN = exwG - 1
KCHu = 1
Csk6 = r8hN >> 1
while not Csk6 & 1:
KCHu += 1
Csk6 >>= 1
for YRbF in range(G1Hx):
jzdc = ajWY(2, exwG - 2)
WKvO ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xam_(exwG):\n if exwG <= 1:\n return False\n elif exwG == 2:\n return True\n elif exwG % 2 == 0:\n return False\n ZGED = tHJl(exwG)\n if ZGED is None:\n tO9_ = 'No definite Miller-Rabin test is available for %d' % exwG\n raise ValueError(tO9_)\n Csk6, KCHu =... | [
"0.85286784",
"0.85286784",
"0.7937584",
"0.79067254",
"0.7906619",
"0.78453547",
"0.78311735",
"0.7828112",
"0.7796062",
"0.77727085",
"0.77483726",
"0.77454257",
"0.7738385",
"0.771727",
"0.77034587",
"0.76918703",
"0.7673125",
"0.7643213",
"0.76310176",
"0.7600906",
"0.759... | 0.7738352 | 13 |
Calculates energy of the audio segment. Normalised with segment legth. | def _1v_(Gaon: np.array, utrY: int) -> oyIN.array:
VYvU = []
for YRbF in range(int(len(Gaon) / utrY)):
hTWD = Gaon[YRbF * utrY:(YRbF + 1) * utrY]
VYvU.append(oyIN.sum(oyIN.square(hTWD)) / utrY)
if VYvU[-1] < 0:
print(YRbF)
return VYvU | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eXLU(YKHO, aQOl, n9A3):\n pass",
"def MI1C(YKHO):\n YRbF = YKHO.inl[0].to_flow()\n z1Rg = YKHO.outl[0].to_flow()\n epEI = (rHlu(YRbF, T0=YKHO.inl[0].T.val_SI) + rHlu(z1Rg, T0=YKHO.outl[0].T.val_SI)) / 2\n return YRbF[0] * (z1Rg[2] - YRbF[2]) - YKHO.A.val * (YKHO.E.val * YKHO.eta_opt.val - (epE... | [
"0.7181935",
"0.6728036",
"0.6642471",
"0.66202205",
"0.65177953",
"0.6464615",
"0.6448645",
"0.64418685",
"0.64053833",
"0.6401969",
"0.63320494",
"0.63021743",
"0.6294724",
"0.625772",
"0.6257613",
"0.6255947",
"0.62381375",
"0.61946064",
"0.61936855",
"0.61935425",
"0.6178... | 0.6701792 | 2 |
Adds a member to the initiative. Errors out if you try to add a member that already belongs. | def BfpQ(YKHO, CBIr, _Kb1=False):
UdI0 = vx25.objects.filter(user=CBIr, initiative=YKHO).count()
if UdI0 > 0:
raise yHVA('Is already a member')
return vx25.objects.create(user=CBIr, initiative=YKHO, is_admin=_Kb1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BfpQ():\n x0hE = CueG()\n x0hE.set_method('POST')\n x0hE.set_endpoint('/accounts/{0}/memberships'.format(Dd8s['account_id']))\n TBsA = {'person_id': Dd8s['member_id']}\n x0hE.set_body(qQXR.dumps(TBsA))\n x0hE.execute_request()",
"def r9jt(YKHO, mS46):\n YKHO.membersWithErrors.append([mS4... | [
"0.7963829",
"0.78312314",
"0.76141727",
"0.7491945",
"0.74482244",
"0.744379",
"0.73929566",
"0.7258244",
"0.71744347",
"0.70789397",
"0.70768243",
"0.6918582",
"0.69005156",
"0.68394244",
"0.67806524",
"0.6775479",
"0.6715552",
"0.6693483",
"0.66271746",
"0.6606526",
"0.655... | 0.7236066 | 8 |
Return the name, net worth, and industry. of the oldest billionaire under 80 years old AND the youngest billionaire with a valid age. | def SaSa():
pqwE = {}
cblq = {}
for bTKY in nPrm:
ZJe_ = bTKY['age']
if not pqwE or (ZJe_ > pqwE['age'] and ZJe_ < 80):
pqwE.update(bTKY)
if not cblq or (ZJe_ < cblq['age'] and ZJe_ > 0):
cblq.update(bTKY)
return '\nOldest: Name: %s, Net Worth: %d, Industr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cblq():\n\n def N_N1(azSe):\n return azSe['age']\n return sorted(JEZc, key=N_N1)",
"def NPvQ():\n Tm7I = MgE6.get_under_18_fields()\n pRR2 = ['B01001_007E', 'B01001_008E', 'B01001_009E', 'B01001_010E', 'B01001_011E', 'B01001_031E', 'B01001_032E', 'B01001_033E', 'B01001_034E', 'B01001_035E'... | [
"0.6194519",
"0.60957855",
"0.58409154",
"0.58221006",
"0.57615024",
"0.57132536",
"0.5707365",
"0.5706862",
"0.5680485",
"0.5680485",
"0.56279093",
"0.56265974",
"0.56255025",
"0.55993223",
"0.55891925",
"0.55502397",
"0.5494802",
"0.54865354",
"0.5462849",
"0.54381216",
"0.... | 0.7141713 | 0 |
Add the bits a[k1], ..., a[0] and b[k1], ..., b[0], return k+1 bits s[0], ... , s[k] | def spuC(jzdc, Fg_i, Yzrs=None):
G1Hx = len(jzdc)
if not Yzrs:
Yzrs = list(range(G1Hx))
Csk6 = [None] * G1Hx
for YRbF in range(1, G1Hx):
a1PO = jzdc[YRbF] * Fg_i[YRbF]
Csk6[YRbF] = (jzdc[YRbF] + Fg_i[YRbF] - 2 * a1PO, a1PO)
Csk6[0] = (None, jzdc[0] * Fg_i[0])
g74T = _RyF(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qw6N(YKHO, YRbF, G1Hx):\n while YRbF < YKHO._size:\n YKHO._bit[YRbF] += G1Hx\n YRbF += IWSC(YRbF)",
"def Qw6N(jzdc, Fg_i):\n jzdc = YM4U(jzdc, fixed_length=8)\n Fg_i = YM4U(Fg_i, fixed_length=8)\n return LRK7([YRbF ^ r845 for YRbF, r845 in zip(jzdc, Fg_i)])",
"def jH56(_1qI, zDMu)... | [
"0.6607465",
"0.65649474",
"0.6344874",
"0.6234201",
"0.61811227",
"0.61520135",
"0.59970796",
"0.597277",
"0.59676427",
"0.59046817",
"0.5842317",
"0.5782388",
"0.5759811",
"0.5716185",
"0.57040405",
"0.5689064",
"0.56453186",
"0.56194335",
"0.561849",
"0.5612642",
"0.560713... | 0.6847354 | 0 |
Add a node of value val before the first element of the linked list. After the insertion, the new node will be the first node of the linked list. | def PgMl(YKHO, wEf2):
Esd_ = o7DN(wEf2)
Esd_.next = YKHO.head
YKHO.head = Esd_
YKHO.length += 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JPHp(YKHO, wEf2):\n Esd_ = o7DN(wEf2)\n Esd_.next = YKHO.head\n YKHO.head = Esd_",
"def PgMl(YKHO, wEf2):\n Q6kx = Msxl(wEf2)\n if YKHO.head == None:\n YKHO.head = Q6kx\n else:\n Q6kx.next = YKHO.head\n YKHO.head = Q6kx",
"def PgMl(YKHO, wEf2):\n jbXL = o7DN(wEf2)\... | [
"0.7888693",
"0.7811856",
"0.7714778",
"0.7666559",
"0.7633319",
"0.7595646",
"0.758606",
"0.75703543",
"0.7493103",
"0.74779594",
"0.74625516",
"0.7428768",
"0.7407754",
"0.7381638",
"0.73484814",
"0.73484814",
"0.72836316",
"0.7247032",
"0.72358435",
"0.71726114",
"0.714572... | 0.75016534 | 8 |
Append a node of value val to the last element of the linked list. | def oHxR(YKHO, wEf2):
if YKHO.head is None:
YKHO.addAtHead(wEf2)
else:
Esd_ = o7DN(wEf2)
ZbOB = YKHO.head
while ZbOB.next is not None:
ZbOB = ZbOB.next
ZbOB.next = Esd_
Esd_.prev = ZbOB
YKHO.length += 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SStx(YKHO, wEf2):\n Fv8N = YM8C(wEf2, previous_node=YKHO.tail)\n YKHO.tail.next_node = Fv8N\n YKHO.tail = Fv8N",
"def oHxR(YKHO, wEf2):\n Q6kx = Msxl(wEf2)\n if YKHO.head == None:\n YKHO.head = Q6kx\n else:\n DpUl = YKHO.head\n while DpUl.next != None:\n DpUl... | [
"0.80130863",
"0.78928936",
"0.7879162",
"0.7879162",
"0.7856019",
"0.7782996",
"0.7744707",
"0.77368987",
"0.7721728",
"0.76904315",
"0.7632201",
"0.76267153",
"0.7550089",
"0.7530205",
"0.7521708",
"0.74483246",
"0.7416057",
"0.73196465",
"0.72394246",
"0.7223336",
"0.72167... | 0.79794717 | 1 |
Returns maze entrance as property. | def cG2v(YKHO):
return YKHO.__entrance | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LWFS(YKHO):\n return YKHO.elevation",
"def KAK5(YKHO):\n YKHO.gazebo.unpauseSim()\n Fl5g = YKHO.move_fetch_object.ee_pose()\n YKHO.gazebo.pauseSim()\n return Fl5g",
"def XfCf(YKHO):\n return YKHO.occupant",
"def C9U5(YKHO):\n return YKHO.world.find(YKHO.ehandle)",
"def TbdG(YKHO):\... | [
"0.5915323",
"0.5815137",
"0.5763461",
"0.5750419",
"0.5736284",
"0.5695879",
"0.55980146",
"0.5577119",
"0.55618167",
"0.5551216",
"0.55412155",
"0.5515444",
"0.5512977",
"0.5465324",
"0.54599327",
"0.54415125",
"0.5432804",
"0.5429483",
"0.5426104",
"0.54246217",
"0.5410291... | 0.7022588 | 0 |
Returns maze exit as property. | def exit(YKHO):
return YKHO.__exit | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LaNC(YKHO) -> bhPX:\n return YKHO._end_node",
"def zNqJ(YKHO):\n return LgK1.range(~YKHO._walls)",
"def EL7m(YKHO):\n return YKHO._player.get_moves()",
"def _xF7(YKHO, mWFP):\n WKvO = LVhv.query(location_id=YKHO.id, name=mWFP).first()\n if WKvO is None:\n Csk6 = YKHO.match_direction... | [
"0.6091213",
"0.6010197",
"0.59296495",
"0.5755052",
"0.5662816",
"0.56532025",
"0.56238884",
"0.55671835",
"0.55571663",
"0.549171",
"0.54902685",
"0.5473447",
"0.54495376",
"0.53548163",
"0.53029996",
"0.53004646",
"0.5242823",
"0.5241459",
"0.5234659",
"0.5203439",
"0.5148... | 0.5707558 | 4 |
Returns whether the exit is reachable as bool property. | def aBP1(YKHO, dQgj):
return YKHO.__verify_exit_path(dQgj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hxHa(YKHO):\n HCmI = 'ping -c 1 %s' % YKHO.ip\n V0Y7 = wQcs.getoutput(HCmI)\n bo34.debug(HCmI)\n bo34.debug(V0Y7)\n return ZbWC.search('1[\\\\s\\\\w]+received', V0Y7) is not None",
"def Haga(YKHO):\n return YKHO._exit",
"def uhY9(YKHO):\n return YKHO.exit",
"def WzJ6(YKHO):\n retu... | [
"0.6836565",
"0.6645505",
"0.6570112",
"0.6554462",
"0.6480884",
"0.6478273",
"0.6407413",
"0.6407413",
"0.62693983",
"0.62350917",
"0.62338996",
"0.6198799",
"0.6179991",
"0.6174531",
"0.6158552",
"0.6158552",
"0.6136162",
"0.61064017",
"0.6104029",
"0.6080717",
"0.6073656",... | 0.62108445 | 11 |
Method to get the list of jobs that ended (list of objects) @ In, removeFinished, bool, optional, flag to control if the finished jobs need to be removed from the queue @ In, jobIdentifier, string, optional, if specified, only collects finished runs that start with this text. If not specified collect all. @ In, uniqueH... | def pItG(YKHO, xmUE=True, mIFr='', wY9c='any'):
if mIFr is None:
mIFr = ''
with YKHO.__queueLock:
Pt1K = []
_P4C = []
for YRbF, iXC1 in enumerate(YKHO.__finished):
if not iXC1.identifier.startswith(mIFr) or wY9c != iXC1.uniqueHandler:
continue
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SYSq(YKHO):\n return YKHO.get_jobs()",
"def QKgU(YKHO):\n return list(YKHO._jobs.values())",
"def QKgU():\n XnA0()\n oUZx = ['bjobs', '-o', '\"JOBID', 'USER', 'STAT', 'QUEUE', 'JOB_NAME', 'delimiter=\\';\\'\"']\n oUZx = ' '.join(oUZx)\n SYSq = Yn3K.check_output(oUZx, shell=True, stderr=op... | [
"0.64502734",
"0.6436528",
"0.6283521",
"0.62269264",
"0.62139946",
"0.62125504",
"0.62100804",
"0.61677486",
"0.6098955",
"0.60787475",
"0.60418314",
"0.6028198",
"0.6018798",
"0.6018798",
"0.60014904",
"0.599979",
"0.5957959",
"0.59390384",
"0.59356517",
"0.59039205",
"0.58... | 0.76263756 | 0 |
Returns the number of runs currently running. @ In, None @ Out, activeRuns, int, number of active runs | def mBSS(YKHO):
mUc3 = sum((iXC1 is not None for iXC1 in YKHO.__running))
return mUc3 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mp_k(YKHO):\n mUc3 = sum((iXC1 is not None for iXC1 in YKHO.__running + YKHO.__clientRunning))\n return mUc3",
"def _rxA(YKHO):\n return len(YKHO._h5[bBmy])",
"def UHFx(YKHO):\n return len(YKHO._runs)",
"def J_KH():\n try:\n NRWD = Yn3K.run('ps -Af|grep -i \"online2-wav-nnet3-latgen... | [
"0.7591416",
"0.68168455",
"0.6748966",
"0.66708124",
"0.6579573",
"0.65488505",
"0.64417726",
"0.6410131",
"0.6402467",
"0.6376721",
"0.6375267",
"0.6345022",
"0.62130815",
"0.6138315",
"0.6111627",
"0.6095497",
"0.6082245",
"0.6071853",
"0.6024449",
"0.60172266",
"0.5944273... | 0.7716449 | 0 |
Returns the number of runs currently running in both lists. @ In, None @ Out, activeRuns, int, number of active runs | def mp_k(YKHO):
mUc3 = sum((iXC1 is not None for iXC1 in YKHO.__running + YKHO.__clientRunning))
return mUc3 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mBSS(YKHO):\n mUc3 = sum((iXC1 is not None for iXC1 in YKHO.__running))\n return mUc3",
"def UWjU(YKHO):\n return sum((HCmI.is_running for id, HCmI in YKHO.commands))",
"def M0xE(Xed_: SlotMachine, h5yU: SlotMachine, yyuw):\n BEic = Xed_\n Elif = h5yU\n Mokc = 0\n Lgpc = 0\n while M... | [
"0.73742795",
"0.60178876",
"0.6010247",
"0.5858271",
"0.5825993",
"0.57989913",
"0.5703689",
"0.5625558",
"0.55965495",
"0.55326825",
"0.5409394",
"0.53721184",
"0.53633726",
"0.5292295",
"0.5287816",
"0.52436125",
"0.5226099",
"0.5221762",
"0.5189199",
"0.5178363",
"0.51577... | 0.69886774 | 1 |
get the 2 least significant bits of x | def hDB0(YKHO, WKvO, yzQ0=32):
ZHfW = (1 << yzQ0) - 1
return int(WKvO & ZHfW) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y83U(WKvO):\n return WKvO & -WKvO",
"def nVyT(WKvO, exwG):\n return WKvO & pSfY(exwG)",
"def UoNd(WKvO):\n return 1 << (WKvO - 1).bit_length()",
"def oJjO(WKvO):\n return ~WKvO & WKvO + 1",
"def SMHM(WKvO, G1Hx):\n return WKvO >> G1Hx & 1",
"def KowF(WKvO, exwG):\n return WKvO >> ex... | [
"0.7873746",
"0.7815262",
"0.76105624",
"0.7444084",
"0.72898847",
"0.7233955",
"0.7032587",
"0.70128715",
"0.7009639",
"0.70032257",
"0.69697934",
"0.6926626",
"0.69237363",
"0.689244",
"0.6889694",
"0.6867963",
"0.68511176",
"0.67402107",
"0.6738769",
"0.6728822",
"0.672096... | 0.6630434 | 21 |
Given a password reset token and a known suffix of the plaintext, it returns whether or not the current time is being used as a seed | def FB3K(eOtH, tDmS, vHj7):
muav = VpOq(tDmS, eOtH)
for Wepg in muav:
if Wepg == vHj7 & 65535:
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def v0Bo(O6dx: bytes):\n vHj7 = int(ITS7.time())\n for Oa8f in range(vHj7 - 3700, vHj7):\n if ffDP(Oa8f) == O6dx:\n return Oa8f",
"def HL13(YKHO, CBIr, eOtH):\n try:\n Hgeh, hash = eOtH.split('-')\n except ValueError:\n return False\n try:\n i8WE = fnW_(Hgeh)... | [
"0.6794901",
"0.6129863",
"0.60050464",
"0.59580564",
"0.5915051",
"0.5903874",
"0.58462745",
"0.5814409",
"0.5734428",
"0.57036936",
"0.5616565",
"0.56165266",
"0.5591911",
"0.5549635",
"0.5514903",
"0.5503133",
"0.542504",
"0.54153347",
"0.53809655",
"0.53809655",
"0.536677... | 0.68625766 | 0 |
Figure out the number of commentlines to skip at the start of file `fn`. | def XWwe(FYKK):
for YRbF, zFiD in enumerate(open(FYKK)):
if zFiD.startswith('#'):
continue
else:
break
return YRbF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def q8QL(YKHO, zFiD, oeNL):\n if zFiD[oeNL] == '/' and len(zFiD) > oeNL + 1:\n if zFiD[oeNL + 1] == '/':\n return -1\n elif zFiD[oeNL + 1] == '*':\n YKHO._in_block_comment = True\n return 2\n return 0",
"def pYwz(jhZX):\n srCz = mLP3(jhZX)\n w9wE = 0\n ... | [
"0.6325003",
"0.61088085",
"0.6048627",
"0.5906633",
"0.57828575",
"0.57642734",
"0.57391286",
"0.5706694",
"0.5703885",
"0.57032496",
"0.56964415",
"0.56922525",
"0.56638336",
"0.56501114",
"0.56063795",
"0.55974144",
"0.5585904",
"0.5530964",
"0.55217195",
"0.551945",
"0.55... | 0.7273586 | 0 |
Returns a "cleaned" pandas.DataFrame from DESeq results. | def rePc(FYKK, WfCS=None, NCls=None, DfZ1='id'):
nPrm = iNmX(FYKK, sep='\t', skiprows=XWwe(FYKK))
if WfCS:
nPrm = nPrm.ix[:, WfCS]
if NCls:
nPrm = HgvQ(nPrm, NCls, index_col=DfZ1)
nPrm = nPrm.set_index(DfZ1)
return nPrm | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UlRM(Xtuq):\n M0wk = []\n mino = []\n for d6pt in range(len(Xtuq)):\n mino.append(Xtuq[d6pt].id)\n if isinstance(Xtuq[0], lKRe):\n UPBB = [[hcXw for hcXw in str(zEBX)] for zEBX in Xtuq]\n else:\n UPBB = [[hcXw for hcXw in str(zEBX.seq)] for zEBX in Xtuq]\n jQ3Z = rLdf.Dat... | [
"0.62880903",
"0.60502124",
"0.60502124",
"0.6034405",
"0.6022188",
"0.60017467",
"0.5998982",
"0.59722084",
"0.59583956",
"0.59332675",
"0.5902068",
"0.5895687",
"0.5866524",
"0.58587545",
"0.5846698",
"0.5840986",
"0.5839835",
"0.5825371",
"0.5811475",
"0.58104783",
"0.5797... | 0.56104684 | 34 |
Remove widget from focus order. Called by the base widget. | def rJnm(TEdI):
T4Wy = sum(RKKW, ())
if TEdI in T4Wy:
mLGw = (T4Wy.index(TEdI) - 1) / 2
del RKKW[mLGw] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ebpv(YKHO):\n YKHO._focus.pop()",
"def Hpkw(YKHO) -> None:\n if YKHO.selected_widget is not None:\n YKHO.handles.remove_selected_widget_handles()\n YKHO.selected_widget = None\n YKHO.attr_frame.update(YKHO.selected_widget)",
"def kSdD(YKHO, TEdI):\n YKHO.widgets.remove(TEdI)\n... | [
"0.7585213",
"0.6783059",
"0.67469937",
"0.6638362",
"0.66199666",
"0.6545476",
"0.6514593",
"0.6440532",
"0.6360511",
"0.6356924",
"0.6286058",
"0.62227386",
"0.6121271",
"0.60427123",
"0.60385764",
"0.60380757",
"0.60250694",
"0.60202897",
"0.5965557",
"0.595393",
"0.594826... | 0.7259344 | 1 |
Initialize layers of the head. | def J2K6(YKHO):
YKHO.relu = U78l.ReLU(inplace=True)
YKHO.rpn_convs = U78l.ModuleList()
for YRbF in range(YKHO.stacked_convs):
Fpx_ = YKHO.in_channels if YRbF == 0 else YKHO.feat_channels
YKHO.rpn_convs.append(R48A(Fpx_, YKHO.feat_channels, 3, stride=1, padding=1, conv_cfg=YKHO.conv_cfg, norm... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def J2K6(YKHO):\n YKHO._init_predictor()\n if YKHO.use_edge_fusion:\n YKHO._init_edge_module()",
"def J2K6(YKHO) -> None:\n YKHO.self_attn = io5z(**YKHO.self_attn_cfg)\n YKHO.cross_attn = io5z(**YKHO.cross_attn_cfg)\n YKHO.embed_dims = YKHO.self_attn.embed_dims\n YKHO.ffn = JcZC(**YKHO.f... | [
"0.7565452",
"0.73801965",
"0.7378758",
"0.70826614",
"0.70083666",
"0.68058515",
"0.6793121",
"0.6747672",
"0.67046845",
"0.6699219",
"0.6565106",
"0.6552534",
"0.6548868",
"0.6536724",
"0.6533556",
"0.65013635",
"0.64803135",
"0.6478405",
"0.6438143",
"0.6429889",
"0.642896... | 0.60646474 | 34 |
This is a wrapper around the ._init function that creates a new model, so that hardware accelerators can be used as efficiently as possible. Unfortunately there currently are problems with distributed training, meaning that the wrapper has to call the function, without "distributing" the model to a single GPU. Currentl... | def BdN0(YKHO):
YKHO._init() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BSpf(SQWW, Xu3r, b0j5):\n GPtr = Xhj8.from_pretrained(SQWW.model_name_or_path, num_labels=Xu3r.num_labels, cache_dir=SQWW.model_cache_dir, id2label=Xu3r.id2label, label2id=Xu3r.label2id)\n M24A = getattr(VlDb, SQWW.architectures, U0pB)\n C3ST = M24A.from_pretrained(SQWW.model_name_or_path, config=GPtr... | [
"0.7108494",
"0.70989704",
"0.6982184",
"0.69759727",
"0.69231486",
"0.6811584",
"0.6737911",
"0.6679192",
"0.6632363",
"0.6632031",
"0.6617071",
"0.6600098",
"0.659591",
"0.6590668",
"0.6549994",
"0.6499626",
"0.64990157",
"0.6471851",
"0.64557433",
"0.6455262",
"0.64423114"... | 0.0 | -1 |
Computes the Euclidean distance between points x and y given in Cartesian coordinates. | def usGr(WKvO: np.ndarray, LVAh: np.ndarray) -> float:
aZ1n: oyIN.ndarray = WKvO - LVAh
Ayfi = PMJ7(aZ1n)
return Ayfi | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sOE8(WKvO, LVAh):\n return oyIN.sqrt(oyIN.sum((WKvO - LVAh) ** 2))",
"def sOE8(WKvO, LVAh):\n ldJB = oyIN.sqrt(oyIN.sum((WKvO - LVAh) ** 2))\n return ldJB",
"def usGr(WKvO, LVAh):\n o4D3, si3g = WKvO\n ajwV, skBL = LVAh\n return PZyS((o4D3 - ajwV) ** 2 + (si3g - skBL) ** 2)",
"def Dm2A(... | [
"0.79997194",
"0.7874888",
"0.78625673",
"0.7853369",
"0.7805038",
"0.7797386",
"0.7751556",
"0.770697",
"0.74992806",
"0.736411",
"0.72620714",
"0.7228285",
"0.7154645",
"0.7146776",
"0.71164244",
"0.71129733",
"0.71068466",
"0.7067396",
"0.70608413",
"0.70492226",
"0.701014... | 0.72297156 | 11 |
Apply the Residual layer to the `input_`. | def KVH6(YKHO, CK9p):
yvT9 = YKHO.fc(CK9p)
yvT9 = YKHO.bn(yvT9)
yvT9 = YKHO.relu(yvT9)
return ht2j.cat([yvT9, CK9p], dim=1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uuHL(YKHO, vHnr, Zxma, NXpY=1.0, YDYE='RELU'):\n zi3C = vHnr.get_shape().as_list()\n Sqw_ = zi3C[1]\n RLZ8 = NXpY * Zxma(YKHO, vHnr)\n a6Jb = RLZ8.get_shape().as_list()\n I07O = a6Jb[1]\n mBHk = (zi3C[2] // a6Jb[2], zi3C[3] // a6Jb[3])\n with ZylS.name_scope('residual'):\n if I07O !... | [
"0.73092496",
"0.6719339",
"0.6124837",
"0.6054918",
"0.5994632",
"0.598588",
"0.59193397",
"0.5915656",
"0.5908799",
"0.5894215",
"0.5880474",
"0.5809454",
"0.5787263",
"0.573035",
"0.5718913",
"0.57104665",
"0.5687326",
"0.5679917",
"0.567038",
"0.56456417",
"0.56440127",
... | 0.5036586 | 86 |
A fast approximation of the cumulative distribution function of the standard normal. | def A9Yc(WKvO):
return 0.5 * (1.0 + ht2j.tanh(oyIN.sqrt(2.0 / oyIN.pi) * (WKvO + 0.044715 * ht2j.pow(WKvO, 3)))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XA7A(epBp):\n from math import exp\n kYGz = +0.31938153\n ftz7 = -0.356563782\n _2fo = +1.781477937\n BZh4 = -1.821255978\n CH56 = +1.330274429\n XP5J = +0.2316419\n Z9rn = +0.39894228\n if epBp >= 0.0:\n a1PO = 1.0 / (1.0 + XP5J * epBp)\n return 1.0 - Z9rn * exp(-epBp ... | [
"0.78611887",
"0.7343288",
"0.7198062",
"0.7152584",
"0.6901485",
"0.68538517",
"0.6798808",
"0.67920876",
"0.6643512",
"0.6601391",
"0.6601132",
"0.6533728",
"0.65252787",
"0.6494914",
"0.63961923",
"0.63672835",
"0.63424546",
"0.63214195",
"0.6320946",
"0.6288614",
"0.62712... | 0.7466885 | 1 |
Get a predefined beta schedule for the given name. The beta schedule library consists of beta schedules which remain similar in the limit of num_diffusion_timesteps. Beta schedules may be added, but should not be removed or changed once they are committed to maintain backwards compatibility. | def C19L(s2nd, a5P2):
if s2nd == 'linear':
NXpY = 1000 / a5P2
nbe7 = NXpY * 0.0001
ZUBf = NXpY * 0.02
return oyIN.linspace(nbe7, ZUBf, a5P2, dtype=oyIN.float64)
elif s2nd == 'cosine':
return EXLb(a5P2, lambda a1PO: epAf.cos((a1PO + 0.008) / 1.008 * epAf.pi / 2) ** 2)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pXBk(YKHO, mWFP):\n return YKHO.__schedules.get(mWFP, None)",
"def XTtZ(YKHO, qtWj, nbe7=None, ZUBf=None):\n if nbe7 is None:\n nbe7 = YKHO.beta_start\n if ZUBf is None:\n ZUBf = YKHO.beta_end\n if qtWj < nbe7:\n return YKHO.beta0\n elif nbe7 <= qtWj <= ZUBf:\n if Y... | [
"0.60553104",
"0.60200906",
"0.52869034",
"0.5179134",
"0.5165891",
"0.51009977",
"0.5097478",
"0.50822216",
"0.5066024",
"0.5035433",
"0.49954906",
"0.49711308",
"0.49685678",
"0.4915655",
"0.49151757",
"0.48921287",
"0.48621523",
"0.48472726",
"0.48368165",
"0.48064187",
"0... | 0.8515777 | 0 |
Take the mean over all nonbatch dimensions. | def HFbV(vhpA):
return vhpA.mean(dim=list(range(1, len(vhpA.shape)))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NPlr():\n return U78l.Sequential(U78l.AvgPool2d(kernel_size=(6, 6)), PWgb())",
"def QOgx(YKHO):\n return YKHO.mean(dim='mem')",
"def HFbV(vhpA):\n return vhpA.mean(axis=list(range(1, len(vhpA.shape))))",
"def JBMS(YKHO):\n return YKHO.data.mean(axis=-1, keepdims=True)",
"def GovM(YKHO):\n ... | [
"0.69110435",
"0.6781341",
"0.67724854",
"0.67624015",
"0.6731038",
"0.67190164",
"0.67012674",
"0.66761786",
"0.66351634",
"0.65871763",
"0.65857583",
"0.6555452",
"0.6552374",
"0.6535818",
"0.6497036",
"0.64801466",
"0.6465107",
"0.6448588",
"0.6445976",
"0.64292395",
"0.64... | 0.67947525 | 1 |
Sums all dimensions except the first. | def dOk7(WKvO, P9o9=1):
return WKvO.reshape(*WKvO.shape[:P9o9], -1).sum(-1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def D6g4(WKvO: Tensor) -> llWB:\n return ht2j.sum(WKvO, dim=0)",
"def sum(YKHO, jDK_=None, JsoO=False):\n return vuvg.Sum.apply(YKHO, jDK_, JsoO)",
"def YMv8(WKvO):\n SjMt(WKvO.ndim, 1)\n return oyIN.squeeze(oyIN.sum(WKvO, keepdims=True))",
"def sum(YKHO, jDK_: int=0):\n YKHO.values = YKHO.val... | [
"0.68612945",
"0.673936",
"0.66360873",
"0.65455437",
"0.63205636",
"0.6302802",
"0.62913257",
"0.6283977",
"0.6270764",
"0.6264549",
"0.6185366",
"0.61743665",
"0.6151092",
"0.61060256",
"0.6092697",
"0.6092065",
"0.6079816",
"0.6053398",
"0.6034476",
"0.60094094",
"0.600939... | 0.66587394 | 2 |
Get the prior KL term for the variational lowerbound, measured in bitsperdim. This term can't be optimized, as it only depends on the encoder. | def fJwu(YKHO, nIPf):
Ep8u = nIPf.shape[0]
a1PO = ht2j.tensor([YKHO.num_timesteps - 1] * Ep8u, device=nIPf.device)
fgVr, bGrB, mlFF = YKHO.gaussian_q_mean_variance(nIPf, a1PO)
LRHp = eGkr(mean1=fgVr, logvar1=mlFF, mean2=0.0, logvar2=0.0)
return HFbV(LRHp) / oyIN.log(2.0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bISY(YKHO):\n Cx59 = YKHO.weights_logvar\n GPbc = YKHO.prior_stdv.log() - Cx59.mul(0.5) + (Cx59.exp() + (YKHO.weights.pow(2) - YKHO.prior_mean)) / (2 * YKHO.prior_stdv.pow(2)) - 0.5\n aqSU = YKHO.prior_bias_stdv.log() - YKHO.bias_logvar.mul(0.5) + (YKHO.bias_logvar.exp() + (YKHO.bias.pow(2) - YKHO.pri... | [
"0.696338",
"0.646278",
"0.64278895",
"0.64149857",
"0.64079726",
"0.6306587",
"0.62923366",
"0.62595695",
"0.62472725",
"0.62327623",
"0.6143658",
"0.6136483",
"0.6135767",
"0.61226094",
"0.6118728",
"0.6108658",
"0.6108416",
"0.6103524",
"0.60923976",
"0.608892",
"0.608836"... | 0.5523525 | 76 |
The ReGLU activation function from [1]. | def IPGd(WKvO: Tensor) -> llWB:
assert WKvO.shape[-1] % 2 == 0
jzdc, Fg_i = WKvO.chunk(2, dim=-1)
return jzdc * vuvg.relu(Fg_i) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CKFj(pKvt):\n yvT9 = 1 + ZylS.tanh(oyIN.sqrt(oyIN.pi) * (pKvt + 0.044715 * ZylS.pow(pKvt, 3)))\n yvT9 *= 0.5 * pKvt\n return yvT9",
"def CKFj(pKvt):\n yvT9 = 1 + ZylS.tanh(oyIN.sqrt(oyIN.pi) * (pKvt + 0.044715 * ZylS.pow(pKvt, 3)))\n yvT9 *= 0.5 * pKvt\n return yvT9",
"def Vmco(WKvO):\n ... | [
"0.71268797",
"0.71268797",
"0.6673697",
"0.6661231",
"0.6644295",
"0.64964145",
"0.64248437",
"0.6390991",
"0.63749963",
"0.63674015",
"0.62990075",
"0.62816226",
"0.62739545",
"0.62688816",
"0.626637",
"0.6227934",
"0.6215054",
"0.6212191",
"0.6207483",
"0.62039685",
"0.619... | 0.0 | -1 |
The GEGLU activation function from [1]. | def gZVk(WKvO: Tensor) -> llWB:
assert WKvO.shape[-1] % 2 == 0
jzdc, Fg_i = WKvO.chunk(2, dim=-1)
return jzdc * vuvg.gelu(Fg_i) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CKFj(pKvt):\n yvT9 = 1 + ZylS.tanh(oyIN.sqrt(oyIN.pi) * (pKvt + 0.044715 * ZylS.pow(pKvt, 3)))\n yvT9 *= 0.5 * pKvt\n return yvT9",
"def CKFj(pKvt):\n yvT9 = 1 + ZylS.tanh(oyIN.sqrt(oyIN.pi) * (pKvt + 0.044715 * ZylS.pow(pKvt, 3)))\n yvT9 *= 0.5 * pKvt\n return yvT9",
"def Vmco(WKvO):\n ... | [
"0.77004826",
"0.77004826",
"0.74210227",
"0.7176632",
"0.7140944",
"0.7138531",
"0.70931953",
"0.7090489",
"0.7034269",
"0.70205075",
"0.6986577",
"0.6968592",
"0.6946415",
"0.692014",
"0.67789376",
"0.6763823",
"0.6763823",
"0.6763823",
"0.6763823",
"0.6763823",
"0.6763823"... | 0.6771344 | 15 |
Create a "baseline" `ResNet`. | def C3M3(Emd4: Type['ResNet'], *, _qKk: int, fOZ4: int, wVW3: int, lwMU: int, AGZ1: float, scah: float, F1RG: int) -> 'ResNet':
return Emd4(d_in=_qKk, n_blocks=fOZ4, d_main=wVW3, d_hidden=lwMU, dropout_first=AGZ1, dropout_second=scah, normalization='BatchNorm1d', activation='ReLU', d_out=F1RG) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f55J(**B2fa):\n C3ST = S1Vm(em1m, [1, 1, 1, 1], **B2fa)\n return C3ST",
"def qUH4(**B2fa):\n C3ST = S1Vm(em1m, [2, 2, 2, 2], **B2fa)\n return C3ST",
"def qUH4(mL4f=False, **B2fa):\n C3ST = S1Vm(em1m, [2, 2, 2, 2], **B2fa)\n return C3ST",
"def C3M3(Emd4: Type['MLP'], _qKk: int, cq86: Lis... | [
"0.6327897",
"0.614722",
"0.610232",
"0.60412157",
"0.5915927",
"0.58924466",
"0.5845502",
"0.5843595",
"0.5838634",
"0.5825884",
"0.580996",
"0.5805025",
"0.5805025",
"0.5805025",
"0.5805025",
"0.5805025",
"0.57855463",
"0.5767206",
"0.5652836",
"0.564936",
"0.563801",
"0.... | 0.8212792 | 0 |
get "extraction.conv.cfg" and covert to torch.nn | def rygB(YKHO, _6VY):
def GggX(_6VY):
rmyT = []
ytgA = open(_6VY, 'r')
XkN1 = None
zFiD = ytgA.readline()
while zFiD != '':
zFiD = zFiD.rstrip()
if zFiD == '' or zFiD[0] == '#':
zFiD = ytgA.readline()
continue
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vr4j(YKHO):\n yIp6 = U78l.Sequential(U78l.Conv2d(in_channels=3, out_channels=64, kernel_size=7, stride=2, padding=1), U78l.LeakyReLU(0.1, inplace=True), U78l.MaxPool2d(kernel_size=2, stride=2), U78l.Conv2d(64, 192, 3, padding=1), U78l.LeakyReLU(0.1, inplace=True), U78l.MaxPool2d(2, 2), U78l.Conv2d(192, 128,... | [
"0.5964775",
"0.59544456",
"0.59139544",
"0.58239293",
"0.58188504",
"0.581114",
"0.5785252",
"0.5771443",
"0.5764588",
"0.5661936",
"0.56529933",
"0.564753",
"0.56391567",
"0.5615194",
"0.55986565",
"0.5581418",
"0.5579392",
"0.5574774",
"0.5546392",
"0.55307055",
"0.552963"... | 0.54590875 | 27 |
padding = 3, with BatchNormalization | def K2Dz(YKHO):
yIp6 = U78l.Sequential(U78l.Conv2d(in_channels=3, out_channels=64, kernel_size=7, stride=2, padding=3, bias=False), U78l.BatchNorm2d(64), U78l.LeakyReLU(0.1, inplace=True), U78l.MaxPool2d(kernel_size=2, stride=2), U78l.Conv2d(64, 192, 3, padding=1, bias=False), U78l.BatchNorm2d(192), U78l.LeakyReLU(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VIAZ(Wc9F, J2wu, YUWI, Ep8u):\n BcCR = max(J2wu)\n rOH1 = len(Wc9F)\n zpgf = Ep8u - rOH1\n if zpgf == 0:\n return Wc9F\n tYAF = oyIN.ones(BcCR) * YUWI\n for YRbF in range(zpgf):\n Wc9F.append(tYAF)\n return Wc9F",
"def WtCT(Ot1W, _0fC, ivFb):\n return -((-Ot1W - (Ot1W - ... | [
"0.72193974",
"0.64116895",
"0.6398286",
"0.6278596",
"0.6241174",
"0.6213583",
"0.6205278",
"0.6202304",
"0.6192254",
"0.6165739",
"0.61524904",
"0.6137434",
"0.61371434",
"0.6120407",
"0.6105012",
"0.6102311",
"0.6098714",
"0.6076373",
"0.60317606",
"0.6023929",
"0.6023887"... | 0.6412125 | 1 |
padding = 1 and No BatchNormalization like extraction.conv.cfg | def Vr4j(YKHO):
yIp6 = U78l.Sequential(U78l.Conv2d(in_channels=3, out_channels=64, kernel_size=7, stride=2, padding=1), U78l.LeakyReLU(0.1, inplace=True), U78l.MaxPool2d(kernel_size=2, stride=2), U78l.Conv2d(64, 192, 3, padding=1), U78l.LeakyReLU(0.1, inplace=True), U78l.MaxPool2d(2, 2), U78l.Conv2d(192, 128, 1, pa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K2Dz(YKHO):\n yIp6 = U78l.Sequential(U78l.Conv2d(in_channels=3, out_channels=64, kernel_size=7, stride=2, padding=3, bias=False), U78l.BatchNorm2d(64), U78l.LeakyReLU(0.1, inplace=True), U78l.MaxPool2d(kernel_size=2, stride=2), U78l.Conv2d(64, 192, 3, padding=1, bias=False), U78l.BatchNorm2d(192), U78l.Leak... | [
"0.64856136",
"0.6292985",
"0.62474155",
"0.6165389",
"0.61221445",
"0.6104988",
"0.5827737",
"0.5827291",
"0.5804672",
"0.5775932",
"0.57418394",
"0.5692178",
"0.56821215",
"0.5674767",
"0.56700504",
"0.56519413",
"0.56416166",
"0.56329095",
"0.5624907",
"0.56231296",
"0.560... | 0.53688526 | 63 |
Set the eval dataloader to use by Trainer. It supports user defined dataloader set as an attribute in the constructor. When the attribute is None, The dataloader is defined using eval_dataset and the `data_loader_engine` specified in Training Arguments. | def Xivm(YKHO, FUPx=None):
if YKHO.eval_dataloader is not None:
return YKHO.eval_dataloader
if FUPx is None and YKHO.eval_dataset is None:
raise ValueError('Trainer: evaluation requires an eval_dataset.')
FUPx = FUPx if FUPx is not None else YKHO.eval_dataset
assert YKHO.schema is not No... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K1Op(YKHO) -> pVAc:\n return YKHO._custom_data_loader()",
"def K1Op(YKHO) -> ht2j.utils.data.DataLoader:\n return ht2j.utils.data.DataLoader(YKHO.dataset_train, **YKHO.dl_kwargs)",
"def KI2C(YKHO, DWkG):\n return YEmv(model=YKHO.model, pipeline=YKHO.pipeline, dataloader=DWkG, task=YKHO.task, mode=... | [
"0.6730854",
"0.65946466",
"0.6541422",
"0.6369222",
"0.62790823",
"0.62421876",
"0.62364036",
"0.6206105",
"0.62049025",
"0.61828923",
"0.6165432",
"0.6135348",
"0.6100907",
"0.609356",
"0.6048407",
"0.60442257",
"0.5902834",
"0.5896784",
"0.5891272",
"0.58649844",
"0.584214... | 0.7311328 | 0 |
Changes the current password, needs old password if there is one. Raises PasswordError if not successful. | def faAE(jTXt: str, BfIX=None) -> None:
G9jH.debug('called')
if not QfGE:
raise SSg9('No password gate given.')
if QfGE['pwd']:
if not B8ni.checkpw(BfIX.encode(jvya), QfGE.get('pwd').encode(jvya)):
raise JNHj("Old password doesn't match.", BfIX)
else:
if not E... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cDCx(YKHO, uGpu=None):\n YKHO.password = vT87(uGpu)\n if YKHO.save(verbose=False):\n YKHO.logger.warn('Updated password! %s' % YKHO)\n else:\n raise AttributeError('Password update failed!')",
"def faAE(YKHO, CBIr, rn8m, jTXt):\n if not jTXt:\n raise TmKd(\"New password can't... | [
"0.76627755",
"0.7602145",
"0.7587967",
"0.75471175",
"0.7457179",
"0.74287164",
"0.7362081",
"0.72914904",
"0.7246782",
"0.7222607",
"0.722055",
"0.7194476",
"0.7151013",
"0.71412134",
"0.71380633",
"0.71162885",
"0.70733696",
"0.70523053",
"0.7047536",
"0.70421386",
"0.7038... | 0.7177639 | 12 |
r"""Sometimes you get an URL by a user that just isn't a real URL because it contains unsafe characters like ' ' and so on. This function can fix some of the problems in a similar way browsers handle data entered by the | def BkLH(KCHu, p4k2='utf-8'):
KCHu = KCHu.replace('\\', '/')
if KCHu.startswith('file://') and KCHu[7:8].isalpha() and (KCHu[8:10] in (':/', '|/')):
KCHu = 'file:///' + KCHu[7:]
bD7m = NoPH(KCHu)
RYr6 = DJVh(bD7m)
pmON = A5Qt(bD7m.path, encoding=p4k2, safe="/%+$!*'(),")
umWR = ARfH(bD7m.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H3MP(YKHO, bD7m):\n if not YKHO.markdown.safeMode:\n return bD7m\n try:\n ht58, RYr6, pmON, NArs, xDcj, vBtp = bD7m = KVWQ(bD7m)\n except ValueError:\n return ''\n IM29 = ['', 'mailto', 'news']\n if RYr6 == '' and ht58 not in IM29:\n return ''\n for Q7me in bD7m[2:... | [
"0.7120271",
"0.6995937",
"0.6967897",
"0.68873763",
"0.6854298",
"0.67028886",
"0.65997857",
"0.6580614",
"0.65133977",
"0.65025586",
"0.647296",
"0.64683425",
"0.6365366",
"0.6261262",
"0.6230753",
"0.6191684",
"0.61820185",
"0.6154851",
"0.6109624",
"0.6106912",
"0.6104100... | 0.6234788 | 14 |
Retrieve set of tokens from the str definition. Depending on lemm_always parameter, the lemmatization will be applied always or only if the word is not in vocabulary. Words that are not in vocabulary will be dropped. | def CDyL(YKHO, q_DO: str) -> fHNa[str]:
A97Q = YKHO.ppl(q_DO)
if YKHO.lemm_always:
s2mk = [GIN8.lemma for _dZy in A97Q.sentences for GIN8 in _dZy.words]
s2mk = [a1PO.lower() for a1PO in s2mk if a1PO.lower() in YKHO.word_dictionary]
s2mk = set(s2mk)
else:
s2mk = set()
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def thS1(_dZy):\n return dFss(_dZy)",
"def X5wq(YKHO):\n s2mk = str(YKHO.doc).split()\n zLya = None\n if YKHO.lemmatize_method == 'wordnet':\n zLya = [YKHO.lemmatizer.lemmatize(eOtH) for eOtH in s2mk]\n else:\n zLya = [YKHO.lemmatizer.stem(eOtH) for eOtH in s2mk]\n YKHO.doc = ' '.... | [
"0.6536726",
"0.65158385",
"0.64152455",
"0.63985634",
"0.63445705",
"0.6308339",
"0.6304965",
"0.62941545",
"0.6275843",
"0.6274134",
"0.6258365",
"0.62497556",
"0.6247032",
"0.61675715",
"0.61623174",
"0.61409986",
"0.61138016",
"0.61123854",
"0.61095995",
"0.61010176",
"0.... | 0.6725453 | 0 |
Building edges from the given word. SelfCycles will be dropped if self.drop_self_cycles was set to True | def GSEn(YKHO, GIN8: str) -> fHNa[str]:
vtNo = set()
for cnCU in YKHO.word_dictionary[GIN8]:
PZg2 = YKHO.get_filtered_set_tokens(definition=cnCU['definition'])
if YKHO.drop_self_cycles:
if GIN8 not in PZg2:
vtNo = vtNo.union(PZg2)
else:
vtNo = vtNo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vppG(YKHO):\n for YRbF in range(0, YKHO.num_words):\n YKHO.graph.append([])\n for GIN8 in YKHO.words:\n for oeNL in range(0, 4):\n for yltv in range(0, 26):\n ycBG = ''\n if oeNL > 0:\n ycBG = GIN8[0:oeNL] + chr(yltv + ord('a')) + ... | [
"0.61835706",
"0.60803604",
"0.6056407",
"0.59981906",
"0.5982105",
"0.5930936",
"0.59160554",
"0.586869",
"0.5850184",
"0.58221626",
"0.5806796",
"0.57887083",
"0.5767803",
"0.5735497",
"0.56786835",
"0.5661751",
"0.56515664",
"0.56486356",
"0.5646709",
"0.56319726",
"0.5620... | 0.6158817 | 1 |
Take a pretty version of an ethernet address and convert it to a string of bytes. | def QyN4(r7XA):
rRzo = ''
for YRbF in (0, 3, 6, 9, 12, 15):
rRzo += '%c' % int(r7XA[YRbF:YRbF + 2], 16)
return rRzo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def D5jl(bytes):\n r7XA = ''\n for YRbF in range(5):\n r7XA += hex(bytes[YRbF])[2:4]\n r7XA += ':'\n r7XA += hex(bytes[5])[2:4]\n return r7XA",
"def fBq3(j1t3):\n return ':'.join([Fg_i.encode('hex') for Fg_i in j1t3])",
"def kAR_(rRzo: bytes) -> str:\n if not len(rRzo) or not rR... | [
"0.71535116",
"0.6786328",
"0.67225295",
"0.6630974",
"0.65079457",
"0.64472204",
"0.6335762",
"0.6322627",
"0.6316357",
"0.61431503",
"0.6120108",
"0.6077547",
"0.6052179",
"0.5979265",
"0.5979265",
"0.5979265",
"0.5979265",
"0.59479356",
"0.5942241",
"0.593506",
"0.5870557"... | 0.77720016 | 0 |
Return the current or final job duration. | def WbTE(YKHO):
CiFP = ITS7.time() if YKHO.ended is None else YKHO.ended
return CiFP - YKHO.started | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WbTE(YKHO):\n KAOn = YKHO.started_at\n Pt1K = YKHO.finished_at\n if KAOn and Pt1K:\n return str(Pt1K - KAOn)\n else:\n return None",
"def WbTE(YKHO):\n if not YKHO.started:\n return None\n yKcO = YKHO.started\n Os4s = YKHO.completed\n if not Os4s:\n Os4s = ... | [
"0.79896915",
"0.7687139",
"0.7546398",
"0.75435925",
"0.75260454",
"0.74763864",
"0.7409453",
"0.7365377",
"0.7346771",
"0.7343953",
"0.7314254",
"0.72863644",
"0.724786",
"0.7240286",
"0.7240019",
"0.72271997",
"0.7140382",
"0.713773",
"0.71223843",
"0.70911616",
"0.7072825... | 0.7381795 | 7 |
Get the object attached to the anchor control. | def HYU_(YKHO):
CnkA.warning(u'The method of obtaining the object attached to the anchor control is not defined')
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _Sss(YKHO):\n return YKHO.anchor",
"def DNwW(YKHO):\n return YKHO._anchor",
"def oj5D(YKHO):\n return YKHO.properties.get('AnchorId', None)",
"def DNwW(YKHO):\n return YKHO.attributes[-1]",
"def gCH0(YKHO):\n return YKHO",
"def AMX5(YKHO):\n return YKHO._object",
"def gCH0(YKHO):\... | [
"0.7439054",
"0.7217367",
"0.64824396",
"0.6276082",
"0.6200907",
"0.6162962",
"0.60405076",
"0.60405076",
"0.60405076",
"0.6014204",
"0.59962475",
"0.59792626",
"0.5971711",
"0.5933764",
"0.5852976",
"0.5778357",
"0.57573456",
"0.5713315",
"0.5709336",
"0.5709336",
"0.570933... | 0.7144128 | 2 |
Calculation of the position of the control point in pixels. | def k5wo(YKHO, hBkX=None):
if hBkX is None:
hBkX = YKHO._position
if YKHO._mnemoscheme is None:
CnkA.warning(u'Not defined mimic for anchor <%s>' % YKHO.getName())
return (0, 0)
cwIg, q7E_ = YKHO._mnemoscheme.getSVGSize()
KvS4, fXR1 = YKHO._mnemoscheme.GetSize()
oB7E = float(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lUOL(YKHO):\n Z9rn = YKHO.get_center()\n return F8C3.three_by_three(Z9rn[0], Z9rn[1])",
"def gdBE(YKHO):\n oH9f = lNLu(YKHO.pos.x * 32, -YKHO.pos.y * 32)\n return oH9f + YKHO.offset",
"def FIlE(YKHO):\n return he6J(YKHO.grid_pos[0] * YKHO.app.cell_width + GS59 // 2 + YKHO.app.cell_width // 2... | [
"0.7298711",
"0.7286304",
"0.69999504",
"0.682003",
"0.6788774",
"0.675914",
"0.65536654",
"0.6481827",
"0.6478598",
"0.6477979",
"0.6470656",
"0.6448749",
"0.6435703",
"0.63991654",
"0.639327",
"0.6373377",
"0.63534117",
"0.6279551",
"0.62531817",
"0.6244868",
"0.6232852",
... | 0.0 | -1 |
Transform normalscore data to previous distribution | def MVuW(nPrm, eQc2, Clqu, yGTL, ifkm):
print('The dtgeostats.utils.from_norm function is under construction - use with caution...')
MKlR = WgYu(eQc2, Clqu)
eHNT = aevO.norm(0, 1).cdf(nPrm)
epBp = [MKlR(YRbF) * ifkm + yGTL for YRbF in eHNT]
return epBp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SZFh(YKHO, nPrm):\n nPrm -= YKHO.mean\n if 0.0 in YKHO.std:\n YKHO.std = oyIN.where(YKHO.std == 0.0, 1.0, YKHO.std)\n nPrm /= YKHO.std\n return nPrm",
"def WnzI(nPrm):\n bySB = nPrm[:, 0:-1]\n pan_ = nPrm[:, -1]\n print('Training Data:\\n\\n' + str(bySB))\n print('\\n')\n pr... | [
"0.70772254",
"0.6795818",
"0.6688897",
"0.6611134",
"0.65442544",
"0.6529865",
"0.6443814",
"0.63869464",
"0.63583684",
"0.6355613",
"0.6277897",
"0.6277897",
"0.62756896",
"0.62598366",
"0.62595695",
"0.620676",
"0.6202899",
"0.6180395",
"0.6162539",
"0.6154963",
"0.6154053... | 0.5770762 | 69 |