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 |
|---|---|---|---|---|---|---|
Checks whether the entered username exists in the database | def rjh8(YKHO, f4IJ, NtEF):
NtEF = NtEF.get()
rQK9 = True
if NtEF == '':
rQK9 = False
AI9e.showerror('Error!', 'Please enter your username')
else:
p9bx = FfT0()
YMlM = "SELECT Username FROM Users WHERE Username = '{}'".format(NtEF)
dixj = p9bx.run_select(YMlM)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IJlN(YKHO, NtEF):\n Ueki = YKHO.get_usernames()\n for YRbF in Ueki:\n if YRbF[0] == NtEF:\n return False\n return True",
"def LCZz(wkwp):\n tyNF = GGod().cursor().execute(' SELECT * FROM users\\n WHERE username=?', (wkwp,))\n Aofo = tyNF.f... | [
"0.8364498",
"0.8253234",
"0.82175624",
"0.8166087",
"0.81610715",
"0.8090836",
"0.80659455",
"0.7957905",
"0.79521936",
"0.7829182",
"0.7812102",
"0.78075",
"0.7779922",
"0.7741268",
"0.7699066",
"0.7697498",
"0.76868874",
"0.7657415",
"0.7652791",
"0.76433474",
"0.7628754",... | 0.0 | -1 |
Allows the user to answer their security questions and reset their password | def FIMM(YKHO, LDIG, NtEF):
super().__init__(LDIG, 'Reset Password', 14, 2, False, True)
YKHO.master = LDIG
YKHO.master.title('Main Menu')
YKHO.master.geometry('600x650+25+25')
oqEV = seYU(YKHO.main_frame, text='Please answer your premade security questions:', font='Calibri 10')
oqEV.grid(row=1,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rCri(YKHO):\n pass",
"def ieem(YKHO):\n YKHO._clear_username_()\n YKHO._clear_password_()\n YKHO._forgotten_password_()\n ITS7.sleep(5)",
"def vySg(YKHO, fZOT, uJjO):\n rQK9 = True\n for bTKY in fZOT:\n if len(bTKY) == 0:\n rQK9 = False\n if fZOT['New Password'].ge... | [
"0.69837236",
"0.6966882",
"0.6799227",
"0.6686602",
"0.6625676",
"0.645597",
"0.6453376",
"0.64233536",
"0.63989556",
"0.6382169",
"0.6372288",
"0.6363781",
"0.6358373",
"0.6327648",
"0.6314002",
"0.6299562",
"0.62973887",
"0.6294158",
"0.6288333",
"0.6256504",
"0.6236257",
... | 0.0 | -1 |
Draw uniform random vectors with given norm, and use as edit vector | def YSEh(YKHO, ssSt):
PZnt = ssSt.source_words
jGao = YKHO.editor.encoder.token_embedder.embed_seq_batch(PZnt)
qozy = YKHO.editor.encoder.token_embedder.embed_seq_batch(ssSt.insert_words)
glZx = YKHO.editor.encoder.token_embedder.embed_seq_batch(ssSt.delete_words)
EIo5 = YKHO.editor.encoder.token_em... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C6M2(zNig, CkYf=False):\n if isinstance(zNig, (int, float)):\n zNig = (zNig,)\n if len(zNig) == 1:\n zNig = (1, zNig[0])\n M8d_ = oyIN.random.normal(0, size=zNig, scale=1 / zNig[1])\n if CkYf:\n M8d_ /= oyIN.linalg.norm(M8d_, axis=1)[:, None]\n return M8d_",
"def Jrfo(JBMS... | [
"0.6643489",
"0.6481956",
"0.6402412",
"0.6399665",
"0.63475865",
"0.6338547",
"0.6281372",
"0.6258305",
"0.6221039",
"0.621995",
"0.6212895",
"0.6201588",
"0.620062",
"0.61871105",
"0.6185926",
"0.6141039",
"0.61120963",
"0.6037956",
"0.6034822",
"0.602189",
"0.5983971",
"... | 0.0 | -1 |
View function for home page of site. | def d6pt(QePW):
cdJN = mVZ4.objects.all().count()
FatH = uHxD.objects.all().count()
nrsx = c4EF.objects.count()
RTwz = QePW.session.get('num_visits', 0)
QePW.session['num_visits'] = RTwz + 1
QpfX = {'num_players': cdJN, 'num_rooms': FatH, 'num_rules': nrsx, 'num_visits': RTwz}
return _1tc(Qe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kZiy(QePW):\n return _1tc(QePW, 'base/home.html')",
"def C_QL():\n return TvZl('home.html')",
"def kZiy(QePW):\n return _1tc(QePW, 'core/home.html')",
"def nspo(QePW):\n return _1tc(QePW, 'generic/home.html')",
"def nspo(QePW):\n return _1tc(QePW, 'generic/home.html')",
"def kZiy():\n ... | [
"0.85220593",
"0.83808637",
"0.8353869",
"0.8341923",
"0.8341923",
"0.8319331",
"0.8306594",
"0.8300408",
"0.8297865",
"0.8265691",
"0.8226681",
"0.82179236",
"0.82068473",
"0.8191401",
"0.8191401",
"0.8182987",
"0.8178039",
"0.81768703",
"0.8148833",
"0.8134954",
"0.8134954"... | 0.0 | -1 |
View function for home page of site. | def Bv4a(QePW, _sei):
abiq = Iofl(uHxD, pk=_sei)
cNcC, cdJN, AwxM, PfAB, SYbX = abiq.mission_result()
RTwz = QePW.session.get('num_visits', 0)
QePW.session['num_visits'] = RTwz + 1
QpfX = {'room_id': cNcC, 'num_mission': AwxM, 'num_pass': PfAB, 'num_fail': SYbX, 'num_visits': RTwz}
return _1tc(Q... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kZiy(QePW):\n return _1tc(QePW, 'base/home.html')",
"def C_QL():\n return TvZl('home.html')",
"def kZiy(QePW):\n return _1tc(QePW, 'core/home.html')",
"def nspo(QePW):\n return _1tc(QePW, 'generic/home.html')",
"def nspo(QePW):\n return _1tc(QePW, 'generic/home.html')",
"def kZiy():\n ... | [
"0.8521128",
"0.8379754",
"0.8353459",
"0.83415544",
"0.83415544",
"0.83171177",
"0.830583",
"0.8298624",
"0.8296122",
"0.8263442",
"0.8224959",
"0.8217078",
"0.8206788",
"0.81901366",
"0.81901366",
"0.8182092",
"0.8176577",
"0.81756383",
"0.8147583",
"0.81347877",
"0.8134787... | 0.0 | -1 |
Find majority class form leaf nodes | def siZJ(YKHO, J_Es):
Ziit = YKHO._order_nodes(J_Es, False)
HXjU = mBkc(Ziit)
if len(HXjU) >= 2 and HXjU[0] < HXjU[1]:
return 1
elif len(HXjU) >= 2 and HXjU[0] > HXjU[1]:
return 0
elif len(HXjU) == 1:
return HXjU[0]
else:
return 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZhUb(LOks, BWXx):\n if LOks is None:\n return 0\n if LOks.left is None and LOks.right is None and (LOks.data == BWXx):\n return 1\n else:\n return ZhUb(LOks.left, BWXx) + ZhUb(LOks.right, BWXx)",
"def yera(rdlD, J_Es):\n Mkmy = Yhe5(rdlD, J_Es)\n return max(Mkmy.items(), k... | [
"0.7592453",
"0.68843335",
"0.6752624",
"0.67280287",
"0.6721554",
"0.6665062",
"0.66523254",
"0.66474193",
"0.6632216",
"0.6580165",
"0.65123475",
"0.65036166",
"0.6501639",
"0.64325833",
"0.6412822",
"0.63983613",
"0.636081",
"0.6341452",
"0.6285064",
"0.6259566",
"0.625054... | 0.7994118 | 0 |
Converts a list of int64 into TF Feature. | def Oety(BWXx):
return ZylS.train.Feature(int64_list=ZylS.train.Int64List(value=oyIN.atleast_1d(BWXx))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def v59i(EfZK):\n return ZylS.train.Feature(int64_list=ZylS.train.Int64List(value=EfZK))",
"def p2iQ(v9CE):\n if not isinstance(v9CE, list):\n v9CE = [v9CE]\n return ZylS.train.Feature(int64_list=ZylS.train.Int64List(value=v9CE))",
"def Oety(hkxX):\n return ZylS.train.Feature(int64_list=ZylS... | [
"0.8471431",
"0.84239554",
"0.83489805",
"0.8339096",
"0.8338596",
"0.82812476",
"0.82812476",
"0.82675713",
"0.8260993",
"0.8259853",
"0.8259853",
"0.82473576",
"0.82473576",
"0.82473576",
"0.8238246",
"0.82156",
"0.82064277",
"0.81994766",
"0.8184541",
"0.8164831",
"0.81454... | 0.0 | -1 |
Converts a list of fp32 into TF Feature. | def bPiq(BWXx):
return ZylS.train.Feature(float_list=ZylS.train.FloatList(value=oyIN.atleast_1d(BWXx))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def t_i1(hkxX):\n return ZylS.train.FeatureList(feature=[bPiq(Ty9i) for Ty9i in hkxX])",
"def t_i1(hkxX):\n return ZylS.train.FeatureList(feature=[bPiq(Ty9i) for Ty9i in hkxX])",
"def Dsiu(hkxX):\n if not isinstance(hkxX, iu5r):\n hkxX = [hkxX]\n return ZylS.train.Feature(float_list=ZylS.tra... | [
"0.7715307",
"0.77111644",
"0.76748633",
"0.7636865",
"0.76109433",
"0.7507348",
"0.7494155",
"0.74930555",
"0.74925035",
"0.74912083",
"0.74912083",
"0.73689836",
"0.73605424",
"0.7358578",
"0.7358578",
"0.7358578",
"0.7358578",
"0.7358578",
"0.7352379",
"0.73513347",
"0.735... | 0.7078818 | 78 |
Converts a list of bytes into TF Feature. | def NhGy(BWXx):
return ZylS.train.Feature(bytes_list=ZylS.train.BytesList(value=[BWXx])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NhGy(KouY):\n return ZylS.train.Feature(bytes_list=ZylS.train.BytesList(value=KouY))",
"def r2_2(BWXx):\n if not isinstance(BWXx, bytes):\n if not isinstance(BWXx, list):\n BWXx = BWXx.encode('utf-8')\n else:\n BWXx = [wEf2.encode('utf-8') for wEf2 in BWXx]\n if n... | [
"0.78764015",
"0.7809883",
"0.7809883",
"0.7799263",
"0.76945454",
"0.7666752",
"0.76244956",
"0.7574708",
"0.7559437",
"0.7559437",
"0.7559437",
"0.7559437",
"0.75548416",
"0.75345623",
"0.75345623",
"0.75345623",
"0.75333077",
"0.7530181",
"0.7487877",
"0.7487371",
"0.74730... | 0.68326265 | 94 |
Return a new Color object tinted by given percent. | def Y_Lx(YKHO, DuZT, yHil=None):
mHuL, dnR4, _Cnz = wb5F(YKHO._ansi)
if mHuL is not None:
mHuL = jcwC(mHuL, DuZT)
if dnR4 is not None:
dnR4 = jcwC(dnR4, DuZT)
if not yHil:
*PS6Y, yHil = YKHO.ID.split(' tinted ')
if len(PS6Y) == 1:
try:
XP5J, *b... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ucuE(DuZT):\n epBp = int(DuZT * 512)\n epBp = 255 - min(255, epBp)\n YWFZ = hex(epBp)[2:]\n if len(YWFZ) == 1:\n YWFZ = '0' + YWFZ\n elif len(YWFZ) == 0:\n YWFZ = '00'\n qfpW = '#ff{0}{0}'.format(YWFZ)\n return qfpW",
"def KcqI(TEj7):\n assert 0 <= TEj7 <= 100, 'expected... | [
"0.7296707",
"0.6560064",
"0.6470679",
"0.6417317",
"0.6187828",
"0.60857993",
"0.5995931",
"0.5973446",
"0.59295386",
"0.58927613",
"0.5852703",
"0.5717931",
"0.56206894",
"0.55426615",
"0.548606",
"0.5479847",
"0.54790354",
"0.5446481",
"0.5444575",
"0.54335755",
"0.5425235... | 0.74077505 | 0 |
Returns self values as array. | def GvlY(YKHO, ezWE=None):
if ezWE is None or type(ezWE) is not tjLd:
WKvO = {}
else:
WKvO = ezWE.copy()
WKvO = zOtq.toArray(YKHO, WKvO)
WKvO['registry_uid'] = YKHO.registry_uid
WKvO['registry_description'] = YKHO.registry_description
WKvO['registry_URL'] = YKHO.registry_URL
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hkxX(YKHO):\n return YKHO.array",
"def hkxX(YKHO):\n return YKHO.to_numpy()",
"def TSF4(YKHO) -> oyIN.ndarray:\n return YKHO._values",
"def qw7D(YKHO):\n return oyIN.array(YKHO.value)",
"def hkxX(YKHO) -> oyIN.ndarray:\n return YKHO._values",
"def hkxX(YKHO) -> oyIN.ndarray:\n qmLP.... | [
"0.8777655",
"0.87334865",
"0.84410423",
"0.8400936",
"0.8364686",
"0.82860297",
"0.81583154",
"0.80666065",
"0.8063976",
"0.8049763",
"0.8027713",
"0.80258477",
"0.8004951",
"0.7982771",
"0.7961269",
"0.7920789",
"0.7912032",
"0.78949785",
"0.78859633",
"0.7885281",
"0.78716... | 0.0 | -1 |
Constructs instance with selected office registration type. | def FIMM(YKHO, VCnI='auto'):
crUp.__init__(YKHO)
YKHO.registration_type = VCnI | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, J7PP, JFWG):\n YKHO.office_name = J7PP\n YKHO.office_type = JFWG",
"def lYZ0(YKHO, eGuY):\n CGXC = UPb2(name=eGuY[2], Type=eGuY[1])\n CGXC.office_id = eGuY[0]\n CGXC.date_created = eGuY[3]\n YKHO = CGXC\n return YKHO",
"def RJQz(YKHO):\n YKHO.cursor.execute('INSERT INTO o... | [
"0.66400963",
"0.61530966",
"0.5861106",
"0.5710739",
"0.56568325",
"0.5644924",
"0.5597559",
"0.5496359",
"0.54295367",
"0.534988",
"0.53441143",
"0.523424",
"0.5209949",
"0.5209089",
"0.51801884",
"0.51738995",
"0.5145385",
"0.5128627",
"0.51219124",
"0.5113496",
"0.5106454... | 0.5121479 | 19 |
Returns interval start and end times (arrow) based on a time specificied by ts. If ts is None, base interval on present. Gets the last whole interval containing ts shift Parameters in seconds | def eUH0(i8WE=None, DkWr=-60, NzMs=gYbP):
if i8WE is None:
i8WE = ITS7.time()
pMnz = int(epAf.ceil((float(i8WE) + DkWr) / NzMs)) * NzMs
Os4s = LgWF.get(pMnz)
yKcO = Os4s.replace(seconds=-NzMs)
return (yKcO, Os4s) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EhAF(YKHO, R4lU, IElX):\n XWvK = R4lU / YKHO.tsamp\n Znfh = IElX / YKHO.tsamp\n return YKHO.get_sample_interval(XWvK, zSur)",
"def enin(YKHO, a1PO):\n if a1PO <= 0 or a1PO <= YKHO.startTime:\n return None\n YRbF = int((a1PO - YKHO.startTime * 1000) / P7io.TS_GRANULARITY)\n if YRbF >=... | [
"0.5847207",
"0.56855804",
"0.5645439",
"0.5642369",
"0.55044353",
"0.5501323",
"0.54355764",
"0.54247373",
"0.5420958",
"0.5412029",
"0.54099506",
"0.54099506",
"0.5396346",
"0.5393784",
"0.53049296",
"0.5299543",
"0.5295825",
"0.52925175",
"0.5277204",
"0.5257708",
"0.52257... | 0.803712 | 0 |
Returns True if user has role mentor. | def UUdI(YKHO):
return YKHO.role == YKHO.PermissionChoice.MENTOR | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l5f_(YKHO, OaeV: Context, d9OY: int) -> bool:\n yF5U = OaeV.guild.get_role(d9OY)\n return yF5U in OaeV.message.author.roles",
"def gB9w(YKHO, LmAn: str) -> bool:\n return YKHO._parse_role(LmAn) in YKHO.group_roles",
"def yxKr(CBIr, n294):\n if CBIr and n294:\n PDtd = n294.get_admins().us... | [
"0.7299925",
"0.69835186",
"0.687249",
"0.68627083",
"0.6860283",
"0.68554884",
"0.6851121",
"0.68499583",
"0.6848877",
"0.6848599",
"0.68484503",
"0.68452865",
"0.6821504",
"0.6805654",
"0.67889106",
"0.67512804",
"0.67382634",
"0.6737593",
"0.6707668",
"0.6691547",
"0.66719... | 0.71369296 | 1 |
Returns True if user has role moderator. | def sTQF(YKHO):
return YKHO.role == YKHO.PermissionChoice.MODERATOR | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sTQF(CBIr):\n if CBIr.is_anonymous:\n return False\n if not CBIr.is_active:\n return False\n if CBIr.is_staff or CBIr.is_superuser:\n return True\n YzVO = CBIr.profile.role in (SYRW.MODERATOR, SYRW.MANAGER)\n return YzVO",
"def sTQF(YKHO):\n return YKHO.is_admin",
"de... | [
"0.87618893",
"0.8473213",
"0.8428945",
"0.8073558",
"0.80613476",
"0.782637",
"0.77719945",
"0.7412025",
"0.73804486",
"0.7364119",
"0.7359349",
"0.7333199",
"0.7327377",
"0.72763187",
"0.7205032",
"0.7197547",
"0.7158455",
"0.7142284",
"0.70805246",
"0.70377403",
"0.6959522... | 0.8708915 | 1 |
Returns True if user has role region moderator. | def RINO(YKHO):
return YKHO.role == YKHO.PermissionChoice.REGION_MODERATOR | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sTQF(YKHO):\n return YKHO.role == YKHO.PermissionChoice.MODERATOR",
"def sTQF(CBIr):\n if CBIr.is_anonymous:\n return False\n if not CBIr.is_active:\n return False\n if CBIr.is_staff or CBIr.is_superuser:\n return True\n YzVO = CBIr.profile.role in (SYRW.MODERATOR, SYRW.MA... | [
"0.78997916",
"0.7808338",
"0.7731418",
"0.74947906",
"0.7466212",
"0.73294866",
"0.7312165",
"0.701435",
"0.6959354",
"0.6930348",
"0.6930348",
"0.6930348",
"0.6930348",
"0.692333",
"0.6913709",
"0.6882669",
"0.6866913",
"0.6840398",
"0.6773881",
"0.6739034",
"0.6730601",
... | 0.8619722 | 0 |
Return a custom 404 error. | def m7kB(tTpl):
return ('Sorry, nothing at this URL.', 404) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o3cf(P1dF):\n return '404'",
"def mZnU():\n return oGir(RA4y, '<h1>404 Error : Some crap went down, so just <a href=\"/\">HEAD HOME</a>.</h1>', [])",
"def eJkH(XObx):\n return dict(err=XObx)",
"def o3cf(P1dF):\n return G3KB('Not Found', 404)",
"def RQdI(P1dF):\n return 'Sorry, Nothing at... | [
"0.8263737",
"0.79933435",
"0.79192984",
"0.78825426",
"0.7845269",
"0.78424567",
"0.7818006",
"0.7818006",
"0.7818006",
"0.7816168",
"0.78139937",
"0.78001934",
"0.77720594",
"0.77618265",
"0.7702134",
"0.76248384",
"0.7620647",
"0.76148254",
"0.75642604",
"0.75578934",
"0.7... | 0.72681904 | 62 |
Tests if all elements of iterable are equal. | def BhqZ(OxJJ: Iterable) -> bool:
oHE7 = iter(OxJJ)
try:
cntZ = next(oHE7)
except StopIteration:
return True
return all((cntZ == wOmD for wOmD in oHE7)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ac8g(OxJJ):\n ...",
"def ac8g(OxJJ: Iterable):\n if isinstance(OxJJ, list):\n return not OxJJ or OxJJ.count(OxJJ[0]) == len(OxJJ)\n elif isinstance(OxJJ, tuple):\n return OxJJ[1:] == OxJJ[:-1]\n else:\n WhY1 = iter(OxJJ)\n try:\n cntZ = next(WhY1)\n e... | [
"0.8761866",
"0.8280779",
"0.81207544",
"0.8048045",
"0.8027434",
"0.7407137",
"0.73867834",
"0.73821336",
"0.73066133",
"0.7262681",
"0.72539634",
"0.7177195",
"0.7096237",
"0.7077752",
"0.70121115",
"0.69415766",
"0.69270056",
"0.69246584",
"0.68970937",
"0.67493623",
"0.67... | 0.8854582 | 0 |
Return device information about this entity. | def GWuV(YKHO) -> cGD3:
C3ST = 'Spotify Free'
if YKHO._me is not None:
Lx3t = YKHO._me['product']
C3ST = f'Spotify {Lx3t}'
return {'identifiers': {(Sugg, YKHO._id)}, 'manufacturer': 'Spotify AB', 'model': C3ST, 'name': YKHO._name, 'entry_type': 'service'} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GWuV(YKHO):\n return YKHO._device.device_info",
"def GWuV(YKHO):\n return YKHO._api.device_info",
"def GWuV(YKHO):\n return YKHO._device.device_info()",
"def GWuV(YKHO):\n return YKHO._device.device_info()",
"def GWuV(YKHO):\n return YKHO._device_info",
"def GWuV(YKHO):\n return YKH... | [
"0.85178745",
"0.84918463",
"0.84868944",
"0.84868944",
"0.8458017",
"0.8458017",
"0.8458017",
"0.8458017",
"0.8458017",
"0.8423622",
"0.8423125",
"0.8370153",
"0.82994163",
"0.828064",
"0.82728183",
"0.8271366",
"0.82452255",
"0.82452255",
"0.8232942",
"0.82176334",
"0.81854... | 0.7581082 | 69 |
Return the playback state. | def QTBn(YKHO) -> str | None:
if not YKHO._currently_playing:
return h34t
if YKHO._currently_playing['is_playing']:
return mocT
return Y9dW | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ja6o(YKHO) -> eyBA:\n return YKHO._state",
"def PKOm(YKHO):\n return YKHO.__playback_status",
"def k4xQ(YKHO) -> eyBA:\n geh0 = YKHO.__request(YKHO.PLAYBACK_STATE_URL)\n Aofo = eyBA(**geh0)\n return Aofo",
"def QTBn(YKHO):\n if YKHO._play:\n return mocT\n return iKVK",
"def ... | [
"0.8528588",
"0.8340912",
"0.8158228",
"0.8101832",
"0.80381197",
"0.8034032",
"0.8034032",
"0.8034032",
"0.8034032",
"0.78976",
"0.7882017",
"0.78225183",
"0.7758968",
"0.77171767",
"0.7626768",
"0.7616345",
"0.7584656",
"0.74961835",
"0.74390113",
"0.7390767",
"0.73063594",... | 0.78017086 | 12 |
Return the media image URL. | def jlYN(YKHO) -> str | None:
if YKHO._currently_playing.get('item') is None or not YKHO._currently_playing['item']['album']['images']:
return None
return jL8T(YKHO._currently_playing['item']['album']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jlYN(YKHO):\n return YKHO._media_image_url",
"def jlYN(YKHO):\n if 'image' in YKHO._current_item:\n return YKHO._current_item['image']\n else:\n return None",
"def jlYN(YKHO):\n if YKHO._coordinator:\n return YKHO._coordinator.media_image_url\n return YKHO._media_image_u... | [
"0.8947876",
"0.87217534",
"0.86914915",
"0.86821747",
"0.86048084",
"0.8590329",
"0.84266",
"0.83253044",
"0.8107397",
"0.80467284",
"0.799204",
"0.79375255",
"0.7910322",
"0.7811889",
"0.77889585",
"0.7719151",
"0.7719151",
"0.7691157",
"0.76768047",
"0.76437163",
"0.763562... | 0.85482556 | 6 |
Title of Playlist currently playing. | def FXFH(YKHO):
if YKHO._playlist is None:
return None
return YKHO._playlist['name'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rjJn(YKHO):\n return YKHO.tracks[YKHO._cur_track][1] if YKHO.tracks else ''",
"def ontt(YKHO):\n UTX6 = YKHO.__sendUserMessage(0, YKHO.IPC_GET_PLAYING_TITLE)\n return YKHO.__readStringFromMemory(UTX6, True)",
"def mWFP(YKHO) -> str:\n return YKHO._playlist_name",
"def _0LT(YKHO) -> str | None... | [
"0.81007457",
"0.80633014",
"0.80248713",
"0.7994939",
"0.7848366",
"0.7764391",
"0.77633196",
"0.76398396",
"0.75551003",
"0.75551003",
"0.75551003",
"0.75551003",
"0.75551003",
"0.75551003",
"0.75551003",
"0.75551003",
"0.75551003",
"0.75551003",
"0.75551003",
"0.75551003",
... | 0.0 | -1 |
Return the current playback device. | def JZXy(YKHO) -> str | None:
return YKHO._currently_playing.get('device', {}).get('name') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bq5P(YKHO):\n return YKHO.device",
"def VeaS(YKHO):\n return YKHO._device",
"def begE(YKHO):\n return YKHO._impl.device",
"def begE(YKHO):\n return YKHO.handle.device",
"def begE(YKHO):\n return YKHO._device",
"def begE(YKHO):\n return YKHO._device",
"def begE(YKHO):\n return Y... | [
"0.775929",
"0.75264794",
"0.74396914",
"0.72849816",
"0.7283953",
"0.7283953",
"0.7238926",
"0.7238926",
"0.7208643",
"0.7208643",
"0.7178178",
"0.7121851",
"0.71142364",
"0.7030627",
"0.7018734",
"0.69989157",
"0.6981341",
"0.6893768",
"0.6873937",
"0.68449897",
"0.6808241"... | 0.6748392 | 31 |
Return the media player features that are supported. | def XhMO(YKHO) -> int:
if YKHO._me['product'] != 'premium':
return 0
return H_td | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dg30(QTBn: State) -> list[str]:\n bySB = QTBn.attributes.get(zg5l, 0)\n ExtY = []\n if bySB & (ZB3n.TURN_ON | ZB3n.TURN_OFF):\n ExtY.append(Vml4)\n if bySB & (ZB3n.PLAY | ZB3n.PAUSE):\n ExtY.append(nkYD)\n if bySB & (ZB3n.PLAY | ZB3n.STOP):\n ExtY.append(ce_9)\n if bySB &... | [
"0.84037393",
"0.81963307",
"0.81963307",
"0.8132762",
"0.8069191",
"0.8060192",
"0.7885856",
"0.7849248",
"0.7836276",
"0.7836276",
"0.7822928",
"0.7821161",
"0.7803279",
"0.7803279",
"0.7803279",
"0.7803279",
"0.76758015",
"0.76758015",
"0.76758015",
"0.76758015",
"0.767580... | 0.65499675 | 71 |
Given a list of ints, return True if the array contains a 2 next to a 2 somewhere. | def fzHk(xYvp):
for YRbF in range(len(xYvp) - 1):
if xYvp[YRbF] == 2 and xYvp[YRbF + 1] == 2:
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fzHk(xYvp):\n for YRbF in range(len(xYvp) - 1):\n if xYvp[YRbF] == 2 and xYvp[YRbF + 1] == 2:\n return True\n return False",
"def fzHk(xYvp):\n for YRbF in range(len(xYvp) - 1):\n if xYvp[YRbF] == 2 and xYvp[YRbF + 1] == 2:\n return True\n return False",
"def... | [
"0.75939214",
"0.7578432",
"0.71860003",
"0.71108806",
"0.693983",
"0.6872134",
"0.6733501",
"0.6668995",
"0.66687936",
"0.6655092",
"0.6618837",
"0.66043025",
"0.64569736",
"0.6440502",
"0.6412717",
"0.6387871",
"0.63644814",
"0.6357092",
"0.6334952",
"0.63263446",
"0.631418... | 0.7299288 | 2 |
Initializes a CAES class that inherits from the technology class. It sets the type and physical constraints of the technology. | def FIMM(YKHO, NArs):
super().__init__(NArs)
YKHO.tag = 'CAES'
YKHO.heat_rate_high = NArs['heat_rate_high']
YKHO.fuel_price = NArs['fuel_price'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, o3rW, lNm8=None, rxEN=None, q7In=None, rVnq=None):\n YKHO.material = o3rW\n if lNm8:\n YKHO.wl = lNm8\n if rxEN:\n YKHO.tt = rxEN\n if q7In:\n YKHO.theta = q7In\n if rVnq:\n YKHO.phi = rVnq",
"def FIMM(YKHO, NArs: CopECatParams):\n YKHO.params = NArs\n... | [
"0.6251883",
"0.622618",
"0.6179819",
"0.60592705",
"0.60046744",
"0.5936524",
"0.59044075",
"0.5888357",
"0.5882485",
"0.58711904",
"0.58669144",
"0.586594",
"0.5821758",
"0.58075166",
"0.5805656",
"0.5798371",
"0.57777977",
"0.5770459",
"0.5761148",
"0.57518184",
"0.5740311... | 0.6919116 | 0 |
Returns the last row or column of specified row. | def XVAW(YKHO, iVRZ=None):
return YKHO.__get_location(max, iVRZ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def J3uN(YKHO, rdlD):\n return YKHO._data[-rdlD:]",
"def gXxG(YKHO, rdlD):\n if rdlD >= YKHO.h:\n raise (ValueError, 'Row number does not exist.')\n return YKHO.g[rdlD]",
"def gXxG(YKHO, rdlD):\n return YKHO.cells[rdlD * YKHO.size:(rdlD + 1) * YKHO.size]",
"def JMDM(YKHO, rdlD, iVRZ):\n ... | [
"0.72657",
"0.6831598",
"0.68261373",
"0.6819927",
"0.67633015",
"0.67065364",
"0.66925526",
"0.66632515",
"0.66566664",
"0.66566664",
"0.6656482",
"0.66313326",
"0.65636086",
"0.6533261",
"0.65249884",
"0.651684",
"0.65082717",
"0.6508143",
"0.64452094",
"0.64254004",
"0.642... | 0.7593135 | 0 |
Averages the cells in the given column of the table. | def qqgr(YKHO, iVRZ):
zNig = len(YKHO.__data_area)
return YKHO.sum_(iVRZ) / zNig if zNig else zNig | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qqgr(YKHO, fvDH):\n YKHO._result = sum([ZfUD[fvDH] for ZfUD in YKHO._result]) / len(YKHO._result)\n return YKHO",
"def LHrn(fvDH):\n _Xss = pGT6(fvDH)\n return round(JBMS(_Xss), 2)",
"def O5mg(YKHO, iVRZ):\n H5ew = YKHO.get_key_for_column(iVRZ)\n ZwYU, arKL = YKHO.select_columns(['idevice... | [
"0.7863758",
"0.7692173",
"0.7411469",
"0.73741454",
"0.71925706",
"0.6934511",
"0.6699637",
"0.6633907",
"0.65383995",
"0.6437349",
"0.6303992",
"0.6291485",
"0.6244781",
"0.62278897",
"0.6195527",
"0.5953584",
"0.5907135",
"0.58888423",
"0.5779425",
"0.57461816",
"0.5746034... | 0.80396205 | 0 |
Returns a list of column names from the table. | def ZLJ_(YKHO):
ZLJ_ = sorted(YKHO.__columns, key=lambda U34r: U34r[0])
return tuple(map(lambda U34r: U34r[1], ZLJ_)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XUX0(YKHO, tyNF):\n if YKHO.__check_database_is_initialised() is False:\n return []\n DpUl = YKHO.con.cursor()\n try:\n DpUl.execute('PRAGMA table_info({})'.format(tyNF))\n except Exception as e:\n RKD7.error('Exception: {} when trying to get column names for table {}'.format(t... | [
"0.8773287",
"0.8459462",
"0.84361225",
"0.8412178",
"0.8292227",
"0.8285102",
"0.82522076",
"0.81457025",
"0.81328255",
"0.81317025",
"0.8108548",
"0.8063827",
"0.8054936",
"0.80403495",
"0.80198705",
"0.80072534",
"0.7993752",
"0.7981927",
"0.79629165",
"0.79620725",
"0.794... | 0.0 | -1 |
Return the device specific state attributes. | def R1i3(YKHO):
nPrm = {zeKw: YKHO._nuki_device.battery_critical, AuNU: YKHO._nuki_device.nuki_id}
return nPrm | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R1i3(YKHO):\n return YKHO.attr\n 'Return the state attributes.'\n return YKHO.attr",
"def R1i3(YKHO):\n return YKHO._state_attributes",
"def R1i3(YKHO):\n hkS8 = {}\n for jzdc in YKHO._attr_dps:\n hkS8[jzdc.name] = jzdc.get_value(YKHO._device)\n return hkS8",
"def R1i3(YKHO):\... | [
"0.8878755",
"0.8804698",
"0.87682253",
"0.87663746",
"0.87663746",
"0.87663746",
"0.87663746",
"0.87311697",
"0.87203044",
"0.87203044",
"0.87203044",
"0.87203044",
"0.87203044",
"0.86892813",
"0.8683323",
"0.8683323",
"0.8683323",
"0.86700034",
"0.86700034",
"0.8668279",
"0... | 0.81099874 | 81 |
Return true if ringtoopen is enabled. | def HSDI(YKHO):
return not YKHO._nuki_device.is_rto_activated | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WGC8(YKHO):\n return bool(YKHO._pin_value)",
"def WGC8(YKHO) -> bool:\n return False if YKHO._soc is None else True",
"def Debg(YKHO) -> bool:\n return YKHO.coordinator.get_first(\"$.doorWindow.doorWindowDevice[?(@.deviceLabel=='%s')].state\", YKHO._device_label) == 'OPEN'",
"def Debg(YKHO):\n ... | [
"0.74519527",
"0.72620595",
"0.72581536",
"0.72250545",
"0.71401817",
"0.71333516",
"0.70937425",
"0.706541",
"0.7035369",
"0.7009169",
"0.6908616",
"0.6887168",
"0.6804966",
"0.6793828",
"0.6793233",
"0.67751956",
"0.6770729",
"0.6765161",
"0.67557615",
"0.67557615",
"0.6749... | 0.63667786 | 77 |
Gets the data_sources of this ReqBody. | def ythi(YKHO) -> x1iM[AnK5]:
return YKHO._data_sources | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ythi(YKHO):\n return YKHO._data_sources",
"def ythi(YKHO):\n return YKHO._data_sources",
"def ythi(YKHO):\n return YKHO._data_sources",
"def lxG6(YKHO):\n nPrm = qQXR.load(dTAH.urlopen(YKHO._url + '/api/get_data_sources'))\n return nPrm['data_sources']",
"def ULJA(YKHO) -> h8nf[bdIy[str]... | [
"0.7544785",
"0.7544785",
"0.7544785",
"0.740047",
"0.6917971",
"0.6917971",
"0.68552923",
"0.672693",
"0.6653478",
"0.65799546",
"0.6574679",
"0.6520605",
"0.6514365",
"0.6501304",
"0.64804804",
"0.6374806",
"0.6360192",
"0.6350856",
"0.63118845",
"0.6306073",
"0.62802154",
... | 0.86670667 | 0 |
This calls get_labels and returns True if it worked, along with the API response (True, response) If the call to get_labels fails, this returns (False, None) | def sT2e(DA2S, M9Mk):
try:
G1k0 = bHFz.call_get_labels(DA2S, M9Mk)
return (True, G1k0)
except DA2S.exceptions.ResourceNotFoundException as RNF:
na1r.warning(f'Error getting label {M9Mk}: {NLsF}')
return (False, None) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YP6S(YKHO):\n pass",
"def UtJD(YKHO):\n KqMX = P4JO(200, {}, R5rY)\n h2IT.add_callback(h2IT.GET, url=z_5l, callback=KqMX)\n Crrw = q5ag.get_labels(GqXf, Q4KK, BT3Q, NCyl)\n assert sorted(Crrw) == sorted(pG1w)",
"def oT7x(YKHO, zGCa):\n try:\n geh0 = YKHO.rekognition_client.detect_l... | [
"0.7346332",
"0.73344177",
"0.68890953",
"0.68195534",
"0.6813423",
"0.67360705",
"0.664633",
"0.65774035",
"0.64701116",
"0.644944",
"0.644564",
"0.64433455",
"0.64242786",
"0.642378",
"0.642378",
"0.6414668",
"0.6414668",
"0.6414668",
"0.6414668",
"0.64134175",
"0.6383518",... | 0.7790164 | 0 |
Check whether the node is a leaf node | def jwB3(YKHO):
return YKHO.childs[0] is None and YKHO.childs[1] is None and (YKHO.childs[2] is None) and (YKHO.childs[3] is None) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def loae():\n return False",
"def CXWj(Q6kx):\n return isinstance(Q6kx, nkkd)",
"def loae() -> bool:\n return True",
"def loae(YKHO, Q6kx: object) -> bool:\n if Q6kx.left is None and Q6kx.right is None:\n return True\n else:\n return False",
"def loae(YKHO):\n return not YKH... | [
"0.8483688",
"0.844577",
"0.8441949",
"0.83923566",
"0.82324266",
"0.82324266",
"0.81980515",
"0.81959933",
"0.8174158",
"0.8167061",
"0.8167061",
"0.8152689",
"0.8131484",
"0.81173754",
"0.8105716",
"0.8102051",
"0.810108",
"0.8099712",
"0.8098587",
"0.80936575",
"0.8082302"... | 0.78891313 | 42 |
Creates an Object from a JSON file | def EBvf(Ux0P):
with open(Ux0P, encoding='utf-8') as Vf_1:
zFiD = Vf_1.readline()
M_Yt = qQXR.loads(zFiD)
return M_Yt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lYpi(Emd4, Ux0P):\n with open(Ux0P) as eHNT:\n nPrm = qQXR.load(eHNT)\n return Emd4.fromDict(nPrm)",
"def refC(Emd4, pmON):\n with open(pmON) as wOb_:\n nPrm = qQXR.load(wOb_)\n return Emd4.from_dict(nPrm)",
"def refC(Emd4, wM3v):\n with open(wM3v, 'r', encoding='utf-8') as N5P... | [
"0.8165106",
"0.8096276",
"0.80374926",
"0.7983657",
"0.7983176",
"0.79565626",
"0.79565626",
"0.79440427",
"0.79311246",
"0.7894618",
"0.7888263",
"0.78841656",
"0.7880652",
"0.7880652",
"0.7875753",
"0.7869698",
"0.7869698",
"0.7869698",
"0.7869698",
"0.7869698",
"0.7869698... | 0.80107534 | 3 |
Return a tree iterable | def Vs4Q(YKHO) -> iu5r:
return YKHO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vs4Q(YKHO):\n bzUU = list()\n\n def GQk7(Q6kx):\n if Q6kx != None:\n bzUU.append(Q6kx.data)\n for DZ1i in Q6kx.children:\n GQk7(DZ1i)\n GQk7(YKHO._root)\n return iter(bzUU)",
"def Vs4Q(YKHO):\n if YKHO.root:\n for tTpl in YKHO.root.leafOrder()... | [
"0.7879617",
"0.7645233",
"0.7547345",
"0.7518024",
"0.74513566",
"0.7385992",
"0.73685426",
"0.73685426",
"0.7367894",
"0.735683",
"0.7355523",
"0.7303832",
"0.72364587",
"0.7215593",
"0.7192977",
"0.71839553",
"0.7175507",
"0.7168069",
"0.715673",
"0.7099703",
"0.70967376",... | 0.0 | -1 |
Preorder traverse subtree whose root is the passed position and return a generator of the positions it contains | def V8X9(YKHO, dQgj: _Position) -> jd6F:
if not dQgj.is_owned_by(YKHO):
raise ValueError("Position doesn't belong to this tree")
yield dQgj
for YRbF in YKHO.get_children(dQgj):
for r845 in YKHO.traverse_subtree_pre_order(YRbF):
yield r845 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Nl91(YKHO):\n if not YKHO.is_empty():\n for XP5J in YKHO._subtree_preorder(YKHO.root()):\n yield XP5J",
"def rYDM(YKHO) -> jd6F:\n dQgj = YKHO.get_root()\n if dQgj is not None:\n for YRbF in YKHO.traverse_subtree_pre_order(dQgj):\n yield YRbF",
"def FBNX(YKHO):\... | [
"0.781338",
"0.75185174",
"0.72693557",
"0.7250747",
"0.7119155",
"0.7072471",
"0.7072471",
"0.7072471",
"0.6848504",
"0.6829491",
"0.68279856",
"0.6707708",
"0.6703236",
"0.6690264",
"0.66823775",
"0.66632783",
"0.6647032",
"0.6628679",
"0.6622946",
"0.6600862",
"0.6600261",... | 0.79548126 | 0 |
Preorder traverse tree and return a generator of the positions it contains | def rYDM(YKHO) -> jd6F:
dQgj = YKHO.get_root()
if dQgj is not None:
for YRbF in YKHO.traverse_subtree_pre_order(dQgj):
yield YRbF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Nl91(YKHO):\n if not YKHO.is_empty():\n for XP5J in YKHO._subtree_preorder(YKHO.root()):\n yield XP5J",
"def FBNX(YKHO):\n return YKHO.preorder()",
"def Nl91(YKHO):\n if not YKHO.is_empty():\n for XP5J in YKHO._subtree_preorder(YKHO.root()):\n yield XP5J",
"de... | [
"0.7868976",
"0.7587971",
"0.7530995",
"0.74300164",
"0.74278045",
"0.73745185",
"0.73745185",
"0.73745185",
"0.7332555",
"0.7328467",
"0.7313186",
"0.72256005",
"0.71514636",
"0.70855117",
"0.70677245",
"0.70432633",
"0.70382905",
"0.7022661",
"0.69842917",
"0.6933785",
"0.6... | 0.7709807 | 1 |
Postorder traverse subtree whose root is the passed position and return a generator of the positions it contains | def F290(YKHO, dQgj: _Position) -> jd6F:
if not dQgj.is_owned_by(YKHO):
raise ValueError("Position doesn't belong to this tree")
for YRbF in YKHO.get_children(dQgj):
for r845 in YKHO.traverse_subtree_post_order(YRbF):
yield r845
yield dQgj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _SG0(YKHO):\n if not YKHO.is_empty():\n for XP5J in YKHO._subtree_postorder(YKHO.root()):\n yield XP5J",
"def EGoX(YKHO) -> jd6F:\n dQgj = YKHO.get_root()\n if dQgj is not None:\n for YRbF in YKHO.traverse_subtree_post_order(dQgj):\n yield YRbF",
"def _SG0(YKHO)... | [
"0.7830399",
"0.7611846",
"0.72297615",
"0.70530856",
"0.7015215",
"0.689714",
"0.68317056",
"0.6756263",
"0.66604996",
"0.6606108",
"0.65756136",
"0.65730935",
"0.655048",
"0.65326285",
"0.6478946",
"0.64620405",
"0.6458448",
"0.644192",
"0.64258486",
"0.6418043",
"0.6413804... | 0.79041743 | 0 |
Insert a value into the tree | def JPHp(YKHO, H5ew: Any, BWXx: Any) -> None:
YKHO._length += 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JPHp(YKHO, BWXx):\n if YKHO.root:\n YKHO.root.insert(BWXx)\n else:\n YKHO.root = o7DN(BWXx)",
"def JPHp(YKHO, BWXx):\n YKHO._traverse_tree(side=YKHO._add_to_the_side, match=YKHO._insert_match, value=BWXx)",
"def JPHp(YKHO, BWXx):\n if BWXx < YKHO.value:\n if YKHO.leftChild ... | [
"0.8398498",
"0.83927613",
"0.8065724",
"0.8052844",
"0.80504644",
"0.8003887",
"0.7998346",
"0.7901261",
"0.7846717",
"0.7840005",
"0.78058386",
"0.7793009",
"0.7770317",
"0.776485",
"0.76936483",
"0.7680114",
"0.76733387",
"0.76599383",
"0.76488894",
"0.7628953",
"0.7597862... | 0.0 | -1 |
This is a reimplementation of `numpy.cross` that only does 3D x 3D, and is therefore faster since it doesn't need any conditionals. | def cXFj(jzdc, Fg_i):
if vrYD:
return yw76.cross(jzdc, Fg_i)
U7YL = oyIN.empty(oyIN.broadcast(jzdc, Fg_i).shape)
vLnP = jzdc.T
QWez = Fg_i.T
osra = U7YL.T
osra[0] = vLnP[1] * QWez[2] - vLnP[2] * QWez[1]
osra[1] = vLnP[2] * QWez[0] - vLnP[0] * QWez[2]
osra[2] = vLnP[0] * QWez[1] -... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ebzu(WKvO, LVAh):\n assert WKvO.ndim == 2\n assert LVAh.ndim == 2\n assert WKvO.shape[1] == 3\n assert LVAh.shape[1] == 3\n assert (WKvO.shape[0] == 1 or LVAh.shape[0] == 1) or WKvO.shape[0] == LVAh.shape[0]\n if max([WKvO.shape[0], LVAh.shape[0]]) >= 500:\n return oyIN.c_[WKvO[:, 1] *... | [
"0.7935265",
"0.71540034",
"0.714357",
"0.7039158",
"0.7032764",
"0.69401646",
"0.69168186",
"0.68833315",
"0.686252",
"0.66938376",
"0.66647464",
"0.6655003",
"0.66524625",
"0.66013867",
"0.6579307",
"0.6570677",
"0.65417624",
"0.65174246",
"0.64810055",
"0.64621717",
"0.645... | 0.7205022 | 1 |
Returns True if point C is along the great circle arc AB. | def HjeW(k0lF, tjUW, Nq1b):
if vrYD:
return yw76.intersects_point(k0lF, tjUW, Nq1b)
RV39 = u54L(k0lF, tjUW)
SKyM = u54L(k0lF, Nq1b)
lDwM = u54L(Nq1b, tjUW)
od6o = oyIN.abs(SKyM + lDwM - RV39)
return od6o < 1e-10 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H1Ug(YKHO, Io6r):\n pImw = YKHO.distance(Io6r.get_centre())\n if abs(pImw - Io6r.get_rayon()) < 1:\n LD1b = [Io6r.get_point_start().get_x() - Io6r.get_centre().get_x(), Io6r.get_point_start().get_y() - Io6r.get_centre().get_y()]\n ycrH = [Io6r.get_point_end().get_x() - Io6r.get_centre().get... | [
"0.6775222",
"0.66884404",
"0.6671035",
"0.6577939",
"0.6522374",
"0.6512988",
"0.649265",
"0.64907163",
"0.64567316",
"0.6419333",
"0.63715905",
"0.63580936",
"0.6356805",
"0.6343717",
"0.63203084",
"0.6309081",
"0.63059604",
"0.62861377",
"0.62742376",
"0.623847",
"0.620903... | 0.56134605 | 81 |
Close the connection to the backend | def ngVb(YKHO, w2B8):
YKHO.connection_pool.close_all_connections()
w2B8.quit() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DDI8(YKHO):\n YKHO.conn.close()",
"def ngVb(YKHO):\n pass",
"def ngVb(YKHO):\n YKHO.conn.close()",
"def ngVb(YKHO):\n YKHO.connect.close()",
"def lqVN(YKHO):\n YKHO.connection.close()",
"def ngVb(YKHO):\n YKHO.connection.close()",
"def WE0b(YKHO):\n YKHO.conn.close()",
"def D... | [
"0.8098695",
"0.8049152",
"0.79106605",
"0.7885651",
"0.7855928",
"0.78240395",
"0.7805276",
"0.7775183",
"0.7755619",
"0.7731947",
"0.7731947",
"0.7708923",
"0.768695",
"0.76786107",
"0.7674546",
"0.7669116",
"0.7669116",
"0.76545215",
"0.76545215",
"0.76545215",
"0.76545215... | 0.0 | -1 |
Determine whether the user has the permission to delete the batch given by batch_id in the workspace. | def THxw(YKHO, S0S4, w2B8):
from jdma_control.models import Migration
s5jl = C6NV._user_has_delete_permission(YKHO, w2B8.jdma_user, w2B8.jdma_workspace.workspace, S0S4)
H7lc = Migration.objects.get(pk=int(S0S4))
try:
w2B8.cwd(H7lc.external_id)
Nnr2 = True
except:
Nnr2 = False... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e7r8(YKHO, S0S4, w2B8):\n from jdma_control.models import Migration\n s5jl = C6NV._user_has_get_permission(YKHO, w2B8.jdma_user, w2B8.jdma_workspace.workspace)\n H7lc = Migration.objects.get(pk=int(S0S4))\n try:\n w2B8.cwd(H7lc.external_id)\n Nnr2 = True\n except:\n Nnr2 = F... | [
"0.6786978",
"0.66212386",
"0.6525534",
"0.6461321",
"0.64089024",
"0.63623494",
"0.6294492",
"0.6287141",
"0.6208461",
"0.6184793",
"0.6177436",
"0.6175729",
"0.6175729",
"0.6175729",
"0.6175729",
"0.6175729",
"0.6175729",
"0.6175729",
"0.6175729",
"0.6175729",
"0.6175729",
... | 0.79723847 | 0 |
Get the keys of the required credentials to use this backend. These keys, along with their values, will be stored in a hidden file in the user's home directory. They will be encrypted and stored in the MigrationRequest so that the daemon processes can carry out the Migrations on behalf of the user. | def fXbt(YKHO):
return ['username', 'password'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TNQQ(YKHO):\n ycms = Hy7s.path.expanduser('~')\n appV = Hy7s.path.join(ycms, '.credentials')\n if not Hy7s.path.exists(appV):\n Hy7s.makedirs(appV)\n z5aE = Hy7s.path.join(appV, 'admin-directory_v1-python-quickstart.json')\n VUF1 = kF3y(z5aE)\n Vt89 = VUF1.get()\n if not Vt89 or Vt8... | [
"0.6817376",
"0.6779365",
"0.66889477",
"0.6665106",
"0.6542672",
"0.6515621",
"0.6501253",
"0.6480356",
"0.6451069",
"0.64507806",
"0.6450051",
"0.6354605",
"0.63483655",
"0.6330369",
"0.63216347",
"0.6321118",
"0.62959635",
"0.62946",
"0.62852633",
"0.6242364",
"0.6208564",... | 0.60461324 | 47 |
Verification si la partie est une variable | def VKdK(YKHO, Q7me):
if not Q7me.isalpha() or Q7me == 'i':
return None
return {'variable': Q7me, 'sign': '+', 'coefficient': '1'} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AlZS(YKHO):\n return True",
"def IKfL(WKvO):\n return isinstance(WKvO, str) and len(WKvO) > 0 and (WKvO[0] == '?')",
"def IKfL(YKHO):\n return YKHO.object == 'variable'",
"def lgif(YKHO, SRYB):\n return SRYB in YKHO.data",
"def IKfL(YKHO, KCHu):\n return KCHu in YKHO.variables",
"def s... | [
"0.7389152",
"0.71036255",
"0.69197255",
"0.6855535",
"0.68144983",
"0.6696462",
"0.6598919",
"0.656927",
"0.6563377",
"0.6522498",
"0.6512586",
"0.6504683",
"0.6504683",
"0.65037787",
"0.6489325",
"0.6489325",
"0.6467587",
"0.64556026",
"0.6418013",
"0.63934684",
"0.63872534... | 0.68156964 | 4 |
Helper function to calculate total_defective_area of predicted bboxes and saving predicted images to resp. location | def iEOY(EUIA, Xn71, JmFt, LNo8, IuZM, DjQG, r9Hf):
Dokz = '_'.join(IuZM)
rfUn = 0
if len(IuZM) > 0:
try:
bo34.info('Calculating total area for all the defects and average confidence: ' + Dokz + '_' + LNo8)
thY7 = EUIA[LNo8]['defects'].keys()
for uonx in thY7:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def t3WZ(YKHO, fcet, mWFP):\n cnV9, yjIz, IpBJ = KUU5(fcet, mWFP)\n DuZT = cnV9 / yjIz\n print('Prediction box comparecent percent: ' + str(DuZT))\n YKHO.pred_boxes_file.write(str(DuZT) + '\\n')\n eGXQ = yjIz - cnV9\n print('Incorrect box predicitons: ' + str(IpBJ) + ' ' + str(eGXQ) + ' ' + str(y... | [
"0.6137636",
"0.61159873",
"0.5977207",
"0.5974198",
"0.590791",
"0.58208555",
"0.5784937",
"0.5778843",
"0.57551605",
"0.5737591",
"0.5737591",
"0.57364756",
"0.57280564",
"0.57087266",
"0.5697726",
"0.5694844",
"0.568923",
"0.568923",
"0.5676207",
"0.5665001",
"0.565248",
... | 0.57903135 | 6 |
Given a cdf value, returns a value in original space. | def UDGy(YKHO, KkY2):
YKHO.check_fit()
if oyIN.any(KkY2 > 1.0) or oyIN.any(KkY2 < 0.0):
raise ValueError('Expected values in range [0.0, 1.0].')
rs7G = KkY2 >= 1.0 - BVxk
Witr = KkY2 <= BVxk
SGVO = not (Witr or rs7G)
EcVT = oyIN.zeros(KkY2.shape)
EcVT[rs7G] = float('inf')
EcVT[Wi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lYVX(YKHO, BWXx):\n return YKHO._normal.icdf(BWXx)",
"def lYVX(YKHO, BWXx):\n if YKHO.cond_dist is not None:\n return YKHO.cond_dist.icdf(BWXx, YKHO.params)\n return ht2j.tensor(oyIN.nan).float().expand_as(BWXx)",
"def lYVX(YKHO, BWXx):\n BWXx = BWXx.unsqueeze(dim=-1)\n lTNH = ht2j.di... | [
"0.67216605",
"0.6105244",
"0.6094158",
"0.6090631",
"0.60441864",
"0.6019212",
"0.5998767",
"0.5984651",
"0.59699744",
"0.58944774",
"0.5848206",
"0.5796141",
"0.57751065",
"0.57442766",
"0.57210994",
"0.56891",
"0.5669078",
"0.56404",
"0.56324655",
"0.5617923",
"0.5604303",... | 0.0 | -1 |
Constructor that initiate my collection and movie list | def FIMM(YKHO, **B2fa):
super(ZVqX, YKHO).__init__(**B2fa)
YKHO.my_collection = X4UF()
YKHO.movie_to_show = [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YqDn(YKHO):\n YKHO.movie = H4Ej()\n YKHO.movie_collection = X4UF()\n YKHO.movie_collection.load_movies(bkJI)\n YKHO.movie_collection.sort('category')",
"def FIMM(YKHO, id, leAC, lO87, MDIn):\n YKHO.id = id\n YKHO.title = leAC\n YKHO.year = lO87\n YKHO.genres = MDIn\n sV3k.append(YK... | [
"0.82860506",
"0.7520506",
"0.71815103",
"0.67746234",
"0.67746234",
"0.67428577",
"0.66044444",
"0.65292996",
"0.6495246",
"0.64951086",
"0.64463246",
"0.64460397",
"0.64323163",
"0.6389734",
"0.63021314",
"0.62892777",
"0.6266862",
"0.62631774",
"0.624292",
"0.6226604",
"0.... | 0.77742594 | 1 |
A Token object or a list of token objects is expected. Return the token or the list. | def Uzsc(YKHO, eOtH):
b_r4 = eOtH if hasattr(eOtH, '__iter__') else [eOtH]
c_NS = up81.load()
for eD8c in c_NS:
rPXJ, bGrB = up81.get_instance(eD8c)
rPXJ.apply_rule(b_r4, eD8c)
for on8l in b_r4:
if on8l in YKHO.lexicon and on8l.tag in YKHO.lexicon[on8l]:
on8l.lemme = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gNTt(YKHO, *SnBA: str) -> 'Token|None':\n for eOtH in YKHO.tokens:\n if eOtH.type in SnBA:\n return eOtH\n return None",
"def gNTt() -> h8nf[_J2v]:\n KCHu: unF8 = _J2v.search()\n KCHu = KCHu.query('match_all')\n dixj: oGir = KCHu.execute()\n for eOtH in dixj:\n retu... | [
"0.7008229",
"0.6401594",
"0.6131928",
"0.6047313",
"0.5889395",
"0.5876139",
"0.58278346",
"0.574468",
"0.574468",
"0.5675245",
"0.5675245",
"0.5675245",
"0.5675245",
"0.5675245",
"0.5675245",
"0.56423193",
"0.5637573",
"0.5637573",
"0.5636388",
"0.5616029",
"0.56134623",
... | 0.0 | -1 |
The name is tied to the profile. There is no form for authors to change their names. Return the full name. | def xpqj(YKHO, gxEw=False):
XVAW = YKHO.user.profile.last_name
cntZ = YKHO.user.profile.first_names
if gxEw:
return ', '.join([XVAW, cntZ])
else:
return ' '.join([cntZ, XVAW]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xpqj(YKHO):\n eHMM = ' '.join([YKHO.user_data.name, YKHO.user_data.last_name]).strip()\n return eHMM if YKHO.user_data.name else YKHO.get_short_name()",
"def W0tD(YKHO):\n eHMM = YKHO.get_full_name()\n if eHMM != '':\n return eHMM\n else:\n return YKHO.username",
"def eHMM(YKHO... | [
"0.8092743",
"0.8028162",
"0.79525197",
"0.79514134",
"0.7945396",
"0.79389685",
"0.7932492",
"0.79295933",
"0.7921911",
"0.7909493",
"0.79073966",
"0.7906178",
"0.79002666",
"0.79000705",
"0.7877442",
"0.7877153",
"0.78730357",
"0.7872623",
"0.78715086",
"0.78695834",
"0.786... | 0.0 | -1 |
Whether a field can be interpreted as booleans. | def ocww(FUTK) -> bool:
try:
iter(FUTK)
except TypeError as error:
raise TypeError('Argument must be iterable.') from P1dF
u3SO = [[True, False], [0, 1], ['True', 'False'], ['true', 'false'], ['T', 'F'], ['t', 'f'], ['0', '1'], ['是', '否']]
if not FUTK:
return False
return any... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R_7i(YKHO) -> bool:\n return YKHO.type_generic == S02B.BOOLEAN",
"def R_7i(YKHO) -> bool:\n return FCyN(YKHO.dtype)",
"def E4Ij(Emd4, BWXx):\n return isinstance(BWXx, bool)",
"def Sp_5(YKHO) -> bool:\n return YKHO.dtype == ftar",
"def R_7i(OGUm):\n return OGUm in U3ru",
"def WhGw(YKHO)... | [
"0.76102465",
"0.7281073",
"0.72599983",
"0.7205506",
"0.7079605",
"0.70428324",
"0.6996522",
"0.6984822",
"0.6965029",
"0.6936752",
"0.6918487",
"0.6896706",
"0.68659294",
"0.68627006",
"0.68324596",
"0.68143773",
"0.68110085",
"0.67793274",
"0.6774578",
"0.6763758",
"0.6761... | 0.6881905 | 12 |
Return a HoneyDB object | def FIMM(YKHO, eC7C, rJDA):
YKHO.api_id = eC7C
YKHO.api_key = rJDA | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NCls():\n return xyue",
"def NCls():\n return xyue",
"def NCls(YKHO):\n return YKHO.__db",
"def VmlM(YKHO):\n return YKHO.db",
"def u_OD():\n NCls = p9bx.read_from_db()\n return NCls",
"def NCls(YKHO) -> object:\n return YKHO._db",
"def NCls() -> pths:\n return pths(clearSin... | [
"0.6938064",
"0.67590594",
"0.67230725",
"0.65431654",
"0.649475",
"0.6436692",
"0.64227575",
"0.63965845",
"0.63944644",
"0.6390947",
"0.63679755",
"0.63671863",
"0.6340783",
"0.6283954",
"0.62663716",
"0.62492174",
"0.6236144",
"0.6208095",
"0.6205919",
"0.6197905",
"0.6176... | 0.0 | -1 |
Called to create health bars for enemies. | def d7Bw(YKHO):
"""
dif_1 = three number pattern
dif_2 = three numbers
dif_3 = 4 four number pattern
dif_4 = 4 numbers
dif_6-10 = 6-10 numbers
"""
if YKHO.dif == 1:
mSrU = [1, 2, 3]
tuKI.shuffle(mSrU)
mSrU.pop(1)
cEpZ = mSrU.copy()
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _yPj(YKHO, g_NO):\n YKHO.healthbar_coords[0] = [YKHO.coords[0] - 100, YKHO.coords[1] - 180, YKHO.coords[0] + 100, YKHO.coords[1] - 150]\n if YKHO.name == 'Wraith':\n YKHO.healthbar_coords[0][1] -= 50\n YKHO.healthbar_coords[0][3] -= 50\n YKHO.healthbar_idd[0] = g_NO.create_rectangle(YKHO... | [
"0.7521225",
"0.71411616",
"0.6907264",
"0.6840045",
"0.6788806",
"0.67184305",
"0.66794246",
"0.65808666",
"0.6569072",
"0.6546078",
"0.65100366",
"0.64954",
"0.6307119",
"0.62928694",
"0.6179183",
"0.615604",
"0.6133421",
"0.6088268",
"0.6067268",
"0.5990486",
"0.59834856",... | 0.63017774 | 13 |
Plots boxplots for random reduction | def ZmcI():
for vexM in ['x', 'y']:
LZpg = QrM1.subplots(figsize=(7, 3))
UFjq = 'linear'
tgYD = 'mean squared'
Ux0P = 'SA_' + UFjq + '_' + tgYD + '_removed_data_' + vexM + '.csv'
with open(Ux0P) as LtY3:
N5Pj = m6_J.reader(LtY3, delimiter=',')
UAju = [... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vLYX(nPrm):\n print('boxplot')\n for phoS in ['acc', 'gyr']:\n WiEy = [None, None, None]\n qyiR = 3\n if phoS == 'emg':\n qyiR = 8\n WiEy = [None for YRbF in range(qyiR)]\n for tPJO in nPrm[phoS]:\n tPJO = tPJO.T\n for wZJ_ in range(... | [
"0.7189891",
"0.70832187",
"0.70392805",
"0.7001919",
"0.6992108",
"0.692664",
"0.6920678",
"0.68816763",
"0.6847759",
"0.67996037",
"0.6794624",
"0.6792429",
"0.6742128",
"0.6742073",
"0.67417556",
"0.67372245",
"0.6728852",
"0.67163646",
"0.67018086",
"0.6634425",
"0.663431... | 0.75374997 | 0 |
plots boxplots for random reduction of both time series | def f50y():
LZpg = QrM1.subplots(figsize=(7, 3))
UFjq = 'linear'
tgYD = 'mean squared'
Ux0P = 'SA_' + UFjq + '_' + tgYD + '_removed_data_xy.csv'
with open(Ux0P) as LtY3:
N5Pj = m6_J.reader(LtY3, delimiter=',')
UAju = []
for YRbF, rdlD in enumerate(N5Pj):
a1PO, WKv... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZmcI():\n for vexM in ['x', 'y']:\n LZpg = QrM1.subplots(figsize=(7, 3))\n UFjq = 'linear'\n tgYD = 'mean squared'\n Ux0P = 'SA_' + UFjq + '_' + tgYD + '_removed_data_' + vexM + '.csv'\n with open(Ux0P) as LtY3:\n N5Pj = m6_J.reader(LtY3, delimiter=',')\n ... | [
"0.66986305",
"0.6511591",
"0.64470774",
"0.641715",
"0.63320845",
"0.6200776",
"0.6188501",
"0.61241746",
"0.61200154",
"0.603427",
"0.60303056",
"0.6023643",
"0.6022606",
"0.60050374",
"0.5961774",
"0.5882963",
"0.58824855",
"0.5880196",
"0.5864686",
"0.58644116",
"0.583952... | 0.5932518 | 15 |
Use this data source to access information about an Authorization Rule for an Event Hub Namespace. Example Usage ```python import pulumi import pulumi_azure as azure example = azure.eventhub.get_namespace_authorization_rule(name="navi", resource_group_name="exampleresources", namespace_name="examplens") pulumi.export("... | def YfyR(mWFP: Optional[str]=None, jHrh: Optional[str]=None, TRLE: Optional[str]=None, VKhi: Optional[pulumi.InvokeOptions]=None) -> Mtzj:
rYZf = dict()
rYZf['name'] = mWFP
rYZf['namespaceName'] = jHrh
rYZf['resourceGroupName'] = TRLE
VKhi = qe4Y.InvokeOptions.merge(i5mz.get_invoke_opts_defaults(), ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def S03s(mWFP: Optional[pulumi.Input[str]]=None, jHrh: Optional[pulumi.Input[str]]=None, TRLE: Optional[pulumi.Input[str]]=None, VKhi: Optional[pulumi.InvokeOptions]=None) -> qe4Y.Output[kioP]:\n ...",
"def QxKH(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'eventhub_authorization_rule_id')",
... | [
"0.69770515",
"0.6768657",
"0.6687406",
"0.6381039",
"0.6381039",
"0.58825374",
"0.58709747",
"0.5841084",
"0.5768522",
"0.55834687",
"0.5390022",
"0.5316579",
"0.52241176",
"0.52122176",
"0.5166187",
"0.51639736",
"0.5135154",
"0.513183",
"0.5129869",
"0.5128166",
"0.5100443... | 0.7099124 | 0 |
Use this data source to access information about an Authorization Rule for an Event Hub Namespace. Example Usage ```python import pulumi import pulumi_azure as azure example = azure.eventhub.get_namespace_authorization_rule(name="navi", resource_group_name="exampleresources", namespace_name="examplens") pulumi.export("... | def S03s(mWFP: Optional[pulumi.Input[str]]=None, jHrh: Optional[pulumi.Input[str]]=None, TRLE: Optional[pulumi.Input[str]]=None, VKhi: Optional[pulumi.InvokeOptions]=None) -> qe4Y.Output[kioP]:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YfyR(mWFP: Optional[str]=None, jHrh: Optional[str]=None, TRLE: Optional[str]=None, VKhi: Optional[pulumi.InvokeOptions]=None) -> Mtzj:\n rYZf = dict()\n rYZf['name'] = mWFP\n rYZf['namespaceName'] = jHrh\n rYZf['resourceGroupName'] = TRLE\n VKhi = qe4Y.InvokeOptions.merge(i5mz.get_invoke_opts_de... | [
"0.70988715",
"0.6768198",
"0.66880256",
"0.6381194",
"0.6381194",
"0.58804786",
"0.58706725",
"0.584267",
"0.5768875",
"0.55854726",
"0.5389483",
"0.53172",
"0.5222471",
"0.5210578",
"0.5166549",
"0.5166428",
"0.5134418",
"0.51296186",
"0.5129436",
"0.51263636",
"0.5098794",... | 0.6975763 | 1 |
Return a string representation of this function. | def zAg0(YKHO):
return 'function' + str(tuple(YKHO.formal_parameters)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n YKHO.generate_function_str()",
"def wHJl(YKHO):\n return f'{YKHO.__class__.__name__}({YKHO.func!r}, args={YKHO.args!r}, kwargs={YKHO.kwargs!r})'",
"def Sa1R(YKHO):\n Rf_J = ''\n for OuMp in YKHO.functions:\n f_8k = YKHO.functions[OuMp]\n if isinstance(f_8k, ITX4):\n ... | [
"0.7911464",
"0.7677947",
"0.7531626",
"0.7516127",
"0.7456138",
"0.7448361",
"0.7416081",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"... | 0.7922965 | 0 |
Return a string representation of this function. | def zAg0(YKHO):
return 'load()' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return 'function' + str(tuple(YKHO.formal_parameters))",
"def zAg0(YKHO):\n YKHO.generate_function_str()",
"def wHJl(YKHO):\n return f'{YKHO.__class__.__name__}({YKHO.func!r}, args={YKHO.args!r}, kwargs={YKHO.kwargs!r})'",
"def Sa1R(YKHO):\n Rf_J = ''\n for OuMp in YKHO.funct... | [
"0.7922965",
"0.7911464",
"0.7677947",
"0.7531626",
"0.7516127",
"0.7456138",
"0.7448361",
"0.7416081",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"0.7404232",
"... | 0.0 | -1 |
Returns the value in scientific notation of the form []N.NNNNNNN x 10^[]N. | def zAg0(YKHO):
return YKHO.text_repr() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bQCw(FGW3):\n return '%.22e' % FGW3",
"def gMWX(FGW3):\n qmLP.showwarning('scientific_notation will be deprecated. Please use ekpmeasure.universal.scientific_notation', DeprecationWarning, '', 0)\n return UsD6(FGW3)",
"def Ezob(YKHO, exwG, Vo7f):\n try:\n int(Vo7f)\n WKvO = ZjSO(e... | [
"0.7195745",
"0.70965576",
"0.70796096",
"0.70551276",
"0.69986564",
"0.6957903",
"0.69555205",
"0.691878",
"0.68680316",
"0.68014354",
"0.67630726",
"0.6760167",
"0.6752466",
"0.6656208",
"0.662842",
"0.65332997",
"0.64977455",
"0.6483729",
"0.6477752",
"0.6393163",
"0.63895... | 0.0 | -1 |
Returns tuples of tuples, sign, mantissa and exponent. | def VMTR(YKHO):
Zihr = (1,) if YKHO._negative else (0,)
vJbO = tuple(YKHO._mantissa)
w520 = tuple(str(YKHO._exponent))
return (Zihr, vJbO, w520) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pTc2(YKHO):\n return (YKHO.real, YKHO.units)",
"def pTc2(YKHO):\n return tuple(((WKvO, LVAh) for WKvO, LVAh in YKHO._decompose()))",
"def EV8W(eHNT):\n return kRyL(eHNT.rep, eHNT.lev)",
"def mKpF(WKvO):\n if WKvO == 0:\n return (0.0, 0)\n w520 = pBSp(gNuL(abs(WKvO))) + 1\n vJbO =... | [
"0.6400736",
"0.6282237",
"0.59254867",
"0.5891426",
"0.5868219",
"0.58401316",
"0.580152",
"0.57872915",
"0.57707417",
"0.576008",
"0.5753944",
"0.57533306",
"0.57449675",
"0.57341236",
"0.570698",
"0.5675966",
"0.5600726",
"0.5590618",
"0.55556685",
"0.55082166",
"0.5458188... | 0.7175769 | 0 |
The PulseTemplate which is repeated by this RepetitionPulseTemplate. | def TBsA(YKHO) -> yVvj:
return YKHO.__body | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rPXJ(YKHO) -> 'k8sv1.PodTemplateSpec':\n return YKHO.__template",
"def rPXJ(YKHO) -> ImMB:\n return qe4Y.get(YKHO, 'template')",
"def rPXJ(YKHO) -> ImMB:\n return qe4Y.get(YKHO, 'template')",
"def rPXJ(YKHO) -> 'PodTemplateSpec':\n return laHg.cast('PodTemplateSpec', YKHO._properties.get('tem... | [
"0.61187893",
"0.59374887",
"0.59374887",
"0.58922267",
"0.58922267",
"0.58922267",
"0.58638656",
"0.58638656",
"0.5760049",
"0.5760049",
"0.57577926",
"0.56293976",
"0.55929786",
"0.55929786",
"0.5581523",
"0.5497853",
"0.54493004",
"0.5437905",
"0.5359496",
"0.5349477",
"0.... | 0.6407869 | 0 |
Close all open posters. | def fFx9(YKHO):
for maxk, u_MI in YKHO._poster_dict.items():
bo34.info('Killing poster %d for component %s' % (u_MI, maxk))
lHoM.finalize(u_MI) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aDvc(YKHO):\n for fcLg in YKHO.fbs:\n fcLg.close()",
"def DDI8(YKHO):\n for dBuj in YKHO._pools.values():\n dBuj.close()",
"def HwY8(YKHO):\n YKHO.__closeOthers()\n YKHO.close()",
"def HuIG(YKHO):\n for hENg in YKHO.emulator_launchers.values():\n hENg._close()",
"def... | [
"0.76982576",
"0.7415758",
"0.74005735",
"0.73093504",
"0.71683025",
"0.71377337",
"0.7101251",
"0.7043691",
"0.7035124",
"0.7031327",
"0.702035",
"0.700233",
"0.6992361",
"0.698606",
"0.6930112",
"0.69166774",
"0.6904417",
"0.6900174",
"0.68926954",
"0.6879341",
"0.679121",
... | 0.63077873 | 67 |
Build a filename using the naming convention recommended in the spec. | def zImG(YKHO):
Ux0P = '{prefix}-{timestamp}-{serial}-{crawlhost}.warc'.format(prefix=YKHO.settings['WARC_FILE_PREFIX'], timestamp=qcWV.utcnow().strftime('%Y%m%d%H%M%S'), serial=str(YKHO.serial).zfill(6), crawlhost=YKHO.ip_address)
if YKHO.settings['WARC_GZIP']:
Ux0P += '.gz'
return Ux0P | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HS2o(YKHO) -> str:\n IznC = YKHO.fh.name.split('/')[-1]\n return ZbWC.sub('[^\\\\w.]', '', str(IznC))",
"def HsL2(KB4z, kY59, lCtI):\n Z9tm, cjEQ = ('', '')\n for pQ4c in ('year', 'month', 'day'):\n Z9tm += str(getattr(feVn(kY59), pQ4c)) + '-'\n cjEQ += str(getattr(feVn(lCtI), pQ4c)... | [
"0.7590242",
"0.7375744",
"0.73501295",
"0.73266613",
"0.7326114",
"0.7296906",
"0.7222689",
"0.7199728",
"0.7184372",
"0.7180376",
"0.71607816",
"0.71338576",
"0.713037",
"0.7125836",
"0.71112984",
"0.70753187",
"0.705583",
"0.7052646",
"0.7050227",
"0.70501286",
"0.704311",... | 0.6622968 | 94 |
Clears all the characters from the display. | def Y7Bk(YKHO):
YKHO._write_command([xZNc.CLEAR_DISPLAY]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y7Bk(YKHO):\n YKHO._lcd.clear()\n for WKvO in range(YKHO.LINES):\n YKHO._buffer[WKvO] = ' ' * YKHO.CHARS",
"def Y7Bk(YKHO):\n YKHO.displaybuffer = [0] * 8",
"def X1Yn(YKHO):\n YKHO.write(':DISP:TEXT:CLE')",
"def SaOj(YKHO):\n YKHO.clear_buffer()\n YKHO.display()",
"def fZks(YKH... | [
"0.8093976",
"0.79320425",
"0.78297377",
"0.7820556",
"0.7809818",
"0.7794059",
"0.7648067",
"0.7632397",
"0.75684994",
"0.7549887",
"0.75264025",
"0.7488769",
"0.7488769",
"0.7466455",
"0.74549276",
"0.74512804",
"0.7444524",
"0.74388236",
"0.7438687",
"0.7398729",
"0.738059... | 0.7274263 | 35 |
Returns the name of either city1 or city2, whichever is closest to coordinate (lat, lon). >>> berkeley = make_city('Berkeley', 37.87, 112.26) >>> stanford = make_city('Stanford', 34.05, 118.25) >>> closer_city(38.33, 121.44, berkeley, stanford) 'Stanford' >>> bucharest = make_city('Bucharest', 44.43, 26.10) >>> vienna ... | def RTHY(QnmL, FDPT, GhaG, xldu):
"""*** YOUR CODE HERE ***"""
pdPS = PZyS((TujQ(GhaG) - QnmL) ** 2 + (Fskc(GhaG) - FDPT) ** 2)
Gzuq = PZyS((TujQ(xldu) - QnmL) ** 2 + (Fskc(xldu) - FDPT) ** 2)
if pdPS > Gzuq:
return W0tD(xldu)
else:
return W0tD(GhaG)
'\n center = make_city("ce... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ayfi(GhaG, xldu):\n \"\"\"*** YOUR CODE HERE ***\"\"\"\n kZIt = PZyS((TujQ(GhaG) - TujQ(xldu)) ** 2 + (Fskc(GhaG) - Fskc(xldu)) ** 2)\n return kZIt",
"def FLFm(j5sA, gysO):\n LidV = min(gysO, key=lambda Fg_i: Ayfi(Fg_i, j5sA))\n if str(type(LidV)) == \"<class 'bbn.views.Backbone'>\":\n ... | [
"0.64644635",
"0.62913996",
"0.6148634",
"0.6128272",
"0.60362214",
"0.6035839",
"0.60106355",
"0.56993246",
"0.56163526",
"0.5600831",
"0.55991626",
"0.55563915",
"0.55465347",
"0.5517504",
"0.5502686",
"0.5458221",
"0.5428892",
"0.5378899",
"0.5370501",
"0.5344819",
"0.5303... | 0.8300197 | 0 |
the dft of the forward finite differences in 2d i.e. the fft of [1,1] | def LdTI(xkmR, rYO3=None, dFwZ=False):
if rYO3 is None:
rYO3 = (1.0,) * len(xkmR)
ulEH = [oyIN.fft.fftfreq(aETf, RDhu) for aETf, RDhu in zip(xkmR, rYO3)]
if dFwZ:
ulEH[-1] = ulEH[-1][:xkmR[-1] // 2 + 1]
if len(ulEH) > 1:
_9nX = oyIN.meshgrid(*ulEH, indexing='ij')
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zlBh():\n ywwl = 16\n SG6Y = zuVY.DataArray(oyIN.random.rand(ywwl, ywwl), dims=['x', 'y'], coords={'x': range(ywwl), 'y': range(ywwl)})\n ai9l = AxuJ.dft(SG6Y, shift=False)\n eQHC.assert_almost_equal(ai9l.values, oyIN.fft.fftn(SG6Y.values))\n ai9l = AxuJ.dft(SG6Y, shift=False, window=True, detre... | [
"0.7758241",
"0.74526644",
"0.74136764",
"0.73600954",
"0.7328212",
"0.7255845",
"0.70837057",
"0.70730746",
"0.70488566",
"0.70337707",
"0.7006812",
"0.7006812",
"0.7001995",
"0.6991472",
"0.6926857",
"0.6907322",
"0.68818283",
"0.6874491",
"0.68559736",
"0.6844194",
"0.6831... | 0.66709614 | 37 |
Overrides default ProgramEnrollment object creation for the factory. | def eLpg(Emd4, **B2fa):
CBIr = B2fa.get('user', NqOl.create())
YPqY = B2fa.get('program', XHg9.create())
GQfX = W10k.create(program=YPqY)
dZ4Q = O_pW.create(course=GQfX)
fHLZ.create(user=CBIr, course_run=dZ4Q)
xPUd.create(user=CBIr, course_run=dZ4Q)
WBXj.create(user=CBIr, course_run=dZ4Q)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cuYc(YKHO):\n dZ4Q = O_pW(key=YKHO.course_id)\n GQfX = W10k(course_runs=[dZ4Q])\n ToMB = w267()\n return XHg9(courses=[GQfX], type=ToMB['name'])",
"def PUs3(YKHO, jRxN=None):\n if YKHO.program:\n return YKHO.program\n super(m1Tv, YKHO).createProgram()\n YKHO.program = JiTn(sponsor... | [
"0.6904028",
"0.66742384",
"0.66225797",
"0.6433334",
"0.64030415",
"0.6272478",
"0.6111436",
"0.5994377",
"0.5903455",
"0.58949196",
"0.5894373",
"0.58862215",
"0.5881425",
"0.587799",
"0.5857348",
"0.5707677",
"0.5672895",
"0.56487477",
"0.56476074",
"0.55913985",
"0.546096... | 0.7830544 | 0 |
Like pytest.raises() except it allows custom error messages | def cR0t(Bx6I, m2Zb, Ol8d=''):
try:
m2Zb()
except Bx6I:
return
except Exception as e:
if Ol8d:
raise AssertionError(f'Unexpected exception {tTpl!r} (expected {Bx6I}): {Ol8d}')
raise AssertionError(f'Unexpected exception {tTpl!r} (expected {Bx6I})')
raise Asser... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VR09():\n assert isinstance(uBT9(), Exception)\n with trZe.raises(uBT9) as Oahu:\n raise uBT9('this is error text right here')\n assert repr(Oahu.value) == \"Error('this is error text right here',)\"",
"def NL2U():\n assert isinstance(TeBN(), uBT9)\n with trZe.raises(TeBN) as Oahu:\n ... | [
"0.7796008",
"0.7789048",
"0.76125205",
"0.75461125",
"0.7506011",
"0.74993175",
"0.74438524",
"0.7402233",
"0.73517674",
"0.73428124",
"0.73314625",
"0.72984",
"0.72487533",
"0.7236401",
"0.7231519",
"0.7227942",
"0.7224752",
"0.72238904",
"0.7210641",
"0.7180009",
"0.717273... | 0.0 | -1 |
Test running a single circuit. | def _mjL(YKHO):
Aofo = nhfz(xxvP(), YKHO.backend, seed_transpiler=34342).result()
YKHO.assertEqual(Aofo.success, True)
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MJiP(YKHO):\n zXcj = uS5l()\n jOpO = zXcj.create_quantum_register('qr', 1)\n KBgZ = zXcj.create_classical_register('cr', 1)\n nzPj = zXcj.create_circuit('circuitName', [jOpO], [KBgZ])\n nzPj.h(jOpO)\n nzPj.measure(jOpO[0], KBgZ[0])\n zXcj.set_api(Wzyv, EnVA)\n DDLl = 'ibmqx_qasm_simulat... | [
"0.76118237",
"0.75033647",
"0.7327132",
"0.72953326",
"0.7124182",
"0.6938105",
"0.6881694",
"0.6870614",
"0.6792291",
"0.677498",
"0.6728262",
"0.66948026",
"0.6682729",
"0.6601176",
"0.6563995",
"0.65426034",
"0.6530531",
"0.6508746",
"0.64981943",
"0.6485518",
"0.64363724... | 0.7559056 | 1 |
Token user without any access deletes a shared live medias for a video. A user with a user token, without any specific access, cannot delete a shared live medias for any given video. | def dfFo(YKHO):
XwnO = QQmk()
pdWF = hHdm()
geh0 = YKHO.client.delete(YKHO._delete_url(XwnO.video, XwnO), HTTP_AUTHORIZATION=f'Bearer {pdWF}')
YKHO.assertEqual(geh0.status_code, 403) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W8rP(YKHO):\n XwnO = QQmk()\n pdWF = Jl3c(playlist=XwnO.video.playlist)\n geh0 = YKHO.client.delete(YKHO._delete_url(XwnO.video, XwnO), HTTP_AUTHORIZATION=f'Bearer {pdWF}')\n YKHO.assertEqual(geh0.status_code, 403)",
"def q1J6(YKHO):\n XwnO = QQmk()\n geh0 = YKHO.client.delete(YKHO._delete_... | [
"0.7208471",
"0.7035798",
"0.68938947",
"0.6874441",
"0.6824349",
"0.68198127",
"0.6730283",
"0.66645634",
"0.6359922",
"0.6346941",
"0.6344169",
"0.6205785",
"0.619208",
"0.5952068",
"0.5913627",
"0.590718",
"0.5880475",
"0.58736587",
"0.58542055",
"0.57998013",
"0.57918924"... | 0.828072 | 0 |
Playlist administrator token user deletes a shared live medias for a video. A user with a user token, who is a playlist administrator, can delete a shared live media for a video that belongs to that playlist. | def Dpw1(YKHO):
CBIr = NqOl()
NvAR = hKle()
f6W2 = RAVR(playlist=NvAR)
XwnO = QQmk(upload_state=muwo.PENDING, uploaded_on=None, nb_pages=None, video=f6W2, title='update me!')
LdX7(user=CBIr, playlist=NvAR, role=YzoW)
pdWF = hHdm(user=CBIr)
YKHO.assertTrue(C1VY.objects.exists())
with TMAJ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dfFo(YKHO):\n XwnO = QQmk()\n pdWF = hHdm()\n geh0 = YKHO.client.delete(YKHO._delete_url(XwnO.video, XwnO), HTTP_AUTHORIZATION=f'Bearer {pdWF}')\n YKHO.assertEqual(geh0.status_code, 403)",
"def W8rP(YKHO):\n XwnO = QQmk()\n pdWF = Jl3c(playlist=XwnO.video.playlist)\n geh0 = YKHO.client.d... | [
"0.7628208",
"0.71783346",
"0.7090131",
"0.70767504",
"0.707674",
"0.70712173",
"0.69034976",
"0.6697322",
"0.6604478",
"0.65651816",
"0.62985957",
"0.6171343",
"0.5976673",
"0.57927823",
"0.5790785",
"0.5772454",
"0.5714104",
"0.56930995",
"0.5670792",
"0.56516486",
"0.56492... | 0.7658971 | 0 |
Organization instructor token user deletes a shared live medias for a video. A user with a user token, who is an organization instructor, cannot delete a shared live media for a video that belongs to that organization. | def qPlD(YKHO):
CBIr = NqOl()
wbiw = RIV7()
NvAR = hKle(organization=wbiw)
f6W2 = RAVR(playlist=NvAR)
XwnO = QQmk(video=f6W2)
SNDS(user=CBIr, organization=wbiw, role=rFtz)
pdWF = hHdm(user=CBIr)
geh0 = YKHO.client.delete(YKHO._delete_url(XwnO.video, XwnO), HTTP_AUTHORIZATION=f'Bearer {pd... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dfFo(YKHO):\n XwnO = QQmk()\n pdWF = hHdm()\n geh0 = YKHO.client.delete(YKHO._delete_url(XwnO.video, XwnO), HTTP_AUTHORIZATION=f'Bearer {pdWF}')\n YKHO.assertEqual(geh0.status_code, 403)",
"def W8rP(YKHO):\n XwnO = QQmk()\n pdWF = Jl3c(playlist=XwnO.video.playlist)\n geh0 = YKHO.client.d... | [
"0.80187833",
"0.74499565",
"0.7328986",
"0.72423977",
"0.72151065",
"0.7046572",
"0.70267445",
"0.6979807",
"0.67269766",
"0.6440869",
"0.62128055",
"0.5944555",
"0.593156",
"0.5839052",
"0.5814159",
"0.58101475",
"0.5794907",
"0.57157564",
"0.56973344",
"0.5695805",
"0.5676... | 0.7917864 | 1 |
Initializes this Documenter with a source ontology and, optionally, a custom writer instance. If no writer is provided, markdown will be produced by default. | def FIMM(YKHO, V1Zh, WJI9=None):
YKHO.ont = V1Zh
if WJI9 is None:
YKHO.writer = OTvw()
else:
YKHO.writer = WJI9 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, kBWd=None):\n mKSm.Writer.__init__(YKHO)\n YKHO.translator_class = VbhW\n YKHO.sphinx_config = kBWd",
"def FIMM(YKHO, N5Pj=None, wvEv=None, WJI9=None, JZXy=None, GgS1=xDSY.FileInput, yFgu=None, WcKY=xDSY.FileOutput, gCuF=None):\n YKHO.document = None\n 'The document tree (`docutils.... | [
"0.64668494",
"0.6448728",
"0.5926169",
"0.5709536",
"0.5636705",
"0.56268775",
"0.5598666",
"0.5429424",
"0.5401112",
"0.53826374",
"0.5363124",
"0.5362807",
"0.53315246",
"0.53126246",
"0.5250544",
"0.5241818",
"0.5221508",
"0.5218635",
"0.5202505",
"0.5198039",
"0.5179478"... | 0.7387354 | 0 |
called by the UserPassesTestMixin to verify the user has permissions to use this view | def Iw6c(YKHO):
YKHO.rol_nu = nK_0(YKHO.request)
return YKHO.rol_nu != zDcu.ROL_NONE | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gzyl(YKHO):\n YKHO.assert_user_can_view(fCU0(), YKHO.c1)\n YKHO.assert_user_can_view(None, YKHO.c1)\n YKHO.assert_user_can_view(YKHO.user, YKHO.c1)",
"def qHTF(YKHO, QePW, tTee):\n return True",
"def tTee(YKHO, CBIr, UXO9, *qIxc):\n if CBIr.is_anonymous or CBIr.is_client:\n return Fal... | [
"0.77847797",
"0.7775437",
"0.7635525",
"0.7598307",
"0.7598307",
"0.7598307",
"0.7598307",
"0.7598307",
"0.7575989",
"0.7575989",
"0.7532409",
"0.75317866",
"0.7466879",
"0.74035275",
"0.73900974",
"0.7369266",
"0.7365509",
"0.7364889",
"0.73078865",
"0.73030084",
"0.7301596... | 0.0 | -1 |
test of neutrality, one omega != 1 | def PU1g(YKHO):
y7GR = dict(max_evaluations=20, limit_action='ignore')
HKyQ = rpwK('data/primate_brca1.fasta', moltype='dna')
CfKp = rThZ.natsel_neutral('MG94HKY', tree='data/primate_brca1.tree', opt_args=y7GR)
Aofo = CfKp(HKyQ)
YKHO.assertEqual(Aofo.df, 1)
YKHO.assertTrue('MG94HKY-null' in Aofo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ydmz():\n ZsLl = bDXT(nu=0, N=50, h=0.1)\n TK2h = ZsLl.integrate(lambda WKvO: 1, False, False)\n print('Numerical Result: ', TK2h, ' (required %s)' % 1)\n assert oyIN.isclose(TK2h, 1, rtol=0.001)",
"def dUVC(YKHO):\n YKHO.assertTrue(len(oyIN.where(YKHO.mu_hat > 0)[0]) == len(YKHO.mu_hat))",
... | [
"0.6260022",
"0.6254437",
"0.6160658",
"0.59835404",
"0.59066445",
"0.58877766",
"0.58620983",
"0.5846165",
"0.58257115",
"0.58172315",
"0.5771361",
"0.57599866",
"0.575981",
"0.57378536",
"0.5726747",
"0.56992835",
"0.56862724",
"0.56672215",
"0.5662086",
"0.5661322",
"0.565... | 0.57714736 | 10 |
Converts a list of a list into a single list. | def DX_p(X4O_):
if not X4O_:
raise ValueError('Error. sample_list is empty!')
kjNI = []
for ZfUD in X4O_:
if isinstance(ZfUD, list):
for YRbF in DX_p(ZfUD):
kjNI.append(YRbF)
else:
kjNI.append(ZfUD)
return kjNI | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GarA(vC9B):\n if not j7j0(vC9B):\n return vC9B\n return [r845 for YRbF in vC9B for r845 in YRbF]",
"def GarA(IHXE):\n return [ZfUD for XuXy in IHXE for ZfUD in XuXy]",
"def GarA(vC9B):\n WKvO = [YRbF for epBp in vC9B for YRbF in epBp]\n return WKvO",
"def svc5(UHhk):\n return lis... | [
"0.80513704",
"0.7968604",
"0.7936884",
"0.7872588",
"0.78445184",
"0.78172666",
"0.775749",
"0.775749",
"0.7743577",
"0.7668266",
"0.7668266",
"0.7668266",
"0.765677",
"0.76504683",
"0.7645437",
"0.7636017",
"0.7636017",
"0.7636017",
"0.76241016",
"0.76231205",
"0.7619732",
... | 0.7564361 | 26 |
Sample random points on the sphere. | def yhSg(zNig, sT7A=None, ZuLk=None, t3eI='random-seed'):
t3eI = eaiG(t3eI)
if sT7A is None:
sT7A = CEWs([0.0, 360.0], 'deg')
if ZuLk is None:
ZuLk = CEWs([-90.0, 90.0], 'deg')
P6bq = t3eI.uniform(size=zNig)
FDPT = sT7A[0] + (sT7A[1] - sT7A[0]) * P6bq
Ty9i = t3eI.uniform(size=zNi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fDZP():\n\n def NkkI(Ty9i):\n CkYf = XTiz.linalg.norm(Ty9i)\n if CkYf == 0:\n return Ty9i\n else:\n return Ty9i / CkYf\n Ty9i = XTiz.zeros(3)\n for YRbF in range(3):\n G1Hx = 15\n XTiz.random.seed()\n H6nk = XTiz.random.standard_normal(si... | [
"0.8066834",
"0.7835337",
"0.77251005",
"0.7647135",
"0.7429411",
"0.7421458",
"0.7363589",
"0.7350474",
"0.7349325",
"0.73454106",
"0.7274739",
"0.7274739",
"0.7250845",
"0.722428",
"0.71447855",
"0.7084753",
"0.7048698",
"0.70191514",
"0.6992198",
"0.69836026",
"0.69836026"... | 0.75123703 | 4 |
Resizes an image keeping the aspect ratio unchanged. | def lmn5(YKHO, LNo8, QzZ7=512, kvoN=512, MZZH=False, Tuqy='crop', pAIe=1.3, trlf=1.5, cDgj=1.2):
knmd = LNo8.dtype
MKlR, yzQ0 = LNo8.shape[:2]
KnxT = (0, 0, MKlR, yzQ0)
NXpY = 1
dvgN = [(0, 0), (0, 0), (0, 0)]
NAnm = None
if Tuqy == 'none':
return (LNo8, KnxT, NXpY, dvgN, NAnm)
i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zb6e(LNo8, BURA=100):\n wyQG, uy17 = LNo8.size\n pAIe = uy17 / float(wyQG)\n C2f8 = int(pAIe * BURA)\n FHlE = LNo8.resize((BURA, C2f8))\n return FHlE",
"def Zb6e(LNo8, BURA=100):\n wyQG, uy17 = LNo8.size\n pAIe = uy17 / float(wyQG)\n C2f8 = int(pAIe * BURA)\n FHlE = LNo8.resize((BU... | [
"0.77157927",
"0.77157927",
"0.77010083",
"0.7699983",
"0.7678676",
"0.76759446",
"0.76716894",
"0.761833",
"0.761512",
"0.76146644",
"0.75938797",
"0.7585906",
"0.75579935",
"0.7500603",
"0.7480922",
"0.7480922",
"0.7477722",
"0.7468435",
"0.7422546",
"0.7409695",
"0.7407215... | 0.0 | -1 |
Compute bounding boxes from masks. | def p5Lc(YKHO, ZHfW):
oUSw = oyIN.zeros([ZHfW.shape[-1], 4], dtype=oyIN.int32)
for YRbF in range(ZHfW.shape[-1]):
r8hN = ZHfW[:, :, YRbF]
GO_b = oyIN.where(oyIN.any(r8hN, axis=0))[0]
mFka = oyIN.where(oyIN.any(r8hN, axis=1))[0]
if GO_b.shape[0]:
o4D3, ajwV = GO_b[[0, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Kfsn(YKHO, ZHfW):\n oUSw = oyIN.zeros([ZHfW.shape[0], 4], dtype=oyIN.int32)\n for YRbF in range(ZHfW.shape[0]):\n r8hN = ZHfW[YRbF, :, :]\n GO_b = oyIN.where(oyIN.any(r8hN, axis=0))[0]\n mFka = oyIN.where(oyIN.any(r8hN, axis=1))[0]\n if GO_b.shape[0]:\n o4D3, ajwV =... | [
"0.79046696",
"0.78671235",
"0.78134555",
"0.78134555",
"0.78134555",
"0.78134555",
"0.78134555",
"0.78134555",
"0.78134555",
"0.78048664",
"0.7801408",
"0.7797915",
"0.77164906",
"0.77041256",
"0.7686475",
"0.7634595",
"0.75643206",
"0.7510227",
"0.74642205",
"0.7463141",
"0... | 0.8053253 | 0 |
Initialize an LLDP packet sender send_cycle_time is the time (in seconds) that this sender will take to send every discovery packet. Thus, it should be the link timeout interval at most. ttl is the time (in seconds) for which a receiving LLDP agent should consider the rest of the data to be valid. We don't use this, bu... | def FIMM(YKHO, e2UG, h9HD=120):
YKHO._this_cycle = []
YKHO._next_cycle = []
YKHO._send_chunk_size = 1
YKHO._timer = None
YKHO._ttl = h9HD
YKHO._send_cycle_time = e2UG
aM69.listen_to_dependencies(YKHO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, e2UG, h9HD=120):\n YKHO._this_cycle = []\n YKHO._next_cycle = []\n YKHO._send_chunk_size = 1\n YKHO._timer = None\n YKHO._ttl = h9HD\n YKHO._send_cycle_time = e2UG\n aM69.listen_to_dependencies(YKHO)",
"def FIMM(YKHO, u54L, awon, WpKv, lUK_, vYWg):\n if type(awon) != xDoM.N... | [
"0.7353215",
"0.5082773",
"0.4954123",
"0.49022582",
"0.48830244",
"0.4874697",
"0.4812955",
"0.4793214",
"0.4780436",
"0.47559544",
"0.4750311",
"0.47238082",
"0.46726757",
"0.46655318",
"0.46561798",
"0.4645122",
"0.46277255",
"0.4619882",
"0.4579123",
"0.45635754",
"0.4562... | 0.73142236 | 1 |
Called by a timer to actually send packets. Picks the first packet off this cycle's list, sends it, and then puts it on the nextcycle list. When this cycle's list is empty, starts the next cycle. | def xFPL(YKHO):
mLGw = int(YKHO._send_chunk_size)
bftO = YKHO._send_chunk_size - mLGw
if tuKI() < bftO:
mLGw += 1
for bGrB in range(mLGw):
if len(YKHO._this_cycle) == 0:
YKHO._this_cycle = YKHO._next_cycle
YKHO._next_cycle = []
ZfUD = YKHO._this_cycle.pop(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xFPL(YKHO):\n mLGw = int(YKHO._send_chunk_size)\n bftO = YKHO._send_chunk_size - mLGw\n if tuKI() < bftO:\n mLGw += 1\n for bGrB in range(mLGw):\n if len(YKHO._this_cycle) == 0:\n YKHO._this_cycle = YKHO._next_cycle\n YKHO._next_cycle = []\n ZfUD = YKHO._t... | [
"0.7307818",
"0.66385293",
"0.6323935",
"0.6162747",
"0.61478394",
"0.60801286",
"0.60764563",
"0.6031621",
"0.59898585",
"0.59318304",
"0.5924043",
"0.5920329",
"0.589367",
"0.5876483",
"0.5847346",
"0.5800272",
"0.5786616",
"0.5741236",
"0.5724998",
"0.571874",
"0.5710075",... | 0.7293285 | 1 |
Pulls only even numbers from list. | def gYEJ(WKvO: list[int]) -> list[int]:
LVAh: list[int] = list()
YRbF: int = 0
while YRbF < len(WKvO):
if WKvO[YRbF] % 2 == 0:
LVAh.append(WKvO[YRbF])
YRbF += 1
return LVAh | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Pbi3(list):\n vf3I = []\n for FGW3 in list:\n if FGW3 % 2 == 0:\n vf3I.append(FGW3)\n return vf3I",
"def LvQP(ybN4):\n Aofo = []\n for LihS in ybN4:\n if LihS % 2 == 0:\n Aofo.append(LihS)\n return Aofo",
"def Pbi3(ROk8):\n BdN0 = []\n for YRbF in... | [
"0.8493134",
"0.81331384",
"0.80318505",
"0.7906778",
"0.78601176",
"0.7585973",
"0.75652206",
"0.7489319",
"0.7478929",
"0.74705315",
"0.7436666",
"0.7408064",
"0.7349642",
"0.7261482",
"0.7199858",
"0.71135324",
"0.70993286",
"0.70919114",
"0.70874727",
"0.70873356",
"0.702... | 0.6975133 | 21 |
Creates a sublist of a master list limited to specific integers. | def finE(WKvO: list[int], LVAh: int, epBp: int) -> list[int]:
jzdc: list[int] = list()
YRbF: int = 0
while YRbF < len(WKvO):
if WKvO[YRbF] > LVAh and WKvO[YRbF] <= epBp:
jzdc.append(WKvO[YRbF])
YRbF += 1
return jzdc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CJwC(rl9D, exwG):\n Aofo = []\n for o7uO in range(0, len(rl9D), exwG):\n Aofo.append(rl9D[o7uO:o7uO + exwG])\n return Aofo",
"def dlVb(lp50, ztRo):\n return [lp50[U6D_:U6D_ + ztRo] for U6D_ in range(0, len(lp50), ztRo)]",
"def CP9z(xCrM, u54L, H198, pJqc=0):\n vcn7 = nGHF(xCrM, H198, ... | [
"0.64939666",
"0.6469743",
"0.6383168",
"0.6224993",
"0.61728626",
"0.6122841",
"0.6079772",
"0.6003381",
"0.5976729",
"0.5973838",
"0.59650415",
"0.59572166",
"0.5931071",
"0.59254646",
"0.5906984",
"0.584708",
"0.5845473",
"0.58315146",
"0.58058983",
"0.5805707",
"0.5796326... | 0.0 | -1 |
Returns a string that represents this Circle | def wHJl(YKHO):
sI3h = 'Cricle(center = Point({}), radius = {})'.format(YKHO.center, YKHO.radius)
return sI3h | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n return 'Circle({})'.format(YKHO.radius)",
"def zAg0(YKHO):\n return 'Circle({}, radius={})'.format(super().__str__(), YKHO.radius)",
"def zAg0(YKHO):\n return 'Circle with radius: {:0.6f}'.format(YKHO._radius)",
"def wHJl(YKHO):\n return f'Circle({YKHO.radius})'",
"def wHJl(YK... | [
"0.8535533",
"0.84783226",
"0.8388534",
"0.83536166",
"0.8264099",
"0.8079319",
"0.7773071",
"0.7012794",
"0.69926167",
"0.68455654",
"0.6842242",
"0.67657363",
"0.67183733",
"0.6694483",
"0.66628873",
"0.6653671",
"0.66535544",
"0.66527116",
"0.660652",
"0.65837365",
"0.6581... | 0.81065595 | 5 |
Returns a new Circle that is a copy of this Circle. | def i3ak(YKHO):
GSUJ = YKHO
return GSUJ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i3ak(YKHO):\n fCav = YKHO.__center.clone()\n return hmkd(fCav, YKHO.__radius)",
"def jth9(Emd4, YKHO):\n from Drawables.Point import Point\n BdN0 = Emd4(Point.fromPoint(YKHO.centre), YKHO.radius, YKHO.__start, YKHO.__end)\n return BdN0",
"def jHb_(YKHO):\n WKvO, LVAh = YKHO.position\n ... | [
"0.8572084",
"0.7547487",
"0.7352581",
"0.7333793",
"0.6993115",
"0.6795037",
"0.67665416",
"0.67436284",
"0.6715255",
"0.6715255",
"0.6715255",
"0.6711868",
"0.6698171",
"0.66732556",
"0.6640586",
"0.66211563",
"0.66211563",
"0.65725595",
"0.65586686",
"0.6557506",
"0.655750... | 0.89664334 | 0 |
Takes another Circle as an argument. Returns True if this Circle and the other Circle intersect, else returns False. | def P10m(YKHO, t5uH):
if YKHO.center.distance_from(t5uH.center) < YKHO.radius + t5uH.radius:
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def J5e4(MB0Q: np.ndarray((2,)), NSIK: np.ndarray((2,)), r1VO: float) -> bool:\n return oyIN.linalg.norm(MB0Q - NSIK) <= r1VO * 2",
"def zwN1(YKHO, Elif):\n return LU4A(YKHO, Elif)",
"def RKm7(RwQf, x0R0, igZJ, xiPp):\n WKvO = RwQf[0] - igZJ[0]\n LVAh = RwQf[1] - igZJ[1]\n pImw = PZyS(WKvO * WKv... | [
"0.8076249",
"0.77180946",
"0.7545217",
"0.7483585",
"0.7228941",
"0.721563",
"0.7187575",
"0.70812416",
"0.7074434",
"0.70196223",
"0.6974497",
"0.69476026",
"0.6924679",
"0.6888559",
"0.6865094",
"0.6828166",
"0.6818843",
"0.68078935",
"0.68062717",
"0.67886543",
"0.6786169... | 0.7907889 | 1 |
Construct create queries for this aggregation | def k6dE(YKHO):
return {uOe2: mwg2(YKHO.get_table_name(uOe2), next(iter(R63N)).limit(0)) for uOe2, R63N in YKHO.get_selects().items()} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def axXe(YKHO):\n pass",
"def xmqU(YKHO):\n pass",
"def axXe(YKHO, kdD5, qIxc):\n ChdF = {'queryType': kdD5}\n for H5ew, wEf2 in qIxc.items():\n if H5ew == 'aggregations':\n ChdF[H5ew] = zocb(wEf2)\n elif H5ew == 'post_aggregations':\n ChdF['postAggregations'] = ... | [
"0.68013",
"0.6634286",
"0.6555829",
"0.64975417",
"0.6466819",
"0.6436186",
"0.6355531",
"0.6325695",
"0.61582893",
"0.6120757",
"0.60554117",
"0.59871465",
"0.5952705",
"0.59451103",
"0.5926485",
"0.58850676",
"0.5857227",
"0.58529353",
"0.58524674",
"0.5826491",
"0.5826270... | 0.5693788 | 32 |
Generates the CREATE TABLE query for the aggregation table with imputation. | def itO1(YKHO, RZ2N, gVdD):
xDcj = 'SELECT %s' % ', '.join(map(str, YKHO.groups.values()))
xDcj += YKHO._get_impute_select(RZ2N, gVdD)
xDcj += '\nFROM %s t1' % YKHO.state_table
xDcj += '\nLEFT JOIN %s t2 USING(%s)' % (YKHO.get_table_name(), YKHO.state_group)
return 'CREATE TABLE %s AS (%s)' % (YKHO.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pX1Q(YKHO, B_Yw, XxsC):\n xDcj = '\\n CREATE TABLE IF NOT EXISTS {rs_table} \\n (\\n '.format(rs_table=XxsC)\n for H5ew, BWXx in B_Yw.items():\n xDcj += '\\n {key} {type},\\n '.format(key=H5ew.replace(' ', '_').replace(':', '').replace('(', '').replace(')', '').... | [
"0.693693",
"0.6679582",
"0.65765274",
"0.65595937",
"0.6499534",
"0.6491312",
"0.64113533",
"0.6405577",
"0.6392481",
"0.6373428",
"0.63496226",
"0.6345677",
"0.63216585",
"0.63146985",
"0.6303804",
"0.629325",
"0.6268436",
"0.6268374",
"0.6242673",
"0.6212733",
"0.6200131",... | 0.7038373 | 0 |
This function checks to see if the row and col provided are within the boundaries of the board and if the space is unoccupied. | def d0Kf(l1V2, rdlD, fvDH):
"""This converts row and col, which are strings, into integers. If the inputed row and col
cannot be converted into an integer, the function returns False"""
try:
rdlD = int(rdlD)
fvDH = int(fvDH)
except ValueError:
return False
if rdlD >= 0 and... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T_Ze(YKHO, rdlD, fvDH):\n return rdlD >= 0 and rdlD < YKHO._maxrow and (fvDH >= 0) and (fvDH < YKHO._maxcol)",
"def JYgA(YKHO, rdlD, fvDH):\n return rdlD >= 0 and rdlD < len(YKHO.board) and (fvDH >= 0) and (fvDH < len(YKHO.board[0]))",
"def er5o(YKHO, rdlD, fvDH):\n return 0 <= rdlD < YKHO.corner.... | [
"0.85517013",
"0.7945856",
"0.7836914",
"0.7822294",
"0.7740515",
"0.77155316",
"0.7652164",
"0.7629059",
"0.7595408",
"0.7560041",
"0.7536344",
"0.75316787",
"0.75266963",
"0.7518436",
"0.7483574",
"0.7469202",
"0.74416494",
"0.7434366",
"0.74258286",
"0.74216294",
"0.741082... | 0.68456995 | 95 |
Figure of demerit as defined in [1, eq.(49)] and computed using the recursion [1, eq.(50)(51)]. This is the simplified formula that only features the pathindependent (looknow) variability. It coincides with the general formula (given by lookback demerit) if the variability is of the product form accross stages. | def YwQB(YKHO, Q6kx: Node) -> float:
if Q6kx.is_leaf:
return 0
else:
return YKHO.children_demerit(Q6kx) + sum((aUGN.data['w'] * YKHO._variability_process.node_looknow(aUGN) * YKHO.looknow_demerit(aUGN) for aUGN in Q6kx.children)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KR7S(YKHO, Q6kx: Node) -> float:\n if Q6kx.is_leaf:\n return 0\n else:\n return YKHO.children_demerit(Q6kx) * YKHO._variability_process.node_lookback(Q6kx) + sum((aUGN.data['w'] * YKHO.lookback_demerit(aUGN) for aUGN in Q6kx.children))",
"def hGod(YKHO):\n Ft91 = False\n if YKHO.cul... | [
"0.5709445",
"0.56704646",
"0.5601926",
"0.55607486",
"0.55581117",
"0.5539733",
"0.5510834",
"0.54817295",
"0.54511327",
"0.54413164",
"0.542631",
"0.5414607",
"0.54012555",
"0.5377403",
"0.5376973",
"0.5368001",
"0.53617465",
"0.53607696",
"0.53582627",
"0.53556037",
"0.535... | 0.53109366 | 30 |
The command to run tests (as a string). For this base class there is none. | def HCmI(YKHO):
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zTot(YKHO):\n A_Bj = ''\n if YKHO.specs['test_interface_only']:\n A_Bj += ' interfaceCheck '\n if YKHO.specs['interactive']:\n A_Bj += ' interactiveCheck '\n return YKHO._get_python_command() + ' ' + YKHO.driver + ' ' + A_Bj + YKHO.specs['input']",
"def zTot(YKHO):\n return YKHO.... | [
"0.703057",
"0.6769269",
"0.6726418",
"0.66951704",
"0.66941065",
"0.6651599",
"0.6576507",
"0.6542026",
"0.6534698",
"0.6503621",
"0.6472309",
"0.64693683",
"0.6448226",
"0.6432847",
"0.63927996",
"0.6372677",
"0.63329786",
"0.6326994",
"0.63054985",
"0.62919",
"0.62528825",... | 0.6201205 | 26 |
Test that the subject, body and html are read correctly. | def guGo(P4t4):
with P4t4.app_context():
eXeU = crVM('tests/subject_body_html.html')
assert eXeU.subject == 'Test subject.'
assert eXeU.body == 'Test body.'
assert eXeU.html == 'Test html.' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dRey(ZqHk):\n UhR0 = ZqHk / 'template.txt'\n UhR0.write_text(TI0e.dedent(' TO: to@test.com\\n SUBJECT: Testing mailmerge\\n FROM: from@test.com\\n Content-Type: text/html\\n\\n <html>\\n <body>\\n <p>{{message}}</p>\\n </body>\\n </ht... | [
"0.70694375",
"0.7047207",
"0.6984326",
"0.690692",
"0.6779099",
"0.66365314",
"0.656554",
"0.6515292",
"0.65017974",
"0.6472845",
"0.636131",
"0.63528436",
"0.63172746",
"0.62739116",
"0.62174696",
"0.62128735",
"0.62121934",
"0.62021536",
"0.619713",
"0.61776924",
"0.616889... | 0.58315855 | 64 |
Test that a missing template raises an exception. | def YUPb(P4t4):
with P4t4.app_context():
with trZe.raises(oOf0):
crVM('tests/missing.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rEHO(YKHO):\n im04 = YKHO.client.get('/fake_route')\n assert im04.status_code == 404\n assert '404' in im04.data",
"def muP6(YKHO):\n i_PC = b9AL()\n QePW = i_PC.post('/')\n with YKHO.assertRaises(bxjG):\n eb0N(QePW, template_name='nonexistent.html')",
"def bisP(YKHO, sEAN):\n s... | [
"0.7994535",
"0.78682166",
"0.786457",
"0.7832219",
"0.7822217",
"0.77847135",
"0.77308726",
"0.7646641",
"0.7625599",
"0.7598523",
"0.7542401",
"0.7526334",
"0.7521556",
"0.74988693",
"0.7492816",
"0.74684656",
"0.7441702",
"0.74045795",
"0.73835206",
"0.73078907",
"0.729553... | 0.7964815 | 1 |
Test that an email is sent when an admin performs a loan checkout. | def qHZl(P4t4, DW23, DLnL, vhLn, AZgw):
P4t4.config.update(CELERY_TASK_ALWAYS_EAGER=True)
pgty = DLnL['loans'][1]
C0cx = TL_D.get_record_by_pid(pgty['pid'])
with P4t4.extensions['mail'].record_messages() as bybv:
dp9S = DW23['admin']
CGuU(dp9S)
assert len(bybv) == 0
vPKb.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vJdQ(P4t4, DW23, DLnL, AZgw):\n P4t4.config.update(CELERY_TASK_ALWAYS_EAGER=True)\n AZgw.patch('invenio_app_ils.records.api.Patron.get_patron', return_value=AOYS(DW23['patron1'].id))\n pgty = DLnL['loans'][-1]\n C0cx = TL_D.get_record_by_pid(pgty['pid'])\n with P4t4.extensions['mail'].record_mes... | [
"0.71508974",
"0.6984283",
"0.69134617",
"0.6827907",
"0.6806021",
"0.6742352",
"0.6572246",
"0.6558941",
"0.6542484",
"0.65419984",
"0.6482073",
"0.6480936",
"0.64557314",
"0.6450091",
"0.64432997",
"0.6376978",
"0.63682073",
"0.635742",
"0.6325115",
"0.63243926",
"0.6316327... | 0.8098597 | 0 |
Test that an email is sent when an admin performs a loan checkout. | def vJdQ(P4t4, DW23, DLnL, AZgw):
P4t4.config.update(CELERY_TASK_ALWAYS_EAGER=True)
AZgw.patch('invenio_app_ils.records.api.Patron.get_patron', return_value=AOYS(DW23['patron1'].id))
pgty = DLnL['loans'][-1]
C0cx = TL_D.get_record_by_pid(pgty['pid'])
with P4t4.extensions['mail'].record_messages() as... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qHZl(P4t4, DW23, DLnL, vhLn, AZgw):\n P4t4.config.update(CELERY_TASK_ALWAYS_EAGER=True)\n pgty = DLnL['loans'][1]\n C0cx = TL_D.get_record_by_pid(pgty['pid'])\n with P4t4.extensions['mail'].record_messages() as bybv:\n dp9S = DW23['admin']\n CGuU(dp9S)\n assert len(bybv) == 0\n... | [
"0.8098597",
"0.6984283",
"0.69134617",
"0.6827907",
"0.6806021",
"0.6742352",
"0.6572246",
"0.6558941",
"0.6542484",
"0.65419984",
"0.6482073",
"0.6480936",
"0.64557314",
"0.6450091",
"0.64432997",
"0.6376978",
"0.63682073",
"0.635742",
"0.6325115",
"0.63243926",
"0.6316327"... | 0.71508974 | 1 |
Get width and height of the axis in world coordinates. | def uOuX(YKHO, aNZO, BcQj):
XP5J = YKHO.parameters
Ir38 = aNZO.bbox.width / aNZO.bbox.height
H2v2 = oyIN.abs(XP5J['ylim'].diff()[0])
TVTK = Ir38 * H2v2
LFlW, es2x = (XP5J['xlim'][0].wrap_at('180d'), XP5J['ylim'][0])
vPkc = oyIN.abs(XP5J['xlim'].wrap_at('180d').diff()[0])
hl8e = (XP5J['npanel... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OZRt(YKHO) -> lJMi:\n if YKHO._world is None:\n return (0, 0)\n return (YKHO._world.get_width(), YKHO._world.get_height())",
"def vCK4(YKHO):\n return (YKHO['w'], YKHO['h'])",
"def zNig(YKHO):\n LFlW = YKHO.coords[5][0]\n _tIi = YKHO.coords[2][0]\n TVTK = _tIi - LFlW\n tlxW = YK... | [
"0.7333504",
"0.7191979",
"0.67544335",
"0.66814554",
"0.6617497",
"0.65884775",
"0.657697",
"0.65653324",
"0.656496",
"0.6550577",
"0.6532452",
"0.6480596",
"0.64406115",
"0.6440576",
"0.6383312",
"0.6350242",
"0.634018",
"0.633598",
"0.6325361",
"0.63119256",
"0.6305071",
... | 0.0 | -1 |
Returns the DeviceUtils instance. | def FvBK(Z6CB):
YfpN = ryWe.DeviceUtils.HealthyDevices()
for begE in YfpN:
if begE.adb._device_serial == Z6CB:
return begE
raise pJ1F('Device {} not found'.format(Z6CB)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yWOL(YKHO):\n return YKHO._device_instance",
"def DSSI(YKHO):\n return TUKS(YKHO)",
"def iSDi():\n if Tqkk.__instance is None:\n Tqkk()\n return Tqkk.__instance",
"def Xp35(YKHO):\n return YKHO.device",
"def VeaS():\n return rMDm",
"def VeaS(YKHO) -> SnBA.Devices:\n return... | [
"0.65110993",
"0.61576396",
"0.6071288",
"0.6008237",
"0.59918356",
"0.5943795",
"0.5937499",
"0.58473074",
"0.58416027",
"0.58225375",
"0.5758942",
"0.57575005",
"0.5717326",
"0.5708112",
"0.57042146",
"0.56928605",
"0.567347",
"0.56598073",
"0.56598073",
"0.56598073",
"0.56... | 0.0 | -1 |
Return the user object of current User. | def YKHO(yHA2):
return {'action': 'user/self', 'succeeded': True, 'user': yHA2.as_viewdict()} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def okMv(YKHO) -> mv1M:\n if YKHO.request.user.is_anonymous:\n return egNl().get_anonymous()\n else:\n return YKHO.request.user",
"def c5ow(YKHO):\n fnHH = YKHO.auth.get_user_by_session()\n return YKHO.auth.store.user_model.get_by_id(fnHH['user_id'])",
"def TKWP(YKHO):\n return mv1... | [
"0.87690675",
"0.8681701",
"0.86517924",
"0.8643194",
"0.8643194",
"0.8643194",
"0.85943943",
"0.85943943",
"0.8579876",
"0.85643286",
"0.85643286",
"0.8541346",
"0.8541346",
"0.8541346",
"0.8497634",
"0.8470866",
"0.8470866",
"0.8467957",
"0.8464054",
"0.84026986",
"0.839686... | 0.0 | -1 |