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 |
|---|---|---|---|---|---|---|
Gets the colour of a z and step value. | def OfK8(epBp, YRbF):
if abs(epBp) < YKHO.threshold:
return YKHO.background
Ty9i = oyIN.log2(YRbF + YKHO.threshold - oyIN.log2(oyIN.log2(abs(epBp)))) / YKHO.threshold
if Ty9i < 1.0:
return (Ty9i ** kYGz, Ty9i ** ftz7, Ty9i ** _2fo)
else:
Ty9i = max(0, 2 - Ty9i)
return (Ty... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wGtj(YKHO, J1b4, CYjz, bpa0, kYGz, ftz7, _2fo):\n\n def OfK8(epBp, YRbF):\n \"\"\"\n Gets the colour of a z and step value.\n\n :param complex z: the z value from the mandelbrot set\n :param int i: the step value\n\n :rtype: tuple\n :return: the ... | [
"0.7341066",
"0.72083485",
"0.68963253",
"0.6640423",
"0.65460277",
"0.6530589",
"0.6423319",
"0.62713194",
"0.6260205",
"0.6229389",
"0.62234646",
"0.6208068",
"0.61786675",
"0.6175499",
"0.6157222",
"0.6157222",
"0.6157222",
"0.6157222",
"0.6140309",
"0.6133816",
"0.6130664... | 0.7172321 | 2 |
Gets the colour of a z and step value. | def OfK8(epBp, YRbF):
if abs(epBp) < YKHO.threshold:
return (0, 0, 0)
Ty9i = oyIN.log2(YRbF + YKHO.threshold - oyIN.log2(oyIN.log2(abs(epBp)))) / YKHO.threshold
if Ty9i < 1.0:
return (Ty9i ** kYGz, Ty9i ** ftz7, Ty9i ** _2fo)
else:
Ty9i = max(0, 2 - Ty9i)
return (Ty9i ** ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wGtj(YKHO, J1b4, CYjz, bpa0, kYGz, ftz7, _2fo):\n\n def OfK8(epBp, YRbF):\n \"\"\"\n Gets the colour of a z and step value.\n\n :param complex z: the z value from the mandelbrot set\n :param int i: the step value\n\n :rtype: tuple\n :return: the ... | [
"0.73403287",
"0.7172178",
"0.6895486",
"0.66384035",
"0.654349",
"0.65309036",
"0.64248663",
"0.62704283",
"0.6260564",
"0.62288976",
"0.622155",
"0.62071323",
"0.6176974",
"0.6173576",
"0.6155353",
"0.6155353",
"0.6155353",
"0.6155353",
"0.613839",
"0.61319745",
"0.6128805"... | 0.7208043 | 1 |
get returns a single user given its unique user_id | def NMoC(YKHO, uJjO):
CBIr, Wxnj = TKWP(uJjO)
if Wxnj == 404:
nNXP.abort(code=404, message='The User with the user_id doesnt Exist')
return (CBIr, Wxnj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NMoC(YKHO, uJjO):\n return mv1M.get(uJjO)",
"def NMoC(id):\n return mv1M.query.filter_by(id=id).first()",
"def bt8D(uJjO):\n return mv1M.query.get(uJjO)",
"def TKWP(YKHO, uJjO):\n j8eK = 'users/' + uJjO\n return YKHO.make_request(j8eK)",
"def TKWP(uJjO=None):\n DW23 = S8SU.all('User')... | [
"0.84332645",
"0.83980507",
"0.8261577",
"0.8222736",
"0.8221518",
"0.8178469",
"0.81775814",
"0.81763834",
"0.8173295",
"0.8173295",
"0.8173295",
"0.8173295",
"0.81669915",
"0.8094847",
"0.80743533",
"0.805296",
"0.8034785",
"0.8032745",
"0.80307204",
"0.8004",
"0.8000615",
... | 0.0 | -1 |
Create a pattern for dense op followed by activations. | def sn5t(ZqW4=True, u4Z9=None, xaz1='float16'):
nPrm = DwPX()
upAO = DwPX()
oug5 = DwPX()
mQ4t = ZcNu('nn.dense')(nPrm, upAO)
if ZqW4:
VztA = ZcNu('add') | ZcNu('nn.bias_add')
pDwj = VztA(mQ4t, oug5)
else:
pDwj = mQ4t
if u4Z9 is None:
return pDwj
if isinst... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A41n():\n mXDZ = ZcNu('nn.dense')(DwPX(), avzC())\n return mXDZ",
"def sGuN(YKHO):\n C3ST = ileL()\n C3ST.add(l6ZH(24, input_dim=U4F5 * U4F5 + 2, activation='relu'))\n C3ST.add(l6ZH(24, activation='relu'))\n C3ST.add(l6ZH(len(Irwn), activation='linear'))\n C3ST.compile(loss='mse', optimi... | [
"0.69449264",
"0.62637776",
"0.59782976",
"0.57860476",
"0.5729001",
"0.5647342",
"0.55941767",
"0.55772847",
"0.5576438",
"0.5543127",
"0.5528706",
"0.5513469",
"0.550603",
"0.5490817",
"0.5490472",
"0.547368",
"0.5409983",
"0.5396722",
"0.53857964",
"0.53843766",
"0.5366124... | 0.5065252 | 52 |
This function calculates the binary Hamming distance of 2 strings by converting | def ynZz(Y0Fj, Pb4f):
Y0Fj.strip()
Pb4f.strip()
if len(Y0Fj) != len(Pb4f):
raise ValueError('Strings have to be of equal lengths: ' + Y0Fj + ' and ' + Pb4f)
return sum((HkJz == '1' for HkJz in bin(int(MRxC.hexlify(PsKo(Y0Fj, Pb4f)), 16)))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RkO6(Y0Fj, Pb4f):\n mDfF = 0\n for YRbF, P8oC in enumerate(Y0Fj):\n if P8oC != Pb4f[YRbF]:\n mDfF += 1\n return mDfF",
"def kzPA(ZoER, EUaA):\n if type(ZoER) == str:\n ZoER = [ord(Z9rn) for Z9rn in Y0Fj]\n if type(EUaA) == str:\n EUaA = [ord(Z9rn) for Z9rn in Pb... | [
"0.84647644",
"0.84023887",
"0.83347034",
"0.8326972",
"0.8308358",
"0.8137487",
"0.8136767",
"0.8125086",
"0.81187636",
"0.79529357",
"0.7932111",
"0.7905424",
"0.78473914",
"0.77683306",
"0.7704884",
"0.76946086",
"0.7677987",
"0.7667733",
"0.76575166",
"0.76161945",
"0.755... | 0.7592945 | 20 |
Get the unitary vector of direction. | def dir(YKHO):
return j8U8(qUQm(YKHO.angle)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XSoh(YKHO):\n len = YKHO.length()\n if len == 0.0:\n nHaT = oeNL.Pos(oyIN.transpose(oyIN.array([0, 0, 0])))\n else:\n nHaT = oeNL.Pos(oyIN.transpose(oyIN.array([(YKHO.end.x - YKHO.start.x) / len, (YKHO.end.y - YKHO.start.y) / len, (YKHO.end.z - YKHO.start.z) / len])))\n return nHaT",
... | [
"0.80650926",
"0.7714104",
"0.7688202",
"0.74529743",
"0.736431",
"0.73323345",
"0.72756165",
"0.721212",
"0.7031685",
"0.7012481",
"0.70107687",
"0.6999042",
"0.6971306",
"0.69533485",
"0.6934928",
"0.6934928",
"0.6934928",
"0.6921606",
"0.69211054",
"0.69203055",
"0.688539"... | 0.69447875 | 14 |
Update the node Id for the current node. | def cWZK(YKHO, vaxa):
if YKHO.cursor:
YKHO.cursor.nodeId = vaxa | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Lnes(YKHO, Lnes: int):\n YKHO._node_id = Lnes",
"def Irc8(Q6kx: Element) -> None:\n T778: list[str] = []\n for Lnes in Q6kx['ids']:\n BZDx = YKHO.fix_fragment('', Lnes)\n if BZDx not in T778:\n T778.append(BZDx)\n Q6kx['ids'] = T778",
"def Lnes(YKHO, Lnes):\n YKHO._n... | [
"0.7829752",
"0.7489203",
"0.74335957",
"0.7393328",
"0.6981593",
"0.68572396",
"0.67971003",
"0.6588425",
"0.6580804",
"0.65778935",
"0.6553216",
"0.65527683",
"0.6539076",
"0.6539076",
"0.6514303",
"0.6485789",
"0.6476102",
"0.6347575",
"0.63162756",
"0.6252726",
"0.6208319... | 0.69661885 | 5 |
Updates the record id of the head sublist record. | def guVv(YKHO, sNpE):
YKHO.headId = sNpE
AIu6 = dict(nextId=None, childId=sNpE, label='head pointer')
YKHO.db.update(1, YKHO.tableName, AIu6) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ydJI(YKHO):\n ETu_ = YKHO.db.selectById(YKHO.tableName, 1)\n if ETu_:\n YKHO.headId = ETu_['childId']\n return YKHO.headId\n print('Error! No first sublist record found.')\n return None",
"def Pxjl(YKHO, VXBI, tl5L, jehQ, BZDx):\n if not isinstance(BZDx, aA6B):\n raise Typ... | [
"0.71913046",
"0.5909919",
"0.58707434",
"0.5700044",
"0.55987924",
"0.54624844",
"0.5406612",
"0.53759485",
"0.53540254",
"0.52908164",
"0.52557015",
"0.52411836",
"0.52329826",
"0.52329826",
"0.52329826",
"0.52329826",
"0.52329826",
"0.52329826",
"0.52329826",
"0.52329826",
... | 0.5978991 | 1 |
Export financial report Excel from the admin side. | def aWve(QePW):
import openpyxl
try:
from openpyxl.cell import get_column_letter
except ImportError:
from openpyxl.utils import get_column_letter
f_eo = QePW.GET.get('from_date')
NTec = QePW.GET.get('to_date')
TgwQ = QePW.GET.get('search_value') or ''
C9uy = T8ck()
if Tgw... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g75F(YKHO):\n zrGu = qcWV.now()\n Ux0P = 'bushfire_report_{}.xls'.format(zrGu.strftime('%d%b%Y'))\n geh0 = igJ6(content_type='application/vnd.ms-excel')\n geh0['Content-Disposition'] = 'attachment; filename=' + Ux0P\n jI4j = opHH()\n YKHO.ministerial.get_excel_sheet(zrGu, jI4j)\n YKHO.mini... | [
"0.74944603",
"0.7453464",
"0.74425185",
"0.74420345",
"0.74178195",
"0.74111104",
"0.73946965",
"0.7328942",
"0.729512",
"0.7261714",
"0.6878788",
"0.6865229",
"0.67143226",
"0.66296583",
"0.6595517",
"0.6570733",
"0.6570733",
"0.6454679",
"0.6449948",
"0.64201456",
"0.63465... | 0.62886864 | 22 |
Export financial report CSV from the admin side. | def YIlt(QePW):
import csv
from django.utils.encoding import smart_str
f_eo = QePW.GET.get('from_date')
NTec = QePW.GET.get('to_date')
TgwQ = QePW.GET.get('search_value') or ''
C9uy = T8ck()
if TgwQ:
C9uy = T8ck(user__user__username__icontains=TgwQ) | T8ck(user__user__first_name__ico... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SL8P(YKHO):\n E04x = {'xf': 'csv'}\n E04x.update(YKHO.getReportConfig())\n OxhQ = YKHO.sendRequest(YKHO.reportFormURL, YKHO.fileOpener, E04x, 'POST').read()\n YKHO.writeExportFile('csv', OxhQ)",
"def rl5L(YKHO):\n jY1r = XW6u.filedialog.asksaveasfilename(defaultextension='.csv', filetypes=(('c... | [
"0.7379921",
"0.73224705",
"0.7103962",
"0.68414193",
"0.6666803",
"0.66631263",
"0.6570242",
"0.6528814",
"0.65245694",
"0.64698297",
"0.6458403",
"0.64346254",
"0.6426312",
"0.63806766",
"0.6376845",
"0.6372116",
"0.6359299",
"0.6348953",
"0.6324408",
"0.63181615",
"0.63142... | 0.65966964 | 6 |
Export financial report Excel from the admin side. | def NM_v(QePW):
import openpyxl
try:
from openpyxl.cell import get_column_letter
except ImportError:
from openpyxl.utils import get_column_letter
f_eo = QePW.GET.get('from_date')
NTec = QePW.GET.get('to_date')
TgwQ = QePW.GET.get('search_value') or ''
C9uy = T8ck()
if Tgw... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g75F(YKHO):\n zrGu = qcWV.now()\n Ux0P = 'bushfire_report_{}.xls'.format(zrGu.strftime('%d%b%Y'))\n geh0 = igJ6(content_type='application/vnd.ms-excel')\n geh0['Content-Disposition'] = 'attachment; filename=' + Ux0P\n jI4j = opHH()\n YKHO.ministerial.get_excel_sheet(zrGu, jI4j)\n YKHO.mini... | [
"0.7495683",
"0.7454717",
"0.7443899",
"0.7443692",
"0.741883",
"0.7412455",
"0.73961747",
"0.7330415",
"0.7296676",
"0.72633135",
"0.6880631",
"0.686647",
"0.67169285",
"0.66300696",
"0.6596857",
"0.65736467",
"0.65736467",
"0.64546067",
"0.64511687",
"0.64222556",
"0.634818... | 0.60136884 | 37 |
Checks the expiration date of the card | def GfdN(YKHO):
FMoE = int(YKHO.date[0:4])
Q7Cr = int(YKHO.date[5:7])
EITL = int(YKHO.date[8:10])
if qcWV.today().year > FMoE:
YKHO.flag = False
elif qcWV.today().year == FMoE:
if qcWV.today().month > Q7Cr:
YKHO.flag = False
elif qcWV.today().month == Q7Cr:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xHJW(YKHO):\n if YKHO.expire_date < qcWV.now():\n YKHO.state = 'disabled'",
"def CJbn(YKHO):\n return YKHO.expiration_date <= YKHO._now()",
"def Kfgo(YKHO):\n ad72 = YKHO.cleaned_data['expiration_date']\n if ad72.date() <= qcWV.date.today():\n iaxi('elapsed')\n return ad72",
... | [
"0.7288992",
"0.71461076",
"0.71064097",
"0.6798181",
"0.6778251",
"0.6727741",
"0.67241824",
"0.6718817",
"0.6605499",
"0.65725285",
"0.6560101",
"0.6555981",
"0.6535536",
"0.6485778",
"0.6470241",
"0.647006",
"0.64549625",
"0.64269155",
"0.64255065",
"0.64250386",
"0.641015... | 0.6089248 | 43 |
Test case for create_nas_share_by_nas | def ktdn(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WNVq(YKHO):\n pass",
"def pgo9(YKHO):\n pass",
"def laNw(YKHO):\n pass",
"def jEFX(YKHO):\n pass",
"def gied(YKHO):\n pass",
"def ZIUp(YKHO):\n pass",
"def da0h(YKHO):\n pass",
"def qfio(YKHO):\n pass",
"def cvCj(YKHO):\n pass",
"def sSRT(YKHO):\n pass",
"def G... | [
"0.87092817",
"0.8525568",
"0.8476073",
"0.8432505",
"0.811207",
"0.8111951",
"0.79742056",
"0.7967393",
"0.7931208",
"0.7835071",
"0.7778211",
"0.7645673",
"0.7638049",
"0.75317097",
"0.7366997",
"0.7344222",
"0.7333957",
"0.7017911",
"0.6752469",
"0.66835386",
"0.65300155",... | 0.95934916 | 0 |
The model function represented by a sum of the Gaussian functions with variable positions, widths and amplitudes | def WycJ(YKHO, WKvO, *Mzf9):
Oa1e = oyIN.zeros(len(WKvO[0]))
for r845 in range(len(Mzf9) / 5):
o4D3 = Mzf9[r845 * 5]
ajwV = Mzf9[r845 * 5 + 1]
rNcn = Mzf9[r845 * 5 + 2]
yzQ0 = Mzf9[r845 * 5 + 3]
jzdc = Mzf9[r845 * 5 + 4]
J1b4 = pow(WKvO[0] - o4D3, 2) + pow(WKvO[1]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Gkmu(WKvO, yGTL=0, WTkW=26.4, k0lF=1, nxyw=0):\n Fg_i = 1 / (WTkW * oyIN.sqrt(2 * oyIN.pi))\n eHNT = Fg_i * oyIN.power(oyIN.e, -((WKvO - yGTL) ** 2 / (2 * WTkW ** 2)))\n return k0lF * eHNT + nxyw",
"def IAWS(WKvO, *SGPK):\n dQgj, WTkW, caa_, pmez = SGPK\n return caa_ * oyIN.exp(-(WKvO - dQgj) ... | [
"0.66367567",
"0.6560433",
"0.65372294",
"0.653147",
"0.646325",
"0.6463125",
"0.6366298",
"0.63595486",
"0.6355874",
"0.6349452",
"0.6348714",
"0.63399464",
"0.6332683",
"0.62884027",
"0.62640566",
"0.62518823",
"0.6249206",
"0.6184604",
"0.6174887",
"0.6136336",
"0.6109296"... | 0.5969462 | 42 |
Computes the value of the wave function in points stored in the vector x using fitting parameters and the model functions. | def gK88(YKHO, WKvO):
if YKHO._flag == 1:
Oa1e = YKHO.modelfun(WKvO, *YKHO._gf)
elif YKHO._flag == 2:
Oa1e = YKHO.modelfun1(WKvO, *YKHO._gf)
elif (YKHO._flag == 0) & (YKHO._load != '0'):
pass
else:
HwRy.exit('Wrong flag in do_fit')
return Oa1e | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _AK7(YKHO, WKvO):\n return float(1) / epAf.pi ** (float(1) / 4) * epAf.exp(WKvO ** 2 / float(-2))",
"def eHNT(YKHO, WKvO: np.array) -> float:\n return oyIN.dot(WKvO, YKHO._w) + YKHO._b",
"def Zmkp(YKHO, WKvO):\n return oyIN.dot(YKHO.w, WKvO)",
"def nrOS(YKHO, WKvO):\n if YKHO.W.data is None:\... | [
"0.7227406",
"0.68093836",
"0.6625069",
"0.6607957",
"0.6584455",
"0.64573056",
"0.6423362",
"0.6364259",
"0.63284844",
"0.6268312",
"0.6254425",
"0.61995685",
"0.61708206",
"0.61386824",
"0.61219203",
"0.61038744",
"0.6098201",
"0.6074191",
"0.605777",
"0.6016525",
"0.601011... | 0.0 | -1 |
Derivative of objective function | def ukqY(WKvO, QhHk):
return oyIN.array(-1 * QhHk / WKvO ** 2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BXW4(YKHO, WKvO, Csk6=None):\n if YKHO.weights is None:\n YKHO.compute_weights()\n wEf2 = 0.0\n for YRbF in range(YKHO.M):\n wEf2 += YKHO.weights[YRbF] * YKHO.model_list[YRbF].deriv(WKvO, Csk6)\n return wEf2",
"def cWoY(NHn2, uud_, obXE, yFBI, sVel, jm61=None):\n Iq_D = NHn2['ene... | [
"0.695038",
"0.6901204",
"0.68689436",
"0.67938876",
"0.67433965",
"0.6723132",
"0.6718581",
"0.67118424",
"0.6699861",
"0.6609691",
"0.6604677",
"0.66040355",
"0.6575055",
"0.65495205",
"0.65025395",
"0.64683104",
"0.6449893",
"0.6427921",
"0.6427921",
"0.64193326",
"0.64159... | 0.60648674 | 59 |
First test of the spin ID generation function. The function tested is pipe_control.mol_res_spin.generate_spin_id_data_array(). | def tads(YKHO):
nPrm = ['1', 'GLY']
id = CR1W.generate_spin_id_data_array(nPrm, res_num_col=1, res_name_col=2)
YKHO.assertEqual(id, ':1') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mUdd(YKHO):\n nPrm = ['1', 'GLY', None, None]\n id = CR1W.generate_spin_id_data_array(nPrm, res_num_col=1, res_name_col=2)\n YKHO.assertEqual(id, ':1')",
"def qLvI(YKHO):\n nPrm = ['1', 'GLY', '234', 'NH']\n id = CR1W.generate_spin_id_data_array(nPrm, res_num_col=1, res_name_col=2, spin_num_co... | [
"0.78925526",
"0.7822347",
"0.76349664",
"0.7610406",
"0.75354004",
"0.6579472",
"0.60722893",
"0.5760644",
"0.5730065",
"0.5698617",
"0.5577793",
"0.55716354",
"0.554988",
"0.55279154",
"0.5508247",
"0.5425098",
"0.5357982",
"0.53330165",
"0.52789444",
"0.527686",
"0.527214"... | 0.8076779 | 0 |
Test the function for returning the desired molecule data container. The function tested is pipe_control.mol_res_spin.return_molecule(). | def bGQB(YKHO):
p9De = CR1W.return_molecule('#Ap4Aase')
SX4k = CR1W.return_molecule(selection='#RNA', pipe='orig')
YKHO.assertEqual(p9De.name, 'Ap4Aase')
YKHO.assertEqual(SX4k.name, 'RNA') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iO1E(YKHO):\n YKHO.assertRaises(RXJK, CR1W.return_molecule, selection='#Ap4Aase', pipe='new')\n YKHO.assertRaises(RXJK, CR1W.return_molecule, selection='#RNA', pipe='new')",
"def I64e(YKHO):\n SiRx()\n oxOY.add(pipe_name='orig', pipe_type='mf')\n TifC = N89E.get_pipe('orig')\n TifC.mol[0].n... | [
"0.63652605",
"0.636043",
"0.6196237",
"0.61398995",
"0.6118704",
"0.59954035",
"0.5866117",
"0.5800223",
"0.57261777",
"0.56701607",
"0.56608844",
"0.55993",
"0.5499727",
"0.5499299",
"0.5475103",
"0.5424967",
"0.53821063",
"0.53715503",
"0.5311273",
"0.5283148",
"0.5275008"... | 0.82855994 | 0 |
Test the failure of the function for returning the desired molecule data container. The function tested is pipe_control.mol_res_spin.return_molecule(). | def iO1E(YKHO):
YKHO.assertRaises(RXJK, CR1W.return_molecule, selection='#Ap4Aase', pipe='new')
YKHO.assertRaises(RXJK, CR1W.return_molecule, selection='#RNA', pipe='new') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bGQB(YKHO):\n p9De = CR1W.return_molecule('#Ap4Aase')\n SX4k = CR1W.return_molecule(selection='#RNA', pipe='orig')\n YKHO.assertEqual(p9De.name, 'Ap4Aase')\n YKHO.assertEqual(SX4k.name, 'RNA')",
"def sROT(YKHO):\n SiRx()\n oxOY.add(pipe_name='orig', pipe_type='mf')\n YRbF = 0\n for as... | [
"0.7752265",
"0.6388569",
"0.6297495",
"0.6286569",
"0.62686867",
"0.6196573",
"0.6173113",
"0.617114",
"0.6123175",
"0.60926574",
"0.59676576",
"0.5883313",
"0.587805",
"0.5837631",
"0.58120954",
"0.577729",
"0.5614546",
"0.56138414",
"0.56082726",
"0.55601",
"0.55297875",
... | 0.75012517 | 1 |
Test the proper operation of the spin loop when no data pipe is present. The function tested is pipe_control.mol_res_spin.spin_loop(). | def eY8i(YKHO):
SiRx()
def ak2U():
for XU7Z in CR1W.spin_loop():
pass
YKHO.assertRaises(RXJK, ak2U) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A6JB(YKHO):\n SiRx()\n oxOY.add(pipe_name='orig', pipe_type='mf')\n YRbF = 0\n for XU7Z in CR1W.spin_loop():\n YRbF = YRbF + 1\n YKHO.assertEqual(YRbF, 0)",
"def HvT8(YKHO):\n SiRx()\n\n def ak2U():\n for asBq in CR1W.molecule_loop():\n pass\n YKHO.assertRaise... | [
"0.8414788",
"0.7601054",
"0.7113457",
"0.7043407",
"0.7001332",
"0.673422",
"0.66587317",
"0.653782",
"0.64508295",
"0.6446371",
"0.62323546",
"0.5766039",
"0.5760466",
"0.57546294",
"0.5717464",
"0.5711903",
"0.57100135",
"0.5633577",
"0.5567761",
"0.55639905",
"0.55532223"... | 0.83668333 | 1 |
Return region field as a representation. | def UpuU(YKHO, KAOR):
return KAOR.region | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zn0c(YKHO):\n return YKHO._region",
"def zn0c(YKHO) -> str:\n return YKHO.__region",
"def wHJl(YKHO: RcnRegion) -> str:\n return f'RcnRegion.{YKHO.name}'",
"def zn0c(YKHO):\n return YKHO._region",
"def zn0c(YKHO):\n return YKHO._region",
"def zn0c(YKHO):\n return YKHO._get('region')... | [
"0.6821899",
"0.6763117",
"0.67216176",
"0.6716908",
"0.6716908",
"0.6671237",
"0.6656148",
"0.6619242",
"0.6594691",
"0.65667427",
"0.6521952",
"0.65041155",
"0.65041155",
"0.65041155",
"0.65041155",
"0.65041155",
"0.65041155",
"0.6379895",
"0.63188833",
"0.63188833",
"0.631... | 0.7870258 | 0 |
Raises ValidationError if the given list of working hours is empty, the list otherwise. | def ZZRc(YKHO, BWXx):
if len(BWXx) == 0:
raise sUXu('List should not be empty.')
return BWXx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fIYp(YKHO, BWXx):\n if len(BWXx) == 0:\n raise sUXu('List should not be empty.')\n return BWXx",
"def Xl8E(vGfb):\n for W7R9 in vGfb['working_hours']:\n Ow2j = wd5N(data={'courier_id': vGfb['courier_id'], 'working_hours': W7R9})\n if not Ow2j.is_valid():\n raise sUXu(... | [
"0.7269126",
"0.6866808",
"0.6861681",
"0.67966706",
"0.6211005",
"0.6202418",
"0.59814394",
"0.58779675",
"0.5871235",
"0.57033545",
"0.5618451",
"0.55920196",
"0.5522947",
"0.5502552",
"0.5354208",
"0.5335648",
"0.52977383",
"0.525785",
"0.5205049",
"0.52016556",
"0.5159868... | 0.8444958 | 0 |
Raises ValidationError if the given list of delivery hours is empty, the list otherwise. | def fIYp(YKHO, BWXx):
if len(BWXx) == 0:
raise sUXu('List should not be empty.')
return BWXx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZZRc(YKHO, BWXx):\n if len(BWXx) == 0:\n raise sUXu('List should not be empty.')\n return BWXx",
"def Xl8E(vGfb):\n for ozc1 in vGfb['delivery_hours']:\n QEZg = wPRG(data={'order_id': vGfb['order_id'], 'delivery_hours': ozc1})\n if not QEZg.is_valid():\n raise sUXu(QE... | [
"0.70854056",
"0.6905043",
"0.6794095",
"0.66818875",
"0.631159",
"0.58860403",
"0.58774155",
"0.56794053",
"0.5401232",
"0.53009903",
"0.52992254",
"0.5283572",
"0.52385384",
"0.52176595",
"0.51481444",
"0.5120775",
"0.5075307",
"0.506215",
"0.505264",
"0.5031269",
"0.501651... | 0.83690053 | 0 |
Mark given order as completed and increases related courier's earning if current delivery is over. | def eLpg(YKHO, vGfb):
NFJ2 = L9Jq.objects.get(order_id=vGfb['order_id'])
NFJ2.complete_time = vGfb['complete_time']
NFJ2.save()
if not L9Jq.objects.filter(courier_id=NFJ2.courier_id, complete_time__isnull=True).exists():
NFJ2.courier_id.earnings = vuvg('earnings') + 500 * NFJ2.courier_type.earni... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Pb1l(YKHO, zJ7I=None):\n YKHO.status = 'paid'\n if zJ7I and (not YKHO.order_id):\n YKHO.order_id = zJ7I\n print('Order completed')\n YKHO.save()",
"def C_kh(YKHO):\n bo34.info(f'Remaining qty:{YKHO.quantity - YKHO.filled_quantity}')\n YKHO.is_active = False\n YKHO.is_finished = Tr... | [
"0.7115944",
"0.65188056",
"0.63519084",
"0.6026853",
"0.59948623",
"0.5960341",
"0.58357316",
"0.57971895",
"0.56998575",
"0.56283593",
"0.5623195",
"0.5612759",
"0.5612759",
"0.5612759",
"0.5559784",
"0.5555224",
"0.55308384",
"0.5526902",
"0.55223775",
"0.5503282",
"0.5503... | 0.5629139 | 9 |
Returns a single entry in the generated dataset. Return a bunch of random values as an example. | def BxXQ(WKvO, C7Ls, XcU5, Nq1b):
return {'frame_id': WKvO, 'frame_data': oyIN.random.randint(0, 10, dtype=oyIN.uint8, size=(C7Ls, XcU5, Nq1b))} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UIrZ(YKHO):\n return YKHO.data[tuKI.randint(0, len(YKHO.data) - 1)]",
"def UIrZ(YKHO):\n return tuKI.choice(YKHO.data)",
"def QMDC(YKHO):\n vC9B = []\n for rdlD in YKHO.data:\n vC9B.append(rdlD)\n return tuKI.choice(vC9B)",
"def ZjU7(YKHO, or8S=-1):\n if or8S < 0:\n or8S =... | [
"0.6710937",
"0.6699718",
"0.6537949",
"0.64686054",
"0.6440445",
"0.6439815",
"0.6246304",
"0.62280905",
"0.61741596",
"0.6161315",
"0.6138543",
"0.61140835",
"0.6086445",
"0.60771036",
"0.6075611",
"0.6065098",
"0.6062155",
"0.6038981",
"0.6028018",
"0.60002375",
"0.5990621... | 0.0 | -1 |
Converts lightfield to np.uint8 with a white background and no alpha channel. | def LQRh(YKHO, bJi7):
bJi7 = oyIN.float32(bJi7)
if oyIN.max(bJi7) > 1:
bJi7 = bJi7 / 256
bJi7 = oyIN.uint8(bJi7 * 256)
if bJi7.shape[-1] > 3:
bJi7[bJi7[:, :, :, :, 3] == 0] = (255, 255, 255, 0)
bJi7 = bJi7[:, :, :, :, :3]
bJi7 = tKQy(bJi7, (YKHO.width, YKHO.height))
retur... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vcmC(eHNT):\n from numpy import array, clip, uint8\n VXjJ = array(clip(eHNT, 0, 255), uint8)\n return VXjJ",
"def vcmC(LNo8):\n oyIN.clip(LNo8, 0, 255, out=LNo8)\n return LNo8.astype(oyIN.uint8)",
"def aBFP(g4y1):\n return oyIN.uint8(oyIN.clip(oyIN.round(g4y1 * 255), 0, 255))",
"def Ts_... | [
"0.68301535",
"0.66983664",
"0.65882623",
"0.64155966",
"0.594869",
"0.592428",
"0.5862508",
"0.5862508",
"0.5721261",
"0.57063997",
"0.5657134",
"0.56439483",
"0.5588113",
"0.5578203",
"0.5555673",
"0.55530274",
"0.54991704",
"0.54975706",
"0.5489271",
"0.54839927",
"0.54407... | 0.6405364 | 4 |
visualisation of the input image interest points | def yzdN(VXjJ, pATW, qfpW='r'):
WKvO = [jzdc[1] for jzdc in pATW]
LVAh = [jzdc[0] for jzdc in pATW]
KCHu = [jzdc[2] for jzdc in pATW]
QrM1.imshow(VXjJ, cmap='gray')
for WKvO, LVAh, KCHu in zip(WKvO, LVAh, KCHu):
QrM1.scatter(WKvO, LVAh, alpha=1, facecolors='none', edgecolors='r', s=KCHu ** 2... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K5rE(YKHO):\n wvEb = g74T.ImageView()\n wvEb.show()\n wvEb.setImage(YKHO.imageData)\n YKHO.layout.addWidget(wvEb, 0, 0)\n ZwHQ = oyIN.mean(YKHO.imageData, axis=0)\n IEVf = g74T.ImageView()\n IEVf.setImage(ZwHQ)\n YKHO.layout.addWidget(IEVf, 1, 0)",
"def r2sP(VXjJ):\n ETO8(VXjJ)\n ... | [
"0.640478",
"0.63847405",
"0.63375556",
"0.6287032",
"0.62815773",
"0.62655914",
"0.62209034",
"0.6200891",
"0.6193365",
"0.61490846",
"0.6137267",
"0.6074347",
"0.60507184",
"0.6024846",
"0.6012585",
"0.6002759",
"0.59989774",
"0.5996514",
"0.5971851",
"0.59677815",
"0.59248... | 0.7920742 | 0 |
Return string representation of the date in the format YYYYMMDD. | def zAg0(YKHO):
UStC = '0' * (4 - len(str(YKHO.get_year()))) + str(YKHO.get_year())
VLPo = '0' * (2 - len(str(YKHO.get_month()))) + str(YKHO.get_month())
I00G = '0' * (2 - len(str(YKHO.get_day()))) + str(YKHO.get_day())
return '%s-%s-%s' % (UStC, VLPo, I00G) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JvEs(_c1T):\n CjKC = _c1T.day\n x0eS = _c1T.month\n lO87 = _c1T.year\n quSE = str(x0eS) + '/'\n quSE += str(CjKC) + '/'\n quSE += str(lO87)\n return quSE",
"def AoiR(doIl: datetime) -> str:\n return doIl.strftime('%Y-%m-%d')",
"def Az1k(_c1T) -> str:\n return _c1T.strftime('%m/%d... | [
"0.7660189",
"0.75144106",
"0.74433655",
"0.742128",
"0.7315453",
"0.7315453",
"0.7257465",
"0.7158602",
"0.7029121",
"0.7015154",
"0.6990911",
"0.6990911",
"0.6988908",
"0.69664764",
"0.696561",
"0.6931559",
"0.68857795",
"0.6883072",
"0.6860537",
"0.6855554",
"0.68550855",
... | 0.7288755 | 6 |
Given another date, find out how many days passed since this date. | def _Ys2(YKHO, cLwD):
Sm0u = 0
EVxr = cLwD.get_year() - YKHO.get_year()
Sm0u += EVxr * 365
if EVxr > 0:
o3Eu = 1
else:
o3Eu = -1
for wx6A in range(YKHO.get_year(), cLwD.get_year() + o3Eu, o3Eu):
if ruDI(wx6A) and wx6A != cLwD.get_year():
Sm0u += 1
qTrP = c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jHrl(_c1T):\n yo7_ = qcWV.date.today()\n ebQ_ = (yo7_ - _c1T).days\n return ebQ_",
"def Fb4y(Ilc0, w0do):\n return abs(w0do - Ilc0).days",
"def rEnP(YKHO, ljfJ, hg96):\n dDFw = '%Y-%m-%d %H:%M:%S'\n csqD = qcWV.strptime(ljfJ, dDFw)\n d9fR = qcWV.strptime(hg96, dDFw)\n fCoM = d9fR - ... | [
"0.7271025",
"0.71568805",
"0.69931793",
"0.687202",
"0.6865785",
"0.68303543",
"0.6826376",
"0.68105143",
"0.6737072",
"0.67137754",
"0.6684774",
"0.6589549",
"0.6587052",
"0.6512795",
"0.65027285",
"0.647871",
"0.64774734",
"0.6458868",
"0.64533335",
"0.6426467",
"0.6415163... | 0.7558373 | 0 |
Test when branch is not master | def R0YJ(YKHO, adPr):
with adPr.join('file_a.txt').open('w') as nVrR:
nVrR.write('first file')
Yn3K.check_call(['git', 'add', '.'])
Yn3K.check_call(['git', 'commit', '-m', 'first'])
Yn3K.check_call(['git', 'checkout', '-b', 'testbranch'])
with adPr.join('file_b.txt').open('w') as nVrR:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Byg6(YKHO):\n hlel = YKHO.run_command('selfupdate --check', exitcode=None)\n YKHO.assertIn('Target: ywangd:master', hlel)\n YKHO.assertNotIn('Target: ywangd:dev', hlel)",
"def jFoS(F3jJ: Repository) -> None:\n assert 'branch' not in F3jJ.heads",
"def gsc9(srZT):\n if srZT in txrA:\n r... | [
"0.74963045",
"0.7121406",
"0.68485004",
"0.68422204",
"0.6797293",
"0.67708224",
"0.66588646",
"0.65996534",
"0.65641767",
"0.6491489",
"0.6479997",
"0.64630324",
"0.636714",
"0.6359062",
"0.63192993",
"0.63192993",
"0.6304544",
"0.62983483",
"0.6282403",
"0.6232887",
"0.622... | 0.0 | -1 |
Ensure that a commit directly before another is correctly identified as an ancestor, and that the child is identified as not an ancestor | def YKLC(YKHO, adPr):
with adPr.join('file_a.txt').open('w') as nVrR:
nVrR.write('first file')
Yn3K.check_call(['git', 'add', '.'])
Yn3K.check_call(['git', 'commit', '-m', 'first'])
eTM8 = Yn3K.check_output(['git', 'show', '-s', '--format=format:%H']).decode()
with adPr.join('file_b.txt').op... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _jN2(jSYO):\n nyyK = True\n if len(jSYO.parents) > 1:\n P1dF('Please resolve merges by re-basing. Merge commits are not allowed.', jSYO)\n nyyK = False\n return nyyK",
"def hdkC(F_G6, _AKB):\n try:\n Yn3K.check_call(['git', 'merge-base', '--is-ancestor', F_G6, _AKB])\n ... | [
"0.64292395",
"0.6359155",
"0.63076717",
"0.6198901",
"0.61818206",
"0.6159696",
"0.61231625",
"0.6046435",
"0.59505606",
"0.5904542",
"0.58570373",
"0.5819268",
"0.5811302",
"0.5809034",
"0.57591075",
"0.57033724",
"0.5699567",
"0.56659716",
"0.5589706",
"0.5573943",
"0.5563... | 0.5652296 | 18 |
add RZ gate (rotation around Zaxis). | def dnz0(YKHO, cJsZ, JT9N=Ox3Z, CKog=None):
YKHO.__add_quantum_gate(kind=b2Xk, qid=[cJsZ], phase=JT9N, ctrl=CKog)
return YKHO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dnz0(YKHO, rVnq, vexM):\n return YKHO.append(cKtp(rVnq), [vexM], [])",
"def pARc(YKHO, *qIxc, **B2fa):\n ...",
"def nXsP(YylR: tf.Tensor) -> ZylS.Tensor:\n sbx9 = ZylS.constant(0, dtype=ZylS.float64)\n w520 = ZylS.complex(sbx9, YylR)\n kLQb = ZylS.exp(w520)\n ojTy = ZylS.complex(sbx9, sbx... | [
"0.70971054",
"0.6867665",
"0.6615164",
"0.65454346",
"0.654375",
"0.647146",
"0.64289933",
"0.64135015",
"0.6400951",
"0.62438506",
"0.62215066",
"0.6033293",
"0.6030118",
"0.60268694",
"0.60091794",
"0.5993204",
"0.5962274",
"0.59318596",
"0.590546",
"0.5898538",
"0.5860597... | 0.6309543 | 9 |
add P gate (phase shift gate). | def XP5J(YKHO, cJsZ, JT9N=Ox3Z, CKog=None):
YKHO.__add_quantum_gate(kind=j5Cd, qid=[cJsZ], phase=JT9N, ctrl=CKog)
return YKHO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H2v5(YKHO, XP5J):\n YKHO._pumps.add(XP5J)",
"def FOdN(YKHO, XP5J: np.ndarray):\n return R5H8(YKHO.to_array() + XP5J)",
"def XVRe(XP5J, vexM):\n return XP5J * vexM",
"def KbQX(YKHO, V6IE, T8ck):\n raise Exception(NotImplemented)",
"def gpwt(YKHO, *bGrB):\n YKHO.reg.P = YKHO.pop()",
"def... | [
"0.6318269",
"0.59578127",
"0.5915731",
"0.5825227",
"0.5744571",
"0.5720372",
"0.5641655",
"0.559485",
"0.55680496",
"0.55604863",
"0.546399",
"0.5454236",
"0.5415402",
"0.53876317",
"0.5367949",
"0.52692",
"0.5242477",
"0.5239249",
"0.5235476",
"0.52338487",
"0.5204293",
... | 0.61503357 | 1 |
add CRZ gate (controlled RZ gate). | def fd13(YKHO, cJsZ, hbUd, JT9N=Ox3Z, CKog=None):
YKHO.__add_quantum_gate(kind=qChY, qid=[cJsZ, hbUd], phase=JT9N, ctrl=CKog)
return YKHO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fd13(YKHO, q7In, mKGN, V_1d):\n return YKHO.append(Go0_(q7In), [mKGN, V_1d], [])",
"def FIMM(YKHO, q7In):\n super().__init__('crz', 2, [q7In], num_ctrl_qubits=1)\n YKHO.base_gate = cKtp(q7In)",
"def dnz0(YKHO, rVnq, vexM):\n return YKHO.append(cKtp(rVnq), [vexM], [])",
"def z5su(YKHO, sVO7=1,... | [
"0.6958848",
"0.61419284",
"0.6064584",
"0.56396747",
"0.5535329",
"0.5404921",
"0.5390143",
"0.53515494",
"0.5310394",
"0.52780074",
"0.5277078",
"0.5226025",
"0.5192308",
"0.5169303",
"0.5124667",
"0.5121535",
"0.5059638",
"0.5004625",
"0.4980288",
"0.49734604",
"0.49685302... | 0.66018766 | 1 |
add CU3 gate (controlled U3 gate). | def Qm_h(YKHO, cJsZ, hbUd, Cwt5=Ox3Z, UqYS=Ox3Z, KMvS=Ox3Z, CKog=None):
YKHO.__add_quantum_gate(kind=MeLS, qid=[cJsZ, hbUd], phase=Cwt5, phase1=UqYS, phase2=KMvS, ctrl=CKog)
return YKHO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kh1c(YKHO, cJsZ, Cwt5=Ox3Z, UqYS=Ox3Z, KMvS=Ox3Z, CKog=None):\n YKHO.__add_quantum_gate(kind=NqsL, qid=[cJsZ], phase=Cwt5, phase1=UqYS, phase2=KMvS, ctrl=CKog)\n return YKHO",
"def L3DL(YKHO):\n YKHO.check_oneq_special_cases(xBcl(0.0, 0.1, -0.1).to_matrix(), 'U3', {})\n YKHO.check_oneq_special_ca... | [
"0.6172833",
"0.60709476",
"0.59816235",
"0.597661",
"0.58950996",
"0.5756811",
"0.57265884",
"0.56782377",
"0.5533537",
"0.54784715",
"0.54042715",
"0.53975767",
"0.5389443",
"0.5381317",
"0.5351581",
"0.5308488",
"0.52944463",
"0.5283771",
"0.5253617",
"0.5241266",
"0.52193... | 0.69713616 | 0 |
Wrapper for dot product operation, in order to be compatible with both Theano and Tensorflow | def uYbU(WKvO, WZcn):
if nMvt.backend() == 'tensorflow':
return nMvt.squeeze(nMvt.dot(WKvO, nMvt.expand_dims(WZcn)), axis=-1)
else:
return nMvt.dot(WKvO, WZcn) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yKrh(n2Q1: torch.Tensor, SpII: torch.Tensor, PJWX: bool=False):\n assert n2Q1.size() == SpII.size(), 'Sizes for dot-product must match'\n return ohcp.dot_prod(n2Q1, SpII, PJWX)",
"def iVXA(jzdc, Fg_i):\n return oyIN.einsum('ijk,ikl->ijl', jzdc, Fg_i)",
"def BJ1H(jzdc, Fg_i):\n jzdc, Fg_i = (uM5... | [
"0.7651723",
"0.76122725",
"0.75896275",
"0.75178",
"0.74978065",
"0.74902385",
"0.74902385",
"0.74902385",
"0.74902385",
"0.7466889",
"0.74378735",
"0.7429341",
"0.7418364",
"0.73810273",
"0.7376632",
"0.7343613",
"0.7331493",
"0.73104995",
"0.7309816",
"0.72749436",
"0.7270... | 0.7535402 | 3 |
Returns path (relative to MEDIA_ROOT/MEDIA_URL) to directory for storing pagescope files. This allows multiple pages to contain files with identical names without namespace issues. Plugins such as Picture can use this method to initialise the 'upload_to' parameter for | def gF25(YKHO, Ux0P):
return gzes(gCuF.CMS_PAGE_MEDIA_PATH, '%d' % YKHO.id, Ux0P) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AjWU(YKHO):\n return Hy7s.path.join(gCuF.MEDIA_ROOT, YKHO.upload_dir_rel())",
"def hzcq(YKHO):\n return Hy7s.path.join(gCuF.MEDIA_ROOT, YKHO.public_upload_dir_rel())",
"def aSzP(KAOR, Ux0P):\n return Hy7s.path.join(getattr(gCuF, 'FILEBROWSER_DIRECTORY'), str(KAOR.project.short_name.lower()), Ux0P)... | [
"0.75417954",
"0.7337136",
"0.69482565",
"0.6842317",
"0.6789822",
"0.6673382",
"0.6609158",
"0.66040426",
"0.6584662",
"0.63800055",
"0.6354606",
"0.6346663",
"0.6338599",
"0.6182578",
"0.61359954",
"0.6135264",
"0.6113495",
"0.60989684",
"0.6035798",
"0.60146284",
"0.599824... | 0.6443212 | 9 |
viewfunction for home view | def kZiy() -> 'html':
if QePW.method == 'POST':
if QePW.form.get('close-vacation'):
phGJ = QePW.form.get('close-vacation')
qv1X = TpSK.query.filter_by(id=phGJ).first()
qv1X.notify = False
NCls.session.add(qv1X)
NCls.session.commit()
ret... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kZiy(QePW):\n return _1tc(QePW, 'compta/home.html')",
"def kZiy(YKHO, *qIxc, **B2fa):\n pass",
"def kZiy(QePW):\n return _1tc(QePW, 'home.html')",
"def muIg(QePW):\n return _1tc(QePW, 'SNP_Feature_View/feature_view_home.html')",
"def kZiy(QePW):\n return _1tc(QePW, 'base/home.html')",
... | [
"0.7883946",
"0.7870451",
"0.7797532",
"0.7665668",
"0.7648475",
"0.76462525",
"0.7611321",
"0.7597093",
"0.7572959",
"0.7529134",
"0.7512292",
"0.7511995",
"0.750166",
"0.7486506",
"0.7486506",
"0.7486506",
"0.7486506",
"0.7486506",
"0.7486506",
"0.7486506",
"0.7486506",
"... | 0.0 | -1 |
Convert miles per imperial gallon into kilometers per liter. | def vtnG(FFW4):
vGPN = FFW4 * u51j / R41u
return round(vGPN, 2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zpqm(JYmd):\n return JYmd * 1.60934",
"def zpqm(JYmd: float) -> float:\n TE6a = float(JYmd)\n ssQ2 = float(float(TE6a) * 1.60934)\n return round(ssQ2, 2)",
"def brid(q5XV):\n return q5XV * 0.621371",
"def QAKp(l1UJ):\n JYmd = l1UJ / 1609.344\n return JYmd",
"def kkZL(ssQ2: float) -... | [
"0.810501",
"0.77146244",
"0.7660003",
"0.7547199",
"0.7521227",
"0.7105088",
"0.7034444",
"0.6854184",
"0.6576829",
"0.6553181",
"0.6421252",
"0.6299841",
"0.62697154",
"0.6260179",
"0.6246678",
"0.62450707",
"0.6243071",
"0.6237388",
"0.6223361",
"0.6187523",
"0.6170195",
... | 0.81636584 | 0 |
Convert a name into initials | def CqEV(mWFP):
ezWE = mWFP.split()
if len(ezWE) == 2:
_CLi = ezWE[0][0] + '.' + ezWE[1][0]
Aofo = _CLi.upper()
else:
Aofo = None
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NPVu(mWFP, Lrae=True):\n if Lrae:\n return mWFP[0:1].upper()\n return mWFP[0:1]",
"def xWjI(eHMM):\n if eHMM is not None and len(eHMM) > 0:\n return ''.join([KCHu[0] for KCHu in eHMM.split(' ')]).upper()\n else:\n return ''",
"def uD9m(Emd4, mWFP):\n return ' '.join(mWFP... | [
"0.8376018",
"0.81219697",
"0.7692363",
"0.7692363",
"0.7692363",
"0.7686876",
"0.76175344",
"0.7615349",
"0.7572603",
"0.74991775",
"0.7491891",
"0.74680877",
"0.74660325",
"0.73977965",
"0.73952067",
"0.7293612",
"0.72790784",
"0.7277742",
"0.7218639",
"0.7168545",
"0.71612... | 0.694311 | 35 |
Returns a new Wall mirrored over the middle of the lanes. | def cvwt(YKHO):
MHVK = [WKvO for WKvO in YKHO.rot]
MHVK[1] = -MHVK[1]
lB2d = [WKvO for WKvO in YKHO.lrot]
lB2d[1] = -lB2d[1]
lB2d[2] = -lB2d[2]
return Rlo4(YKHO.beat, YKHO.dur, -YKHO.r, -YKHO.l, YKHO.d, YKHO.u, MHVK, lB2d) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dv8z(YKHO, WKvO, LVAh, epBp, TVTK=10, u54L=10, H2v2=10, iQG7=None, mWFP='wall', RMdd=None):\n global wallnum\n exwG = epBp + TVTK / 2\n KCHu = epBp - TVTK / 2\n tTpl = WKvO + u54L / 2\n yzQ0 = WKvO - u54L / 2\n _s9e = mfJg(mWFP + str(_5iX), DEza(u54L, H2v2, 1), DhiK(WKvO, LVAh + H2v2 / 2, exw... | [
"0.63168657",
"0.63059783",
"0.6195468",
"0.6179768",
"0.6068646",
"0.60602653",
"0.60175794",
"0.5983031",
"0.59415644",
"0.59131116",
"0.5791608",
"0.5791608",
"0.5719669",
"0.569298",
"0.568444",
"0.566718",
"0.5666786",
"0.56274647",
"0.5609347",
"0.55890185",
"0.5540185"... | 0.7466312 | 0 |
Instantiate an environment wrapped to be compatible with stackrl.Training. | def PEX4(sEAN='Stack-v0', Kkq5=None, XkN1=None, O2sd=None, crCa=False, Ovu9=False, **B2fa):
if O2sd:
return Ali1(sEAN, n_parallel=Kkq5, block=XkN1, curriculum=O2sd, unwrapped=crCa, as_path=Ovu9, **B2fa)
elif Ovu9:
if isinstance(sEAN, ch3p.Env):
Cqok = sEAN.unwrapped.spec
elif... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def giNa(HSpE: bool=False, D5gV: str='MountainCarContinuous-v0') -> d7df.Environment:\n del HSpE\n GikI = ch3p.make(D5gV)\n GikI = VUMT.GymWrapper(GikI)\n GikI = VUMT.CanonicalSpecWrapper(GikI, clip=True)\n GikI = VUMT.SinglePrecisionWrapper(GikI)\n return GikI",
"def giNa(yokr, xbnC):\n Gik... | [
"0.69595337",
"0.6858885",
"0.6837624",
"0.67771894",
"0.6776568",
"0.66850716",
"0.6674813",
"0.6640321",
"0.6640321",
"0.65623885",
"0.6454325",
"0.6391635",
"0.63682014",
"0.6335106",
"0.6326718",
"0.6305858",
"0.63046753",
"0.62897015",
"0.62835145",
"0.6258138",
"0.62372... | 0.56070113 | 91 |
Loads and parses a YAML configuration file. | def LgIG(pmON='configs/default.yaml') -> dict:
with open(pmON, 'r', encoding='utf-8') as c1qH:
_Fei = eJb6.safe_load(c1qH)
return _Fei | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b1D0(YKHO) -> cuzp:\n lqQH = pmON.join(pmON.dirname(pmON.abspath(xAKo)), YKHO.config_file)\n try:\n with open(lqQH, 'r') as eHNT:\n _fuv = eJb6.load(eHNT, Loader=eJb6.FullLoader)\n return _fuv\n except FileNotFoundError as fnfe:\n raise FileNotFoundError('configurat... | [
"0.7902378",
"0.7885701",
"0.78658706",
"0.78286827",
"0.77730346",
"0.7747524",
"0.77428514",
"0.77232844",
"0.7719344",
"0.77055913",
"0.7682004",
"0.7681451",
"0.7674585",
"0.7672605",
"0.7634164",
"0.7608393",
"0.7578547",
"0.75417423",
"0.75334585",
"0.74926627",
"0.7486... | 0.73542976 | 26 |
Returns the latest checkpoint (by time) from the given directory. If there is no checkpoint in this directory, returns None | def WvV7(hp8U: str) -> h8nf[str]:
zxMN = SC2F.glob('{}/*.ckpt'.format(hp8U))
ZhT8 = None
if zxMN:
ZhT8 = max(zxMN, key=Hy7s.path.getctime)
return ZhT8 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WvV7(Emd4, SItH):\n fcOk = Hy7s.path.join(SItH, Emd4.CHECKPOINT_DIR_NAME)\n bfB5 = sorted(Hy7s.listdir(fcOk), reverse=True)\n return Hy7s.path.join(fcOk, bfB5[0])",
"def xTdJ(pGQh: str) -> h8nf[str]:\n U5bT = None\n fdMZ = gHPw()\n if fdMZ == 0:\n U5bT = PCEV(pGQh)\n if not (pImw.... | [
"0.7700107",
"0.74362636",
"0.7350826",
"0.70492095",
"0.70353407",
"0.686673",
"0.6788162",
"0.6776815",
"0.6733546",
"0.67268467",
"0.66239303",
"0.64845854",
"0.64429843",
"0.640534",
"0.62015307",
"0.6133778",
"0.6057183",
"0.6019879",
"0.59937334",
"0.5984722",
"0.595231... | 0.8131056 | 0 |
Freeze the parameters of this module, i.e. do not update them during training | def OGtb(yR_P: nn.Module):
for bGrB, XP5J in yR_P.named_parameters():
XP5J.requires_grad = False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FiJ9(YKHO):\n YKHO.frozen = True\n for xqoZ in YKHO.parameters():\n xqoZ.requires_grad = False",
"def iFJl(YKHO):\n PF0a = YKHO._model._net\n for xqoZ in PF0a.parameters():\n xqoZ.requires_grad = False",
"def OGtb(C3ST: nn.Module):\n for Mzf9 in C3ST.parameters():\n Mzf9... | [
"0.77948684",
"0.76171887",
"0.7449217",
"0.73946375",
"0.7314692",
"0.729194",
"0.72498846",
"0.7186831",
"0.70168376",
"0.69934535",
"0.69930685",
"0.6821718",
"0.68051827",
"0.6795892",
"0.6745624",
"0.6734002",
"0.67038447",
"0.66956234",
"0.66798335",
"0.6644752",
"0.664... | 0.73185027 | 4 |
Simulate a PUT request to an ASGI application. | async def simulate_put(YKHO, pmON='/', **B2fa) -> lm55:
return await YKHO.simulate_request('PUT', pmON, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K4LG(P4t4, pmON, **B2fa) -> lm55:\n return f3q3(P4t4, 'PUT', pmON, **B2fa)",
"def NpNj(YKHO, *qIxc, **B2fa):\n YKHO.request('put', *qIxc, **B2fa)",
"def dfAT(YKHO):\n YKHO.http_method = 'PUT'\n pass",
"def _ycG(YKHO, *qIxc, **B2fa):\n return YKHO._request('put', *qIxc, **B2fa)",
"def K4L... | [
"0.8130414",
"0.72275764",
"0.7175433",
"0.71189624",
"0.6995265",
"0.69159925",
"0.69084567",
"0.68669564",
"0.68038714",
"0.6794044",
"0.6616889",
"0.6588042",
"0.6564535",
"0.65348846",
"0.65348846",
"0.65348846",
"0.65310556",
"0.6496377",
"0.6471326",
"0.6454387",
"0.645... | 0.69048744 | 7 |
Simulate a PATCH request to an ASGI application. | async def simulate_patch(YKHO, pmON='/', **B2fa) -> lm55:
return await YKHO.simulate_request('PATCH', pmON, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def quGx(P4t4, pmON, **B2fa) -> lm55:\n return f3q3(P4t4, 'PATCH', pmON, **B2fa)",
"def Po4F(YKHO, *qIxc, **B2fa):\n YKHO.request('patch', *qIxc, **B2fa)",
"def quGx(YKHO, pmON='/', **B2fa):\n return YKHO.simulate_request('PATCH', pmON, **B2fa)",
"def fYra(YKHO):\n geh0 = YKHO.httpbin_4.test_requ... | [
"0.8286581",
"0.7499736",
"0.73026884",
"0.70985633",
"0.70926195",
"0.7085156",
"0.6907411",
"0.6900558",
"0.68608654",
"0.6830805",
"0.6811523",
"0.68058413",
"0.6804034",
"0.673692",
"0.67207915",
"0.6695585",
"0.6695585",
"0.6695585",
"0.6695585",
"0.6695585",
"0.6695585"... | 0.7162519 | 3 |
Simulate a PUT request to a WSGI or ASGI application. | def K4LG(P4t4, pmON, **B2fa) -> lm55:
return f3q3(P4t4, 'PUT', pmON, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dfAT(YKHO):\n YKHO.http_method = 'PUT'\n pass",
"def NpNj(YKHO, *qIxc, **B2fa):\n YKHO.request('put', *qIxc, **B2fa)",
"def _ycG(YKHO, *qIxc, **B2fa):\n return YKHO._request('put', *qIxc, **B2fa)",
"def K4LG(YKHO, pmON='/', **B2fa):\n return YKHO.simulate_request('PUT', pmON, **B2fa)",
"... | [
"0.7430654",
"0.7420765",
"0.7254375",
"0.72292215",
"0.7130859",
"0.7076189",
"0.70692164",
"0.7004767",
"0.696957",
"0.69484067",
"0.692274",
"0.69176435",
"0.68755746",
"0.683001",
"0.6824943",
"0.68128455",
"0.67805594",
"0.6752393",
"0.6752393",
"0.6752393",
"0.6705847",... | 0.82123727 | 0 |
Simulate a PATCH request to a WSGI or ASGI application. | def quGx(P4t4, pmON, **B2fa) -> lm55:
return f3q3(P4t4, 'PATCH', pmON, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Po4F(YKHO, *qIxc, **B2fa):\n YKHO.request('patch', *qIxc, **B2fa)",
"def quGx(YKHO, pmON='/', **B2fa):\n return YKHO.simulate_request('PATCH', pmON, **B2fa)",
"def fYra(YKHO):\n geh0 = YKHO.httpbin_4.test_requests_patch_method()\n YKHO.assertEqual(geh0.request.method, 'PATCH')\n YKHO.assertE... | [
"0.77237695",
"0.7579202",
"0.74945503",
"0.7375038",
"0.7336147",
"0.71931046",
"0.709597",
"0.7059055",
"0.70421225",
"0.70336956",
"0.6954821",
"0.6954437",
"0.69469035",
"0.69469035",
"0.69469035",
"0.69469035",
"0.69469035",
"0.69469035",
"0.69469035",
"0.69469035",
"0.6... | 0.843222 | 0 |
Simulate a PUT request to a WSGI application. | def K4LG(YKHO, pmON='/', **B2fa) -> lm55:
return YKHO.simulate_request('PUT', pmON, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K4LG(P4t4, pmON, **B2fa) -> lm55:\n return f3q3(P4t4, 'PUT', pmON, **B2fa)",
"def dfAT(YKHO):\n YKHO.http_method = 'PUT'\n pass",
"def NpNj(YKHO, *qIxc, **B2fa):\n YKHO.request('put', *qIxc, **B2fa)",
"def BOG3(bD7m, pKmM='text/html'):\n OGpo = iZy6()\n return OGpo.RequestMap(bD7m, meth... | [
"0.7857318",
"0.695292",
"0.6949761",
"0.6900196",
"0.68887955",
"0.68399256",
"0.6778951",
"0.676933",
"0.6731947",
"0.668466",
"0.6678236",
"0.66361004",
"0.6608237",
"0.6584145",
"0.65096",
"0.65074146",
"0.65074146",
"0.65074146",
"0.64896715",
"0.6464989",
"0.64510846",
... | 0.65861607 | 13 |
Simulate a PATCH request to a WSGI application. | def quGx(YKHO, pmON='/', **B2fa) -> lm55:
return YKHO.simulate_request('PATCH', pmON, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def quGx(P4t4, pmON, **B2fa) -> lm55:\n return f3q3(P4t4, 'PATCH', pmON, **B2fa)",
"def Po4F(YKHO, *qIxc, **B2fa):\n YKHO.request('patch', *qIxc, **B2fa)",
"def quGx(YKHO, pmON='/', **B2fa):\n return YKHO.simulate_request('PATCH', pmON, **B2fa)",
"def fYra(YKHO):\n geh0 = YKHO.httpbin_4.test_requ... | [
"0.8154428",
"0.73881894",
"0.72425157",
"0.7032009",
"0.69893557",
"0.69432026",
"0.6927841",
"0.68865746",
"0.68196744",
"0.67764145",
"0.6765585",
"0.67158455",
"0.66943085",
"0.66934305",
"0.6676714",
"0.6676714",
"0.6676714",
"0.6673792",
"0.66581106",
"0.66523695",
"0.6... | 0.69515896 | 5 |
Estimated CRF, transform irradiance L to RGB image. If `crf_table` is inverted, transform RGB image to irradiance L. | def xMF4(g4y1, ykP6, JCoA=1):
FMPo = oyIN.clip(g4y1 / JCoA, 0, 1)
_Nd4 = ykP6.shape[0] - 1
ftYh = (FMPo * _Nd4).astype('int32')
U5bT = []
for YRbF in ftYh.flatten():
U5bT.append(ykP6[YRbF])
return oyIN.reshape(U5bT, g4y1.shape) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uXqM(UXqs, VXjJ, noLj, R41r, B7gB, Yygs):\n pO2m = UXqs.shape[0]\n LcFx = UXqs.shape[1]\n Z5MU = oyIN.unique(UXqs.flatten())\n NXpY = 1 + 5 * (oyIN.array(VXjJ.shape).max() / 3000)\n G9jH.info(qcWV.now().strftime('%Y-%m-%d-%H-%M-%S'))\n G9jH.info('CRF scale: %f' % NXpY)\n G9jH.info(qcWV.now... | [
"0.543145",
"0.54256666",
"0.54248387",
"0.537617",
"0.5180758",
"0.5143052",
"0.50994086",
"0.5099363",
"0.5006858",
"0.49987954",
"0.49229413",
"0.49061176",
"0.4905395",
"0.48856765",
"0.48807964",
"0.48664606",
"0.4861298",
"0.48559242",
"0.48515674",
"0.48475456",
"0.483... | 0.52573466 | 4 |
Return a dict of this object, with keys in JSON format. | def Z_KB(mP5G):
kR58 = ''
if mP5G.country:
kR58 = ECWZ.countries.search_fuzzy(mP5G.country)[0].name
return {'streetAddress': mP5G.street, 'streetAddressAdditional': mP5G.street_additional or '', 'addressType': mP5G.address_type, 'addressCity': mP5G.city, 'addressRegion': mP5G.region or '', 'addressC... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qQXR(YKHO):\n return qQXR.dumps(YKHO, default=lambda z1Rg: z1Rg.__dict__, sort_keys=True, indent=4)",
"def oD7C(YKHO) -> cuzp[str, ImMB]:\n return YKHO.__dict__",
"def qQXR(YKHO):\n return {'id': YKHO.id, 'name': YKHO.name}",
"def Bpko(YKHO):\n return YKHO.__dict__",
"def Napc(YKHO):\n n... | [
"0.8144109",
"0.8142001",
"0.8105588",
"0.796904",
"0.7954904",
"0.7867204",
"0.78586286",
"0.7856205",
"0.7856205",
"0.785492",
"0.785492",
"0.785492",
"0.7854319",
"0.7854319",
"0.7854319",
"0.783863",
"0.783863",
"0.783863",
"0.783863",
"0.7835416",
"0.7831754",
"0.78317... | 0.0 | -1 |
Return incorporation agreement from filing json. | def yG5L(JWum):
return JWum.json['filing']['incorporationApplication'].get('incorporationAgreement', {}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def v6DJ(YKHO):\n pass",
"def Ggir():\n pass",
"def sWRy(nPrm):\n yvT9 = {}\n for H5ew, BWXx in nPrm.items():\n if 'somef' not in H5ew:\n if isinstance(BWXx, list) or isinstance(BWXx, tuple):\n if len(BWXx) > 0:\n if H5ew == uwaB.CAT_LICENSE:\n ... | [
"0.56559736",
"0.55618954",
"0.5244109",
"0.5151223",
"0.5143148",
"0.5112683",
"0.5045774",
"0.49902293",
"0.4906993",
"0.48691648",
"0.48342612",
"0.4829858",
"0.48195443",
"0.48008758",
"0.478164",
"0.47634107",
"0.47534582",
"0.47188726",
"0.47175965",
"0.4712452",
"0.465... | 0.7839245 | 0 |
This is a helper function for alignment models for embeddings. This function returns an embedding for features[name] of size params.name_embed_size assuming a vocab size of params.name_vocab_size. features[feature_name] has to be an integer tensor of shape [batch_size, max_sequence_length]. | def Q1PJ(YKHO, bySB, BZ2A, NArs):
with ZylS.variable_scope('%s_embed' % BZ2A):
LoCM = ZylS.get_variable('embedding_matrix', [getattr(NArs, '%s_vocab_size' % BZ2A), getattr(NArs, '%s_embed_size' % BZ2A)])
return ZylS.nn.embedding_lookup(LoCM, bySB[BZ2A]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i7di(eBSA, jXxl, Agjb):\n wjQX = ZylS.Variable(ZylS.random_uniform((jXxl, Agjb), -1, 1))\n Q1PJ = ZylS.nn.embedding_lookup(wjQX, eBSA)\n return Q1PJ",
"def PzO7(Wc9F, fA6H):\n for eHNT in range(PSrQ.num_feature):\n fSOu = Wc9F[:, eHNT]\n mI7d = PSrQ.schema[eHNT]\n if eHNT == ... | [
"0.6896678",
"0.66577274",
"0.6655466",
"0.6557072",
"0.6546917",
"0.6513097",
"0.6508412",
"0.6499041",
"0.648341",
"0.6480802",
"0.63810956",
"0.6362331",
"0.6333119",
"0.62890506",
"0.6286926",
"0.62582594",
"0.6158827",
"0.61498016",
"0.61458313",
"0.61418664",
"0.6091481... | 0.7802241 | 0 |
Split a large 1D array into smaller nonoverlapping arrays | def iV2P(dg6W, yMhW):
nnyg = dg6W.shape[0] / yMhW
l3Db = dg6W.reshape(nnyg, yMhW)
return l3Db | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wMk8(qw7D, zNig):\n Sk_F = []\n while len(qw7D) > zNig:\n HK5E = qw7D[:zNig]\n Sk_F.append(HK5E)\n qw7D = qw7D[zNig:]\n Sk_F.append(qw7D)\n return Sk_F",
"def TsU8(ezWE, wzH_=44100):\n return oyIN.split(ezWE, oyIN.arange(wzH_, len(ezWE), wzH_))",
"def wMk8(ezWE, yhdM):\n... | [
"0.71960866",
"0.6999235",
"0.69500226",
"0.69150746",
"0.68858933",
"0.67999125",
"0.67823654",
"0.67116314",
"0.66916007",
"0.6638905",
"0.6625901",
"0.6571622",
"0.65425587",
"0.65102327",
"0.649938",
"0.64914256",
"0.64729416",
"0.6355834",
"0.631842",
"0.63149273",
"0.62... | 0.6572632 | 11 |
Preprocessing resize image to 300x300 RGB | def jIXb(LNo8):
LNo8 = XC5k.cvtColor(LNo8, XC5k.COLOR_BGR2RGB)
LNo8 = XC5k.resize(LNo8, (300, 300))
LNo8 = LNo8.astype(oyIN.uint8).copy()
return LNo8 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hmm2(LNo8):\n LNo8 = Einh(LNo8)\n return LNo8",
"def NVED(VXjJ):\n return XC5k.resize(VXjJ, (128, 128))",
"def LjgZ(VXjJ):\n ROpF = VXjJ.shape\n VXjJ = VXjJ[epAf.floor(ROpF[0] / 4):ROpF[0] - 25, 0:ROpF[1]]\n VXjJ = XC5k.resize(VXjJ, (BrXt, UrEU), interpolation=XC5k.INTER_AREA)\n return... | [
"0.75653034",
"0.73177403",
"0.72640413",
"0.72331154",
"0.7159523",
"0.71543556",
"0.7111782",
"0.7074421",
"0.7067297",
"0.70329565",
"0.7021435",
"0.7020356",
"0.6993711",
"0.69357604",
"0.6925325",
"0.68780726",
"0.68340766",
"0.6830349",
"0.6808554",
"0.6788847",
"0.6787... | 0.63632196 | 100 |
Perform a horizontal shift on all rows. Pass left=True for left and left=False for right. The grid will be changed inplace. | def uDGi(Cs6h, LFlW=True):
Mkmy = 0
for YRbF, rdlD in enumerate(Cs6h):
Cs6h[YRbF], L749 = Jh44(rdlD, LFlW)
Mkmy += L749
return Mkmy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uDGi(Cs6h, LFlW=True):\n for YRbF, rdlD in enumerate(Cs6h):\n Cs6h[YRbF] = Jh44(rdlD, LFlW)",
"def VfNG(YKHO):\n z2tq = rApN(oyIN.rot90(oyIN.rot90(oyIN.rot90(YKHO.grid))))\n YKHO.grid = oyIN.rot90(z2tq.swipeBase())",
"def asS5(Cs6h):\n for rdlD in range(4):\n XLMv = []\n fo... | [
"0.6738422",
"0.6710681",
"0.6562622",
"0.65071034",
"0.64332944",
"0.63762164",
"0.62841797",
"0.6200166",
"0.617695",
"0.6172406",
"0.60970026",
"0.6096321",
"0.5997006",
"0.5983838",
"0.598277",
"0.5941541",
"0.59146863",
"0.58851564",
"0.58777547",
"0.58430284",
"0.583664... | 0.6371835 | 6 |
Return a list of coordinate pairs corresponding to empty cells. | def gfID(Cs6h):
lsmZ = []
for r845, rdlD in enumerate(Cs6h):
for YRbF, wEf2 in enumerate(rdlD):
if not wEf2:
lsmZ.append((r845, YRbF))
return lsmZ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gfID(Cs6h):\n lsmZ = []\n for r845, rdlD in enumerate(Cs6h):\n for YRbF, wEf2 in enumerate(rdlD):\n if not wEf2:\n lsmZ.append((r845, YRbF))\n return lsmZ",
"def Dn0W(QTBn):\n JnVq = []\n for WKvO, rdlD in enumerate(QTBn):\n for LVAh, VmPb in enumerate(r... | [
"0.82954764",
"0.8106722",
"0.7881721",
"0.78399885",
"0.7816201",
"0.7774224",
"0.76896685",
"0.7566796",
"0.75358933",
"0.7367822",
"0.7362139",
"0.7313527",
"0.72766584",
"0.7221659",
"0.7109574",
"0.7071009",
"0.7039268",
"0.6926364",
"0.6887955",
"0.68496126",
"0.6788944... | 0.82016677 | 1 |
Resets the player list | def QhFZ(YKHO):
YKHO.playerList = [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def em0y(YKHO):\n YKHO.players.clear()",
"def SiRx(YKHO):\n YKHO.board_cards = []\n YKHO.position = -1\n YKHO._reset_players()",
"def Flko(YKHO):\n YKHO.player_draws.clear()\n YKHO.player_points.clear()\n YKHO.num_players = 0\n YKHO.cards.shuffle()",
"def SiRx(YKHO):\n YKHO.players... | [
"0.83051455",
"0.7911027",
"0.76908463",
"0.7556388",
"0.74714035",
"0.7445043",
"0.73784745",
"0.7369854",
"0.73216003",
"0.71424335",
"0.7129414",
"0.7110906",
"0.7039333",
"0.7008726",
"0.697688",
"0.6962779",
"0.69450843",
"0.6891331",
"0.6891331",
"0.68692124",
"0.683343... | 0.9049031 | 0 |
Sets the sales of this PaymentTerm. | def GP7O(YKHO, GP7O):
YKHO._sales = GP7O | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M0ki(YKHO, NGt8):\n YKHO._sales_rep = NGt8",
"def ZEdG(YKHO, ZEdG):\n YKHO._sells = ZEdG",
"def GP7O(YKHO):\n if oyIN.isscalar(YKHO.demand_decr):\n YKHO.demand_decr = oyIN.full((1, YKHO.num_years - 1), YKHO.demand_decr)\n if oyIN.isscalar(YKHO.yr1_demand):\n LOFc = oyIN.zeros((1, ... | [
"0.6126827",
"0.602496",
"0.56689394",
"0.5279737",
"0.5215819",
"0.5194685",
"0.51591015",
"0.4797136",
"0.47962275",
"0.47865313",
"0.47671393",
"0.4763767",
"0.4688577",
"0.46609876",
"0.46363702",
"0.46235058",
"0.46217558",
"0.46022666",
"0.45736754",
"0.45663998",
"0.45... | 0.8079007 | 0 |
Compute an npoint moving sum of the data in vector x. Result will have a length of len(x) (n1). Using loop avoids the accumulated errors that can result from using numpy.cumsum, though cumsum is (probably) faster. | def yyst(WKvO, exwG):
r8hN = len(WKvO)
Aofo = VEDo.zeros(r8hN - (exwG - 1))
for YRbF in range(exwG):
Aofo += WKvO[YRbF:r8hN - exwG + YRbF + 1]
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zsZT(WKvO, ywwl):\n _3JK = oyIN.cumsum(oyIN.insert(WKvO, 0, 0))\n return (_3JK[ywwl:] - _3JK[:-ywwl]) / float(ywwl)",
"def zsZT(WKvO, ywwl):\n _3JK = oyIN.cumsum(oyIN.insert(WKvO, 0, 0))\n return (_3JK[ywwl:] - _3JK[:-ywwl]) / float(ywwl)",
"def QG4T(WKvO, W30o, KVH6):\n lHmx, ryd4, dTiZ, t2... | [
"0.6777347",
"0.66602695",
"0.6657788",
"0.6452437",
"0.6445342",
"0.64377373",
"0.639484",
"0.6387214",
"0.6319946",
"0.6303997",
"0.62510145",
"0.6246268",
"0.6218636",
"0.61660457",
"0.6135385",
"0.61169654",
"0.61049765",
"0.60991657",
"0.60791415",
"0.6040553",
"0.597721... | 0.65586084 | 3 |
Infers whether the target is in indices format or one_hot format. | def spG3(input: torch.Tensor, x6A0: torch.Tensor) -> str:
if input.shape == x6A0.shape:
return 'one_hot'
elif input.ndim == x6A0.ndim + 1:
return 'indices'
else:
raise RuntimeError(f'Unable to infer indices or one_hot. Targets has shape {x6A0.shape} and the inputs to cross entropy ha... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def y1bx(input: torch.Tensor, x6A0: torch.Tensor, jTqs: Optional[int]=None) -> ht2j.Tensor:\n if spG3(input, x6A0) == 'indices':\n if jTqs is None:\n jTqs = input.shape[1]\n x6A0 = N9CW(x6A0, num_classes=jTqs, dim=1)\n return x6A0.float()",
"def xCpU(x6A0, jTqs):\n U5bT = oyIN.z... | [
"0.6951809",
"0.68581086",
"0.6681324",
"0.66152394",
"0.66152394",
"0.66152394",
"0.66152394",
"0.6578733",
"0.6549587",
"0.65139776",
"0.63884944",
"0.63483554",
"0.63066226",
"0.6301925",
"0.6278177",
"0.6259506",
"0.6223372",
"0.61686593",
"0.61447483",
"0.61230075",
"0.6... | 0.7429881 | 0 |
r"""Ensures that the targets are in a onehot format rather than an index format. | def y1bx(input: torch.Tensor, x6A0: torch.Tensor, jTqs: Optional[int]=None) -> ht2j.Tensor:
if spG3(input, x6A0) == 'indices':
if jTqs is None:
jTqs = input.shape[1]
x6A0 = N9CW(x6A0, num_classes=jTqs, dim=1)
return x6A0.float() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xCpU(x6A0, jTqs):\n U5bT = oyIN.zeros((jTqs, x6A0.shape[0]))\n U5bT[x6A0, oyIN.arange(x6A0.size)] = 1\n return U5bT",
"def spG3(input: torch.Tensor, x6A0: torch.Tensor) -> str:\n if input.shape == x6A0.shape:\n return 'one_hot'\n elif input.ndim == x6A0.ndim + 1:\n return 'indice... | [
"0.70892847",
"0.70067805",
"0.6761015",
"0.6672298",
"0.652522",
"0.64999425",
"0.6430373",
"0.62493813",
"0.62427723",
"0.6210333",
"0.6210333",
"0.6210333",
"0.6210333",
"0.616038",
"0.6130909",
"0.609137",
"0.6088862",
"0.60704434",
"0.6039818",
"0.60286826",
"0.6021816",... | 0.75631934 | 0 |
Converts a tensor of index class labels to a tensor of onehot class labels. | def N9CW(vhpA: torch.Tensor, jTqs: int=-1, tpio: int=-1) -> ht2j.Tensor:
if not nNW7(vhpA):
raise ValueError(f'tensor must be integer type, current type: {vhpA.dtype}')
bKPk = vhpA.max() + 1
if jTqs == -1:
jTqs = int(bKPk)
if jTqs < bKPk:
raise ValueError(f'num_classes must be gr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kj8B(Crrw, jTqs):\n ROpF = Crrw.size()\n ROpF = ROpF + (jTqs,)\n KLLm = ht2j.FloatTensor(ROpF)\n KLLm.zero_()\n tpio = 1 if len(ROpF) == 2 else 2\n KLLm.scatter_(tpio, Crrw.unsqueeze(-1), 1)\n return KLLm",
"def LQDo(Crrw: torch.Tensor, jTqs: int) -> ht2j.Tensor:\n if len(Crrw.size())... | [
"0.84751815",
"0.8467954",
"0.8271096",
"0.8237347",
"0.82299304",
"0.81946796",
"0.81946796",
"0.81946796",
"0.81946796",
"0.8180447",
"0.8169154",
"0.8150191",
"0.8135966",
"0.8088832",
"0.808789",
"0.8087213",
"0.80652124",
"0.8063023",
"0.8018135",
"0.8018135",
"0.7935499... | 0.81189996 | 13 |
Distance between two atoms. | def xOC8(YKHO, Bym_, ZBD7, WI9p):
import numpy as oyIN
from scipy import linalg as rmzx
from .utils import safe_cast as r2mv
if not -YKHO.num_atoms <= ZBD7 < YKHO.num_atoms:
raise IndexError("Invalid index for 'at_1' ({0})".format(ZBD7))
if not -YKHO.num_atoms <= WI9p < YKHO.num_atoms:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ayfi(Emd4, fMAh, kZtE):\n return oyIN.linalg.norm((fMAh - kZtE).atom_loc)",
"def AUp_(hQUT, aixJ):\n Jssk = hQUT[0] - aixJ[0]\n q6fc = hQUT[1] - aixJ[1]\n XuHr = hQUT[2] - aixJ[2]\n Ayfi = XTiz.sqrt(Jssk ** 2 + q6fc ** 2 + XuHr ** 2)\n return Ayfi",
"def Ayfi(YKHO, jzdc, Fg_i):\n raise... | [
"0.836802",
"0.7753284",
"0.76746625",
"0.75178355",
"0.74930346",
"0.74093235",
"0.73726875",
"0.7370857",
"0.7370857",
"0.7344016",
"0.7344016",
"0.73347074",
"0.7324276",
"0.7320211",
"0.7310314",
"0.7278829",
"0.7278765",
"0.7270829",
"0.7265909",
"0.72642666",
"0.7259381... | 0.0 | -1 |
Set up variables for the GrandCanonicalMonteCarloSampler | def GisN():
global base_gcmc_sampler
global base_gcmc_simulation
NI4b = qQVD(BfDw.get_data_file(Hy7s.path.join('tests', 'bpti-ghosts.pdb')))
i_Or = u6J9('amber14-all.xml', 'amber14/tip3p.xml')
Oz1B = i_Or.createSystem(NI4b.topology, nonbondedMethod=hEay, nonbondedCutoff=12 * MJYJ, constraints=Madb)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HbJk(YKHO):\n YKHO.DNN = Vuw2(YKHO.settings.number_of_bins)\n YKHO.D = Vuw2(YKHO.settings.number_of_bins)\n YKHO.G = jd6F()",
"def uIcm(YKHO):\n YKHO.gc1.reset_parameters()\n YKHO.gc2.reset_parameters()\n for KCHu in YKHO.scores:\n nIVP = 1.0 / epAf.sqrt(KCHu.size(1))\n KCHu.d... | [
"0.65247303",
"0.64355326",
"0.6290882",
"0.62845963",
"0.6265411",
"0.6215736",
"0.6098296",
"0.60891455",
"0.60858494",
"0.6080878",
"0.60772467",
"0.6068644",
"0.60400265",
"0.603621",
"0.60180527",
"0.6005577",
"0.59941375",
"0.5993957",
"0.59704316",
"0.59679365",
"0.595... | 0.72094464 | 0 |
Set up variables for the GrandCanonicalMonteCarloSampler | def VUy3():
global neq_gcmc_sphere_sampler
global neq_gcmc_sphere_simulation
NI4b = qQVD(BfDw.get_data_file(Hy7s.path.join('tests', 'bpti-ghosts.pdb')))
i_Or = u6J9('amber14-all.xml', 'amber14/tip3p.xml')
Oz1B = i_Or.createSystem(NI4b.topology, nonbondedMethod=hEay, nonbondedCutoff=12 * MJYJ, constr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GisN():\n global base_gcmc_sampler\n global base_gcmc_simulation\n NI4b = qQVD(BfDw.get_data_file(Hy7s.path.join('tests', 'bpti-ghosts.pdb')))\n i_Or = u6J9('amber14-all.xml', 'amber14/tip3p.xml')\n Oz1B = i_Or.createSystem(NI4b.topology, nonbondedMethod=hEay, nonbondedCutoff=12 * MJYJ, constrai... | [
"0.7211087",
"0.6525977",
"0.6435302",
"0.62915516",
"0.6284481",
"0.6267818",
"0.62182075",
"0.6098433",
"0.60890055",
"0.6088116",
"0.60806596",
"0.6079379",
"0.60685253",
"0.6040332",
"0.603551",
"0.6017087",
"0.60072273",
"0.599423",
"0.5993949",
"0.59701514",
"0.59502614... | 0.59698236 | 20 |
u"""Split StringList into list of StringList | def eUWK(_CS_):
rmyT = [L4Dm()]
for ZfUD in _CS_.xitems():
if ZfUD[2].strip():
rmyT[-1].append(ZfUD[2], source=ZfUD[0], offset=ZfUD[1])
elif len(rmyT[-1]):
rmyT.append(L4Dm())
if len(rmyT[-1]) == 0:
del rmyT[-1]
return rmyT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def q3NS(hkWs):\n S06t = ZbWC.split('[\\\\n\\\\r\\\\s,]', hkWs)\n S06t = [KCHu.strip() for KCHu in S06t]\n S06t = [KCHu for KCHu in S06t if KCHu != '']\n return S06t",
"def OXNM(Jbhc, m65D=[' ']):\n if not Jbhc:\n return []\n if isinstance(m65D, exCv):\n m65D = [m65D]\n if isin... | [
"0.7860924",
"0.71834123",
"0.71373975",
"0.6994113",
"0.69898045",
"0.69133914",
"0.6884402",
"0.6856875",
"0.68344647",
"0.68336713",
"0.67163867",
"0.67152244",
"0.67131823",
"0.6695745",
"0.6667128",
"0.6640036",
"0.6596695",
"0.6583621",
"0.65143436",
"0.6511531",
"0.650... | 0.0 | -1 |
u"""Join list of StringList to single StringList | def jdT6(rmyT):
_CS_ = L4Dm()
for XkN1 in rmyT:
_CS_.extend(XkN1)
_CS_.extend(L4Dm([u'']))
if _CS_ and (not _CS_[-1]):
del _CS_[-1]
return _CS_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def irIg(DMbc):\n return ' '.join(DMbc)",
"def JbwW(DumB: Iterable[str]) -> str:\n return lcpj.join(DumB)",
"def VDwR(JbwW):\n jUW6 = '[{}]'.format(JbwW, JbwW)\n return jUW6",
"def JbwW(D32m, Xm0y=', '):\n if len(D32m) == 0:\n D32m = '[]'\n else:\n D32m = Xm0y.join(D32m)\n ... | [
"0.8205867",
"0.81064206",
"0.7733766",
"0.7700534",
"0.762689",
"0.7539793",
"0.74885464",
"0.7354173",
"0.7304979",
"0.7285159",
"0.7253279",
"0.7208964",
"0.72020966",
"0.71971995",
"0.7148965",
"0.7118522",
"0.7087361",
"0.7035065",
"0.7017025",
"0.6976172",
"0.6976172",
... | 0.0 | -1 |
Creates a DH rotation matrix for forward kinematics. | def XyWv(jzdc, Cwt5, o4sw, q7In):
return oyIN.array([[YhSR(q7In), -YUNn(q7In), 0.0, jzdc], [YUNn(q7In) * YhSR(Cwt5), YhSR(q7In) * YhSR(Cwt5), -YUNn(Cwt5), -YUNn(Cwt5) * o4sw], [YUNn(q7In) * YUNn(Cwt5), YhSR(q7In) * YUNn(Cwt5), YhSR(Cwt5), YhSR(Cwt5) * o4sw], [0.0, 0.0, 0.0, 1.0]]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yL2c(YKHO):\n ecEc = oyIN.array([oyIN.cos(YKHO.theta), -oyIN.sin(YKHO.theta) * oyIN.cos(YKHO.alpha), oyIN.sin(YKHO.theta) * oyIN.sin(YKHO.alpha), YKHO.a * oyIN.cos(YKHO.theta)])\n znzI = oyIN.array([oyIN.sin(YKHO.theta), oyIN.cos(YKHO.theta) * oyIN.cos(YKHO.alpha), -oyIN.cos(YKHO.theta) * oyIN.sin(YKHO.a... | [
"0.7027864",
"0.6109269",
"0.6107896",
"0.59823763",
"0.5921101",
"0.5783457",
"0.57613975",
"0.5735776",
"0.5721824",
"0.55084693",
"0.5489177",
"0.5487608",
"0.5457247",
"0.54503125",
"0.54430765",
"0.5437407",
"0.5428085",
"0.54130256",
"0.5402257",
"0.5370192",
"0.5362484... | 0.0 | -1 |
Load pretrained weights for the CNN from the specified path | def nFED(YKHO, qaEx):
YKHO._cnn_model.load_weights(qaEx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yYYo(Zxma, bKP2):\n print('Loading Model: ', bKP2)\n print('')\n Zxma.load_weights(bKP2).expect_partial()",
"def SUd8(YKHO, pmON: str):\n YKHO.load_state_dict(ht2j.load(pmON))",
"def SUd8(YKHO, pmON: str):\n YKHO.load_state_dict(ht2j.load(pmON))",
"def SUd8(YKHO, Scuh):\n YKHO.model.loa... | [
"0.7715949",
"0.7478819",
"0.7478819",
"0.74023044",
"0.7388873",
"0.7361498",
"0.73348725",
"0.73348725",
"0.7241301",
"0.72256935",
"0.71313363",
"0.69333124",
"0.69114554",
"0.69024783",
"0.6840412",
"0.6821405",
"0.6792394",
"0.6791614",
"0.67718136",
"0.67372996",
"0.673... | 0.7162399 | 10 |
Given a state, returns the optimal action (according to the model policy) to be taken. | def u_ln(YKHO, QTBn):
xWnM, N6E3 = QTBn.unwrap_state()
_oJ1 = YKHO._cnn_model.predict([oyIN.asarray([xWnM]), oyIN.asarray([N6E3])])
t91T = oyIN.argmax(_oJ1[0])
return YKHO._int_to_action_dict[t91T] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gOEh(YKHO, QTBn):\n if sum(YKHO.Q_values[QTBn] == oyIN.amax(YKHO.Q_values[QTBn])) > 1:\n DNs0 = oyIN.where(YKHO.Q_values[QTBn] == oyIN.amax(YKHO.Q_values[QTBn]))[0]\n return DNs0[oyIN.random.randint(0, DNs0.size)]\n else:\n return oyIN.argmax(YKHO.Q_values[QTBn])",
"def V5uW(YKHO, ... | [
"0.81077707",
"0.8093176",
"0.7922624",
"0.79208237",
"0.79140586",
"0.790481",
"0.7872246",
"0.78628343",
"0.77500004",
"0.77186334",
"0.7693651",
"0.76785064",
"0.7668536",
"0.76535875",
"0.7647951",
"0.7631164",
"0.7619717",
"0.76134783",
"0.7589017",
"0.7585482",
"0.75512... | 0.72329056 | 63 |
Get the default service account for the host GCE instance. Fetches GOOGLE_GCE_METADATA_DEFAULT_ACCOUNT_URI and returns its contents. | def Dtd_(YKHO):
if not YKHO.connected:
return None
try:
return UbFk(YiT2)
except dTAH.HTTPError as e:
if tTpl.code == 404:
return None
raise XLAI(tTpl)
except dTAH.URLError as e:
raise ZFJW(tTpl) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bbDZ(uC2a):\n Vt89, bGrB = yszQ.auth.default(scopes=uC2a)\n return Vt89",
"def Cxcc():\n if Hy7s.path.exists(Hy7s.getenv('GCP_AUTOMATION_CONFIG')):\n DVDY = Hy7s.getenv('GCP_AUTOMATION_CONFIG')\n with open(DVDY) as eHNT:\n DVDY = qQXR.load(eHNT)\n mwuo = DVDY['Config'... | [
"0.6467155",
"0.61172706",
"0.60549235",
"0.60172904",
"0.5775506",
"0.574537",
"0.574537",
"0.57407176",
"0.5729527",
"0.56457466",
"0.56095725",
"0.551219",
"0.5442747",
"0.5438566",
"0.5413697",
"0.5372204",
"0.5372204",
"0.5372204",
"0.5355967",
"0.53399086",
"0.53399086"... | 0.8137239 | 0 |
The sum of width and height. Note that this is not ACTUALLY the circumference! | def GiOJ(YKHO):
return YKHO.width + YKHO.height | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NSXO(YKHO):\n return YKHO.width * YKHO.height",
"def jmsd(YKHO):\n return YKHO.width * 2 + YKHO.height * 2",
"def cDmO(YKHO):\n return 2 * (YKHO.height + YKHO.width)",
"def cDmO(YKHO):\n return 2 * (YKHO.width + YKHO.height)",
"def cDmO(YKHO):\n return 2 * YKHO.width + 2 * YKHO.height",
... | [
"0.71800035",
"0.7149736",
"0.71027356",
"0.7078878",
"0.702873",
"0.6946088",
"0.6882668",
"0.6881731",
"0.68220913",
"0.68220913",
"0.6779442",
"0.6777669",
"0.6764908",
"0.6764908",
"0.6764908",
"0.6764908",
"0.6764908",
"0.6764908",
"0.6764908",
"0.6764908",
"0.67477906",... | 0.76774967 | 0 |
Test calling the API with invalid hub parameters. | def B8k8(YKHO):
XrqL = YKHO._get_quantum_program()
vhDQ = 'HUB'
KTvV = 'GROUP'
bbn6 = 'PROJECT'
XrqL.set_api(Wzyv, EnVA, vhDQ, KTvV, bbn6)
with YKHO.assertRaises(Gqi2) as QpfX:
bGrB = XrqL.execute(['qc'], backend=YKHO.backend, shots=1, max_credits=3)
YKHO.assertIn('Backend ibmqx4 not... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xy3D(YKHO):\n with YKHO.assertRaises(AssertionError):\n YKHO.resource.hubs(-1)",
"def c79u(YKHO):\n geh0 = YKHO.client.post(ALyG)\n YKHO.assertEqual(400, geh0.status_code)\n geh0 = YKHO.client.post(ALyG, {'longitude': 0, 'altitude_msl': 0, 'uas_heading': 0})\n YKHO.assertEqual(400, geh0... | [
"0.7026234",
"0.66320807",
"0.66060495",
"0.660001",
"0.6568346",
"0.6549651",
"0.6541933",
"0.65326697",
"0.653062",
"0.6522051",
"0.6499948",
"0.6408988",
"0.6408759",
"0.6399277",
"0.63575727",
"0.62974006",
"0.6244453",
"0.6229556",
"0.62143123",
"0.62074286",
"0.6193638"... | 0.6960295 | 1 |
Return the value of the state (computed in __init__). | def UnfG(YKHO, QTBn):
return YKHO.values[QTBn] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BWXx(YKHO, QTBn):\n raise NotImplementedError",
"def BWXx(YKHO, QTBn):\n raise NotImplementedError",
"def BWXx(YKHO, QTBn):\n raise NotImplementedError",
"def UnfG(YKHO, QTBn):\n gnPz.raiseNotDefined()",
"def UnfG(YKHO, QTBn):\n gnPz.raiseNotDefined()",
"def BWXx(YKHO, QTBn):\n retu... | [
"0.830136",
"0.830136",
"0.82602024",
"0.8086008",
"0.8086008",
"0.7958413",
"0.78017086",
"0.7737145",
"0.77342933",
"0.7733657",
"0.7733657",
"0.7733657",
"0.7733657",
"0.7733657",
"0.7733657",
"0.7733657",
"0.7733657",
"0.7733657",
"0.7733657",
"0.7733657",
"0.7733657",
... | 0.7929993 | 6 |
Saves an image of the shape expected by other functions in this module. However, note this expects a numpy array. | def WHnJ(pmON, wCft: numpy.ndarray):
wCft = XTiz.fmax(XTiz.fmin(wCft * 255.0, 255), 0).astype('uint8')
wCft = wCft.reshape(3, wCft.shape[2], wCft.shape[3])
wCft = XTiz.moveaxis(wCft, [0, 1, 2], [2, 0, 1])
hnIv.fromarray(wCft).save(pmON) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PiiI(VXjJ: np.ndarray, pmON: str) -> None:\n dU0b = hnIv.fromarray(VXjJ)\n dU0b.save(pmON)",
"def cWWj(qw7D: np.ndarray, pmON: str) -> None:\n VXjJ = hnIv.fromarray(qw7D.squeeze())\n VXjJ.save(pmON)",
"def NhPs(LNo8, pmON):\n if LNo8.ndim == 3 and LNo8.shape[2] == 1:\n LNo8 = oyIN.arr... | [
"0.7397582",
"0.72214085",
"0.7198307",
"0.71386844",
"0.71040505",
"0.70708066",
"0.7057253",
"0.7015668",
"0.698637",
"0.6963281",
"0.69594914",
"0.68962365",
"0.6883985",
"0.68804735",
"0.6848746",
"0.6804764",
"0.67976993",
"0.6780601",
"0.6767705",
"0.6767581",
"0.672906... | 0.7051175 | 7 |
Generate a dict to turn punctuation into a token. | def NJl7():
ggQl = {}
ggQl['.'] = '||Period||'
ggQl[','] = '||Comma||'
ggQl['"'] = '||Quotation_Mark||'
ggQl[';'] = '||Semicolon||'
ggQl['!'] = '||Exclamation_Mark||'
ggQl['?'] = '||Question_Mark||'
ggQl['('] = '||Left_Parentheses||'
ggQl[')'] = '||Right_Parentheses||'
ggQl['--']... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NJl7():\n ggQl = {'.': '||Period||', ', ': '||Comma||', '\"': '||Quotation_Mark||', ';': '||Semicolon||', '!': '||Exclamation_mark||', '?': '||Question_mark||', '(': '||Left_Parentheses||', ')': '||Right_Parentheses||', '--': '||Dash||', '\\n': '||Return||'}\n return ggQl",
"def ZvG6(YKHO, s2mk):\n ... | [
"0.66179246",
"0.6473263",
"0.63673395",
"0.63541335",
"0.6318267",
"0.6195351",
"0.6170302",
"0.61027676",
"0.61009026",
"0.6056571",
"0.583608",
"0.580536",
"0.57960415",
"0.5735746",
"0.5717652",
"0.5713248",
"0.5703686",
"0.56706595",
"0.56492156",
"0.56279296",
"0.562042... | 0.6736538 | 0 |
Create TF Placeholders for input, targets, and learning rate. | def Zo7w():
g4y1 = ZylS.placeholder(ZylS.int32, [None, None], name='input')
x6A0 = ZylS.placeholder(ZylS.int32, [None, None], name='targets')
b0Ix = ZylS.placeholder(ZylS.float32, name='learning_rate')
return (g4y1, x6A0, b0Ix) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def q5nL(YKHO):\n with ZylS.name_scope('input_data'):\n YKHO.input_words = ZylS.placeholder(shape=(None, YKHO.look_back), dtype=ZylS.int32, name='input_tokens')\n with ZylS.name_scope('output_data'):\n YKHO.output_words = ZylS.placeholder(shape=(None, YKHO.look_back), dtype=ZylS.int32, name='ou... | [
"0.7744293",
"0.7662721",
"0.7621616",
"0.76179385",
"0.75356156",
"0.75137645",
"0.7418147",
"0.7405449",
"0.7404622",
"0.73941994",
"0.73695993",
"0.73649645",
"0.7349455",
"0.73242545",
"0.72866756",
"0.72504604",
"0.7224488",
"0.72090685",
"0.7191729",
"0.71353704",
"0.71... | 0.6295598 | 47 |
Create an RNN Cell and initialize it. | def Kqci(Ep8u, wggQ):
iHrl = ZylS.contrib.rnn.BasicLSTMCell(wggQ)
VmPb = ZylS.contrib.rnn.MultiRNNCell([iHrl] * 3)
W9gz = VmPb.zero_state(Ep8u, ZylS.float32)
W9gz = ZylS.identity(W9gz, name='initial_state')
return (VmPb, W9gz) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, bLAM, Ep8u, zi3C, I07O):\n super().__init__(name='RNNCellStateModel')\n YKHO._rnn_cell = bLAM\n YKHO._batch_size = Ep8u\n YKHO._input_size = zi3C\n YKHO._num_outputs = I07O",
"def K7Bw():\n YKHO.weightGenerate()",
"def Kqci(Ep8u, wggQ):\n VmPb = ZylS.contrib.rnn.BasicLSTMCel... | [
"0.71328205",
"0.6902493",
"0.6705795",
"0.6509429",
"0.6456088",
"0.6427877",
"0.64073706",
"0.63708305",
"0.6354739",
"0.6346675",
"0.6290552",
"0.62503237",
"0.62420845",
"0.6240313",
"0.6204581",
"0.61756074",
"0.6160576",
"0.61548066",
"0.6071491",
"0.5992168",
"0.59629"... | 0.6565958 | 3 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, gTE9):
return False
return YKHO.__dict__ == Elif.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748"
] | 0.0 | -1 |
Gets the flow_contents of this VersionedFlowSnapshot. The contents of the versioned flow | def aLZh(YKHO):
return YKHO._flow_contents | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kGys(YKHO):\n YKHO.syncContents()\n return YKHO._contents",
"def BuGO(YKHO):\n return YKHO.contents",
"def kGys(YKHO):\n return YKHO._contents",
"def BuGO(YKHO):\n with W5SF(YKHO.open()) as nVrR:\n return nVrR.read()",
"def kGys(YKHO):\n return YKHO._data[:]",
"def kGys(YKHO)... | [
"0.66757303",
"0.62290907",
"0.6197192",
"0.59705305",
"0.5878344",
"0.5796029",
"0.5763083",
"0.5516891",
"0.5505247",
"0.54965574",
"0.54637045",
"0.54631704",
"0.5415392",
"0.53776175",
"0.536303",
"0.5346532",
"0.5295824",
"0.5295824",
"0.5295824",
"0.5295824",
"0.5293879... | 0.75096315 | 0 |
Sets the flow_contents of this VersionedFlowSnapshot. The contents of the versioned flow | def aLZh(YKHO, aLZh):
if aLZh is None:
raise ValueError('Invalid value for `flow_contents`, must not be `None`')
YKHO._flow_contents = aLZh | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kGys(YKHO, kGys):\n YKHO._contents = kGys",
"def _6tF(YKHO, kGys):\n YKHO.validate_contents(kGys)\n YKHO.contents = jth9(kGys)\n YKHO.process_contents()\n YKHO.fix_pointers_on_contents_update()",
"def kGys(YKHO, BWXx: str) -> None:\n YKHO._contents = BWXx",
"def _3tt(YKHO, _uqo):\n Y... | [
"0.5873673",
"0.58573955",
"0.5356069",
"0.53205866",
"0.52961564",
"0.507953",
"0.5026219",
"0.50057846",
"0.49433386",
"0.48465547",
"0.48465547",
"0.47895524",
"0.47386765",
"0.47386765",
"0.46821818",
"0.46728328",
"0.4583075",
"0.4578419",
"0.4568628",
"0.45118272",
"0.4... | 0.7428742 | 0 |
Gets the external_controller_services of this VersionedFlowSnapshot. The information about controller services that exist outside this versioned flow, but are referenced by components within the versioned flow. | def FhHG(YKHO):
return YKHO._external_controller_services | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FhHG(YKHO, FhHG):\n YKHO._external_controller_services = FhHG",
"def DK0z(YKHO):\n return YKHO._exposed_services",
"def L7ag(YKHO, sg14):\n VPN2 = sg14.get_alloc_entities()\n VPN2 = dict(((G1Hx, Ty9i) for G1Hx, Ty9i in VPN2.items() if len(Ty9i) > 0))\n Jilr = oRi_(list)\n for G1Hx, Ty9i i... | [
"0.63227344",
"0.56581736",
"0.53822076",
"0.5345333",
"0.53095484",
"0.530191",
"0.5297033",
"0.5236078",
"0.52339894",
"0.52310747",
"0.51765954",
"0.5120164",
"0.50976235",
"0.5094909",
"0.5077057",
"0.50099176",
"0.5002442",
"0.49720675",
"0.4959182",
"0.49488658",
"0.494... | 0.81535 | 0 |
Gets the parameter_providers of this VersionedFlowSnapshot. Contains basic information about parameter providers referenced in the versioned flow. | def nf19(YKHO):
return YKHO._parameter_providers | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vv9z(YKHO):\n return YKHO.tree.get('provider_params', {})",
"def zUGD(YKHO) -> x1iM[KKx2]:\n HFe9 = YKHO.__providers_key()\n BWXx = YKHO.get(name=HFe9)\n if BWXx is None:\n return []\n Rf_J = uUeE(data=BWXx)\n qw7D = Ocrw(string=Rf_J)\n return KKx2.convert(array=qw7D)",
"def NAr... | [
"0.7007249",
"0.61865747",
"0.60932356",
"0.6047994",
"0.60459554",
"0.6015926",
"0.6015926",
"0.6015926",
"0.6015926",
"0.6015926",
"0.6015926",
"0.59945995",
"0.59945995",
"0.59182954",
"0.58808595",
"0.58627284",
"0.5730422",
"0.5724208",
"0.571871",
"0.57134426",
"0.57121... | 0.80047333 | 0 |
Gets the parameter_contexts of this VersionedFlowSnapshot. The parameter contexts referenced by process groups in the flow contents. The mapping is from the name of the context to the context instance, and it is expected that any context in this map is referenced by at least one process group in this flow. | def cLE3(YKHO):
return YKHO._parameter_contexts | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KbSg(YKHO):\n return tuple((getattr(YKHO, mWFP) for mWFP in YKHO.__argnames__))",
"def KbSg(YKHO):\n return YKHO._contexts",
"def KbSg(YKHO):\n NArs = YKHO._get_configurational_params()\n NtVn = YKHO._get_builds()\n n2rL = Hs6x.product(NtVn, *NArs.values())\n qAMQ = []\n for U7YL in n2... | [
"0.6186989",
"0.60678494",
"0.6034285",
"0.57978076",
"0.5718987",
"0.5601156",
"0.55219734",
"0.5495203",
"0.5372476",
"0.5309605",
"0.5279569",
"0.52359176",
"0.5205325",
"0.51551515",
"0.51125336",
"0.5102993",
"0.50635713",
"0.50354475",
"0.5029947",
"0.50209457",
"0.5006... | 0.7592681 | 0 |
Sets the parameter_contexts of this VersionedFlowSnapshot. The parameter contexts referenced by process groups in the flow contents. The mapping is from the name of the context to the context instance, and it is expected that any context in this map is referenced by at least one process group in this flow. | def cLE3(YKHO, cLE3):
YKHO._parameter_contexts = cLE3 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pA1L(YKHO, lRr0):\n YKHO._contexts = lRr0",
"def cLE3(YKHO):\n return YKHO._parameter_contexts",
"def QdZT(YKHO, qy8Z):\n YKHO._contexts.update(qy8Z.get_contexts())",
"def pA1L(YKHO, yHGa: str):\n YKHO.path, YKHO.model_context, YKHO.save_path = YKHO.create_contexts(yHGa)",
"def FIMM(YKHO, l... | [
"0.6403469",
"0.5939657",
"0.5094899",
"0.50620306",
"0.5013662",
"0.49896467",
"0.49327752",
"0.48905647",
"0.48811802",
"0.47928238",
"0.47024944",
"0.46778068",
"0.46764642",
"0.46742034",
"0.46499863",
"0.4630622",
"0.4608403",
"0.45698825",
"0.45489085",
"0.45285198",
"0... | 0.79279155 | 0 |
Gets the bucket of this VersionedFlowSnapshot. The bucket where the flow is located | def WE7e(YKHO):
return YKHO._bucket | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WE7e(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'bucket')",
"def WE7e(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'bucket')",
"def WE7e(YKHO):\n if not hasattr(YKHO, '_bucket'):\n YKHO._bucket = YKHO._get_or_create_bucket(YKHO.bucket_name)\n return YKHO._bucket",
"def WE... | [
"0.78069574",
"0.78069574",
"0.7710763",
"0.7691495",
"0.7655935",
"0.76269865",
"0.76269865",
"0.7556832",
"0.7556832",
"0.7556832",
"0.7556832",
"0.7556832",
"0.7456765",
"0.72359926",
"0.7172862",
"0.71176875",
"0.69666916",
"0.6939062",
"0.6920855",
"0.6910778",
"0.683748... | 0.8017462 | 0 |
Sets the bucket of this VersionedFlowSnapshot. The bucket where the flow is located | def WE7e(YKHO, WE7e):
YKHO._bucket = WE7e | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rYUs(YKHO, BWXx):\n YKHO.image_bucket = BWXx",
"def FIMM(YKHO, WE7e):\n YKHO.bucket = WE7e",
"def WE7e(YKHO):\n if not hasattr(YKHO, '_bucket'):\n YKHO._bucket = YKHO._get_or_create_bucket(YKHO.bucket_name)\n return YKHO._bucket",
"def WE7e(YKHO):\n return YKHO._bucket",
"def WE7e... | [
"0.7186771",
"0.68779075",
"0.6785613",
"0.667325",
"0.66621596",
"0.65803295",
"0.6543764",
"0.6543764",
"0.6543764",
"0.6543764",
"0.6543764",
"0.6406765",
"0.6357553",
"0.6302178",
"0.6273225",
"0.6273225",
"0.6228045",
"0.6178882",
"0.61779845",
"0.61259234",
"0.6115869",... | 0.80024356 | 0 |
Gets the latest of this VersionedFlowSnapshot. | def fsbt(YKHO):
return YKHO._latest | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fsbt(YKHO):\n return YKHO.journal_data[YKHO.latest_id]",
"def AiLy(YKHO):\n AI1H = YKHO.get_revision_list()\n if AI1H:\n return AI1H[-1]\n else:\n raise fFqq()",
"def pGiD(YKHO, mWFP):\n return YKHO._scalar_history.get_latest(mWFP)",
"def pGiD(YKHO, mWFP):\n return YKHO._s... | [
"0.70233417",
"0.6663617",
"0.6593615",
"0.65461594",
"0.6545754",
"0.6521191",
"0.64221674",
"0.63784236",
"0.6323985",
"0.6314438",
"0.62969947",
"0.62746644",
"0.6249728",
"0.621321",
"0.6209161",
"0.6130742",
"0.6110239",
"0.6094407",
"0.60749656",
"0.60749656",
"0.607346... | 0.71543825 | 0 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, hHOI):
return False
return YKHO.__dict__ == Elif.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748"
] | 0.0 | -1 |
Turns the robot into specified direction. | def _ysM(YKHO, EmUK, XSoh):
EmUK.__turn__(YKHO.ID, int(XSoh)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VDvV(YKHO, XSoh):\n YKHO.direction = XSoh",
"def VDvV(YKHO, XSoh):\n YKHO.direction = XSoh",
"def VDvV(YKHO, XSoh):\n YKHO.direction = XSoh",
"def VDvV(YKHO, XSoh):\n YKHO.direction = XSoh",
"def _ysM(YKHO, dir):\n if dir.upper() == 'R':\n if YKHO.direction == 3:\n YKHO... | [
"0.7838874",
"0.7838874",
"0.76411635",
"0.76411635",
"0.75555784",
"0.75247675",
"0.73792523",
"0.7336378",
"0.72886634",
"0.72776496",
"0.72776496",
"0.7100742",
"0.7089828",
"0.7087633",
"0.7057973",
"0.7036288",
"0.69716114",
"0.69710374",
"0.6963444",
"0.69305086",
"0.69... | 0.6965067 | 18 |
Verifies uniqueness of instance name, or raises AXApiInvalidParam if it already exists | def zYFF(YKHO, mWFP):
Ys3F = YKHO.instances.find_one({'name': mWFP, 'deleted': False})
if Ys3F:
raise vank("Fixture instance with name '{}' already exists".format(mWFP)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PUOX(YKHO):\n mWFP = 'some_name'\n VuRd.create(mWFP, 256, 1, 120, 200, 'flavor1')\n YKHO.assertRaises(AJ5d.InstanceTypeExists, VuRd.create, mWFP, 256, 1, 120, 200, 'flavor2')",
"def RGTD(YKHO):\n pass",
"def B_Xd(YKHO):\n with YKHO.assertRaises(ValueError):\n P8k8(workflow_spec={}, pa... | [
"0.6955145",
"0.64076835",
"0.6331418",
"0.6246967",
"0.6105957",
"0.6080625",
"0.60061294",
"0.5978304",
"0.5874458",
"0.5850276",
"0.5835531",
"0.5809082",
"0.57808006",
"0.5773074",
"0.5737927",
"0.5737927",
"0.57119274",
"0.57102257",
"0.56951034",
"0.5669034",
"0.5659929... | 0.79201096 | 0 |
Returns a single, unique fixture by name or id >>> fixmgr.get_fixture_instance(name='linux01') | def CrJA(YKHO, id=None, mWFP=None, qRei=True):
xDcj = {}
if id:
xDcj['_id'] = id
if mWFP:
xDcj['name_lower'] = mWFP
if not xDcj:
raise lGoq('No query filters supplied')
Qd00 = YKHO.instances.find_one(xDcj)
if not Qd00:
if qRei:
raise H8YA('No instances... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OnZ0(mWFP):\n pmON = Hy7s.path.join(Hy7s.environ.get('WORKSPACE', './'), 'fixtures', mWFP)\n if not Hy7s.path.isfile(pmON):\n raise oEgM('File {} not found'.format(pmON))\n return pmON",
"def Jau5(ZfUD, WLRG, lt9K=None):\n if WLRG == 'request':\n if lt9K:\n try:\n ... | [
"0.6509923",
"0.62037605",
"0.6023634",
"0.5966281",
"0.59145325",
"0.5883537",
"0.576336",
"0.56827825",
"0.5630251",
"0.5515407",
"0.5480694",
"0.5458051",
"0.5450804",
"0.5437768",
"0.5419975",
"0.54180723",
"0.5371775",
"0.53615993",
"0.5356714",
"0.53151685",
"0.5307016"... | 0.7184157 | 0 |
Returns FixtureClass object from a template dictionary | def zLVX(YKHO, ULzZ):
BxVJ = {}
xASv = ULzZ.get('actions', {})
for PQh7, XeOP in xASv.items():
if XeOP['template'] not in BxVJ:
fhuJ = YKHO.axops_client.get_template(ULzZ['repo'], ULzZ['branch'], XeOP['template'])
if not fhuJ:
raise H8YA("Service template for ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ds6h(Emd4, rPXJ, Sd0C, muwo=muwo, **B2fa):\n try:\n pKvt = rPXJ.substitute(muwo, **B2fa)\n return Emd4(Sd0C, inp_string=pKvt)\n except (KeyError, ValueError) as error:\n print(P1dF)\n print(P1dF.args)\n quit(0)",
"def jG8h(Emd4, qHj0) -> 'TemperatureZone':\n return... | [
"0.5881686",
"0.56846297",
"0.5514073",
"0.543241",
"0.5410768",
"0.5402855",
"0.54024947",
"0.5372281",
"0.53655285",
"0.5360564",
"0.53439814",
"0.5325336",
"0.5324815",
"0.5289122",
"0.5269114",
"0.5266425",
"0.5260116",
"0.5245977",
"0.5245977",
"0.5230463",
"0.52099055",... | 0.6678587 | 0 |
Test that an object and its attributes can both be assigned templates. | def O66Z():
Oli0 = cn6A('Humidity', bounds=G2nC(0.5, 0.75, ''))
rPXJ = MCYg('Dry', conditions=[[Oli0, G2nC(0.5, 0.65, '')]])
rTFF('Dry a polymer', template=rPXJ, conditions=[FRJU('Humidity', value=S3qj(0.6, ''), template=Oli0)]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wLl4():\n Qmtb = ApvK('Length', bounds=G2nC(2.0, 3.5, 'cm'))\n tJSE = cn6A('dial', bounds=ZE6P(0, 5))\n c0nT = mQqq('Color', bounds=Jkqq(['red', 'green', 'blue']))\n with trZe.raises(TypeError):\n puTk()\n with trZe.raises(ValueError):\n puTk('Block', properties=[[Qmtb, G2nC(3.0, 4... | [
"0.69322157",
"0.66817254",
"0.6182613",
"0.60178757",
"0.59672934",
"0.5823069",
"0.5780402",
"0.5737048",
"0.571049",
"0.5679045",
"0.5598014",
"0.5551784",
"0.5528739",
"0.5516997",
"0.5516243",
"0.5505534",
"0.54870075",
"0.54850197",
"0.54847145",
"0.5480541",
"0.5468632... | 0.5696904 | 9 |
Create the spark session and returns its object | def Yu9h():
ujem = lBG2.builder.config('spark.jars.packages', 'org.apache.hadoop:hadoop-aws:2.7.0').getOrCreate()
return ujem | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hv6k():\n return lBG2.builder.appName('Transforming the historical parking occupancy and blockface datasets').getOrCreate()",
"def Yu9h():\n ujem = lBG2.builder.config('spark.jars.packages', 'org.apache.hadoop:hadoop-aws:2.7.0').config('spark.sql.session.timeZone', 'America/Los_Angeles').getOrCreate()\... | [
"0.86523557",
"0.8286961",
"0.82391435",
"0.81481373",
"0.7979438",
"0.7950069",
"0.7950069",
"0.7950069",
"0.7950069",
"0.79482985",
"0.7898484",
"0.7879878",
"0.78603834",
"0.78490996",
"0.7812462",
"0.7810376",
"0.77311814",
"0.7722151",
"0.76831895",
"0.7608785",
"0.75595... | 0.79879576 | 9 |