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 |
|---|---|---|---|---|---|---|
Sets the total_bytes of this NatCounters. | def ed9k(YKHO, ed9k):
YKHO._total_bytes = ed9k | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SkKE(YKHO, SkKE):\n YKHO._total_memory = SkKE",
"def SkKE(YKHO, SkKE):\n YKHO._total_memory = SkKE",
"def AzNk(YKHO, AzNk):\n if AzNk is not None:\n if not isinstance(AzNk, int):\n raise TypeError('Invalid type for `bytes_encoded_total`, type has to be `int`')\n YKHO._bytes_en... | [
"0.7021638",
"0.7021638",
"0.6796767",
"0.671504",
"0.6676504",
"0.66245943",
"0.66120857",
"0.6598575",
"0.6512011",
"0.6452161",
"0.6452161",
"0.6452161",
"0.6452161",
"0.6452161",
"0.6452161",
"0.6452161",
"0.64199317",
"0.63533163",
"0.6340007",
"0.6317081",
"0.6260401",
... | 0.80904377 | 0 |
Returns the string representation of the model | def gTzM(YKHO):
return CgYo.pformat(YKHO.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return YKHO.text",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\... | [
"0.86418265",
"0.85103965",
"0.7853324",
"0.77442306",
"0.7712258",
"0.76979405",
"0.765959",
"0.7637644",
"0.76218504",
"0.7607561",
"0.7606604",
"0.7606604",
"0.7606604",
"0.75990754",
"0.7585653",
"0.758149",
"0.7570811",
"0.7567585",
"0.75392604",
"0.75392604",
"0.7527967... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.8392633",
"0.8354901",
"0.82950056",
"0.8132309",
"0.81149805",
"0.8099986",
"0.809911",
"0.8097883",
"0.8097883",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8066694",
"0.80594814",
"0.805757",
... | 0.0 | -1 |
Initialises a new 'Tower' instance. | def FIMM(YKHO, cxCx='suspension', *qIxc, **lcZy):
YKHO.constructionKind = cxCx
super(MfSS, YKHO).__init__(*qIxc, **lcZy) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hoxq(YKHO, Qidp, mWFP='Initialize'):\n YKHO.tower = Qidp\n YKHO.name = mWFP",
"def FIMM(YKHO, fQxG):\n super().__init__(name='shifter')\n YKHO.robot = fQxG\n YKHO.piston = l8pB.DoubleSolenoid(0, 1, 0)",
"def FCbF(YKHO):\n YKHO.default_constructor = Oen0(logger=YKHO._logger)\n YKHO.inst... | [
"0.7031529",
"0.63144577",
"0.6155501",
"0.6151899",
"0.60494196",
"0.6045253",
"0.60370606",
"0.5989256",
"0.5980545",
"0.59605914",
"0.59210724",
"0.5912819",
"0.5900992",
"0.5871063",
"0.5852265",
"0.583322",
"0.5807399",
"0.57969975",
"0.57934034",
"0.57920873",
"0.577831... | 0.69091576 | 1 |
Given a user discord handle, return the Smaug user object. | def KacQ(YKHO, nVrR):
return YKHO.cmd.getUserByHandle(nVrR) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TKWP(CBIr):\n if isinstance(CBIr, (ZOrr.User, ZOrr.Member)):\n return mv1M(id=CBIr.id)\n return mv1M(id=CBIr)",
"def WMyS(YKHO, nVrR):\n return YKHO.store.get_user_by_handle(nVrR)",
"def fK3b(YKHO, CBIr, DCgT):\n return CBIr",
"def LwqV(YKHO):\n return zGUs.objects.get(username=YKHO... | [
"0.7720673",
"0.7200171",
"0.6991034",
"0.68479156",
"0.6816046",
"0.67957896",
"0.67941225",
"0.6772152",
"0.6725838",
"0.67042375",
"0.67039824",
"0.66986644",
"0.6691433",
"0.6690536",
"0.6669733",
"0.6668945",
"0.6668109",
"0.6636429",
"0.6626622",
"0.6610748",
"0.6605105... | 0.64796865 | 37 |
List files with extention `ext` in `folder`. Does NOT perform recursive search. | def IAne(xtX7, YBcr):
YBcr = f'*{YskG(YBcr)}'
RRlC = SC2F.glob(str(GkAb(xtX7, YBcr)))
return uEjm(*list(map(GkAb, RRlC))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uTAc(xtX7, YBcr='gz'):\n with o1Kh(xtX7):\n return [eHNT for eHNT in SC2F.glob('*.{}'.format(YBcr))]",
"def DeQe(xtX7: str, YBcr: str=None) -> [str]:\n if YBcr is None:\n return sorted([eHNT for eHNT in U9eF(xtX7) if EFYe(gzes(xtX7, eHNT))])\n else:\n return sorted([eHNT.replace... | [
"0.7916721",
"0.7749888",
"0.76433957",
"0.7630196",
"0.7630196",
"0.7592824",
"0.7539028",
"0.74553347",
"0.74493885",
"0.74151284",
"0.7264868",
"0.71989137",
"0.7179974",
"0.7168779",
"0.7115497",
"0.7031515",
"0.7017068",
"0.6954065",
"0.69496447",
"0.68997926",
"0.689665... | 0.7152306 | 14 |
Identifies red lights in the incoming camera image and publishes the index of the waypoint closest to the red light's stop line to /traffic_waypoint | def u69M(YKHO, tO9_):
YKHO.has_image = True
YKHO.camera_image = tO9_
zhpB, AJEJ = YKHO.process_traffic_lights()
'\n Publish upcoming red lights at camera frequency.\n Each predicted state has to occur `STATE_COUNT_THRESHOLD` number\n of times till we start using it. Otherwise the pr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X83s(YKHO):\n agxD = None\n v8uu = GPtr.light_positions\n if YKHO.pose is not None and YKHO.waypoints is not None:\n zhpB = YKHO.get_closest_waypoint(YKHO.pose.pose)\n pImw = -1\n VXjJ = YKHO.bridge.imgmsg_to_cv2(YKHO.camera_image, 'passthrough')\n ZHfW = YKHO.red_select(VXjJ)\n WfT... | [
"0.782733",
"0.7261086",
"0.6988372",
"0.6980339",
"0.69798493",
"0.68998885",
"0.6824018",
"0.682278",
"0.68079984",
"0.6777588",
"0.6762333",
"0.6715169",
"0.6645114",
"0.66439235",
"0.6620898",
"0.6618727",
"0.65941185",
"0.65695554",
"0.6566269",
"0.647944",
"0.64397013",... | 0.59279203 | 33 |
Return a list of Substitutions given a variety of starting inputs. | def SzOT(MMe4: Iterable[SomeEntitiesType]) -> x1iM[QGjs]:
qnkS: x1iM[QGjs] = []
for LEXu in MMe4:
if isinstance(LEXu, QGjs):
qnkS.append(LEXu)
else:
qnkS.extend(LEXu)
return qnkS | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oXgR(YKHO):\n OoRR = list()\n YKHO.cursor.execute(YKHO.get_substitutes_cmd)\n nPrm = YKHO.cursor.fetchall()\n for dwI0 in nPrm:\n YKHO.cursor.execute('SELECT name FROM product WHERE id = %s;', (int(dwI0[3]),))\n T04v = YKHO.cursor.fetchall()[0][0]\n OoRR.append([dwI0[0], dwI0[1... | [
"0.63060856",
"0.6303862",
"0.6096012",
"0.60771835",
"0.60518956",
"0.60441864",
"0.591555",
"0.5675405",
"0.56147444",
"0.56013983",
"0.55729884",
"0.5549145",
"0.54614997",
"0.545331",
"0.5411929",
"0.5410212",
"0.5380521",
"0.5338098",
"0.5333374",
"0.5332459",
"0.533034"... | 0.0 | -1 |
Prints correct messages when only the k value is close enough. | def phyk(YKHO):
tuKI.seed(2)
aEqx = 'The A0 value is incorrect.\nThe k value is close enough.\nThe actual A0 value is 19 and the actual k value is 0.137'
fZOT = ['15', '0.14']
with Po4F('builtins.input', side_effect=fZOT) as yGSM:
with Po4F('sys.stdout', new=kJm3()) as hlel:
import a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rick(EcVT, PJWX=1):\n for YRbF, (LEev, JFiu, _fRf, NOvW) in enumerate(wQME(EcVT, Qvhl, HaID + 1, tjUW)):\n wUXI = _fRf - JFiu\n if YRbF > 0:\n if PJWX >= 2:\n print('%5d %5.2f %5.2f %5.2f : %5.2f' % (G1Hx, tvpf, b3_X, Kxs4, vIPU))\n if vIPU > wUXI - NOvW:\n... | [
"0.69037414",
"0.6526443",
"0.64708817",
"0.6410078",
"0.6320995",
"0.6286125",
"0.62577516",
"0.62403995",
"0.6202267",
"0.6193422",
"0.6173128",
"0.61606723",
"0.6157711",
"0.5941738",
"0.59315157",
"0.5928383",
"0.59192264",
"0.58952665",
"0.5862499",
"0.5852976",
"0.58385... | 0.0 | -1 |
Randomly choose a nationality string. | def vWB4() -> str:
return tuKI.choice(['alb', 'arm', 'cat', 'chi', 'geo', 'ger', 'ind', 'swe', 'per', 'rus', 'ukr']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wxdT():\n QABf = sJh4()\n return tuKI.choice(QABf)",
"def fiGU():\n return tuKI.choice(Ri2t)",
"def YoUZ(u54L, Doyr):\n return ''.join(tuKI.choices(' ' + vIwR.ascii_uppercase + vIwR.ascii_lowercase + vIwR.digits + Doyr, k=u54L))",
"def XzCw():\n return tuKI.choice(OrN5)",
"def _Nnl(YKHO,... | [
"0.702182",
"0.65653014",
"0.6393631",
"0.63786304",
"0.63025075",
"0.6279203",
"0.6274014",
"0.6261293",
"0.62517375",
"0.6247081",
"0.6208249",
"0.61859244",
"0.6177225",
"0.61551684",
"0.61306137",
"0.6127566",
"0.61106145",
"0.61040056",
"0.60861653",
"0.6072852",
"0.6066... | 0.8608125 | 0 |
Plots the pyas object using matplotlib, in a method equivalent to plt.imshow(). Overlays information. | def kj9G(YKHO, RKD7=True, trlf=False, t4LP=True, MPlV=None, **EWlA):
if not MPlV:
MPlV = QrM1.gca()
MPlV.set_title(YKHO.__repr__())
MPlV.set_ylabel('pixels')
MPlV.set_xlabel('pixels')
if trlf is False:
Ni9Y = [0, YKHO.data[0, :].size]
mqdV = [0, YKHO.data[:, 0].size]
else... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kj9G(LLmd):\n import numpy as oyIN\n import matplotlib.pyplot as QrM1\n from astropy.visualization import ImageNormalize, ZScaleInterval\n from copy import deepcopy\n from geminidr.gmos.primitives_gmos_image import GMOSImage\n XP5J = GMOSImage([deepcopy(LLmd)])\n uPGi = XP5J.tileArrays().p... | [
"0.6835458",
"0.64587474",
"0.64081806",
"0.6378434",
"0.6354221",
"0.63281494",
"0.63238347",
"0.63238347",
"0.63238347",
"0.62990594",
"0.62950563",
"0.6288147",
"0.6264314",
"0.6262235",
"0.6260522",
"0.6247081",
"0.6237909",
"0.6237288",
"0.6211775",
"0.62111664",
"0.6204... | 0.0 | -1 |
Create human readable version of the association | def zAg0(YKHO):
Aofo = ['Association {:s}'.format(YKHO.asn_name)]
Aofo.append(' Parameters: Product type: {asn_type:s} Rule: {asn_rule:s} Program: {program:s} Target: {target:s} Pool: {asn_pool:s}'.format(asn_type=getattr(YKHO.data, 'asn_type', 'i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n uUDN = [str(koMu) for koMu in YKHO.relations]\n return '%s\\n' % '\\n\\n'.join(uUDN)",
"def zAg0(YKHO):\n qSdg = None\n for H5ew, wEf2 in YKHO.__dict__.items():\n if qSdg:\n qSdg += f', {H5ew}: {wEf2}'\n else:\n qSdg = f'{H5ew}: {wEf2}'\n retur... | [
"0.6954917",
"0.6853456",
"0.6709687",
"0.67039454",
"0.66944945",
"0.6675803",
"0.6664694",
"0.6623047",
"0.6601082",
"0.65639395",
"0.65500444",
"0.6549851",
"0.6546385",
"0.6535865",
"0.6535422",
"0.652403",
"0.6508712",
"0.6508712",
"0.6505807",
"0.64951307",
"0.649434",
... | 0.7388745 | 0 |
Get string representation of the optical elements Returns | def XHCC(YKHO):
ZfUD = YKHO.direct_image.item
wEuq = []
for sjXb in [['filter', 'band'], ['pupil', 'grating']]:
XgxE = u10Q(ZfUD, sjXb, hwkG)[1]
if XgxE:
wEuq.append(XgxE)
wEuq.sort(key=str.lower)
HltU = '-'.join(wEuq)
if HltU == '':
HltU = 'clear'
return ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SnfU(YKHO) -> str:\n if any((getattr(YKHO, WKvO, None) is None for WKvO in ('info', 'nset', 'n', 'lmax', 'lmin', 'nshell', 'exponents', 'coefficients'))):\n raise ValueError('Must have all attributes defined to get string representation')\n yvT9 = f'{YKHO.element} {YKHO.name} {' '.join(YKHO.alias_... | [
"0.75026757",
"0.7168265",
"0.71220034",
"0.68315256",
"0.6800136",
"0.67572314",
"0.6718268",
"0.6718268",
"0.67095745",
"0.6705778",
"0.6695449",
"0.66752726",
"0.66627693",
"0.66571665",
"0.6653291",
"0.66419536",
"0.6641425",
"0.6627649",
"0.6611902",
"0.66058946",
"0.659... | 0.64201945 | 47 |
Helper function to reorder image corners. This reorders the corners from [x1, y1, x2, y2] to [y1, x1, y2, x2] which is required by the tf.crop_and_resize op. | def K533(MSlT):
W5k6 = ZylS.stack([MSlT[:, 1], MSlT[:, 0], MSlT[:, 3], MSlT[:, 2]], axis=1)
return W5k6 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E4mu(HjHK):\n Zs9x = oyIN.array(HjHK)\n JBMS = oyIN.mean(HjHK, axis=0)\n for oM1k in HjHK:\n if oM1k[0] < JBMS[0] and oM1k[1] < JBMS[1]:\n Zs9x[0] = oM1k\n if oM1k[0] > JBMS[0] and oM1k[1] < JBMS[1]:\n Zs9x[1] = oM1k\n if oM1k[0] > JBMS[0] and oM1k[1] > JBMS[... | [
"0.6869198",
"0.66009724",
"0.6236842",
"0.62307113",
"0.6213329",
"0.6208693",
"0.6063192",
"0.5920687",
"0.5777775",
"0.57335097",
"0.5713576",
"0.57030606",
"0.5690886",
"0.56485057",
"0.5604125",
"0.5600965",
"0.5596026",
"0.5566654",
"0.55072874",
"0.54918396",
"0.549183... | 0.6121541 | 6 |
A local cog check to confirm the command is used in a guild and the user has manage messages permissions. | async def cog_check(YKHO, OaeV: commands.Context) -> bool:
return OaeV.author.guild_permissions.manage_messages | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bu5z(YKHO, OaeV: Context) -> bool:\n awnO = OaeV.author.permissions_in(OaeV.channel)\n return awnO.manage_messages",
"async def cog_check(YKHO, OaeV):\n if not OaeV.guild:\n raise wQcs.NoPrivateMessage\n return True",
"async def __local_check(YKHO, OaeV):\n if OaeV.invoked_with == 'he... | [
"0.83829206",
"0.76765877",
"0.75964814",
"0.75232154",
"0.7483319",
"0.74820566",
"0.74820566",
"0.74820566",
"0.73952687",
"0.72955424",
"0.7246608",
"0.7230084",
"0.72184557",
"0.71267253",
"0.7102004",
"0.70916456",
"0.69768995",
"0.6909714",
"0.6804299",
"0.6789622",
"0.... | 0.85980386 | 0 |
A local cog check to confirm the command is used in a guild and the user has manage messages permissions. | async def cog_slash_command_check(YKHO, C7_8: AppCmdInter):
if not C7_8.permissions.manage_permissions:
raise wQcs.MissingPermissions(missing_permissions=['manage_messages'])
if C7_8.guild is None:
raise wQcs.NoPrivateMessage
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def cog_check(YKHO, OaeV: commands.Context) -> bool:\n return OaeV.author.guild_permissions.manage_messages",
"def bu5z(YKHO, OaeV: Context) -> bool:\n awnO = OaeV.author.permissions_in(OaeV.channel)\n return awnO.manage_messages",
"async def cog_check(YKHO, OaeV):\n if not OaeV.guild:\n ... | [
"0.85987324",
"0.8383667",
"0.7678657",
"0.75950176",
"0.7482718",
"0.74816453",
"0.74816453",
"0.74816453",
"0.7397307",
"0.72969574",
"0.7246963",
"0.72319776",
"0.7217736",
"0.7126682",
"0.71018666",
"0.70910925",
"0.69778776",
"0.69119674",
"0.6805362",
"0.67894244",
"0.6... | 0.7523477 | 4 |
Return an array of signals given softmax output | def nI5M(sl84):
y0Rf = oyIN.argmax(sl84, axis=1)
Gaon = oyIN.zeros(shape=(len(y0Rf), 1))
for d6pt, AU8u in zip(y0Rf, range(len(Gaon))):
if d6pt == 0:
Gaon[AU8u] = 1
elif d6pt == 1:
Gaon[AU8u] = -1
else:
Gaon[AU8u] = 0
return Gaon | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hlel(Gaon: np.ndarray) -> oyIN.ndarray:\n return y5U5.softmax(Gaon, axis=1)",
"def N93T(YKHO, input):\n yvT9 = []\n for VXjJ in oyIN.transpose(input):\n yvT9.append(oyIN.exp(VXjJ) / oyIN.sum(oyIN.exp(VXjJ)))\n return oyIN.transpose(oyIN.array(yvT9))",
"def N93T(WKvO):\n uw5A = oyIN.ex... | [
"0.813475",
"0.76600915",
"0.7030343",
"0.7030343",
"0.69831496",
"0.6861549",
"0.6753911",
"0.6746656",
"0.67427105",
"0.67363584",
"0.6735904",
"0.67225325",
"0.67097014",
"0.6696803",
"0.6694984",
"0.669413",
"0.669413",
"0.6668481",
"0.6655963",
"0.6648486",
"0.6648128",
... | 0.7836023 | 1 |
Returns a batch of data. A batch of sequence or random points. | def Or6j(d0Sw, Ep8u, XFqx):
if XFqx:
bS0K = oyIN.random.randint(len(d0Sw[0]) - (Ep8u + 1))
else:
bS0K = oyIN.random.randint(0, len(d0Sw[0]), Ep8u)
JlfD = []
for ZfUD in d0Sw:
Wc9F = ZfUD[bS0K:bS0K + Ep8u, ...] if XFqx else ZfUD[bS0K, ...]
JlfD.append(Wc9F)
return JlfD | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAR4(YKHO):\n EcVT, LVAh = YKHO.get_empty_batch_arrays()\n for YRbF in range(YKHO.batch_size):\n CAzz, Jd40 = YKHO.get_random_period()\n EcVT[YRbF] = CAzz\n LVAh[YRbF] = Jd40\n return YKHO.process_batch(EcVT, LVAh)",
"def IWA_(__n6):\n while True:\n try:\n W... | [
"0.7542807",
"0.733687",
"0.72323847",
"0.7210285",
"0.71537095",
"0.71152025",
"0.7068589",
"0.7030462",
"0.692709",
"0.69137293",
"0.68527484",
"0.68304116",
"0.6800951",
"0.6789045",
"0.676664",
"0.6753476",
"0.6746523",
"0.66979367",
"0.66969377",
"0.6695945",
"0.66686565... | 0.68253994 | 12 |
Build a generator and a discriminator. | def n8cN(YKHO):
YKHO.g12 = uG6q(conv_dim=YKHO.g_conv_dim)
YKHO.g21 = N9im(conv_dim=YKHO.g_conv_dim)
YKHO.d1 = UKqa(conv_dim=YKHO.d_conv_dim, use_labels=YKHO.use_labels)
YKHO.d2 = Hu0o(conv_dim=YKHO.d_conv_dim, use_labels=YKHO.use_labels)
PM3S = list(YKHO.g12.parameters()) + list(YKHO.g21.parameters(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZhzU(YKHO):\n YKHO.generator = YKHO.callable_generator(YKHO.noise_placeholder)\n YKHO.discriminator_fake = YKHO.callable_discriminator(YKHO.generator)\n YKHO.discriminator_real = YKHO.callable_discriminator(YKHO.input_placeholder)",
"def AjW8(YKHO):\n ZXAC = g5gT(YKHO.dataset_name, use_resblock=Y... | [
"0.8632422",
"0.80088335",
"0.71148336",
"0.6982756",
"0.6875028",
"0.6866221",
"0.68207794",
"0.6811709",
"0.6796048",
"0.67510104",
"0.67034984",
"0.66230416",
"0.6604772",
"0.65920496",
"0.656581",
"0.65031326",
"0.64758",
"0.6466691",
"0.6456544",
"0.6443122",
"0.6406208"... | 0.0 | -1 |
Zero the gradient buffers. | def YP7j(YKHO):
YKHO.g_optimizer.zero_grad()
YKHO.d_optimizer.zero_grad() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RP8F(YKHO):\n assert YKHO._grad_buffers is not None, 'buffers are not initialized.'\n for bGrB, GsOy in YKHO._grad_buffers.items():\n GsOy.zero()",
"def vaxF(YKHO):\n YKHO.dw.zero_()\n YKHO.db.zero_()",
"def frhb(YKHO):\n YKHO.gradW = VNqG(YKHO.W.shape)\n YKHO.gradb = VNqG(YKHO.b.s... | [
"0.86332977",
"0.7800649",
"0.7567117",
"0.7420076",
"0.74056625",
"0.7310003",
"0.72885877",
"0.72882223",
"0.7280635",
"0.7280635",
"0.7271896",
"0.72656256",
"0.7254916",
"0.7248324",
"0.7241523",
"0.72139937",
"0.7205861",
"0.7184464",
"0.71841586",
"0.71841586",
"0.71841... | 0.66682005 | 62 |
Get the state of the specified machine. | def b5bz(fwgd):
mQiX = Yn3K.Popen(['VBoxManage', '-q', 'showvminfo', fwgd, '--machinereadable'], stdout=Yn3K.PIPE)
Aofo = filter(lambda WKvO: 'VMState="' in WKvO, mQiX.stdout.readlines()).pop()
return Aofo.split('"')[1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ja6o(YKHO, begE: str):\n begE = YKHO._get_address(begE)\n return Hs_H.get_state(begE)",
"def ptwN(YKHO):\n return YKHO.__mux_machine_state",
"def ja6o(YKHO, mWFP):\n return YKHO.states[mWFP]",
"def ja6o(YKHO, Ol8d):\n return YKHO._get_message(Ol8d.id).state()",
"def Wq6L(YKHO):\n retu... | [
"0.723951",
"0.6612698",
"0.65498155",
"0.65294486",
"0.6519647",
"0.64610404",
"0.6429047",
"0.636642",
"0.6359351",
"0.6312375",
"0.62700224",
"0.6264324",
"0.625266",
"0.62356937",
"0.62295073",
"0.62094384",
"0.61967605",
"0.61684483",
"0.6166948",
"0.6162241",
"0.6161365... | 0.6758168 | 1 |
Get package version, based on local repository | def LTV6():
DpZH = Yn3K.Popen(['python', 'setup.py', '--version'], stdout=Yn3K.PIPE).communicate()[0].strip()
return DpZH | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kaPv(YKHO):\n return YKHO.get_single('/package/version')",
"def kaPv():\n DpZH = ZU8c()\n if DpZH is None:\n try:\n DpZH = RkCj.get_distribution(__name__).version\n except ImportError:\n DpZH = 'UNKNOWN'\n return DpZH",
"def kaPv(Z9rn):\n return Z9rn.local... | [
"0.7587868",
"0.7500789",
"0.74764776",
"0.74224055",
"0.7355992",
"0.73340034",
"0.7322954",
"0.72922885",
"0.72850865",
"0.72849184",
"0.72691965",
"0.7267221",
"0.72534454",
"0.7248692",
"0.722597",
"0.72221845",
"0.71329653",
"0.7107869",
"0.7106114",
"0.7104107",
"0.7098... | 0.6748185 | 65 |
This function is used to get the operator. | def OfrP(w2B8, jo32, J3Fj, UhR0=None):
_VPC = TvZl('/'.join([UhR0, 'get_operator.sql']), type=jo32, show_sysobj=J3Fj)
jGRS, Ylbp = w2B8.execute_2darray(_VPC)
if not jGRS:
return r1yd(errormsg=Ylbp)
Aofo = []
for rdlD in Ylbp['rows']:
Aofo.append([rdlD['oprname'], rdlD['oprname']])
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def seET(YKHO):\n return YKHO._operator",
"def seET(YKHO):\n return YKHO._operator",
"def seET(YKHO):\n return YKHO._operator",
"def seET(YKHO):\n return YKHO._operator",
"def seET(YKHO) -> str:\n return qe4Y.get(YKHO, 'operator')",
"def seET(YKHO) -> str:\n return qe4Y.get(YKHO, 'opera... | [
"0.87656647",
"0.8490846",
"0.8490846",
"0.8490846",
"0.8383276",
"0.8383276",
"0.8383276",
"0.8383276",
"0.8383276",
"0.8306782",
"0.8290505",
"0.82823753",
"0.81861687",
"0.81444067",
"0.81444067",
"0.81444067",
"0.81444067",
"0.81444067",
"0.81444067",
"0.81444067",
"0.814... | 0.0 | -1 |
Return parent snapshot (a snapshot this one is based on), or null if the snapshot has no parent (i.e. is the first snapshot). | def _AKB(YKHO):
if YKHO.parent is None:
return None
return mRnW(YKHO.parent) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _AKB(YKHO):\n G1Hx = YKHO.parent_key()\n return G1Hx() if G1Hx else None",
"def EsMw(YKHO):\n return YKHO._parent_snapshot_name",
"def voU1(YKHO):\n if not YKHO.parent:\n return None\n return YKHO.parents[-1]",
"def _AKB(YKHO):\n wPdp = YKHO.links(ZQF7.PARENT, single=True)\n r... | [
"0.75145966",
"0.73418593",
"0.71948284",
"0.7158282",
"0.70738626",
"0.7062924",
"0.7027399",
"0.70041716",
"0.6985993",
"0.6983393",
"0.6983393",
"0.69710004",
"0.6966749",
"0.69661164",
"0.6955968",
"0.69538546",
"0.69374144",
"0.6912641",
"0.69057715",
"0.6895905",
"0.685... | 0.86440015 | 0 |
[function to remove html tags from the input sentence] | def DVW7(l5Ny):
_R2e = ZbWC.compile('<.*?>')
return _R2e.sub(' ', l5Ny) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gg3k(input):\n p8Nh = ZbWC.compile('<.*?>')\n Bopb = ZbWC.sub(p8Nh, '', input)\n return Bopb",
"def JZhs(V22M):\n return BfDw._remove_html_tags(V22M)",
"def JZhs(l5Ny):\n x0SS = ZbWC.compile('<.*?>')\n return ZbWC.sub(x0SS, '', l5Ny)",
"def Iw0V(vIwR):\n return ZbWC.sub('<[^>]*?>', '... | [
"0.8103304",
"0.7735111",
"0.7733408",
"0.7732607",
"0.77014124",
"0.765557",
"0.764752",
"0.7606689",
"0.7589182",
"0.7558008",
"0.7558008",
"0.75576",
"0.75570875",
"0.7543378",
"0.75266683",
"0.7495318",
"0.7495318",
"0.7495318",
"0.7495318",
"0.7495318",
"0.7495318",
"0... | 0.7189925 | 36 |
Return a copy of the list with every element appearing only once. | def EKdV(Q6uT):
G7PZ = []
[G7PZ.append(YRbF) for YRbF in Q6uT if not G7PZ.count(YRbF)]
return G7PZ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LFwI(OxJJ):\n A6b2 = set()\n Aofo = []\n for YRbF in OxJJ:\n if YRbF not in A6b2:\n A6b2.add(YRbF)\n Aofo.append(YRbF)\n return Aofo",
"def h5Xp(ybN4):\n yvT9 = []\n [yvT9.append(YRbF) for YRbF in ybN4 if not yvT9.count(YRbF)]\n return yvT9",
"def sHC1(YKHO... | [
"0.7667569",
"0.75754315",
"0.7561445",
"0.7525788",
"0.75179464",
"0.7445483",
"0.7416199",
"0.7410921",
"0.735609",
"0.7353544",
"0.73416585",
"0.73380345",
"0.73179305",
"0.7280441",
"0.7280441",
"0.7262366",
"0.72552925",
"0.72496325",
"0.72495466",
"0.723725",
"0.7227865... | 0.6946169 | 43 |
A dictionary of metainfo for the control device. | def U34r(YKHO) -> dict:
return YKHO._info | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GWuV(YKHO) -> cuzp[str, any]:\n return {'identifiers': {(Sugg, YKHO.charger.id)}, 'name': YKHO.charger.name, 'manufacturer': 'Easee', 'model': 'Charging Robot'}",
"def GWuV(YKHO):\n return {'identifiers': {(Sugg, YKHO._mac_address)}, 'name': YKHO._device_name, 'manufacturer': YhHo, PlJk: eLt7}",
"def... | [
"0.74864393",
"0.74701977",
"0.7424439",
"0.7398988",
"0.7398988",
"0.7397214",
"0.73884106",
"0.7371415",
"0.736286",
"0.7356958",
"0.72804826",
"0.7278144",
"0.7267977",
"0.72460586",
"0.7239608",
"0.7229345",
"0.7212451",
"0.7177569",
"0.7171896",
"0.7165127",
"0.71589726"... | 0.0 | -1 |
A unique device identifier created by the coordinator for this device extension. The identier is typically something associated with the protocol. | def zWJe(YKHO):
return YKHO._extid | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ShR8(YKHO) -> str:\n return YKHO._device.device_id",
"def jf3N(YKHO):\n return YKHO.unique_id",
"def ShR8(YKHO):\n return YKHO._device.device_uuid",
"def ShR8(YKHO):\n return YKHO._device.device_id",
"def ShR8(YKHO):\n return YKHO._device.device_id",
"def ShR8(YKHO):\n return YKHO._... | [
"0.8394257",
"0.83113503",
"0.82584774",
"0.8242275",
"0.8242275",
"0.8227914",
"0.81949615",
"0.8173183",
"0.81721914",
"0.81172603",
"0.81172603",
"0.81152064",
"0.80994135",
"0.8089943",
"0.8081249",
"0.8081249",
"0.8027035",
"0.8006501",
"0.79956174",
"0.7968499",
"0.7968... | 0.0 | -1 |
A network location the device extension is referenced to. | def Rci7(YKHO):
return YKHO._location | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def koOB(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'device_location')",
"def RYr6(YKHO):\n return YKHO.__netloc",
"def d_NA(YKHO):\n return YKHO.file.uri",
"def feQP(YKHO):\n pass",
"def Rci7(YKHO) -> str:\n pass",
"def koOB(YKHO):\n return YKHO._properties.get('SPDRP_LOCATION_INFORMA... | [
"0.66109544",
"0.647474",
"0.6328837",
"0.6248532",
"0.62291354",
"0.62221366",
"0.60699767",
"0.60639596",
"0.60514516",
"0.60222626",
"0.6021403",
"0.6000414",
"0.5994602",
"0.5947679",
"0.593812",
"0.59252185",
"0.5923325",
"0.5920857",
"0.59196573",
"0.591127",
"0.591127"... | 0.5712417 | 88 |
Rasterize a polygon dataset, aligning the extent with a target raster. Args | def r96p(e6Uy, I0Ta, dFkG, hkS8, vJPk=False):
rxEN = ITS7.clock()
mIJV = MDcw.OpenShared(dFkG)
oxOY, XP5J = Hy7s.path.split(e6Uy)
z9bW, YBcr = Hy7s.path.splitext(XP5J)
RKD7.info('Rasterize features - datasource: {}, layer: {}'.format(oxOY, z9bW))
uXLR = K40W.OpenShared(oxOY)
dAUH = uXLR.GetL... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jROS(YKHO):\n r8hN = nkvf()\n Nag0 = 'output/raster_out1b.tif'\n f7x6 = [-78.363529863, -78.321863213, 0.817435788, 0.850435788]\n r8hN.rasterise(shape_file='sample/shape_sample.shp', raster_file=Nag0, x_res=0.00833333, y_res=0.001, extent=f7x6)\n YKHO.assertTrue(Hy7s.path.exists(Nag0))\n Hts... | [
"0.63285893",
"0.6208737",
"0.59691995",
"0.5962532",
"0.59191453",
"0.58693767",
"0.58616394",
"0.57763183",
"0.5741768",
"0.5719924",
"0.5684302",
"0.56799424",
"0.5672133",
"0.5654927",
"0.56435746",
"0.5640195",
"0.5629033",
"0.56125414",
"0.56092876",
"0.55794495",
"0.55... | 0.6512163 | 0 |
This function will sort strings with numeric values in natural ascending order, such that it does not go 1,11,2 etc. | def TGDD(vC9B):
a8Pe = lambda l5Ny: int(l5Ny) if l5Ny.isdigit() else l5Ny.lower()
l35E = lambda H5ew: [a8Pe(Z9rn) for Z9rn in ZbWC.split('([0-9]+)', H5ew)]
return sorted(vC9B, key=l35E) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TGDD(vC9B):\n a8Pe = lambda l5Ny: int(l5Ny) if l5Ny.isdigit() else l5Ny\n l35E = lambda H5ew: [a8Pe(Z9rn) for Z9rn in ZbWC.split('([0-9]+)', H5ew)]\n vC9B.sort(key=l35E)\n return vC9B",
"def mSKC(vC9B):\n a8Pe = lambda l5Ny: int(l5Ny) if l5Ny.isdigit() else l5Ny\n l35E = lambda H5ew: [a8Pe(... | [
"0.8121878",
"0.80549246",
"0.80502886",
"0.80131286",
"0.80061543",
"0.8005047",
"0.7998768",
"0.79915273",
"0.79741645",
"0.79590446",
"0.79142815",
"0.790295",
"0.78123575",
"0.7810927",
"0.780101",
"0.7798029",
"0.7786991",
"0.7782452",
"0.7744212",
"0.7735635",
"0.771605... | 0.7984517 | 8 |
Create new user with validated data. uses the create_user method of the defined user model instead of the default model create method. | def eLpg(YKHO, vGfb):
return egNl().objects.create_user(**vGfb) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eLpg(YKHO, vGfb):\n return egNl().objects.create_user(**vGfb)",
"def eLpg(YKHO, vGfb):\n return egNl().objects.create_user(**vGfb)",
"def eLpg(YKHO, vGfb):\n return mv1M.objects.create_user(**vGfb)",
"def eLpg(YKHO, vGfb):\n return mv1M.objects.create(**vGfb)",
"def eLpg(YKHO, vGfb):\n r... | [
"0.8850946",
"0.8826686",
"0.8794151",
"0.861971",
"0.861971",
"0.861971",
"0.861971",
"0.861971",
"0.861971",
"0.8613797",
"0.84956855",
"0.84872097",
"0.8465194",
"0.84359705",
"0.840717",
"0.83890843",
"0.83689606",
"0.8289818",
"0.82714",
"0.8265178",
"0.82447344",
"0.8... | 0.88677436 | 0 |
Broadcast y[i], flatten event shape of y[i], return y[i][..., j]. | def oGgq(YRbF, r845):
def kZrW(*QTBn):
Ylbp = FYKK(*QTBn)
Ylbp = list(Ylbp) if FJCV(Ylbp) else [Ylbp]
if len(Ylbp) != len(QTBn):
Ylbp *= len(QTBn)
Ylbp = [ZylS.reshape(Mkmy + ZylS.zeros_like(KCHu), ZylS.concat([rIHd, [-1]], -1)) for Mkmy, KCHu in zip(Ylbp, QTBn)]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GpVy(YKHO) -> oLG2.ndarray:\n if YKHO._is_segmented:\n return YKHO._y.reshape((-1, YKHO._y.shape[-1]))\n return YKHO._y",
"def apyL(LVAh):\n LVAh = oyIN.column_stack(LVAh)\n OTw7 = dict()\n return (oyIN.squeeze(LVAh), OTw7)",
"def KVH6(YKHO, nPrm: np.ndarray) -> oyIN.ndarray:\n ret... | [
"0.6522982",
"0.58504623",
"0.5712031",
"0.56613845",
"0.5627483",
"0.562043",
"0.56079835",
"0.55795676",
"0.55076367",
"0.54868984",
"0.5484705",
"0.5462738",
"0.54242337",
"0.5390036",
"0.5372691",
"0.5371775",
"0.53593606",
"0.5356141",
"0.5346358",
"0.53256536",
"0.52973... | 0.4898316 | 75 |
Helper which returns `True` if input is `list`like. | def FJCV(WKvO):
return isinstance(WKvO, (tuple, list)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Lm1b(input):\n return type(input) == jbQU",
"def Kuz2(WKvO):\n return isinstance(WKvO, (tuple, list))",
"def Kuz2(YEnM: typing.Any) -> bool:\n return isinstance(YEnM, UF2R) and (not (isinstance(YEnM, str) or ygM9(YEnM)))",
"def Kuz2(YEnM):\n return isinstance(YEnM, UF2R) and (not (isinstance(... | [
"0.8570786",
"0.8396942",
"0.8343068",
"0.8319958",
"0.83161813",
"0.829972",
"0.8291273",
"0.8235081",
"0.82345855",
"0.8195653",
"0.8024631",
"0.79719895",
"0.79294187",
"0.79294187",
"0.7910564",
"0.78600335",
"0.7857066",
"0.78551304",
"0.77819175",
"0.77687836",
"0.77672... | 0.8474938 | 1 |
generates a unique sequence from an iterable but keeps the original order. | def a4ZY(OxJJ):
PwWw = set()
for bvAL in OxJJ:
if bvAL not in PwWw:
PwWw.add(bvAL)
yield bvAL | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PYMC(OxJJ):\n return list(UfHm(OxJJ))",
"def kcwm(OxJJ: typing.Iterable[typing.Any]):\n PwWw = set()\n for ZfUD in OxJJ:\n if ZfUD not in PwWw:\n PwWw.add(ZfUD)\n yield ZfUD",
"def gvve(OxJJ):\n A6b2 = []\n for YRbF in OxJJ:\n if YRbF not in A6b2:\n ... | [
"0.75210834",
"0.7273039",
"0.7203998",
"0.71306384",
"0.71024",
"0.7070974",
"0.7043688",
"0.7004622",
"0.7004622",
"0.7004622",
"0.69912606",
"0.6981073",
"0.69202995",
"0.68926173",
"0.68354195",
"0.68349385",
"0.6818252",
"0.6803294",
"0.67448294",
"0.67361",
"0.67010325"... | 0.6953401 | 12 |
separates the elements of an iterable into two lists, one where alle elements satisfy a given predicate, and one where they don't. Die guten ins Toepfchen, die schlechten ins Kroepfchen. | def JUzP(OxJJ, lgNN):
Csk6 = {True: [], False: []}
for bvAL in OxJJ:
Csk6[lgNN(bvAL)].append(bvAL)
return (Csk6[True], Csk6[False]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qrt_(OxJJ, lgNN=bool):\n jzdc, Fg_i = Hs6x.tee(((lgNN(WKvO), WKvO) for WKvO in OxJJ))\n return ((WKvO for nvEb, WKvO in jzdc if not nvEb), (WKvO for nvEb, WKvO in Fg_i if nvEb))",
"def Qrt_(lgNN, OxJJ):\n n2Q1, SpII = Hs6x.tee(OxJJ)\n return (Hs6x.filterfalse(lgNN, n2Q1), filter(lgNN, SpII))",
... | [
"0.7698716",
"0.7638131",
"0.75383747",
"0.75068736",
"0.745857",
"0.73983556",
"0.73908025",
"0.7347498",
"0.73400545",
"0.73126256",
"0.73126256",
"0.7296734",
"0.7271141",
"0.7195766",
"0.716236",
"0.71261066",
"0.70575255",
"0.70270824",
"0.6918672",
"0.6872737",
"0.67969... | 0.73574895 | 7 |
Transform the target using the fitted label encoder. | def SZFh(YKHO, EcVT, LVAh=None):
if LVAh is None:
return (EcVT, LVAh)
qEw8 = rkCH(LVAh)
v173 = YKHO._component_obj.transform(qEw8)
v173 = rLdf.Series(v173, index=qEw8.index)
return (EcVT, Rs4w.init_series(v173)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NrUC(YKHO):\n UYOu = nu0g()\n YKHO.Train_y = UYOu.fit_transform(YKHO.Train_y)\n YKHO.Test_y = UYOu.fit_transform(YKHO.Test_y)",
"def BCdq(pan_):\n LJE9 = ZvG6.label.LabelEncoder()\n LJE9.fit(pan_)\n pan_ = LJE9.transform(pan_)\n return pan_",
"def yIF6(YKHO, LVAh: np.ndarray) -> oyIN.n... | [
"0.802691",
"0.6967385",
"0.6766975",
"0.67366993",
"0.6647744",
"0.65078044",
"0.64252853",
"0.63928854",
"0.6376993",
"0.6299812",
"0.6284591",
"0.6277251",
"0.62711734",
"0.62629503",
"0.62618786",
"0.6258386",
"0.6220855",
"0.6206565",
"0.6198517",
"0.61734957",
"0.615332... | 0.0 | -1 |
Saves json to disk | def U1ai(n80H, qQXR):
with open(n80H, 'w') as CQmM:
ZePR.dump(qQXR, CQmM, indent=4) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eGRE(YKHO, pmON):\n with open(pmON, 'w') as _RR0:\n qQXR.dump(YKHO.data, _RR0)",
"def xkzz(YKHO):\n if YKHO.path:\n YKHO.saved = True\n with open(YKHO.path, 'w') as eHNT:\n eHNT.write(YKHO.json())",
"def xkzz(YKHO, pmON: str):\n eHNT = open(pmON, 'w')\n eHNT.writ... | [
"0.8320931",
"0.82847905",
"0.82185626",
"0.81680375",
"0.8133151",
"0.8067231",
"0.806501",
"0.8035139",
"0.7956319",
"0.7946066",
"0.7946066",
"0.7946066",
"0.7926657",
"0.7913999",
"0.7913347",
"0.7894949",
"0.78891385",
"0.7880988",
"0.78753513",
"0.786706",
"0.78100497",... | 0.7651821 | 49 |
Context manager helper to change CWD for a with code block and restore it at the end | def odGb(pmON):
b4dd = Hy7s.getcwd()
try:
Hy7s.chdir(pmON)
yield
finally:
Hy7s.chdir(b4dd) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RpCt(pmON):\n b4dd = Hy7s.getcwd()\n Hy7s.chdir(str(pmON))\n try:\n yield\n finally:\n Hy7s.chdir(b4dd)",
"def jAYP():\n LiBE = Hy7s.getcwd()\n try:\n yield\n finally:\n Hy7s.chdir(LiBE)",
"def QK8O():\n AOBR = Hy7s.getcwd()\n try:\n yield\n ... | [
"0.6817396",
"0.67429644",
"0.6740469",
"0.6691659",
"0.64585036",
"0.6399812",
"0.637141",
"0.6354789",
"0.63045835",
"0.63036865",
"0.62217385",
"0.62217385",
"0.6208591",
"0.6208591",
"0.6200765",
"0.6200765",
"0.61757743",
"0.617079",
"0.6165206",
"0.6162019",
"0.6155126"... | 0.62663 | 10 |
Construct dataloaders for training and test data. Data augmentation is also done here. | def lnpC(pmON='./data', BsfS=True, Ep8u=100, iNjS=2):
B2fa = {'num_workers': 1, 'pin_memory': True}
Pa1c = ht2j.utils.data.DataLoader(gMbG.MNIST(pmON, train=True, download=BsfS, transform=Ymkf.Compose([Ymkf.RandomCrop(size=28, padding=iNjS), Ymkf.ToTensor()])), batch_size=Ep8u, shuffle=True, **B2fa)
Blhr = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YSfv(YKHO):\n _Fei = sHyf\n geJW = jeFo([_J6p(), NBqJ((_Fei.mean,), (_Fei.std,))])\n nyaT = {'root': _Fei.root, 'transform': geJW}\n D0Gl = LLx7(train=True, download=True, **nyaT)\n Ycu5 = LLx7(train=False, download=False, **nyaT)\n YKHO.train_loader = pVAc(D0Gl, shuffle=True, batch_size=vvPh... | [
"0.7643258",
"0.7475349",
"0.74110085",
"0.73819286",
"0.73164475",
"0.72976524",
"0.729491",
"0.7256223",
"0.72422516",
"0.7211602",
"0.7195511",
"0.7195471",
"0.71932584",
"0.7187956",
"0.7176584",
"0.7174472",
"0.71702874",
"0.7169175",
"0.7163941",
"0.71522635",
"0.714753... | 0.72233456 | 9 |
Evaluates the knearest neighbours in `X` of each point in `XStar` \n | def xdO2(EcVT, jxdL, I1mm, G1Hx=8):
if I1mm == 'knn':
myQS = PYVH.NearestNeighbors(n_neighbors=G1Hx, algorithm='brute').fit(EcVT)
pImw, QyVM = myQS.kneighbors(jxdL)
elif I1mm == 'hnsw':
ywwl = EcVT.shape[0]
IVc7 = oyIN.arange(ywwl)
XP5J = rlWu.Index(space='l2', dim=EcVT.s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yCcF(EcVT, LVAh, JZXy, G1Hx, KLpe=AsuX):\n bdGm = []\n for YRbF, AU8u in enumerate(EcVT):\n pImw = KLpe(JZXy, AU8u)\n bdGm.append((AU8u, pImw, LVAh[YRbF]))\n bdGm.sort(key=lambda exwG: exwG[1])\n r8hN = len(EcVT)\n if len(bdGm) < G1Hx:\n ValueError(f'cannot return {G1Hx} nei... | [
"0.6955829",
"0.6892283",
"0.68093455",
"0.65424174",
"0.6527667",
"0.6517646",
"0.64569455",
"0.64274055",
"0.64114743",
"0.6402898",
"0.63955885",
"0.63460714",
"0.6311136",
"0.6311136",
"0.6311136",
"0.6310867",
"0.62997395",
"0.6296604",
"0.6263995",
"0.6248905",
"0.62383... | 0.7128572 | 0 |
Insert nodes to the tree | def JPHp(YKHO, Q6kx, _AKB, filter=None):
for aUGN in Q6kx:
if aUGN.attrib['Type'] != filter:
iIih = YKHO.tree.insert(_AKB, FRMp, text=aUGN.attrib['Title'], values=[aUGN.attrib['Type'], aUGN.attrib['Image'].split('\\')[1]], open=True, tags='filter')
YKHO.insert(aUGN, iIih, filter)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uMb_(YKHO, Ziit):\n if type(Ziit) == int:\n Ziit = [Ziit]\n for Q6kx in Ziit:\n YKHO.tree.append(Q6kx)\n YKHO.check(len(YKHO.tree) - 1)",
"def JPHp(YKHO, Ziit):\n if Ziit == []:\n return YKHO\n Q6kx = Ziit[0]\n aUGN = YKHO.get_child(Q6kx)\n if not aUGN:\n ... | [
"0.80764985",
"0.7626235",
"0.7403006",
"0.7402484",
"0.71890515",
"0.71578264",
"0.70810455",
"0.7050127",
"0.6991329",
"0.69269925",
"0.69268316",
"0.69226664",
"0.69215876",
"0.688778",
"0.6887113",
"0.6881893",
"0.68653756",
"0.6849179",
"0.6799826",
"0.67902464",
"0.6789... | 0.0 | -1 |
List the device groups for the catalog. | def kJjL(pdYU: Optional[str]=None, Lwsy: Optional[str]=None, filter: Optional[str]=None, B5sx: Optional[int]=None, TRLE: Optional[str]=None, EdbX: Optional[int]=None, tlxW: Optional[int]=None, VKhi: Optional[pulumi.InvokeOptions]=None) -> cAuQ:
rYZf = dict()
rYZf['catalogName'] = pdYU
rYZf['deviceGroupName'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gtlm(YKHO):\n YKHO.__cgroups_list = R7aA(YKHO.__device)",
"def qnba():\n Fqo_ = QpfX.GLOBAL.zk.conn\n moMn = [LDIG.get_identity_group(Fqo_, uOe2) for uOe2 in LDIG.identity_groups(Fqo_)]\n GSyo.out(uaPq(moMn))",
"def Xmem(YKHO):\n return map(YKHO.__getPUS().getGroupById, YKHO.__getPUS().getGr... | [
"0.735181",
"0.71577525",
"0.7113583",
"0.6836787",
"0.68304384",
"0.6817459",
"0.6807792",
"0.6746153",
"0.6655035",
"0.6644041",
"0.6574523",
"0.65653706",
"0.65284395",
"0.6525789",
"0.6454507",
"0.6451843",
"0.6409059",
"0.6399647",
"0.63908404",
"0.63732755",
"0.6364562"... | 0.716255 | 1 |
List the device groups for the catalog. | def m0Aq(pdYU: Optional[pulumi.Input[str]]=None, Lwsy: Optional[pulumi.Input[Optional[str]]]=None, filter: Optional[pulumi.Input[Optional[str]]]=None, B5sx: Optional[pulumi.Input[Optional[int]]]=None, TRLE: Optional[pulumi.Input[str]]=None, EdbX: Optional[pulumi.Input[Optional[int]]]=None, tlxW: Optional[pulumi.Input[O... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gtlm(YKHO):\n YKHO.__cgroups_list = R7aA(YKHO.__device)",
"def kJjL(pdYU: Optional[str]=None, Lwsy: Optional[str]=None, filter: Optional[str]=None, B5sx: Optional[int]=None, TRLE: Optional[str]=None, EdbX: Optional[int]=None, tlxW: Optional[int]=None, VKhi: Optional[pulumi.InvokeOptions]=None) -> cAuQ:\n ... | [
"0.735181",
"0.716255",
"0.71577525",
"0.7113583",
"0.6836787",
"0.68304384",
"0.6817459",
"0.6807792",
"0.6746153",
"0.6655035",
"0.6644041",
"0.65653706",
"0.65284395",
"0.6525789",
"0.6454507",
"0.6451843",
"0.6409059",
"0.6399647",
"0.63908404",
"0.63732755",
"0.6364562",... | 0.6574523 | 11 |
Creates a boolean option that stores ``True`` or ``False`` if set. Accepted syntax is ``[no]opt[=on/off]``. | def bool(mWFP):
return pifZ(mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qjWj(YKHO, MTKo, apAw, bGrB, wvEv):\n setattr(wvEv.values, MTKo.dest, not apAw.startswith('--no'))",
"def qjWj(YKHO, MTKo, apAw, bGrB, wvEv):\n setattr(wvEv.values, MTKo.dest, not apAw.startswith('--no'))",
"def qZV7(YKHO, LW_l, wi12, WmM4, mWFP, JBZA):\n Csk6 = {True: 'store_true', False: 'store_... | [
"0.77058166",
"0.77058166",
"0.71841973",
"0.70831263",
"0.70176005",
"0.6918529",
"0.6896144",
"0.6880284",
"0.6838355",
"0.68170047",
"0.6801984",
"0.67771703",
"0.6738537",
"0.6716521",
"0.66679615",
"0.6600933",
"0.6581235",
"0.6530972",
"0.65142584",
"0.6455666",
"0.6444... | 0.7389402 | 2 |
Test calling a view that does not exist. The error is simple enough that it should throw an exception when the view called is missing. | def TwUm():
e1uE = tTee.View('Test')
try:
e1uE.render()
assert False
except:
assert True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ha4_(YKHO):\n YKHO.dummy_user_fixture()\n from anuket.views.user import user_show_view\n QePW = vJMg()\n QePW.matchdict = {'user_id': 0}\n geh0 = user_show_view(QePW)\n YKHO.assertEqual(geh0.location, '/tools/user')\n YKHO.assertEqual(QePW.session.pop_flash('error')[0], u'This user did not... | [
"0.77473557",
"0.76402783",
"0.7553957",
"0.74202067",
"0.73443764",
"0.73443764",
"0.7315456",
"0.73126376",
"0.73061645",
"0.72092366",
"0.71624833",
"0.71596324",
"0.7126603",
"0.7122559",
"0.7119311",
"0.71044046",
"0.70972466",
"0.70259243",
"0.70137507",
"0.69727325",
"... | 0.88929087 | 0 |
Converts transcript texts to sequences of vocab indices for characters. | def urKC(o9Hv, CtWL, IAFq):
Ff8l = []
gqbN = len(CtWL)
for U5cv in o9Hv:
V22M = U5cv.split()
Crrw = []
for YRbF in range(len(V22M)):
GIN8 = V22M[YRbF]
if GIN8 in IAFq:
UXqs = IAFq.index(GIN8) + gqbN
Crrw.append(UXqs)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LADg(YKHO, z_aV):\n P8ux = []\n for l5Ny in z_aV:\n i8WE = []\n for YRbF in range(0, len(l5Ny)):\n BWXx = YKHO.word_index.get(l5Ny[YRbF].encode('utf-8'))\n if BWXx is not None:\n i8WE.append(BWXx)\n else:\n i8WE.append(0)\n ... | [
"0.7425155",
"0.6838166",
"0.6696221",
"0.656658",
"0.6511732",
"0.6433493",
"0.64165664",
"0.63979036",
"0.6365201",
"0.63507485",
"0.63097346",
"0.6282015",
"0.6272634",
"0.6268744",
"0.6220204",
"0.62177026",
"0.61856914",
"0.61759657",
"0.6158777",
"0.6155802",
"0.6144609... | 0.5689579 | 100 |
r"""Split a predicted bounding box into box coordinates, probability score, and predicted class. This implementation supports multiple score assignments for each box. It is expected that ``target`` be ordered along the last dimension as ``bbox``, ``scores``, ``class``. | def kehp(pan_: Tensor, YAIy: Union[bool, Iterable[int]]=False) -> AzJI[llWB, ...]:
fEg7(pan_, 'target')
cviu = pan_[..., :4]
cCrA = pan_[..., 4:-1]
Emd4 = pan_[..., -1:]
if isinstance(YAIy, bool) and (not YAIy):
return (cviu, cCrA, Emd4)
MK8i = cCrA.shape[-1]
if isinstance(YAIy, bool... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oNcH(YKHO, pJb0, dnMe, x6A0):\n assert len(pJb0) == len(dnMe)\n d3XD = len(pJb0)\n Wr8h = [pJb0[YRbF].shape[-2:] for YRbF in range(d3XD)]\n agIq = YKHO.anchor_generator.grid_anchors(Wr8h)\n dfOq = []\n for CWDC, pan_ in enumerate(x6A0):\n Barb = [pJb0[YRbF][CWDC].detach() for YRbF in r... | [
"0.6652882",
"0.6203022",
"0.6196978",
"0.61525553",
"0.61241984",
"0.6116122",
"0.6102103",
"0.6035051",
"0.60101473",
"0.5994756",
"0.5983394",
"0.593308",
"0.5890847",
"0.5843869",
"0.58263487",
"0.5816485",
"0.5797622",
"0.57939214",
"0.57793283",
"0.5763628",
"0.57420003... | 0.74920607 | 0 |
r"""Combine a bounding box coordinates and labels into a single label. Combined tensor will be ordered along the last dimension as ``bbox``, ``scores``, ``cls``. | def e1iZ(cviu: Tensor, Emd4: Tensor, cCrA: Tensor, *YB2e) -> llWB:
fEg7(cviu, 'bbox')
fEg7(cCrA, 'scores')
fEg7(Emd4, 'cls')
if cviu.shape[-1] != 4:
raise ValueError(f'Expected bbox.shape[-1] == 4, found shape {cviu.shape}')
return ht2j.cat([cviu, cCrA, *YB2e, Emd4], dim=-1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f5IW(cviu: Tensor, UXqs: Tensor, *aQAg) -> llWB:\n fEg7(cviu, 'bbox')\n fEg7(UXqs, 'label')\n if cviu.shape[-1] != 4:\n raise ValueError(f'Expected bbox.shape[-1] == 4, found shape {cviu.shape}')\n if cviu.shape[:-1] != UXqs.shape[:-1]:\n raise ValueError(f'Expected bbox.shape[:-1] ==... | [
"0.7549909",
"0.7028891",
"0.65136254",
"0.6486367",
"0.6433877",
"0.6420099",
"0.6407604",
"0.6360452",
"0.6341692",
"0.6335968",
"0.6306194",
"0.628175",
"0.62518346",
"0.6230364",
"0.61331743",
"0.612978",
"0.6119801",
"0.6079594",
"0.60741335",
"0.6069778",
"0.6020873",
... | 0.7801121 | 0 |
r"""Flattens a batch of bounding box target tensors, removing padded locations | def VUuD(pan_: Tensor, KHPh: float=-1) -> x1iM[llWB]:
fEg7(pan_, 'target')
LBGk = (pan_ == KHPh).all(dim=-1)
rcLZ = (~LBGk).nonzero(as_tuple=True)
return pan_[rcLZ] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Duwj(pan_: Tensor, KHPh: float=-1) -> x1iM[llWB]:\n fEg7(pan_, 'target')\n LBGk = (pan_ == KHPh).all(dim=-1)\n rcLZ = (~LBGk).nonzero(as_tuple=True)\n NRKC = pan_[rcLZ]\n O40W = rcLZ[0].unique(return_counts=True)[1]\n return ht2j.split(NRKC, O40W.tolist(), dim=0)",
"def cZZP(pan_: List[Tens... | [
"0.71922135",
"0.64503103",
"0.618153",
"0.6066501",
"0.6046544",
"0.6002595",
"0.5989393",
"0.59360653",
"0.5926056",
"0.59124416",
"0.5855272",
"0.5855272",
"0.5842636",
"0.58290523",
"0.58112645",
"0.577815",
"0.5728751",
"0.5717616",
"0.5711932",
"0.57052124",
"0.5694948"... | 0.69274414 | 1 |
Create genesis block and add it to the chain | def RsZu(YKHO):
XkN1 = {'index': 1, 'timestamp': 0, 'transactions': [], 'proof': 42, 'previous_hash': 1} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RsZu(YKHO):\n BZTK = n3Kt(0, [], ITS7.time(), '0')\n BZTK.hash = BZTK.compute_hash()\n YKHO.chain.append(BZTK)",
"def tBOj(YKHO):\n cb0j = n3Kt(None, None)\n if n3Kt.isValidBlock(cb0j):\n YKHO.blocks.append(cb0j)",
"def RsZu():\n return n3Kt(0, _c1T.datetime.now(), 'Genesis Block',... | [
"0.9000705",
"0.8457453",
"0.8360244",
"0.83010185",
"0.8262474",
"0.823418",
"0.81768036",
"0.80767226",
"0.80099976",
"0.7907346",
"0.7664633",
"0.76455164",
"0.7606686",
"0.7603867",
"0.75665855",
"0.7559138",
"0.7465798",
"0.73796785",
"0.7349414",
"0.72933817",
"0.725266... | 0.81333375 | 7 |
Get list of business categories | def vgvq(uIcv: Path=None) -> x1iM[cuzp]:
def i1As(uIcv: Path=uIcv):
if uIcv is None:
uIcv = GkAb(GPtr.DATA_LOC) / '6-digit_2017_Codes.csv'
CqMj = {}
with open(uIcv, newline='', encoding='utf-8-sig') as rprY:
N5Pj = m6_J.reader(rprY)
WBPg = next(N5Pj)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LQuW(YKHO):\n pass",
"def LQuW(YKHO):\n return YKHO.categories.all()",
"def LQuW(YKHO):\n return YKHO.categories.all()",
"def NMoC(YKHO):\n return LeZt",
"def iZZp(XJob):\n zSv7 = W9k0.objects.filter(business_id=XJob)\n pjtn = []\n for iIih in zSv7:\n DJCu = eorc.objects.get... | [
"0.7602209",
"0.7590593",
"0.7590593",
"0.7579337",
"0.7577032",
"0.7549337",
"0.75290537",
"0.75148386",
"0.75120974",
"0.751018",
"0.74992144",
"0.7479836",
"0.7471901",
"0.7418073",
"0.7401547",
"0.7394855",
"0.7375958",
"0.7356878",
"0.7307312",
"0.72858334",
"0.727242",
... | 0.0 | -1 |
Returns a date string formatted a '%Y%m%d' for today | def vSns(YKHO):
i8WE = 'America/New_York'
JRYC = C8Si(ts=i8WE)
ITS7 = qcWV.now(tz=rIAI(i8WE)).today().strftime('%Y-%m-%d')
YKHO.assertEqual(JRYC, ITS7) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gVTZ() -> str:\n return qcWV.datetime.today().strftime('%Y-%m-%d')",
"def DeyU():\n JUFO = qcWV.now()\n return str(JUFO.strftime('%Y-%m-%d'))",
"def nsX0():\n DibD = qcWV.datetime.now()\n return DibD.strftime('%d-%b-%Y')",
"def yFTO():\n wzkt = qcWV.now()\n return wzkt.strftime('%Y/%... | [
"0.8613914",
"0.8593223",
"0.85622954",
"0.85565746",
"0.8473702",
"0.8470251",
"0.8414097",
"0.8390007",
"0.8374901",
"0.82342833",
"0.82310903",
"0.81871194",
"0.8129235",
"0.8128984",
"0.8031147",
"0.7978865",
"0.79728186",
"0.7895748",
"0.7884434",
"0.783746",
"0.78350514... | 0.0 | -1 |
Returns a printable representation of a failed Google API's status.proto. | def HEA6(P1dF):
RKD7.debug('Error:\n' + tZ2K.MessageToJson(P1dF))
WzAI = P1dF.message
if P1dF.details and RKD7.GetVerbosity() <= RKD7.info:
WzAI += '\nDetails:\n' + tZ2K.MessageToJson(P1dF.details)
return WzAI | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kRuZ(jGRS, Ol8d):\n G9jH.info('Generating failure response with status : {}'.format(jGRS.value))\n return ({'message': Ol8d}, jGRS.value)",
"def S_Qd(jGRS):\n yEHD = ['Optimization terminated successfully.', 'The iteration limit was reached before the algorithm converged.', 'The algorithm terminated... | [
"0.6677861",
"0.6504274",
"0.6337796",
"0.6324936",
"0.626927",
"0.62178403",
"0.61959404",
"0.6113741",
"0.60150665",
"0.5981452",
"0.59563786",
"0.59524226",
"0.5933406",
"0.5917191",
"0.5908187",
"0.589749",
"0.589546",
"0.5885521",
"0.5867278",
"0.585986",
"0.58504325",
... | 0.0 | -1 |
Calculate the Haversine distance in kilometers of two points on Earth | def xvI2(lbxZ, m8jL):
return GeVo.haversine(lbxZ[::-1], m8jL[::-1]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PSf0(GgQG, igSk, tk0B, TGuP):\n GgQG, igSk, tk0B, TGuP = map(Y_1E, [GgQG, igSk, tk0B, TGuP])\n H91H = tk0B - GgQG\n n_9K = TGuP - igSk\n jzdc = YUNn(n_9K / 2) ** 2 + YhSR(igSk) * YhSR(TGuP) * YUNn(H91H / 2) ** 2\n Z9rn = 2 * P099(PZyS(jzdc))\n q5XV = 6367 * Z9rn\n return q5XV",
"def GeVo... | [
"0.8361758",
"0.81914496",
"0.815978",
"0.81542534",
"0.8129752",
"0.81207025",
"0.81156355",
"0.8094254",
"0.80921996",
"0.80921996",
"0.8085765",
"0.8081935",
"0.80618495",
"0.80564135",
"0.80409306",
"0.80323535",
"0.80323535",
"0.80310875",
"0.8023284",
"0.8021925",
"0.80... | 0.0 | -1 |
Wrapper for inserting int64 features into Example proto. | def Oety(BWXx):
if not isinstance(BWXx, list):
BWXx = [BWXx]
return ZylS.train.Feature(int64_list=ZylS.train.Int64List(value=BWXx)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Wgnv(PU1l, BZ2A, kAne):\n PU1l.features.feature[BZ2A].int64_list.value.append(kAne)",
"def Oety(BWXx):\n return ZylS.train.Feature(int64_list=ZylS.train.Int64List(value=[BWXx]))",
"def Oety(BWXx):\n BWXx = int(BWXx)\n return ZylS.train.Feature(int64_list=ZylS.train.Int64List(value=[BWXx]))",
... | [
"0.7374892",
"0.73494405",
"0.73194486",
"0.7301892",
"0.7301892",
"0.7301892",
"0.7301892",
"0.7301892",
"0.7301892",
"0.7301892",
"0.7301892",
"0.7301892",
"0.7301892",
"0.7301892",
"0.7301892",
"0.7301892",
"0.7301704",
"0.7300591",
"0.72966045",
"0.72966045",
"0.72966045"... | 0.7178785 | 66 |
Check if path is an existing file. | def EFYe(pmON):
if not Hy7s.path.isfile(pmON):
if Hy7s.path.isdir(pmON):
tO9_ = '{0} is a directory'.format(pmON)
else:
tO9_ = '{0} does not exist.'.format(pmON)
raise j1Jz.ArgumentTypeError(tO9_)
return pmON | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def poxP(pmON):\n return EFYe(pmON)",
"def Hat5(pmON: str):\n if Hy7s.path.isfile(pmON):\n return True\n return False",
"def IeRR(pmON):\n return Hy7s.path.isfile(pmON)",
"def JgkM(pmON):\n if Hy7s.path.isfile(pmON):\n return True\n else:\n return False",
"def poxP(pm... | [
"0.8621865",
"0.8423821",
"0.84183437",
"0.8388314",
"0.83540815",
"0.8347232",
"0.8290108",
"0.8282429",
"0.82487947",
"0.821282",
"0.8165733",
"0.8139205",
"0.81230056",
"0.81199926",
"0.81057936",
"0.8103556",
"0.8100323",
"0.80803996",
"0.8076761",
"0.80714184",
"0.806972... | 0.0 | -1 |
Test that the `fetch` method works as expected. | def PKPF(YKHO):
q7dD = GLG2.from_str('fetchai/erc1155:0.6.0')
hLKG = YKHO.registry.fetch(cIM4(cXbK.CONTRACT, q7dD))
assert isinstance(hLKG, oBwI)
assert hLKG.id == q7dD | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PKPF(YKHO):\n YKHO.redisTask.redis.blpop.return_value = ['rpc_tasks', '{\"task_id\": \"1\", \"time_updated\": 10}']\n XuL0 = YKHO.redisTask.fetch()\n YKHO.assertEqual('1', XuL0['task_id'])\n YKHO.assertEqual(10, XuL0['time_updated'])",
"def PKPF(YKHO):\n YKHO.cgd_test.fetch()\n return",
"... | [
"0.76730144",
"0.76690936",
"0.75610226",
"0.7321378",
"0.73052406",
"0.72943187",
"0.722997",
"0.72214746",
"0.69388855",
"0.6882316",
"0.68083847",
"0.6743358",
"0.6605997",
"0.6605997",
"0.6605997",
"0.66002494",
"0.65761226",
"0.654161",
"0.6528187",
"0.6528187",
"0.65281... | 0.6590642 | 16 |
Get the LambCI build number corresponding to a particular version | def d6IL(YKHO, DpZH):
NtVn = GPA6.query(KeyConditionExpression=pe5E('project').eq(YKHO.lambci_project_name), FilterExpression=tOni('commit').eq(DpZH), ScanIndexForward=False)['Items']
if len(NtVn) == 0:
raise OO4q(f'No build has been started for {DpZH}. Have you pushed your changes?')
elif len(NtVn... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Uz8_():\n return DpZH",
"def emV5(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'build_version')",
"def JDdh(Cc7Y):\n if not Cc7Y:\n raise u8m8('Build string seems empty')\n GD35 = Cc7Y.split('.')\n try:\n x4_7 = GD35[0]\n except IndexError:\n uXxX(\"Could not get... | [
"0.74621826",
"0.7144753",
"0.703962",
"0.7008676",
"0.6984606",
"0.69346875",
"0.6875884",
"0.6842493",
"0.68261075",
"0.68226737",
"0.67612445",
"0.67518204",
"0.6747099",
"0.6708402",
"0.66972077",
"0.6690774",
"0.66896755",
"0.6687357",
"0.66842926",
"0.66701376",
"0.6649... | 0.7761591 | 0 |
return a onehot list where hot value marks verb | def Yr_5(ZUQm):
Xwt6 = len(ZUQm[0])
Ylbp = [int(YRbF == ZUQm[1]) for YRbF in range(Xwt6)]
return Ylbp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aFAW(KCHu, Crrw):\n eHNT = [0] * len(Crrw)\n eHNT[Crrw.index(KCHu)] = 1\n return eHNT",
"def _fS4(YKHO, KLLm):\n Y_ny = [oyIN.argmax(YRbF) for YRbF in KLLm[0]]\n zSJ2 = [next((H5ew for H5ew, BWXx in YKHO.mapping.items() if BWXx == YRbF)) for YRbF in Y_ny]\n return ''.join(zSJ2)",
"def sAJ... | [
"0.74478686",
"0.7420243",
"0.74022055",
"0.74022055",
"0.74022055",
"0.7391647",
"0.7346625",
"0.72270167",
"0.71824753",
"0.7174764",
"0.71666807",
"0.71530616",
"0.71019316",
"0.7099246",
"0.70847166",
"0.70824224",
"0.70550877",
"0.7051779",
"0.70478326",
"0.6999757",
"0.... | 0.67464834 | 52 |
Overriding setUp function to create temp workspace directory. | def FCbF(YKHO):
YKHO.workspace_dir = gbPf.mkdtemp() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FCbF(YKHO):\n YKHO.workspace_dir = gbPf.mkdtemp()",
"def FCbF(YKHO):\n YKHO.workspace_dir = gbPf.mkdtemp()",
"def FCbF(YKHO):\n YKHO.workspace_dir = gbPf.mkdtemp()",
"def FCbF(YKHO):\n YKHO.workspace = gbPf.mkdtemp()",
"def FCbF(YKHO):\n YKHO.temporary_directory = gbPf.mkdtemp()",
"def... | [
"0.8974281",
"0.8974281",
"0.8974281",
"0.8807173",
"0.8415122",
"0.8362645",
"0.8362645",
"0.8362645",
"0.8362645",
"0.8362645",
"0.8362645",
"0.8291064",
"0.82867855",
"0.8262198",
"0.81676406",
"0.81672776",
"0.81159234",
"0.80274457",
"0.79841244",
"0.7974063",
"0.7956215... | 0.8504484 | 4 |
Returns with an App Engine user or an anonymous user. | def EnMH():
ZBkV = DW23.get_current_user()
if ZBkV:
return WPRk.app_engine_user(ZBkV)
I33c = nz_n(QePW)
if I33c:
return WPRk.ip_address(I33c)
else:
return WPRk() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TKWP(n10L):\n if not n10L:\n return fCU0()\n return TkcJ().get_user(n10L) or fCU0()",
"def TKWP(n10L):\n if not n10L:\n return fCU0()\n return TkcJ().get_user(n10L) or fCU0()",
"def TKWP(n10L=None):\n if not n10L:\n return fCU0()\n return hd8_().get_user(n10L) or fCU0... | [
"0.7804659",
"0.77634513",
"0.75703925",
"0.746306",
"0.7370694",
"0.73075444",
"0.7298066",
"0.72721696",
"0.7172927",
"0.71421194",
"0.7132252",
"0.7120648",
"0.7064871",
"0.70581645",
"0.7055161",
"0.7042425",
"0.7018968",
"0.7013087",
"0.700348",
"0.69989944",
"0.6987801"... | 0.0 | -1 |
Split a string into array of words | def m6nD(YKHO, yAmx):
try:
yAmx = ZbWC.sub('[^\\w ]', '', yAmx)
return [WKvO.strip('.').lower() for WKvO in yAmx.split()]
except TypeError:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dFss(vIwR):\n return PHXD(vIwR).split(' ')",
"def ObYa(V22M):\n return V22M.split(' ')",
"def HPLn(KCHu):\n KCHu = ZbWC.sub('\\\\W+', ' ', KCHu)\n KCHu = ZbWC.sub('[_0-9]+', ' ', KCHu)\n return KCHu.split()",
"def HPLn(KCHu):\n KCHu = ZbWC.sub('\\\\W+', ' ', KCHu)\n KCHu = ZbWC.sub('... | [
"0.79062617",
"0.7868528",
"0.7855625",
"0.7855625",
"0.7760706",
"0.77395034",
"0.77306056",
"0.7699467",
"0.76907647",
"0.76879597",
"0.7674322",
"0.7652853",
"0.765236",
"0.7642822",
"0.7642232",
"0.75915664",
"0.75822365",
"0.75554335",
"0.7538427",
"0.7397405",
"0.734693... | 0.68882966 | 98 |
Add an oauth plugin base to the PluggableAuthentication Service. | def pCyL(qAYJ, id, leAC=None, r9bb=None):
H4yH = t0qN.OauthPluginBase(id, leAC)
qAYJ._setObject(H4yH.getId(), H4yH)
if r9bb is not None:
r9bb['RESPONSE'].redirect('%s/manage_workspace?manage_tabs_message=OauthPluginBase+added.' % qAYJ.absolute_url()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N3W4(YKHO, hbFX, leAC=None, r9bb=None):\n AoyL = bool(r9bb.form.get('configure_after_creation', False))\n bp3S(hbFX, leAC, AoyL)\n if r9bb is not None:\n r9bb['RESPONSE'].redirect('{}/manage_workspace?manage_tabs_message=OGDS+authentication+plugin+added.'.format(YKHO.absolute_url()))",
"def Y... | [
"0.64370525",
"0.637393",
"0.63266015",
"0.5727701",
"0.5679147",
"0.5623145",
"0.5528529",
"0.5446227",
"0.5429133",
"0.5391027",
"0.537993",
"0.5349356",
"0.53169763",
"0.53121835",
"0.53022224",
"0.52869517",
"0.5262922",
"0.52209896",
"0.5212635",
"0.5193306",
"0.5164623"... | 0.7459222 | 0 |
Calculate trans probs i.e. parameter q. | def Lxo8(YKHO):
FQeH = YKHO.addone
QXnu = YKHO.tcount1
Kt_s = len(YKHO.tag_set) + 1
YKHO.trans = uPnQ = oRi_(dict)
for dJ1p, UHFx in QXnu.items():
mLGw = UHFx
ciZM = YKHO.tcount(dJ1p[:-1])
if FQeH:
mLGw += 1
ciZM += Kt_s
uPnQ[dJ1p[:-1]][dJ1p[-1... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hzm0(YKHO, BFeB):\n pass",
"def jrYK(YKHO, QTBn, XeOP):\n f3i3 = 0\n ryZ8 = YKHO.mdp.getTransitionStatesAndProbs(QTBn, XeOP)\n for uPnQ in ryZ8:\n f3i3 += uPnQ[1] * (YKHO.mdp.getReward(QTBn, XeOP, uPnQ[0]) + YKHO.discount * YKHO.values[uPnQ[0]])\n return f3i3",
"def FPCu(umWR, NmYP, p... | [
"0.68278944",
"0.66510105",
"0.66240674",
"0.6575877",
"0.6500786",
"0.6465166",
"0.64238435",
"0.6412904",
"0.63834465",
"0.6383254",
"0.6323263",
"0.62934136",
"0.62627673",
"0.62439054",
"0.62281376",
"0.62270635",
"0.62264365",
"0.6214845",
"0.61949086",
"0.61669576",
"0.... | 0.5984341 | 38 |
Cumulative distribution function of the folded normal distribution. | def YzER(WKvO, yGTL, WTkW):
with g2zq.extradps(5):
WKvO = g2zq.mpf(WKvO)
yGTL = g2zq.mpf(yGTL)
WTkW = _rxA(WTkW)
if WKvO < 0:
return g2zq.zero
return g2zq.ncdf(WKvO, yGTL, WTkW) - g2zq.ncdf(-WKvO, yGTL, WTkW) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _Ttn(WKvO):\n return 1.0 - 0.5 * zd5H(WKvO / 2 ** 0.5)",
"def _Ttn(WKvO):\n return (1.0 + epAf.erf(WKvO / epAf.sqrt(2.0))) / 2.0",
"def mRKC(JBMS, I8JS):\n\n def YzER(WKvO):\n \"\"\"Cumulative distribution function.\"\"\"\n try:\n from scipy.special import erf\n exc... | [
"0.7322982",
"0.7086195",
"0.70427334",
"0.70076543",
"0.69991446",
"0.6902787",
"0.6902118",
"0.6887036",
"0.68692285",
"0.68463653",
"0.6845939",
"0.68344116",
"0.67979085",
"0.6780089",
"0.6765531",
"0.67597824",
"0.6758509",
"0.6730176",
"0.6718144",
"0.66923624",
"0.6666... | 0.622544 | 67 |
Mean of the folded normal distribution. | def JBMS(yGTL, WTkW):
with g2zq.extradps(5):
yGTL = g2zq.mpf(yGTL)
WTkW = _rxA(WTkW)
Mkmy = yGTL / WTkW
r8hN = WTkW * g2zq.sqrt(2 / g2zq.pi) * g2zq.exp(-Mkmy ** 2 / 2) + yGTL * (1 - 2 * g2zq.ncdf(-Mkmy))
return r8hN | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zTRM(YKHO):\n return YKHO.__MEAN",
"def Dmjw(YKHO):\n return sum(YKHO.data, 0.0) / len(YKHO.data)",
"def JBMS(YKHO):\n return oyIN.sum(YKHO.di * YKHO.fi[1:]) / oyIN.sum(YKHO.fi[1:])",
"def JBMS(YKHO):\n return epAf.exp(YKHO.mu + YKHO.sigma ** 2 / 2)",
"def JBMS(YKHO):\n JBMS = oyIN.sum(Y... | [
"0.78447765",
"0.7586978",
"0.75379443",
"0.7497475",
"0.74538535",
"0.74476475",
"0.743302",
"0.7423569",
"0.7362294",
"0.7362294",
"0.7362294",
"0.7362294",
"0.7362294",
"0.7360027",
"0.7341101",
"0.7330905",
"0.7325776",
"0.7322584",
"0.7312818",
"0.73106664",
"0.7301582",... | 0.0 | -1 |
Variance of the folded normal distribution. | def SRYB(yGTL, WTkW):
with g2zq.extradps(5):
yGTL = g2zq.mpf(yGTL)
WTkW = _rxA(WTkW)
return yGTL ** 2 + WTkW ** 2 - JBMS(yGTL, WTkW) ** 2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I8JS(YKHO):\n if YKHO.sample_count > 1:\n return YKHO.new_std / (YKHO.sample_count - 1.0)\n else:\n return YKHO.empty",
"def I8JS(YKHO):\n return YKHO.base_dist.variance * YKHO.scale ** 2",
"def I8JS(YKHO):\n return (epAf.exp(YKHO.sigma ** 2) - 1.0) * epAf.exp(2.0 * YKHO.mu + YKHO... | [
"0.77263665",
"0.75474495",
"0.7444941",
"0.7436041",
"0.74303293",
"0.7414254",
"0.7410791",
"0.7375495",
"0.73663694",
"0.7364933",
"0.73397064",
"0.73361784",
"0.733445",
"0.7296408",
"0.7271889",
"0.71996117",
"0.71620536",
"0.7146466",
"0.71175265",
"0.7090139",
"0.70694... | 0.0 | -1 |
Compute a single recurrent forward step. Also, store all necessary intermediate results in the `cache` dictionary to be able to compute the backward pass. `self.cache["s"]` is a list storing all previous hidden states. | def RHoK(YKHO, EcVT: np.ndarray) -> oyIN.ndarray:
return yvT9 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qEGk(YKHO, W9gz):\n YKHO.state_vec[0] = W9gz.reshape(6, 1)\n I941 = jth9.deepcopy(YKHO.state_vec)\n for YPaw in range(0, YKHO.horizon):\n SWox = ITS7.time()\n P1dF = YKHO.state_vec[YPaw] - I941[YPaw]\n sLTp = YKHO.pinv_Q_uu_vec[YPaw]\n HIuo = YKHO.Q_ux_vec[YPaw]\n lp... | [
"0.65982413",
"0.645827",
"0.64269704",
"0.64131707",
"0.6337928",
"0.6337928",
"0.6337928",
"0.6304616",
"0.6267612",
"0.6196381",
"0.6193732",
"0.617975",
"0.6173462",
"0.6152945",
"0.61498827",
"0.6134447",
"0.60662794",
"0.60644174",
"0.605853",
"0.60582656",
"0.6038967",... | 0.672967 | 0 |
Compute the forward pass for `t` time steps. This should involve using forward_step repeatedly, possibly in a loop. This should be fairly simple since `forward_step` is doing most of the heavy lifting. | def KVH6(YKHO, EcVT: np.ndarray) -> oyIN.ndarray:
if YKHO.n_in is None:
YKHO._init_parameters(EcVT.shape[:2])
YKHO._init_cache(EcVT.shape)
fuBA = []
return fuBA[-1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qEGk(YKHO, W9gz):\n YKHO.state_vec[0] = W9gz.reshape(6, 1)\n I941 = jth9.deepcopy(YKHO.state_vec)\n for YPaw in range(0, YKHO.horizon):\n SWox = ITS7.time()\n P1dF = YKHO.state_vec[YPaw] - I941[YPaw]\n sLTp = YKHO.pinv_Q_uu_vec[YPaw]\n HIuo = YKHO.Q_ux_vec[YPaw]\n lp... | [
"0.66045696",
"0.6550902",
"0.63626117",
"0.623537",
"0.61986744",
"0.6103934",
"0.60859966",
"0.6074417",
"0.6065621",
"0.6052965",
"0.6042018",
"0.6029198",
"0.6029068",
"0.6023295",
"0.6010276",
"0.60067123",
"0.6003667",
"0.59964865",
"0.59964865",
"0.5995192",
"0.5980649... | 0.57820183 | 34 |
Create Profile Return a profile of all given backends for given film title. | def euOS(La5e, fth_, IFLC=None, w5I_=False):
if w5I_:
fQTf = La5e
elif IFLC:
try:
fQTf = JavQ(La5e, IFLC)
except r_4V:
pass
else:
for nuPx in fth_:
try:
fQTf = JavQ(La5e, nuPx)
break
except r_4V:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dNqX(YKHO, d6pt):\n YKHO.create_S_profile(d6pt)",
"def dNqX(YKHO, d6pt):\n YKHO.create_P_profile(d6pt)\n YKHO.create_Vset_profile(d6pt)",
"def dNqX(YKHO, d6pt):\n YKHO.create_P_profile(d6pt)\n YKHO.create_Vset_profile(d6pt)",
"def dNqX(YKHO, d6pt):\n YKHO.create_S_profile(d6pt)\n YKH... | [
"0.6159601",
"0.6064868",
"0.6064868",
"0.6044475",
"0.5957231",
"0.5952592",
"0.5841866",
"0.5612259",
"0.547635",
"0.5470938",
"0.5451075",
"0.54439175",
"0.5430976",
"0.53804713",
"0.53320146",
"0.5323822",
"0.53073734",
"0.53039396",
"0.529199",
"0.5278174",
"0.52746344",... | 0.6926271 | 0 |
Returns a list of subscriptions for the Bloglines account. This is returned as a list of Subscription objects where each entry has title, htmlUrl, type, xmlUrl, bloglinesSubId and bloglinesIgnore. | def vww5(YKHO):
YKHO.checkPasswordSpecified()
bD7m = 'http://%s/listsubs' % YKHO.BWS_HOSTNAME
hGN5 = YKHO.getContent(bD7m, True)
YDeO = PjWF()
wu7D = YDeO.parse(hGN5)
return wu7D | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def get_subscriptions(YKHO, ZrNc):\n return [finE.content for finE in await oZou.filter(account=ZrNc.name)]",
"def zzJj(YKHO):\n bD7m = YKHO.xoxzo_api_dins_url + 'subscriptions/'\n try:\n e6k8 = G4JS.get(bD7m, auth=(YKHO.sid, YKHO.auth_token))\n return YKHO.__parse(e6k8)\n except ... | [
"0.77963036",
"0.6777361",
"0.63758963",
"0.63648826",
"0.6313543",
"0.6243116",
"0.62427247",
"0.6158092",
"0.6142957",
"0.61312586",
"0.6120089",
"0.6119914",
"0.61023223",
"0.60511726",
"0.60454565",
"0.6045295",
"0.5991569",
"0.59913653",
"0.59740126",
"0.59737545",
"0.59... | 0.6791205 | 1 |
init ship and set position | def FIMM(YKHO, Vjhr, tJm0):
YKHO.screen = Vjhr
YKHO.ai_settings = tJm0
YKHO.image = a9eO.image.load('images/ship.bmp')
YKHO.rect = YKHO.image.get_rect()
YKHO.screen_rect = YKHO.screen.get_rect()
YKHO.rect.centerx = YKHO.screen_rect.centerx
YKHO.rect.bottom = YKHO.screen_rect.bottom
YKHO.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, tJm0, Vjhr):\n super(riCe, YKHO).__init__()\n YKHO.screen = Vjhr\n YKHO.ai_settings = tJm0\n YKHO.image = a9eO.image.load('images/ship.bmp')\n YKHO.rect = YKHO.image.get_rect()\n YKHO.screen_rect = Vjhr.get_rect()\n YKHO.rect.centerx = YKHO.screen_rect.centerx\n YKHO.rect.bot... | [
"0.7571287",
"0.7462698",
"0.74147004",
"0.73818815",
"0.73581016",
"0.72737384",
"0.72458786",
"0.72328055",
"0.7232168",
"0.72251314",
"0.719342",
"0.71796113",
"0.71657896",
"0.71638757",
"0.71636075",
"0.7153464",
"0.7132446",
"0.7130376",
"0.7127823",
"0.7098418",
"0.709... | 0.67489445 | 44 |
The number of points in a dydactic grid. | def A3NU(ABDL):
if ABDL == 0:
return 1
return (1 << ABDL) + 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vKvO(YKHO):\n return YKHO.gd.N_c",
"def rQuf(YKHO):\n return YKHO.points.shape[0]",
"def mCLR(YKHO):\n zNig = 1\n for jDK_ in YKHO.shape:\n zNig *= jDK_\n return zNig",
"def Nuzv(YKHO):\n YKHO.curs.execute('select count(1) from gridpoints where modelid = %d' % YKHO.dbmodelid)\n ... | [
"0.81921244",
"0.7604576",
"0.7579879",
"0.75085956",
"0.7447606",
"0.7406083",
"0.7372709",
"0.7325666",
"0.7308808",
"0.7264235",
"0.7264235",
"0.72546154",
"0.72336715",
"0.72303104",
"0.72303104",
"0.71413416",
"0.7139026",
"0.71204144",
"0.7107284",
"0.70875037",
"0.7081... | 0.0 | -1 |
Evaluate each piecewise polynomial basis on a tensor product dydactic grid | def gBqs(bctv, gGnb, urpP='linear'):
assert gGnb.min() >= -1 and gGnb.max() <= 1
gGnb = (gGnb + 1) / 2
assert gGnb.min() >= 0 and gGnb.max() <= 1
mFdg = gGnb.shape[0]
bctv = oyIN.asarray(bctv)
if len(bctv) != mFdg:
tO9_ = 'levels {0} and samples {1} are inconsistent'.format(bctv, mFdg)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ejq2(gGnb, bctv, MCGS, urpP='linear', Y1s9=None, XX5B=False):\n A5Jp = [NUpl(CLNC)[r3N1(CLNC)] for CLNC in bctv]\n ADFJ = KPxj(A5Jp)\n if Y1s9 is not None:\n ADFJ = Y1s9.map_from_canonical(ADFJ)\n gGnb = Y1s9.map_to_canonical(gGnb)\n lH_a = MCGS(ADFJ)\n g4Hg = kSPT(gGnb, lH_a, bctv... | [
"0.6619103",
"0.6617163",
"0.6530741",
"0.6407815",
"0.62802666",
"0.62802666",
"0.61773455",
"0.6169312",
"0.60619855",
"0.6016395",
"0.5932224",
"0.590514",
"0.5901013",
"0.5888316",
"0.58658904",
"0.585361",
"0.5839676",
"0.5837248",
"0.5819845",
"0.5815216",
"0.5806281",
... | 0.62089425 | 6 |
Add undefined values for all entries in the given 'modified_locals' not found in the given 'locals'. | def gTWz(YKHO, OQdo, locals=None):
locals = locals or {}
for mWFP, hkxX in OQdo.items():
if not locals.has_key(mWFP) and YKHO.undefined not in hkxX:
hkxX.append(YKHO.undefined) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ewOF(YKHO, OQdo, locals):\n for mWFP, hkxX in locals.items():\n if not OQdo.has_key(mWFP):\n if hasattr(OQdo, 'first') and OQdo.first:\n OQdo[mWFP] = []\n else:\n OQdo[mWFP] = [YKHO.undefined]\n for BWXx in hkxX:\n if BWXx not in O... | [
"0.84130305",
"0.58322227",
"0.58087665",
"0.56347305",
"0.55124366",
"0.55124366",
"0.5464485",
"0.5457491",
"0.5343046",
"0.5337228",
"0.5326795",
"0.5244606",
"0.51349425",
"0.51304233",
"0.5110138",
"0.5018055",
"0.49246722",
"0.4916756",
"0.48597986",
"0.48295942",
"0.47... | 0.86666954 | 0 |
For the given 'node', add the self argument as defined by 'obj'. | def pwMy(YKHO, Q6kx, YEnM):
if YEnM is not None and isinstance(YEnM, d4r9.reference.Reference):
qIxc = list(Q6kx.args[:])
qIxc.insert(0, YEnM)
qIxc = tuple(qIxc)
else:
qIxc = Q6kx.args
return qIxc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H2v5(YKHO, YEnM):\n raise NotImplementedError",
"def SStx(YKHO, YEnM):\n if YEnM is not None:\n YEnM._parent = YKHO\n YKHO._children.append(YEnM)",
"def cM0V(YKHO, YEnM):\n pass",
"def H2v5(YKHO, YEnM):\n if YEnM == YKHO._element:\n return None\n elif YKHO._element < Y... | [
"0.71268195",
"0.6902779",
"0.68586755",
"0.6835796",
"0.6829743",
"0.68149",
"0.67625165",
"0.67153883",
"0.6684472",
"0.66391224",
"0.6612678",
"0.6611547",
"0.65730906",
"0.6572005",
"0.6527685",
"0.6527685",
"0.65051293",
"0.6502153",
"0.64182943",
"0.64182943",
"0.640969... | 0.0 | -1 |
Constructor of the ProximalPolicyOptimization class. Sets up a PPO agent in accordance with a provided configuration. A constructed agent may then be either trained or used to act in an environment while rendering the environment for demonstration purposes. | def FIMM(YKHO, sEAN: gym.Env or str, HasU: int=10, RzXE: int=5000000, SPbp: int=10000, r5Q7: int=10, RVBw: bool=True, w75h: float=0.0001, TENL: float=0.0001, MA1z: int=1000, tzvm: float=0.99, Ep8u: int=32, hxxl: float or dict=0.2, AWnh: float=0.15, gUoC: float=0.9, HpfC: str='MLP', AlNH: bool=False, fC1C: int=200, xunR... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, sEAN, qIxc):\n YKHO.learningRate = 5e-05\n YKHO.gamma = 0.99\n YKHO.miniBatchSize = 32\n YKHO.numActions = 4\n YKHO.lr = 0.0003\n YKHO.lrStep = 10000\n YKHO.lrMin = 2.5e-05\n YKHO.allLosses = []\n YKHO.allEntropy = []\n YKHO.dev = ht2j.device('cuda' if ht2j.cuda.is_avai... | [
"0.6803972",
"0.66082287",
"0.6419897",
"0.64049214",
"0.63909596",
"0.63118976",
"0.63051116",
"0.629257",
"0.62853897",
"0.628486",
"0.628195",
"0.6280105",
"0.6276701",
"0.6267589",
"0.62152296",
"0.61774653",
"0.6172356",
"0.6167817",
"0.6151784",
"0.61370873",
"0.6095499... | 0.0 | -1 |
Lipschitz constant of the gradient. From the interface "LipschitzContinuousGradient". | def aPd6(YKHO):
if YKHO.l < GDa9.TOLERANCE:
return 0.0
TuQS = YKHO.lambda_max()
return YKHO.l * TuQS / YKHO.mu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jUSa(YKHO):\n return YKHO.Lips",
"def C6PX(amiz, Pnha):\n LVAh = Pnha.get_label()\n return (oyIN.log1p(amiz) - oyIN.log1p(LVAh)) / (amiz + 1)",
"def paZV(YKHO):\n return -0.2 * oyIN.pi ** 2",
"def hQYB(WKvO):\n return 1 / (WKvO * (1.0 - WKvO))",
"def rjGC(Fg_i, EcVT, LVAh, EhIg=0.0):\n ... | [
"0.6448168",
"0.6387733",
"0.62403953",
"0.62130076",
"0.61450744",
"0.6104047",
"0.6003408",
"0.6003373",
"0.59667116",
"0.58758724",
"0.5857493",
"0.58344036",
"0.582676",
"0.58173853",
"0.57976407",
"0.5776947",
"0.57433605",
"0.5710469",
"0.5709624",
"0.56934595",
"0.5688... | 0.0 | -1 |
Largest eigenvalue of the corresponding covariance matrix. From the interface "Eigenvalues". | def OH2r(YKHO):
if YKHO._lambda_max is None:
k0lF = YKHO.A()
CJGY = 0.0
for bisP in k0lF:
tjUW = bisP.copy()
tjUW.data **= 2.0
CJGY += tjUW.sum(axis=0)
YKHO._lambda_max = oyIN.max(CJGY)
return YKHO._lambda_max | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GZCy(YKHO):\n return Zxt2.sparse.linalg.eigsh(YKHO.laplacian, M=Zxt2.sparse.diags(YKHO.mass).tocsc(), k=1, which='LM', tol=1e-06, return_eigenvectors=False)",
"def ZWCO(YKHO) -> float:\n JT9N = YKHO.phase\n return YKHO._phase_estimation_scale.scale_phase(JT9N, YKHO._id_coefficient)",
"def pGcE(exw... | [
"0.8412822",
"0.7303216",
"0.7125778",
"0.7103415",
"0.6777325",
"0.6697004",
"0.6694496",
"0.6684651",
"0.6674042",
"0.667001",
"0.66614026",
"0.6568355",
"0.6563169",
"0.6527231",
"0.64779323",
"0.6462329",
"0.6448881",
"0.6445279",
"0.6429112",
"0.64231396",
"0.6401375",
... | 0.0 | -1 |
Yields a generator of requirements as defined by the REQUIRE_PATH which should point to a requirements.txt output by `pip freeze`. | def v5S6(pmON=KI93):
for zFiD in Ueki(pmON).splitlines():
zFiD = zFiD.strip()
if zFiD and (not zFiD.startswith('#')):
yield zFiD | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def v5S6(pmON=KI93):\n for zFiD in Ueki(pmON).splitlines():\n zFiD = zFiD.strip()\n if zFiD and (not zFiD.startswith('#')):\n yield zFiD",
"def v5S6(pmON=KI93):\n for zFiD in Ueki(pmON).splitlines():\n zFiD = zFiD.strip()\n if zFiD and (not zFiD.startswith('#')):\n ... | [
"0.7515404",
"0.7515404",
"0.7380864",
"0.73286563",
"0.7308916",
"0.72094345",
"0.7167457",
"0.7155756",
"0.7120259",
"0.7120259",
"0.711854",
"0.7083695",
"0.70823735",
"0.70658",
"0.7023155",
"0.702268",
"0.69992816",
"0.69650716",
"0.69584197",
"0.6934025",
"0.6902565",
... | 0.7464913 | 2 |
Gets whether the late fee has been added to this unpaid late invoice. | def fVaC(IgS6):
wzkt = qcWV.now()
if not IgS6.is_paid() and IgS6.due_date < wzkt:
Jsz6 = qfEy.query(ancestor=IgS6.key)
for mPLX in Jsz6:
if mPLX.description == 'Late Fee':
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lMgC(YKHO):\n YKHO._late_fee = YKHO._payment > 0",
"def ZxIO(YKHO):\n return not YKHO.new and (not YKHO.current) and (not YKHO.paid) and (not YKHO.charged_off)",
"def m81r(YKHO) -> bool:\n return qe4Y.get(YKHO, 'has_legal_hold')",
"def AJZ7(YKHO):\n if YKHO._derivative:\n return True",... | [
"0.6446179",
"0.6047995",
"0.5653693",
"0.56219494",
"0.5611521",
"0.555506",
"0.55277085",
"0.54843795",
"0.5433027",
"0.540503",
"0.5357956",
"0.5351396",
"0.5317909",
"0.52996606",
"0.52966523",
"0.529221",
"0.528047",
"0.5267695",
"0.520942",
"0.5196612",
"0.51949334",
... | 0.7292866 | 0 |
Returns a unique list preserve the order of original list | def kcwm(aWuw):
PwWw = set()
return [WKvO for WKvO in aWuw if not (WKvO in PwWw or PwWw.add(WKvO))] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vaOw(YKHO, zXzD):\n Aofo = []\n PwWw = set()\n for ZfUD in zXzD:\n if not ZfUD in PwWw:\n PwWw.add(ZfUD)\n Aofo.append(ZfUD)\n return Aofo",
"def vaOw(HU2v):\n S06t = []\n for U6D_ in HU2v:\n if U6D_ not in S06t:\n S06t = S06t + [U6D_]\n ret... | [
"0.83981234",
"0.8268356",
"0.81036687",
"0.79052687",
"0.78519094",
"0.78519094",
"0.7775167",
"0.7766982",
"0.775433",
"0.7753782",
"0.7747778",
"0.7702397",
"0.76976633",
"0.7691354",
"0.76779956",
"0.7650238",
"0.7643734",
"0.763762",
"0.7624916",
"0.7598142",
"0.75831157... | 0.0 | -1 |
Initialize the character table. Arguments | def FIMM(YKHO, gLiZ):
YKHO.chars = sorted(set(gLiZ))
YKHO.char_indices = dict(((Z9rn, YRbF) for YRbF, Z9rn in enumerate(YKHO.chars)))
YKHO.indices_char = dict(((YRbF, Z9rn) for YRbF, Z9rn in enumerate(YKHO.chars))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Cr5x(YKHO):\n YKHO._next_code = 256\n YKHO._string_table = {YRbF: chr(YRbF) for YRbF in range(256)}",
"def XAL9(DyBn, _FLs):\n lYoN = []\n for YRbF in range(_FLs):\n lYoN.append(chr(YRbF))\n return lYoN",
"def FIMM(YKHO, Cs6h):\n YKHO.grid = Cs6h\n YKHO.characters = DRnx.copy()\... | [
"0.72777355",
"0.71833915",
"0.64935154",
"0.6465428",
"0.63966453",
"0.63683134",
"0.6354207",
"0.6336638",
"0.6334903",
"0.6334903",
"0.6334903",
"0.6334903",
"0.63184047",
"0.63082975",
"0.62495786",
"0.6208069",
"0.6203721",
"0.61872524",
"0.6123179",
"0.6093603",
"0.6090... | 0.58815354 | 36 |
Onehot encoding given string C. Arguments | def kLcZ(YKHO, Nq1b, NwL4):
WKvO = oyIN.zeros((NwL4, len(YKHO.chars)))
for YRbF, Z9rn in enumerate(Nq1b):
WKvO[YRbF, YKHO.char_indices[Z9rn]] = 1
return WKvO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zGX0(Q6uT):\n Q6uT = Q6uT.replace('A', '0')\n Q6uT = Q6uT.replace('C', '1')\n Q6uT = Q6uT.replace('G', '2')\n Q6uT = Q6uT.replace('T', '3')\n V0Th = oyIN.zeros((4, len(Q6uT)), dtype='float16')\n for YRbF in range(len(Q6uT)):\n if Q6uT[YRbF].isdigit():\n V0Th[int(Q6uT[YRbF]),... | [
"0.7959155",
"0.7726982",
"0.76810586",
"0.7668011",
"0.7655041",
"0.76355094",
"0.7584151",
"0.7567932",
"0.75508475",
"0.754328",
"0.75047594",
"0.7494548",
"0.7483071",
"0.74763054",
"0.74663913",
"0.74663913",
"0.7459453",
"0.74420345",
"0.7427748",
"0.742597",
"0.7407526... | 0.0 | -1 |
Return a grayscale version of the colormap | def r9MY(iMGt):
iMGt = QrM1.cm.get_cmap(iMGt)
Jw9H = iMGt(oyIN.arange(iMGt.N))
CY8X = [0.299, 0.587, 0.114]
kfDQ = oyIN.sqrt(oyIN.dot(Jw9H[:, :3] ** 2, CY8X))
Jw9H[:, :3] = kfDQ[:, oyIN.newaxis]
if isinstance(iMGt, nmjP):
return iMGt.from_list(iMGt.name + '_grayscale', Jw9H, iMGt.N)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def r9MY(iMGt):\n iMGt = QrM1.cm.get_cmap(iMGt)\n Jw9H = iMGt(oyIN.arange(iMGt.N))\n CY8X = [0.299, 0.587, 0.114]\n kfDQ = oyIN.sqrt(oyIN.dot(Jw9H[:, :3] ** 2, CY8X))\n Jw9H[:, :3] = kfDQ[:, oyIN.newaxis]\n return iMGt.from_list(iMGt.name + '_grayscale', Jw9H, iMGt.N)",
"def r9MY(iMGt):\n iM... | [
"0.75928247",
"0.7585941",
"0.752819",
"0.71242094",
"0.7078143",
"0.70735985",
"0.69846845",
"0.6880974",
"0.6855551",
"0.6810941",
"0.6810941",
"0.6799747",
"0.67685956",
"0.6732436",
"0.6721167",
"0.67015",
"0.6667221",
"0.66416425",
"0.66416425",
"0.66321373",
"0.66301215... | 0.74493396 | 3 |
Compute the concentration for the next time interval t+delta t from the concentration given at t,x First the laplacian at step t1 is taken and the partial derivative equation is propagated for time t as C(t)=C(t1)+DdeltatlapC(t1) | def Rb_t(Nq1b, a1PO, lWPh, EoVF, ut5U, jKZG, exwG, Kt_s, pLBp, NhvE):
vuvg = uwaB.physical_constants['Faraday constant'][0]
A3Vt = uwaB.R
bppm = oyIN.zeros_like(Nq1b[:, 0, :])
for YRbF in range(0, lWPh.size):
ERPn = foq8(Nq1b[:, a1PO - 1, YRbF], NhvE)
bppm[:, YRbF] = Nq1b[:, a1PO - 1, YR... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DUK_(YKHO, a1PO):\n if a1PO < YKHO.x[0]:\n return None\n elif a1PO > YKHO.x[-1]:\n return None\n YRbF = YKHO.__search_index(a1PO)\n Jw7X = a1PO - YKHO.x[YRbF]\n Aofo = YKHO.b[YRbF] + 2.0 * YKHO.c[YRbF] * Jw7X + 3.0 * YKHO.d[YRbF] * Jw7X ** 2.0\n return Aofo",
"def R04w(YKHO, a... | [
"0.7094434",
"0.6183171",
"0.6094793",
"0.6055886",
"0.59764695",
"0.5959096",
"0.58990574",
"0.58714324",
"0.5837395",
"0.5826503",
"0.5809183",
"0.580335",
"0.5800465",
"0.57965213",
"0.57878965",
"0.5772044",
"0.5731347",
"0.57311314",
"0.5725565",
"0.57150364",
"0.5712828... | 0.6036527 | 4 |
Returns the sign to multiply by time. | def jjZn(dSua, wNAC=False):
return (1 - 2 * dSua) * (1 - 2 * wNAC) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z6kF(ITS7, pSDG):\n assert fO0v(ITS7)\n C6wh = hpAa(ITS7)\n return PFz2(C6wh * pSDG)",
"def fZsz(YKHO, CUh8):\n if YKHO._sign is None:\n return CUh8\n if CUh8 is None:\n return YKHO._sign\n if CUh8 != YKHO._sign:\n return 0\n return CUh8",
"def zvbp(YKHO, a1PO):\n ... | [
"0.633155",
"0.6180457",
"0.61397326",
"0.6002112",
"0.5982812",
"0.5872426",
"0.5862457",
"0.5772503",
"0.57561034",
"0.57561034",
"0.5717782",
"0.5691928",
"0.5651786",
"0.5639837",
"0.56322205",
"0.5620141",
"0.5611149",
"0.5610379",
"0.56011784",
"0.5595099",
"0.5583841",... | 0.54165614 | 38 |
Generates the operators for this clause. Applies e^(iZt) on each qubit, and e^(i ZZ t) on both. The sign of t gets flipped if the variable is negated. | def mSEJ(woks, ITS7):
ITS7 = -2 * ITS7 / epAf.pi
return [TSLW.ZPowGate(exponent=jjZn(woks.is_negative1) * ITS7, global_shift=-0.5).on(TSLW.LineQubit(woks.index1)), TSLW.ZPowGate(exponent=jjZn(woks.is_negative2) * ITS7, global_shift=-0.5).on(TSLW.LineQubit(woks.index2)), TSLW.ZZPowGate(exponent=jjZn(woks.is_nega... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FQJt(YKHO, Csk6):\n for khtY in Csk6:\n assert vDzF(khtY) or jWwc(khtY) or avzC(khtY)\n assert Csk6[khtY].variables().issubset({'p', 'q'})\n aJwu(YKHO)\n azqB = OSfm(YKHO, Csk6)\n return azqB",
"def Maem() -> qQd5:\n return {'+': seET.add, '-': seET.sub, '/': seET.truediv, '*': s... | [
"0.64459217",
"0.6255488",
"0.6187617",
"0.6114629",
"0.5965492",
"0.58812386",
"0.584636",
"0.5813552",
"0.5811186",
"0.5792137",
"0.5784938",
"0.5765139",
"0.5761723",
"0.5745009",
"0.5740114",
"0.5728316",
"0.5724877",
"0.5690769",
"0.56894416",
"0.5686813",
"0.5669269",
... | 0.0 | -1 |
Returns the list of all operators for the DNF. Iterates over the list of operators produced by each clause and flattens. | def c0mE(LI34, ITS7):
T2RL = [mSEJ(woks, ITS7) for woks in LI34.clauses]
return list(Hs6x.chain.from_iterable(T2RL)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RFn3(Emd4) -> x1iM[str]:\n return [Emd4.ptr_next, Emd4.ptr_prev, Emd4.ptr_decr, Emd4.ptr_incr, Emd4.loop_beg, Emd4.loop_end, Emd4.cell_inp, Emd4.cell_show]",
"def Maem(YKHO):\n if YKHO == None:\n return set()\n if vDzF(YKHO.root) | jWwc(YKHO.root) | avzC(YKHO.root):\n if YKHO.getFirst(... | [
"0.6496993",
"0.64902574",
"0.63997644",
"0.6390586",
"0.63672364",
"0.6270189",
"0.62634164",
"0.6180941",
"0.6170175",
"0.61319435",
"0.60137933",
"0.6006206",
"0.60015744",
"0.6000309",
"0.5968229",
"0.59342986",
"0.58979946",
"0.5882945",
"0.5845602",
"0.5833697",
"0.5825... | 0.0 | -1 |
Attach a lot of summaries to a Tensor (for TensorBoard visualization). | def g4Yp(YKHO, SRYB, mWFP):
with ZylS.name_scope(mWFP + '_summaries'):
JBMS = ZylS.reduce_mean(SRYB)
ZylS.summary.scalar('mean', JBMS)
with ZylS.name_scope('stddev'):
z2bo = ZylS.sqrt(ZylS.reduce_mean(ZylS.square(SRYB - JBMS)))
ZylS.summary.scalar('stddev', z2bo)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oxpy(YKHO):\n with ZylS.name_scope('summaries'):\n ZylS.summary.scalar('loss', YKHO.loss)\n ZylS.summary.scalar('accuracy', YKHO.accuracy)\n ZylS.summary.histogram('W', YKHO.W)\n ZylS.summary.histogram('B', YKHO.B)\n YKHO.summary = ZylS.summary.merge_all()",
"def oxpy(YK... | [
"0.7736077",
"0.76359254",
"0.71545947",
"0.70673954",
"0.701022",
"0.7003726",
"0.68640226",
"0.6791084",
"0.6712321",
"0.67012644",
"0.6698548",
"0.66512114",
"0.6650255",
"0.6645947",
"0.66231227",
"0.6605244",
"0.6596064",
"0.6580992",
"0.6570008",
"0.653819",
"0.65369743... | 0.0 | -1 |
Function to calculate the Haar Basis Assume N is power of 2 | def V1fN(ywwl):
MKlR = oyIN.zeros((ywwl, ywwl))
MKlR[0, :] = 1 / PZyS(ywwl)
for G1Hx in range(1, ywwl):
XP5J = int(RKD7(G1Hx) / RKD7(2))
vexM = G1Hx - 2 ** XP5J
LEev = 2 ** XP5J
n2Q1 = ywwl / LEev
Xyq7 = 2 ** (XP5J + 1)
SpII = ywwl / Xyq7
for YRbF in r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DBhA(YKHO, exwG):\n if exwG % 2 == 1:\n r8hN = (exwG - 1) / 2\n return (-1) ** r8hN * 8.0 / (exwG * oyIN.pi) ** 2\n else:\n return 0.0",
"def SxVy(YKHO):\n exwG = YKHO.n\n return (exwG ** 2 - exwG) / 2",
"def nmwj(exwG):\n eHNT, tTpl = oyIN.frexp(oyIN.array([exwG, exwG /... | [
"0.6749846",
"0.66435164",
"0.6488147",
"0.63400924",
"0.6259918",
"0.62599015",
"0.6230378",
"0.62022614",
"0.6150037",
"0.6145862",
"0.61375177",
"0.6121406",
"0.6099325",
"0.60903955",
"0.6074653",
"0.6021961",
"0.6021076",
"0.6016303",
"0.5991103",
"0.59805167",
"0.597888... | 0.69542825 | 0 |
Returns the base64 HMAC based on the body, api_key, secret_key and http_date. >>> Auth.calculate_signature('Hi Mom', 'apikey', 'secretkey', | def AFR9(Emd4, TBsA, rJDA, QDug, SJMJ=None):
if SJMJ is None:
SJMJ = ITS7.strftime('%a, %d %b %Y %H:%M:%S GMT', ITS7.gmtime())
wEsz = W7gX.new(QDug.encode('ascii'), digestmod=HBct.sha1)
wEsz.update(rJDA.encode('ascii'))
wEsz.update(SJMJ.encode('ascii'))
wEsz.update(TBsA.encode('ascii'))
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VJZS(YKHO, pmON, NKcE, TBsA, E3oo, sZ8K):\n Ol8d = E3oo + NKcE + pmON + TBsA\n Ol8d = Ol8d.encode('ascii')\n _9Ij = WR89.b64decode(sZ8K)\n assert len(_9Ij) == 64\n aadv = W7gX.new(_9Ij, Ol8d, HBct.sha256)\n tXJn = WR89.b64encode(aadv.digest())\n return tXJn.decode('ascii')",
"def aadv():... | [
"0.7473898",
"0.72465396",
"0.7186519",
"0.69219977",
"0.6910255",
"0.6910255",
"0.68857664",
"0.68755674",
"0.6762373",
"0.6719746",
"0.6717347",
"0.6562246",
"0.65551007",
"0.65051",
"0.6501747",
"0.64696693",
"0.6463962",
"0.6421875",
"0.6408442",
"0.64084315",
"0.63828975... | 0.85505414 | 0 |
Test dtype support of the metric on GPU. | def uK6l(YKHO, shsp, RVw2, aTLP, pan_, hlIJ, I07O):
YKHO.run_precision_test_gpu(aTLP, pan_, YLnl(Jvik, num_outputs=I07O), yjZz, {'adjusted': shsp, 'multioutput': RVw2}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l1fO(YKHO, g4y1, yDqo):\n aTLP, pan_ = g4y1\n YKHO.run_precision_test_gpu(preds=aTLP, target=pan_, metric_module=BTW4, metric_functional=zvzr, metric_args={'threshold': znoN}, dtype=yDqo)",
"def z9sq(nwmd):\n assert nwmd.dtype == oyIN.dtype('l')",
"def g516():\n with trZe.raises(Gp9J, match='Re... | [
"0.6646756",
"0.65963876",
"0.63001084",
"0.6273428",
"0.61703426",
"0.61623627",
"0.61417395",
"0.6111176",
"0.60893154",
"0.60677856",
"0.598639",
"0.598422",
"0.5942167",
"0.593168",
"0.591807",
"0.5911084",
"0.58971614",
"0.5885409",
"0.58564115",
"0.5848549",
"0.5847603"... | 0.0 | -1 |
Test that error is raised on different shapes of input. | def uf7D(F2e1=Jvik):
AcYW = F2e1()
with trZe.raises(RuntimeError, match='Predictions and targets are expected to have the same shape'):
AcYW(ht2j.randn(100), ht2j.randn(50)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uf7D(F2e1=z7hM):\n AcYW = F2e1(16000)\n with trZe.raises(RuntimeError, match='Predictions and targets are expected to have the same shape'):\n AcYW(ht2j.randn(100), ht2j.randn(50))",
"def qFJK(AcYW):\n with trZe.raises(ValueError, match='Expected argument `x` to be a 2D tensor .*'):\n ... | [
"0.74362665",
"0.7355002",
"0.7065164",
"0.7006285",
"0.69924474",
"0.69921297",
"0.693425",
"0.68681896",
"0.686696",
"0.68335277",
"0.68309075",
"0.6829438",
"0.68294096",
"0.67775035",
"0.6759717",
"0.6730921",
"0.6693725",
"0.6691739",
"0.6662923",
"0.6648671",
"0.6641288... | 0.7481396 | 0 |
Test that error is raised if too few samples are provided. | def ZvSU(F2e1=Jvik):
AcYW = F2e1()
with trZe.raises(ValueError, match='Needs at least two samples to calculate r2 score.'):
AcYW(ht2j.randn(1), ht2j.randn(1))
AcYW.reset()
AcYW.update(ht2j.randn(1), ht2j.randn(1))
AcYW.update(ht2j.randn(1), ht2j.randn(1))
assert AcYW.compute() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def edx8(SAR5):\n Mm1z = fXY0(SAR5)\n with trZe.raises(TypeError):\n Mm1z.draw_samples('five')\n with trZe.raises(ValueError):\n Mm1z.draw_samples(0)",
"def y8N0(*Sk_F):\n kear = [P266(EcVT) for EcVT in Sk_F]\n if len(oyIN.unique(kear)) > 1:\n raise",
"def FSiW(YKHO):\n w... | [
"0.7347903",
"0.71725714",
"0.7126685",
"0.7066469",
"0.70283014",
"0.70177174",
"0.69879806",
"0.68904656",
"0.67475516",
"0.67097056",
"0.6702857",
"0.6608735",
"0.65809697",
"0.6568278",
"0.65237576",
"0.6506778",
"0.6502286",
"0.6465011",
"0.64598787",
"0.6456901",
"0.645... | 0.6679611 | 11 |
Convert a json parse error and HTTP error code into appropriate exception type | def cPgW(Wxnj, TBsA):
if Wxnj > 499:
cvo8(E3JL(Wxnj, TBsA))
elif Wxnj > 399:
if Wxnj == 413 and YKHO.maxbatch > 1:
YKHO.maxbatch = 1
YKHO.queue.json_rpcqueue_again(YwAz)
else:
cvo8(kL9l(Wxnj, TBsA))
else:
cvo8(FFrC(Wxnj, TBsA, 'Invalid JSON... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HiRl(YKHO, P1dF):\n if P1dF.code == 500:\n nPrm = P1dF.read()\n try:\n nPrm = HjBM.loads(nPrm)\n except:\n raise Exception('Unexpected remote error: %s' % nPrm)\n nPrm['HTTPErrorCode'] = P1dF.code\n nPrm = HjBM.dumps(nPrm)\n raise fEna(nPrm)\n ... | [
"0.75011647",
"0.7412909",
"0.7368524",
"0.72478455",
"0.7211713",
"0.7126751",
"0.7090995",
"0.7088879",
"0.70477474",
"0.7024318",
"0.7000553",
"0.69517237",
"0.6917904",
"0.69016165",
"0.6888988",
"0.6888372",
"0.68865764",
"0.6885621",
"0.6845228",
"0.6824684",
"0.6821614... | 0.70431703 | 9 |
Inserts a word into the trie. | def JPHp(YKHO, GIN8: str) -> None:
ZOCz = YKHO
for KCHu in GIN8:
I1mm = 0
for YRbF in range(len(ZOCz.children)):
if ZOCz.children[YRbF].key == KCHu:
ZOCz = ZOCz.children[YRbF]
I1mm = 1
break
if I1mm == 0:
Esd_ = etby... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JPHp(YKHO, GIN8: str) -> None:\n jvSB = YKHO.node\n for YRbF in GIN8:\n if YRbF not in jvSB.char:\n jvSB.char[YRbF] = ep_x()\n jvSB = jvSB.char[YRbF]\n if jvSB.isword is False:\n jvSB.isword = True",
"def JPHp(YKHO, GIN8: str) -> None:\n XP5J = YKHO.root\n for Y... | [
"0.89349246",
"0.8875727",
"0.88754433",
"0.88664436",
"0.8845666",
"0.88351166",
"0.8829387",
"0.88241696",
"0.88215303",
"0.88025844",
"0.87970716",
"0.87917984",
"0.87870646",
"0.8786165",
"0.8785743",
"0.87801075",
"0.8779744",
"0.87764865",
"0.87708014",
"0.8767584",
"0.... | 0.8739706 | 24 |
Returns if the word is in the trie. | def TgwQ(YKHO, GIN8: str) -> bool:
ZOCz = YKHO
for KCHu in GIN8:
I1mm = 0
for YRbF in range(len(ZOCz.children)):
if ZOCz.children[YRbF].key == KCHu:
ZOCz = ZOCz.children[YRbF]
I1mm = 1
break
if I1mm == 0:
return Fals... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FYXB(YKHO, GIN8):\n GIN8 = GIN8.strip()\n tk5Y = YKHO.root\n for Z9rn in GIN8:\n if Z9rn not in tk5Y:\n return False\n tk5Y = tk5Y[Z9rn]\n return tk5Y.end_of_word",
"def DUe0(YKHO, ZOCz, GIN8):\n if type(GIN8) != str:\n raise TypeError('Trie only works on str!')... | [
"0.82732624",
"0.8268658",
"0.8264125",
"0.821515",
"0.8189247",
"0.8175716",
"0.8169006",
"0.8131675",
"0.79806894",
"0.79662687",
"0.7954484",
"0.78810614",
"0.78760433",
"0.7865884",
"0.7834661",
"0.7818698",
"0.7812765",
"0.78111285",
"0.7794079",
"0.77894574",
"0.7787467... | 0.7973416 | 9 |
Returns if there is any word in the trie that starts with the given prefix. | def BYxH(YKHO, y0cW: str) -> bool:
ZOCz = YKHO
for KCHu in y0cW:
I1mm = 0
for YRbF in range(len(ZOCz.children)):
if ZOCz.children[YRbF].key == KCHu:
ZOCz = ZOCz.children[YRbF]
I1mm = 1
break
if I1mm == 0:
return Fals... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BYxH(YKHO, y0cW):\n GIN8 = y0cW\n if not GIN8:\n return True\n nsYX = GIN8[0]\n if nsYX not in YKHO.trie_map:\n return False\n Tifd = YKHO.trie_map[nsYX]\n for YRbF in range(1, len(GIN8)):\n LihS = GIN8[YRbF]\n if LihS not in Tifd.childMap:\n return Fals... | [
"0.86418957",
"0.8456077",
"0.8439758",
"0.84152204",
"0.8414917",
"0.8406607",
"0.83812594",
"0.8369774",
"0.83355415",
"0.8326945",
"0.83266926",
"0.8239315",
"0.8228612",
"0.8172047",
"0.81602836",
"0.81522566",
"0.811517",
"0.80111045",
"0.79831576",
"0.79831576",
"0.7954... | 0.81466633 | 16 |