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 |
|---|---|---|---|---|---|---|
Builds a kfactor circulant matrix (A matrix with the structure of circulant matrices, but with the entries above the diagonal multiplied by the same factor.) The matrix is store in memory. | def cK2Y(WKvO, G1Hx):
exwG = len(WKvO)
return XWF0(WKvO) * (nXnc(exwG, exwG, 0) + G1Hx * oyIN.transpose(nXnc(exwG, exwG, -1))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ru6p(YKHO):\n nMvt = YKHO.uv_vol + YKHO.Epsilon * YKHO.guv_vol + YKHO.Epsilon / YKHO.Beta * YKHO.uv_bound\n return nMvt",
"def qW7n(r8hN):\n E3D9 = r8hN * (r8hN - 1) / 2\n nMvt = oyIN.zeros((E3D9, r8hN ** 2), dtype=oyIN.int64)\n rdlD = 0\n for r845 in range(1, r8hN):\n fvDH = (r845 -... | [
"0.6495986",
"0.6089255",
"0.6045119",
"0.59890914",
"0.5949488",
"0.59035623",
"0.5859298",
"0.58462423",
"0.57634705",
"0.574443",
"0.5730508",
"0.5717386",
"0.56819576",
"0.566873",
"0.5568253",
"0.55545205",
"0.5523086",
"0.55172205",
"0.5492196",
"0.5491694",
"0.5478032"... | 0.78092545 | 0 |
Convert `data` to float64 or int(64|32|16|8); as fallback, return `data`. Assume `data` is of type `utf8` or a dictionary of utf8. | def nxJv(nPrm: pyarrow.ChunkedArray) -> Ms0J.ChunkedArray:
for yOAJ in nPrm.iterchunks():
bGrB, KE02, bGrB = yOAJ.buffers()
xtuh = KE02[yOAJ.offset * 4:(yOAJ.offset + 1) * 4]
DIiU = KE02[(yOAJ.offset + len(yOAJ)) * 4:(yOAJ.offset + len(yOAJ) + 1) * 4]
if xtuh.to_pybytes() != DIiU.to_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nsFc(nPrm):\n try:\n return float(nPrm)\n except (ValueError, TypeError):\n return nPrm",
"def pd4L(nPrm):\n return float(hr3c(nPrm))",
"def WU9g(nPrm):\n try:\n return float(nPrm)\n except ValueError as err:\n if nPrm in ('None', 'NA', 'nan'):\n return... | [
"0.748317",
"0.69878703",
"0.6950177",
"0.6709056",
"0.6397729",
"0.6396958",
"0.63965064",
"0.6293659",
"0.6279694",
"0.6161165",
"0.61318475",
"0.61182475",
"0.5992608",
"0.596135",
"0.5870688",
"0.5860507",
"0.58470494",
"0.58467394",
"0.5794232",
"0.5766028",
"0.5722432",... | 0.0 | -1 |
Parse CSV, TSV or other delimiterseparated text file. Raise LookupError for an `encoding` Python cannot handle. Raise UnicodeError when the file simply cannot be read as text. (e.g., a UTF16 file that does not start with a byteorder marker.) | def gAn6(pmON: Path, *, gCuF: Settings=QhLw, tZ2K: Optional[str], TDw3: Optional[str], IcJu: bool, Xyk5: bool) -> P2SJ:
qmLP = []
with QZXY.ExitStack() as OaeV:
_VAm = pmON.stat().st_size
if _VAm > gCuF.MAX_CSV_BYTES:
hYFn = OaeV.enter_context(KXk1(prefix='truncated-'))
w... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cO1h(Ux0P, IKIW=['ascii', 'utf-8', 'utf-16', 'latin-1']):\n l5Ny = None\n for tZ2K in IKIW:\n try:\n eHNT = open(Ux0P, encoding=tZ2K)\n l5Ny = eHNT.read()\n eHNT.close()\n except UnicodeDecodeError:\n eHNT.close()\n except UnicodeError:\n ... | [
"0.6560378",
"0.62868285",
"0.61147213",
"0.6035779",
"0.6029811",
"0.5926391",
"0.5827321",
"0.5804859",
"0.58034223",
"0.5774665",
"0.5699063",
"0.56861764",
"0.56857336",
"0.56818",
"0.56673634",
"0.5613292",
"0.56082886",
"0.55889183",
"0.5518909",
"0.5518909",
"0.5518909... | 0.60616267 | 3 |
Update the config information with the number of attention heads. | def taBh(U34r, kJiB):
U34r['model_params']['boltzmann_dict']['num_heads'] = kJiB
U34r['model_params']['boltzmann_dict']['head_pool'] = 'concatenate'
M5sQ = U34r['model_params']['readoutdict']
iQSw = U34r['model_params']['mol_basis']
for H5ew, yv6U in M5sQ.items():
for YRbF, Op6c in enumerate... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YYiC(YKHO):\n YKHO.channel_count = YKHO.config_global['channel_count']\n YKHO.pixel_count = YKHO.config_global['pixel_count']\n YKHO.pixel_index_max = YKHO.pixel_count - 1\n YKHO.repeat_count = YKHO.config_global['repeat_count']\n YKHO.repeat_snake = YKHO.config_global['repeat_snake']\n YKHO.... | [
"0.5661511",
"0.5599164",
"0.54210174",
"0.53882116",
"0.5338775",
"0.5247799",
"0.5247248",
"0.5225227",
"0.51431704",
"0.5058479",
"0.49841285",
"0.49445143",
"0.49379683",
"0.48532596",
"0.4848556",
"0.48481622",
"0.4835506",
"0.48258802",
"0.48030823",
"0.48024145",
"0.47... | 0.5935313 | 0 |
Distribution parameter for the location. | def hksT(YKHO):
return YKHO._gev_bijector.loc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IZxK(YKHO) -> str:\n return qe4Y.get(YKHO, 'distribution')",
"def hksT(YKHO):\n return YKHO.distribution.loc",
"def eVXf(YKHO):\n return 'UNDEFINED'",
"def IZxK(YKHO, sEAN):\n pass",
"def Uh2w(YKHO, vKpX):\n super()._handleInput(vKpX)\n r7x1 = vKpX.findFirst('location')\n if r7x1 !... | [
"0.65867454",
"0.62829775",
"0.62012964",
"0.59412557",
"0.57245076",
"0.56689125",
"0.5637412",
"0.5567886",
"0.5564207",
"0.55510134",
"0.5550806",
"0.55264115",
"0.5516382",
"0.550923",
"0.5505646",
"0.5505646",
"0.5499564",
"0.5482442",
"0.5477142",
"0.54546994",
"0.54109... | 0.0 | -1 |
Initialise an allergy storage with the given allergy score. | def FIMM(YKHO, p1kx):
YKHO.score = p1kx
YKHO.list = [SkC9[0] for SkC9 in YKHO._allergens if SkC9[1] & YKHO.score] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i4on(YKHO, vTtz=0.0001, CXGk=1000.0):\n oMl_ = {}\n oMl_['iALDth'] = vTtz\n oMl_['iMaxDt'] = CXGk\n oMl_['bInit'] = 0\n return oMl_",
"def FIMM(YKHO, p1kx=0):\n YKHO.score = p1kx",
"def FIMM(YKHO, p1kx=0):\n YKHO.score = p1kx",
"def FIMM(YKHO, tFj2):\n YKHO.db_path = tFj2\n YKH... | [
"0.5347252",
"0.5322024",
"0.5263044",
"0.5225015",
"0.5212653",
"0.51022935",
"0.5069073",
"0.50057083",
"0.50024194",
"0.49871403",
"0.49801096",
"0.49767306",
"0.49670827",
"0.49553522",
"0.4951048",
"0.49419042",
"0.4933451",
"0.48849487",
"0.48819917",
"0.48739007",
"0.4... | 0.5045687 | 7 |
This returns a single entry corresponding to the Experiment Entity referred to by ExpEntityData. The returned string is given below (between Start and End) Start | def AqPM(u6d7):
if u6d7.Type != 'Experiment':
sZGp('\nThe Entity Data does not represent the data of an experiment')
raise ValueError
XpIn = []
XpIn.append('')
XpIn.append('- ID : {ID}'.format(ID=u6d7.ID))
XpIn.append(' Title : {Title}'.format(Title=u6d7.Title))
XpI... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KrC0(LEXu: spacy.tokens.Token) -> str:\n Tw4A = K7nP._get_chunk(LEXu)\n GIN8 = LEXu\n while True:\n pTf_, GIN8 = K7nP._get_prep_with_word(GIN8)\n if GIN8 is None:\n break\n Tw4A += ' ' + pTf_\n return Tw4A",
"def gBtj(YKHO, yGdP):\n MMe4 = YKHO._load_entities()\... | [
"0.6376407",
"0.5688458",
"0.56678385",
"0.5637462",
"0.5474638",
"0.5404834",
"0.5358794",
"0.53286546",
"0.5274664",
"0.5274664",
"0.52555805",
"0.5246036",
"0.51556396",
"0.51428646",
"0.51405764",
"0.51387566",
"0.51039517",
"0.5103533",
"0.5092884",
"0.5080785",
"0.50753... | 0.81062454 | 0 |
Initialize the sum to zero | def FIMM(YKHO, mWFP):
super(OciN, YKHO).__init__(YKHO, mWFP)
YKHO.sum = 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vWqZ(YKHO):\n YKHO.sum_e = 0",
"def RqgG(YKHO):\n return sbx9",
"def sbx9(YKHO):\n raise NotImplementedError('Not implemented yet.')",
"def vWqZ(YKHO):\n YKHO._error_sum = 0",
"def b4yx(list):\n if not list:\n return 0\n else:\n return sum(list)",
"def SiRx(YKHO):\n ... | [
"0.7703882",
"0.71630156",
"0.69994444",
"0.6945991",
"0.6897512",
"0.67463124",
"0.6605019",
"0.65537924",
"0.653141",
"0.65299124",
"0.6520557",
"0.65204495",
"0.6479404",
"0.6479189",
"0.6431233",
"0.64236397",
"0.6403008",
"0.63670397",
"0.63195443",
"0.62968844",
"0.6264... | 0.0 | -1 |
The `ComputeCluster` data source can be used to discover the ID of a cluster in vSphere. This is useful to fetch the ID of a cluster that you want to use for virtual machine placement via the `VirtualMachine` resource, allowing to specify the cluster's root resource pool directly versus using the alias available throug... | def qrVU(BT13: Optional[str]=None, mWFP: Optional[str]=None, VKhi: Optional[pulumi.InvokeOptions]=None) -> OgEo:
rYZf = dict()
rYZf['datacenterId'] = BT13
rYZf['name'] = mWFP
VKhi = qe4Y.InvokeOptions.merge(i5mz.get_invoke_opts_defaults(), VKhi)
p5j3 = qe4Y.runtime.invoke('vsphere:index/getComputeCl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VLhC(xAU6):\n hKn5 = xAU6.cluster\n nJ8O = tQff(xAU6)\n for ZfUD in nJ8O.hostFolder.childEntity:\n if ZfUD.name == hKn5:\n return ZfUD._GetMoId()",
"def T6nz(BT13: Optional[pulumi.Input[Optional[str]]]=None, mWFP: Optional[pulumi.Input[str]]=None, VKhi: Optional[pulumi.InvokeOption... | [
"0.70518404",
"0.70052683",
"0.67735595",
"0.6768537",
"0.6736824",
"0.6736824",
"0.6736824",
"0.6736824",
"0.6736824",
"0.66624004",
"0.66624004",
"0.66624004",
"0.66624004",
"0.6613303",
"0.660601",
"0.660601",
"0.6474703",
"0.6474703",
"0.6474703",
"0.63924193",
"0.6386118... | 0.72311264 | 0 |
The `ComputeCluster` data source can be used to discover the ID of a cluster in vSphere. This is useful to fetch the ID of a cluster that you want to use for virtual machine placement via the `VirtualMachine` resource, allowing to specify the cluster's root resource pool directly versus using the alias available throug... | def T6nz(BT13: Optional[pulumi.Input[Optional[str]]]=None, mWFP: Optional[pulumi.Input[str]]=None, VKhi: Optional[pulumi.InvokeOptions]=None) -> qe4Y.Output[FsaE]:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qrVU(BT13: Optional[str]=None, mWFP: Optional[str]=None, VKhi: Optional[pulumi.InvokeOptions]=None) -> OgEo:\n rYZf = dict()\n rYZf['datacenterId'] = BT13\n rYZf['name'] = mWFP\n VKhi = qe4Y.InvokeOptions.merge(i5mz.get_invoke_opts_defaults(), VKhi)\n p5j3 = qe4Y.runtime.invoke('vsphere:index/ge... | [
"0.72311264",
"0.70518404",
"0.67735595",
"0.6768537",
"0.6736824",
"0.6736824",
"0.6736824",
"0.6736824",
"0.6736824",
"0.66624004",
"0.66624004",
"0.66624004",
"0.66624004",
"0.6613303",
"0.660601",
"0.660601",
"0.6474703",
"0.6474703",
"0.6474703",
"0.63924193",
"0.6386118... | 0.70052683 | 2 |
Assert that the first (leftmost) protocol value is correctly fetched from the xforwardedheader. | def NRmZ():
QePW = FM6F(headers={'X-Forwarded-Proto': 'https,http,http'}, protocol='http')
aEqx = 'https'
iquo = T94E(QePW)
assert aEqx == iquo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KYNB(YKHO):\n YKHO.set_frang_config(frang_config='http_strict_host_checking true;')\n x0hE = YKHO.get_client('deproxy-1')\n x0hE.start()\n x0hE.parsing = False\n Dq_a = [(':authority', 'localhost'), (':path', '/')]\n ZXoM = [(':path', '/'), ('host', 'localhost')]\n H15w = [(':authority', '... | [
"0.6413071",
"0.6368929",
"0.63600814",
"0.6126467",
"0.6093351",
"0.6008764",
"0.597977",
"0.59638256",
"0.5935303",
"0.5915244",
"0.59103775",
"0.588814",
"0.58332074",
"0.5819531",
"0.58032525",
"0.57846427",
"0.5782095",
"0.57428664",
"0.5648308",
"0.5636194",
"0.5635823"... | 0.72213775 | 0 |
Randomly divide this image into training, validation and test split. The image is divided into three randomly ordered consecutive patches. The fractions of the image going into each patch are given by val_split, test_split, and 1 (val_split + test_split), respectively. Columns in which the patches overlap are removed. | def AchZ(YKHO, HXw9: float, STQp: float) -> {str: int}:
def ljbE(yKcO, exwG, UXqs) -> int:
"""
Label all columns in [start, start+n) with label.
"""
B9Vp = 0
for YRbF in range(yKcO, int(yKcO + exwG)):
WKvO = YKHO._x_positions[YRbF]
B9Vp += YKH... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lpha(YKHO):\n pLUS = 1 - YKHO.ratio\n YKHO.train, YKHO.test = YKHO.df.randomSplit([YKHO.ratio, pLUS], seed=12345)",
"def PIp4(c4tM, FTrt, nrsA, g63E, LWY6, ktt2='constant', YCvr=0, KMS3=[0]):\n OTY2 = LWY6.joinpath('valid_sampling')\n LWY6 = OTY2.joinpath(f'{FTrt}x{FTrt}_{ktt2}_{nrsA:.2f}_{g63E:.... | [
"0.6673594",
"0.6663889",
"0.6621361",
"0.65526426",
"0.6512163",
"0.6374599",
"0.63245976",
"0.6266016",
"0.62305325",
"0.62242997",
"0.6173855",
"0.61674833",
"0.61449915",
"0.612918",
"0.610995",
"0.6105582",
"0.6080789",
"0.6075082",
"0.6059651",
"0.6052234",
"0.6046871",... | 0.0 | -1 |
Return index of first unlabelled column after x. | def IGz6(WKvO):
for YRbF in range(YKHO.n_cols):
or8S = (WKvO + YRbF) % YKHO.n_cols
Yfcq = YKHO._x_positions[or8S]
if YKHO._cols[Yfcq].label is None:
return or8S | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hwgJ(YKHO, WKvO):\n KNgO = 0\n SZwd = YKHO.GetColumnCount()\n for fvDH in Ni9Y(SZwd):\n if not YKHO.IsColumnShown(fvDH):\n continue\n iVRZ = YKHO.GetColumn(fvDH)\n if WKvO < KNgO + iVRZ.GetWidth():\n return fvDH\n KNgO += iVRZ.GetWidth()\n return ln... | [
"0.670367",
"0.66707695",
"0.65949285",
"0.63676727",
"0.6300657",
"0.62851495",
"0.6224062",
"0.62041897",
"0.61869335",
"0.6082615",
"0.6070392",
"0.6063719",
"0.60264426",
"0.6016226",
"0.59535724",
"0.59106576",
"0.58775485",
"0.5842333",
"0.5821943",
"0.5775763",
"0.5773... | 0.84793603 | 0 |
Return a mapping of column positions and labels. | def Te1x(YKHO) -> {int: str}:
return {WKvO: fvDH.label for WKvO, fvDH in YKHO._cols.items()} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vF1R(J8oL):\n ZLJ_ = []\n for mWFP, iVRZ in J8oL.items():\n ZLJ_.append(iVRZ.label(mWFP))\n return ZLJ_",
"def vZe5(Crrw):\n return {UXqs: YRbF for YRbF, UXqs in enumerate(Crrw)}",
"def fNI0(YKHO):\n return tuple(YKHO._columns.keys())",
"def FNd5(Crrw):\n ecF5 = dict()\n for Y... | [
"0.73458505",
"0.72522795",
"0.68872035",
"0.68740356",
"0.6553106",
"0.650619",
"0.64447373",
"0.6226804",
"0.61503714",
"0.60560364",
"0.6047371",
"0.6043159",
"0.59742296",
"0.5932194",
"0.5919516",
"0.5908463",
"0.5892866",
"0.5887391",
"0.5864398",
"0.5817711",
"0.579350... | 0.7213927 | 2 |
Return value stored in config | def NMoC(YKHO, H5ew, Xvek=None):
if H5ew not in YKHO._config.keys():
return Xvek
return YKHO._config[H5ew] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZR0i(YKHO, mWFP):\n if mWFP in YKHO.config_values:\n return YKHO.config_values[mWFP]",
"def ge7L(YKHO, XLMv, H5ew):\n return GPtr.get(XLMv, H5ew)",
"def BWXx(YKHO) -> str:\n return YKHO._config.get('value')",
"def NMoC(YKHO, H5ew):\n return YKHO.config.get(H5ew)",
"def x0PB(mWFP):\n\... | [
"0.8236148",
"0.78571916",
"0.78411025",
"0.77996963",
"0.7762611",
"0.7640735",
"0.7605088",
"0.7578148",
"0.7571694",
"0.7504212",
"0.7446086",
"0.7428434",
"0.7364911",
"0.7358118",
"0.7330266",
"0.73145777",
"0.7290636",
"0.72804093",
"0.7263993",
"0.7168558",
"0.7160482"... | 0.0 | -1 |
Update the config file | def QdZT(YKHO):
YKHO.save_config_file() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H3IP(YKHO):\n pass",
"def tkU7(YKHO):\n if YKHO.newConfig['sensor'] == 0:\n YKHO.newConfig['sensor'] = YKHO.config['sensor']\n if YKHO.newConfig['camera'] == 0:\n YKHO.newConfig['camera'] = YKHO.config['camera']\n if not YKHO.newConfig['auto']['times']:\n YKHO.newConfig['auto... | [
"0.8264877",
"0.7606795",
"0.74441475",
"0.726482",
"0.7236753",
"0.72217864",
"0.7091417",
"0.7060331",
"0.70171785",
"0.70084494",
"0.6937647",
"0.69036394",
"0.6887495",
"0.68652135",
"0.6852088",
"0.6795112",
"0.679408",
"0.67330885",
"0.6727831",
"0.6705917",
"0.66979545... | 0.88768095 | 0 |
Gets the current ml_task. If "auto" it is determined | def HL4G(YKHO):
YKHO._validate_ml_task()
if YKHO.ml_task == 'auto':
Rvdw = YKHO.n_classes
if Rvdw == 2:
YKHO._estimator_type = 'classifier'
return bVah
elif Rvdw <= 20:
YKHO._estimator_type = 'classifier'
return hIuV
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OIQs():\n return H2Is",
"def OIQs():\n return H2Is",
"def fTjn(YKHO):\n return YKHO.get_current_step().get_last_task()",
"def D5gV(YKHO) -> h8nf[qe4Y.Input[int]]:\n return qe4Y.get(YKHO, 'task')",
"def D5gV(YKHO):\n return YKHO._task",
"def D5gV(YKHO):\n return YKHO._task",
"def D... | [
"0.77952605",
"0.77952605",
"0.75856113",
"0.7273964",
"0.70522803",
"0.70522803",
"0.70522803",
"0.70522803",
"0.70522803",
"0.6897995",
"0.6803446",
"0.6802864",
"0.67456496",
"0.6690138",
"0.6611777",
"0.6603375",
"0.6532655",
"0.6522994",
"0.64612824",
"0.6443876",
"0.636... | 0.7787898 | 2 |
Gets the current results_path | def sWVC(YKHO):
if YKHO._results_path is not None:
return YKHO._results_path
YKHO._validate_results_path()
pmON = YKHO.results_path
if pmON is None:
for YRbF in range(1, 10001):
mWFP = f'AutoML_{YRbF}'
if not Hy7s.path.exists(mWFP):
YKHO.create_dir... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gFQU(YKHO):\n return YKHO._local_results_path",
"def L3fv(YKHO):\n return m286",
"def RcGC(YKHO):\n return Hy7s.path.normpath(YKHO.output + '/' + YKHO.resultset_index)",
"def ssXa(YKHO):\n return YKHO._remote_results_path",
"def lAyL(YKHO):\n YKHO.results_input.delete(0, FRMp)\n pmON ... | [
"0.7681095",
"0.7608964",
"0.72525233",
"0.71424973",
"0.65749073",
"0.65520835",
"0.6454215",
"0.6348574",
"0.63169134",
"0.6294443",
"0.6256191",
"0.6253854",
"0.62473315",
"0.6234381",
"0.61912316",
"0.61699665",
"0.6166557",
"0.6160031",
"0.61576474",
"0.6157143",
"0.6109... | 0.71246856 | 4 |
Gets the current stack_models | def lQIv(YKHO):
YKHO._validate_stack_models()
if YKHO.stack_models == 'auto':
wEf2 = YKHO._get_validation_strategy()
if wEf2.get('validation_type', '') == 'custom':
return False
return True if YKHO.mode in ['Compete', 'Optuna'] else False
else:
return _qLf(YKHO.st... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FYrf(YKHO):\n return YKHO.get_field('model')",
"def FYrf(YKHO):\n return YKHO.get_field('model')",
"def ArHU(YKHO):\n YKHO.load()\n return YKHO._models",
"def ArHU(YKHO):\n return (YKHO.P, YKHO.Q)",
"def FYrf(YKHO):\n return YKHO.config.models()",
"def FYrf(YKHO):\n return YKHO._... | [
"0.6803391",
"0.6803391",
"0.64394",
"0.6406779",
"0.6275852",
"0.6213419",
"0.6203647",
"0.6106908",
"0.60893244",
"0.6065379",
"0.5988689",
"0.5973042",
"0.5936472",
"0.5927681",
"0.5875577",
"0.5875577",
"0.5875577",
"0.5875577",
"0.5875577",
"0.5875577",
"0.5875577",
"0... | 0.72028995 | 0 |
Gets the current validation_strategy | def bKV_(YKHO):
FDA8 = {}
YKHO._validate_validation_strategy()
if YKHO.validation_strategy == 'auto':
if YKHO._get_mode() == 'Explain':
FDA8 = {'validation_type': 'split', 'train_ratio': 0.75, 'shuffle': True, 'stratify': True}
elif YKHO._get_mode() == 'Perform':
FDA8... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CxLN(YKHO):\n return YKHO.validate",
"def aBkf(YKHO):\n return YKHO._validator",
"def hJTh(YKHO):\n return YKHO.get_pref_setting_for_level(veYf, YKHO._param_validation_pref.level)[0]",
"def kAcm(YKHO):\n return YKHO.get_validator_class()(**YKHO.get_validator_kwargs())",
"def Tdht(YKHO):\n ... | [
"0.6838031",
"0.6627097",
"0.6515644",
"0.6456136",
"0.6417892",
"0.63516897",
"0.634212",
"0.63212353",
"0.6285395",
"0.6255339",
"0.6221338",
"0.62149113",
"0.6194205",
"0.61286926",
"0.60330224",
"0.60326296",
"0.60178643",
"0.5966911",
"0.5960197",
"0.59587127",
"0.582506... | 0.67801 | 1 |
Gets the current start_random_models | def Ct3M(YKHO):
YKHO._validate_start_random_models()
if YKHO.start_random_models == 'auto':
if YKHO._get_mode() == 'Explain':
return 1
if YKHO._get_mode() == 'Perform':
return 5
if YKHO._get_mode() == 'Compete':
return 10
if YKHO._get_mode() ==... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T1tD(YKHO):\n\n def Q0Ir(vC9B):\n return vC9B[oyIN.random.randint(len(vC9B))]\n return map(Q0Ir, (YKHO.env.states, YKHO.env.moves))",
"def DAn4(YKHO):\n ezWE = oyIN.zeros(YKHO.dimension)\n QIYS = len(YKHO.fit_parameters)\n cvTb = len(YKHO.nuisance_parameters)\n ezWE[:QIYS] = YKHO.get... | [
"0.61098045",
"0.5519804",
"0.5495816",
"0.5439313",
"0.5439313",
"0.54216105",
"0.53990346",
"0.53893465",
"0.53497064",
"0.53497064",
"0.5334331",
"0.53277075",
"0.5320885",
"0.5319373",
"0.53144366",
"0.5306886",
"0.52948534",
"0.5272874",
"0.52695197",
"0.5261325",
"0.524... | 0.80309975 | 0 |
Gets the current random_state | def to59(YKHO):
YKHO._validate_random_state()
return _qLf(YKHO.random_state) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ADdS(YKHO):\n return YKHO.State.rand()",
"def By99(YKHO):\n return (YKHO.baseseed, YKHO.counter, YKHO.randbits_remaining)",
"def ADdS(YKHO):\n YKHO.state = YKHO.a * YKHO.state + YKHO.c\n return YKHO.state",
"def bGIA(YKHO):\n return YKHO.__state",
"def bGIA(YKHO):\n return YKHO.__stat... | [
"0.8123552",
"0.7858806",
"0.7808915",
"0.7497387",
"0.7497387",
"0.7497387",
"0.7497387",
"0.7497387",
"0.7497387",
"0.7497387",
"0.7497387",
"0.7497387",
"0.7497387",
"0.7497387",
"0.7497387",
"0.7497387",
"0.7497387",
"0.7497387",
"0.7497387",
"0.7497387",
"0.7497387",
"... | 0.8489528 | 0 |
Ensure row data is valid This currently just checks that 2D arrays match the variable components. | def p7dX(rdlD):
oZXm = [WxxW, oDWH]
for uf9D in oZXm:
for G1Hx, Ty9i in rdlD[uf9D].items():
if Ty9i is None:
continue
if oyIN.ndim(Ty9i) > 1:
assert oyIN.ndim(Ty9i) == 2
if 1 not in oyIN.shape(Ty9i):
assert isins... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ARmh(YKHO, rdlD, fvDH, BWXx):\n return True",
"def UHqo(rdlD):\n if len(rdlD) != iakR:\n raise ValueError('Row contains {0} columns, expected {1}!\\n\\n{2}\\n'.format(len(rdlD), iakR, rdlD))",
"def xzCw(YKHO, rdlD):\n raise NotImplementedError",
"def RHeV(YKHO, hkxX):\n Ukc1 = -1\n ... | [
"0.69890326",
"0.6909129",
"0.6653121",
"0.6620799",
"0.6608853",
"0.6602894",
"0.65480334",
"0.6546582",
"0.65440375",
"0.6527276",
"0.649017",
"0.64542824",
"0.6438385",
"0.6417175",
"0.6406108",
"0.6311875",
"0.6278405",
"0.6260668",
"0.6255064",
"0.6238612",
"0.62377685",... | 0.7375959 | 0 |
Return a generator for entries that all contain keyvalue pairs | def mnnt(YKHO, fK8P=None, yv6U=None, **B2fa):
fK8P = {} if fK8P is None else fK8P
r8hN = fK8P.copy()
r8hN.update(B2fa)
if yv6U is None:
yv6U = YKHO
if oDWH in yv6U[0] and WxxW in yv6U[0]:
hvDH = True
else:
hvDH = False
def BZqH(Csk6):
if hvDH:
ret... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YjpE(YKHO):\n for H5ew in YKHO.iterkeys():\n yield YKHO.get(H5ew)",
"def BVGD(YKHO):\n return iter(((TI8K.key, TI8K.value) for TI8K in YKHO.keyvaluepair_set.all()))",
"def hvE4(YKHO):\n for sxdw, BWXx in YKHO.get_tree_entries():\n for H5ew in YKHO._defining_context.infer_node(sxdw):\... | [
"0.698165",
"0.693192",
"0.66643286",
"0.665048",
"0.6484602",
"0.6445664",
"0.641337",
"0.6401473",
"0.6376863",
"0.63687515",
"0.63678294",
"0.63492215",
"0.6311998",
"0.6230821",
"0.6206421",
"0.61832714",
"0.6166452",
"0.6166452",
"0.61628634",
"0.6138833",
"0.61117566",
... | 0.0 | -1 |
Return a list of dictionaries that only contain values for keys | def CPo8(YKHO, sjXb, yv6U=None):
_vST = YKHO.minimal() if yv6U is None else yv6U
def Xmyj(Csk6, sjXb):
fK8P = {}
for G1Hx in sjXb:
if G1Hx in Csk6:
fK8P[G1Hx] = Csk6[G1Hx]
else:
fK8P[G1Hx] = -999
return fK8P
yv6U = []
for C... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QZEs(nITe, ZVgY):\n return dict(((H5ew, BWXx) for H5ew, BWXx in list(nITe.items()) if H5ew in ZVgY))",
"def ZNxQ(ZfUD, sjXb):\n return dict(((G1Hx, Ty9i) for G1Hx, Ty9i in ZfUD.iteritems() if G1Hx in sjXb))",
"def DNHh(r8hN, sjXb):\n return {G1Hx: Ty9i for G1Hx, Ty9i in r8hN.items() if G1Hx not in... | [
"0.7157758",
"0.6764101",
"0.67270654",
"0.6699573",
"0.6676822",
"0.6673541",
"0.6655425",
"0.66365665",
"0.66270673",
"0.6611581",
"0.6571578",
"0.65568775",
"0.6545871",
"0.6436229",
"0.6432588",
"0.6381771",
"0.63771033",
"0.6347461",
"0.63027394",
"0.62880474",
"0.628692... | 0.72772044 | 0 |
Return lists of values grouped by other independent variables | def qDyV(YKHO, sjXb, Crrw='dict', uDmZ=False):
TTm1 = YKHO.combined()
iku2 = YKHO.filtered(sjXb, lst=TTm1)
yvT9 = {}
for fK8P in iku2:
qFj8 = fK8P[WxxW].copy()
Csk6 = {}
ejme = sjXb.copy()
for G1Hx in sjXb:
if G1Hx in qFj8:
Csk6[G1Hx] = qFj8.po... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PfnP(TUQS):\n k3C5 = len(TUQS[0])\n for ZYSO in TUQS[1:]:\n if len(ZYSO) != k3C5:\n raise ValueError('Please make sure the length is the same if you want to input multiple values when the type of variables is t_array or t_mapping')\n g3mS = list()\n k3C5 = len(TUQS[0])\n K5tf =... | [
"0.6295473",
"0.6200967",
"0.57439184",
"0.5688238",
"0.56285703",
"0.55854857",
"0.55849904",
"0.5516372",
"0.5502717",
"0.5489601",
"0.5482229",
"0.5476639",
"0.54517305",
"0.545083",
"0.54401696",
"0.54284453",
"0.5395837",
"0.539547",
"0.53786176",
"0.5318466",
"0.5317963... | 0.0 | -1 |
Construct a heap from a list of elements with priorities. Each element of the list must be in the form (Item, Priority). | def mRef(YKHO, F6AI):
for tTpl in F6AI:
YKHO.n += 1
YKHO.A.append(tTpl)
YKHO.pos[tTpl[0]] = YKHO.n
for YRbF in range(YKHO.n // 2, 0, -1):
YKHO.combine(YRbF) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sEWy(list):\n pass",
"def Npt8(YKHO, DumB):\n for H5ew in DumB:\n YKHO.insert(H5ew)",
"def FIMM(YKHO, list=[]):\n YKHO.heap = []\n for U6D_ in list:\n YKHO.add(U6D_)",
"def sEWy(DumB):\n _eVy.heapify(DumB)\n DumB[:] = [_eVy.heappop(DumB) for YRbF in range(len(DumB))]",
"... | [
"0.6715845",
"0.6644555",
"0.66232336",
"0.6562983",
"0.6562983",
"0.6440951",
"0.64229244",
"0.64208883",
"0.64108974",
"0.63691944",
"0.6351629",
"0.63361603",
"0.632387",
"0.6306449",
"0.6306449",
"0.62739",
"0.62633675",
"0.62222654",
"0.6173713",
"0.6163355",
"0.61413926... | 0.6710219 | 1 |
Constructs a Octave ResNet26 model. | def Zzyv(mL4f=False, **B2fa):
C3ST = RgVn(MF6R, [2, 2, 2, 2], **B2fa)
return C3ST | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f55J(pE6j, jTqs, DYuh):\n C3ST = S1Vm(em1m, [1, 1, 1, 1], pE6j, jTqs, DYuh)\n return C3ST",
"def OwNx(pE6j, jTqs, DYuh):\n C3ST = S1Vm(em1m, [3, 4, 6, 3], pE6j, jTqs, DYuh)\n return C3ST",
"def Gdbk(YKHO):\n YKHO.model = or7t(weights='imagenet')",
"def qUH4(pE6j, jTqs, DYuh):\n C3ST = S... | [
"0.65736985",
"0.6366523",
"0.6366468",
"0.6340577",
"0.6290355",
"0.62448686",
"0.6211965",
"0.62079406",
"0.6202202",
"0.61859906",
"0.617765",
"0.6167639",
"0.6150246",
"0.6131579",
"0.61293316",
"0.6126124",
"0.60872185",
"0.60808474",
"0.60243255",
"0.6022623",
"0.601866... | 0.64773536 | 1 |
Constructs a Octave ResNet50 model. | def z8mW(mL4f=False, **B2fa):
C3ST = RgVn(MF6R, [3, 4, 6, 3], **B2fa)
return C3ST | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uwZX(mL4f=False, **B2fa):\n C3ST = S1Vm(MF6R, [3, 4, 6, 3], **B2fa)\n if mL4f:\n C3ST.load_state_dict(rA0C.load_url(mDCG['resnet50']))\n FBfN = JpOW(C3ST.fc)\n C3ST.fc = FBfN\n return C3ST",
"def L9vW(GhuM, wDQ7):\n from keras.applications.resnet import ResNet50\n return ResNet50(... | [
"0.6788361",
"0.67803186",
"0.674441",
"0.6740062",
"0.6740062",
"0.6740062",
"0.6740062",
"0.67154825",
"0.67154825",
"0.6712815",
"0.6572177",
"0.6566482",
"0.6549519",
"0.6523207",
"0.64100075",
"0.6408448",
"0.6368369",
"0.6368369",
"0.6367889",
"0.63454634",
"0.6303097",... | 0.66204983 | 10 |
Constructs a Octave ResNet101 model. | def IZwB(mL4f=False, **B2fa):
C3ST = RgVn(MF6R, [3, 4, 23, 3], **B2fa)
return C3ST | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K0Xe(mL4f=False, **B2fa):\n C3ST = S1Vm('resnet101', MF6R, [3, 4, 23, 3], **B2fa)\n if mL4f:\n C3ST.load_state_dict(rA0C.load_url(mDCG['resnet101']))\n return C3ST",
"def K0Xe(mL4f=False, **B2fa):\n C3ST = S1Vm(MF6R, [3, 4, 23, 3], **B2fa)\n if mL4f:\n C3ST.load_state_dict(rA0C.l... | [
"0.6975478",
"0.6963279",
"0.6944051",
"0.6944051",
"0.6944051",
"0.6944051",
"0.69128805",
"0.68887615",
"0.6869963",
"0.6868124",
"0.68124294",
"0.6709491",
"0.6664259",
"0.6648746",
"0.66283625",
"0.66283625",
"0.65992206",
"0.65794027",
"0.6534455",
"0.6504741",
"0.646747... | 0.6689366 | 12 |
Constructs a Octave ResNet152 model. | def SCmq(mL4f=False, **B2fa):
C3ST = RgVn(MF6R, [3, 8, 36, 3], **B2fa)
return C3ST | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Gdbk(YKHO):\n YKHO.model = or7t(weights='imagenet')",
"def hVyu(mL4f=False, **B2fa):\n C3ST = S1Vm('resnet152', MF6R, [3, 8, 36, 3], **B2fa)\n if mL4f:\n C3ST.load_state_dict(rA0C.load_url(mDCG['resnet152']))\n return C3ST",
"def hVyu(mL4f=False, **B2fa):\n C3ST = S1Vm(MF6R, [3, 8, 36... | [
"0.71429336",
"0.71426964",
"0.70883363",
"0.7048324",
"0.70366234",
"0.70190185",
"0.6981999",
"0.6981999",
"0.6981999",
"0.6981999",
"0.6969816",
"0.6943194",
"0.6817958",
"0.67309207",
"0.6713831",
"0.6711944",
"0.6711944",
"0.6689598",
"0.6594432",
"0.65649575",
"0.624270... | 0.6930058 | 12 |
Remove the files written to disk by this class of tests. | def SkTA():
Hy7s.remove(u0s6[:-4] + '_no_grave.h5m') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tBIc(YKHO):\n for eHNT in Hy7s.listdir('/tmp'):\n if not eHNT.startswith(YKHO.FILE_PREFIX):\n continue\n Hy7s.remove(Hy7s.path.join('/tmp', eHNT))",
"def tBIc(YKHO) -> None:\n iku2 = [eHNT for eHNT in SC2F.glob('steps/tests/test_output/*') if not ZbWC.match('\\\\.keep', eHNT)]\... | [
"0.8038646",
"0.80053955",
"0.79976135",
"0.7974729",
"0.7966363",
"0.78566366",
"0.7773938",
"0.7761133",
"0.77407455",
"0.7704826",
"0.76752174",
"0.76329154",
"0.76329154",
"0.76329154",
"0.7632071",
"0.7624899",
"0.761122",
"0.76048136",
"0.7599777",
"0.7578465",
"0.75228... | 0.0 | -1 |
Given a distribution, given by the list p_list, returns the entropy of the distribution. | def oqGu(l7mh):
assert len(l7mh) > 0
ut5U = 0.0
for XP5J in l7mh:
if XP5J == 0.0:
continue
ut5U += XP5J * epAf.log(XP5J)
return ut5U | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oqGu(vC9B):\n WErR = oyIN.bincount(vC9B) / len(vC9B)\n with oyIN.errstate(divide='ignore'):\n xmUr = oyIN.log2(WErR)\n xmUr[~oyIN.isfinite(xmUr)] = 0\n return -oyIN.sum(WErR * xmUr)",
"def iR8f(IZxK):\n return -sum(map(lambda XP5J: XP5J * RKD7(XP5J, 2), IZxK))",
"def pUHp(XP5J):\n... | [
"0.75446194",
"0.73901826",
"0.7331276",
"0.7134225",
"0.70520824",
"0.7050444",
"0.69640076",
"0.6912087",
"0.68127155",
"0.68039405",
"0.6800982",
"0.6751854",
"0.6749378",
"0.6710503",
"0.6699265",
"0.6682273",
"0.6634976",
"0.6633226",
"0.6585759",
"0.6569177",
"0.6564183... | 0.83441865 | 0 |
Computes counts for ALL compatible predictions for the given entry, taking missing values into account. counts is assumed to be a defaultdict(int) instance | def jnkx(YKHO, bTKY, BWz1):
if YKHO.type == 'v':
BWz1[YKHO.value] += 1
return
Ty9i = bTKY[YKHO.feature]
if Ty9i is None:
for wEf2, Z9rn in YKHO.children.iteritems():
Z9rn.predict_all(bTKY, BWz1)
return
if YKHO.type == 's':
Z9rn = None
try:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JWEM(Csk6):\n return jKi7.moves.reduce(lambda WKvO, LVAh: WKvO + 1 if LVAh == None else WKvO, Csk6.values(), 0)",
"def Oi0G(YKHO, QU6O):\n \"\"\" Based on each instance, I augment empirical counts for every word and its BIO label in feature_count_table and for every transition from previous label to cu... | [
"0.627431",
"0.6079571",
"0.5920963",
"0.5891744",
"0.5813785",
"0.5808457",
"0.57633555",
"0.5717828",
"0.5693999",
"0.5685904",
"0.5680773",
"0.5613226",
"0.55953914",
"0.5592989",
"0.5554436",
"0.5554436",
"0.5554436",
"0.5552211",
"0.5529736",
"0.55194706",
"0.55182385",
... | 0.5712293 | 8 |
Return shape of data i.e. image size. | def YJuW(YKHO):
return (3, 224, 224) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lNai(YKHO):\n return YKHO.data.shape[:2]",
"def lNai(YKHO):\n return YKHO.data.shape[:2]",
"def ROpF(YKHO):\n return YKHO.data.shape",
"def ROpF(YKHO):\n return YKHO.data.shape",
"def ROpF(YKHO):\n return YKHO.data.shape",
"def ROpF(YKHO):\n return YKHO.data.shape",
"def ROpF(YKHO... | [
"0.82124084",
"0.82124084",
"0.8147183",
"0.8147183",
"0.8147183",
"0.8147183",
"0.8147183",
"0.80937505",
"0.8010233",
"0.8006064",
"0.8006064",
"0.8006064",
"0.80019945",
"0.79247403",
"0.79092556",
"0.78679425",
"0.786282",
"0.7814866",
"0.7725889",
"0.76113486",
"0.75898"... | 0.0 | -1 |
Returns mean of the entire dataset. | def GovM(YKHO):
return (0.485, 0.456, 0.406) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JBMS(YKHO):\n return oyIN.mean(YKHO.data_array)",
"def JBMS(YKHO):\n return YKHO.data.mean(axis=-1, keepdims=True)",
"def JBMS(YKHO):\n return YKHO.aggregate(oyIN.mean)",
"def USKV(nPrm):\n return nPrm.mean()",
"def JBMS(YKHO):\n JBMS = sum(YKHO.data) / YKHO.size\n return JBMS",
"de... | [
"0.82411206",
"0.8131355",
"0.8031648",
"0.8015793",
"0.79474837",
"0.7917345",
"0.7879034",
"0.78769094",
"0.7875092",
"0.78153133",
"0.76866186",
"0.767841",
"0.7648848",
"0.7648848",
"0.75604665",
"0.7517856",
"0.74952906",
"0.7446794",
"0.7446794",
"0.7446794",
"0.7443946... | 0.0 | -1 |
Get the selected locale from user settings. | def rDcu():
YqMg = iGdG.query.filter(iGdG.name == 'default_language').first()
if YqMg is not None:
return YqMg.value
return 'en' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rDcu():\n G0mS = QePW.args.get('locale')\n lgvV = P4t4.config['LANGUAGES']\n if G0mS in lgvV:\n return G0mS\n QTiD = QePW.args.get('login_as')\n if QTiD:\n G0mS = DW23[int(QTiD)]['locale']\n if G0mS in lgvV:\n return G0mS\n G0mS = QePW.headers.get('locale')\n ... | [
"0.7412174",
"0.7108176",
"0.69538045",
"0.69421023",
"0.68359756",
"0.67491263",
"0.67384523",
"0.6731309",
"0.650032",
"0.63808835",
"0.6361166",
"0.63441944",
"0.63441944",
"0.6340159",
"0.62725174",
"0.61259097",
"0.6097418",
"0.6096102",
"0.60663605",
"0.60374147",
"0.60... | 0.73380387 | 1 |
Whether or not this is a hardened node. Hardened nodes are those with indices >= 0x80000000. | def ptMn(YKHO):
return YKHO.index & 2147483648 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ab3f(YKHO):\n return YKHO.zero_son is None and YKHO.one_son is None",
"def Wc7h(YKHO):\n if YKHO.is_leaf() or YKHO.is_semileaf():\n return False\n return True",
"def Wwqx(YKHO):\n return False",
"def Wwqx(YKHO):\n return False",
"def loae(YKHO):\n return YKHO.pixel_count > 0",
... | [
"0.62713253",
"0.60492986",
"0.5942298",
"0.5942298",
"0.5901078",
"0.57642645",
"0.5762194",
"0.5736317",
"0.57134473",
"0.5682844",
"0.5674507",
"0.5665041",
"0.56444204",
"0.5642746",
"0.56300306",
"0.55741334",
"0.55603236",
"0.55570173",
"0.55541235",
"0.5552279",
"0.552... | 0.68602026 | 0 |
Creates an instance of this model from a dictionary | def rQfz(Emd4, cmPJ):
if cmPJ is None:
return None
NT__ = cmPJ.get('accessToken')
sOU6 = cmPJ.get('tokenType')
P1dF = eoJU.models.error.Error.from_dictionary(cmPJ.get('error')) if cmPJ.get('error') else None
return Emd4(NT__, sOU6, P1dF) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rQfz(Emd4, cmPJ):\n if cmPJ is None:\n return None\n id = cmPJ.get('id')\n mWFP = cmPJ.get('name')\n tDvy = cmPJ.get('type')\n fFb7 = cmPJ.get('usageBytes')\n return Emd4(id, mWFP, tDvy, fFb7)",
"def eLpg(Emd4, cmPJ):\n return Emd4(**cmPJ)",
"def eLpg(Emd4, cmPJ):\n return Em... | [
"0.8317533",
"0.81689686",
"0.81689686",
"0.81188685",
"0.808892",
"0.7977596",
"0.7949056",
"0.79225504",
"0.78983366",
"0.7893884",
"0.7887517",
"0.7882494",
"0.7881197",
"0.7876339",
"0.78581846",
"0.78387725",
"0.78037786",
"0.78037786",
"0.78037786",
"0.78037786",
"0.780... | 0.7370376 | 100 |
returns the l2 penalty on (trainable) network parameters combined as tensor product. | def Vwjv(nzXS):
assert Nlk2.ocsvm_loss is True
YiU0 = 0
fhcK = nzXS.trainable_layers
CLda = len(fhcK) - 1
assert CLda > 0
VE1X = 1.0
if fhcK[CLda - 1].b is not None:
YiU0 += Kt_s.sum(fhcK[CLda - 1].b ** 2)
for YRbF in range(CLda - 1):
VE1X *= Kt_s.sum(fhcK[CLda - 1 - YRbF... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _vNk(YKHO) -> ht2j.Tensor:\n N77f = 0\n for xqoZ in YKHO.model.parameters():\n N77f += (xqoZ ** 2).sum()\n return N77f",
"def QSId(YKHO):\n return YKHO.l2 * oyIN.linalg.norm(YKHO.weights) ** 2",
"def rA2z(poeB: base.Output):\n if isinstance(poeB, P8oC.OutputWithPrior):\n return... | [
"0.7459851",
"0.73080754",
"0.71070445",
"0.7071918",
"0.6722846",
"0.6637411",
"0.66100603",
"0.6606142",
"0.65346557",
"0.64298236",
"0.64298236",
"0.64298236",
"0.64195216",
"0.6411184",
"0.6407858",
"0.6394501",
"0.63773257",
"0.634488",
"0.63392335",
"0.6293014",
"0.6180... | 0.66554886 | 5 |
Return a 404 error when someone tries to call the URL. | def akbE(N0q9, Psis, MOPg):
return (404, MOPg, 'NOT AN ASSERTION') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o3cf():\n return c1Bu(404)",
"def RQdI(P1dF):\n return 'Bummer, there is nothing at this URL.'",
"def o3cf():\n raise CnSx.HTTPError(404, 'Not Found.')",
"def m7kB(tTpl):\n return ('Sorry, nothing at this URL.', 404)",
"def m7kB(tTpl):\n return ('Sorry, nothing at this URL.', 404)",
"d... | [
"0.77854127",
"0.7611726",
"0.7589559",
"0.7564481",
"0.7564481",
"0.7564481",
"0.7564481",
"0.7564481",
"0.7564481",
"0.7564481",
"0.7528948",
"0.7528948",
"0.7528948",
"0.7528948",
"0.7528948",
"0.7528948",
"0.7528948",
"0.7528948",
"0.74066204",
"0.73611426",
"0.73296165",... | 0.0 | -1 |
Mock an error response when calling the OData API for user details. | def pAVG(YKHO, XxJL, NtEF):
def db6b(QePW, j8eK, MOPg):
"""
Return a 500 error when someone tries to call the URL.
"""
MOPg['CorrelationId'] = 'aefd38b7-c92c-445a-8c7a-487a3f0c7a9d'
MOPg['RequestNo'] = '[787177]'
return (500, MOPg, 'Failure!')
V_D6 = ','.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cWAF(YKHO):\n Mkmy = TMAJ.Mock(spec=G4JS.Response)\n Mkmy.content = \"{'normal': 'resource'}\"\n eHNT = fGC9(**YKHO.client_kwargs)\n eHNT.client._request = lambda *qIxc, **B2fa: Mkmy\n Mkmy.status_code = 404\n YKHO.assertRaises(Bx6I.HTTPNotFound, eHNT.user_profile_get)\n Mkmy.status_code =... | [
"0.68724155",
"0.6683057",
"0.6637301",
"0.6578398",
"0.6559852",
"0.6474468",
"0.6464813",
"0.6425861",
"0.638332",
"0.63573205",
"0.6336519",
"0.6328632",
"0.63244635",
"0.62987155",
"0.6267484",
"0.62195075",
"0.61980534",
"0.6191649",
"0.61694646",
"0.614538",
"0.61373806... | 0.73752326 | 0 |
Generate all possible pairs from the list of given elements. | def MyOv(UqER):
if len(UqER) < 2:
return []
elif len(UqER) == 2:
return [(UqER[0], UqER[1])]
else:
V6QO = []
for ATUZ in UqER[1:]:
V6QO.append((UqER[0], ATUZ))
return MyOv(UqER[1:]) + V6QO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kgDL(yv6U):\n for YRbF in range(1, len(yv6U), 2):\n yield (yv6U[YRbF - 1], yv6U[YRbF])",
"def MyOv(DumB, BA9O=False):\n if BA9O:\n DumB = sorted(DumB)\n for YRbF, RMvl in enumerate(DumB):\n for r845, d9Qd in enumerate(DumB):\n if r845 > YRbF:\n yield (R... | [
"0.7500274",
"0.6851043",
"0.6840614",
"0.68141717",
"0.6754132",
"0.669949",
"0.6683781",
"0.6671177",
"0.6668704",
"0.65523124",
"0.64457446",
"0.64399433",
"0.6394851",
"0.636628",
"0.6352524",
"0.6351291",
"0.6324047",
"0.6315178",
"0.6308765",
"0.63008136",
"0.62359875",... | 0.8119166 | 0 |
dataset_name should be 'train' or 'test' | def XhRs(j3aw, exwG=500000, wBZC=PtXs.METER_MAP.values()):
d62X = oAb3.Path(j3aw + '_small_store_joined.h5')
if d62X.exists():
BxZP = VXqG(d62X, wBZC)
else:
ahpu = oAb3.Path(j3aw + '_store_joined.h5')
aQTK = VXqG(ahpu, wBZC)
BxZP = {H5ew: G3xg.head(exwG) for H5ew, G3xg in aQT... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oUGu(j3aw):\n XD8k = j3aw.lower()\n if XD8k in prG7.keys():\n NvFG = prG7[XD8k]\n (cC56, VJv0), (sAoX, H96n) = NvFG['data'].load_data()\n else:\n raise IOError('Dataset {0} is NOT supported'.format(j3aw))\n if NvFG['data type'] == 'image':\n cC56 = qXg7(cC56, NvFG)\n ... | [
"0.7228631",
"0.70241654",
"0.70175004",
"0.70087993",
"0.6977617",
"0.6900802",
"0.68130064",
"0.6774054",
"0.67727417",
"0.67533123",
"0.673811",
"0.67380196",
"0.6732079",
"0.6708",
"0.6619651",
"0.6580174",
"0.65409255",
"0.6507022",
"0.6495979",
"0.6469288",
"0.64399636"... | 0.0 | -1 |
A cumulative metric is one that needs a prior value to calculate the next value. i.e. only the deltas for the current observed values are reported. A noncumulative metric is one where the absolute observed value is reported every time. | def rHEc(YKHO):
return YKHO.name in ('app.cpu', 'app.uptime', 'app.disk.bytes', 'app.disk.requests', 'app.mem.majflt', 'app.io.wait') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yvjF(YKHO):\n return (1 + YKHO.pct_change).cumprod()",
"def gZdb(YKHO):\n Bcwd = None\n for _P6x in YKHO.ac:\n if _P6x[0] is None:\n continue\n r8hN = YKHO.get_model(last=False, a=_P6x[0], c=_P6x[1])\n Bcwd = r8hN if Bcwd is None else Bcwd + r8hN\n return Bcwd",
... | [
"0.6869948",
"0.67523324",
"0.64255375",
"0.6341759",
"0.63019013",
"0.6291231",
"0.62111056",
"0.6121284",
"0.61202884",
"0.60518414",
"0.6049944",
"0.60443413",
"0.59521824",
"0.5944532",
"0.594417",
"0.5942714",
"0.5922843",
"0.5915984",
"0.58872694",
"0.58869976",
"0.5872... | 0.5677045 | 30 |
Closes any files held open by this reader. | def DDI8(YKHO):
try:
YKHO._failed = True
if YKHO._file is not None:
YKHO._file.close()
YKHO._failed = False
finally:
YKHO._file = None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DDI8(YKHO):\n for nUeQ in YKHO._files:\n _ABP.file_hub.close(nUeQ)",
"def RnT3(YKHO):\n while YKHO.close_file():\n pass",
"def DDI8(YKHO):\n if YKHO.current_file_number is not None:\n YKHO.fh_raw.close()\n YKHO.current_file_number = None",
"def DDI8(YKHO):\n YKHO._... | [
"0.7826722",
"0.77460366",
"0.7503366",
"0.72826236",
"0.72478783",
"0.7243321",
"0.7204818",
"0.7204593",
"0.7146203",
"0.7134031",
"0.7112463",
"0.71020526",
"0.70459485",
"0.7036263",
"0.70164305",
"0.7010969",
"0.6980717",
"0.6947164",
"0.6919161",
"0.68919945",
"0.688708... | 0.6589813 | 53 |
Returns true if the current process is still running. | def l0ZG(Ii1o):
try:
Hy7s.kill(Ii1o, 0)
return True
except OSError as e:
return tTpl.errno != d1hN.ESRCH | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WTIh(YKHO):\n if YKHO._gone:\n return False\n try:\n return YKHO.create_time == YKHO.get_process_create_time()\n except sPqL:\n YKHO._gone = True\n return False",
"def WTIh(YKHO):\n if YKHO._process:\n return YKHO._process.poll() is None\n else:\n retu... | [
"0.8082826",
"0.8080181",
"0.8026835",
"0.8013894",
"0.8012157",
"0.7952827",
"0.78069186",
"0.77576995",
"0.7746866",
"0.77379435",
"0.7681154",
"0.76794994",
"0.7676883",
"0.76404685",
"0.7629628",
"0.76252586",
"0.75991505",
"0.7584161",
"0.75792927",
"0.75562996",
"0.7544... | 0.7129584 | 59 |
YOLOV3 network hybrid forward. | def YpZi(YKHO, vuvg, WKvO, *qIxc):
tuUc = []
WLm5 = []
ubN1 = []
_Ca3 = []
zWd_ = []
YkN8 = []
yUQ8 = []
vcFw = []
iAwL = []
for EtM5, XkN1, hlel in zip(YKHO.stages, YKHO.yolo_blocks, YKHO.yolo_outputs):
WKvO = EtM5(WKvO)
iAwL.append(WKvO)
for YRbF, XkN1, hlel... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVH6(YKHO, WKvO):\n for mWFP, yR_P in YKHO.base._modules.items():\n if mWFP == 'avgpool':\n break\n if mWFP == 'layer3':\n V70B = iQnE(WKvO)\n WKvO = iQnE(yR_P(WKvO))\n qR5I = iQnE(WKvO)\n 'for name, param in self.base.named_parameters():\\n prin... | [
"0.65314513",
"0.6292418",
"0.6263829",
"0.6261159",
"0.62541807",
"0.6251553",
"0.6219152",
"0.62162906",
"0.61927277",
"0.6178997",
"0.6141839",
"0.6136382",
"0.6127676",
"0.6119838",
"0.6111306",
"0.61022437",
"0.6099669",
"0.60930973",
"0.60845137",
"0.60679704",
"0.60615... | 0.7524717 | 0 |
Reset class categories and class predictors. | def f785(YKHO, KndY):
YKHO._clear_cached_op()
YKHO._classes = KndY
if YKHO._pos_iou_thresh >= 1:
YKHO._target_generator = DBSK(len(KndY), YKHO._ignore_iou_thresh)
for o4Jx in YKHO.yolo_outputs:
o4Jx.reset_class(KndY) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SiRx(YKHO):\n YKHO.pred_classes.clear()\n YKHO.gold_classes.clear()\n YKHO.pred_probas.clear()\n YKHO.gold_probas.clear()\n YKHO.loss = 0\n YKHO.nb_batches = 0\n YKHO.prec_rec_f1 = None\n YKHO.acc = None\n YKHO.mcc = None",
"def SiRx(YKHO):\n G9jH.info('Resetting DINTModel.')\n ... | [
"0.72172534",
"0.6899433",
"0.6748963",
"0.6726632",
"0.66773576",
"0.6629043",
"0.6529936",
"0.6484326",
"0.6478405",
"0.6478405",
"0.6471619",
"0.6466328",
"0.6457058",
"0.62709737",
"0.6202787",
"0.61770207",
"0.6149169",
"0.612528",
"0.60959744",
"0.6091237",
"0.6087531",... | 0.70744306 | 1 |
Generate a test environment using the given dataset. The settings are temporarily overwritten to use the test data. | def rgEB(TBXe, __n6):
tiqR(TBXe, __n6)
for e2h5 in ['train', 'test']:
for nw7b in ['images', 'labels']:
puqW = e2h5 + '.' + nw7b
jORC = 'datasets.mnist.' + puqW
VqRE = o59G(jORC)
qby3 = __n6 + '.' + puqW
_sv2(VqRE, qby3) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d2RT(__n6, TBXe):\n print('>>> Test environment:')\n print('dataset:', __n6)\n print('tmpdir:', TBXe)\n rgEB(TBXe, __n6)\n return {'dataset': __n6, 'tmpdir': TBXe}",
"def a2Zm(__n6):\n print('## =========================================================')\n print('## Dataset:', __n6)\n ... | [
"0.7599391",
"0.72667193",
"0.69813424",
"0.66441184",
"0.64025056",
"0.6268748",
"0.625678",
"0.6244715",
"0.61173195",
"0.60907793",
"0.60787404",
"0.60093623",
"0.5926749",
"0.5911557",
"0.5894079",
"0.58914727",
"0.58914727",
"0.58914727",
"0.58914727",
"0.58877015",
"0.5... | 0.7804764 | 0 |
Extracts (typically) overlapping regular patches from a grayscale image Changing the offset and stride parameters will result in images reconstructed by reconstruct_from_grayscale_patches having different dimensions! Callers should pad and unpad as necessary! | def qBU1(VXjJ, ROpF, vgXP=(0, 0), _0fC=(1, 1)):
Xlvp, nfKA = oyIN.meshgrid(oyIN.arange(ROpF[1]), oyIN.arange(ROpF[0]))
vC9B, a1PO = oyIN.meshgrid(oyIN.arange(vgXP[1], VXjJ.shape[1] - ROpF[1] + 1, _0fC[1]), oyIN.arange(vgXP[0], VXjJ.shape[0] - ROpF[0] + 1, _0fC[0]))
vC9B = vC9B.ravel()
a1PO = a1PO.ravel(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MiYS(LNo8, FTrt, dWKF, Sov1, OCfN, MKlR, yzQ0, Z9rn, RhNS, ZM6q):\n XP5J = ZylS.image.extract_patches(LNo8, [1, FTrt, FTrt, 1], [1, dWKF, dWKF, 1], [1, 1, 1, 1], padding='SAME')\n XP5J = ZylS.reshape(XP5J, [OCfN, -1, FTrt * FTrt * Z9rn])\n MRJo = FMa_(MKlR, dWKF)\n EC4D = FMa_(yzQ0, dWKF)\n b7bZ... | [
"0.69615763",
"0.6910621",
"0.6902872",
"0.6756077",
"0.6684931",
"0.6669656",
"0.66367173",
"0.66181797",
"0.6613878",
"0.6597331",
"0.65837264",
"0.65633184",
"0.65623057",
"0.652115",
"0.6456871",
"0.6398756",
"0.6369198",
"0.6359843",
"0.63577175",
"0.6351932",
"0.6345157... | 0.7973168 | 0 |
Get the surname of person | def SSA0(YKHO):
return YKHO._surname | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SSA0(YKHO):\n return YKHO.__surname",
"def SSA0(YKHO):\n if 'surname' in YKHO._prop_dict:\n return YKHO._prop_dict['surname']\n else:\n return None",
"def SSA0(YKHO):\n if 'surname' in YKHO._prop_dict:\n return YKHO._prop_dict['surname']\n else:\n return None",
... | [
"0.84594584",
"0.8456766",
"0.8456766",
"0.7657546",
"0.75671947",
"0.7503995",
"0.71551466",
"0.7144786",
"0.6926863",
"0.68105274",
"0.67284966",
"0.66660845",
"0.6651198",
"0.6651198",
"0.6651198",
"0.6651198",
"0.6651198",
"0.66335547",
"0.6632711",
"0.65882415",
"0.65831... | 0.8435841 | 4 |
Returns the number of cluster a clustering has. | def plx_(YKHO, l2Zr):
return len(l2Zr.clusters) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H8Ca(YKHO) -> int:\n return len(YKHO.get_all_cluster_ids())",
"def R1f6(YKHO) -> int:\n R1f6 = max(1, round(16 ** 3 * (YKHO.vein.purity / 100.0) / YKHO.cluster_size))\n return YKHO.distribution.scale_cluster_count(R1f6)",
"def o_ia(YKHO):\n return len(YKHO.clusters)",
"def o_ia(YKHO):\n re... | [
"0.8762908",
"0.84918106",
"0.80784905",
"0.77352",
"0.71900326",
"0.7170602",
"0.7130262",
"0.70022637",
"0.6933635",
"0.68955094",
"0.6862841",
"0.6851633",
"0.68233424",
"0.68233424",
"0.6755365",
"0.6752718",
"0.66931707",
"0.66912186",
"0.6680638",
"0.66151196",
"0.66151... | 0.81173706 | 2 |
Returns the number of elements that are clusterized in this clustering (which may not be the total number of elements of the dataset if there were noisy elements) | def djGG(YKHO, l2Zr):
return l2Zr.total_number_of_elements | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o_ia(YKHO):\n return len(YKHO.clusters)",
"def H8Ca(YKHO) -> int:\n return len(YKHO.get_all_cluster_ids())",
"def yJv_(__n6):\n return __n6.count()",
"def R1f6(YKHO) -> int:\n R1f6 = max(1, round(16 ** 3 * (YKHO.vein.purity / 100.0) / YKHO.cluster_size))\n return YKHO.distribution.scale_cl... | [
"0.7475261",
"0.73660713",
"0.7281601",
"0.7209829",
"0.7184535",
"0.71797055",
"0.71275187",
"0.7005667",
"0.6999668",
"0.69551873",
"0.68624055",
"0.68511283",
"0.67983764",
"0.6792057",
"0.6780994",
"0.6774845",
"0.6771099",
"0.66886616",
"0.66632557",
"0.66320395",
"0.661... | 0.74841356 | 0 |
Padding function for 1D sequences | def EXi_(aWuw, bW4_):
if bW4_ - len(aWuw) < 0:
aWuw = aWuw[:bW4_]
else:
aWuw = oyIN.pad(aWuw, (0, bW4_ - len(aWuw)), 'constant', constant_values=0)
return aWuw | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hVLt(Q6uT, exwG):\n return",
"def gc7n(fUYa, u54L=None, dvgN=0):\n return nahp(u54L, dvgN).apply(fUYa)[0]",
"def gc7n(Q6uT):\n O2tj = Q6uT.strip().split('1')\n XVAW = O2tj[0]\n zsAc = XVAW + '1'\n BSnl = 0\n mnwT = 0\n for YRbF in range(1, len(O2tj) - 1):\n jvSB = O2tj[YRbF]\... | [
"0.77374345",
"0.76362944",
"0.737829",
"0.7223377",
"0.7206336",
"0.7144797",
"0.710272",
"0.70930755",
"0.70851046",
"0.705326",
"0.7034367",
"0.700346",
"0.6976378",
"0.6973453",
"0.69480914",
"0.6854283",
"0.68475085",
"0.6833989",
"0.6814044",
"0.6806954",
"0.67819375",
... | 0.6773792 | 22 |
Get BERT embeddings from a dataloader generator. | def uW4I(lMIx, dhbi: torch.nn.Module, yIVm: False):
ds3w = ht2j.cuda.is_available()
begE = ht2j.device('cuda:0' if ds3w else 'cpu')
with ht2j.set_grad_enabled(False):
KTQ3 = {'ids': [], 'embeddings': [], 'labels': []}
if yIVm:
for wKXK, ftyx, _T8_, JwAV in lMIx:
f... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nmay(C3ST, DWkG, begE=ht2j.device('cpu')):\n KTQ3 = []\n Crrw = []\n for ZfUD in DWkG:\n nPrm, UXqs = ZfUD\n nPrm = nPrm.view(-1, 1, nPrm.shape[-1])\n nPrm = nPrm.to(begE)\n UXqs = UXqs.to(begE)\n hlel = C3ST(nPrm).squeeze(1)\n wjQX = hlel.cpu().data.numpy()\n... | [
"0.6092691",
"0.60436624",
"0.60151154",
"0.59234816",
"0.59059787",
"0.5782936",
"0.5690828",
"0.5666181",
"0.5597089",
"0.5583591",
"0.5570702",
"0.55484855",
"0.55165946",
"0.5495378",
"0.5463972",
"0.5451432",
"0.54469055",
"0.54453945",
"0.5405851",
"0.54010916",
"0.5367... | 0.73473763 | 0 |
Justified (name, value, units, doc) strings for active parameters. | def QOi3(YKHO):
Pxxw = max((len(XP5J.name) for XP5J in YKHO))
cZAB = max((len(XP5J.value_str) for XP5J in YKHO.params.values()))
akRU = max((len(XP5J.units) for XP5J in YKHO.params.values()))
return [(XP5J.name.ljust(Pxxw), XP5J.value_str.ljust(cZAB), XP5J.units.ljust(akRU), XP5J.__doc__) for XP5J in YK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n IuHX = len([XP5J for XP5J in YKHO if XP5J])\n QxIo = '%s has %d parameters with %d active (non-default)' % (YKHO.__class__.__name__, len(YKHO), IuHX)\n if IuHX == 0:\n return QxIo\n return QxIo + ':\\n' + '\\n'.join(('%s = %s %s (%s)' % hnFq for hnFq in YKHO.param_strs()))",
... | [
"0.7582478",
"0.6667753",
"0.65951604",
"0.6493384",
"0.64455795",
"0.64114326",
"0.63715106",
"0.62896985",
"0.6242153",
"0.62383384",
"0.62208116",
"0.62207097",
"0.61746264",
"0.6109571",
"0.61072844",
"0.6098375",
"0.60816747",
"0.6051815",
"0.6050969",
"0.60330296",
"0.6... | 0.7280672 | 1 |
Short humanfriendly string representation of model object. | def wHJl(YKHO):
IuHX = len([XP5J for XP5J in YKHO if XP5J])
return '<katpoint.%s active_params=%d/%d at 0x%x>' % (YKHO.__class__.__name__, IuHX, len(YKHO), id(YKHO)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n C3ST = YKHO._meta.verbose_name.title()\n return f'{C3ST:s}: {YKHO.name:s}'",
"def zAg0(YKHO):\n C3ST = YKHO._meta.verbose_name.title()\n return f'{C3ST:s}: {YKHO.name:s}'",
"def zAg0(YKHO):\n return super().__str__() + YKHO.model.__str__()",
"def zAg0(YKHO):\n C3ST = YKHO.... | [
"0.8028083",
"0.8028083",
"0.79938656",
"0.7976418",
"0.7948468",
"0.77171636",
"0.7662623",
"0.76042145",
"0.7593325",
"0.7579472",
"0.7536077",
"0.7449067",
"0.74469894",
"0.74191",
"0.7378081",
"0.7339475",
"0.73324215",
"0.7328719",
"0.7328719",
"0.730302",
"0.72758746",
... | 0.0 | -1 |
Inequality comparison operator (parameter values only). | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, hkxX):\n YKHO = YKHO.__eq__(hkxX)\n return YKHO.__invert__()",
"def Vdqg(YKHO, RKYb):\n return not YKHO.__eq__(RKYb)",
"def kUu4(yLHq, RKYb):\n return sfxH.not_equal(yLHq, RKYb)",
"def wU_U(YKHO, Elif):\n return not YKHO == Elif",
"def zG8k(YKHO):\n YKHO.assertFalse(gu3l(1)... | [
"0.72408104",
"0.71416056",
"0.69568586",
"0.6941666",
"0.68447745",
"0.6843122",
"0.6838853",
"0.68197155",
"0.6807232",
"0.679406",
"0.6777357",
"0.673857",
"0.673857",
"0.673857",
"0.673857",
"0.6725665",
"0.6725112",
"0.6718812",
"0.67053616",
"0.6701271",
"0.66915655",
... | 0.0 | -1 |
Extract input numbers from given string, | def tZlG(LGXO):
from string import split
Ylbp = []
XZLe = split(LGXO)
for YRbF in Ni9Y(len(XZLe)):
Ylbp.append(float(XZLe[YRbF]))
return Ylbp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OaKj(KCHu):\n a1PO = KCHu.strip('[]\\n')\n EnUq = ', '\n Hto5 = ZbWC.compile(EnUq)\n epBp = Hto5.split(a1PO)\n return epBp",
"def Ao2e(vIwR):\n aO51 = []\n L27j = vIwR.replace('$', '')\n AOfo = L27j.replace('K', '')\n for KCHu in AOfo.split(' '):\n try:\n aO51.app... | [
"0.7238783",
"0.7173874",
"0.7057713",
"0.68924135",
"0.68546575",
"0.67531013",
"0.67403173",
"0.6647867",
"0.657946",
"0.6577491",
"0.65233153",
"0.65192056",
"0.6391088",
"0.638495",
"0.6383692",
"0.6383132",
"0.6349406",
"0.6332319",
"0.6319145",
"0.6285752",
"0.6280346",... | 0.67156774 | 7 |
Create a centered Gaussian image having standard deviation "sigma". | def Izfz(u6FM, jHsn, pvd3=1, WyJz=1, dut3=None, OzN1=None, KQji=None, Wjb0=None, XCnq=None):
tTpl = OAQL()
tTpl.set_size(jHsn, pvd3, WyJz)
if dut3 == None:
dut3 = u6FM
if OzN1 == None:
OzN1 = u6FM
if KQji == None:
KQji = jHsn // 2
if Wjb0 == None:
Wjb0 = pvd3 // 2... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ysiV(zNig, WTkW=10, hgjH=None):\n WKvO = oyIN.arange(0, zNig[1], 1, float)\n LVAh = oyIN.arange(0, zNig[0], 1, float)\n LVAh = LVAh[:, oyIN.newaxis]\n if hgjH is None:\n nJ9F = nxyw = zNig[0] // 2\n else:\n nJ9F = hgjH[0]\n nxyw = hgjH[1]\n return oyIN.exp(-4 * oyIN.log(2... | [
"0.7622218",
"0.76156443",
"0.73544854",
"0.71752834",
"0.69022816",
"0.68148255",
"0.67936516",
"0.6789439",
"0.6705065",
"0.66758764",
"0.6667239",
"0.66651136",
"0.6639735",
"0.65926224",
"0.65801823",
"0.6565116",
"0.65491575",
"0.6542619",
"0.6531326",
"0.6530046",
"0.65... | 0.6426071 | 29 |
retrieve 3D alignment parameters from the header phi theta psi tx ty tz mirror scale | def AK72(IEVf, qQTo='xform.align3d'):
a1PO = IEVf.get_attr(qQTo)
Csk6 = a1PO.get_params('spider')
return (Csk6['phi'], Csk6['theta'], Csk6['psi'], Csk6['tx'], Csk6['ty'], Csk6['tz'], Csk6['mirror'], Csk6['scale']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fQhZ(rVnq, q7In, nYlf, C9lN, vG3n):\n if q7In > 90.0:\n cvwt = 1\n Cwt5, o0ZM, BhJz, aEPd = eGqG(0, C9lN, vG3n, 1.0, 540.0 - nYlf, 0, 0, 1.0)\n else:\n cvwt = 0\n Cwt5, o0ZM, BhJz, aEPd = eGqG(0, C9lN, vG3n, 1.0, 360.0 - nYlf, 0, 0, 1.0)\n return (Cwt5, o0ZM, BhJz, cvwt)",
... | [
"0.6369768",
"0.63076174",
"0.57975394",
"0.5729281",
"0.5533436",
"0.551851",
"0.5500369",
"0.5439547",
"0.5422399",
"0.54033196",
"0.5388639",
"0.5361121",
"0.53491545",
"0.53419423",
"0.531873",
"0.53108954",
"0.53095436",
"0.53085315",
"0.5303664",
"0.5303664",
"0.5302264... | 0.7157893 | 0 |
Write JSON in a consistent, humanreadable way. | def wilB(z1Rg: Any) -> bytes:
return qQXR.dumps(z1Rg, indent=4, sort_keys=True, ensure_ascii=True, separators=(',', ': '), cls=UY3s).encode('ascii') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Lsrz(YKHO):\n YKHO.json_o.write()",
"def VacN(YKHO):\n with open(YKHO._file_path, 'w') as eHNT:\n qQXR.dump(YKHO._content, eHNT, indent=4, separators=None, encoding='utf-8', sort_keys=False)",
"def Lsrz(YKHO, Mu0k=None):\n if Mu0k is None:\n Mu0k = YKHO.filepath\n HeoJ = qQXR.dump... | [
"0.73995405",
"0.73701173",
"0.7319848",
"0.7299197",
"0.7268811",
"0.71151686",
"0.7094368",
"0.6901286",
"0.6872474",
"0.6859761",
"0.68393916",
"0.67960197",
"0.67669374",
"0.6747494",
"0.6735324",
"0.67135006",
"0.6681034",
"0.6619973",
"0.66117257",
"0.66088766",
"0.6588... | 0.0 | -1 |
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`. | def LwSz(Bcwd, KndY, NkkI=False, leAC='Confusion Matrix', iMGt=QrM1.cm.Blues):
if NkkI:
Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]
Bcwd = oyIN.around(Bcwd, decimals=2)
QrM1.imshow(Bcwd, interpolation='nearest', cmap=iMGt)
QrM1.title(leAC)
QrM1.colorbar()
wIWT = o... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LwSz(Bcwd, KndY=[0, 1], NkkI=False, leAC='Confusion matrix', RMso=False):\n if NkkI:\n Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]\n print('Normalized confusion matrix')\n else:\n print('Confusion matrix, without normalization')\n if RMso:\n print(Bcwd)"... | [
"0.81925154",
"0.8093376",
"0.8027219",
"0.80169857",
"0.7991475",
"0.7988959",
"0.79785",
"0.7973596",
"0.7959107",
"0.7956459",
"0.793519",
"0.79322356",
"0.79320693",
"0.79289055",
"0.79240024",
"0.79221827",
"0.792161",
"0.79209834",
"0.7920566",
"0.7919846",
"0.791543",
... | 0.0 | -1 |
Read and preprocess an image with data augmentation (random transform). | def xk4M(XP5J, UGKP=False):
VXjJ = cE34(cQHb + XP5J, mode='RGB')
ruSK = VXjJ
if Tuqy == 'background':
nPrm = {'image': VXjJ}
elif Tuqy == 'instance' or Tuqy == 'code':
ruSK = cE34(c2_J + XP5J.replace('.jpg', '.png'))
nPrm = {'image': VXjJ, 'mask': ruSK}
if UGKP:
vkIy ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def biH0(YKHO, VXjJ):\n t9mp = LNo8.load_img(VXjJ, target_size=(299, 299))\n t9mp = LNo8.img_to_array(t9mp)\n t9mp = oyIN.expand_dims(t9mp, axis=0)\n t9mp = fjyB(t9mp)\n return t9mp",
"def CROH(LNo8, pChn):\n if pChn == 'random_crop' and tuKI.randint(0, 1):\n LNo8 = QajG(LNo8)\n if pC... | [
"0.6944267",
"0.6885695",
"0.6801366",
"0.6746409",
"0.6730426",
"0.6700084",
"0.6674317",
"0.6642256",
"0.6604827",
"0.65799797",
"0.65796673",
"0.6575271",
"0.6572347",
"0.6542871",
"0.6535678",
"0.6521868",
"0.64719284",
"0.64391285",
"0.6430673",
"0.6425564",
"0.6418553",... | 0.70998 | 0 |
This function extract the squared l2 norm from the inner product matrix. | def gD7t(SppC):
return oyIN.diag(SppC) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qagD(SppC):\n u54L = SppC.shape[0]\n CkYf = oyIN.divide(1, oyIN.sqrt(gD7t(SppC)))\n fhxM = oyIN.multiply(oyIN.multiply(oyIN.reshape(CkYf, [u54L, 1]), SppC), oyIN.reshape(CkYf, [1, u54L]))\n return 2 - 2 * fhxM",
"def sLun(SppC):\n u54L = SppC.shape[0]\n ikiY = oyIN.reshape(oyIN.diag(SppC), ... | [
"0.8038655",
"0.79935986",
"0.7481027",
"0.7333756",
"0.71862626",
"0.7168722",
"0.71422154",
"0.71272767",
"0.7005889",
"0.6986283",
"0.6936558",
"0.689807",
"0.6859919",
"0.68299115",
"0.6818152",
"0.678622",
"0.67799747",
"0.6730021",
"0.67066455",
"0.6701476",
"0.6701306"... | 0.7382337 | 3 |
Function to modify the homepage | def lKTX():
B3B_ = Hy7s.path.dirname(xAKo)
w7HS = P4t4.config['HOME_PAGE_FOLDER'] + 'homepage.html'
BWXx = ''
if QePW.form.get('newHome'):
BWXx = QePW.form.get('newHome')
if not Hy7s.path.isdir(Hy7s.path.join(B3B_, P4t4.config['HOME_PAGE_FOLDER'])):
Hy7s.mkdir(Hy7s.path.join(B3B_, P4... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C_QL():\n return TvZl('home/a_homepage.html', title='Welcome')",
"def C_QL():\n return TvZl('rosemead_homepage.html')",
"def C_QL():\n return TvZl('home/index.html', title='Bem vindo!')",
"def RMFp():\n return TvZl('home/a_homepage.html', title='Homepage Admin')",
"def C_QL():\n return T... | [
"0.7403166",
"0.7383433",
"0.7320676",
"0.730273",
"0.722838",
"0.722588",
"0.7190989",
"0.71861947",
"0.7157216",
"0.7157216",
"0.71296996",
"0.71152425",
"0.7102618",
"0.7062718",
"0.7043081",
"0.6962566",
"0.69548315",
"0.6911093",
"0.69107646",
"0.6907873",
"0.6875526",
... | 0.0 | -1 |
Test base.py GSObjects for notequals. | def vdIi():
NUEs = SxBR.GSParams(maxk_threshold=0.0011, folding_threshold=0.0051)
lAyk = [SxBR.Pixel(scale=1.0), SxBR.Pixel(scale=1.1), SxBR.Pixel(scale=1.0, flux=1.1), SxBR.Pixel(scale=1.0, gsparams=NUEs)]
NPbR(lAyk)
lAyk = [SxBR.Box(width=1.0, height=1.0), SxBR.Box(width=1.1, height=1.0), SxBR.Box(wid... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ef6G(YKHO):\n jzdc = ei4T.OpaqueObject(YKHO.bytes_a, aVkO.OpaqueDataType.NONE)\n Fg_i = ei4T.OpaqueObject(YKHO.bytes_a, aVkO.OpaqueDataType.NONE)\n YKHO.assertFalse(jzdc != Fg_i)\n YKHO.assertFalse(Fg_i != jzdc)",
"def BOI2(YKHO):\n jzdc = ei4T.OpaqueObject(YKHO.bytes_a, aVkO.OpaqueDataType.NO... | [
"0.74571276",
"0.73648274",
"0.73306084",
"0.72958326",
"0.7260039",
"0.72194594",
"0.7127766",
"0.70569617",
"0.7055979",
"0.7028425",
"0.70240885",
"0.7012719",
"0.6914279",
"0.68538886",
"0.68433744",
"0.6823976",
"0.6806015",
"0.6802378",
"0.6794009",
"0.675546",
"0.67511... | 0.0 | -1 |
Function that returns true if a string contains a number | def qekA(b7zw):
return any((hcXw.isdigit() for hcXw in b7zw)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nkCT(YKHO, NPoT):\n return bool(ZbWC.search('\\\\d', NPoT))",
"def MH26(JZtS):\n return any((hcXw.isdigit() for hcXw in JZtS))",
"def qOSl(l5Ny):\n return any((str.isdigit(Z9rn) for Z9rn in l5Ny))",
"def ye72(KCHu):\n try:\n int(KCHu)\n return True\n except ValueError:\n ... | [
"0.86861813",
"0.83668447",
"0.82383734",
"0.7930955",
"0.79304606",
"0.7924505",
"0.78930366",
"0.78647584",
"0.77653086",
"0.7743263",
"0.7714202",
"0.7706238",
"0.77058214",
"0.77046204",
"0.77044505",
"0.7690902",
"0.766317",
"0.7639565",
"0.7527607",
"0.7527464",
"0.7508... | 0.8393111 | 1 |
Small function to change time format. Used for make_time func | def x53q(ejIZ):
yKcO = ['start', 'begin', 'beginning', 'head', 'first']
Os4s = ['slut', 'end', 'tail', 'finish', 'finito', 'fin', 'done', 'finished']
if ejIZ.lower() in yKcO:
ejIZ = '00:00:00'
elif ejIZ.lower() in Os4s:
return ejIZ
elif len(ejIZ) == 1:
ejIZ = f'00:00:0{ejIZ}'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ct8j(YKHO, ITS7):\n TKQ0 = ITS7[0:2]\n cpvk = ITS7[2:4]\n KG9w = ITS7[4:]\n return '%s:%s:%s UTC' % (TKQ0, cpvk, KG9w)",
"def Gsox(YKHO):\n wzkt = qcWV.datetime.now()\n I3gk = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']\n x0eS = I3gk[wzkt.month - ... | [
"0.7315664",
"0.72966367",
"0.7183788",
"0.7177541",
"0.71764636",
"0.7169046",
"0.7167851",
"0.7160244",
"0.7139336",
"0.7091297",
"0.7036572",
"0.70216924",
"0.6875871",
"0.6864549",
"0.6824766",
"0.6812519",
"0.68091184",
"0.680905",
"0.68039894",
"0.67950267",
"0.6790418"... | 0.0 | -1 |
computes the sigmoid of z z z can be a matrix, vector or scalar sigmoid | def m1Hg(epBp):
Oa1e = oyIN.zeros(epBp.shape)
return 1 / (1 + oyIN.exp(-epBp)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m1Hg(epBp):\n return mFhB(epBp)",
"def m1Hg(epBp):\n return 1 / (1 + oyIN.e ** (-epBp))",
"def m1Hg(epBp):\n return 1.0 / (1.0 + oyIN.exp(-epBp))",
"def m1Hg(epBp):\n return 1.0 / (1.0 + oyIN.exp(-epBp))",
"def m1Hg(epBp):\n return 1 / (1 + oyIN.exp(-1 * epBp))",
"def m1Hg(epBp):\n ... | [
"0.9156451",
"0.89855045",
"0.89530945",
"0.88890535",
"0.88774705",
"0.8873134",
"0.88591874",
"0.88549364",
"0.8827887",
"0.88264954",
"0.88236195",
"0.8823586",
"0.8804889",
"0.8797912",
"0.87720233",
"0.8767488",
"0.87623954",
"0.87474865",
"0.8720549",
"0.8660843",
"0.86... | 0.8674715 | 19 |
recourse through an attribute chain to get the ultimate value. | def DNYq(YEnM, hkS8):
return Pusg(getattr, hkS8.split('.'), YEnM) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def next(YKHO):\n hwts = YKHO.iterobj.next()\n return (hwts.name, YKHO.attrs[hwts.name])",
"def AUkf(YKHO, _j8X):\n Aofo = []\n jbXL = YKHO[_j8X]\n if jbXL != None:\n Aofo.append(jbXL)\n if jbXL == None or jbXL.startswith('+'):\n for _AKB in YKHO.get_parents():\n Aofo.a... | [
"0.594284",
"0.59209895",
"0.5796574",
"0.54958975",
"0.54589653",
"0.54450005",
"0.5416079",
"0.53792626",
"0.5287629",
"0.52547",
"0.5249592",
"0.5235394",
"0.5232",
"0.522848",
"0.52224046",
"0.520934",
"0.52058285",
"0.51851255",
"0.51851255",
"0.51851255",
"0.51851255",
... | 0.5363558 | 8 |
Find all prime numbers between 0 and n | def DwOa(exwG):
rPed = [True] * (exwG / 2)
for YRbF in range(int((exwG / 2 - 1) / 2) >> 1):
for r845 in range((YRbF * (YRbF + 3) << 1) + 3, exwG / 2, (YRbF << 1) + 3):
rPed[r845] = False
return [2] + [(YRbF << 1) + 3 for YRbF in range(exwG / 2) if rPed[YRbF]] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rPed(exwG):\n return [YRbF for YRbF in Ni9Y(1, exwG + 1) if kU5Q(YRbF)]",
"def QT5F(exwG):\n rPed = []\n if exwG < 2:\n return None\n rPed.append(2)\n for YRbF in range(3, exwG + 1, 2):\n T1qg = True\n for XP5J in rPed:\n if YRbF % XP5J is 0:\n T1... | [
"0.8414769",
"0.8174812",
"0.8154782",
"0.8066897",
"0.79940116",
"0.7972602",
"0.7941718",
"0.79004717",
"0.78921247",
"0.7884613",
"0.786188",
"0.786017",
"0.7860028",
"0.78575575",
"0.78575575",
"0.7856777",
"0.78546125",
"0.78280634",
"0.78155655",
"0.7812109",
"0.7803009... | 0.77787405 | 21 |
Rotate points by quaternions. | def Hgp6(EcVT, vexM):
jlHL = EcVT[[0], :, :][:, :, [0]] * 0 + 1
vexM = ht2j.unsqueeze(vexM, 1) * jlHL
HuSO = ht2j.cat([vexM[:, :, [0]], -1 * vexM[:, :, 1:4]], dim=-1)
EcVT = ht2j.cat([EcVT[:, :, [0]] * 0, EcVT], dim=-1)
S8x9 = ei0k(vexM, ei0k(EcVT, HuSO))
return S8x9[:, :, 1:4] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QJfP(LTIa, jDK_, q7In):\n vexM = R5H8.rotator(jDK_, q7In)\n return vexM.rotate(LTIa)",
"def HKaI(LTIa, urL5):\n Ylbp = oyIN.zeros((urL5.shape[0], LTIa.shape[0], 4))\n Ylbp[:, :, 1:] = LTIa\n Fs77 = Ni86(urL5)\n for p6S0 in range(len(LTIa)):\n Ylbp[:, p6S0, :] = At55(urL5, Ylbp[:, p6S... | [
"0.7982522",
"0.7720816",
"0.76980317",
"0.7503948",
"0.71261555",
"0.67684865",
"0.66305953",
"0.66130453",
"0.65267867",
"0.6443186",
"0.64176416",
"0.64084005",
"0.63606745",
"0.633426",
"0.6299331",
"0.62791884",
"0.6247232",
"0.6116867",
"0.61149526",
"0.608029",
"0.6071... | 0.6787191 | 6 |
Returns a list of action and state this object can perform... These are in a form that Peregrin can handle, and are use by the class to limit what it allows Peregrin to call. | def xASv(YKHO):
YKHO._actions = {}
YKHO._actions['getItems'] = ('FileCrawler', None)
return YKHO._actions | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qaYX(YKHO, QTBn):\n gnPz.raiseNotDefined()",
"def CA6v(YKHO, QTBn):\n pass",
"def xASv(YKHO, QTBn):\n eBO2 = (1, 2)\n return eBO2",
"def xASv(YKHO, QTBn):\n raise NotImplementedError",
"def xASv(YKHO) -> list:\n if YKHO.debug:\n print(f'AState.actions()')\n if not YKHO._exam... | [
"0.79093474",
"0.7743691",
"0.7566298",
"0.7564206",
"0.75434977",
"0.73026574",
"0.72860223",
"0.72488976",
"0.7185109",
"0.71836317",
"0.7171607",
"0.71485937",
"0.71485937",
"0.71485937",
"0.7132329",
"0.71137536",
"0.70944935",
"0.7048736",
"0.7040828",
"0.69925964",
"0.6... | 0.6020623 | 97 |
Test that the 'get' fails because the root is not recognized. | def uIvw(YKHO):
Aofo = YKHO.runner.invoke(GSyo, [*jEuW, 'config', 'get', 'wrong_root.agent_name'], standalone_mode=False)
assert Aofo.exit_code == 1
assert Aofo.exception.message == 'The root of the dotted path must be one of: {}'.format(itvy) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E772(YKHO):\n pass",
"def E772(YKHO):\n pass",
"def x2kL(YKHO):\n YKHO.skipTest('')\n geh0 = YKHO.fetch('/')\n YKHO.assertEqual(geh0.code, 404)",
"def SYLZ(YKHO):\n with YKHO.assertRaises(AssertionError):\n YKHO.resource.get(-1)",
"def ykgQ(YKHO):\n x0hE = hM31.client.KazooC... | [
"0.81144464",
"0.81144464",
"0.70011485",
"0.68381655",
"0.68031454",
"0.667773",
"0.6674683",
"0.6666335",
"0.6611255",
"0.65303046",
"0.6396875",
"0.6372637",
"0.6341329",
"0.634079",
"0.63209414",
"0.6298034",
"0.6295935",
"0.6282365",
"0.62819725",
"0.6272043",
"0.6221722... | 0.65112627 | 10 |
Test that the 'get' fails because the resource does not exist. | def amTg(YKHO):
Aofo = YKHO.runner.invoke(GSyo, [*jEuW, 'config', 'get', 'connections.non_existing_connection.name'], standalone_mode=False)
assert Aofo.exit_code == 1
assert Aofo.exception.message == 'Resource connections/non_existing_connection does not exist.' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lCxW(YKHO):\n _D7V = 9999\n bGrB, XObx = YKHO.resource.get(_D7V)\n YKHO.assertEqual(404, XObx)",
"def _yDj(YKHO):\n geh0 = YKHO.client.get('/auth/non-existing-resource')\n YKHO.assert404(geh0)\n YKHO.assertEqual('not found', geh0.json['error'])",
"def SYLZ(YKHO):\n with YKHO.assertRais... | [
"0.8803426",
"0.87292",
"0.8429405",
"0.797745",
"0.797067",
"0.7951216",
"0.77274334",
"0.76254976",
"0.75959903",
"0.7590098",
"0.7587531",
"0.75486064",
"0.75073713",
"0.75045615",
"0.7498573",
"0.7495179",
"0.74433476",
"0.74420184",
"0.741603",
"0.74085885",
"0.7400039",... | 0.6998007 | 81 |
Test that getting a vendor component with wrong component type raises error. | def WE6c(YKHO):
Aofo = YKHO.runner.invoke(GSyo, [*jEuW, 'config', 'get', 'vendor.fetchai.component_type_not_correct.error.non_existing_attribute'], standalone_mode=False)
assert Aofo.exit_code == 1
KCHu = "'component_type_not_correct' is not a valid component type. Please use one of ['protocols', 'connectio... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def q07y():\n with trZe.raises(VAST):\n SQhM.get_component('missing_component')",
"def SCdn():\n with trZe.raises(Nm5X):\n UksD = NVYd()\n SQhM.register_component(UksD)",
"def vASr():\n with trZe.raises(VAST):\n SQhM.get_component('missing_component_to_remove')",
"def FG1... | [
"0.7484369",
"0.70648474",
"0.6751108",
"0.6693934",
"0.65564436",
"0.6499122",
"0.6351091",
"0.6348619",
"0.62459064",
"0.61908615",
"0.61505693",
"0.6141869",
"0.6136945",
"0.6136352",
"0.61140954",
"0.608789",
"0.60551083",
"0.60050845",
"0.59680504",
"0.59571373",
"0.5918... | 0.7972388 | 0 |
Test setting the default routing. | def Gs2T(YKHO):
Aofo = YKHO.runner.invoke(GSyo, [*jEuW, 'config', 'set', 'agent.default_routing', '{"fetchai/contract_api:any": "fetchai/ledger:any"}', '--type=dict'], standalone_mode=False, catch_exceptions=False)
assert Aofo.exit_code == 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Fuc2(YKHO):\n assert YKHO.rc_conf.has_key('defaultrouter')\n assert YKHO.rc_conf['defaultrouter'] == '\"10.137.1.7\"'",
"def tSxk(YKHO):\n assert YKHO.agent_config.default_routing == {YKHO.new_protocol_id: YKHO.new_connection_id}",
"def Us7b(YKHO):\n Aofo = YKHO.runner.invoke(GSyo, [*jEuW, 'con... | [
"0.7380499",
"0.71554756",
"0.706406",
"0.6946817",
"0.6943349",
"0.67906195",
"0.66364366",
"0.6569018",
"0.6359504",
"0.6266595",
"0.619172",
"0.6175089",
"0.61632776",
"0.60943156",
"0.6091761",
"0.60507745",
"0.60375005",
"0.6034048",
"0.59746397",
"0.59736043",
"0.597312... | 0.0 | -1 |
Test setting the default routing. | def YD_5(YKHO):
Aofo = YKHO.runner.invoke(GSyo, [*jEuW, 'config', 'set', 'vendor.fetchai.connections.p2p_libp2p.config.entry_peers', '["peer1", "peer2"]', '--type=list'], standalone_mode=False, catch_exceptions=False)
assert Aofo.exit_code == 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Fuc2(YKHO):\n assert YKHO.rc_conf.has_key('defaultrouter')\n assert YKHO.rc_conf['defaultrouter'] == '\"10.137.1.7\"'",
"def tSxk(YKHO):\n assert YKHO.agent_config.default_routing == {YKHO.new_protocol_id: YKHO.new_connection_id}",
"def Us7b(YKHO):\n Aofo = YKHO.runner.invoke(GSyo, [*jEuW, 'con... | [
"0.7380499",
"0.71554756",
"0.706406",
"0.6946817",
"0.6943349",
"0.67906195",
"0.66364366",
"0.6569018",
"0.6359504",
"0.6266595",
"0.619172",
"0.6175089",
"0.61632776",
"0.60943156",
"0.6091761",
"0.60507745",
"0.60375005",
"0.6034048",
"0.59746397",
"0.59736043",
"0.597312... | 0.0 | -1 |
Test that the 'get' fails because the root is not recognized. | def uIvw(YKHO):
Aofo = YKHO.runner.invoke(GSyo, [*jEuW, 'config', 'set', 'wrong_root.agent_name', 'value'], standalone_mode=False)
assert Aofo.exit_code == 1
assert Aofo.exception.message == 'The root of the dotted path must be one of: {}'.format(itvy) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E772(YKHO):\n pass",
"def E772(YKHO):\n pass",
"def x2kL(YKHO):\n YKHO.skipTest('')\n geh0 = YKHO.fetch('/')\n YKHO.assertEqual(geh0.code, 404)",
"def SYLZ(YKHO):\n with YKHO.assertRaises(AssertionError):\n YKHO.resource.get(-1)",
"def ykgQ(YKHO):\n x0hE = hM31.client.KazooC... | [
"0.81131697",
"0.81131697",
"0.6998153",
"0.68379533",
"0.680399",
"0.6676301",
"0.6673244",
"0.66658753",
"0.66128844",
"0.65304714",
"0.6508784",
"0.6396497",
"0.6373404",
"0.63408643",
"0.6340362",
"0.6320993",
"0.6299329",
"0.62931",
"0.62797034",
"0.6279614",
"0.62703735... | 0.618814 | 23 |
Test that the 'get' fails because the resource does not exist. | def amTg(YKHO):
Aofo = YKHO.runner.invoke(GSyo, [*jEuW, 'config', 'set', 'connections.non_existing_connection.name', 'value'], standalone_mode=False)
assert Aofo.exit_code == 1
assert Aofo.exception.message == 'Resource connections/non_existing_connection does not exist.' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lCxW(YKHO):\n _D7V = 9999\n bGrB, XObx = YKHO.resource.get(_D7V)\n YKHO.assertEqual(404, XObx)",
"def _yDj(YKHO):\n geh0 = YKHO.client.get('/auth/non-existing-resource')\n YKHO.assert404(geh0)\n YKHO.assertEqual('not found', geh0.json['error'])",
"def SYLZ(YKHO):\n with YKHO.assertRais... | [
"0.88033277",
"0.8728782",
"0.8429543",
"0.79759574",
"0.7970379",
"0.7949762",
"0.7726153",
"0.76256686",
"0.7595202",
"0.7590344",
"0.7586807",
"0.7548084",
"0.75071794",
"0.75046843",
"0.7499026",
"0.74956346",
"0.7443056",
"0.7441133",
"0.7414929",
"0.74075717",
"0.739820... | 0.0 | -1 |
Return the type of an object. | def yaSt(YKHO, YEnM):
mCgv = YEnM['Type']
WN3V = mCgv.split('.')
return WN3V[0] + '.' + WN3V[1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FRul(YKHO, object):\n return YKHO.type",
"def FRul(YKHO, object):\n return YKHO.type",
"def vcaS(YKHO):\n return YKHO._object_type",
"def vcaS(YKHO):\n return YKHO._object_type",
"def vcaS(YKHO):\n return YKHO._object_type",
"def vcaS(YKHO):\n return YKHO._object_type",
"def vcaS(... | [
"0.8628719",
"0.8628719",
"0.8257007",
"0.8257007",
"0.8257007",
"0.8257007",
"0.8257007",
"0.82011956",
"0.82011956",
"0.82011956",
"0.82011956",
"0.82011956",
"0.82011956",
"0.82011956",
"0.82011956",
"0.82011956",
"0.82011956",
"0.82011956",
"0.82011956",
"0.82011956",
"0.... | 0.69202507 | 88 |
Check if the PATCH Operation is allowed on the resource. | def gZjL(YKHO, MOPg, j8eK):
if not YKHO._operation_allowed(MOPg, 'PATCH'):
tO9_ = 'PATCH Operation not supported on the resource "%s"' % j8eK
raise AJ5d.IloError(tO9_) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g4Yd(YKHO):\n if not YKHO.url:\n return\n geh0 = YKHO.client.patch(YKHO.url, {}, format='json')\n YKHO.assertIn(geh0.status_code, [jGRS.HTTP_405_METHOD_NOT_ALLOWED, jGRS.HTTP_401_UNAUTHORIZED])",
"def RGDv(YKHO):\n geh0 = YKHO.client.patch(YKHO.get_url(), {})\n YKHO.assertEqual(geh0.sta... | [
"0.69640553",
"0.6944961",
"0.6830189",
"0.6657633",
"0.65127224",
"0.63872164",
"0.6329733",
"0.62977004",
"0.61410993",
"0.6072097",
"0.5949872",
"0.5900068",
"0.58420664",
"0.58221006",
"0.5762764",
"0.57505614",
"0.5717169",
"0.571581",
"0.56980234",
"0.5684516",
"0.56841... | 0.803524 | 0 |
Get the iscsi settings resoure. | def avlm(YKHO, nPrm):
try:
jyMi = nPrm['links']['Settings']['href']
except KeyError:
tO9_ = 'iscsi settings resource not found.'
raise AJ5d.IloCommandNotSupportedError(tO9_)
jGRS, MOPg, FoUy = YKHO._rest_get(jyMi)
if jGRS != 200:
tO9_ = YKHO._get_extended_error(FoUy)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def asJJ(YKHO):\n return YKHO.request({'path': '/' + S7kj + '/setting'})",
"def asJJ(YKHO):\n return YKHO.settings",
"def asJJ(YKHO):\n bD7m = 'https://api.imgur.com/3/account/{0}/settings'.format(YKHO.name)\n return YKHO._imgur._send_request(bD7m)",
"def gCuF():\n return v083()[1]",
"def Xa... | [
"0.6224379",
"0.5955814",
"0.59340453",
"0.5871603",
"0.5869005",
"0.5833151",
"0.57728857",
"0.57651824",
"0.57078904",
"0.57052916",
"0.5703846",
"0.5703846",
"0.5703846",
"0.5703846",
"0.56948245",
"0.5670498",
"0.5628336",
"0.56175953",
"0.56175953",
"0.5589727",
"0.55740... | 0.7113912 | 0 |
Gets the product name of the server. | def gO1D(YKHO):
Oz1B = YKHO._get_host_details()
return Oz1B['Model'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n8KJ(YKHO):\n return YKHO._stub.List(YKHO._message).product_name",
"def n8KJ(YKHO):\n return YKHO._product_name",
"def n8KJ(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'product_name')",
"def NzQY(YKHO) -> str:\n return qe4Y.get(YKHO, 'server_name')",
"def Lx3t(YKHO):\n return YKHO.__valu... | [
"0.8168809",
"0.7893617",
"0.7663046",
"0.7437491",
"0.7431132",
"0.7421063",
"0.73451436",
"0.73016155",
"0.73016155",
"0.71450585",
"0.6981237",
"0.6889687",
"0.6856621",
"0.67716855",
"0.6767265",
"0.6752493",
"0.66959023",
"0.66839856",
"0.6644297",
"0.6551729",
"0.654257... | 0.7758751 | 2 |
Perform requested power operation. | def EIFC(YKHO, fLuK):
zD6P = {'Action': 'Reset', 'ResetType': fLuK}
OH3U = '/rest/v1/Systems/1'
jGRS, MOPg, geh0 = YKHO._rest_post(OH3U, None, zD6P)
if jGRS >= 300:
tO9_ = YKHO._get_extended_error(geh0)
raise AJ5d.IloError(tO9_) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def naF9():\n pyJd(tv_command=Lle2.power)",
"def kkJx(YKHO):\n raise NotImplementedError",
"def pow(YKHO, naF9):\n INeQ.wait(YKHO.client.map(XWOB, YKHO.vecDask, power=naF9, pure=False))\n return YKHO",
"def kkJx(YKHO):\n pass",
"def naF9(YKHO, naF9):\n YKHO._power = naF9",
"def X8gq(YKH... | [
"0.71487105",
"0.7076449",
"0.70716",
"0.6828888",
"0.6828583",
"0.670036",
"0.6691989",
"0.66501945",
"0.6643156",
"0.6614282",
"0.6602157",
"0.6598427",
"0.6593769",
"0.6579953",
"0.6551106",
"0.6543305",
"0.6498859",
"0.6488113",
"0.6479012",
"0.646967",
"0.6468145",
"0.... | 0.7263758 | 0 |
Retrieves the pending boot mode of the server. Gets the boot mode to be set on next reset. | def tywE(YKHO):
MOPg, j8eK, IjbJ = YKHO._check_bios_resource(['BootMode'])
bGrB, bGrB, gCuF = YKHO._get_bios_settings_resource(IjbJ)
e13D = gCuF.get('BootMode')
if e13D == 'LegacyBios':
e13D = 'legacy'
return e13D.upper() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def leKp():\n e13D = 'Legacy'\n try:\n Y46n = ZsEo.OpenKey(ZsEo.HKEY_LOCAL_MACHINE, 'System\\\\CurrentControlSet\\\\Control')\n fXah = ZsEo.QueryValueEx(Y46n, 'PEFirmwareType')[0]\n if fXah == 2:\n e13D = 'UEFI'\n except:\n e13D = 'Unknown'\n return e13D",
"def ... | [
"0.70903546",
"0.69976276",
"0.6860447",
"0.6815118",
"0.66070074",
"0.62555677",
"0.6129522",
"0.6030498",
"0.6028887",
"0.6026956",
"0.6023533",
"0.5965988",
"0.58770573",
"0.5847371",
"0.5799201",
"0.5777145",
"0.5753953",
"0.57251155",
"0.5688327",
"0.56876516",
"0.564913... | 0.8131488 | 0 |
Gets the ilo firmware version for server capabilities | def TXxy(YKHO):
p_z1, ZN2d = YKHO._get_ilo_details()
Tyo7 = p_z1['Firmware']['Current']['VersionString']
return {'ilo_firmware_version': Tyo7} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uCIf(YKHO):\n return YKHO._get_system_status()['firmware']",
"def zkKR(YKHO):\n try:\n p_z1, ZN2d = YKHO._get_ilo_details()\n NoQk = p_z1['Oem']['Hp']['Firmware']['Current']['VersionString']\n return BJsk.get_major_minor(NoQk)\n except Exception:\n return None",
"def w5... | [
"0.76318765",
"0.74084985",
"0.73684555",
"0.7351483",
"0.7309879",
"0.71681994",
"0.7141852",
"0.696607",
"0.6915562",
"0.690672",
"0.68797165",
"0.6854152",
"0.67555326",
"0.6753871",
"0.67471206",
"0.67280734",
"0.6711157",
"0.6674547",
"0.66333795",
"0.6591106",
"0.655982... | 0.7568138 | 1 |
Gets the ilo firmware version for server capabilities | def zkKR(YKHO):
try:
p_z1, ZN2d = YKHO._get_ilo_details()
NoQk = p_z1['Oem']['Hp']['Firmware']['Current']['VersionString']
return BJsk.get_major_minor(NoQk)
except Exception:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uCIf(YKHO):\n return YKHO._get_system_status()['firmware']",
"def TXxy(YKHO):\n p_z1, ZN2d = YKHO._get_ilo_details()\n Tyo7 = p_z1['Firmware']['Current']['VersionString']\n return {'ilo_firmware_version': Tyo7}",
"def w5lf(YKHO):\n return YKHO.capabilities.get('fw_ver')",
"def iQc5(YKHO) -... | [
"0.76303834",
"0.7566883",
"0.7366854",
"0.73500246",
"0.73084676",
"0.71665615",
"0.7140502",
"0.6964108",
"0.69159454",
"0.6905643",
"0.6877727",
"0.6852079",
"0.6753259",
"0.6751832",
"0.67452294",
"0.6726138",
"0.6709597",
"0.66727823",
"0.6632324",
"0.65892386",
"0.65594... | 0.7407143 | 2 |
Returns the vertex symbol of a topology as a list of strings | def ziV3(YKHO, mWFP):
return YKHO.mfp.get_vs(mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EBww(YKHO):\n return str(YKHO.vert_dict.keys())",
"def pNZh(Oa1e):\n return str(Oa1e.adjacencyList())",
"def TA6f(YKHO):\n return list(YKHO.graph_dict.keys())",
"def zAg0(YKHO):\n gEoy = []\n for SLBp in YKHO:\n gEoy.append(SLBp.name)\n uwXL = 'The DiGraph contains _vertices: {0}... | [
"0.6693307",
"0.64824003",
"0.6428527",
"0.6385017",
"0.61859804",
"0.6184684",
"0.6171001",
"0.61704546",
"0.6142896",
"0.6142896",
"0.6142896",
"0.60300994",
"0.60281855",
"0.6027096",
"0.59981346",
"0.5959071",
"0.5957562",
"0.5946406",
"0.5943226",
"0.5909223",
"0.59061",... | 0.0 | -1 |
set requires_grad to 'true' for all paramters, but save original values to resotre them later | def MBDw(YKHO, Wc9F):
rbC0 = []
fjJE = {}
for _N6A, xqoZ in YKHO.model.named_parameters():
fjJE[_N6A] = xqoZ.requires_grad
xqoZ.requires_grad = True
dBkI = YKHO._register_embedding_gradient_hooks(rbC0)
N77f = YKHO.forward_step(Wc9F)
YKHO.model.zero_grad()
N77f.backward()
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F41H(YKHO, _6Ge):\n for k78t in YKHO.parameters():\n k78t.requires_grad = _6Ge",
"def F41H(YKHO, _6Ge):\n for k78t in YKHO.parameters():\n k78t.requires_grad = _6Ge",
"def OGtb(r8hN):\n for XP5J in r8hN.parameters():\n XP5J.requires_grad = False",
"def OGtb(r8hN):\n for X... | [
"0.76790285",
"0.76790285",
"0.75791013",
"0.75430167",
"0.74836636",
"0.7409139",
"0.7380558",
"0.73643893",
"0.72944826",
"0.72131354",
"0.719416",
"0.71648544",
"0.71418315",
"0.71305335",
"0.70704716",
"0.7017141",
"0.69882965",
"0.69882965",
"0.69626516",
"0.6960601",
"0... | 0.0 | -1 |
Registers a backward hook on the used to save the gradients of the embeddings for use in get_gradients() when there are multiple inputs (e.g., a passage and question), the hook will be called multiple times. We append all the embeddings gradients to a list. | def x55J(YKHO, rbC0):
def DBLL(yR_P, g6LF, EYyA):
rbC0.append(EYyA[0])
EUrF = []
eFKZ = YKHO.get_embeddings_layer()
EUrF.append(eFKZ.register_backward_hook(DBLL))
return EUrF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iWGt(YKHO) -> None:\n if not ht2j.is_grad_enabled():\n return\n for XP5J in YKHO.full_params:\n if XP5J.requires_grad:\n if hasattr(XP5J, '_shard_bwd_hook'):\n continue\n wB_4 = XP5J.expand_as(XP5J)\n assert wB_4.grad_fn is not None\n ... | [
"0.744036",
"0.7207515",
"0.68466437",
"0.6619593",
"0.6545222",
"0.65270805",
"0.6505459",
"0.64318466",
"0.6385007",
"0.63628876",
"0.63604456",
"0.63604456",
"0.62412906",
"0.6231469",
"0.62253386",
"0.61755383",
"0.609307",
"0.60908824",
"0.60908824",
"0.60785884",
"0.603... | 0.8470942 | 0 |
Given a command, mode, and a PATH string, return the path which conforms to the given mode on the PATH, or None if there is no such file. `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result of os.environ.get("PATH"), or can be overridden with a custom search path. | def Nygx(HCmI, Tuqy=Hy7s.F_OK | Hy7s.X_OK, pmON=None):
def LZLW(FYKK, Tuqy):
return Hy7s.path.exists(FYKK) and Hy7s.access(FYKK, Tuqy) and (not Hy7s.path.isdir(FYKK))
if Hy7s.path.dirname(HCmI):
if LZLW(HCmI, Tuqy):
return HCmI
return None
if pmON is None:
pmON =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Nygx(HCmI, Tuqy=Hy7s.F_OK | Hy7s.X_OK, pmON=None):\n\n def LZLW(FYKK, Tuqy):\n return Hy7s.path.exists(FYKK) and Hy7s.access(FYKK, Tuqy) and (not Hy7s.path.isdir(FYKK))\n if Hy7s.path.dirname(HCmI):\n if LZLW(HCmI, Tuqy):\n return HCmI\n return None\n if pmON is None:\n... | [
"0.77106726",
"0.7453694",
"0.727641",
"0.6943331",
"0.6540709",
"0.639578",
"0.60801244",
"0.59047854",
"0.5880955",
"0.5878199",
"0.57527226",
"0.5732597",
"0.5709009",
"0.5672643",
"0.5576627",
"0.5575957",
"0.55535084",
"0.5497285",
"0.5452454",
"0.5445605",
"0.5425212",
... | 0.7460819 | 1 |
A view to show all products, including ability to search | def HVIF(QePW):
llaM = oPx1.objects.all()
LeZt = None
if QePW.GET:
if 'category' in QePW.GET:
LeZt = QePW.GET['category'].split(',')
llaM = llaM.filter(category__name__in=LeZt)
LeZt = ee6q.objects.filter(name__in=LeZt)
QpfX = {'projects': llaM, 'current_catego... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wv_W(QePW):\n Ldyl = msfn.objects.all()\n return _1tc(QePW, 'products.html', {'products': Ldyl})",
"def wv_W(QePW):\n Ldyl = msfn.objects.all()\n return _1tc(QePW, 'products.html', {'products': Ldyl})",
"def Ldyl(QePW):\n return _1tc(QePW, 'core/products.html', {'products': msfn.objects.all(... | [
"0.82876235",
"0.8283801",
"0.78482085",
"0.76325524",
"0.7614649",
"0.7584741",
"0.74856204",
"0.74783254",
"0.74655133",
"0.7386778",
"0.7367176",
"0.7330932",
"0.72938323",
"0.7253225",
"0.72413594",
"0.7230313",
"0.72217464",
"0.720815",
"0.711731",
"0.7079289",
"0.704237... | 0.0 | -1 |
Return True if the campaign authorizes the user to provide data to the campaign. This is the case if the user owns or works for the campaign. Otherwise, return False. | def SeQ3(YKHO, CBIr):
return YKHO.owner == CBIr or YKHO.workers.filter(pk=CBIr.id).exists() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oAWu(YKHO):\n return YKHO.authorization is not None",
"def GxnE(YKHO):\n try:\n return YKHO.user.creditAllowed()\n except AttributeError:\n return False",
"def qHTF(YKHO, QePW, tTee):\n CBIr = QePW.user\n try:\n CBIr.user_client\n return True\n except Exception... | [
"0.71512544",
"0.6903803",
"0.6882612",
"0.6824171",
"0.6759655",
"0.671842",
"0.67081565",
"0.6686441",
"0.66475916",
"0.6640897",
"0.6619891",
"0.66168815",
"0.6604757",
"0.6577445",
"0.65759784",
"0.65525156",
"0.65457594",
"0.65178764",
"0.6516392",
"0.65048504",
"0.64949... | 0.68715215 | 3 |
Create a new FrozenDict where one entry is removed. | def BEuN(YKHO, H5ew: K) -> AzJI['FrozenDict[K, V]', cAlv]:
BWXx = YKHO[H5ew]
TDnD = dict(YKHO._dict)
TDnD.pop(H5ew)
QGkr = type(YKHO)(TDnD)
return (QGkr, BWXx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FiJ9(fUYa: Mapping[Any, Any]) -> VXNQ[ImMB, ImMB]:\n return VXNQ(fUYa)",
"def aeFw(WKvO: Union[FrozenDict, Dict[str, Any]]) -> cuzp[ImMB, ImMB]:\n if isinstance(WKvO, VXNQ):\n return yOcR.tree_util.tree_map(lambda LVAh: LVAh, WKvO._dict)\n elif isinstance(WKvO, dict):\n bEXe = {}\n ... | [
"0.6839586",
"0.6433712",
"0.63349175",
"0.630568",
"0.60893214",
"0.59897816",
"0.5919276",
"0.5696106",
"0.56297266",
"0.5533009",
"0.5489603",
"0.54769456",
"0.54426163",
"0.53937614",
"0.5389322",
"0.5372033",
"0.5324981",
"0.53037596",
"0.53020614",
"0.52977496",
"0.5270... | 0.57714397 | 7 |
Deep copy unfrozen dicts to make the dictionary FrozenDict safe. | def Tl7Q(fUYa: Any) -> ImMB:
if isinstance(fUYa, VXNQ):
return fUYa._dict
if not isinstance(fUYa, dict):
return fUYa
return {H5ew: Tl7Q(wEf2) for H5ew, wEf2 in fUYa.items()} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aeFw(WKvO: Union[FrozenDict, Dict[str, Any]]) -> cuzp[ImMB, ImMB]:\n if isinstance(WKvO, VXNQ):\n return yOcR.tree_util.tree_map(lambda LVAh: LVAh, WKvO._dict)\n elif isinstance(WKvO, dict):\n bEXe = {}\n for H5ew, BWXx in WKvO.items():\n bEXe[H5ew] = aeFw(BWXx)\n r... | [
"0.71733785",
"0.7037678",
"0.65864396",
"0.6474158",
"0.62573695",
"0.6152454",
"0.61428803",
"0.6087053",
"0.6052837",
"0.60174745",
"0.5997487",
"0.59899086",
"0.5918377",
"0.5899443",
"0.5898595",
"0.5892593",
"0.5735094",
"0.572419",
"0.5684948",
"0.56120795",
"0.5609732... | 0.7742294 | 0 |
Unfreeze a FrozenDict. Makes a mutable copy of a `FrozenDict` mutable by transforming it into (nested) dict. | def aeFw(WKvO: Union[FrozenDict, Dict[str, Any]]) -> cuzp[ImMB, ImMB]:
if isinstance(WKvO, VXNQ):
return yOcR.tree_util.tree_map(lambda LVAh: LVAh, WKvO._dict)
elif isinstance(WKvO, dict):
bEXe = {}
for H5ew, BWXx in WKvO.items():
bEXe[H5ew] = aeFw(BWXx)
return bEXe
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Tl7Q(fUYa: Any) -> ImMB:\n if isinstance(fUYa, VXNQ):\n return fUYa._dict\n if not isinstance(fUYa, dict):\n return fUYa\n return {H5ew: Tl7Q(wEf2) for H5ew, wEf2 in fUYa.items()}",
"def FiJ9(fUYa: Mapping[Any, Any]) -> VXNQ[ImMB, ImMB]:\n return VXNQ(fUYa)",
"def aeFw(Emd4, cXFM)... | [
"0.678866",
"0.63871247",
"0.63075334",
"0.6243246",
"0.61387753",
"0.61324066",
"0.5833921",
"0.56678116",
"0.5610028",
"0.5581237",
"0.547987",
"0.528664",
"0.5166779",
"0.51488274",
"0.5131935",
"0.513004",
"0.5127286",
"0.51143354",
"0.5108335",
"0.5104038",
"0.50658894",... | 0.80311483 | 0 |
Create a new dict where one entry is removed. This is a utility function that can act on either a FrozenDict or regular dict and mimics the behavior of `FrozenDict.pop`. | def BEuN(WKvO: Union[FrozenDict, Dict[str, Any]], H5ew: str) -> AzJI[uLKX[VXNQ, cuzp[str, ImMB]], ImMB]:
if isinstance(WKvO, VXNQ):
return WKvO.pop(H5ew)
elif isinstance(WKvO, dict):
TDnD = yOcR.tree_map(lambda WKvO: WKvO, WKvO)
BWXx = TDnD.pop(H5ew)
return (TDnD, BWXx)
raise... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BEuN(YKHO, H5ew: K) -> AzJI['FrozenDict[K, V]', cAlv]:\n BWXx = YKHO[H5ew]\n TDnD = dict(YKHO._dict)\n TDnD.pop(H5ew)\n QGkr = type(YKHO)(TDnD)\n return (QGkr, BWXx)",
"def xo66(Csk6, H5ew):\n return Csk6.pop(H5ew)",
"def Z1YG(YKHO, cmPJ, H5ew):\n tbx9 = cmPJ.copy()\n tbx9.pop(H5ew,... | [
"0.70482343",
"0.67293966",
"0.6490357",
"0.6465873",
"0.61706996",
"0.6144822",
"0.6001672",
"0.59998095",
"0.5967065",
"0.59639794",
"0.5955744",
"0.59308225",
"0.588004",
"0.58719283",
"0.58055025",
"0.57446265",
"0.57119524",
"0.56699175",
"0.5650597",
"0.56066054",
"0.55... | 0.7112404 | 0 |