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 |
|---|---|---|---|---|---|---|
Creates a line plot from the dataframe, with styling and additional input coming from the properties. Each row in the dataframe defines a series. Colors and markers are assigned automatically. The `cycle_seed` property allows you to select other combinations if the default one is not suitable. The legend is normally co... | def JYrM(jQ3Z, lhy8, LxcI=R75p):
XP5J = u6dc if a88W.is_native_chart() else QrM1
def FQ0H(G1Hx):
return lhy8[G1Hx] if G1Hx in lhy8 else None
iVRZ = 'name' if FQ0H('legend_labels') == 'result names' else 'title'
CGSn, QtWG = RNsC(jQ3Z, iVRZ)
jQ3Z.sort_values(by=[vC9B for bGrB, vC9B in QtWG],... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def O42U(jQ3Z: DataFrame) -> zoLL.Graph:\n LZpg = iEax.Figure(data=iEax.Scatter(x=jQ3Z.index, y=jQ3Z.iloc[:, 0], mode='lines+markers'))\n LZpg.update_layout(title=bGrB('Line plot'), xaxis_title=jQ3Z.index.name, yaxis_title=jQ3Z.columns[0])\n Oa1e = zoLL.Graph(figure=LZpg)\n return Oa1e",
"def Nd0k(nP... | [
"0.6787527",
"0.6097085",
"0.608274",
"0.60391533",
"0.6001686",
"0.5909826",
"0.5893934",
"0.58447987",
"0.5802491",
"0.57003987",
"0.5679608",
"0.5640575",
"0.5592414",
"0.5503917",
"0.5466271",
"0.5462733",
"0.54458004",
"0.54332036",
"0.54298604",
"0.5429779",
"0.54243296... | 0.0 | -1 |
Returns the halflength of the confidence interval of the mean of `data`, assuming normal distribution, for the given confidence level `alpha`. | def mjJ1(Cwt5, nPrm):
return aevO.norm.interval(Cwt5, loc=0, scale=aevO.sem(nPrm))[1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Olvj(nPrm, Cwt5=VPbr):\n JBMS = oyIN.mean(nPrm)\n WTkW = oyIN.std(nPrm)\n NXpY = Zxt2.stats.norm.ppf(1 - Cwt5 / 2.0)\n return VOlW(JBMS, JBMS - NXpY * WTkW, JBMS + NXpY * WTkW)",
"def mjJ1(Cwt5, nPrm):\n return epAf.nan if len(nPrm) <= 1 else 0 if len(set(nPrm)) <= 1 else aevO.norm.interval(Cw... | [
"0.7370468",
"0.72000873",
"0.6733501",
"0.6633786",
"0.6431638",
"0.63347584",
"0.6087576",
"0.6041526",
"0.6029544",
"0.59787613",
"0.59750426",
"0.5940198",
"0.5854238",
"0.5768613",
"0.5746099",
"0.57364124",
"0.56912833",
"0.5686199",
"0.5666265",
"0.5650472",
"0.5643365... | 0.73922896 | 0 |
Ensures that the dataframe contains the given columns. If any of them are missing, the function raises an error with the given message. | def izQ9(jQ3Z, WfCS, Ol8d='Expected column missing from DataFrame'):
for Z9rn in WfCS:
if Z9rn not in jQ3Z:
u6dc.set_warning(Ol8d + ': ' + Z9rn)
raise ValueError(Ol8d + ': ' + Z9rn) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def izQ9(jQ3Z, WfCS, Ol8d='Expected column missing from DataFrame'):\n for Z9rn in WfCS:\n if Z9rn not in jQ3Z:\n raise a88W.ChartScriptError(Ol8d + ': ' + Z9rn)",
"def QupZ(f4IJ, ZLJ_):\n for fvDH in ZLJ_:\n if fvDH not in f4IJ.columns:\n raise RuntimeError('Missing col... | [
"0.80554545",
"0.78055245",
"0.77967316",
"0.7756671",
"0.7368346",
"0.73298675",
"0.732336",
"0.731535",
"0.72605044",
"0.7228347",
"0.721234",
"0.7208803",
"0.7190347",
"0.7154901",
"0.7148362",
"0.7102417",
"0.7054605",
"0.7051288",
"0.70458466",
"0.70283914",
"0.6884409",... | 0.7993104 | 1 |
Split a string with the given separator (by default with comma), trim the surrounding whitespace from the items, and return the result as a list. Returns an empty list for an empty or allwhitespace input string. (Note that in contrast, `s.split(',')` will return an empty array, even for `s=''`.) | def lpha(KCHu, VWe_=','):
SQ3m = KCHu.split(VWe_)
SQ3m = [XP5J.strip() for XP5J in SQ3m]
if SQ3m == ['']:
SQ3m = []
return SQ3m | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lpha(KCHu, g8rx):\n s2mk = ZbWC.split('\\\\s*' + g8rx + '\\\\s*', KCHu.strip())\n return list(filter(lambda a1PO: len(a1PO) > 1, map(str.strip, s2mk)))",
"def Tst5(vIwR, VWe_=',', P4Ec=False):\n return [BWXx.strip() for BWXx in vIwR.split(VWe_) if not P4Ec or BWXx]",
"def RoDD(vIwR, g8rx=';', Loo5... | [
"0.79020673",
"0.7700865",
"0.7606808",
"0.7595176",
"0.74980503",
"0.74865365",
"0.7484895",
"0.7253523",
"0.70953035",
"0.70460635",
"0.6999878",
"0.6950163",
"0.69279027",
"0.6879514",
"0.6870386",
"0.6841525",
"0.6812331",
"0.6717822",
"0.6706047",
"0.6687831",
"0.667177"... | 0.8136386 | 1 |
Convert a pair of coordinates from the idiosyncratic CPC lat lon format to the conventional lat lon format. | def Qak6(QnmL, FDPT):
QnmL, FDPT = (float(QnmL), float(FDPT))
if FDPT >= 180:
return (QnmL, FDPT - 360)
else:
return (QnmL, FDPT) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zZaO(QnmL, FDPT):\n QnmL, FDPT = (float(QnmL), float(FDPT))\n if FDPT < 0:\n return (QnmL, FDPT + 360)\n else:\n return (QnmL, FDPT)",
"def FOcz(YKHO, jNOo, DpZH, ucxv):\n if GPtr.get('cows.wms.handleLatLongCoords', 'false').lower() == 'true' and YKHO._isLatLonOrderCrs(DpZH, ucxv):\... | [
"0.72254217",
"0.6882199",
"0.6832433",
"0.6815156",
"0.68003315",
"0.676954",
"0.676954",
"0.6765814",
"0.6755917",
"0.6682108",
"0.658091",
"0.652849",
"0.64345604",
"0.63894427",
"0.63798964",
"0.63782823",
"0.63782823",
"0.63650846",
"0.6328838",
"0.6316777",
"0.629726",
... | 0.7460104 | 0 |
Split a string path into a pathaslist (a list of its components). | def _wv_(KCHu):
HOpV = vIwR.split(KCHu, '/')
try:
while 1:
HOpV.remove('')
except ValueError:
pass
return HOpV | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KkWy(YKHO, pmON):\n if len(pmON) > 0 and pmON[0] == '/':\n pmON = pmON[1:]\n if len(pmON) > 0 and pmON[-1] == '/':\n pmON = pmON[0:-1]\n if len(pmON) == 0:\n return []\n return pmON.split('/')",
"def KkWy(pmON):\n vRv4 = []\n while pmON != '/':\n SQ3m = Hy7s.path... | [
"0.8230202",
"0.80811894",
"0.8056671",
"0.7970037",
"0.7964534",
"0.7953892",
"0.7947932",
"0.78303397",
"0.782569",
"0.78031564",
"0.7800688",
"0.77904224",
"0.77448136",
"0.7704659",
"0.76985145",
"0.7630663",
"0.7605862",
"0.75970495",
"0.7595572",
"0.7490786",
"0.7488162... | 0.7511242 | 19 |
Stores provided method args as instance attributes. | def _Uze(NKcE):
fctm = tq_1.getfullargspec(NKcE)
muwo = {}
if fctm.defaults is not None:
muwo = dict(zip(fctm.args[-len(fctm.defaults):], fctm.defaults))
if fctm.kwonlydefaults is not None:
muwo.update(fctm.kwonlydefaults)
exmT = fctm.args[1:]
@xBlr.wraps(NKcE)
def h3Xc(*Bif... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _Uze(NKcE):\n fctm = tq_1.getfullargspec(NKcE)\n muwo = {}\n if fctm.defaults is not None:\n muwo = dict(zip(fctm.args[-len(fctm.defaults):], fctm.defaults))\n if fctm.kwonlydefaults is not None:\n muwo.update(fctm.kwonlydefaults)\n exmT = fctm.args[1:]\n\n @xBlr.wraps(NKcE)\n ... | [
"0.68155193",
"0.68155193",
"0.68155193",
"0.64459056",
"0.6331345",
"0.63257474",
"0.63068527",
"0.6247473",
"0.6246383",
"0.6241663",
"0.62235147",
"0.6211871",
"0.62034154",
"0.6153201",
"0.6137103",
"0.60729456",
"0.60726565",
"0.60726565",
"0.60726565",
"0.60726565",
"0.... | 0.7016954 | 0 |
Test getting just one blog post | def jzeS(YKHO):
m8z6 = YKHO._insert_test_post()[0]
Fi3q = m8z6.id
geh0 = qQXR.loads(fkN9.get('/api/blog/{}'.format(Fi3q)).data.decode())
hU0J = geh0['data']
YKHO.assertEqual(200, geh0['status'])
YKHO._assert_posts_equal(hU0J, m8z6)
X9bi.delete(m8z6)
X9bi.commit() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def w6SD(YKHO):\n m8z6 = YKHO._insert_test_post()[0]\n Fi3q = m8z6.id\n geh0 = qQXR.loads(fkN9.get('/api/blog/{}'.format(Fi3q)).data.decode())\n hU0J = geh0['data']\n YKHO.assertEqual(200, geh0['status'])\n YKHO._assert_posts_equal(hU0J, m8z6)\n cuiw.delete(m8z6)\n cuiw.commit()",
"def gD... | [
"0.7843892",
"0.7334725",
"0.7294375",
"0.7260636",
"0.7252244",
"0.7188991",
"0.7119039",
"0.7112798",
"0.7081772",
"0.70641226",
"0.7061419",
"0.70530176",
"0.7023825",
"0.69191784",
"0.6907986",
"0.69067967",
"0.68847895",
"0.6852531",
"0.685149",
"0.68495274",
"0.68468386... | 0.80598015 | 0 |
Returns the wavelet class | def qF01(mWFP):
if mWFP not in ZJmi:
raise UpEA(UpEA.__cause__)
return ZJmi[mWFP] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b84t(YKHO):\n return YKHO.wave",
"def qJa9(YKHO):\n return YKHO._wave",
"def qJa9(YKHO):\n return YKHO._wave",
"def ISNK(YKHO):\n return YKHO._sensor_class",
"def HYQV(YKHO):\n return YKHO.wave.get_data()",
"def cyxF(YKHO):\n raise NotImplementedError",
"def qJa9(YKHO):\n retur... | [
"0.6696381",
"0.6303608",
"0.6303608",
"0.6297404",
"0.6287907",
"0.6199",
"0.60988563",
"0.6009919",
"0.5921747",
"0.59195936",
"0.58711857",
"0.5868848",
"0.5868848",
"0.5868848",
"0.5868848",
"0.5857848",
"0.5855204",
"0.58458227",
"0.5827504",
"0.5824512",
"0.5809672",
... | 0.6143986 | 6 |
When the `env_name` is `.venv` show the name of the parent folder contains `py3.` (when it is poetry created) shows the project name part alone Returns str python env_name | def zDDi():
i2I_: str = oBJw['env_name']()
if i2I_:
pEzh = GkAb(sD4J.get('VIRTUAL_ENV'))
if pEzh.name == '.venv':
return pEzh.parent.name
if '-py' in i2I_:
mWFP = pEzh.name.rsplit('-', 2)[0]
return mWFP
return i2I_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rdAP():\n return Hy7s.path.basename(HwRy.prefix) if mkPU() else None",
"def pEzh(YKHO) -> str:\n DpZH = YKHO.version().replace('.', '')\n return Hy7s.path.abspath(f'.riot/venv_py{DpZH}')",
"def i2I_(YKHO) -> str:\n return YKHO._env_name",
"def pmON(YKHO, I7OS):\n return Hy7s.path.join(I7OS... | [
"0.75433815",
"0.7278789",
"0.7156251",
"0.71077096",
"0.70521873",
"0.70270574",
"0.6946328",
"0.6880858",
"0.6748754",
"0.67334676",
"0.6692889",
"0.6655556",
"0.66549325",
"0.6643024",
"0.65987146",
"0.65680325",
"0.65033805",
"0.6459387",
"0.64560723",
"0.64536005",
"0.64... | 0.78112537 | 0 |
Serve motion jpeg server from video camera source. 1. Run inference from video camera source image. 2. Visualize (decorate) input image from inference result. 3. Response decorated image as motion jpeg. | def b8V_(C3ST, Nu1S, bIwZ):
iXC1(C3ST, Nu1S, bIwZ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def gen(yDvq, geh0):\n lGbz = V7ok.get_event_loop()\n while True:\n f4IJ = await yDvq.get_frame()\n await geh0.write(b'--frame\\r\\nContent-Type: image/jpeg\\r\\n\\r\\n' + f4IJ + b'\\r\\n')\n await V7ok.sleep(1.0 / kDnD)",
"def kir0():\n return oGir(fMtW('frame', DVX0(40, 2560... | [
"0.7080902",
"0.69216317",
"0.6663629",
"0.6640845",
"0.662077",
"0.65891784",
"0.657271",
"0.6543087",
"0.6518679",
"0.6474921",
"0.6456893",
"0.6452958",
"0.64038074",
"0.6401858",
"0.6379587",
"0.6366379",
"0.6350603",
"0.63274235",
"0.6316964",
"0.6307706",
"0.6296509",
... | 0.0 | -1 |
Display a stack or list of images using subplots. | def D2Qb(vJ4g, wytA=(20, 20), jQHG=None, iMGt='gray', ymbj='all', **B2fa):
if isinstance(vJ4g, list):
exwG = len(vJ4g)
else:
exwG = vJ4g.shape[0]
if jQHG is None:
WfCS = int(oyIN.ceil(oyIN.sqrt(exwG)))
usx6 = int(oyIN.ceil(awRs(1.0 * exwG, WfCS)))
else:
usx6, WfCS... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YmgL(zXUK, JYga=10, usx6=1, HQcv=True, leAC=None):\n ZLJ_ = len(zXUK) // usx6\n LZpg = QrM1.figure(figsize=(JYga * ZLJ_, JYga))\n for YRbF in range(1, ZLJ_ * usx6 + 1):\n LZpg.add_subplot(usx6, ZLJ_, YRbF)\n QrM1.imshow(zXUK[YRbF - 1])\n if leAC is not None:\n QrM1.title(leAC)\... | [
"0.80552053",
"0.76255524",
"0.7620964",
"0.7590601",
"0.75287974",
"0.7524264",
"0.7508765",
"0.74526983",
"0.74079216",
"0.7400355",
"0.73746085",
"0.73659843",
"0.73350185",
"0.7322786",
"0.7311417",
"0.72655475",
"0.72655475",
"0.72655475",
"0.72655475",
"0.724556",
"0.72... | 0.7043475 | 32 |
Decorator that caches the return value for each call to f(args). Then when called again with same args, we can just look it up. | def i_PE(YKHO, eHNT):
wyyA = {}
def ECmi(*qIxc):
try:
return wyyA[qIxc]
except KeyError:
Aofo = eHNT(*qIxc)
wyyA[qIxc] = Aofo
return Aofo
except TypeError:
return eHNT(*qIxc)
ECmi.cache = wyyA
return ECmi | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rxxd(eHNT):\n wyyA = {}\n\n def KmAm(*qIxc):\n if qIxc in wyyA:\n return wyyA[qIxc]\n Aofo = eHNT(*qIxc)\n wyyA[qIxc] = Aofo\n return Aofo\n return KmAm",
"def rxxd(eHNT, wyyA={}):\n\n def Oa1e(*qIxc, **B2fa):\n H5ew = (eHNT, tuple(qIxc), frozenset(B2... | [
"0.8194548",
"0.80174404",
"0.799962",
"0.78567207",
"0.78335273",
"0.78010476",
"0.7800545",
"0.77877855",
"0.778146",
"0.77711535",
"0.77711535",
"0.77711535",
"0.77711535",
"0.77084154",
"0.76751596",
"0.7663614",
"0.7658798",
"0.76163703",
"0.76128274",
"0.76128274",
"0.7... | 0.7747242 | 13 |
Generates a bilinear weight map for a set of patches. | def g12V(ohfT):
if ohfT.shape[-3] == ohfT.shape[-2]:
HEZd = ohfT.shape[-3]
else:
G9jH.error('Patches must be square for bilinear interpolation.')
return False
eL5z = uaHZ(HEZd)
_mSQ = oyIN.expand_dims(oyIN.tile(eL5z, reps=(*ohfT.shape[:2], 1, 1, 1)), axis=-1)
nDPw = NmPT(_mSQ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fvrP(ZHfW, IJH7, upAO):\n pass",
"def GQEX(oGem):\n HN6s, co3n = oGem.shape[1:]\n oGem = (oGem > 0).astype(int)\n AuJX = oyIN.zeros((HN6s * co3n, oGem.shape[0]))\n mSn1, OJuM = oyIN.meshgrid(oyIN.arange(HN6s), oyIN.arange(co3n))\n mSn1, OJuM = oyIN.c_[mSn1.ravel(), OJuM.ravel()].T\n for ... | [
"0.7120957",
"0.6494782",
"0.6471216",
"0.64001745",
"0.6340321",
"0.62905335",
"0.6216526",
"0.60427296",
"0.60373753",
"0.58908015",
"0.57121897",
"0.57019854",
"0.5661027",
"0.56360006",
"0.5632234",
"0.5630266",
"0.5604872",
"0.55928403",
"0.5581969",
"0.5568086",
"0.5556... | 0.60717505 | 7 |
Translates a DNA string into its RNA counterpart by replacing all occurrences of T into U | def ZxbQ(ytkQ):
ToxW = ''
for iAX4 in ytkQ:
if iAX4 == 'T':
ToxW += 'U'
else:
ToxW += iAX4
return ToxW | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def B97i(Q6uT):\n return Q6uT.replace('T', 'U')",
"def Td78(vIwR):\n AUCB = ''\n for P8oC in vIwR:\n if P8oC == 'U':\n AUCB = AUCB + 'T'\n elif P8oC in ['A', 'C', 'G']:\n AUCB = AUCB + P8oC\n else:\n print('characters that are not A, C, G or U are pr... | [
"0.76561713",
"0.7564607",
"0.75462",
"0.7414021",
"0.726798",
"0.7251162",
"0.7219081",
"0.7206029",
"0.7201393",
"0.7185841",
"0.7155229",
"0.7147383",
"0.71225286",
"0.7101833",
"0.6932584",
"0.69295317",
"0.6869419",
"0.67893875",
"0.67893493",
"0.67547923",
"0.67331916",... | 0.7530896 | 3 |
The type of the membership. | def type(YKHO) -> str:
return qe4Y.get(YKHO, 'type') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YwLH(YKHO):\n return YKHO.type_",
"def type(YKHO):\n return YKHO._type",
"def type(YKHO):\n return YKHO._type",
"def type(YKHO):\n return YKHO._type",
"def ZP0S(YKHO):\n return YKHO._user_type",
"def type(YKHO):\n return YKHO._type",
"def type(YKHO):\n return YKHO._type_",
"d... | [
"0.7216945",
"0.72163826",
"0.72163826",
"0.72163826",
"0.7181966",
"0.71764755",
"0.7176171",
"0.71750885",
"0.71750885",
"0.71750885",
"0.71750885",
"0.71750885",
"0.71750885",
"0.71750885",
"0.71750885",
"0.71750885",
"0.71750885",
"0.71750885",
"0.71750885",
"0.71750885",
... | 0.0 | -1 |
Removes the first element of `shape`. | def dgMA(YKHO):
if len(YKHO.shape) == 0:
raise ValueError('Not support to unbatch a InputSpec when len(shape) == 0.')
YKHO.shape = YKHO._verify(YKHO.shape[1:])
return YKHO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hZAx(YKHO):\n ...",
"def qhmA(ROpF):\n ROpF = list(ROpF)\n while ROpF and ROpF[-1] == 1:\n ROpF.pop()\n return ROpF",
"def bJiA(n294, u9Bs):\n ZivW = u9Bs.shapes[0]\n\n def PTpj(ZivW):\n TBsA = ZivW.body\n ZivW.group = KY3L\n hRvT.remove(ZivW, TBsA)\n hRvT.a... | [
"0.7606066",
"0.7236608",
"0.7135368",
"0.685471",
"0.6804564",
"0.6467849",
"0.6463419",
"0.6376625",
"0.6361336",
"0.6359167",
"0.6344296",
"0.6307904",
"0.62514657",
"0.62400126",
"0.62387514",
"0.6218638",
"0.6215969",
"0.61139625",
"0.6075541",
"0.60717297",
"0.60421616"... | 0.0 | -1 |
True if the connection has been closed by the client. | def msNV(YKHO):
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SEEh(YKHO):\n return YKHO.connection is None",
"def SEEh(YKHO):\n return YKHO.connection is None",
"def msNV(YKHO):\n return YKHO.transport.is_closing()",
"def DDI8(YKHO):\n if YKHO.connection_is_open:\n YKHO.connection.close()\n return not YKHO.connection_is_open",
"def ZRvC(YKHO... | [
"0.84067345",
"0.84067345",
"0.8168288",
"0.8003811",
"0.7981128",
"0.7827977",
"0.7818884",
"0.77777386",
"0.7755789",
"0.76941586",
"0.7674256",
"0.76075816",
"0.7595682",
"0.7585208",
"0.75075376",
"0.74837685",
"0.7445757",
"0.7389573",
"0.73595643",
"0.735771",
"0.731693... | 0.0 | -1 |
The age of this connection in seconds. | def ZJe_(YKHO):
from monotonic import monotonic
return monotonic() - YKHO.__t_opened | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZJe_(YKHO) -> int:\n return (qcWV.now() - YKHO.date()).seconds // 1000",
"def ZJe_(YKHO):\n return ITS7.time() - YKHO.started",
"def r3IN(YKHO):\n return v2gS.get_total_seconds_difference(v2gS.todays_date(), YKHO.__birth_date)",
"def N_N1(YKHO):\n return ITS7.time() - YKHO.__last_usage_time",... | [
"0.79677105",
"0.78178525",
"0.7635976",
"0.744939",
"0.7412241",
"0.7381473",
"0.734342",
"0.7317249",
"0.73159784",
"0.7283732",
"0.72619516",
"0.72471124",
"0.72471124",
"0.7246879",
"0.7238006",
"0.7186012",
"0.71418387",
"0.7071926",
"0.7037037",
"0.7034035",
"0.698919",... | 0.7311219 | 9 |
The user agent for connections in this pool. | def Lb1u(YKHO):
return YKHO._user_agent | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Lb1u(YKHO) -> h8nf[str]:\n return YKHO.connection.user_agent",
"def Lb1u(YKHO):\n return YKHO._user_agent.value",
"def Lb1u(YKHO) -> str:\n return YKHO['requestContext']['http']['userAgent']",
"def Lb1u(YKHO):\n return YKHO.default_headers['User-Agent']",
"def Lb1u(YKHO):\n return YKHO.d... | [
"0.7896031",
"0.77956355",
"0.7696112",
"0.76499164",
"0.76499164",
"0.76499164",
"0.76499164",
"0.7598925",
"0.754336",
"0.7458772",
"0.73308027",
"0.7254572",
"0.7200695",
"0.7012612",
"0.6992932",
"0.68612677",
"0.6859339",
"0.67899895",
"0.6712109",
"0.668701",
"0.6605975... | 0.7968966 | 0 |
The user agent for connections attached to this connector. | def Lb1u(YKHO):
return YKHO._user_agent | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Lb1u(YKHO) -> h8nf[str]:\n return YKHO.connection.user_agent",
"def Lb1u(YKHO):\n return YKHO._user_agent.value",
"def Lb1u(YKHO) -> str:\n return YKHO['requestContext']['http']['userAgent']",
"def Lb1u(YKHO) -> str:\n return YKHO.headers['User-Agent']",
"def Lb1u(YKHO):\n return YKHO.de... | [
"0.77839017",
"0.77194494",
"0.7611802",
"0.74982244",
"0.7412416",
"0.7412416",
"0.7412416",
"0.7412416",
"0.7252911",
"0.7240392",
"0.70383126",
"0.70114374",
"0.69406104",
"0.6823598",
"0.6708272",
"0.66341037",
"0.6576477",
"0.6385359",
"0.63520885",
"0.6334885",
"0.63061... | 0.78136146 | 1 |
Return the ID of the query behind this result. This method may carry out network activity. | def scn9(YKHO):
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EFKQ(YKHO):\n return YKHO._query_id",
"def QwNK(YKHO, Aofo):\n pass",
"def unpH(YKHO):\n return YKHO.query('*IDN?')",
"def Ilxn(YKHO, xDcj=False):\n if xDcj and (not YKHO._id_is_set):\n return YKHO._id_variable\n else:\n return YKHO._id",
"def maJs(YKHO, scn9):\n jtDf = ... | [
"0.8339004",
"0.71460474",
"0.70284474",
"0.70199704",
"0.69562894",
"0.6815753",
"0.6635705",
"0.66242754",
"0.66242754",
"0.65991294",
"0.65895516",
"0.65895516",
"0.65895516",
"0.65895516",
"0.65895516",
"0.65895516",
"0.65895516",
"0.65895516",
"0.65895516",
"0.65746546",
... | 0.81149143 | 1 |
Return the list of field names for records in this result. This method may carry out network activity. | def V_D6(YKHO):
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zJN_(YKHO):\n return YKHO.fieldNames()",
"def sPVJ(YKHO):\n raise NotImplementedError",
"def NSNj(YKHO, Bmg9=''):\n return [eHNT['name'] for eHNT in YKHO.record_types[Bmg9]['fields']]",
"def Bk82(YKHO):\n return [ETu_.name for ETu_ in YKHO.get_records()]",
"def eM8m(YKHO):\n CqJY = YKHO.... | [
"0.830261",
"0.8141999",
"0.78630996",
"0.7859372",
"0.7768596",
"0.7728672",
"0.77072495",
"0.7677898",
"0.7620177",
"0.7619245",
"0.7557969",
"0.75539905",
"0.75374347",
"0.74736756",
"0.7468283",
"0.74349993",
"0.7431695",
"0.7387964",
"0.73741704",
"0.72632104",
"0.723522... | 0.66846293 | 82 |
Return the User object if a user exists. | def LtCw(YKHO):
Aofo = YKHO._auth('mkelly@mozilla.com')
Ej5C(isinstance(Aofo, mv1M))
NaW5(Aofo.email, 'mkelly@mozilla.com') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TKWP(YKHO, **B2fa):\n if YKHO.has_user(**B2fa):\n return YKHO._get_or_create_user(YKHO._connection.response[0])\n bo34.warning('LDAP user lookup failed')\n return None",
"def TKWP(YKHO, uJjO):\n try:\n XnWo = YKHO.db.query(f532).filter(f532.user_id == uJjO).one()\n print('Use... | [
"0.7559545",
"0.7558363",
"0.748556",
"0.744591",
"0.74113923",
"0.74113923",
"0.74113923",
"0.7400947",
"0.7392541",
"0.7366829",
"0.73556817",
"0.7332483",
"0.7332483",
"0.7332483",
"0.73118216",
"0.7295929",
"0.7294951",
"0.72606325",
"0.7252468",
"0.72496504",
"0.72424555... | 0.0 | -1 |
Returns the XML element at the ``abbreviated_xpath``. | def NMoC(YKHO, r9y1):
YKHO._set_parser()
return YKHO._parser.get(r9y1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zmsg(laNn):\n return (Q71O.XPATH, laNn)",
"def tjdy(YKHO, laNn: str) -> GXnK.Element:\n fUxf = ZbWC.sub('[/]{2}', '//eb:', laNn)\n hRnz = YKHO.root_xml.find(fUxf, namespaces={'eb': 'http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd'})\n YKHO.assertor.assertIsNotNone(hRnz, f... | [
"0.6830965",
"0.6084016",
"0.60263497",
"0.5738501",
"0.56210524",
"0.5594416",
"0.55821735",
"0.5573585",
"0.5494193",
"0.54728836",
"0.5464649",
"0.5444653",
"0.5436836",
"0.5403017",
"0.5384872",
"0.5373768",
"0.53722304",
"0.5326357",
"0.5290658",
"0.5253632",
"0.5252406"... | 0.7752841 | 0 |
Returns the tags linked to the submission. | def dJ1p(YKHO):
return YKHO.xform_instance.tags | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dJ1p(YKHO):\n return jjFd(YKHO.config)",
"def Qwli(YKHO):\n return YKHO.get_job().get('tags', [])",
"def Qwli(YKHO):\n return YKHO._tags",
"def Qwli(YKHO):\n return YKHO._tags",
"def Qwli(YKHO):\n return YKHO.listafinal",
"def Qwli(YKHO):\n return YKHO.list",
"def dJ1p(YKHO):\n ... | [
"0.7818068",
"0.7518616",
"0.73483455",
"0.73483455",
"0.7337212",
"0.7303787",
"0.72893476",
"0.72747004",
"0.7260578",
"0.7207174",
"0.7207174",
"0.7207174",
"0.7207174",
"0.7207174",
"0.7207174",
"0.7207174",
"0.7207174",
"0.7207174",
"0.7207174",
"0.7207174",
"0.7207174",... | 0.66482496 | 74 |
Returns a layer that computes category prediction accuracy. | def T4jo():
def eHNT(Xdzc, x6A0):
N6Z1 = oLG2.argmax(Xdzc, axis=-1)
N8OZ.assert_same_shape(N6Z1, x6A0)
vTdo = N6Z1.size
smhU = oLG2.sum(oLG2.equal(N6Z1, x6A0))
return smhU / vTdo
return P8oC.Fn('CategoryAccuracy', eHNT) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bq4Y():\n\n def eHNT(Xdzc, x6A0, _mSQ):\n N6Z1 = oLG2.argmax(Xdzc, axis=-1)\n N8OZ.assert_same_shape(N6Z1, x6A0)\n NFaX = oLG2.equal(N6Z1, x6A0)\n return oLG2.sum(NFaX * _mSQ) / oLG2.sum(_mSQ)\n return P8oC.Fn('WeightedCategoryAccuracy', eHNT)",
"def bq4Y():\n\n def eHNT(... | [
"0.7126199",
"0.7106268",
"0.7023928",
"0.7023928",
"0.6703942",
"0.66247046",
"0.6569626",
"0.6557361",
"0.65567946",
"0.654121",
"0.65281874",
"0.65281874",
"0.6523772",
"0.65044856",
"0.64888144",
"0.64785045",
"0.64281327",
"0.6421559",
"0.6418113",
"0.6380009",
"0.636728... | 0.7553581 | 0 |
Returns a layer that computes a weighted category prediction accuracy. | def bq4Y():
def eHNT(Xdzc, x6A0, _mSQ):
N6Z1 = oLG2.argmax(Xdzc, axis=-1)
N8OZ.assert_same_shape(N6Z1, x6A0)
NFaX = oLG2.equal(N6Z1, x6A0)
return oLG2.sum(NFaX * _mSQ) / oLG2.sum(_mSQ)
return P8oC.Fn('WeightedCategoryAccuracy', eHNT) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bq4Y():\n\n def eHNT(Xdzc, x6A0, _mSQ):\n N6Z1 = oLG2.argmax(Xdzc, axis=-1)\n N8OZ.assert_same_shape(N6Z1, x6A0)\n NFaX = oLG2.equal(N6Z1, x6A0)\n return oLG2.sum(NFaX * _mSQ) / FtK2(_mSQ)\n return P8oC.Fn('WeightedCategoryAccuracy', eHNT)",
"def T4jo():\n\n def eHNT(Xdzc... | [
"0.77624077",
"0.6822504",
"0.6822504",
"0.6395498",
"0.6395498",
"0.6245135",
"0.6184922",
"0.6171144",
"0.61442536",
"0.61308855",
"0.6097124",
"0.60613316",
"0.6051023",
"0.6034603",
"0.60128963",
"0.599417",
"0.59937596",
"0.59937596",
"0.59937596",
"0.59937596",
"0.59868... | 0.78261936 | 0 |
Returns a layer that computes mean category prediction accuracy. | def zT28(AmnI=aM69.ArgMax()):
return BBLH.Serial(AmnI, kCev(), uG6p(), name='Accuracy', sublayers_to_print=[]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T4jo():\n\n def eHNT(Xdzc, x6A0):\n N6Z1 = oLG2.argmax(Xdzc, axis=-1)\n N8OZ.assert_same_shape(N6Z1, x6A0)\n vTdo = N6Z1.size\n smhU = oLG2.sum(oLG2.equal(N6Z1, x6A0))\n return smhU / vTdo\n return P8oC.Fn('CategoryAccuracy', eHNT)",
"def T4jo():\n\n def eHNT(Xdzc,... | [
"0.7165313",
"0.7165313",
"0.69141984",
"0.69006413",
"0.68825585",
"0.6780473",
"0.6704379",
"0.668738",
"0.668738",
"0.6674537",
"0.6672567",
"0.664129",
"0.66275823",
"0.66099066",
"0.6572926",
"0.6563339",
"0.6519153",
"0.6513752",
"0.6500286",
"0.64901406",
"0.6488895",
... | 0.6629783 | 13 |
Returns a layer that computes an L2like loss for one batch. | def Noe5():
def eHNT(Xdzc, x6A0, _mSQ):
"""Returns weighted sum-of-squared-errors for `model_output` vs. `targets`.
Args:
model_output: Output from one batch, typically a 2- or 3-d array of
float-valued elements.
targets: Tensor of same shape as `model_output` containing element-... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LJvU(YKHO):\n return ZylS.nn.l2_loss(YKHO.weight)",
"def Noe5():\n\n def eHNT(Xdzc, x6A0, _mSQ):\n N8OZ.assert_same_shape(Xdzc, x6A0)\n N8OZ.assert_same_shape(Xdzc, _mSQ)\n KVkj = _mSQ * (Xdzc - x6A0) ** 2\n return oLG2.sum(KVkj) / oLG2.sum(_mSQ)\n return P8oC.Fn('L2Loss'... | [
"0.76892453",
"0.737494",
"0.70609313",
"0.7045882",
"0.7036149",
"0.70169795",
"0.6832623",
"0.68131906",
"0.6749816",
"0.66992515",
"0.6691931",
"0.6687873",
"0.66798484",
"0.66235864",
"0.66003126",
"0.6576452",
"0.65749973",
"0.65701437",
"0.6564643",
"0.6558491",
"0.6558... | 0.6965084 | 6 |
Returns weighted sumofsquarederrors for `model_output` vs. `targets`. | def eHNT(Xdzc, x6A0, _mSQ):
N8OZ.assert_same_shape(Xdzc, x6A0)
N8OZ.assert_same_shape(x6A0, _mSQ)
KVkj = _mSQ * (Xdzc - x6A0) ** 2
return oLG2.sum(KVkj) / oLG2.sum(_mSQ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Wbxz(YKHO, o4Jx, x6A0):\n assert len(x6A0) == 1\n return {'error': vuvg.mean(vuvg.top_n_error(o4Jx[0], x6A0[0]))}",
"def Q_AL(PjQx, x6A0, _mSQ=None):\n if PjQx.ndim != x6A0.ndim:\n raise ValueError('Incorrect shapes. Got shape %s logits and %s targets' % (str(PjQx.shape), str(x6A0.shape)))\n ... | [
"0.6957534",
"0.663338",
"0.6625284",
"0.66062057",
"0.65267664",
"0.63853294",
"0.63758284",
"0.6340388",
"0.63153315",
"0.63133013",
"0.6242104",
"0.6208858",
"0.61591417",
"0.61432546",
"0.6139077",
"0.6129991",
"0.61267835",
"0.6110356",
"0.61031044",
"0.60944366",
"0.607... | 0.6642465 | 1 |
Returns a layer that computes total smooth L1 loss for one batch. | def _ZHI():
def y4tW(Xdzc, x6A0, _mSQ):
"""Returns weighted smooth L1 norm of `model_output - targets`.
The smooth L1 loss, also known as the Huber loss, is defined as:
.. math::
z_i =
\\begin{cases}
0.5 (x_i - y_i)^2, & \\text{if } |x_i - y_i| < 1 \\\\
|x_i - y_i| ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _ZHI():\n\n def eHNT(Xdzc, x6A0, _mSQ):\n N8OZ.assert_same_shape(Xdzc, x6A0)\n N8OZ.assert_same_shape(Xdzc, _mSQ)\n LAqh = oLG2.abs(Xdzc - x6A0)\n YEgP = oLG2.where(LAqh < 1, 0.5 * LAqh ** 2, LAqh - 0.5)\n rvWk = _mSQ * YEgP\n return oLG2.sum(rvWk) / oLG2.sum(_mSQ)\... | [
"0.74415964",
"0.700286",
"0.69752866",
"0.6920877",
"0.6843197",
"0.67675656",
"0.6722105",
"0.66821593",
"0.66507554",
"0.66460025",
"0.6609542",
"0.65289503",
"0.6469173",
"0.64631695",
"0.64568293",
"0.64432836",
"0.64313513",
"0.63855165",
"0.63592815",
"0.6348057",
"0.6... | 0.68783736 | 4 |
r"""Returns weighted smooth L1 norm of `model_output targets`. | def y4tW(Xdzc, x6A0, _mSQ):
N8OZ.assert_same_shape(Xdzc, x6A0)
N8OZ.assert_same_shape(x6A0, _mSQ)
LAqh = oLG2.abs(Xdzc - x6A0)
YEgP = oLG2.where(LAqh < 1, 0.5 * LAqh ** 2, LAqh - 0.5)
N8OZ.assert_same_shape(YEgP, _mSQ)
rvWk = _mSQ * YEgP
return oLG2.sum(rvWk) / oLG2.sum(_mSQ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _ZHI():\n\n def eHNT(Xdzc, x6A0, _mSQ):\n N8OZ.assert_same_shape(Xdzc, x6A0)\n N8OZ.assert_same_shape(Xdzc, _mSQ)\n LAqh = oLG2.abs(Xdzc - x6A0)\n YEgP = oLG2.where(LAqh < 1, 0.5 * LAqh ** 2, LAqh - 0.5)\n rvWk = _mSQ * YEgP\n return oLG2.sum(rvWk) / oLG2.sum(_mSQ)\... | [
"0.7805987",
"0.76588434",
"0.68551373",
"0.6553209",
"0.64957577",
"0.63491553",
"0.6141805",
"0.61352277",
"0.61130816",
"0.6058773",
"0.60081536",
"0.6000415",
"0.5978885",
"0.595662",
"0.5941896",
"0.589512",
"0.5887424",
"0.58751625",
"0.58746034",
"0.5872987",
"0.584058... | 0.84523284 | 0 |
Sum of predictiontarget cross entropies for binary classification. | def BlU5():
return BBLH.Serial(bMWC(), Yu2x(), name='BinaryCrossEntropySum', sublayers_to_print=[]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rUu3():\n LVAh = oyIN.random.rand(10, 5)\n Hxsy = oyIN.sum(LVAh, axis=1)\n LVAh = LVAh / Hxsy[:, None]\n _Iob = Bc4p.metrics.threshold_predictions(LVAh)\n assert _Iob.shape == (10,)\n assert oyIN.allclose(_Iob, oyIN.argmax(LVAh, axis=1))",
"def EYDd(Y8eF, aMgO):\n return bdPE.backend.mea... | [
"0.6423642",
"0.64172834",
"0.6409119",
"0.64045095",
"0.63800615",
"0.63786125",
"0.63761014",
"0.63724273",
"0.6316904",
"0.6247971",
"0.6229445",
"0.62238467",
"0.6214272",
"0.6200024",
"0.61910677",
"0.61906",
"0.61809534",
"0.61809534",
"0.61809534",
"0.61809534",
"0.617... | 0.61051923 | 36 |
Add a test Hyperion entity to hass. | async def _create_mock_entry(ajET: HomeAssistant) -> Jaru:
bTKY: Jaru = Jaru(entry_id=lS1s, domain=Sugg, unique_id=LcPb, title=ZpV2, data={'host': YrYC, 'port': xvnJ, 'instance': _Gp6})
bTKY.add_to_hass(ajET)
x0hE = L_iN()
with Po4F('homeassistant.components.hyperion.client.HyperionClient', return_value... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N51t(ajET: HomeAssistant, zrIJ: str, l87X: str, g2g3: str) -> None:\n ShR8 = Kc1Z(LcPb, _Gp6, l87X)\n g2g3 = g2g3.split('.')[1]\n wMDS = D4AW.async_get(ajET)\n wMDS.async_get_or_create(zrIJ, Sugg, ShR8, suggested_object_id=g2g3, disabled_by=None)",
"def bL9H(YKHO, LEXu):\n YKHO.entities.append... | [
"0.67578524",
"0.6395249",
"0.63629454",
"0.635426",
"0.63084537",
"0.63084537",
"0.6192644",
"0.61450857",
"0.6130308",
"0.61211383",
"0.6068128",
"0.60663396",
"0.59894854",
"0.59620404",
"0.59610826",
"0.5914039",
"0.5896797",
"0.5887075",
"0.5874631",
"0.58373934",
"0.581... | 0.0 | -1 |
Verify correct behaviour with a failed auth required call. | async def test_auth_static_token_auth_required_fail(ajET: HomeAssistant) -> None:
Aofo = await C6ws(ajET)
x0hE = L_iN()
x0hE.async_is_auth_required = zrRO(return_value=None)
with Po4F('homeassistant.components.hyperion.client.HyperionClient', return_value=x0hE):
Aofo = await gRP4(ajET, Aofo, use... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ylVm():\n return p_Hn('Invalid credentials')",
"def ylVm():\n return UAju.unauthorized('Invalid credentials')",
"def mVK5(YKHO):\n return YKHO._auth_failed",
"def pPqA(YKHO):\n try:\n Mkmy = G4JS.get(f'{YKHO.merged_config['global']['bb_api_base_endpoint']}/user', auth=(YKHO.login, YKHO... | [
"0.7286219",
"0.72534585",
"0.7247963",
"0.7216448",
"0.7204701",
"0.7087362",
"0.70728207",
"0.704143",
"0.70307153",
"0.70166975",
"0.6998072",
"0.6981977",
"0.69746774",
"0.6963043",
"0.69281137",
"0.69203264",
"0.6914292",
"0.69068986",
"0.68896407",
"0.68672186",
"0.6830... | 0.0 | -1 |
Verify correct behaviour when a token is granted by fails to authenticate. | async def test_auth_create_token_when_issued_token_fails(ajET: HomeAssistant) -> None:
Aofo = await C6ws(ajET)
x0hE = L_iN()
x0hE.async_is_auth_required = zrRO(return_value=gky5)
with Po4F('homeassistant.components.hyperion.client.HyperionClient', return_value=x0hE):
Aofo = await gRP4(ajET, Aofo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eaAc(YKHO):\n with YKHO.assertRaises(z_n9.errors.AuthenticationRequiredError):\n z_n9.helpers.authenticate(body={}, auth_token=True, client_token_name=z_n9.constants.API_CLIENT_TOKEN_NAME, server_token_name=z_n9.constants.API_SERVER_TOKEN_NAME)",
"def cC5O(YKHO):\n geh0 = YKHO.mock_auth_server.a... | [
"0.75613946",
"0.73887527",
"0.72790873",
"0.7177687",
"0.7147315",
"0.7146662",
"0.71327996",
"0.7082481",
"0.7081741",
"0.7050913",
"0.70422983",
"0.70391476",
"0.7037986",
"0.70244706",
"0.7002049",
"0.69936717",
"0.6989141",
"0.69628894",
"0.69585",
"0.6956673",
"0.695427... | 0.0 | -1 |
Verify correct behaviour when a token is successfully created. | async def test_auth_create_token_success(ajET: HomeAssistant) -> None:
Aofo = await C6ws(ajET)
x0hE = L_iN()
x0hE.async_is_auth_required = zrRO(return_value=gky5)
with Po4F('homeassistant.components.hyperion.client.HyperionClient', return_value=x0hE):
Aofo = await gRP4(ajET, Aofo, user_input=JG2... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z4dK(YKHO):\n pass",
"def dvx6(YKHO):\n pass",
"def HgTv(YKHO):\n pass",
"def Qw9R(YKHO):\n pass",
"def fNu_(YKHO):\n YKHO.assertEqual(YKHO.api.is_token_valid(YKHO.token), True)",
"def pio7(YKHO):\n YKHO.assertEqual(_J2v.objects.filter(user=YKHO.user).count(), 1)",
"def Jd9G(YKHO)... | [
"0.8162755",
"0.80001634",
"0.7562416",
"0.74582946",
"0.7445549",
"0.736932",
"0.72579056",
"0.72268414",
"0.7133813",
"0.7129444",
"0.71227455",
"0.7108048",
"0.7071627",
"0.7052667",
"0.7052667",
"0.69981176",
"0.69753855",
"0.6949892",
"0.69482404",
"0.6943167",
"0.691253... | 0.0 | -1 |
Verify correct behaviour when a token is successfully created but the login fails. | async def test_auth_create_token_success_but_login_fail(ajET: HomeAssistant) -> None:
Aofo = await C6ws(ajET)
x0hE = L_iN()
x0hE.async_is_auth_required = zrRO(return_value=gky5)
with Po4F('homeassistant.components.hyperion.client.HyperionClient', return_value=x0hE):
Aofo = await gRP4(ajET, Aofo,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GbSU(YKHO):\n nPrm = {'username': YKHO.username, 'password': YKHO.password}\n geh0 = YKHO.client.post(YKHO.get_token_url, nPrm, format='json')\n eOtH = _J2v.objects.filter(user__username=YKHO.username).first()\n YKHO.client.credentials(HTTP_AUTHORIZATION='Token ' + eOtH.key + 'fake')\n geh0 = YK... | [
"0.76122683",
"0.75382215",
"0.75046366",
"0.74353534",
"0.7421827",
"0.73894435",
"0.7386772",
"0.73863804",
"0.7372576",
"0.7342613",
"0.73151636",
"0.7299418",
"0.72540313",
"0.72457427",
"0.72324604",
"0.7232064",
"0.7221843",
"0.721097",
"0.720782",
"0.71802586",
"0.7172... | 0.0 | -1 |
Returns the string representation of the model | def gTzM(YKHO):
import simplejson as qQXR
if jKi7.PY2:
import sys
U3hF(sys)
sys.setdefaultencoding('utf-8')
return qQXR.dumps(yInN(YKHO), ensure_ascii=False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return YKHO.text",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\... | [
"0.86418265",
"0.85103965",
"0.7853324",
"0.77442306",
"0.7712258",
"0.76979405",
"0.765959",
"0.7637644",
"0.76218504",
"0.7607561",
"0.7606604",
"0.7606604",
"0.7606604",
"0.75990754",
"0.7585653",
"0.758149",
"0.7570811",
"0.7567585",
"0.75392604",
"0.75392604",
"0.7527967... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.8392633",
"0.8354901",
"0.82950056",
"0.8132309",
"0.81149805",
"0.8099986",
"0.809911",
"0.8097883",
"0.8097883",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8066694",
"0.80594814",
"0.805757",
... | 0.0 | -1 |
Make a sliding window iterator with padding. | def KnxT(OxJJ, LFlW, _tIi, dvgN=None, YPaw=1):
from itertools import islice, repeat, chain
from collections import deque
exwG = LFlW + _tIi + 1
oHE7 = chain(OxJJ, repeat(dvgN, _tIi))
UqER = deque(repeat(dvgN, LFlW), exwG)
UqER.extend(islice(oHE7, _tIi - YPaw + 1))
while True:
for YRb... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K3Td(LNo8, _Pej, S5jS=4, dMiG=4):\n for LVAh in Ni9Y(0, LNo8.shape[0], dMiG):\n for WKvO in Ni9Y(0, LNo8.shape[1], S5jS):\n yield (WKvO, LVAh, LNo8[LVAh:LVAh + _Pej[1], WKvO:WKvO + _Pej[0]])",
"def K3Td(Q6uT, XHb1):\n WhY1 = Hs6x.chain(iter(Q6uT), ' ' * XHb1)\n yMhW = XHb1 + 1\n ... | [
"0.72287714",
"0.70807284",
"0.7057412",
"0.7000602",
"0.6943494",
"0.6939738",
"0.69251186",
"0.69251186",
"0.69004685",
"0.68984264",
"0.6864076",
"0.6861687",
"0.68208855",
"0.67834073",
"0.6758825",
"0.67496073",
"0.6740093",
"0.67157876",
"0.67009985",
"0.6678775",
"0.66... | 0.77183485 | 0 |
Map x dimension of current plot to plotly's domain space. The bbox used to locate an axes object in mpl differs from the method used to locate axes in plotly. The mpl version locates each axes in the figure so that axes in a singleplot figure might have the bounds, [0.125, 0.125, 0.775, 0.775] (x0, y0, width, height), ... | def mhuT(da75, PgUz):
N5_k = [da75[0], da75[0] + da75[2]]
VbQA = PgUz[1] - PgUz[0]
nJ9F = (N5_k[0] - PgUz[0]) / VbQA
o4D3 = (N5_k[1] - PgUz[0]) / VbQA
return [nJ9F, o4D3] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A96a(da75, PgUz):\n N5_k = [da75[0], da75[0] + da75[2]]\n VbQA = PgUz[1] - PgUz[0]\n nJ9F = (N5_k[0] - PgUz[0]) / VbQA\n o4D3 = (N5_k[1] - PgUz[0]) / VbQA\n return [nJ9F, o4D3]",
"def UhOF(LZpg, jk7u):\n for jDK_ in LZpg.axes:\n jDK_.set_xlim(jk7u)",
"def U1qj(LZpg, Xk2t):\n imp... | [
"0.6645514",
"0.5901411",
"0.5791345",
"0.5599549",
"0.55774915",
"0.542566",
"0.54249424",
"0.5420781",
"0.5408232",
"0.5380681",
"0.53791267",
"0.5363793",
"0.5362978",
"0.53563905",
"0.53330564",
"0.532572",
"0.5314557",
"0.531107",
"0.5294506",
"0.52706957",
"0.5250628",
... | 0.69669974 | 0 |
Map y dimension of current plot to plotly's domain space. The bbox used to locate an axes object in mpl differs from the method used to locate axes in plotly. The mpl version locates each axes in the figure so that axes in a singleplot figure might have the bounds, [0.125, 0.125, 0.775, 0.775] (x0, y0, width, height), ... | def ElQR(da75, jDAN):
ig35 = [da75[1], da75[1] + da75[3]]
AsPo = jDAN[1] - jDAN[0]
nxyw = (ig35[0] - jDAN[0]) / AsPo
si3g = (ig35[1] - jDAN[0]) / AsPo
return [nxyw, si3g] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WwQ8(da75, jDAN):\n ig35 = [da75[1], da75[1] + da75[3]]\n AsPo = jDAN[1] - jDAN[0]\n nxyw = (ig35[0] - jDAN[0]) / AsPo\n si3g = (ig35[1] - jDAN[0]) / AsPo\n return [nxyw, si3g]",
"def Y7aN(LZpg, Xk2t):\n import pylab\n if LZpg is None:\n LZpg = pylab.gcf()\n rA_a = LZpg.get_axe... | [
"0.70113456",
"0.6217667",
"0.62165004",
"0.6068522",
"0.58988714",
"0.58948314",
"0.5812408",
"0.5795553",
"0.57537496",
"0.5714999",
"0.56658745",
"0.56600136",
"0.56589264",
"0.560665",
"0.55953544",
"0.55601203",
"0.5538897",
"0.5537431",
"0.5522081",
"0.54940504",
"0.547... | 0.728013 | 0 |
Return the entire axes space for figure. An axes object in mpl is specified by its relation to the figure where (0,0) corresponds to the bottomleft part of the figure and (1,1) corresponds to the topright. Margins exist in matplotlib because axes objects normally don't go to the edges of the figure. In plotly, the axes... | def Oo9d(LZpg):
wBZN, re6M, KDmU, rwK9 = ([], [], [], [])
for sIJ1 in LZpg.get_axes():
X7zS = sIJ1.get_position().bounds
wBZN.append(X7zS[0])
re6M.append(X7zS[0] + X7zS[2])
KDmU.append(X7zS[1])
rwK9.append(X7zS[1] + X7zS[3])
wBZN, KDmU, re6M, rwK9 = (min(wBZN), min(KD... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Oo9d(LZpg):\n wBZN, re6M, KDmU, rwK9 = ([], [], [], [])\n for sIJ1 in LZpg.get_axes():\n X7zS = sIJ1.get_position().bounds\n wBZN.append(X7zS[0])\n re6M.append(X7zS[0] + X7zS[2])\n KDmU.append(X7zS[1])\n rwK9.append(X7zS[1] + X7zS[3])\n wBZN, KDmU, re6M, rwK9 = (min(... | [
"0.6788588",
"0.6421693",
"0.63616914",
"0.59965986",
"0.592144",
"0.5888514",
"0.58579296",
"0.57850176",
"0.5759919",
"0.5744984",
"0.5744984",
"0.5744984",
"0.5744984",
"0.5744984",
"0.57357806",
"0.5725286",
"0.56934905",
"0.56879705",
"0.5673042",
"0.5672054",
"0.5620318... | 0.67242676 | 1 |
Fixes innapropriate keys and values in plotly data list. This function calls repair_key() and repair_val() for each entry in DATA_KEY_REPAIRS and DATA_VAL_REPAIRS. It assumes that the keys in these dictionaries are tuples with paths to known possible errors. | def zwsJ(nPrm):
for Mjw9 in nPrm:
for AmLd, yhqV in gSW2.items():
KGYy(Mjw9, AmLd, yhqV)
for AmLd, Tkm8 in Hilz.items():
vepa(Mjw9, AmLd, Tkm8) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def t18n(LAOT):\n for AmLd, yhqV in RkYM.items():\n KGYy(LAOT, AmLd, yhqV)\n for AmLd, Tkm8 in Y19L.items():\n vepa(LAOT, AmLd, Tkm8)",
"def vepa(Csk6, AmLd, Tkm8):\n try:\n for mLGw, H5ew in enumerate(AmLd[:-1]):\n Csk6 = Csk6[H5ew]\n if isinstance(Csk6, list)... | [
"0.6984537",
"0.60458267",
"0.5787096",
"0.5778185",
"0.57022405",
"0.56993073",
"0.56932807",
"0.5661978",
"0.5651287",
"0.56473815",
"0.5596746",
"0.5472259",
"0.5450437",
"0.5446119",
"0.54262817",
"0.537704",
"0.5315687",
"0.5285658",
"0.5250562",
"0.52426374",
"0.5235392... | 0.771871 | 0 |
Gets the data_source_id of this ReqBodyDataSources. | def uMO2(YKHO) -> str:
return YKHO._data_source_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uMO2(YKHO) -> str:\n return qe4Y.get(YKHO, 'data_source_id')",
"def uMO2(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'data_source_id')",
"def Nwxp(YKHO):\n return YKHO._source_dataset_id",
"def uMO2(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'data_source_id')",
"def uMO2... | [
"0.783279",
"0.7734539",
"0.7468619",
"0.7462681",
"0.7462681",
"0.7189546",
"0.6985878",
"0.6913308",
"0.6894652",
"0.6830795",
"0.681552",
"0.6742727",
"0.6742727",
"0.6742727",
"0.6742727",
"0.6734065",
"0.6734065",
"0.6692887",
"0.6652077",
"0.66257834",
"0.644242",
"0.... | 0.7870218 | 0 |
Gets the data_source_type of this ReqBodyDataSources. | def HL2k(YKHO) -> str:
return YKHO._data_source_type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zEt5(YKHO):\n return YKHO._source_type",
"def zEt5(YKHO) -> h8nf[qe4Y.Input[uLKX[str, 'SourceType']]]:\n return qe4Y.get(YKHO, 'source_type')",
"def zEt5(YKHO) -> str:\n return qe4Y.get(YKHO, 'source_type')",
"def zEt5(YKHO) -> str:\n return qe4Y.get(YKHO, 'source_type')",
"def zEt5(YKHO) -... | [
"0.715144",
"0.70900047",
"0.70275974",
"0.70275974",
"0.70275974",
"0.6931178",
"0.6931178",
"0.6931178",
"0.68437725",
"0.6699147",
"0.6699147",
"0.6699147",
"0.6699147",
"0.6644964",
"0.6644964",
"0.6644964",
"0.6644964",
"0.6644964",
"0.6644964",
"0.6644964",
"0.6644964",... | 0.7936094 | 0 |
Returns the loss averaged over the batch (first dimension of x) and L2 norm squared of the perturbation | def KsZl(YKHO, ZgWB):
Ep8u = ZgWB[YKHO.layers[0]].size(0)
y9Vw = ht2j.zeros((Ep8u, len(YKHO.layers)), device=YKHO.device)
for vC9B, gEmA in enumerate(YKHO.layers):
sWfS = ZgWB[gEmA].view(Ep8u, 1, -1)
pImw = ((sWfS - YKHO.guide_reps[gEmA]) ** 2).sum(2)
AOlJ = YKHO.thres - pImw
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GT2U(YKHO, NArs, Wc9F):\n EcVT, (VUzz, j4l8), yzQ0 = Wc9F\n zseD, RUIi = YKHO.apply_fun(NArs, EcVT)\n qET2 = oyIN.sum(((zseD - VUzz) ** 2).squeeze() * yzQ0)\n return qET2",
"def N77f(YKHO, WKvO, LVAh):\n N77f = oyIN.mean(oyIN.maximum(0, 1 - LVAh * (oyIN.dot(YKHO.w, oyIN.transpose(WKvO)) + YKHO... | [
"0.7130906",
"0.7050622",
"0.6967127",
"0.6943755",
"0.6817073",
"0.67962104",
"0.6791292",
"0.6786291",
"0.6786291",
"0.67514575",
"0.67512906",
"0.667904",
"0.6674249",
"0.6663607",
"0.66487527",
"0.6628061",
"0.66079456",
"0.65990484",
"0.6579929",
"0.6575916",
"0.65561706... | 0.6376993 | 37 |
calculate the IoU of two bbox | def m4sr(MErA, ZnGJ):
nJ9F, nxyw, bnum, mimv = (MErA[0], MErA[1], MErA[2] - MErA[0], MErA[3] - MErA[1])
o4D3, si3g, dtS8, Uk87 = (ZnGJ[0], ZnGJ[1], ZnGJ[2] - ZnGJ[0], ZnGJ[3] - ZnGJ[1])
JRC0, IA3S = (oyIN.minimum(nJ9F, o4D3), oyIN.maximum(MErA[2], ZnGJ[2]))
TVTK = bnum + dtS8 - (IA3S - JRC0)
LChT, d... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _xWy(MErA: tuple, ZnGJ: tuple):\n iQin: int\n b65I: int\n fP3a, NJ_p = sorted([MErA, ZnGJ], key=lambda WKvO: WKvO[0])\n XPRt, cBgo = sorted([MErA, ZnGJ], key=lambda WKvO: WKvO[1])\n bzU2 = (MErA[2] - MErA[0]) * (MErA[3] - MErA[1])\n Eq1k = (ZnGJ[2] - ZnGJ[0]) * (ZnGJ[3] - ZnGJ[1])\n if fP3... | [
"0.84949994",
"0.83515704",
"0.83372563",
"0.8152763",
"0.8096737",
"0.800115",
"0.79987216",
"0.79419446",
"0.79306126",
"0.79270095",
"0.7871497",
"0.7834811",
"0.78280544",
"0.7824067",
"0.78109473",
"0.7711686",
"0.76943934",
"0.768737",
"0.76654094",
"0.7644214",
"0.7643... | 0.8625877 | 0 |
Tests that `send_event` is hooked to `transaction.on_commit`. This is important, because we don't want to end up holding locks on message rows for too long if the event queue runs into a problem. | def a7ao(YKHO) -> None:
olzS = YKHO.example_user('hamlet')
YKHO.send_stream_message(olzS, 'Denmark')
Ol8d = YKHO.get_last_message()
with YKHO.capture_send_event_calls(expected_num_events=1):
with TMAJ.patch('zerver.tornado.django_api.queue_json_publish') as r8hN:
r8hN.side_effect = A... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rgTK(YKHO):\n pass",
"def tEgF(YKHO):\n\n @qxR0('foo')\n @Kh6j.atomic\n def nlHZ() -> None:\n w2B8 = Kh6j.get_connection()\n assert w2B8.in_atomic_block\n with _znt.captureOnCommitCallbacks() as oL5I:\n nlHZ()\n assert len(oL5I) == 1\n assert oL5I[0].func == nqEK._re... | [
"0.7055363",
"0.6619392",
"0.65462667",
"0.63442963",
"0.6189311",
"0.61328423",
"0.60694987",
"0.5986075",
"0.5955994",
"0.5947076",
"0.5947076",
"0.59037685",
"0.5842759",
"0.57508224",
"0.57361674",
"0.57346815",
"0.57284886",
"0.5705752",
"0.5667751",
"0.5660654",
"0.5659... | 0.73627543 | 0 |
Takes a Polygon QgsFeature and creates an array of [lat,lng] values. | def iQYY(RDhP):
j5tF = RDhP.geometry().asPolygon()[0]
LTIa = [XtLK(AU8u) for AU8u in j5tF]
if j5tF[0] == j5tF[-1]:
del LTIa[-1]
return LTIa | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SwBa(YKHO, qmrg: str) -> x1iM[x1iM[float]]:\n w5gl = YKHO.__hex_boundary(qmrg)\n pfPi = [Oa1e.toList() for Oa1e in w5gl]\n pfPi.append(pfPi[0])\n return pfPi",
"def ZXr0(j5tF):\n WKvO = []\n LVAh = []\n for YRbF in j5tF:\n WKvO.append(YRbF[0])\n LVAh.append(YRbF[1])\n BQ... | [
"0.69360656",
"0.6365707",
"0.63465667",
"0.6333117",
"0.6310593",
"0.61866075",
"0.61632967",
"0.6145599",
"0.6123786",
"0.6111325",
"0.61027074",
"0.61027074",
"0.6097854",
"0.60582125",
"0.6020985",
"0.60201204",
"0.6004784",
"0.5990871",
"0.59895825",
"0.59612626",
"0.595... | 0.7322988 | 0 |
Gets the QgsPointXY from the array at the specified index. | def CHbs(qw7D, d6pt=0):
return Vd_M(_AjS(qw7D[d6pt + 1]), _AjS(qw7D[d6pt + 0])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ryo5(YKHO, d6pt):\n return YKHO.points[d6pt]",
"def Ryo5(YKHO, d6pt):\n return YKHO.points[d6pt]",
"def OP2O(YKHO, d6pt):\n return YKHO._coords[d6pt]",
"def OP2O(YKHO, d6pt: ty.Union[int, slice]) -> Yrvv.Union['Point', oyIN.number]:\n nPrm = YKHO._data[d6pt]\n if nPrm.size > 1:\n re... | [
"0.7333912",
"0.7333912",
"0.6904639",
"0.65696484",
"0.65224224",
"0.63990974",
"0.6337169",
"0.6286755",
"0.62623584",
"0.6230391",
"0.6226105",
"0.6220386",
"0.62150574",
"0.6159884",
"0.61587524",
"0.6108378",
"0.6098126",
"0.60346323",
"0.6033659",
"0.59852797",
"0.59762... | 0.76436955 | 0 |
A dictionary which defines the nature of LAMMPS bonds that are to be drawn between atoms. To set the values, use the function `define_bonds`. | def _T9S(YKHO):
return YKHO.input.bond_dict | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Rl_P():\n ee7O = 1250\n TVsq = 0.47\n uEQd = 0.37\n qIA_ = nScl.md.bond.harmonic(name='mybond')\n for WKvO, LVAh in Hs6x.product(T2Jx, repeat=2):\n if 'Na' == WKvO and 'Na' == LVAh:\n qIA_.bond_coeff.set('{}-{}'.format(WKvO, LVAh), k=ee7O, r0=uEQd)\n else:\n q... | [
"0.69355613",
"0.6732894",
"0.67246586",
"0.6549883",
"0.65326476",
"0.6531646",
"0.63888526",
"0.6322305",
"0.62620807",
"0.6258737",
"0.62571454",
"0.6245648",
"0.6229873",
"0.6163584",
"0.6149602",
"0.61416566",
"0.60517234",
"0.60349023",
"0.59877706",
"0.5946519",
"0.591... | 0.67398536 | 1 |
Takes the path to the data folder as downloaded from Kaggle, then merges the masks and restructures the folders. | def _aiL(i0XC, n80H, Tait=False, p9bx=True, mEID=False, qowf=False):
for Kp4Y in Hy7s.listdir(i0XC):
if Hy7s.path.isdir(Hy7s.path.join(i0XC, Kp4Y)):
MMN6(n80H)
kD9H = Hy7s.path.join(n80H, Kp4Y)
fd39 = Hy7s.path.join(kD9H, 'images')
qRdB = Hy7s.path.join(kD9H, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DTLD(YKHO):\n if not YKHO.loadFolderName:\n return\n a0WL = sorted(Hy7s.listdir(YKHO.loadFolderName))\n N_sa = [nUeQ for nUeQ in a0WL if nUeQ[-3:] in ['png', 'jpg']]\n YLlh = len(N_sa)\n VXjJ = oyIN.zeros([768, 1024, YLlh])\n for YRbF in range(YLlh):\n ACIe = QrM1.imread(YKHO.lo... | [
"0.66698784",
"0.660805",
"0.64935154",
"0.6460756",
"0.6459562",
"0.63471985",
"0.6270678",
"0.62062263",
"0.60560083",
"0.60180324",
"0.60158515",
"0.600014",
"0.595024",
"0.5932584",
"0.5925893",
"0.5891737",
"0.5877367",
"0.58720684",
"0.5867903",
"0.58418757",
"0.5841483... | 0.63763714 | 5 |
Checks if pieces at locations 1 and 2 are opponents. If either location is unoccupied, returns false. | def Qq8Q(YKHO, yKcO, Os4s):
if YKHO.tiles[yKcO].IsOccupied() or YKHO.tiles[Os4s].IsOccupied():
return False
jCRz = ZfdO = None
if YKHO.tiles[yKcO].state == ujrs.RED_PIECE or YKHO.tiles[yKcO].state == Lp9S.RED_KING:
jCRz = 0
if YKHO.tiles[yKcO].state == ujrs.WHITE_PIECE or YKHO.tiles[yKcO... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VtS_(YKHO):\n return YKHO.middle_tower == [] and YKHO.right_tower == []",
"def mK0k(oLdq: GameState, dQgj: Position) -> bool:\n pass",
"def Gz8N(YKHO):\n JbSN = set()\n for mrj1 in YKHO.pieces:\n if (mrj1.x, mrj1.y) in JbSN:\n return True\n else:\n JbSN.add((... | [
"0.673989",
"0.6639795",
"0.66185194",
"0.6562675",
"0.6505297",
"0.64918315",
"0.6468898",
"0.64013076",
"0.63964623",
"0.63893676",
"0.63893676",
"0.63893676",
"0.63893676",
"0.63893676",
"0.6357564",
"0.6355129",
"0.63066924",
"0.6304389",
"0.63043296",
"0.63042694",
"0.62... | 0.7321903 | 0 |
Returns True if tile1 is to the right of tile2 | def Aicm(YKHO, Elif):
if YKHO.col == 'A':
aIUM = mvUn.A
if YKHO.col == 'B':
aIUM = mvUn.B
if YKHO.col == 'C':
aIUM = mvUn.C
if YKHO.col == 'D':
aIUM = mvUn.D
if YKHO.col == 'E':
aIUM = mvUn.E
if YKHO.col == 'F':
aIUM = mvUn.F
if Elif.col == 'A'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OC7g(YKHO, BEAo, rKWV):\n return tuple(sorted((BEAo, rKWV))) not in YKHO._not_walls or not YKHO.is_correct_tile(BEAo) or (not YKHO.is_correct_tile(rKWV))",
"def AStW(YKHO, ifCF, RdIS):\n aAnP = YKHO.square(ifCF)\n MLt3 = YKHO.square(RdIS)\n if isinstance(aAnP.piece, QNcZ):\n if aAnP.piece.... | [
"0.7089148",
"0.6774959",
"0.67364794",
"0.6602017",
"0.65235305",
"0.65220827",
"0.6471373",
"0.64579433",
"0.64479816",
"0.63816255",
"0.63593006",
"0.63501924",
"0.6349894",
"0.63407576",
"0.6302759",
"0.6297946",
"0.6297502",
"0.6275604",
"0.6275604",
"0.6275604",
"0.6262... | 0.0 | -1 |
Converts byte or unicode string to bytes type assuming UTF8 encoding | def gTzM(KCHu):
if KCHu is None:
return None
if isinstance(KCHu, str):
return KCHu
if Lpna and isinstance(KCHu, bytes):
return KCHu.decode('utf-8')
elif not Lpna and isinstance(KCHu, QMSQ):
return KCHu.encode('utf-8')
raise ValueError('Cannot convert {0} to str'.forma... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i_l1(KCHu):\n return KCHu.encode('utf8')",
"def P2hG(vIwR):\n return vIwR.encode('utf-8')",
"def qSz5(vIwR):\n if isinstance(vIwR, jKi7.text_type):\n return vIwR.encode('utf8')\n return vIwR",
"def ntSl(vIwR):\n assert isinstance(vIwR, exCv)\n if HwRy.version_info[0] >= 3:\n ... | [
"0.8157479",
"0.80918646",
"0.8079867",
"0.7984233",
"0.79462457",
"0.7940774",
"0.79301345",
"0.79280233",
"0.7839498",
"0.7821887",
"0.7800902",
"0.77937216",
"0.77824545",
"0.7754898",
"0.77540314",
"0.77526194",
"0.7750029",
"0.7746377",
"0.77386254",
"0.77289087",
"0.772... | 0.0 | -1 |
Loads a locally saved model. | def wCNe(xtX7, YSLL):
from sparknlp.internal import _MPNetLoader
JuU6 = _MPNetLoader(xtX7, YSLL._jsparkSession)._java_obj
return c9eM(java_model=JuU6) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uyMl():\n return",
"def uyMl(YKHO):\n pass",
"def uyMl(YKHO):\n pass",
"def uyMl(YKHO):\n pass",
"def uyMl(YKHO):\n pass",
"def O5RJ(YKHO):\n pmON = YKHO._get_model_path()\n with open(pmON, 'rb') as eHNT:\n C3ST = t2lc.load(eHNT)\n YKHO._set_model(model=C3ST)",
"def u... | [
"0.8255114",
"0.81000626",
"0.81000626",
"0.81000626",
"0.81000626",
"0.8057009",
"0.80430806",
"0.80430806",
"0.79241186",
"0.7847079",
"0.7840023",
"0.7840023",
"0.7840023",
"0.78390765",
"0.7836718",
"0.7832013",
"0.781831",
"0.7752836",
"0.77391756",
"0.7733037",
"0.77136... | 0.0 | -1 |
Downloads and loads a pretrained model. | def mL4f(mWFP='all_mpnet_base_v2', DuqQ='en', dchF=None):
from sparknlp.pretrained import ResourceDownloader
return ResourceDownloader.downloadModel(c9eM, mWFP, DuqQ, dchF) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uyMl():\n with open('trained_model.pickle', 'rb') as pan_:\n ad8h = t2lc.load(pan_)\n return ad8h",
"def uyMl():\n with open('trained_model.pickle', 'rb') as pan_:\n ad8h = t2lc.load(pan_)\n return ad8h",
"def uyMl():\n with open('trained_model.pickle', 'rb') as pan_:\n ... | [
"0.7849941",
"0.7849941",
"0.7849941",
"0.7845828",
"0.78380066",
"0.7781437",
"0.77604467",
"0.7752677",
"0.77171576",
"0.76899135",
"0.7611223",
"0.75655067",
"0.7561931",
"0.7557851",
"0.755028",
"0.75387275",
"0.753481",
"0.75112265",
"0.74552846",
"0.7454875",
"0.7451096... | 0.0 | -1 |
Number of model layers available. | def CLda(YKHO):
return YKHO.model.config.num_hidden_layers + 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CLda(YKHO):\n return len(YKHO.layers)",
"def CLda(YKHO):\n UxQk = YKHO._num_layers()\n return UxQk",
"def Nqc2(YKHO):\n return YKHO.depth.size",
"def WAZ4(C3ST):\n return tXd4(C3ST, 1)",
"def hUTg(YKHO):\n return YKHO._n_layers",
"def hUTg(YKHO):\n return YKHO._n_layers",
"def ... | [
"0.86728936",
"0.8583135",
"0.85317945",
"0.84490395",
"0.8412447",
"0.8412447",
"0.83799887",
"0.8377983",
"0.83369863",
"0.82913756",
"0.79574925",
"0.73599774",
"0.72616124",
"0.7226575",
"0.7086736",
"0.70034355",
"0.69316226",
"0.6913365",
"0.6895823",
"0.6871694",
"0.68... | 0.8150223 | 10 |
Function that loads a pretrained encoder from Hugging Face. | def NZUw(Emd4, v8sj: str) -> UYOu:
return QC5v(v8sj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EEPg(p4m8):\n VXjJ = vUb_.load_image_file(p4m8)\n oUSw = vUb_.face_locations(VXjJ, model='hog')\n if len(oUSw) == 0:\n print('WARNING:using CNN!')\n oUSw = vUb_.face_locations(VXjJ, model='cnn')\n xeAb = vUb_.face_encodings(VXjJ, oUSw)\n if len(xeAb) > 0:\n return xeAb[0]\n ... | [
"0.6385633",
"0.6285942",
"0.6274095",
"0.6058087",
"0.6006722",
"0.5968602",
"0.5848477",
"0.5837732",
"0.5818181",
"0.5776788",
"0.57676154",
"0.57467496",
"0.56914735",
"0.5684664",
"0.56603676",
"0.56485534",
"0.56281275",
"0.5625828",
"0.56119066",
"0.56072456",
"0.56015... | 0.6243038 | 3 |
Frezees the embedding layer. | def rhnv(YKHO) -> None:
for xqoZ in YKHO.model.embeddings.parameters():
xqoZ.requires_grad = False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DDI8(YKHO):\n if YKHO._lossy_layer is not None:\n YKHO._lossy_layer.destroy()\n YKHO._lossy_layer = None",
"def xSHO(YKHO):\n YKHO.layers = []\n H2v2 = 0\n asQz = 0\n kafR = L_7l\n raise nUPZ",
"def SiRx(YKHO):\n YKHO.embedding_weights = YKHO.conv_weights = YKHO.norm_weights ... | [
"0.69511455",
"0.6598989",
"0.65936786",
"0.6568034",
"0.64754033",
"0.64219546",
"0.6359979",
"0.63494855",
"0.63432604",
"0.63342196",
"0.63336456",
"0.6326905",
"0.62709147",
"0.62350756",
"0.62320393",
"0.62119573",
"0.6211635",
"0.6192412",
"0.6184502",
"0.61815846",
"0.... | 0.0 | -1 |
Calculates chamfer distance between two point clouds. | def RSfc(XP5J: torch.Tensor, vexM: torch.Tensor) -> (ht2j.Tensor, ht2j.Tensor):
qHkD = XP5J.transpose(1, 2).contiguous()
NDcw = vexM.transpose(1, 2).contiguous()
f0bQ, dW3j, bGrB, bGrB = _naz()(qHkD, NDcw)
return (f0bQ, dW3j) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PslN(M5P2, F1ag, OpMG=True):\n Xo51 = plLA(M5P2)\n iplT, zXa_ = Xo51.query(F1ag)\n if OpMG:\n xJub = oyIN.mean(oyIN.square(iplT))\n else:\n xJub = oyIN.mean(iplT)\n NOVC = plLA(F1ag)\n rGuo, mA8x = NOVC.query(M5P2)\n if OpMG:\n sviZ = oyIN.mean(oyIN.square(rGuo))\n ... | [
"0.7478682",
"0.7469602",
"0.71406496",
"0.7139149",
"0.71113926",
"0.7096465",
"0.7080463",
"0.7061654",
"0.7049036",
"0.7045645",
"0.7045645",
"0.6977891",
"0.6936128",
"0.69319284",
"0.69109225",
"0.69017446",
"0.688732",
"0.68808347",
"0.687584",
"0.687415",
"0.6872674",
... | 0.68937 | 16 |
Adds a point cloud to a noise tensor that can have a smaller dimension. The noise tensor `z` with `dim_z` channels will be added to the first `dim_z` channels of the point cloud `p`. | def JAqC(epBp: torch.Tensor, XP5J: torch.Tensor):
qOQL = epBp.shape[1]
s77x = XP5J.shape[1]
if qOQL <= s77x:
return ht2j.cat([epBp + XP5J[:, :qOQL, :], XP5J[:, qOQL:, :]], dim=1)
else:
raise RuntimeError('dim_z must be less or equal to dim_p. ' + f'got `dim_z` = {qOQL} > {s77x} = `dim_p`... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GupH(AcNK, epBp):\n AcNK[:, 2] += epBp\n return AcNK",
"def r5hI(XP5J: np.ndarray, ARTs: float):\n if ARTs > 0:\n M6ip = oyIN.random.normal(1, ARTs, XP5J.size)\n XP5J = XP5J * M6ip\n XP5J = oyIN.clip(XP5J, 0.0, 1.0)\n return XP5J",
"def ARTs(input: torch.Tensor, ARTs: float... | [
"0.61341494",
"0.59473675",
"0.57863694",
"0.5713877",
"0.5711763",
"0.5608907",
"0.5596243",
"0.55839807",
"0.5538373",
"0.542398",
"0.5418562",
"0.54163396",
"0.5414114",
"0.5384936",
"0.53822446",
"0.5367821",
"0.5345178",
"0.53425956",
"0.52970225",
"0.52808595",
"0.52778... | 0.61433417 | 0 |
Normalize grouped into the half unit sphere with equal absolute value of max and min in each axis. | def ZPvA(qDyV: torch.Tensor, DkWr: bool=True, NXpY: bool=True, NKcE: str='minmax', SGf8: float=1e-06) -> ht2j.Tensor:
vtZE = qDyV
if DkWr:
if NKcE == 'minmax':
uOSZ = (ht2j.min(qDyV, dim=-1, keepdim=True)[0] + ht2j.max(qDyV, dim=-1, keepdim=True)[0]) / 2.0
vtZE = vtZE - uOSZ
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jnV4(YKHO):\n NUHp = oyIN.max(oyIN.median(YKHO.templates, axis=1))\n YKHO.waveform /= NUHp\n YKHO.filtered /= NUHp\n YKHO.templates /= NUHp",
"def kwsU(YKHO, Byr5=1):\n r8hN = YKHO.mag()\n UH90 = r8hN / Byr5\n YKHO.div(UH90, UH90, UH90)",
"def kwsU(YKHO, Byr5=1):\n r8hN = YKHO.mag()... | [
"0.6817913",
"0.6695049",
"0.6673771",
"0.6645894",
"0.6589562",
"0.6581948",
"0.6533855",
"0.65243125",
"0.65187263",
"0.6516704",
"0.64786834",
"0.64291227",
"0.64255",
"0.64254934",
"0.6423518",
"0.64054954",
"0.6386643",
"0.6383998",
"0.6381758",
"0.6375996",
"0.6348528",... | 0.0 | -1 |
Solves a matrix equation Ax = b where A is a dbanded matrix. | def FzQ_(k0lF, Fg_i, Csk6):
exwG = len(Fg_i)
WKvO = Fg_i
WKvO[0] = Fg_i[0] / k0lF[0, 0]
for G1Hx in range(1, exwG):
_n3k = max(0, G1Hx - Csk6)
WKvO[G1Hx] = (Fg_i[G1Hx] - k0lF[G1Hx, _n3k:G1Hx].dot(WKvO[_n3k:G1Hx])) / k0lF[G1Hx, G1Hx]
return WKvO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eGi5(k0lF, Fg_i):\n if k0lF.dtype == object:\n MZcr = FCE9.Matrix(k0lF)\n jEIN = FCE9.Matrix(Fg_i)\n if jEIN.shape[0] == 1:\n jEIN = jEIN.T\n if MZcr.is_lower:\n JXjR = FCE9.zeros(*Fg_i.shape)\n JXjR = MZcr.lower_triangular_solve(jEIN)\n el... | [
"0.7047443",
"0.6932088",
"0.6890569",
"0.6857465",
"0.67736673",
"0.67509717",
"0.6671583",
"0.66424525",
"0.65905565",
"0.6580889",
"0.6512021",
"0.650861",
"0.64702046",
"0.64222825",
"0.6386922",
"0.637271",
"0.6348309",
"0.6270232",
"0.62203413",
"0.62149954",
"0.6185985... | 0.64063853 | 14 |
Solves a matrix equation Ax = b where A is a dbanded matrix. | def n1IO(k0lF, Fg_i, Csk6):
WKvO = Fg_i
exwG = len(Fg_i)
for G1Hx in range(exwG - 1):
WKvO[G1Hx] = Fg_i[G1Hx] / k0lF[G1Hx, G1Hx]
cZbT = min(exwG - 1, G1Hx + Csk6)
Fg_i[G1Hx + 1:cZbT + 1] = Fg_i[G1Hx + 1:cZbT + 1] - k0lF[G1Hx + 1:cZbT + 1, G1Hx] * WKvO[G1Hx]
WKvO[exwG - 1] = Fg_i[... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eGi5(k0lF, Fg_i):\n if k0lF.dtype == object:\n MZcr = FCE9.Matrix(k0lF)\n jEIN = FCE9.Matrix(Fg_i)\n if jEIN.shape[0] == 1:\n jEIN = jEIN.T\n if MZcr.is_lower:\n JXjR = FCE9.zeros(*Fg_i.shape)\n JXjR = MZcr.lower_triangular_solve(jEIN)\n el... | [
"0.7047875",
"0.69329476",
"0.6891573",
"0.685728",
"0.6773676",
"0.6751152",
"0.66729295",
"0.66425735",
"0.65918124",
"0.65807647",
"0.6510952",
"0.6507492",
"0.6469689",
"0.64236754",
"0.640602",
"0.638539",
"0.6374188",
"0.63487285",
"0.627131",
"0.6218725",
"0.6215387",
... | 0.57941407 | 52 |
Convert a camelCaseString to its snake_case_equivalent. | def Ee9n(mWFP):
j93S = ZbWC.sub('(.)([A-Z][a-z]+)', '\\1_\\2', mWFP)
return ZbWC.sub('([a-z0-9])([A-Z])', '\\1_\\2', j93S).lower() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AQcz(Emd4, vIwR):\n return finE('(.)([A-Z])', '\\\\1_\\\\2', vIwR).lower()",
"def lFYK(vIwR: str) -> str:\n j93S = ZbWC.sub('(.)([A-Z][a-z]+)', '\\\\1_\\\\2', vIwR)\n return ZbWC.sub('([a-z0-9])([A-Z])', '\\\\1_\\\\2', j93S).lower()",
"def uGin(vIwR):\n jQqC = ZbWC.sub('(.)([A-Z][a-z]+)', '\\\\... | [
"0.83666646",
"0.8327992",
"0.8204261",
"0.8003689",
"0.80028355",
"0.7994761",
"0.79085743",
"0.7903224",
"0.78869927",
"0.787656",
"0.7857452",
"0.7789345",
"0.77662265",
"0.77612394",
"0.76853096",
"0.76381713",
"0.7629238",
"0.76216257",
"0.76188534",
"0.75920177",
"0.755... | 0.70879173 | 51 |
Map a stride scalar to the stride array for tf.nn.conv2d. | def f0xt(YKHO, _0fC):
return [1, _0fC, _0fC, 1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xC4s(WKvO, XcU5):\n return ZylS.nn.conv2d(WKvO, XcU5, strides=[1, 2, 2, 1], padding='VALID')",
"def b_zE(WKvO, XcU5, _0fC=1):\n return ZylS.nn.conv2d(WKvO, XcU5, strides=[1, _0fC, _0fC, 1], padding='SAME')",
"def yIp6(WKvO, yphq, _0fC):\n KUnM = ZylS.Variable(ZylS.truncated_normal(yphq, mean=0.0, ... | [
"0.7512572",
"0.7101686",
"0.706725",
"0.7002145",
"0.68273586",
"0.6805172",
"0.6683299",
"0.6610532",
"0.65979624",
"0.65949416",
"0.6546506",
"0.65226084",
"0.65226084",
"0.64762145",
"0.64762145",
"0.64762145",
"0.64762145",
"0.64762145",
"0.64762145",
"0.64723057",
"0.64... | 0.63348204 | 38 |
Perform a PATCH request on a resource item | def Po4F(YKHO, _eu6, XoLR, NArs={}):
MOPg = YKHO._headers.copy()
MOPg['If-Match'] = XoLR
try:
Mkmy = G4JS.patch(YKHO._url + '/{}/{}'.format(YKHO._resource_name, _eu6), headers=MOPg, json=NArs)
except G4JS.exceptions.RequestException as e:
print('[-] RequestException: Failed to connect to... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l_lP(YKHO, QePW, _sei=None):\n return oGir({'http_method': 'PATCH'})",
"def l_lP(YKHO, QePW, _sei=None):\n return oGir({'http_method': 'PATCH'})",
"def l_lP(YKHO, QePW, _sei=None):\n return oGir({'http_method': 'PATCH'})",
"def l_lP(YKHO, QePW, _sei=None):\n return oGir({'http_method': 'PATCH... | [
"0.74659824",
"0.7435266",
"0.7418913",
"0.7412838",
"0.7412838",
"0.7412838",
"0.7412838",
"0.7412838",
"0.7412838",
"0.7411871",
"0.73952365",
"0.73898304",
"0.7318277",
"0.7318277",
"0.7318277",
"0.7318277",
"0.7314577",
"0.72819555",
"0.72428167",
"0.72327334",
"0.723245"... | 0.6659122 | 68 |
Returns the diagonal length of a parallelogram | def WyUJ(YKHO):
return round(epAf.sqrt(epAf.pow(YKHO.big_side, 2) + epAf.pow(YKHO.small_side, 2) - 2 * YKHO.big_side * YKHO.small_side * epAf.cos(120))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oDKx(YKHO):\n Fg_i = YKHO.polydata().GetBounds()\n return oyIN.sqrt((Fg_i[1] - Fg_i[0]) ** 2 + (Fg_i[3] - Fg_i[2]) ** 2 + (Fg_i[5] - Fg_i[4]) ** 2)",
"def IjIm(Mkmy):\n from math import sqrt\n return sqrt(u54L(Mkmy) ** 2 + TVTK(Mkmy) ** 2)",
"def Hq2A(YKHO):\n return YKHO.length * PZyS(3)",
... | [
"0.67572",
"0.67222214",
"0.6462121",
"0.6303778",
"0.6302333",
"0.6193611",
"0.6142353",
"0.60646486",
"0.6041282",
"0.59957284",
"0.59916633",
"0.5983163",
"0.59469146",
"0.5924869",
"0.5922428",
"0.5899763",
"0.5899056",
"0.5888373",
"0.5879668",
"0.5873726",
"0.5829738",
... | 0.58210534 | 21 |
Close the handle to the archive. | def DDI8(YKHO):
if 'w' in YKHO.mode:
YKHO.add_data(YKHO.metadata_file_name, IyFz.JSON.dumps(YKHO.metadata, pretty=True))
YKHO._tar_h.close() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DDI8(YKHO):\n YKHO.archive_file.close()",
"def DDI8(YKHO):\n if YKHO.format == 'zip':\n YKHO.archive.close()\n elif YKHO.format == 'tar-bzip2' or YKHO.format == 'tar-gzip':\n YKHO.archive.close()\n YKHO.closed = True",
"def HuIG(YKHO, nVrR):\n try:\n oZwM.RARCloseArchive... | [
"0.8229114",
"0.77873385",
"0.7647317",
"0.739403",
"0.7340876",
"0.7306357",
"0.7299598",
"0.7297708",
"0.72877157",
"0.72159815",
"0.72062725",
"0.7194369",
"0.71860445",
"0.71762186",
"0.71497047",
"0.7148968",
"0.71336275",
"0.71059525",
"0.7033034",
"0.699173",
"0.698009... | 0.72347534 | 9 |
Get user who posted the link | def CBIr(YKHO) -> 'User':
from news.models.user import User
if 'user' not in YKHO._relations:
YKHO._relations['user'] = User.by_id(YKHO.user_id)
return YKHO._relations['user'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CBIr(YKHO):\n return YKHO.url.split(':')[1][2:]",
"def QZnA(YKHO):\n return YKHO._user_dict['link']",
"def QZnA(YKHO):\n return YKHO._user_dict['link']",
"def CBIr(YKHO):\n return YKHO.view.request.user",
"def TKWP(YKHO):\n return YKHO.request.user",
"def CBIr(YKHO):\n return YKHO.s... | [
"0.6746677",
"0.66438925",
"0.6610908",
"0.65882856",
"0.6568226",
"0.64891005",
"0.6453555",
"0.6453555",
"0.6453555",
"0.6453555",
"0.6453555",
"0.6453555",
"0.6453555",
"0.6453555",
"0.6453555",
"0.6453555",
"0.6453555",
"0.6453555",
"0.6453555",
"0.6453555",
"0.6453555",
... | 0.0 | -1 |
Board has invalid dimensions. | def Skr0(YKHO):
iBIi = ['XXOOX', 'OXXO', 'OOOO', 'OXO', 'OXOXX']
YKHO.assert_result(iBIi, False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JkFW(YKHO):\n kiHo = oyIN.sum([len(Ty9i) for bGrB, Ty9i in YKHO.getInvalidGroups().items()])\n return kiHo == 0",
"def lC6v(YKHO, iBIi):\n if any((VmPb not in (KAvf, EcVT, LTX_) for VmPb in Hs6x.chain.from_iterable(iBIi))):\n raise ValueError('Initial cells must only contain integers {}, {}, ... | [
"0.7686018",
"0.75972927",
"0.74894637",
"0.7210185",
"0.717897",
"0.6976292",
"0.68298304",
"0.67857635",
"0.6726759",
"0.6726065",
"0.6715874",
"0.6659462",
"0.6644355",
"0.6632283",
"0.6609457",
"0.6568083",
"0.65562606",
"0.65502495",
"0.6525331",
"0.6512303",
"0.65053886... | 0.8193224 | 0 |
Returns 'created by' field if present | def tC0c(YKHO):
return YKHO.data.get('created by', None) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tC0c(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'created_by')",
"def tC0c(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'created_by')",
"def tC0c(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'created_by')",
"def tC0c(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'created_by')",
"def tC0c(YKHO) ... | [
"0.81371695",
"0.81371695",
"0.81371695",
"0.81371695",
"0.81371695",
"0.81371695",
"0.81371695",
"0.81371695",
"0.81371695",
"0.81371695",
"0.81371695",
"0.81371695",
"0.81371695",
"0.81371695",
"0.81371695",
"0.81371695",
"0.81371695",
"0.81371695",
"0.81371695",
"0.81371695"... | 0.8126373 | 24 |
This unit test checks that whether the record of taking quiz updated successfully. | def rvo6(YKHO):
YKHO.test_jwt_authentication()
nPrm = {'quiz': YKHO.quiz.id, 'total_point': 70}
geh0 = YKHO.client.put(YKHO.url_update, data=nPrm)
YKHO.assertEqual(200, geh0.status_code) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SusY(YKHO):\n pass",
"def U7Rb(YKHO):\n YKHO.client.login(username=YKHO.user.username, password=YKHO.user_plaintext_pass)\n d5dG = FXGE.timezone('UTC')\n geh0 = YKHO.client.post(gxEw('yaksh:edit_quiz', kwargs={'course_id': YKHO.course.id, 'quiz_id': YKHO.quiz.id}), data={'start_date_time': '2016-... | [
"0.821492",
"0.78167087",
"0.7743529",
"0.77003086",
"0.754402",
"0.7373494",
"0.73342425",
"0.73342425",
"0.7316613",
"0.7282441",
"0.7236212",
"0.7228128",
"0.721264",
"0.70709115",
"0.70460653",
"0.70136225",
"0.7002016",
"0.699798",
"0.69625527",
"0.6945977",
"0.6944752",... | 0.78218967 | 1 |
Checks that whether the question belongs to the quiz. | def daGM(YKHO):
nPrm = {'taking_quiz': YKHO.taking_quiz.id, 'question': YKHO.question2.id, 'answer': YKHO.answer.id}
YKHO.test_jwt_authentication()
geh0 = YKHO.client.post(YKHO.url_answer, data=nPrm)
YKHO.assertEqual(403, geh0.status_code) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZV0v(YKHO, JVBp):\n if not YKHO.questions:\n return False\n for vUa7 in YKHO.questions:\n if vUa7.get_question_id() == JVBp:\n return True\n return False",
"def seac(YKHO, bAls: Question) -> bool:\n _j5U = bAls.id\n if _j5U not in YKHO._questions_answered:\n ret... | [
"0.7655603",
"0.74082476",
"0.69621074",
"0.6824963",
"0.67012954",
"0.6559893",
"0.6508116",
"0.647276",
"0.64114934",
"0.6395197",
"0.6365787",
"0.62569445",
"0.6224271",
"0.61731815",
"0.6151497",
"0.6119878",
"0.60998905",
"0.604815",
"0.6043679",
"0.5986641",
"0.59751266... | 0.56403327 | 63 |
Generates a oneuse only link for resetting password and sends to the user. | def xkzz(YKHO, Xczh=None, BE9d='registration/password_reset_subject.txt', zccf='registration/password_reset_email.html', HNpj=False, jVr7=SVG3, sIWq=None, QePW=None):
from django.core.mail import send_mail
D3lj = YKHO.cleaned_data['email']
iOuf = egNl()._default_manager.filter(email__iexact=D3lj, is_active=... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wkJG(YKHO):\n D3lj = YKHO.form.get('email', '').strip()\n CBIr = YKHO.store.get_user_by_email(D3lj)\n if not CBIr:\n return YKHO.fail('email address unknown to me')\n if YKHO.store.get_otk(CBIr['name']):\n U34r = {'otk': YKHO.store.get_otk(CBIr['name']), 'url': YKHO.config.url, 'admin... | [
"0.74787843",
"0.73631245",
"0.7303364",
"0.72768277",
"0.71547514",
"0.70494956",
"0.7025392",
"0.70068115",
"0.6984801",
"0.69476223",
"0.69447213",
"0.69432425",
"0.6931467",
"0.69198465",
"0.69006675",
"0.6890828",
"0.68844724",
"0.68830895",
"0.687767",
"0.683706",
"0.68... | 0.0 | -1 |
Returns a tuple (value1, value2, value3) | def KJKK(k5Qo):
jzdc = open(k5Qo, 'r')
Nqlg = jzdc.readlines()
jtyf = Nqlg[-1].split('\t')
Z6H0 = jtyf[0]
KAct = jtyf[-1].strip('\n')
nUaF = []
HbS_ = [[] for YRbF in list(KAct)]
for vC9B in Nqlg:
hkxX = vC9B.split('\t')
nUaF.append((hkxX[1], hkxX[2]))
KAct = hkxX... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hzqw(YKHO):\n return (YKHO.attribute, YKHO.value)",
"def rKdn(BWXx):\n try:\n if len(BWXx) == 1:\n return [BWXx[0], BWXx[0], BWXx[0]]\n elif len(BWXx) == 3:\n return [BWXx[0], BWXx[1], BWXx[2]]\n else:\n raise ValueError('Value must be length 1 or 3... | [
"0.7524348",
"0.70677954",
"0.70086247",
"0.68192506",
"0.6756532",
"0.67362356",
"0.67274815",
"0.6688175",
"0.66477764",
"0.6646992",
"0.6601571",
"0.6601571",
"0.6601571",
"0.66002846",
"0.6572964",
"0.6516365",
"0.6509859",
"0.6430448",
"0.6427262",
"0.64125514",
"0.63943... | 0.0 | -1 |
Returns a list of primes with 'nprimes' elements. Generate primes by creating a list and trying to divide every odd number by members of the list generated so far. This is not very efficient! | def DbLj(M912):
assert type(M912) == type(1), "'nprimes' must be an integer."
rPed = [2]
mLGw = 3
UHFx = 1
while UHFx < M912:
ffYW = True
for hFiK in rPed:
if mLGw % hFiK == 0:
ffYW = False
break
if ffYW:
rPed.append(mLG... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rPed(exwG):\n if exwG <= 1:\n return []\n EcVT = [YRbF for YRbF in range(3, exwG + 1) if YRbF % 2 != 0]\n V6IE = [2]\n C5jQ = PZyS(exwG)\n while len(EcVT) > 0 and EcVT[0] <= C5jQ:\n XP5J = EcVT[0]\n V6IE.append(XP5J)\n EcVT = [jzdc for jzdc in EcVT if jzdc % XP5J != 0... | [
"0.8357105",
"0.8272767",
"0.8217384",
"0.8153777",
"0.81075764",
"0.8054917",
"0.8051619",
"0.8035489",
"0.80189",
"0.80152476",
"0.8009265",
"0.80082864",
"0.8007237",
"0.7994547",
"0.79666924",
"0.7964702",
"0.7955583",
"0.7955583",
"0.7955583",
"0.79436356",
"0.7943553",
... | 0.80440885 | 7 |
Returns a list of primes with 'nprimes' elements. Performance isn't great. | def zwxM(M912):
assert type(M912) == type(1), "'nprimes' must be an integer."
rPed = [2]
UHFx = 1
mLGw = 3
while UHFx < M912:
if _f0Y(mLGw):
rPed.append(mLGw)
UHFx += 1
mLGw += 2
return rPed | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rPed(exwG):\n YRbF = 3\n rPed = [2]\n while len(rPed) < exwG:\n if T1qg(YRbF):\n rPed.append(YRbF)\n YRbF += 2\n return rPed",
"def ehqz(exwG):\n return [WKvO for WKvO in DghZ().primerange(2, ffYW(exwG))]",
"def rPed(exwG):\n return list(ffBE(exwG))",
"def REba(... | [
"0.84143823",
"0.83976257",
"0.83965296",
"0.83492637",
"0.8342306",
"0.8149739",
"0.8109006",
"0.8072985",
"0.80657107",
"0.80169046",
"0.7998038",
"0.79973394",
"0.7973759",
"0.795004",
"0.7936039",
"0.7909558",
"0.7904669",
"0.7904669",
"0.7904669",
"0.7904669",
"0.7903624... | 0.788754 | 23 |
Return the sum of all the digits in 'digits'. | def UZHZ(BHGE):
if type(BHGE) == type(''):
KCHu = BHGE
else:
KCHu = str(BHGE)
wjRY = 0
for Z9rn in KCHu:
wjRY += int(Z9rn)
return wjRY | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Pdpn(exwG):\n return sum(map(int, list(str(exwG))))",
"def CIne(exwG):\n return sum(map(int, str(exwG)))",
"def QFPj(WKvO):\n qlmr = str(WKvO)\n HzTH = list(qlmr)\n hZ0j = 0\n for mLGw in HzTH:\n hZ0j += int(mLGw)\n return hZ0j",
"def PvCa(mLGw):\n sum([int(Ko6S) for Ko6S i... | [
"0.79596096",
"0.7677003",
"0.7586397",
"0.7536497",
"0.7501315",
"0.7483632",
"0.7457952",
"0.7400688",
"0.7345923",
"0.7335679",
"0.73185885",
"0.7293912",
"0.72621346",
"0.7235746",
"0.72188896",
"0.7189313",
"0.7186307",
"0.7184261",
"0.7174834",
"0.71598905",
"0.7138191"... | 0.8459781 | 0 |
Returns the nth pentagonal number. | def oBTK(exwG):
return int(exwG * (3 * exwG - 1) / 2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lEC5(exwG):\n return exwG * (3 * exwG - 1) >> 1",
"def nEwE(exwG):\n return exwG * (3 * exwG - 1) // 2",
"def Lh5v(YRbF):\n return YRbF * (3 * YRbF - 1) / 2",
"def nlKF(exwG):\n return int(exwG * (5 * exwG - 3) / 2)",
"def fUDH():\n hnFq = set()\n YRbF = 1\n while True:\n YR... | [
"0.86101407",
"0.82616794",
"0.7507063",
"0.6963774",
"0.6905702",
"0.6849645",
"0.6790255",
"0.6762183",
"0.66601366",
"0.6654565",
"0.66405934",
"0.6600906",
"0.65886056",
"0.65886056",
"0.6561522",
"0.6490606",
"0.6411733",
"0.62375855",
"0.6224765",
"0.6169938",
"0.612225... | 0.86122316 | 0 |
Returns the area of a triangle given its 3 vertices in cartesian coordinates. | def a1HB(aNZO, xQ3W, bcP8, xEOs, UV8M, vHO5):
return abs(aNZO * (xEOs - vHO5) + bcP8 * (vHO5 - xQ3W) + UV8M * (xQ3W - xEOs)) / 2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E8vm(H5cr, y5bX, **B2fa):\n _19w = H5cr.vertices\n hQHm = _19w[y5bX[0]]\n jlSq = _19w[y5bX[1]]\n bUZ8 = _19w[y5bX[2]]\n ezWE = [oyIN.asarray((hQHm, jlSq, bUZ8))]\n return oyIN.sqrt(oyIN.asscalar(KtCs.triangles.area(ezWE)))",
"def a1HB(hQHm, jlSq, bUZ8):\n jzdc = jlSq[0] - hQHm[0]\n Fg... | [
"0.79711425",
"0.79439485",
"0.77930146",
"0.76659226",
"0.7653657",
"0.76137054",
"0.7595379",
"0.74985945",
"0.74985945",
"0.7487483",
"0.74747795",
"0.74637926",
"0.74010503",
"0.7385379",
"0.73550105",
"0.73541766",
"0.7343044",
"0.73404336",
"0.7316066",
"0.7308624",
"0.... | 0.78539914 | 2 |
r""" Simply checks if the model stored on the Hub or locally is an adapter model or not, return the path the the adapter config file if it is, None otherwise. | def Ze9H(tsEk: str, XkTm: str=None, eD3G: str=None, eOtH: Optional[str]=None, SZsr: Optional[str]=None) -> h8nf[str]:
BJQw = None
if tsEk is None:
return None
elif Hy7s.path.isdir(tsEk):
omFN = Hy7s.listdir(tsEk)
if kcAp in omFN:
BJQw = Hy7s.path.join(tsEk, kcAp)
else... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MeGT(YKHO, mWFP):\n if mWFP in YKHO._available_models:\n return OyQC(XwzC, YKHO._available_models[mWFP]['config'])\n else:\n return None",
"def PNMY(YKHO, QePW):\n if iVAC.Application.objects.filter(client_id=YKHO._get_client_id(QePW)).exists():\n return YKHO.dot_adapter\n el... | [
"0.61275166",
"0.569173",
"0.5619023",
"0.56073874",
"0.5532704",
"0.5442683",
"0.540877",
"0.54039466",
"0.52820987",
"0.5258004",
"0.52560544",
"0.5255674",
"0.5220079",
"0.52164686",
"0.5216295",
"0.52135724",
"0.52118635",
"0.5200224",
"0.5189048",
"0.51686776",
"0.513874... | 0.5526057 | 5 |
ID of the VPN customer gateway. | def dxQd(YKHO) -> h8nf[str]:
return qe4Y.get(YKHO, 'customer_gateway_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tWZp(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'vpn_gateway_id')",
"def iczE(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'gateway_id')",
"def iczE(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'gateway_id')",
"def iczE(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'gateway_... | [
"0.8199208",
"0.7967843",
"0.7967843",
"0.7967843",
"0.78299654",
"0.78299654",
"0.78299654",
"0.776946",
"0.7692196",
"0.7526855",
"0.69078535",
"0.6847842",
"0.6847842",
"0.6847842",
"0.6847842",
"0.6847842",
"0.6847842",
"0.6683867",
"0.6664302",
"0.65040946",
"0.6449622",... | 0.8067865 | 1 |
ID of the VPN gateway. | def tWZp(YKHO) -> h8nf[str]:
return qe4Y.get(YKHO, 'vpn_gateway_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iczE(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'gateway_id')",
"def iczE(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'gateway_id')",
"def iczE(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'gateway_id')",
"def iczE(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'gatewa... | [
"0.8342783",
"0.8342783",
"0.8342783",
"0.8193478",
"0.8193478",
"0.8193478",
"0.8033497",
"0.80186015",
"0.7525473",
"0.7323994",
"0.7323994",
"0.7323994",
"0.7323994",
"0.7323994",
"0.7323994",
"0.71831304",
"0.71752656",
"0.70028585",
"0.6995594",
"0.69717014",
"0.68609405... | 0.8601202 | 0 |
Normalises words to lowercase and stems and lemmatizes it. | def kwsU(GIN8):
GIN8 = GIN8.lower()
GIN8 = LkXt.lemmatize(GIN8)
return GIN8 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NkkI(GIN8):\n GIN8 = GIN8.lower()\n GIN8 = v_nw(GIN8)\n return GIN8",
"def kwsU(GIN8):\n GIN8 = GIN8.lower()\n GIN8 = mkhU.stem_word(GIN8)\n GIN8 = LkXt.lemmatize(GIN8)\n return GIN8",
"def kwsU(GIN8):\n GIN8 = GIN8.lower()\n GIN8 = mkhU.stem_word(GIN8)\n GIN8 = LkXt.lemmatize... | [
"0.8035472",
"0.79862684",
"0.7971538",
"0.7971538",
"0.7775982",
"0.7575146",
"0.7498265",
"0.74234706",
"0.7333393",
"0.72242004",
"0.7040927",
"0.70312184",
"0.70140386",
"0.7012369",
"0.69629586",
"0.6941491",
"0.69281995",
"0.692604",
"0.69207793",
"0.6916563",
"0.689103... | 0.80836946 | 0 |
Get the centroid of the vehicles | def IBzD(YKHO):
e6ux = []
for FMwV in YKHO.action['vehicles']:
e6ux.append(FMwV.current_pos)
e6ux = oyIN.mean(oyIN.asarray(e6ux), axis=0)
return e6ux | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IBzD(YKHO):\n e6ux = []\n for FMwV in YKHO.vehicles:\n e6ux.append(FMwV.current_pos)\n e6ux = oyIN.mean(oyIN.asarray(e6ux), axis=0)\n return e6ux[0:2]",
"def e6ux(YKHO):\n return LBWB.centroid(YKHO)",
"def eEap(YKHO):\n return oyIN.mean(YKHO.vertices_, axis=0)",
"def e6ux(YKHO):\... | [
"0.8424275",
"0.7650614",
"0.76172936",
"0.7578186",
"0.7569884",
"0.75606287",
"0.75142705",
"0.74723536",
"0.74377453",
"0.74311334",
"0.74311334",
"0.7348773",
"0.7348419",
"0.73442966",
"0.73410577",
"0.7313019",
"0.7293336",
"0.7291623",
"0.72048306",
"0.71978027",
"0.71... | 0.8338364 | 1 |
Compute Q(state, action) for multiple actions If statetransformation can be reused for several actions, it might be faster to compute Qvalues for all actions at once, rather than through multiple calls to estimate(). | def v9cA(YKHO, QTBn, xASv):
raise NotImplementedError('batch_estimate not implemented') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jrYK(YKHO, QTBn, XeOP):\n CUqN = YKHO.mdp.getTransitionStatesAndProbs(QTBn, XeOP)\n T8ck = 0\n for [KCXm, OZkM] in CUqN:\n rb2p = OZkM * (YKHO.mdp.getReward(QTBn, XeOP, KCXm) + YKHO.discount * YKHO.getValue(KCXm))\n T8ck += rb2p\n return T8ck\n '*** YOUR CODE HERE ***'",
"def A9o... | [
"0.7755347",
"0.7663051",
"0.7625272",
"0.75526303",
"0.7475614",
"0.73902005",
"0.7385668",
"0.7382069",
"0.7323514",
"0.73113453",
"0.7282105",
"0.7274236",
"0.7266001",
"0.7226411",
"0.72129667",
"0.7186181",
"0.718286",
"0.7151899",
"0.714542",
"0.7121887",
"0.7120843",
... | 0.0 | -1 |
Make a copy of a `Sequential` instance. NOTE A copy of a `Sequential` instance always performs a deep copy of the underlying layers, so the new instance will not share weights with the original but it will start with the same weights. | def jth9(YKHO, **B2fa) -> 'Sequential':
lDtL = dict(YKHO._saved_kwargs, **B2fa)
if 'layers' not in lDtL:
rhGJ = [jth9.deepcopy(vC9B) for vC9B in YKHO.layers]
lDtL['layers'] = rhGJ
return type(YKHO)(**lDtL) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ddSu(VlDb):\n wJ4v = ZylS.keras.models.clone_model(VlDb)\n for zXzD, i3ak in zip(VlDb.trainable_variables, wJ4v.trainable_variables):\n i3ak.assign(zXzD)\n return wJ4v",
"def jth9(YKHO):\n HqmB = wOed(YKHO.graph, 0, 0, YKHO.strategy)\n HqmB.roads = jth9.deepcopy(YKHO.roads)\n HqmB.pe... | [
"0.70633924",
"0.68804264",
"0.6866551",
"0.68339473",
"0.67852014",
"0.67679524",
"0.6758438",
"0.67362714",
"0.673285",
"0.6648087",
"0.6482737",
"0.64601594",
"0.64330995",
"0.63862705",
"0.63836557",
"0.63498133",
"0.63493633",
"0.6342572",
"0.62850344",
"0.62679803",
"0.... | 0.84520876 | 0 |
>>> is_iterable([]) True >>> is_iterable(()) True >>> is_iterable([x for x in range(10)]) True >>> is_iterable((1, 2, 3)) True >>> g = (x for x in range(10)) >>> is_iterable(g) True >>> is_iterable("abc") False >>> is_iterable(0) False >>> is_iterable({}) False | def GfZ5(YEnM):
return isinstance(YEnM, (list, tuple, SnBA.GeneratorType)) or (not isinstance(YEnM, (int, str, dict)) and bool(getattr(YEnM, 'next', False))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qEgM():\n assert aese.is_iterable('test') is True\n assert aese.is_iterable([1, 2, 3]) is True\n assert aese.is_iterable({}) is True\n assert aese.is_iterable(0) is False",
"def GfZ5(OxJJ):\n try:\n iter(OxJJ)\n return True\n except TypeError:\n return False",
"def qE... | [
"0.81284386",
"0.8088705",
"0.785661",
"0.77994186",
"0.770153",
"0.77001816",
"0.76877207",
"0.7675755",
"0.76558584",
"0.76034546",
"0.76034546",
"0.75560135",
"0.755241",
"0.7513894",
"0.74519527",
"0.74427336",
"0.7442304",
"0.7438928",
"0.74350315",
"0.7429891",
"0.74279... | 0.7379635 | 23 |
Try to get file path from given stream `stream`. | def RJu0(wOb_):
jAOY = getattr(wOb_, 'name', None)
if jAOY is not None:
jAOY = Hy7s.path.abspath(jAOY)
return jAOY | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RJu0(aD4j: typing.IO, KXjL: bool=False) -> laHg.Optional[str]:\n if not BugE(aD4j) and (not KXjL):\n raise ValueError('Given object does not look a file/file-like object: %r' % aD4j)\n pmON = getattr(aD4j, 'name', None)\n if pmON is not None:\n try:\n return str(oAb3.Path(pmON... | [
"0.73599714",
"0.71347165",
"0.5969369",
"0.58374393",
"0.5832717",
"0.5701495",
"0.5657048",
"0.5612856",
"0.55972993",
"0.55575216",
"0.5528573",
"0.5502545",
"0.54286426",
"0.5425321",
"0.5400542",
"0.5348116",
"0.533093",
"0.5314006",
"0.5293329",
"0.52760303",
"0.5275037... | 0.8679185 | 0 |
Initialize Class BigQueryClient with project_id, dataset_id, table_id and client_ID | def FIMM(YKHO, zOZf, ekCf=None):
YKHO.__project_id = ekCf
YKHO.__dataset = x3i3
YKHO.__table = TQJD
YKHO.__job = W7aK
YKHO.__client = YKHO.__set_client_credential(zOZf, CPmB, 'bigquery', 'v2') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, Vs2w):\n YKHO.bigquery_client = Vs2w",
"def FIMM(YKHO, JWce=None, Vt89=None):\n YKHO._bq_client = slhS.Client(project=JWce, credentials=Vt89)",
"def FIMM(YKHO):\n if 'GOOGLE_APPLICATION_CREDENTIALS' in Hy7s.environ:\n if not Hy7s.environ.get('GOOGLE_APPLICATION_CREDENTIALS'):\n ... | [
"0.8305103",
"0.8221367",
"0.7953749",
"0.7948484",
"0.77108383",
"0.7448427",
"0.73133415",
"0.7285937",
"0.71568745",
"0.7136264",
"0.7098012",
"0.70712864",
"0.7013111",
"0.68545973",
"0.6827788",
"0.66289365",
"0.6455685",
"0.64550436",
"0.64459985",
"0.63956755",
"0.6368... | 0.7910369 | 4 |
Student object instance constructor | def FIMM(YKHO, c9ua, zp3f, ZJe_):
YKHO.first_name = c9ua
YKHO.last_name = zp3f
YKHO.age = ZJe_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, qIxc):\n G8qb.__init__(YKHO, qIxc)\n YKHO.major = qIxc['major']\n YKHO.gpa = qIxc['gpa']",
"def FIMM(YKHO, g3Gt):\n YKHO.__dict__.update(g3Gt.__dict__)",
"def FIMM(YKHO, g3Gt):\n YKHO.__dict__.update(g3Gt.__dict__)",
"def FIMM(YKHO, VLXD: list[Student]):\n YKHO.students = VLX... | [
"0.7725736",
"0.7637519",
"0.7637519",
"0.7604063",
"0.75654054",
"0.7515152",
"0.74870634",
"0.73755515",
"0.7193643",
"0.7149854",
"0.7007526",
"0.6999749",
"0.6977768",
"0.6977768",
"0.69263285",
"0.691584",
"0.68959373",
"0.68834877",
"0.6844202",
"0.6811901",
"0.68100643... | 0.64860576 | 44 |
Checks that input is a float in bounds | def pKYk(idDS, *V22M, **X7zS):
try:
h7aq = X7zS['ubound']
except KeyError:
h7aq = None
try:
PgWN = X7zS['lbound']
except KeyError:
PgWN = None
SRYB = input(idDS)
if SRYB == None:
SRYB = pKYk(idDS, *V22M, lbound=PgWN, ubound=h7aq)
try:
SRYB = fl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CM_3(xqoZ, nEeK, ekgN):\n try:\n xqoZ = float(xqoZ)\n except ValueError:\n raise ValueError('Parameter is not float or similar')\n else:\n if nEeK is None:\n nEeK = float('-inf')\n if ekgN is None:\n ekgN = float('inf')\n if not nEeK <= xqoZ <= ... | [
"0.73620236",
"0.7238268",
"0.719818",
"0.7155458",
"0.71440244",
"0.70247567",
"0.7009043",
"0.6988657",
"0.6980905",
"0.6969235",
"0.6958798",
"0.69309527",
"0.69295996",
"0.69233465",
"0.68993825",
"0.6893908",
"0.6859675",
"0.6836508",
"0.6835537",
"0.6834578",
"0.6810401... | 0.7026298 | 5 |
Decodes a message given as a byteslike object by using the sessionspecific BGP message decoder. Returns a `bgpkit.message.Message` object. | def rXBt(YKHO, X9Zn: bytes) -> Q0XW.message.Message:
return YKHO.decoder.decode_message(X9Zn) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def x8I_(YKHO, Ol8d):\n return YKHO.decoder.decode(Ol8d)",
"def rXBt(sMC1):\n hkWs = sMC1.split()\n Ol8d = LuKW(frame_id=int(hkWs[1]), message_name=hkWs[2].replace(':', ''), frame_length=int(hkWs[3]), node=hkWs[4])\n return Ol8d",
"def rXBt(YKHO, Ol8d):\n if len(Ol8d) <= 5:\n raise MQjB('... | [
"0.726094",
"0.70646393",
"0.70516765",
"0.67717344",
"0.67645544",
"0.67442983",
"0.6733393",
"0.6648221",
"0.6624545",
"0.66220325",
"0.652001",
"0.65063477",
"0.6355264",
"0.6326719",
"0.62692684",
"0.62133795",
"0.6209298",
"0.6191627",
"0.61423236",
"0.61367667",
"0.6132... | 0.798557 | 0 |
Method to calculate and return the firms average premium for all currently underwritten contracts. | def tZkM(YKHO, QlOP: int) -> float:
go_w = 0
V3oS = 0
for hLKG in YKHO.underwritten_contracts:
if hLKG.category == QlOP:
V3oS += hLKG.value
KB2J = hLKG.periodized_premium * hLKG.runtime
go_w += KB2J
if V3oS == 0:
return 0
return go_w * 1.0 / V3oS | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WUEZ(YKHO):\n pEed = kLxY.objects.filter(receipt=YKHO).annotate(total=FYrf.F('price') - FYrf.F('discount') * FYrf.F('price')).aggregate(target=FYrf.Avg('total'))\n return pEed['target'] or 0",
"def d0dd(YKHO):\n wjRY = sum(YKHO.rewardsList)\n UHFx = len(YKHO.rewardsList) + 1.0\n return wjRY / ... | [
"0.6474751",
"0.64185697",
"0.64005",
"0.6399102",
"0.6314239",
"0.6304779",
"0.6299985",
"0.61938995",
"0.61527336",
"0.6146004",
"0.6144575",
"0.611968",
"0.61008614",
"0.6082517",
"0.6082296",
"0.60797215",
"0.6078164",
"0.6078164",
"0.60688704",
"0.60478866",
"0.604723",
... | 0.7133205 | 0 |
Test for condor_schedulers_list_command. For use with multiple schedulers. | def sa4w(YKHO, Axjj, dejh):
j2Dn = TMAJ.MagicMock(host='https://foo.example.com', port=23, username='foo', password='', private_key_path='/some/path', private_key_pass='somepass')
j2Dn.name = 'foo'
VCet = TMAJ.MagicMock(host='http://bar.example.com', port=25, username='bar', password='somepass', private_key... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I4Hr(YKHO, Axjj, dejh):\n Axjj.objects.all.return_value = []\n KHaF = TMAJ.MagicMock(type='condor')\n gUP5(KHaF)\n Axjj.objects.all.assert_called()\n qbV0 = dejh().__enter__().write.call_args_list\n YKHO.assertEqual(1, len(qbV0))\n YKHO.assertEqual('There are no Condor Schedulers registere... | [
"0.76207393",
"0.7193684",
"0.7193684",
"0.7193684",
"0.7193684",
"0.7193684",
"0.7193684",
"0.7193684",
"0.7193684",
"0.7193684",
"0.7008876",
"0.69348377",
"0.6079018",
"0.59479004",
"0.58246213",
"0.5822475",
"0.58052903",
"0.5724108",
"0.5721465",
"0.5706581",
"0.57004035... | 0.53246814 | 38 |