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 |
|---|---|---|---|---|---|---|
Return the sensor temperature. | def CMHP(YKHO):
return YKHO._tion_entry.out_temp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ovGo(YKHO):\n return YKHO.device.temperature()",
"def ovGo(YKHO):\n ovGo = YKHO._readTemp()\n return ovGo",
"def ovGo(YKHO) -> float:\n YKHO.measurement(Np2f)\n YKHO._measurement = 0\n ITS7.sleep(0.05)\n return YKHO._data() * 175.72 / 65536.0 - 46.85",
"def rcrL(YKHO):\n return YK... | [
"0.8745717",
"0.87412417",
"0.8721165",
"0.8698256",
"0.8691214",
"0.86806875",
"0.86574376",
"0.8646147",
"0.8608337",
"0.85915726",
"0.8574843",
"0.8560561",
"0.8555494",
"0.8545229",
"0.85323673",
"0.852896",
"0.8524833",
"0.85189575",
"0.8513216",
"0.8513186",
"0.8494511"... | 0.0 | -1 |
Return a version of this context with admin flag set. | def MRKc(YKHO, mK4e=None, f2Tp=False):
OaeV = jth9.copy(YKHO)
OaeV.roles = jth9.deepcopy(YKHO.roles)
OaeV.is_admin = True
if mK4e is not None:
OaeV.read_deleted = mK4e
return OaeV | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dp9S(YKHO):\n return YKHO._admin",
"def rdLF(gaZx=False):\n QpfX = K1Ja(None, project=None, is_admin=True, show_deleted=gaZx, overwrite=False)\n return QpfX",
"def dp9S(YKHO):\n return YKHO._admin",
"def zy8Y(gaZx=False, tvN0=False):\n QpfX = K1Ja(user_id=None, project=None, is_admin=True,... | [
"0.76865184",
"0.76853657",
"0.76743424",
"0.72158283",
"0.7092453",
"0.70503384",
"0.70061207",
"0.69748396",
"0.69119644",
"0.66855866",
"0.66855866",
"0.66855866",
"0.66855866",
"0.66855866",
"0.6642817",
"0.65981823",
"0.6578586",
"0.65105855",
"0.6507644",
"0.64909583",
... | 0.0 | -1 |
write object as json to file | def HyLg(qaEx, YEnM: Dict):
with open(qaEx, 'w', encoding='utf8') as zyFt:
qQXR.dump(YEnM, zyFt, indent=4, sort_keys=True, ensure_ascii=False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uyD2(YEnM, pmON):\n with open(pmON, 'w', encoding='utf-8') as Xz4u:\n qQXR.dump(YEnM, Xz4u, indent=4)\n Xz4u.close()",
"def ncJT(object, nUeQ):\n with open(nUeQ, 'wb') as hlel:\n qQXR.dump(object, hlel)",
"def bFLq(YEnM, pmON):\n eHNT = T_Uj.open(pmON, 'w', 'utf-8')\n eHNT.... | [
"0.86593294",
"0.8616957",
"0.8496451",
"0.8495301",
"0.8414571",
"0.841218",
"0.83919513",
"0.83765644",
"0.83746713",
"0.837186",
"0.8320426",
"0.83135366",
"0.8309071",
"0.8309071",
"0.8304449",
"0.8297943",
"0.8288904",
"0.82755756",
"0.8268533",
"0.8268311",
"0.82642734"... | 0.7767722 | 63 |
Define sparse structure of Jacobian. Returns TYPE DESCRIPTION. | def lQST(YKHO):
return oyIN.nonzero(YKHO._cc.T) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uc2o(YKHO):\n raise NotImplementedError",
"def v8WM(YKHO):\n raise NotImplementedError",
"def vvIP(YKHO, o7sj=False):\n V_Vn = L749[YKHO.power_flow_input.pv, YKHO.power_flow_input.pq]\n Oa10 = OdRK(Ybus=YKHO.power_flow_input.Ybus, V=YKHO.power_flow_input.Vbus, Ibus=YKHO.power_flow_input.Ibus, p... | [
"0.65918005",
"0.631548",
"0.6264483",
"0.6204598",
"0.61025256",
"0.605552",
"0.59011465",
"0.59011465",
"0.58933306",
"0.5840474",
"0.58258396",
"0.5815847",
"0.5790321",
"0.57546544",
"0.5740839",
"0.57290053",
"0.57216936",
"0.5716087",
"0.57137275",
"0.56954473",
"0.5681... | 0.6119504 | 4 |
Calculate the Hessian matrix in sparse form. In this problem the Hessian is a constant 2 (2nd derivative of objective) with nothing added for the constraints, multiplied by the internal Ipopt variable obj_factor. Ipopt also requires that its internal variable lagrange be passed to this function, although it is not need... | def e_VS(YKHO, WKvO, eYjT, uWGX):
C7Ls = oyIN.full(YKHO._n, 2) * uWGX
return C7Ls | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SrxD(YKHO, WKvO, P2GO):\n vqVR = WKvO[:YKHO.ncoef]\n T4gN = YKHO.basis_matrix.dot(vqVR)\n e_VS = oyIN.zeros((YKHO.nunknowns, YKHO.nunknowns))\n Y9eM = YKHO.smoother1_second_derivative(T4gN - T4gN[P2GO])\n Vc35 = YKHO.smoother2_second_derivative(YKHO.values - T4gN[P2GO])\n if oyIN.all(Y9eM == ... | [
"0.64854413",
"0.6371261",
"0.6356958",
"0.62243676",
"0.6204317",
"0.6185984",
"0.61623555",
"0.6146505",
"0.6146505",
"0.6126005",
"0.61149716",
"0.6108053",
"0.61070514",
"0.6061975",
"0.60409325",
"0.6040377",
"0.6036404",
"0.59891933",
"0.5978053",
"0.59773827",
"0.59710... | 0.73210555 | 0 |
Row and column indexes of nonzero elements of hessian. | def TqMM(YKHO):
UdM9 = oyIN.arange(0, YKHO._n, dtype='int64')
kA1U = (UdM9, UdM9)
return kA1U | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LINE(YKHO):\n for YRbF in range(0, YKHO._size):\n for r845 in range(0, YKHO._size):\n if YKHO._matrix[YRbF][r845] == 0 and (not YKHO._covered(YRbF, r845)):\n return (YRbF, r845)\n return (-1, -1)",
"def GLLC(YKHO):\n for or8S, z5ly in enumerate(YKHO.puzzle):\n ... | [
"0.67533803",
"0.666396",
"0.6584303",
"0.65631956",
"0.6502673",
"0.6490688",
"0.6469162",
"0.6452005",
"0.6407867",
"0.64011645",
"0.6395931",
"0.6359403",
"0.6326486",
"0.6323403",
"0.6283557",
"0.6271369",
"0.6211492",
"0.61374164",
"0.61097986",
"0.61004686",
"0.6065714"... | 0.6198755 | 17 |
Gets the ``x, y`` position of the caret relative to the screen. | def Dyeo(E_qD):
oeNL = E_qD.execute_script('\n var pos = wed_editor.caretManager.mark.getBoundingClientRect();\n return { left: pos.left,\n top: pos.top };\n ')
oeNL['left'] = int(oeNL['left'])
oeNL['top'] = int(oeNL['top'])
return oeNL | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s_oR(E_qD):\n oeNL = E_qD.execute_script('\\n var pos = wed_editor.caretManager.mark.getBoundingClientRect();\\n return { left: pos.left,\\n top: pos.top + pos.height / 2};\\n ')\n oeNL['left'] = round(oeNL['left'])\n oeNL['top'] = round(oeNL['top'])\n return oeNL",
"def uZz5... | [
"0.76019233",
"0.7504992",
"0.7472768",
"0.7444414",
"0.7370235",
"0.7346219",
"0.73384595",
"0.7327581",
"0.7314413",
"0.7299708",
"0.72967875",
"0.7291086",
"0.7282956",
"0.7239478",
"0.7239478",
"0.72353035",
"0.71843916",
"0.7180716",
"0.7176366",
"0.71720666",
"0.7147888... | 0.78515375 | 0 |
Creates and stores password hash. | def jTXt(YKHO, jTXt):
YKHO.password_hash = vT87(jTXt) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DH7l(Emd4, jTXt: str) -> str:\n return jf1V.hash(jTXt)",
"def DH7l(jTXt):\n return vT87(jTXt, method='sha256')",
"def qzFd(YKHO, jTXt):\n YKHO.password_hash = jf1V.hash(jTXt)",
"def qzFd(YKHO, jTXt):\n YKHO.password_hash = jf1V.hash(jTXt)",
"def qzFd(YKHO, jTXt):\n YKHO.hash = jf1V.encry... | [
"0.7710594",
"0.7284468",
"0.71994215",
"0.71994215",
"0.71887064",
"0.7109241",
"0.7070855",
"0.7063291",
"0.69689006",
"0.69689006",
"0.6935562",
"0.69122124",
"0.689227",
"0.68806297",
"0.68722296",
"0.6860094",
"0.6854255",
"0.68210304",
"0.680769",
"0.68006754",
"0.68006... | 0.68216276 | 19 |
Checks to see if a user has access to certain permissions. | def ldgd(YKHO, w0rQ):
return YKHO.role is not None and YKHO.role.permissions & w0rQ == w0rQ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o7xd(YKHO):\n if YKHO.action in ('metadata', 'list', 'retrieve'):\n Aofo = YKHO.request.user.is_authenticated() or GPtr['general_system_enable_anonymous']\n elif YKHO.action in ('create', 'partial_update', 'update', 'destroy'):\n Aofo = YKHO.request.user.has_perm('users.can_see_name') and Y... | [
"0.80666226",
"0.80079097",
"0.79916984",
"0.7889562",
"0.78768396",
"0.781602",
"0.7785321",
"0.77664316",
"0.7765456",
"0.7756693",
"0.77258205",
"0.76916206",
"0.7662473",
"0.7657221",
"0.7646637",
"0.7634367",
"0.7634367",
"0.7599314",
"0.7589781",
"0.7578371",
"0.7566371... | 0.7589449 | 19 |
Return local index of cell nearest to query point. | def Qh4y(YKHO, AU8u):
if not isinstance(AU8u, (list, tuple, XTiz.ndarray)):
raise TypeError()
if XTiz.ndim(AU8u) != 1:
raise ValueError()
if len(AU8u) != YKHO.points.shape[1]:
raise ValueError()
eKGI = XTiz.concatenate(YKHO.centers)
or8S = XTiz.arange(YKHO.n_cells)
or8S =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BysG(YKHO, BHsk):\n if len(YKHO.points) == 0:\n return None\n pImw, GxS9 = YKHO.tree_points.query(BHsk)\n return GxS9",
"def BysG(YKHO, BHsk):\n if len(YKHO.points) == 0:\n return None\n pImw, GxS9 = YKHO.tree_points.query(BHsk)\n return GxS9",
"def viky(YKHO):\n return Y... | [
"0.7361776",
"0.7361776",
"0.71282554",
"0.7062011",
"0.6911059",
"0.67792565",
"0.6692575",
"0.6618137",
"0.6614808",
"0.65710825",
"0.6567249",
"0.65658945",
"0.6530469",
"0.65302956",
"0.65098685",
"0.65098685",
"0.6465618",
"0.6464017",
"0.6458892",
"0.6452159",
"0.643416... | 0.6418843 | 21 |
Return field data names. | def tPDH(YKHO):
return YKHO._field_data | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zJN_(YKHO):\n return YKHO.fieldNames()",
"def sPVJ(YKHO):\n raise NotImplementedError",
"def eM8m(YKHO):\n CqJY = YKHO._meta.get_fields()\n return [eHNT.name for eHNT in CqJY]",
"def DmX2(YKHO):\n return YKHO._data.columns",
"def zJN_(YKHO):\n return sIdR.get_field_names(row_chars=YKH... | [
"0.8164439",
"0.80347717",
"0.7669215",
"0.7644859",
"0.76074904",
"0.7555988",
"0.7512536",
"0.750386",
"0.74790704",
"0.7470341",
"0.74382144",
"0.74100465",
"0.73845005",
"0.7380924",
"0.73334295",
"0.7327434",
"0.731851",
"0.7288836",
"0.7263983",
"0.72593796",
"0.7244919... | 0.0 | -1 |
Return sets of points. | def mOvW(YKHO):
return YKHO._point_sets | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zxJV(YKHO):\n LTIa = set()\n for hTWD in YKHO.segments:\n LTIa = LTIa.union(hTWD.getPoints())\n return LTIa",
"def fLCL(YKHO):\n LTIa = []\n for exwG in range(len(YKHO.points)):\n WKvO, LVAh, a1PO, V2zj = YKHO.points[exwG]\n LTIa.append((WKvO, LVAh))\n return LTIa",
"... | [
"0.7813026",
"0.75852877",
"0.7556476",
"0.75447154",
"0.7518012",
"0.7517838",
"0.75081414",
"0.7506942",
"0.74827737",
"0.7352849",
"0.7272361",
"0.7261481",
"0.72218484",
"0.717284",
"0.7164179",
"0.71405447",
"0.7101427",
"0.7096116",
"0.7069208",
"0.7066062",
"0.7048603"... | 0.81105644 | 0 |
Return materials of cell in mesh. | def LSZ7(YKHO):
return Jc_e(YKHO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DvWf(YKHO):\n if type(YKHO.get_entry_value('material', 'NAME')) == wKJz:\n return YKHO.get_entry_value('material', 'NAME').to_list()\n else:\n return []",
"def LSZ7(YKHO) -> bdIy[str]:\n return qe4Y.get(YKHO, 'materials')",
"def LSZ7(YKHO) -> bdIy['outputs.MaterialResponse']:\n re... | [
"0.67924607",
"0.67026085",
"0.6683254",
"0.65064615",
"0.6416182",
"0.62987727",
"0.6278848",
"0.6241829",
"0.62246734",
"0.6209615",
"0.62034273",
"0.6201977",
"0.61950064",
"0.61950064",
"0.61950064",
"0.6165841",
"0.6159032",
"0.6155219",
"0.61401147",
"0.61307454",
"0.61... | 0.7189321 | 0 |
Finds the intersection point of two lines. >>> intersection(1, 2, 5, 1, 2, 3) (1.0, 2.0) | def iQin(XOOk, kYGz, dg7v, pHXX, ftz7, iYf1):
return (0, 0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XMlP(cnXz, Ijzj):\n if cnXz.slope - Ijzj.slope == 0:\n return None\n Jity = (Ijzj.intercept - cnXz.intercept) / (cnXz.slope - Ijzj.slope)\n TWQQ = cnXz.slope * Jity + cnXz.intercept\n return PvyL(Jity, TWQQ)",
"def iQin(cnXz, Ijzj):\n fy7g, snrU = cnXz[0]\n IMyn, M5jx = Ijzj[0]\n ... | [
"0.81314063",
"0.79293454",
"0.7920637",
"0.7920109",
"0.78596795",
"0.78091913",
"0.780407",
"0.7801889",
"0.7801889",
"0.7801889",
"0.7780705",
"0.7776221",
"0.77546585",
"0.771492",
"0.77044207",
"0.7668679",
"0.76132864",
"0.7577442",
"0.7576621",
"0.756457",
"0.75548",
... | 0.66110736 | 87 |
returns the gender for a person (1, M = male, 2, F = female). | def xVNR(YKHO):
return YKHO.gender | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xVNR(YKHO):\n A97Q = YKHO._request('user.getInfo', True)\n BWXx = aP4s(A97Q, 'gender')\n if BWXx == 'm':\n return oh23\n elif BWXx == 'f':\n return ulpt\n return None",
"def EE3v(YKHO):\n return lhy8.object.gender[YKHO.id]",
"def L3jt(YKHO, mWFP):\n FHyl = YKHO.getFemaleR... | [
"0.7968525",
"0.7816964",
"0.7792018",
"0.77385116",
"0.77220815",
"0.7701426",
"0.7625593",
"0.75938874",
"0.75613296",
"0.75613296",
"0.7555486",
"0.75098616",
"0.75046396",
"0.74758524",
"0.74485147",
"0.7439287",
"0.74010646",
"0.7271295",
"0.7252251",
"0.70918864",
"0.70... | 0.76234275 | 7 |
returns True/False for whether the person is male | def KKmm(YKHO):
return YKHO.get_gender() in YKHO.male_codes | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KKmm(YKHO):\n return int(YKHO.gender_code) % 2 != 0",
"def RKMB(YKHO):\n return int(YKHO.gender_code) % 2 == 0",
"def RKMB(YKHO):\n return YKHO.get_gender() in YKHO.female_codes",
"def RKMB(YKHO, QbMV, qIxc, PJWX=False):\n if YKHO.classifier_type == 'stupid':\n return False\n s2mk =... | [
"0.8545395",
"0.76926655",
"0.7310515",
"0.69578063",
"0.686131",
"0.6800162",
"0.6760344",
"0.66652936",
"0.66403174",
"0.6447461",
"0.6444825",
"0.6429352",
"0.6421828",
"0.6421653",
"0.6406958",
"0.63925874",
"0.6347945",
"0.6338355",
"0.6338355",
"0.6302552",
"0.6292139",... | 0.8385827 | 1 |
returns True/False for whether the person is male | def RKMB(YKHO):
return YKHO.get_gender() in YKHO.female_codes | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KKmm(YKHO):\n return int(YKHO.gender_code) % 2 != 0",
"def KKmm(YKHO):\n return YKHO.get_gender() in YKHO.male_codes",
"def RKMB(YKHO):\n return int(YKHO.gender_code) % 2 == 0",
"def RKMB(YKHO, QbMV, qIxc, PJWX=False):\n if YKHO.classifier_type == 'stupid':\n return False\n s2mk = d... | [
"0.85446733",
"0.83852494",
"0.7692585",
"0.69575757",
"0.68617",
"0.68003285",
"0.6760141",
"0.6664311",
"0.6639248",
"0.6445876",
"0.6443134",
"0.642771",
"0.6421326",
"0.6420013",
"0.6406387",
"0.6390379",
"0.63482714",
"0.63370246",
"0.63370246",
"0.63017505",
"0.62917197... | 0.7310659 | 3 |
Test that the list is correctly displayed on the detail page of path | def nITu(YKHO):
pmON = X6Ln(length=1)
ytyx(obj=pmON, creator=YKHO.user)
geh0 = YKHO.client.get(pmON.get_detail_url())
YKHO.assertTemplateUsed(geh0, template_name='paperclip/details.html')
YKHO.assertItemsEqual(vKIi.objects.attachments_for_object(pmON), geh0.context['attachments_list']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zKKk(YKHO):\n geh0 = YKHO.client.get(f'/{YKHO.root_url}/')\n YKHO.assertEqual(200, geh0.status_code)",
"def Er9p(YKHO):\n pass",
"def v_nO(YKHO):\n geh0 = YKHO.client.get(gxEw(YKHO.urlprefix + '_list'))\n YKHO.assertEqual(geh0.status_code, 200)",
"def P4vE(YKHO):\n dg7v = U2Av.objects.c... | [
"0.76332724",
"0.753242",
"0.7506409",
"0.7407793",
"0.7277809",
"0.7258113",
"0.7241507",
"0.7164198",
"0.71422994",
"0.71184367",
"0.7103884",
"0.70662564",
"0.70331645",
"0.70290136",
"0.7007151",
"0.69806963",
"0.6960273",
"0.69430745",
"0.69391894",
"0.6919107",
"0.69070... | 0.0 | -1 |
Returns the aiohttp response. | async def response(YKHO):
bD7m = await YKHO.url()
async with piYe.ClientSession() as KCHu:
async with KCHu.get(bD7m) as Mkmy:
return await YKHO.resolve_response(Mkmy) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GkmR(YKHO):\n return YKHO.http_response",
"def GkmR(YKHO):\n return YKHO.http_response",
"def St3z(YKHO):\n return YKHO._response",
"def T_2m(YKHO):\n geh0 = G4JS.get(YKHO.url_string, timeout=10)\n if geh0.ok:\n return geh0.json()\n else:\n geh0.raise_for_status()",
"asy... | [
"0.68557006",
"0.68557006",
"0.68503994",
"0.68402827",
"0.6824489",
"0.68019855",
"0.67422175",
"0.66713166",
"0.66383386",
"0.6613149",
"0.6606607",
"0.66009843",
"0.6600399",
"0.6566915",
"0.65236175",
"0.6485987",
"0.63926846",
"0.638558",
"0.6380066",
"0.6364758",
"0.636... | 0.7949754 | 0 |
Returns whether 'x' is a lambda function containing a single argument | def OPib(WKvO):
try:
return WKvO.func_code.co_argcount == 1
except AttributeError:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rVKq(WKvO):\n return isinstance(WKvO, tuple) and len(WKvO) > 0 and callable(WKvO[0])",
"def tQjN(YKHO, Q6kx: cst.Lambda) -> bool:\n return False",
"def p5Co(kLQb):\n return yIJ2(kLQb, 'lambda')",
"def VBj0(WKvO):\n return hasattr(WKvO, '__call__')",
"def VBj0(WKvO):\n return hasattr(WKvO... | [
"0.74037415",
"0.7092523",
"0.70317554",
"0.6580646",
"0.65337306",
"0.6377743",
"0.6174758",
"0.61602145",
"0.6100899",
"0.6091303",
"0.6028341",
"0.6028341",
"0.6013959",
"0.59253764",
"0.5923896",
"0.58121675",
"0.57859284",
"0.5778012",
"0.57451147",
"0.5732188",
"0.57211... | 0.81794375 | 0 |
Calculates a color value based on minimum and maximum value. | def JGfx(BWXx, h_4H, SkJr):
ydh_ = 8
z13o = 0
if h_4H == SkJr:
return z13o
return round((ydh_ - 1) * ((BWXx - h_4H) / (SkJr - h_4H))) + 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qfpW(YKHO, BWXx):\n if not len(YKHO.colors):\n return (0, 0, 0)\n elif len(YKHO.colors) == 1:\n return YKHO.colors[0][1]\n elif BWXx < YKHO.min:\n return YKHO.colors[0][1]\n elif BWXx > YKHO.max:\n return YKHO.colors[-1][1]\n BWXx = (BWXx - YKHO.min) / (YKHO.max - YKH... | [
"0.8070068",
"0.7819611",
"0.7516811",
"0.746309",
"0.71798164",
"0.7088893",
"0.70414144",
"0.70012444",
"0.69424605",
"0.6876646",
"0.68277186",
"0.67933273",
"0.6784359",
"0.6778006",
"0.67528516",
"0.66459095",
"0.6636736",
"0.6618374",
"0.657383",
"0.6560266",
"0.6547062... | 0.83900446 | 0 |
Deep copy this object and return the clone. | def FzJk(YKHO):
return W1NS(YKHO.area, YKHO.num_wind, YKHO.position, YKHO.up_vector) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i3ak(YKHO):\n return _qLf(YKHO)",
"def i3ak(YKHO):\n return _qLf(YKHO)",
"def _qLf(YKHO) -> object:\n return qA7W.deepcopy(YKHO)",
"def i3ak(YKHO):\n return _qLf(YKHO)",
"def i3ak(YKHO):\n return jth9.deepcopy(YKHO)",
"def i3ak(YKHO):\n return jth9.deepcopy(YKHO)",
"def i3ak(YKHO)... | [
"0.8900248",
"0.8900248",
"0.88966805",
"0.8832786",
"0.87891513",
"0.87891513",
"0.87891513",
"0.87891513",
"0.87891513",
"0.87891513",
"0.87891513",
"0.87891513",
"0.8669182",
"0.860324",
"0.84993786",
"0.84993786",
"0.84993786",
"0.8488538",
"0.8488538",
"0.84882736",
"0.8... | 0.0 | -1 |
Generate the next array of batches from the data. The array consists of the last batch of the previous array, followed by num_unrollings new ones. | def next(YKHO):
nJ0e = [YKHO._last_batch]
for YPaw in range(YKHO._num_unrollings):
nJ0e.append(YKHO._next_batch())
YKHO._last_batch = nJ0e[-1]
return nJ0e | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def next(YKHO):\n nJ0e = [YKHO._last_batch]\n for YPaw in range(YKHO._n_unrollings):\n nJ0e.append(YKHO._next_batch())\n YKHO._last_batch = nJ0e[-1]\n return nJ0e",
"def next(YKHO):\n nJ0e = [YKHO._last_batch]\n for bGrB in range(YKHO._num_unrollings):\n nJ0e.append(YKHO._next_bat... | [
"0.76636595",
"0.75832194",
"0.74310124",
"0.7251515",
"0.7056222",
"0.7019473",
"0.6943593",
"0.6618113",
"0.6560326",
"0.6535536",
"0.6413755",
"0.6360013",
"0.6346563",
"0.62960917",
"0.6222387",
"0.6198044",
"0.61864895",
"0.61355174",
"0.60937846",
"0.6087265",
"0.607014... | 0.76422495 | 1 |
Return string representation of the number in scientific notation. Captures all of the information in the underlying representation. | def hLks(YKHO, nSBL=False, QpfX=None):
Zihr = ['', '-'][YKHO._sign]
if YKHO._is_special:
if YKHO._exp == 'F':
return Zihr + 'Infinity'
elif YKHO._exp == 'n':
return Zihr + 'NaN' + YKHO._int
else:
return Zihr + 'sNaN' + YKHO._int
Sjwh = YKHO._exp + ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gMWX(FGW3):\n qmLP.showwarning('scientific_notation will be deprecated. Please use ekpmeasure.universal.scientific_notation', DeprecationWarning, '', 0)\n return UsD6(FGW3)",
"def PYh4(FGW3, rhd_, vIwR=False):\n FGW3 = float(FGW3)\n if FGW3 == 0.0:\n if not vIwR:\n return float(... | [
"0.7793189",
"0.73637253",
"0.73251164",
"0.7313241",
"0.7214064",
"0.71800846",
"0.71226126",
"0.71184075",
"0.70813036",
"0.7079288",
"0.7047125",
"0.70273715",
"0.6654196",
"0.665171",
"0.6504533",
"0.6500443",
"0.64224094",
"0.6416717",
"0.6369555",
"0.6326843",
"0.629376... | 0.63137794 | 20 |
Checks if cookie validity time expired. | def f1eK(YKHO):
wzkt = int(round(ITS7() * 1000))
pg_u = YKHO.get_timestamp()
return wzkt > pg_u | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XTIS(YKHO):\n return int(ITS7.time()) > YKHO.expires_at",
"def CJbn(YKHO):\n if YKHO.expires and rIAI.now() >= YKHO.expires - fCoM(seconds=YKHO.TIMEOUT_SECONDS):\n return True\n return False",
"def XTIS(YKHO):\n return qcWV.utcnow() - YKHO.__ctime > PO44.AGE_MAX",
"def SGM1(pg_u):\n ... | [
"0.7936507",
"0.7885814",
"0.7795751",
"0.77893233",
"0.7774175",
"0.7769704",
"0.77437097",
"0.7734489",
"0.7734171",
"0.76802593",
"0.7646943",
"0.76171565",
"0.76047075",
"0.7594586",
"0.758949",
"0.7584075",
"0.75612295",
"0.7552942",
"0.7520254",
"0.7513006",
"0.75032985... | 0.845431 | 0 |
Get a random element from the collection. | def UIrZ(YKHO) -> int:
return YKHO.nums[tuKI.randint(0, len(YKHO.nums) - 1)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def P8Zf(YKHO):\n try:\n return YKHO.object().random_element()\n except AttributeError:\n return Acvy(YKHO.list())",
"def LAaV(xUwc, q24Q=None):\n try:\n d6pt = tuKI.randint(0, len(xUwc) - 1)\n if q24Q is None:\n return xUwc[d6pt]\n else:\n return... | [
"0.8221962",
"0.7761752",
"0.750674",
"0.74715596",
"0.7446763",
"0.7373989",
"0.7305137",
"0.7271455",
"0.71799874",
"0.7151725",
"0.7148621",
"0.709205",
"0.7078637",
"0.7044884",
"0.70126224",
"0.6974537",
"0.69440144",
"0.6925515",
"0.69068164",
"0.69025487",
"0.6900869",... | 0.0 | -1 |
test, a function that takes an int parameter and returns a Boolean Assumes there exists an int, x, such that test(x) is True Returns an int, x, with the smallest absolute value such that test(x) is True In case of ties, return any one of them. | def XyOp(QOe9):
exwG = 0
while True:
if QOe9(exwG) == True:
return exwG
elif QOe9(-exwG) == True:
return -exwG
exwG += 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XyOp(QOe9):\n WKvO = 0\n while True:\n if QOe9(WKvO):\n return WKvO\n if QOe9(-WKvO):\n return -WKvO\n WKvO += 1",
"def XyOp(QOe9):\n fjjX = None\n for WKvO in range(-1000, 1000):\n try:\n if QOe9(WKvO):\n if not fjjX or ... | [
"0.72908276",
"0.7248615",
"0.6697593",
"0.6687364",
"0.656359",
"0.6225053",
"0.60870486",
"0.60589576",
"0.5960905",
"0.59461474",
"0.5892362",
"0.5871498",
"0.5807157",
"0.57761514",
"0.5768844",
"0.57543546",
"0.5716543",
"0.5709978",
"0.56917214",
"0.56798965",
"0.566379... | 0.6737398 | 2 |
Converts dataset [returned by ReadFile] into numpy arrays for tags, terms, and lengths. | def HZ38(__n6):
ywwl = len(__n6)
Kt_s = len(max(__n6, key=len))
yWuy = XTiz.zeros((ywwl, Kt_s))
Nd83 = XTiz.zeros((ywwl, Kt_s))
Fbjb = XTiz.zeros(ywwl)
for YRbF in range(ywwl):
for r845 in range(len(__n6[YRbF])):
yWuy[YRbF][r845] = __n6[YRbF][r845][0]
Nd83[YRbF][r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i9pi(Ux0P):\n Eab6, Icli, Crrw = ([], [], [])\n with open(Ux0P) as eHNT:\n V22M, jryd, dJ1p = ([], [], [])\n for zFiD in eHNT:\n try:\n zFiD = zFiD.rstrip()\n if len(zFiD) == 0 or zFiD.startswith('-DOCSTART-'):\n if len(V22M) != 0:... | [
"0.64853454",
"0.63038886",
"0.62456936",
"0.62303764",
"0.6218099",
"0.61838824",
"0.61794305",
"0.6153668",
"0.6153273",
"0.61154544",
"0.61085933",
"0.6103142",
"0.60743433",
"0.60427636",
"0.60189384",
"0.59915173",
"0.5986163",
"0.59812397",
"0.5946156",
"0.59422773",
"0... | 0.5979857 | 18 |
Get validation data loader | def GS5S(YKHO):
return YKHO._get_batch_generator(X=YKHO.X_val, y=YKHO.y_val, batch_size=YKHO.batch_size) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N_iv(YKHO):\n if YKHO._valid_dataset is None:\n return None\n else:\n return pVAc(YKHO._valid_dataset, **YKHO._init_kwargs)",
"def su9O(YKHO):\n DWkG = None\n if YKHO.config['validation']['csv_file'] is not None:\n DWkG = YKHO.load_dataset(csv_file=YKHO.config['validation']['... | [
"0.8590471",
"0.7355907",
"0.72594106",
"0.72526765",
"0.6971886",
"0.68376464",
"0.6821184",
"0.6706005",
"0.6696102",
"0.6691212",
"0.6647142",
"0.65045714",
"0.6483178",
"0.6461045",
"0.6428349",
"0.6416431",
"0.6411948",
"0.63731813",
"0.63490546",
"0.63348174",
"0.633106... | 0.64051265 | 17 |
Get total number of training samples | def YZ0H(YKHO):
return YKHO.X_train.shape[0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jKdm(YKHO):\n return len(YKHO._train_files_path)",
"def yU06(YKHO):\n return YKHO._num_samples",
"def g4oJ(YKHO):\n raise NotImplementedError",
"def UHFx(YKHO):\n return len(YKHO.samples)",
"def cDK5(YKHO):\n return YKHO._n_samples",
"def NXCJ(YKHO):\n return len(YKHO.training_index... | [
"0.80607814",
"0.79801553",
"0.79207605",
"0.79027027",
"0.78142476",
"0.78042465",
"0.77744085",
"0.7760257",
"0.7724674",
"0.76998353",
"0.7697931",
"0.7690772",
"0.7689558",
"0.7687774",
"0.76843995",
"0.7679064",
"0.76510054",
"0.7642862",
"0.7641264",
"0.76356965",
"0.76... | 0.71721745 | 57 |
Get total number of validation samples | def u8sg(YKHO):
return YKHO.X_val.shape[0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F4Nh(YKHO) -> int:\n return YKHO.get_total_number_of_training_epochs()",
"def EkGt(YKHO):\n if YKHO.subset == 'train':\n return 4741\n if YKHO.subset == 'validation':\n return 1184",
"def TnJk(YKHO) -> int:\n return len(YKHO.get_train_epochs())",
"def UHFx(YKHO):\n return len... | [
"0.7764298",
"0.75232494",
"0.7477806",
"0.74315715",
"0.73803747",
"0.7360718",
"0.7350857",
"0.7350857",
"0.7350857",
"0.7350857",
"0.7347779",
"0.72650117",
"0.7259706",
"0.7256673",
"0.72538364",
"0.72460794",
"0.7241698",
"0.7197918",
"0.71907973",
"0.7165964",
"0.716166... | 0.6906224 | 51 |
Retrieve the maximum number of stars that can be handled by this instance. | def YMfr():
m2Zb = SK8V()
m2Zb.addParameter('maximum_number_of_stars', dtype='int32', direction=m2Zb.OUT, description='The current value of the maximum number of stars')
m2Zb.result_type = 'int32'
m2Zb.result_doc = '\n 0 - OK\n Current value of was retrieved\n '
return m2Zb | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cZaP(YKHO):\n if not YKHO.power:\n return 0\n else:\n miOn = (YKHO.power - 1) // 10\n miOn = min(miOn, 5)\n miOn = max(miOn, 1)\n return miOn",
"def XrNj(YKHO) -> int:\n return qe4Y.get(YKHO, 'max_rate')",
"def kBEh(YKHO):\n return YKHO._number_of_ratings",
... | [
"0.71983445",
"0.653061",
"0.6474899",
"0.63626164",
"0.63419306",
"0.6314071",
"0.6286233",
"0.62546426",
"0.62416905",
"0.62121046",
"0.61763054",
"0.61763054",
"0.6147266",
"0.6130395",
"0.6097856",
"0.6067983",
"0.60626954",
"0.6058713",
"0.60523444",
"0.60523444",
"0.605... | 0.7479722 | 0 |
Retrieve the current core mass of the star, where hydrogen abundance is <= h1_boundary_limit | def BF7c():
m2Zb = SK8V()
m2Zb.can_handle_array = True
m2Zb.addParameter('index_of_the_star', dtype='int32', direction=m2Zb.IN, description='The index of the star to get the value of')
m2Zb.addParameter('core_mass', dtype='float64', direction=m2Zb.OUT, description='The current core mass of the star, whe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eFps(YKHO):\n YKHO.core_mass = YKHO.mass * (1 - YKHO.fenv / 100)",
"def IA3k(YKHO):\n return 1",
"def r3gr(YKHO):\n return YKHO._stat(1)",
"def KYwN(YKHO):\n YKHO.mass = YKHO.core_mass / (1 - YKHO.fenv / 100)",
"def AJs9(YKHO):\n _QwM = YKHO.combined_gravity.particles.LagrangianRadii(mf=... | [
"0.7174281",
"0.6523209",
"0.6476151",
"0.6415047",
"0.6386741",
"0.6370274",
"0.6332992",
"0.619396",
"0.6124608",
"0.6110643",
"0.609187",
"0.60914326",
"0.6077457",
"0.6038231",
"0.6027752",
"0.60250205",
"0.60250205",
"0.6016007",
"0.59889024",
"0.59864223",
"0.59839207",... | 0.7520003 | 0 |
Retrieve the current mass loss rate of the star. (positive for winds, negative for accretion) | def ybvd():
m2Zb = SK8V()
m2Zb.can_handle_array = True
m2Zb.addParameter('index_of_the_star', dtype='int32', direction=m2Zb.IN, description='The index of the star to get the value of')
m2Zb.addParameter('mass_loss_rate', dtype='float64', direction=m2Zb.OUT, description='The current mass loss rate of the... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oZIz(YKHO):\n return round(100 / YKHO.games_played() * YKHO.lost)",
"def bhah(YKHO, yGTL=30000000000.0):\n return yGTL * YKHO.get_area() * 1000000.0 * YKHO.slip_rate * 0.001",
"def Xaq_(YKHO):\n if YKHO.reward_type == 'QED':\n asBq = OJ0g.MolFromSmiles(YKHO._state)\n if asBq is None:... | [
"0.69992566",
"0.6604229",
"0.65678155",
"0.65393585",
"0.63876754",
"0.638714",
"0.6325492",
"0.6325311",
"0.6317576",
"0.6308747",
"0.63014966",
"0.6295506",
"0.62795955",
"0.6273818",
"0.6273818",
"0.622882",
"0.62180823",
"0.6218038",
"0.62149316",
"0.6197102",
"0.6189287... | 0.78832126 | 0 |
Retrieve the mass fraction at the specified zone/meshcell of the star. | def cBOx():
m2Zb = SK8V()
m2Zb.can_handle_array = True
m2Zb.addParameter('index_of_the_star', dtype='int32', direction=m2Zb.IN, description='The index of the star to get the value of')
m2Zb.addParameter('zone', dtype='int32', direction=m2Zb.IN, description='The zone/mesh-cell of the star to get the valu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ct4H():\n m2Zb = SK8V()\n m2Zb.can_handle_array = True\n m2Zb.addParameter('index_of_the_star', dtype='int32', direction=m2Zb.IN, description='The index of the star to set the value of')\n m2Zb.addParameter('zone', dtype='int32', direction=m2Zb.IN, description='The zone/mesh-cell of the star to set... | [
"0.7034395",
"0.6815169",
"0.67090005",
"0.65962845",
"0.64663064",
"0.6462129",
"0.64476156",
"0.63544315",
"0.6349117",
"0.63385296",
"0.63330257",
"0.6322184",
"0.6311764",
"0.6275213",
"0.62750334",
"0.62744653",
"0.61977017",
"0.6169659",
"0.6149496",
"0.61467403",
"0.61... | 0.8157455 | 0 |
Retrieve the mass number of the chemical abundance variable of the star. | def fGqn():
m2Zb = SK8V()
m2Zb.can_handle_array = True
m2Zb.addParameter('index_of_the_star', dtype='int32', direction=m2Zb.IN, description='The index of the star to get the value of')
m2Zb.addParameter('species', dtype='int32', direction=m2Zb.IN, description='The species of the star to get the mass num... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yrkk(YKHO):\n return YKHO.mass",
"def QJCc(YKHO) -> int:\n if len(YKHO.isotopes) <= 0:\n return int(YKHO.atomic_weight)\n RGiT = [YRbF for YRbF in YKHO.isotopes if YRbF.abundance is not None]\n if RGiT:\n return max(RGiT, key=GMHI('abundance')).mass_number\n else:\n return... | [
"0.7590544",
"0.75792176",
"0.7492126",
"0.7314409",
"0.7308741",
"0.7308741",
"0.7243165",
"0.7211942",
"0.7169397",
"0.71612054",
"0.71433914",
"0.71424615",
"0.7127537",
"0.7115832",
"0.70058",
"0.6996188",
"0.6985065",
"0.69714326",
"0.69620454",
"0.6942264",
"0.6856011",... | 0.66678977 | 31 |
Given a list return a bool indicating whether all the ints in the list are the same as the given int. | def all(WKvO: list[int], LVAh: int) -> bool:
if len(WKvO) == 0:
return False
YRbF: int = 0
while YRbF < len(WKvO):
epBp: int = WKvO[YRbF]
if epBp != LVAh:
return False
YRbF += 1
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ac8g(yv6U):\n return len(set(yv6U)) == 1",
"def ac8g(yv6U):\n return len(set(yv6U)) == 1",
"def Idhz(yv6U: list) -> bool:\n for ZfUD in yv6U:\n if not isinstance(ZfUD, int):\n return False\n return True",
"def kegL(JTgH, oiSt):\n for wEf2 in JTgH:\n if wEf2 != oiSt... | [
"0.7494314",
"0.74826825",
"0.74390393",
"0.7150398",
"0.71214294",
"0.69567496",
"0.69441736",
"0.6914238",
"0.68899465",
"0.6761551",
"0.67591727",
"0.6743458",
"0.6743458",
"0.6736362",
"0.6684111",
"0.667907",
"0.6632827",
"0.66175884",
"0.6614307",
"0.65870816",
"0.65835... | 0.6757632 | 11 |
The max function is given a list of ints, max should return the largest in the List. | def max(input: list[int]) -> int:
if len(input) == 0:
raise ValueError('max() arg is an empty List')
if len(input) == 1:
return input[0]
YRbF: int = 0
sSaq: int = input[0]
while YRbF < len(input):
WKvO: int = input[YRbF]
if WKvO > sSaq:
sSaq = WKvO
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PtQX(PVOR):\n CjUr = PVOR.pop()\n for WKvO in PVOR:\n if WKvO > CjUr:\n CjUr = WKvO\n return CjUr",
"def PtQX(aO51):\n if not aO51:\n return None\n max = 0\n for YRbF in range(len(aO51)):\n if aO51[YRbF] >= max:\n max = aO51[YRbF]\n return max",... | [
"0.86286324",
"0.83260155",
"0.8231499",
"0.82155085",
"0.82082033",
"0.8170161",
"0.815833",
"0.8158101",
"0.8135576",
"0.81237465",
"0.81070346",
"0.8063985",
"0.80183524",
"0.797547",
"0.79631186",
"0.79015344",
"0.78915083",
"0.78844845",
"0.7816385",
"0.77896714",
"0.776... | 0.8563657 | 1 |
Returns number of boxes held in collection. This number is inferred at `runtime`. | def hG11(vhpA):
return ZylS.shape(vhpA)[0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hG11(YKHO):\n return YT3X.combined_static_and_dynamic_shape(YKHO.get())[0]",
"def hG11(YKHO):\n return YKHO.data['boxes'].shape[0]",
"def Yv9K(vhpA):\n return vhpA.get_shape()[0].value",
"def minh(YKHO):\n if QePW.identity:\n return qQXR.dumps(MPqv.get_number_of_all_boxes())\n else:... | [
"0.7863661",
"0.7540847",
"0.7314373",
"0.718626",
"0.68020475",
"0.6714503",
"0.66045725",
"0.6535049",
"0.63897634",
"0.63865876",
"0.63848794",
"0.63791704",
"0.63775164",
"0.6347256",
"0.6329597",
"0.6306413",
"0.6306186",
"0.6295219",
"0.6269308",
"0.6237825",
"0.6235863... | 0.6791359 | 5 |
Compute an array of unit vectors corresponding to the array of longitude and latitude in either celestial conventions (ra, dec) or usual spherical coordinate system conventions. | def m4C0(FDPT, QnmL, r57q, PXGI):
if PXGI.lower() not in ('degrees', 'radians'):
raise ValueError('illegal value for units, must be either degrees or radians')
if r57q.lower() not in ('celestial', 'spherical'):
raise ValueError('illegal value for convention, must be either spherical or celestial... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TIW_(QnmL, FDPT):\n XRjd = zawL(QnmL)\n XRjd, FDPT = map(oyIN.deg2rad, [XRjd, FDPT])\n e2lI = i771(oyIN.cos(FDPT) * oyIN.cos(XRjd), oyIN.sin(FDPT) * oyIN.cos(XRjd), -oyIN.sin(XRjd))\n OQjU = i771(-oyIN.sin(FDPT), oyIN.cos(FDPT), 0.0)\n aL3w = i771(oyIN.cos(FDPT) * oyIN.sin(XRjd), oyIN.sin(FDPT) ... | [
"0.7138443",
"0.6797031",
"0.6580951",
"0.6487732",
"0.64075863",
"0.62914747",
"0.6250581",
"0.6105917",
"0.608074",
"0.6080653",
"0.60632944",
"0.60572916",
"0.60474706",
"0.60385126",
"0.60348654",
"0.60105664",
"0.598558",
"0.5983229",
"0.5982391",
"0.59789604",
"0.596450... | 0.63996613 | 5 |
Return the rendered "Share this group" page. This is the page that's shown when a user who is already a member of a group visits the group's URL. | def y198(QePW, uOe2, rQow=None, IsKO=None, CBIr=None, _1tc=True):
if uOe2 is None:
V8Fl = '__world__'
s5ru = 'Public'
else:
V8Fl = uOe2.pubid
s5ru = uOe2.slug
bD7m = QePW.route_url('group_read', pubid=V8Fl, slug=s5ru)
SGPK = {'group': V8Fl, 'limit': 1000}
if rQow:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mcNm(cQ68, VLqH):\n cQ68.get_by_pubid.return_value = TMAJ.Mock(slug=TMAJ.sentinel.slug)\n QePW = fEuO(authenticated_userid=None, matchdict=_FY1())\n RCd1.read(QePW)\n assert VLqH.render_to_response.call_args[1]['renderer_name'] == 'h:templates/groups/join.html.jinja2'",
"def uOe2():\n return T... | [
"0.6821035",
"0.6557086",
"0.61262167",
"0.60975266",
"0.60288507",
"0.59716564",
"0.59595704",
"0.59587616",
"0.5938648",
"0.5879114",
"0.5825473",
"0.5798603",
"0.5763661",
"0.57499135",
"0.5739994",
"0.57221305",
"0.5715035",
"0.5697138",
"0.56899744",
"0.5667915",
"0.5663... | 0.52703524 | 52 |
The coefficient R^2 is defined as (1 u/v), where u is the regression sum of squares ((y_true y_pred) 2).sum() and v is the residual sum of squares ((y_true y_true.mean()) 2).sum(). | def cCrA(YKHO, aMgO, Y8eF):
P6bq = ((Y8eF - aMgO) ** 2).sum(axis=-1)
Ty9i = ((Y8eF - Y8eF.mean(axis=-1)[None].T) ** 2).sum(axis=-1)
_841 = 1 - P6bq / Ty9i
return _841 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ok3j(YKHO):\n Ylbp = oyIN.corrcoef(YKHO.df.dependent, YKHO.get_y(YKHO.df.independent))[0, 1] ** 2\n return Ylbp",
"def skoj(Y8eF, aMgO):\n b5Ss = nMvt.sum(nMvt.square(Y8eF - aMgO))\n TBEQ = nMvt.sum(nMvt.square(Y8eF - nMvt.mean(Y8eF)))\n return 1 - b5Ss / (TBEQ + nMvt.epsilon())",
"def skoj(... | [
"0.7240341",
"0.7154532",
"0.7154532",
"0.7076919",
"0.6961249",
"0.6911477",
"0.68963224",
"0.6849084",
"0.68062097",
"0.67964363",
"0.6706592",
"0.66447604",
"0.6617247",
"0.6612481",
"0.6562397",
"0.6499502",
"0.6455718",
"0.6417619",
"0.6413622",
"0.6397743",
"0.6381089",... | 0.68703896 | 7 |
The coefficient R^2 is defined as (1 u/v), where u is the regression sum of squares ((y_true y_pred) 2).sum() and v is the residual sum of squares ((y_true y_true.mean()) 2).sum(). | def cCrA(YKHO, aMgO, Y8eF):
P6bq = ((Y8eF - aMgO) ** 2).sum(axis=-1)
Ty9i = ((Y8eF - Y8eF.mean(axis=-1)[None].T) ** 2).sum(axis=-1)
_841 = 1 - P6bq / Ty9i
return _841 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ok3j(YKHO):\n Ylbp = oyIN.corrcoef(YKHO.df.dependent, YKHO.get_y(YKHO.df.independent))[0, 1] ** 2\n return Ylbp",
"def skoj(Y8eF, aMgO):\n b5Ss = nMvt.sum(nMvt.square(Y8eF - aMgO))\n TBEQ = nMvt.sum(nMvt.square(Y8eF - nMvt.mean(Y8eF)))\n return 1 - b5Ss / (TBEQ + nMvt.epsilon())",
"def skoj(... | [
"0.7242499",
"0.71561515",
"0.71561515",
"0.7077243",
"0.6961742",
"0.69123554",
"0.68969804",
"0.6849047",
"0.6805133",
"0.6797461",
"0.67081434",
"0.6646408",
"0.6618383",
"0.66118366",
"0.65628403",
"0.6499854",
"0.64547765",
"0.64172876",
"0.6415792",
"0.63972706",
"0.638... | 0.68711 | 8 |
It raises an error when the metrics use an unknown bodyshape key. | def Ijjc(YKHO, Rb1O):
with trZe.raises(r642):
S6fb(metrics={'invalid': Rb1O()}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d2MT(YKHO, Rb1O):\n with trZe.raises(r642):\n S6fb(metrics={vxeu['APPLE']: Rb1O({'shoulder': {'importance': 'invalid'}})})\n with trZe.raises(r642):\n S6fb(metrics={vxeu['APPLE']: Rb1O({'hip': {'emphasis': 'invalid'}})})\n with trZe.raises(r642):\n S6fb(metrics={vxeu['APPLE']: Rb1... | [
"0.65264523",
"0.6026128",
"0.59477365",
"0.57505983",
"0.56828314",
"0.56597525",
"0.5659324",
"0.5650512",
"0.5605984",
"0.5603519",
"0.5599031",
"0.5525134",
"0.5510009",
"0.54765075",
"0.54596245",
"0.54369617",
"0.54292005",
"0.5423097",
"0.5380972",
"0.5373382",
"0.5371... | 0.6652846 | 0 |
Check if two edges satisfy vine constraint. | def wLJ1(YKHO, cz55, xXD3):
uHSg = {cz55.L, cz55.R, xXD3.L, xXD3.R}
uHSg.update(cz55.D)
uHSg.update(xXD3.D)
return len(uHSg) == YKHO.level + 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VmqA(YKHO, WKvO, LVAh):\n for q_cO, Q_eH, zTvC, YtJp in zip(oyIN.diff(YKHO.Vx), oyIN.diff(YKHO.Vy), YKHO.Vx, YKHO.Vy):\n if WKvO == zTvC and LVAh == YtJp:\n return True\n elif q_cO != 0 and Q_eH != 0:\n jzdc = (WKvO - zTvC) / q_cO\n Fg_i = (LVAh - YtJp) / Q_eH\... | [
"0.6618024",
"0.65387493",
"0.6537732",
"0.647624",
"0.63763034",
"0.6348908",
"0.6306357",
"0.6262901",
"0.62391275",
"0.6205794",
"0.61995995",
"0.6176141",
"0.6170515",
"0.61691356",
"0.6168027",
"0.61456",
"0.6141212",
"0.6140468",
"0.6110669",
"0.6021944",
"0.60181975",
... | 0.6306066 | 7 |
Produce printable representation of the class. | def zAg0(YKHO):
rPXJ = 'L:{} R:{} D:{} Copula:{} Theta:{}'
return '\n'.join([rPXJ.format(D70y.L, D70y.R, D70y.D, D70y.name, D70y.theta) for D70y in YKHO.edges]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(Emd4):\n return Emd4._format_cls_repr()",
"def wHJl(YKHO):\n mPQc = type(YKHO).__name__\n C9U5 = YKHO.__dict__\n return f'<{mPQc} {C9U5}>'",
"def wHJl(YKHO):\n o8Kj = ', '.join([f'{H5ew}={repr(BWXx)}' for H5ew, BWXx in YKHO.__dict__.items()])\n return f'{YKHO.__class__.__name__}({o8K... | [
"0.82436126",
"0.7829108",
"0.76981926",
"0.7473316",
"0.7473316",
"0.7434246",
"0.74107707",
"0.7406711",
"0.74058354",
"0.74058354",
"0.7399679",
"0.7399679",
"0.7399679",
"0.7399679",
"0.7399679",
"0.7399679",
"0.7399679",
"0.7399679",
"0.7399679",
"0.7399679",
"0.7399679"... | 0.0 | -1 |
Return a `dict` with the parameters to replicate this Tree. | def MNRr(YKHO):
VZZT = YKHO.fitted
Aofo = {'tree_type': YKHO.tree_type, 'type': CTNJ(YKHO), 'fitted': VZZT}
if not VZZT:
return Aofo
Aofo.update({'level': YKHO.level, 'n_nodes': YKHO.n_nodes, 'tau_matrix': YKHO.tau_matrix.tolist(), 'previous_tree': YKHO._serialize_previous_tree(), 'edges': [D70y... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def es3T():\n Ylbp = dict()\n Ylbp['population_size'] = tuKI.randrange(3, 21)\n Ylbp['mutation_prob'] = tuKI.choice([0.02, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5])\n afYC = tuKI.choice(range(2, Ylbp['population_size'], 2))\n Ylbp['children'] = afYC\n Ylbp['gamma'] = tuKI.uniform(0.05, 0.4)\n return Ylb... | [
"0.68998635",
"0.67253834",
"0.6546543",
"0.6457312",
"0.6442662",
"0.63330096",
"0.6263072",
"0.62241304",
"0.6224066",
"0.6139342",
"0.6117222",
"0.6099355",
"0.6098079",
"0.6073814",
"0.6063322",
"0.60450315",
"0.60344964",
"0.6025861",
"0.601554",
"0.601381",
"0.59915525"... | 0.0 | -1 |
Build first level tree. | def ZcEE(YKHO):
qHFH = YKHO._sort_tau_by_y(0)
for WRKq in range(YKHO.n_nodes - 1):
QyVM = int(qHFH[WRKq, 0])
g2VT = njXl.select_copula(YKHO.u_matrix[:, (0, QyVM)])
mWFP, q7In = (g2VT.copula_type, g2VT.theta)
cnOs = ndC_(WRKq, 0, QyVM, mWFP, q7In)
cnOs.tau = YKHO.tau_matri... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sks5(YKHO):\n pass",
"def sks5(YKHO):\n raise NotImplementedError",
"def Cc7Y():\n tk5Y = i8DB(1)\n tk5Y.left = i8DB(2)\n tk5Y.left.right = i8DB(5)\n tk5Y.left.right.right = i8DB(7)\n tk5Y.right = i8DB(3)\n tk5Y.right.right = i8DB(4)\n return tk5Y",
"def Cc7Y():\n tk5Y = i8D... | [
"0.76223487",
"0.7183696",
"0.7100587",
"0.6930301",
"0.6880402",
"0.67742676",
"0.67408884",
"0.6666688",
"0.66572183",
"0.6565979",
"0.64979297",
"0.64871633",
"0.6475611",
"0.6450085",
"0.6431144",
"0.6421493",
"0.64010113",
"0.6390911",
"0.6378964",
"0.6376971",
"0.635607... | 0.63888425 | 18 |
Build kth level tree. | def trU9(YKHO):
DNwW = YKHO.get_anchor()
gsBo = YKHO._sort_tau_by_y(DNwW)
mC4V = YKHO.previous_tree.edges
for WRKq in range(YKHO.n_nodes - 1):
_tIi = int(gsBo[WRKq, 0])
iGeE, Y6c5 = ndC_.sort_edge([mC4V[DNwW], mC4V[_tIi]])
cnOs = ndC_.get_child_edge(WRKq, iGeE, Y6c5)
cnOs... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DiDm(G1Hx):\n return ClrE(None, k=G1Hx)",
"def sks5(YKHO):\n pass",
"def sks5(YKHO):\n raise NotImplementedError",
"def lisG(a1PO: BinarySearchTree, G1Hx: int) -> int:\n if not a1PO:\n pass\n elif zNig(a1PO.left) == G1Hx - 1:\n return a1PO.root\n elif zNig(a1PO.left) >= G1... | [
"0.6910847",
"0.653469",
"0.6436424",
"0.6408807",
"0.64055693",
"0.64001447",
"0.6383242",
"0.63101715",
"0.63089406",
"0.620788",
"0.61807114",
"0.6146901",
"0.61092883",
"0.6105214",
"0.60826904",
"0.6081421",
"0.60725605",
"0.60656106",
"0.60241085",
"0.6003141",
"0.59887... | 0.67800283 | 1 |
Build tree for level k. | def trU9(YKHO):
Rw6N = -1.0 * abs(YKHO.tau_matrix)
mC4V = YKHO.previous_tree.edges
azXi = {0}
KgZi = set(range(YKHO.n_nodes))
while len(azXi) != YKHO.n_nodes:
NvQ5 = set()
for WKvO in azXi:
for G1Hx in range(YKHO.n_nodes):
if G1Hx not in azXi and G1Hx != W... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DiDm(G1Hx):\n return ClrE(None, k=G1Hx)",
"def sks5(YKHO):\n pass",
"def sks5(YKHO):\n raise NotImplementedError",
"def no0g(YKHO, G1Hx=1):\n if G1Hx <= 0:\n return None\n lrAY = YKHO.elements\n if G1Hx > 1:\n for or8S in range(G1Hx - 1):\n lrAY = YKHO._depth_fi... | [
"0.7110787",
"0.68101877",
"0.6642633",
"0.6600867",
"0.6598958",
"0.6425727",
"0.63842756",
"0.6351377",
"0.63501644",
"0.6319642",
"0.62726647",
"0.62065697",
"0.61717993",
"0.61602837",
"0.6157374",
"0.61445105",
"0.61405236",
"0.6117494",
"0.6104266",
"0.6093975",
"0.6064... | 0.5926212 | 34 |
Return a `dict` with the parameters to replicate this Edge. | def MNRr(YKHO):
ACnF = None
if YKHO.parents:
ACnF = [_AKB.to_dict() for _AKB in YKHO.parents]
KkY2 = None
if YKHO.U is not None:
KkY2 = YKHO.U.tolist()
return {'index': YKHO.index, 'L': YKHO.L, 'R': YKHO.R, 'D': YKHO.D, 'parents': ACnF, 'neighbors': YKHO.neighbors, 'name': YKHO.name,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ovVc(YKHO):\n geyT = Lscj.asDict(YKHO)\n geyT.update({'usageCurrent': YKHO.usageCurrent, 'width_m': YKHO.width, 'gradient': YKHO.gradient, 'length': YKHO.length, 'material': YKHO.material})\n return geyT",
"def MNRr(YKHO):\n return {'in_edge_index': YKHO.in_edges, 'out_edge_index': YKHO.out_edges... | [
"0.64918417",
"0.6309743",
"0.6156045",
"0.61338997",
"0.6077803",
"0.60708433",
"0.606646",
"0.6022805",
"0.59958947",
"0.5993331",
"0.5986216",
"0.5968801",
"0.5965173",
"0.59483683",
"0.59439003",
"0.5939345",
"0.592815",
"0.5904828",
"0.59025854",
"0.5893278",
"0.5887169"... | 0.0 | -1 |
Decorator that caches the return value for each fall to f(args). Then when called again with same args, we can just look it up. | def i_PE(eHNT):
wyyA = {}
def ECmi(*qIxc):
try:
return wyyA[qIxc]
except KeyError:
wyyA[qIxc] = Aofo = eHNT(*qIxc)
return Aofo
except TypeError:
return eHNT(qIxc)
return ECmi | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rxxd(eHNT):\n wyyA = {}\n\n def KmAm(*qIxc):\n if qIxc in wyyA:\n return wyyA[qIxc]\n Aofo = eHNT(*qIxc)\n wyyA[qIxc] = Aofo\n return Aofo\n return KmAm",
"def i_PE(eHNT):\n wyyA = {}\n\n def ECmi(*qIxc):\n try:\n KwDD = wyyA[qIxc]\n ... | [
"0.7563644",
"0.7480184",
"0.74504125",
"0.7383082",
"0.73540103",
"0.73540103",
"0.73540103",
"0.73540103",
"0.7302727",
"0.72885925",
"0.72739923",
"0.7262799",
"0.7251225",
"0.72212696",
"0.71820515",
"0.7093952",
"0.70376325",
"0.69971305",
"0.6979717",
"0.6960737",
"0.68... | 0.72847354 | 10 |
Since masks are stored in a sparse format, this returns the actual nonsparse mask matrix given the index of the haar feature. Used for generating a tensor. | def FtAe(YKHO, QyVM):
ZHfW = oyIN.zeros((YKHO.dim, YKHO.dim))
YRbF, r845, NOoy, pO41 = YKHO.mask_params[QyVM]
ZHfW[YRbF:YRbF + NOoy, r845:r845 + pO41] = 1
ZHfW[YRbF + NOoy:YRbF + 2 * NOoy, r845:r845 + pO41] = -1
ZHfW[YRbF:YRbF + NOoy, r845 + pO41:r845 + 2 * pO41] = -1
ZHfW[YRbF + NOoy:YRbF + 2 *... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s9N3(EKkU, d6pt):\n ZHfW = oyIN.zeros(EKkU, dtype=oyIN.int64)\n ZHfW[d6pt] = 1\n return ZHfW",
"def wnkq(YKHO):\n g1eQ = []\n ewCu = 0\n for YRbF in range(YKHO.dim):\n for r845 in range(YKHO.dim):\n for NOoy in YKHO.mask_widths:\n for pO41 in YKHO.mask_width... | [
"0.6285411",
"0.6125519",
"0.5905121",
"0.585547",
"0.5764471",
"0.57190835",
"0.56971645",
"0.56581426",
"0.56167823",
"0.55994964",
"0.55961615",
"0.5557454",
"0.5551609",
"0.54961056",
"0.54901415",
"0.54778105",
"0.5443506",
"0.54430914",
"0.54242015",
"0.5403119",
"0.539... | 0.6051814 | 2 |
Gets a stream by its stream ID. Will create one if one does not already exist. | def uTra(YKHO, MLMj):
try:
return YKHO.streams[MLMj]
except KeyError:
return YKHO.begin_new_stream(MLMj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lZfr(MLMj):\n return AMX5(MLMj, aC7w)",
"def lZfr(YKHO, r0Ny):\n wOb_ = None\n if YKHO.streams.has_key(r0Ny):\n wOb_ = YKHO.streams[r0Ny]\n return wOb_",
"def libk(YKHO, _eu6):\n for GcCZ in YKHO.streams:\n if GcCZ.get_id() == _eu6:\n return GcCZ",
"def libk(YKHO, ... | [
"0.87072474",
"0.85486615",
"0.83780307",
"0.82261115",
"0.81701225",
"0.81655186",
"0.77468616",
"0.7576228",
"0.7521046",
"0.74071705",
"0.73441726",
"0.6883699",
"0.6826103",
"0.6796497",
"0.6779943",
"0.6671979",
"0.66621304",
"0.66459316",
"0.6619889",
"0.66056776",
"0.6... | 0.8505993 | 2 |
Gets a stream by its stream ID. Raises NoSuchStreamError if the stream ID does not correspond to a known stream and is higher than the current | def libk(YKHO, MLMj):
try:
return YKHO.streams[MLMj]
except KeyError:
if MLMj > YKHO.highest_stream_id:
raise XDBN(MLMj)
else:
raise iMUR(MLMj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uHxS(YKHO, MLMj):\n try:\n return YKHO.streams[MLMj]\n except KeyError:\n PekX = YKHO._stream_id_is_outbound(MLMj)\n XVgB = YKHO.highest_outbound_stream_id if PekX else YKHO.highest_inbound_stream_id\n if MLMj > XVgB:\n raise XDBN(MLMj)\n else:\n r... | [
"0.8629997",
"0.8020867",
"0.7927078",
"0.78347015",
"0.7746057",
"0.7341689",
"0.6971716",
"0.691727",
"0.68891406",
"0.6698851",
"0.6696217",
"0.66748285",
"0.66270906",
"0.6595863",
"0.6527121",
"0.6448655",
"0.63360375",
"0.6306778",
"0.6299163",
"0.6204608",
"0.61824614"... | 0.85995483 | 1 |
Returns a loudness vector that is the mean of the loudness values of any segments that overlap this AudioQuantum. | def Fc_N(PXIy, rk5s):
FVpR = []
for SADd in rk5s:
VytY = PXIy.that(SuM2.are_contained_by(SADd))
if len(VytY) == 0:
VytY = PXIy.that(SuM2.start_during(SADd))
if len(VytY) == 0:
VytY = PXIy.that(SuM2.overlap(SADd))
hkxX = [pG0V.loudness_max for pG0V in PXIy.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EQ0Z(YKHO):\n return YKHO.avg_amplitude + YKHO.std_amplitude * YKHO.SD_FOR_LOUD",
"def QunA(YKHO):\n return YKHO._loudness_range",
"def FVpR(YKHO) -> float:\n return float(YKHO._json_dict['loudness'])",
"def FVpR(YKHO) -> float:\n return float(YKHO._json_dict['loudness'])",
"def dNzN(nPrm, ... | [
"0.7041994",
"0.7003825",
"0.63483816",
"0.63483816",
"0.6111926",
"0.6061685",
"0.60302514",
"0.59968823",
"0.59628713",
"0.58365804",
"0.5792862",
"0.5755777",
"0.5728953",
"0.5709613",
"0.56558555",
"0.5655824",
"0.5635206",
"0.5632864",
"0.5628383",
"0.56051815",
"0.55937... | 0.70896035 | 0 |
decode the json string to a list of dictionaries | def K3BH(zEKB):
if zEKB is None or zEKB == '':
return []
else:
return qQXR.loads(zEKB) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K3BH(zEKB):\n if zEKB is None:\n return []\n else:\n D_Q2 = qQXR.loads(zEKB)\n return [cmPJ for cmPJ in D_Q2]",
"def K3BH(zEKB):\n if zEKB and len(zEKB) > 0:\n return qQXR.loads(zEKB)\n return []",
"def K3BH(zEKB):\n if not zEKB:\n return []\n return qQX... | [
"0.7390542",
"0.72945404",
"0.72930884",
"0.7239009",
"0.7180851",
"0.7180851",
"0.7163998",
"0.7134759",
"0.7134759",
"0.7134759",
"0.7134759",
"0.71285063",
"0.7109979",
"0.7109594",
"0.70812756",
"0.70711505",
"0.70711505",
"0.70711505",
"0.70711505",
"0.70711505",
"0.7065... | 0.6982995 | 29 |
Return the sum of the digits in the digit string. | def BviU(jJj9):
sum = 0
for WKvO in jJj9:
YRbF = int(WKvO)
sum += YRbF
return sum | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CIne(cDvl):\n return sum((int(Ko6S) for Ko6S in cDvl if Ko6S != '.'))",
"def tmkY(wjRY, Ko6S):\n return wjRY + int(Ko6S)",
"def UZHZ(BHGE):\n if type(BHGE) == type(''):\n KCHu = BHGE\n else:\n KCHu = str(BHGE)\n wjRY = 0\n for Z9rn in KCHu:\n wjRY += int(Z9rn)\n re... | [
"0.8750543",
"0.8319633",
"0.8261368",
"0.8248088",
"0.8222438",
"0.80726254",
"0.80443543",
"0.80442643",
"0.8034306",
"0.80129117",
"0.79504985",
"0.7916509",
"0.7913426",
"0.7895236",
"0.78158647",
"0.77462006",
"0.7624934",
"0.76008546",
"0.7581482",
"0.7493961",
"0.74806... | 0.81655455 | 5 |
Updates an issue comment. | async def update(YKHO, TBsA: str) -> None:
ZUIQ = f'/repos/{YKHO.repository}/issues/comments/{YKHO.id}'
await YKHO.client.post(endpoint=ZUIQ, data={'body': TBsA}, jsondata=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uaAx(YKHO, yC1V, pQGt, hGN5=None):\n mzy4 = {'content': hGN5}\n return YKHO._request('/issues/{}/comments/{}'.format(yC1V, pQGt), method='PATCH', form_parameters=mzy4)",
"def Wk0a(pQGt: int, hGN5: str, PJWX: bool=False):\n Tq5C = v3Kb('GITHUB_TOKEN')\n MOPg = {'Accept': 'application/vnd.github.v3... | [
"0.801398",
"0.74972636",
"0.74972636",
"0.7273091",
"0.71331996",
"0.7074408",
"0.7030454",
"0.70197505",
"0.6976571",
"0.6881831",
"0.6878488",
"0.68202955",
"0.68161523",
"0.67311114",
"0.6729016",
"0.6687375",
"0.6676011",
"0.6607052",
"0.6602378",
"0.6531641",
"0.6489869... | 0.74659 | 3 |
Compute rewards using a pool. | def Fqh3(dBuj, XP5J, TAjt=100):
return [Ty9i for Ty9i in dBuj.map_unordered(lambda jzdc, Ty9i: jzdc.episode.remote(Ty9i), [XP5J] * TAjt)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vwlo(dBuj, hnFq):\n return [Ty9i for Ty9i in dBuj.map(lambda jzdc, Ty9i: jzdc.episode.remote(Ty9i), hnFq)]",
"def s2mD(a1PO, KCHu, OXAZ, YWSi):\n Ep8u = OXAZ.size()[0]\n SX9w = ht2j.zeros(Ep8u, 3).to(vPBo.device)\n if a1PO == 0:\n return SX9w\n RwBS = OXAZ.view(Ep8u).clone().byte()\n ... | [
"0.6563512",
"0.6184591",
"0.5887239",
"0.5883085",
"0.5826798",
"0.5788799",
"0.57746863",
"0.5768695",
"0.5764908",
"0.57413626",
"0.574016",
"0.56949484",
"0.5679685",
"0.5679685",
"0.5679685",
"0.5679685",
"0.5679685",
"0.5659335",
"0.56461614",
"0.56461614",
"0.5644028",... | 0.7123163 | 0 |
This route renders a hello world text. | def kZiy():
JyK9 = l83i()
JyK9.run()
return 'Vietcetera Analytics Bot connected and running!' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z1md():\n Ol8d = 'Start of front end'\n return TvZl('index.html', message=Ol8d)",
"def Wzeq():\n return TvZl('index.html')",
"def Wzeq():\n return TvZl('index.html')",
"def d6pt():\n return 'Hello world !'",
"def uthR():\n Ol8d = 'hello'\n return TvZl('index.html', message=Ol8d)",
... | [
"0.78542393",
"0.77216756",
"0.7720755",
"0.76969725",
"0.76886016",
"0.7683131",
"0.76567256",
"0.7649348",
"0.76492167",
"0.76492167",
"0.76492167",
"0.76492167",
"0.76492167",
"0.76492167",
"0.76492167",
"0.7639898",
"0.7619563",
"0.75661844",
"0.7560782",
"0.75486016",
"0... | 0.0 | -1 |
This function applies an additive gaussian mutation of mean `mu` and standard deviation `sigma` on the input `individual`. The resulted value of `individual` stays bounded between `min_val` and `max_val`. This function is derived from the function `deap.tools.mutation.mutGaussian` | def Ze2y(DM04, yGTL, WTkW, VUR5, kpLf, JCoA):
zNig = len(DM04)
if not isinstance(yGTL, bdIy):
yGTL = wPFE(yGTL, zNig)
elif len(yGTL) < zNig:
raise IndexError('mu must be at least the size of individual: %d < %d' % (len(yGTL), zNig))
if not isinstance(WTkW, bdIy):
WTkW = wPFE(WTkW... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IAWS(WKvO, yGTL, WTkW):\n if isinstance(WKvO, oyIN.ndarray) and isinstance(WTkW, oyIN.ndarray):\n try:\n assert len(WKvO) == len(WTkW)\n except AssertionError:\n bo34.error('gaussian: the size of input arrays \"x\" and \"sigma\" must be identical')\n HwRy.exit(... | [
"0.7064172",
"0.7001807",
"0.6998575",
"0.6850585",
"0.6835091",
"0.6809934",
"0.6809007",
"0.6806695",
"0.68001306",
"0.67891765",
"0.6775775",
"0.67616206",
"0.67542565",
"0.67081934",
"0.66964877",
"0.66677326",
"0.66677326",
"0.6666056",
"0.6595974",
"0.659316",
"0.652626... | 0.82555586 | 0 |
write the object to file with json(if the file exists, this function will overwrite it) | def plF2(gIsw, Hkgb):
TLI7 = Hy7s.path.dirname(gIsw)
dIW6(TLI7)
with open(gIsw, 'w') as eHNT:
qQXR.dump(Hkgb, eHNT, skipkeys=False, ensure_ascii=False, check_circular=True, allow_nan=True, cls=None, indent=True, separators=None, encoding='utf-8', default=None, sort_keys=False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iaXM(nUeQ, YEnM):\n pmON = Hy7s.path.dirname(nUeQ)\n if not Hy7s.path.exists(pmON):\n Hy7s.makedirs(pmON)\n with open(nUeQ, 'w') as zyFt:\n zyFt.write(qQXR.dumps(YEnM))\n print('finish write %s to file....' % nUeQ)",
"def ncJT(object, nUeQ):\n with open(nUeQ, 'wb') as hlel:\n ... | [
"0.84618676",
"0.8322007",
"0.82944334",
"0.8291605",
"0.82909673",
"0.8261095",
"0.8180404",
"0.8137591",
"0.8109127",
"0.8088772",
"0.8037942",
"0.80326605",
"0.80321854",
"0.80206037",
"0.7983956",
"0.79721075",
"0.79669905",
"0.796289",
"0.796289",
"0.79604316",
"0.796037... | 0.7538832 | 79 |
Create and save a User with the given email and password. | def xWi2(YKHO, D3lj, jTXt, **wdCM):
if not D3lj:
raise ValueError('The given email must be set')
D3lj = YKHO.normalize_email(D3lj)
CBIr = YKHO.model(email=D3lj, **wdCM)
CBIr.set_password(jTXt)
CBIr.save(using=YKHO._db)
return CBIr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xWi2(YKHO, D3lj, jTXt, **wdCM):\n if not D3lj:\n raise ValueError('The email must be set')\n D3lj = YKHO.normalize_email(D3lj)\n CBIr = YKHO.model(email=D3lj, **wdCM)\n CBIr.set_password(jTXt)\n CBIr.save()",
"def xWi2(YKHO, D3lj, jTXt, **wdCM):\n D3lj = YKHO.normalize_email(D3lj)\n ... | [
"0.8765867",
"0.85452795",
"0.85368717",
"0.8527806",
"0.85269475",
"0.85257876",
"0.85186416",
"0.8508724",
"0.8504736",
"0.8504567",
"0.8504567",
"0.8504567",
"0.8494046",
"0.8494046",
"0.84938884",
"0.8492852",
"0.849132",
"0.8490454",
"0.8488974",
"0.8488869",
"0.84884715... | 0.8475258 | 31 |
Create and save a regular User with the given name and password. | def lYUQ(YKHO, D3lj, jTXt=None, **wdCM):
wdCM.setdefault('is_staff', False)
wdCM.setdefault('is_superuser', False)
return YKHO._create_user(D3lj, jTXt, **wdCM) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lYUQ(mWFP, jTXt):\n Q5YQ = mv1M(mWFP, jTXt)\n return Q5YQ",
"def lYUQ(NtEF, jTXt):\n Q5YQ = mv1M(NtEF, jTXt)\n Q5YQ.save_user()",
"def kI0b(Emd4, mWFP, NtEF, jTXt):\n kz9X = B8ni.generate_password_hash(jTXt).decode('UTF-8')\n CBIr = mv1M(name=mWFP, username=NtEF, password=kz9X)\n NCls.... | [
"0.8473142",
"0.8292261",
"0.8286474",
"0.8281468",
"0.82060784",
"0.8092539",
"0.80592215",
"0.80545795",
"0.8029721",
"0.8029721",
"0.7988629",
"0.7942275",
"0.793285",
"0.79201484",
"0.79182416",
"0.78932697",
"0.78785354",
"0.7877739",
"0.78703654",
"0.785733",
"0.7853397... | 0.0 | -1 |
Create and save a Superuser with the given email and password. | def Zp54(YKHO, D3lj, jTXt, **wdCM):
wdCM.setdefault('is_staff', True)
wdCM.setdefault('is_superuser', True)
if wdCM.get('is_staff') is not True:
raise ValueError('Superuser must have is_staff=True.')
if wdCM.get('is_superuser') is not True:
raise ValueError('Superuser must have is_superu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zp54(YKHO, D3lj, jTXt=None, **dDGN):\n YKHO._create_user(D3lj, True, jTXt, **dDGN)",
"def Zp54(YKHO, NtEF, D3lj, jTXt, **wdCM):\n print('vao')\n if jTXt is None:\n raise TypeError('Superusers must have a password.')\n CBIr = YKHO.create_user(NtEF, D3lj, jTXt)\n CBIr.is_superuser = True\... | [
"0.81725985",
"0.80997354",
"0.8093614",
"0.8089725",
"0.8085358",
"0.8064751",
"0.799083",
"0.797778",
"0.7967468",
"0.79635674",
"0.79632145",
"0.7956357",
"0.7955453",
"0.7954968",
"0.7954968",
"0.7954968",
"0.7954968",
"0.7954968",
"0.7954968",
"0.7954968",
"0.7954968",
... | 0.7793567 | 63 |
Test creating a new user with email is succesful | def FaPH(YKHO):
D3lj = 'test@testdomain.com'
jTXt = 'testpassword'
CBIr = egNl().objects.create_user(email=D3lj, password=jTXt)
YKHO.assertEqual(CBIr.email, D3lj)
YKHO.assertTrue(CBIr.check_password(jTXt)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WVkE(YKHO):\n D3lj = 'testemail@Airbase.io'\n jTXt = 'Test@123'\n CBIr = egNl().objects.create_user(email=D3lj, password=jTXt)\n YKHO.assertEqual(D3lj.lower(), CBIr.email)",
"def jH7C(YKHO):\n syqx = {'email': 'test@ezmeetup.ca', 'password': 'testpass123', 'first_name': 'Firstname', 'last_name... | [
"0.8678833",
"0.8640035",
"0.85473704",
"0.8532468",
"0.85118836",
"0.84817624",
"0.84784085",
"0.8453095",
"0.84348387",
"0.8413406",
"0.84073454",
"0.8394701",
"0.83935153",
"0.8385497",
"0.8382712",
"0.8371834",
"0.837183",
"0.83623654",
"0.8348313",
"0.834136",
"0.833884"... | 0.8334239 | 25 |
Test the email for a new user is normalized | def saHt(YKHO):
D3lj = 'test@TESTDOMAIN.COM'
jTXt = 'testpassword'
CBIr = egNl().objects.create_user(email=D3lj, password=jTXt)
YKHO.assertEqual(CBIr.email, D3lj.lower()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ho5W(YKHO):\n D3lj = 'test@TEST.FR'\n CBIr = egNl().objects.create_user(D3lj, 'testtest')\n YKHO.assertEqual(CBIr.email, D3lj.lower())",
"def saHt(YKHO):\n D3lj = 'testing@GMAIL.COM'\n CBIr = egNl().objects.create_user(email=D3lj, password='testingModels123')\n YKHO.assertEqual(CBIr.email, ... | [
"0.8010578",
"0.80075556",
"0.8003202",
"0.8000785",
"0.7962156",
"0.7947909",
"0.79349196",
"0.79011977",
"0.7883605",
"0.7879679",
"0.7865574",
"0.7860899",
"0.7828299",
"0.78214306",
"0.7820776",
"0.7815087",
"0.78015363",
"0.77948403",
"0.77629817",
"0.7762249",
"0.775828... | 0.7723275 | 26 |
test creating user with no email raises error | def V97d(YKHO):
with YKHO.assertRaises(ValueError):
jTXt = 'testpassword'
CBIr = egNl().objects.create_user(email=None, password=jTXt) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CnXP(YKHO):\n with YKHO.assertRaises(ValueError):\n D3lj = None\n KaGP = 'test1234'\n egNl().objects.create_user(email=D3lj, password=KaGP)",
"def WhLD(YKHO):\n with YKHO.assertRaises(ValueError):\n mv1M.objects.create_user(None, YKHO.password)",
"def dv9i(YKHO):\n with... | [
"0.895256",
"0.88699925",
"0.8856352",
"0.88042766",
"0.87931645",
"0.874924",
"0.87050384",
"0.86860985",
"0.86803883",
"0.86803067",
"0.8680166",
"0.8679475",
"0.86794025",
"0.86794025",
"0.8678369",
"0.8678369",
"0.8678369",
"0.8678369",
"0.8678369",
"0.86763716",
"0.86711... | 0.8251911 | 53 |
Test creating a new super user | def B84k(YKHO):
D3lj = 'test@testdomain.com'
jTXt = 'testpassword'
CBIr = egNl().objects.create_superuser(email=D3lj, password=jTXt)
YKHO.assertTrue(CBIr.is_superuser)
YKHO.assertTrue(CBIr.is_staff) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LqR1(YKHO):\n CBIr = egNl().objects.create_superuser('testsuper@gmail.com', 'test@123')\n YKHO.assertTrue(CBIr.is_superuser)\n YKHO.assertTrue(CBIr.is_staff)",
"def LqR1(YKHO):\n CBIr = egNl().objects.create_superuser('test@undeinveti.ro', 'test123')\n YKHO.assertTrue(CBIr.is_superuser)\n Y... | [
"0.85969746",
"0.8583956",
"0.8556613",
"0.85559213",
"0.8541916",
"0.8540319",
"0.85216206",
"0.85089445",
"0.84973854",
"0.8476776",
"0.845416",
"0.84290063",
"0.8421624",
"0.8400825",
"0.83722204",
"0.8363783",
"0.8334775",
"0.8328955",
"0.82905346",
"0.82499015",
"0.82153... | 0.818772 | 25 |
Test that image is saved in the correct location | def pSrc(YKHO, BdgE):
qxeD = 'test-uuid'
BdgE.return_value = qxeD
qaEx = FYrf.shoe_image_file_path(None, 'myimage.jpg')
iu9b = f'uploads/shoe/{qxeD}.jpg'
YKHO.assertEqual(qaEx, iu9b) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aZBm(YKHO):\n YKHO.assertTrue(True)",
"def QpLG(YKHO):\n Yw_3 = Oa8f.save_img(YKHO.good_url, 'unittests/')[1]\n for VXjJ in Yw_3:\n YKHO.assertTrue(Hy7s.path.isfile(VXjJ))",
"def JQOq(lCFC, LNo8):\n UxZO = Ukys(LNo8)\n UxZO.get_color_count(color_count=1)\n gIsw = 'out.jpg'\n UxZ... | [
"0.87445146",
"0.79249376",
"0.76034266",
"0.752306",
"0.7519782",
"0.7514248",
"0.7500583",
"0.7456983",
"0.7382041",
"0.7272574",
"0.72271407",
"0.71852696",
"0.7175786",
"0.7144913",
"0.7116745",
"0.71157855",
"0.7091634",
"0.70822346",
"0.7082192",
"0.7031725",
"0.6963108... | 0.0 | -1 |
Assert that this is a strictly descending array. | def CR96(qw7D):
for YRbF, r845 in zip(qw7D[1:], qw7D[:-1]):
if YRbF is not None and r845 is not None:
assert YRbF <= r845 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sikc(qw7D):\n for YRbF, r845 in zip(qw7D[1:], qw7D[:-1]):\n if YRbF is not None and r845 is not None:\n assert YRbF <= r845",
"def Qg_B(qw7D):\n for YRbF, r845 in zip(qw7D[1:], qw7D[:-1]):\n if YRbF is not None and r845 is not None:\n assert YRbF >= r845",
"def gbC... | [
"0.71439487",
"0.6645851",
"0.6580829",
"0.6487662",
"0.63971937",
"0.63540125",
"0.63540125",
"0.63540125",
"0.63540125",
"0.63540125",
"0.63540125",
"0.63540125",
"0.63540125",
"0.63540125",
"0.63540125",
"0.63540125",
"0.63540125",
"0.6283031",
"0.6283031",
"0.6283031",
"0... | 0.7119944 | 1 |
Split the Hologic naming convention into several parts. This function will parse the image name to extract the patient id, side (left or right), and the view (CC or ML). | def wfnn(mWFP):
tqKD = ZbWC.compile('p(\\d{3}-\\d{3}-\\d{5})-([a-z])([a-z])\\.png')
r8hN = ZbWC.match(tqKD, mWFP)
return (int(r8hN.group(1).replace('-', '')), r8hN.group(2), r8hN.group(3)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UxO0(mWFP):\n J0Mm = ZbWC.compile('(test_Mix_DPerc\\\\d+_c)_\\\\d+\\\\.dcm')\n tqKD = ZbWC.compile('(phMix\\\\d+)_c_\\\\d+\\\\.dcm')\n vWfB = ZbWC.match(J0Mm, mWFP)\n YwkG = ZbWC.match(tqKD, mWFP)\n if vWfB:\n return vWfB.group(1)\n elif YwkG:\n return YwkG.group(1)",
"def xdt... | [
"0.69995946",
"0.59270763",
"0.585687",
"0.5849255",
"0.58241343",
"0.5818852",
"0.5817447",
"0.57952887",
"0.57264644",
"0.5609189",
"0.5606017",
"0.55851305",
"0.5579976",
"0.55392224",
"0.5526402",
"0.54307795",
"0.5414436",
"0.54066575",
"0.53986466",
"0.5395876",
"0.5391... | 0.7537349 | 0 |
Create features from lines detected over a image dataset | def mGn5(jQ3Z):
bySB = jQ3Z.groupby(jQ3Z.index).apply(Oq3P)
return bySB.reset_index(level=1, drop=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b87Z(VXjJ, Nqlg):\n FTtL = oyIN.array(VXjJ)\n for o4D3, si3g, ajwV, skBL in Nqlg:\n XC5k.line(FTtL, (o4D3, si3g), (ajwV, skBL), (0, 0, 255), 10)\n return FTtL.astype(oyIN.uint8)",
"def bySB(YKHO):\n return [[zFiD.theta / oyIN.pi, zFiD.rho / max(YKHO.shape)] for zFiD in YKHO.lines]",
"def... | [
"0.6652724",
"0.66308784",
"0.6572735",
"0.6562122",
"0.6480553",
"0.6472731",
"0.644629",
"0.64063233",
"0.6405412",
"0.634234",
"0.6341078",
"0.6305178",
"0.6288213",
"0.625939",
"0.62507784",
"0.6242876",
"0.6239405",
"0.62299865",
"0.62292963",
"0.62207294",
"0.6205218",
... | 0.6579054 | 2 |
Set the quadrature order for the numerical integration scheme. | def J0nI(YKHO, S4zX, zn0c, T4Wy):
from optimus.utils.conversions import convert_to_positive_int
if S4zX.lower() in ('boundary', 'matrix'):
S4zX = 'boundary'
elif S4zX.lower() in ('potential', 'field'):
S4zX = 'potential'
elif S4zX.lower() in ('all', 'both'):
S4zX = 'all'
else... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def P2sc(YKHO, GRo3):\n YKHO.call('positionerQuadratureAxis', (GRo3, YKHO.axis_number))",
"def YkaN(YKHO, Fv2L):\n hewC = Fv2L.Get('quad_order_additional') + Fv2L.Get('order')\n iL8s = w1bK(ruleOrder=hewC)\n YKHO.ResizeWeights(len(iL8s.Weights))\n YKHO.ResizeNodes(len(iL8s.Nodes))\n YKHO.GetNod... | [
"0.6768573",
"0.59104055",
"0.56941694",
"0.56654286",
"0.55196714",
"0.5495884",
"0.5491093",
"0.5425382",
"0.54156613",
"0.5394188",
"0.5380256",
"0.5374578",
"0.53686565",
"0.52802867",
"0.5251686",
"0.52294064",
"0.5228958",
"0.5226486",
"0.5160183",
"0.5149228",
"0.51480... | 0.65255314 | 1 |
Returns position of the highest set bit of a number. | def vdrx(FGW3: int) -> int:
if not isinstance(FGW3, int):
raise TypeError("Input value must be an 'int' type")
dQgj = 0
while FGW3:
dQgj += 1
FGW3 >>= 1
return dQgj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wkta(mLGw):\n d6pt = 0\n while mLGw != 0:\n d6pt += 1\n mLGw >>= 1\n return d6pt",
"def fwAN(BWXx, vKkT=15 * 8):\n ZHfW = 1 << vKkT - 1\n MC_S = vKkT - 1\n while ZHfW != 0:\n if BWXx & ZHfW == 0:\n return MC_S\n ZHfW >>= 1\n MC_S -= 1\n retur... | [
"0.74294764",
"0.7260888",
"0.7045457",
"0.70137703",
"0.6696964",
"0.6652507",
"0.65232205",
"0.6497402",
"0.644452",
"0.6418335",
"0.6408496",
"0.632831",
"0.6259495",
"0.62537384",
"0.62203676",
"0.6196881",
"0.61930096",
"0.6096908",
"0.60199326",
"0.5988237",
"0.5956184"... | 0.8996798 | 0 |
Set the terminator to a realistic ``\\r\\n``, and prepare a dummy bad message to test what happens if the writing doesn't work correctly during the query | def FCbF(YKHO) -> None:
C52R.setUp(YKHO)
YKHO.terminator = '\r\n'
YKHO.communicator.termination_characters = YKHO.terminator
YKHO.bad_message = 'bad message' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def D2Op(YKHO):\n Mkmy = oGir(b'aaaa\\x00', declared_length=5, null_terminated=True)\n assert Mkmy.text == 'aaaa'",
"def oTQs(YKHO):\n YKHO.assertFalse(gnPz.valid_path('/invalid/\\r/path/'))",
"def _Elk(Ol8d: str, H0Xx: str) -> str:\n kUBT = ZbWC.match('^(.|\\\\n)*?(?={0})'.format(ZbWC.escape(H0Xx)... | [
"0.6921802",
"0.66186",
"0.6494489",
"0.6358582",
"0.6355077",
"0.6313389",
"0.6284333",
"0.61221534",
"0.6088013",
"0.6083237",
"0.60746455",
"0.60563225",
"0.6050309",
"0.60128057",
"0.60114485",
"0.59579015",
"0.5948563",
"0.59355384",
"0.5893426",
"0.5883174",
"0.58788884... | 0.0 | -1 |
Create a MongoDB index in a collection. Optionally, ignore errors related to the index already existing. | def Ctzs(xUwc, sjXb, DHIB=True, hJM7=True, **B2fa):
HyFA = 68
vpgf = 85
try:
xUwc.create_index(sjXb, **B2fa)
except DpgL.errors.OperationFailure as exc:
NgIe = []
if DHIB:
NgIe.append(HyFA)
if hJM7:
NgIe.append(vpgf)
if BQDi.code in NgIe:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def ensure_indexes(Emd4):\n for d6pt in Emd4.opts.indexes:\n B2fa = d6pt.document.copy()\n sjXb = [(G1Hx, Csk6) for G1Hx, Csk6 in B2fa.pop('key').items()]\n await Emd4.collection.create_index(sjXb, **B2fa)",
"def ACOY(YKHO, xUwc, qfYp):\n YKHO.db_in_use[xUwc].create_index([(qfYp,... | [
"0.7724306",
"0.72907484",
"0.72487575",
"0.70148563",
"0.6945731",
"0.6928528",
"0.67920387",
"0.67277545",
"0.67121184",
"0.66942495",
"0.6693203",
"0.66703224",
"0.66642404",
"0.66329986",
"0.65697104",
"0.65657926",
"0.6549161",
"0.6546245",
"0.6539678",
"0.65057427",
"0.... | 0.8114212 | 0 |
returns the maximum number of clusters based on distance matrix | def zJK_(YKHO, F_On):
SppC = YKHO.get_distance_matrix(F_On)
max = 0
for r8hN in SppC:
if max < oyIN.unique(r8hN).shape[0]:
max = oyIN.unique(r8hN).shape[0]
return max | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lrgt(SR3Y):\n XlLT = 2\n kMcB = 5\n while kMcB >= 4:\n C3ST = iI2p(n_clusters=XlLT, affinity='euclidean', linkage='ward')\n C3ST.fit(SR3Y)\n kMcB = min(mBkc(C3ST.labels_).values())\n XlLT += 1\n return XlLT - 2",
"def pDkJ(nrMl):\n OpKk = epAf.sqrt(EzjL.NB_NODES) / ... | [
"0.7442469",
"0.7349047",
"0.7105091",
"0.71034527",
"0.69461066",
"0.68981093",
"0.6853941",
"0.68483233",
"0.6794301",
"0.6772726",
"0.6710478",
"0.67037064",
"0.66601324",
"0.6610716",
"0.66032755",
"0.65717214",
"0.64858437",
"0.6483641",
"0.6456053",
"0.6451812",
"0.6440... | 0.79225147 | 0 |
find v from vectors that is closest to the center | def tWDK(YKHO, e6ux, F_On):
Tm2h = 100
G7Yk = None
for Ty9i in F_On:
if tFNH(Ty9i, e6ux) < Tm2h:
Tm2h = tFNH(Ty9i, e6ux)
G7Yk = Ty9i
return G7Yk | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KkOH(jzdc, Ty9i):\n yk4i = jzdc - Ty9i\n vXfG = XTiz.array([])\n for Csk6 in yk4i:\n vXfG = XTiz.append(vXfG, XTiz.linalg.norm(Csk6))\n d6pt = vXfG.argmin()\n return (d6pt, jzdc[d6pt])",
"def mp07(he6J, WKvO, LVAh, epBp):\n BHsk = oyIN.array([WKvO, LVAh, epBp])\n return oyIN.linal... | [
"0.75648123",
"0.7481699",
"0.7251147",
"0.72493374",
"0.72060484",
"0.7178935",
"0.7092623",
"0.7071679",
"0.7070415",
"0.692742",
"0.6904191",
"0.6901209",
"0.6869924",
"0.68164194",
"0.67742133",
"0.6770458",
"0.6755729",
"0.6755685",
"0.66833025",
"0.6657441",
"0.6657441"... | 0.79738873 | 0 |
Juno request handler to retrieve a batch of raw States from the DB by Name. | def tzvQ(QePW):
d9cS = QePW.raw['request_body_bytes'].read()
NArs = JhUR.decode(d9cS)
zb3C = NArs['client'] if 'client' in NArs else None
ZWCE = NArs['taba'] if 'taba' in NArs else None
rmyT = NArs['block'] if 'block' in NArs else None
if ZWCE and rmyT:
CJIk.status(400)
CJIk.appe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M6_7():\n if QePW.method == 'GET':\n rFyK = S8SU.all(wHLO)\n kPO7 = []\n for H5ew, BWXx in rFyK.items():\n kPO7.append(BWXx.to_dict)\n return pz3A(kPO7)",
"def SwtT(YKHO):\n xmW6 = []\n for QTBn in wspz.STATES:\n bo34.debug(f'Downloading {YKHO.slug} {YKH... | [
"0.63001895",
"0.6008676",
"0.5990608",
"0.59199613",
"0.590524",
"0.5798178",
"0.57640517",
"0.5755619",
"0.57539093",
"0.57168555",
"0.56629425",
"0.56258196",
"0.56096864",
"0.5609481",
"0.5530031",
"0.55216676",
"0.5514741",
"0.5507731",
"0.5502103",
"0.5501705",
"0.54858... | 0.5241208 | 49 |
Convert x to int if it has no trailing decimals. | def nMf1(WKvO):
if WKvO % 1 == 0:
WKvO = int(WKvO)
return WKvO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f2B6(WKvO: float) -> int:\n if not RAfo(WKvO):\n return int(WKvO)\n else:\n return int(WKvO)",
"def ANNp(WKvO):\n return int(round(WKvO))",
"def cJEq(WKvO: float) -> int:\n return int(WKvO)",
"def ANNp(WKvO):\n if WKvO > 0:\n return int(WKvO + 0.5)\n return int(WKvO... | [
"0.75891054",
"0.717667",
"0.70571774",
"0.69395316",
"0.6858336",
"0.6858336",
"0.683269",
"0.678238",
"0.66923314",
"0.66558963",
"0.6539212",
"0.65296346",
"0.6501197",
"0.64986",
"0.64549935",
"0.6417199",
"0.6358761",
"0.63491964",
"0.63221186",
"0.6306703",
"0.62771297"... | 0.6397757 | 16 |
Compute Root Mean Square of Errors. | def kmMN(RlRK, ENeO):
DK19 = Fyji(HUFt(RlRK) - HUFt(ENeO))
return PZyS(DK19.mean()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DF3U(YKHO):\n return oyIN.sqrt(YKHO.mean_squared_error())",
"def _td_(YKHO) -> float:\n return YKHO._call_java('rootMeanSquaredError')",
"def ewIN(LTIa):\n Qth0 = True\n if not Qth0:\n sum = 0\n for AU8u in LTIa.values():\n sum += pow(oyIN.abs(AU8u.get_pollution_value()... | [
"0.82600695",
"0.78081214",
"0.77237034",
"0.7515085",
"0.7512047",
"0.7499618",
"0.7456822",
"0.74492687",
"0.7440378",
"0.7362041",
"0.73340833",
"0.73340833",
"0.72616863",
"0.72341067",
"0.7161248",
"0.71395314",
"0.713727",
"0.7124048",
"0.7059867",
"0.70495456",
"0.7042... | 0.6349582 | 70 |
Add an adjacency in m | def rz7z(r8hN):
JxLs = len(r8hN.labels)
mrPm = []
for YRbF in range(JxLs):
for r845 in range(JxLs):
if r8hN.a[YRbF][r845] == 0:
mrPm.append((YRbF, r845))
if len(mrPm) == 0:
return r8hN
r8hN = jth9.deepcopy(r8hN)
Ny47, h1aW = tuKI.choice(mrPm)
XP5J ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fyP7(YKHO) -> B1ih:\n pass",
"def YLLr(YKHO):\n DDBf = oyIN.zeros((YKHO.num_nodes, YKHO.num_nodes))\n for D70y in YKHO.edges:\n DDBf[YKHO.nodes.index(D70y[0]), YKHO.nodes.index(D70y[1])] += 1\n DDBf[YKHO.nodes.index(D70y[1]), YKHO.nodes.index(D70y[0])] += 1\n YKHO.adjacency_matrix =... | [
"0.6898854",
"0.6791941",
"0.66333234",
"0.6588176",
"0.65421045",
"0.65356463",
"0.6437577",
"0.64108545",
"0.6401683",
"0.63730764",
"0.6359783",
"0.6337443",
"0.6313939",
"0.62897867",
"0.62843895",
"0.6282218",
"0.627038",
"0.6268177",
"0.62089556",
"0.6202618",
"0.619981... | 0.6694701 | 2 |
Does the head_form appear in any of the 5 preceding sentences or precedes this occurrence in the given sentence? | def KPiE(abdh, QyNI, FLXQ):
MKlR = QyNI.get_head_collins()
if MKlR.get_label() in ['PRP', 'CD', '.', 'QP', 'DT', '$', ',', "''", '``', 'NNP', 'NNPS']:
return None
V_wc = [v_nw(_vqW[0], tag=_vqW[1]) for _vqW in QyNI.get_root().get_word_tag_pairs()]
return abdh in [GIN8 for yAmx in FLXQ if yAmx fo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c6iB(yAmx):\n return len(yAmx) > 4",
"def qB2o(_dZy):\n global false_points, true_points\n LBQ_ = kdPk(_dZy)\n for GIN8 in LBQ_:\n if GIN8[1].startswith('V'):\n if GIN8[1] not in ['VBP', 'VBZ', 'VBG']:\n NUxO = NUxO + 1\n return False\n NuaN = Nu... | [
"0.6503925",
"0.63705665",
"0.6112096",
"0.6107808",
"0.6052568",
"0.6026375",
"0.59296936",
"0.57954216",
"0.57886606",
"0.5779709",
"0.577881",
"0.570708",
"0.56725955",
"0.5622832",
"0.561597",
"0.5614002",
"0.5591314",
"0.5589164",
"0.5581453",
"0.55558515",
"0.5549984",
... | 0.6441504 | 1 |
Does the head_form appear in any of the 5 preceding sentences or precedes this occurrence in the given sentence? | def Zzsi(abdh, QyNI, FLXQ):
MKlR = QyNI.get_head_collins()
if MKlR.get_label() in ['PRP', 'CD', '.', 'QP', 'DT', '$', ',', "''", '``']:
return None
V_wc = [v_nw(_vqW[0], tag=_vqW[1]) for _vqW in QyNI.get_root().get_word_tag_pairs()]
return abdh in [GIN8 for yAmx in FLXQ if yAmx for GIN8 in yAmx]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c6iB(yAmx):\n return len(yAmx) > 4",
"def KPiE(abdh, QyNI, FLXQ):\n MKlR = QyNI.get_head_collins()\n if MKlR.get_label() in ['PRP', 'CD', '.', 'QP', 'DT', '$', ',', \"''\", '``', 'NNP', 'NNPS']:\n return None\n V_wc = [v_nw(_vqW[0], tag=_vqW[1]) for _vqW in QyNI.get_root().get_word_tag_pai... | [
"0.65050477",
"0.6441605",
"0.63715005",
"0.6113268",
"0.6108034",
"0.6053728",
"0.5931532",
"0.57966673",
"0.5789734",
"0.57794553",
"0.57793736",
"0.5707552",
"0.56732005",
"0.5623668",
"0.5615818",
"0.56147707",
"0.55936676",
"0.5591502",
"0.55826855",
"0.55554277",
"0.555... | 0.60262007 | 6 |
Get item type from code. | def oXgU(Wxnj):
Lojf = {0: 'Zabbix agent', 1: 'SNMPv1 agent', 2: 'Zabbix trapper', 3: 'simple check', 4: 'SNMPv2 agent', 5: 'Zabbix internal', 6: 'SNMPv3 agent', 7: 'Zabbix agent (active)', 8: 'Zabbix aggregate', 9: 'web item', 10: 'external check', 11: 'database monitor', 12: 'IPMI agent', 13: 'SSH agent', 14: 'TE... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FRul(YKHO, Wxnj):\n PXGI = YKHO.get_unit(Wxnj)\n if PXGI:\n return PXGI['type']\n else:\n return None",
"def YwLH(YKHO):\n return YKHO.code",
"def eBH2(YKHO):\n YKHO.link.check_connection()\n oUZx = 'G_Item_Type'\n YKHO.link.send_line(oUZx)\n YKHO.link.send_item(YKHO)\... | [
"0.76524144",
"0.72174466",
"0.7111044",
"0.70739913",
"0.70352453",
"0.70341533",
"0.69915116",
"0.6967461",
"0.66543597",
"0.6611389",
"0.6552714",
"0.6499287",
"0.6488084",
"0.64507467",
"0.633861",
"0.6336689",
"0.6322121",
"0.63052547",
"0.628764",
"0.627863",
"0.627863"... | 0.8125714 | 0 |
Parse ONNX pooling operation attributes and produce an ngraph compatible pool_params dict. | def rv5K(vWye):
OM4u, u6Wc, Lev1 = pnt_(vWye)
opP6, q_AG, V8Mh = z38W(vWye)
SyoZ, A2bT, Qu1a = G7RY(vWye)
BNin, wxHa, sjF0 = (0, 1, 1)
if vWye.op_type in ['AveragePool', 'GlobalAveragePool']:
MNbw = 'avg'
elif vWye.op_type in ['MaxPool', 'GlobalMaxPool']:
MNbw = 'max'
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ek79(YKHO, Q6kx):\n BlLG = tF99('onnx')\n rpyW = dict()\n if not Q6kx:\n return rpyW\n for xC3W in Q6kx.attribute:\n mWFP = xC3W.name\n BWXx = BlLG.helper.get_attribute_value(xC3W)\n rpyW[mWFP] = BWXx\n return rpyW",
"def Bxv9(xqoZ):\n Gxxr = \"pooling_convention... | [
"0.58081174",
"0.55635947",
"0.55432236",
"0.54544044",
"0.54262257",
"0.5411718",
"0.5349007",
"0.53034586",
"0.5300444",
"0.5264896",
"0.52071416",
"0.52007693",
"0.51982933",
"0.50963104",
"0.509196",
"0.5041924",
"0.50343007",
"0.5028163",
"0.50196475",
"0.49694127",
"0.4... | 0.73257107 | 0 |
Expect the run failed with an exception of the given type and message from doc string | def jTe7(YPaw, AvfV):
assert YPaw.context.exit_code != 0, +"stdout from radish run: '{}':\n".format(' '.join(YPaw.context.command)) + YPaw.context.stdout.decode('utf-8')
assert Hy7s.path.exists(YPaw.context.failure_report_path), 'No Step Failure Report was written\n' + "stdout from radish run: '{}':\n".format('... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def w_ae():\n from arg_scraper import parse\n with trZe.raises(TypeError):\n parse('target')",
"def EUG7(YKHO):\n P1dF = w_3S('Failed to run command')\n assert hasattr(P1dF, 'msg')\n assert isinstance(P1dF.msg, str)\n raise P1dF",
"def BhdE(YKHO, bGrB):\n HCmI = 'valid-command'\n ... | [
"0.69124603",
"0.68641996",
"0.68379235",
"0.68051827",
"0.67632747",
"0.67371255",
"0.67316353",
"0.65801954",
"0.6569598",
"0.65637314",
"0.65506715",
"0.65505797",
"0.6542072",
"0.65154",
"0.65058863",
"0.6501238",
"0.64802134",
"0.6471147",
"0.64574766",
"0.6427191",
"0.6... | 0.7182924 | 0 |
Expect the given value at the given xpath in the given xml file | def mmEA(YPaw, rac8, jXNy, laNn):
LjlK = Hy7s.path.join(YPaw.context.ctx_dir, rac8)
J_Es = QGpr.parse(LjlK)
UqER = J_Es.xpath(laNn)
assert len(UqER) != 0, "Cannot find any elements at '{}'".format(laNn)
assert len(UqER) == 1, "Found multiple elements at '{}'. Expected exactly one.".format(laNn)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pD7M(YKHO):\n nPrm = YKHO.xml.find('2 + 3')\n YKHO.assertEqual(nPrm, 5.0)",
"def mXQq(YKHO):\n TpU3 = YKHO.xml.find('//bar')\n YKHO.assertIsNotNone(TpU3)\n TpU3 = TpU3.find('//foo')\n YKHO.assertIsNotNone(TpU3)",
"def IDPB(YKHO):\n TpU3 = YKHO.xml.find('//bar')\n YKHO.assertIsNotNon... | [
"0.68394345",
"0.6494754",
"0.6244466",
"0.6132046",
"0.61056167",
"0.6073944",
"0.5965328",
"0.59639186",
"0.59491",
"0.5946422",
"0.59042656",
"0.59019315",
"0.5856062",
"0.58361185",
"0.5807197",
"0.58010906",
"0.57506645",
"0.5728724",
"0.5724367",
"0.5685399",
"0.5601278... | 0.83619636 | 0 |
Return the current time in the server's timezone. | def D6EG():
return LgWF.now() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ApjM():\n return qcWV.now(Vsdc())",
"def vHj7(YKHO) -> str:\n Mkmy = G4JS.get(f'http://worldtimeapi.org/api/timezone/{YKHO.timezone}')\n vHj7 = Mkmy.json()['datetime']\n return vHj7",
"def vHj7() -> qcWV:\n return qcWV.now().astimezone()",
"def ApjM():\n qtKj = qcWV.datetime.now()\n ... | [
"0.8286445",
"0.8280153",
"0.8131383",
"0.8058853",
"0.7829772",
"0.7797013",
"0.77500826",
"0.7740941",
"0.77138966",
"0.7704569",
"0.7668428",
"0.7663569",
"0.75968415",
"0.75866485",
"0.75011915",
"0.7483754",
"0.74617624",
"0.7450132",
"0.74458563",
"0.7434671",
"0.743173... | 0.73029035 | 38 |
Returns tuple of two Vec3s, lower and upper bound of entity | def X7zS(YKHO):
return (SoA4(YKHO.__position.x - YKHO.__size.x / 2, YKHO.__position.y, YKHO.__position.z - YKHO.__size.z / 2), SoA4(YKHO.__position.x + YKHO.__size.x / 2, YKHO.__position.y + YKHO.__size.y, YKHO.__position.z + YKHO.__size.z / 2)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z9co(YKHO) -> AzJI[oyIN.ndarray, oyIN.ndarray]:\n eTFg = oyIN.zeros([YKHO.dim, 1])\n gUAk = oyIN.zeros([YKHO.dim, 1])\n for YRbF, Tohu in enumerate(YKHO.bounds):\n RCrN, rVKn = Tohu\n eTFg[YRbF] = RCrN\n gUAk[YRbF] = rVKn\n return (eTFg.T, gUAk.T)",
"def X7zS(YKHO):\n retu... | [
"0.74193084",
"0.72287935",
"0.698779",
"0.696905",
"0.6586124",
"0.65801007",
"0.65361583",
"0.65081644",
"0.65057707",
"0.650054",
"0.6480012",
"0.6463748",
"0.6459961",
"0.64510757",
"0.6448863",
"0.6391529",
"0.63804054",
"0.6366471",
"0.6359905",
"0.6341452",
"0.6315119"... | 0.62155217 | 27 |
Get the person id or cam from an image name. | def Tb5X(XVnG, HHK9='id'):
assert HHK9 in ('id', 'cam')
if HHK9 == 'id':
U5Jc = int(XVnG[:8])
else:
U5Jc = int(XVnG[9:13])
return U5Jc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hM8m(x0hE, mWFP):\n Yw_3 = x0hE.images.find(name=mWFP)\n if len(Yw_3) > 1:\n raise Exception('Oops, found multiple images with that name.')\n if len(Yw_3) == 0:\n return None\n return Yw_3[0].id",
"def nENL(mWFP):\n qx5c = list(ZWCE.get(mWFP.lower(), set()))\n if len(qx5c) == ... | [
"0.7203088",
"0.64500636",
"0.64500636",
"0.64500636",
"0.64500636",
"0.64500636",
"0.64500636",
"0.6423663",
"0.6365755",
"0.6358518",
"0.63309705",
"0.62866294",
"0.6260293",
"0.6245453",
"0.6217951",
"0.62040585",
"0.6197529",
"0.61961174",
"0.61846334",
"0.6173582",
"0.61... | 0.65453386 | 1 |
Create and configure an instance of the Flask application. | def LUif():
P4t4 = L2w0(__name__, instance_relative_config=True)
P4t4.config.from_mapping(SECRET_KEY='dev', UPLOAD_FOLDER='upload')
try:
Hy7s.makedirs(P4t4.instance_path)
except OSError:
pass
@P4t4.route('/hello')
def Wzeq():
return 'Hello, World!'
from karaoke impor... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def z_uJ():\n P4t4 = L2w0(__name__)\n P4t4.config.from_object(PSrQ)\n P4t4.config.from_object(Hy7s.environ.get('APP_SETTINGS'))\n return P4t4",
"def LUif() -> L2w0:\n GPtr = R4f_()\n HEBM = L2w0(__name__)\n if 'secret_key' in GPtr:\n HEBM.secret_key = GPtr['secret_key']\n else:\n ... | [
"0.8550397",
"0.84743637",
"0.83251774",
"0.8278745",
"0.82602733",
"0.8254964",
"0.82201624",
"0.82188565",
"0.8166124",
"0.8160089",
"0.8154347",
"0.8145555",
"0.8142754",
"0.81385297",
"0.81344086",
"0.81174666",
"0.8106935",
"0.8095177",
"0.80899566",
"0.80849236",
"0.808... | 0.81856257 | 8 |
Tests ``FilterStackBuffer`` return None for empty stack buffer. | def mCfV(YKHO):
U_uD = iY5R(frame_list=[])
YKHO.assertIsNone(dHs1.FilterStackBuffer(U_uD, [vd3C()])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nHoI(U_uD, KUnM):\n if epAf.isinf(U_uD.priority) or not U_uD.frames:\n return None\n for XmwD in KUnM:\n U_uD = XmwD(U_uD)\n if not U_uD:\n return None\n return U_uD",
"def xya8(YKHO):\n x2nk = [jB0b(0, 'src/', 'func', 'file0.cc', 'src/file0.cc', [32]), jB0b(0, 'sr... | [
"0.7471123",
"0.72382987",
"0.71400595",
"0.6542237",
"0.6502446",
"0.6475789",
"0.6430416",
"0.6373426",
"0.6317691",
"0.6227005",
"0.62123954",
"0.61692494",
"0.61570114",
"0.614801",
"0.61394894",
"0.61008316",
"0.6065072",
"0.60495585",
"0.6034793",
"0.60083115",
"0.60007... | 0.8668782 | 0 |
Converts a chess.Square representation to an (x, y) grid location in the current orientation | def yfEs(YKHO, Fyji: chess.Square, ae5p: bool=True) -> 'tuple[int, int]':
iVRZ = Fyji % Byma.NUM_TILES
rdlD = Byma.NUM_TILES - 1 - Fyji // Byma.NUM_TILES
if not ae5p:
iVRZ = Byma.NUM_TILES - iVRZ - 1
rdlD = Byma.NUM_TILES - rdlD - 1
return (iVRZ, rdlD) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z4PW(Fyji):\n return {0: (7, 0), 1: (7, 1), 2: (7, 2), 3: (7, 3), 4: (7, 4), 5: (7, 5), 6: (7, 6), 7: (7, 7), 8: (6, 0), 9: (6, 1), 10: (6, 2), 11: (6, 3), 12: (6, 4), 13: (6, 5), 14: (6, 6), 15: (6, 7), 16: (5, 0), 17: (5, 1), 18: (5, 2), 19: (5, 3), 20: (5, 4), 21: (5, 5), 22: (5, 6), 23: (5, 7), 24: (4, ... | [
"0.73517877",
"0.7281144",
"0.7281144",
"0.7281144",
"0.70943654",
"0.70883375",
"0.7044437",
"0.7039327",
"0.6950041",
"0.6875601",
"0.6861887",
"0.68597084",
"0.6819159",
"0.67799854",
"0.67632246",
"0.6732805",
"0.6728654",
"0.67134285",
"0.66760695",
"0.66124576",
"0.6606... | 0.714613 | 4 |
convert dataFrame from a csv file to a numpy array | def hcWc(lzjF, rdlD=slice(0, None, None), iVRZ=['clean_text', 'polarity']):
jQ3Z = CwDs.read_csv(otye)
JqJq = jQ3Z.loc[rdlD, iVRZ]
return JqJq.values | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gNnK(Ux0P):\n jQ3Z = rLdf.read_csv(Ux0P)\n return jQ3Z.to_numpy()",
"def gNnK(Ux0P):\n jQ3Z = rLdf.read_csv(Ux0P)\n return jQ3Z.to_numpy()",
"def ZAQi(qaEx: str) -> oyIN.ndarray:\n jzdc = []\n with open(qaEx, 'r') as Hnzf:\n ixsc = m6_J.reader(Hnzf)\n next(ixsc)\n for... | [
"0.7864679",
"0.78526866",
"0.7592658",
"0.73059416",
"0.73055923",
"0.7162808",
"0.71613103",
"0.71192175",
"0.7069977",
"0.7007961",
"0.69878775",
"0.6975068",
"0.68924004",
"0.68655604",
"0.6821474",
"0.68136513",
"0.6806774",
"0.67878544",
"0.67301637",
"0.6692579",
"0.66... | 0.78718406 | 0 |
return list of images with channels last and normalized intensities | def vJXQ(WKvO, xMux, RRbr, NkkI, CX33):
if not isinstance(WKvO, list) and (not (WKvO.ndim > 3 and (not RRbr))):
m0gQ = True
WKvO = [WKvO]
else:
m0gQ = False
pUPQ = len(WKvO)
if RRbr:
for YRbF in range(len(WKvO)):
if WKvO[YRbF].ndim < 3:
raise V... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NkkI(LNo8):\n return [WKvO / VvR1 for WKvO in LNo8]",
"def YfJQ(Yw_3):\n Yw_3 = Yw_3 - 128\n Yw_3 = XTiz.multiply(Yw_3, 1.0 / 255.0)\n return Yw_3",
"def jcdi():\n nLgt = '%s/images' % GPtr.ROOT_DIR\n Yw_3 = oyIN.zeros((GPtr.N_SAMPLES, GPtr.N_CHANNELS, 1000, 1000))\n _PsJ = []\n for... | [
"0.67170554",
"0.6565327",
"0.65032864",
"0.640852",
"0.64057004",
"0.6399794",
"0.63816345",
"0.6373475",
"0.6366167",
"0.6363208",
"0.6359713",
"0.6357497",
"0.63411385",
"0.6321553",
"0.6302255",
"0.6302255",
"0.629353",
"0.62786317",
"0.62756574",
"0.6256625",
"0.6249852"... | 0.60074747 | 60 |
get patch of size bsize x bsize with most masks | def WKFi(ZHfW, GicI=130):
qq3N, VKoo = ZHfW.shape
r8hN = oyIN.float32(ZHfW > 0)
r8hN = apUX(r8hN, GicI / 2)
LVAh, WKvO = oyIN.unravel_index(oyIN.argmax(r8hN), r8hN.shape)
pbi7 = max(GicI // 2, min(LVAh, qq3N - GicI // 2))
JHAC = max(GicI // 2, min(WKvO, VKoo - GicI // 2))
Po4F = [oyIN.arange... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def etRJ(VXjJ, TlDD, Uqbu, h_4H, SkJr, qWHh):\n r9Hf = 0\n Uz4j = CPun(VXjJ, h_4H, SkJr)\n Corv = MVjK.GetArrayFromImage(TlDD)\n xlij = MVjK.GetArrayFromImage(Uqbu)\n zNig = Uz4j.shape\n U64r = AKVf = fFp1 = None\n Bqhw = []\n for YRbF in range(1, zNig[0] - 1):\n ZHfW = xlij[YRbF]\n ... | [
"0.6694607",
"0.6362086",
"0.62531435",
"0.62164116",
"0.61779356",
"0.6122049",
"0.6122049",
"0.609515",
"0.6084457",
"0.60748816",
"0.6022449",
"0.5992032",
"0.5977291",
"0.5931693",
"0.5886335",
"0.58842856",
"0.587905",
"0.58504987",
"0.5837871",
"0.58205754",
"0.57941943... | 0.7142331 | 0 |
normalize each channel of the image so that so that 0.0=1st percentile and 1.0=99th percentile of image intensities optional inversion | def BtVk(VXjJ, jDK_=-1, CX33=False):
if VXjJ.ndim < 3:
raise ValueError('Image needs to have at least 3 dimensions')
VXjJ = VXjJ.astype(oyIN.float32)
VXjJ = oyIN.moveaxis(VXjJ, jDK_, 0)
for G1Hx in range(VXjJ.shape[0]):
if oyIN.ptp(VXjJ[G1Hx]) > 0.0:
VXjJ[G1Hx] = mO4a(VXjJ[G1... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mO4a(VXjJ):\n EcVT = VXjJ.copy()\n EcVT = (EcVT - oyIN.percentile(EcVT, 1)) / (oyIN.percentile(EcVT, 99) - oyIN.percentile(EcVT, 1))\n return EcVT",
"def Ekx3(WKvO):\n if oyIN.ndim(WKvO) == 3:\n YDR7 = oyIN.shape(WKvO)[0]\n elif oyIN.ndim(WKvO) == 4:\n YDR7 = oyIN.shape(WKvO)[1]\... | [
"0.80242765",
"0.796768",
"0.7662153",
"0.7642539",
"0.7516334",
"0.7516334",
"0.74867415",
"0.7472776",
"0.74213904",
"0.73586017",
"0.73127455",
"0.7283942",
"0.7280625",
"0.7261861",
"0.7257838",
"0.72503287",
"0.7250168",
"0.72485423",
"0.7247524",
"0.72203237",
"0.715827... | 0.7182901 | 20 |