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 |
|---|---|---|---|---|---|---|
Iterator that waits periodically until certain time points are reached while yielding those time points. | def Sd2J(yKcO: Time_t, Os4s: Time_t, YPaw: float) -> bDy6[JRYC.datetime]:
assert YPaw > 0
RA_F = JRYC.timedelta(seconds=YPaw)
a1PO = cDr7(yKcO)
yl4j = JRYC.timezone.utc if a1PO.tzinfo else None
wzkt = JRYC.datetime.now(yl4j)
while a1PO < wzkt:
a1PO += RA_F
while a1PO <= cDr7(Os4s):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vs4Q(YKHO):\n while True:\n dixj = YKHO.poll()\n for WKvO in dixj:\n yield WKvO\n if not dixj:\n ITS7.sleep(YKHO.poll_delay)",
"def Vs4Q(YKHO):\n if len(YKHO) == 0:\n return\n jvSB = YKHO.first_timestamp\n RA_F = qcWV.timedelta(0, YKHO.interval)\n... | [
"0.70366013",
"0.6857739",
"0.6853601",
"0.6686377",
"0.6295998",
"0.62546414",
"0.62527335",
"0.62436473",
"0.6134309",
"0.6000369",
"0.59103787",
"0.58841205",
"0.5822339",
"0.5808399",
"0.57665455",
"0.57383204",
"0.5712836",
"0.5680578",
"0.5657702",
"0.5649888",
"0.56334... | 0.5685418 | 17 |
Returns an interval from the cache. If you request a region that is larger than what has been previously stored before, the method will normally return None to signify that you need to compute for the larger region. This behavior can be overriden by supplying force_subinterval=True, which causes this method to return a... | def GKJL(YKHO, H5ew, yKcO, Os4s, D9Nf=False):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VOlW(YKHO):\n if YKHO.keep_interval:\n return YKHO._interval\n else:\n YKHO._update_interval()\n YKHO.keep_interval = True\n return YKHO._interval",
"def VOlW(YKHO):\n return YKHO._base_interval",
"def HeLj(YKHO) -> float:\n return YKHO[YKHO._bcni]",
"def _uxr(Emd4... | [
"0.61862695",
"0.5913008",
"0.58144355",
"0.5736964",
"0.572915",
"0.572915",
"0.56576884",
"0.56202894",
"0.5595529",
"0.55750674",
"0.5564712",
"0.55135614",
"0.54518163",
"0.5438921",
"0.5438697",
"0.5393431",
"0.52717894",
"0.51505005",
"0.5114337",
"0.50717777",
"0.50587... | 0.5397497 | 15 |
Convenience method to enable 3D texturing state so the texture may be used by the ffpnoise shader function | def TSMu(YKHO):
JtkL(rtX4)
VZzs(rtX4, hHMN, ewtZ)
VZzs(rtX4, Hhlt, ewtZ)
VZzs(rtX4, scS8, ewtZ)
VZzs(rtX4, GX82, Rek9)
VZzs(rtX4, oFaL, Rek9) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def U5mG():\n for f0tD in kZw_.context.screen.areas:\n if f0tD.type == 'VIEW_3D':\n for n294 in f0tD.spaces:\n if n294.type == 'VIEW_3D':\n n294.viewport_shade = 'TEXTURED'\n return",
"def jw4S(QpfX):\n lhy8 = QpfX.scene.revolt\n if lhy8.prefer_tex_... | [
"0.6677809",
"0.6549969",
"0.6369659",
"0.60743153",
"0.60502696",
"0.5923465",
"0.5839737",
"0.5796139",
"0.57651645",
"0.57099813",
"0.5701912",
"0.5625515",
"0.54661834",
"0.53850794",
"0.5383814",
"0.5382028",
"0.5381315",
"0.5330395",
"0.5309261",
"0.5309261",
"0.5303246... | 0.7033388 | 0 |
Stellar mass and its error from the empirical relation by Schweitzer et al. 2019 (2019A&A...625A..68S), based on masses and radii of eclipsing binaries. | def A8HE(AaxO, OhL2):
jzdc = -0.024048024
Fg_i = 1.0552427
PYqR = 0.007592668
Z5l3 = 0.017044148
E3D9 = jzdc + Fg_i * AaxO
nX1E = oyIN.sqrt(PYqR ** 2 + (AaxO * Z5l3) ** 2 + (Fg_i * OhL2) ** 2)
return (E3D9, nX1E) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ebl2():\n CAUq = 6.582119514e-16\n CsHS = 9.10938356e-31\n JWKx = 6\n sInF = Icsb(1)\n YTE8 = WxRQ('vasprun.xml').get_band_structure()\n h1rg = YTE8.get_cbm()['band_index'][sInF][0]\n VA2F = YTE8.get_cbm()['kpoint_index'][0]\n IqrC = YTE8.get_vbm()['band_index'][sInF][0]\n fMY_ = YTE... | [
"0.6621091",
"0.6590921",
"0.62865424",
"0.6074964",
"0.6052183",
"0.6031175",
"0.6031175",
"0.60079646",
"0.59804773",
"0.59599847",
"0.5940864",
"0.5908501",
"0.5873281",
"0.5854262",
"0.5840292",
"0.5816133",
"0.580081",
"0.5789584",
"0.5772424",
"0.5763479",
"0.576089",
... | 0.6668691 | 0 |
Add a scheme document to the document cache. Schema element which are added to the schema without a file on have their target namespace accounted for. | def H5Ox(YKHO, cGyw):
if cGyw.target_namespace not in YKHO.docs:
YKHO.docs[cGyw.target_namespace] = set()
if cGyw.target_namespace not in YKHO.types:
YKHO.types[cGyw.target_namespace] = {}
if cGyw.target_namespace not in YKHO.elements:
YKHO.elements[cGyw.target_namespace] = {}
if... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pZ40(YKHO, C13M: Document) -> None:\n YKHO._index[C13M.url] = C13M",
"def nvTV(YKHO, uPxI, NCls):\n YKHO._dbs[uPxI.typename] = NCls\n return None",
"def SVWn(YKHO, kRnq):\n YKHO.schemaFile.append(kRnq)",
"def VUF1(YKHO, A97Q):\n if A97Q is None:\n return\n assert isinstance(A97Q,... | [
"0.5833771",
"0.5703108",
"0.5666816",
"0.53958666",
"0.5294575",
"0.5218828",
"0.51365197",
"0.5132061",
"0.5114596",
"0.5075275",
"0.5049462",
"0.50488544",
"0.5034838",
"0.5025878",
"0.5008115",
"0.50059134",
"0.49971506",
"0.49827003",
"0.49542782",
"0.49476612",
"0.49131... | 0.5594734 | 3 |
Get a sample action for the environment. | def Wy4U(YKHO, QePW, QpfX):
QpfX.set_code(IYqO.StatusCode.UNIMPLEMENTED)
QpfX.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AMEM(YKHO, QTBn):\n return YKHO.env.action_space.sample()",
"def xOhV(sEAN):\n return sEAN.action_space.sample()",
"def mvm2(YKHO):\n return YKHO._action_out(YKHO._env.action_space.sample())",
"def RcWY(YKHO, rNYq):\n return YKHO.env.action_space.sample()",
"def l489(YKHO) -> S2bQ:\n ret... | [
"0.76185215",
"0.7404975",
"0.7299461",
"0.7100204",
"0.7080212",
"0.6916834",
"0.67209744",
"0.6720714",
"0.66695344",
"0.6587704",
"0.6509922",
"0.63664025",
"0.6364884",
"0.6349804",
"0.6345511",
"0.6314598",
"0.6290537",
"0.62873936",
"0.62548965",
"0.6246563",
"0.6223951... | 0.0 | -1 |
Converts string formatted as 'YYYYmmdd' to datetime.date object. | def axZ0(Jv5M):
return _c1T.fromisoformat(Jv5M) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BOAD(vIwR):\n NArs = vIwR.strip().split('-')\n lO87 = int(NArs[0])\n x0eS = int(NArs[1])\n CjKC = int(NArs[2])\n Csk6 = _c1T(lO87, x0eS, CjKC)\n return Csk6",
"def J6Ib(_c1T):\n import datetime\n _c1T = str(_c1T)\n lO87 = int(_c1T[0:4])\n x0eS = int(_c1T[4:6])\n CjKC = int(_c... | [
"0.7793274",
"0.75733477",
"0.7341959",
"0.72478265",
"0.7221537",
"0.72005725",
"0.70459044",
"0.7018539",
"0.70141387",
"0.7005967",
"0.7004115",
"0.6984018",
"0.69427",
"0.6921662",
"0.6917369",
"0.69118243",
"0.6894727",
"0.6870697",
"0.685416",
"0.6826443",
"0.6769292",
... | 0.0 | -1 |
Returns the Path object corresponding to the project root directory. | def TdjZ():
return GkAb(gCuF.PROJECT_DIR) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def L59w() -> GkAb:\n return lkbE",
"def phdL() -> GkAb:\n return GkAb(xAKo).parent.parent",
"def phdL() -> GkAb:\n return GkAb(xAKo).parent.parent",
"def phdL() -> GkAb:\n return GkAb(xAKo).parent.parent",
"def phdL() -> GkAb:\n return GkAb(xAKo).parent.parent",
"def mSqg(YKHO):\n retu... | [
"0.85226953",
"0.7955894",
"0.7955894",
"0.7955894",
"0.7955894",
"0.79055315",
"0.78976744",
"0.7883186",
"0.7732845",
"0.7560384",
"0.7528911",
"0.7432359",
"0.7427349",
"0.7427349",
"0.7394236",
"0.7378838",
"0.73414433",
"0.7335685",
"0.7301656",
"0.72662354",
"0.72585154... | 0.72627217 | 20 |
Returns the Path object corresponding to the data directory (by convention located right under the project root directory). | def xe5l():
h_xa = GkAb(TdjZ() / 'data')
h_xa.mkdir(parents=True, exist_ok=True)
return h_xa | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TNBq():\n return '..' + Hy7s.sep + 'data' + Hy7s.sep",
"def s8df():\n return fHZh[m1hO]",
"def s8df():\n pmON = Hy7s.path.join(Hy7s.path.dirname(xAKo), mkjs)\n Eu4W = Hy7s.path.abspath(pmON)\n if not Hy7s.path.exists(Eu4W):\n raise iJw0\n return Eu4W",
"def s8df():\n return Hy... | [
"0.8220762",
"0.81921494",
"0.81650573",
"0.80827177",
"0.8011862",
"0.77588266",
"0.7678774",
"0.76734823",
"0.76482904",
"0.7619793",
"0.7598886",
"0.758206",
"0.7473098",
"0.7468629",
"0.7436914",
"0.74270844",
"0.73810446",
"0.7364241",
"0.7353846",
"0.7353846",
"0.735000... | 0.7887209 | 5 |
Implement a dropout layer. | def hr1G(WKvO, H5ew, lptV):
sjXb = tuKI.split(H5ew, 2)
nPSE = tuKI.bernoulli(sjXb[0], lptV, WKvO.shape)
ML52 = oyIN.where(nPSE, WKvO / lptV, 0.0)
return oyIN.where(lptV < 1.0, ML52, WKvO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MKgL(YKHO):\n return ZylS.keras.layers.Dropout(rate=YKHO.dropout)",
"def VNmX(YKHO, AdfU, hr1G=None):\n if hr1G is not None:\n AdfU.append(U78l.Dropout(hr1G))",
"def ycyx(YKHO, vHnr):\n return ZylS.nn.dropout(vHnr, YKHO.keep_prob)",
"def RZj3(YKHO, mWFP, j63z):\n return super()._Dropou... | [
"0.8178678",
"0.7669445",
"0.74932045",
"0.7487789",
"0.72926784",
"0.7138666",
"0.70125777",
"0.6966694",
"0.69610095",
"0.69550097",
"0.68795216",
"0.6819968",
"0.68178874",
"0.6765736",
"0.668942",
"0.6682834",
"0.6611335",
"0.6544647",
"0.6475342",
"0.64671147",
"0.646221... | 0.0 | -1 |
Instantiate random LFADS parameters. | def f_nh(H5ew, ombZ):
sjXb = tuKI.split(H5ew, 9)
BX9H = ombZ['data_dim']
UJFZ = ombZ['ntimesteps']
gXkk = ombZ['enc_dim']
i4FH = ombZ['con_dim']
XGod = ombZ['ii_dim']
hOkD = ombZ['gen_dim']
z2tP = ombZ['factors_dim']
Ep8u = ombZ['batch_size']
bVM1 = gXkk
s7A0 = ombZ['ib_dim']... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tuKI():\n r1VO = 10 ** oyIN.random.uniform(1.3, 4)\n ancZ = 10 ** oyIN.random.uniform(-2, -0.7)\n q9h4 = oyIN.random.beta(a=10, b=1)\n YnBA = r1VO * 4 / oyIN.sqrt(3) / q9h4\n K5WD = dict(dnn=YnBA, d_factor=ancZ, radius=r1VO)\n return K5WD",
"def DfhT():\n yZn7 = Jczo('lvad_model')\n y... | [
"0.64740753",
"0.6240033",
"0.6196234",
"0.6183743",
"0.6085013",
"0.602552",
"0.598905",
"0.5984561",
"0.5884209",
"0.5836884",
"0.58205914",
"0.5800904",
"0.5794623",
"0.5788215",
"0.57541484",
"0.57278126",
"0.5709481",
"0.5696416",
"0.56947577",
"0.56926215",
"0.5672331",... | 0.53945327 | 60 |
Return the full zmq adress of this TargetPod | def hM0A(YKHO) -> str:
return f'{YKHO.host}:{YKHO.port}' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KcEq(YKHO) -> str:\n return YKHO.first_pod_args.host",
"def UTX6(YKHO):\n return YKHO.__ip",
"def UTX6(YKHO) -> str:\n return YKHO._backend.address",
"def f2IA(YKHO) -> str:\n return f'{YKHO.host}:{YKHO.port_out}'",
"def UTX6(YKHO):\n return '%s:%s' % (YKHO.ip, YKHO.port)",
"def ceuN(Y... | [
"0.6192749",
"0.6182428",
"0.6154282",
"0.61490655",
"0.59441143",
"0.5927812",
"0.5911011",
"0.5891114",
"0.5867627",
"0.57722616",
"0.5733227",
"0.5714705",
"0.5696146",
"0.5681227",
"0.56665075",
"0.56661963",
"0.56632304",
"0.5659315",
"0.56486464",
"0.56266415",
"0.56193... | 0.5819245 | 9 |
Return the `out_edges` field of this TargetPod | def U7KR(YKHO) -> x1iM[str]:
return list(YKHO.proto.out_edges) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qz00(YKHO):\n mC4V = []\n for TSKM in cpvk.G[YKHO].values():\n for G1Hx in TSKM.keys():\n mC4V.append(TSKM.get(G1Hx).get('edge'))\n return mC4V",
"def qHU6(YKHO):\n return YKHO.__out_segments",
"def _Qp0(YKHO) -> dict:\n return YKHO.__ni_out",
"def L75T(YKHO, FJhS: int) -... | [
"0.7513375",
"0.64858174",
"0.64319706",
"0.6328241",
"0.6209141",
"0.61408705",
"0.6107665",
"0.6038455",
"0.6024965",
"0.6024965",
"0.6024965",
"0.6024965",
"0.6024965",
"0.6024965",
"0.59724236",
"0.5941938",
"0.59382355",
"0.593236",
"0.59132075",
"0.5885706",
"0.58560854... | 0.8083852 | 0 |
Adds an edge to the graph. | def rz7z(YKHO, foAS: str, CxMM: str, cQMo: bool=False) -> None:
YKHO._get_target_pod(foAS).add_edge(CxMM, cQMo)
YKHO._get_target_pod(CxMM).expected_parts += 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rz7z(YKHO, D70y):\n if YKHO.has_edge(D70y) == 0:\n YKHO.__graph_dict[D70y[0]].append(D70y[1])",
"def F1KG(YKHO, D70y: Edge):\n YKHO.edges.append(D70y)",
"def rz7z(YKHO, D70y):\n assert D70y not in YKHO.edges\n YKHO.edges.append(D70y)",
"def rz7z(YKHO, D70y):\n zZcM = D70y.get_source... | [
"0.841144",
"0.83919084",
"0.8347221",
"0.8330175",
"0.82800245",
"0.8196861",
"0.81965816",
"0.81554943",
"0.806904",
"0.7990693",
"0.79418606",
"0.79395586",
"0.79385245",
"0.7935002",
"0.7914147",
"0.7814346",
"0.77845144",
"0.7768525",
"0.7742754",
"0.7682856",
"0.7616938... | 0.0 | -1 |
Adds a Pod vertex to the graph. | def fQsa(YKHO, e5wU: str, m3AW, IA0p, XVYe, JJK9) -> None:
if e5wU in YKHO.pods:
raise ValueError(f'Vertex with name {e5wU} already exists. Please check your configuration for unique Pod names.')
pan_ = YKHO.pods[e5wU]
pan_.host = m3AW
pan_.port = IA0p
pan_.port_out = XVYe
pan_.target_id... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ohmD(YKHO, SLBp):\n raise NotImplementedError",
"def ohmD(YKHO, SLBp):\n YKHO.vertices.append(SLBp)\n YKHO.vertex_edge[SLBp] = []",
"def FOdN(YKHO, SLBp):\n if isinstance(SLBp, Yegm):\n u6eo = SLBp.name\n YKHO._vertices[u6eo] = SLBp",
"def ohmD(YKHO, oqUi):\n pass",
"def oh... | [
"0.7485833",
"0.73174775",
"0.7305458",
"0.7236868",
"0.7225561",
"0.7184499",
"0.7165623",
"0.7161254",
"0.6994475",
"0.6994475",
"0.69344044",
"0.6928072",
"0.6909965",
"0.6897245",
"0.6893523",
"0.688598",
"0.68799144",
"0.684037",
"0.6832085",
"0.6824606",
"0.68227196",
... | 0.6820241 | 21 |
Test the `create_family_from_archive` utility function. | def QNlM(qRWY, ZDRN, ceJL):
from aiida_sssp.data import SsspParameters
from aiida_sssp.groups import SsspFamily
kSs9, AJ5d, Ol8d = ZDRN
UXqs = 'SSSP/0.0/LDA/extreme'
if AJ5d is not None:
with trZe.raises(AJ5d) as AJ5d:
cy8b(UXqs, kSs9)
assert Ol8d in str(AJ5d.value)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SC3g(YKHO):\n yfTw = Hy7s.path.join(YKHO.sff_dir, 'test.fna')\n DskI = Hy7s.path.join(YKHO.gz_sff_dir, 'test_gz.fna')\n boe0(YKHO.sff_fp, yfTw)\n boe0(YKHO.sff_gz_fp, DskI)\n YKHO.assertEqual(open(yfTw).read(), XSPM)\n YKHO.assertEqual(open(DskI).read(), XSPM)",
"def CKGP(YKHO):\n pass",... | [
"0.59001476",
"0.58907086",
"0.54964745",
"0.54425323",
"0.5414196",
"0.5383591",
"0.5317491",
"0.52587354",
"0.5235035",
"0.5157961",
"0.5147798",
"0.51425356",
"0.5109094",
"0.5101278",
"0.5082643",
"0.5081116",
"0.50675404",
"0.50433546",
"0.50284106",
"0.5020544",
"0.5012... | 0.75291246 | 0 |
Sets the gender of this HumanProperties. | def EE3v(YKHO, EE3v):
YKHO._gender = EE3v | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EE3v(YKHO, EE3v):\n if EE3v is None:\n raise ValueError('Invalid value for `gender`, must not be `None`')\n YKHO._gender = EE3v",
"def EE3v(YKHO, EE3v: str):\n BbPm = ['male', 'female', 'unknown']\n if EE3v not in BbPm:\n raise ValueError('Invalid value for `gender` ({0}), must be o... | [
"0.75239986",
"0.7425739",
"0.6993064",
"0.6490646",
"0.63583153",
"0.62948114",
"0.6004537",
"0.59596694",
"0.59596694",
"0.58688724",
"0.5770474",
"0.5770474",
"0.5716314",
"0.5682937",
"0.565219",
"0.55008",
"0.5496496",
"0.54080206",
"0.53884447",
"0.53606254",
"0.5316272... | 0.77409106 | 3 |
Sets the is_long_sleeve of this HumanProperties. | def yjwK(YKHO, yjwK):
YKHO._is_long_sleeve = yjwK | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rOPj(YKHO, BWXx):\n return YKHO._set(isLong=BWXx)",
"def v0op(_VEY: Valve, BWXx: bool) -> None:\n _VEY.is_watering = BWXx",
"def e41f(YKHO, KCHu):\n YKHO.long_help = KCHu",
"def OpLo(YKHO, mWFP: unicode, BWXx: long) -> None:\n ...",
"def oQmL(YKHO, dZZe):\n YKHO.longdescription(dZZe)",
... | [
"0.6274345",
"0.5518907",
"0.54605395",
"0.52524024",
"0.5240169",
"0.5117591",
"0.49670202",
"0.48811704",
"0.48720768",
"0.485832",
"0.47985044",
"0.47866216",
"0.47752094",
"0.47620523",
"0.47442243",
"0.46899542",
"0.4667595",
"0.46543428",
"0.46432644",
"0.46174517",
"0.... | 0.8383738 | 0 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, IqOA):
return False
return YKHO.__dict__ == Elif.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.80891633",
"0.80891633",
"0.8055254",
"0.7983334",
"0.7967544",
"0.7967544",
"0.7967544",
"0.7967544",
"0.7967544",
"0.7967544",
"0.7967544",
"0.7967544",
"0.7967544",
"0.7967544",
"0.7967544",
"0.7967544",
"0.7967544",
"0.7967544",
"0.7967544",
"0.7967544",
"0.7967544",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748"
] | 0.0 | -1 |
Init with Key & Secret. | def FIMM(YKHO, uUiS, qWsO):
YKHO.apiKey = uUiS
YKHO.apiSecret = qWsO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, MYjm, QDug, **B2fa):\n pass",
"def FIMM(YKHO, XxjF, MlO6):\n YKHO._auth_key = XxjF\n YKHO._auth_secret = MlO6",
"def FIMM(YKHO, rSTc, DXni):\n YKHO.apikey = rSTc\n YKHO.secret = DXni",
"def FIMM(YKHO, H5ew, DXni, eOtH=None, WBtS=None, UhTt=None):\n YKHO.key = H5ew\n YKHO.s... | [
"0.7203251",
"0.7168211",
"0.7060145",
"0.6797724",
"0.6735708",
"0.6697619",
"0.66877854",
"0.6655526",
"0.6640612",
"0.6640612",
"0.6640612",
"0.66304076",
"0.6590751",
"0.65891945",
"0.6531262",
"0.6499382",
"0.64528936",
"0.6377827",
"0.63693947",
"0.6337156",
"0.630693",... | 0.6505151 | 15 |
Plot prediction against target. | def wuSA(LVAh, amiz, mWFP, kmfe):
aNZO = rLdf.DataFrame(LVAh, columns=['y%s' % dw2d]).plot(figsize=(15, 10))
rLdf.DataFrame(amiz, columns=['yhat%s' % dw2d]).plot(ax=aNZO)
QrM1.title('%s' % mWFP)
QrM1.tight_layout()
QrM1.savefig(f'{kmfe / mWFP}.png')
rLdf.DataFrame(LVAh - amiz, columns=[f'yhat {d... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xymb(YKHO):\n QrM1.title('Targets vs. Predictions')\n QrM1.plot(YKHO.T, label='Targets')\n QrM1.plot(YKHO.Y, label='Predictions')\n QrM1.xlabel('Sample number')\n QrM1.legend()\n QrM1.show()",
"def ZJzi(nPrm, _Xkt, V1xi):\n assert nPrm.shape[0] == _Xkt.shape[0]\n assert nPrm.shape[0] ... | [
"0.8443108",
"0.7034533",
"0.7034533",
"0.7009303",
"0.6999596",
"0.6971293",
"0.6953517",
"0.6945872",
"0.6929676",
"0.6912065",
"0.688605",
"0.68140537",
"0.6790176",
"0.67810327",
"0.6772181",
"0.66834694",
"0.66312796",
"0.66306835",
"0.6558689",
"0.6545303",
"0.6509803",... | 0.61086226 | 41 |
Filters resources by given resource age in minutes. | def xUfE(YKHO, JKCy: [], WIMr: int):
drp0 = []
for Eorv in JKCy:
if WIMr:
yKcO = YKHO._to_utc_datetime(Eorv.updated_on)
Os4s = qcWV.utcnow().replace(tzinfo=FXGE.UTC)
VOlW = (Os4s - yKcO).total_seconds() / 60
if VOlW >= WIMr:
drp0.append(Eor... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fVgK(RRlC, GFDZ):\n yo7_ = _c1T.today()\n dixj = []\n for eHNT in RRlC:\n r8hN = iGNj.search(eHNT)\n if not r8hN:\n continue\n pJCq = _c1T(int(r8hN.group(1)), int(r8hN.group(2)), int(r8hN.group(3)))\n if GFDZ(yo7_ - pJCq):\n dixj.append((pJCq, eHNT))\n... | [
"0.56945246",
"0.56207496",
"0.53699774",
"0.5265094",
"0.52016294",
"0.5154099",
"0.5149396",
"0.51413107",
"0.513546",
"0.5112312",
"0.5016751",
"0.5009684",
"0.4980972",
"0.4951849",
"0.49517897",
"0.49176037",
"0.4917213",
"0.49077666",
"0.48246667",
"0.4819532",
"0.48178... | 0.82798904 | 0 |
Returns true in case if dependent template is listed in command line. | def CmfM(YKHO, G2rH: [], JUs4: []) -> bool:
for PIro in JUs4:
if PIro not in G2rH:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A2qk(YKHO, pan_):\n if pan_.has_key('use'):\n return True\n else:\n return None",
"def zbEX(YKHO):\n return bool(gTEQ('PrlVmCfg_IsTemplate', YKHO.handle))",
"def zbEX(YKHO):\n return bool(gTEQ('PrlFoundVmInfo_IsTemplate', YKHO.handle))",
"def vtfo(YKHO):\n try:\n JMwD(... | [
"0.63289666",
"0.6144923",
"0.60574156",
"0.60284775",
"0.59596926",
"0.5956603",
"0.58326936",
"0.5691765",
"0.56398195",
"0.5595131",
"0.558176",
"0.5581468",
"0.5564117",
"0.55474675",
"0.5527098",
"0.5521296",
"0.5512544",
"0.5450551",
"0.5397598",
"0.5397598",
"0.5394962... | 0.71113324 | 0 |
Send a text to the telegram chat defined by chatID, using the bot defined by token. | def WdaX(l5Ny, Axbp=Axbp, eOtH=eOtH, ITS7=10):
bD7m = f'https://api.telegram.org/bot{eOtH}/sendMessage'
zJeG = f'curl -s --max-time {ITS7} '
zJeG += f'-d "chat_id={Axbp}&disable_web_page_preview=1&text={l5Ny}" {bD7m}'
_hkX = Hy7s.popen(zJeG).read().strip()
return qQXR.loads(_hkX) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WdaX(YKHO, DVsZ, l5Ny):\n YKHO.updater.bot.sendMessage(chat_id=DVsZ, text=l5Ny)\n RKD7.info('Send msg @%s: %s..', DVsZ, l5Ny[:20])",
"def WKWc(l5Ny):\n JyK9 = aoUU.Bot(token='')\n DVsZ = ''\n JyK9.send_message(chat_id=DVsZ, text=l5Ny)\n ITS7.sleep(5)",
"def bc9O(eOtH, DVsZ, Ol8d):\n Jy... | [
"0.7712212",
"0.76326084",
"0.7613906",
"0.749241",
"0.7476107",
"0.7354592",
"0.69569176",
"0.69276875",
"0.68829226",
"0.6862093",
"0.6830384",
"0.68245775",
"0.6725747",
"0.657819",
"0.64787465",
"0.64349604",
"0.64338166",
"0.64260566",
"0.6422062",
"0.6415245",
"0.632759... | 0.71962994 | 6 |
Send a text to the telegram chat defined by chatID, using the bot defined by token. | def SiMX(xKOL, l5Ny='', Axbp=Axbp, eOtH=eOtH, ITS7=10):
bD7m = f'https://api.telegram.org/bot{eOtH}/sendPhoto'
zJeG = f'curl -s -X POST {bD7m}'
zJeG += f' -F chat_id={Axbp} -F photo=@{xKOL} -F caption="{l5Ny}"'
_hkX = Hy7s.popen(zJeG).read().strip()
return qQXR.loads(_hkX) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WdaX(YKHO, DVsZ, l5Ny):\n YKHO.updater.bot.sendMessage(chat_id=DVsZ, text=l5Ny)\n RKD7.info('Send msg @%s: %s..', DVsZ, l5Ny[:20])",
"def WKWc(l5Ny):\n JyK9 = aoUU.Bot(token='')\n DVsZ = ''\n JyK9.send_message(chat_id=DVsZ, text=l5Ny)\n ITS7.sleep(5)",
"def bc9O(eOtH, DVsZ, Ol8d):\n Jy... | [
"0.7712212",
"0.76326084",
"0.7613906",
"0.749241",
"0.7476107",
"0.7354592",
"0.71962994",
"0.69569176",
"0.69276875",
"0.68829226",
"0.6862093",
"0.6830384",
"0.68245775",
"0.6725747",
"0.657819",
"0.64787465",
"0.64349604",
"0.64338166",
"0.64260566",
"0.6422062",
"0.64152... | 0.0 | -1 |
Send a text to the telegram chat defined by chatID, using the bot defined by token. | def j0kY(IznC, l5Ny='', Axbp=Axbp, eOtH=eOtH, ITS7=10):
bD7m = f'https://api.telegram.org/bot{eOtH}/sendDocument'
zJeG = f'curl -s -X POST {bD7m}'
zJeG += f' -F chat_id={Axbp} -F document=@{IznC} -F caption="{l5Ny}"'
_hkX = Hy7s.popen(zJeG).read().strip()
return qQXR.loads(_hkX) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WdaX(YKHO, DVsZ, l5Ny):\n YKHO.updater.bot.sendMessage(chat_id=DVsZ, text=l5Ny)\n RKD7.info('Send msg @%s: %s..', DVsZ, l5Ny[:20])",
"def WKWc(l5Ny):\n JyK9 = aoUU.Bot(token='')\n DVsZ = ''\n JyK9.send_message(chat_id=DVsZ, text=l5Ny)\n ITS7.sleep(5)",
"def bc9O(eOtH, DVsZ, Ol8d):\n Jy... | [
"0.7711832",
"0.763301",
"0.76137704",
"0.74929494",
"0.7476594",
"0.73550326",
"0.71967673",
"0.69575894",
"0.692773",
"0.68828005",
"0.6861662",
"0.6830775",
"0.682482",
"0.67256427",
"0.65787005",
"0.64792186",
"0.64351135",
"0.64338857",
"0.6425949",
"0.6422014",
"0.64145... | 0.0 | -1 |
Send a text to the telegram chat defined by chatID, using the bot defined by token. | def qNru(TN1U, l5Ny='', Axbp=Axbp, eOtH=eOtH, ITS7=10):
bD7m = f'https://api.telegram.org/bot{eOtH}/sendVideo'
zJeG = f'curl -s -X POST {bD7m}'
zJeG += f' -F chat_id={Axbp} -F video=@{TN1U} -F caption="{l5Ny}"'
_hkX = Hy7s.popen(zJeG).read().strip()
return qQXR.loads(_hkX) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WdaX(YKHO, DVsZ, l5Ny):\n YKHO.updater.bot.sendMessage(chat_id=DVsZ, text=l5Ny)\n RKD7.info('Send msg @%s: %s..', DVsZ, l5Ny[:20])",
"def WKWc(l5Ny):\n JyK9 = aoUU.Bot(token='')\n DVsZ = ''\n JyK9.send_message(chat_id=DVsZ, text=l5Ny)\n ITS7.sleep(5)",
"def bc9O(eOtH, DVsZ, Ol8d):\n Jy... | [
"0.7711314",
"0.76334524",
"0.7614409",
"0.74934894",
"0.74773306",
"0.73552173",
"0.71970767",
"0.6958888",
"0.6929296",
"0.6882096",
"0.686202",
"0.6831577",
"0.6824231",
"0.6724769",
"0.6579513",
"0.6480164",
"0.6435269",
"0.64342",
"0.64244556",
"0.64219946",
"0.6413758",... | 0.5756889 | 63 |
Send a text to the telegram chat defined by chatID, using the bot defined by token. | def YD9c(D8Si, l5Ny='', Axbp=Axbp, eOtH=eOtH, ITS7=10):
bD7m = f'https://api.telegram.org/bot{eOtH}/sendAudio'
zJeG = f'curl -s -X POST {bD7m}'
zJeG += f' -F chat_id={Axbp} -F audio=@{D8Si} -F caption="{l5Ny}"'
_hkX = Hy7s.popen(zJeG).read().strip()
return qQXR.loads(_hkX) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WdaX(YKHO, DVsZ, l5Ny):\n YKHO.updater.bot.sendMessage(chat_id=DVsZ, text=l5Ny)\n RKD7.info('Send msg @%s: %s..', DVsZ, l5Ny[:20])",
"def WKWc(l5Ny):\n JyK9 = aoUU.Bot(token='')\n DVsZ = ''\n JyK9.send_message(chat_id=DVsZ, text=l5Ny)\n ITS7.sleep(5)",
"def bc9O(eOtH, DVsZ, Ol8d):\n Jy... | [
"0.7712212",
"0.76326084",
"0.7613906",
"0.749241",
"0.7476107",
"0.7354592",
"0.71962994",
"0.69569176",
"0.69276875",
"0.68829226",
"0.6862093",
"0.6830384",
"0.68245775",
"0.6725747",
"0.657819",
"0.64787465",
"0.64349604",
"0.64338166",
"0.64260566",
"0.6422062",
"0.64152... | 0.0 | -1 |
Validate password against the hash in SQL | def bqkU(YKHO, CBIr, jTXt):
deVW, T9m5 = YKHO.pwd_context.verify_and_update(str(jTXt), CBIr['users_auth'])
if not deVW:
bo34.error('Invalid password for %(users_name)s', CBIr)
raise iKio('Invalid password for %(users_name)s' % CBIr)
if T9m5:
bo34.warning("User %(users_name)s's hash n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sNjs(YKHO, jTXt):\n return z8jj(YKHO.password_hash, jTXt)",
"def Ffyx(jTXt, MKlR):\n NTfD = MKlR.split(',')[0]\n return MKlR == mNIv(jTXt, NTfD)",
"def Ffyx(mWFP, jTXt, MKlR):\n NTfD = MKlR.split(',')[0]\n return MKlR == mNIv(mWFP, jTXt, NTfD)",
"def yeKu(mWFP, jTXt, MKlR):\n NTfD = MKl... | [
"0.7673136",
"0.7588931",
"0.7512637",
"0.7510455",
"0.7457767",
"0.7440227",
"0.7418322",
"0.741745",
"0.7416979",
"0.73959875",
"0.73959875",
"0.7366982",
"0.73518187",
"0.732669",
"0.7292097",
"0.72817844",
"0.72692806",
"0.72612107",
"0.7259947",
"0.725657",
"0.72445816",... | 0.0 | -1 |
Evaluates the model on a new input. The registered forward hooks will save all the data that is necessary to compute the relevance per neuron per layer. | def b7La(YKHO, UBMT):
YKHO.inverter.reset_module_list()
YKHO.prediction = YKHO.model(UBMT)
return YKHO.prediction | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVH6(YKHO, pKvt):\n if YKHO.mode == 'pre':\n return YKHO.pretrain_forward(pKvt)\n elif YKHO.mode == 'meta':\n TNWM, ThGV, D_YX, wEf2 = pKvt\n return YKHO.meta_forward(TNWM, ThGV, D_YX, wEf2)\n elif YKHO.mode == 'preval':\n TNWM, ThGV, D_YX = pKvt\n return YKHO.preval... | [
"0.6471578",
"0.6365001",
"0.6337203",
"0.6303294",
"0.61864054",
"0.6095717",
"0.6092909",
"0.60436773",
"0.6035971",
"0.5976409",
"0.5966742",
"0.59402627",
"0.59209967",
"0.5886627",
"0.5868091",
"0.58577186",
"0.5845039",
"0.5843236",
"0.58341706",
"0.5823958",
"0.5820561... | 0.59011 | 13 |
Render the main page. | def kZiy():
if QePW.method == 'GET':
return TvZl('index.html', result=False)
Pe9W = QePW.form['sql']
pMVb = QePW.form['dialect']
return vKnz(nKyW('routes.fluff_results', sql=aYWt(Pe9W), dialect=pMVb)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ozko():\n return TvZl('main_page.html')",
"def Ozko():\n return TvZl('index.html')",
"def b8V_():\n return TvZl('main.html')",
"def b8V_():\n return TvZl('main.html')",
"def OsD3():\n return TvZl('index.html')",
"def b8V_():\n B2Dn = xhTS()\n DumB = UlWi(B2Dn)\n SV4W = CDCC()\... | [
"0.8244045",
"0.80660653",
"0.77612364",
"0.77612364",
"0.76640457",
"0.76616615",
"0.7500369",
"0.74810046",
"0.7464349",
"0.7427967",
"0.7378952",
"0.73345315",
"0.73345315",
"0.7309027",
"0.7309027",
"0.72957826",
"0.7287541",
"0.7259883",
"0.722883",
"0.721577",
"0.718252... | 0.0 | -1 |
Find the index (with respect to array) of the median of the first, last, and middle values. Used in quick_median(), quick_inplace_median(), and quick_inplace_repeat(). | def wZnr(qw7D, LFlW, _tIi):
x1fj = (LFlW + _tIi) // 2
if qw7D[LFlW] > qw7D[x1fj]:
if qw7D[x1fj] > qw7D[_tIi]:
return x1fj
elif qw7D[LFlW] > qw7D[_tIi]:
return _tIi
return LFlW
elif qw7D[LFlW] > qw7D[_tIi]:
return LFlW
elif qw7D[x1fj] > qw7D[_tIi]:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BjRM(ezWE):\n _0VL = []\n sL7f = len(ezWE)\n BjRM = 0\n if sL7f % 2 == 0:\n _0VL.append(int(sL7f / 2) - 1)\n _0VL.append(int(sL7f / 2))\n BjRM = (ezWE[_0VL[0]] + ezWE[_0VL[1]]) / 2\n else:\n _0VL.append(int(sL7f / 2))\n BjRM = ezWE[_0VL[0]]\n return (BjRM, _... | [
"0.7988514",
"0.7803164",
"0.7736163",
"0.7719672",
"0.7542702",
"0.74649537",
"0.7442782",
"0.7337539",
"0.7332045",
"0.73006344",
"0.72986174",
"0.7170138",
"0.7115831",
"0.7114024",
"0.7113509",
"0.70860296",
"0.70819414",
"0.7063987",
"0.70117074",
"0.6986442",
"0.6985024... | 0.71094555 | 15 |
Take an array and put it in heap order. Operates inplace. Used in heap_sort(). Uses sift_down(). | def QZno(qw7D, ZfWN):
cntZ = (ZfWN - 1) // 2
for yKcO in range(cntZ, -1, -1):
docK.sift_down(qw7D, yKcO, ZfWN) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sEWy(qw7D):\n ZfWN = len(qw7D) - 1\n docK.heapify(qw7D, ZfWN)\n for Os4s in range(ZfWN, 0, -1):\n qw7D[Os4s], qw7D[0] = (qw7D[0], qw7D[Os4s])\n docK.sift_down(qw7D, 0, Os4s - 1)",
"def Npt8(ezWE):\n for YRbF in range(len(ezWE) - 1, -1, -1):\n O9C_(ezWE, len(ezWE), YRbF)",
"... | [
"0.84089077",
"0.8053701",
"0.7922342",
"0.7725338",
"0.7705888",
"0.75993884",
"0.7520603",
"0.7480076",
"0.7462997",
"0.74388134",
"0.74160355",
"0.7370213",
"0.7345395",
"0.73398787",
"0.7333361",
"0.72831184",
"0.7270901",
"0.7197215",
"0.71026945",
"0.70997256",
"0.70955... | 0.79103863 | 3 |
Change position of item in list until it is correctly placed in heap. Used by heap_sort() (and heapify()). | def BXfP(qw7D, yKcO, Os4s):
tk5Y = yKcO
while tk5Y * 2 + 1 <= Os4s:
aUGN = tk5Y * 2 + 1
b3SJ = tk5Y
if qw7D[b3SJ] < qw7D[aUGN]:
b3SJ = aUGN
if aUGN + 1 <= Os4s and qw7D[b3SJ] < qw7D[aUGN + 1]:
b3SJ = aUGN + 1
if b3SJ != tk5Y:
qw7D[tk5Y]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def plJH(YKHO, d6pt):\n while d6pt > 0:\n ICDs = d6pt // 2\n if ICDs > 0 and YKHO.heaplist[ICDs] < YKHO.heaplist[d6pt]:\n YKHO.heaplist[ICDs], YKHO.heaplist[d6pt] = (YKHO.heaplist[d6pt], YKHO.heaplist[ICDs])\n d6pt = d6pt // 2",
"def rRKC(YKHO, YRbF):\n while YRbF // 2 > 0:\... | [
"0.74729395",
"0.67565596",
"0.67273504",
"0.67273504",
"0.657409",
"0.6520025",
"0.6519884",
"0.6510009",
"0.65052843",
"0.65020937",
"0.64885044",
"0.64481914",
"0.64133036",
"0.6340108",
"0.6339687",
"0.6328895",
"0.63008386",
"0.62924886",
"0.6235628",
"0.62298685",
"0.62... | 0.0 | -1 |
Returns loss and softmax output symbols given logits and integercoded labels. | def L8kW(YKHO, KeL5: mx.sym.Symbol, Crrw: mx.sym.Symbol) -> x1iM[RsfQ.sym.Symbol]:
raise NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zC_E(KeL5, Crrw):\n N6Z1 = ZylS.nn.softmax(KeL5)\n sSN_ = ZylS.losses.softmax_cross_entropy(onehot_labels=Crrw, logits=KeL5)\n return (N6Z1, sSN_)",
"def L8kW(YKHO, KeL5: mx.sym.Symbol, Crrw: mx.sym.Symbol) -> x1iM[RsfQ.sym.Symbol]:\n BFeB = RsfQ.sym.softmax(data=KeL5)\n QExF = 1.0 - YKHO._alp... | [
"0.6545345",
"0.6399525",
"0.6255027",
"0.6205115",
"0.619023",
"0.6149457",
"0.6141253",
"0.59420794",
"0.5928294",
"0.5905454",
"0.5887399",
"0.5879356",
"0.58532184",
"0.5849394",
"0.5800557",
"0.5785446",
"0.5783505",
"0.5765924",
"0.5764461",
"0.5726306",
"0.57120687",
... | 0.6156791 | 5 |
Returns loss and softmax output symbols given logits and integercoded labels. | def L8kW(YKHO, KeL5: mx.sym.Symbol, Crrw: mx.sym.Symbol) -> x1iM[RsfQ.sym.Symbol]:
if YKHO.loss_config.normalization_type == Nq1b.LOSS_NORM_VALID:
OEry = 'valid'
elif YKHO.loss_config.normalization_type == Nq1b.LOSS_NORM_BATCH:
OEry = 'null'
else:
raise ValueError('Unknown loss norma... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zC_E(KeL5, Crrw):\n N6Z1 = ZylS.nn.softmax(KeL5)\n sSN_ = ZylS.losses.softmax_cross_entropy(onehot_labels=Crrw, logits=KeL5)\n return (N6Z1, sSN_)",
"def L8kW(YKHO, KeL5: mx.sym.Symbol, Crrw: mx.sym.Symbol) -> x1iM[RsfQ.sym.Symbol]:\n BFeB = RsfQ.sym.softmax(data=KeL5)\n QExF = 1.0 - YKHO._alp... | [
"0.6545345",
"0.6399525",
"0.6255027",
"0.6205115",
"0.619023",
"0.6156791",
"0.6149457",
"0.59420794",
"0.5928294",
"0.5905454",
"0.5887399",
"0.5879356",
"0.58532184",
"0.5849394",
"0.5800557",
"0.5785446",
"0.5783505",
"0.5765924",
"0.5764461",
"0.5726306",
"0.57120687",
... | 0.6141253 | 7 |
Returns loss and softmax output symbols given logits and integercoded labels. | def L8kW(YKHO, KeL5: mx.sym.Symbol, Crrw: mx.sym.Symbol) -> x1iM[RsfQ.sym.Symbol]:
BFeB = RsfQ.sym.softmax(data=KeL5)
QExF = 1.0 - YKHO._alpha
QQss = YKHO._alpha / (YKHO._vocab_size - 1.0)
CqbS = RsfQ.sym.one_hot(indices=RsfQ.sym.cast(data=Crrw, dtype='int32'), depth=YKHO._vocab_size, on_value=QExF, off... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zC_E(KeL5, Crrw):\n N6Z1 = ZylS.nn.softmax(KeL5)\n sSN_ = ZylS.losses.softmax_cross_entropy(onehot_labels=Crrw, logits=KeL5)\n return (N6Z1, sSN_)",
"def N77f(Crrw, KeL5):\n return gTdG(Crrw, KeL5, from_logits=True)",
"def T7yA(A07C, YRbF, wyyA):\n Fu9e = nMvt.slice(A07C, (0, YRbF), (-1, 1))... | [
"0.6545345",
"0.6255027",
"0.6205115",
"0.619023",
"0.6156791",
"0.6149457",
"0.6141253",
"0.59420794",
"0.5928294",
"0.5905454",
"0.5887399",
"0.5879356",
"0.58532184",
"0.5849394",
"0.5800557",
"0.5785446",
"0.5783505",
"0.5765924",
"0.5764461",
"0.5726306",
"0.57120687",
... | 0.6399525 | 1 |
Given a list of text data, return a list of text that has no parentheses only alhpabet characters and spaces. Then, we stem the text using a porter 2 stemmer and append each cleaned text to a list that we return | def CZge(gnli):
nfYJ = []
for l5Ny in gnli:
m8zx = cvNm(l5Ny)
ufu3 = s3hF(m8zx)
Y21D = BwdK(ufu3)
XTZm = iRTD(Y21D)
nfYJ.append(XTZm.lower())
return nfYJ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Gz0x(l5Ny):\n try:\n l5Ny = [mkhU.stem(GIN8) for GIN8 in l5Ny]\n l5Ny = [GIN8 for GIN8 in l5Ny if len(GIN8) > 1]\n except IndexError:\n pass\n return l5Ny",
"def Qa8T(eKbg, mkhU):\n CgYd = list()\n for l5Ny in eKbg:\n CgYd.append(' '.join([mkhU.stem(GIN8) for GIN8 i... | [
"0.75092083",
"0.7438072",
"0.7425269",
"0.7374089",
"0.734849",
"0.7343562",
"0.73393446",
"0.73371583",
"0.7284016",
"0.7237463",
"0.71553564",
"0.7142604",
"0.7138744",
"0.7137906",
"0.7126351",
"0.70571214",
"0.7043008",
"0.7025774",
"0.70231926",
"0.70154375",
"0.6998541... | 0.8237104 | 0 |
Remove anything that's not an alphabet character or a space from text | def s3hF(l5Ny):
Cwt5 = ZbWC.compile('[a-zA-Z .]*')
NNoT = Cwt5.findall(l5Ny)
gVdR = ''.join(NNoT)
return gVdR | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rsGq(l5Ny):\n return ZbWC.sub('[^a-zA-Z]', ' ', l5Ny)",
"def Lk1Y(l5Ny):\n l5Ny = l5Ny.strip()\n l5Ny = ZbWC.sub('[^A-Za-z0-9 ]+', '', l5Ny)\n return l5Ny",
"def nQqG(l5Ny):\n return S0mm.replace_non_alphabetic_text(l5Ny, '')",
"def v4Ct(l5Ny):\n return ''.join([bseI for bseI in l5Ny if... | [
"0.8954562",
"0.8641455",
"0.85712093",
"0.85675484",
"0.8557319",
"0.8336912",
"0.8287351",
"0.79518515",
"0.790018",
"0.78991276",
"0.787843",
"0.785203",
"0.7847697",
"0.7815753",
"0.7775478",
"0.7736409",
"0.77117395",
"0.7710151",
"0.7695048",
"0.7655187",
"0.76430225",
... | 0.7982726 | 7 |
Gets parent directory of this file (and subsequently, the project). | def SPEp(pmON: Union[pathlib.PurePath, str]=xAKo) -> str:
return str(oAb3.Path(pmON).parent.absolute()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Eyiy():\n pmON = Hy7s.path.dirname(Hy7s.path.realpath(xAKo))\n pmON = '/'.join(pmON.split('/')[:-1])\n return pmON",
"def gmqI(pmON):\n return Hy7s.path.dirname(pmON)",
"def Chi4(YKHO):\n return Hy7s.path.join(Hy7s.getcwd(), 'src', 'data', 'genes')",
"def gmqI(pmON):\n return Hy7s.path.... | [
"0.82566184",
"0.8090856",
"0.80121166",
"0.80055994",
"0.7889913",
"0.785325",
"0.7827623",
"0.7691862",
"0.76535445",
"0.7653493",
"0.7567486",
"0.75357455",
"0.75080067",
"0.75076336",
"0.75076336",
"0.7498596",
"0.74759984",
"0.74759984",
"0.74759984",
"0.74759984",
"0.73... | 0.6923478 | 35 |
Creates a screen aligned quad using two triangles with normals and texture coordinates. | def Gn5C(I0U6=oWNQ, u8R3=True, N4KT=True, mWFP=None) -> YlKm:
return NSUg(size=(2.0, 2.0), normals=u8R3, uvs=N4KT, attr_names=I0U6, name=mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NSUg(zNig=(1.0, 1.0), oeNL=(0.0, 0.0), u8R3=True, N4KT=True, I0U6=oWNQ, mWFP=None) -> YlKm:\n TVTK, H2v2 = zNig\n QzhK, qyH4 = oeNL\n sX5N = XTiz.array([QzhK - TVTK / 2.0, qyH4 + H2v2 / 2.0, 0.0, QzhK - TVTK / 2.0, qyH4 - H2v2 / 2.0, 0.0, QzhK + TVTK / 2.0, qyH4 - H2v2 / 2.0, 0.0, QzhK - TVTK / 2.0, q... | [
"0.6595708",
"0.6467021",
"0.62314165",
"0.5977625",
"0.5938748",
"0.57873476",
"0.5746167",
"0.5685066",
"0.56437856",
"0.5621656",
"0.56196475",
"0.5567472",
"0.5559844",
"0.55326164",
"0.5481492",
"0.5459319",
"0.54551905",
"0.54518175",
"0.54370296",
"0.542963",
"0.542445... | 0.57835853 | 6 |
Check if songzaUsername is a syntactically valid username. Valid usernames have between 3 and 16 alphanumeric characters. (This method does not check if username exists.) | def zW24(YKHO, IWwX):
import re
mXDZ = '^\\s*\\w{3,16}\\s*$'
pbT6 = re.search(mXDZ, IWwX) != None
return pbT6 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Gt2s(NtEF):\n import string\n if not (len(NtEF) > 2 and len(NtEF) < 65):\n return False\n if not NtEF[0] in string.letters:\n return False\n r8hN = TFh5.match(NtEF)\n return r8hN.start() == 0 and r8hN.end() == len(NtEF)",
"def Gt2s(YKHO, NtEF):\n gVaL = '^[a-zA-Z]{3,}$'\n r... | [
"0.822737",
"0.8205075",
"0.8113907",
"0.8070537",
"0.7900303",
"0.7800327",
"0.77135634",
"0.77084684",
"0.76741415",
"0.76623285",
"0.7654128",
"0.7640411",
"0.7634227",
"0.7634112",
"0.7612969",
"0.76",
"0.75525016",
"0.7547874",
"0.746313",
"0.7452427",
"0.74165404",
"0... | 0.8999434 | 0 |
Calculate the great circle distance between two points on the earth (specified in decimal degrees) | def GeVo(pB11, Di_b):
igSk, GgQG, TGuP, tk0B = (pB11[0], pB11[1], Di_b[0], Di_b[1])
GgQG, igSk, tk0B, TGuP = map(Y_1E, [GgQG, igSk, tk0B, TGuP])
H91H = tk0B - GgQG
n_9K = TGuP - igSk
jzdc = YUNn(n_9K / 2) ** 2 + YhSR(igSk) * YhSR(TGuP) * YUNn(H91H / 2) ** 2
Z9rn = 2 * P099(PZyS(jzdc))
Mkmy =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KzuF(rCSf, hjIX, FNKk, T3JP):\n hjIX = r8hN.radians(hjIX)\n rCSf = r8hN.radians(rCSf)\n T3JP = r8hN.radians(T3JP)\n FNKk = r8hN.radians(FNKk)\n Csk6 = 2 * 6367.45 * r8hN.asin(r8hN.sqrt(GeVo(FNKk - rCSf) + r8hN.cos(rCSf) * r8hN.cos(FNKk) * GeVo(T3JP - hjIX)))\n return Csk6",
"def T97B(GgQG, ... | [
"0.81450045",
"0.7863265",
"0.76322985",
"0.76064754",
"0.75978696",
"0.75965863",
"0.75944835",
"0.75720793",
"0.75630087",
"0.7555095",
"0.7528691",
"0.7517629",
"0.7492963",
"0.7467739",
"0.7452678",
"0.7434477",
"0.73914117",
"0.7357736",
"0.73484355",
"0.73318124",
"0.73... | 0.0 | -1 |
Determine if a file is allowed to be renamed. | def JfTJ(Ux0P):
KzJa = False
Va2z = HP0P(Ux0P)
for YBcr in yq5M:
if Va2z == YBcr:
KzJa = True
break
return KzJa | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XT0o(Ux0P: str) -> bool:\n return '.' in Ux0P and Ux0P.rsplit('.', 1)[1].lower() in UWr8",
"def XT0o(Ux0P: str) -> bool:\n if Ux0P is None or Ux0P.strip() is None:\n return False\n return '.' in Ux0P and Ux0P.rsplit('.', 1)[1].lower() in wk5E.config['FILE_ALLOWED_EXTENSIONS']",
"def XT0o(Ux... | [
"0.68316686",
"0.6816872",
"0.68132085",
"0.67624897",
"0.67624897",
"0.67583025",
"0.67497116",
"0.67497116",
"0.6740839",
"0.6740839",
"0.6740839",
"0.6740839",
"0.6740839",
"0.6740839",
"0.6740839",
"0.6740839",
"0.6740839",
"0.6740839",
"0.67052335",
"0.6668858",
"0.66361... | 0.64839184 | 39 |
Remove pattern from filename." | def Pxoy(Ux0P, mXDZ):
mWFP = xbnX(Ux0P)
YBcr = HP0P(Ux0P)
RqeO = ' '
Dokz = ZbWC.sub(mXDZ, RqeO, mWFP)
return Dokz + YBcr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mq9H(IznC):\n return ZbWC.sub('_$', '', ZbWC.sub('[ _\\n\\t/()*,&:;@.]+', '_', IznC))",
"def BnqM(YKHO):\n if not YKHO.remove_path:\n return\n YKHO.filename = ZbWC.sub('.+\\\\/', '.../', YKHO.filename)",
"def b7bT(mWFP):\n return ZbWC.sub('[^\\\\w .]', '', mWFP)",
"def rpY8(OZKa, mXDZ)... | [
"0.7514802",
"0.74387807",
"0.7329037",
"0.71784914",
"0.699023",
"0.6970876",
"0.69604516",
"0.69569504",
"0.69103765",
"0.68613833",
"0.6758374",
"0.6750685",
"0.6724387",
"0.671578",
"0.66970533",
"0.66297066",
"0.6625077",
"0.6617101",
"0.6613936",
"0.6580057",
"0.6556644... | 0.8084264 | 0 |
A decorator marking the decorated function as typing and implementing classmethod attr for the given Numba type in nopython mode. Similar to ``overload_method``. Here is an example implementing a classmethod on the Array type to call | def QLHV(cM24, hkS8, **B2fa):
return T5Ad(SnBA.TypeRef(cM24), hkS8, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E35_(RPgR, HHmT, wyyA):\n from numba import numbawrapper\n if BfDw.is_numba_class(RPgR):\n raise P1dF.NumbaError('Subclassing not yet supported for autojit classes')\n c9kO = numbawrapper.NumbaSpecializingWrapper(RPgR, HHmT, wyyA)\n RPgR = LySB.create_unspecialized_cls(RPgR, c9kO)\n RPgR.... | [
"0.6790635",
"0.6344906",
"0.6325228",
"0.616811",
"0.603147",
"0.6016829",
"0.575311",
"0.57494795",
"0.55419666",
"0.5484532",
"0.5459981",
"0.5414739",
"0.5414739",
"0.535572",
"0.534066",
"0.5286945",
"0.52384365",
"0.5220414",
"0.5212142",
"0.520919",
"0.5181714",
"0.5... | 0.5493425 | 9 |
Creates a unique combination of provided facets. A cross product of an initial set of starting facets with a new set of facets. | def WHx2(yKcO, E3Ky):
BdN0 = [[VkqI] for VkqI in E3Ky]
Aofo = []
for WKvO in yKcO:
for exwG in BdN0:
Aofo.append(WKvO + exwG)
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def z1JD(DumB):\n\n def _gRY(DumB, Mkmy):\n \"\"\"\n recursively yields partitioned remainders of original partition lists\n \"\"\"\n DumB = set(DumB)\n if not len(DumB):\n yield ()\n return\n cntZ = next(iter(DumB))\n K0A_ =... | [
"0.5223084",
"0.5158795",
"0.49904937",
"0.49005884",
"0.48808607",
"0.48382875",
"0.48325536",
"0.47913063",
"0.4774069",
"0.47096157",
"0.47039112",
"0.46495903",
"0.46405163",
"0.46353674",
"0.46331802",
"0.46265408",
"0.45947975",
"0.45747232",
"0.45727205",
"0.45607942",
... | 0.7082943 | 0 |
Use this data source to get the ARN of a State Machine in AWS Step Function (SFN). By using this data source, you can reference a state machine without having to hard code the ARNs as input. | def HfsV(mWFP=None, VKhi=None):
rYZf = dict()
rYZf['name'] = mWFP
if VKhi is None:
VKhi = qe4Y.InvokeOptions()
if VKhi.version is None:
VKhi.version = SLdk.get_version()
p5j3 = qe4Y.runtime.invoke('aws:sfn/getStateMachine:getStateMachine', rYZf, opts=VKhi).value
return lwut(arn=p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zgk0(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'event_source_arn')",
"def Zgk0(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'event_source_arn')",
"def hMqs(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'arn')",
"def HfsV(YKHO, mWFP):\n geh0 = YKHO.client.list_sta... | [
"0.5352309",
"0.53268343",
"0.52876115",
"0.51382464",
"0.49550775",
"0.49550775",
"0.49550775",
"0.49550775",
"0.49550775",
"0.49550775",
"0.49550775",
"0.49550775",
"0.49550775",
"0.49550775",
"0.49550775",
"0.49550775",
"0.49550775",
"0.49550775",
"0.49550775",
"0.49550775",... | 0.47064173 | 57 |
Construct a new instance, validating that the label matches the required format. | def FIMM(YKHO, UXqs=None, **B2fa):
if UXqs not in YKHO.get_valid_labels():
raise ValueError(f'the label `{UXqs}` is not a valid SSSP configuration label.')
super().__init__(label=UXqs, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, UXqs: str):\n pass",
"def FIMM(YKHO, qOe5: str, t3fv: any, E3oo: int=0, hNz5: int=0):\n if YKHO.validateLabel(qOe5, labeling_version=hNz5):\n YKHO.__label = qOe5\n YKHO.__version = hNz5\n else:\n raise P6nJ(\"Given label didn't pass validation\")\n YKHO.__value = t... | [
"0.64871734",
"0.61981344",
"0.601716",
"0.6009823",
"0.5987827",
"0.5909101",
"0.5892108",
"0.5861215",
"0.584804",
"0.5804862",
"0.5802334",
"0.5747449",
"0.574242",
"0.5718712",
"0.5717158",
"0.5710103",
"0.56848204",
"0.56792074",
"0.56678915",
"0.5667256",
"0.56548935",
... | 0.60499835 | 2 |
Helper for running MultiAP WPS tests dev[0] does multi_ap WPS, dev[1] does normal WPS. apdev[0] is the fronthaul BSS. If there is a separate backhaul BSS, it must have been set up by the caller. params are the normal SSID parameters, they will be extended with the WPS parameters. multi_ap_bssid must be given if it is n... | def G3dt(M4N3, gdpw, NArs, RhF2=None, H84N=False, ngTm=False, xFsT=False):
Vtrf = None
if RhF2:
nLkM = VeGs.add_ap(gdpw[1], RhF2)
a4pg = nLkM.own_addr()
else:
a4pg = gdpw[0]['bssid']
NArs.update({'wps_state': '2', 'eap_server': '1'})
W7Kf = VeGs.add_ap(gdpw[0], NArs)
Fv2L... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ihmq(M4N3, gdpw):\n MKBV = 'multi-ap-wps'\n G32E = '12345678'\n NArs = VeGs.wpa2_params(ssid=MKBV, passphrase=G32E)\n NArs.update({'multi_ap': '3', 'multi_ap_backhaul_ssid': '\"%s\"' % MKBV, 'multi_ap_backhaul_wpa_passphrase': G32E})\n W7Kf = G3dt(M4N3, gdpw, NArs)\n if 'OK' not in W7Kf.reque... | [
"0.73993677",
"0.72910196",
"0.7108865",
"0.70682853",
"0.70623255",
"0.70233256",
"0.69408715",
"0.62323457",
"0.60942864",
"0.6040791",
"0.60329103",
"0.5906286",
"0.5796224",
"0.55930877",
"0.5471905",
"0.5400495",
"0.5365376",
"0.5358049",
"0.53563696",
"0.53440726",
"0.5... | 0.7917617 | 0 |
make sure it hasn't expired or been used | def deVW(YKHO):
return (YKHO.expiry is None or YKHO.expiry > rIAI.now()) and (YKHO.use_limit is None or YKHO.times_used < YKHO.use_limit) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def h_t_(YKHO):\n return True / False",
"def VJXg(YKHO) -> bool:\n raise NotImplementedError()",
"def VJXg(YKHO):\n YKHO.ensure_one()\n return qcWV.now() > V_D6.Datetime.from_string(YKHO.expires)",
"def CJbn(YKHO):\n if YKHO._lifetime is not None and YKHO._lifetime > 0:\n if (ITS7.time(... | [
"0.7446819",
"0.73482054",
"0.7172215",
"0.7129515",
"0.7116598",
"0.71071863",
"0.70767975",
"0.7071265",
"0.70700157",
"0.70610774",
"0.70559376",
"0.7053329",
"0.7049923",
"0.69831675",
"0.6932716",
"0.6917434",
"0.6912507",
"0.6879721",
"0.68631226",
"0.6858308",
"0.68303... | 0.65545714 | 41 |
don't create a request for a registered email | def xkzz(YKHO, *qIxc, **B2fa):
if not YKHO.id and mv1M.objects.filter(email=YKHO.email).exists():
raise yXsM()
super().save(*qIxc, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZGiz(YKHO):\n CBIr = YKHO.make_user()\n nPrm: dict = {}\n with YKHO.login(CBIr):\n geh0 = YKHO.post('referrals:create', data=nPrm)\n Ol8d = list(LnrL(geh0.wsgi_request))[0]\n assert str(Ol8d) == \"'missing email' is an invalid email address.\"",
"def MuT2(YKHO):\n geh0 = YKHO.signup_... | [
"0.7271563",
"0.70657194",
"0.67145085",
"0.664434",
"0.6637145",
"0.66345966",
"0.6593339",
"0.6582378",
"0.65095794",
"0.64875335",
"0.6472271",
"0.64596486",
"0.6433578",
"0.6432903",
"0.6429512",
"0.64203155",
"0.6416101",
"0.63988143",
"0.63831127",
"0.6374527",
"0.63729... | 0.0 | -1 |
make sure it hasn't expired or been used | def deVW(YKHO):
return YKHO.expiry > rIAI.now() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def h_t_(YKHO):\n return True / False",
"def VJXg(YKHO) -> bool:\n raise NotImplementedError()",
"def VJXg(YKHO):\n YKHO.ensure_one()\n return qcWV.now() > V_D6.Datetime.from_string(YKHO.expires)",
"def CJbn(YKHO):\n if YKHO._lifetime is not None and YKHO._lifetime > 0:\n if (ITS7.time(... | [
"0.7446819",
"0.73482054",
"0.7172215",
"0.7129515",
"0.7116598",
"0.71071863",
"0.70767975",
"0.70700157",
"0.70610774",
"0.70559376",
"0.7053329",
"0.7049923",
"0.69831675",
"0.6932716",
"0.6917434",
"0.6912507",
"0.6879721",
"0.68631226",
"0.6858308",
"0.683039",
"0.682616... | 0.7071265 | 7 |
Saves a model's state and it's embedding dic by piggybacking torch's save function | def xkzz(Zxma, CAA3, pmON):
L2dS = Zxma.state_dict()
bGrB = CAA3
ht2j.save(L2dS, pmON) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xkzz(YKHO, Ux0P):\n BJY9 = {'model_state_dict': YKHO.state_dict(), 'init_args': {'vocab_size': YKHO.vocab_size, 'embeddings_size': YKHO.embeddings_size, 'hidden_size': YKHO.hidden_size, 'mlp_hidden_size': YKHO.mlp_hidden_size, 'dropout': YKHO.dropout}}\n ht2j.save(BJY9, Ux0P)",
"def lac1(YKHO, mWFP):\n... | [
"0.7830054",
"0.7672989",
"0.7634294",
"0.7529348",
"0.7494107",
"0.74758816",
"0.7415177",
"0.74094504",
"0.73635685",
"0.7322403",
"0.7322403",
"0.729868",
"0.723931",
"0.7221203",
"0.7219663",
"0.719143",
"0.7160213",
"0.7125645",
"0.71007663",
"0.70595336",
"0.7042465",
... | 0.7046696 | 20 |
Convert from a BED row to an immutable BaseInterval object. | def LZL9(CbMw, wY6w, Prvv, mWFP='', p1kx='', vUKW='', vkf4='', JDuf=''):
try:
yKcO = int(wY6w) + 1
Os4s = int(Prvv)
except ValueError:
raise ValueError("'start' and 'end' should be integers")
assert Os4s - yKcO >= 0, 'Not a valid BED interval.(bedEnd - bedStart) must be >= 0.'
A0... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WC_0(Emd4, BWXx: str):\n s2mk = BWXx.split(',')\n if len(s2mk) != 2:\n raise ValueError(\"invalid interval '{}'\".format(BWXx))\n v_Bj, hl88 = (s2mk[0].strip(), s2mk[1].strip())\n if v_Bj.startswith('['):\n WGC8 = False\n elif v_Bj.startswith('('):\n WGC8 = True\n else:\n... | [
"0.56674397",
"0.5589117",
"0.52700174",
"0.51611406",
"0.49801382",
"0.49412447",
"0.4934894",
"0.4891182",
"0.48297453",
"0.47974023",
"0.47851297",
"0.4779299",
"0.4719899",
"0.47190937",
"0.4713461",
"0.46875063",
"0.46467575",
"0.4637924",
"0.46313342",
"0.4604167",
"0.4... | 0.60759693 | 0 |
Randomly generate an id of length N (size) we can recognize. Think Italian or Japanese or Native American. | def wPWn(zNig=8):
kc1W = 'aeiou'
lkcV = 'bdfghklmnprstvw'
return ''.join([tuKI.choice(kc1W if YRbF % 2 else lkcV) for YRbF in range(zNig)]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wPWn(zNig=15, gLiZ=vIwR.ascii_uppercase + vIwR.digits):\n return ''.join((tuKI.choice(gLiZ) for WKvO in range(zNig)))",
"def wPWn(zNig=7, gLiZ=vIwR.ascii_uppercase + vIwR.digits):\n return ''.join((tuKI.choice(gLiZ) for bGrB in range(zNig)))",
"def wPWn(zNig=6, gLiZ=vIwR.ascii_uppercase + vIwR.digits... | [
"0.83254606",
"0.8324936",
"0.8309996",
"0.82580405",
"0.8195587",
"0.79753214",
"0.7957458",
"0.7926925",
"0.79060256",
"0.7887611",
"0.7807349",
"0.76666033",
"0.7629297",
"0.76052105",
"0.7495102",
"0.74627537",
"0.7387696",
"0.7354797",
"0.734266",
"0.72469634",
"0.706471... | 0.7728246 | 11 |
r"""Split string based on a delimiter/separator. This wrapper around ``str.split`` harmonize Python 2/3 syntax. | def lpha(vIwR, VWe_='\t'):
return g9qP.split(vIwR, VWe_) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IysC(YKHO, vIwR):\n if not YKHO.__delimiter__ == '':\n return vIwR.split(YKHO.__delimiter__)\n return vIwR.split()",
"def lpha(BWXx, TDw3):\n return BWXx.split(TDw3)",
"def FRnF(vIwR, VWe_=','):\n njyT = ZbWC.escape(VWe_) + '\\\\s*(?![^\\\\[\\\\]]*\\\\])(?![^()]*\\\\))'\n return ZbWC.... | [
"0.8030143",
"0.72689456",
"0.7151636",
"0.7131167",
"0.7017812",
"0.6992419",
"0.69921666",
"0.69284534",
"0.6917595",
"0.689079",
"0.6883223",
"0.6880686",
"0.6830895",
"0.6719127",
"0.6717432",
"0.66997856",
"0.6693518",
"0.6682929",
"0.6662894",
"0.6629831",
"0.6586085",
... | 0.7461075 | 1 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, FFxc):
return False
return YKHO.__dict__ == Elif.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748"
] | 0.0 | -1 |
Return the integer represented by the given array of bytes. bytes Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of builtin objects that support the buffer protocol. byteorder The byte order used to rep... | def bQ4v(YKHO, *qIxc, **B2fa):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gs1C(bytes, abwh='little', i1fZ=False):\n return int.from_bytes(bytes, byteorder=abwh, signed=i1fZ)",
"def PCNz(J83E, x2Dk=True, i1fZ=False):\n if jKi7.PY3:\n T4Wy = 'little'\n if x2Dk:\n T4Wy = 'big'\n return int.from_bytes(J83E, byteorder=T4Wy, signed=i1fZ)\n else:\... | [
"0.7650478",
"0.76184446",
"0.70863914",
"0.70028114",
"0.68281853",
"0.6731419",
"0.66147834",
"0.6607387",
"0.6563736",
"0.6560838",
"0.6533282",
"0.6528622",
"0.6466856",
"0.63951576",
"0.6331328",
"0.6178813",
"0.61582655",
"0.610728",
"0.6077142",
"0.60355407",
"0.596254... | 0.0 | -1 |
Return an array of bytes representing an integer. length Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. byteorder The byte order used to represent the integer. If byteorder is 'big', the most significant byte is at the beginning of the byte ... | def ntSl(YKHO, *qIxc, **B2fa):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IqrP(kAne, dmhX='little'):\n zNig = 1\n while 1 << 8 * zNig <= kAne:\n zNig += 1\n return kAne.to_bytes(zNig, dmhX)",
"def KA36(wEf2, HkJz=32, i1fZ=False, x2Dk=True):\n wEf2 = int(wEf2)\n if jKi7.PY3:\n T4Wy = 'little'\n if x2Dk:\n T4Wy = 'big'\n return w... | [
"0.7394239",
"0.64819914",
"0.64516103",
"0.6352235",
"0.629003",
"0.62405205",
"0.61800677",
"0.6170674",
"0.6157904",
"0.6146537",
"0.61131847",
"0.57722163",
"0.57660985",
"0.5684201",
"0.56833696",
"0.5663",
"0.56514335",
"0.55456555",
"0.5538383",
"0.5531538",
"0.5530636... | 0.0 | -1 |
Return the integer represented by the given array of bytes. bytes Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of builtin objects that support the buffer protocol. byteorder The byte order used to rep... | def bQ4v(YKHO, *qIxc, **B2fa):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gs1C(bytes, abwh='little', i1fZ=False):\n return int.from_bytes(bytes, byteorder=abwh, signed=i1fZ)",
"def PCNz(J83E, x2Dk=True, i1fZ=False):\n if jKi7.PY3:\n T4Wy = 'little'\n if x2Dk:\n T4Wy = 'big'\n return int.from_bytes(J83E, byteorder=T4Wy, signed=i1fZ)\n else:\... | [
"0.7652321",
"0.7619455",
"0.7087375",
"0.7004154",
"0.68299264",
"0.67329735",
"0.66168606",
"0.6609719",
"0.65652376",
"0.65594465",
"0.65344334",
"0.65285057",
"0.6469213",
"0.6393301",
"0.63298506",
"0.6180583",
"0.61584795",
"0.6107819",
"0.6077974",
"0.60370475",
"0.596... | 0.0 | -1 |
Return an array of bytes representing an integer. length Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. byteorder The byte order used to represent the integer. If byteorder is 'big', the most significant byte is at the beginning of the byte ... | def ntSl(YKHO, *qIxc, **B2fa):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IqrP(kAne, dmhX='little'):\n zNig = 1\n while 1 << 8 * zNig <= kAne:\n zNig += 1\n return kAne.to_bytes(zNig, dmhX)",
"def KA36(wEf2, HkJz=32, i1fZ=False, x2Dk=True):\n wEf2 = int(wEf2)\n if jKi7.PY3:\n T4Wy = 'little'\n if x2Dk:\n T4Wy = 'big'\n return w... | [
"0.73937124",
"0.64825076",
"0.6451981",
"0.6350696",
"0.62888193",
"0.6239706",
"0.6179007",
"0.6169797",
"0.6156917",
"0.614535",
"0.61122805",
"0.57704246",
"0.5764038",
"0.56830466",
"0.56810176",
"0.5660641",
"0.5650066",
"0.55439603",
"0.5537944",
"0.55319905",
"0.55319... | 0.0 | -1 |
Hashing function if salt is not provided, create a new user with new hash otherwise take hex into salt and return dict with hash, and salt | def PXlE(jTXt, NTfD=None):
if not NTfD:
NTfD = Hy7s.urandom(8)
else:
NTfD = bytes.fromhex(NTfD)
return {'hash': HBct.pbkdf2_hmac('sha256', jTXt.encode('utf-8'), NTfD, 100000, dklen=128).hex(), 'salt': NTfD.hex()} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BzyC(YKHO):\n YKHO.assertEqual(_k1Y('johndoe', salt='jane').hex()[:6], 'fb0bf4')",
"def Btz_(jTXt, NTfD):\n xtYt = jTXt.encode(encoding='utf-8')\n NTfD = NTfD.encode(encoding='utf-8')\n pFtS = HBct.md5()\n hl3l = HBct.sha256()\n pFtS.update(NTfD + xtYt)\n hl3l.update(NTfD + xtYt)\n pr... | [
"0.73387235",
"0.6935993",
"0.67630464",
"0.66744417",
"0.64758337",
"0.645302",
"0.6427404",
"0.6411962",
"0.6384789",
"0.63550085",
"0.63003236",
"0.6281475",
"0.6257764",
"0.62125343",
"0.6209279",
"0.62014943",
"0.61152166",
"0.60857445",
"0.6084569",
"0.6077427",
"0.6069... | 0.69985926 | 1 |
Returns a list of Question objects TODO change to user_id questions gets all questions of username answers get all answers for all the questions asked by the user | def m1_j(uJjO):
WlEx = gerC('SELECT q_id,question FROM question WHERE question.user_id = (%s) ORDER BY create_time DESC ', uJjO)
rRTz = gerC('SELECT answer.q_id, answer.answer, answer.a_id,answer.is_answer FROM answer Left JOIN question on answer.q_id=question.q_id WHERE question.user_id =(%s)', uJjO)
l483... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sFOk(uJjO):\n WlEx = gerC('SELECT q_id,question, user_id FROM question')\n l483 = {vexM[0]: jth9.deepcopy(Y4Gy(vexM[1], q_id=vexM[0], user_id=vexM[2])) for vexM in WlEx}\n rRTz = gerC('SELECT answer.q_id, answer.answer, answer.a_id, answer.is_answer FROM answer Left JOIN question on answer.q_id=quest... | [
"0.7453409",
"0.7404859",
"0.7125625",
"0.71247303",
"0.69590074",
"0.6931924",
"0.6877714",
"0.6808449",
"0.6756044",
"0.6703758",
"0.6616065",
"0.66108555",
"0.6593239",
"0.65884566",
"0.6550325",
"0.6546063",
"0.6537713",
"0.65038085",
"0.64862615",
"0.6469681",
"0.64578",... | 0.7261492 | 2 |
Ensures Full Input Path ends with ``/`` Example >>> _fix_suffix(u'/user/furia_salamandra_faerfax/data/18/01/01') u'/user/furia_salamandra_faerfax/data/18/01/01/' | def s8Mm(pmON):
if pmON[-2:] == '/*':
jq6r = pmON
else:
jq6r = Hy7s.path.join(pmON, '*')
fJ5B.debug('fix_suffix: input: {inp}, output: {outp}'.format(inp=pmON, outp=jq6r))
return jq6r | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HEZ9(bD7m: str) -> str:\n return bD7m if bD7m.endswith('/') else bD7m + '/'",
"def NnB3(NPoT, ZI14):\n if ZI14 and NPoT.endswith(ZI14):\n return NPoT[:-len(ZI14)]\n return NPoT",
"def SqM1(pmON):\n pmON.rstrip('/')\n if not pmON.startswith('.*'):\n pmON = '/' + pmON\n pmON =... | [
"0.69025594",
"0.6748137",
"0.6701195",
"0.6677919",
"0.66658235",
"0.6665528",
"0.6661921",
"0.6608794",
"0.6586295",
"0.65607655",
"0.64469475",
"0.64428055",
"0.6428288",
"0.64030695",
"0.63466406",
"0.6311808",
"0.63078314",
"0.6301498",
"0.6288454",
"0.62266314",
"0.6224... | 0.81063855 | 0 |
Writes a chart's html to a file | def fqwd(YKHO, s5ru, Hj7Z, _R2e):
if not Hy7s.path.isdir(Hj7Z):
try:
Hy7s.makedirs(Hj7Z)
YKHO.info('Creating directory ' + Hj7Z)
except Exception as e:
YKHO.err(tTpl)
return
VqRE = Hj7Z + '/' + s5ru + '.html'
try:
SwnB = open(VqRE, 'w')... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aReI(YKHO, a88W, nUeQ):\n with open(Hy7s.path.join(YKHO.HTML_DIR, nUeQ), 'w') as eHNT:\n eHNT.write(a88W)",
"def J5QQ(YKHO, zCtj):\n WtVr = YKHO.png_path(zCtj)\n dMlt = YKHO.html_data_table()\n return 'XXX figure html'",
"def xkzz(YKHO, Ux0P):\n _RR0 = open(Ux0P, 'w')\n _RR0.write(... | [
"0.760428",
"0.6602479",
"0.65683776",
"0.6548275",
"0.64693683",
"0.6464094",
"0.6446035",
"0.6444865",
"0.63668585",
"0.6343577",
"0.6299603",
"0.62777096",
"0.6258571",
"0.62224287",
"0.62006176",
"0.61221164",
"0.61201864",
"0.6100858",
"0.6097943",
"0.60760176",
"0.60744... | 0.56397253 | 46 |
Read from a JSON using JsonSource. | def vkdV():
KCHu = SDdj()
Oa1e = KCHu.parse(Hy7s.path.join(gr1b, 'valid.json'))
Ziit = {}
mC4V = {}
for ETu_ in Oa1e:
if ETu_:
if len(ETu_) == 4:
mC4V[ETu_[0], ETu_[1]] = ETu_[3]
else:
Ziit[ETu_[0]] = ETu_[1]
assert len(Ziit.keys())... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ffSL(YKHO, eJTR, JZXy, **B2fa):\n if JZXy is None:\n raise Bx6I.invalid_json_map[eJTR](f'Cannot load {eJTR} - no data source specified.')\n try:\n nPrm = lc9H(JZXy, **B2fa)\n except FileNotFoundError as e:\n raise Bx6I.file_not_found_map[eJTR](tTpl)\n except NCp0.decoder.JSONDe... | [
"0.72825646",
"0.71280426",
"0.6986767",
"0.687738",
"0.68678147",
"0.68678147",
"0.6811519",
"0.6811519",
"0.67957664",
"0.6711954",
"0.6710924",
"0.6691571",
"0.6674023",
"0.66681874",
"0.6594951",
"0.65685576",
"0.65585023",
"0.6540461",
"0.65340227",
"0.6462589",
"0.64464... | 0.0 | -1 |
Read from a JSON using JsonSource. This test also supplies the provided_by parameter. | def BzfZ():
KCHu = SDdj()
Oa1e = KCHu.parse(Hy7s.path.join(gr1b, 'valid.json'), provided_by='Test JSON')
Ziit = {}
mC4V = {}
for ETu_ in Oa1e:
if ETu_:
if len(ETu_) == 4:
mC4V[ETu_[0], ETu_[1]] = ETu_[3]
else:
Ziit[ETu_[0]] = ETu_[1]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ffSL(YKHO, eJTR, JZXy, **B2fa):\n if JZXy is None:\n raise Bx6I.invalid_json_map[eJTR](f'Cannot load {eJTR} - no data source specified.')\n try:\n nPrm = lc9H(JZXy, **B2fa)\n except FileNotFoundError as e:\n raise Bx6I.file_not_found_map[eJTR](tTpl)\n except NCp0.decoder.JSONDe... | [
"0.66479355",
"0.64022267",
"0.63812864",
"0.6369558",
"0.63640517",
"0.630996",
"0.6233745",
"0.61611164",
"0.61611164",
"0.6136584",
"0.6132109",
"0.6111831",
"0.6092036",
"0.6092036",
"0.6069206",
"0.6062403",
"0.6043168",
"0.60050446",
"0.6001116",
"0.5998785",
"0.5994256... | 0.6440394 | 1 |
Read from a gzip compressed JSON using JsonSource. | def muLz():
KCHu = SDdj()
Oa1e = KCHu.parse(Hy7s.path.join(gr1b, 'valid.json.gz'), compression='gz')
Ziit = {}
mC4V = {}
for ETu_ in Oa1e:
if ETu_:
if len(ETu_) == 4:
mC4V[ETu_[0], ETu_[1]] = ETu_[3]
else:
Ziit[ETu_[0]] = ETu_[1]
as... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DMrX(qaEx):\n with lGU7.open(qaEx, 'rb') as ytgA:\n return qQXR.loads(ytgA.read().decode('utf-8'))",
"def UlWi(IznC):\n with lGU7.open(IznC, 'r') as Fwbn:\n nPrm = qQXR.loads(Fwbn.read().decode('utf-8'))\n return nPrm",
"def vyMh(BWXx):\n return qQXR.loads(g5Ba.decompress(WR89.b64... | [
"0.66668963",
"0.666316",
"0.6291533",
"0.6183633",
"0.60846126",
"0.607153",
"0.60307795",
"0.599002",
"0.5961681",
"0.5957198",
"0.59519196",
"0.59519196",
"0.59493065",
"0.5935066",
"0.5791114",
"0.57791203",
"0.5776172",
"0.57593197",
"0.57593197",
"0.5730916",
"0.5716028... | 0.6872663 | 0 |
Maximum output length supported by the encoder. | def EAOo(YKHO):
return min(YKHO.args.max_positions, YKHO.model.config.max_position_embeddings - 2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ULYe(YKHO, BWXx):\n return YKHO._set(maxOutputLength=BWXx)",
"def ULYe(YKHO, BWXx):\n return YKHO._set(maxOutputLength=BWXx)",
"def ULYe(YKHO, BWXx):\n return YKHO._set(maxOutputLength=BWXx)",
"def zQxg(YKHO):\n return 16 + 16 + 8 + 8 + iK2A.bin_to_dec(YKHO.get_data_size()) + iK2A.bin_to_dec(... | [
"0.761554",
"0.761554",
"0.761554",
"0.75845206",
"0.7364795",
"0.7340533",
"0.7268281",
"0.72500485",
"0.7244087",
"0.70455",
"0.70181966",
"0.70042694",
"0.70007545",
"0.6991749",
"0.69536597",
"0.6952096",
"0.69393617",
"0.69274753",
"0.69184226",
"0.6898335",
"0.6890571",... | 0.0 | -1 |
Converting tzaware datetime object to local tz string with offset | def ghUm(PzOm: datetime, yl4j: str, DwRD: bool=False, A4Zb: bool=True, l43I: bool=True):
try:
if not isinstance(PzOm, qcWV):
PzOm = qcWV.strptime(PzOm, '%Y-%m-%dT%H:%M:%S.%f%z')
if not isinstance(PzOm, qcWV) and type(PzOm) is not str:
PzOm = qcWV.combine(PzOm, qcWV.min.time()... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hZ49(JRYC):\n if JRYC.tzinfo is wyKz:\n return (JRYC + IOPU).replace(tzinfo=None)\n return JRYC",
"def VAxv(_szS):\n if _szS.tm_isdst == 1 and ITS7.daylight:\n UdQj = ITS7.altzone\n else:\n UdQj = ITS7.timezone\n Tvk5 = '-' if UdQj > 0 else '+'\n UdQj = abs(UdQj)\n m... | [
"0.67501193",
"0.6701646",
"0.668043",
"0.66613716",
"0.65766686",
"0.65751505",
"0.6397249",
"0.6394014",
"0.63891953",
"0.6387073",
"0.63593614",
"0.63545173",
"0.6336814",
"0.63054556",
"0.6286896",
"0.6250781",
"0.6249233",
"0.6233245",
"0.6225213",
"0.62214726",
"0.62166... | 0.6166816 | 24 |
Return a list of actions. | def Q6sW(YKHO, jGRS='all', qUyJ=None, dJ1p=None):
if qUyJ is not None:
bCES = qUyJ.actions
else:
bCES = zOYc()
bCES.extend(HNqP.actions.all())
bCES.extend(HNqP.plans.filter(type='option', actions__count__gt=0))
if jGRS in ('active', 'inactive', 'future'):
bCES = bCES.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eqLF(YKHO):\n return YKHO.actions",
"def Q6sW(YKHO):\n return []",
"def xASv(YKHO):\n return YKHO._action_list",
"def Q6sW(YKHO):\n return YKHO.agent.get_actions()",
"def xASv(YKHO):\n return YKHO._actions.getSlice(0)",
"def xASv(YKHO):\n return YKHO._actions.getSlice(0)",
"def xA... | [
"0.88302803",
"0.8703013",
"0.8697641",
"0.82608515",
"0.8219257",
"0.8219257",
"0.82093024",
"0.8201354",
"0.8187794",
"0.8119534",
"0.8042842",
"0.80217546",
"0.8017804",
"0.79884714",
"0.7960888",
"0.7919015",
"0.79093635",
"0.78971034",
"0.78971034",
"0.78971034",
"0.7890... | 0.0 | -1 |
Return minimum, maximum, and stepping value for a range. | def JsaZ(Cqok):
WBN1 = Cqok.count(':')
if WBN1 == 2:
gqRb, ODP9, YPaw = Cqok.split(':')
elif WBN1 == 1:
gqRb, ODP9 = Cqok.split(':')
YPaw = '1'
elif WBN1 == 0:
gqRb = ODP9 = Cqok
YPaw = '1'
else:
raise ValueError("Argument `spec` must have the form 'LO... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def S0Lu(min, max, BWXx=None, YPaw=None):\n if BWXx is None:\n if min is None or max is None:\n raise ValueError('unable to infer range, value from: ({0}, {1}, {2})'.format(min, max, BWXx))\n yk4i = max - min\n BWXx = min + yk4i / 2\n if not isinstance(BWXx, type(yk4i)):\n... | [
"0.80031246",
"0.73807055",
"0.7305801",
"0.71562856",
"0.7143796",
"0.70966774",
"0.7085053",
"0.6935078",
"0.68667656",
"0.6825321",
"0.6820786",
"0.6817906",
"0.6714806",
"0.6673749",
"0.6671547",
"0.6671135",
"0.66498816",
"0.66307664",
"0.66211474",
"0.65613204",
"0.6527... | 0.0 | -1 |
Return a positive integer, whose value is guaranteed to be monotonically increasing across different invocations of this function, and also across separate instances of the calling program. This is accomplished by using a systemwide file which holds the "next available" ID. The location of this file can be set using th... | def qURK(Sgcx=None, ccvV=None):
assert Sgcx is None or Sgcx > 0, 'Argument `qty` must be a positive integer'
if ccvV is None:
ccvV = Hy7s.environ.get('GC3PIE_ID_FILE', Hy7s.path.expanduser('~/.gc3/next_id.txt'))
BZbb = TLI7(ccvV)
if not Hy7s.path.exists(BZbb):
Hy7s.makedirs(BZbb)
ylg... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FZCP():\n global _lock, _counter\n with tK4E:\n if Icon == 65535:\n Icon = 1\n else:\n Icon += 1\n return str(Icon)",
"def YVSk(uRP3):\n yt2n = lXJo(uRP3)\n try:\n yt2n += 1\n except:\n print(f'{OfK8.red('Erro ao gerar o id')}')\n fin... | [
"0.7132827",
"0.67509985",
"0.6664161",
"0.6646398",
"0.66185105",
"0.6600548",
"0.6599068",
"0.6564119",
"0.65575594",
"0.6550596",
"0.6543228",
"0.65423465",
"0.6512651",
"0.6510387",
"0.646259",
"0.6452903",
"0.6452903",
"0.64390147",
"0.6363842",
"0.63576376",
"0.635129",... | 0.70480376 | 1 |
Return a (shallow) copy of this `Struct` instance. | def jth9(YKHO):
return lndC(YKHO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ih8o(YKHO):\n raise NotImplementedError('shallow_copy is not implemented')",
"def _qLf(YKHO):\n return YKHO.copy()",
"def jth9(YKHO):\n Emd4 = type(YKHO)\n DoAg = Emd4.__new__(Emd4)\n DoAg.__dict__.update(YKHO.__dict__)\n return DoAg",
"def i3ak(YKHO):\n return W3i8(YKHO)",
"def Fz... | [
"0.7161071",
"0.70587754",
"0.6900697",
"0.6876317",
"0.687192",
"0.68647516",
"0.6843045",
"0.6837291",
"0.68043196",
"0.6774794",
"0.6749245",
"0.6749245",
"0.6749245",
"0.6749245",
"0.67402995",
"0.6739818",
"0.67339414",
"0.672899",
"0.6717386",
"0.6717386",
"0.6717386",
... | 0.88025063 | 0 |
Iterate over lines in `iterable` and return each of them stripped of leading and trailing blanks. | def EESs(OxJJ):
for ZfUD in OxJJ:
yield ZfUD.strip() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V1nR(OxJJ, ruNb=None):\n if ruNb is not None:\n OxJJ = (zFiD.split(ruNb)[0] for zFiD in OxJJ)\n OxJJ = (zFiD.strip() for zFiD in OxJJ)\n OxJJ = (zFiD for zFiD in OxJJ if zFiD)\n OxJJ = (zFiD.lower() for zFiD in OxJJ)\n return OxJJ",
"def nzpR(Nqlg):\n for zFiD in Nqlg:\n EESs ... | [
"0.6607268",
"0.6514533",
"0.6450976",
"0.6448855",
"0.64329845",
"0.6403828",
"0.63710845",
"0.63319886",
"0.63206255",
"0.6290142",
"0.6155615",
"0.6054748",
"0.60107005",
"0.5996157",
"0.59149253",
"0.58226615",
"0.5819894",
"0.57857233",
"0.56368524",
"0.56294525",
"0.557... | 0.8038426 | 0 |
A context manager for creating and then deleting a temporary directory. All arguments are passed unchanged to the `tempfile.mkdtemp` standand library function. | def U9hK(**B2fa):
TBXe = gbPf.mkdtemp(**B2fa)
try:
yield TBXe
finally:
if Hy7s.path.isdir(TBXe):
RDuA.rmtree(TBXe, ignore_errors=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uxyt(*qIxc, **B2fa):\n import tempfile\n Z0kE = tempfile.mkdtemp(*qIxc, **B2fa)\n import atexit, shutil\n ZqaC = True\n atexit.register(shutil.rmtree, Z0kE, ZqaC)\n return Z0kE",
"def nzu_(**B2fa):\n nzu_ = gbPf.mkdtemp(**B2fa)\n try:\n yield nzu_\n finally:\n pass",
... | [
"0.86446106",
"0.8444373",
"0.83503264",
"0.81677383",
"0.80900854",
"0.8076442",
"0.8074244",
"0.8010386",
"0.79966956",
"0.795482",
"0.7913095",
"0.79105306",
"0.782305",
"0.7819975",
"0.7763077",
"0.77489454",
"0.7713523",
"0.7640135",
"0.7631938",
"0.7603079",
"0.75673264... | 0.845876 | 1 |
Iterate over all unique elements in sequence `seq`. Distinct values are returned in a sorted fashion. | def a4ZY(Q6uT):
return sorted(set(Q6uT)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kcwm(Q6uT):\n return list(set(Q6uT))",
"def a4ZY(Q6uT):\n return [WKvO for YRbF, WKvO in enumerate(Q6uT) if Q6uT.index(WKvO) == YRbF]",
"def QDGc(Q6uT):\n T6S7 = set()\n return [WKvO for WKvO in Q6uT if not (WKvO in T6S7 or T6S7.add(WKvO))]",
"def SzRr(Q6uT):\n PwWw = set()\n aygV = PwW... | [
"0.75994635",
"0.75159013",
"0.74595594",
"0.7385903",
"0.7266428",
"0.7140849",
"0.70555896",
"0.7007962",
"0.6954724",
"0.68912864",
"0.67117333",
"0.66650826",
"0.66469574",
"0.6604121",
"0.6286002",
"0.6251432",
"0.6244778",
"0.6210425",
"0.6188838",
"0.60305905",
"0.6011... | 0.7626998 | 0 |
Works like default_params, but for convenience allows grouping parameters into subdictionaries. If a named parameter is given which matches the name of a subdictionary and whose value is a dictionary, the default dictionary and the given dictionary will be merged, instead of overwriting the default subdictionary (if th... | def o8_p(muwo):
def GDMi(m2Zb):
def Cd04(*qIxc, **B2fa):
XIcQ = {}
XIcQ.update(muwo)
for G1Hx, Ty9i in B2fa.items():
if type(Ty9i) == dict and G1Hx in XIcQ and (type(XIcQ[G1Hx]) == dict):
XIcQ[G1Hx].update(Ty9i)
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zsoT(*fgcx):\n JWv8 = dict(fgcx[0])\n for Csk6 in fgcx[1:]:\n for G1Hx, Ty9i in Csk6.items():\n JWv8.setdefault(G1Hx, Ty9i)\n return JWv8",
"def j03A(CBIr: dict, WmM4: dict) -> dict:\n if isinstance(CBIr, dict) and isinstance(WmM4, dict):\n for ERMG, MHxz in WmM4.items():... | [
"0.64294463",
"0.6398259",
"0.63895047",
"0.630195",
"0.6193579",
"0.6189458",
"0.5926945",
"0.5909719",
"0.58540964",
"0.58180463",
"0.57332724",
"0.57268095",
"0.5702041",
"0.56668323",
"0.56609714",
"0.565968",
"0.5649187",
"0.55940115",
"0.5544784",
"0.55287725",
"0.55253... | 0.7143888 | 0 |
Computes a filename for a cache value of the given type. | def _OIP(mWFP, cM24='pkl'):
return Hy7s.path.join(PjxR, mWFP + '.' + cM24) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K_KL(cM24, I8Hw, UTX6=None):\n IznC = cM24\n if UTX6 is not None:\n IznC = '%x.%s' % (UTX6, cM24)\n return Hy7s.path.sep.join([off2(I8Hw), IznC])",
"def _I2k(YKHO, wsLY):\n return wsLY / 'filename'",
"def gQmc(YKHO, kN9s: str, mWFP: str) -> str:\n if not Hy7s.path.isdir(YKHO._datadir)... | [
"0.7411133",
"0.6874516",
"0.6733833",
"0.66989446",
"0.6614053",
"0.6498675",
"0.61661047",
"0.61661047",
"0.61661047",
"0.6124312",
"0.60989636",
"0.6094987",
"0.60322076",
"0.60008824",
"0.5986326",
"0.5986326",
"0.5976975",
"0.59567297",
"0.5939237",
"0.5930659",
"0.59275... | 0.7032913 | 1 |
Get the unique terms across the text in received tweets and output as three groups. We separate words in sentences using regex. We split words by any characters which are not , @, alphanumeric, single or double quotes or a hyphen. Essentially we split by remaining punctuation and white spaces. Though by keeping hyphen ... | def f636(aWDa):
asgQ = mBkc()
Ctck = mBkc()
J7UI = mBkc()
mXDZ = ZbWC.compile("[^#@\\w'-]+")
for a1PO in aWDa:
V22M = mXDZ.split(a1PO.message)
for GIN8 in V22M:
if GIN8 and (not GIN8.startswith('-')):
if GIN8.startswith('#'):
asgQ.updat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wr3U(YKHO, l5Ny):\n lpha = []\n NHn2 = []\n for OXAZ in ZbWC.split('\\\\s', l5Ny):\n if OXAZ == '':\n continue\n\n @Pc69.timeout(1)\n def G7R0(OXAZ):\n return Q4gr.search(OXAZ)\n try:\n kUBT = G7R0(OXAZ)\n except TimeoutError:\n ... | [
"0.6669178",
"0.6581531",
"0.6547369",
"0.6540348",
"0.65368605",
"0.6534315",
"0.6495982",
"0.6486845",
"0.6465529",
"0.6465529",
"0.6462578",
"0.6460408",
"0.64409333",
"0.6388948",
"0.6367203",
"0.6357462",
"0.63344157",
"0.6312621",
"0.6292938",
"0.6275091",
"0.62743217",... | 0.62529 | 24 |
Checks if a node is contained in a face Return the local node index if found in the face Gives the first index if multiple (there should not be multiple for a valid mesh) | def ITwB(YKHO, KV9e, y87p):
for YRbF, FFgd in enumerate(YKHO.faces[y87p]):
if FFgd == KV9e:
return (True, YRbF)
return (False, None) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gXvz(co5A, S1_y):\n if co5A.get('meshes') is None:\n return -1\n d6pt = 0\n for rR8k in co5A['meshes']:\n H5ew = 'id' if rR8k.get('id') != None else 'name'\n if rR8k.get(H5ew) == S1_y:\n return d6pt\n d6pt += 1\n return -1",
"def vlhG(pNZh, Q6kx):\n retur... | [
"0.60940945",
"0.5794519",
"0.57887036",
"0.56676614",
"0.56393915",
"0.5619399",
"0.5608121",
"0.5585266",
"0.552419",
"0.551562",
"0.5511793",
"0.54896045",
"0.5472748",
"0.5432701",
"0.541635",
"0.5383229",
"0.53685564",
"0.53472453",
"0.53403014",
"0.5328364",
"0.53250885... | 0.7777686 | 0 |
Remove color codes from input text | def w0xg(l5Ny):
pS8t = ZbWC.compile('\\033\\[\\d*(;\\d*)*m')
return ZbWC.sub(pS8t, '', l5Ny) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def p3HR(l5Ny) -> J_Wi:\n return puY_(uoaQ, l5Ny)",
"def Ri4v(nPrm):\n if isinstance(nPrm, bytes):\n nPrm = nPrm.decode('utf-8')\n iZFm = ZbWC.compile('\\\\x1b\\\\[\\\\d*m')\n return ZbWC.sub(iZFm, '', nPrm)",
"def Oxvf(YKHO, KCHu):\n return qCPI.sub('', KCHu)",
"def qrTl(l5Ny) -> J_Wi:... | [
"0.7301121",
"0.70891196",
"0.7027733",
"0.6929002",
"0.6775761",
"0.67008615",
"0.66931397",
"0.66061866",
"0.65510416",
"0.65122557",
"0.648625",
"0.64378804",
"0.6347886",
"0.6341688",
"0.6321839",
"0.6296648",
"0.62281924",
"0.622401",
"0.6210272",
"0.6179865",
"0.615918"... | 0.7637727 | 0 |
Ensure we can create a new product object. | def FBLI(YKHO):
bD7m = gxEw('products:list')
nPrm = {'name': 'Banana', 'description': '\n Bananas are one of the most widely consumed fruits in the\n world for good reason. Eating them could help lower blood\n pressure and reduce the risks of cancer and asthma.\n ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jMIo(YKHO):\n Lx3t = YKHO.create_product()\n YKHO.assertTrue(Lx3t)\n YKHO.assertEqual(Lx3t.state2, 'draft')\n YKHO.assertTrue(Lx3t.replacement_product_ids)\n YKHO.assertEqual(len(Lx3t.replacement_product_ids), 1)\n YKHO.assertEqual(Lx3t.replacement_product_ids[0].id, YKHO.ref('product_lifecyc... | [
"0.7750057",
"0.76509434",
"0.73122835",
"0.72073627",
"0.71966124",
"0.70265263",
"0.6964693",
"0.69091284",
"0.69064957",
"0.6867335",
"0.68420285",
"0.68166935",
"0.68023586",
"0.6776348",
"0.6699295",
"0.6686237",
"0.66644645",
"0.66606146",
"0.66315293",
"0.6626657",
"0.... | 0.6599606 | 21 |
Ensure created product objects are returned. | def t4_v(YKHO):
bD7m = gxEw('products:list')
geh0 = YKHO.client.get(bD7m)
YKHO.assertEqual(len(geh0.data), 1)
YKHO.assertEqual(geh0.data[0]['name'], 'Eggs') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zm29():\n try:\n yzq9 = jlTH()\n ZsHM = yzq9.get_products('product_groups.json')\n TxP0, KeBf = yzq9.filter_products(ZsHM)\n if not yzq9.save_independent_products(TxP0):\n Exception(\"Function save_independent_products() couldn't complete\")\n if not yzq9.save_d... | [
"0.76835716",
"0.71772695",
"0.67874676",
"0.6709017",
"0.6681837",
"0.6667027",
"0.6536434",
"0.64481217",
"0.6392697",
"0.63535756",
"0.63013506",
"0.6280245",
"0.6276846",
"0.6247466",
"0.6232976",
"0.61780953",
"0.6168151",
"0.615804",
"0.614262",
"0.613467",
"0.61256975"... | 0.0 | -1 |
Ensure we cannot update a product object without a required value. | def oJOP(YKHO):
nPrm = {'pk': 1, 'name': None, 'description': '\n Yogurt also spelled yoghurt, yogourt or yoghourt,\n is a food produced by bacterial fermentation of milk.\n '}
bD7m = gxEw('products:detail', kwargs={'pk': nPrm['pk']})
geh0 = YKHO.client.put(bD7m, nPr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XXdo(YKHO):\n _hkX = YKHO.admin_register()\n Amyp = YKHO.admin_login()\n eOtH = Amyp['token']\n o5h_ = dict(prod_name='NY_jeans', category='denims', stock=50, price=180)\n _hkX = YKHO.client.put('/api/v1/products/1', content_type='application/json', data=qQXR.dumps(o5h_), headers={'Authorization... | [
"0.6858474",
"0.6539858",
"0.6504811",
"0.64279",
"0.63721395",
"0.630006",
"0.6271217",
"0.6187618",
"0.61517346",
"0.61487615",
"0.6102605",
"0.6095026",
"0.60840935",
"0.60634136",
"0.60610586",
"0.6052031",
"0.6025971",
"0.6018435",
"0.59484875",
"0.5940664",
"0.5926653",... | 0.6758621 | 1 |
Ensure we can retrieve a product object. | def LqNU(YKHO):
f9CE = 1
bD7m = gxEw('products:detail', kwargs={'pk': f9CE})
geh0 = YKHO.client.get(bD7m)
YKHO.assertEqual(geh0.status_code, jGRS.HTTP_200_OK)
YKHO.assertEqual(geh0.data['id'], f9CE) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BUWi(YKHO):\n aeVF = YKHO._create_products(1)[0]\n _hkX = YKHO.app.get('/products/{}'.format(aeVF.id), content_type='application/json')\n YKHO.assertEqual(_hkX.status_code, jGRS.HTTP_200_OK)\n nPrm = _hkX.get_json()\n YKHO.assertEqual(nPrm['name'], aeVF.name)\n sWfS = '%s' % aeVF",
"def OV8... | [
"0.6728869",
"0.6544774",
"0.64300364",
"0.6280355",
"0.616119",
"0.61093605",
"0.60606",
"0.6055613",
"0.60533905",
"0.60302293",
"0.6021884",
"0.60153896",
"0.59756356",
"0.5963409",
"0.59586644",
"0.595791",
"0.5955534",
"0.593957",
"0.5910057",
"0.5905302",
"0.5904873",
... | 0.6265791 | 4 |
Required by UserPassesTestMixin. Used to determine if the user is the post's author | def Iw6c(YKHO):
m8z6 = YKHO.get_object()
if YKHO.request.user == m8z6.author:
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Iw6c(YKHO):\n m8z6 = YKHO.get_object()\n if YKHO.request.user == m8z6.author:\n return True\n return False",
"def Iw6c(YKHO):\n m8z6 = YKHO.get_object()\n if YKHO.request.user == m8z6.author:\n return True\n return False",
"def Iw6c(YKHO):\n m8z6 = YKHO.get_object()\n ... | [
"0.82481396",
"0.82481396",
"0.82481396",
"0.8129531",
"0.8129531",
"0.75717956",
"0.75703967",
"0.72330797",
"0.72330797",
"0.70377123",
"0.68906224",
"0.68682307",
"0.6862221",
"0.6857728",
"0.6840125",
"0.6815075",
"0.67987746",
"0.67764294",
"0.6648219",
"0.65935385",
"0.... | 0.82284826 | 3 |
Updates relu activation functions so that 1 stores output in forward pass 2 imputes zero for gradient values that are less than zero | def drfk(YKHO):
def XVC9(yR_P, g6LF, EYyA):
"""
If there is a negative gradient, change it to zero
"""
nWP1 = YKHO.forward_relu_outputs[-1]
nWP1[nWP1 > 0] = 1
e1d4 = nWP1 * ht2j.clamp(g6LF[0], min=0.0)
del YKHO.forward_relu_outputs[-1]
return ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def drfk(YKHO):\n\n def XVC9(yR_P, g6LF, EYyA):\n \"\"\"\n If there is a negative gradient, change it to zero\n \"\"\"\n nWP1 = YKHO.forward_relu_outputs[-1]\n nWP1[nWP1 > 0] = 1\n e1d4 = nWP1 * ht2j.clamp(g6LF[0], min=0.0)\n del YKHO.forward_relu_outputs[-1]\n ... | [
"0.7100333",
"0.7058471",
"0.70514506",
"0.7016183",
"0.69800603",
"0.6970446",
"0.6891995",
"0.6884671",
"0.6851853",
"0.6762686",
"0.6735883",
"0.6601431",
"0.6566213",
"0.6560501",
"0.65268946",
"0.64769137",
"0.64734256",
"0.64673173",
"0.64647084",
"0.6449747",
"0.641947... | 0.69368 | 6 |
Saves a numpy matrix of shape D(1 or 3) x W x H as an image | def t7Mi(Xn71, pmON):
if isinstance(Xn71, oyIN.ndarray):
if len(Xn71.shape) == 2:
Xn71 = oyIN.expand_dims(Xn71, axis=0)
print('A')
print(Xn71.shape)
if Xn71.shape[0] == 1:
print('B')
Xn71 = oyIN.repeat(Xn71, 3, axis=0)
print(Xn7... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def t7Mi(Ux0P, SppC):\n Xn71 = hnIv.new('L', list(reversed(SppC.shape)))\n nPrm = oyIN.floor(oyIN.ravel(SppC) * 256)\n Xn71.putdata(nPrm)\n Xn71.save(Ux0P)",
"def zIVj(YKHO, Ux0P, usx6, WfCS):\n OQe7 = YKHO.reconstructed.shape[0]\n Yw_3 = oyIN.zeros((usx6, WfCS * OQe7))\n for YRbF in range(O... | [
"0.705154",
"0.6232312",
"0.62307554",
"0.60396045",
"0.5971052",
"0.59563744",
"0.5929307",
"0.589202",
"0.5874667",
"0.58503026",
"0.58503026",
"0.58300304",
"0.5826351",
"0.580099",
"0.5783836",
"0.577069",
"0.57415926",
"0.5703839",
"0.56920254",
"0.5688331",
"0.5671938",... | 0.5791287 | 14 |
Returns the event given a filename. | def REhh(YKHO, mWFP):
return YKHO.events[mWFP.lower()] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def REhh(YKHO, Ux0P):\n return YKHO.events[Ux0P.lower()]",
"def b4Gr(YKHO, jkf2):\n bE3Y = Hy7s.path.join(YKHO.events_dir, jkf2)\n if Hy7s.path.isfile(bE3Y):\n return BfDw.file_word(bE3Y)\n else:\n return None",
"def LhGe(Yguu):\n swTZ = Yguu.filter(event_type='validation').first()... | [
"0.8657537",
"0.69001484",
"0.66389483",
"0.65169996",
"0.61778605",
"0.61574984",
"0.6132738",
"0.6004449",
"0.5997125",
"0.589666",
"0.58965075",
"0.58734703",
"0.58438706",
"0.58191633",
"0.581425",
"0.5796045",
"0.57793486",
"0.5770477",
"0.5750548",
"0.5692956",
"0.56758... | 0.6525911 | 3 |
Returns the event given a filename. | def REhh(YKHO, Ux0P):
return YKHO.events[Ux0P.lower()] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b4Gr(YKHO, jkf2):\n bE3Y = Hy7s.path.join(YKHO.events_dir, jkf2)\n if Hy7s.path.isfile(bE3Y):\n return BfDw.file_word(bE3Y)\n else:\n return None",
"def LhGe(Yguu):\n swTZ = Yguu.filter(event_type='validation').first()\n if swTZ:\n return swTZ",
"def REhh(YKHO, mWFP):\n ... | [
"0.69001484",
"0.66389483",
"0.6525911",
"0.65169996",
"0.61778605",
"0.61574984",
"0.6132738",
"0.6004449",
"0.5997125",
"0.589666",
"0.58965075",
"0.58734703",
"0.58438706",
"0.58191633",
"0.581425",
"0.5796045",
"0.57793486",
"0.5770477",
"0.5750548",
"0.5692956",
"0.56758... | 0.8657537 | 0 |
The groundtruth trajectory as absolute poses. | def SHvi(YKHO):
return YKHO._ground_truth_trajectory | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FxWs(YKHO):\n return YKHO._ground_truth_trajectory",
"def VO93(YKHO) -> ht2j.Tensor:\n return ht2j.abs(YKHO.ground_vis)",
"def RL5e(YKHO):\n fHcP = oyIN.eye(4)\n for z1Rg in YKHO.dataset.oxts:\n Z4_F = fHcP @ z1Rg.T_w_imu\n YKHO.poses_gt.append(Z4_F)\n for YRbF, shtX in enumera... | [
"0.6765868",
"0.6603803",
"0.6599658",
"0.65702444",
"0.60967803",
"0.5828267",
"0.58172274",
"0.5724312",
"0.56197137",
"0.55483526",
"0.5531694",
"0.5514",
"0.54430574",
"0.54178333",
"0.54023176",
"0.53969103",
"0.53911406",
"0.5388463",
"0.5358827",
"0.53451616",
"0.53341... | 0.7627083 | 0 |
View function for home page of site. | def d6pt(QePW):
k0Rq = zvVu.objects.count()
edw3 = U2Av.objects.count()
KV28 = zWvv.objects.filter(tag_type__exact='vo').count()
sc4G = oPx1.objects.count()
return _1tc(QePW, 'index.html', context={'num_orgs': k0Rq, 'num_contacts': edw3, 'num_volunteers': KV28, 'num_projects': sc4G}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kZiy(QePW):\n return _1tc(QePW, 'compta/home.html')",
"def vja_(QePW):\n return _1tc(QePW, 'ez_main/home_page.html')",
"def kZiy(QePW):\n return _1tc(QePW, 'home.html')",
"def C_QL(QePW):\n return _1tc(QePW, 'core/homepage.html')",
"def C_QL(QePW):\n return SGJU('h1ds_core/homepage.html'... | [
"0.8493426",
"0.84268916",
"0.83415145",
"0.83306193",
"0.82976943",
"0.8295291",
"0.8276345",
"0.82545686",
"0.82155704",
"0.8132563",
"0.81246215",
"0.81224865",
"0.8121264",
"0.81049734",
"0.8098485",
"0.80935514",
"0.80935514",
"0.80935514",
"0.80935514",
"0.80935514",
"0... | 0.0 | -1 |
colors_tuple contains color count and color RGB we want to sort the tuple by RGB tuple[1] | def YH3N(jAh3):
ZHna = sorted(jAh3, key=lambda WKvO: WKvO[1])
return ZHna | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CUpX():\n return [('yellow', 0.263), ('orange', 0.047), ('red', 0.0), ('green', 0.444), ('purple', 0.972)]",
"def kA_W(YKHO, xYvp: List[int]) -> None:\n Z5Q9 = 0\n AX3l = 1\n pPPK = 2\n UN7H, tCEo, kdvC = (0, 0, len(xYvp) - 1)\n while tCEo <= kdvC:\n if xYvp[tCEo] == AX3l:\n ... | [
"0.73057824",
"0.6715163",
"0.659019",
"0.65718055",
"0.6554891",
"0.6513611",
"0.65068257",
"0.64852744",
"0.6476646",
"0.6446672",
"0.6437227",
"0.6434518",
"0.64283127",
"0.64269793",
"0.6415569",
"0.64137036",
"0.63663346",
"0.6353963",
"0.6353518",
"0.63507",
"0.6346661"... | 0.88446194 | 0 |
Initialize the weights of model. | def vB93(YKHO, mL4f=None):
YKHO.online_backbone.init_weights()
for r5E1 in YKHO.online_necks:
r5E1.init_weights(init_linear='kaiming')
for l8gS, wq_d in zip(YKHO.online_backbone.parameters(), YKHO.target_backbone.parameters()):
wq_d.data.copy_(l8gS.data)
for l8gS, wq_d in zip(YKHO.online... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vB93(C3ST):\n ...",
"def C0Lv(YKHO):\n pass",
"def vB93(YKHO):\n YKHO.apply(YKHO._init_weights)",
"def sTi3(YKHO):\n dIoi.WeightsInitializer.initialize_layer_or_model(YKHO._batch)",
"def vB93(YKHO):\n YKHO.apply(YKHO._init_weights)\n YKHO.tie_weights()",
"def vJuA(YKHO):\n raise ... | [
"0.90901464",
"0.8925572",
"0.8857049",
"0.8845922",
"0.8692089",
"0.8623104",
"0.839182",
"0.8375357",
"0.83207476",
"0.8201005",
"0.8182173",
"0.8153451",
"0.8152008",
"0.8152008",
"0.8152008",
"0.81428635",
"0.8120445",
"0.8108976",
"0.8095916",
"0.8055329",
"0.8045609",
... | 0.76560736 | 47 |
Construct the Nasbench201 class. | def FIMM(YKHO):
super(ud3y, YKHO).__init__()
YKHO.args.data_path = sVHT.download_dataset(YKHO.args.data_path)
YKHO.nasbench201_api = ExMO('self.args.data_path') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, __n6: str, xlLU: Union[np.random.RandomState, int, None]=None, **B2fa):\n super(hBQW, YKHO).__init__(rng=xlLU)\n EL62 = T20A(dataset=__n6)\n YKHO.data = EL62.load()\n YKHO.config_to_structure = hBQW.config_to_structure_func(max_nodes=rolA)",
"def FIMM(YKHO, Ep8u: int=64, I7Gy: int=0, *... | [
"0.6607941",
"0.59671456",
"0.5869722",
"0.585219",
"0.5845626",
"0.5747821",
"0.5736726",
"0.5727834",
"0.56604826",
"0.5639249",
"0.56330985",
"0.5564503",
"0.55565447",
"0.555099",
"0.55415773",
"0.55343646",
"0.5533971",
"0.55332655",
"0.5528303",
"0.55212843",
"0.5520394... | 0.6830579 | 0 |
Sets gradients of all model parameters to zero. | def frhb(YKHO):
for XP5J in YKHO.parameters():
if XP5J.grad is not None:
XP5J.grad.data.zero_() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def frhb(YKHO):\n for xqoZ in YKHO.params:\n xqoZ.grad = None",
"def frhb(YKHO):\n for XP5J, TifC in YKHO.params:\n TifC.zero_()",
"def frhb(YKHO):\n for k78t in YKHO.param():\n k78t.zero_grad()",
"def frhb(YKHO):\n for XP5J, Ro40, Ty9i, EbwU, KOtB in YKHO.params:\n Ro... | [
"0.82806003",
"0.82769936",
"0.8231913",
"0.8031716",
"0.8031716",
"0.7783295",
"0.7739907",
"0.7729052",
"0.7556755",
"0.75208354",
"0.7423662",
"0.73386514",
"0.7333627",
"0.730899",
"0.72826827",
"0.72826827",
"0.72826827",
"0.7223956",
"0.7222747",
"0.7210486",
"0.7208907... | 0.7976485 | 5 |