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 |
|---|---|---|---|---|---|---|
Increase the scaffold overlap between two sets of indices by randomly selecting two unshared scaffolds, one in each set, and splitting the indices evenly between the two sets. | def S877(O61H: Set[int], ASfa: Set[int], N1Su: Dict[int, str], lLK_: Dict[str, Set[int]], vGSM: float) -> AzJI[fHNa[int], fHNa[int]]:
O61H = _qLf(O61H)
ASfa = _qLf(ASfa)
N8gD = {N1Su[d6pt] for d6pt in O61H if len(lLK_[N1Su[d6pt]]) >= 2}
HTzU = {N1Su[d6pt] for d6pt in ASfa if len(lLK_[N1Su[d6pt]]) >= 2}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z_hE(O61H: Set[int], ASfa: Set[int], N1Su: Dict[int, str], lLK_: Dict[str, Set[int]], vGSM: float) -> AzJI[fHNa[int], fHNa[int]]:\n O61H = _qLf(O61H)\n ASfa = _qLf(ASfa)\n N8gD = {N1Su[d6pt] for d6pt in O61H}\n HTzU = {N1Su[d6pt] for d6pt in ASfa}\n b65I = N8gD | HTzU\n iQin = N8gD & HTzU\n ... | [
"0.79564273",
"0.733144",
"0.6357831",
"0.63047314",
"0.615096",
"0.6049924",
"0.5993188",
"0.5838642",
"0.5782231",
"0.57533544",
"0.57329917",
"0.55902934",
"0.55560696",
"0.5551713",
"0.5516679",
"0.551179",
"0.5465472",
"0.54605436",
"0.54539526",
"0.5452993",
"0.54470766... | 0.8115335 | 0 |
Split a dataset by scaffold so that no molecules sharing a scaffold are in the same split. | def SSml(nPrm: MoleculeDataset, yHH9: float, Vw7i: float=0.025, Cpim: int=10000, maxY: Tuple[float, float, float]=(0.8, 0.1, 0.1), E7a7: float=0.025, yokr: int=0, bo34: logging.Logger=None) -> AzJI[_kUU, _kUU, _kUU]:
assert len(maxY) == 3 and sum(maxY) == 1 and (0 <= yHH9 <= 1) and (Vw7i >= 0)
zBu_, HI29, NI2E ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gzDo(nPrm: MoleculeDataset) -> AzJI[_kUU, _kUU, _kUU]:\n lLK_ = OSOD(nPrm.mols(), use_indices=True)\n i90Z = sorted(list(lLK_.keys()), key=lambda afxa: len(lLK_[afxa]), reverse=True)\n EvQg = [nPrm[d6pt] for d6pt in lLK_[i90Z[0]]]\n wEf2 = [nPrm[d6pt] for d6pt in lLK_[i90Z[1]]]\n QOe9 = [nPrm[d6... | [
"0.80908746",
"0.74137425",
"0.6739863",
"0.63182425",
"0.6241313",
"0.6174691",
"0.58469987",
"0.5844013",
"0.5775175",
"0.5748342",
"0.57448846",
"0.574323",
"0.5672647",
"0.5648632",
"0.5641028",
"0.56339",
"0.5622885",
"0.5618617",
"0.5613962",
"0.5579254",
"0.5524884",
... | 0.56979907 | 12 |
Return this table as HTML, ready to be inserted into a template. To customize the output, set the ``template`` meta option to a new template, and use the table_tags to build your own template. See README for examples. | def VCWC(YKHO):
return eoaG(YKHO._meta.template, {'table': YKHO}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VCWC(YKHO):\n rPXJ = DAt9(YKHO.template)\n QePW = _1uh()\n return rPXJ.render(K1Ja(QePW, {'table': YKHO}))",
"def ioHC(YKHO):\n usx6 = YKHO.check()\n zzKE = ''\n for rdlD in usx6:\n nPrm = YKHO._format_row(rdlD)\n zzKE += nPrm\n return YKHO.TEMPLATE.format(content=zzKE)",
... | [
"0.8210146",
"0.73944736",
"0.73321325",
"0.72068954",
"0.7188988",
"0.71167964",
"0.6978338",
"0.69088024",
"0.6835821",
"0.67731744",
"0.6751451",
"0.6749531",
"0.67170566",
"0.67142826",
"0.6711615",
"0.66077894",
"0.65958345",
"0.65854436",
"0.65589684",
"0.6472386",
"0.6... | 0.8329112 | 0 |
Return a list of fire weather stations. | async def get_stations(geh0: Response, JZXy: StationSourceEnum=dDAL.UNSPECIFIED):
try:
bo34.info('/stations/')
otGE = await wNbJ(JZXy)
geh0.headers['Cache-Control'] = Nlgd
return TOQp(features=otGE)
except Exception as exception:
bo34.critical(AJ5d, exc_info=True)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def get_stations() -> x1iM[nl77]:\n f029 = GPtr.get('USE_WFWX') == 'True'\n if f029:\n return await kWHq()\n return DFub()",
"def Oj45():\n return IeOM",
"def DFub() -> x1iM[dict]:\n S0MI.info('Using pre-generated json to retrieve station list')\n with open(sDq6) as rN5e:\n ... | [
"0.75444496",
"0.73146105",
"0.7232804",
"0.7110344",
"0.7090891",
"0.6833961",
"0.6830662",
"0.673927",
"0.66736394",
"0.6660907",
"0.6619825",
"0.6617389",
"0.6539462",
"0.6521833",
"0.651591",
"0.64141506",
"0.6389208",
"0.63866407",
"0.6371408",
"0.6364273",
"0.6323151",
... | 0.58162564 | 71 |
Override rich comparison method. It compares the indices of the documents in the self.documents list. Returns True if the indices are the same in both documents lists, False otherwise. | def xa14(YKHO, Elif):
if not YKHO or not Elif:
return False
if len(YKHO.documents) != len(Elif.documents):
return False
for YRbF in Ni9Y(0, len(YKHO.documents)):
if YKHO.documents[YRbF].index != Elif.documents[YRbF].index:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n if not isinstance(Elif, Dpwg):\n raise NotImplementedError('Only a Corpus can be compared to another Corpus.')\n if len(YKHO) != len(Elif):\n return False\n for YRbF in range(len(YKHO)):\n if YKHO.documents[YRbF] != Elif.documents[YRbF]:\n return Fal... | [
"0.6868995",
"0.66270757",
"0.6577935",
"0.6496078",
"0.6383377",
"0.63524246",
"0.6248521",
"0.62020355",
"0.61382425",
"0.6022278",
"0.6014331",
"0.6013102",
"0.6006355",
"0.59929043",
"0.5977401",
"0.5951384",
"0.59509236",
"0.59257156",
"0.5917298",
"0.59118927",
"0.59067... | 0.73647726 | 0 |
Transforms an YIQ image into the RGB color space. | def Uq8W(VRfx):
return oyIN.dot(VRfx, oyIN.linalg.inv(UJF1).T.copy()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qv15(IE94: np.ndarray) -> oyIN.ndarray:\n zmCJ = oyIN.array([[0.299, 0.587, 0.114], [0.59590059, -0.27455667, -0.32134392], [0.21153661, -0.52273617, 0.31119955]])\n YM83 = oyIN.linalg.inv(zmCJ)\n sDfV = oyIN.ndarray(IE94.shape)\n sDfV[:, :, 0] = YM83[0, 0] * IE94[:, :, 0] + YM83[0, 1] * IE94[:, :,... | [
"0.8312355",
"0.8259237",
"0.8081804",
"0.7993288",
"0.76654387",
"0.7594864",
"0.7186081",
"0.71535397",
"0.7102299",
"0.70564187",
"0.6948649",
"0.68958557",
"0.68218267",
"0.68105596",
"0.6784802",
"0.6613954",
"0.6396271",
"0.63403475",
"0.62976307",
"0.6289597",
"0.62389... | 0.80055135 | 3 |
Find q vector from z vector. | def LPer(epBp, tlTX):
XT7u = oyIN.arange(L0bE)
vexM = oyIN.zeros(len(epBp) - 1)
for YRbF in range(len(epBp) - 1):
vexM[YRbF] = oyIN.sum(XT7u[epBp[YRbF]:epBp[YRbF + 1] + 1] * tlTX[epBp[YRbF]:epBp[YRbF + 1] + 1]) / oyIN.sum(tlTX[epBp[YRbF]:epBp[YRbF + 1] + 1])
return vexM.round().astype(oyIN.uint8... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xBbA(YKHO):\n lWPh = YKHO.latt_par['D'].value\n bjxt = YKHO.latt_par['lambda_r'].value\n KMvS = YKHO.latt_par['gamma'].value\n return 2 * oyIN.pi * (YKHO.h / lWPh - YKHO.k / bjxt / oyIN.tan(KMvS))",
"def Mnn7(vexM):\n epBp = oyIN.zeros(len(vexM) - 1, int)\n for YRbF in range(len(vexM) - 1):... | [
"0.69013536",
"0.67796665",
"0.66324735",
"0.6573723",
"0.6535911",
"0.6519126",
"0.6348701",
"0.633755",
"0.6297241",
"0.62085783",
"0.6186977",
"0.6146965",
"0.61301327",
"0.6129197",
"0.61165744",
"0.610691",
"0.6080239",
"0.59950686",
"0.59941405",
"0.59802324",
"0.597485... | 0.5930834 | 24 |
Find q vector from z vector. | def Mnn7(vexM):
epBp = oyIN.zeros(len(vexM) - 1, int)
for YRbF in range(len(vexM) - 1):
epBp[YRbF] = oyIN.ceil(vexM[YRbF] / 2 + vexM[YRbF + 1] / 2)
return oyIN.concatenate([[0], epBp, [L0bE - 1]]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xBbA(YKHO):\n lWPh = YKHO.latt_par['D'].value\n bjxt = YKHO.latt_par['lambda_r'].value\n KMvS = YKHO.latt_par['gamma'].value\n return 2 * oyIN.pi * (YKHO.h / lWPh - YKHO.k / bjxt / oyIN.tan(KMvS))",
"def zKFi(YKHO, epBp):\n f33y = 1 + epBp\n ymDg = f33y * f33y\n lnXc = f33y * ymDg\n d... | [
"0.69018024",
"0.66323406",
"0.6574459",
"0.65359885",
"0.6517065",
"0.6348055",
"0.6338913",
"0.62964493",
"0.6208453",
"0.61859995",
"0.6146106",
"0.61299306",
"0.6127998",
"0.61149",
"0.610666",
"0.60803676",
"0.5994957",
"0.59931463",
"0.59810233",
"0.597437",
"0.596203",... | 0.6780009 | 1 |
Padding which allows to simultaneously pad in a reflection fashion and map to complex. | def FIMM(YKHO, x_5g, zi3C, rsLF=False):
YKHO.pre_pad = rsLF
YKHO.pad_size = x_5g
YKHO.input_size = zi3C
YKHO.build() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hVLt(WKvO, _C3A=0, Yxbz=0, NHzm=True):\n hlel = PTkL(WKvO, _C3A, Yxbz, mode='reflect')\n if NHzm:\n hlel = ht2j.stack((hlel, ht2j.zeros_like(hlel)), dim=-1)\n return hlel",
"def Cc7Y(YKHO):\n HJp4 = list(YKHO.pad_size)\n if HJp4[0] == YKHO.input_size[0]:\n HJp4[0] -= 1\n H... | [
"0.6470411",
"0.6267466",
"0.62590736",
"0.61670756",
"0.60758746",
"0.6044263",
"0.59978795",
"0.5988728",
"0.5939337",
"0.59084773",
"0.5906249",
"0.5868863",
"0.58217543",
"0.5801737",
"0.5784492",
"0.5765109",
"0.5756248",
"0.5756244",
"0.5743488",
"0.5713688",
"0.5713037... | 0.0 | -1 |
Return the current system timezone | def gwvX():
gMlj = False
try:
gMlj = Hy7s.path.realpath(Hy7s.path.join(OZo6, 'etc/localtime'))
gMlj = gMlj.split('/')
except Exception as e:
SBpC(u'Cannot read the timezone' + str(tTpl.args).decode('utf-8'), 'ERROR')
return gMlj[-2] + '/' + gMlj[-1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rIAI():\n return ITS7.timezone",
"def MbZJ():\n return rIAI('Etc/GMT-10')",
"def Vsdc():\n return YdD0.get_timezone(_meq())",
"def Vsdc(YKHO) -> str:\n return YKHO.AD.time_zone",
"def Vsdc():\n try:\n for zFiD in open('/etc/sysconfig/clock'):\n Jyyj, BWXx = zFiD.split('... | [
"0.8638515",
"0.8165198",
"0.81053346",
"0.76771677",
"0.76731414",
"0.762153",
"0.76022875",
"0.7528684",
"0.7526337",
"0.7484276",
"0.7484276",
"0.7484276",
"0.7482943",
"0.74291104",
"0.740821",
"0.73642504",
"0.7363934",
"0.73002017",
"0.72446585",
"0.7242143",
"0.7136974... | 0.7554259 | 7 |
Determines whether a URL is the redirect URI for this client. | def wX5V(YKHO, NSiX, bD7m):
vSyi = YKHO._construct_url([NSiX, YKHO.base_url_path, YKHO.redirect_uri])
Hs_L = bD7m.partition('?')[0]
return vSyi == Hs_L | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PmWr(YKHO, zb3C, vSyi, QePW, *qIxc, **B2fa):\n QePW.client = QePW.client or YKHO._clientgetter(zb3C)\n x0hE = QePW.client\n if hasattr(x0hE, 'validate_redirect_uri'):\n return x0hE.validate_redirect_uri(vSyi)\n return vSyi in x0hE.redirect_uris",
"def yto3(YKHO, Rci7):\n return bool(KVW... | [
"0.71405023",
"0.71121943",
"0.69457793",
"0.6885453",
"0.6767164",
"0.66483873",
"0.64862335",
"0.6463275",
"0.64614815",
"0.6456081",
"0.63940734",
"0.63927776",
"0.63826865",
"0.6365699",
"0.6359056",
"0.63528407",
"0.6319239",
"0.6273521",
"0.6246883",
"0.6231241",
"0.622... | 0.8336722 | 0 |
Joins components of a URL with separators where needed. | def IzyR(SQ3m):
dixj = []
KjOB = len(SQ3m) - 1
for exwG, Q7me in enumerate(SQ3m):
if exwG > 0:
Q7me = Q7me.lstrip('/')
if exwG < KjOB:
Q7me = Q7me.rstrip('/')
if Q7me:
dixj.append(Q7me)
return '/'.join(dixj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TDhU(*SQ3m):\n\n def rZ13(SQ3m):\n THkp = None\n for Q7me in SQ3m:\n if not Q7me:\n continue\n if not THkp:\n THkp = Q7me\n elif (THkp[-1] == '/') != (Q7me[0] == '/'):\n THkp = Q7me\n elif Q7me[0] == '/':\... | [
"0.78598994",
"0.77680624",
"0.769096",
"0.7595144",
"0.7594625",
"0.7532864",
"0.7529185",
"0.75231504",
"0.74930847",
"0.7435269",
"0.734676",
"0.7331661",
"0.71889573",
"0.7146014",
"0.714052",
"0.7139423",
"0.6971064",
"0.6800093",
"0.67886126",
"0.673153",
"0.66855735",
... | 0.7665759 | 3 |
This fuction converts a given peak wavelength to an approximate RGB color value. The wavelength should be from 380 nm through 750 nm otherwise it will return zeros (i.e. black color). | def KPeG(__d3, KMvS=0.8, LLeL=False):
__d3 *= 10.0 ** 9.0
if 380.0 <= __d3 < 440.0:
bejQ = 0.3 + 0.7 * (__d3 - 380.0) / (440.0 - 380.0)
Mkmy = (-(__d3 - 440.0) / (440.0 - 380.0) * bejQ) ** KMvS
Oa1e = 0.0
Fg_i = (1.0 * bejQ) ** KMvS
elif 440.0 <= __d3 < 490.0:
Mkmy = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KPeG(yzQ0: float, KMvS: float=1.0) -> gyIm:\n if yzQ0 <= xRTD:\n Z9rn = ((xRTD - yzQ0) / 90, 0.0, 1.0)\n elif yzQ0 <= ddmi:\n Z9rn = (0.0, (yzQ0 - xRTD) / ik4P, 1.0)\n elif yzQ0 <= PtAy:\n Z9rn = (0.0, 1.0, (PtAy - yzQ0) / y5ZM)\n elif yzQ0 <= _fFW:\n Z9rn = ((yzQ0 - PtA... | [
"0.7030515",
"0.6838825",
"0.67588544",
"0.65369767",
"0.6371136",
"0.62787795",
"0.6265969",
"0.62597114",
"0.6251292",
"0.6152144",
"0.60409725",
"0.59426177",
"0.5935737",
"0.5935737",
"0.5935737",
"0.5935737",
"0.58939606",
"0.5892293",
"0.5836986",
"0.5829641",
"0.582583... | 0.6708099 | 3 |
Split DataFrame on two parts. | def U4xg(jQ3Z, ywwl, igb0=None):
tuKI = oyIN.random.RandomState(igb0)
drzX = oyIN.arange(len(jQ3Z))
Nobg = tuKI.permutation(drzX)
_lYe = jQ3Z.iloc[Nobg[:ywwl]]
qaAi = jQ3Z.iloc[Nobg[ywwl:]]
return (_lYe, qaAi) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Xfh7(jQ3Z, lpha):\n EvQg = jQ3Z.iloc[:int(len(jQ3Z) * lpha)]\n QOe9 = jQ3Z.iloc[int(len(jQ3Z) * lpha):]\n return (EvQg, QOe9)",
"def cxqa(jQ3Z: pyspark.DataFrame) -> atdS.DataFrame:\n return jQ3Z",
"def Ulm3(bOBl):\n bOBl = bOBl.dropna()\n d6pt = 100\n XxFT = bOBl.iloc[:d6pt]\n t4zr... | [
"0.7186549",
"0.711421",
"0.70219564",
"0.69289196",
"0.6712501",
"0.6703415",
"0.65471244",
"0.65036076",
"0.6352522",
"0.63412976",
"0.62779367",
"0.6276081",
"0.62718457",
"0.6227857",
"0.61960644",
"0.617916",
"0.6172768",
"0.6166577",
"0.61506385",
"0.6144001",
"0.611286... | 0.0 | -1 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, kcfq):
return False
return YKHO.__dict__ == Elif.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.8456063",
"0.83918154",
"0.8144437",
"0.8140196",
"0.8132038",
"0.8093834",
"0.80918837",
"0.80918837",
"0.80918837",
"0.80852824",
"0.80852824",
"0.807626",
"0.807626",
"0.80657643"
] | 0.0 | -1 |
Save the message on the Server This backend always assigns a new uid, so the uid arg is ignored. This function will update the self.messagelist dict to contain the new message after sucessfully saving it, including labels. See folder/Base for details. Note that savemessage() does not check against dryrun settings, so y... | def l04A(YKHO, PObu, hGN5, JbyC, RRgp):
if not YKHO.synclabels:
return super(eve8, YKHO).savemessage(PObu, hGN5, JbyC, RRgp)
Crrw = set()
for zlWN in YKHO.getmessageheaderlist(hGN5, YKHO.labelsheader):
Crrw.update(Q79n.labels_from_header(YKHO.labelsheader, zlWN))
U5bT = super(eve8, YKHO)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def udTb(YKHO, PObu, Crrw):\n if PObu in YKHO.messagelist and 'labels' in YKHO.messagelist[PObu]:\n Mr_l = YKHO.messagelist[PObu]['labels']\n else:\n Mr_l = set()\n Crrw = Crrw - YKHO.ignorelabels\n kwqa = Crrw | Mr_l & YKHO.ignorelabels\n if Mr_l != kwqa:\n Aofo = YKHO._message... | [
"0.6426375",
"0.57177705",
"0.5686666",
"0.5623984",
"0.5565752",
"0.5477714",
"0.5402384",
"0.5339278",
"0.5300301",
"0.5261444",
"0.52459556",
"0.52429676",
"0.52099377",
"0.51339483",
"0.51322776",
"0.5094475",
"0.50941217",
"0.50941217",
"0.50941217",
"0.50941217",
"0.509... | 0.68003327 | 0 |
Filter a transition matrix, removing all the transitions towards suffixes that are not in the given list of values If values is None, do nothing | def BoNY(SppC, hkxX):
if hkxX is None:
return SppC
Ylbp = yUgu(order=SppC.order)
for y0cW, WErR in SppC.items():
iku2 = {ZI14: WErR[ZI14] for ZI14 in WErR if ZI14 in hkxX}
if iku2:
Ylbp[y0cW] = iku2
return Ylbp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tVok(hkxX, Q6uT):\n for ZfUD in Q6uT:\n if ZfUD not in hkxX:\n yield ZfUD",
"def h0jl(aWuw, hkxX):\n hkxX = set(hkxX)\n return list(Hs6x.dropwhile(lambda WKvO: WKvO in hkxX, aWuw))",
"def X6wM(hkxX, _DrS):\n hkxX[:] = (YRbF for YRbF in hkxX if YRbF != _DrS)",
"def zJeh(hkxX)... | [
"0.578562",
"0.56050646",
"0.55618083",
"0.54359293",
"0.53596264",
"0.52945614",
"0.5288177",
"0.5279489",
"0.5222232",
"0.5217521",
"0.51013094",
"0.5066446",
"0.50521463",
"0.5041288",
"0.50255555",
"0.50217223",
"0.4991823",
"0.4984307",
"0.4969121",
"0.49212953",
"0.4908... | 0.7467702 | 0 |
Create and return a new WordCount object. | def X3bT(GIN8, UHFx):
return WHpU(GIN8, UHFx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i5hy(l5Ny):\n return rn8k(YHsk(l5Ny))",
"def t7hl(YKHO):\n return mBkc(YKHO._normalize(YKHO._raw_phrase_str))",
"def jG8h(Emd4, JZXy: List):\n z1Rg = WHpU()\n for aeI9, t7hl in JZXy:\n z1Rg.append(aeI9, t7hl)\n return z1Rg",
"def FIMM(YKHO):\n YKHO.word_count_dict = {}\n YKHO.... | [
"0.66432583",
"0.6505284",
"0.64439225",
"0.62680393",
"0.62185013",
"0.61230034",
"0.611494",
"0.6075214",
"0.60578096",
"0.60046446",
"0.59811383",
"0.5980801",
"0.59782165",
"0.59593934",
"0.59562385",
"0.59508824",
"0.5913012",
"0.57914126",
"0.5759913",
"0.5719026",
"0.5... | 0.8317772 | 0 |
Show image with landmarks | def R39I(BQEg, rTBW, CWXo, lj_c):
xkjI = Hy7s.path.join(BQEg, rTBW)
LNo8 = hnIv.open(xkjI)
LNo8 = LNo8.crop((lj_c[0, 0], lj_c[0, 1], lj_c[0, 2], lj_c[0, 3]))
QrM1.imshow(LNo8)
QrM1.scatter(CWXo[0, 0::2], CWXo[0, 1::2], s=10, marker='.', c='r')
QrM1.pause(10)
QrM1.show() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R39I(LNo8, CWXo):\n if isinstance(LNo8, str):\n LNo8 = XC5k.cvtColor(XC5k.imread(LNo8), XC5k.COLOR_BGR2RGB)\n QrM1.imshow(LNo8)\n QrM1.scatter(CWXo[:, 0], CWXo[:, 1], s=10, marker='.', c='r')\n QrM1.pause(0.001)",
"def R39I(LNo8, CWXo):\n QrM1.imshow(LNo8)\n QrM1.scatter(CWXo[:, 0], ... | [
"0.808608",
"0.7926357",
"0.7926357",
"0.7926357",
"0.78171635",
"0.778297",
"0.7465765",
"0.6598388",
"0.65567565",
"0.65280706",
"0.6492143",
"0.6483718",
"0.6477732",
"0.644593",
"0.64328134",
"0.63780797",
"0.6371934",
"0.6371934",
"0.6371934",
"0.636128",
"0.6348264",
... | 0.7464966 | 7 |
Updates original graph by assigning new belief strengths to their respective nodes in the graph. | def BCc9(YKHO, yvY1, nZuS):
for Q6kx in nZuS:
yvY1.nodes[Q6kx]['belief_strength'] = nZuS[Q6kx]
return yvY1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def keB3(YKHO, yvY1):\n for Q6kx in yvY1.nodes:\n MxXY = yvY1.nodes[Q6kx]['belief_strength']\n for uv6v in yvY1.predecessors(Q6kx):\n cWFu = yvY1.nodes[uv6v]['belief_strength']\n WH_7 = abs(MxXY - cWFu)\n if MxXY * cWFu > 0:\n yvY1.edges[uv6v, Q6kx][... | [
"0.7557754",
"0.7157379",
"0.7108078",
"0.6794624",
"0.6792593",
"0.6661552",
"0.6658258",
"0.6624481",
"0.64533687",
"0.64493775",
"0.6447183",
"0.6430362",
"0.63784355",
"0.62919325",
"0.62204367",
"0.616087",
"0.61512613",
"0.61274296",
"0.61145127",
"0.60502183",
"0.60314... | 0.75894976 | 0 |
Get names of output variables. | def GDqH(YKHO, sNse):
sNse = YKHO._output_var_names
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SfsU(YKHO):\n d9xq = []\n for cyk0 in YKHO.outputs:\n d9xq.append(cyk0.get_object().name)\n return d9xq",
"def RSGb(YKHO):\n jGRS, zJsh, wIbz = YKHO.__xcall__(['--print-variables'])\n if jGRS != 0:\n raise RuntimeError(\"error querying --print-variables for package `%s': %s\" % (... | [
"0.8468522",
"0.7889633",
"0.75799996",
"0.734823",
"0.73286426",
"0.7300235",
"0.7169149",
"0.71586597",
"0.7110081",
"0.70965505",
"0.7080989",
"0.7076314",
"0.7057687",
"0.70570886",
"0.70488465",
"0.69816834",
"0.69655883",
"0.69144344",
"0.6903832",
"0.68854547",
"0.6857... | 0.7477548 | 3 |
Get units of variable. | def fTRe(YKHO, XuY2):
return YKHO.get_value_ref(XuY2).nbytes | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _nDu(YKHO, Es0b):\n try:\n rYO3 = YKHO.dataset[Es0b].units\n return rYO3\n except:\n return None",
"def b82i(YKHO):\n return YKHO.var_units",
"def _nDu(YKHO):\n tO9_ = BlNT.pack('>2B', 56, 14)\n geh0 = YKHO.query(tO9_)\n if geh0[1] == 2:\n rYO3 = 'A'\n C... | [
"0.83103883",
"0.8189632",
"0.7948371",
"0.7880219",
"0.7875394",
"0.7875394",
"0.7852583",
"0.7852583",
"0.77704597",
"0.7724156",
"0.77080154",
"0.7680472",
"0.767998",
"0.75592726",
"0.7523269",
"0.7493969",
"0.74555004",
"0.7451385",
"0.7451175",
"0.7448223",
"0.74259824"... | 0.0 | -1 |
Get units of variable. | def NOeY(YKHO, XuY2, sNse):
sNse = YKHO._var_units[XuY2]
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _nDu(YKHO, Es0b):\n try:\n rYO3 = YKHO.dataset[Es0b].units\n return rYO3\n except:\n return None",
"def b82i(YKHO):\n return YKHO.var_units",
"def _nDu(YKHO):\n tO9_ = BlNT.pack('>2B', 56, 14)\n geh0 = YKHO.query(tO9_)\n if geh0[1] == 2:\n rYO3 = 'A'\n C... | [
"0.83103883",
"0.8189632",
"0.7948371",
"0.7880219",
"0.7875394",
"0.7875394",
"0.7852583",
"0.7852583",
"0.77704597",
"0.7724156",
"0.77080154",
"0.7680472",
"0.767998",
"0.75592726",
"0.7523269",
"0.7493969",
"0.74555004",
"0.7451385",
"0.7451175",
"0.7448223",
"0.74259824"... | 0.0 | -1 |
Name of the component. | def yr70(YKHO):
return YKHO._name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mWFP(YKHO):\n return YKHO.component.get('Name', '')",
"def mWFP(YKHO):\n return YKHO.component.get('Name', '')",
"def W0tD(YKHO):\n return uGKo[YKHO.index][0]",
"def ZcDZ(YKHO):\n if YKHO.componentName:\n return YKHO.componentName\n else:\n raise Warning('No component name ha... | [
"0.8687381",
"0.8687381",
"0.8462051",
"0.8167638",
"0.77756315",
"0.77756315",
"0.77756315",
"0.77756315",
"0.77756315",
"0.77756315",
"0.77756315",
"0.77756315",
"0.77756315",
"0.77756315",
"0.7775231",
"0.7775231",
"0.7775231",
"0.7775231",
"0.7703021",
"0.77005935",
"0.77... | 0.8905444 | 0 |
Removes the last value and returns it. | def BEuN(YKHO):
kdwO = YKHO.__list[-1]
YKHO.__list = YKHO.__list[:-1]
return kdwO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BEuN(YKHO):\n BWXx = YKHO.lst[-1]\n YKHO.lst = YKHO.lst[:-1]\n return BWXx",
"def HH28(YKHO):\n return YKHO.list.pop()",
"def BEuN(YKHO):\n Fg_i = YKHO.a[-1]\n del YKHO.a[-1]\n return Fg_i",
"def BEuN(YKHO):\n BWXx = YKHO.values[0]\n if len(YKHO.values) == 1:\n YKHO.valu... | [
"0.7892454",
"0.7864021",
"0.77454287",
"0.7609421",
"0.7539565",
"0.743071",
"0.7407218",
"0.7405283",
"0.73662955",
"0.7331007",
"0.73282063",
"0.7291241",
"0.72135264",
"0.71850544",
"0.7181424",
"0.71549064",
"0.7147303",
"0.7131332",
"0.7125476",
"0.7088555",
"0.70641696... | 0.72214884 | 12 |
Moves the first "amount" of values to the end of the list. Returns the list. | def BZN_(YKHO, Z5kt):
YKHO.__validate_index(Z5kt)
for YRbF in range(Z5kt):
YKHO.__list = YKHO.__list[1:] + [YKHO.__list[0]]
return YKHO.__list | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WNBr(qFa0):\n return qFa0[:-1]",
"def u_PU(YKHO):\n list, d6pt = YKHO.get_info()\n YKHO.value = [list[d6pt]] + list[:d6pt] + list[d6pt + 1:]",
"def BEuN(YKHO, Z5kt=1) -> uLKX[_3Nv, x1iM[_3Nv]]:\n if Z5kt > len(YKHO.stack):\n raise JI2r\n hkxX = YKHO.stack[-Z5kt:][::-1]\n del YKHO.s... | [
"0.60799766",
"0.5966946",
"0.5941272",
"0.5929805",
"0.58110285",
"0.5775642",
"0.56279457",
"0.5596776",
"0.5582453",
"0.5581828",
"0.55610234",
"0.5546621",
"0.55438143",
"0.55426806",
"0.55370617",
"0.5523189",
"0.55133",
"0.5508297",
"0.5463782",
"0.5435849",
"0.54124415... | 0.7639682 | 0 |
Initialize the hidden state with zeros. | def MAw8(YKHO, Ep8u):
return ZylS.zeros((Ep8u, YKHO.enc_units)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MAw8(YKHO):\n MuED = ZylS.keras.initializers.Zeros()\n oCR3 = MuED(shape=(YKHO.batch, YKHO.units))\n return oCR3",
"def kNvj(YKHO, Ep8u):\n YEL5 = ht2j.zeros(YKHO.n_layers, Ep8u, YKHO.hidden_size)\n return YEL5",
"def MAw8(YKHO):\n return ZylS.zeros(shape=(YKHO.batch_size, YKHO.enc_units)... | [
"0.79861766",
"0.787504",
"0.78671885",
"0.7816188",
"0.76396877",
"0.7572875",
"0.7523184",
"0.72714657",
"0.69829756",
"0.69797844",
"0.69610065",
"0.69428575",
"0.69428575",
"0.6914388",
"0.6914388",
"0.69097793",
"0.69097793",
"0.6906865",
"0.6906865",
"0.6906865",
"0.688... | 0.75518566 | 6 |
Create the attention layer. | def FIMM(YKHO, rYO3):
super(exBL, YKHO).__init__()
YKHO.W1 = ZylS.keras.layers.Dense(rYO3)
YKHO.W2 = ZylS.keras.layers.Dense(rYO3)
YKHO.V = ZylS.keras.layers.Dense(1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Cc7Y(YKHO, GhuM):\n Norb = GhuM[2]\n YKHO.W = YKHO.add_weight(name='{}_W'.format(YKHO.name), shape=(Norb, Norb), initializer='uniform', trainable=True)\n YKHO.b = YKHO.add_weight(name='{}_b'.format(YKHO.name), shape=(Norb,), initializer='zeros', trainable=True)\n YKHO.u = YKHO.add_weight(name='{}_u... | [
"0.6838761",
"0.67751503",
"0.64022326",
"0.6364616",
"0.6293086",
"0.6272237",
"0.6216382",
"0.62022656",
"0.6196761",
"0.6166969",
"0.61518437",
"0.60484946",
"0.60116357",
"0.601037",
"0.59498703",
"0.59429073",
"0.59386516",
"0.59189075",
"0.5914943",
"0.5910486",
"0.5872... | 0.0 | -1 |
Padded shapes used to add padding when batching multiple sequences. | def QII5(YKHO):
return (([None], [None]), [None]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A3sp(YKHO):\n return ZylS.constant([[0, 0], [YKHO._settings.half_patch_size, YKHO._settings.half_patch_size], [YKHO._settings.half_patch_size, YKHO._settings.half_patch_size], [0, 0]])",
"def K9W8(jWe2, hVLt=Sbzz):\n Fbjb = [ZylS.shape(WKvO)[0] for WKvO in jWe2]\n EM67 = ZylS.reduce_max(Fbjb)\n J... | [
"0.6650374",
"0.664846",
"0.6632724",
"0.6612361",
"0.6600893",
"0.6589615",
"0.65575624",
"0.6527427",
"0.64948213",
"0.64529824",
"0.6439129",
"0.63959527",
"0.63831156",
"0.6278437",
"0.6245869",
"0.62399006",
"0.6205846",
"0.6202205",
"0.6200044",
"0.6191493",
"0.61889136... | 0.6885178 | 0 |
Write json string to file | def AHFl(Emd4, Nkld):
aqea = []
if Nkld or Nkld is not None:
aqea = [YEnM.to_dictionary() for YEnM in Nkld]
with open(Emd4.__name__ + '.json', 'w+') as eHNT:
eHNT.write(Emd4.to_json_string(aqea)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Lsrz(YKHO, Mu0k=None):\n HeoJ = qQXR.dumps(YKHO.json_dict, indent=2)\n YKHO._write_json_text(HeoJ, Mu0k)",
"def bFLq(YKHO, IznC, hGN5):\n pass",
"def bFLq(YKHO, IznC, hGN5):\n pass",
"def uP8n(YKHO, YGFP):\n hGN5 = qQXR.dumps(YGFP)\n if isinstance(hGN5, QMSQ):\n hGN5 = hGN5.encod... | [
"0.7886272",
"0.7855688",
"0.7855688",
"0.78360116",
"0.77595156",
"0.77153814",
"0.76603466",
"0.7620124",
"0.76046497",
"0.75864154",
"0.75695366",
"0.75665456",
"0.7564328",
"0.7548747",
"0.75305486",
"0.7521442",
"0.75167626",
"0.7512159",
"0.749917",
"0.748097",
"0.74701... | 0.0 | -1 |
Load a json string from a file and return dictionary | def J2u4(Emd4):
sjQ6 = []
try:
eHNT = open(Emd4.__name__ + '.json')
eHNT.close()
except FileNotFoundError:
return sjQ6
with open(Emd4.__name__ + '.json', 'r') as eHNT:
S06t = Emd4.from_json_string(eHNT.read())
for YRbF in S06t:
sjQ6.append(Emd4.create(**YRbF))... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WEhu(pmON):\n with open(pmON) as eHNT:\n cmPJ = qQXR.load(eHNT)\n return cmPJ",
"def lc9H(qaEx):\n with open(qaEx, 'r') as wM3v:\n cmPJ = qQXR.loads(wM3v.read())\n return cmPJ",
"def YGFP(pmON):\n wM3v = open(pmON)\n nMY2 = wM3v.read()\n zgjV = _1kr(nMY2)\n return zgjV... | [
"0.8250063",
"0.8087443",
"0.8013369",
"0.79877234",
"0.7986716",
"0.79786015",
"0.7945774",
"0.7933533",
"0.78672713",
"0.78418934",
"0.78179353",
"0.781791",
"0.78129375",
"0.7800302",
"0.77821213",
"0.77790284",
"0.77765054",
"0.77741253",
"0.7773424",
"0.7725738",
"0.7716... | 0.0 | -1 |
Returns torch.utils.data.DataLoader for train and validation datasets | def JWbQ(Ep8u=10, I7Gy=2):
zQKy = ht2j.utils.data.DataLoader(dataset=ozSE(), batch_size=Ep8u, shuffle=True, pin_memory=True, num_workers=I7Gy, collate_fn=X8fE)
return zQKy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vPeV(__n6, sTd8, w66i=0.2):\n Pnm3 = int(len(__n6) * (1 - w66i))\n K_if = len(__n6) - Pnm3\n XxFT, t4zr = ht2j.utils.data.random_split(__n6, [Pnm3, K_if])\n Pa1c = ht2j.utils.data.DataLoader(XxFT, batch_size=sTd8, shuffle=True)\n Blhr = ht2j.utils.data.DataLoader(t4zr, batch_size=1, shuffle=Fals... | [
"0.8141247",
"0.81195253",
"0.81176543",
"0.8069734",
"0.8051652",
"0.7971867",
"0.79161066",
"0.7871869",
"0.7858872",
"0.7830289",
"0.7830289",
"0.7830289",
"0.7830289",
"0.7830289",
"0.7830289",
"0.7830289",
"0.7830289",
"0.7830289",
"0.7800721",
"0.77973735",
"0.77464867"... | 0.7130026 | 64 |
Export environment variable KUBECONFIG for future calls of OC commands or other API calls | def JhjI(Ylu4):
RKD7.info('Testing access to cluster with %s', Ylu4)
if not Hy7s.path.isfile(Ylu4):
RKD7.warning("The kubeconfig file %s doesn't exist!", Ylu4)
return False
Hy7s.environ['KUBECONFIG'] = Ylu4
if not Nygx('oc'):
_I89()
try:
fupw('oc cluster-info')
ex... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SoBN():\n try:\n s_nr = int(Hy7s.getenv('AUTOBOT_POST_TIMELIMIT'))\n except TypeError:\n s_nr = None\n oH5g = Hy7s.getenv('REDISCLOUD_URL')\n if oH5g:\n bD7m = KVWQ.urlparse(oH5g)\n p5r8 = bD7m.hostname\n B3pN = bD7m.port\n ESX0 = bD7m.password\n else:\n... | [
"0.625255",
"0.6236772",
"0.619272",
"0.6031845",
"0.5993234",
"0.5941762",
"0.5907925",
"0.5897159",
"0.5853032",
"0.58303845",
"0.5820501",
"0.581416",
"0.57630026",
"0.57220846",
"0.5691352",
"0.5689089",
"0.5642033",
"0.56186134",
"0.56048864",
"0.5574101",
"0.55545074",
... | 0.5056234 | 77 |
Gets all the projects in the cluster | def PKRp(YKHO):
U5bT = YKHO.v1_projects.get()
return [mAB6.metadata.name for mAB6 in U5bT.items] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PKRp(YKHO):\n llaM = []\n B2Dn = 1\n while not len(llaM) % 100:\n llaM += YKHO._get('/projects?{0}'.format(uRlK.urlencode({'per_page': 100, 'page': B2Dn})))\n if not llaM:\n break\n B2Dn += 1\n return llaM",
"def XbWl(YKHO):\n try:\n A07C = YKHO.request[n... | [
"0.7879697",
"0.77686447",
"0.77153444",
"0.7680758",
"0.7602172",
"0.75627667",
"0.7512502",
"0.7491586",
"0.7475105",
"0.7404541",
"0.74008924",
"0.7400617",
"0.73860025",
"0.7368386",
"0.7344002",
"0.7330798",
"0.73195624",
"0.73041916",
"0.7296092",
"0.7193902",
"0.716374... | 0.731302 | 17 |
Get the model file if needed and return VGG19 weights and mean pixel | def agII(eG0V):
global MODEL_URL
KRkw.maybe_download_and_extract(eG0V, UDKe)
Ux0P = UDKe.split('/')[-1]
VqRE = Hy7s.path.join(eG0V, Ux0P)
if not Hy7s.path.exists(VqRE):
raise IOError('VGG Model not found.')
nPrm = Zxt2.io.loadmat(VqRE)
JBMS = nPrm['normalization']['averageImage'][0, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ohVR(YKHO):\n MYHg = Zxt2.io.loadmat(YKHO.model_path)\n YKHO.vgg_layers = MYHg['layers'][0]",
"def bSpI(YKHO):\n YKHO.vgg_model = ZylS.keras.applications.vgg19.VGG19(include_top=False, weights='imagenet')\n YKHO.vgg_model.trainable = False\n YKHO.style_outputs = [YKHO.vgg_model.get_layer(mWFP)... | [
"0.6666116",
"0.6615207",
"0.6589589",
"0.64674133",
"0.6401307",
"0.63752115",
"0.6340215",
"0.62598217",
"0.62562495",
"0.62545955",
"0.62060434",
"0.61868876",
"0.6142184",
"0.61353844",
"0.6123273",
"0.6061504",
"0.6045226",
"0.60201716",
"0.60005295",
"0.5995933",
"0.598... | 0.77340966 | 0 |
Test that an AWS Lambda function has an IAM role. | def LmC_(mkPq: str, h1Ur: str) -> bool:
iVtQ = akSL.get_function(FunctionName=mkPq)
uLjh: list = iVtQ.get('Configuration').get('Role')
return h1Ur in uLjh | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HmfX():\n w2B8 = WJfo()\n try:\n w2B8.get_role(BV7_().role_name)\n return True\n except gP7g.exception.BotoServerError:\n return False",
"def zcRM():\n cuiw = DMju(region_name='us-east-1')\n return cuiw",
"def LqR1():\n mWFP = 'myrole'\n U5bT = {'name': mWFP, 'resu... | [
"0.6633239",
"0.6146971",
"0.6142679",
"0.61373097",
"0.6136447",
"0.60688317",
"0.59749174",
"0.59568065",
"0.5915601",
"0.58894587",
"0.5882287",
"0.5863305",
"0.58583796",
"0.5835306",
"0.5812001",
"0.580969",
"0.5806154",
"0.5759594",
"0.57495314",
"0.5739313",
"0.5738318... | 0.73985726 | 0 |
Test that the library does not create workspace when created normally. | def Q2j1(YKHO):
YKHO.logger.info('STEP: Initialize the workspace library.')
YKHO.workspace = lnpD(FM6F())
YKHO.logger.info('STEP: Verify that the workspace library did not create a workspace directory.')
YKHO.assertFalse(GkAb.cwd().joinpath('workspace').exists()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s453():\n RwiL = Gduc()\n RwiL.create_workspace(RwiL.name)\n nyyK = lO5W(RwiL)\n assert nyyK",
"def FCbF(YKHO):\n YKHO.workspace_dir = gbPf.mkdtemp()",
"def FCbF(YKHO):\n YKHO.workspace_dir = gbPf.mkdtemp()\n if not Hy7s.path.exists(YKHO.workspace_dir):\n Hy7s.makedirs(YKHO.work... | [
"0.76550514",
"0.694893",
"0.6925919",
"0.6835711",
"0.68279076",
"0.68279076",
"0.68279076",
"0.68279076",
"0.68279076",
"0.68279076",
"0.68279076",
"0.6710682",
"0.6612715",
"0.6512675",
"0.6457979",
"0.63955534",
"0.6381671",
"0.6371415",
"0.63258094",
"0.6305037",
"0.6298... | 0.8485712 | 0 |
Test that the compression method raises exception when no workspace exists. | def gcJZ(YKHO):
YKHO.logger.info('STEP: Attempt to compress a directory that does not exist.')
YKHO.workspace = lnpD(FM6F())
with YKHO.assertRaises(Exception):
YKHO.logger.info('STEP: Verify that an exception was raised.')
YKHO.workspace.compress() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rxiK(YKHO):\n YKHO.logger.info('STEP: Create the workspace directory to be compressed.')\n HUs2 = lnpD(FM6F)\n AGPF = GkAb.cwd().joinpath('workspace')\n AGPF.mkdir()\n HUs2.workspace = AGPF\n AGPF.joinpath('file.txt').touch()\n cNeK = GkAb.cwd().joinpath('testfolder')\n cNeK.mkdir()\n ... | [
"0.6787375",
"0.6297237",
"0.61560434",
"0.6064327",
"0.6061227",
"0.60290605",
"0.60023546",
"0.59135",
"0.5672461",
"0.5671975",
"0.5646006",
"0.56418276",
"0.56173575",
"0.55956936",
"0.5582791",
"0.5545369",
"0.54625297",
"0.5443166",
"0.5430896",
"0.54288507",
"0.5406292... | 0.8452976 | 0 |
Test that the workspace library can create a test directory as a context manager. | def PT7m(YKHO):
YKHO.logger.info('STEP: Initialize the workspace.')
with lnpD(FM6F()) as HUs2:
YKHO.workspace = HUs2
YKHO.logger.info('STEP: Enter test directory in a context manager.')
with HUs2.test_directory('dir') as AGPF:
YKHO.logger.info('STEP: Verify that directory was... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m31U(YKHO):\n YKHO.logger.info('STEP: Initialize the workspace library as a context manager.')\n with lnpD(FM6F()) as HUs2:\n YKHO.workspace = HUs2\n YKHO.logger.info('STEP: Verify that the workspace library created the main workspace directory.')\n YKHO.assertTrue(HUs2.workspace.exi... | [
"0.7745369",
"0.73142076",
"0.7248098",
"0.72224647",
"0.7123573",
"0.7123573",
"0.7123573",
"0.7123573",
"0.7123573",
"0.7123573",
"0.7123573",
"0.712129",
"0.7114458",
"0.70451933",
"0.6912516",
"0.68925565",
"0.6889198",
"0.68644106",
"0.6732693",
"0.6629522",
"0.6591479",... | 0.81470317 | 0 |
Test that test directory raises exception if not workspace exist. | def IMYI(YKHO):
YKHO.logger.info('STEP: Enter a test directory without a workspace.')
YKHO.workspace = lnpD(FM6F())
YKHO.logger.info('STEP: Verify that an exception was raised.')
with YKHO.assertRaises(Exception):
with YKHO.workspace.test_directory('dir1'):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Q2j1(YKHO):\n YKHO.logger.info('STEP: Initialize the workspace library.')\n YKHO.workspace = lnpD(FM6F())\n YKHO.logger.info('STEP: Verify that the workspace library did not create a workspace directory.')\n YKHO.assertFalse(GkAb.cwd().joinpath('workspace').exists())",
"def PT7m(YKHO):\n YKHO.... | [
"0.7469659",
"0.7394075",
"0.73671615",
"0.72187626",
"0.70348716",
"0.6989729",
"0.696854",
"0.6861252",
"0.68519676",
"0.67864656",
"0.67566067",
"0.6753539",
"0.67277706",
"0.66922146",
"0.66518694",
"0.66272104",
"0.6620235",
"0.6584976",
"0.6567438",
"0.6564178",
"0.6547... | 0.8372566 | 0 |
To compute energy function for a fully visible Boltzmann machine. energy function E(x) = xT W x bT x. | def s4uc(YKHO, WKvO):
return -Kt_s.dot(Kt_s.transpose(WKvO), Kt_s.dot(YKHO.W, WKvO)) - Kt_s.dot(Kt_s.transpose(YKHO.b), WKvO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MI1C(YKHO):\n YRbF = YKHO.inl[0].to_flow()\n z1Rg = YKHO.outl[0].to_flow()\n epEI = (rHlu(YRbF, T0=YKHO.inl[0].T.val_SI) + rHlu(z1Rg, T0=YKHO.outl[0].T.val_SI)) / 2\n return YRbF[0] * (z1Rg[2] - YRbF[2]) - YKHO.A.val * (YKHO.E.val * YKHO.eta_opt.val - (epEI - YKHO.Tamb.val_SI) * YKHO.lkf_lin.val - ... | [
"0.7098127",
"0.6886161",
"0.6788846",
"0.6755604",
"0.6734077",
"0.6613271",
"0.6595658",
"0.6581154",
"0.64968556",
"0.64945894",
"0.6483825",
"0.6443397",
"0.64334285",
"0.641363",
"0.6412701",
"0.6389371",
"0.6367572",
"0.63647443",
"0.6358525",
"0.635569",
"0.6305159",
... | 0.7693399 | 0 |
Darknet Convolution2D followed by BatchNormalization and LeakyReLU. | def xRTZ(*qIxc, **B2fa):
_Eb8 = {'use_bias': False}
_Eb8.update(B2fa)
return capf(v9Xb(*qIxc, **_Eb8), ZylS.keras.layers.BatchNormalization(), ZylS.keras.layers.LeakyReLU(alpha=0.1)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MBDB(*qIxc, **B2fa):\n _Eb8 = {'use_bias': False}\n _Eb8.update(B2fa)\n return capf(ND0_(*qIxc, **_Eb8), r1No(), ybb1(alpha=0.1))",
"def acd3(*qIxc, **B2fa):\n _Eb8 = {'use_bias': False}\n _Eb8.update(B2fa)\n return capf(ND0_(*qIxc, **_Eb8), r1No(), MroH(vpws))",
"def PbqX():\n return ... | [
"0.72769314",
"0.69703734",
"0.68800706",
"0.6775198",
"0.66250277",
"0.6619191",
"0.6596903",
"0.6548156",
"0.64908445",
"0.6438889",
"0.6412645",
"0.6403083",
"0.6384412",
"0.6384063",
"0.6368069",
"0.63608307",
"0.63480204",
"0.6341501",
"0.6320468",
"0.6317373",
"0.631605... | 0.6808079 | 3 |
Input n>=6, Returns a list of primes, 2 <= p < n | def oHDU(exwG):
exwG, i0Uw = (exwG - exwG % 6 + 6, 2 - (exwG % 6 > 1))
KwQv = [True] * (exwG / 3)
for YRbF in Ni9Y(1, int(exwG ** 0.5) / 3 + 1):
if KwQv[YRbF]:
G1Hx = 3 * YRbF + 1 | 1
KwQv[G1Hx * G1Hx / 3::2 * G1Hx] = [False] * ((exwG / 6 - G1Hx * G1Hx / 6 - 1) / G1Hx + 1)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DwOa(exwG):\n return list(uVDW(exwG))",
"def kAOJ(exwG):\n uED7 = []\n for YRbF in range(2, exwG):\n if T1qg(YRbF):\n uED7.append(YRbF)\n return uED7",
"def _a2T(exwG):\n JscZ = []\n for YRbF in range(exwG):\n if T1qg(YRbF):\n JscZ.append(YRbF)\n ret... | [
"0.85413843",
"0.84438545",
"0.84063387",
"0.8358301",
"0.82609856",
"0.8234336",
"0.8213978",
"0.82113606",
"0.82060546",
"0.8170585",
"0.81014943",
"0.8003272",
"0.7959604",
"0.79537195",
"0.79436857",
"0.7939605",
"0.78893626",
"0.78684366",
"0.78684366",
"0.78623396",
"0.... | 0.7611071 | 35 |
Compute the weighted quantile of a 1D numpy array. | def qLf7(nPrm, _mSQ, S6AL):
nPrm = oyIN.asarray(nPrm)
_mSQ = oyIN.asarray(_mSQ)
if nPrm.ndim != 1:
raise TypeError('data must be a one dimensional array')
if nPrm.shape != _mSQ.shape:
raise TypeError('the length of data and weights must be the same')
if not 0.0 <= S6AL <= 1.0:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aM62(nPrm, _mSQ, S6AL):\n nPrm = oyIN.asarray(nPrm)\n if nPrm.ndim == 0:\n raise TypeError('data must have at least one dimension')\n elif nPrm.ndim == 1:\n return qLf7(nPrm, _mSQ, S6AL)\n ROpF = nPrm.shape\n SoBr = nPrm.reshape((oyIN.prod(ROpF[:-1]), ROpF[-1]))\n Aofo = oyIN.ap... | [
"0.7217673",
"0.6720041",
"0.67164385",
"0.67164385",
"0.6690575",
"0.6687368",
"0.6686444",
"0.66836166",
"0.660251",
"0.6537799",
"0.6504308",
"0.6396063",
"0.6338247",
"0.62059075",
"0.6187356",
"0.613913",
"0.61195487",
"0.6085778",
"0.6059164",
"0.6054292",
"0.5957532",
... | 0.71212786 | 1 |
Weighted quantile of an array with respect to the last axis. | def aM62(nPrm, _mSQ, S6AL):
nPrm = oyIN.asarray(nPrm)
if nPrm.ndim == 0:
raise TypeError('data must have at least one dimension')
elif nPrm.ndim == 1:
return qLf7(nPrm, _mSQ, S6AL)
ROpF = nPrm.shape
SoBr = nPrm.reshape((oyIN.prod(ROpF[:-1]), ROpF[-1]))
Aofo = oyIN.apply_along_axi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oX78(ezWE, o7bE):\n return bCYe(zip(ezWE, o7bE), jqqY(lambda WKvO: oyIN.quantile(*WKvO, axis=-1, interpolation='nearest').T), oyIN.stack)",
"def PZKv(jzdc, vexM, yzQ0=None, jDK_=None, yvT9=None, FNcw=False, GoGv='linear', JsoO=False):\n Mkmy, G1Hx = TOrG(jzdc, func=z7YQ, q=vexM, w=yzQ0, axis=jDK_, out=... | [
"0.67408216",
"0.65690666",
"0.65463793",
"0.64544874",
"0.64419645",
"0.6389295",
"0.6305194",
"0.6303884",
"0.6303884",
"0.62947106",
"0.6078249",
"0.6043367",
"0.5964708",
"0.5887918",
"0.5854728",
"0.5831092",
"0.58070064",
"0.57290864",
"0.5684102",
"0.56683034",
"0.5658... | 0.6951748 | 0 |
Creates a safe name to run tests. This method avoids the 60' delay between deleted queues. | def HvHm(YKHO):
mWFP = YKHO._generate_test_name()
while YKHO.exists(mWFP):
mWFP = YKHO._generate_test_name()
return mWFP | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fMAp():\n\n def k6QB(y0cW):\n return f'{y0cW}{ITS7.time_ns()}'\n return k6QB",
"def rYl4(mWFP):\n return 'test-%s-%s-%s' % (ITS7.strftime('%Y%m%d%H%M%S'), tuKI.randint(0, 999), mWFP)",
"def Gje8(Ilxn: str='') -> str:\n return f'thrifty-builder-test-{Ilxn}{kxTZ()}'",
"def X9y0() -> str:... | [
"0.71358895",
"0.7127008",
"0.69525456",
"0.677186",
"0.64615136",
"0.63748604",
"0.63429964",
"0.62733775",
"0.6244938",
"0.62149596",
"0.613629",
"0.6111109",
"0.6109556",
"0.6102906",
"0.60510844",
"0.60080934",
"0.5986134",
"0.59643",
"0.58902675",
"0.58822614",
"0.586114... | 0.6915452 | 3 |
Initializes global _vs_xid_names to map vserver xids to slice names. | def Tf53():
global _vs_xid_names
DSX4.info('mlab: requesting vs_xid_names.')
jQN8 = eQcP('vs_xid_names', CBfo) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wBbG(YKHO):\n i5Tr = oyIN.zeros(YKHO.X.shape[0], dtype=oyIN.int8)\n YKHO.segs_names_unique = []\n for A6bq, pG0V in enumerate(YKHO.segs):\n i5Tr[pG0V] = A6bq\n YKHO.segs_names_unique.append(A6bq)\n YKHO.segs_names = i5Tr",
"def wBbG(YKHO):\n i5Tr = oyIN.zeros(YKHO._adata.shape[0]... | [
"0.5636893",
"0.5522153",
"0.52812475",
"0.52301073",
"0.51671296",
"0.5112816",
"0.5109894",
"0.5021759",
"0.49783167",
"0.4969676",
"0.49648255",
"0.49628487",
"0.4956506",
"0.49513608",
"0.4946688",
"0.490924",
"0.49030608",
"0.48704565",
"0.48351312",
"0.48341462",
"0.482... | 0.8509733 | 0 |
Function that sets log levels and format strings. Checks for the OT_API_LOG_LEVEL environment variable otherwise defaults to INFO | def PhXv(geb0: str) -> None:
wO6d = 'INFO'
NUQc = geb0.upper()
if NUQc not in G9jH._nameToLevel:
HwRy.stderr.write(f'OT Log Level {NUQc} not found. Defaulting to {wO6d}\n')
NUQc = wO6d
tByj = G9jH._nameToLevel[NUQc]
It6F = viqz(KAOa, tByj)
Ylj8(It6F) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vUIa():\n aG11(G9jH.INFO, '%(asctime)s %(levelname)s:%(name)s:%(message)s')",
"def Vpd2(YKHO, BWXx: t.Union[str, int]=DfNA) -> None:\n YKHO.API_LOG_LEVEL: str = nfqd.str_level(BWXx)\n for YEnM in YKHO.API_CACHE.values():\n if isinstance(YEnM, nNXP.ModelMixins):\n nfqd.set_log_level... | [
"0.66874826",
"0.6589748",
"0.6513537",
"0.64591783",
"0.6333217",
"0.6328598",
"0.63138473",
"0.62733537",
"0.6239347",
"0.62277675",
"0.62011147",
"0.6188797",
"0.61739117",
"0.61598855",
"0.61595464",
"0.61410654",
"0.6134573",
"0.61194736",
"0.61183256",
"0.6086732",
"0.6... | 0.6268328 | 8 |
Based on the all given properties of Cost as parameters this method modifys the properties of Cost object in database. | def ejqf(Rn26, SnMP, PmE7, Z5kt, JBZA, Ghho):
nfqd.logger.debug('Start to modify the properties of Cost object in database based on the all given properties of Cost.')
try:
Gw9E = cuiw.query(paog.Cost).filter(paog.Cost.id == Rn26).one()
Gw9E.registrationDate = SnMP
Gw9E.dateOfPayment = P... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mXJ2(YKHO) -> None:\n YKHO['glider cost'] = YKHO['glider base mass'] * YKHO['glider cost slope'] + YKHO['glider cost intercept']\n YKHO['lightweighting cost'] = YKHO['glider base mass'] * YKHO['lightweighting'] * YKHO['glider lightweighting cost per kg']\n YKHO['electric powertrain cost'] = YKHO['elec... | [
"0.60249054",
"0.5900154",
"0.5779519",
"0.5745271",
"0.57116735",
"0.5698654",
"0.5648234",
"0.5627256",
"0.54596466",
"0.54413337",
"0.5384032",
"0.53756505",
"0.53339744",
"0.532222",
"0.5310683",
"0.5294133",
"0.52864933",
"0.52797604",
"0.5244163",
"0.5234909",
"0.523311... | 0.72679263 | 0 |
Based on the ID of the Cost object the registration date is modified in database. | def nktF(Rn26, SnMP):
nfqd.logger.debug('Start to modify registration date of Cost based on the ID.')
try:
Gw9E = cuiw.query(paog.Cost).filter(paog.Cost.id == Rn26).one()
Gw9E.registrationDate = SnMP
cuiw.commit()
nfqd.logger.info('Modify registration date of Cost based on the ID... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hx1Y(Rn26, PmE7):\n nfqd.logger.debug('Start to modify payment date of Cost based on the ID.')\n try:\n Gw9E = cuiw.query(paog.Cost).filter(paog.Cost.id == Rn26).one()\n Gw9E.dateOfPayment = PmE7\n cuiw.commit()\n nfqd.logger.info('Modify payment date of Cost based on the ID.'... | [
"0.69081503",
"0.6564969",
"0.5898605",
"0.58336765",
"0.5688528",
"0.5628036",
"0.56229764",
"0.5610867",
"0.55934894",
"0.54194903",
"0.54046184",
"0.538428",
"0.5312994",
"0.53014374",
"0.52989376",
"0.5288772",
"0.52676433",
"0.52676433",
"0.52541226",
"0.52541226",
"0.52... | 0.7674434 | 0 |
Based on a defined month adds all amount of Cost objects. | def FN2V(lO87, WcaU):
nfqd.logger.debug('Start to adds all amount of Cost objects based on a defined month.')
try:
qE0M = GRk0.monthrange(lO87, WcaU)[1]
fQTB = lWmK(_c1T(lO87, WcaU, 1), _c1T(lO87, WcaU, qE0M))
qUZ5 = 0
for ZfUD in fQTB:
qUZ5 += ZfUD.amount
nfq... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def B50v(lO87, WcaU, Ghho):\n nfqd.logger.debug('Start to adds all amount of Cost objects based on the month of payment date and on the category.')\n try:\n qE0M = GRk0.monthrange(lO87, WcaU)[1]\n fQTB = lWmK(_c1T(lO87, WcaU, 1), _c1T(lO87, WcaU, qE0M))\n qUZ5 = 0\n for ZfUD in fQ... | [
"0.71988547",
"0.67182624",
"0.6701152",
"0.647716",
"0.6454659",
"0.6191727",
"0.6183539",
"0.60424227",
"0.5972429",
"0.59429646",
"0.58308154",
"0.5828105",
"0.5822306",
"0.5822099",
"0.57874244",
"0.57857776",
"0.5773494",
"0.57730544",
"0.57183385",
"0.5656412",
"0.56540... | 0.8204188 | 0 |
Based on the payment date and on the category adds all amount of Cost objects. | def rBpL(CjKC, Ghho):
nfqd.logger.debug('Start to adds all amount of Cost objects based on the payment date and on the category')
try:
KUhg = cuiw.query(paog.Cost).filter(paog.Cost.dateOfPayment == CjKC).filter(paog.Cost.category == Ghho).all()
qUZ5 = 0
for ZfUD in KUhg:
qUZ5... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xoAo(PmE7):\n nfqd.logger.debug('Start to adds all amount of Cost objects based on the payment date.')\n try:\n hPh6 = AXQ2(PmE7)\n qUZ5 = 0\n for ZfUD in hPh6:\n qUZ5 += ZfUD.amount\n nfqd.logger.info('Based on the payment date adds all amount of Cost objects.')\n ... | [
"0.6924593",
"0.685676",
"0.67877376",
"0.67533684",
"0.66822225",
"0.62845093",
"0.6238191",
"0.6173786",
"0.6105009",
"0.60480267",
"0.5607281",
"0.55802166",
"0.5459683",
"0.54464096",
"0.54020333",
"0.5400573",
"0.53808737",
"0.5365998",
"0.5345533",
"0.53190535",
"0.5303... | 0.6626103 | 5 |
Based on the month of payment date and on the category adds all amount of Cost objects. | def B50v(lO87, WcaU, Ghho):
nfqd.logger.debug('Start to adds all amount of Cost objects based on the month of payment date and on the category.')
try:
qE0M = GRk0.monthrange(lO87, WcaU)[1]
fQTB = lWmK(_c1T(lO87, WcaU, 1), _c1T(lO87, WcaU, qE0M))
qUZ5 = 0
for ZfUD in fQTB:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FN2V(lO87, WcaU):\n nfqd.logger.debug('Start to adds all amount of Cost objects based on a defined month.')\n try:\n qE0M = GRk0.monthrange(lO87, WcaU)[1]\n fQTB = lWmK(_c1T(lO87, WcaU, 1), _c1T(lO87, WcaU, qE0M))\n qUZ5 = 0\n for ZfUD in fQTB:\n qUZ5 += ZfUD.amount... | [
"0.73662865",
"0.67063445",
"0.6665996",
"0.6451493",
"0.64312774",
"0.6418048",
"0.63532764",
"0.6071058",
"0.59187526",
"0.5883243",
"0.56107855",
"0.560603",
"0.55616343",
"0.55352634",
"0.54953206",
"0.54837793",
"0.54656994",
"0.543895",
"0.54066986",
"0.53911537",
"0.53... | 0.7708099 | 0 |
Between two payment date and on the category adds all amount of Cost objects. | def Mieb(WIo6, T196, Ghho):
nfqd.logger.debug('Start to adds all amount of Cost objects between two payment date and on the category')
try:
r2GP = lWmK(WIo6, T196)
qUZ5 = 0
for ZfUD in r2GP:
if ZfUD.category.value == Ghho:
qUZ5 += ZfUD.amount
nfqd.logg... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def u07H(WIo6, T196):\n nfqd.logger.debug('Start to adds all amount of Cost objects between two dates.')\n try:\n r2GP = lWmK(WIo6, T196)\n qUZ5 = 0\n for ZfUD in r2GP:\n qUZ5 += ZfUD.amount\n nfqd.logger.info('Between two dates adds all amount of Cost objects.')\n ... | [
"0.711402",
"0.66217005",
"0.650447",
"0.6427047",
"0.6404306",
"0.62961364",
"0.60495865",
"0.58920693",
"0.5763607",
"0.56230205",
"0.5616452",
"0.55582434",
"0.5501523",
"0.5338119",
"0.53262866",
"0.5322487",
"0.5290364",
"0.5265957",
"0.52578205",
"0.52472043",
"0.523393... | 0.76470697 | 0 |
Utility function to recursively flatten a list of lists. Each element in the list can be another list, tuple, set, or np.ndarray, and can have variable sizes. | def neIM(ezWE):
WsRX = []
for ZfUD in ezWE:
if isinstance(ZfUD, (list, tuple, set, oyIN.ndarray)):
WsRX.extend(neIM(ZfUD))
else:
WsRX.append(ZfUD)
return oyIN.array(WsRX) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PWgb(lu1l):\n rm8o = []\n for ZfUD in lu1l:\n if isinstance(ZfUD, list) or isinstance(ZfUD, tuple):\n rm8o += PWgb(ZfUD)\n else:\n rm8o.append(ZfUD)\n return rm8o",
"def PWgb(nwEZ):\n rm8o = [LVAh for WKvO in nwEZ for LVAh in WKvO]\n return rm8o",
"def PWg... | [
"0.841995",
"0.8187215",
"0.8173554",
"0.8166283",
"0.81570935",
"0.81241864",
"0.8121669",
"0.8055444",
"0.804401",
"0.8041065",
"0.80381835",
"0.8028857",
"0.8025141",
"0.8018862",
"0.80187315",
"0.8013674",
"0.8009298",
"0.79646903",
"0.7957841",
"0.7921238",
"0.7912365",
... | 0.68784666 | 93 |
Instantiate linkedlist object with optional iterable. | def FIMM(YKHO, OxJJ=None):
YKHO.head = None
if OxJJ and hasattr(OxJJ, '__iter__'):
for BWXx in OxJJ:
YKHO.push(BWXx)
elif OxJJ and isinstance(OxJJ, str):
for hcXw in OxJJ:
YKHO.push(hcXw)
elif OxJJ:
raise TypeError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, OxJJ=None):\n YKHO.linked_list = _sfu()\n if OxJJ:\n for ZfUD in OxJJ:\n YKHO.push(ZfUD)",
"def FIMM(YKHO, aBwG=None):\n try:\n YKHO._container = Kddq(aBwG[::-1])\n except TypeError:\n YKHO._container = Kddq(aBwG)",
"def FIMM(YKHO, OxJJ=None):\n YKH... | [
"0.79081327",
"0.7844683",
"0.78046656",
"0.77586704",
"0.75485325",
"0.7460365",
"0.7455654",
"0.74206835",
"0.7040529",
"0.70317256",
"0.6584406",
"0.6528608",
"0.64787525",
"0.6466624",
"0.64558196",
"0.6442649",
"0.6435665",
"0.64295214",
"0.630783",
"0.63022935",
"0.6293... | 0.69708353 | 10 |
Test the minimum pressure value. | def tpOx(YKHO):
YKHO.assertEqual('%0.7f' % YKHO.PminValue, str(0.0101325)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Kx2j(YKHO) -> float:\n return aXpi",
"def _iNt(YKHO) -> float:\n if YKHO._type == 'power':\n return 1.0\n elif YKHO._type == 'setpoint':\n return YKHO._product.get_data_config_json()['_value_setpoint_min']\n elif YKHO._type == 'fan1':\n ZDXo = 1\n return YKHO._product.... | [
"0.6885027",
"0.67346054",
"0.6727807",
"0.6621602",
"0.65870225",
"0.65331954",
"0.6510285",
"0.650445",
"0.6467488",
"0.6465689",
"0.64651674",
"0.64651674",
"0.64651674",
"0.64407027",
"0.64407027",
"0.6391949",
"0.6391949",
"0.63723016",
"0.6370906",
"0.6358931",
"0.63236... | 0.79551804 | 0 |
Test the max grain size value. | def tSP9(YKHO):
YKHO.assertEqual(YKHO.maximum_grain_size_value, 0.5) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RnO5(YKHO, E0wO):\n return YKHO.polyp_size and sorted(YKHO.polyp_size, reverse=True)[0].get_max_dim() < E0wO",
"def blQ1(YKHO) -> int:\n return int(YKHO.graph_tuple_stats.graph_data_size_max or 0)",
"def lRzg(YKHO):\n E0wO = max(gCuF.MISAGO_AVATARS_SIZES)\n G8HJ = E0wO * 2\n YKHO.assertEqual... | [
"0.65336424",
"0.6410251",
"0.62790006",
"0.61541957",
"0.6127388",
"0.60831994",
"0.6059759",
"0.60422474",
"0.6034238",
"0.6019041",
"0.6011512",
"0.5976169",
"0.5943377",
"0.5937209",
"0.5922372",
"0.59214103",
"0.5911295",
"0.58891755",
"0.5878956",
"0.586951",
"0.5857870... | 0.83903146 | 0 |
Test loading a YAML file generated by RMG v 2.4.1 and by a more recent version | def novK(YKHO):
VON1 = SkgR.__new__(SkgR)
VON1.load_yaml(path=Hy7s.path.join(YKHO.data_path, 'vinoxy_v_2.4.1.yml'))
YKHO.assertIsInstance(VON1, SkgR)
YKHO.assertEqual(VON1.conformer.spin_multiplicity, 2)
aV6A = SkgR.__new__(SkgR)
aV6A.load_yaml(path=Hy7s.path.join(YKHO.data_path, 'vinoxy_current... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aUY7(YKHO):\n pass",
"def FF4Y(YKHO, gq_x: bool) -> None:\n try:\n GPtr.parsers.yaml.use_c_lib_yaml = gq_x\n aC0l = YKHO.EXAMPLE_ENTRY_DICT.copy()\n VECZ = yfd6().parse(YKHO.EXAMPLE_YAML_FILE)\n bTKY = list(VECZ.values())[0]\n assert bTKY.data == aC0l\n finally:\n ... | [
"0.73822194",
"0.72066516",
"0.71713746",
"0.7001893",
"0.6947713",
"0.69349355",
"0.6924528",
"0.6912414",
"0.68982357",
"0.6885027",
"0.68657124",
"0.6864976",
"0.6807025",
"0.6800187",
"0.67999816",
"0.677005",
"0.67684513",
"0.676549",
"0.67604655",
"0.67563874",
"0.67268... | 0.646005 | 37 |
Test that the correct mass/number/isotope is returned from get_element_mass | def BTkD(YKHO):
YKHO.assertEqual(nQVk(1), (1.00782503224, 1))
YKHO.assertEqual(nQVk('Si'), (27.97692653465, 14))
YKHO.assertEqual(nQVk('C', 13), (13.00335483507, 6))
YKHO.assertEqual(nQVk('Bk'), (247.0703073, 97)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yrkk(U6D_):\n return Xf84.elements.isotope(U6D_).mass",
"def yrkk(LihS):\n return bMbF[W_Vi(LihS)]",
"def RmUW(YKHO):\n LCXu = aDxC.get_element_mass_from_xyz({'symbols': ('N', 'H', 'H', 'N', 'H', 'H', 'N', 'H'), 'isotopes': (14, 1, 1, 14, 1, 1, 14, 1), 'coords': ()})\n YKHO.assertEqual(LCXu, [1... | [
"0.76347417",
"0.705843",
"0.7053579",
"0.68898815",
"0.67189646",
"0.6556634",
"0.6464246",
"0.6450774",
"0.6390924",
"0.6382352",
"0.6374204",
"0.62843245",
"0.62785864",
"0.6229998",
"0.62049896",
"0.61733806",
"0.61306816",
"0.61259604",
"0.611668",
"0.6092173",
"0.606704... | 0.873458 | 0 |
Initializes this PlaylistGUI. Sets the window title, geometry, and the main layouts. | def uIcm(YKHO):
YKHO.setWindowTitle('Playlist Maker')
YKHO.setGeometry(0, 0, 800, 494)
YKHO.mbox = C3c5()
YKHO.hbox = uSmV()
YKHO.hbtnbox = uSmV() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PhKb(YKHO):\n YKHO.grid(row=0, column=0, sticky='nsew')\n YKHO.entryFrame = LQRw(YKHO, relief=YZF3, borderwidth=1)\n YKHO.entryFrame.pack(fill=_Z54, expand=False)\n if YKHO.message:\n bLSL = seYU(YKHO.entryFrame, text=YKHO.message, font=('Bradley', 10))\n bLSL.pack(anchor=XcU5, padx=0... | [
"0.7175063",
"0.70562327",
"0.7044105",
"0.7019141",
"0.699656",
"0.6986893",
"0.69540864",
"0.6930915",
"0.6849292",
"0.6785272",
"0.6733232",
"0.67235285",
"0.6716513",
"0.66891736",
"0.667368",
"0.66723263",
"0.6661534",
"0.66432154",
"0.6568791",
"0.655782",
"0.6548638",
... | 0.8233761 | 0 |
Adds a QTreeView to this PlaylistGUI. For storing songs found in each playlist. | def cg3X(YKHO):
YKHO.data_view = HwFg()
YKHO.data_view.setRootIsDecorated(False)
YKHO.data_view.setAlternatingRowColors(True)
YKHO.mbox.addWidget(YKHO.data_view)
YKHO.data_layout = uSmV()
YKHO.data_layout.addWidget(YKHO.data_view)
YKHO.model = YKHO.create_track_model(YKHO)
YKHO.data_view... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eLpg(YKHO, _AKB):\n YKHO.widget = CsJA.QTreeView(_AKB)",
"def AJY6(YKHO):\n pmON = wDYU.QDir.currentPath()\n YKHO.model = x5x0.QFileSystemModel()\n YKHO.model.setRootPath(pmON)\n YKHO.model.setNameFilterDisables(False)\n YKHO.tree = x5x0.QTreeView()\n YKHO.tree.setModel(YKHO.model)\n ... | [
"0.6952604",
"0.5760132",
"0.55429035",
"0.5430844",
"0.541225",
"0.53597796",
"0.53586644",
"0.5349673",
"0.5330964",
"0.53210133",
"0.5289308",
"0.5275016",
"0.5265651",
"0.522598",
"0.5225277",
"0.52200687",
"0.5205795",
"0.51722187",
"0.51661867",
"0.5155859",
"0.5153015"... | 0.70616525 | 0 |
Adds a QLineEdit into this PlaylistGUI. Where you can enter playlist to edit, create, or play. | def zyEV(YKHO):
YKHO.pl_line_edit = vj3Z()
YKHO.pl_line_edit.setPlaceholderText('Enter name of new playlist...')
YKHO.hbox.addWidget(YKHO.pl_line_edit) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AyNY(YKHO, bPY2, c9ua='', zp3f=''):\n WYo3 = IB0w.QHBoxLayout()\n WYo3.addWidget(IB0w.QLabel(f'{bPY2:>3}.', YKHO))\n veGx = IB0w.QLineEdit(c9ua, YKHO)\n WYo3.addWidget(veGx)\n qqFS = IB0w.QLineEdit(zp3f, YKHO)\n qqFS.setMaximumWidth(300)\n qqFS.setMinimumWidth(300)\n WYo3.addWidget(qqFS... | [
"0.6887151",
"0.64892423",
"0.63797873",
"0.6328601",
"0.6280455",
"0.611519",
"0.60480934",
"0.6012775",
"0.58603996",
"0.5847256",
"0.584692",
"0.58031225",
"0.57658106",
"0.5765581",
"0.5734947",
"0.5722022",
"0.5693516",
"0.5646986",
"0.5608276",
"0.556886",
"0.55006576",... | 0.84675145 | 0 |
By default, the final controller tried to fulfill the request when no other routes match. It may be used to display a template | def tTee(YKHO, bD7m):
eTsH(404) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def daFM(YKHO, QePW, *qIxc, **B2fa):\n raise uhgT()",
"def tOl9(QpfX, QePW):\n return MEVA(QePW.resource_url(QpfX, 'show'))",
"def tTee(YEnM, QePW):\n return lW34()",
"def kxW1(YKHO, QePW, *qIxc, **B2fa):\n raise uhgT",
"def kxW1(YKHO, QePW, *qIxc, **B2fa):\n raise uhgT",
"def kxW1(YKHO, Q... | [
"0.65651643",
"0.6494993",
"0.6215296",
"0.6169746",
"0.6169746",
"0.6169746",
"0.6169746",
"0.6169746",
"0.60814184",
"0.6038033",
"0.6011612",
"0.59923565",
"0.5930444",
"0.5929495",
"0.59292877",
"0.59292877",
"0.59292877",
"0.59292877",
"0.59292877",
"0.5919102",
"0.58756... | 0.58099407 | 24 |
return the Cauchy stress tensor. | def j7do(YKHO):
KCHu = '::: forming the Cauchy stress tensor :::'
whWJ(KCHu, YKHO.color)
VG3a = YKHO.strain_rate_tensor(YKHO.U3)
pdhd = VoC8(3)
WTkW = 2 * YKHO.eta * VG3a - YKHO.p * pdhd
return WTkW | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OcEL(YKHO):\n KCHu = '::: forming the deviatoric part of the Cauchy stress tensor :::'\n whWJ(KCHu, YKHO.color)\n VG3a = YKHO.strain_rate_tensor()\n jmzt = 2 * YKHO.eta * VG3a\n return jmzt",
"def YAdk(YKHO):\n jmzt = YKHO.deviatoric_stress_tensor()\n YRqy = jmzt[0, 0]\n QG7k = jmzt[1... | [
"0.7720255",
"0.6816555",
"0.61346936",
"0.60173094",
"0.5991823",
"0.59161",
"0.58430916",
"0.5754936",
"0.5753838",
"0.5712692",
"0.56808484",
"0.567674",
"0.5660551",
"0.5656851",
"0.5645711",
"0.5629031",
"0.5620341",
"0.56136787",
"0.56124234",
"0.5552848",
"0.5528905",
... | 0.8528255 | 0 |
return the Cauchy stress tensor. | def OcEL(YKHO):
KCHu = '::: forming the deviatoric part of the Cauchy stress tensor :::'
whWJ(KCHu, YKHO.color)
VG3a = YKHO.strain_rate_tensor()
jmzt = 2 * YKHO.eta * VG3a
return jmzt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def j7do(YKHO):\n KCHu = '::: forming the Cauchy stress tensor :::'\n whWJ(KCHu, YKHO.color)\n VG3a = YKHO.strain_rate_tensor(YKHO.U3)\n pdhd = VoC8(3)\n WTkW = 2 * YKHO.eta * VG3a - YKHO.p * pdhd\n return WTkW",
"def YAdk(YKHO):\n jmzt = YKHO.deviatoric_stress_tensor()\n YRqy = jmzt[0, 0... | [
"0.85285074",
"0.68166596",
"0.6135397",
"0.60179394",
"0.5991891",
"0.5916772",
"0.5843015",
"0.5754897",
"0.5753841",
"0.5713693",
"0.5683746",
"0.5675579",
"0.56576824",
"0.5656627",
"0.5646859",
"0.56279045",
"0.5621266",
"0.56133956",
"0.561315",
"0.5555086",
"0.55283254... | 0.7718883 | 1 |
Sets the status of the given setup to "final". | def P8p1(YKHO, OcjJ):
eCGt = QGNb.objects.get(id=OcjJ)
if eCGt.status == 'draft':
try:
YKHO.save_setup_info(eCGt)
except:
return 'failed: failed building gridpoints. (Check your subspaces values)'
luZ0 = rhny.check_setup(eCGt)
if luZ0 == 'success':
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gSZQ(YKHO, gSZQ):\n YKHO._final_status = gSZQ",
"def _hgL(YKHO):\n YKHO.status = 'DONE'",
"def C14V(YKHO):\n YKHO.has_goal = False\n YKHO.last_goal_wait = False",
"def PQcD(YKHO, Aofo):\n if Aofo.status is not None:\n YKHO.target.localStatus = Aofo.status\n if YKHO.target.pre... | [
"0.7301475",
"0.5818895",
"0.58095807",
"0.5587667",
"0.55574083",
"0.5508082",
"0.5473835",
"0.54340243",
"0.5416624",
"0.53765315",
"0.53705096",
"0.5364372",
"0.5360547",
"0.5329847",
"0.5301774",
"0.5299898",
"0.524629",
"0.520872",
"0.5195455",
"0.5190328",
"0.51788074",... | 0.7396222 | 0 |
Load the tokenizer for the utterances and the encoder for the labels. | def rfQe(uRP3):
LVAh, WKvO = iwQc(uRP3)
b0j5 = isxO(num_words=nyMv)
b0j5.fit_on_texts(WKvO)
MnDN = nu0g()
MnDN.fit(LVAh)
return (b0j5, MnDN) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wr3U(YKHO):\n WKvO = []\n for qaEx in SC2F.glob(YKHO.train_dir + '*.txt'):\n LInS = open(qaEx).read()\n WKvO.append(LInS)\n YKHO.tokenizer.fit_on_texts(WKvO)\n print('input vocabulary size:', len(YKHO.tokenizer.word_index))\n VIsj = open('Model/tokenizer.p', 'wb')\n t2lc.dump(YK... | [
"0.66955256",
"0.65680724",
"0.65402794",
"0.6535586",
"0.6391296",
"0.6347114",
"0.6071331",
"0.60369986",
"0.59917134",
"0.59150577",
"0.5912805",
"0.5853261",
"0.5820278",
"0.5784508",
"0.57844615",
"0.57640827",
"0.57464874",
"0.57320446",
"0.56669",
"0.56596166",
"0.5632... | 0.73020977 | 0 |
Closes the connection and cleans up. | def DDI8(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DDI8(YKHO):\n try:\n YKHO.connection.Close()\n del YKHO.connection\n except:\n pass",
"def DDI8(YKHO):\n YKHO.connection = None",
"def DDI8(YKHO):\n YKHO.connection = None",
"def mzWe(YKHO):\n if YKHO.connection:\n YKHO.connection.destroy()\n YKHO.connect... | [
"0.83457476",
"0.83215004",
"0.8262493",
"0.8239899",
"0.8230114",
"0.81023765",
"0.81023765",
"0.81022584",
"0.8072292",
"0.8072292",
"0.8072292",
"0.8072292",
"0.8072292",
"0.8072292",
"0.8072292",
"0.80517155",
"0.80507255",
"0.8042944",
"0.8004673",
"0.7970164",
"0.795717... | 0.0 | -1 |
Gets next item from the underlying iterator, and if filter_func returns True on it, applies casting_func to it and returns it. | def next(YKHO):
while True:
GcAT = YKHO.source_iter.next()
if YKHO.filter_func is None or YKHO.filter_func(GcAT):
if YKHO.casting_func is not None:
return YKHO.casting_func(GcAT)
else:
return GcAT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dL6b(YKHO, JfyU):\n return next((bGrB(WKvO) for WKvO in YKHO._ if JfyU(WKvO)), None)",
"def filter(YKHO, lgNN):\n\n def b_xr(oHE7):\n while True:\n ZfUD = next(oHE7)\n if lgNN(ZfUD):\n return ZfUD\n return YKHO.__class__(YKHO, b_xr)",
"def M_Ax(YKHO):\n ... | [
"0.59523964",
"0.57848763",
"0.56917626",
"0.565095",
"0.5538673",
"0.551973",
"0.5506931",
"0.53716016",
"0.53715134",
"0.5350799",
"0.53417265",
"0.5320681",
"0.5287989",
"0.5286814",
"0.52750415",
"0.52696663",
"0.5250515",
"0.5171896",
"0.5169647",
"0.51612663",
"0.513912... | 0.76526195 | 0 |
Returns the sample mean and variance of x using the ML estimator of the sample variance. | def phMz(WKvO):
exwG = len(WKvO)
assert exwG > 0
if exwG == 1:
return (WKvO[0], 0)
KCHu = 0.0
KG9w = 0.0
for YRbF in WKvO:
KCHu += YRbF
KG9w += YRbF * YRbF
yGTL = KCHu / exwG
SRYB = KG9w / exwG - yGTL * yGTL
return (yGTL, SRYB) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uXvE(WKvO):\n exwG = len(WKvO)\n assert exwG > 0\n if exwG == 1:\n return (WKvO[0], float('Inf'))\n JBMS, Ty9i = phMz(WKvO)\n SRYB = Ty9i * exwG / (exwG - 1)\n return (JBMS, SRYB)",
"def zsuw(WKvO):\n exwG = WKvO.size\n assert 2 <= exwG\n JBMS = WKvO.sum() / exwG\n yk4i =... | [
"0.7311148",
"0.6917866",
"0.68134665",
"0.681155",
"0.6786188",
"0.6786188",
"0.6786188",
"0.66726804",
"0.6667326",
"0.66200227",
"0.6536847",
"0.65145123",
"0.65144366",
"0.6464467",
"0.64629585",
"0.6453864",
"0.64443445",
"0.6436601",
"0.6414344",
"0.63321227",
"0.625618... | 0.8163022 | 0 |
Project points on to a certain plane | def Epat(CkYf, Csk6, y5bX):
jzdc = CkYf[0]
Fg_i = CkYf[1]
Z9rn = CkYf[2]
XP5J = []
for YRbF in range(len(y5bX)):
irsQ = y5bX[YRbF][0]
AYir = y5bX[YRbF][1]
C9QJ = y5bX[YRbF][2]
if jzdc != 0:
ZbiE = (Fg_i * Fg_i + Z9rn * Z9rn) * irsQ - jzdc * Fg_i * AYir - j... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uvMg(LTIa, kEC0):\n return [BS9d(AU8u, kEC0) for AU8u in LTIa]",
"def BS9d(AU8u, kEC0):\n P8oC, mhAC = kEC0\n mhAC = u1KP(mhAC)\n iArr = f4Oi(AU8u, P8oC)\n Ifga = HvgP(mhAC, s2vS(iArr, mhAC))\n return f4Oi(AU8u, Ifga)",
"def jCKE(zq5a):\n WKvO, LVAh, epBp = zq5a\n return (WKvO, LVAh... | [
"0.769581",
"0.76754713",
"0.72310346",
"0.7029089",
"0.6976901",
"0.68996334",
"0.6822846",
"0.6788213",
"0.6744013",
"0.67265934",
"0.67129856",
"0.659991",
"0.6529723",
"0.6515409",
"0.64884156",
"0.646591",
"0.6450414",
"0.6416574",
"0.6393952",
"0.63547456",
"0.63255614"... | 0.6806934 | 8 |
Transfer dcm to quaternion | def tB_b(ZMlM):
DWJ0 = oyIN.transpose(ZMlM)
Mkmy = A3Vt.from_dcm(DWJ0)
vexM = Mkmy.as_quat()
return vexM.tolist() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xrn8(K0T9):\n zgsA = oyIN.trace(K0T9)\n YQDJ = 1 / 4 * oyIN.array([1 + zgsA, 1 + 2 * K0T9[0, 0] - zgsA, 1 + 2 * K0T9[1, 1] - zgsA, 1 + 2 * K0T9[2, 2] - zgsA])\n q1NN = oyIN.argmax(YQDJ)\n Fg_i = oyIN.zeros(4)\n Fg_i[q1NN] = oyIN.sqrt(YQDJ[q1NN])\n if q1NN == 0:\n Fg_i[1] = (K0T9[1, 2] ... | [
"0.7474201",
"0.7113331",
"0.7103733",
"0.70882505",
"0.69679654",
"0.68895775",
"0.67082304",
"0.67016673",
"0.66017455",
"0.65504813",
"0.6456338",
"0.64162135",
"0.635974",
"0.6248495",
"0.62439275",
"0.61844575",
"0.614215",
"0.6140531",
"0.6067424",
"0.60571414",
"0.6037... | 0.6115136 | 18 |
Return the output of the wrapped PyTorch model for the given input, along with a callback to handle the backward pass. | def KVH6(C3ST: Model, EcVT: Any, qqqI: bool) -> AzJI[ImMB, YrBT]:
H4Om = C3ST.attrs['convert_inputs']
h80A = C3ST.attrs['convert_outputs']
Kxkn, MwqE = H4Om(C3ST, EcVT, qqqI)
jQbK, e_EY = C3ST.shims[0](Kxkn, qqqI)
fuBA, GVMl = h80A(C3ST, (EcVT, jQbK), qqqI)
def QADO(rKIL: Any) -> ImMB:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVH6(YKHO, input):\n if isinstance(input.data, ht2j.cuda.FloatTensor) and YKHO.num_gpu > 1:\n yvT9 = U78l.parallel.data_parallel(YKHO.layer, input, range(YKHO.num_gpu))\n else:\n yvT9 = YKHO.layer(input)\n return yvT9.view(-1)",
"def KVH6(YKHO, input):\n return YKHO.main(input).view... | [
"0.6441277",
"0.6422015",
"0.6415654",
"0.6316734",
"0.63101536",
"0.63079363",
"0.62927705",
"0.62682676",
"0.62682676",
"0.62682676",
"0.62627226",
"0.62627226",
"0.6252994",
"0.6244344",
"0.6242637",
"0.624188",
"0.6230361",
"0.61971253",
"0.61781",
"0.61641717",
"0.615134... | 0.5710763 | 76 |
The sequence of operators which `from_op` could be mutated to. | def Mv5C(WJnt):
for ijrG in qQd5:
if ijrG and isinstance(WJnt, jZ4I.Not):
pass
elif isinstance(WJnt, jZ4I.UAdd) and ijrG is None:
pass
else:
yield ijrG | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mytR(khtY):\n return {a1PO.op for a1PO in khtY.inputs}",
"def TR7C(YKHO, wOb_):\n IPme = []\n if wOb_.op(s5V9):\n for khtY in wOb_.ops['ops']:\n if khtY.startswith(s5V9):\n IPme.append((YKHO.leftStream(wOb_, khtY), khtY))\n return IPme",
"def s4O3(YKHO) -> x1iM[... | [
"0.6275297",
"0.60522527",
"0.58557343",
"0.5728362",
"0.570031",
"0.5670316",
"0.558716",
"0.555777",
"0.5552749",
"0.5547678",
"0.553837",
"0.54812574",
"0.54162633",
"0.53969145",
"0.5386381",
"0.53822255",
"0.53665847",
"0.53635806",
"0.53578496",
"0.5352245",
"0.5341275"... | 0.7405146 | 0 |
Add headers to both force latest IE rendering engine or Chrome Frame, and also to cache the rendered page for 10 minutes. | def PYz4(Mkmy):
Mkmy.headers['Cache-Control'] = 'no-cache, no-store, must-revalidate'
Mkmy.headers['Pragma'] = 'no-cache'
Mkmy.headers['Expires'] = '0'
Mkmy.headers['Cache-Control'] = 'public, max-age=0'
return Mkmy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PYz4(geh0):\n geh0.headers['X-UA-Compatible'] = 'IE=Edge,chrome=1'\n geh0.headers['Cache-Control'] = 'public, max-age=60'\n return geh0",
"def PYz4(geh0):\n geh0.headers['X-UA-Compatible'] = 'IE=Edge,chrome=1'\n geh0.headers['Cache-Control'] = 'public, max-age=600'\n return geh0",
"def PY... | [
"0.82229227",
"0.8222085",
"0.8222085",
"0.8222085",
"0.8222085",
"0.819543",
"0.8162872",
"0.8162872",
"0.8162872",
"0.8162872",
"0.8162872",
"0.8162872",
"0.8162872",
"0.8162872",
"0.8162872",
"0.8162872",
"0.8162872",
"0.8162872",
"0.8162872",
"0.8162872",
"0.8162872",
"... | 0.7127908 | 60 |
Return the Hamming distance between equallength sequences | def E_DB(j93S, Nqp_, E_DB=3):
j93S = str(j93S)
Nqp_ = str(j93S)
if len(j93S) != len(Nqp_):
j93S = IYly(j93S, 6)
Nqp_ = IYly(Nqp_, 6)
kZIt = sum((Q9eR != tGgy for Q9eR, tGgy in zip(j93S, Nqp_)))
if kZIt <= E_DB:
'表示海明距离在 3 以内'
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E_DB(j93S, Nqp_):\n if len(j93S) != len(Nqp_):\n raise ValueError('Undefined for sequences of unequal lenght.')\n return sum((Q9eR != tGgy for Q9eR, tGgy in zip(j93S, Nqp_)))",
"def fkCQ(j93S, Nqp_):\n if len(j93S) != len(Nqp_):\n raise ValueError('Undefined for sequences of unequal le... | [
"0.7564989",
"0.7553281",
"0.7524423",
"0.7510748",
"0.7498424",
"0.73834527",
"0.72914463",
"0.7283258",
"0.72027653",
"0.719384",
"0.7186409",
"0.7184023",
"0.7142286",
"0.7130274",
"0.71298635",
"0.70760477",
"0.70056623",
"0.6964983",
"0.69032145",
"0.6894841",
"0.6880024... | 0.6547985 | 36 |
get random number from array; use uniformal distribution | def _RpZ(YKHO, ocnb):
if len(ocnb) > 1:
return tuKI.uniform(ocnb[0], ocnb[1])
else:
return ocnb[0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zmG3():\n return K0SZ(tuKI.random())",
"def zmG3():\n return K0SZ(tuKI.random())",
"def mvm2(YKHO):\n P6bq = oyIN.asarray(oyIN.random.uniform())\n return YKHO.invert(P6bq)",
"def tuKI():\n return A3Vt.NextDouble()",
"def DhET():\n Fg_i = oyIN.random.uniform(0.0, 1.0, size=[1, bV1g])\n... | [
"0.70841587",
"0.7003696",
"0.69446665",
"0.6802248",
"0.67958033",
"0.67753094",
"0.67753094",
"0.6769705",
"0.67395395",
"0.66357416",
"0.6596956",
"0.6581757",
"0.6581757",
"0.65577084",
"0.65475714",
"0.6546282",
"0.65425235",
"0.64989555",
"0.64801204",
"0.6461034",
"0.6... | 0.6166124 | 48 |
Test successful getting escalated articles | def acat(YKHO):
eOtH = YKHO.user3.token()
YKHO.client.credentials(HTTP_AUTHORIZATION='Bearer ' + eOtH)
YKHO.escalate_an_article_successfully()
_hkX = YKHO.get_article()
YKHO.assertEqual(_hkX.status_code, jGRS.HTTP_200_OK)
YKHO.assertEqual(_hkX.data.get('escalated articles')[0].get('article').get... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ih5H(YKHO):\n eOtH = YKHO.user1.token()\n YKHO.client.credentials(HTTP_AUTHORIZATION='Bearer ' + eOtH)\n _hkX = YKHO.escalate_an_article_successfully()\n YKHO.assertEqual(_hkX.status_code, jGRS.HTTP_201_CREATED)",
"def dv8U(YKHO):\n eOtH = YKHO.user1.token()\n YKHO.client.credentials(HTTP_A... | [
"0.7470194",
"0.72625047",
"0.72242457",
"0.7153657",
"0.71420866",
"0.6820102",
"0.66953367",
"0.65002793",
"0.6436562",
"0.64319354",
"0.6210155",
"0.6179826",
"0.6170977",
"0.6139477",
"0.6122537",
"0.6109205",
"0.61025673",
"0.60806865",
"0.60634816",
"0.60575676",
"0.605... | 0.7769464 | 0 |
Test unsuccessful getting escalated articles | def dv8U(YKHO):
eOtH = YKHO.user1.token()
YKHO.client.credentials(HTTP_AUTHORIZATION='Bearer ' + eOtH)
_hkX = YKHO.get_article()
YKHO.assertEqual(_hkX.status_code, jGRS.HTTP_403_FORBIDDEN)
YKHO.assertEqual(_hkX.data['error'], YKHO.get_admin) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MkPT(YKHO):\n eOtH = YKHO.user1.token()\n YKHO.client.credentials(HTTP_AUTHORIZATION='Bearer ' + eOtH)\n _hkX = YKHO.escalate_an_article()\n YKHO.assertEqual(_hkX.status_code, jGRS.HTTP_404_NOT_FOUND)\n YKHO.assertEqual(_hkX.data['detail'], YKHO.msg)",
"def acat(YKHO):\n eOtH = YKHO.user3.t... | [
"0.7565672",
"0.73382246",
"0.7114636",
"0.6969177",
"0.6797394",
"0.67715967",
"0.6622221",
"0.6555586",
"0.6448273",
"0.64152306",
"0.6351098",
"0.6237788",
"0.6211422",
"0.6167086",
"0.61306095",
"0.605699",
"0.60262775",
"0.5992974",
"0.5990667",
"0.59902215",
"0.5980788"... | 0.7083966 | 3 |
Creates an argument parser for the nbdiff command. | def P4UC():
wvEv = j1Jz.ArgumentParser(description=QntV, add_help=True)
gA73(wvEv)
PN9X(wvEv)
cY_m(wvEv, ['base', 'remote'])
wvEv.add_argument('-o', '--output', default=None, help='if supplied, the diff is written to this file. Otherwise it is printed to the terminal.')
return wvEv | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xmtJ() -> j1Jz.ArgumentParser:\n wvEv = j1Jz.ArgumentParser(description='Run this app to label images by appending the label at the front of the filename.')\n wvEv.add_argument('source_directory', type=str, help='Directory from where images will we be taken.Subdirectories included.')\n wvEv.add_argume... | [
"0.6716528",
"0.6465517",
"0.64577746",
"0.64322937",
"0.64079374",
"0.63602203",
"0.635668",
"0.6349856",
"0.6349159",
"0.63358086",
"0.6313479",
"0.6276977",
"0.62768584",
"0.6274493",
"0.6272565",
"0.62650436",
"0.62613994",
"0.6222885",
"0.62181914",
"0.6216688",
"0.61952... | 0.62291247 | 17 |
Convert this ExperimentGroup into a Cohort (a group of Mice so a group of ExperimentGroups). | def Jc0V(YKHO, mWFP=None):
P3ri = oRi_(list)
for tTpl in YKHO:
P3ri[tTpl.mouse_id].append(tTpl)
Stqu = [xgaG(H3Ja, item_class=YKHO.item_class, parallelize=YKHO.parallelize) for PFAk, H3Ja in P3ri.items()]
if mWFP is None:
mWFP = YKHO.name
return OaSi(Stqu, name=mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ss9x(wZta):\n mWFP = wZta.__name__ + 'Cohort'\n Tgrs = type(mWFP, (HlaN, ql6C.WrapperTask), {'SAMPLE_REQUIRES': wZta})\n return Tgrs",
"def gTY7(VXBI, mWFP):\n RKD7.debug('Adding cohort %s to %s', mWFP, VXBI)\n if OJ1R.objects.filter(course_id=VXBI, group_type=OJ1R.COHORT, name=mWFP).exists():... | [
"0.5366107",
"0.49241865",
"0.4749343",
"0.47028914",
"0.4577627",
"0.45640707",
"0.45408723",
"0.44663775",
"0.43944463",
"0.43732795",
"0.4372525",
"0.4370139",
"0.43579683",
"0.43228564",
"0.43180227",
"0.42536992",
"0.42361805",
"0.42331463",
"0.42232314",
"0.42224303",
"... | 0.66129047 | 0 |
Test that email broadcaster initialises the smtp library correctly | def as4H(YKHO, y0OA: MagicMock) -> None:
x0hE = Dysu('localhost', 25, 'test', 'testpass')
y0OA.assert_called_with(hostname='localhost', port=25)
YKHO.assertIs(x0hE._username, 'test')
YKHO.assertIs(x0hE._password, 'testpass') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def u4d6(YKHO):\n YKHO._endpointServerTest('smtp', PdBI.SMTPFactory)",
"def K2FN(YKHO):\n YKHO._endpointTest('smtp')",
"def aZwc():\n n6_N = b32v['email_to'].split(', ')\n MhNs = Pipi()\n if b32v['smtp_ssl'] == 1:\n N5z6 = c5_3.SMTP_SSL(b32v['smtp_server'])\n elif b32v['smtp_tls'] == 1... | [
"0.7645353",
"0.7041312",
"0.6892129",
"0.6718706",
"0.6617694",
"0.66156834",
"0.65670556",
"0.6485195",
"0.6447329",
"0.6408189",
"0.63813955",
"0.63778996",
"0.63671523",
"0.63512766",
"0.6325136",
"0.6315891",
"0.6308974",
"0.6294649",
"0.62507576",
"0.62399244",
"0.62013... | 0.7544602 | 1 |
Takes file path as string; returns text as string. Takes a string that is a file path, opens the file, and turns the file's contents as one string of text. | def OcVp(qaEx):
kGys = open(qaEx).read()
return kGys | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OcVp(qaEx):\n OwN0 = open(qaEx)\n SFw1 = OwN0.read()\n return SFw1",
"def OcVp(qaEx):\n OwN0 = open(qaEx)\n LFxn = OwN0.read()\n OwN0.close()\n return LFxn",
"def cHUw(VqRE):\n assert JC7M(VqRE), 'filepath does not exist'\n with open(VqRE, 'r', encoding='utf-8') as eHNT:\n ... | [
"0.81214136",
"0.808571",
"0.80747753",
"0.8070949",
"0.79575056",
"0.7941712",
"0.7890047",
"0.7815816",
"0.7715659",
"0.77015245",
"0.76658094",
"0.763286",
"0.7625066",
"0.76137406",
"0.75801224",
"0.7531774",
"0.7528765",
"0.74890053",
"0.7441644",
"0.7412805",
"0.7373296... | 0.69870394 | 34 |
This function sets the field value of the y axis magnetorquer | def In8U(YKHO, LVAh):
try:
LVAh = int(LVAh)
except:
raise ValueError('H Bridge direction is not valid')
if LVAh != 0 and LVAh != 1 and (LVAh != -1):
raise ValueError('H Bridge direction is not valid')
YKHO.direction['y'] = LVAh
YKHO.HBridges['y'].SetDirection(LVAh) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def z9NM(YKHO, BWXx):\n YKHO.components[1] = BWXx",
"def z9NM(YKHO, BWXx):\n YKHO.components[1] = BWXx",
"def z9NM(YKHO, BWXx):\n YKHO.position[1] = BWXx",
"def ZRnD(YKHO, K3Ez):\n YKHO.__y_axis = K3Ez",
"def lcEV(YKHO, eLqP):\n YKHO.y = eLqP",
"def lcEV(YKHO, LVAh: float):\n YKHO.y = L... | [
"0.72608316",
"0.72608316",
"0.71388537",
"0.70805997",
"0.70503837",
"0.7026052",
"0.69250876",
"0.69157887",
"0.68553346",
"0.6842112",
"0.67211604",
"0.6678632",
"0.6671024",
"0.66604",
"0.6632223",
"0.6624512",
"0.6531813",
"0.65244293",
"0.6500283",
"0.6500133",
"0.64896... | 0.68297595 | 10 |
Returns the current y axis magnetorquer value | def DppO(YKHO):
return YKHO.Direction['y'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OwtU(YKHO):\n return YKHO.__y_axis",
"def yDCK(YKHO):\n return YKHO.__y",
"def LVAh(YKHO):\n return YKHO.axes[0]",
"def LVAh(YKHO) -> float:\n return YKHO.data[1]",
"def i4e5(YKHO):\n return YKHO.__yaxis",
"def i4e5(YKHO):\n return YKHO.__yaxis",
"def LVAh(YKHO):\n return YKHO.... | [
"0.82586217",
"0.80430275",
"0.7973374",
"0.7895726",
"0.78931576",
"0.78931576",
"0.7850739",
"0.78323907",
"0.78269047",
"0.7790115",
"0.7790115",
"0.7790115",
"0.7790115",
"0.7790115",
"0.7790115",
"0.7790115",
"0.7790115",
"0.7790115",
"0.7790115",
"0.7747448",
"0.7747448... | 0.787351 | 6 |
Return an authenticated OAuth1Session object | def KfiN(hJxb, Cxz5, mRMJ=None, LAy0=None):
if not mRMJ or not LAy0:
mRMJ, LAy0 = B9G4(hJxb, Cxz5)
return Vucc(hJxb, client_secret=Cxz5, resource_owner_key=mRMJ, resource_owner_secret=LAy0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cuiw(Emd4):\n if not (Emd4._consumer_key and Emd4._consumer_secret):\n raise NkuU\n if not Emd4._session:\n Emd4._session = Vucc(client_key=Emd4._consumer_key, client_secret=Emd4._consumer_secret)\n return Emd4._session",
"def mrYS(YKHO):\n if YKHO.accessToken is None:\n YKHO... | [
"0.7576792",
"0.7253131",
"0.71215135",
"0.7048725",
"0.6881396",
"0.6827724",
"0.6650588",
"0.66434854",
"0.65471804",
"0.6515352",
"0.64998287",
"0.6398918",
"0.6267154",
"0.6250623",
"0.62322444",
"0.6226618",
"0.6214261",
"0.62060475",
"0.62052584",
"0.6183912",
"0.616711... | 0.70016295 | 4 |
Initialize a logging Formatter with an appropriate format string. | def FIMM(YKHO, iGk2):
super(A0Xd, YKHO).__init__(fmt='%(levelname)s: %(file_indicator)s:%(line_indicator)s%(column_indicator)s %(message)s%(cause_indicator)s')
YKHO.study_dir = iGk2
YKHO.previous_filename = None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, FMLJ, Bjmr=None):\n G9jH.Formatter.__init__(YKHO, FMLJ, Bjmr)",
"def TTn9(IpOZ: str='default', ABDL: str='INFO') -> uLKX[qBfv, buVu]:\n qnWX = G9jH.StreamHandler()\n if IpOZ == 'default':\n uaPq = qBfv\n elif IpOZ == 'human':\n uaPq = buVu\n else:\n raise ValueE... | [
"0.7901536",
"0.7421911",
"0.6647904",
"0.6583011",
"0.64686763",
"0.62549025",
"0.6234094",
"0.61548924",
"0.6126279",
"0.6060544",
"0.60584795",
"0.60100144",
"0.59685314",
"0.5903129",
"0.583758",
"0.58251333",
"0.5746234",
"0.57139266",
"0.570447",
"0.5663039",
"0.5624990... | 0.62501377 | 6 |
Resolves a prefix to a namespace raising an error (FONS0004) if the prefix is not found in the namespace map. | def W5fH(YKHO, y0cW):
try:
return YKHO.parser.namespaces[y0cW]
except KeyError as err:
raise YKHO.error('FONS0004', 'No namespace found for prefix %s' % str(XObx)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ca97(YKHO, y0cW):\n M0dE = YKHO.module.i_ctx.get_module(YKHO.module.i_prefixes[y0cW][0])\n return M0dE.search_one('namespace').arg",
"def onsD(YKHO, _63S, y0cW=None, tttv=False):\n if not isinstance(_63S, Aw3s.namespace.Namespace):\n raise Aw3s.UsageError('declareNamespace: must be given a na... | [
"0.6963049",
"0.66704005",
"0.65708107",
"0.6546241",
"0.6392292",
"0.63532704",
"0.62987864",
"0.5978416",
"0.5967826",
"0.58918184",
"0.58477926",
"0.5843482",
"0.58110946",
"0.57636905",
"0.57462144",
"0.57437706",
"0.5721149",
"0.5674365",
"0.5626828",
"0.5623059",
"0.559... | 0.71799254 | 0 |
A context manager for use a locale setting for string comparison in a code block. | def n1L1(YKHO, soVO):
hksT = NCqB.getlocale(NCqB.LC_COLLATE)
if soVO == k3JZ:
soVO = 'en_US.UTF-8'
try:
NCqB.setlocale(NCqB.LC_COLLATE, soVO)
except NCqB.Error:
raise YKHO.error('FOCH0002', 'Unsupported collation %r' % soVO)
else:
yield
finally:
NCqB.setlo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mn7I(YKHO):\n with y_o0.override('fr'):\n YKHO.assertEqual(GSRe('{% load i18n %}{% blocktrans %}Yes{% endblocktrans %}').render(cFqH({})), 'Oui')",
"def mn7I(YKHO):\n with y_o0.override('fr'):\n YKHO.assertEqual(YKHO.get_template('{% load i18n %}{% blocktranslate %}Yes{% endblocktranslate... | [
"0.5932038",
"0.5865116",
"0.5419026",
"0.5374974",
"0.53476477",
"0.53375244",
"0.53078747",
"0.5157592",
"0.5146666",
"0.51339775",
"0.5118586",
"0.50736827",
"0.50657856",
"0.50467825",
"0.49825343",
"0.49523458",
"0.48661226",
"0.4827698",
"0.47786614",
"0.47739562",
"0.4... | 0.5749164 | 2 |
Normalize tensor to 0 mean and 1 variance. | def zY93(a1PO):
return (a1PO - a1PO.mean()) / ht2j.sqrt(a1PO.var()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NkkI(vhpA: np.ndarray):\n if len(vhpA.shape) < 4:\n vhpA = oyIN.expand_dims(vhpA, axis=2)\n JBMS = oyIN.array([vhpA[..., Fpx_, :].mean() for Fpx_ in range(vhpA.shape[2])])\n M1Jx = oyIN.array([vhpA[..., Fpx_, :].std() for Fpx_ in range(vhpA.shape[2])])\n return (vhpA - JBMS[:, oyIN.newaxis])... | [
"0.7995458",
"0.76622885",
"0.7661302",
"0.7661302",
"0.74793935",
"0.7408027",
"0.74069643",
"0.7384607",
"0.7296112",
"0.71037716",
"0.7063406",
"0.6985653",
"0.69839674",
"0.6916941",
"0.69113815",
"0.68838054",
"0.68838054",
"0.68618387",
"0.68618387",
"0.68485945",
"0.68... | 0.651572 | 45 |
Goes forward in the network multiply the weights, apply relu, multiply weights again and apply softmax | def KVH6(YKHO, yzQ0):
T8_u = YKHO.R.repeat(Oa10, 1).unsqueeze(dim=2)
Ylbp = ht2j.baddbmm(dW5H, T8_u, yzQ0['first_for_r'])
if _pac:
Ylbp = zY93(JfCL.relu(Ylbp))
Ylbp = Pusg(fJjY, yzQ0['except_first'][:-1], Ylbp)
Ylbp = Ylbp.bmm(yzQ0['except_first'][-1])
Ylbp = Ylbp.view(-1, Oa10)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ciZX(YKHO, jzdc):\n for Fg_i, yzQ0 in list(zip(YKHO.biases, YKHO.weights))[:len(YKHO.biases) - 1]:\n jzdc = QZir(oyIN.dot(yzQ0, jzdc) + Fg_i)\n Fg_i, yzQ0 = (YKHO.biases[-1], YKHO.weights[-1])\n jzdc = N93T(oyIN.dot(yzQ0, jzdc) + Fg_i)\n return jzdc",
"def MKQT(YKHO):\n uv6v = YKHO.pre_... | [
"0.73415136",
"0.7277904",
"0.7195697",
"0.71158135",
"0.7108848",
"0.70581657",
"0.69864",
"0.6959647",
"0.69511116",
"0.6949624",
"0.6925658",
"0.6890367",
"0.6878172",
"0.687509",
"0.68711936",
"0.68669367",
"0.68517774",
"0.6842369",
"0.6840495",
"0.68388563",
"0.68372285... | 0.6851746 | 17 |
Returns a clone of gradients grad, calculated w.r.t. rewards, with those for nonavicaching locations set to 0. This hook must be registered before calling backward on loss. | def XXjI(Ro40):
jlO6 = Ro40.clone()
jlO6[V6iY] = 0
return jlO6 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZD5u(YKHO):\n ICX2 = MrDr\n return ICX2",
"def ZD5u(YKHO):\n ICX2 = MrDr\n return ICX2",
"def ZD5u(OaeV, pwN3):\n return pwN3",
"def ZD5u(OaeV, pwN3):\n N77f, lQ3t, P6bq, OCi3 = OaeV.saved_tensors\n begE = P6bq.device\n SGf8 = 1e-10\n Ro40, = ht2j.autograd.grad(N77f, P6bq, only... | [
"0.71885246",
"0.71885246",
"0.7156543",
"0.7048143",
"0.692014",
"0.68090355",
"0.68090355",
"0.6779985",
"0.67292583",
"0.67031324",
"0.67017823",
"0.66958266",
"0.6684745",
"0.66368526",
"0.6629405",
"0.6620559",
"0.661624",
"0.6597808",
"0.65789825",
"0.65608364",
"0.6551... | 0.6421503 | 33 |
Get a random element from the set. | def UIrZ(YKHO) -> int:
return tuKI.choice(YKHO.arr) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UIrZ(YKHO):\n return YKHO.nums[tuKI.randint(0, len(YKHO.nums) - 1)]",
"def UIrZ(YKHO):\n exwG = len(YKHO.keys)\n while exwG > 0:\n d6pt = tuKI.randint(0, exwG - 1)\n Ufrw = YKHO.keys[d6pt]\n if Ufrw in YKHO.ds:\n return Ufrw\n else:\n YKHO.keys[d6pt]... | [
"0.77060276",
"0.738916",
"0.7296881",
"0.72187954",
"0.6871744",
"0.68453854",
"0.68330806",
"0.67740154",
"0.67226046",
"0.6703282",
"0.6665089",
"0.66356236",
"0.66217655",
"0.6612035",
"0.66000897",
"0.6567767",
"0.6477719",
"0.6462421",
"0.64428514",
"0.64162946",
"0.640... | 0.5954455 | 73 |
Get a random element from the set. | def UIrZ(YKHO) -> int:
YRbF = tuKI.randrange(YKHO.size)
return YKHO.array[YRbF] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UIrZ(YKHO):\n return YKHO.nums[tuKI.randint(0, len(YKHO.nums) - 1)]",
"def UIrZ(YKHO):\n exwG = len(YKHO.keys)\n while exwG > 0:\n d6pt = tuKI.randint(0, exwG - 1)\n Ufrw = YKHO.keys[d6pt]\n if Ufrw in YKHO.ds:\n return Ufrw\n else:\n YKHO.keys[d6pt]... | [
"0.77060276",
"0.738916",
"0.7296881",
"0.72187954",
"0.6871744",
"0.68453854",
"0.68330806",
"0.67740154",
"0.67226046",
"0.6703282",
"0.6665089",
"0.66356236",
"0.66217655",
"0.6612035",
"0.66000897",
"0.6567767",
"0.6477719",
"0.6462421",
"0.64428514",
"0.64162946",
"0.640... | 0.0 | -1 |
Loads data for the specified city and filters by month and day if applicable. | def UlWi(j5sA, x0eS, CjKC):
jQ3Z = rLdf.read_csv(OerS[j5sA])
jQ3Z['Start Time'] = rLdf.to_datetime(jQ3Z['Start Time'])
jQ3Z['Month'] = jQ3Z['Start Time'].dt.month_name()
jQ3Z['day_of_week'] = jQ3Z['Start Time'].dt.day_name()
if x0eS != 'all':
jQ3Z = jQ3Z[jQ3Z['Month'] == x0eS]
if CjKC !=... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UlWi(j5sA, x0eS, CjKC):\n jQ3Z = rLdf.read_csv(OerS[j5sA])\n jQ3Z['Start Time'] = rLdf.to_datetime(jQ3Z['Start Time'])\n jQ3Z['month'] = jQ3Z['Start Time'].dt.month\n jQ3Z['hour'] = jQ3Z['Start Time'].dt.hour\n jQ3Z['day_of_week'] = jQ3Z['Start Time'].dt.weekday_name\n if x0eS == 0 and CjKC =... | [
"0.81320685",
"0.8108889",
"0.8045821",
"0.8042514",
"0.80090284",
"0.80071104",
"0.79991937",
"0.7998333",
"0.7988789",
"0.797905",
"0.79737365",
"0.7956163",
"0.7947432",
"0.79463065",
"0.7908287",
"0.7908229",
"0.7904569",
"0.7900715",
"0.78930074",
"0.7889219",
"0.7882541... | 0.79610896 | 11 |
Displays statistics on the most frequent times of travel. | def dWJR(jQ3Z):
print('\nCalculating The Most Frequent Times of Travel...\n')
SWox = ITS7.time()
XYie = jQ3Z['Month'].value_counts().idxmax()
print('The most common month is:', XYie, '\n')
print('The most common day of the week is:', jQ3Z['day_of_week'].value_counts().idxmax(), '\n')
jQ3Z['hour'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dWJR(jQ3Z):\n print('\\nDisplaying the statistics on the most frequent times of travel...\\n')\n SWox = ITS7.time()\n hFPs = jQ3Z['Month'].mode()[0]\n print('For the selected filter, the month with the most travels is: ' + str(X_bn[hFPs - 1]).title() + '.')\n DSEJ = jQ3Z['Weekday'].mode()[0]\n ... | [
"0.80234534",
"0.80220866",
"0.7914726",
"0.7826028",
"0.7821531",
"0.7813864",
"0.7765123",
"0.7739495",
"0.7735815",
"0.773377",
"0.76860726",
"0.7667975",
"0.7651258",
"0.7644125",
"0.76395637",
"0.763636",
"0.7624526",
"0.76224995",
"0.7612101",
"0.7599869",
"0.7583085",
... | 0.73772466 | 47 |
Displays statistics on the most popular stations and trip. | def Huc_(jQ3Z):
print('\nCalculating The Most Popular Stations and Trip...\n')
SWox = ITS7.time()
print('The most common used start station is:', jQ3Z['Start Station'].value_counts().idxmax(), '\n')
print('The most common used end station is:', jQ3Z['End Station'].value_counts().idxmax(), '\n')
jQ3Z... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Huc_(jQ3Z):\n print('\\nCalculating The Most Popular Stations and Trip...\\n')\n SWox = ITS7.time()\n print(_8rG(jQ3Z))\n print(oFx8(jQ3Z))\n print(_Ek3(jQ3Z))\n print('\\nThis took %s seconds.' % (ITS7.time() - SWox))\n print('-' * 40)",
"def Huc_(nPrm):\n print('\\nCalculating The M... | [
"0.7815431",
"0.7661541",
"0.7553297",
"0.749107",
"0.7474493",
"0.7445922",
"0.7430571",
"0.7423423",
"0.741729",
"0.74000263",
"0.73870325",
"0.7385237",
"0.73645216",
"0.7358968",
"0.7356304",
"0.735434",
"0.7351656",
"0.73508406",
"0.7349957",
"0.7341757",
"0.7339878",
... | 0.7151731 | 54 |
Displays statistics on the total and average trip duration. | def kDMA(jQ3Z):
print('\nCalculating Trip Duration...\n')
SWox = ITS7.time()
print('The total travel time is:', jQ3Z['Trip Duration'].sum(), 'min \n')
print('The mean travel time is:', jQ3Z['Trip Duration'].mean(), 'min \n')
print('-' * 40)
print('\nThis took %s seconds.' % (ITS7.time() - SWox))... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kDMA(nPrm):\n print('\\nCalculating Trip Duration...\\n')\n SWox = ITS7.time()\n DbBi = nPrm['Trip Duration'].sum()\n print('The Total Travel Time is {} Hours'.format(DbBi / 3600))\n IEfE = nPrm['Trip Duration'].mean()\n print('The Average Travel Time is {} Minutes'.format(IEfE / 60))\n pr... | [
"0.814274",
"0.8025143",
"0.80041367",
"0.79496753",
"0.7937415",
"0.79312176",
"0.7926815",
"0.7915187",
"0.79142886",
"0.7908032",
"0.79055744",
"0.7900715",
"0.7891682",
"0.78894734",
"0.7886722",
"0.78851086",
"0.7884266",
"0.7882474",
"0.78738385",
"0.78686154",
"0.78664... | 0.7845923 | 30 |