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 |
|---|---|---|---|---|---|---|
The name of the detector model. | def b8uj(YKHO) -> qe4Y.Output[h8nf[str]]:
return qe4Y.get(YKHO, 'detector_model_name') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b8uj(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'detector_model_name')",
"def ZGE9(YKHO) -> str:\n return YKHO._device_info.model_name",
"def ZGE9(YKHO):\n return gaxy.string(YKHO._abilities.model).decode()",
"def mWFP(YKHO) -> str:\n return YKHO.data[VDgb]['model']",
"def mWFP... | [
"0.8522334",
"0.8188993",
"0.8070287",
"0.80196345",
"0.7834395",
"0.778019",
"0.7765294",
"0.7765294",
"0.7723985",
"0.7723985",
"0.76869464",
"0.76869464",
"0.76327413",
"0.7629691",
"0.7617606",
"0.7614163",
"0.7613789",
"0.755242",
"0.75487435",
"0.75045514",
"0.7483328",... | 0.86826 | 0 |
The ARN of the role that grants permission to AWS IoT Events to perform its operations. | def axXk(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'role_arn') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BDB0() -> str:\n TJZp = iVGz.client('sts')\n Z31E = TJZp.get_caller_identity()['Account']\n return f'arn:aws:iam::{Z31E}:role/{kxTZ()}'",
"def axXk(YKHO) -> str:\n return qe4Y.get(YKHO, 'role_arn')",
"def SNjk(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'access_role_arn')",
"de... | [
"0.77156425",
"0.73226273",
"0.7297916",
"0.7233467",
"0.7227878",
"0.7227878",
"0.7227878",
"0.7227878",
"0.7227878",
"0.7227878",
"0.7227878",
"0.7227878",
"0.7227878",
"0.7227878",
"0.7227878",
"0.7227878",
"0.7227878",
"0.7227878",
"0.7227878",
"0.7227878",
"0.7227878",
... | 0.72597206 | 3 |
An array of keyvalue pairs to apply to this resource. | def dJ1p(YKHO) -> qe4Y.Output[h8nf[bdIy['outputs.DetectorModelTag']]]:
return qe4Y.get(YKHO, 'tags') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lZBZ(YKHO):\n return Pbc4.keys(YKHO)",
"def azoT(YKHO):\n return {}",
"def o8Kj(YKHO):\n return dict(YKHO.__dict__)",
"def NURA(YKHO):\n return dict()",
"def hkxX(YKHO):\n return {d7pR.name: getattr(YKHO, d7pR.name) for d7pR in YKHO._args}",
"def A0zC(YKHO):\n return {'resource_buck... | [
"0.62136066",
"0.61935407",
"0.6150437",
"0.61122954",
"0.61113304",
"0.61103046",
"0.60933435",
"0.6088976",
"0.6046326",
"0.60413164",
"0.604069",
"0.6030783",
"0.6004779",
"0.59993136",
"0.59576553",
"0.5950659",
"0.5936195",
"0.5930758",
"0.5915258",
"0.5903809",
"0.59038... | 0.0 | -1 |
Minimum angle for total internal reflection at an interface. | def G06l(OAgx, MxXY, mghH=True):
lbHk = oyIN.arcsin(OAgx / MxXY)
if mghH:
return oyIN.degrees(lbHk)
return lbHk | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YylR(YKHO) -> float:\n try:\n return YKHO.lal[1]\n except AttributeError:\n return 0.0",
"def d8kR(YKHO):\n return YKHO.__start_angle",
"def X4me(YKHO):\n pass",
"def YylR(YKHO):\n try:\n return YKHO.distance_vector().angle\n except (AttributeError, TypeError, ZeroD... | [
"0.6164884",
"0.61188066",
"0.61142874",
"0.6086519",
"0.6015239",
"0.60108256",
"0.59828013",
"0.5979684",
"0.59505975",
"0.5949824",
"0.5940341",
"0.5939811",
"0.59390235",
"0.5905228",
"0.5889669",
"0.5854172",
"0.5852373",
"0.5844352",
"0.5828341",
"0.5809492",
"0.5808732... | 0.0 | -1 |
Compute the characteristic matrix M_j^p for a layer of a material stack and ppolarized light. Uses (4.49) to compute (4.55) from BYU optics book, edition 2015 | def O4ie(w4rS, Csk6, exwG, q7In):
G1Hx = 2 * oyIN.pi * exwG / w4rS
sSN_ = oyIN.cos(q7In)
UqYS = G1Hx * Csk6 * sSN_
N3xq, BoSh = (oyIN.sin(UqYS), oyIN.cos(UqYS))
HPKV = -1j * N3xq * sSN_ / exwG
ksua = -1j * exwG * N3xq / sSN_
return oyIN.asarray([[BoSh, HPKV], [ksua, BoSh]]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MeVC(OAgx, z9RD, LPwa, XshN, T0xl):\n mnsd = oyIN.cos(z9RD)\n OpKk = 1 / (2 * OAgx * mnsd)\n itg4 = oyIN.asarray([[OAgx, mnsd], [OAgx, -mnsd]])\n if len(LPwa) > 1:\n s404 = Pusg(oyIN.matmul, LPwa)\n else:\n s404 = LPwa[0]\n if hasattr(T0xl, '__len__') and len(T0xl > 1):\n ... | [
"0.5800104",
"0.5717862",
"0.5562443",
"0.5559256",
"0.54956895",
"0.54833627",
"0.54719543",
"0.5466661",
"0.54496336",
"0.5428336",
"0.5401763",
"0.5398649",
"0.5386406",
"0.5346945",
"0.53368884",
"0.5327476",
"0.53018075",
"0.52739495",
"0.52687997",
"0.5263811",
"0.52567... | 0.0 | -1 |
Compute rtot, the equivalent total fresnel coefficient for a multilayer stack. | def K684(CKEK):
return CKEK[..., 1, 0] / CKEK[..., 0, 0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kmu_(YKHO) -> float:\n return YKHO._leaf_sum",
"def kmu_(YKHO) -> float:\n return YKHO._leaf_sum",
"def bPzy(YKHO, CIn9, AhCl):\n Vy6k = YKHO.param(CIn9)[0]\n R5q2 = YKHO.param(AhCl)[0]\n OLEa = YKHO.corr(CIn9, AhCl)\n return KQGe.Ostap.Math.sum(Vy6k, R5q2, OLEa)",
"def hiKv(YKHO):\n ... | [
"0.5923297",
"0.5923297",
"0.5827022",
"0.5789433",
"0.5594215",
"0.5580127",
"0.55680007",
"0.5499897",
"0.5471641",
"0.5413814",
"0.5406845",
"0.5337834",
"0.53257895",
"0.5322401",
"0.5302639",
"0.53002226",
"0.52987057",
"0.52950525",
"0.5283658",
"0.5280052",
"0.5246423"... | 0.57374525 | 4 |
Converts camel to snake case When applied to a `dict` only keys will be effected. | def Ee9n(BWXx: Union[str, dict]) -> uLKX[str, dict]:
if type(BWXx) == str:
BWXx = ZbWC.sub('(.)([A-Z][a-z]+)', '\\1_\\2', BWXx)
return ZbWC.sub('([a-z0-9])([A-Z])', '\\1_\\2', BWXx).lower()
if type(BWXx) == dict:
return hl16(BWXx, Ee9n) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def STDY(YKHO):\n nPrm = {'snake_case_key': 'snake_case_value', '_key': 'ignore_key_value'}\n cTtB = BfDw.convert_snakecase_to_camelcase(nPrm)\n Clec = {'snakeCaseKey': 'snake_case_value', '_key': 'ignore_key_value'}\n YKHO.assertEqual(Clec, cTtB)",
"def kawd(YKHO, jXCX):\n fRx6 = {}\n for YRbF... | [
"0.75661683",
"0.75175035",
"0.74348587",
"0.7394255",
"0.73770887",
"0.7274957",
"0.717135",
"0.7119187",
"0.7009346",
"0.69302815",
"0.69004345",
"0.67535",
"0.67220694",
"0.67210543",
"0.6712204",
"0.66549546",
"0.6632173",
"0.6625506",
"0.6604996",
"0.65749675",
"0.654034... | 0.7365157 | 5 |
The id of the creator request. | def yS94(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'creator_request_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i1u8(YKHO):\n return YKHO.__creator_id",
"def gTi_(YKHO):\n return YKHO.new_id()",
"def TyZb(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'requestor_id')",
"def gTi_(YKHO):\n return YKHO.tournament_data.generate_id_counter()",
"def TyZb(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y... | [
"0.82919323",
"0.7857397",
"0.7588731",
"0.7343502",
"0.7333546",
"0.7318098",
"0.7318098",
"0.73153245",
"0.7259053",
"0.7259053",
"0.72504634",
"0.7243252",
"0.719636",
"0.7183477",
"0.7183477",
"0.7123586",
"0.70749205",
"0.70611316",
"0.69941604",
"0.69842654",
"0.6961046... | 0.86823416 | 0 |
Simply draw the sprite. | def JmFt(YKHO):
YKHO.sprite.draw() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PbOH(rGpw: int) -> None:\n pass",
"def JmFt(YKHO, Vjhr):\n Vjhr.blit(YKHO.sprite, (YKHO.x + YKHO.w / 2 - YKHO.sprite.get_width() / 2, YKHO.y + YKHO.h / 2 - YKHO.sprite.get_height() / 2))",
"def JmFt(YKHO, R4Ic):\n R4Ic.blit(YKHO.sprite, (YKHO.position.x, YKHO.position.y))",
"def JmFt(YKHO):\n ... | [
"0.8468507",
"0.81657076",
"0.8096157",
"0.7945069",
"0.7888284",
"0.7862964",
"0.7778876",
"0.76491016",
"0.7576033",
"0.7549602",
"0.75268626",
"0.7491189",
"0.7444194",
"0.7428659",
"0.73893964",
"0.73788136",
"0.7326853",
"0.7281801",
"0.72715485",
"0.72387826",
"0.722530... | 0.86854464 | 0 |
Initialise a newly created bullet. Assumes that the starting y coordinate is the height of the Player plus the scaled height of a bullet (because the anchor is at the top). | def FIMM(YKHO, QOxj):
super(GBVa, YKHO).__init__(x_pos=QOxj, y_pos=mVZ4.image.height + YKHO.image.height * YKHO.scale) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, tJm0, Vjhr, oeTy):\n \"\"\"Create a bullet object at the given alien's current position.\"\"\"\n super().__init__()\n YKHO.screen = Vjhr\n YKHO.rect = a9eO.Rect(0, 0, tJm0.bullet_width, tJm0.bullet_height)\n YKHO.rect.centerx = oeTy.rect.centerx\n YKHO.rect.top = oeTy.rect.bottom\n... | [
"0.8055737",
"0.7699363",
"0.7635702",
"0.7608776",
"0.7594653",
"0.75694966",
"0.7491011",
"0.74408436",
"0.7384344",
"0.73627573",
"0.73551625",
"0.7333226",
"0.7328983",
"0.7324759",
"0.73151636",
"0.7312639",
"0.7223052",
"0.7037709",
"0.7006276",
"0.7003802",
"0.6999423"... | 0.78994095 | 1 |
Fire a bullet! Uses the window variable to add a bullet into the list managed by the main game window. | def _7VR(YKHO):
YKHO.window.bullets.append(GBVa(YKHO.sprite.x + YKHO.sprite.width / 2)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hy9P(YKHO):\n pass",
"def s2E3(YKHO):\n jbub = GBVa(YKHO)\n YKHO.bullets.add(jbub)",
"def s2E3(YKHO):\n jbub = GBVa(YKHO)\n YKHO.bullets.add(jbub)",
"def s2E3(YKHO):\n if YKHO.__total_bullets > 0:\n jbub = GBVa(YKHO.__screen, YKHO.__ship)\n YKHO.__bullets.add(jbub)\n ... | [
"0.7958843",
"0.7944383",
"0.79122484",
"0.7904926",
"0.7712952",
"0.7670207",
"0.7648698",
"0.7623669",
"0.762294",
"0.76208556",
"0.76206326",
"0.7612839",
"0.7610147",
"0.760377",
"0.7601304",
"0.75921744",
"0.75702965",
"0.7539205",
"0.75381315",
"0.7537324",
"0.75080085"... | 0.79491466 | 1 |
Return a string based on hazardous boolean value. | def W7FW(YKHO):
if YKHO.hazardous:
return 'is potentially hazardous'
else:
return 'is not potentially hazardous' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PAwx(Fg_i):\n return 'true' if Fg_i else 'false'",
"def NSqi(I1mm):\n return 'true' if I1mm else 'false'",
"def XEI0(wEf2):\n return 'true' if wEf2 else 'false'",
"def VYWp(WKvO):\n return 'T' if WKvO else 'F'",
"def NSqi(bool):\n return 'Yes' if bool else 'No'",
"def LzVg(YKHO, Fg_i):... | [
"0.80936664",
"0.78684944",
"0.78464365",
"0.7803006",
"0.77711475",
"0.7752313",
"0.77318454",
"0.77034324",
"0.7594821",
"0.7585494",
"0.7550412",
"0.7543786",
"0.7535346",
"0.74259263",
"0.7402258",
"0.7392427",
"0.7373962",
"0.7363453",
"0.7291609",
"0.7265117",
"0.725284... | 0.0 | -1 |
Return String representation of object. | def zAg0(YKHO):
return f'A NearEarthObject, {YKHO.fullname}, has a diameterof {round(YKHO.diameter, 3)} km and {YKHO.hazard_msg}.' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO) -> str:\n return lSJJ(YKHO)",
"def zAg0(YKHO):\n return YKHO.object_repr",
"def yLCI(YKHO):\n return YKHO.__str__()",
"def yLCI(YKHO):\n return YKHO.__str__()",
"def zAg0(YKHO):\n return str(YKHO.obj)",
"def zAg0(YKHO):\n return str(YKHO.serialize())",
"def yLCI(YKHO):\... | [
"0.8406074",
"0.8343826",
"0.8208873",
"0.8197115",
"0.81580293",
"0.8119858",
"0.80971867",
"0.80971867",
"0.80693895",
"0.80321866",
"0.80215126",
"0.8003081",
"0.79916525",
"0.79628706",
"0.79628706",
"0.79628706",
"0.79581726",
"0.79581726",
"0.79540527",
"0.7950786",
"0.... | 0.0 | -1 |
Return String representation of object. | def zAg0(YKHO):
return f'At {YKHO.time_str}, {YKHO.neo.fullname}approaches Earth at a distance of {round(YKHO.distance, 2)}au and a velocity of {round(YKHO.velocity, 2)} km/s.' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO) -> str:\n return lSJJ(YKHO)",
"def zAg0(YKHO):\n return YKHO.object_repr",
"def yLCI(YKHO):\n return YKHO.__str__()",
"def yLCI(YKHO):\n return YKHO.__str__()",
"def zAg0(YKHO):\n return str(YKHO.obj)",
"def zAg0(YKHO):\n return str(YKHO.serialize())",
"def yLCI(YKHO):\... | [
"0.8406074",
"0.8343826",
"0.8208873",
"0.8197115",
"0.81580293",
"0.8119858",
"0.80971867",
"0.80971867",
"0.80693895",
"0.80321866",
"0.80215126",
"0.8003081",
"0.79916525",
"0.79628706",
"0.79628706",
"0.79628706",
"0.79581726",
"0.79581726",
"0.79540527",
"0.7950786",
"0.... | 0.0 | -1 |
Create and return environment to work with. | def I0_M(cuiw, ZGE9, ylfq):
sYuu = cuiw.browse('file_import.backend', ylfq)
sEAN = zAej(sYuu, cuiw, ZGE9)
return sEAN | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ROSy(YKHO):\n sEAN = zAej(YKHO, YKHO._environment_counter)\n YKHO._environment_counter += 1\n return sEAN",
"def xwQb():\n\n def PPff():\n sEAN = ch3p.make(I6G3).env\n return sEAN\n return PPff",
"def I0_M():\n return zGKt.create_environment()",
"def ZTM3():\n return i9... | [
"0.8147055",
"0.75893617",
"0.74710184",
"0.74316174",
"0.7292814",
"0.7285041",
"0.7253464",
"0.7214961",
"0.7164177",
"0.7149377",
"0.71355796",
"0.71355796",
"0.7044255",
"0.7035098",
"0.6979537",
"0.69758755",
"0.6968764",
"0.6967015",
"0.6950272",
"0.689115",
"0.6878579"... | 0.0 | -1 |
Take a path relative to task_outdir, and make it relative to the build_root | def tiDb(XP5J):
return Hy7s.path.relpath(Hy7s.path.join(fH4E, XP5J), YKHO.build_root) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SfyY(I7OS) -> GkAb:\n Aofo = I7OS / 'build'\n Aofo.mkdir(exist_ok=True)\n return Aofo",
"def jfl5(YKHO):\n return Hy7s.path.join('${genfiles-outdir}/' + YKHO.getBuildDirectory(), '${version-subdir}')",
"def ztRF(**B2fa):\n return Hy7s.path.join(B2fa.get('root_folder_out', '.'))",
"def yGYY... | [
"0.6662463",
"0.64518064",
"0.6362639",
"0.6222335",
"0.61727196",
"0.6126804",
"0.6104925",
"0.61003256",
"0.6062392",
"0.60589725",
"0.6051023",
"0.6019927",
"0.5995775",
"0.5983031",
"0.595856",
"0.59552735",
"0.59537256",
"0.5910399",
"0.5896376",
"0.5881161",
"0.58657444... | 0.6317294 | 3 |
Return API account_type information. | def dhPZ(YKHO) -> A3Nt:
if YKHO.api_rate_limit == 60:
return A3Nt.PERSONAL
if YKHO.api_rate_limit == 5:
return A3Nt.PROFESSIONAL
return A3Nt.PUBLIC | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dhPZ(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'account_type')",
"def dhPZ(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'account_type')",
"def dhPZ(YKHO):\n return YKHO._account_type",
"def dhPZ(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'account_type')",
"def dhP... | [
"0.80750567",
"0.8045114",
"0.7976282",
"0.783386",
"0.783386",
"0.78169614",
"0.768745",
"0.7638708",
"0.7418392",
"0.7196999",
"0.71236414",
"0.70709145",
"0.69658387",
"0.69658387",
"0.6949398",
"0.6874018",
"0.66967267",
"0.66415995",
"0.659809",
"0.6580157",
"0.6580157",... | 0.7681543 | 7 |
Initialize rate limit object from response. | def qN71(Emd4, geh0: ClientResponse) -> liaQ:
qoqK = int(geh0.headers['X-Ratelimit-Limit'])
pQ4c = int(geh0.headers['X-Ratelimit-Period'])
OAwr = int(geh0.headers.get('X-Ratelimit-Remaining', 0))
if 'X-Ratelimit-Retry-At' in geh0.headers:
ntfG = qcWV.fromisoformat(geh0.headers['X-Ratelimit-Retry... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qN71(_hkX):\n return agkl.from_ignorance().update(_hkX)",
"def QdZT(YKHO, _hkX):\n YKHO._limit = int(_hkX.headers.get('X-RATE-LIMIT-LIMIT', YKHO._limit))\n YKHO._remaining = int(_hkX.headers.get('X-RATE-LIMIT-REMAINING', YKHO._remaining))\n YKHO._reset_time = int(_hkX.headers.get('X-RATE-LIMIT-RE... | [
"0.8402267",
"0.71126825",
"0.6740587",
"0.6708841",
"0.6609085",
"0.6609085",
"0.6491507",
"0.64788187",
"0.6389503",
"0.62790465",
"0.6277032",
"0.61898685",
"0.6167166",
"0.6070363",
"0.60362726",
"0.6018873",
"0.5993351",
"0.5991149",
"0.59865",
"0.5978892",
"0.59773165",... | 0.79629713 | 1 |
returns True if two atoms are hbonded with a popular geometric definition d(O..O) = 3.5 and A(HOO) < 30' | def OnTH(R4ah, hQUT, aixJ, WFmH=3.5, JhaL=30.0):
from numpy import arccos
from numpy.linalg import norm
if not 'O' in hQUT.ffType or not 'O' in aixJ.ffType:
return False
Csk6 = oyIN.array([hQUT.x, hQUT.y, hQUT.z])
jzdc = oyIN.array([aixJ.x, aixJ.y, aixJ.z])
if 1e-05 < kTwQ.pbc_dist(jzdc,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def neZK(R4ah, hQUT, aixJ, WFmH=2.2):\n if not 'O' in hQUT.ffType or not 'O' in aixJ.ffType:\n return False\n Csk6 = oyIN.array([hQUT.x, hQUT.y, hQUT.z])\n jzdc = oyIN.array([aixJ.x, aixJ.y, aixJ.z])\n if R4ah.CRYSTX:\n mURk = R4ah.CRYSTX[:3]\n else:\n mURk = 0\n for Xc69 in ... | [
"0.76300895",
"0.6520181",
"0.6348227",
"0.63338274",
"0.6217144",
"0.6148652",
"0.6110121",
"0.6097057",
"0.608146",
"0.6065241",
"0.6054323",
"0.5936707",
"0.5929589",
"0.586089",
"0.5844806",
"0.5838691",
"0.58318436",
"0.58152634",
"0.5769105",
"0.57466334",
"0.57177997",... | 0.78084123 | 0 |
Get the number 2^`exponent` as a string. | def u5A0(w520: int) -> str:
FGW3 = '1'
for bGrB in range(w520):
FGW3 = v5zj([FGW3, FGW3])
return FGW3 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LE6Y(vIwR, w520):\n if isinstance(vIwR, str) and isinstance(w520, int):\n if w520 < 1:\n raise ValueError\n elif w520 == 1:\n return vIwR\n else:\n return vIwR + '^' + str(w520)\n else:\n raise TypeError",
"def kty2(mLGw: Number) -> str:\n ... | [
"0.71224344",
"0.6810262",
"0.6622083",
"0.655463",
"0.650868",
"0.6169259",
"0.608609",
"0.60432994",
"0.59901756",
"0.5980499",
"0.5945051",
"0.5928096",
"0.59180915",
"0.5889236",
"0.5888984",
"0.58541524",
"0.5823261",
"0.5809588",
"0.5799442",
"0.57732093",
"0.5764074",
... | 0.75686276 | 0 |
Converts api endpoint to mTLS endpoint. Convert ".sandbox.googleapis.com" and ".googleapis.com" to ".mtls.sandbox.googleapis.com" and ".mtls.googleapis.com" respectively. | def Bvbt(I6gc):
if not I6gc:
return I6gc
Nfcn = ZbWC.compile('(?P<name>[^.]+)(?P<mtls>\\.mtls)?(?P<sandbox>\\.sandbox)?(?P<googledomain>\\.googleapis\\.com)?')
r8hN = Nfcn.match(I6gc)
mWFP, e3iS, TtgT, lhgC = r8hN.groups()
if e3iS or not lhgC:
return I6gc
if TtgT:
return ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gn8I(Emd4, FbeO: Optional[client_options_lib.ClientOptions]=None):\n if FbeO is None:\n FbeO = ZbB_.ClientOptions()\n fRRL = Hy7s.getenv('GOOGLE_API_USE_CLIENT_CERTIFICATE', 'false')\n eU_O = Hy7s.getenv('GOOGLE_API_USE_MTLS_ENDPOINT', 'auto')\n if fRRL not in ('true', 'false'):\n rai... | [
"0.57101",
"0.57101",
"0.57101",
"0.57101",
"0.5271469",
"0.52162975",
"0.5210008",
"0.5199021",
"0.5101602",
"0.5083639",
"0.4995904",
"0.49167466",
"0.49150556",
"0.4885195",
"0.48567313",
"0.48527935",
"0.48421147",
"0.48041224",
"0.47960633",
"0.4761097",
"0.4754505",
"... | 0.75491565 | 1 |
Creates an instance of this client using the provided credentials file. | def eWUZ(Emd4, Ux0P: str, *qIxc, **B2fa):
Vt89 = zOZf.Credentials.from_service_account_file(Ux0P)
B2fa['credentials'] = Vt89
return Emd4(*qIxc, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def adK6(Emd4, *, bD7m: str, NtEF: Union[str, StrStorage], jTXt: Union[str, StrStorage], emKz: Optional[FileTransfer]=None) -> i9zE:\n return i9zE(client=WX3b.from_credentials(url=bD7m, username=NtEF, password=jTXt), file_transfer=emKz)",
"def vuB2(Nu1S=None, QpfX=None, mwuo=None, MYjm=None, QDug=None, NtEF=N... | [
"0.7249915",
"0.7053171",
"0.68975395",
"0.68081045",
"0.6802571",
"0.6738844",
"0.67199385",
"0.6675532",
"0.6660721",
"0.6660721",
"0.6660721",
"0.6660721",
"0.6660721",
"0.6646984",
"0.6643617",
"0.66432035",
"0.66432035",
"0.66432035",
"0.6623292",
"0.6605768",
"0.6520598... | 0.6666354 | 8 |
Returns a fullyqualified location string. | def UxUL(bNKA: str, Rci7: str) -> str:
return 'projects/{project}/locations/{location}'.format(project=bNKA, location=Rci7) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hbd3(YKHO) -> str:\n raise NotImplementedError()",
"def PrXH(YKHO):\n raise NotImplementedError",
"def aYU_(YKHO) -> str:\n return '???' if YKHO.location is None else YKHO.location.gnu_style_repr(relative=True)",
"def xkW5(m6Me):\n a1PO = ZbWC.findall('\\\\n(?i)location:\\\\s*(.*)\\\\r\\\\s*'... | [
"0.7628572",
"0.7587895",
"0.7518726",
"0.74279094",
"0.734031",
"0.734031",
"0.73248327",
"0.73233604",
"0.72983885",
"0.72983885",
"0.72983885",
"0.72983885",
"0.72983885",
"0.72983885",
"0.72983885",
"0.72983885",
"0.72983885",
"0.72983885",
"0.72983885",
"0.72983885",
"0.... | 0.0 | -1 |
r"""Gets a single Uptime check configuration. | def J9Ta(YKHO, QePW: Optional[Union[uptime_service.GetUptimeCheckConfigRequest, dict]]=None, *, mWFP: Optional[str]=None, ZFzw: OptionalRetry=uMLX.method.DEFAULT, vYBr: Union[float, object]=uMLX.method.DEFAULT, yIVm: Sequence[Tuple[str, str]]=()) -> DCor.UptimeCheckConfig:
RRHz = any([mWFP])
if QePW is not None... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fo2a(YKHO):\n return YKHO.__uptime",
"def tgzD(Emd4):\n GPtr = Emd4.get_by_id(Emd4.STRING_ID)\n if not GPtr:\n return Emd4.refetch()\n if GPtr.last_modified - qcWV.now() > fCoM(Emd4.REFRESH_LATENCY):\n return Emd4.refetch()\n return GPtr",
"def tgzD(YKHO):\n tyNF = YKHO._con... | [
"0.6154005",
"0.60462743",
"0.5980112",
"0.5975417",
"0.5943301",
"0.59288543",
"0.5859021",
"0.58266145",
"0.5758848",
"0.57562983",
"0.56457525",
"0.55722934",
"0.55693114",
"0.5565236",
"0.55645925",
"0.55378354",
"0.5526084",
"0.5500666",
"0.54954606",
"0.5491264",
"0.544... | 0.6119166 | 1 |
This method is invoked when the Tree() constructor method is invoked to instantiate a new instance of class Tree. self is bound to the newly created bare object, and then __init__ initializes the initial state of the object. All objects contain a dictionary that is used to store its attributes (instance variables). You... | def FIMM(YKHO, afYC=None):
if afYC is None:
YKHO._children = []
else:
YKHO._children = afYC
if not all([type(a1PO) is type(YKHO) for a1PO in YKHO._children]):
raise ValueError('Not every child is-a {}'.format(type(YKHO)))
mEhG = set()
for YRbF, Z9rn in enumerate(YKHO._childre... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n YKHO._names = {}\n YKHO._names['root'] = '0'\n YKHO._tree = {}\n tk5Y = YKHO.TreeNode('0', 'root', '0')\n YKHO._tree = {'0': tk5Y}",
"def FIMM(YKHO, J_Es):\n YKHO.tree = J_Es",
"def FIMM(YKHO):\n super(UD_O, YKHO).__init__()\n YKHO.type == 'tree'\n YKHO.__items = {}... | [
"0.7830112",
"0.74644005",
"0.74450433",
"0.7395586",
"0.73364747",
"0.73364747",
"0.7325643",
"0.7248782",
"0.7243698",
"0.7243698",
"0.7133902",
"0.7089935",
"0.7089935",
"0.7089935",
"0.7089935",
"0.7088273",
"0.70850885",
"0.7084044",
"0.7084044",
"0.7084044",
"0.7084044"... | 0.0 | -1 |
Checks whether `url` is a valid URL. | def cCJC(bD7m):
U5Jc = KVWQ(bD7m)
return U5Jc.netloc == 'www8.hp.com' and U5Jc.scheme == 'https' and bool(ZbWC.search('.html$', U5Jc.path.split('/')[-1])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yaqE(bD7m):\n return True if f8eG.match(bD7m) else False",
"def SGVO(bD7m):\n aBkf = _FIc.URLValidator()\n try:\n aBkf(bD7m)\n except _FIc.ValidationError:\n return False\n else:\n return True",
"def Sxk4(bD7m):\n if not ZbWC.search('^(http|https|ftp)' + '\\\\://[a-z0... | [
"0.8939179",
"0.8780518",
"0.87553483",
"0.86886775",
"0.86520433",
"0.86460173",
"0.8619089",
"0.85934895",
"0.8589099",
"0.8505128",
"0.8439438",
"0.8439245",
"0.8436709",
"0.8436638",
"0.8415732",
"0.8406938",
"0.83978635",
"0.83957845",
"0.8382483",
"0.83688885",
"0.83594... | 0.74644655 | 100 |
A generator function that iterates through lst in batches. Each batch is of size n except possibly the last batch, which may be of size less than n. | def eHxA(yv6U, exwG):
for YRbF in range(0, len(yv6U), exwG):
yield yv6U[YRbF:YRbF + exwG] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nJ0e(OxJJ, exwG=10):\n fIb3 = len(OxJJ)\n for cXyw in range(0, fIb3, exwG):\n yield list(OxJJ[cXyw:min(cXyw + exwG, fIb3)])",
"def nJ0e(OxJJ, exwG=10):\n fIb3 = len(OxJJ)\n for cXyw in range(0, fIb3, exwG):\n yield list(OxJJ[cXyw:min(cXyw + exwG, fIb3)])",
"def inEx(vC9B, exwG):\n... | [
"0.8097996",
"0.8097996",
"0.7938791",
"0.77203476",
"0.7708408",
"0.7708408",
"0.7664759",
"0.7628095",
"0.7627777",
"0.762176",
"0.762176",
"0.762176",
"0.762176",
"0.762176",
"0.76196015",
"0.7616139",
"0.7616139",
"0.7616139",
"0.7614944",
"0.761475",
"0.7613029",
"0.76... | 0.7594124 | 31 |
Returns a path to the given file | def pmON(YKHO, Ux0P, Qth0=False):
if not Ux0P:
return None
if Hy7s.path.isabs(Ux0P):
pmON = Ux0P
else:
pmON = Hy7s.path.join(YKHO.job_dir, Ux0P)
if Qth0:
pmON = Hy7s.path.relpath(pmON, x0PB('jobs_dir'))
return str(pmON).replace('\\', '/') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nUeQ(pmON):\n return Hy7s.path.abspath(pmON)",
"def OyQC(nUeQ):\n return str(gzes('..', 'raw_data', nUeQ))",
"def OyQC(nUeQ):\n BJCG = Hy7s.path.dirname(Hy7s.path.abspath(xAKo))\n EY3W = Hy7s.path.join(BJCG, nUeQ)\n return EY3W",
"def _91M(Ux0P: str):\n return str(GkAb(xAKo).parent / Gk... | [
"0.80863625",
"0.80421233",
"0.8038827",
"0.7835259",
"0.7756408",
"0.7756084",
"0.77137905",
"0.76539564",
"0.7631417",
"0.7631417",
"0.75887024",
"0.7566904",
"0.7549476",
"0.754939",
"0.7495948",
"0.74785054",
"0.74785054",
"0.7468309",
"0.74132335",
"0.740827",
"0.7405279... | 0.68870336 | 90 |
Extracts the complete set of labels from the stored multi_label_data. | def Umo8(k81W):
EZMw = k81W['generated_fields']
ODRk = EZMw[str(k81W['objective_column'])]
return [nAB6[0] for nAB6 in ODRk] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def txO9(YKHO):\n Crrw = []\n EYTZ = []\n for yHil in YKHO.list_IDs:\n EYTZ.append(yHil)\n Crrw.append(YKHO.labels[yHil])\n Crrw = oyIN.array(Crrw)\n return (Crrw, EYTZ)",
"def tLRR(YKHO, Ux0P, svPB):\n print('Extracting labels from: ', Ux0P)\n with lGU7.open(Ux0P) as pdca:\n ... | [
"0.7067919",
"0.69177026",
"0.68140316",
"0.6807112",
"0.6673096",
"0.6656381",
"0.6642235",
"0.6621714",
"0.6602692",
"0.65961504",
"0.65788025",
"0.6555924",
"0.65130496",
"0.65101975",
"0.64299196",
"0.6424502",
"0.6424502",
"0.6421871",
"0.6418511",
"0.6418511",
"0.641277... | 0.74040806 | 0 |
Creates a JSON response that contains status code (HTTP), an arbitrary message string, and a dictionary or list of data | def Dr2G(jGRS, Ol8d, nPrm=None):
if isinstance(nPrm, dict) and 'results' in nPrm:
nPrm['results'] = JbvD(nPrm['results'], QePW.fields.get('fields', {}))
if QePW.args.get('format', 'default') == 'raw':
geh0 = oGir(qQXR.dumps(nPrm))
else:
geh0 = pz3A(**{'status': jGRS, 'message': Ol8d,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OeRI(nPrm, jGRS, Ol8d):\n if type(nPrm) is not dict and nPrm is not None:\n raise TypeError('Data should be a dictionary')\n geh0 = {'code': jGRS, 'success': 200 <= jGRS < 300, 'message': Ol8d, 'result': nPrm}\n return (pz3A(geh0), jGRS)",
"def zs78(jGRS, Ol8d, yxYh, nPrm, Wxnj):\n HUw7 = ... | [
"0.83595216",
"0.8237121",
"0.82090014",
"0.8089542",
"0.80596143",
"0.79204667",
"0.7881282",
"0.7881282",
"0.7881282",
"0.7881282",
"0.7862147",
"0.7850775",
"0.77809405",
"0.7743119",
"0.7739051",
"0.77064455",
"0.76934606",
"0.76837265",
"0.76807415",
"0.75737494",
"0.755... | 0.7714172 | 15 |
this method recives a list and returns the first an last elements as a list | def SxMh(JTgH):
ZtvZ = [JTgH[0], JTgH.pop()]
return ZtvZ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e0HM(list):\n return [list[0], list[-1]]",
"def DmvH(jzdc):\n if not isinstance(jzdc, list):\n raise TypeError\n if len(jzdc) < 2:\n raise IndexError\n return [jzdc[0], jzdc[-1]]",
"def Qzjs():\n AUCK = [2, 3, 5, 7, 11, 13]\n D0ih = [AUCK[0], AUCK[-1]]\n print(D0ih)\n ... | [
"0.824407",
"0.7228453",
"0.7208221",
"0.68576604",
"0.6823412",
"0.6725683",
"0.66446465",
"0.6596105",
"0.6520853",
"0.6513734",
"0.6508983",
"0.64720976",
"0.6434996",
"0.6362919",
"0.6321211",
"0.63020545",
"0.6272202",
"0.62605566",
"0.6248645",
"0.62175304",
"0.62172085... | 0.67935973 | 5 |
Return the sum of all the donor's donations. Returns | def _DLW(YKHO):
return sum(YKHO.donations) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Rn7g(YKHO):\n return sum(YKHO.each_donation)",
"def Rn7g(YKHO):\n return sum(YKHO.donation_list)",
"def zgYA(YKHO):\n return sum(YKHO.donations)",
"def wjRY(YKHO):\n return sum(YKHO.donation_list)",
"def FwZK(dgtG):\n return dgtG[1]",
"def o1p_(dgtG):\n return sum(geg6[dgtG])",
"d... | [
"0.8663111",
"0.8638387",
"0.8046594",
"0.79062176",
"0.7812578",
"0.77277076",
"0.75803274",
"0.75229895",
"0.72796655",
"0.71129274",
"0.6969943",
"0.6800132",
"0.6600471",
"0.65865827",
"0.6572552",
"0.6550244",
"0.6531874",
"0.6511713",
"0.64752054",
"0.64221585",
"0.6382... | 0.7231765 | 9 |
Add a new donation to the donor's record. | def VtQ7(YKHO, wDr6):
if not wDr6 or wDr6 <= 0:
raise ValueError('Donation new_amount must be a positive number')
YKHO.donations.append(wDr6) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VtQ7(YKHO, OOWi):\n try:\n with p9bx.transaction():\n k6zn = aH27.create(donor=UVaW.get(UVaW.full_name == YKHO.name), donation_amt=int(OOWi))\n k6zn.save()\n except Exception as e:\n bo34.error(f'Failed to add donation {OOWi} for {YKHO._name}', tTpl)",
"def OOWi(YKHO... | [
"0.8575032",
"0.82508725",
"0.81990904",
"0.79930466",
"0.79488075",
"0.7930555",
"0.78633296",
"0.78423846",
"0.76934785",
"0.76026076",
"0.7590736",
"0.7590348",
"0.7561557",
"0.75154096",
"0.747447",
"0.7430823",
"0.7349675",
"0.7333206",
"0.73049283",
"0.7302283",
"0.7280... | 0.7270732 | 22 |
Return a personalized thankyou message to the donor for their latest donation. Returns | def oMmd(YKHO):
DVB8 = YKHO.donations[-1]
t3UZ = 'times' if YKHO.total_gifts > 1 else 'time'
l5Ny = f'Thank you {YKHO.name} for your donation of ${DVB8:.2f}! You have donated {YKHO.total_gifts:d} {t3UZ} for a total of ${YKHO.total_given:.2f}.'
return l5Ny | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cNKi(YKHO):\n hGN5 = '\\n\\n'.join([f'\\nDear {YKHO.name},', 'Thank you for your generous donation in the amount of ${:.2f}! Have a great day!\\n'.format(YKHO.donations[len(YKHO.donations) - 1])])\n return hGN5",
"def tdLi(YKHO):\n if not YKHO.donations:\n raise LookupError('Donor has not mad... | [
"0.83098674",
"0.82082635",
"0.81994337",
"0.8164125",
"0.80564064",
"0.8000966",
"0.7943079",
"0.76344264",
"0.76279086",
"0.75441533",
"0.75435257",
"0.74805444",
"0.737317",
"0.7266209",
"0.720202",
"0.706818",
"0.7055463",
"0.7052164",
"0.70361865",
"0.70003885",
"0.69874... | 0.84386885 | 0 |
Return a personalized thankyou message to the donor for their overall donations. Returns | def tdLi(YKHO):
if not YKHO.donations:
raise LookupError('Donor has not made any donations.')
t3UZ = f'{YKHO.total_gifts:d} donations' if YKHO.total_gifts > 1 else 'donation'
l5Ny = f'Thank you {YKHO.name},\n\nYour {t3UZ} totaling ${YKHO.total_given:.2f} will help us.\n\n{'':>40}Best Regards,\n{'':>... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cNKi(YKHO):\n hGN5 = '\\n\\n'.join([f'\\nDear {YKHO.name},', 'Thank you for your generous donation in the amount of ${:.2f}! Have a great day!\\n'.format(YKHO.donations[len(YKHO.donations) - 1])])\n return hGN5",
"def W1Or():\n wSZD = EG21()\n OOWi = Sb5o(wSZD)\n print(Bc4p.thank_donor(wSZD))"... | [
"0.83196115",
"0.82192814",
"0.8064387",
"0.79556644",
"0.79321676",
"0.78834766",
"0.78423154",
"0.7770501",
"0.7757448",
"0.76866436",
"0.7674655",
"0.76289034",
"0.74271786",
"0.73805785",
"0.7308194",
"0.727026",
"0.72538525",
"0.72120607",
"0.71750885",
"0.7112172",
"0.7... | 0.86943024 | 0 |
Adds a donor to the charity's record. | def hoW5(YKHO, u4KC):
YKHO.donors[u4KC] = nh4x(name=u4KC) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hoW5(YKHO, dgtG):\n YKHO._donors.append(dgtG)",
"def hoW5(YKHO):\n YKHO.save()",
"def hoW5(YKHO, dgtG):\n if isinstance(dgtG, nh4x):\n YKHO.database[dgtG.name] = dgtG\n elif dgtG in YKHO.database.keys():\n return f'{dgtG} already exists in database'\n else:\n YKHO.databa... | [
"0.8085338",
"0.77065307",
"0.7688256",
"0.760635",
"0.75906277",
"0.7448956",
"0.73343277",
"0.732469",
"0.7281663",
"0.7139444",
"0.7138294",
"0.71353817",
"0.7122939",
"0.7108239",
"0.7108239",
"0.7102785",
"0.70933217",
"0.7085122",
"0.7072709",
"0.695967",
"0.69304764",
... | 0.7559873 | 5 |
Prepare a response for JSON output. | def w9Fe(nPrm, uEDt=None):
uPxI = JMLq
return zPeM(uPxI, nPrm, uEDt) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def B87b(YKHO):\n pass",
"def L70i(YKHO, Aofo: Any) -> AzJI[str, cuzp[str, ImMB]]:\n return (qQXR.dumps(Aofo), YKHO.response_headers)",
"def nXHb(YKHO, im04, yIVm=None, oDn_=None):\n if im04 is None:\n im04 = qi0g()\n else:\n im04 = YKHO._serialize_result(im04, oDn_)\n if isinstanc... | [
"0.71390486",
"0.69459116",
"0.6882694",
"0.6868125",
"0.68511283",
"0.6811302",
"0.6809967",
"0.680781",
"0.6792571",
"0.67681885",
"0.66748255",
"0.6610836",
"0.66068524",
"0.6575479",
"0.65721965",
"0.65580547",
"0.6520754",
"0.65041083",
"0.6496591",
"0.6486367",
"0.64800... | 0.0 | -1 |
Main function for creating sprites | def ne2z(vZvr: int, eQ2E: int, cURV: int, gZTn: int):
bo34.info('Initializing board')
iBIi = _sef.Board(size=(8, 4))
bo34.info('Running simulation')
sASQ = []
for Jqc7 in range(vZvr):
ARTs = oyIN.random.choice([0, 1], size=(8, 4))
xMYq = bJi7.Custom(ARTs)
iBIi.add(xMYq, loc=(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vbmc() -> int:\n pass",
"def sVYM(r8m5: int) -> int:\n pass",
"def ndf3(YKHO):\n pass",
"def jKW4(YKHO, oeNL):\n pass",
"def eCGt(YKHO):\n YKHO.player_list = jIOH.SpriteList()\n YKHO.wall_list = jIOH.SpriteList()\n YKHO.player_sprite = jIOH.Sprite('character.png', OC2t)\n YKHO.p... | [
"0.75751776",
"0.7278639",
"0.7191592",
"0.7142072",
"0.68489605",
"0.67373276",
"0.6702109",
"0.66860306",
"0.6671387",
"0.66664773",
"0.6665477",
"0.6644821",
"0.66409814",
"0.6622725",
"0.6609385",
"0.6608024",
"0.65971947",
"0.6596495",
"0.6583824",
"0.6567488",
"0.655814... | 0.0 | -1 |
Template filter that returns field class name (in lower case). E.g. if field is CharField then {{ field|field_type }} will return 'charfield'. | def vF49(Jyyj):
if hasattr(Jyyj, 'field') and Jyyj.field:
return Jyyj.field.__class__.__name__.lower()
return '' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VtO1(Jyyj):\n return Jyyj.field.widget.__class__.__name__.lower()",
"def vF49(Jyyj):\n return Jyyj.field.widget.__class__.__name__",
"def ieCv(YKHO) -> str:\n return Hmkb.snake_case_to_pascal_case(YKHO.name)",
"def evpD(k3dj, Jyyj):\n if Jyyj == 'courseID':\n Aofo = 'course_identify'\n... | [
"0.6531172",
"0.6378685",
"0.63768625",
"0.62604624",
"0.6188555",
"0.6151877",
"0.60763174",
"0.60502005",
"0.6035214",
"0.60166043",
"0.5926219",
"0.5923319",
"0.58111256",
"0.5808911",
"0.579899",
"0.577613",
"0.57737625",
"0.5763538",
"0.57209855",
"0.5708213",
"0.5690487... | 0.74839824 | 0 |
Template filter that returns field widget class name (in lower case). E.g. if field's widget is TextInput then {{ field|widget_type }} will return 'textinput'. | def bUGh(Jyyj):
if hasattr(Jyyj, 'field') and hasattr(Jyyj.field, 'widget') and Jyyj.field.widget:
return Jyyj.field.widget.__class__.__name__.lower()
return '' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VtO1(Jyyj):\n return Jyyj.field.widget.__class__.__name__.lower()",
"def vF49(Jyyj):\n return Jyyj.field.widget.__class__.__name__",
"def uBcw(object):\n GXn3 = object.__class__.__module__ + '.' + object.__class__.__name__\n return GXn3",
"def ZkML(YKHO, W6DZ):\n QQk3 = YKHO._get_pulse_fie... | [
"0.74792856",
"0.7222377",
"0.6936158",
"0.67778575",
"0.66826826",
"0.6443268",
"0.6294695",
"0.62933534",
"0.6290277",
"0.6196783",
"0.59117335",
"0.5883306",
"0.5855869",
"0.5819096",
"0.56893724",
"0.5681766",
"0.5648044",
"0.56121653",
"0.56021816",
"0.55533135",
"0.5549... | 0.7878033 | 0 |
Return the type for given parameter | def RpnH(U34r):
type = U34r['type']
if type == 'string':
return 'const char*'
elif L2KE(U34r):
return 'enum ' + gU6i(U34r)
else:
return 'kdb_' + type + '_t' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YwLH(YKHO, k78t):\n if k78t in ['TimeStep', 'Conductance']:\n return SnBA.FloatType\n return SnBA.IntType",
"def CbyE(YKHO):\n pass",
"def gbMs(YKHO) -> str:\n ...",
"def YwLH(d7pR):\n if isinstance(d7pR, exCv):\n return str\n else:\n return d7pR.type",
"def ww0B(... | [
"0.7675847",
"0.7671334",
"0.7458104",
"0.7333756",
"0.7255041",
"0.7251747",
"0.7097598",
"0.70710236",
"0.70710236",
"0.70710236",
"0.7060074",
"0.70455736",
"0.69729114",
"0.695593",
"0.6924252",
"0.6837577",
"0.68109083",
"0.67879623",
"0.6772545",
"0.67535216",
"0.673409... | 0.0 | -1 |
Convolution method for both conv and transposed conv For transposed conv, Attr pads is not used for input, but declares how much output is padded. Here, output means output from transposed conv which already pad output_padding if set. | def yIp6(Emd4, Q6kx, chwN, l7uB=False):
WKvO = chwN[Q6kx.inputs[0]]
if isinstance(WKvO, CCrh.layer):
ywwl, Nq1b, C7Ls, XcU5 = (WKvO.batch, WKvO.out_c, WKvO.out_h, WKvO.out_w)
KGZ2 = 2
else:
KGZ2 = len(WKvO.shape) - 2
if KGZ2 != 2:
raise NotImplementedError('Convol... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yIp6(input, WZcn, HabP, ri6P, hHqT, MANu, sQy3, cIuX, dvgN='VALID', uOe2=1):\n WpW5 = input.get_shape()[-1]\n assert WpW5 % uOe2 == 0\n assert MANu % uOe2 == 0\n P79G = lambda YRbF, G1Hx: ZylS.nn.conv2d(YRbF, G1Hx, [1, sQy3, cIuX, 1], padding=dvgN)\n if uOe2 == 1:\n yIp6 = P79G(input, WZc... | [
"0.6981163",
"0.68016624",
"0.6762459",
"0.6748978",
"0.6730169",
"0.6713313",
"0.6699725",
"0.66711587",
"0.66317624",
"0.6625543",
"0.66184276",
"0.66124654",
"0.6594722",
"0.65788066",
"0.6532064",
"0.65313864",
"0.6513944",
"0.64988977",
"0.6493571",
"0.6489594",
"0.64871... | 0.6507767 | 17 |
Return the minimum step length of the simulation as an integer. | def p5iE(YKHO):
return YKHO._minStep | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xMdD(YKHO):\n return YKHO.leapfrog.stepsize",
"def Y8CG(YKHO) -> h8nf[int]:\n return YKHO.epoch_loop.min_steps",
"def qonS(YKHO) -> qe4Y.Input[int]:\n return qe4Y.get(YKHO, 'min_size')",
"def qonS(YKHO) -> qe4Y.Input[int]:\n return qe4Y.get(YKHO, 'min_size')",
"def Rf07(YKHO):\n return Y... | [
"0.74342954",
"0.7289679",
"0.7074082",
"0.7074082",
"0.7058078",
"0.7042558",
"0.6988913",
"0.6945318",
"0.69130725",
"0.6894832",
"0.6879982",
"0.68328285",
"0.6810754",
"0.6806399",
"0.6806399",
"0.6792624",
"0.67807764",
"0.6730111",
"0.67175794",
"0.66670626",
"0.6663183... | 0.72977203 | 1 |
Return the maximum step length of the simulation as an integer. | def m5wm(YKHO):
return YKHO._maxStep | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zMOd(YKHO):\n return YKHO._max_step",
"def wvmV(YKHO) -> int:\n return YKHO.epoch_loop.max_steps",
"def tlOG(YKHO):\n return float(YKHO.trainer_parameters['max_steps'])",
"def tlOG(YKHO):\n return float(YKHO.trainer_parameters['max_steps'])",
"def tlOG(YKHO):\n pass",
"def wvmV(YKHO) -... | [
"0.8035379",
"0.78833115",
"0.7807621",
"0.7807621",
"0.76538247",
"0.75307554",
"0.7398098",
"0.7344257",
"0.7249848",
"0.71787226",
"0.7144048",
"0.7061429",
"0.70534253",
"0.7015343",
"0.7008447",
"0.6967412",
"0.6903282",
"0.6899961",
"0.6893971",
"0.6893971",
"0.6872281"... | 0.7749278 | 4 |
Return the length of the edge as an float. | def u54L(YKHO):
return YKHO._length | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qx2R(YKHO):\n return 2 * YKHO._circumradius * epAf.sin(epAf.pi / YKHO._n_edges)",
"def u54L(YKHO):\n return oyIN.sum(oyIN.sqrt(oyIN.sum(oyIN.power(oyIN.diff(YKHO.edges, axis=0), 2), axis=1)))",
"def qx2R(YKHO, D70y):\n return 240",
"def qx2R(YKHO, syQw):\n return TFHG.length(YKHO.obj, syQw)",... | [
"0.83702683",
"0.7803754",
"0.7699085",
"0.765381",
"0.7552684",
"0.7417725",
"0.7370052",
"0.73627925",
"0.7288297",
"0.7243423",
"0.72200143",
"0.7195009",
"0.71572006",
"0.7129325",
"0.7129325",
"0.7128025",
"0.71163833",
"0.71136427",
"0.7111248",
"0.71025944",
"0.707737"... | 0.0 | -1 |
Return the dictionary that keeps the total number of vehicles stopped on the edge over the time. | def o61_(YKHO):
return jth9.deepcopy(YKHO._haltingNumber) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def liow(YKHO):\n HRQZ = ['E2TL', 'N2TL', 'W2TL', 'S2TL']\n zE7s = By1I.vehicle.getIDList()\n for DDJ9 in zE7s:\n z5fF = By1I.vehicle.getAccumulatedWaitingTime(DDJ9)\n LgN4 = By1I.vehicle.getRoadID(DDJ9)\n if LgN4 in HRQZ:\n YKHO._waiting_times[DDJ9] = z5fF\n elif DD... | [
"0.66092956",
"0.64782494",
"0.64782494",
"0.63221735",
"0.613124",
"0.612322",
"0.6102496",
"0.60442793",
"0.5994613",
"0.59818655",
"0.59700096",
"0.5961491",
"0.5939019",
"0.58802927",
"0.58744913",
"0.5870327",
"0.58648235",
"0.5849188",
"0.58361435",
"0.58002126",
"0.579... | 0.0 | -1 |
Return the dictionary that keeps the density occupation of vehicles on the edge over the time. | def VVFx(YKHO):
return jth9.deepcopy(YKHO._occupation) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qClO(YKHO):\n cmPJ = {}\n for YRbF in YKHO.listOfPositions:\n cmPJ.update({tuple(YRbF.tolist()): None})\n YKHO.dictionaryOfEnergyDensity = cmPJ",
"def RBO9(eVVj, h6Oq):\n RBO9 = dict()\n for WKvO in range(eVVj.generations + 1):\n VvJs = dict()\n for LVAh in range(h6Oq.getT... | [
"0.63595074",
"0.6275629",
"0.6246384",
"0.6185837",
"0.61798346",
"0.6035844",
"0.5868894",
"0.58432686",
"0.58288753",
"0.57896245",
"0.5778294",
"0.5749103",
"0.57422066",
"0.5726422",
"0.5726422",
"0.5726045",
"0.57249916",
"0.5707651",
"0.56984985",
"0.5678371",
"0.56115... | 0.0 | -1 |
Overwrite the dictionary that keeps the density occupation of vehicles on the edge over the time. | def VVFx(YKHO, UKAK):
YKHO._occupation = jth9.deepcopy(UKAK) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Jf7s(YKHO, xKwY):\n for YRbF in YKHO.listOfPositions:\n YKHO.dummyParticle.position = YRbF\n YKHO.dictionaryOfEnergyDensity[tuple(YRbF.tolist())] = _cll.EnergyDensity(YKHO, timeElapsed=xKwY)",
"def qClO(YKHO):\n cmPJ = {}\n for YRbF in YKHO.listOfPositions:\n cmPJ.update({tuple(... | [
"0.6562117",
"0.6467752",
"0.59702796",
"0.5879019",
"0.5809403",
"0.5750248",
"0.5747821",
"0.5721004",
"0.56798434",
"0.5655791",
"0.5647064",
"0.5593779",
"0.55774117",
"0.5571563",
"0.5509531",
"0.5495038",
"0.5459396",
"0.5439296",
"0.5432717",
"0.5432666",
"0.5415322",
... | 0.5155114 | 46 |
Determine the number of white pieces between queen and black king in direction dir. | def FlBI(YKHO, dir):
from pieces.white_funcs import White_Funcs
xJmn = White_Funcs()
for YRbF in range(BT0p.num_queens):
if YKHO.in_path[YRbF] == 0 or YKHO.alive[YRbF] == 0:
continue
if dir == 'L':
rdlD = YKHO.row[YRbF]
fvDH = YKHO.col[YRbF]
mL... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hSCC(YKHO):\n oeNL = (GQyv.row, GQyv.col)\n for YRbF in range(BT0p.num_queens):\n if oeNL in gKUd.movelist[YRbF]:\n BT0p.checker = 'Q' + str(YRbF)\n return 1\n for YRbF in range(8):\n if oeNL in CvXv.hit_movelist[YRbF]:\n BT0p.checker = 'P' + str(YRbF)\n ... | [
"0.6708373",
"0.6456052",
"0.64381486",
"0.64332306",
"0.633826",
"0.6279635",
"0.6251816",
"0.62350804",
"0.6234327",
"0.62227863",
"0.61244005",
"0.6076784",
"0.59752166",
"0.59630406",
"0.5926812",
"0.5891258",
"0.58657163",
"0.58616287",
"0.585621",
"0.5793129",
"0.577624... | 0.7983582 | 0 |
A white piece is pinned between queen and king in direction dir. Pin that piece by filtering any moves that are not in the queen's pinned_movelist. | def G1Nc(YKHO, SovN, dir):
from pieces.white_funcs import White_Funcs
xJmn = White_Funcs()
for YRbF in range(BT0p.num_queens):
if YKHO.in_path[YRbF] == 0 or YKHO.alive[YRbF] == 0:
continue
YKHO.pinned_movelist[YRbF].clear()
if dir == 'L':
rdlD = YKHO.row[YRbF]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def filter(YKHO, mrj1, LgqR):\n FVyL = []\n for YRbF in range(BT0p.num_queens):\n if mrj1 == 'Q' + str(YRbF):\n for G1Hx in gKUd.movelist[YRbF]:\n if not G1Hx not in LgqR:\n FVyL.append(G1Hx)\n gKUd.movelist[YRbF] = FVyL.copy()\n for YRbF in r... | [
"0.7696167",
"0.7254859",
"0.70827925",
"0.6995305",
"0.66152984",
"0.6572075",
"0.6455107",
"0.64449286",
"0.64343846",
"0.63304305",
"0.62442714",
"0.61627823",
"0.61506945",
"0.61127037",
"0.6063577",
"0.6036325",
"0.5939356",
"0.5864491",
"0.5761537",
"0.5727995",
"0.5709... | 0.82167846 | 0 |
Render the index page of the launcher app. | def d6pt():
return vKnz('/launcher', code=302) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d6pt(YKHO):\n return TvZl('{0}/index.html'.format(YKHO.__APP_DIR__))",
"def d6pt():\n return TvZl('index.html')",
"def d6pt():\n return TvZl('index.html')",
"def d6pt(YKHO):\n return TvZl('index.html')",
"def d6pt(YKHO):\n return _1tc('/index.mako')",
"def d6pt():\n return TvZl('ind... | [
"0.8012885",
"0.8011665",
"0.8011665",
"0.79931283",
"0.7980834",
"0.7956416",
"0.7941023",
"0.7923809",
"0.7889578",
"0.7873788",
"0.7873788",
"0.7873788",
"0.7873788",
"0.7873788",
"0.7873788",
"0.7861278",
"0.7861278",
"0.7861278",
"0.7861278",
"0.7847643",
"0.7843997",
... | 0.0 | -1 |
Render the launcher page. | def hENg():
ezFB = iO4M()
pY2Y = jdPJ()
return TvZl('launcher.html', form_sandbox=ezFB, form_agent=pY2Y) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BZ0h():\n return TvZl('app_ui.html')",
"def BZ0h():\n return TvZl('splash_screen.html')",
"def ZIVN(YKHO):\n pass",
"def Ev1b():\n bo34.info('At main app page.')\n return TvZl('index.html')",
"def lb1t():\n return TvZl('index.html')",
"def Ev1b():\n return TvZl('main.html')",
"... | [
"0.7295799",
"0.72415763",
"0.70886487",
"0.6985642",
"0.6970266",
"0.6917108",
"0.6898886",
"0.68595666",
"0.6777092",
"0.67593527",
"0.6701043",
"0.66627896",
"0.66441065",
"0.6642416",
"0.6640975",
"0.6640975",
"0.6626541",
"0.6616056",
"0.6604916",
"0.66026",
"0.6599671",... | 0.69652164 | 5 |
Test successful unload of entry. | async def test_unload_entry(ajET, Urat: MockConfigEntry, stkY: loqed.Lock):
assert await ajET.config_entries.async_unload(Urat.entry_id)
await ajET.async_block_till_done()
stkY.deleteWebhook.assert_called_with(1)
assert Urat.state is gpxd.NOT_LOADED
assert not ajET.data.get(Sugg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def async_unload_entry(ajET: HomeAssistantType, bTKY):\n ajET.data[x1MX]()\n return True",
"async def test_unload_entry(ajET: HomeAssistant) -> None:\n bTKY = await OSs1(ajET)\n assert len(ajET.config_entries.async_entries(Sugg)) == 1\n assert bTKY.state is gpxd.LOADED\n assert await ajET... | [
"0.76940197",
"0.73271126",
"0.7293725",
"0.71486056",
"0.71233433",
"0.71114844",
"0.6975454",
"0.693093",
"0.69221926",
"0.6902508",
"0.6893325",
"0.6886526",
"0.6823084",
"0.68161917",
"0.6811694",
"0.680694",
"0.6805685",
"0.6794757",
"0.67760134",
"0.67713755",
"0.675118... | 0.0 | -1 |
Test unsuccessful unload of entry. | async def test_unload_entry_fails(ajET, Urat: MockConfigEntry, stkY: loqed.Lock):
stkY.deleteWebhook = zrRO(side_effect=Exception)
assert not await ajET.config_entries.async_unload(Urat.entry_id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def test_unload_entry(ajET: HomeAssistant) -> None:\n bTKY = await OSs1(ajET)\n assert len(ajET.config_entries.async_entries(Sugg)) == 1\n assert bTKY.state is gpxd.LOADED\n assert await ajET.config_entries.async_unload(bTKY.entry_id)\n await ajET.async_block_till_done()\n assert bTKY.state... | [
"0.69615155",
"0.6951834",
"0.6842965",
"0.6781299",
"0.6622379",
"0.6612006",
"0.6469544",
"0.6466794",
"0.6416831",
"0.64151096",
"0.6409402",
"0.6409402",
"0.6409402",
"0.6409402",
"0.6408056",
"0.6385217",
"0.63629913",
"0.63428515",
"0.6337419",
"0.6327172",
"0.63196874"... | 0.6556357 | 6 |
Helper function to identify the zone a cell belongs to | def c0po(rdlD, fvDH):
ccBJ = [[0, 1, 2], [3, 4, 5], [6, 7, 8]]
return str(ccBJ[rdlD // 3][fvDH // 3]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c0po(AU8u, zVaH):\n if AU8u is None:\n return 'unknown'\n Rci7 = 'unknown'\n for lhKE, PETZ in zVaH.items():\n pImw = XC5k.pointPolygonTest(PETZ, AU8u, False)\n if pImw > 0:\n Rci7 = lhKE\n break\n return Rci7.split('_')[0]",
"def bbIU(YKHO, WKvO, LVAh, ... | [
"0.676633",
"0.6478133",
"0.64023626",
"0.6352645",
"0.63160497",
"0.62970257",
"0.62812716",
"0.6271796",
"0.6232727",
"0.6157212",
"0.6157212",
"0.6125505",
"0.6102898",
"0.6102898",
"0.6020322",
"0.6018761",
"0.6018761",
"0.6018761",
"0.6018761",
"0.6018761",
"0.6003371",
... | 0.7270026 | 0 |
Get the last valid proof to use to mine a new block. Also returns the current difficulty level, which is the number of 0's required at the beginning of the hash for a new proof to be valid. The proof of work algorithm for this blockchain is not the same as we used in class. | def V9xh(UkaD, AyoH):
yKcO = FusX()
print(f'\nLast proof: {UkaD} -- Searching for next proof..\n')
XwK4 = 1000000
while ks5h(UkaD, XwK4, AyoH) is False:
XwK4 += 1
print(f'Proof found: {XwK4} in {FusX() - yKcO:.3f}s')
return XwK4 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V9xh(YKHO, UkaD):\n XwK4 = 0\n while YKHO.valid_proof(UkaD, XwK4) is False:\n XwK4 += 1\n return XwK4",
"def V9xh(YKHO):\n pZbc = YKHO.__chain[-1]\n j5EW = jGTY(pZbc)\n XwK4 = 0\n while not KEhN.valid_proof(YKHO.__open_transactions, j5EW, XwK4):\n XwK4 += 1\n return XwK4... | [
"0.7518547",
"0.7380385",
"0.73223144",
"0.72103643",
"0.71962553",
"0.71239597",
"0.7047789",
"0.7035424",
"0.69682616",
"0.69334465",
"0.6930258",
"0.69116944",
"0.68714356",
"0.68692356",
"0.68682915",
"0.6834823",
"0.68236995",
"0.6813342",
"0.67546964",
"0.66584057",
"0.... | 0.7021882 | 8 |
Create a logger with console io | def o3Ks():
return Few0(mSnO.io.console_io.ConsoleIO()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o3Ks():\n RKD7 = G9jH.getLogger('demeter_initialization_logger')\n RKD7.setLevel(G9jH.INFO)\n FMLJ = G9jH.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')\n BgMJ = G9jH.StreamHandler(HwRy.stdout)\n BgMJ.setLevel(G9jH.INFO)\n BgMJ.setFormatter(FMLJ)\n RKD7.addHandler(BgMJ)\... | [
"0.7481058",
"0.7153667",
"0.7153667",
"0.70167035",
"0.6880175",
"0.6873111",
"0.6813479",
"0.6810639",
"0.6788944",
"0.67743146",
"0.67525727",
"0.6740761",
"0.6737311",
"0.6715803",
"0.6690998",
"0.6634777",
"0.66342604",
"0.6616435",
"0.66068673",
"0.65992033",
"0.6591664... | 0.8320859 | 0 |
Selects n random elements from a list of (weight, item) tuples. Based on code snippet by Nick Johnson | def qVXs(vC9B, exwG):
nA36 = []
DumB = []
V3oS = 0.0
for upAO, ZfUD in vC9B:
V3oS += upAO
nA36.append(V3oS)
DumB.append(ZfUD)
return [DumB[Ce1H.bisect(nA36, tuKI.random() * V3oS)] for WKvO in range(exwG)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XvqG(DumB):\n T900 = sum((ZfUD[1] for ZfUD in DumB))\n exwG = tuKI.uniform(0, T900)\n for ZfUD, upAO in DumB:\n if exwG < upAO:\n return ZfUD\n exwG = exwG - upAO\n return ZfUD",
"def XvqG(DumB):\n T900 = sum((ZfUD[1] for ZfUD in DumB))\n exwG = tuKI.uniform(0, T900... | [
"0.79302675",
"0.78659815",
"0.7853707",
"0.7837085",
"0.76047075",
"0.74754256",
"0.7460478",
"0.7298379",
"0.7298379",
"0.72288954",
"0.72104764",
"0.7111575",
"0.7104819",
"0.7069961",
"0.70119923",
"0.7005779",
"0.70042837",
"0.69336474",
"0.6902948",
"0.6893107",
"0.6883... | 0.8513231 | 0 |
Create a dataframe with features and labels suitable for training. | def uqIt(n80H, eJTR, KnxT=None, z7kS=0, l2Fe=None, oJ7P=None):
G9jH.info('Creating training data.')
WfCS = rLdf.MultiIndex.from_product([Hspe, xv9K.measure_names], names=['channel', 'measure'])
if KnxT is not None:
DNs0 = rLdf.MultiIndex.from_product([list(range(1, 134)), ['a', 'b'], [0]], names=['p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jAci(YKHO, ztIo, ecF5={'cooperative': 1, 'additive': 0}):\n cZ5Z = YKHO.get_feature_all(ztIo)\n EvQg = rLdf.DataFrame(cZ5Z)\n EvQg['label'] = YKHO.get_numeric_label(ecF5).values\n return EvQg",
"def oUGu(bySB, Crrw):\n nPrm = {str(YRbF): bySB[:, YRbF] for YRbF in range(6)}\n __n6 = rLdf.Dat... | [
"0.80153185",
"0.7786298",
"0.7283302",
"0.7211989",
"0.71879303",
"0.7049138",
"0.70259637",
"0.69966936",
"0.68837345",
"0.6882307",
"0.6858406",
"0.6809793",
"0.6809793",
"0.67936194",
"0.6764845",
"0.67620736",
"0.6745064",
"0.67347765",
"0.6711348",
"0.6691584",
"0.66826... | 0.0 | -1 |
Test that the link names and URL are correct. | def u5Jt(LazF, xvDN, aEqx):
mWFP, hGN5 = xvDN
Aofo = UA21.lsst_doc_shortlink_role(name=mWFP, rawtext=hGN5, text=hGN5, inliner=LazF, lineno=None)
mWyP, J8Tj = aEqx
assert Aofo[0][0].astext() == mWyP
assert Aofo[0][0].attributes['refuri'] == J8Tj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yk_7(YKHO):\n \"\"\"I rely on the urlparse module internally, so this is rock solid\"\"\"\n YKHO.test.website = 'http://iroiso.tumblr.com'\n YKHO.assertEqual(YKHO.test.website, 'http://iroiso.tumblr.com')\n YKHO.test.website = 'http://twitter.com/iroiso'\n YKHO.assertEqual(YKHO.test.website, 'ht... | [
"0.7410819",
"0.73666537",
"0.7336643",
"0.73015773",
"0.72628886",
"0.7167816",
"0.7110308",
"0.70602065",
"0.7047914",
"0.7041245",
"0.70370775",
"0.70266175",
"0.7017762",
"0.6991379",
"0.69858587",
"0.6983752",
"0.698328",
"0.6972783",
"0.6959445",
"0.6957517",
"0.6956869... | 0.0 | -1 |
Calculate saturation specific humidity at surface temperature. | def urvs(C3ST, oeNL):
KCHu = C3ST.state
mVA8 = ANTC.saturation_vapor_pressure(KCHu.surface.temp[oeNL])
KCHu.surface.sat_spec_hum[oeNL] = ANTC.specific_humidity(KCHu.meteo.atmos_press[oeNL], mVA8) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dU0H(YKHO):\n Yh3e = YKHO.data.adc_h\n Z9rn = YKHO.calibration\n if YKHO.t_fine is None:\n YKHO.temperature\n sWv1 = Z9rn.H4_MSB << 4 | Z9rn.H4_LSB\n hkmJ = Z9rn.H5_MSB << 4 | Z9rn.H5_LSB\n yGiw = YKHO.t_fine - 76800\n yGiw = ((Yh3e << 14) - (sWv1 << 20) - hkmJ * yGiw + 16384 >> 15)... | [
"0.7085787",
"0.70411927",
"0.6971581",
"0.68699205",
"0.68699205",
"0.6855368",
"0.6827198",
"0.6811503",
"0.6760424",
"0.67152125",
"0.67144233",
"0.6714107",
"0.6711784",
"0.6699219",
"0.66761667",
"0.66761667",
"0.6664723",
"0.66215444",
"0.6602859",
"0.66002417",
"0.6565... | 0.7188446 | 0 |
Finds correct action type then returns an 'Action' subclass constructor. | def VHIM(Emd4, PQh7, iJLh):
try:
if QdZT.Update.is_action_type(PQh7):
return Emd4._return_update_constructor()
if ps_8.Fetch.is_action_type(PQh7):
KcEq = V9Xu.create_host(iJLh)
return Emd4._return_fetch_constructor(KcEq)
if rZRz.Archive.is_action_type(PQh7... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def McAI(mWFP, d7pR):\n YjUk = xASv.get(mWFP, type(None))\n if issubclass(YjUk, aP2c):\n return YjUk(d7pR)\n return None",
"def McAI(Emd4, iJLh):\n try:\n PQh7 = iJLh.get_config_value(eax5.ACTION_CMD_ARG_NAME)\n ZKsQ = Emd4._get_action_constructor(PQh7, iJLh)\n return ZKsQ... | [
"0.75244004",
"0.7017938",
"0.6921109",
"0.677992",
"0.6715753",
"0.6709413",
"0.6705886",
"0.6660537",
"0.6524367",
"0.6479712",
"0.64264375",
"0.6347995",
"0.6343469",
"0.6301508",
"0.6297859",
"0.62923294",
"0.62770957",
"0.62644213",
"0.6180464",
"0.6174596",
"0.61188227"... | 0.7340378 | 1 |
This function read a csv file from the input path and return a DataFrame object. | def QFyr(u9X4) -> hxoQ:
try:
nPrm = rLdf.read_csv(u9X4)
except Exception as e:
print('read_csv_file failed: ', tTpl)
raise
return nPrm | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mjM_(pmON):\n jQ3Z = rLdf.read_csv(pmON)\n return jQ3Z",
"def DMrX(pmON):\n return rLdf.read_csv(pmON)",
"def vBd4(WJHQ: str) -> rLdf.DataFrame:\n if type(WJHQ) != str:\n raise TypeError('Path should have string format')\n return rLdf.read_csv(WJHQ)",
"def UlWi(pmON: str) -> rLdf.Da... | [
"0.8331164",
"0.82412",
"0.81705314",
"0.80942816",
"0.7984123",
"0.7953998",
"0.79460514",
"0.79141945",
"0.7913742",
"0.7913742",
"0.78640157",
"0.78523517",
"0.7836033",
"0.7812282",
"0.7801766",
"0.7798778",
"0.77793485",
"0.77708334",
"0.77610904",
"0.77521884",
"0.77286... | 0.8506088 | 0 |
Test the age of the animal instances | def sRph(YKHO):
YKHO.assertEqual(YKHO.sharo.get_age(), 5)
YKHO.assertNotEqual(YKHO.daisy.get_age(), 512) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sRph(YKHO, O5cY):\n KCHu = O5cY(2, 5.0)\n uhdk = KCHu.fitness\n KCHu.update_age()\n kj6c = KCHu.fitness\n assert KCHu.age == 3\n assert kj6c != uhdk",
"def fwha():\n ebd0 = [{'species': 'Herbivore', 'age': 1, 'weight': 10.0} for bGrB in range(10)] + [{'species': 'Carnivore', 'age': 3, 'w... | [
"0.7532266",
"0.74002963",
"0.73891497",
"0.72023934",
"0.7158822",
"0.70755213",
"0.7059069",
"0.7012088",
"0.69803816",
"0.69258124",
"0.6911055",
"0.6882367",
"0.6878633",
"0.6846951",
"0.6844104",
"0.6759686",
"0.67311037",
"0.66920066",
"0.6688315",
"0.66808504",
"0.6680... | 0.8251368 | 0 |
Calculate the 'value' of each node in the graph based on how many blocking descendants it has. We use this score for the internal priority queue's ordering, so the quality of this metric is important. The score is stored as a negative number because the internal PriorityQueue picks lowest values first. We could do this... | def fTNR(YKHO):
cCrA = {}
for Q6kx in YKHO.graph.nodes():
p1kx = -1 * len([Csk6 for Csk6 in jHsn.descendants(YKHO.graph, Q6kx) if YKHO._include_in_cost(Csk6)])
cCrA[Q6kx] = p1kx
return cCrA | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SFXf(YKHO):\n if YKHO.__nodeType == Dzev.MULTI_LAYER_EDGE or YKHO.__nodeType == Dzev.SELF_LOOP_EDGE:\n YKHO.__priority = HwRy.maxint\n else:\n YKHO.__priority = len(YKHO.children) + len(YKHO.parents)\n return YKHO.__priority",
"def kXRY(YKHO):\n sSN_ = 0\n for D70y in YKHO.__edge... | [
"0.6414111",
"0.6279471",
"0.6236379",
"0.6208377",
"0.60644984",
"0.6042884",
"0.60428363",
"0.6016475",
"0.6015685",
"0.59872603",
"0.59511536",
"0.5940881",
"0.5861551",
"0.5849393",
"0.5838514",
"0.58384675",
"0.5795609",
"0.57787454",
"0.57787454",
"0.57528347",
"0.57421... | 0.6921778 | 0 |
Get the ephemeral ancestors of unique_id, stopping at the first nonephemeral node in each chain, in graphtopological order. | def vv4l(YKHO, Kz8N: Manifest, ShR8: str) -> iu5r[str]:
NMLV: fHNa[str] = {ShR8}
QYX_: fHNa[str] = set()
azXi: fHNa[str] = set()
while NMLV:
Vlus = NMLV.pop()
for nvEb in YKHO.graph.predecessors(Vlus):
if nvEb in azXi:
continue
azXi.add(nvEb)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HtU1(_TMJ, pAYT, JZlq=None):\n if JZlq is None:\n JZlq = set([_TMJ])\n Qk4v = pAYT[_TMJ]\n if Qk4v is None:\n return JZlq\n JZlq.add(Qk4v)\n return HtU1(Qk4v, pAYT, ancestors=JZlq)",
"def JZlq(YKHO):\n U5bT = []\n for Q6kx in aM69.get_ancestors(YKHO._cursor, YKHO.id, sort=T... | [
"0.6426304",
"0.6375272",
"0.6297029",
"0.614295",
"0.61344665",
"0.61278373",
"0.6082886",
"0.60541606",
"0.6020822",
"0.5987493",
"0.5952052",
"0.59357685",
"0.5911327",
"0.5899111",
"0.5891304",
"0.58846754",
"0.5863114",
"0.5848525",
"0.58377934",
"0.5793757",
"0.57793176... | 0.7340023 | 0 |
create the submatrix in the augmented library where columns have given power p | def E4mT(YKHO, XP5J):
irsQ = [oyIN.prod(YKHO.x ** oyIN.array([vThB]), axis=1, keepdims=True) for vThB in rrwX(YKHO.dim, XP5J)]
return oyIN.hstack(irsQ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TpM_(YKHO, WKvO, XP5J):\n WKvO = WKvO.reshape(WKvO.shape[0], 1)\n SppC = WKvO\n for naF9 in range(1, XP5J):\n SppC = oyIN.hstack((SppC, SppC[:, -1:] * WKvO))\n return SppC",
"def Z3yB():\n uZAQ = exwG * 1.0 / vexM\n if uZAQ % 1 != 0:\n print('\\nError in pc_matrix: The ', end=... | [
"0.67208",
"0.624004",
"0.6109036",
"0.57780206",
"0.5777438",
"0.5715717",
"0.56949407",
"0.5646993",
"0.5608221",
"0.5587711",
"0.5576502",
"0.55761546",
"0.55625975",
"0.55407286",
"0.5530095",
"0.547018",
"0.54637975",
"0.5458018",
"0.5441553",
"0.54380035",
"0.5427442",
... | 0.54623044 | 17 |
Access the source_id of the source | def cP1Y(YKHO) -> str:
return YKHO.source_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UBGL(YKHO):\n if YKHO.source is not None:\n return YKHO.source.name\n return None",
"def UBGL(YKHO) -> str:\n return qe4Y.get(YKHO, 'source_id')",
"def cP1Y(YKHO):\n return zZ1q(YKHO._my_map['sourceId'])",
"def cP1Y(YKHO):\n return YKHO._payload.get_source_id()",
"def UBGL(YKHO):\... | [
"0.8625615",
"0.8582861",
"0.847405",
"0.8297504",
"0.82667714",
"0.8179146",
"0.80988526",
"0.7951913",
"0.7951913",
"0.78796566",
"0.78796566",
"0.78796566",
"0.78796566",
"0.78596485",
"0.78190815",
"0.7758022",
"0.7724923",
"0.76609856",
"0.74827564",
"0.74827564",
"0.739... | 0.8697674 | 0 |
Numpy implementation of the normalization | def NkkI(VXjJ, aXOf=255):
UKAb = VXjJ.astype('float32')
jvuA = UKAb.max()
xYNz = UKAb.min()
return aXOf * (UKAb - xYNz) / (jvuA - xYNz) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NkkI(YKHO):\n YKHO.arr /= ZYEE.norm2(YKHO.arr)",
"def NkkI(ezWE, jDK_=0):\n return ezWE / (oyIN.expand_dims(oyIN.linalg.norm(ezWE, axis=jDK_), axis=jDK_) + 1e-10)",
"def jnV4(ezWE, JBMS, M1Jx, NXpY):\n return (oyIN.float32(NXpY) * ezWE.astype(oyIN.float32) - JBMS.flatten()) / M1Jx.flatten()",
"d... | [
"0.7952043",
"0.7633321",
"0.75927925",
"0.7535026",
"0.7486356",
"0.7486356",
"0.7439417",
"0.7361106",
"0.7359855",
"0.7356325",
"0.73541546",
"0.72998846",
"0.7269175",
"0.7257307",
"0.7237454",
"0.7227661",
"0.72171295",
"0.72171295",
"0.7199686",
"0.7179167",
"0.71633345... | 0.0 | -1 |
Returns mse between value and target. | def Imx7(BWXx, pan_):
return ZylS.reduce_mean(ZylS.square(BWXx - pan_)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KWGN(YKHO, pan_, hlel):\n return oyIN.average((pan_ - hlel) ** 2)",
"def hkHB(yvT9, pan_):\n return sum([pow(pan_[YRbF] - yvT9[YRbF], 2) for YRbF in range(len(pan_))]) / len(pan_)",
"def hkHB(pan_, hlel):\n return oyIN.average((pan_ - hlel) ** 2, axis=0)",
"def hkHB(pan_, hlel):\n return oyIN... | [
"0.83397",
"0.81229174",
"0.8107196",
"0.8107196",
"0.7916838",
"0.7703717",
"0.7701995",
"0.76244205",
"0.74991286",
"0.73920745",
"0.73589313",
"0.73589313",
"0.7358788",
"0.73322785",
"0.7306739",
"0.7288934",
"0.71471864",
"0.71377367",
"0.7126944",
"0.7125157",
"0.711149... | 0.0 | -1 |
pads a one to the end of a batch of tensors | def aHrT(vhpA):
return ZylS.concat(1, (vhpA, ZylS.ones([vhpA.get_shape()[0].value, 1]))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VFgZ(Wc9F: List[Array], *, fsgT=XTiz, Br5Q: int, BWXx) -> HWEd:\n H5Km: x1iM[HWEd] = []\n Q6uT: HWEd\n hkxX = (0, BWXx)\n Oa6X = [[0, 0]]\n for Q6uT in Wc9F:\n Oa6X[0][1] = Br5Q - len(Q6uT)\n H5Km.append(fsgT.pad(Q6uT, Oa6X, mode='constant', constant_values=hkxX))\n hlel = fsgT.... | [
"0.7082163",
"0.6876243",
"0.68262565",
"0.67842346",
"0.6741905",
"0.6722784",
"0.65969247",
"0.65820116",
"0.65553045",
"0.65421885",
"0.6513063",
"0.6501771",
"0.64740837",
"0.64674324",
"0.64553565",
"0.6445934",
"0.644497",
"0.6407116",
"0.64069736",
"0.6401933",
"0.6400... | 0.66055053 | 6 |
Given a JSON response from the API, format a nice error message. | def U_vr(qQXR):
return qQXR['message'] + ' ' + qQXR['errors'][0]['message'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jCFN(geh0) -> str:\n return 'Error: {}. \\n {}'.format(geh0.status_code, geh0.json())",
"def UTD3(P1dF):\n bucu = str(P1dF).split(': ')\n if bucu[1] == 'Invalid name':\n return Yxsy(pz3A({'error': bucu[1]}), 400)\n if bucu[1] == 'Not a JSON':\n return Yxsy(pz3A({'error': bucu[1]}), ... | [
"0.7679543",
"0.7404257",
"0.7327678",
"0.72771937",
"0.7179691",
"0.7150314",
"0.71389097",
"0.7085098",
"0.7070547",
"0.70358413",
"0.70196843",
"0.70171636",
"0.69644797",
"0.69098926",
"0.69004154",
"0.6888959",
"0.6888351",
"0.6886437",
"0.68665457",
"0.68636596",
"0.685... | 0.76750576 | 1 |
Given some JSON representing a repository, extract metadata. Returns RepositoryMetadata | def AvVB(qQXR):
return x0Fi(name=qQXR['full_name'], description=qQXR['description'], topics=qQXR['topics']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VpMw(YKHO, nPrm):\n if not isinstance(nPrm, dict):\n raise AttributeError('Expected a dict object')\n nPrm = nPrm.get('repository')\n return {'url': nPrm['url'], 'description': nPrm.get('description', ''), 'name': nPrm.get('name'), 'forks': nPrm.get('forks'), 'watchers': nPrm.get('watchers')}",... | [
"0.6613192",
"0.64256155",
"0.63101834",
"0.6263927",
"0.62637174",
"0.619247",
"0.6147956",
"0.5983617",
"0.5965681",
"0.59100384",
"0.5843217",
"0.5807858",
"0.5789232",
"0.57837325",
"0.5779794",
"0.5770054",
"0.57134694",
"0.5674573",
"0.5657341",
"0.56405085",
"0.5627138... | 0.8514985 | 0 |
Get a list of all pull requests which have not been merged for two weeks or more. | def l9Du(V2UK):
Mkmy = G4JS.get(f'{F8A2}{V2UK}/pulls?state=all')
nPrm = Mkmy.json()
J24D = qcWV.now().replace(hour=0, minute=0, second=0, microsecond=0) - fCoM(days=14)
dixj = []
for LEXu in nPrm:
a0GP = qcWV.strptime(LEXu['created_at'], '%Y-%m-%dT%H:%M:%SZ')
if a0GP <= J24D and LEXu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZUb8(YKHO):\n return YKHO.git.get_organization(YKHO.repository).get_repo(YKHO.project).get_pulls()",
"def maP1(V2UK):\n return l9Du(V2UK)",
"def pacW(F3jJ):\n _88n, RDp6, waKH, Ctvm = F3jJ\n yNIn = 'Repository \"{}\" of user \"{}\" has {} open issues. Link: {}'.format(RDp6, _88n, Zz1R(_88n, RDp... | [
"0.64392656",
"0.6258809",
"0.62438965",
"0.60814613",
"0.60271454",
"0.5833126",
"0.5784057",
"0.5779564",
"0.57744116",
"0.5708454",
"0.5704957",
"0.5682433",
"0.5673612",
"0.56431264",
"0.562359",
"0.5612638",
"0.5575906",
"0.55597353",
"0.55401254",
"0.5535348",
"0.551320... | 0.7584111 | 0 |
Validate a field as a boolean. Assuming missing value means false | def R_7i(BWXx, QpfX):
if isinstance(BWXx, bool):
return BWXx
elif (isinstance(BWXx, str) or isinstance(BWXx, QMSQ)) and BWXx.lower() in ['true', 'yes', 't', 'y', '1']:
return True
elif (isinstance(BWXx, str) or isinstance(BWXx, QMSQ)) and BWXx.lower() in ['false', 'no', 'f', 'n', '0']:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k0cj(BWXx: Any) -> None:\n if not isinstance(BWXx, bool):\n raise sUXu(f'This field must be of type bool, not {type(BWXx)}.')",
"def TX7R(YEnM):\n if YEnM is not True and YEnM is not False:\n raise ValueError('{} should be a boolean True or False.'.format(str(YEnM)))",
"def xzCw(YKHO, B... | [
"0.7442557",
"0.74237406",
"0.7333448",
"0.73105854",
"0.72160554",
"0.7196641",
"0.7121271",
"0.7042101",
"0.70397985",
"0.6979029",
"0.69382685",
"0.6896974",
"0.6848646",
"0.68478745",
"0.68173367",
"0.67491955",
"0.6722647",
"0.67083126",
"0.67015946",
"0.66833",
"0.66795... | 0.6751048 | 15 |
Returns a randomly generated password of the specified length. | def AKbe(YKHO, u54L):
na1r.debug('Generating a pseudo-random password of %d characters', u54L)
if u54L <= 0:
return ''
return MRxC.hexlify(Hy7s.urandom((u54L + 1) / 2))[:u54L] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kico(u54L=10):\n gLiZ = vIwR.ascii_uppercase + vIwR.ascii_lowercase + vIwR.digits\n ElQU = ''.join((tuKI.choice(gLiZ) for hcXw in range(u54L)))\n return ElQU",
"def ikbr(YKHO, u54L):\n return ''.join((tuKI.choice('0123456789abcdefghijklmnopqrstuvwxyz') for bGrB in range(u54L)))",
"def ENfd(u54L... | [
"0.9166779",
"0.91346765",
"0.9104668",
"0.9065158",
"0.90270966",
"0.9011157",
"0.9003345",
"0.89765835",
"0.8966765",
"0.8935387",
"0.88771784",
"0.8871087",
"0.8864232",
"0.8835557",
"0.878652",
"0.8760011",
"0.8740433",
"0.87075907",
"0.8706531",
"0.87052673",
"0.86888254... | 0.8649757 | 21 |
Validates the time slice POST request. The return tuple contains the validated values. The error value should always be checked first before using the other return values (they will be safe, but may not be meaningful). | def aDsa(QePW, k245):
P1dF = {}
try:
lNpw = QePW.form.get('minTime', -1, type=float)
Heku = QePW.form.get('maxTime', None, type=float)
L8fv = QePW.form.get('runDir', None, type=str)
q4Q_ = QePW.form.get('subsystem', None, type=str)
ZpEL = QePW.form.get('scaleHists', False... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d5zW(BGqR):\n from datetime import datetime, timedelta\n Nqlg = BGqR.splitlines()\n UAju = False\n for XP_j, BDwY in enumerate(Nqlg):\n YdD0 = BDwY.strip().split()\n if not (len(YdD0) == 2 or len(YdD0) == 6):\n Dwep(f'Error in line:{XP_j + 1}: Wrong number of arguments.each... | [
"0.6064373",
"0.59484154",
"0.59135276",
"0.59129465",
"0.58972317",
"0.58901405",
"0.58782506",
"0.5875566",
"0.5871062",
"0.5871062",
"0.58405584",
"0.57992643",
"0.57818586",
"0.5780577",
"0.57724196",
"0.5744209",
"0.5717925",
"0.5712292",
"0.5708631",
"0.567676",
"0.5624... | 0.79714566 | 0 |
Converts a requested parameter to a python bool. The validation is particularly useful for jsRoot and ajaxRequest. Note that this function is fairly similar to `convertRequestToStringWhichMayBeEmpty`. | def JfPp(s6lv, JZXy):
DV4Y = JZXy.get(s6lv, False, type=str)
if DV4Y is not False:
DV4Y = qQXR.loads(DV4Y)
bo34.info('{paramName}: {paramValue}'.format(paramName=s6lv, paramValue=DV4Y))
return DV4Y | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tYgd(YKHO, mWFP, WmM4=None):\n Ty9i = YKHO.get(mWFP, WmM4)\n if isinstance(Ty9i, bool):\n return Ty9i\n if not Ty9i:\n return not WmM4\n sP8i = Ty9i.lower()\n if sP8i in xbyn:\n return False\n if sP8i in j3sL:\n return True\n raise ja9q('Query parameter %r value... | [
"0.7001797",
"0.69096893",
"0.6725428",
"0.6704702",
"0.6704702",
"0.66955227",
"0.6688589",
"0.6658415",
"0.65660876",
"0.6516233",
"0.64931303",
"0.6491137",
"0.6485425",
"0.6484809",
"0.6463482",
"0.6460042",
"0.6450077",
"0.6448187",
"0.64397085",
"0.6406427",
"0.6406427"... | 0.7136391 | 0 |
Handle strings which may be empty or contain "None". This validation is particularly useful for validating hist names and hist groups request strings to ensure that they are valid strings before doing further validation. Empty strings should be treated as ``None``. The ``None`` strings are from the timeSlicesValues div... | def OUo9(s6lv, JZXy):
DV4Y = JZXy.get(s6lv, None, type=str)
bo34.info('{paramName}: {paramValue}'.format(paramName=s6lv, paramValue=DV4Y))
if DV4Y == '' or DV4Y == 'None':
DV4Y = None
if DV4Y == 'nonSubsystemEmptyString':
DV4Y = ''
bo34.info('{paramName}: {paramValue}'.format(paramNa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fcz9(Emd4, BWXx):\n return Emd4.Attributes.nillable or BWXx is not None",
"def Sona(BWXx):\n return BWXx != ''",
"def S6XB(qQNS, Myez):\n if Myez is None:\n raise ValueError(qQNS + ' cannot be undefined.')\n if Myez == '':\n raise ValueError(qQNS + ' cannot be empty.')",
"def S6... | [
"0.6916629",
"0.64550567",
"0.6388482",
"0.63687164",
"0.6368351",
"0.63478327",
"0.6275586",
"0.62510043",
"0.61726856",
"0.61700517",
"0.6147481",
"0.61107194",
"0.6098536",
"0.6097948",
"0.6085878",
"0.59934294",
"0.59584314",
"0.5957067",
"0.59091735",
"0.58917284",
"0.58... | 0.55649805 | 52 |
Converts a requested parameter into a positive integer. This function is somewhat similar to the other conversion and validation functions, although it is a bit simpler. | def jOOG(s6lv, JZXy):
DV4Y = JZXy.get(s6lv, default=0, type=int)
if DV4Y < 0:
DV4Y = 0
bo34.info('{}: {}'.format(s6lv, DV4Y))
return DV4Y | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iio7(d7pR):\n try:\n exwG = int(d7pR)\n assert exwG > 0\n return exwG\n except (ValueError, AssertionError):\n raise j1Jz.ArgumentTypeError('%s is not a positive integer' % d7pR)",
"def MvWD(OaeV, xqoZ, BWXx):\n if isinstance(BWXx, int) and BWXx > 0:\n return BWXx\... | [
"0.7544721",
"0.74611706",
"0.74565",
"0.7399716",
"0.733763",
"0.72012454",
"0.7193218",
"0.7193182",
"0.718125",
"0.71263915",
"0.71061546",
"0.70882183",
"0.70818925",
"0.7079631",
"0.7070939",
"0.7066897",
"0.70593745",
"0.7058071",
"0.70085746",
"0.6983837",
"0.6979513",... | 0.77570075 | 0 |
Normalise the Input Point Cloud into a Unit Sphere | def CJal(IhAk):
e6ux = oyIN.mean(IhAk, axis=0)
IhAk = IhAk - e6ux
r8hN = oyIN.max(oyIN.sqrt(oyIN.sum(IhAk ** 2, axis=1)))
IhAk = IhAk / r8hN
return IhAk | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QZoP(YKHO):\n if not YKHO.is_parallel(kY70(0, 0, 1)):\n epBp = YKHO.point.dot(YKHO.normal) / kY70(0, 0, 1).dot(YKHO.normal)\n YKHO.point = kY70(0, 0, epBp)\n elif not YKHO.is_parallel(kY70(0, 1, 0)):\n LVAh = YKHO.point.dot(YKHO.normal) / kY70(0, 1, 0).dot(YKHO.normal)\n YKHO.... | [
"0.7130533",
"0.6911183",
"0.6648209",
"0.6603594",
"0.6577138",
"0.6556657",
"0.6554572",
"0.6539701",
"0.64402556",
"0.64350617",
"0.6418834",
"0.64128935",
"0.6409983",
"0.6405208",
"0.6385434",
"0.63762766",
"0.63690084",
"0.63585854",
"0.6354267",
"0.6348946",
"0.6332907... | 0.0 | -1 |
The sequence number of the SCP packet | def aWuw(YKHO):
return YKHO._sequence | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Px4Q(Emd4):\n Emd4.msg_seq += 1\n return Emd4.msg_seq",
"def aWuw(YKHO):\n return YKHO._message.get('seq', None)",
"def Dd1c(YKHO):\n return YKHO.next_seq_needed",
"def aWuw(YKHO) -> int:\n YKHO._sequence = (YKHO._sequence + 1) % 256\n return YKHO._sequence",
"def jTbc(YKHO):\n ret... | [
"0.7204517",
"0.70051163",
"0.67969984",
"0.6768594",
"0.66937387",
"0.6668295",
"0.6565733",
"0.6487707",
"0.646748",
"0.646748",
"0.6444371",
"0.6414146",
"0.64122117",
"0.64020264",
"0.6384694",
"0.63820064",
"0.63007516",
"0.63007516",
"0.62186354",
"0.6197965",
"0.619405... | 0.56990117 | 52 |
Add cards to the player's hand. | def Mvdk(YKHO, *khoC):
return YKHO.hand.Add(*khoC) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JtWz(YKHO, khoC):\n YKHO.hands.append(khoC)",
"def SEtL(YKHO, dxhl):\n d6pt = len(YKHO.__hand.show_hand_obj())\n YKHO.__hand.show_hand_obj().append(dxhl)",
"def lACn(YKHO, dxhl):\n YKHO.hand.append(dxhl)",
"def AZnT(YKHO, dxhl):\n YKHO.hand.append(dxhl)",
"def lACn(YKHO, dxhl):\n YKHO... | [
"0.872849",
"0.8031297",
"0.79785234",
"0.7936085",
"0.79050213",
"0.7854464",
"0.7837467",
"0.77765214",
"0.7766426",
"0.7696013",
"0.76793414",
"0.76086336",
"0.76086336",
"0.7583235",
"0.75266695",
"0.7462892",
"0.7457669",
"0.7423856",
"0.7422262",
"0.7409313",
"0.7387128... | 0.80841154 | 1 |
Add cards to the cards a player has taken. | def XMfy(YKHO, *khoC):
ycBG = set(khoC)
if not all((isinstance(ZfUD, F1Hz) for ZfUD in ycBG)):
raise TypeError
YKHO.taken |= ycBG
YKHO.Notify('take_trick', player=YKHO.name, cards=ycBG)
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _ViK(YKHO, khoC):\n YKHO._cards.extend(khoC)",
"def _ViK(YKHO, khoC):\n for dxhl in khoC:\n YKHO.cards.append(dxhl)",
"def _ViK(YKHO, khoC):\n YKHO.cards.extend(khoC)",
"def _ViK(YKHO, khoC):\n for dxhl in khoC:\n YKHO._cards.append(dxhl)",
"def _ViK(YKHO, khoC):\n YKHO._li... | [
"0.8082049",
"0.80767155",
"0.80677944",
"0.78244084",
"0.7763597",
"0.7740972",
"0.76900625",
"0.7666924",
"0.75666445",
"0.75593764",
"0.7504949",
"0.748406",
"0.7415396",
"0.7281774",
"0.7237763",
"0.72273064",
"0.72133857",
"0.71987575",
"0.71950966",
"0.71950966",
"0.717... | 0.0 | -1 |
Assert a 201 status code was returned | def OPFs(YKHO):
gFsc = {'username': 'test_user', 'password': 'test1234'}
geh0 = YKHO.client.post('/users/', data=gFsc)
YKHO.assertEqual(201, geh0.status_code)
YKHO.assertEqual(gFsc['username'], geh0.data['username']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ieOq(YKHO):\n assert YKHO.response.status_code == 201",
"def wmBr(YKHO, _hkX):\n return YKHO.assertEqual(_hkX.status_code, 201)",
"def wmBr(YKHO, _hkX):\n return YKHO.assertEqual(_hkX.status_code, 201)",
"def BZqT(YKHO, geh0):\n YKHO.assertStatus(geh0, 201)",
"def v1W4(YKHO):\n assert YK... | [
"0.8578494",
"0.8551887",
"0.84508675",
"0.83865637",
"0.83173925",
"0.77584416",
"0.76486236",
"0.75324804",
"0.7445672",
"0.74288774",
"0.74288774",
"0.7417881",
"0.7410795",
"0.73602515",
"0.7351803",
"0.7321779",
"0.7321779",
"0.72556746",
"0.7227915",
"0.72279114",
"0.72... | 0.0 | -1 |
Assert a 201 status code was returned. As 1 register user len(response.data)==1 | def yR1m(YKHO):
YKHO.test_user_registration()
geh0 = YKHO.client.get('/users/')
YKHO.assertEqual(200, geh0.status_code)
YKHO.assertEqual(1, len(geh0.data)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OuCI(YKHO):\n lQ3t = YKHO.register()\n YKHO.assertEqual(lQ3t.status_code, 201)",
"def IVUY(YKHO):\n ZS9h = YKHO.register_response.status_code\n YKHO.assertEqual(ZS9h, jGRS.HTTP_201_CREATED)\n YKHO.assertIsNotNone(YKHO.registered_user)\n YKHO.assertNotEqual(YKHO.registered_user.verification.... | [
"0.80680317",
"0.7963564",
"0.7962977",
"0.79540426",
"0.79121",
"0.78238726",
"0.78238726",
"0.77767926",
"0.77712244",
"0.77567244",
"0.7753064",
"0.77409166",
"0.77052987",
"0.769235",
"0.76879364",
"0.7682253",
"0.7526665",
"0.75053275",
"0.7486385",
"0.74450684",
"0.7376... | 0.0 | -1 |
Assert a 200 status code was returned. Also token was returned | def mFj1(YKHO):
YKHO.test_user_registration()
JGsQ = {'username': 'test_user', 'password': 'test1234'}
geh0 = YKHO.client.post('/api-token-auth/', data=JGsQ)
YKHO.assertEqual(200, geh0.status_code)
YKHO.assertEqual(True, 'token' in geh0.data.keys()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dsVK(YKHO):\n _hkX = YKHO.app.get('/test', headers={'X-Auth': YKHO.token})\n YKHO.assertEqual(_hkX.status_code, 200)",
"def Z5ZI(ifdi):\n assert ifdi.status_code == 200",
"def Z5ZI(YKHO):\n assert YKHO.response.status_code == 200",
"def svVI(YKHO):\n _hkX = YKHO.app.get('/api/1/auth/key')\... | [
"0.80763006",
"0.78299314",
"0.77622116",
"0.7693545",
"0.7605763",
"0.7605763",
"0.7597915",
"0.7498124",
"0.7498124",
"0.74966884",
"0.74780357",
"0.74780357",
"0.7472631",
"0.7471599",
"0.74292815",
"0.7388547",
"0.7377428",
"0.737324",
"0.737324",
"0.7367283",
"0.73560965... | 0.0 | -1 |
Assert a 400 status code and data without token was returned. | def GacQ(YKHO):
YKHO.test_user_registration()
JGsQ = {'username': 'test_use', 'password': '1234'}
geh0 = YKHO.client.post('/api-token-auth/', data=JGsQ)
YKHO.assertEqual(400, geh0.status_code)
YKHO.assertEqual(False, 'token' in geh0.data.keys()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M7ri(YKHO, geh0):\n YKHO.assertStatus(geh0, 400)",
"def M7ri(YKHO, geh0):\n YKHO.assertStatus(geh0, 400)",
"def w45d(YKHO, _hkX):\n return YKHO.assertEqual(_hkX.status_code, 400)",
"def w45d(YKHO, _hkX):\n return YKHO.assertEqual(_hkX.status_code, 400)",
"def LsYw(YKHO):\n geh0 = YKHO.cl... | [
"0.77686036",
"0.77686036",
"0.7460459",
"0.74206567",
"0.7338174",
"0.72260314",
"0.72193545",
"0.7191285",
"0.70129174",
"0.698447",
"0.6939815",
"0.69062585",
"0.6898537",
"0.6864622",
"0.6864622",
"0.68627226",
"0.6837921",
"0.68329144",
"0.68233097",
"0.6822338",
"0.6814... | 0.0 | -1 |
Assert a 201 status code was returned | def L5Fd(YKHO):
YKHO.test_user_registration()
CBIr = mv1M.objects.first()
YKHO.client.force_login(CBIr)
geh0 = YKHO.client.get('/users/{}/'.format(CBIr.id))
YKHO.assertEqual(200, geh0.status_code)
YKHO.assertEqual(CBIr.id, geh0.data['id']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ieOq(YKHO):\n assert YKHO.response.status_code == 201",
"def wmBr(YKHO, _hkX):\n return YKHO.assertEqual(_hkX.status_code, 201)",
"def wmBr(YKHO, _hkX):\n return YKHO.assertEqual(_hkX.status_code, 201)",
"def BZqT(YKHO, geh0):\n YKHO.assertStatus(geh0, 201)",
"def v1W4(YKHO):\n assert YK... | [
"0.8578494",
"0.8551887",
"0.84508675",
"0.83865637",
"0.83173925",
"0.77584416",
"0.76486236",
"0.75324804",
"0.7445672",
"0.74288774",
"0.74288774",
"0.7417881",
"0.7410795",
"0.73602515",
"0.7351803",
"0.7321779",
"0.7321779",
"0.72556746",
"0.7227915",
"0.72279114",
"0.72... | 0.0 | -1 |
Assert a 401 status code was returned | def CPUK(YKHO):
YKHO.test_user_registration()
CBIr = mv1M.objects.first()
geh0 = YKHO.client.get('/users/{}/'.format(CBIr.id))
YKHO.assertEqual(401, geh0.status_code)
YKHO.assertEqual('Unauthorized', geh0.status_text) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bUA4(YKHO, _hkX):\n return YKHO.assertEqual(_hkX.status_code, 401)",
"def bUA4(YKHO, _hkX):\n return YKHO.assertEqual(_hkX.status_code, 401)",
"def muex(YKHO, geh0):\n YKHO.assertStatus(geh0, 401)",
"def muex(YKHO, geh0):\n YKHO.assertStatus(geh0, 401)",
"def tt55(YKHO, d4y1):\n Jpbe = W... | [
"0.8399988",
"0.82807404",
"0.81170523",
"0.81170523",
"0.783152",
"0.77652395",
"0.74074566",
"0.74073315",
"0.73662806",
"0.7347073",
"0.7325736",
"0.7303393",
"0.72647023",
"0.726326",
"0.7255506",
"0.72509974",
"0.72374487",
"0.72199947",
"0.72199947",
"0.72199947",
"0.72... | 0.0 | -1 |
Assert a 200 status code was returned, all parameters is not same | def FAob(YKHO):
CBIr = mv1M.objects.create(username='test_user')
YKHO.client.force_login(CBIr)
r7tU = qQXR.dumps({'email': 'admin@admin.com', 'first_name': 'normal', 'last_name': 'name', 'username': 'test_user'})
geh0 = YKHO.client.put('/users/{}/'.format(CBIr.id), data=r7tU, content_type='application/j... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ieOq(YKHO):\n assert YKHO.response.status_code == 201",
"def Z5ZI(YKHO):\n assert YKHO.response.status_code == 200",
"def Z5ZI(YKHO):\n assert YKHO.response.status_code == YKHO.expected_status_code",
"def Z5ZI(YKHO):\n YKHO.assertEquals(YKHO.response.status_code, 200)",
"def Z5ZI(YKHO):\n ... | [
"0.8047244",
"0.8031724",
"0.80065304",
"0.78673035",
"0.78673035",
"0.7864112",
"0.7802027",
"0.7801249",
"0.77462626",
"0.7700695",
"0.7700695",
"0.7698548",
"0.7684084",
"0.76761603",
"0.7600998",
"0.7575152",
"0.7523719",
"0.7523719",
"0.7493747",
"0.74580926",
"0.7447162... | 0.0 | -1 |
Assert a 204 status code was returned | def QJ7z(YKHO):
CBIr = mv1M.objects.create(username='test_user')
YKHO.client.force_login(CBIr)
geh0 = YKHO.client.delete('/users/{}/'.format(CBIr.id))
YKHO.assertEqual(204, geh0.status_code)
YKHO.assertEqual(0, mv1M.objects.count()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _3D4(YKHO, _hkX):\n return YKHO.assertIn(_hkX.status_code, [202, 204])",
"def _3D4(YKHO, _hkX):\n return YKHO.assertIn(_hkX.status_code, [202, 204])",
"def yCPX(YKHO, geh0=None, tO9_=None):\n YKHO._assert_response_code(204, geh0, tO9_)",
"def yy28(YKHO, _hkX):\n return YKHO.assertEqual(_hkX.s... | [
"0.77672744",
"0.7631106",
"0.76172066",
"0.75550157",
"0.7527835",
"0.72185576",
"0.71748114",
"0.70312405",
"0.7015086",
"0.69372964",
"0.6909038",
"0.6852765",
"0.6836528",
"0.6786365",
"0.6766991",
"0.6751465",
"0.6744229",
"0.67319804",
"0.6727288",
"0.6709032",
"0.67033... | 0.0 | -1 |
Drop the entire fleet and change the fleet's direction. | def ez7i(YKHO):
for yrRd in YKHO.zombies.sprites():
yrRd.rect.y += YKHO.settings.fleet_drop_speed
YKHO.settings.fleet_direction *= -1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ez7i(YKHO):\n for oeTy in YKHO.__aliens.sprites():\n oeTy.rect.y += oeTy.getDropSpeed()\n YKHO.__settings.set_fleet_direction(YKHO.__settings.get_fleet_direction() * -1)",
"def e4Wr(YKHO):\n for kEC0 in YKHO.planes.sprites():\n kEC0.rect.y += YKHO.settings.fleetDropSpeed\n YKHO.sett... | [
"0.7601646",
"0.7389588",
"0.7149325",
"0.71376735",
"0.6942187",
"0.6942187",
"0.6942187",
"0.6897573",
"0.67461616",
"0.66579515",
"0.66579515",
"0.66579515",
"0.6624609",
"0.66192275",
"0.6598437",
"0.65600324",
"0.65483266",
"0.65483266",
"0.65483266",
"0.65483266",
"0.65... | 0.7040783 | 4 |
Update images on the screen, and flip to the new screen. | def khpC(YKHO):
iYrn = a9eO.image.load('images/bg.jpg').convert()
YKHO.screen.blit(iYrn, [0, 0])
YKHO.frog.blitme()
for YBnT in YKHO.bullets.sprites():
YBnT.draw_bullet()
YKHO.zombies.draw(YKHO.screen)
YKHO.sb.show_score()
if not YKHO.stats.game_active:
YKHO.play_button.draw_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aZ12(YKHO):\n G9jH.info('Refreshing Screen')\n Mtfr = YKHO.screen.copy()\n if s7Ie:\n Mtfr = Mtfr.transpose(uGYG.Image.ROTATE_180)\n Mtfr.thumbnail((YKHO.inky.WIDTH, YKHO.inky.HEIGHT), hnIv.ANTIALIAS)\n YKHO.inky.set_image(Mtfr)\n YKHO.inky.show()",
"def udoe(YKHO) -> None:\n a9eO... | [
"0.7722046",
"0.74757975",
"0.7261113",
"0.7248675",
"0.72204626",
"0.72044104",
"0.7201616",
"0.7163461",
"0.7148999",
"0.71196806",
"0.7104975",
"0.7098574",
"0.7081129",
"0.70431596",
"0.7041154",
"0.70171225",
"0.6984892",
"0.6970421",
"0.69658285",
"0.696208",
"0.6936416... | 0.7007628 | 16 |
Check if any zombies have reached the bottom of the screen. | def FXP0(YKHO):
VXOZ = YKHO.screen.get_rect()
for yrRd in YKHO.zombies.sprites():
if yrRd.rect.bottom >= VXOZ.bottom:
YKHO._frog_hit()
break | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uh6b(YKHO):\n VXOZ = YKHO.screen.get_rect()\n for kEC0 in YKHO.planes.sprites():\n if kEC0.rect.bottom >= VXOZ.bottom:\n YKHO.jetHit()\n break",
"def B2LI(YKHO):\n VXOZ = YKHO.screen.get_rect()\n for x0Pt in YKHO.eggs.sprites():\n if x0Pt.rect.bottom >= VXOZ.bo... | [
"0.7570157",
"0.75060546",
"0.73731905",
"0.73697746",
"0.7369247",
"0.73397225",
"0.72564626",
"0.72396547",
"0.72106016",
"0.71461546",
"0.70067537",
"0.6994421",
"0.6983572",
"0.68265903",
"0.6798668",
"0.679339",
"0.67722845",
"0.6738502",
"0.6731546",
"0.6723811",
"0.672... | 0.8840098 | 0 |
Removes permissions from the group for the given resource. | def H6iT(YKHO, TmVT, Eorv, w0rQ, DpZH=Mo6q):
if DpZH == 'v0.4':
raise NotImplementedError('ndio does not support this call for v0.4.')
hnFq = YKHO.get_api_impl(DpZH)
hnFq.permissions_delete(TmVT, Eorv, w0rQ, YKHO.url_prefix, YKHO.auth, YKHO.session, YKHO.session_send_opts) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X_UX(YKHO, TmVT, Eorv):\n YKHO.project_service.set_auth(YKHO._token_project)\n YKHO.project_service.delete_permissions(TmVT, Eorv)",
"def PTpj(YKHO, Eorv):\n return YKHO.os_client.delete_security_group(Eorv.id)",
"async def user_group_permissions_clear(YKHO):\n await YKHO._r_pool.delete(YKHO._n... | [
"0.81616014",
"0.70995235",
"0.66597956",
"0.6589366",
"0.65210116",
"0.6295375",
"0.625554",
"0.6231297",
"0.6221798",
"0.61955446",
"0.61891395",
"0.6157057",
"0.6137888",
"0.6085154",
"0.60793424",
"0.60789925",
"0.6075388",
"0.6060085",
"0.60318685",
"0.60318685",
"0.5990... | 0.73333764 | 1 |
Add a new user. | def skfA(YKHO, CBIr, c9ua=None, zp3f=None, D3lj=None, jTXt=None, DpZH=Mo6q):
if DpZH == 'v0.4':
raise NotImplementedError('ndio does not support this call for v0.4.')
hnFq = YKHO.get_api_impl(DpZH)
hnFq.user_add(CBIr, c9ua, zp3f, D3lj, jTXt, YKHO.url_prefix, YKHO.auth, YKHO.session, YKHO.session_sen... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IMdO(YKHO) -> None:\n pass",
"def IMdO(YKHO, CBIr: User) -> None:\n raise NotImplementedError",
"def IMdO(YKHO, CBIr: User):\n raise NotImplementedError",
"def IMdO(YKHO, CBIr: User):\n raise NotImplementedError",
"def IMdO(YKHO, CBIr: User):\n raise NotImplementedError",
"def IMdO(YKH... | [
"0.84305537",
"0.82319087",
"0.822439",
"0.822439",
"0.822439",
"0.8158715",
"0.8158715",
"0.8158715",
"0.8098667",
"0.8085191",
"0.808051",
"0.8028784",
"0.7966072",
"0.7950001",
"0.792673",
"0.792202",
"0.78892756",
"0.787051",
"0.7851433",
"0.78438115",
"0.78416544",
"0.... | 0.76933646 | 29 |
Get attributes of the data model object named by the given resource. | def NMoC(YKHO, Eorv):
hnFq = YKHO.get_api_impl(Eorv.version)
return hnFq.get(Eorv, YKHO.url_prefix, YKHO.auth, YKHO.session, YKHO.session_send_opts) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JgjC(YKHO, hkS8):\n if hkS8.startswith('_'):\n raise AttributeError\n try:\n return YKHO.obj.__resource_cache[hkS8]\n except AttributeError:\n YKHO.obj.__resource_cache = {}\n except KeyError:\n pass\n try:\n Lm7W = YKHO.obj.resource_set.get(resource__name=hkS8... | [
"0.65207857",
"0.6509025",
"0.64679444",
"0.639213",
"0.6322543",
"0.63152003",
"0.6249295",
"0.6212704",
"0.61416847",
"0.6141192",
"0.61254656",
"0.6097289",
"0.60746384",
"0.6050721",
"0.60068667",
"0.60068667",
"0.6005389",
"0.6000942",
"0.59944415",
"0.5985167",
"0.59818... | 0.5505163 | 75 |
Create and saves a user with email and hashed password | def lYUQ(YKHO, D3lj, c9ua, zp3f, JSoq, jTXt=None):
if not D3lj:
raise ValueError('user must have email address')
CBIr = YKHO.model(email=YKHO.normalize_email(D3lj), first_name=c9ua, last_name=zp3f, phone_number=JSoq)
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 kI0b(Emd4, NtEF, jTXt, D3lj):\n Nzyw = B8ni.generate_password_hash(jTX... | [
"0.8344598",
"0.8200603",
"0.80995935",
"0.80988246",
"0.80794543",
"0.80787045",
"0.8075592",
"0.80661863",
"0.8058174",
"0.80531955",
"0.80495805",
"0.80332756",
"0.802118",
"0.8018542",
"0.8015767",
"0.8004617",
"0.8003116",
"0.8003116",
"0.8003116",
"0.800106",
"0.8000092... | 0.0 | -1 |
Create and save a superuser with the email, password | def Zp54(YKHO, D3lj, c9ua, zp3f, JSoq, jTXt=None):
CBIr = YKHO.create_user(D3lj, c9ua, zp3f, JSoq, jTXt)
CBIr.is_staff = True
CBIr.is_superuser = True
CBIr.save()
return CBIr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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\n CBIr.is_staff = True\n CBIr.save()\n return CBIr",
"def Zp54(YKHO, D3lj, jTXt, **w... | [
"0.8338225",
"0.8210238",
"0.8192028",
"0.8191786",
"0.81749576",
"0.817252",
"0.81443363",
"0.8133381",
"0.8124517",
"0.81240916",
"0.81174344",
"0.811743",
"0.8112576",
"0.81108123",
"0.81083125",
"0.81033057",
"0.8089471",
"0.8088154",
"0.80866903",
"0.8084821",
"0.8078984... | 0.78406227 | 97 |