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 |
|---|---|---|---|---|---|---|
204 responses must not return some entity headers | def LZ9q(YKHO):
IMwm = ('content-length', 'content-type')
for MKlR in IMwm:
BCYG.response.set_header(MKlR, 'foo')
BCYG.status = 204
for MKlR, Ty9i in BCYG.response.headerlist:
YKHO.assertFalse(MKlR.lower() in IMwm, 'Header %s not deleted' % MKlR) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Moau() -> bytes:\n _c1T = qcWV.datetime.now(qcWV.timezone.utc).strftime('%a, %d %b %Y %H:%M:%S GMT')\n WBPg = 'HTTP/1.1 204 No Content' + '\\r\\nDate: ' + _c1T + '\\r\\n\\r\\n'\n print(WBPg)\n return WBPg.encode(EL1e.FORMAT)",
"def ecHB(YKHO, _hkX):\n return YKHO.assertEqual(_hkX.status_code, ... | [
"0.7504536",
"0.7456752",
"0.70702946",
"0.7007137",
"0.6838798",
"0.6740226",
"0.66936654",
"0.66851264",
"0.66362447",
"0.65761197",
"0.648202",
"0.6477876",
"0.64216065",
"0.6242951",
"0.623777",
"0.623777",
"0.6185526",
"0.61398613",
"0.61072254",
"0.6086671",
"0.60757756... | 0.83296347 | 0 |
Construct an ThothOnixTelescope instance. | def FIMM(YKHO, *, ZmYv: str, J6_U: CloudWorkspace, FEXb: str, JHYc: str, adr7: str='onix', hbfj: str='onix', NwER: str='Thoth ONIX Feed', iluN: str=None, SeVn: str='onix', GT6L: str='https://export.thoth.pub', LPo3: str=b8ea(), e3JZ: str=mpDO.OBSERVATORY_API, ctJF: bool=False, kepv: pendulum.DateTime=t_XE.datetime(2022... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, EmUK: Optional[SimWorld]=None, **B2fa: Any):\n FstF.__init__(YKHO, **B2fa, motion_status_interfaces=['ITelescope', 'IFocuser', 'IFilters'])\n wfZv.__init__(YKHO, **B2fa)\n from pyobs.utils.simulation import SimWorld\n YKHO._world = EmUK if EmUK is not None else YKHO.add_child_object(SimW... | [
"0.6043081",
"0.5964881",
"0.57800967",
"0.57065284",
"0.5576632",
"0.5284193",
"0.5260236",
"0.5221126",
"0.52082175",
"0.51896495",
"0.5188457",
"0.5174516",
"0.5166596",
"0.51366943",
"0.5117554",
"0.51174974",
"0.5112744",
"0.5068512",
"0.50668824",
"0.5044727",
"0.504393... | 0.0 | -1 |
Test whether two objects contain the same elements. This function allows two GeoSeries to be compared against each other to see if they have the same shape and geometries (same wkb bytes). NaNs in the same location are considered equal. The column headers do not need to have the same type, but the elements within the c... | def aPi6(YKHO, Elif):
if not isinstance(Elif, zD1_):
return False
return YKHO._data.equals(Elif._data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hHbZ(YKHO, Elif):\n return YKHO.compounddatatype == Elif.compounddatatype and YKHO.min_row == Elif.min_row and (YKHO.max_row == Elif.max_row)",
"def tAcF(YKHO, Elif):\n if YKHO.rows == Elif.rows and YKHO.columns == Elif.columns:\n return True\n else:\n return False",
"def InF8(zVOX, ... | [
"0.713626",
"0.70874375",
"0.6902014",
"0.6831683",
"0.68126047",
"0.67645264",
"0.66774386",
"0.6625861",
"0.6573688",
"0.65623236",
"0.6527109",
"0.6523672",
"0.65229714",
"0.6514099",
"0.6510609",
"0.6509781",
"0.6501745",
"0.64968944",
"0.64894736",
"0.6446339",
"0.644061... | 0.6488795 | 19 |
Check if each geometry is of valid geometry format. | def SGVO(YKHO):
return PX7E(slpE.ST_IsValid, YKHO).astype(bool, copy=False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qaMH(kvKJ):\n for Fw8z in kvKJ.geometry:\n if GSsI(Fw8z) != 'Valid Geometry':\n print(GSsI(Fw8z))",
"def vyT9(YKHO, BWXx: List) -> bool:\n\n def tlki(NgpY):\n if isinstance(NgpY, (PvyL, elG8)):\n yvT9 = 'point' in YKHO._permitted_geometries\n if not yvT9:\... | [
"0.7904392",
"0.690688",
"0.6685605",
"0.66615665",
"0.6612329",
"0.64486986",
"0.64352995",
"0.6389536",
"0.6370707",
"0.6149703",
"0.6111263",
"0.6095195",
"0.6012014",
"0.59583324",
"0.5873552",
"0.58691776",
"0.58599246",
"0.5856493",
"0.58545256",
"0.58147585",
"0.581045... | 0.0 | -1 |
Check whether each geometry is "simple". "Simple" here means that a geometry has no anomalous geometric points, such as self intersection or self tangency. | def kL6g(YKHO):
return PX7E(slpE.ST_IsSimple, YKHO).astype(bool, copy=False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kL6g(Fw8z, **B2fa):\n return _e0h.is_simple(Fw8z, **B2fa)",
"def kL6g(YKHO):\n if not YKHO.is_compact():\n return False\n for Ty9i in YKHO.vertex_generator():\n eQUr = [jzdc for jzdc in Ty9i.neighbors()]\n if len(eQUr) != YKHO.dim():\n return False\n return True",
... | [
"0.7666004",
"0.64723015",
"0.6392264",
"0.62469393",
"0.6124172",
"0.6097932",
"0.60693663",
"0.59628433",
"0.59498405",
"0.59405744",
"0.58801895",
"0.5861422",
"0.5823311",
"0.5766822",
"0.5688275",
"0.560034",
"0.55730313",
"0.5571647",
"0.5562339",
"0.5434933",
"0.541820... | 0.6210017 | 4 |
Calculate the 2D Cartesian (planar) area of each geometry. | def f0tD(YKHO):
return PX7E(slpE.ST_Area, YKHO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f0tD(YKHO):\n if isinstance(YKHO.crs, xPYB):\n iOjJ = YKHO.crs.ellipsoid.a\n K5Zz = YKHO.crs.ellipsoid.b\n f0tD = 0.0\n if iOjJ == K5Zz:\n for pG0V in YKHO.segment_tuples:\n o4D3, si3g = pG0V[0]\n ajwV, skBL = pG0V[1]\n f0tD... | [
"0.7063971",
"0.6625418",
"0.65976596",
"0.659629",
"0.6554382",
"0.6529425",
"0.65187824",
"0.6507955",
"0.64807117",
"0.6467007",
"0.6453874",
"0.6421093",
"0.6408375",
"0.6345457",
"0.6292591",
"0.6268464",
"0.6240269",
"0.6230155",
"0.61827403",
"0.6177272",
"0.6141594",
... | 0.0 | -1 |
For each geometry in geometries, return a string that indicates is type. | def Qy87(YKHO):
return PX7E(slpE.ST_GeometryType, YKHO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sSrO(YKHO) -> _ABP.StringValue:\n return IPme.GeoGeometryType(YKHO).to_expr()",
"def gupY(riSI):\n if 'Polygon' in riSI:\n return 'POLYGON'\n elif 'Polyline' in riSI:\n return 'POLYLINE'\n elif 'Point' in riSI:\n return 'POINT'\n else:\n return 'Unknown'",
"def ZM... | [
"0.6874476",
"0.6696634",
"0.6290559",
"0.62605953",
"0.6224997",
"0.619825",
"0.5985244",
"0.575593",
"0.569537",
"0.56879616",
"0.55618614",
"0.54778594",
"0.54542613",
"0.5450805",
"0.54445904",
"0.5382666",
"0.53738856",
"0.53256947",
"0.5278076",
"0.5276421",
"0.52664536... | 0.626888 | 3 |
Convert curves in each geometry to approximate linear representation, e.g., CIRCULAR STRING to regular LINESTRING, CURVEPOLYGON to POLYGON, and MULTISURFACE to MULTIPOLYGON. Useful for outputting to devices that can't support CIRCULARSTRING geometry types. | def gxTQ(YKHO):
return H5As(slpE.ST_CurveToLine, YKHO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pNjn(PXIy):\n UT57 = []\n CNqW = []\n UOGn = []\n for hTWD in PXIy:\n Uqbu = y3ji(hTWD)\n if hTWD[0][0] == hTWD[-1][0] and hTWD[0][1] == hTWD[-1][1]:\n tspZ = uW_9(Uqbu)\n if not tspZ.is_ccw:\n UT57.append(rSWe(hTWD))\n else:\n ... | [
"0.5612656",
"0.5605624",
"0.55674744",
"0.55128264",
"0.54048735",
"0.5354755",
"0.53211635",
"0.52772313",
"0.52101445",
"0.5138058",
"0.5118836",
"0.5081327",
"0.5062001",
"0.5044732",
"0.50275433",
"0.49676812",
"0.49635187",
"0.4959512",
"0.49567842",
"0.4953524",
"0.494... | 0.51644486 | 9 |
Transform each geometry to a different coordinate reference system. The ``crs`` attribute on the current GeoSeries must be set. | def hxRM(YKHO, ucxv):
if ucxv is None:
raise ValueError('Can not transform with invalid crs')
if YKHO.crs is None:
raise ValueError('Can not transform geometries without crs. Set crs for this GeoSeries first.')
if YKHO.crs == ucxv:
return YKHO
return H5As(slpE.ST_Transform, YKHO,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def p7LL(pd8u, EeDu, znX3):\n n_qI = BYPk.SpatialReference()\n n_qI.ImportFromEPSG(EeDu)\n Pt59 = BYPk.SpatialReference()\n Pt59.ImportFromEPSG(znX3)\n nGID = BYPk.CoordinateTransformation(n_qI, Pt59)\n gEmA = pd8u.GetLayerByIndex(0)\n KXT4 = []\n gEmA.ResetReading()\n for RDhP in gEmA:\... | [
"0.6502866",
"0.62526053",
"0.61256564",
"0.6086267",
"0.60835266",
"0.6010616",
"0.5969945",
"0.5863563",
"0.5861438",
"0.5789306",
"0.5703812",
"0.56789464",
"0.5665309",
"0.5656348",
"0.56265503",
"0.5570779",
"0.5527477",
"0.5501872",
"0.5500846",
"0.5494727",
"0.5475225"... | 0.7170733 | 0 |
Check whether each geometry is within other (elementwise). | def eVmN(YKHO, Elif):
return xpSA(slpE.ST_Within, YKHO, Elif).astype(bool, copy=False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ynEz(YKHO, Elif):\n if YKHO.upperLeft.x <= Elif.lowerRight.x and YKHO.lowerRight.x >= Elif.upperLeft.x and (YKHO.upperLeft.y >= Elif.lowerRight.y) and (YKHO.lowerRight.y <= Elif.upperLeft.y):\n return True\n return False",
"def sjXf(vU9r, _gRY):\n return _gRY.tl.x >= vU9r.tl.x and _gRY.tl.y >... | [
"0.7524902",
"0.73729897",
"0.71685326",
"0.7139274",
"0.7030789",
"0.702235",
"0.70122725",
"0.6991214",
"0.6973276",
"0.6951702",
"0.69121456",
"0.6908521",
"0.6871371",
"0.6854054",
"0.6852921",
"0.6798403",
"0.6786245",
"0.6746447",
"0.6740402",
"0.6731472",
"0.67281044",... | 0.6281432 | 82 |
Check whether each geometry contains other (elementwise). | def sjXf(YKHO, Elif):
return xpSA(slpE.ST_Contains, YKHO, Elif).astype(bool, copy=False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ynEz(YKHO, Elif):\n if YKHO.upperLeft.x <= Elif.lowerRight.x and YKHO.lowerRight.x >= Elif.upperLeft.x and (YKHO.upperLeft.y >= Elif.lowerRight.y) and (YKHO.lowerRight.y <= Elif.upperLeft.y):\n return True\n return False",
"def ciB1(BzZr, RL4V):\n o4D3, si3g, s1k6, zhMh = BzZr.get_box()\n ... | [
"0.6927342",
"0.6813174",
"0.67808735",
"0.6683514",
"0.6608095",
"0.66048783",
"0.6543079",
"0.651822",
"0.6502066",
"0.6419477",
"0.64123785",
"0.6408629",
"0.6377291",
"0.63678026",
"0.63514185",
"0.63224965",
"0.6319783",
"0.6301619",
"0.6301403",
"0.62778205",
"0.6274065... | 0.0 | -1 |
Check whether each geometry is "spatially equal" to other. "Spatially equal" means two geometries represent the same geometry structure. | def OpBx(YKHO, Elif):
from pandas.api.types import is_scalar
if is_scalar(Elif):
Elif = YKHO.__class__([Elif] * len(YKHO), index=YKHO.index)
VQ6Z = YKHO
if not VQ6Z.index.equals(Elif.index):
E4N8('The indices of the two GeoSeries are different.')
VQ6Z, Elif = VQ6Z.align(Elif)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def p6XU(YKHO, LX4V, SpNa):\n return True",
"def p6XU(YKHO, LX4V, SpNa):\n for j93S in LX4V.keys():\n O4k7 = getattr(j93S, 'spin', 0)\n c0GA = getattr(j93S, 'oxi_state', 0)\n for Nqp_ in SpNa.keys():\n bFFU = getattr(Nqp_, 'spin', 0)\n t8GJ = getattr(Nqp_, 'oxi_st... | [
"0.6802465",
"0.67805123",
"0.66960746",
"0.66589355",
"0.6498028",
"0.6484803",
"0.62827766",
"0.6278034",
"0.6247545",
"0.6240349",
"0.6240165",
"0.62319565",
"0.6208261",
"0.6191864",
"0.61298805",
"0.6103202",
"0.6102807",
"0.6097758",
"0.6073104",
"0.6059349",
"0.6056827... | 0.6046562 | 21 |
Check whether each geometry "touches" other. "Touch" means two geometries have common points, and the common points locate only on their boundaries. | def _nwa(YKHO, Elif):
return xpSA(slpE.ST_Touches, YKHO, Elif).astype(bool, copy=False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def P10m(YKHO):\n kUBT = False\n for YRbF in range(len(YKHO.__points) - 1):\n EBgd = YKHO.__points[YRbF]\n HpuQ = YKHO.__points[YRbF + 1]\n X7zS = YKHO.__line_segment(EBgd, HpuQ)\n if not X7zS is None:\n BQGg = X7zS[0]\n h3cg = X7zS[1]\n bYzl = X7z... | [
"0.65426964",
"0.6534798",
"0.64519405",
"0.6406436",
"0.6399988",
"0.637896",
"0.6334022",
"0.6320897",
"0.6273946",
"0.6238817",
"0.6082561",
"0.60700196",
"0.6025307",
"0.601121",
"0.59974545",
"0.59330696",
"0.59228545",
"0.59096324",
"0.58627254",
"0.5842866",
"0.5815128... | 0.65202117 | 2 |
Return minimum distance in meters between two lon/lat points. Uses a spherical earth and radius derived from the spheroid defined by the SRID. | def T3nz(YKHO, Elif):
if not YKHO.crs == getattr(Elif, 'crs', 'EPSG:4326') == 'EPSG:4326':
raise ValueError("Only can calculate spherical distance with 'EPSG:4326' crs.")
return xpSA(slpE.ST_DistanceSphere, YKHO, Elif) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def v84k(igSk, TGuP, PNCc, v7YJ):\n igSk, TGuP, PNCc, v7YJ = (float(igSk), float(TGuP), float(PNCc), float(v7YJ))\n vexM = Y_1E(TGuP - igSk)\n Mkmy = Y_1E(v7YJ - PNCc)\n KmDV = Y_1E(TGuP)\n RYq9 = Y_1E(igSk)\n jzdc = YUNn(vexM / 2) * YUNn(vexM / 2) + YhSR(RYq9) * YhSR(KmDV) * YUNn(Mkmy / 2) * YUN... | [
"0.68833476",
"0.68543684",
"0.6664104",
"0.66225034",
"0.6614609",
"0.6551876",
"0.6545566",
"0.6468671",
"0.64259017",
"0.63936806",
"0.63863176",
"0.63863176",
"0.63863176",
"0.63863176",
"0.63863176",
"0.638405",
"0.6378784",
"0.6377177",
"0.63747877",
"0.63671356",
"0.63... | 0.6405948 | 9 |
Returns the Hausdorff distance between each geometry and other. This is a measure of how similar or dissimilar 2 geometries are. | def Rd9y(YKHO, Elif):
return xpSA(slpE.ST_HausdorffDistance, YKHO, Elif) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Rd9y(YKHO, Elif):\n ...",
"def Rd9y(_z_f, tgYj):\n Jika = _z_f.clone('unsigned int')\n o1F2 = tgYj.clone('unsigned int')\n vHIm = BfDw.get_lib_fn('hausdorffDistance%iD' % Jika.dimension)\n Csk6 = vHIm(Jika.pointer, o1F2.pointer)\n return Csk6",
"def IHwN(YKHO, FJhS, Yk_P):\n if _eFN:\n... | [
"0.759283",
"0.7179202",
"0.7101328",
"0.689909",
"0.6858431",
"0.6837336",
"0.67604476",
"0.6683294",
"0.66194665",
"0.66013527",
"0.6569919",
"0.65585876",
"0.6527269",
"0.6473583",
"0.6433952",
"0.6392746",
"0.63679177",
"0.63628966",
"0.6316012",
"0.63065404",
"0.6305005"... | 0.76239663 | 0 |
Construct Point geometries according to the coordinates. | def AU8u(Emd4, WKvO, LVAh, ucxv=None):
ucxv = wQXe(ucxv)
return Emd4(slpE.ST_Point(WKvO, LVAh), crs=ucxv) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JTYK(nPrm):\n for rdlD in nPrm:\n if rdlD['x'] and rdlD['y']:\n try:\n rdlD['geometry'] = AU8u.Point(float(rdlD['x']), float(rdlD['y']))\n except:\n rdlD['geometry'] = None\n else:\n rdlD['geometry'] = None\n return nPrm",
"de... | [
"0.6530858",
"0.6457091",
"0.64059484",
"0.640297",
"0.6357891",
"0.6344461",
"0.6337387",
"0.6316078",
"0.62294465",
"0.6183091",
"0.6170689",
"0.613722",
"0.613722",
"0.60727257",
"0.60714775",
"0.6061231",
"0.60591716",
"0.59994185",
"0.59989065",
"0.59790605",
"0.5955864"... | 0.5411405 | 95 |
Construct geometries from geopandas GeoSeries. | def ILHs(Emd4, nPrm):
import geopandas as quUU
import shapely.wkb
if not isinstance(nPrm, quUU.GeoSeries):
raise TypeError(f'data must be {quUU.GeoSeries}, got {type(nPrm)}')
if nPrm.crs is not None:
ucxv = nPrm.crs.to_authority() or nPrm.crs.source_crs.to_authority()
ucxv = ucxv... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MJkQ(YKHO, bOBl):\n KWmh = []\n with k8wH.progressbar(bOBl.iterrows(), label='Pulling site plans and geographic title data', length=len(bOBl)) as Csk6:\n for d6pt, rdlD in Csk6:\n KWmh.append(YKHO.map_property(rdlD['linc']))\n hvrl = quUU.GeoSeries([PvyL(Bc7X) for Bc7X in KWmh], inde... | [
"0.6760645",
"0.66406184",
"0.6611926",
"0.65941155",
"0.65144163",
"0.63927484",
"0.6314211",
"0.62846774",
"0.62605417",
"0.61809194",
"0.5986733",
"0.5974453",
"0.59539646",
"0.5952975",
"0.59197783",
"0.5875279",
"0.5856764",
"0.5832553",
"0.58124745",
"0.58063805",
"0.57... | 0.663567 | 2 |
Get index of left child | def uh7C(YRbF):
oeNL = YRbF + 1
ZgME = 2 * oeNL
DgkF = ZgME - 1
return DgkF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uI3T(YKHO):\n return 2 * YKHO.index + 1",
"def cdj0(YKHO, d6pt):\n return 2 * d6pt + 1",
"def cdj0(YKHO, d6pt):\n return 2 * d6pt",
"def uI3T(YKHO, _AKB):\n return 2 * _AKB + 1",
"def ixOR(or8S):\n return (or8S << 1) + 1",
"def cdj0(YKHO, oeNL):\n return 2 * oeNL",
"def zqXl(YKHO,... | [
"0.9122641",
"0.88522995",
"0.8762248",
"0.86230975",
"0.83617294",
"0.8189093",
"0.80934316",
"0.80934316",
"0.79510504",
"0.77594656",
"0.76739126",
"0.76264703",
"0.7587339",
"0.7570154",
"0.750047",
"0.7485209",
"0.74505705",
"0.74247074",
"0.72877926",
"0.7251152",
"0.72... | 0.75896484 | 12 |
Returns true if the queue is empty and false otherwise Must be O(1) | def FBfn(YKHO) -> bool:
if YKHO.num_items == 0:
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FBfn(YKHO):\n return YKHO.queue == []",
"def FBfn(YKHO):\n return len(YKHO.queue) == 0",
"def FBfn(YKHO):\n return len(YKHO.queue) == 0",
"def lsmZ(YKHO) -> bool:\n if YKHO.queue is not None and len(YKHO.queue) > 0:\n print('len > 0')\n return False\n else:\n print('le... | [
"0.88570523",
"0.87778527",
"0.87778527",
"0.8776103",
"0.87759084",
"0.8768391",
"0.86971426",
"0.8675233",
"0.8659355",
"0.8658433",
"0.8606875",
"0.8600865",
"0.85989565",
"0.8582111",
"0.8568123",
"0.8497459",
"0.84956324",
"0.8487618",
"0.8420514",
"0.8420514",
"0.832870... | 0.0 | -1 |
Checks if created data class is of the right class. | def W2Ut(YKHO, AeFH, A7Af):
nPrm = ZCQP(trUu(AeFH))
YKHO.assertIsInstance(nPrm, A7Af) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LCHE(YEnM):\n return hasattr(type(YEnM), '__dataclass_fields__')",
"def H7H1(YKHO) -> b0oR[Kt_s]:\n if wlj0(YKHO.constructor):\n if not isinstance(YKHO.obj, GySg):\n raise iiyI(GySg, YKHO.obj, YKHO.new_depth, YKHO.key)\n SGPK = tq_1.signature(YKHO.constructor).parameters\n ... | [
"0.73167884",
"0.70281214",
"0.697299",
"0.6734586",
"0.65639776",
"0.6543953",
"0.6501673",
"0.64816797",
"0.6398697",
"0.63877684",
"0.63857174",
"0.62964743",
"0.62771004",
"0.6239756",
"0.6161517",
"0.6121133",
"0.6119971",
"0.60966104",
"0.6038572",
"0.59667945",
"0.5946... | 0.0 | -1 |
(Computed) The etag of the IAM policy. | def ajCK(YKHO) -> str:
return qe4Y.get(YKHO, 'etag') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ajCK(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'etag')",
"def ajCK(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'etag')",
"def ajCK(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'etag')",
"def ajCK(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'etag')",
"def ajCK(YK... | [
"0.7073697",
"0.7073697",
"0.7073697",
"0.7073697",
"0.7073697",
"0.7073697",
"0.7073697",
"0.69740593",
"0.6932817",
"0.6932817",
"0.6932817",
"0.6932817",
"0.6932817",
"0.6932817",
"0.6932817",
"0.6932817",
"0.6932817",
"0.6932817",
"0.6932817",
"0.6932817",
"0.6932817",
... | 0.71071345 | 7 |
Backward computation of gradients. | def ZD5u(YKHO):
assert YKHO.cache is not None, 'Cannot backprop without forward first.'
JxU2, LVAh = YKHO.cache
v8j0 = JxU2 - LVAh
if YKHO.reduction == 'mean':
r8hN, bGrB = JxU2.shape
v8j0 /= r8hN
YKHO.cache = None
return v8j0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZD5u(YKHO, ICX2):\n pass",
"def ZD5u(YKHO, ICX2):\n pass",
"def ZD5u(YKHO, ICX2):\n raise NotImplementedError()",
"def ZD5u(YKHO, ICX2: Tensor) -> llWB:\n YKHO.b_grad = oyIN.sum(ICX2, axis=0)\n YKHO.w_grad = YKHO.inputs.T @ ICX2\n return ICX2 @ YKHO.w.T",
"def ZD5u(YKHO):\n ICX2 = ... | [
"0.82506675",
"0.82506675",
"0.82469416",
"0.8232206",
"0.80324847",
"0.80324847",
"0.78823906",
"0.7857436",
"0.78483355",
"0.78429383",
"0.77847767",
"0.7679982",
"0.76649225",
"0.7645512",
"0.7608589",
"0.7604201",
"0.759334",
"0.7587491",
"0.75818443",
"0.7530521",
"0.751... | 0.0 | -1 |
Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix inorder arguments and keyword arguments. | def FIMM(YKHO, *qIxc, **c_sp):
if qIxc or c_sp:
super(le2I, YKHO).__init__(*qIxc, **c_sp)
if YKHO.graspable_objects is None:
YKHO.graspable_objects = []
if YKHO.image is None:
YKHO.image = gXBl.msg.Image()
if YKHO.camera_info is None:
YKHO.camera_i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, *qIxc, **c_sp):\n if qIxc or c_sp:\n super(JwGr, YKHO).__init__(*qIxc, **c_sp)\n if YKHO.header is None:\n YKHO.header = kKAJ.msg.Header()\n if YKHO.cmd is None:\n YKHO.cmd = ''\n if YKHO.cat is None:\n YKHO.cat = ''\n else:\n ... | [
"0.77936506",
"0.7720004",
"0.7720004",
"0.76861507",
"0.76264745",
"0.756367",
"0.74394095",
"0.74168324",
"0.7351523",
"0.7307856",
"0.7280199",
"0.7237893",
"0.72272074",
"0.7223773",
"0.7223773",
"0.7218694",
"0.7211321",
"0.7211321",
"0.7211321",
"0.7211321",
"0.7211321"... | 0.0 | -1 |
Wrapper around k8s.load_and_create_resource to create a SageMaker resource | def mCwL(GM6f, kFeU, KUzT, ZxtR, _63S='default'):
aC0l, Cqok, Eorv = KsAw.load_and_create_resource(DNFZ, n8kU, uU0M, GM6f, kFeU, KUzT, ZxtR, _63S)
return (aC0l, Cqok, Eorv) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def msER(bSEa: str, Zu8l: str=None, **f4U5):\n cuiw = KfiN(Zu8l)\n return cuiw.resource(bSEa, **f4U5)",
"def msER():\n return mJn7.Resource(QRnd())",
"def msER():\n return mJn7.Resource(QRnd(), serializer=qqXR())",
"def msER():\n QEuY = mJn7.JSONRequestDeserializer()\n ZMzz = mJn7.JSONRespo... | [
"0.6695489",
"0.65566033",
"0.6527681",
"0.63303506",
"0.61349356",
"0.6096821",
"0.6095365",
"0.6082456",
"0.60742486",
"0.6072159",
"0.6070179",
"0.60697085",
"0.6067538",
"0.6065695",
"0.60196674",
"0.60108477",
"0.59737706",
"0.59575313",
"0.59364146",
"0.5927485",
"0.590... | 0.7768747 | 0 |
Wrapper around k8s.load_and_create_resource to create a Adopoted resource | def emte(ZxtR, _63S='default'):
aC0l, Cqok, Eorv = KsAw.load_and_create_resource(DNFZ, LOuE, uU0M, 'adoptedresources', ZxtR['ADOPTED_RESOURCE_NAME'], 'adopted_resource_base', ZxtR, _63S)
return (aC0l, Cqok, Eorv) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def msER(bSEa: str, Zu8l: str=None, **f4U5):\n cuiw = KfiN(Zu8l)\n return cuiw.resource(bSEa, **f4U5)",
"def mCwL(GM6f, kFeU, KUzT, ZxtR, _63S='default'):\n aC0l, Cqok, Eorv = KsAw.load_and_create_resource(DNFZ, n8kU, uU0M, GM6f, kFeU, KUzT, ZxtR, _63S)\n return (aC0l, Cqok, Eorv)",
"def eLpg(OaeV,... | [
"0.6452652",
"0.6253703",
"0.6171513",
"0.6096159",
"0.59922796",
"0.59912336",
"0.595014",
"0.58938444",
"0.5844623",
"0.5840295",
"0.58089936",
"0.57912517",
"0.57580245",
"0.5738343",
"0.573344",
"0.5730226",
"0.5724765",
"0.5722394",
"0.5716222",
"0.5712392",
"0.56978524"... | 0.71058977 | 0 |
Generate a name for a file using the description and channel | def gmXJ(qmWM, YwkQ, QoB4):
return 'bPLATE_w' + qmWM + '_' + QoB4 + '_c' + YwkQ + '.png' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K8y0(YKHO, qmWM, YwkQ, QoB4):\n return 'bPLATE_w' + qmWM + '_' + QoB4 + '_c' + YwkQ + '.png'",
"def gIsw(id, leAC, eJTR='src'):\n XjzA = Fv2L.template_source_file_name\n if eJTR == 'tst':\n XjzA = Fv2L.template_test_file_name\n return XjzA.format(id=id, title=leAC.replace('-', '_'))",
"d... | [
"0.75195915",
"0.7167804",
"0.71012443",
"0.70670754",
"0.69943404",
"0.67369324",
"0.6670187",
"0.66342044",
"0.66167426",
"0.6494215",
"0.64797497",
"0.6479064",
"0.6476831",
"0.64566636",
"0.6450938",
"0.64458376",
"0.6431859",
"0.6416797",
"0.6390564",
"0.63887256",
"0.63... | 0.80092597 | 0 |
Generate a name for a file using the description and channel | def K8y0(YKHO, qmWM, YwkQ, QoB4):
return 'bPLATE_w' + qmWM + '_' + QoB4 + '_c' + YwkQ + '.png' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gmXJ(qmWM, YwkQ, QoB4):\n return 'bPLATE_w' + qmWM + '_' + QoB4 + '_c' + YwkQ + '.png'",
"def gIsw(id, leAC, eJTR='src'):\n XjzA = Fv2L.template_source_file_name\n if eJTR == 'tst':\n XjzA = Fv2L.template_test_file_name\n return XjzA.format(id=id, title=leAC.replace('-', '_'))",
"def Jbe... | [
"0.80091065",
"0.7165928",
"0.7101471",
"0.7064337",
"0.69931364",
"0.67345184",
"0.6668517",
"0.66324764",
"0.66144115",
"0.64927953",
"0.6479",
"0.6476943",
"0.64755803",
"0.6454013",
"0.6448165",
"0.6447837",
"0.6430102",
"0.6413977",
"0.63882077",
"0.63864017",
"0.6377731... | 0.7519707 | 1 |
Generate a name for a file using the description and channel | def JbeN(YKHO, qmWM, YwkQ, QoB4):
return 'c' + YwkQ + '_w' + qmWM + '_' + QoB4 + '.png' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gmXJ(qmWM, YwkQ, QoB4):\n return 'bPLATE_w' + qmWM + '_' + QoB4 + '_c' + YwkQ + '.png'",
"def K8y0(YKHO, qmWM, YwkQ, QoB4):\n return 'bPLATE_w' + qmWM + '_' + QoB4 + '_c' + YwkQ + '.png'",
"def gIsw(id, leAC, eJTR='src'):\n XjzA = Fv2L.template_source_file_name\n if eJTR == 'tst':\n XjzA... | [
"0.80092597",
"0.75195915",
"0.7167804",
"0.70670754",
"0.69943404",
"0.67369324",
"0.6670187",
"0.66342044",
"0.66167426",
"0.6494215",
"0.64797497",
"0.6479064",
"0.6476831",
"0.64566636",
"0.6450938",
"0.64458376",
"0.6431859",
"0.6416797",
"0.6390564",
"0.63887256",
"0.63... | 0.71012443 | 3 |
Initializes network input shape | def hE9o(N0ky, xMux=3):
UrEU, eNs7 = N0ky
if nMvt.image_data_format() == 'channels_first':
GhuM = (xMux, UrEU, eNs7)
else:
GhuM = (UrEU, eNs7, xMux)
return GhuM | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, ROpF, ypOY=None):\n YKHO.output = fhcK.InputLayer(ROpF, input_var=ypOY)",
"def FIMM(YKHO, YYlS):\n YKHO.biases = [YKHO.randomArray(YRbF, 1) for YRbF in YYlS[1:]]\n YKHO.netSize = YYlS\n YKHO.weights = [YKHO.randomArray(YRbF, r845) for YRbF, r845 in zip(YYlS[:-1], YYlS[1:])]",
"def FI... | [
"0.7029771",
"0.7024046",
"0.6919055",
"0.68907285",
"0.68846923",
"0.68404883",
"0.6822069",
"0.6804236",
"0.6804236",
"0.6804236",
"0.67505586",
"0.66984344",
"0.66806984",
"0.666526",
"0.6639504",
"0.66085154",
"0.6592786",
"0.6583862",
"0.65691096",
"0.65449697",
"0.65282... | 0.0 | -1 |
Initializes network input shape and batch normalization axis | def ATwZ(N0ky):
UrEU, eNs7 = N0ky
if nMvt.image_data_format() == 'channels_first':
GhuM = (1, UrEU, eNs7)
z5f9 = 1
else:
GhuM = (UrEU, eNs7, 1)
z5f9 = 3
return (GhuM, z5f9) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, Zxma, Wc9F):\n YKHO.net = Zxma\n YKHO.train_batch_is(Wc9F)\n YKHO.image_height = len(Wc9F.image_array[0][0])\n YKHO.image_width = len(Wc9F.image_array[0][0][0])\n YKHO.net.reset_forward()",
"def SgVP(YKHO):\n ScPC = int((YKHO.specbinnum + YKHO.numfilters) / 2)\n eVVj = MTf8.la... | [
"0.726126",
"0.69356924",
"0.6871046",
"0.6827918",
"0.66717565",
"0.66414213",
"0.65312356",
"0.6525526",
"0.64984953",
"0.645438",
"0.64380443",
"0.63919",
"0.63639694",
"0.6353767",
"0.63438046",
"0.6335529",
"0.633095",
"0.6296713",
"0.62875813",
"0.628072",
"0.6252297",
... | 0.0 | -1 |
Adds "dropout" layer to model | def hr1G(sMyr, Zxma, LT6S):
return lARV(sMyr)(Zxma) if LT6S else Zxma | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MKgL(YKHO):\n return ZylS.keras.layers.Dropout(rate=YKHO.dropout)",
"def ycyx(YKHO, vHnr):\n return ZylS.nn.dropout(vHnr, YKHO.keep_prob)",
"def hr1G(ypOY=None):\n A90d = qKmE()\n A90d('batch_size', 20)\n A90d('n_epochs', 1000)\n A90d('learning_rate', 0.01)\n A90d('patience', 10000)\n ... | [
"0.8024405",
"0.7728018",
"0.74729925",
"0.72339785",
"0.71602124",
"0.6933945",
"0.69273853",
"0.6838031",
"0.6837817",
"0.682116",
"0.6715737",
"0.6679599",
"0.65281695",
"0.6525919",
"0.65130067",
"0.65084773",
"0.64376026",
"0.63970506",
"0.62666637",
"0.62647206",
"0.622... | 0.633441 | 18 |
Initializes training cost function | def Q9SX(JbyC):
fqnS = JbyC.learning_rate
H0zq = JbyC.momentum
WMj5 = fqnS / JbyC.epochs
if JbyC.optimizer == 'adam':
K0do = qhl4(lr=fqnS, decay=WMj5)
bo34.print_directly(JbyC, 'ADAM optimizer was configured')
else:
K0do = EW5f(lr=fqnS, momentum=H0zq, decay=WMj5, nesterov=Fal... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I1TV(YKHO):\n YKHO.cost = hkHB(0.0, 0.0)\n for _TKD in YKHO.task_ids.keys():\n YKHO.cost += YKHO.model.get_layer(_TKD + '-loss')\n y7GR = hCm3(YKHO.cost)\n YKHO.optimizer = y7GR.get_adagrad(YKHO.learning_rate)",
"def FIMM(YKHO, uiKt):\n super().__init__(uiKt)\n YKHO.support_for_bound... | [
"0.7631753",
"0.7487942",
"0.71219885",
"0.7037173",
"0.694103",
"0.6896091",
"0.6878694",
"0.68467164",
"0.6837462",
"0.6803369",
"0.6757318",
"0.6744617",
"0.6744267",
"0.67090356",
"0.66888",
"0.66572183",
"0.6620065",
"0.661703",
"0.66004735",
"0.6590226",
"0.6585318",
... | 0.0 | -1 |
Get maximum depth of given tree by BFS | def qi10(tk5Y):
if tk5Y is None:
return 0
gGq6 = g760.deque([tk5Y])
rb7a = 0
while gGq6:
aWCD = len(gGq6)
for YRbF in range(aWCD):
ZbOB = gGq6.popleft()
if ZbOB.left is not None:
gGq6.append(ZbOB.left)
if ZbOB.right is not None:... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sX7H(YKHO):\n qi10 = 0\n for Q6kx, nPrm in YKHO.traverse():\n qi10 = max(qi10, nPrm['level'])\n return qi10",
"def qi10(Q6kx):\n if not Q6kx:\n return 0\n return max(qi10(Q6kx.left), qi10(Q6kx.right)) + 1",
"def WLtg(Q6kx):\n if Q6kx is None:\n return 0\n else:\n ... | [
"0.7669001",
"0.7654562",
"0.7653014",
"0.7614319",
"0.7599487",
"0.74606186",
"0.74326384",
"0.73375744",
"0.7196552",
"0.718703",
"0.7182534",
"0.71651614",
"0.7148998",
"0.71120065",
"0.7107149",
"0.7074876",
"0.706041",
"0.7011375",
"0.6983949",
"0.6968935",
"0.6909913",
... | 0.7672864 | 0 |
Parse start date and time. | def hFBJ(YKHO, ZfUD):
Szcq = ZfUD.css('td[headers~=Date]::text').extract_first()
ivjg = ZbWC.sub('\\s+', ' ', Szcq).strip()
if not ivjg:
return None
try:
JRYC = qcWV.strptime(ivjg, '%b %d, %Y - %I:%M %p')
return {'date': JRYC.date(), 'time': JRYC.time(), 'note': ''}
except Va... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hFBJ(YKHO, mbyn):\n return qcWV.strptime(mbyn.title(), '%B %d, %Y')",
"def hFBJ(YKHO, geh0):\n mbyn = geh0.css('.date time::attr(datetime)').extract_first()\n jmHs = ''.join(geh0.css('article.time::text').extract()).strip()\n if not jmHs:\n jmHs = ''.join(geh0.css('article.time *::text').e... | [
"0.8012607",
"0.7956383",
"0.79541355",
"0.775254",
"0.7745357",
"0.7708766",
"0.7648467",
"0.7642984",
"0.754136",
"0.74821883",
"0.7399587",
"0.7093819",
"0.697785",
"0.69141096",
"0.6728942",
"0.65998924",
"0.6470897",
"0.6462791",
"0.6380753",
"0.634331",
"0.6262659",
"... | 0.7459805 | 10 |
Collate function that padds examples to the longest sequence in a batch. It is meant for training the question generation model. Used together with SQuAD2.0 dataset preprocesses with preprocess_dataset function. | def DBfl(JlfD):
xNFS = [[] for YRbF in range(3)]
for bySB in JlfD:
u54L = bySB[1].sum().item()
for YRbF, RDhP in enumerate(bySB):
xNFS[YRbF].append(RDhP[:u54L])
kdQn = []
for Wc9F in xNFS:
kdQn.append(gc7n(Wc9F, batch_first=True))
return kdQn | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QxcP(YKHO, Wc9F):\n Wc9F = list(map(ht2j.stack, zip(*Wc9F)))\n ZM6q = ht2j.max(ht2j.sum(Wc9F[1], 1)).item()\n for YRbF in range(len(Wc9F) - 1):\n if Wc9F[YRbF].size()[1] > ZM6q:\n Wc9F[YRbF] = Wc9F[YRbF][:, :ZM6q]\n if YKHO.truncate_label:\n Wc9F[-1] = Wc9F[-1][:, :ZM6q]\n ... | [
"0.7033074",
"0.6944575",
"0.67516834",
"0.6637126",
"0.65820885",
"0.65329534",
"0.6456716",
"0.6453996",
"0.629609",
"0.62111056",
"0.6209131",
"0.6203681",
"0.6183075",
"0.61593163",
"0.6139525",
"0.6039231",
"0.6031318",
"0.59539074",
"0.5948258",
"0.5943981",
"0.59365565... | 0.59552723 | 17 |
Init object to store step and trial data. | def vPDf(S11a):
nPrm = {Tu9p: {} for Tu9p in S11a}
return nPrm | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n YKHO._trials = []",
"def FIMM(YKHO):\n YKHO._env = None\n YKHO._steps = None\n YKHO._initialize()",
"def DbxN(YKHO, **B2fa):\n YKHO._d = {}\n YKHO._th = None\n YKHO._run = True\n YKHO.load()",
"def FIMM(YKHO):\n YKHO.step_list = [paSp.Raw()]",
"def FIMM(YKHO, gR... | [
"0.716681",
"0.70468086",
"0.6757133",
"0.6672487",
"0.66058046",
"0.6582223",
"0.653331",
"0.65125954",
"0.649741",
"0.64206564",
"0.63828874",
"0.6369628",
"0.6362635",
"0.6338107",
"0.6331931",
"0.6317953",
"0.6301544",
"0.6297562",
"0.62726104",
"0.62723035",
"0.6268866",... | 0.0 | -1 |
Return name of connectivity configuration. | def Av1G(Bzed):
eugN = [FLlb for FLlb, zF0X in Bzed.items() if zF0X]
eugN = ' + '.join(eugN)
return eugN | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mWFP(YKHO):\n return YKHO._config_name",
"def Ks8p(YKHO):\n pass",
"def mWFP(YKHO):\n return YKHO._config.get(BiEj)",
"def o0oP(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'connection_name')",
"def o0oP(YKHO) -> str:\n return qe4Y.get(YKHO, 'connection_name')",
"def Rpsx(YKHO) -... | [
"0.77077055",
"0.7493195",
"0.745413",
"0.72979784",
"0.7289367",
"0.7035228",
"0.6940678",
"0.685062",
"0.6848523",
"0.6846582",
"0.6830779",
"0.68089354",
"0.6791377",
"0.675848",
"0.67513496",
"0.67148095",
"0.66720396",
"0.6649063",
"0.66395855",
"0.6601104",
"0.6592569",... | 0.7347803 | 3 |
Return entropy of each HC state across village locations. | def WcDt(stJe, k1aY=None):
return BfDw.get_row_entropy(stJe.T, k1aY) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oqGu(YKHO):\n \"\"\"Gets the first neighbours, which are the first 2*r+1 cells.\"\"\"\n pYGr = []\n Z5kt = [0] * YKHO.k ** (2 * YKHO.r + 1)\n for YRbF in range(2 * YKHO.r + 1):\n pYGr.append(YKHO.config[YKHO.t, YRbF % YKHO.width])\n \"Calculates the rule and adds one to it's amount. It th... | [
"0.67780423",
"0.6692582",
"0.66096693",
"0.6583241",
"0.646438",
"0.6463834",
"0.64497703",
"0.643623",
"0.6350943",
"0.6336463",
"0.6297908",
"0.62889063",
"0.62844735",
"0.6246048",
"0.62386346",
"0.62371117",
"0.6227964",
"0.62140536",
"0.6190457",
"0.618255",
"0.6164896"... | 0.0 | -1 |
Start playing the room playlist | async def start(YKHO, OaeV):
if OaeV.guild is None:
await OaeV.reply('This command can only be used in a server, not in DMs.')
raise wQcs.CommandError('Invoker not in a guild.')
if OaeV.voice_client is None or OaeV.voice_client.channel is None:
await OaeV.reply(f'I am not in a voice chan... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yKcO(YKHO):\n GfDA.logger.info('Started playing new playlist')\n MgeT = Esm4(target=YKHO.run, args=())\n MgeT.daemon = True\n YKHO.thread = MgeT\n MgeT.start()",
"def gXbf(YKHO):\n YKHO.stop()\n DZlR = True\n if YKHO.playlist:\n if YKHO.mode == YKHO.MODES['LIST']:\n ... | [
"0.74985003",
"0.69871664",
"0.6981441",
"0.68703204",
"0.67883384",
"0.67791086",
"0.67515475",
"0.67425054",
"0.66611314",
"0.6573882",
"0.6475358",
"0.6315773",
"0.6276613",
"0.62280256",
"0.6226545",
"0.6223181",
"0.6217674",
"0.61872447",
"0.6159366",
"0.613671",
"0.6131... | 0.66087157 | 9 |
This funtion is to get the dataframe of yield to maturity and discount rate value. | def iwfp(YKHO):
i7iM = v5eu.get_ytm_dict(YKHO)
nPrm = rLdf.DataFrame()
for YRbF in i7iM.keys():
nPrm.loc[YRbF / 2, 'Yield to maturity'] = i7iM[YRbF]
nPrm.loc[YRbF / 2, 'discount_rate'] = v5eu.P_Tn(YKHO, i7iM[YRbF], YRbF)
return nPrm | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lbFO(VOlW: str, e94k: str) -> rLdf.DataFrame:\n k9Gu = {'d': 'daily', 'w': 'weekly', 'm': 'monthly'}\n DUTb = {'3m': '3month', '5y': '5year', '10y': '10year', '30y': '30year'}\n bD7m = f'https://www.alphavantage.co/query?function=TREASURY_YIELD&interval={k9Gu[VOlW]}&ma'\n bD7m += f'turity={DUTb[e94... | [
"0.6506243",
"0.61616105",
"0.5973585",
"0.59033316",
"0.57318133",
"0.5705728",
"0.568607",
"0.56644547",
"0.5616574",
"0.55478776",
"0.55426395",
"0.5541117",
"0.5517417",
"0.55045354",
"0.55006254",
"0.5484498",
"0.54590946",
"0.54367566",
"0.5420372",
"0.53916895",
"0.539... | 0.6999018 | 0 |
Create logger. Output to file and console. | def FIMM(YKHO, AIzt='logfile.log'):
NdjM = G9jH.Formatter('%(message)s', datefmt='%Y-%m-%d %H:%M:%S')
mjTi = G9jH.FileHandler(filename=AIzt)
mjTi.setFormatter(NdjM)
mjTi.setLevel(G9jH.INFO)
YKHO.fileHandler = mjTi
s9I8 = G9jH.Formatter('%(message)s')
rPbp = G9jH.StreamHandler()
rPbp.setF... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lmAE():\n global logger\n bo34 = G9jH.getLogger(E70h)\n uaPq = G9jH.Formatter(fmt='%(asctime)s %(levelname)s %(message)s')\n DCgT = G9jH.StreamHandler()\n DCgT.setFormatter(uaPq)\n bo34.addHandler(DCgT)\n return bo34",
"def lmAE():\n G9jH.basicConfig(level=G9jH.INFO, filename='logging... | [
"0.7532494",
"0.742732",
"0.7345848",
"0.73430514",
"0.7258522",
"0.7255411",
"0.72414166",
"0.7216692",
"0.72023225",
"0.71971697",
"0.71704555",
"0.7163259",
"0.71248853",
"0.71200293",
"0.7105047",
"0.70947397",
"0.70875716",
"0.70841235",
"0.7044458",
"0.70319575",
"0.699... | 0.0 | -1 |
test that a 'unauthorized' response (http 401) is returned when doing a request with an incorrect api key | def DKoR(d8pA, pmON):
d8pA.headers.update({'api-key': 'wrong key'})
NArs = {E6Er: TuoA.stockholm}
Wuc_ = G4JS.codes.unauthorized
try:
w7_W(d8pA, NArs, Wuc_)
finally:
d8pA.headers.update(lfdS.test_resources.settings.headers_stream) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NeLG(YKHO):\n with YKHO.subTest('Missing API key'):\n geh0 = YKHO.client.get(YKHO.url, HTTP_AUTHORIZATION=f'ApiKey {YKHO.web_user.username}:')\n YKHO.assertEqual(geh0.status_code, 401)\n with YKHO.subTest('Missing username'):\n geh0 = YKHO.client.get(YKHO.url, HTTP_AUTHORIZATION=f'Ap... | [
"0.82850015",
"0.8072468",
"0.8039055",
"0.8037536",
"0.79810125",
"0.796687",
"0.79512525",
"0.79512525",
"0.7869238",
"0.7855653",
"0.7835723",
"0.7777454",
"0.7749252",
"0.76528376",
"0.76375806",
"0.7606968",
"0.7559815",
"0.75589436",
"0.7528576",
"0.7527643",
"0.7497882... | 0.7447739 | 24 |
test that a 'bad request' response (http 400) is returned when doing a request without date parameter | def MOJi(d8pA, type, BWXx):
w7_W(d8pA, params={type: BWXx}, expected_http_code=G4JS.codes.bad_request) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wwvT(YKHO):\n YKHO.register_user()\n Aofo = YKHO.login_user()\n NT__ = qQXR.loads(Aofo.data.decode())['access_token']\n Ylbp = YKHO.client().post('/expenses/', headers=dict(Authorization='Bearer ' + NT__), data=YKHO.expense)\n YKHO.assertEqual(Ylbp.status_code, 201)\n im04 = YKHO.client().pos... | [
"0.77888143",
"0.7680683",
"0.757144",
"0.75589854",
"0.7493942",
"0.74357533",
"0.7431725",
"0.74137115",
"0.73940873",
"0.7284682",
"0.72209555",
"0.7100021",
"0.7095673",
"0.7079107",
"0.7077526",
"0.7027701",
"0.7026709",
"0.7008976",
"0.6985253",
"0.6983918",
"0.6933023"... | 0.69333655 | 20 |
Test create maze gets type error with noninteger. | def LqJ0(YKHO):
try:
bGrB = gHhh('I am not an integer', 4)
YKHO.assertEqual(True, False, 'should not have got here: maze created with non-integer index.')
except TypeError:
YKHO.assertEqual(True, True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cvhd(YKHO):\n TxAA = gHhh(4, 4)\n YKHO.assertEqual(TxAA.row_count, 4)\n YKHO.assertEqual(TxAA.col_count, 4)\n YKHO.assertEqual(TxAA.size, 16)\n YKHO.assertTrue(isinstance(TxAA.entrance, list))\n YKHO.assertTrue(isinstance(TxAA.exit, list))",
"def QBPZ(YKHO):\n pass",
"def QBPZ(YKHO):\n... | [
"0.7993788",
"0.72578806",
"0.72363365",
"0.7099285",
"0.7063041",
"0.6861209",
"0.68212044",
"0.65768915",
"0.6436121",
"0.63770556",
"0.6309218",
"0.608427",
"0.6020378",
"0.5984016",
"0.5975598",
"0.5941816",
"0.58987296",
"0.58849007",
"0.5789791",
"0.57807946",
"0.576970... | 0.8117515 | 0 |
Test that a maze exit can be can be found at creation using private method __verify_exit_path. | def Ebym(YKHO):
TxAA = gHhh(100, 100)
YKHO.assertTrue(TxAA._Maze__verify_exit_path()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QBPZ(YKHO):\n pass",
"def QBPZ(YKHO):\n pass",
"def S2n4(YKHO):\n TxAA = gHhh(100, 100)\n rdlD, fvDH = TxAA.exit\n if TxAA.grid[rdlD][fvDH].up:\n TxAA.grid[rdlD][fvDH].up.down = None\n if TxAA.grid[rdlD][fvDH].right:\n TxAA.grid[rdlD][fvDH].right.left = None\n if TxAA.gri... | [
"0.7718954",
"0.7711811",
"0.7170441",
"0.6457077",
"0.64257324",
"0.63298804",
"0.6325129",
"0.6186493",
"0.6110823",
"0.60940695",
"0.6087242",
"0.5893084",
"0.58477277",
"0.57537746",
"0.56882125",
"0.56534946",
"0.5650642",
"0.5640697",
"0.56240755",
"0.56226784",
"0.5569... | 0.7800023 | 0 |
Test that a maze cannot be exited when rooms adjacent to the exit have their pointers set to None. | def S2n4(YKHO):
TxAA = gHhh(100, 100)
rdlD, fvDH = TxAA.exit
if TxAA.grid[rdlD][fvDH].up:
TxAA.grid[rdlD][fvDH].up.down = None
if TxAA.grid[rdlD][fvDH].right:
TxAA.grid[rdlD][fvDH].right.left = None
if TxAA.grid[rdlD][fvDH].down:
TxAA.grid[rdlD][fvDH].down.up = None
if Tx... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WVgN(YKHO):\n TxAA = gHhh(100, 100)\n rdlD, fvDH = TxAA.entrance\n TxAA.grid[rdlD][fvDH].up = None\n TxAA.grid[rdlD][fvDH].right = None\n TxAA.grid[rdlD][fvDH].down = None\n TxAA.grid[rdlD][fvDH].left = None\n YKHO.assertFalse(TxAA.can_reach_exit([rdlD, fvDH]))",
"def LdSm(YKHO):\n Tx... | [
"0.84921086",
"0.7337513",
"0.7119611",
"0.6680111",
"0.6654044",
"0.6379823",
"0.62804466",
"0.61869204",
"0.61617595",
"0.61408913",
"0.6139881",
"0.61133355",
"0.6019866",
"0.5997094",
"0.5945427",
"0.593739",
"0.5920975",
"0.5908153",
"0.5904515",
"0.59022844",
"0.5888381... | 0.86979586 | 0 |
Analytic expression for the normalized inverse cumulative mass function. The argument ms is normalized mass fraction [0,1] | def cx9B(YKHO, NmYP):
return YKHO._pot.a * XTiz.sqrt(NmYP) / (1 - XTiz.sqrt(NmYP)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bMbF(xDcj, i8WE):\n r8hN = len(xDcj)\n QK3j = oyIN.mean(xDcj)\n jzxz = oyIN.std(xDcj)\n JBMS, M1Jx = V4dC(i8WE, r8hN)\n BJ1H = ZzTb(xDcj, i8WE)\n return 2 * r8hN * (1 - (BJ1H - r8hN * JBMS * QK3j) / (r8hN * M1Jx * jzxz))",
"def NkkI(EcVT, r8hN, KCHu):\n return (EcVT - r8hN) / KCHu",
"d... | [
"0.6188651",
"0.61184984",
"0.6113977",
"0.6110041",
"0.60532564",
"0.60418516",
"0.6002625",
"0.59949887",
"0.59357876",
"0.5919308",
"0.5904984",
"0.5893741",
"0.5891592",
"0.5873965",
"0.58559597",
"0.5819413",
"0.58134836",
"0.5808183",
"0.5798541",
"0.57581913",
"0.57415... | 0.68552166 | 0 |
Returns Key instance of the Profile which corresponds to the Role which is represented by the specified Key. | def EMqA(H5ew, EmYE):
LEXu = NCls.get(H5ew)
z39Z = TKMx(LEXu, EmYE)
return z39Z.key() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mexE(YKHO, LmAn):\n for H5ew, h1Ur in YKHO.assignable_roles[0].items():\n if h1Ur == LmAn.name:\n return H5ew",
"def mexE(YKHO, H5ew):\n U5bT = None\n N3k4 = H5ew.__qualname__\n U5bT = YKHO.get(N3k4)\n if not U5bT:\n for G1Hx in YKHO:\n if G1Hx.__qualname__ ... | [
"0.66111445",
"0.58805066",
"0.58505315",
"0.5831204",
"0.5803281",
"0.5803281",
"0.57678306",
"0.5754127",
"0.56673247",
"0.56673247",
"0.5639647",
"0.5624423",
"0.56116235",
"0.56116235",
"0.56116235",
"0.56116235",
"0.56116235",
"0.56116235",
"0.56116235",
"0.56116235",
"0... | 0.828253 | 0 |
Function to concatenate dictionaries | def cNIG(fgcx):
if fgcx is None:
return
OJ81 = {G1Hx: Ty9i for lWPh in fgcx for G1Hx, Ty9i in lWPh.items()}
return OJ81 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xq_t(ydgu, pZWG):\n pass",
"def X_GB(YKHO, WbPA, S69B):\n Aofo = dict()\n for H5ew, BWXx in WbPA.items():\n if len(BWXx.shape) == 1:\n Aofo[H5ew] = oyIN.concatenate([BWXx, S69B[H5ew]])\n else:\n Aofo[H5ew] = oyIN.vstack([BWXx, S69B[H5ew]])\n return Aofo",
"de... | [
"0.78326815",
"0.76263916",
"0.7547149",
"0.7144526",
"0.7144526",
"0.7033631",
"0.70007455",
"0.6978834",
"0.68688685",
"0.67944866",
"0.6774909",
"0.67653054",
"0.6748235",
"0.6728825",
"0.67226535",
"0.6719533",
"0.6710105",
"0.6710105",
"0.6710105",
"0.6700148",
"0.669384... | 0.71008927 | 5 |
MPI wrapper for maxvar and vcmt computation | def kSLC(nXR3, NArs, dUBY):
RKD7.info('Calculating the temporal variance-covariance matrix')
Nbtd = LYgl.array_split(range(len(nXR3)))
def _XZC(a10a):
"""
Get RDIst class object
"""
pIm5 = qjGu(a10a)
pIm5.open()
qFlk = GVQD.RDist(pIm5)()
pIm5.close()
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def t8OU(Q6kx):\n if Q6kx.op == Kt_s._max_and_argmax:\n if len(Q6kx.outputs[1].clients) == 0:\n if Q6kx.inputs[1].data is None:\n jDK_ = None\n else:\n try:\n jDK_ = WzHt(Q6kx.inputs[1])\n except lyoX:\n ... | [
"0.6341681",
"0.61969894",
"0.6065083",
"0.60228604",
"0.60162735",
"0.596405",
"0.5831983",
"0.58185774",
"0.57805014",
"0.57521695",
"0.57240343",
"0.57173043",
"0.56774616",
"0.5617856",
"0.5602376",
"0.5560389",
"0.55562276",
"0.5540691",
"0.5516906",
"0.549255",
"0.54219... | 0.80074286 | 0 |
dropping table at the end of all tests | def PkTX(Emd4):
Emd4.database_connection.connect()
Emd4.database_connection.clear_table('DROP TABLE ' + GTA_)
Emd4.database_connection.close() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tBIc(YKHO):\n YKHO.database.truncate_all_tables()",
"def tBIc(YKHO):\n L682()\n GBS5()",
"def tBIc(YKHO):\n with P4t4.app_context():\n NCls = P4t4.db.get_db()\n DpUl = NCls.cursor()\n with P4t4.open_resource('sql/drop_tests.sql', mode='r') as eHNT:\n DpUl.execute... | [
"0.7847522",
"0.77294594",
"0.76650023",
"0.76413673",
"0.76413673",
"0.76196283",
"0.7617512",
"0.7613479",
"0.7605289",
"0.7605084",
"0.7603006",
"0.7583381",
"0.7562543",
"0.7504366",
"0.7504366",
"0.7504366",
"0.7504366",
"0.7504366",
"0.7504366",
"0.7504366",
"0.7504366"... | 0.738027 | 35 |
Set the nth diagonal of a symmetric 2D numpy array to a fixed value. Operates in place. | def eaOj(vb7U, A2lD=0, wEf2=0):
r8hN = vb7U.shape[0]
YPaw = r8hN + 1
yKcO = A2lD
Os4s = r8hN ** 2 - A2lD * r8hN
vb7U.flat[yKcO:Os4s:YPaw] = wEf2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DgG_(YKHO, BWXx=0):\n for Csk6 in range(YKHO.size):\n YKHO.write(Csk6, Csk6, BWXx)",
"def SWVT(E3D9, Csk6, or8S=0):\n exwG, r8hN = dkYO(E3D9)\n if or8S >= 0:\n for YRbF, CG54 in enumerate(Csk6):\n E3D9[YRbF][YRbF + or8S] = CG54\n else:\n for YRbF, CG54 in enumerate... | [
"0.7125442",
"0.69381803",
"0.66931725",
"0.6662349",
"0.6404038",
"0.6235831",
"0.6171781",
"0.6152024",
"0.60630727",
"0.5889371",
"0.57974076",
"0.5756528",
"0.57523865",
"0.5675084",
"0.5653157",
"0.5643824",
"0.55920154",
"0.5581051",
"0.55746204",
"0.5569762",
"0.554835... | 0.6709417 | 2 |
Trim an upper triangle sparse matrix so that only the first n diagonals are kept. | def yBsf(vb7U, exwG):
if H4yH.issparse(vb7U):
if vb7U.format != 'csr':
raise ValueError('input type must be scipy.sparse.csr_matrix')
HbfQ = H4yH.tril(vb7U, exwG, format='csr')
HbfQ = H4yH.triu(HbfQ, format='csr')
else:
HbfQ = vb7U.copy()
iyXo = HbfQ.shape[0]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZlZC(SppC, iQG7, gYjf):\n if iQG7 == -1:\n rdlD = SppC[0,]\n else:\n rdlD = SppC[SppC.shape[0] - 1,]\n XPtU = oyIN.argmin(rdlD)\n cqTK = oyIN.argmin(rdlD[::-1])\n if XPtU > gYjf:\n SppC = SppC[:, XPtU - gYjf:]\n if cqTK > gYjf:\n SppC = SppC[:, 0:len(rdlD) - (cqTK ... | [
"0.64127666",
"0.58649224",
"0.57881296",
"0.5781573",
"0.5728801",
"0.57002896",
"0.5696073",
"0.568997",
"0.5671774",
"0.566362",
"0.566362",
"0.566362",
"0.56233585",
"0.5622041",
"0.5614353",
"0.55710584",
"0.55435014",
"0.5482823",
"0.5455417",
"0.54416484",
"0.54353005"... | 0.7814169 | 0 |
Returns lists of detectable indices after excluding low interacting bins based on the proportion of zero pixel values in the matrix bins. | def sEf3(vb7U, vGM4=3, C7_8=False):
SppC = vb7U.copy()
SppC.eliminate_zeros()
def XNqj(WKvO):
return KG9w.median_abs_deviation(WKvO, nan_policy='omit')
if not C7_8:
if SppC.shape[0] != SppC.shape[1]:
raise ValueError('Intrachromosomal matrices must be symmetric.')
Sp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W4FM(YKHO):\n _0VL = []\n for d6pt, ZfUD in enumerate(YKHO):\n if ZfUD == 0:\n _0VL.append(d6pt)\n return _0VL",
"def bb91(qw7D):\n fuOf = oyIN.argwhere(qw7D != 0)\n return fuOf",
"def RF0p(kAtl, L4yN, DV23, eG1U, ekkD):\n TRVV = kAtl.r.midpoints[L4yN].m_as('m')\n HGC... | [
"0.6325455",
"0.63100487",
"0.6245059",
"0.6240828",
"0.62382156",
"0.622966",
"0.6220698",
"0.62201536",
"0.6188076",
"0.6029027",
"0.59354",
"0.5917809",
"0.59095675",
"0.5891025",
"0.5851099",
"0.58345515",
"0.5804097",
"0.5793994",
"0.5785157",
"0.5784481",
"0.5775276",
... | 0.57897145 | 18 |
Compute the sum of matrices bins (i.e. rows or columns) using only the upper triangle, assuming symmetrical matrices. | def C2iH(vb7U):
return vb7U.sum(axis=0).A1 + vb7U.sum(axis=1).A1 - vb7U.diagonal(0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NDvt(YRbF, x6sh, Pyrc, Nq1b, xCbR):\n KCHu = Nq1b[YRbF][YRbF] * xCbR[YRbF] * xCbR[YRbF]\n for r845 in range(Pyrc[x6sh], Pyrc[x6sh + 1]):\n if YRbF != r845:\n KCHu += (Nq1b[YRbF][r845] + Nq1b[r845][YRbF]) * xCbR[YRbF] * xCbR[r845]\n return KCHu",
"def vFRP(YRbF, Pyrc, Nq1b, xCbR):\n... | [
"0.7041019",
"0.6156732",
"0.6129798",
"0.5976102",
"0.59643245",
"0.5771837",
"0.57445884",
"0.5654173",
"0.5501301",
"0.5317589",
"0.5288595",
"0.52820784",
"0.5261982",
"0.5255658",
"0.52305037",
"0.5229471",
"0.52255195",
"0.5207664",
"0.5206341",
"0.5196019",
"0.5180939"... | 0.7172675 | 0 |
Adds margin of zeros around an input sparse matrix. | def XKhs(vb7U, dVLj, mgNY, FMLJ='coo'):
vg0C, gAeH = vb7U.shape
Df88 = vb7U.copy()
is0L = H4yH.csr_matrix((vg0C, dVLj), dtype=vb7U.dtype)
T2PH = H4yH.csr_matrix((mgNY, gAeH + 2 * dVLj), dtype=vb7U.dtype)
Df88 = H4yH.hstack([is0L, Df88, is0L], format='csr')
Df88 = H4yH.vstack([T2PH, Df88, T2PH], ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hq5y(YKHO, EcVT, MVIL):\n eYrV = oyIN.zeros((EcVT.shape[0] + 2 * MVIL, EcVT.shape[1] + 2 * MVIL, EcVT.shape[2]))\n GWxz = MVIL\n JCr6 = MVIL\n eYrV[GWxz:EcVT.shape[0] + GWxz, JCr6:EcVT.shape[1] + JCr6, :] = EcVT\n return eYrV",
"def mWe7(BsUr, vPDw, U_fJ):\n\n class OffsetSparseMatrixClass(... | [
"0.6846492",
"0.6157045",
"0.6157045",
"0.6109819",
"0.59839016",
"0.59775317",
"0.59726745",
"0.59028137",
"0.5901642",
"0.5830433",
"0.57942516",
"0.57754564",
"0.5743076",
"0.57350683",
"0.57294387",
"0.57047725",
"0.5701384",
"0.5644425",
"0.5624889",
"0.56114304",
"0.560... | 0.7736398 | 0 |
Given an array of valid indices, return the corrsesponding array of missing indices. | def snCE(deVW, zNig):
v3uw = oyIN.ones(zNig, dtype=bool)
try:
v3uw[deVW] = False
except IndexError:
pass
v3uw = oyIN.flatnonzero(v3uw)
return v3uw | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QD3Q(ZHfW):\n return oyIN.nonzero(oyIN.ravel(ZHfW - 1, order='C'))[0]",
"def R_rt(*cRc2: Tensor) -> llWB:\n if len(cRc2) == 0:\n raise ValueError('Must pass at least one tensor as argument')\n qBwg = cRc2[0]\n mrTw = ht2j.zeros(len(qBwg), dtype=ht2j.bool, device=qBwg.device)\n for vhpA ... | [
"0.6300259",
"0.6108775",
"0.6091231",
"0.60477185",
"0.6002121",
"0.5978218",
"0.59119964",
"0.58613497",
"0.58460724",
"0.5842929",
"0.57560515",
"0.5704897",
"0.5615569",
"0.55952543",
"0.55720913",
"0.55479383",
"0.5543988",
"0.55328596",
"0.5526036",
"0.55213183",
"0.547... | 0.610664 | 2 |
r"""Close file when EOF to be sent. | def YuSz(YKHO):
I1mm, xNv0 = super(P0Xg, YKHO).on_send_eof()
try:
YKHO.fd.flush()
except (AttributeError, ValueError):
if YKHO.is_open:
raise
return (I1mm, xNv0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R8ZP(YKHO):\n YKHO.fd.close()\n return 1",
"def HuIG(YKHO):\n YKHO.fh.close()",
"def DDI8(YKHO):\n if YKHO._buffer:\n YKHO.flush()\n YKHO._handle.write(o31x)\n YKHO._handle.flush()\n YKHO._handle.close()",
"def A4l5(YKHO):\n YKHO._outputFile.close()",
"def DDI8(YKHO):\n ... | [
"0.7616852",
"0.70272315",
"0.6968532",
"0.69370455",
"0.6904911",
"0.6900146",
"0.6881973",
"0.6857646",
"0.6857646",
"0.6731838",
"0.67068696",
"0.6695717",
"0.6672172",
"0.66496336",
"0.66146374",
"0.66146374",
"0.6599462",
"0.6599462",
"0.65962714",
"0.6594169",
"0.658688... | 0.6309329 | 39 |
Helper function for printing just one element in an array. All parameters except `idx` are the same as for `print`. Returns an identity operation on `x`, so that it can be used as follows >>> x = shim.tensor(np.arange(100, 0.1)) >>> x = shim.print_array(x, idx=3) | def zIOh(WKvO, or8S=slice(None), Ol8d=None, RPn1='SHIM - ', nUeQ=HwRy.stdout):
return VSUj(WKvO[or8S], print(WKvO[or8S], message=Ol8d, message_prefix=RPn1, file=nUeQ)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def G7TK(fHgE):\n try:\n WKvO = fHgE.tolist()\n except (TypeError, NotImplementedError):\n WKvO = fHgE.tobytes()\n if isinstance(fHgE, gyIm):\n vgXP = fHgE.offset\n JbyC = fHgE.flags\n else:\n vgXP = 'unknown'\n JbyC = 'unknown'\n print(\"ndarray(%s, shape=%... | [
"0.60525095",
"0.601079",
"0.5855006",
"0.575493",
"0.5318782",
"0.52099293",
"0.5171336",
"0.5115472",
"0.50951475",
"0.50903505",
"0.50739056",
"0.5069581",
"0.49996632",
"0.49829748",
"0.4963213",
"0.49431276",
"0.49431276",
"0.49431276",
"0.49431276",
"0.4938878",
"0.4933... | 0.77429724 | 0 |
Return True if `var` is sparse with `scipy.sparse` interface. True for scipy.sparse, theano.sparse. | def Jh2m(SRYB):
if 'theano.sparse' in HwRy.modules:
return H4yH.sparse.issparse(SRYB) or isinstance(SRYB, HwRy.modules['theano.sparse'].basic.SparseVariable)
else:
return H4yH.sparse.issparse(SRYB) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qEOb(WKvO: Any, DDLl=None) -> bool:\n yR_P = JEuV(DDLl)\n return yR_P.is_sparse(WKvO)",
"def KN5h(SRYB):\n if 'theano.sparse' in HwRy.modules:\n return H4yH.sparse.issparse(SRYB) or isinstance(SRYB, HwRy.modules['theano.sparse'].basic.SparseVariable)\n else:\n return H4yH.sparse.iss... | [
"0.73790324",
"0.72182786",
"0.7192387",
"0.71083176",
"0.706764",
"0.65949607",
"0.6314302",
"0.62896657",
"0.62845683",
"0.6133798",
"0.6107449",
"0.6087067",
"0.6074301",
"0.6030176",
"0.60223293",
"0.5920868",
"0.585102",
"0.5810927",
"0.57268214",
"0.57231104",
"0.570871... | 0.86598843 | 0 |
For Numpy arrays, an axis is broadcastable iff it has length one. | def liuk(YKHO):
return tuple((KCHu == 1 for KCHu in YKHO.shape)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jKKV(ezWE):\n if oyIN.ndim(ezWE) != 1:\n return False\n if len(ezWE) == 0:\n return True\n if oyIN.any(oyIN.vectorize(oyIN.ndim)(ezWE)):\n return False\n return True",
"def KP2Q():\n QOe9((1, 2, 3))\n QOe9((2, 1, 3))\n QOe9((2, 3, 1))\n wY1Q((1, 2, 3))\n wY1Q((... | [
"0.67279613",
"0.65214336",
"0.64793956",
"0.6454583",
"0.6402333",
"0.63785535",
"0.6363917",
"0.6327987",
"0.62992084",
"0.6255868",
"0.6253109",
"0.61367655",
"0.61352086",
"0.61097795",
"0.6078569",
"0.60693306",
"0.5999976",
"0.59963834",
"0.59572417",
"0.593746",
"0.586... | 0.6370583 | 6 |
All parameters except `array_shape` are the same as for np.pad. `array_shape` is necessary because while we can deal with a Theano array, we need to know its shape. | def hVLt(qw7D, b13I, GUum, Tuqy='constant', **B2fa):
if Tuqy not in ['constant']:
raise ValueError("theano_shim does not support mode '{}'".format(Tuqy))
if not DezQ(qw7D):
assert qw7D.shape == b13I
return oyIN.pad(qw7D, GUum, Tuqy, **B2fa)
elif oUs4(qw7D):
assert qw7D.get_va... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hVLt(ezWE, u5Om, XTLp=0):\n ElYN = ezWE.shape\n hHtn = ()\n for tpio in range(len(ElYN)):\n yk4i = u5Om[tpio] - ElYN[tpio]\n if yk4i > 0:\n h3Aq = int(yk4i / 2)\n DOuq = yk4i - h3Aq\n else:\n h3Aq = 0\n DOuq = 0\n hHtn += ((h3Aq, ... | [
"0.72683674",
"0.69279623",
"0.6815563",
"0.6631931",
"0.6603894",
"0.6579442",
"0.65710515",
"0.6466191",
"0.646429",
"0.6456382",
"0.63967574",
"0.6391941",
"0.630208",
"0.6301449",
"0.62548065",
"0.6236044",
"0.6222941",
"0.61766315",
"0.61551076",
"0.61501074",
"0.6145136... | 0.774596 | 0 |
Location of the OCSP responder for this certificate. Will be one of the | def gAX0(YKHO):
if YKHO._authority_information_access is None:
return None
for LLmd in YKHO._authority_information_access:
if LLmd['access_method'].native == 'ocsp' and LLmd['access_location'].name == 'uniform_resource_identifier':
return LLmd['access_location'].chosen.native
ret... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jK7F(YKHO, pXz7):\n try:\n bD7m, o7ve = gnPz.run_script(['openssl', 'x509', '-in', pXz7, '-noout', '-ocsp_uri'], log=bo34.debug)\n except UAju.SubprocessError:\n bo34.info('Cannot extract OCSP URI from %s', pXz7)\n return (None, None)\n bD7m = bD7m.rstrip()\n KcEq = bD7m.partit... | [
"0.6131117",
"0.5615289",
"0.5481226",
"0.52892077",
"0.5258419",
"0.5220536",
"0.51888037",
"0.51888037",
"0.510542",
"0.50266665",
"0.5012942",
"0.49867067",
"0.49449998",
"0.49422258",
"0.49315235",
"0.49149665",
"0.49149665",
"0.48778692",
"0.48690465",
"0.48679858",
"0.4... | 0.61559165 | 0 |
Tokenize data file and turn into tokenids using given vocabulary file. This function loads data linebyline from data_path, calls the above sentence_to_token_ids, and saves the result to target_path. See comment for sentence_to_token_ids on the details of tokenids format. | def luxy(i0XC, lQDD, GEQi, b0j5=None, ocBH=True):
if not qJi5.Exists(lQDD):
print('Tokenizing data in %s' % i0XC)
CtWL, bGrB = Nhuv.initialize_vocabulary(GEQi)
with qJi5.GFile(i0XC, mode='rb') as KAfx:
with qJi5.GFile(lQDD, mode='w') as lSVr:
ewCu = 0
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def luxy(i0XC, lQDD, GEQi):\n if not qJi5.Exists(lQDD):\n print('Tokenizing data in %s' % i0XC)\n CtWL, bGrB = pGdo(GEQi)\n with qJi5.GFile(i0XC, mode='rb') as KAfx:\n with qJi5.GFile(lQDD, mode='w') as lSVr:\n ewCu = 0\n for zFiD in KAfx:\n ... | [
"0.88158065",
"0.8449106",
"0.83855826",
"0.8366422",
"0.82797813",
"0.8102873",
"0.7367587",
"0.726734",
"0.7234463",
"0.7134788",
"0.7093858",
"0.70898783",
"0.70898783",
"0.70594037",
"0.7039706",
"0.6949376",
"0.6746222",
"0.67304814",
"0.6648989",
"0.6558965",
"0.6438027... | 0.8453001 | 1 |
Compute the average precision of a ranked list against some ground truth | def uSAa(BCk_, z3LN, plQg=None):
wjRY, zAcA = (0.0, 0.0)
for G1Hx, o3Uj in enumerate(BCk_[:plQg], 1):
if o3Uj in z3LN:
zAcA += 1
wjRY += zAcA / G1Hx
return wjRY / zAcA if wjRY > 0 else 0.0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhd_(yLaY, o3Uj):\n yLaY = dDv2(yLaY)\n o3Uj = dDv2(o3Uj)\n Rrc1 = gN_D(o3Uj, yLaY) / float(len(o3Uj))\n assert 0 <= Rrc1 <= 1\n return Rrc1",
"def uSAa(Mkmy):\n Mkmy = oyIN.asarray(Mkmy) != 0\n yvT9 = [sEak(Mkmy, G1Hx + 1) for G1Hx in range(Mkmy.size) if Mkmy[G1Hx]]\n if not yvT9:\n ... | [
"0.7208344",
"0.7128738",
"0.70493734",
"0.70493734",
"0.69964546",
"0.69185257",
"0.6745876",
"0.6717349",
"0.6709977",
"0.670711",
"0.66209596",
"0.66137177",
"0.65935045",
"0.65935045",
"0.6568909",
"0.6563142",
"0.65568525",
"0.6533323",
"0.6532258",
"0.65147334",
"0.6491... | 0.7527089 | 0 |
Compute the mean average precision. Input should be a list of prediction rankings and a list of ground truth rankings. | def zaD5(wnzo, z3LN, plQg=None):
return UU7X(wnzo, z3LN, YLnl(uSAa, atk=plQg)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zaD5(njt6, O9tP):\n UE4u = []\n wEqB = []\n PeNt = []\n for r8m5 in njt6.keys():\n TdCN = O9tP[r8m5]['boxes']\n cCrA = O9tP[r8m5]['scores']\n UE4u.append(njt6[r8m5])\n wEqB.append(TdCN)\n PeNt.append(cCrA)\n PKpG = 0.5\n gCUM, dYrk = muF6(wEqB, UE4u, PeNt, P... | [
"0.7831679",
"0.7574589",
"0.75513065",
"0.75513065",
"0.75288075",
"0.74372524",
"0.732722",
"0.7210581",
"0.7141075",
"0.6975217",
"0.69228095",
"0.6889771",
"0.6889771",
"0.6876503",
"0.67573595",
"0.67374164",
"0.6712426",
"0.668879",
"0.66805184",
"0.66583216",
"0.664517... | 0.77060956 | 1 |
Compute the mean reciprocal precision. Input should be a list of prediction rankings and a list of ground truth rankings. | def iXEU(wnzo, z3LN, plQg=None):
return UU7X(wnzo, z3LN, YLnl(nPCs, atk=plQg)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uSAa(BCk_, z3LN, plQg=None):\n wjRY, zAcA = (0.0, 0.0)\n for G1Hx, o3Uj in enumerate(BCk_[:plQg], 1):\n if o3Uj in z3LN:\n zAcA += 1\n wjRY += zAcA / G1Hx\n return wjRY / zAcA if wjRY > 0 else 0.0",
"def zaD5(H0q3):\n return oyIN.mean([uSAa(Mkmy) for Mkmy in H0q3])",
... | [
"0.7065807",
"0.70518625",
"0.70157504",
"0.70157504",
"0.68720365",
"0.685541",
"0.6840075",
"0.67997265",
"0.67997265",
"0.67997265",
"0.67128766",
"0.67063826",
"0.6668957",
"0.6668957",
"0.666502",
"0.6556388",
"0.65000385",
"0.63746715",
"0.6370327",
"0.6348512",
"0.6345... | 0.6964207 | 4 |
Return the margin, or absolute difference between the highest irrelevant item and the lowest relevant one. | def MVIL(BCk_, z3LN):
xn9h, tMtT = (0, 0)
for G1Hx, o3Uj in enumerate(BCk_, 1):
if o3Uj not in z3LN and tMtT is 0:
tMtT = G1Hx
if o3Uj in z3LN and G1Hx > xn9h:
xn9h = G1Hx
return abs(xn9h - tMtT) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X5Au(YKHO) -> float:\n return YKHO.position.exchange.available_margin",
"def V3xV(YKHO):\n if YKHO.previous_event is None:\n p1kx = YKHO.score\n else:\n p1kx = YKHO.previous_event.score\n BUlu = YKHO.get_offense_team_id()\n LFF9 = p1kx[BUlu]\n lh86 = 0\n for b2mu, LTIa in p... | [
"0.6683197",
"0.6535715",
"0.6526499",
"0.64784586",
"0.6443067",
"0.637917",
"0.63374513",
"0.6324491",
"0.6324483",
"0.6308849",
"0.62230015",
"0.59055555",
"0.576389",
"0.57285047",
"0.56073964",
"0.56070846",
"0.55782366",
"0.5575528",
"0.55331033",
"0.55096865",
"0.54899... | 0.6742604 | 0 |
Normalized discounted cumulative gain (NDGC) | def pHfF(toXj, fdMZ=10):
OiNR = x2PR(sorted(toXj, reverse=True), fdMZ)
if OiNR == 0:
return 0.0
return x2PR(toXj, fdMZ) / OiNR | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def B5VY(cCrA, FMQW=oyIN.log2):\n cCrA = oyIN.nan_to_num(cCrA)\n HRrY = oyIN.arange(1, len(cCrA) + 1)\n QkbE = FMQW(HRrY)\n oyIN.maximum(QkbE, 1, out=QkbE)\n oyIN.reciprocal(QkbE, out=QkbE)\n return oyIN.dot(cCrA, QkbE)",
"def JBh8(Hw6y=1):\n E2Ou = ZylS.log(ZylS.constant(2.0, dtype=ZylS.flo... | [
"0.65538585",
"0.6481912",
"0.6384384",
"0.6360059",
"0.6212594",
"0.6171593",
"0.61645573",
"0.6149474",
"0.6141358",
"0.6097007",
"0.6049013",
"0.60426986",
"0.59782493",
"0.59467566",
"0.59015936",
"0.5899923",
"0.5890733",
"0.5869578",
"0.5842891",
"0.583804",
"0.5810907"... | 0.5687919 | 27 |
Getter for total Duration Return | def xHI_(YKHO):
return YKHO.totalDuration | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EdTY(YKHO):\n return YKHO.duration",
"def EdTY(YKHO):\n return YKHO._duration",
"def lgJE(YKHO):\n return YKHO._get_attribute('duration')",
"def lgJE(YKHO):\n return YKHO._get_attribute('duration')",
"def WbTE(YKHO):\n return YKHO._get('duration')",
"def WbTE(YKHO):\n return YKHO._d... | [
"0.8640967",
"0.8465019",
"0.8192792",
"0.81764585",
"0.81736344",
"0.81567216",
"0.81567216",
"0.81567216",
"0.81567216",
"0.81567216",
"0.81567216",
"0.81567216",
"0.81567216",
"0.81281835",
"0.81279856",
"0.81210256",
"0.80905044",
"0.79546475",
"0.7880334",
"0.78671366",
... | 0.8545387 | 1 |
Returns a default LabelStoreConfig to fill in any missing ones. | def sb2h(YKHO, F6jf: SceneConfig) -> gPmk:
raise NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yDgW(Emd4):\n WmM4 = super(axLb, Emd4).get_default_config()\n kF5m = t0qN.make_config(egH1())\n WmM4['lsh_functor'] = kF5m\n Q2J8 = t0qN.make_config(VSCm())\n WmM4['descriptor_index'] = Q2J8\n a34A = t0qN.make_config(zgal())\n WmM4['hash_index'] = a34A\n WmM4['hash_index_comment'] = \"'... | [
"0.6221486",
"0.60220504",
"0.5819019",
"0.5805407",
"0.5782555",
"0.57711416",
"0.57619035",
"0.57562435",
"0.5748874",
"0.56956226",
"0.56690294",
"0.5653731",
"0.5632784",
"0.55963796",
"0.55954915",
"0.55846584",
"0.55831254",
"0.55684423",
"0.5543517",
"0.55301565",
"0.5... | 0.77048916 | 0 |
Returns a default EvaluatorConfig to use if one isn't set. | def Nl0y(YKHO) -> _162:
raise NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yDgW():\n from raylab.agents.sac import DEFAULT_CONFIG\n return DEFAULT_CONFIG",
"def yDgW(YKHO):\n return GPtr.read(oAb3.Path(xAKo).parent / 'ext.conf')",
"def WmM4(YKHO):\n return YKHO._configs[0] if len(YKHO._configs) else None",
"def WmM4(Emd4) -> 'Config':\n wvEv: enR0.ConfigParser = ... | [
"0.69978195",
"0.67205906",
"0.6683171",
"0.6621579",
"0.63026786",
"0.62763005",
"0.62488645",
"0.62030625",
"0.61780494",
"0.61780494",
"0.6141372",
"0.6116631",
"0.6102302",
"0.6101332",
"0.60781455",
"0.6034338",
"0.6029229",
"0.60245436",
"0.5991673",
"0.5976192",
"0.596... | 0.85756123 | 0 |
Returns true if the given resource type is an AWS resource that supports tags. | def GZDQ(a1PO: str) -> bool:
return a1PO in BkZS | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tZWr(YKHO, j7HU, nVxg):\n try:\n if YKHO.Service == 'ec2':\n geh0 = YKHO.DescribeTags(j7HU)\n if nVxg in list(map(lambda WKvO: WKvO['Key'], [WKvO for WKvO in geh0['Tags']])):\n return True\n elif YKHO.Service == 's3':\n geh0 = YKHO.GetBucketTaggi... | [
"0.6399579",
"0.63201123",
"0.62766284",
"0.6256046",
"0.62011147",
"0.61333555",
"0.6058019",
"0.6058019",
"0.5869327",
"0.5817959",
"0.57866144",
"0.5778956",
"0.57481205",
"0.57481205",
"0.57481205",
"0.5704926",
"0.5670921",
"0.5625209",
"0.55327207",
"0.551816",
"0.54557... | 0.7635412 | 0 |
Computes the discounted reward for the entire episode. | def D2a1(vwlo, KMvS):
Pg1B = vwlo[::-1]
YAq3 = list(Hs6x.accumulate(Pg1B, lambda WKvO, LVAh: WKvO * KMvS + LVAh))
return oyIN.array(YAq3[::-1]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UV6d(YKHO, NH4l):\n CjDa = oyIN.zeros_like(NH4l)\n uGmR = 0.0\n for YRbF in reversed(range(len(NH4l))):\n uGmR = uGmR * KMvS + NH4l[YRbF]\n CjDa[YRbF] = uGmR\n JBMS = oyIN.mean(CjDa)\n M1Jx = oyIN.std(CjDa)\n CjDa = (CjDa - JBMS) / M1Jx\n return CjDa",
"def AC1_(YKHO, Mkmy,... | [
"0.74826664",
"0.7430066",
"0.741672",
"0.7255326",
"0.71947306",
"0.7184354",
"0.71606743",
"0.7058474",
"0.6957285",
"0.69207364",
"0.6917125",
"0.6786361",
"0.6777256",
"0.675367",
"0.6746068",
"0.6699113",
"0.6676255",
"0.6666142",
"0.6660753",
"0.6658038",
"0.6646817",
... | 0.0 | -1 |
Get the checkpoint path from the given model output directory | def FWzq(YKHO):
aqBD = ZylS.train.get_checkpoint_state(YKHO.model)
if aqBD and aqBD.model_checkpoint_path:
bKP2 = aqBD.model_checkpoint_path
else:
raise RuntimeError('No checkpoint file found')
return bKP2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kmfe(YKHO):\n return Hy7s.path.join(YKHO.checkpoint_dir, YKHO.model_dir)",
"def xSFL(aKDd: str) -> str:\n return Hy7s.path.join(aKDd, 'checkpoints')",
"def ihsl(YKHO) -> str:\n return YKHO._j_checkpoint_storage.getCheckpointPath().toString()",
"def I8VV():\n if (vPBo.run_dir or vPBo.checkpoin... | [
"0.8124849",
"0.7751144",
"0.7577298",
"0.746758",
"0.7276259",
"0.71268463",
"0.7119968",
"0.7004831",
"0.6968759",
"0.6910264",
"0.68485147",
"0.6757792",
"0.6754972",
"0.67422986",
"0.67221975",
"0.6708189",
"0.6678933",
"0.6621704",
"0.65912944",
"0.65912944",
"0.6507298"... | 0.7458354 | 4 |
String for representing the Organization object (in Admin site etc.). | def zAg0(YKHO):
if YKHO.name != None and YKHO.name != '':
return YKHO.name
else:
return 'Organization object owned by %s.' % YKHO.owner | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str('%s (%s)' % (YKHO.company, YKHO.owner))",
"def ejLf(YKHO):\n if YKHO.organization is not None:\n return YKHO.organization.name\n return ''",
"def fXnP(YKHO):\n return f'psc:org:{YKHO.credentials.org_key}'",
"def gZ75(YKHO) -> str:\n return qe4Y.get(YKHO, 'or... | [
"0.7165319",
"0.6806214",
"0.6790389",
"0.64104795",
"0.6407919",
"0.6346011",
"0.6310931",
"0.63100046",
"0.630681",
"0.6305702",
"0.6300019",
"0.62802875",
"0.6278159",
"0.6271169",
"0.626531",
"0.62608826",
"0.6247357",
"0.620912",
"0.6205226",
"0.61515045",
"0.61467075",
... | 0.76456773 | 0 |
Extracts all the ngrams (min_order <= n <= max_order) from a sequence of tokens. | def cpbi(zFiD, ceSM=1, qs_v=xkdr.NGRAM_ORDER) -> mBkc:
pCSA = mBkc()
s2mk = zFiD.split()
for exwG in range(ceSM, qs_v + 1):
for YRbF in range(0, len(s2mk) - exwG + 1):
u8Mh = ' '.join(s2mk[YRbF:YRbF + exwG])
pCSA[u8Mh] += 1
return pCSA | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HyjZ(s2mk, exwG):\n return zip(*[s2mk[YRbF:] for YRbF in range(exwG)])",
"def kiTG(s2mk, exwG=2):\n pCSA = zip(*(uOgj(uOe2, or8S, None) for or8S, uOe2 in enumerate(y54_(s2mk, exwG))))\n return pCSA",
"def RisN(s2mk, cmKB, m7Yz):\n I0D2 = list()\n OZMc = len(s2mk)\n for YRbF in range(OZMc)... | [
"0.8024978",
"0.78923404",
"0.7772897",
"0.75658435",
"0.75516206",
"0.7496225",
"0.7459337",
"0.7409229",
"0.7395054",
"0.7372828",
"0.7341489",
"0.728606",
"0.7244324",
"0.7237867",
"0.72247565",
"0.7176616",
"0.7175382",
"0.71394616",
"0.71245074",
"0.71214175",
"0.7113682... | 0.7025471 | 23 |
Apply Gaussian noise to an input tensor. | def bQkB(vhpA, JBMS, z2bo):
ARTs = iQnE(vhpA.data.new(vhpA.size()).normal_(JBMS, M1Jx))
return vhpA + ARTs | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bQkB(YKHO, vhpA):\n return vhpA.new_empty(vhpA.size()).normal_(std=YKHO._discreteness)",
"def AHRv(Ddli, UT5L):\n return oyIN.random.normal(0, UT5L, Ddli.shape)",
"def yjo7(EcVT, yGTL=0, WTkW=0.1):\n ARTs = oyIN.random.normal(0.0, WTkW, size=EcVT.size)\n return EcVT + ARTs.reshape(EcVT.shape)",... | [
"0.78414464",
"0.7245466",
"0.71811473",
"0.71459424",
"0.68363976",
"0.6799063",
"0.66733646",
"0.66543114",
"0.65751487",
"0.6564241",
"0.6492763",
"0.64736784",
"0.64736784",
"0.64586484",
"0.64251614",
"0.6397649",
"0.6334172",
"0.63252485",
"0.6302892",
"0.6299813",
"0.6... | 0.7755156 | 1 |
Module fixture for the IrisDataset class | def Ty8a():
return xD2l() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FCbF(YKHO):\n YKHO.dataset = YKHO.dataset_cls()",
"def FIMM(YKHO, __n6: Dataset):\n YKHO.dataset = __n6",
"def Ozs0(YKHO):\n Ty8a = dlbo()\n YKHO.assertEqual(len(Ty8a.data), 150)\n YKHO.assertEqual(len(Ty8a.labels), 150)",
"def FCbF(YKHO):\n YKHO.dataset = eis1()",
"def __n6(xAU6):\n ... | [
"0.7222384",
"0.71654016",
"0.6917572",
"0.68906116",
"0.6813696",
"0.68106896",
"0.6733908",
"0.6733908",
"0.6693054",
"0.6673248",
"0.6665914",
"0.66434",
"0.6637773",
"0.6597069",
"0.6580226",
"0.6575524",
"0.65625507",
"0.65582585",
"0.6514318",
"0.64990556",
"0.6495193",... | 0.8066619 | 0 |
Should return False when filename doesn't have extension. | def BkLD(YKHO):
Ux0P = 'somename'
F4VP = BfDw.is_allowed_file(Ux0P)
YKHO.assertFalse(F4VP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ufXY(Ux0P):\n for tTpl in CBZq:\n if Ux0P.endswith(tTpl):\n return True\n return False",
"def zc6t(YKHO, Ux0P):\n if Ux0P is None:\n return False\n return Ux0P.split('.')[-1].lower() in YKHO.extensions",
"def DpAt(Ux0P):\n if Ux0P.endswith('.doc') or Ux0P.endswith('.... | [
"0.86114055",
"0.8488944",
"0.8337902",
"0.8333528",
"0.8282026",
"0.8244654",
"0.82361555",
"0.8206642",
"0.81754893",
"0.81569153",
"0.81452125",
"0.81301445",
"0.81301445",
"0.81301445",
"0.81301445",
"0.81301445",
"0.81301445",
"0.8106526",
"0.8106526",
"0.8100288",
"0.81... | 0.7480339 | 71 |
A torch.nn.Module is return with a Binarization op inside. Usefull on Sequencial instanciation. | def GyW2(XQkR=False):
u_ln = HUUy if XQkR else D5yj
return VnzS(u_ln) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PqMZ(YKHO) -> U78l.Module:\n raise NotImplementedError()",
"def t84O(qIxc: ClusterArgs, Gzv5: int) -> fhcK.Bijector:\n hZ4C: x1iM[fhcK.Bijector] = []\n if qIxc.inn_idf:\n hZ4C += [fhcK.IntegerDiscreteFlow(Gzv5, hidden_channels=qIxc.inn_coupling_channels)]\n hZ4C += [fhcK.RandomPermutat... | [
"0.6195831",
"0.6028067",
"0.5984085",
"0.5977603",
"0.5933567",
"0.577126",
"0.563872",
"0.56152946",
"0.5602039",
"0.5588794",
"0.5583806",
"0.55589455",
"0.5541637",
"0.553707",
"0.5502502",
"0.5497476",
"0.54557115",
"0.5453031",
"0.54503006",
"0.5436571",
"0.5436571",
... | 0.0 | -1 |
Returns the postfix form of the infix expression found in `expr` | def XtMr(VN2L):
eRdl = {'*': 2, '/': 2, '+': 1, '-': 1}
IPme = S9Ut()
hEAh = []
Q4kH = VN2L.split()
RUgX = {'*', '/', '+', '-'}
for WKvO in Q4kH:
if str.isdigit(WKvO):
hEAh.append(WKvO)
elif IPme.empty() or IPme.peek() == '(':
IPme.push(WKvO)
elif ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XtMr(VN2L):\n IPme = S9Ut()\n hEAh = []\n Q4kH = VN2L.split()\n\n def lfdS(chr):\n if chr.isdigit():\n hEAh.append(chr)\n elif chr == '(':\n IPme.push('(')\n elif IPme.peek() == '(' or IPme.empty():\n IPme.push(chr)\n elif chr == ')':\n ... | [
"0.81900203",
"0.7801753",
"0.76920533",
"0.7429643",
"0.7404279",
"0.7347274",
"0.7156811",
"0.7048756",
"0.6956311",
"0.6874034",
"0.68503463",
"0.67862564",
"0.67233485",
"0.6722634",
"0.6648669",
"0.6607104",
"0.65920854",
"0.6575015",
"0.65612596",
"0.65422934",
"0.64984... | 0.7979371 | 1 |
Retrieve list of lending requests in Alma. | def NMoC(YKHO, UL9z, lWpc={}, m6Me=False):
qIxc = lWpc.copy()
qIxc['apikey'] = YKHO.cnxn_params['api_key']
qIxc['library'] = str(UL9z)
bD7m = YKHO.cnxn_params['api_uri_full']
geh0 = YKHO.read(bD7m, qIxc, raw=m6Me)
return geh0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def J2yD():\n from mephisto.core.local_database import LocalMephistoDB\n from tabulate import tabulate\n NCls = LocalMephistoDB()\n W2L2 = NCls.find_requesters()\n qnre = [Mkmy.to_dict() for Mkmy in W2L2]\n k8wH.echo(tabulate(qnre, headers='keys'))",
"def Q49r(YKHO):\n Aofo = FKLG().getReque... | [
"0.6040457",
"0.5955607",
"0.58180857",
"0.5787489",
"0.57837325",
"0.576755",
"0.5657119",
"0.5593387",
"0.55743015",
"0.5559228",
"0.553012",
"0.5527205",
"0.5499191",
"0.5457418",
"0.5445605",
"0.5431204",
"0.53873026",
"0.53873026",
"0.53873026",
"0.53873026",
"0.53873026... | 0.0 | -1 |
Hide a DLL function. | def qz5H(YKHO, IznC):
@xBlr.wraps(getattr(Emd4, IznC))
def o7vb(*qIxc, **B2fa):
raise AttributeError('{} is not a public function of the DLL'.format(IznC))
setattr(YKHO, IznC, o7vb) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Afoa(YKHO):\n raise NotImplementedError",
"def uFUZ(YKHO, d7pR):\n YKHO.show_hidden_frames = True\n YKHO.refresh_stack()",
"def Zode():\n return False",
"def drCV(JfyU):\n return JfyU",
"def fg_2():\n pass",
"def c3lJ(YKHO, d7pR):\n YKHO.show_hidden_frames = False\n YKHO.refre... | [
"0.6301674",
"0.60477537",
"0.60280937",
"0.59768236",
"0.5971939",
"0.59075075",
"0.5817386",
"0.57986",
"0.5764656",
"0.57285553",
"0.5725818",
"0.57060546",
"0.5704686",
"0.56854",
"0.5649857",
"0.56369823",
"0.55817014",
"0.5533546",
"0.5519958",
"0.5513072",
"0.5513072",... | 0.60058 | 3 |
Returns unique elements from a list of permutations. | def p2Oz(GPtr):
return list(set(Hs6x.permutations(GPtr))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def B7x7(DumB):\n return set(p2Oz(DumB))",
"def KGmq(YKHO, p2Oz=True):\n QyVM, raTX = YKHO.testDuplicate(p2Oz)\n return QyVM[raTX]",
"def a4ZY(UqER):\n bypm = set()\n U5bT = []\n for tTpl in UqER:\n if tTpl not in bypm:\n U5bT.append(tTpl)\n bypm.add(tTpl)\n re... | [
"0.8177064",
"0.7411001",
"0.6802766",
"0.6653996",
"0.66447264",
"0.65575033",
"0.6525947",
"0.64785385",
"0.64524955",
"0.6374415",
"0.6337084",
"0.6331694",
"0.63158125",
"0.6297816",
"0.6290124",
"0.6272724",
"0.6271203",
"0.627059",
"0.6264411",
"0.6260488",
"0.6235243",... | 0.6415549 | 9 |
Insert value at index k | def O1R3(YKHO, G1Hx, BWXx):
if G1Hx < 0:
G1Hx += len(YKHO)
if BWXx is not None:
YKHO.store_array.add_list_item(Msxl(BWXx, G1Hx)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def O1R3(YKHO, G1Hx, Ty9i):\n YKHO.insert(G1Hx, Ty9i)",
"def JPHp(YKHO, G1Hx: int, Ty9i: int) -> None:\n YRbF = G1Hx % YKHO.capacity\n if not YKHO.data[YRbF]:\n YKHO.data[YRbF] = Msxl(G1Hx, Ty9i)\n else:\n DpUl = YKHO.data[YRbF]\n while True:\n if DpUl.pair[0] == G1Hx:... | [
"0.77019125",
"0.7627747",
"0.74772215",
"0.7229901",
"0.7198082",
"0.6954016",
"0.6874141",
"0.6824919",
"0.6617062",
"0.66130084",
"0.64938253",
"0.648273",
"0.64766896",
"0.6475448",
"0.64466083",
"0.6428774",
"0.64268345",
"0.6418416",
"0.6408187",
"0.63482594",
"0.633443... | 0.68265134 | 7 |
Get the argument parser for passing files. | def m5g4():
wvEv = j1Jz.ArgumentParser(description=__doc__, formatter_class=j1Jz.ArgumentDefaultsHelpFormatter)
wvEv.add_argument('outdir', action='store', type=oAb3.Path, help='Directory where to write resulting images.')
wvEv.add_argument('files', action='store', type=oAb3.Path, nargs='+', help='Input sat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EpPs():\n XP5J = j1Jz.ArgumentParser(description='such a good program')\n XP5J.add_argument('infile')\n XP5J.add_argument('outfile')\n return XP5J",
"def EpPs():\n wvEv = j1Jz.ArgumentParser()\n wvEv.add_argument('files', nargs='+')\n return wvEv",
"def xuJu(nUeQ):\n ioG2 = j1Jz.Arg... | [
"0.79019636",
"0.7870106",
"0.7787764",
"0.75685984",
"0.74728954",
"0.72674626",
"0.71568024",
"0.7144376",
"0.71342105",
"0.71342105",
"0.7131248",
"0.7063849",
"0.7038956",
"0.7009244",
"0.6967036",
"0.6923422",
"0.6912022",
"0.69116515",
"0.6897074",
"0.68824583",
"0.6878... | 0.6530431 | 70 |
Returns an ``Iterable`` containing all the instances in the specified dataset. If ``self.lazy`` is False, this calls ``self._read()``, ensures that the result is a list, then returns the resulting list. If ``self.lazy`` is True, this returns an object whose ``__iter__`` method calls ``self._read()`` each iteration. In ... | def Ueki(YKHO, *qIxc, **B2fa) -> iu5r[ec6H]:
gd4N = getattr(YKHO, 'lazy', None)
if gd4N is None:
bo34.warning('DatasetReader.lazy is not set, did you forget to call the superclass constructor?')
if gd4N:
return h8jz(lambda: iter(YKHO._read(*qIxc, **B2fa)))
else:
bUWH = YKHO._read... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vs4Q(YKHO):\n return iter(YKHO._datasets)",
"def Vs4Q(YKHO) -> bDy6:\n return iter(YKHO.get_data_loader())",
"def Vs4Q(YKHO) -> uLKX[bDy6[int], bDy6[AzJI[int, ImMB]]]:\n YKHO.size = YKHO._data._dataset_size\n if not YKHO._data._fully_cached or YKHO._data._should_call_prefetch_source:\n Y... | [
"0.7040597",
"0.6643148",
"0.6294192",
"0.62414855",
"0.61743397",
"0.61443645",
"0.60582954",
"0.6047906",
"0.59985113",
"0.5981316",
"0.5973242",
"0.59701633",
"0.5944178",
"0.5882069",
"0.58764064",
"0.58696884",
"0.5857583",
"0.5841389",
"0.58389926",
"0.5835787",
"0.5801... | 0.8134299 | 0 |
Check for invalid username and invalid password should not be able to login | def e8gv(YKHO):
geh0 = YKHO.client.post(gxEw('users:login'), {'username': YKHO.create_user_data()['username'], 'password': YKHO.create_user_data()['password1']})
YKHO.assertEqual(geh0.status_code, 200)
YKHO.assertFormError(geh0, 'form', None, Bekv) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ngt6(YKHO):\n YKHO.assertFalse(mv1M.authenticate('invalid', 'allison'))",
"def ImCN(YKHO):\n nPrm = {'username': 'nonexistentuser', 'password': 'nopasswordlol'}\n geh0 = YKHO.login(nPrm)\n lYY4 = 'Unable to log in with provided credentials.'\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_400_B... | [
"0.7901798",
"0.77217233",
"0.77012146",
"0.76538616",
"0.7576865",
"0.7574334",
"0.755077",
"0.7488525",
"0.74578387",
"0.744723",
"0.74460363",
"0.74412745",
"0.74403954",
"0.7430433",
"0.7425823",
"0.7395681",
"0.7395213",
"0.7375655",
"0.7326853",
"0.7312103",
"0.7311579"... | 0.7513344 | 7 |
Check for invalid username and valid password should not be able to login | def bqHl(YKHO):
geh0 = YKHO.client.post(gxEw('users:login'), {'username': 'xyzabe', 'password': YKHO.user['password1']})
YKHO.assertEqual(geh0.status_code, 200)
YKHO.assertFormError(geh0, 'form', None, Bekv) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ngt6(YKHO):\n YKHO.assertFalse(mv1M.authenticate('invalid', 'allison'))",
"def GGQL(YKHO):\n geh0 = YKHO.client.post(gxEw('users:login'), {'username': YKHO.user['username'], 'password': '1sfsdf'})\n YKHO.assertEqual(geh0.status_code, 200)\n YKHO.assertFormError(geh0, 'form', None, Bekv)",
"def ... | [
"0.7951096",
"0.7841457",
"0.7711811",
"0.76967174",
"0.7688351",
"0.7644936",
"0.76221037",
"0.760486",
"0.7591186",
"0.75574297",
"0.7532108",
"0.75310373",
"0.7526137",
"0.7497212",
"0.74888337",
"0.74736017",
"0.7467855",
"0.74638116",
"0.7450047",
"0.7411747",
"0.7391035... | 0.7611962 | 7 |
Tokenizes a given text and determines the postags. Lowercases the text. | def kdPk(l5Ny, c9WI=False):
s2mk = Dhdw.word_tokenize(l5Ny.lower())
oeNL = Dhdw.pos_tag(s2mk)
if c9WI:
R849 = []
for GIN8, TZ9E in oeNL:
MGzK = Dhdw.tag.mapping.map_tag('en-ptb', 'universal', TZ9E)
if not MGzK:
MGzK = TZ9E
R849.append((GIN8... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def biH0(l5Ny):\n return l5Ny.lower()",
"def Yvzw(_dZy):\n b0j5 = H6bL()\n jWWN = b0j5.tokenize(_dZy.lower())\n return jWWN",
"def GMXA(l5Ny, wr3U=LQ4w, filter=a5X0, XPB5=None, LSh8=True):\n assert wr3U, 'Must provide tokenize method for preprocess_text'\n if not l5Ny:\n return []\n ... | [
"0.73638403",
"0.71996164",
"0.70776325",
"0.70369464",
"0.70350385",
"0.699438",
"0.6974615",
"0.69460094",
"0.6889723",
"0.6881596",
"0.6870311",
"0.68678427",
"0.68667",
"0.682271",
"0.6777725",
"0.6755323",
"0.67493415",
"0.6743987",
"0.6711147",
"0.67024463",
"0.66992223... | 0.0 | -1 |
Mark a video as flagged. | def naBh(YKHO, DYeJ, Ji45=''):
object = YKHO._video_library.get_video(DYeJ)
print(f'{object}') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def naBh(YKHO, DYeJ, Ji45='Not supplied'):\n f6W2 = YKHO._video_library.get_video(DYeJ)\n if not f6W2:\n print('Cannot flag video: Video does not exist')\n return\n if f6W2.flag is not None:\n print('Cannot flag video: Video is already flagged')\n return\n f6W2.set_flag(Ji45... | [
"0.7585753",
"0.7543017",
"0.7286989",
"0.7286989",
"0.6934897",
"0.68738246",
"0.67508376",
"0.65071416",
"0.59914064",
"0.5956641",
"0.583062",
"0.5781579",
"0.5766682",
"0.57447886",
"0.57447886",
"0.57447886",
"0.57447886",
"0.56196725",
"0.5476563",
"0.54668385",
"0.5389... | 0.6579819 | 7 |
Unload a config entry. | async def async_unload_entry(ajET: HomeAssistant, bTKY: ConfigEntry) -> bool:
ajET.data.pop(Sugg)
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def async_unload_entry(ajET, PhL6):\n yT1k = await ajET.config_entries.async_forward_entry_unload(PhL6, 'climate')\n return yT1k",
"async def async_unload_entry(ajET: HomeAssistant, bTKY: ConfigEntry):\n yT1k = await ajET.config_entries.async_unload_platforms(bTKY, aprE)\n if yT1k:\n ajE... | [
"0.697284",
"0.6779855",
"0.6747459",
"0.6689002",
"0.6657831",
"0.66162205",
"0.6603433",
"0.65925974",
"0.65595686",
"0.65411645",
"0.6507643",
"0.6507643",
"0.6507643",
"0.6507643",
"0.64977276",
"0.64931643",
"0.6486601",
"0.6486601",
"0.6486601",
"0.6486601",
"0.6469397"... | 0.6888074 | 1 |
Function for rendering the home page | def bVaH():
return TvZl('index.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kZiy():\n return TvZl('home_page.html')",
"def kZiy():\n return TvZl('homepage.html')",
"def kZiy():\n return TvZl('home.html')",
"def kZiy():\n return TvZl('home.html')",
"def kZiy():\n return TvZl('home.html')",
"def kZiy():\n return TvZl('home.html')",
"def kZiy():\n return ... | [
"0.88329524",
"0.86391366",
"0.8630416",
"0.86062366",
"0.86062366",
"0.86062366",
"0.86062366",
"0.86062366",
"0.86062366",
"0.86062366",
"0.86062366",
"0.86062366",
"0.86062366",
"0.86062366",
"0.86062366",
"0.86062366",
"0.86062366",
"0.86062366",
"0.86062366",
"0.8602575",
... | 0.88435775 | 0 |
Return the sum of two fractions as a new fraction. Use the standard formula a/b + c/d = (ad+bc)/(bd) | def FOdN(YKHO, oXaw):
pjIT = YKHO.numerator * oXaw.denominator + oXaw.numerator * YKHO.denominator
em7G = YKHO.denominator * oXaw.denominator
if em7G == 0:
raise ValueError('UNDEFINED.')
return kteF(pjIT, em7G) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i9mE(jzdc, Fg_i):\n Z9rn = ML2l(jzdc, Fg_i)\n return (jzdc // Z9rn, Fg_i // Z9rn)",
"def FOdN(YKHO, Elif):\n if YKHO.debug:\n print(f'enter fraction.__add__ with {Elif}')\n BsJX = GAqO(YKHO.value[1], Elif.value[1])\n if YKHO.debug:\n print(f'{int(BsJX / YKHO.value[1])} {YKHO.valu... | [
"0.7550767",
"0.73520947",
"0.70274425",
"0.70012",
"0.68851763",
"0.68535614",
"0.6831391",
"0.6830096",
"0.6678177",
"0.66171855",
"0.6570202",
"0.6537826",
"0.6499646",
"0.6448474",
"0.64213866",
"0.6402042",
"0.63277656",
"0.6272814",
"0.62671316",
"0.62539977",
"0.618849... | 0.65008366 | 12 |
Two fractions are equal if they have the same value. Fractions are stored in proper form so the internal representation is unique (3/6 is same as 1/2). | def xa14(YKHO, oXaw):
return YKHO.equal == oXaw.equal | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Eesn(YKHO):\n YKHO.assertTrue(kteF(7, 10) == kteF(7, 10))",
"def DOjb(YKHO):\n YKHO.assertTrue(kteF(144, 2) != kteF(8, 4))",
"def Jnt1(YKHO):\n j93S = YKHO.RNA('ACGU')\n Nqp_ = YKHO.RNA('AACG')\n pGmv = YKHO.RNA('GG')\n IiQ7 = YKHO.RNA('A')\n tTpl = YKHO.RNA('')\n YKHO.assertEqual(j... | [
"0.8099188",
"0.7660002",
"0.74295694",
"0.72934115",
"0.7253576",
"0.7143537",
"0.6919099",
"0.6876407",
"0.6799766",
"0.67680925",
"0.6742922",
"0.67288",
"0.6660526",
"0.6650963",
"0.66349375",
"0.6611294",
"0.6571344",
"0.64932424",
"0.64467835",
"0.64218277",
"0.64188033... | 0.7083102 | 6 |
Generates parsing spec for tf.parse_example to be used with classifiers. If users keep data in tf.Example format, they need to call tf.parse_example | def MXKg(WaDF, kqdp, VOU0=m1c7.int64, wsob=None, yYmR=None):
Az41 = FBfN.make_parse_example_spec(WaDF)
if kqdp in Az41:
raise ValueError('label should not be used as feature. label_key: {}, features: {}'.format(kqdp, Az41.keys()))
Az41[kqdp] = dZ6r.FixedLenFeature((1,), VOU0, wsob)
if yYmR is No... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sSfN(PU1l):\n\n def hIe0():\n \"\"\"Returns data format of the serialized tf record file.\"\"\"\n return {'feature_1': ZylS.io.VarLenFeature(dtype=ZylS.int64), 'feature_2': ZylS.io.VarLenFeature(dtype=ZylS.int64), 'feature_3': ZylS.io.VarLenFeature(dtype=ZylS.int64), 'label': ZylS.io.FixedLenF... | [
"0.7969642",
"0.77698576",
"0.7314053",
"0.7263414",
"0.72264713",
"0.71797144",
"0.7169134",
"0.7144098",
"0.70959514",
"0.7066097",
"0.704645",
"0.702182",
"0.69985455",
"0.6914308",
"0.68740547",
"0.68440163",
"0.68436134",
"0.6774798",
"0.6757371",
"0.66926384",
"0.663061... | 0.0 | -1 |
Generates parsing spec for tf.parse_example to be used with regressors. If users keep data in tf.Example format, they need to call tf.parse_example | def V8gs(WaDF, kqdp, VOU0=m1c7.float32, wsob=None, B2o6=1, yYmR=None):
Az41 = FBfN.make_parse_example_spec(WaDF)
if kqdp in Az41:
raise ValueError('label should not be used as feature. label_key: {}, features: {}'.format(kqdp, Az41.keys()))
Az41[kqdp] = dZ6r.FixedLenFeature((B2o6,), VOU0, wsob)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sSfN(PU1l):\n\n def hIe0():\n \"\"\"Returns data format of the serialized tf record file.\"\"\"\n return {'feature_1': ZylS.io.VarLenFeature(dtype=ZylS.int64), 'feature_2': ZylS.io.VarLenFeature(dtype=ZylS.int64), 'feature_3': ZylS.io.VarLenFeature(dtype=ZylS.int64), 'label': ZylS.io.FixedLenF... | [
"0.8089116",
"0.7692144",
"0.7427058",
"0.73363465",
"0.7304736",
"0.72581846",
"0.7235934",
"0.7229534",
"0.7021413",
"0.70062184",
"0.69566554",
"0.69477016",
"0.69340587",
"0.69241685",
"0.6892932",
"0.6824007",
"0.6796293",
"0.6792499",
"0.6732977",
"0.67035663",
"0.66994... | 0.0 | -1 |
Lookup the Id for the VPC Route Table with the given name. | def y2VQ(cuiw, xOeT, Ym57):
if cuiw is None:
return None
x0hE = cuiw.client('ec2')
geh0 = x0hE.describe_route_tables(Filters=[{'Name': 'vpc-id', 'Values': [xOeT]}, {'Name': 'tag:Name', 'Values': [Ym57]}])
if len(geh0['RouteTables']) == 0:
return None
else:
return geh0['RouteT... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def get_id(YKHO, hLhr):\n geh0 = await YKHO.describe(hLhr)\n if geh0['RouteTables']:\n return geh0['RouteTables'][0]['RouteTableId']\n else:\n raise RAdA",
"def Y5Mx(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'transit_router_route_table_id')",
"def Y5Mx(YKHO) -> h8n... | [
"0.7265778",
"0.6650314",
"0.6650314",
"0.65430045",
"0.65120596",
"0.64262307",
"0.6146517",
"0.60185033",
"0.56920457",
"0.5620676",
"0.5594443",
"0.5552543",
"0.5518078",
"0.5444758",
"0.54276913",
"0.5355043",
"0.5323631",
"0.5280393",
"0.5248865",
"0.52361125",
"0.522494... | 0.7589303 | 0 |
Lookup up SNS topic ARN given a topic name | def fcc0(cuiw, O7Jy):
if cuiw is None:
return None
x0hE = cuiw.client('sns')
geh0 = x0hE.list_topics()
lyX9 = geh0['Topics']
for rlUa in lyX9:
TDwn = rlUa['TopicArn'].split(':').pop()
if TDwn == O7Jy:
return rlUa['TopicArn']
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d8bS(O7Jy):\n xQ8p = iVGz.client('sts')\n Z31E = xQ8p.get_caller_identity().get('Account')\n return f'arn:aws:sns:eu-west-1:{Z31E}:{O7Jy}'",
"def NwN5(Ljej, sc6m):\n return Ljej + ':' + sc6m",
"def zbnq(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'sns_topic_arn')",
"def zbnq(YK... | [
"0.79431546",
"0.72963053",
"0.7135237",
"0.7135237",
"0.7130573",
"0.6910786",
"0.69055796",
"0.6537543",
"0.65364784",
"0.646367",
"0.6283038",
"0.59111613",
"0.5876922",
"0.5643607",
"0.56244606",
"0.55634636",
"0.5465788",
"0.54464096",
"0.54258615",
"0.5421659",
"0.53438... | 0.8113506 | 0 |