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 |
|---|---|---|---|---|---|---|
The index page at the root of the server shall include instructions on how to use the page. | def Y768(YKHO):
geh0 = YKHO.get_response('/')
YKHO.assertEqual(200, geh0.getcode())
YKHO.assertIn('add'.encode(), geh0.read()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d6pt():\n print('This is the root of the app, should have something better')\n return 'Root, this is where some front end would go on a server'",
"def d6pt():\n Tmto = a79v('general')\n sdCG = 'ALLOVER THE WORLD NEWS'\n return TvZl('index.html', title=sdCG, isoko=Tmto)",
"def d6pt():\n ge... | [
"0.7623259",
"0.7359942",
"0.7349391",
"0.73357177",
"0.7294751",
"0.72802347",
"0.72632897",
"0.71725523",
"0.7168174",
"0.71561223",
"0.714585",
"0.7126417",
"0.71068513",
"0.71068513",
"0.7103854",
"0.7103854",
"0.7103854",
"0.70944047",
"0.7091539",
"0.7086335",
"0.706888... | 0.0 | -1 |
Return action with highest probability | def wRjc(YKHO, Ov5A):
WErR = YKHO.assignProbablities(Ov5A)
JxU2, m1JK = max(WErR)
return m1JK | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HS6c(YKHO, QTBn):\n TFJY = list(YKHO.Q[QTBn].items())\n return max(TFJY, key=lambda WKvO: WKvO[1])[0]",
"def OcoU(YKHO, QTBn):\n \"\"\"*** YOUR CODE HERE ***\"\"\"\n lA2T = YKHO.mdp.getPossibleActions(QTBn)\n if len(lA2T) is 0:\n return None\n hjEf = gnPz.Counter()\n for XeOP in l... | [
"0.7648295",
"0.7495396",
"0.7428889",
"0.73734206",
"0.73101646",
"0.71037084",
"0.7102478",
"0.70933664",
"0.7049176",
"0.70447606",
"0.7041163",
"0.70229703",
"0.70172846",
"0.69849265",
"0.697603",
"0.6971595",
"0.6964426",
"0.6960023",
"0.69165444",
"0.6914481",
"0.69053... | 0.82061726 | 0 |
Replace any length white spaces in the given string with a replacement. | def gGbk(KCHu, sWfS=' '):
KCHu = ZbWC.sub('\\s+', sWfS, KCHu)
return KCHu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gGbk(input: str, *, Vd7r: str='') -> str:\n return y9Sp.sub(Vd7r, input)",
"def yAYF(l5Ny):\n return fMIo.sub(' ', l5Ny.strip())",
"def ccMH(l5Ny):\n return hHll.sub(' ', l5Ny)",
"def EQOQ(vIwR):\n return vIwR.replace(' ', '')",
"def gl7I(str):\n f_yB = u'\\xa0'\n str = str.replace(f_... | [
"0.7091415",
"0.67047095",
"0.6697442",
"0.6544741",
"0.65237546",
"0.6492337",
"0.64796394",
"0.6393973",
"0.63939565",
"0.63260424",
"0.63126695",
"0.62759525",
"0.61797035",
"0.61797035",
"0.61601454",
"0.61490405",
"0.6122402",
"0.61191076",
"0.6111925",
"0.61067057",
"0.... | 0.76148945 | 0 |
Return split words of a string including the nonword tokens. | def Cs9E(KCHu):
return ZbWC.split('(\\W)', KCHu) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HPLn(KCHu):\n KCHu = ZbWC.sub('\\\\W+', ' ', KCHu)\n KCHu = ZbWC.sub('[_0-9]+', ' ', KCHu)\n return KCHu.split()",
"def HPLn(KCHu):\n KCHu = ZbWC.sub('\\\\W+', ' ', KCHu)\n KCHu = ZbWC.sub('[_0-9]+', ' ', KCHu)\n return KCHu.split()",
"def l4Z4(KCHu):\n return wr3U(d720(KCHu))",
"def... | [
"0.790145",
"0.790145",
"0.75671256",
"0.7552346",
"0.75232416",
"0.7476419",
"0.74410003",
"0.7384879",
"0.7384764",
"0.7227358",
"0.7226007",
"0.7214209",
"0.7210724",
"0.71471393",
"0.7142224",
"0.709704",
"0.70740175",
"0.7061054",
"0.7051394",
"0.70336044",
"0.70333153",... | 0.75778073 | 2 |
Gets losses, variables, and gradients for each network. | def TgyX(YKHO, WRZd):
with ZylS.GradientTape() as mEM6, ZylS.GradientTape() as UU02:
OIV_, wKC_, qxwG = YKHO.generator_loss_phase(training=True)
bGrB, AOC4 = YKHO.discriminator_loss_phase(OIV_, WRZd, wKC_, training=True)
WdtA = {}
onq8 = {}
s5H4 = {}
for N77f, j_VY, h7Vl in zip([qxwG... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def POIV(YKHO) -> YrBT:\n\n def jbKh():\n UziS = (YKHO.representation_network, YKHO.value_network, YKHO.policy_network, YKHO.dynamic_network, YKHO.reward_network)\n return [kc1W for P7ab in map(lambda Ty9i: Ty9i.weights, UziS) for kc1W in P7ab]\n return jbKh",
"def M9w_(YKHO, g4y1, CJGY=False... | [
"0.6133671",
"0.6089181",
"0.6082883",
"0.6042032",
"0.59740996",
"0.59423256",
"0.59195125",
"0.58766013",
"0.5847659",
"0.581931",
"0.5779143",
"0.57660484",
"0.57512766",
"0.574551",
"0.5724206",
"0.56788737",
"0.5660472",
"0.5657707",
"0.5645659",
"0.56367177",
"0.5636319... | 0.66366255 | 0 |
Given user_id, return the associated User object. | def lyxB(uJjO):
return mv1M.query.get(uJjO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bt8D(uJjO):\n return mv1M.query.get(uJjO)",
"def NMoC(YKHO, uJjO):\n return mv1M.get(uJjO)",
"def B9ST(uJjO):\n return YJv1.query.filter_by(id=uJjO).first()",
"def TKWP(YKHO, uJjO):\n mv1M = egNl()\n try:\n return mv1M.objects.get(pk=uJjO)\n except mv1M.DoesNotExist:\n ret... | [
"0.84723973",
"0.8393383",
"0.83698905",
"0.8285045",
"0.8247994",
"0.8244847",
"0.82433355",
"0.82264954",
"0.8179295",
"0.8178196",
"0.8178196",
"0.8151988",
"0.8151988",
"0.8151988",
"0.8151988",
"0.7943583",
"0.7909672",
"0.787124",
"0.78475416",
"0.78186816",
"0.77860373... | 0.7675426 | 28 |
return the static path to a CatEyes sample dataset. | def bbI6(mWFP):
import os.path as khtY
h_xa = khtY.join(khtY.dirname(xAKo), 'data')
i0XC = khtY.join(h_xa, mWFP + '.csv')
return khtY.abspath(i0XC) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mC1D(Emd4):\n iGvk = Hy7s.path.dirname(xAKo)\n VqRE = Hy7s.path.abspath(Hy7s.path.join(iGvk, '..', 'datasets', wJxA('DATA_FILENAME')))\n return VqRE",
"def WpES():\n return Whwd('cdat_lite.test.test_cdms', 'sample_data')",
"def mC1D(__n6, BuX_=GDa9.WORK_DIR):\n return zOLB(BuX_, GDa9.DATA_DI... | [
"0.73300564",
"0.7159863",
"0.6527848",
"0.6474556",
"0.644209",
"0.6410078",
"0.6402141",
"0.6395644",
"0.63866097",
"0.63466156",
"0.63278776",
"0.63220537",
"0.62885326",
"0.62877905",
"0.62776434",
"0.62581956",
"0.6240348",
"0.6228252",
"0.6199317",
"0.6186844",
"0.61843... | 0.6545871 | 2 |
Calculate the movement distance from start to end of a segment. This function can be used to calculate Saccade distance. | def W34_(WKvO, LVAh, WXkz, PXIy, W_1R=False, E2uA=False):
tO9_ = 'For continuous segments, len(segments) must be equal to len(times). If you are using a discrete segment array, please pass `discrete=True` as an argument'
if not W_1R:
if len(PXIy) != len(WXkz):
raise ValueError(tO9_)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m4Ts(N7sD, ksBp, uWrF, sbXL):\n assert ksBp >= N7sD\n assert sbXL >= uWrF\n if N7sD <= uWrF <= ksBp:\n return 0\n elif N7sD <= uWrF:\n return uWrF - ksBp\n elif uWrF <= N7sD <= sbXL:\n return 0\n else:\n return N7sD - sbXL",
"def eM32(YKHO):\n M_DK = list(zip(... | [
"0.652445",
"0.62961763",
"0.61612964",
"0.6146212",
"0.6135663",
"0.61208385",
"0.6056257",
"0.60528666",
"0.5953203",
"0.5920773",
"0.58549035",
"0.5848489",
"0.58078426",
"0.5800109",
"0.57877564",
"0.5783329",
"0.57732254",
"0.5740463",
"0.5718229",
"0.57170326",
"0.56471... | 0.6606548 | 0 |
x.__eq__(y) x == y | def xa14(YKHO, WKvO):
assert isinstance(WKvO, RXkG), 'incorrect type of arg x: should be type AxisDistance, is type {}'.format(type(WKvO))
return YKHO.__cmp__(WKvO) == 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aPi6(WKvO, LVAh):\n return WKvO == LVAh",
"def xa14(YKHO, *qIxc):\n pass",
"def xa14(YKHO, *qIxc):\n pass",
"def xa14(YKHO, *qIxc):\n pass",
"def xa14(YKHO, *qIxc):\n pass",
"def xa14(YKHO, *qIxc):\n pass",
"def xa14(YKHO, *qIxc):\n pass",
"def xa14(YKHO, *qIxc):\n pass",
... | [
"0.8611628",
"0.8127378",
"0.8127378",
"0.8127378",
"0.8127378",
"0.8127378",
"0.8127378",
"0.8127378",
"0.8127378",
"0.8127378",
"0.8127378",
"0.8127378",
"0.8127378",
"0.8127378",
"0.8127378",
"0.8127378",
"0.8127378",
"0.8127378",
"0.8127378",
"0.8127378",
"0.8127378",
"... | 0.0 | -1 |
Converts the distance to the nearest pixel as an int | def V5_2(YKHO):
return YKHO.tile * RXkG.tilesize + YKHO.pixel | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MJ6n(mLGw):\n return int(oyIN.round(mLGw))",
"def TON1(YKHO, dQgj):\n GSgv = oyIN.round(dQgj / YKHO._maze.grid_side - 0.5)\n return GSgv.astype(int)",
"def KtDk(VAJu):\n return round(aBlt(VAJu, 2))",
"def TgaQ(YKHO):\n yzQ0 = YKHO.image.width\n MKlR = YKHO.image.height\n return oyIN.... | [
"0.711711",
"0.6827673",
"0.6724163",
"0.63511956",
"0.61147606",
"0.60571015",
"0.6026315",
"0.6018019",
"0.6005629",
"0.6002571",
"0.59961796",
"0.59870875",
"0.59737223",
"0.597201",
"0.594756",
"0.59427315",
"0.5911971",
"0.5900264",
"0.58719933",
"0.5857902",
"0.585711",... | 0.0 | -1 |
Returns the direction opposite this one, or Center if it's Center | def RGK4(YKHO):
if YKHO.direction == 8:
return LgK1(8)
exwG = YKHO.direction + 4
if exwG >= 8:
exwG -= 8
return LgK1(exwG) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RGK4(YKHO):\n if YKHO == YKHO.EAST:\n return YKHO.WEST\n elif YKHO == YKHO.WEST:\n return YKHO.EAST\n elif YKHO == YKHO.NORTH:\n return YKHO.SOUTH\n elif YKHO == YKHO.SOUTH:\n return YKHO.NORTH",
"def XSoh(YKHO):\n return 180 - vwZf(YKHO.x, YKHO.y) * 180 / mM0K",
... | [
"0.7395317",
"0.7160236",
"0.701048",
"0.68796414",
"0.68268293",
"0.66856116",
"0.6618606",
"0.6582053",
"0.6579854",
"0.65670365",
"0.65511304",
"0.64990944",
"0.646922",
"0.64430994",
"0.6358651",
"0.6351403",
"0.6326813",
"0.6323978",
"0.6274093",
"0.62597454",
"0.6254371... | 0.69072956 | 3 |
Returns the x displacement of the direction | def Jw7X(YKHO):
return YKHO._dx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Jmm7(YKHO):\n return YKHO.Direction['x']",
"def vAgg(YKHO):\n return YKHO.position.x",
"def WKvO(YKHO):\n return YKHO.position.x",
"def fU09(Emd4, e81N, XSoh):\n Emd4.raise_exception_if_invalid_direction(XSoh)\n return e81N + Emd4.DIRECTION_MAPPER[XSoh][0]",
"def Jw7X(YKHO):\n return ... | [
"0.78957367",
"0.7539288",
"0.73847145",
"0.73237586",
"0.7164627",
"0.70678705",
"0.7063477",
"0.70541364",
"0.69704926",
"0.69337696",
"0.68979454",
"0.687176",
"0.68615544",
"0.6838318",
"0.6833156",
"0.6794025",
"0.6791481",
"0.67834914",
"0.6768529",
"0.676571",
"0.67627... | 0.67701393 | 19 |
Returns the y displacement of the direction | def eUWA(YKHO):
return YKHO._dy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DppO(YKHO):\n return YKHO.Direction['y']",
"def iOZO(Emd4, v40M, XSoh):\n Emd4.raise_exception_if_invalid_direction(XSoh)\n return v40M + Emd4.DIRECTION_MAPPER[XSoh][1]",
"def BBTF(YKHO):\n return YKHO.position.y",
"def LVAh(YKHO):\n return YKHO.position.y",
"def q6fc(YKHO):\n return ... | [
"0.80015856",
"0.76717573",
"0.7403422",
"0.73008484",
"0.7171839",
"0.7075675",
"0.70137197",
"0.700862",
"0.69861263",
"0.69860595",
"0.69706947",
"0.69665074",
"0.69584465",
"0.6937537",
"0.692584",
"0.6904585",
"0.6904295",
"0.69002134",
"0.6894101",
"0.68832505",
"0.6863... | 0.6852999 | 24 |
Returns this instances distance to the given coordinate. If total is False, returns a new Coordinate object | def M_X5(YKHO, BHsk, wjRY=True):
assert isinstance(BHsk, XvuT), 'incorrect type of arg coord: should be Coordinate, is {}'.format(type(BHsk))
assert isinstance(wjRY, bool), 'incorrect type of arg total: should be bool, is {}'.format(type(wjRY))
o4D3, si3g = (YKHO.x, YKHO.y)
ajwV, skBL = (BHsk.x, BHsk.y)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _mEA(YKHO, W0Eb):\n return abs(W0Eb[0]) + abs(W0Eb[1])",
"def zG70(YKHO, jNOo):\n return Ayfi.distance(jNOo, (YKHO.lat, YKHO.long)).m",
"def pImw(YKHO, Elif: Coordinate) -> int:\n return abs(Elif.x - YKHO.x) + abs(Elif.y - YKHO.y)",
"def AcQ8(YKHO, H72v):\n H72v = oyIN.resize(eybD, (YKHO.n_ro... | [
"0.6613083",
"0.63747084",
"0.6238564",
"0.6205374",
"0.61127734",
"0.60994977",
"0.6053412",
"0.605253",
"0.6040284",
"0.603024",
"0.59856087",
"0.5982101",
"0.59296453",
"0.59035623",
"0.59004843",
"0.5887883",
"0.5885589",
"0.58798707",
"0.5878029",
"0.58193916",
"0.581460... | 0.81149167 | 0 |
Returns whether this rectangle will intersect | def iQin(YKHO, WKvO):
eeYG = YKHO._intersection(YKHO.xArea, WKvO.xArea)
MOYU = YKHO._intersection(YKHO.yArea, WKvO.yArea)
return eeYG and MOYU | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XMlP(YKHO, lued):\n return YKHO.contains(lued.corner) or lued.contains(YKHO.corner)",
"def P10m(YKHO, mawX):\n return mawX.right >= YKHO.left and mawX.left < YKHO.right and (mawX.bottom >= YKHO.top) and (mawX.top < YKHO.bottom)",
"def CuUu(YKHO, mawX):\n Fg_i = YKHO.left() > mawX.right() or YKHO.r... | [
"0.8487399",
"0.82497424",
"0.821199",
"0.7652416",
"0.76160353",
"0.76125234",
"0.7592472",
"0.74875426",
"0.7465025",
"0.74267256",
"0.7364686",
"0.7347008",
"0.7329725",
"0.73282987",
"0.7266523",
"0.7262529",
"0.72568536",
"0.7237176",
"0.71423334",
"0.70168257",
"0.69811... | 0.6548645 | 66 |
Recursive function to create a binary tree | def BLfk(Csk6, hQeg):
dh64 = oRi_(dict)
jzdc, Fg_i = balF(Csk6)
exwG = ['(', jzdc, ',', Fg_i, ')']
pGNo = ''.join(exwG)
for G1Hx in hQeg:
if G1Hx == jzdc:
hQeg.remove(G1Hx)
break
for XP5J in hQeg:
if XP5J == Fg_i:
hQeg.remove(XP5J)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iuYD():\n tk5Y = i8DB(5)\n tk5Y.left = i8DB(3)\n tk5Y.right = i8DB(8)\n tk5Y.left.left = i8DB(2)\n tk5Y.left.right = i8DB(4)\n tk5Y.right.left = i8DB(7)\n return tk5Y",
"def Cc7Y():\n Mkmy = i8DB(1)\n Mkmy.left = i8DB(2)\n Mkmy.left.left = i8DB(4)\n Mkmy.left.right = i8DB(5)\... | [
"0.76095176",
"0.7589695",
"0.75249445",
"0.74824035",
"0.74582726",
"0.72702265",
"0.7217349",
"0.7214562",
"0.7141989",
"0.71055114",
"0.70928293",
"0.70512927",
"0.7043162",
"0.70138705",
"0.69493407",
"0.6940104",
"0.6934134",
"0.6915628",
"0.68834627",
"0.68833166",
"0.6... | 0.0 | -1 |
to find the minimum value/distance in our dictionary and returning the corresponding to this minimum value | def balF(pImw):
r8hN = float('inf')
for XP5J in pImw:
for vexM in pImw[XP5J]:
if pImw[XP5J][vexM] < r8hN:
r8hN = pImw[XP5J][vexM]
jzdc, Fg_i = (XP5J, vexM)
return (jzdc, Fg_i) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XcNI(YKHO):\n if YKHO.is_empty():\n return None\n else:\n XP5J = YKHO.first()\n return (XP5J.key(), XP5J.value())",
"def hDxo(Csk6):\n Ty9i = list(Csk6.values())\n G1Hx = list(Csk6.keys())\n return G1Hx[Ty9i.index(min(Ty9i))]",
"def min(YKHO):\n XP5J = YKHO._find_min(... | [
"0.73691416",
"0.7309376",
"0.72491604",
"0.71362597",
"0.7134431",
"0.7092636",
"0.70713985",
"0.7008079",
"0.69488275",
"0.6899812",
"0.6899812",
"0.68590105",
"0.68122965",
"0.6751939",
"0.67278594",
"0.67271215",
"0.6727028",
"0.67188066",
"0.67021996",
"0.66560125",
"0.6... | 0.7732689 | 0 |
This function to replace the loser parent in the population by the new offspring, the loser individual is the individual is the one with lower fitness | def ykL_(YKHO, ACnF, s1_J):
UCOL = min(ACnF, key=YKHO.applyFitness)
for d6pt, DM04 in enumerate(YKHO.currentGeneration):
if DM04 == UCOL:
YKHO.currentGeneration[d6pt] = s1_J | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZH0Q(YKHO, iiaq: Population):\n FFnz = iiaq.fitness\n _0VL = oyIN.argsort(FFnz)[:YKHO._population.size - 1:-1]\n xPEC = [iiaq.individuals[or8S] for or8S in _0VL]\n YKHO._population.set_new_individuals(xPEC)",
"def s3ft(tuKI, CHNM, ACnF, XJ7N, qIxc):\n CHNM.sort()\n lWUa = min(len(XJ7N), len... | [
"0.67574143",
"0.6735563",
"0.66986865",
"0.66741997",
"0.66667867",
"0.6625717",
"0.6590667",
"0.6586559",
"0.65788937",
"0.6537534",
"0.65192854",
"0.6489191",
"0.64616317",
"0.64470416",
"0.64443046",
"0.6425785",
"0.6407018",
"0.64054525",
"0.6294508",
"0.6240264",
"0.621... | 0.80425453 | 0 |
check if the lattice has a good shape. | def BYxs(Qpq_, KvRR=25.0, x2CH=1.2, oVD4=150, SaxI=30):
IGeV = Qpq_.lattice.get_para(degree=True)
if max(IGeV[:3]) < KvRR and min(IGeV[:3]) > x2CH and (max(IGeV[3:]) < oVD4) and (min(IGeV[3:]) > SaxI):
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WpWm(YKHO):\n return hasattr(YKHO, 'uc') and len(YKHO.maximals()) == 1 and (type(YKHO.get_meet()) != str) and (type(YKHO.get_join()) != str)",
"def SGVO(YKHO) -> bool:\n try:\n YKHO.shape\n return True\n except ValueError:\n return False",
"def Fuw0(gOGe, KDwe):\n return Tr... | [
"0.7111411",
"0.70262915",
"0.6918204",
"0.68648237",
"0.64018166",
"0.63829756",
"0.6359982",
"0.6325148",
"0.63046",
"0.62925625",
"0.62891304",
"0.6282721",
"0.6282721",
"0.6273234",
"0.62512136",
"0.6238588",
"0.61411923",
"0.6140296",
"0.6131813",
"0.6130223",
"0.6120512... | 0.0 | -1 |
symmetrize the structure from spglib. | def Hy4G(fYD0, yJiH=0.001, dALD=5.0, _Cnz='pyxtal', ok8c=None):
mSrU = [qpDA.species.elements[0].Z for qpDA in fYD0.sites]
RR8p = (fYD0.lattice.matrix, fYD0.frac_coords, mSrU)
__n6 = y6fm(RR8p, yJiH, angle_tolerance=dALD)
if ok8c is None:
ok8c = F9T1(__n6['number'], style=_Cnz).hall_default
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hy4G(vuvg, *i9El, **qIxc):\n N6G0(qIxc, ['formal', 'symbols'])\n OxJJ = True\n if not hasattr(vuvg, '__iter__'):\n OxJJ = False\n vuvg = [vuvg]\n A3Vt, vuvg = RE5_(vuvg, *i9El, **qIxc)\n i9El = A3Vt.symbols\n y7GR = fEWs(i9El, qIxc)\n rmc3 = y7GR.symbols\n rmc3 = [next(rmc... | [
"0.60753167",
"0.6007776",
"0.59097177",
"0.5699873",
"0.5694103",
"0.54829",
"0.5404972",
"0.54047513",
"0.52612895",
"0.52612275",
"0.52362776",
"0.5211854",
"0.51892626",
"0.51727134",
"0.51634705",
"0.5154356",
"0.50892234",
"0.50871396",
"0.50797606",
"0.50406325",
"0.49... | 0.5672918 | 5 |
Returns path to mount point NFS share. | def MGZB(YKHO, rbx7):
rbx7 = rbx7.encode('utf-8')
return Hy7s.path.join(YKHO.configuration.nexenta_mount_point_base, xORj(rbx7, usedforsecurity=False).hexdigest()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ags3(YKHO, weUZ):\n yUMG = YKHO._get_mount_point_for_gluster_vol()\n if not Hy7s.access(yUMG, Hy7s.R_OK):\n raise AJ5d.GlusterfsException('share path %s does not exist' % yUMG)\n return Hy7s.path.join(yUMG, weUZ['name'])",
"def b0ch(YKHO, qoLw):\n weUZ = YKHO._normalize_export(qoLw['data']... | [
"0.7795988",
"0.77838475",
"0.7597644",
"0.72917444",
"0.7049242",
"0.6989462",
"0.6980395",
"0.6805012",
"0.6778835",
"0.669241",
"0.6650866",
"0.66389495",
"0.6342373",
"0.633498",
"0.63081914",
"0.62626815",
"0.6234679",
"0.6230863",
"0.6215162",
"0.6195222",
"0.6195222",
... | 0.8357346 | 0 |
Returns volroot property value from NexentaStor appliance. | def Zfij(YKHO, lIj3):
if not YKHO.nms_cache_volroot:
return lIj3.server.get_prop('volroot')
if lIj3 not in YKHO._nms2volroot:
YKHO._nms2volroot[lIj3] = lIj3.server.get_prop('volroot')
return YKHO._nms2volroot[lIj3] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BWXx(YKHO) -> h8nf[ImMB]:\n return YKHO.get('/V')",
"def IhU7(YKHO):\n return YKHO._root_volume",
"def Bjex(YKHO):\n return YKHO.__root.get_value()",
"def akib(YKHO):\n Ty9i = {'art': YKHO._vart, 'ven': YKHO._vven}\n if YKHO._lvad is not None:\n Ty9i['lvad'] = YKHO._lvad.volume['lva... | [
"0.61601096",
"0.5949537",
"0.58422107",
"0.5703597",
"0.5703597",
"0.5703597",
"0.5559454",
"0.5505063",
"0.5468166",
"0.5460711",
"0.5445286",
"0.53854096",
"0.53415215",
"0.5280505",
"0.5268969",
"0.52529585",
"0.5228251",
"0.5221805",
"0.5202413",
"0.51986957",
"0.5191742... | 0.7106413 | 0 |
Return a string representing the type of vehicle this is. | def GnEY(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gKPu():\n pass",
"def gKPu(YKHO):\n pass",
"def gKPu(YKHO):\n return 'car'",
"def gKPu(YKHO):\n return 'car'",
"def gKPu(YKHO):\n return 'car'",
"def gKPu(YKHO):\n return 'truck'",
"def gKPu(YKHO):\n return 'truck'",
"def type(YKHO) -> str:\n return qe4Y.get(YKHO, 'type')"... | [
"0.8265305",
"0.8170253",
"0.7995276",
"0.7995276",
"0.7995276",
"0.7840752",
"0.7840752",
"0.73868793",
"0.73868793",
"0.73868793",
"0.73868793",
"0.73868793",
"0.73868793",
"0.73868793",
"0.73868793",
"0.73868793",
"0.73868793",
"0.73868793",
"0.73868793",
"0.73868793",
"0.... | 0.0 | -1 |
Return a string representing the type of vehicle this is. | def GnEY(YKHO):
return 'Generic' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gKPu():\n pass",
"def gKPu(YKHO):\n pass",
"def gKPu(YKHO):\n return 'car'",
"def gKPu(YKHO):\n return 'car'",
"def gKPu(YKHO):\n return 'car'",
"def gKPu(YKHO):\n return 'truck'",
"def gKPu(YKHO):\n return 'truck'",
"def type(YKHO) -> str:\n return qe4Y.get(YKHO, 'type')"... | [
"0.8264676",
"0.81698346",
"0.7994656",
"0.7994656",
"0.7994656",
"0.78400844",
"0.78400844",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
... | 0.0 | -1 |
Return a string representing the type of vehicle this is. | def GnEY(YKHO):
return 'SubSystem' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gKPu():\n pass",
"def gKPu(YKHO):\n pass",
"def gKPu(YKHO):\n return 'car'",
"def gKPu(YKHO):\n return 'car'",
"def gKPu(YKHO):\n return 'car'",
"def gKPu(YKHO):\n return 'truck'",
"def gKPu(YKHO):\n return 'truck'",
"def type(YKHO) -> str:\n return qe4Y.get(YKHO, 'type')"... | [
"0.8265945",
"0.8171127",
"0.79946303",
"0.79946303",
"0.79946303",
"0.78402793",
"0.78402793",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936"... | 0.0 | -1 |
Create a 2D texture | def JE8l(YKHO, nPrm):
try:
g4Qf = LgTu[YKHO._dtype]
except KeyError:
raise ValueError(f"dype '{YKHO._dtype}' not support. Supported types are : {tuple(LgTu.keys())}")
VPot, Hfg7, YKHO._type, YKHO._component_size = g4Qf
if nPrm is not None:
uYWt, nPrm = fNr2(nPrm)
YKHO._va... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Er5r(YKHO):\n JtkL(HjDQ)\n nWhE(HjDQ, GX82, Lwek)\n nWhE(HjDQ, oFaL, Lwek)\n nvKE(JzN8, KqtV, VF8R)\n MFpp(HjDQ, YKHO.imageID)",
"def Er5r(YKHO):\n JtkL(HjDQ)\n nWhE(HjDQ, GX82, Lwek)\n nWhE(HjDQ, oFaL, Lwek)\n nvKE(JzN8, KqtV, VF8R)\n MFpp(HjDQ, YKHO.imageID)",
"def cTuD(pmON... | [
"0.7188117",
"0.6842773",
"0.6832628",
"0.67901695",
"0.6532243",
"0.6433",
"0.63820785",
"0.63820785",
"0.6320794",
"0.62327886",
"0.61053205",
"0.6101057",
"0.6012965",
"0.5975836",
"0.59536195",
"0.5940448",
"0.593926",
"0.58872813",
"0.58433676",
"0.58386964",
"0.581251",... | 0.74682844 | 0 |
If this is a depth texture. | def rb7a(YKHO) -> bool:
return YKHO._depth | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GgMb(YKHO):\n return False",
"def L54J(YKHO):\n return YKHO._is_depth",
"def RWDy(YKHO, rb7a):\n if rb7a >= YKHO.ply:\n return True\n return False",
"def HSzX():\n for f0tD in kZw_.context.screen.areas:\n if f0tD.type == 'VIEW_3D':\n for n294 in f0tD.spaces:\n ... | [
"0.7505039",
"0.63483423",
"0.6055799",
"0.60521936",
"0.6038747",
"0.58123887",
"0.5785416",
"0.57703376",
"0.57436144",
"0.5625199",
"0.55462575",
"0.5533299",
"0.5440087",
"0.53834677",
"0.5357321",
"0.53262186",
"0.53225833",
"0.5321339",
"0.5300496",
"0.52915186",
"0.528... | 0.56667644 | 9 |
Get or set the ``(min, mag)`` filter for this texture. These are rules for how a texture interpolates. The filter is specified for minification and magnification. Default value is ``LINEAR, LINEAR``. Can be set to ``NEAREST, NEAREST`` for pixelated graphics. When mipmapping is used the min filter needs to be one of the... | def filter(YKHO) -> AzJI[int, int]:
return YKHO._filter | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Iwgw(LNo8: Image, JJAj: str) -> hnIv:\n if JJAj == 'max':\n LNo8 = LNo8.filter(x5w2.MaxFilter())\n elif JJAj == 'min':\n LNo8 = LNo8.filter(x5w2.MinFilter())\n elif JJAj == 'median':\n LNo8 = LNo8.filter(x5w2.MedianFilter())\n elif JJAj == 'custom-max':\n LNo8 = sE9r(LNo... | [
"0.524342",
"0.5039486",
"0.50042534",
"0.497876",
"0.497876",
"0.497876",
"0.4935877",
"0.48312286",
"0.4788593",
"0.47638324",
"0.47199175",
"0.46718085",
"0.46673957",
"0.46536615",
"0.4643039",
"0.4626729",
"0.45967704",
"0.4587776",
"0.45475543",
"0.45431992",
"0.4514759... | 0.0 | -1 |
Get a handle for bindless texture access. Once a handle is created its parameters cannot be changed. Attempting to do so will have no effect. (filter, wrap etc). There is no way to undo this immutability. Handles cannot be used by shaders until they are resident. This method can be called multiple times to move a textu... | def f6VA(YKHO, LxSB: bool=True) -> int:
nVrR = Fd7m.glGetTextureHandleARB(YKHO._glo)
IRjy = Fd7m.glIsTextureHandleResidentARB(nVrR)
if LxSB:
if not IRjy:
Fd7m.glMakeTextureHandleResidentARB(nVrR)
elif IRjy:
Fd7m.glMakeTextureHandleNonResidentARB(nVrR)
return nVrR | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K_4v(YKHO, Tuqy):\n K_4v = Tuqy.cache.getData(YKHO, 'texture')\n if K_4v is None:\n K_4v = bDbk(1)\n iGYZ = Tuqy.cache.holder(YKHO, K_4v, 'texture')\n return K_4v",
"def vQn9(YKHO):\n raise NotImplementedError('new_handle')",
"def FIMM(YKHO, mWFP):\n super(JIou, YKHO).__init__(... | [
"0.55944216",
"0.5345217",
"0.53050876",
"0.5206766",
"0.5206766",
"0.5206766",
"0.5180088",
"0.5144606",
"0.51241904",
"0.5064889",
"0.5064889",
"0.50330245",
"0.499311",
"0.4986729",
"0.4986729",
"0.49717417",
"0.49468327",
"0.4944732",
"0.4930265",
"0.49168468",
"0.4914705... | 0.6405713 | 0 |
Columns not categorical are numeric. | def VR5Y(iVRZ):
if iVRZ not in ZH6t and iVRZ not in axVq:
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WcyB(YKHO, jQ3Z):\n XCb3 = [H5ew for H5ew in jQ3Z.keys() if jQ3Z.dtypes[H5ew] != oyIN.dtype('O')]\n ZTCt = ['MSSubClass']\n XCb3 = list(set(XCb3) - set(ZTCt))\n return XCb3",
"def WcyB(YKHO, jQ3Z):\n XCb3 = [H5ew for H5ew in jQ3Z.keys() if jQ3Z.dtypes[H5ew] != oyIN.dtype('O')]\n ZTCt = ['MS... | [
"0.7231478",
"0.7231478",
"0.71891004",
"0.7033247",
"0.69128186",
"0.68907744",
"0.68339336",
"0.68084824",
"0.67879426",
"0.67816305",
"0.67736906",
"0.6771879",
"0.6668778",
"0.66226965",
"0.6556335",
"0.6551606",
"0.6540514",
"0.64810956",
"0.64642143",
"0.6456399",
"0.63... | 0.6656425 | 13 |
Sets the cash_flows of this CashFlowList. | def kRLY(YKHO, kRLY):
if kRLY is None:
raise ValueError('Invalid value for `cash_flows`, must not be `None`')
YKHO._cash_flows = kRLY | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SKxV(YKHO, SKxV):\n YKHO._flows = SKxV",
"def X1Pw(YKHO, X1Pw):\n YKHO._cash_transactions = X1Pw",
"def VoIp(YKHO, VoIp: float):\n if VoIp is None:\n raise ValueError('Invalid value for `cash`, must not be `None`')\n YKHO._cash = VoIp",
"def gWrS(YKHO, gWrS):\n YKHO._cash_flow_linea... | [
"0.6503148",
"0.62438166",
"0.545946",
"0.5454699",
"0.5216654",
"0.51502836",
"0.5088359",
"0.50755364",
"0.4959282",
"0.4867318",
"0.4782161",
"0.46714813",
"0.46688834",
"0.46656358",
"0.46624285",
"0.46424636",
"0.46328622",
"0.45433024",
"0.4542396",
"0.45193258",
"0.450... | 0.82056403 | 0 |
Sets the total_income of this CashFlowList. | def JTsD(YKHO, JTsD):
if JTsD is None:
raise ValueError('Invalid value for `total_income`, must not be `None`')
YKHO._total_income = JTsD | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KpBD(YKHO, KpBD):\n YKHO._total_amount = KpBD",
"def wjRY(YKHO, wjRY):\n YKHO._total = wjRY",
"def wjRY(YKHO, wjRY):\n YKHO._total = wjRY",
"def wjRY(YKHO, wjRY):\n YKHO._total = wjRY",
"def wjRY(YKHO, wjRY):\n YKHO._total = wjRY",
"def wjRY(YKHO, wjRY):\n YKHO._total = wjRY",
"de... | [
"0.6431345",
"0.59588367",
"0.59588367",
"0.59588367",
"0.59588367",
"0.59588367",
"0.59588367",
"0.59588367",
"0.59588367",
"0.58867455",
"0.5797784",
"0.57963246",
"0.5755417",
"0.5627125",
"0.5616459",
"0.55919397",
"0.55724037",
"0.55422646",
"0.54104125",
"0.5386278",
"0... | 0.76999545 | 0 |
Sets the total_spending of this CashFlowList. | def AjQl(YKHO, AjQl):
if AjQl is None:
raise ValueError('Invalid value for `total_spending`, must not be `None`')
YKHO._total_spending = AjQl | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wjRY(YKHO, wjRY):\n YKHO._total = wjRY",
"def wjRY(YKHO, wjRY):\n YKHO._total = wjRY",
"def wjRY(YKHO, wjRY):\n YKHO._total = wjRY",
"def wjRY(YKHO, wjRY):\n YKHO._total = wjRY",
"def wjRY(YKHO, wjRY):\n YKHO._total = wjRY",
"def wjRY(YKHO, wjRY):\n YKHO._total = wjRY",
"def wjRY(... | [
"0.55875266",
"0.55875266",
"0.55875266",
"0.55875266",
"0.55875266",
"0.55875266",
"0.55875266",
"0.55875266",
"0.5534092",
"0.54833645",
"0.541818",
"0.5382489",
"0.5371437",
"0.5328672",
"0.5287935",
"0.5245904",
"0.51732576",
"0.51732314",
"0.5140538",
"0.51266545",
"0.50... | 0.77776664 | 0 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, lKc9):
return False
return YKHO.__dict__ == Elif.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748"
] | 0.0 | -1 |
Initialize the weights of modules in single object tracker. | def vB93(YKHO):
if YKHO.with_backbone:
YKHO.backbone.init_weights()
if YKHO.with_neck:
for r8hN in YKHO.neck.modules():
if isinstance(r8hN, QGt0) or isinstance(r8hN, _bh1):
r8hN.reset_parameters()
if YKHO.with_head:
for r8hN in YKHO.head.modules():
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C0Lv(YKHO):\n pass",
"def vB93(YKHO):\n YKHO.apply(YKHO._init_weights)\n YKHO.tie_weights()",
"def vB93(YKHO):\n YKHO.apply(YKHO._init_weights)",
"def vB93(C3ST):\n ...",
"def Y7Gu(YKHO, _mSQ):\n YKHO.init_w = _mSQ",
"def vJuA(YKHO):\n raise NotImplementedError",
"def dGkD(YKHO... | [
"0.74742",
"0.7341231",
"0.7238096",
"0.71375203",
"0.7133267",
"0.71006024",
"0.70233965",
"0.70233965",
"0.70233965",
"0.69861645",
"0.6968602",
"0.69675523",
"0.6951536",
"0.69277126",
"0.69186366",
"0.68975216",
"0.6886146",
"0.6855509",
"0.68230784",
"0.681541",
"0.67955... | 0.69196343 | 14 |
Clip the bbox with [cx, cy, w, h] format. | def Qt0g(YKHO, cviu, Jarx, do44):
cviu[0] = cviu[0].clamp(0.0, do44)
cviu[1] = cviu[1].clamp(0.0, Jarx)
cviu[2] = cviu[2].clamp(10.0, do44)
cviu[3] = cviu[3].clamp(10.0, Jarx)
return cviu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GAer(cviu, GAer, Cwt5):\n jIe1 = S8_X(cviu)\n wBZN = oyIN.maximum(cviu[:, 0], GAer[0]).reshape(-1, 1)\n KDmU = oyIN.maximum(cviu[:, 1], GAer[1]).reshape(-1, 1)\n re6M = oyIN.minimum(cviu[:, 2], GAer[2]).reshape(-1, 1)\n rwK9 = oyIN.minimum(cviu[:, 3], GAer[3]).reshape(-1, 1)\n cviu = oyIN.hst... | [
"0.7313244",
"0.70429015",
"0.70189553",
"0.6883469",
"0.6825649",
"0.67743737",
"0.6728525",
"0.6686819",
"0.6645149",
"0.6609351",
"0.65695226",
"0.65587974",
"0.6503888",
"0.6412028",
"0.63957345",
"0.6377559",
"0.6323363",
"0.6306833",
"0.6304818",
"0.6238774",
"0.6180341... | 0.7783148 | 0 |
Registers UI home page | def _Uvz(PsCT):
global _home
bIYZ = PsCT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kZiy(YKHO, *qIxc, **B2fa):\n pass",
"def kZiy():\n return TvZl('home_page.html')",
"def kZiy():\n pB3N = p_z1.get_payload()\n return TvZl('index.html', payload=pB3N)",
"def l6D9():\n p_Ie = AS0T()\n p_Ie.registration_main_page()",
"def kZiy():\n return TvZl('Main_Page.html')",
"d... | [
"0.67956895",
"0.6708905",
"0.66374415",
"0.66158766",
"0.66043884",
"0.6580823",
"0.6572928",
"0.6559342",
"0.65399474",
"0.64996564",
"0.6496449",
"0.6494188",
"0.6485153",
"0.64734685",
"0.64628464",
"0.64628464",
"0.645504",
"0.64517254",
"0.6445883",
"0.6445883",
"0.6444... | 0.69619066 | 1 |
Checks if the user is in the retina admins group | def Kscb(CBIr):
return CBIr.groups.filter(name=gCuF.RETINA_ADMINS_GROUP_NAME).exists() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I_c1(CBIr):\n return oqYs(CBIr) or Kscb(CBIr)",
"def _Kb1(CBIr):\n return CBIr.groups.filter(name='Profesores').exists()",
"def _Kb1(YKHO, CBIr):\n if CBIr.is_superuser:\n return True\n if CBIr.groups.filter(name=YKHO.admin_group_name).count() > 0:\n return True\n else:\n ... | [
"0.784455",
"0.76779366",
"0.73881423",
"0.73478335",
"0.7151855",
"0.7018923",
"0.6996919",
"0.6914185",
"0.68897706",
"0.68798167",
"0.68609184",
"0.67808235",
"0.67541564",
"0.6690944",
"0.66619605",
"0.66282266",
"0.66166395",
"0.6616568",
"0.6616457",
"0.66022515",
"0.65... | 0.86453336 | 0 |
Creates a tf Dataset containing pairs extracted image features and tokenized caption vectors | def oUGu(iXTm, cQRt, VB6e):
def yD90(rTBW, Fd1k):
Kxa5 = VB6e / (rTBW.decode('utf-8').split('/')[-1] + '.npy')
j3sf = oyIN.load(Kxa5)
return (j3sf, Fd1k)
iXTm = [str(pmON) for pmON in iXTm]
__n6 = ZylS.data.Dataset.from_tensor_slices((iXTm, cQRt))
__n6 = __n6.map(lambda CZxs, Ah... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hCzz(YKHO, BWXx):\n yJc9 = {'image/encoded': ZylS.io.FixedLenFeature((), ZylS.string, ''), 'image/format': ZylS.io.FixedLenFeature((), ZylS.string, 'jpeg'), 'image/class/label': ZylS.io.FixedLenFeature([], ZylS.int64, -1), 'image/class/text': ZylS.io.FixedLenFeature([], ZylS.string, ''), 'image/object/bbox/... | [
"0.6684262",
"0.66397846",
"0.6508675",
"0.6405396",
"0.6400918",
"0.6358375",
"0.632083",
"0.6303496",
"0.62590766",
"0.62338936",
"0.621265",
"0.62059116",
"0.61887246",
"0.6157544",
"0.61569893",
"0.6142628",
"0.6117018",
"0.61029035",
"0.61001074",
"0.6096749",
"0.6092561... | 0.76842475 | 0 |
Get templated field for a TaskInstance from the RenderedTaskInstanceFields table. | def m3X7(Emd4, xTkX: TaskInstance, cuiw: Session=None) -> h8nf[dict]:
Aofo = cuiw.query(Emd4.rendered_fields).filter(Emd4.dag_id == xTkX.dag_id, Emd4.task_id == xTkX.task_id, Emd4.execution_date == xTkX.execution_date).one_or_none()
if Aofo:
gbsd = Aofo.rendered_fields
return gbsd
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def demc(YKHO, KAOR):\n V_D6 = getattr(KAOR, '_fields')\n return V_D6[YKHO.id]",
"def QTMT(bTKY, Jyyj):\n if Jyyj.name in bTKY.field_dict:\n if Jyyj.choices:\n return getattr(bTKY.object, 'get_%s_display' % Jyyj.name)()\n return bTKY.field_dict[Jyyj.name]\n else:\n ret... | [
"0.6241508",
"0.5894879",
"0.54714096",
"0.54267204",
"0.54264456",
"0.5402755",
"0.528257",
"0.52103925",
"0.5182086",
"0.51770705",
"0.51310015",
"0.51098365",
"0.5071629",
"0.5061883",
"0.50584024",
"0.50435716",
"0.50399226",
"0.50218254",
"0.5020443",
"0.50161093",
"0.50... | 0.69858354 | 0 |
Initializes a new simulation model. | def FIMM(YKHO, iJtr=None):
YKHO._base_comp = iJtr
YKHO._pragmas = set()
YKHO._package_imports = set()
YKHO._package_locations = set()
YKHO._extra_deps = set()
YKHO._module_imports = set()
YKHO._actions = []
YKHO._sources = []
YKHO._var_names = set()
YKHO._lazy_var_names = set()
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ER8n(YKHO) -> XoHV:\n pass",
"def Lal4(YKHO):\n pass",
"def FIMM(YKHO, N6LA):\n YKHO.initialize(N6LA)",
"def Gv23(YKHO):\n pass",
"def Z2lL(YKHO):\n pass",
"def fPO8(YKHO):\n pass",
"def FIMM(YKHO, A18S, XjZu, z9Hj=None):\n YKHO.model_filename = A18S\n YKHO.sim_filename = Xj... | [
"0.763308",
"0.7469408",
"0.69350505",
"0.6819763",
"0.67672014",
"0.671706",
"0.66981095",
"0.66505426",
"0.6590059",
"0.6573131",
"0.65613145",
"0.65528184",
"0.65487564",
"0.6531799",
"0.6497613",
"0.64877695",
"0.648553",
"0.646149",
"0.6457929",
"0.6446355",
"0.6432066",... | 0.0 | -1 |
Add a new variable with the specified definition. | def jD71(YKHO, mWFP, yCnv):
if mWFP in YKHO._var_names:
raise e_bu('Variable ' + mWFP + ' is already defined')
elif mWFP in YKHO._lazy_var_names:
XeOP = mWFP + ' <- ' + yCnv
YKHO._lazy_var_names.remove(mWFP)
YKHO._var_names.add(mWFP)
YKHO.add_action(XeOP)
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C4rf(YKHO, SRYB):\n YKHO.var_list.append(SRYB)\n YKHO.var_dict[SRYB.name] = SRYB",
"def t8zh(YKHO, SbMi, nUeQ, SRYB, YM51):\n if YKHO.isVariableDefined(SbMi):\n ZfUD = YKHO.getItem(SbMi)\n ZfUD.setVariable(SRYB)\n ZfUD.setFile(nUeQ)\n else:\n ZfUD = rHXx(nUeQ, SRYB, Sb... | [
"0.7372167",
"0.71997195",
"0.7104465",
"0.70572597",
"0.70572597",
"0.7055764",
"0.7042302",
"0.7026974",
"0.7019386",
"0.69695",
"0.687286",
"0.6862491",
"0.68154716",
"0.6762516",
"0.67523783",
"0.66896003",
"0.6612306",
"0.6569806",
"0.64301944",
"0.6410666",
"0.6357172",... | 0.6221269 | 26 |
Add a new variable that will be defined lazily. | def I9up(YKHO, mWFP):
if mWFP in YKHO._var_names:
raise e_bu('Variable ' + mWFP + ' is already defined')
elif mWFP in YKHO._lazy_var_names:
raise e_bu('Variable ' + mWFP + ' is already added as lazy')
else:
YKHO._lazy_var_names.add(mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I9up(YKHO, mWFP):\n YKHO._main_model.add_lazy_var(mWFP)",
"def t8zh(YKHO, mWFP, BWXx, xkzz=False):\n setattr(YKHO, mWFP, BWXx)\n if xkzz and mWFP not in YKHO.variables:\n YKHO.variables.append(mWFP)",
"def H2v5(YKHO, Es0b):\n SRYB = jth9(Es0b)\n if SRYB.kind == jg3r:\n SRYB.id ... | [
"0.76545525",
"0.66393924",
"0.6595601",
"0.6568951",
"0.6247137",
"0.62453395",
"0.61838925",
"0.5997919",
"0.5997919",
"0.5961082",
"0.58474183",
"0.5791899",
"0.57212055",
"0.5718378",
"0.5668894",
"0.56538415",
"0.5638421",
"0.5606852",
"0.56036854",
"0.5597571",
"0.55961... | 0.7712045 | 0 |
Initializes a new submodel. | def FIMM(YKHO, C3ST, mWFP=None):
YKHO._main_model = C3ST.get_main_model()
YKHO._model = C3ST
YKHO._name = mWFP
YKHO._var_prefix = '_sub_' + str(lVHS._next_id)
lVHS._next_id += 1
if mWFP is None or C3ST.is_source_prefix_mangled():
YKHO._source_prefix_mangled = True
YKHO._source_pr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fPO8(YKHO):\n pass",
"def Gv23(YKHO):\n pass",
"def FIMM(YKHO, *qIxc):\n VQ6Z = _VfD.new_Model(*qIxc)\n try:\n YKHO.this.append(VQ6Z)\n except:\n YKHO.this = VQ6Z",
"def NN4v(YKHO):\n return _VfD.Submodel_instantiate(YKHO)",
"def uIcm(YKHO, C3ST):\n pass",
"def FIMM... | [
"0.6998372",
"0.6960137",
"0.6704588",
"0.6630076",
"0.6606655",
"0.6579245",
"0.6506945",
"0.6487281",
"0.64839053",
"0.64817387",
"0.647923",
"0.647923",
"0.64633405",
"0.6438492",
"0.63814646",
"0.63814646",
"0.63814646",
"0.63814646",
"0.6349379",
"0.63449574",
"0.6327848... | 0.67143744 | 2 |
Add a new variable with the specified definition. | def jD71(YKHO, mWFP, yCnv):
YKHO._main_model.add_var(mWFP, yCnv) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C4rf(YKHO, SRYB):\n YKHO.var_list.append(SRYB)\n YKHO.var_dict[SRYB.name] = SRYB",
"def t8zh(YKHO, SbMi, nUeQ, SRYB, YM51):\n if YKHO.isVariableDefined(SbMi):\n ZfUD = YKHO.getItem(SbMi)\n ZfUD.setVariable(SRYB)\n ZfUD.setFile(nUeQ)\n else:\n ZfUD = rHXx(nUeQ, SRYB, Sb... | [
"0.7372167",
"0.71997195",
"0.7104465",
"0.70572597",
"0.70572597",
"0.7055764",
"0.7042302",
"0.7026974",
"0.7019386",
"0.69695",
"0.687286",
"0.6862491",
"0.68154716",
"0.6762516",
"0.67523783",
"0.66896003",
"0.6612306",
"0.64301944",
"0.6410666",
"0.6357172",
"0.6352309",... | 0.6569806 | 17 |
Add a new variable that will be defined lazily. | def I9up(YKHO, mWFP):
YKHO._main_model.add_lazy_var(mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I9up(YKHO, mWFP):\n if mWFP in YKHO._var_names:\n raise e_bu('Variable ' + mWFP + ' is already defined')\n elif mWFP in YKHO._lazy_var_names:\n raise e_bu('Variable ' + mWFP + ' is already added as lazy')\n else:\n YKHO._lazy_var_names.add(mWFP)",
"def t8zh(YKHO, mWFP, BWXx, xkz... | [
"0.7712045",
"0.66393924",
"0.6595601",
"0.6568951",
"0.6247137",
"0.62453395",
"0.61838925",
"0.5997919",
"0.5997919",
"0.5961082",
"0.58474183",
"0.5791899",
"0.57212055",
"0.5718378",
"0.5668894",
"0.56538415",
"0.5638421",
"0.5606852",
"0.56036854",
"0.5597571",
"0.559612... | 0.76545525 | 1 |
Gets the experiment id for the session corresponding to a desired stimulus within an experiment. | def nE14(YKHO, Z2dz, YElo):
if YElo == 'drifting_gratings':
H5ew = 'three_session_A'
elif YElo == 'static_gratings':
H5ew = 'three_session_B'
else:
raise ValueError('Stimulus name not supported.')
evlW = YKHO.boc.get_ophys_experiments(experiment_container_ids=[Z2dz])
vM4Z = [... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jPJT(t6ks: str, GPtr: SQAConfig) -> h8nf[int]:\n cq1B = GPtr.class_to_sqa_class[hOpO]\n with FNir() as cuiw:\n _q74 = cuiw.query(cq1B.id).filter_by(name=t6ks).one_or_none()\n if _q74 is None:\n return None\n return _q74[0]",
"def Zi9o(YKHO):\n if YKHO._sim_id is None:\n YK... | [
"0.71532655",
"0.6378471",
"0.63194567",
"0.59795403",
"0.5965008",
"0.58918595",
"0.5830722",
"0.5771757",
"0.5769766",
"0.57486475",
"0.5739815",
"0.5717964",
"0.56790876",
"0.5650996",
"0.5649797",
"0.56194174",
"0.5611385",
"0.5587483",
"0.55863225",
"0.55659956",
"0.5559... | 0.7846635 | 0 |
Gets the experiment id for the session corresponding to a desired stimulus within an experiment. | def yl_K(YKHO, Z2dz, YElo, XFYA, L42E):
vM4Z = YKHO.get_ophys_experiment_id(experiment_id=Z2dz, stimulus_name=YElo)
nPrm = YKHO.boc.get_ophys_experiment_data(vM4Z)
M_Ra, P_9Q = nPrm.get_dff_traces()
tyNF = nPrm.get_stimulus_table(YElo)
tyNF = tyNF.dropna('index', 'any')
XckE = tyNF[XFYA].values
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nE14(YKHO, Z2dz, YElo):\n if YElo == 'drifting_gratings':\n H5ew = 'three_session_A'\n elif YElo == 'static_gratings':\n H5ew = 'three_session_B'\n else:\n raise ValueError('Stimulus name not supported.')\n evlW = YKHO.boc.get_ophys_experiments(experiment_container_ids=[Z2dz])\... | [
"0.78465253",
"0.71517205",
"0.63784236",
"0.6319727",
"0.5979363",
"0.5963021",
"0.58907986",
"0.5830224",
"0.5770818",
"0.5770364",
"0.5749562",
"0.57401663",
"0.5718255",
"0.56794155",
"0.56511706",
"0.56510377",
"0.56180716",
"0.5611736",
"0.5587608",
"0.55865383",
"0.556... | 0.0 | -1 |
Test creating a new user without an email raises an error | def V97d(YKHO):
with YKHO.assertRaises(ValueError):
egNl().objects.create_user(None, '123') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hhyC(YKHO):\n with YKHO.assertRaises(ValueError):\n egNl().objects.create_user(None, 'Test1234')",
"def V97d(YKHO):\n with YKHO.assertRaises(ValueError):\n egNl().objects.create_user(None, 'test123')",
"def V97d(YKHO):\n with YKHO.assertRaises(ValueError):\n egNl().objects.cre... | [
"0.9088418",
"0.8959542",
"0.89563155",
"0.89563155",
"0.89563155",
"0.89563155",
"0.89563155",
"0.8954783",
"0.89477336",
"0.8945835",
"0.89191824",
"0.8913073",
"0.89104134",
"0.8884908",
"0.8842249",
"0.8800853",
"0.8769576",
"0.8759867",
"0.8725888",
"0.8683777",
"0.86610... | 0.89684045 | 1 |
Convert a 1dimensional argument that is either a list, array or matrix to an array. | def Y3fK(d7pR):
if isinstance(d7pR, (SppC, gyIm)):
KCHu = d7pR.shape
if len(KCHu) == 1:
return qw7D(d7pR)
if min(KCHu) == 1:
return qw7D(d7pR).flatten()
elif isinstance(d7pR, list):
return qw7D(d7pR)
elif isinstance(d7pR, (int, float, fSkI, HUFt)):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def U3xM(ezWE, jth9=False):\n if jth9:\n return MF4b(ezWE).flatten()\n else:\n return MF4b(ezWE).ravel()",
"def WTDd(WKvO):\n if isinstance(WKvO, list):\n return [WTDd(tTpl) for tTpl in WKvO]\n elif isinstance(WKvO, oyIN.ndarray):\n return WKvO\n elif isinstance(WKvO, (... | [
"0.7183965",
"0.68208325",
"0.6803325",
"0.6730968",
"0.6730968",
"0.6725568",
"0.67174804",
"0.66403395",
"0.6640206",
"0.65919584",
"0.6575156",
"0.65119815",
"0.6417575",
"0.63539165",
"0.63468343",
"0.6343524",
"0.63367087",
"0.63364476",
"0.6336378",
"0.63127023",
"0.630... | 0.82650495 | 0 |
Create or decompose translational homogeneous transformations. Create a homogeneous transformation =================================== T = transl(v) T = transl(vx, vy, vz) The transformation is created with a unit rotation submatrix. The translational elements are set from elements of v which is a list, array or matrix... | def vil0(WKvO, LVAh=None, epBp=None):
if LVAh == None and epBp == None:
WKvO = vb7U(WKvO)
try:
if le38(WKvO):
return WKvO[0:3, 3].reshape(3, 1)
else:
return MPiJ((MPiJ((MUmk(3), WKvO.reshape(3, 1)), 1), vb7U([0, 0, 0, 1])))
except Attri... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c4ad(yJOC, cQNg):\n yJOC = oyIN.array(yJOC)\n if yJOC.shape == (3, 3):\n if LQfE(yJOC):\n zSY9 = yJOC\n else:\n assert EOFError\n a1PO = oyIN.eye(4)\n a1PO[0:3, 0:3] = zSY9\n a1PO[0:3, 3] = cQNg\n return a1PO\n else:\n xSqr = KPBn(... | [
"0.6853959",
"0.66387844",
"0.6307596",
"0.62538147",
"0.6244158",
"0.61653316",
"0.61261743",
"0.6102071",
"0.5989559",
"0.5944427",
"0.59428275",
"0.58906615",
"0.58902925",
"0.58013606",
"0.57699513",
"0.5766213",
"0.5766213",
"0.57649034",
"0.5759939",
"0.57446074",
"0.57... | 0.59805954 | 9 |
Set whether to hide secrets in logs. | def oP3G(BWXx: bool=True) -> None:
nfqd.HideFormatter.HIDE_ENABLED = bWeC.coerce_bool(BWXx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yFCM(YKHO) -> qe4Y.Output[h8nf[bool]]:\n return qe4Y.get(YKHO, 'omit_secret')",
"def yFCM(YKHO) -> h8nf[qe4Y.Input[bool]]:\n return qe4Y.get(YKHO, 'omit_secret')",
"def yFCM(YKHO) -> h8nf[qe4Y.Input[bool]]:\n return qe4Y.get(YKHO, 'omit_secret')",
"def Afoa(YKHO):\n YKHO.hide_token = True\n ... | [
"0.6221321",
"0.61572707",
"0.61572707",
"0.59958506",
"0.56645834",
"0.559342",
"0.55162275",
"0.54833597",
"0.5463412",
"0.545951",
"0.5410135",
"0.5400235",
"0.5397044",
"0.5397044",
"0.53723836",
"0.53712004",
"0.53383625",
"0.53378147",
"0.53245175",
"0.5313688",
"0.5293... | 0.87042135 | 0 |
Set the log level for this client's console output. | def NlAh(YKHO, BWXx: t.Union[str, int]=_XMI) -> None:
if isinstance(YKHO.ARGS_HANDLER_CON, dict):
YKHO.ARGS_HANDLER_CON['level'] = nfqd.str_level(BWXx)
if YKHO.HANDLER_CON:
nfqd.set_log_level(obj=YKHO.HANDLER_CON, level=BWXx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aQ22(YKHO, ABDL):\n if ABDL == 'info':\n ABDL = G9jH.INFO\n if ABDL == 'debug':\n ABDL = G9jH.DEBUG\n if ABDL == 'error':\n ABDL = G9jH.ERROR\n YKHO._log.setLevel(ABDL)",
"def ABDL(YKHO, wiAm):\n YKHO.logger.setLevel(wiAm)",
"def AVQu(YKHO, NX0m=G9jH.DEBUG):\n YKHO._l... | [
"0.7317818",
"0.7246532",
"0.7224944",
"0.71976995",
"0.715652",
"0.7134887",
"0.7111482",
"0.7060585",
"0.700732",
"0.69953936",
"0.6890429",
"0.68614644",
"0.6856318",
"0.68364364",
"0.67952967",
"0.6767017",
"0.6750857",
"0.67237127",
"0.671836",
"0.658383",
"0.6583767",
... | 0.7291099 | 1 |
Set the log level for this client's file output. | def ZjWR(YKHO, BWXx: t.Union[str, int]=qzBH) -> None:
if isinstance(YKHO.ARGS_HANDLER_FILE, dict):
YKHO.ARGS_HANDLER_FILE['level'] = nfqd.str_level(BWXx)
if YKHO.HANDLER_FILE:
nfqd.set_log_level(obj=YKHO.HANDLER_FILE, level=BWXx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mTvS(YKHO, ABDL=G9jH.INFO, nUeQ=''):\n YKHO._logging_level = ABDL\n if nUeQ:\n YKHO._log_file = nUeQ",
"def pcXt(YKHO, BWXx):\n YKHO.PDFreactorConfiguration.in1['logLevel'] = BWXx",
"def AVQu(YKHO, NX0m=G9jH.DEBUG):\n YKHO._loggerLevel = NX0m\n YKHO._logger.setLevel(YKHO._loggerLevel)... | [
"0.7567276",
"0.7186663",
"0.69810635",
"0.6873454",
"0.6872623",
"0.6866347",
"0.6775976",
"0.673851",
"0.66855156",
"0.6684229",
"0.66636443",
"0.6651963",
"0.65893966",
"0.65424436",
"0.63576317",
"0.63309294",
"0.6328965",
"0.63226485",
"0.6307529",
"0.62971115",
"0.62519... | 0.7267733 | 1 |
Set the log level for this client's api objects. | def Vpd2(YKHO, BWXx: t.Union[str, int]=DfNA) -> None:
YKHO.API_LOG_LEVEL: str = nfqd.str_level(BWXx)
for YEnM in YKHO.API_CACHE.values():
if isinstance(YEnM, nNXP.ModelMixins):
nfqd.set_log_level(obj=YEnM.LOG, level=YKHO.API_LOG_LEVEL) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gHQk(YKHO, hOrn):\n YKHO.logger.setLevel(hOrn)",
"def aQ22(YKHO, ABDL):\n if ABDL == 'info':\n ABDL = G9jH.INFO\n if ABDL == 'debug':\n ABDL = G9jH.DEBUG\n if ABDL == 'error':\n ABDL = G9jH.ERROR\n YKHO._log.setLevel(ABDL)",
"def ABDL(YKHO, wiAm):\n YKHO.logger.setLev... | [
"0.7018329",
"0.69324386",
"0.68981826",
"0.6809772",
"0.6756352",
"0.67073035",
"0.65988535",
"0.6485142",
"0.6482158",
"0.64750326",
"0.64733326",
"0.6448323",
"0.64314735",
"0.6364664",
"0.63555914",
"0.62614816",
"0.6248847",
"0.6236759",
"0.6236413",
"0.6191833",
"0.6154... | 0.76888084 | 0 |
Set the log level for this client. | def ebvu(YKHO, BWXx: t.Union[str, int]='debug') -> None:
if YKHO.LOG:
nfqd.set_log_level(obj=YKHO.LOG, level=BWXx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ABDL(YKHO, wiAm):\n YKHO.logger.setLevel(wiAm)",
"def aQ22(YKHO, ABDL):\n if ABDL == 'info':\n ABDL = G9jH.INFO\n if ABDL == 'debug':\n ABDL = G9jH.DEBUG\n if ABDL == 'error':\n ABDL = G9jH.ERROR\n YKHO._log.setLevel(ABDL)",
"def gHQk(YKHO, hOrn):\n YKHO.logger.setLev... | [
"0.78398436",
"0.7809668",
"0.7766019",
"0.7668132",
"0.7589104",
"0.7537596",
"0.74525845",
"0.7424326",
"0.7348185",
"0.7269961",
"0.7242892",
"0.72419655",
"0.7236507",
"0.7098433",
"0.70542294",
"0.70506114",
"0.7050412",
"0.7040524",
"0.6970202",
"0.69349676",
"0.6928322... | 0.68059367 | 26 |
Set the log level for this client's http object. | def ctGw(YKHO, BWXx: t.Union[str, int]=yWra.LOG_LEVEL) -> None:
if isinstance(YKHO.HTTP, yWra):
nfqd.set_log_level(obj=YKHO.HTTP.LOG, level=BWXx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AVQu(YKHO, NX0m=G9jH.DEBUG):\n YKHO._loggerLevel = NX0m\n YKHO._logger.setLevel(YKHO._loggerLevel)\n YKHO._logger_file_handler.setLevel(YKHO._loggerLevel)\n YKHO._logger_stream_handler.setLevel(YKHO._loggerLevel)",
"def aQ22(YKHO, ABDL):\n if ABDL == 'info':\n ABDL = G9jH.INFO\n if A... | [
"0.70187664",
"0.69832474",
"0.6964545",
"0.68905675",
"0.6821331",
"0.66715455",
"0.66705346",
"0.6621394",
"0.65199566",
"0.6502086",
"0.64850664",
"0.63804597",
"0.63691986",
"0.6352352",
"0.6351242",
"0.63417125",
"0.63286376",
"0.63241845",
"0.6285955",
"0.6283318",
"0.6... | 0.78385943 | 0 |
Set the log level for this client's auth objects. | def X2YR(YKHO, BWXx: t.Union[str, int]=_JSi) -> None:
for YEnM in (YKHO.AUTH, YKHO.AUTH_NULL):
if isinstance(YEnM, EbUT):
nfqd.set_log_level(obj=YEnM.LOG, level=BWXx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ABDL(YKHO, wiAm):\n YKHO.logger.setLevel(wiAm)",
"def gHQk(YKHO, hOrn):\n YKHO.logger.setLevel(hOrn)",
"def aQ22(YKHO, ABDL: str) -> None:\n YKHO.logger.setLevel(YKHO._logging.log_levels[ABDL])\n YKHO.err.setLevel(YKHO._logging.log_levels[ABDL])\n for RKD7 in YKHO.user_logs:\n YKHO.us... | [
"0.7144422",
"0.71096617",
"0.7096222",
"0.70275515",
"0.70096564",
"0.6916756",
"0.67616636",
"0.6722413",
"0.6709545",
"0.66398126",
"0.658436",
"0.6579582",
"0.6480546",
"0.6475217",
"0.64576316",
"0.6422604",
"0.6419675",
"0.6408452",
"0.6393067",
"0.6346162",
"0.632881",... | 0.74358505 | 0 |
Set the log level for this client's package. | def a07n(YKHO, BWXx: t.Union[str, int]=l8Um) -> None:
nfqd.set_log_level(obj=YKHO.LOG_LOGGER, level=BWXx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gHQk(YKHO, hOrn):\n YKHO.logger.setLevel(hOrn)",
"def ABDL(YKHO, wiAm):\n YKHO.logger.setLevel(wiAm)",
"def fTst(YKHO, ABDL: str):\n YKHO._logger.setLevel(getattr(G9jH, ABDL))",
"def aQ22(YKHO, ABDL):\n if ABDL == 'info':\n ABDL = G9jH.INFO\n if ABDL == 'debug':\n ABDL = G9jH... | [
"0.7641955",
"0.75701886",
"0.7411116",
"0.73930454",
"0.733629",
"0.7331972",
"0.7296994",
"0.7260108",
"0.7142604",
"0.7117622",
"0.70883846",
"0.69590694",
"0.6944136",
"0.6909345",
"0.68982935",
"0.6891534",
"0.6848197",
"0.68271655",
"0.6815476",
"0.6814544",
"0.68140364... | 0.7958153 | 0 |
Set the log level for this client's endpoints. | def MZ1o(BWXx: t.Union[str, int]=nwuO) -> None:
from axonius_api_client.api.api_endpoint import LOGGER as bQ1z
nfqd.set_log_level(obj=bQ1z, level=BWXx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wgh3(YKHO, ABDL):\n oTZi = YKHO.logger.handlers\n for DCgT in oTZi:\n DCgT.setLevel(ABDL)",
"def gHQk(YKHO, hOrn):\n YKHO.logger.setLevel(hOrn)",
"def aQ22(YKHO, ABDL):\n if ABDL == 'info':\n ABDL = G9jH.INFO\n if ABDL == 'debug':\n ABDL = G9jH.DEBUG\n if ABDL == 'err... | [
"0.6970138",
"0.6784279",
"0.6746737",
"0.67449576",
"0.66633886",
"0.66076595",
"0.65386885",
"0.65098596",
"0.65046346",
"0.63627404",
"0.636215",
"0.6348286",
"0.63429534",
"0.6254157",
"0.62403345",
"0.6239079",
"0.6232738",
"0.6222551",
"0.6124422",
"0.61018413",
"0.6060... | 0.78522563 | 0 |
Get the number of days left until the SSL certificate expires. | def RC9k(YKHO) -> a1PO.Optional[int]:
BWXx = None
if isinstance(YKHO.HTTP, yWra):
LSCv: a1PO.Optional[A1fC.Cert] = YKHO.HTTP.get_cert()
if isinstance(LSCv, A1fC.Cert):
BWXx = bWeC.dt_days_ago(LSCv.not_valid_after, from_now=False)
return BWXx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rgaJ(ulaE):\n yxS0 = qos3(ulaE)\n return yxS0 - qcWV.datetime.utcnow().date()",
"def rgaJ(ulaE):\n yxS0 = qos3(ulaE)\n return yxS0 - qcWV.datetime.utcnow().date()",
"def rgaJ(ayrW):\n try:\n yxS0 = vWmc(ayrW)\n except i5iB.SSLError:\n return qcWV.timedelta(0)\n return yxS... | [
"0.7374371",
"0.7374371",
"0.72503936",
"0.72468376",
"0.7213501",
"0.67759794",
"0.6684371",
"0.6671422",
"0.6667981",
"0.65986747",
"0.6587299",
"0.65009737",
"0.64926064",
"0.6491342",
"0.6422436",
"0.63511086",
"0.6317951",
"0.6272271",
"0.6256316",
"0.6231645",
"0.618479... | 0.816152 | 0 |
Initialize this object with the mesh in which the points are supposed to be generated. 'axis' should be 0, 1 or 2 depending on whether you want to mirror the generated point along the x, y or z axis. | def FIMM(YKHO, uchM, jDK_):
if not isinstance(uchM, YU_E.vtkPolyData):
try:
uchM = uchM.visual_representation.vtk_poly_data
except AttributeError:
raise
if not uchM.GetPoints() or not uchM.GetPolys():
raise ValueError("input argument 'vtk_mesh' has no points and/o... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, rR8k):\n YKHO._mesh = rR8k",
"def FIMM(YKHO, rR8k: Mesh):\n YKHO.mesh = rR8k\n YKHO.f = [0] * len(rR8k.delaunay.simplices)",
"def FIMM(YKHO, jDK_=-1):\n YKHO.axis = jDK_",
"def FIMM(YKHO, rR8k, cAlv):\n super().__init__(rR8k, cAlv)\n YKHO.source = RIrr(0)",
"def UkEQ(YKHO):... | [
"0.6846195",
"0.6288602",
"0.6276825",
"0.6071847",
"0.60040265",
"0.5991342",
"0.59729433",
"0.5845726",
"0.5828688",
"0.5808024",
"0.57933277",
"0.5789157",
"0.57784635",
"0.5698888",
"0.56961036",
"0.56961036",
"0.56768084",
"0.5675836",
"0.5654066",
"0.56448627",
"0.56287... | 0.71309936 | 0 |
Returns a set of all variable attributes in a template. This returns variable attribute names, not the toplevel variable names. Attributes are included if they belong to undeclared variables in the | def Zmb8(bOcv, sEAN=None):
sEAN = sEAN or qPGQ.Environment()
rkBz = sEAN.parse(bOcv)
cCQj = VdDv()
cCQj.visit(rkBz)
hlel = set()
VHXS = e5kH.find_undeclared_variables(rkBz)
xdPZ = set()
for Q6kx in cCQj.getattr_nodes:
a5Jp = LPmS(Q6kx)
if a5Jp[0] in VHXS:
xdPZ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vars(Emd4):\n for H5ew in dir(Emd4):\n if H5ew.startswith('var_'):\n yield H5ew[4:]",
"def kc1W(YKHO):\n return {P6bq for P6bq in YKHO if P6bq.type == 'var'}",
"def dU87(SRYB):\n JOvF = {'instrument': '', 'valid_range': (-1e+35, 1e+35), 'missing_value': -9999, 'height': '', 'stan... | [
"0.6763315",
"0.6664784",
"0.6261302",
"0.6255669",
"0.6148872",
"0.6147505",
"0.6137372",
"0.60964197",
"0.6089824",
"0.6050387",
"0.6043047",
"0.60388696",
"0.60388696",
"0.60388696",
"0.60286754",
"0.6018427",
"0.5991243",
"0.59507036",
"0.5930742",
"0.59075505",
"0.590754... | 0.797745 | 0 |
Plot attention weights from wordlevel decoder to characterlevel decoder. | def j_5T(npaS, WrFl=[], nyZ8=[], gXgy=None, wytA=(10, 4)):
QrM1.clf()
QrM1.figure(figsize=wytA)
uuEx.heatmap(awmap='viridis', xticklabels=nyZ8, yticklabels=WrFl)
QrM1.ylabel(u'Output characters (→)', fontsize=12)
QrM1.ylabel(u'Output words (←)', fontsize=12)
QrM1.yticks(rotation=0)
QrM1.xtic... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BVsz(OZbn, RsoQ, LNo8):\n sCer = 5\n BIhi = sCer\n FL61 = 1\n Plq0 = 4\n v1fi = sCer * Plq0 + FL61\n PlWA = (v1fi - FL61) / Plq0 / v1fi\n JOX7 = 0.7\n E86w.set(font_scale=2.8)\n Pi6A(OZbn, LNo8, PlWA, sCer, BIhi, JOX7, Plq0, start_layer=0, end_layer=6, step_size=2)\n X8i4(LNo8, OZ... | [
"0.68640035",
"0.6540849",
"0.626942",
"0.6170195",
"0.6043992",
"0.5989947",
"0.59744924",
"0.5928654",
"0.5898577",
"0.5898577",
"0.5893898",
"0.58798087",
"0.58535415",
"0.57480985",
"0.57214576",
"0.5639947",
"0.55988914",
"0.55883217",
"0.55531013",
"0.5549879",
"0.54922... | 0.70652187 | 0 |
check whether both word number are in the same chunk | def XWgK(YKHO, wmKd, S7Lu):
if YKHO.chunk_map[wmKd] == YKHO.chunk_map[S7Lu]:
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hjqA(UrE_: str, MP_r: str) -> bool:\n TmzC = 0\n for WKvO, LVAh in zip(UrE_, MP_r):\n if WKvO != LVAh:\n TmzC += 1\n if TmzC > 1:\n return False\n return True",
"def HOu9(qoGC, VyPo):\n EFUU = {}\n for YRbF in qoGC:\n if EFUU.get(YRbF) is None... | [
"0.65811664",
"0.6526033",
"0.64589506",
"0.6452941",
"0.63516617",
"0.63353676",
"0.63211596",
"0.6244283",
"0.62417436",
"0.62391704",
"0.6230359",
"0.6150306",
"0.612734",
"0.6103871",
"0.6084791",
"0.6082693",
"0.60738516",
"0.6055954",
"0.6036147",
"0.6036147",
"0.602428... | 0.7175171 | 0 |
Gets a configuration value. | def Zmkp(H5ew: str):
BWXx = PNq_.get(H5ew)
if BWXx == None or len(str(BWXx)) == 0:
raise ValueError('Missing env: ' + H5ew)
return BWXx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZR0i(YKHO, mWFP):\n if mWFP in YKHO.config_values:\n return YKHO.config_values[mWFP]",
"def ge7L(YKHO, XLMv, H5ew):\n return GPtr.get(XLMv, H5ew)",
"def Zmkp(YKHO, H5ew):\n if H5ew not in YKHO._config:\n raise ValueError('%s not in self.config' % H5ew)\n return YKHO._config[H5ew][... | [
"0.8093911",
"0.7880288",
"0.7849273",
"0.78130317",
"0.7598823",
"0.75980926",
"0.74018896",
"0.73694825",
"0.7297921",
"0.72871184",
"0.7270116",
"0.72638726",
"0.71853787",
"0.71588224",
"0.7156604",
"0.71385837",
"0.7133483",
"0.71117854",
"0.7098566",
"0.7093364",
"0.707... | 0.0 | -1 |
The readonly state of the new transactions started on the connection. | def SKnd(YKHO) -> h8nf[bool]:
return YKHO._read_only | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l_VT(YKHO):\n return YKHO.__open_transactions[:]",
"def MtYJ():\n Olgd.transactions = HkQT() + 1",
"def gQVK(YKHO):\n return UShr.Transactions(YKHO)",
"def pos3(YKHO):\n return YKHO._database.start_transaction",
"def QTBn(YKHO):\n return YKHO.__state",
"def QTBn(YKHO):\n return YKHO... | [
"0.63947886",
"0.6389561",
"0.6275447",
"0.61791474",
"0.61553895",
"0.61553895",
"0.61499816",
"0.61302966",
"0.6117075",
"0.6101664",
"0.60908467",
"0.6090756",
"0.60814446",
"0.60690325",
"0.60690325",
"0.60690325",
"0.60458505",
"0.60458505",
"0.60458505",
"0.60458505",
"... | 0.0 | -1 |
Close the database connection. | def DDI8(YKHO) -> None:
if YKHO.closed:
return
YKHO._closed = True
YKHO.pgconn.finish() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yZlT(Emd4):\n NCls.close()",
"def YzkT(YKHO):\n if YKHO._conn is not None:\n YKHO._conn.close()\n YKHO._conn = None",
"def DDI8(YKHO):\n RdPg.debug('DB -> close')\n YKHO.conn.close()",
"def DDI8(YKHO):\n if YKHO._dbopen:\n YKHO._dbcon.close()",
"def EM8p(YKHO):\n ... | [
"0.8823254",
"0.8553475",
"0.8422749",
"0.8399332",
"0.838896",
"0.82840264",
"0.81800705",
"0.81762004",
"0.81495583",
"0.798094",
"0.798094",
"0.798094",
"0.7980928",
"0.7978066",
"0.7977289",
"0.79737633",
"0.7938943",
"0.7933802",
"0.79221076",
"0.79041046",
"0.78885204",... | 0.0 | -1 |
Interval assuming gaussian posterior. | def Olvj(YKHO, mWFP, Cwt5=VPbr, **B2fa):
nPrm = YKHO.get(mWFP, **B2fa)
return Fxgx.utils.stats.mean_interval(nPrm, Cwt5) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WC3C(YKHO) -> AzJI[oyIN.ndarray, oyIN.ndarray]:\n BQGg, bYzl = YKHO.x_range\n h3cg, Z3uP = YKHO.y_range\n yGTL = oyIN.array([0, 0])\n WTkW = oyIN.zeros((2, 2))\n YLT2 = YKHO._sample\n PIhg = YKHO.prior\n\n def saqM(WKvO: float, LVAh: float):\n return WKvO * YLT2(WKvO, LVAh) * PIhg.e... | [
"0.6723144",
"0.6338444",
"0.6203812",
"0.6128702",
"0.6118113",
"0.60984814",
"0.5971382",
"0.59434754",
"0.5933151",
"0.59130377",
"0.5886216",
"0.58651847",
"0.58315235",
"0.5779581",
"0.57700604",
"0.57651645",
"0.57390493",
"0.57134604",
"0.5705321",
"0.567228",
"0.56603... | 0.0 | -1 |
drop the schema repo | def Jizu(YKHO):
padM = YKHO.connect(YKHO.cxRepo)
Pe9W = f'drop schema if exists {YKHO.schemaRepo} cascade'
with padM:
with padM.cursor() as jyYI:
jyYI.execute(Pe9W) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lclt(YKHO):\n FYrf.Base.metadata.drop_all(YKHO.session.bind)",
"def Jizu(YKHO, uPxI):\n Pe9W = f'set role {YKHO.write_role}; ' + f'DROP SCHEMA IF EXISTS {uPxI};'\n return Pe9W",
"def ReNU():\n if Mjsa('Are you sure you want to lose all your data'):\n NCls.drop_all()\n NCls.engine.... | [
"0.7428918",
"0.7175731",
"0.71128386",
"0.7089602",
"0.7058645",
"0.69070524",
"0.6885146",
"0.6885146",
"0.6885146",
"0.6885146",
"0.6885146",
"0.6885146",
"0.6885146",
"0.6885146",
"0.6885146",
"0.6879206",
"0.6879118",
"0.686319",
"0.6829718",
"0.6754396",
"0.6749702",
... | 0.8285261 | 0 |
Plots flux from curvilinear detector. | def SNiL(nPrm, mWFP, LZpg, AaPj=1):
nUPH = nPrm.detectors[mWFP]
Mkmy = oyIN.array([zFiD[0] for zFiD in nUPH.grids['R']])
SLo1 = oyIN.roll(Mkmy, -1) ** 2 - Mkmy ** 2
SLo1[-1] = nUPH.grids['R'][-1][1] ** 2 - nUPH.grids['R'][-1][0] ** 2
SLo1 *= AaPj / 2
wEf2 = nUPH.tallies
wEf2 = wEf2 / SLo1
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MvPU():\n CyI5(esGR, [-2, 2], [-1, 1], [0, 10])",
"def kj9G(YKHO, LZpg=None, aNZO=None):\n YKHO._plot_setup(LZpg, aNZO)\n if YKHO.stokes == 'v':\n YKHO.cmap = QrM1.cm.coolwarm\n zMcq = max(YKHO.data.max(), YKHO.data.min(), key=abs)\n ii_g = oyIN.sqrt(oyIN.mean(oyIN.square(YKHO.data)))\n... | [
"0.653858",
"0.65271705",
"0.6144276",
"0.60780406",
"0.6070361",
"0.60107523",
"0.5992259",
"0.5951744",
"0.5883708",
"0.5880851",
"0.5850221",
"0.57902396",
"0.5697216",
"0.5694458",
"0.5690815",
"0.56870484",
"0.5668371",
"0.5658697",
"0.56381637",
"0.56210256",
"0.5618676... | 0.0 | -1 |
Log information with given level. | def RKD7(YKHO, tO9_, ABDL='INFO'):
if ABDL == Few0.DEBUG:
YKHO.__logger.debug(tO9_)
elif ABDL == Few0.INFO:
YKHO.__logger.info(tO9_)
elif ABDL == Few0.WARN:
YKHO.__logger.warning(tO9_)
elif ABDL == Few0.ERROR:
YKHO.__logger.error(tO9_)
elif ABDL == Few0.CRITICAL:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GH8S(ABDL, Ol8d):\n if ABDL == 1:\n G9jH.info(' ' + str(qcWV.datetime.now()) + ' ' + Ol8d)\n if ABDL == 2:\n G9jH.error(' ' + str(qcWV.datetime.now()) + ' ' + Ol8d)\n if ABDL == 3:\n G9jH.critical(' ' + str(qcWV.datetime.now()) + ' ' + Ol8d)",
"def RKD7(YKHO, ABDL, tO9_, *qIxc, ... | [
"0.78113174",
"0.7424989",
"0.7410517",
"0.7324955",
"0.73191756",
"0.7277051",
"0.72350293",
"0.70979047",
"0.70909584",
"0.70517755",
"0.7051295",
"0.70455617",
"0.7030493",
"0.70273834",
"0.69897604",
"0.6974052",
"0.6972972",
"0.69587034",
"0.6923443",
"0.69118255",
"0.69... | 0.7319363 | 4 |
Return the maximum value near a given wavelength; also the local continuum level. | def ohyb(n8OE, __d3, TgwQ):
nPrm = n8OE[0].data
WBPg = n8OE[0].header
rilv = zONx(WBPg, __d3)
zv4v = OGHJ(nPrm, rilv, TgwQ)
hfRT = nPrm[zv4v]
v9Lt = yZ53(zv4v, nPrm)
return (hfRT, v9Lt) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZKOD(YKHO):\n Q3Ge = YKHO.transmit / YKHO.transmit.max() > 1.0 / 100\n return max(YKHO.wavelength[Q3Ge])",
"def cfqi(Yqag, Iz2h):\n RFz7 = Iz2h[Iz2h['m/z'] == Yqag].index[0]\n BWXx, d6pt = (float(Iz2h.loc[RFz7 - 5, 'intensity_normalized']), RFz7 - 5)\n for epBp in range(-5, 15):\n if fl... | [
"0.6930999",
"0.67248696",
"0.62238395",
"0.6199048",
"0.6186528",
"0.61756396",
"0.6165719",
"0.6163217",
"0.61483973",
"0.614795",
"0.6140631",
"0.6123139",
"0.6122978",
"0.61148643",
"0.6104502",
"0.6082121",
"0.6071215",
"0.6032786",
"0.60127944",
"0.59880733",
"0.5980454... | 0.5520354 | 90 |
Verify api key set in constructor | def DMw_(YKHO):
if not YKHO.user.activated:
raise untr('Deactivated Account')
if not HLmO.check_api(YKHO.check_key, YKHO.user.api_key):
raise untr('Invalid Authorization') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, rJDA):\n YKHO.api_key = rJDA",
"def FIMM(YKHO, rJDA: str):\n YKHO.api_key = rJDA",
"def FIMM(YKHO, rJDA=None):\n YKHO.api_key = rJDA",
"def FIMM(YKHO, rJDA='YOUR_API_KEY'):\n YKHO.api_key = rJDA",
"def FIMM(YKHO, H5ew=None):\n YKHO._key = H5ew or Hy7s.environ['HERE_API_KEY']",... | [
"0.801202",
"0.7966922",
"0.78836507",
"0.7790473",
"0.77882993",
"0.76791227",
"0.75237316",
"0.7501553",
"0.736055",
"0.72949636",
"0.727813",
"0.7275507",
"0.7209936",
"0.7200999",
"0.7185989",
"0.71332407",
"0.7067683",
"0.7035365",
"0.70080453",
"0.69818354",
"0.6970327"... | 0.0 | -1 |
Verify api key set in constructor | def DMw_(YKHO):
if not HLmO.check_login(YKHO.request, YKHO.username):
raise untr('Invalid Authorization') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, rJDA):\n YKHO.api_key = rJDA",
"def FIMM(YKHO, rJDA: str):\n YKHO.api_key = rJDA",
"def FIMM(YKHO, rJDA=None):\n YKHO.api_key = rJDA",
"def FIMM(YKHO, rJDA='YOUR_API_KEY'):\n YKHO.api_key = rJDA",
"def FIMM(YKHO, H5ew=None):\n YKHO._key = H5ew or Hy7s.environ['HERE_API_KEY']",... | [
"0.801202",
"0.7966922",
"0.78836507",
"0.7790473",
"0.77882993",
"0.76791227",
"0.75237316",
"0.7501553",
"0.736055",
"0.72949636",
"0.727813",
"0.7275507",
"0.7209936",
"0.7200999",
"0.7185989",
"0.71332407",
"0.7067683",
"0.7035365",
"0.70080453",
"0.69818354",
"0.6970327"... | 0.0 | -1 |
Note that a user has exported their bookmarks | def g75F(t1hT, c5ow):
VLTN = lambda WKvO: RdPg.WARNING if WKvO else RdPg.INFO
zuLi = False
if c5ow and c5ow == t1hT:
zuLi = True
elif c5ow is None:
c5ow = 'None'
jGRS = VLTN(zuLi)
Ol8d = u'User {0} exported the bookmarks for {1}'.format(c5ow, t1hT)
nPrm = {'user': c5ow, 'comp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bjIX(YKHO):\n dkvI = YKHO.getActiveName()\n if dkvI is not None and dkvI not in YKHO.bookmarked:\n YKHO.bookmarked.append(dkvI)",
"def QTfh(YKHO):\n i6E8 = 0\n iumf = YKHO.getOpenFilenames()\n for Ux0P in iumf:\n bx_5 = YKHO.getOpenEditor(Ux0P)\n i6E8 = len(bx_5.getBookmar... | [
"0.64746654",
"0.62598836",
"0.6136975",
"0.6112221",
"0.60539156",
"0.59048915",
"0.5872273",
"0.5794399",
"0.5791337",
"0.57692957",
"0.57588696",
"0.57497853",
"0.5743809",
"0.5718467",
"0.5673107",
"0.56333095",
"0.5630633",
"0.56262386",
"0.55483806",
"0.5513604",
"0.550... | 0.69976723 | 0 |
Create a new activation | def FIMM(YKHO, R6l1):
YKHO.code = MroH._gen_activation_hash()
YKHO.created_by = R6l1
YKHO.valid_until = qcWV.utcnow() + SwUe | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n YKHO.activation = MroH(u'signup')\n YKHO.activated = False",
"def gwuZ(Mz5r):\n if type(Mz5r) == list:\n if len(Mz5r) == 2:\n OYqn, Mzf9 = Mz5r\n if OYqn == 'elu':\n return q9ei(alpha=Mzf9)\n elif OYqn == 'leaky':\n ... | [
"0.70946974",
"0.6788832",
"0.6641264",
"0.6427444",
"0.6369652",
"0.6351276",
"0.6270455",
"0.6264622",
"0.62599975",
"0.61813074",
"0.61672974",
"0.6165589",
"0.61645174",
"0.6123049",
"0.6055434",
"0.60029244",
"0.5998134",
"0.59851533",
"0.5965238",
"0.5908239",
"0.587433... | 0.5803372 | 26 |
Generate a random activation hash for this user account | def sgSw():
return mv1M.gen_api_key() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PXlE(YKHO):\n return Hy7s.urandom(32).encode('hex')",
"def z4A5(NtEF):\n NTfD = HBct.sha1(str(tuKI.random()).encode('utf-8')).hexdigest()[:5]\n _wLH = NTfD + NtEF\n eOtH = HBct.sha1(_wLH.encode('utf-8')).hexdigest()\n try:\n z39Z = eNLA.objects.get(token=eOtH)\n if z39Z:\n ... | [
"0.725804",
"0.71615696",
"0.6894295",
"0.68171316",
"0.6700406",
"0.65015423",
"0.6432743",
"0.6424827",
"0.63368046",
"0.6330398",
"0.6319952",
"0.63199455",
"0.631472",
"0.6310597",
"0.6281988",
"0.6277274",
"0.62694436",
"0.6256704",
"0.62348896",
"0.62034327",
"0.6167505... | 0.81525487 | 0 |
Verify that the password is acceptable Basically not empty, has more than 3 chars... | def vlV7(jTXt):
na1r.debug('PASS')
na1r.debug(jTXt)
if jTXt is not None:
na1r.debug(len(jTXt))
if jTXt is None:
return False
if len(jTXt) < 3:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s66O(jTXt):\n if len(jTXt) >= 8 and len(jTXt) <= 25 and (jTXt != 'forgot'):\n return True\n else:\n print('This is not a vaid password')\n print('Password should be between 8 and 25 letters')\n return False",
"def tg18(nPrm):\n if 'password' not in nPrm:\n return F... | [
"0.8027525",
"0.79460615",
"0.79388845",
"0.7818809",
"0.7798877",
"0.7795867",
"0.7791895",
"0.7779259",
"0.77747995",
"0.7757279",
"0.7748918",
"0.7747629",
"0.77397156",
"0.7712654",
"0.7707802",
"0.76564646",
"0.7640219",
"0.7570458",
"0.75463706",
"0.7542401",
"0.7525617... | 0.843343 | 0 |
Hash password on the fly. | def m_qJ(YKHO, jTXt):
kg40 = jTXt
if isinstance(jTXt, QMSQ):
tDWO = jTXt.encode('UTF-8')
else:
tDWO = jTXt
NTfD = B8ni.gensalt(10)
kg40 = B8ni.hashpw(tDWO, NTfD)
if not isinstance(kg40, QMSQ):
kg40 = kg40.decode('UTF-8')
YKHO._password = kg40 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qzFd(YKHO, jTXt):\n YKHO.password_hash = vT87(jTXt)",
"def qzFd(YKHO):\n YKHO.__password = YKHO.str_to_hash(YKHO.__password)",
"def qzFd(YKHO, jTXt):\n YKHO.password = jf1V.encrypt(jTXt)",
"def wnut(jTXt, NTzC='sha256'):\n return vT87(jTXt, NTzC)",
"def jTXt(YKHO, jTXt):\n YKHO.password_... | [
"0.8297696",
"0.8283136",
"0.82334286",
"0.81123114",
"0.7999423",
"0.7890198",
"0.7885831",
"0.78848606",
"0.77578676",
"0.7733201",
"0.771621",
"0.7690652",
"0.7680754",
"0.7642587",
"0.7574327",
"0.7567942",
"0.75485516",
"0.7534737",
"0.7526732",
"0.75134426",
"0.74824774... | 0.0 | -1 |
Does the user have any invitations left | def hWaj(YKHO):
return YKHO.invite_ct > 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l9JR(YKHO):\n return YKHO._invincible",
"def rbuN(YKHO, F6zM):\n rbuN = False\n gBFd = chef.objects.filter(user=YKHO, poll=t63Z(F6zM))\n if len(gBFd) >= 1:\n rbuN = True\n else:\n rbuN = False\n return rbuN",
"def oCws(YKHO):\n return mv1M.objects.exclude(pk=YKHO.request.... | [
"0.6759341",
"0.674537",
"0.66661197",
"0.66074467",
"0.66074467",
"0.6508884",
"0.64351714",
"0.6348357",
"0.6320074",
"0.6319612",
"0.6209567",
"0.62074584",
"0.6198943",
"0.61746484",
"0.61184454",
"0.6092542",
"0.6070288",
"0.6070288",
"0.5939317",
"0.5912993",
"0.5909024... | 0.81022036 | 0 |
How deep is the queue at the moment | def zNig():
VT3I = YcKu.query.filter(nZvB(YcKu.status != e03j, YcKu.status != kQI7))
return VT3I.count() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def POE6(YKHO):\n pass",
"def pFlr(T8ck):\n print('(Size of the queue:', T8ck.qsize(), ')', end=' ')\n for exwG in list(T8ck.queue):\n print(exwG, end=' ')\n print()",
"def JkOO(Zjs1):\n Zjs1.enqueue(1)\n Zjs1.enqueue(2)\n Zjs1.enqueue(3)\n assert Zjs1.size() == 3",
"def FIMM(Y... | [
"0.65826154",
"0.6264838",
"0.61748004",
"0.6143073",
"0.6083699",
"0.6080623",
"0.5984726",
"0.5984726",
"0.5978362",
"0.5909926",
"0.5905296",
"0.5904336",
"0.58685106",
"0.58513933",
"0.58513933",
"0.58513933",
"0.58513933",
"0.5846355",
"0.5837541",
"0.58237517",
"0.58233... | 0.0 | -1 |
Generates a random string from urandom. | def BWvy(u54L=None):
gLiZ = vIwR.ascii_uppercase + vIwR.digits
ZBaj = u54L if u54L is not None else Gzv6()
return QMSQ(u''.join((tuKI.choice(gLiZ) for WKvO in range(ZBaj)))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KpEQ():\n return ''.join(QMfv(rU7A(32)).decode('utf-8'))",
"def d4SM(len):\n return WR89.urlsafe_b64encode(Hy7s.urandom(len))[0:len]",
"def tEgU():\n return kxTZ().hex[:6].upper()",
"def e7Tf():\n return ''.join((tuKI.choice(vIwR.ascii_lowercase + vIwR.digits) for bGrB in range(16)))",
"def... | [
"0.81918633",
"0.77840203",
"0.75190336",
"0.7462854",
"0.7417727",
"0.7277282",
"0.72276753",
"0.72242945",
"0.70818174",
"0.70335346",
"0.7021029",
"0.7007555",
"0.69763917",
"0.6966098",
"0.6949514",
"0.6949514",
"0.6908086",
"0.6907423",
"0.6904722",
"0.68815714",
"0.6820... | 0.7024683 | 10 |
Test we can set the invite count for the user | def QUM1(YKHO):
NArs = {'api_key': YKHO.api_key}
Ylbp = YKHO.testapp.post('/api/v1/a/accounts/invites/admin/10', params=NArs, status=200)
nPrm = qQXR.loads(Ylbp.body)
YKHO.assertEqual('admin', nPrm.get('username'), 'The admin user data is returned to us.' + Ylbp.body)
YKHO.assertEqual(10, int(nPrm.g... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WBxY(YKHO):\n NArs = {'api_key': YKHO.api_key}\n Ylbp = YKHO.testapp.get('/api/v1/a/accounts/invites', params=NArs, status=200)\n nPrm = qQXR.loads(Ylbp.body)['users']\n EmMj = False\n glXD = None\n for CBIr, UHFx in nPrm:\n if CBIr == u'admin':\n EmMj = True\n gl... | [
"0.7608187",
"0.6800737",
"0.66166955",
"0.64456946",
"0.6422321",
"0.6379684",
"0.6353169",
"0.6271311",
"0.62055916",
"0.61357594",
"0.61084896",
"0.60806197",
"0.60660267",
"0.60454017",
"0.5946261",
"0.594614",
"0.5939949",
"0.5934468",
"0.59170854",
"0.59147316",
"0.5899... | 0.7659417 | 0 |
Test that we can hit the api and get the list of users. | def ovG1(YKHO):
YKHO._add_demo_import()
NArs = {'api_key': YKHO.api_key}
Ylbp = YKHO.testapp.get('/api/v1/a/users/list', params=NArs, status=200)
nPrm = qQXR.loads(Ylbp.body)
YKHO.assertEqual(1, nPrm.get('count'), 'There are none by default. ' + Ylbp.body)
YKHO.assertEqual('admin', nPrm.get('use... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BQjK(YKHO):\n geh0 = YKHO.client().get('/api/v1/user/')\n YKHO.assertTrue(geh0.status_code, 200)",
"def H9lx(YKHO):\n pB3N = YKHO.get_req('api/v1/users')\n YKHO.assertEqual(pB3N.status_code, 200)\n YKHO.assertEqual(pB3N.json['users'], [])",
"def gShK(YKHO):\n bD7m = gxEw('users')\n geh... | [
"0.8837316",
"0.85251606",
"0.8383559",
"0.8309518",
"0.8259985",
"0.8137213",
"0.80719006",
"0.8071022",
"0.8056002",
"0.8051482",
"0.80380976",
"0.80380976",
"0.7987055",
"0.79525125",
"0.79251534",
"0.7895928",
"0.7895363",
"0.7892854",
"0.7882907",
"0.78788203",
"0.781537... | 0.83882266 | 2 |
Test getting a user's bookmark count when start_date is the first day of the month | def t8Z_(YKHO):
Bmfb = YKHO._setup_user_bookmark_count()
Ylbp = YKHO.testapp.get(u'/api/v1/admin/stats/bmarkcount', params={u'api_key': WXSU, u'start_date': u'2013-11-1'}, status=200)
nPrm = qQXR.loads(Ylbp.body)
UHFx = nPrm['count']
YKHO.assertEqual(UHFx[0]['attrib'], Bmfb[1][0])
YKHO.assertEqu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R6CC(YKHO):\n Bmfb = YKHO._setup_user_bookmark_count()\n Ylbp = YKHO.testapp.get(u'/api/v1/admin/stats/bmarkcount', params={u'api_key': WXSU, u'end_date': u'2013-12-29'}, status=200)\n nPrm = qQXR.loads(Ylbp.body)\n UHFx = nPrm['count'][0]\n YKHO.assertEqual(UHFx['attrib'], Bmfb[2][0])\n YKHO... | [
"0.723588",
"0.7182594",
"0.70669115",
"0.6876183",
"0.6786869",
"0.65058416",
"0.6411001",
"0.5640781",
"0.56260633",
"0.5471509",
"0.5462111",
"0.5435627",
"0.5410272",
"0.5376589",
"0.5290892",
"0.5249518",
"0.5218119",
"0.5192954",
"0.5142267",
"0.509371",
"0.5083504",
... | 0.79181725 | 0 |
If no API_KEY is present, it is unauthorized request | def iUTT(YKHO):
YKHO.testapp.get(u'/api/v1/admin/stats/bmarkcount', status=403) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V7R4(R_du: str=LvNm(iK6s)):\n if R_du != WXSU:\n raise pgG1(status_code=jGRS.HTTP_401_UNAUTHORIZED, detail='Invalid API Key')",
"def NeLG(YKHO):\n with YKHO.subTest('Missing API key'):\n geh0 = YKHO.client.get(YKHO.url, HTTP_AUTHORIZATION=f'ApiKey {YKHO.web_user.username}:')\n YKHO... | [
"0.7512446",
"0.71513677",
"0.7066473",
"0.6719931",
"0.6651098",
"0.6565355",
"0.6536003",
"0.64923275",
"0.64923275",
"0.6470506",
"0.64362836",
"0.64094704",
"0.6408586",
"0.6373597",
"0.6349021",
"0.63389117",
"0.6329039",
"0.63175744",
"0.6306474",
"0.6300578",
"0.629499... | 0.0 | -1 |
Test getting a user's account information | def C7An(YKHO):
Ylbp = YKHO.testapp.get(u'/api/v1/admin/account?api_key=' + WXSU, status=200)
CBIr = qQXR.loads(Ylbp.body)
YKHO.assertEqual(CBIr['username'], 'admin', 'Should have a username of admin {0}'.format(CBIr))
YKHO.assertTrue('password' not in CBIr, 'Should not have a field password {0}'.format... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Q3CH(YKHO):\n YKHO.client.credentials(HTTP_AUTHORIZATION='Token ' + YKHO.get_token())\n geh0 = YKHO.client.get(gxEw('account:user-profile'))\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_200_OK)\n YKHO.assertEqual(geh0.data.get('user').get('email'), 'testuser@gmail.com')",
"def HWJA(YKHO):\n ... | [
"0.7898494",
"0.7712678",
"0.76938325",
"0.7657421",
"0.7627328",
"0.7570366",
"0.7561234",
"0.75491786",
"0.75209016",
"0.7462751",
"0.7377925",
"0.73224294",
"0.7298772",
"0.72874874",
"0.72624475",
"0.72172105",
"0.71948797",
"0.71050453",
"0.7077029",
"0.7077019",
"0.7045... | 0.798841 | 0 |
Reset User's api key | def vszZ(YKHO):
b5K5 = i_PC.make_user(username='test_user')
paBY = b5K5.api_key = 'random_key'
b5K5.activation = MroH(u'signup')
Kh6j.commit()
Ylbp = YKHO.testapp.post('/api/v1/test_user/api_key?api_key=' + paBY, content_type='application/json', params={u'username': 'test_user', u'api_key': paBY}, s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hqyg(QePW):\n CBIr = QePW.user\n CBIr.api_key = mv1M.gen_api_key()\n return JbNc(QePW, {'api_key': CBIr.api_key, 'message': 'Api Key was successfully changed'})",
"def hqyg(mWFP):\n CBIr = mv1M.query.filter_by(name=mWFP).first()\n if not CBIr:\n return eTsH(404)\n if c5ow.name != CBI... | [
"0.87136835",
"0.8589262",
"0.80824155",
"0.73575616",
"0.73120266",
"0.7153743",
"0.6882455",
"0.67387056",
"0.6668595",
"0.65747714",
"0.65396184",
"0.6533261",
"0.6533261",
"0.6484351",
"0.64802265",
"0.63981545",
"0.63794404",
"0.62901545",
"0.62392884",
"0.6194224",
"0.6... | 0.7661354 | 3 |
clear out all the testing DB data | def tBIc(YKHO):
GwjS() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tBIc(YKHO):\n kO5c.tearDown()\n GwjS()",
"def tBIc(YKHO):\n kO5c.tearDown()\n GwjS()",
"def tBIc(YKHO):\n kO5c.tearDown()\n GwjS()",
"def tBIc(YKHO):\n kO5c.tearDown()\n GwjS()",
"def tBIc(YKHO):\n kO5c.tearDown()\n GwjS()",
"def tBIc(YKHO):\n kO5c.tearDown()\n Gwj... | [
"0.8544528",
"0.8544528",
"0.8544528",
"0.8544528",
"0.8544528",
"0.8544528",
"0.8544528",
"0.8544528",
"0.8544528",
"0.8475647",
"0.82678235",
"0.82678235",
"0.8251746",
"0.81190884",
"0.8023434",
"0.8008456",
"0.79353",
"0.79253083",
"0.7918123",
"0.7884794",
"0.7869651",
... | 0.86394465 | 0 |
Properly error on an unparseable url. | def lKbJ(YKHO):
bD7m = u'http://whttp://lucumr.pocoo.org/2012/8/5/stateless-and-proud/'
Ueki = nrId.ReadUrl.parse(bD7m)
YKHO.assertEqual(Ueki.status, 901) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UyoO(YKHO):\n YKHO._error(400, 'Bad Request')",
"def Vt0R(bD7m):\n if KVWQ.urlparse(bD7m).scheme not in tQ3H:\n EycH(bD7m, 'Invalid URL')",
"def Fcoj():\n try:\n from urllib.error import URLError\n except ImportError:\n from urllib2 import URLError\n return URLError",
... | [
"0.7351578",
"0.72573334",
"0.72208107",
"0.715448",
"0.71484196",
"0.7100525",
"0.70864093",
"0.706175",
"0.7036573",
"0.7009583",
"0.6972679",
"0.696795",
"0.6924453",
"0.6884707",
"0.6844923",
"0.68434894",
"0.6824983",
"0.6655338",
"0.66199607",
"0.66186446",
"0.65193313"... | 0.761295 | 0 |
Set the number of invites a user has available. | def rvLw(QePW):
f8k7 = QePW.matchdict
NtEF = f8k7.get('username', None)
if NtEF:
NtEF = NtEF.lower()
UHFx = f8k7.get('count', None)
if NtEF is not None and UHFx is not None:
CBIr = JWrR.get(username=NtEF)
if CBIr:
CBIr.invite_ct = UHFx
return JbNc(QePW... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def D9OE(YKHO, D9OE):\n YKHO._user_count = D9OE",
"def D9OE(YKHO, D9OE):\n YKHO._user_count = D9OE",
"def Xcyt(YKHO):\n YKHO.number_of_sentences = int(YKHO.num_sentences.get())",
"def QUM1(YKHO):\n NArs = {'api_key': YKHO.api_key}\n Ylbp = YKHO.testapp.post('/api/v1/a/accounts/invites/admin/10... | [
"0.6230518",
"0.6230518",
"0.6028947",
"0.6017563",
"0.59394825",
"0.59065425",
"0.58722883",
"0.58458465",
"0.5643595",
"0.56175905",
"0.55492735",
"0.5543944",
"0.5542238",
"0.54863745",
"0.54644036",
"0.5451856",
"0.5412409",
"0.54078764",
"0.53840846",
"0.5378958",
"0.537... | 0.6109802 | 2 |
Display a custom 404 page when the HTTPNotFound fired | def w9Bq(BQDi, QePW):
QePW.response_status = '404 Not Found'
return {'message': str(BQDi)} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m7kB(tTpl):\n return (TvZl('404.html'), 404)",
"def m7kB(tTpl):\n return (TvZl('404.html'), 404)",
"def m7kB(tTpl):\n return (TvZl('404.html'), 404)",
"def m7kB(tTpl):\n return (TvZl('404.html'), 404)",
"def o3cf(tTpl):\n return (TvZl('errors/404.html'), 404)",
"def m7kB(tTpl):\n re... | [
"0.84662336",
"0.84641427",
"0.84641427",
"0.84147197",
"0.84031504",
"0.8401291",
"0.8361121",
"0.83290833",
"0.8326735",
"0.83161306",
"0.83080614",
"0.8293001",
"0.8271358",
"0.8220069",
"0.8184209",
"0.817906",
"0.817906",
"0.817906",
"0.817906",
"0.817906",
"0.817906",
... | 0.8105298 | 34 |
return true if the character is a letter, digit, underscore, dollar sign, or nonASCII character. | def NDJd(Z9rn):
return Z9rn >= 'a' and Z9rn <= 'z' or (Z9rn >= '0' and Z9rn <= '9') or (Z9rn >= 'A' and Z9rn <= 'Z') or (Z9rn == '_') or (Z9rn == '$') or (Z9rn == '\\') or (Z9rn is not None and ord(Z9rn) > 126) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cGC2(YKHO, hcXw: str) -> bool:\n if hcXw.isdigit():\n raise ValueError(\"Characters can't be numbers\")\n return hcXw.isalpha() or hcXw.isspace()",
"def SQf0(Npgh):\n return Npgh.isalnum() or Npgh in '#.>+*:$-_!@'",
"def OvwE(zZcM):\n return zZcM.isalnum()",
"def x32m(vIwR):\n for Z... | [
"0.78336596",
"0.7726883",
"0.75429755",
"0.72106546",
"0.7169826",
"0.7107826",
"0.70925313",
"0.7032445",
"0.699354",
"0.69532526",
"0.69446826",
"0.6934456",
"0.68897206",
"0.6866034",
"0.6865833",
"0.68560296",
"0.6853215",
"0.68439865",
"0.6806619",
"0.67916507",
"0.6784... | 0.79479194 | 0 |
Init method based on N(0, sigma). | def dqtM(WTkW):
def JdrY(vhpA):
return ht2j.nn.init.normal_(vhpA, mean=0.0, std=WTkW)
return JdrY | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, WTkW=0.0001):\n YKHO.sigma = WTkW",
"def FIMM(YKHO, WTkW):\n YKHO.sigma = float(WTkW)\n super().__init__(domain=MWA5.domain, range=MWA5.domain, linear=False)\n YKHO.const = 1 / (MWA5.epsilon * WTkW)",
"def FIMM(YKHO, WTkW, pSDG=0.1):\n super().__init__(multiplier=pSDG)\n YKHO.s... | [
"0.7587747",
"0.7377149",
"0.7034432",
"0.69798046",
"0.69374764",
"0.6787513",
"0.6787513",
"0.66484886",
"0.6601178",
"0.6529468",
"0.6524285",
"0.65146327",
"0.6509698",
"0.64890236",
"0.64574766",
"0.6441963",
"0.64405966",
"0.6425482",
"0.64194316",
"0.6378599",
"0.63413... | 0.6749473 | 8 |
Simple linear layer with weight initialization. | def XyHp(usx6, ZLJ_, FJYT):
gEmA = ht2j.nn.Linear(usx6, ZLJ_)
FJYT(gEmA.weight)
with ht2j.no_grad():
gEmA.bias.zero_()
return gEmA | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NQCf(YKHO, XcU5, Fg_i, WKvO, sz2T=True):\n if sz2T is True:\n return oyIN.maximum(XcU5 @ WKvO + Fg_i, 0)\n return XcU5 @ WKvO + Fg_i",
"def yYlq(gEmA):\n if gEmA.weight.ndimension() == 4:\n _LFN, Ya2q, H2v2, TVTK = gEmA.weight.size()\n exwG = Ya2q * H2v2 * TVTK\n elif gEmA.we... | [
"0.6994702",
"0.68868995",
"0.682761",
"0.6820912",
"0.67597985",
"0.6742202",
"0.6725242",
"0.67205775",
"0.6697782",
"0.6661064",
"0.66333073",
"0.66202044",
"0.65676683",
"0.6556666",
"0.64622575",
"0.6460984",
"0.64281887",
"0.6420554",
"0.6380955",
"0.6380955",
"0.637893... | 0.67957014 | 4 |
Divide params into withweightdecay and withoutweightdecay groups. Layernorms and biases will have no weight decay but the rest will. | def qyXl(C3ST: Union[torch.nn.Module, List[torch.nn.Module]]) -> cuzp[str, ht2j.nn.Parameter]:
KZ52 = Kiut(C3ST)
E5E8 = {'params': []}
esyO = {'params': [], 'weight_decay': 0.0}
for yR_P in KZ52:
for ByV2 in yR_P.modules():
if isinstance(ByV2, (dZD0, kXjW, VdVZ)):
esy... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VUo_(Zxma):\n WMj5 = [XP5J for mWFP, XP5J in Zxma.named_parameters() if 'bias' not in mWFP and 'bn' not in mWFP]\n x4zZ = [XP5J for mWFP, XP5J in Zxma.named_parameters() if 'bias' in mWFP or 'bn' in mWFP]\n assert len(list(Zxma.parameters())) == len(WMj5) + len(x4zZ)\n return [dict(params=WMj5), di... | [
"0.75072235",
"0.7119427",
"0.7034717",
"0.6654485",
"0.6641055",
"0.6374985",
"0.6313265",
"0.6222679",
"0.61934745",
"0.6116462",
"0.61039656",
"0.6014104",
"0.597081",
"0.5962828",
"0.5953511",
"0.59434265",
"0.59434265",
"0.59434265",
"0.59434265",
"0.59434265",
"0.594057... | 0.623395 | 7 |
Use all params for weight decay. | def GyHK(C3ST: Union[torch.nn.Module, List[torch.nn.Module]]) -> AzJI[cuzp[str, x1iM[ht2j.nn.Parameter]]]:
KZ52 = Kiut(C3ST)
E5E8 = [XP5J for yR_P in KZ52 for ByV2 in yR_P.modules() for XP5J in ByV2._parameters.values() if XP5J is not None]
return ({'params': E5E8},) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VUr6(YKHO):\n for Lwm5 in YKHO.optimizer.param_groups:\n for xqoZ in Lwm5['params']:\n xqoZ.data = xqoZ.data.add(-1.0 * YKHO.weights_decay * Lwm5['lr'], xqoZ.data)",
"def pOke(YKHO, WMj5):\n for YRbF in range(15):\n YKHO.model_parts[YRbF].weights = WMj5 ** ht2j.abs(ht2j.arange(... | [
"0.74099517",
"0.710918",
"0.705239",
"0.69835836",
"0.696269",
"0.6937486",
"0.685764",
"0.68451077",
"0.68308866",
"0.6686286",
"0.6681478",
"0.66543263",
"0.6596148",
"0.6581204",
"0.6578639",
"0.6568041",
"0.65622747",
"0.6556179",
"0.65558773",
"0.65547764",
"0.65547764"... | 0.0 | -1 |
The home page. This displays the singlepage app. | def d6pt(QePW, pmON=''):
return _1tc(QePW, 'index.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kZiy():\n return TvZl('index.html', title='Home Page', year=qcWV.now().year)",
"def kZiy():\n return TvZl('index.html', title='Home Page', year=qcWV.now().year)",
"def kZiy():\n return TvZl('home_page.html')",
"def kZiy():\n return TvZl('home.html', title='Home Page', year=qcWV.now().year)",
... | [
"0.81450343",
"0.80490905",
"0.8034304",
"0.8031531",
"0.7991134",
"0.7956037",
"0.7956037",
"0.7956037",
"0.7956037",
"0.7956037",
"0.7956037",
"0.7956037",
"0.7956037",
"0.7956037",
"0.7956037",
"0.7934431",
"0.7931615",
"0.7919883",
"0.7896321",
"0.7865689",
"0.78573596",
... | 0.0 | -1 |