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 |
|---|---|---|---|---|---|---|
Transpose single array to ensure leading sample dimension. | def v8uF(ezWE, hN3Y=0):
if faIL(ezWE) and iUPF(hN3Y):
Htse = list(ezWE.dims)
IRQh = [ezWE.get_axis_num(Csk6) for Csk6 in Htse]
hN3Y = Htse[IRQh.index(hN3Y)]
if faIL(ezWE):
if ezWE.get_axis_num(hN3Y) != 0:
sjdr = gbyY(ezWE, hN3Y)
ezWE = ezWE.transpose(*[hN3... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l7uB(k0lF):\n qC1Y = len(k0lF.shape)\n return k0lF.transpose(qC1Y - 1, qC1Y - 2)",
"def NrfS(YKHO):\n with QpfX.eager_mode():\n input = oyIN.random.rand(5, 10, 4).astype(oyIN.float32)\n Aofo = fhcK.Transpose((1, 2, 0))(input)\n assert Aofo.shape == (10, 4, 5)",
"def Ihjn(Sk_F:... | [
"0.7083898",
"0.700769",
"0.685921",
"0.67889595",
"0.6734754",
"0.6730871",
"0.6718598",
"0.66836435",
"0.6670132",
"0.66447157",
"0.6636366",
"0.6620417",
"0.6611311",
"0.6611311",
"0.65356773",
"0.65243274",
"0.65243274",
"0.64984167",
"0.64759254",
"0.6456601",
"0.6442791... | 0.6404676 | 24 |
Apply weights to the corresponding input array. Given a list of arrays and an equal length list of weights, apply the weights to the corresponding array elementwise. Each given array is assumed to have shape (N, ...) where N is the number of samples. The corresponding element in the list of weights must either be None,... | def h6Bf(Sk_F, _mSQ=None, hN3Y=0):
Sk_F = zIhm(Sk_F, sample_dim=hN3Y)
if _mSQ is None:
return Sk_F
c0QA = len(Sk_F)
if not isinstance(_mSQ, tuple) and (not isinstance(_mSQ, list)):
AZz1 = []
for YRbF in range(c0QA):
AZz1.append(_mSQ)
else:
if len(Sk_F) != ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def h6Bf(Sk_F, _mSQ=None):\n if _mSQ is None:\n return Sk_F\n if _mSQ is not None:\n if not isinstance(_mSQ, tuple) and (not isinstance(_mSQ, list)):\n _mSQ = list(_mSQ)\n if len(Sk_F) != len(_mSQ):\n raise ValueError('number of weight arrays does not match number of input ... | [
"0.8570153",
"0.66406476",
"0.6611914",
"0.6402685",
"0.62877136",
"0.6218714",
"0.61907023",
"0.6185967",
"0.61285746",
"0.6081759",
"0.5997301",
"0.59624434",
"0.59032696",
"0.5900761",
"0.58891034",
"0.588885",
"0.5877954",
"0.58731097",
"0.58731097",
"0.5835143",
"0.58208... | 0.86178327 | 0 |
Check if machine can transit to given state. | def ocrG(YKHO, QTBn):
bBb2 = YKHO._meta['translator']
QTBn = bBb2.translate(QTBn)
if YKHO._meta['complete']:
return True
if YKHO.actual_state is None:
return True
UlCL = YKHO._meta['transitions'][YKHO.actual_state]
return QTBn in UlCL | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R767(YKHO, QTBn):\n return QTBn in YKHO.states.keys()",
"def tgbc(U34r, dnzY):\n QTBn = ja6o(*IRrZ(U34r))\n if 'all' in dnzY or ('lead' in dnzY and QTBn[:-1] == 'lead') or ('trail' in dnzY and QTBn[:-1] == 'trail') or (QTBn in dnzY):\n return True\n return False",
"def q2CD(QTBn):\n x... | [
"0.6700341",
"0.6567313",
"0.6501169",
"0.6474059",
"0.64719003",
"0.64445794",
"0.6423343",
"0.6411971",
"0.6411971",
"0.63955146",
"0.6337217",
"0.6307362",
"0.6272284",
"0.6264827",
"0.6247573",
"0.62434775",
"0.6234345",
"0.6190627",
"0.6176025",
"0.6166281",
"0.61508626"... | 0.7340199 | 0 |
Actual state as `None` or `enum` instance. | def lyVz(YKHO):
hkS8 = YKHO._meta['state_attribute_name']
return getattr(YKHO, hkS8) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qYgG(YKHO):\n return YKHO.actual_state",
"def QTBn(YKHO) -> uLKX[None, str, int, float]:\n return YKHO._state",
"def k8jS(YKHO):\n return None",
"def QTBn(YKHO):\n return lP_9",
"def j675(YKHO):\n pass",
"def k8jS(YKHO):\n return None",
"def ja6o(YKHO):\n raise NotImplementedEr... | [
"0.78005254",
"0.7523902",
"0.7218664",
"0.7216049",
"0.7200653",
"0.7152084",
"0.7149881",
"0.71422404",
"0.71422404",
"0.71263593",
"0.7116295",
"0.7116295",
"0.7058767",
"0.69728947",
"0.6927389",
"0.6901303",
"0.6901303",
"0.6901303",
"0.6901303",
"0.6901303",
"0.6901303"... | 0.69061804 | 15 |
>>> len(password_generator()) 8 >>> len(password_generator(length=16)) 16 >>> len(password_generator(257)) 257 >>> len(password_generator(length=0)) 0 >>> len(password_generator(1)) 0 | def NlX3(u54L=8):
gLiZ = tuple(C1SZ) + tuple(BHGE) + tuple(pC3l)
return ''.join((Acvy(gLiZ) for WKvO in range(u54L))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def G_Zg(zNig, gLiZ):\n JfyU = CBIr.password_generator\n Aofo = JfyU(zNig, gLiZ)\n assert len(Aofo) == zNig\n assert len([Z9rn for Z9rn in Aofo if Z9rn not in gLiZ]) == 0",
"def QgR3(YKHO):\n for u54L in YKHO.lengths:\n jTXt = gnPz.generate_password(u54L)\n YKHO.assertEqual(u54L, len... | [
"0.7908768",
"0.77193105",
"0.7552841",
"0.7547642",
"0.7359177",
"0.73226136",
"0.715192",
"0.7143923",
"0.7112238",
"0.71091926",
"0.7108149",
"0.71063304",
"0.70898247",
"0.7075375",
"0.707185",
"0.7056704",
"0.70451707",
"0.7035291",
"0.6988192",
"0.6981952",
"0.69799286"... | 0.74629164 | 4 |
Flattens a given tensor such that the channel axis is first. | def PWgb(vhpA):
Nq1b = vhpA.size(1)
iQfg = (1, 0) + tuple(range(2, vhpA.dim()))
NPTA = vhpA.permute(iQfg)
return NPTA.contiguous().view(Nq1b, -1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PWgb(vhpA):\n Nq1b = vhpA.size(1)\n iQfg = (1, 0) + tuple(range(2, vhpA.dim()))\n NPTA = vhpA.permute(iQfg).contiguous()\n return NPTA.view(Nq1b, -1)",
"def PWgb(vhpA):\n Nq1b = vhpA.size(1)\n iQfg = (1, 0) + tuple(range(2, vhpA.dim()))\n NPTA = vhpA.permute(iQfg)\n return NPTA.view(N... | [
"0.800342",
"0.7951398",
"0.79186565",
"0.7851139",
"0.72213006",
"0.70216674",
"0.6901291",
"0.6888508",
"0.6726624",
"0.668052",
"0.6603849",
"0.65364784",
"0.65091664",
"0.64601946",
"0.6433061",
"0.6379103",
"0.6367184",
"0.63568914",
"0.63547397",
"0.6339587",
"0.6183746... | 0.8003141 | 1 |
Return a human readable representation of the model instance. | def zAg0(YKHO):
return '{}'.format(YKHO.jobid) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return YKHO.human_format()",
"def zAg0(YKHO):\n return YKHO.get_short_representation()",
"def wHJl(YKHO: BaseModel) -> str:\n sgKs = [f'{H5ew}={repr(BWXx)}' for H5ew, BWXx in YKHO.to_d... | [
"0.7913435",
"0.7867543",
"0.7781073",
"0.7656772",
"0.7606172",
"0.7597312",
"0.7564931",
"0.7550362",
"0.75101286",
"0.7454313",
"0.74322736",
"0.7422165",
"0.73582166",
"0.73346543",
"0.73246557",
"0.73246557",
"0.73246557",
"0.73246557",
"0.73246557",
"0.73246557",
"0.732... | 0.0 | -1 |
Gets the news headlines. | def UEmZ(DQjg: dict, Rci7: dict) -> list:
global old_headlines
m0BT = []
QLOq = DQjg['news']
vxW9 = Rci7['country']
Jaha = 'https://newsapi.org/v2/top-headlines?country={}&apiKey={}'.format(vxW9, QLOq)
n8Xk = NMoC(Jaha)
l_7H = n8Xk.json()
for YRbF in range(10):
fdRN = '#' + str(Y... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UEmZ():\n m0BT = []\n with open('config.json', 'r') as nUeQ:\n l_7H = qQXR.load(nUeQ)\n rJDA = l_7H['news']['api_key']\n vxW9 = l_7H['news']['country']\n rQow = l_7H['news']['language']\n ow5R = Yz9Q(api_key=rJDA)\n U10q = ow5R.get_top_headlines(language=rQow, country=vx... | [
"0.8274511",
"0.8175237",
"0.77387595",
"0.7598405",
"0.75494206",
"0.73607105",
"0.7190904",
"0.7138093",
"0.71241075",
"0.70324606",
"0.69187844",
"0.6838663",
"0.68298626",
"0.6825021",
"0.66973066",
"0.66777873",
"0.6662911",
"0.66508013",
"0.6593941",
"0.6568069",
"0.655... | 0.7649468 | 3 |
Returns a bitstring with the given value of length length at position position | def InZl(BB68, dQgj, u54L, BWXx):
OtqY = list(range(u54L))
Fv2L = ''
OtqY.reverse()
for naF9 in OtqY:
if BWXx >= 2 ** naF9:
Fv2L = Fv2L + '1'
BWXx -= 2 ** naF9
else:
Fv2L = Fv2L + '0'
return BB68[:dQgj] + Fv2L + BB68[dQgj + u54L:] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R1w2(NPoT, tXSG):\n return GLv6(len(NPoT.value), tXSG)",
"def H4FK(XxJb: int):\n L96l = ''\n for YRbF in range(XxJb):\n L96l += '1'\n return int(L96l, 2)",
"def IoxP(u54L, vgXP):\n if u54L < 56:\n return chr(vgXP + u54L)\n elif u54L < 256 ** 8:\n tQeS = WXhK.serialize... | [
"0.7047703",
"0.682594",
"0.66977316",
"0.6556926",
"0.65088195",
"0.64924467",
"0.64023024",
"0.63505924",
"0.62835544",
"0.6212869",
"0.61988705",
"0.6193678",
"0.61878604",
"0.61507463",
"0.6150148",
"0.60800475",
"0.6071238",
"0.60658205",
"0.6065234",
"0.6041541",
"0.601... | 0.6373545 | 7 |
Get and return project information in a dictionary. | def AWLl(B5PH: str):
jQ3Z = rLdf.read_csv(Hy7s.path.join(KnVF, 'projects.csv'))
KXkx = jQ3Z.loc[jQ3Z.project == B5PH].reset_index()
UXqs = KXkx.label[0]
UXqs = [] if str(UXqs) == 'nan' else UXqs.split(':sep:')
try:
jQ3Z = rLdf.read_csv(Hy7s.path.join(KnVF, B5PH, 'data.csv'))
Eb4t = s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W7qM(bNKA):\n if bNKA:\n return {'projectname': bNKA.id, 'project_manager_id': bNKA.project_manager_id, 'description': bNKA.description}\n else:\n return {}",
"def Uq7A(YKHO, QpfX, mWFP, **B2fa):\n return W7qM(p_z1.AuthManager().get_project(mWFP))",
"def HF_F(YKHO):\n return YKHO.... | [
"0.8010457",
"0.7883646",
"0.77588063",
"0.7737977",
"0.77173173",
"0.7674266",
"0.7656446",
"0.7562755",
"0.752884",
"0.7471078",
"0.743885",
"0.743393",
"0.74288714",
"0.73495805",
"0.72752327",
"0.726954",
"0.72626096",
"0.7201271",
"0.71814185",
"0.7177304",
"0.71584785",... | 0.69031435 | 38 |
A decorator that memoizes function calls in a JSON file. | def hNTr(Ux0P):
class JsonMemoize:
def FIMM(YKHO, FYKK):
YKHO.fn = FYKK
y3pq(YKHO, FYKK)
if not Hy7s.path.exists(Ux0P):
with open(Ux0P, 'w') as eHNT:
qQXR.dump({}, eHNT)
def nrOS(YKHO, *qIxc, **B2fa):
with open(Ux... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wyyA():\n\n def mrMx(JfyU):\n\n def h3Xc(*qIxc, **B2fa):\n Ux0P = JfyU.__name__\n if not Hy7s.path.isdir('.cache'):\n Hy7s.mkdir('.cache')\n x0hE: EtCn = qIxc[0]\n vFoO = str(u2_Y) + str(x0hE.start) + str(x0hE.end) + str(x0hE.config) + str(qI... | [
"0.70602614",
"0.7055957",
"0.7014357",
"0.6969965",
"0.675972",
"0.6745812",
"0.6740756",
"0.6698408",
"0.66938233",
"0.66831744",
"0.6677772",
"0.6636385",
"0.6636385",
"0.6636385",
"0.6636385",
"0.6594024",
"0.6579146",
"0.6576912",
"0.65741193",
"0.6572105",
"0.65692544",... | 0.83966124 | 0 |
draw a hero to screen | def ngOO(YKHO, _epf: Hero, tlxW: bool):
LNo8 = a9eO.transform.scale(_epf.image, (int(y8cn.HERO_WIDTH * y8cn.HERO_SCALE), int(y8cn.HERO_HEIGHT * y8cn.HERO_SCALE)))
ZnpV = YKHO.main_font.render(str(_epf.health), True, y8cn.MAIN_FONT_WHITE)
if tlxW:
if YKHO.game.current_player == 1:
YKHO.wi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JmFt(YKHO):\n YKHO.drawBoard()\n YKHO.drawHero(YKHO.hero_top, True)\n YKHO.drawHero(YKHO.hero_bottom, False)\n YKHO.drawDeck(YKHO.hero_top.deck, y8cn.TOP)\n YKHO.drawDeck(YKHO.hero_bottom.deck, y8cn.BOTTOM)\n YKHO.drawHeroBoard(YKHO.hero_top, y8cn.TOP)\n YKHO.drawHeroBoard(YKHO.hero_bottom... | [
"0.76598954",
"0.7401466",
"0.69837123",
"0.69648314",
"0.6912725",
"0.6905128",
"0.6902745",
"0.6902745",
"0.68870646",
"0.68564916",
"0.68440205",
"0.6838843",
"0.6816847",
"0.6800123",
"0.6766518",
"0.67490816",
"0.6746726",
"0.6728793",
"0.67265815",
"0.67261225",
"0.6715... | 0.78262967 | 0 |
draw mana of a hero to screen | def afX5(YKHO, _epf: Hero, dQgj):
MneC = YKHO.main_font.render(str(_epf.mana) + '/' + str(_epf.max_mana), True, y8cn.MAIN_FONT_WHITE)
if dQgj == y8cn.TOP:
YKHO.window.blit(MneC, y8cn.MANA_TOP_POSITION)
else:
YKHO.window.blit(MneC, y8cn.MANA_BOTTOM_POSITION) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def h3iE(yHb5, fYdp, sSN_, u54L, TVTK):\n for YRbF in range(sSN_):\n a9eO.display.update()\n YimI(dZPi, Elif)\n jvSB = fYdp - YRbF\n kY4R(yHb5, jvSB, u54L, TVTK)\n ITS7.sleep(0.02)",
"def MneC(YKHO):\n P5rx = 2\n G9jH.info('Checking mana.')\n while not zG6o.locateOn... | [
"0.6589063",
"0.6489996",
"0.62293106",
"0.6201069",
"0.6164578",
"0.6141062",
"0.6124263",
"0.6065537",
"0.6028488",
"0.5988837",
"0.59786916",
"0.59675497",
"0.59074",
"0.58948815",
"0.586977",
"0.58352435",
"0.5829616",
"0.5826233",
"0.5821499",
"0.57516545",
"0.57474726",... | 0.82639176 | 0 |
Redefine the gensim's TextCorpus init method | def FIMM(YKHO, qZLi=None):
super().__init__()
YKHO.input = qZLi
YKHO.dictionary = tTte(prune_at=5000000)
YKHO.metadata = False
if qZLi is not None:
YKHO.dictionary.add_documents(YKHO.get_texts(), prune_at=5000000)
else:
YKHO.logger.warning('No input document stream provided; assu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, rrSk):\n YKHO.corpus = rrSk",
"def FIMM(YKHO, rrSk=None, GPtr=None, **B2fa):\n super().__init__(config=GPtr)",
"def FIMM(YKHO, rrSk):\n YKHO.train(rrSk)",
"def FIMM(YKHO, l5Ny):\n YKHO.documentgraph = oRi_(set)\n YKHO.fulltext = l5Ny",
"def FIMM(YKHO, rrSk):\n raise NotImpl... | [
"0.7420805",
"0.7189783",
"0.6960851",
"0.6886583",
"0.685719",
"0.68518466",
"0.68437827",
"0.68093127",
"0.67476195",
"0.6726522",
"0.67148495",
"0.67024773",
"0.66168875",
"0.66016245",
"0.6578511",
"0.6547694",
"0.6539697",
"0.6534038",
"0.6524825",
"0.6516594",
"0.651321... | 0.0 | -1 |
Returns an iterator of YAML files in a given path. | def g7_3(lQDD):
for pmON, AQSv, RRlC in Hy7s.walk(lQDD):
yield from [Hy7s.path.join(pmON, eHNT) for eHNT in RRlC if eHNT.endswith('.yaml')] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VFIJ(pmON):\n KCHu = Hy7s.stat(pmON)\n if QmN4.S_ISREG(KCHu.st_mode):\n with open(pmON) as eHNT:\n return K0Yr(eHNT)\n if not QmN4.S_ISDIR(KCHu.st_mode):\n raise a1Lp(path=pmON)\n return list((VFIJ(Hy7s.path.join(pmON, Q7me)) for Q7me in Hy7s.listdir(pmON)))",
"def GwO0(p... | [
"0.73556286",
"0.702309",
"0.6729086",
"0.6531045",
"0.6528712",
"0.6515632",
"0.6495263",
"0.6391683",
"0.6390213",
"0.6366061",
"0.6352904",
"0.63347465",
"0.63310945",
"0.6308732",
"0.6306809",
"0.6277087",
"0.6277087",
"0.6277087",
"0.6277087",
"0.6277087",
"0.62401736",
... | 0.6782853 | 2 |
Amazon Resource Name (ARN) of the Redshift Serverless Namespace. | def hMqs(YKHO) -> str:
return qe4Y.get(YKHO, 'arn') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W5fH(jHrh: Optional[str]=None, VKhi: Optional[pulumi.InvokeOptions]=None) -> lEGK:\n rYZf = dict()\n rYZf['namespaceName'] = jHrh\n VKhi = qe4Y.InvokeOptions.merge(i5mz.get_invoke_opts_defaults(), VKhi)\n p5j3 = qe4Y.runtime.invoke('aws:redshiftserverless/getNamespace:getNamespace', rYZf, opts=VKhi... | [
"0.6433992",
"0.64010096",
"0.64010096",
"0.63864243",
"0.63864243",
"0.63864243",
"0.63864243",
"0.63864243",
"0.63864243",
"0.63864243",
"0.6233317",
"0.6233317",
"0.6233317",
"0.6233317",
"0.6233317",
"0.6233317",
"0.6233317",
"0.6233317",
"0.6233031",
"0.6185544",
"0.6185... | 0.0 | -1 |
The Amazon Resource Name (ARN) of the IAM role to set as a default in the namespace. When specifying `default_iam_role_arn`, it also must be part of `iam_roles`. | def lU21(YKHO) -> str:
return qe4Y.get(YKHO, 'default_iam_role_arn') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ngPz(YKHO) -> str:\n return 'arn:aws:iam::%s:role/sfiniGenerated' % YKHO.session.account_id",
"def SQQ_(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'iam_role_arn')",
"def axXk(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'role_arn')",
"def axXk(YKHO) -> h8nf[qe4Y.Input[str]]:\n ret... | [
"0.8312624",
"0.68310446",
"0.6802246",
"0.6802246",
"0.6802246",
"0.6802246",
"0.6802246",
"0.6789244",
"0.6789244",
"0.6789244",
"0.66483897",
"0.66483897",
"0.66483897",
"0.66483897",
"0.66483897",
"0.66483897",
"0.66483897",
"0.66483897",
"0.66483897",
"0.66483897",
"0.66... | 0.85705835 | 0 |
The Redshift Namespace ID. | def eucH(YKHO) -> str:
return qe4Y.get(YKHO, 'namespace_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eucH(YKHO) -> qe4Y.Output[int]:\n return qe4Y.get(YKHO, 'namespace_id')",
"def eucH(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'namespace_id')",
"def eucH(YKHO):\n if YKHO._namespace_id_present:\n return YKHO._namespace_id_value\n else:\n raise AttributeError(\"missing req... | [
"0.8247789",
"0.82196575",
"0.8209813",
"0.8037438",
"0.8037438",
"0.7885141",
"0.7885141",
"0.7881674",
"0.7874645",
"0.7744562",
"0.7744562",
"0.7744562",
"0.7744562",
"0.7744562",
"0.7650973",
"0.7128262",
"0.70602846",
"0.70602846",
"0.70602846",
"0.70602846",
"0.70602846... | 0.85394645 | 0 |
Sends HTTP Authorization header with the ``HTTP_AUTHORIZATION`` config value | def open(YKHO, *qIxc, **YSA3):
MOPg = YSA3.pop('headers', [])
if 'data' in YSA3:
YSA3['data'] = qQXR.dumps(YSA3['data'])
YSA3['content_type'] = 'application/json'
return super(OxSd, YKHO).open(*qIxc, headers=MOPg, **YSA3) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dRO0(YKHO, QePW):\n QePW.headers.addRawHeader(name=b'Authorization', value=b'Basic ' + YKHO.userpass)",
"def dRO0(Emd4, HNPp):\n eOtH = y8cn.app_auth_token\n HNPp.headers['Authorization'] = 'Bearer {}'.format(eOtH)",
"def MDPN(YKHO, MOPg):\n MOPg['Authorization'] = '{} {}'.format(YKHO.token_typ... | [
"0.7285144",
"0.7104231",
"0.70710003",
"0.70150137",
"0.692907",
"0.67913115",
"0.6744204",
"0.6683493",
"0.66277415",
"0.66255474",
"0.6598454",
"0.65902287",
"0.65885884",
"0.65229",
"0.6471827",
"0.643623",
"0.641412",
"0.6402425",
"0.63671327",
"0.6356497",
"0.6329377",
... | 0.0 | -1 |
Constructor of the Wall class. | def FIMM(YKHO):
YKHO.id = '#'
YKHO.collidable = False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n YKHO.wall = [[1, 1, 1, 0, 1], [1, 1, 0, 1, 1], [1, 1, 0, 1, 1], [1, 0, 1, 1, 1], [1, 1, 0, 1, 1], [1, 1, 0, 0, 1]]",
"def FIMM(YKHO, mWFP, yKcO, Os4s, dGrG, H2v2, **B2fa):\n super(Rlo4, YKHO).__init__(mWFP, static=True, **B2fa)\n if yKcO.z != Os4s.z:\n raise AssertionError('Wall... | [
"0.74779475",
"0.7448442",
"0.7346653",
"0.73026764",
"0.72616667",
"0.7193445",
"0.7131457",
"0.7030957",
"0.6963064",
"0.6901622",
"0.6885237",
"0.6817246",
"0.6787635",
"0.6779696",
"0.6685643",
"0.6631827",
"0.6599339",
"0.65679127",
"0.6535406",
"0.6520382",
"0.6511957",... | 0.0 | -1 |
Returns the string representation of the Wall. | def zAg0(YKHO):
return "Wall('" + YKHO.get_id() + "')" | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return f\"Wall('{YKHO.get_id()}')\"",
"def wHJl(YKHO):\n return \"Wall('\" + YKHO.get_id() + \"')\"",
"def zAg0(YKHO):\n if YKHO.is_empty():\n if YKHO.is_final_cell():\n vIwR = 'x'\n elif YKHO.is_thawed():\n vIwR = 'o'\n else:\n v... | [
"0.76832014",
"0.7618121",
"0.6669151",
"0.6665079",
"0.6545079",
"0.6481361",
"0.63758874",
"0.6329837",
"0.632386",
"0.6317284",
"0.63168335",
"0.6305839",
"0.6279286",
"0.626035",
"0.6253282",
"0.6245048",
"0.6225494",
"0.6193192",
"0.6188453",
"0.61871296",
"0.6181469",
... | 0.76840484 | 0 |
Returns the string representation of the Wall. | def wHJl(YKHO):
return "Wall('" + YKHO.get_id() + "')" | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return \"Wall('\" + YKHO.get_id() + \"')\"",
"def zAg0(YKHO):\n return f\"Wall('{YKHO.get_id()}')\"",
"def zAg0(YKHO):\n if YKHO.is_empty():\n if YKHO.is_final_cell():\n vIwR = 'x'\n elif YKHO.is_thawed():\n vIwR = 'o'\n else:\n v... | [
"0.76838034",
"0.76829994",
"0.6668512",
"0.6665238",
"0.654473",
"0.64819473",
"0.63765687",
"0.6330321",
"0.6323541",
"0.6318244",
"0.6315949",
"0.6306049",
"0.62799513",
"0.6260202",
"0.62537855",
"0.6244305",
"0.6226579",
"0.6193831",
"0.6187692",
"0.61871785",
"0.6182371... | 0.76183665 | 2 |
Separates input_str with sep and finds position of match_str in the separated list. | def yvSL(n_L_: str, pHWd: str, VWe_: str):
hkWs = n_L_.split('_')
oeNL = hkWs.index(pHWd)
return oeNL | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def neBz(NPoT, Npeo, yKcO, Os4s):\n W78r = NPoT[yKcO:Os4s]\n if Npeo in W78r:\n d6pt = NPoT.index(Npeo, yKcO, Os4s)\n return d6pt\n else:\n return -1",
"def Vn7Z(mZmz, s_ww):\n for mLGw, rdlD in enumerate(mZmz):\n if s_ww in rdlD:\n return mLGw",
"def neBz(NPo... | [
"0.6688623",
"0.62565315",
"0.6221646",
"0.61341405",
"0.610125",
"0.59538186",
"0.5866028",
"0.58285785",
"0.5812104",
"0.5784793",
"0.57595843",
"0.57562405",
"0.57114947",
"0.5710342",
"0.56935745",
"0.56922734",
"0.56669813",
"0.56261307",
"0.5599344",
"0.55957115",
"0.55... | 0.8601742 | 0 |
The user's full name, falling back to the username if empty. Returns str The full name (" ") of the user in PPMS, or the user accocunt name if the former one is empty. | def jeLr(YKHO):
if YKHO._fullname == '':
return YKHO.username
return YKHO._fullname | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xpqj(YKHO):\n eHMM = ' '.join([YKHO.user_data.name, YKHO.user_data.last_name]).strip()\n return eHMM if YKHO.user_data.name else YKHO.get_short_name()",
"def xpqj(YKHO):\n eHMM = YKHO.username\n return eHMM.strip()",
"def xpqj(CBIr):\n if CBIr.first_name or CBIr.last_name:\n return '%... | [
"0.85731834",
"0.8402044",
"0.83924466",
"0.8320361",
"0.8289264",
"0.8268634",
"0.82686317",
"0.82512945",
"0.822657",
"0.8121252",
"0.8115676",
"0.80934584",
"0.809052",
"0.80687827",
"0.80671054",
"0.80066866",
"0.80066866",
"0.8003188",
"0.79799646",
"0.7958192",
"0.79581... | 0.7907229 | 22 |
Determines if a puzzle is actually square. | def kzTp(QTBn):
import math
PZyS = math.sqrt(len(QTBn))
if PZyS % 1 != 0:
print('Not a Squareable List')
return False
else:
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nap9(YKHO):\n return YKHO.h == YKHO.w",
"def nap9(YKHO):\n return YKHO._shape[0] == YKHO._shape[1]",
"def nap9(YKHO):\n bTKY = YKHO.get_entry()\n if YKHO.input_is_valid(bTKY, 1):\n dixj = map(zAVy.is_square, bTKY)\n YKHO.result.config(text=YKHO.build_results(bTKY, dixj))",
"def ... | [
"0.83307606",
"0.82785046",
"0.7732338",
"0.7729935",
"0.755326",
"0.75099146",
"0.7507737",
"0.75031024",
"0.7461199",
"0.74272215",
"0.73847884",
"0.7284778",
"0.72750485",
"0.7233697",
"0.7228722",
"0.7210074",
"0.7155297",
"0.7155297",
"0.7087812",
"0.7044303",
"0.7032949... | 0.64546096 | 50 |
Returns the index with the smallest value across axes of a tensor. Returns the smallest index in case of ties. | def Bcn2(input, jDK_=None, nSMW=m1c7.int64, mWFP=None):
if jDK_ is None:
jDK_ = 0
return CT6C.arg_min(input, jDK_, name=mWFP, output_type=nSMW) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _enM(zg3_):\n twSF = len(zg3_)\n pBK0 = 0\n for or8S in Ni9Y(twSF):\n if zg3_[or8S] < zg3_[pBK0]:\n pBK0 = or8S\n return pBK0",
"def Frgl(YKHO):\n ...",
"def sWET(vhpA, jDK_=2):\n return ZylS.argmax(ZylS.cast(ZylS.greater(vhpA, 0), ZylS.int64), axis=jDK_)",
"def SMmx(Y... | [
"0.6630832",
"0.6529051",
"0.6489177",
"0.63732266",
"0.63649195",
"0.63649195",
"0.63167137",
"0.6263946",
"0.6239694",
"0.62287945",
"0.615321",
"0.6147169",
"0.6141505",
"0.612366",
"0.61024916",
"0.60712725",
"0.60438335",
"0.60339016",
"0.6012836",
"0.6002279",
"0.595495... | 0.0 | -1 |
Multiplies a scalar times a `Tensor` or `IndexedSlices` object. This is a special case of `tf.math.multiply`, where the first value must be a `scalar`. Unlike the general form of `tf.math.multiply`, this is operation is guaranteed to be efficient for `tf.IndexedSlices`. >>> x = tf.reshape(tf.range(30, dtype=tf.float32)... | def k0gx(hAEw, WKvO, mWFP=None):
MP2n = m1c7.as_dtype(WKvO.dtype).base_dtype
hAEw = IPme.convert_to_tensor(hAEw, dtype=MP2n, name='scalar')
ROpF = hAEw.get_shape()
if ROpF.ndims == 0:
if isinstance(WKvO, xulL.IndexedSlices):
return xulL.IndexedSlices(CT6C.mul(hAEw, WKvO.values, mWFP)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k0gx(E3D9, WKvO):\n return I7o1([[iVRZ * WKvO for iVRZ in rdlD] for rdlD in E3D9.store])",
"def E_tF(YKHO, hAEw):\n assert isinstance(hAEw, (int, float, bool)), \"Only multiplication with a scalar value is supported using '*' operator.\\nFor Multiplication with a vector, use the '.dot()' function.\"\n ... | [
"0.71104896",
"0.7042447",
"0.70041543",
"0.69278455",
"0.6904943",
"0.6816239",
"0.66935605",
"0.6659924",
"0.6618399",
"0.656386",
"0.6500362",
"0.6479377",
"0.643925",
"0.6422008",
"0.6345984",
"0.6341619",
"0.62240237",
"0.62160367",
"0.61903876",
"0.6156489",
"0.6152332"... | 0.7558213 | 0 |
The operation invoked by the `Tensor.__ne__` operator. Compares two tensors elementwise for inequality if they are broadcastcompatible; or returns True if they are not broadcastcompatible. (Note that this behavior differs from `tf.math.not_equal`, which raises an exception if the two tensors are not broadcastcompatible... | def N7Z3(YKHO, Elif):
if Elif is None:
return True
if YQp4.Tensor._USE_EQUALITY and IPme.executing_eagerly_outside_functions():
YKHO, Elif = GJtl(YKHO, Elif)
return CT6C.not_equal(YKHO, Elif, incompatible_shape_error=False)
else:
return YKHO is not Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kUu4(LFlW: Tensor, _tIi: Union[Tensor, np.ndarray, numbers.Number], yDqo=oFUf.float32, mWFP='not_equal'):\n return ZylS.cast(ZylS.not_equal(LFlW, _tIi, name=mWFP), yDqo, name='cast')",
"def kUu4(g4y1, **B2fa):\n g4y1 = OWoE.remove_scalars(g4y1)\n if QpfX.executing_eagerly():\n return fwpB.exe... | [
"0.73930144",
"0.69592685",
"0.68974173",
"0.6813536",
"0.6795311",
"0.6745165",
"0.67057294",
"0.65153414",
"0.65088284",
"0.65067387",
"0.6477406",
"0.6465252",
"0.6416474",
"0.6359431",
"0.6302559",
"0.62850547",
"0.6261449",
"0.6244737",
"0.62351716",
"0.6232485",
"0.6230... | 0.72712445 | 1 |
Set a reduction's output shape to be a scalar if we are certain. | def GnVE(JsoO, jDK_, hlel):
if not FPkC(hlel) and (not JsoO) and (jDK_ is None):
hlel.set_shape(())
return hlel | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HCTo(YKHO, ETfU):\n return YKHO.OutputShape(YKHO.params, ETfU)",
"def O4Zs(YKHO, hT1Q=None):\n YKHO.scalars = hT1Q",
"def fMgC(YKHO, C3ST):\n bo34.debug('Setting output shape')\n yvT9 = [nMvt.int_shape(vhpA)[-3:] for vhpA in C3ST.outputs]\n if not yvT9:\n raise ValueError('No outputs ... | [
"0.62021065",
"0.612331",
"0.6116451",
"0.60890585",
"0.59573424",
"0.5950315",
"0.5950315",
"0.5813212",
"0.5761744",
"0.5748941",
"0.57488024",
"0.5716948",
"0.57139266",
"0.57073706",
"0.57073706",
"0.57004356",
"0.5614274",
"0.5580897",
"0.5577104",
"0.5558282",
"0.552997... | 0.7882915 | 0 |
Computes the `tf.math.minimum` of elements across dimensions of a tensor. This is the reduction operation for the elementwise `tf.math.minimum` op. Reduces `input_tensor` along the dimensions given in `axis`. Unless `keepdims` is true, the rank of the tensor is reduced by 1 for each of the entries in `axis`, which must... | def gwhk(FRUf, jDK_=None, JsoO=None, mWFP=None, dCoA=None, Nswt=None):
jDK_ = ni8q.deprecated_argument_lookup('axis', jDK_, 'reduction_indices', dCoA)
JsoO = ni8q.deprecated_argument_lookup('keepdims', JsoO, 'keep_dims', Nswt)
return prT1(FRUf, jDK_, JsoO, mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def min(pKvt: Tensor, jDK_: Optional[Union[int, Sequence[int]]]=None, JsoO: bool=False) -> llWB:\n return pKvt.min(axis=jDK_, keepdims=JsoO)",
"def prT1(FRUf, jDK_=None, JsoO=False, mWFP=None):\n JsoO = False if JsoO is None else bool(JsoO)\n return GnVE(JsoO, jDK_, CT6C._min(FRUf, cG5z(FRUf, jDK_), Jso... | [
"0.8561541",
"0.8488527",
"0.81757665",
"0.7993439",
"0.791568",
"0.78881717",
"0.71595275",
"0.70296395",
"0.69267803",
"0.6772634",
"0.67540884",
"0.6580649",
"0.6563684",
"0.6358319",
"0.6358057",
"0.629336",
"0.62472254",
"0.62211466",
"0.6219138",
"0.6176289",
"0.6171121... | 0.7683105 | 6 |
Computes the `tf.math.minimum` of elements across dimensions of a tensor. This is the reduction operation for the elementwise `tf.math.minimum` op. Reduces `input_tensor` along the dimensions given in `axis`. Unless `keepdims` is true, the rank of the tensor is reduced by 1 for each of the entries in `axis`, which must... | def prT1(FRUf, jDK_=None, JsoO=False, mWFP=None):
JsoO = False if JsoO is None else bool(JsoO)
return GnVE(JsoO, jDK_, CT6C._min(FRUf, cG5z(FRUf, jDK_), JsoO, name=mWFP)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def min(pKvt: Tensor, jDK_: Optional[Union[int, Sequence[int]]]=None, JsoO: bool=False) -> llWB:\n return pKvt.min(axis=jDK_, keepdims=JsoO)",
"def WHwV(pKvt: Tensor, jDK_: Optional[Union[int, Sequence[int]]]=None, JsoO: bool=False) -> llWB:\n if isinstance(jDK_, g760.abc.Iterable):\n jDK_ = list(jD... | [
"0.856195",
"0.8175967",
"0.7994657",
"0.79161596",
"0.7888321",
"0.7684183",
"0.7159192",
"0.70298547",
"0.6926543",
"0.6772586",
"0.67547405",
"0.65809155",
"0.6563476",
"0.63578176",
"0.6357472",
"0.629345",
"0.62466216",
"0.6219824",
"0.62189716",
"0.61760247",
"0.6168317... | 0.8488596 | 1 |
Computes `tf.math.maximum` of elements across dimensions of a tensor. This is the reduction operation for the elementwise `tf.math.maximum` op. Reduces `input_tensor` along the dimensions given in `axis`. Unless `keepdims` is true, the rank of the tensor is reduced by 1 for each of the entries in `axis`, which must be ... | def niGS(FRUf, jDK_=None, JsoO=None, mWFP=None, dCoA=None, Nswt=None):
jDK_ = ni8q.deprecated_argument_lookup('axis', jDK_, 'reduction_indices', dCoA)
JsoO = ni8q.deprecated_argument_lookup('keepdims', JsoO, 'keep_dims', Nswt)
return Q1AW(FRUf, jDK_, JsoO, mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def max(pKvt: Tensor, jDK_: Optional[Union[int, Sequence[int]]]=None, JsoO: bool=False) -> llWB:\n return pKvt.max(axis=jDK_, keepdims=JsoO)",
"def Q1AW(FRUf, jDK_=None, JsoO=False, mWFP=None):\n return wdxI(FRUf, jDK_, JsoO, mWFP, cG5z(FRUf, jDK_))",
"def q1NN(pKvt: Tensor, jDK_: Optional[Union[int, Seq... | [
"0.8510677",
"0.84690326",
"0.8141053",
"0.7891099",
"0.7867628",
"0.7854226",
"0.73465586",
"0.7296746",
"0.71905154",
"0.71106374",
"0.7025522",
"0.69899",
"0.6964805",
"0.67908746",
"0.67511386",
"0.6696831",
"0.66210854",
"0.6609814",
"0.65875363",
"0.6570785",
"0.6567124... | 0.75784725 | 6 |
Computes `tf.math.maximum` of elements across dimensions of a tensor. This is the reduction operation for the elementwise `tf.math.maximum` op. Reduces `input_tensor` along the dimensions given in `axis`. Unless `keepdims` is true, the rank of the tensor is reduced by 1 for each of the entries in `axis`, which must be ... | def Q1AW(FRUf, jDK_=None, JsoO=False, mWFP=None):
return wdxI(FRUf, jDK_, JsoO, mWFP, cG5z(FRUf, jDK_)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def max(pKvt: Tensor, jDK_: Optional[Union[int, Sequence[int]]]=None, JsoO: bool=False) -> llWB:\n return pKvt.max(axis=jDK_, keepdims=JsoO)",
"def q1NN(pKvt: Tensor, jDK_: Optional[Union[int, Sequence[int]]]=None, JsoO: bool=False) -> llWB:\n if isinstance(jDK_, g760.abc.Iterable):\n jDK_ = list(jD... | [
"0.85114497",
"0.81406546",
"0.7892636",
"0.78690374",
"0.7855513",
"0.75788456",
"0.7347684",
"0.72969216",
"0.71908283",
"0.7112184",
"0.7026459",
"0.6990311",
"0.6965688",
"0.6792363",
"0.67518175",
"0.6697651",
"0.66215444",
"0.6610475",
"0.65877396",
"0.6571598",
"0.6567... | 0.84697944 | 1 |
Multiplies matrix `a` by vector `b`, producing `a` `b`. The matrix `a` must, following any transpositions, be a tensor of rank >= 2, | def U14a(jzdc, Fg_i, CWKi=False, m1vG=False, X_RJ=False, qqZ3=False, mWFP=None):
with IPme.name_scope(mWFP, 'MatVec', [jzdc, Fg_i]) as mWFP:
hlel = hxFl(jzdc, _WqI.expand_dims(Fg_i, axis=-1), transpose_a=CWKi, adjoint_a=m1vG, a_is_sparse=X_RJ, b_is_sparse=qqZ3)
return _WqI.squeeze(hlel, axis=-1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kEeD(jzdc, Fg_i):\n Z9rn = hPll.empty((jzdc.shape[0] * Fg_i.shape[0], jzdc.shape[1] * Fg_i.shape[1]), dtype=Fg_i.dtype)\n OAgx = Fg_i.shape[0]\n MxXY = Fg_i.shape[1]\n for _ABP in range(jzdc.shape[0]):\n for aVmR in range(jzdc.shape[1]):\n Z9rn[MxXY * _ABP:MxXY * (_ABP + 1), OAgx ... | [
"0.79966056",
"0.7920141",
"0.7860346",
"0.78010994",
"0.77578515",
"0.7580584",
"0.75737584",
"0.75653124",
"0.7492628",
"0.7453252",
"0.74099976",
"0.7408751",
"0.7381703",
"0.7346592",
"0.73392355",
"0.73337394",
"0.7319722",
"0.729259",
"0.72807884",
"0.7275648",
"0.72614... | 0.7485884 | 9 |
Convert 'x' to IndexedSlices. Convert a dense Tensor to a blocksparse IndexedSlices. | def yZYq(WKvO, WIl5=True):
if not isinstance(WKvO, (YQp4.Tensor, xulL.IndexedSlices)):
raise TypeError(f'Not a Tensor or IndexedSlices: {type(WKvO)}.')
if isinstance(WKvO, xulL.IndexedSlices):
return WKvO
OOcW = _WqI.shape_internal(WKvO, optimize=WIl5)
return xulL.IndexedSlices(WKvO, ran... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zXM_(WKvO, du2w=1):\n zHeZ = ht2j.typename(WKvO).split('.')[-1]\n UX5J = getattr(ht2j.sparse, zHeZ)\n _0VL = ht2j.nonzero(WKvO)[:, :len(WKvO.shape) - du2w + 1]\n if len(_0VL.shape) == 0:\n return UX5J(*WKvO.shape)\n _0VL = _0VL.t()\n hkxX = WKvO[tuple((_0VL[YRbF] for YRbF in range(_0VL... | [
"0.60144293",
"0.589046",
"0.589046",
"0.58724743",
"0.58724743",
"0.58724743",
"0.58724743",
"0.58724743",
"0.58724743",
"0.5852955",
"0.5838255",
"0.5838255",
"0.57738906",
"0.57395995",
"0.57196546",
"0.5545133",
"0.5544477",
"0.5483464",
"0.5437794",
"0.53545344",
"0.5331... | 0.65477383 | 0 |
Computes log sigmoid of `x` elementwise. Specifically, `y = log(1 / (1 + exp(x)))`. For numerical stability, we use `y = tf.nn.softplus(x)`. | def HlP3(WKvO, mWFP=None):
with IPme.name_scope(mWFP, 'LogSigmoid', [WKvO]) as mWFP:
WKvO = IPme.convert_to_tensor(WKvO, name='x')
return CT6C.neg(FOIO.softplus(-WKvO), name=mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m1Hg(WKvO):\n return oyIN.exp(-oyIN.logaddexp(0, -WKvO))",
"def m1Hg(WKvO: float) -> float:\n return 1 / (1 + oyIN.exp(-WKvO))",
"def m1Hg(WKvO):\n return oyIN.exp(-oyIN.logaddexp(0, -oyIN.array(WKvO)))",
"def m1Hg(WKvO):\n return 1 / (1 + oyIN.exp(-WKvO))",
"def m1Hg(WKvO):\n LVAh = 1 /... | [
"0.81388503",
"0.8022064",
"0.799099",
"0.79247814",
"0.79190606",
"0.7904175",
"0.7901661",
"0.7901661",
"0.7901661",
"0.78899384",
"0.78899384",
"0.78681237",
"0.78681237",
"0.78681237",
"0.78681237",
"0.78681237",
"0.78681237",
"0.78681237",
"0.78681237",
"0.78681237",
"0.... | 0.8052375 | 1 |
Compute the cumulative logsumexp of the tensor `x` along `axis`. By default, this op performs an inclusive cumulative logsumexp, which means that the first element of the input is identical to the first element of the output. This operation is significantly more numerically stable than the equivalent tensorflow operati... | def vokd(WKvO, jDK_=0, mFPj=False, gxEw=False, mWFP=None):
with IPme.name_scope(mWFP, 'CumulativeLogsumexp', [WKvO]) as mWFP:
WKvO = IPme.convert_to_tensor(WKvO, name='x')
return CT6C.cumulative_logsumexp(WKvO, jDK_, exclusive=mFPj, reverse=gxEw, name=mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a4Lo(WKvO: Tensor, jDK_=None, JsoO=False, mWFP='reduce_logsumexp'):\n return ZylS.math.reduce_logsumexp(WKvO, axis=jDK_, keepdims=JsoO, name=mWFP)",
"def a7Jm(WKvO, jDK_=None):\n bYzl = Kt_s.max(WKvO, axis=jDK_, keepdims=True)\n lvgK = Kt_s.max(WKvO, axis=jDK_)\n return lvgK + Kt_s.log(Kt_s.exp(W... | [
"0.80848134",
"0.77829504",
"0.77119976",
"0.76867676",
"0.76714516",
"0.7501827",
"0.7463862",
"0.74037284",
"0.73948973",
"0.7377814",
"0.73025864",
"0.73025864",
"0.73000276",
"0.727323",
"0.7239849",
"0.72315836",
"0.72245425",
"0.71920013",
"0.71416193",
"0.7107988",
"0.... | 0.85225433 | 0 |
Helper method to perform transpose and reshape for contraction op. This method is helpful in reducing `math_ops.tensordot` to `math_ops.matmul` using `array_ops.transpose` and `array_ops.reshape`. The method takes a tensor and performs the correct transpose and reshape operation for a given set of indices. It returns t... | def jxbi(jzdc, MPlV, NKly=False):
if jzdc.get_shape().is_fully_defined() and isinstance(MPlV, (list, tuple)):
oWHJ = jzdc.get_shape().as_list()
MPlV = [YRbF if YRbF >= 0 else YRbF + len(oWHJ) for YRbF in MPlV]
ftQ2 = [YRbF for YRbF in fR_9.range(len(oWHJ)) if YRbF not in MPlV]
n0lU =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m44m(moed, ES3Y, EZd9, WKvO):\n WKvO = iEFy(moed, WKvO)\n return iEFy(ES3Y, vuvg.reshape(WKvO, EZd9))",
"def vhpA(*qIxc):\n Ylbp = oyIN.array([[1]])\n for YRbF in qIxc:\n Ylbp = oyIN.tensordot(Ylbp, YRbF, ([], [])).swapaxes(1, 2).reshape(Ylbp.shape[0] * YRbF.shape[0], Ylbp.shape[1] * YRbF.... | [
"0.63189745",
"0.6220576",
"0.6112445",
"0.6027473",
"0.5966838",
"0.5952724",
"0.594344",
"0.58843696",
"0.58655876",
"0.586287",
"0.58628625",
"0.5858879",
"0.5852019",
"0.5817716",
"0.5783861",
"0.5763991",
"0.5741513",
"0.5738549",
"0.5727311",
"0.5713423",
"0.5699849",
... | 0.6288649 | 1 |
Performs a safe reciprocal operation, element wise. If a particular element is zero, the reciprocal for that element is also set to zero. | def EPPG(WKvO, mWFP=None):
with IPme.name_scope(mWFP, 'reciprocal_no_nan', [WKvO]) as rrBf:
WKvO = IPme.convert_to_tensor(WKvO, name='x')
a0GJ = cACa.constant(1, dtype=WKvO.dtype.base_dtype, name='one')
return CT6C.div_no_nan(a0GJ, WKvO, name=rrBf) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dwOo(WKvO):\n return",
"def dwOo(WKvO):\n return Hruk(1, WKvO)",
"def dwOo(g4y1, **B2fa):\n if QpfX.executing_eagerly():\n return fwpB.execute('Reciprocal', g4y1)\n return fwpB.add('Reciprocal', g4y1, **B2fa)",
"def BlD2(YKHO, ObYY, g4y1):\n assert len(g4y1) == 1\n return SMR4.re... | [
"0.7768838",
"0.68594056",
"0.6814313",
"0.64117104",
"0.64117104",
"0.63709056",
"0.6346187",
"0.6259116",
"0.6156459",
"0.5928531",
"0.59276336",
"0.58777046",
"0.5801802",
"0.57720006",
"0.5737199",
"0.57222456",
"0.56593096",
"0.56329846",
"0.5595943",
"0.55757666",
"0.55... | 0.6673433 | 3 |
Computes reciprocal of square root of x elementwise. | def agdE(WKvO, mWFP=None):
return CT6C.rsqrt(WKvO, mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dwOo(WKvO):\n return",
"def dwOo(WKvO):\n return Hruk(1, WKvO)",
"def agdE(WKvO):\n return XTiz.ones_like(WKvO) / XTiz.sqrt(WKvO)",
"def agdE(YKHO, WKvO):\n return 1 / YKHO.sqrt(WKvO)",
"def Mkmy(WKvO):\n return oyIN.sqrt(WKvO[0] ** 2 + WKvO[1] ** 2 + WKvO[2] ** 2)",
"def qBko(YKHO, WK... | [
"0.8417067",
"0.80764264",
"0.7902031",
"0.773057",
"0.7405377",
"0.72430116",
"0.7143239",
"0.7127625",
"0.7110089",
"0.7037301",
"0.7008259",
"0.7006349",
"0.70024073",
"0.69997114",
"0.697895",
"0.6957211",
"0.6927635",
"0.6920462",
"0.6920462",
"0.6833967",
"0.67730606",
... | 0.6360034 | 63 |
Computes acos of x elementwise. Provided an input tensor, the `tf.math.acos` operation returns the inverse cosine of each element of the tensor. If `y = tf.math.cos(x)` then, `x = tf.math.acos(y)`. Input range is `[1, 1]` and the output has a range of `[0, pi]`. | def fH9s(WKvO, mWFP=None):
return CT6C.acos(WKvO, mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NC_Y(*, FRUf) -> ImMB:\n gzOd = None\n gzOd = ZylS.abs(FRUf)\n xQgD = FRUf.dtype\n V3hn = ZylS.math.divide(ZylS.math.multiply(ZylS.minimum(FRUf, ZylS.convert_to_tensor(0.0, dtype=xQgD)), ZylS.convert_to_tensor(-1.0, dtype=xQgD)), gzOd)\n WKvO = gzOd\n LVAh = ZylS.constant(-0.0187293)\n LVA... | [
"0.8038365",
"0.76308286",
"0.7561236",
"0.7501775",
"0.7486704",
"0.74761593",
"0.7460794",
"0.7449381",
"0.74139076",
"0.73708797",
"0.715049",
"0.71329373",
"0.71116084",
"0.70878124",
"0.7037124",
"0.6948397",
"0.68968153",
"0.68562174",
"0.6815956",
"0.68131363",
"0.6807... | 0.7754383 | 1 |
Wraps the features with `rnn.pack_padded_sequence`. `rnn.pack_padded_sequence` returns a PackedSequence instance that helps the rnn to compute only on unpadded data | def RZip(C3ST, bySB, dk2u):
bySB = iQnE(bySB)
input = ht2j.nn.utils.rnn.pack_padded_sequence(bySB, dk2u, enforce_sorted=False, batch_first=True).to(begE)
o4Jx = C3ST(input)
return o4Jx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BRjU(jWe2):\n return ht2j.nn.utils.rnn.pack_padded_sequence(gc7n(jWe2), [Ty9i.size(0) for Ty9i in jWe2])",
"def Vhdk(YKHO, WKvO, M01R):\n Fbjb = M01R.data.eq(0).long().sum(1).squeeze()\n bGrB, WhC3 = ht2j.sort(Fbjb, dim=0, descending=True)\n bGrB, B0C_ = ht2j.sort(WhC3, dim=0)\n Fbjb = list(Fb... | [
"0.66498375",
"0.6365256",
"0.6333796",
"0.6295274",
"0.6212581",
"0.6185528",
"0.61339897",
"0.6095935",
"0.6086662",
"0.60564864",
"0.60522574",
"0.6036144",
"0.6034604",
"0.60063577",
"0.59647197",
"0.5957617",
"0.5954455",
"0.59174055",
"0.58977795",
"0.5862454",
"0.58371... | 0.54280907 | 65 |
Get title of offer. | def MvP2(YKHO, Z9JV: SoupInfo) -> h8nf[str]:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Upwb(XWXu):\n YbZO = rKuS(XWXu, 'html.parser')\n try:\n return YbZO.find(id='ogl-title').text.strip()\n except AttributeError:\n return",
"def Upwb(YKHO):\n return YKHO.title.get_text()",
"def Upwb(YKHO):\n return YKHO._title",
"def Upwb(YKHO):\n return YKHO._title",
"de... | [
"0.7665704",
"0.7640066",
"0.754998",
"0.754998",
"0.754998",
"0.75447905",
"0.7527145",
"0.7527145",
"0.7504893",
"0.7504893",
"0.7500843",
"0.74871004",
"0.74871004",
"0.74871004",
"0.74871004",
"0.74871004",
"0.74871004",
"0.74871004",
"0.74871004",
"0.74871004",
"0.748710... | 0.0 | -1 |
Dump to json dictionary any additional information that doesn't fit into models fields. | def uNDe(YKHO, Z9JV: SoupInfo) -> h8nf[str]:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fxoh(YKHO):\n raise NotImplementedError()",
"def Napc(YKHO):\n return {'id': YKHO.id, 'name': YKHO.name, 'description': YKHO.description, 'mineral_cost': YKHO.mineral_cost, 'vespene_cost': YKHO.vespene_cost, 'supply_cost': YKHO.supply_cost, 'build_time': YKHO.build_time, 'created_at': tOfJ(YKHO.created... | [
"0.7190067",
"0.701458",
"0.6982313",
"0.69773936",
"0.6903716",
"0.6880063",
"0.68666375",
"0.68588907",
"0.68580675",
"0.6850172",
"0.68418795",
"0.6836675",
"0.68122345",
"0.6802715",
"0.67957455",
"0.6790838",
"0.6788787",
"0.6778571",
"0.676253",
"0.67546314",
"0.6753306... | 0.0 | -1 |
Get datetime of moment when the post was added. | def w8dV(YKHO, Z9JV: SoupInfo) -> h8nf[qcWV]:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pjsR(YKHO) -> qcWV:\n return YKHO._added_datetime",
"def PbL6(YKHO):\n PbL6 = YKHO.attrs.get('add_date')\n if not PbL6:\n PbL6 = round(ITS7.time() * 1000)\n return int(PbL6)",
"def wsdE(YKHO):\n return YKHO.get_time('added_on')",
"def tEZe(YKHO) -> qcWV:\n return YKHO._dt_created... | [
"0.7504723",
"0.7049481",
"0.69762",
"0.69685394",
"0.6796014",
"0.6751105",
"0.6751105",
"0.67166865",
"0.67166865",
"0.67166865",
"0.6686619",
"0.6669133",
"0.6669133",
"0.665342",
"0.66140676",
"0.66140676",
"0.6600284",
"0.6559206",
"0.64981836",
"0.6497303",
"0.6497303",... | 0.6178813 | 96 |
Attach a lot of summaries to a Tensor (for TensorBoard visualization). | def g4Yp(SRYB):
with ZylS.name_scope('summaries'):
ropZ = ZylS.reshape(SRYB, (ZylS.shape(SRYB)[0], 1, ZylS.shape(SRYB)[1], 1))
ZylS.summary.image('value', ropZ, max_outputs=100)
JBMS = ZylS.reduce_mean(SRYB)
ZylS.summary.scalar('mean', JBMS)
with ZylS.name_scope('stddev'):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oxpy(YKHO):\n with ZylS.name_scope('summaries'):\n ZylS.summary.scalar('loss', YKHO.loss)\n ZylS.summary.scalar('accuracy', YKHO.accuracy)\n ZylS.summary.histogram('W', YKHO.W)\n ZylS.summary.histogram('B', YKHO.B)\n YKHO.summary = ZylS.summary.merge_all()",
"def oxpy(YK... | [
"0.7736023",
"0.7635905",
"0.7155553",
"0.70680684",
"0.7009785",
"0.70042086",
"0.68648136",
"0.6790258",
"0.67114747",
"0.6701874",
"0.6697641",
"0.6652102",
"0.66504985",
"0.6646255",
"0.6623328",
"0.66044253",
"0.65970594",
"0.658098",
"0.65703803",
"0.65372866",
"0.65370... | 0.0 | -1 |
Pads the middle dimension of a 3D tensor. Arguments | def ldHx(WKvO, dvgN=(1, 1)):
assert len(dvgN) == 2
mXDZ = [[0, 0], [dvgN[0], dvgN[1]], [0, 0]]
return ZylS.pad(WKvO, mXDZ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e04g(YKHO, P0MK):\n if P0MK is None:\n return 0\n else:\n return ht2j.nn.functional.pad(P0MK, [1, 1, 1, 1])",
"def Bh8h(vhpA, u54L):\n if vhpA.size(0) == u54L:\n return vhpA\n return ht2j.cat([vhpA, ht2j.zeros([u54L - vhpA.size(0), vhpA.size(1)])])",
"def hVLt():\n dvgN ... | [
"0.67334914",
"0.6262146",
"0.6119635",
"0.605428",
"0.60341865",
"0.5997491",
"0.5987451",
"0.5948333",
"0.5925967",
"0.592179",
"0.592179",
"0.5904093",
"0.5826167",
"0.58118284",
"0.5797492",
"0.57955563",
"0.57875615",
"0.5754189",
"0.5752902",
"0.574725",
"0.57327807",
... | 0.53609145 | 57 |
A simple, pure numpy global average. | def LdUK(pOqt, sfDy, PJWX=False):
KCHu = pOqt.shape
for YRbF in range(len(KCHu)):
if oyIN.size(pOqt, YRbF) == len(sfDy):
jzdc = YRbF
break
AzHg = oyIN.ma.masked_invalid(pOqt)
if PJWX:
print('(global_average)-- fraction input missing: {}'.format(bXd7(pOqt)))
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def S8vG(BkYD):\n return qw7D.mean(BkYD)",
"def Pueu(ezWE):\n return ezWE.mean()",
"def YT4S(ezWE):\n sum = 0\n for YRbF in range(0, ezWE.shape[0]):\n for r845 in range(0, ezWE.shape[1]):\n sum = sum + ezWE[YRbF][r845]\n return sum / ezWE.size",
"def Ofpc(YKHO) -> float:\n ... | [
"0.75691545",
"0.7466153",
"0.7099363",
"0.7095962",
"0.7043525",
"0.7043525",
"0.69027865",
"0.6860639",
"0.6845705",
"0.68394244",
"0.68147784",
"0.6814238",
"0.67319554",
"0.67225665",
"0.6687655",
"0.66697586",
"0.6633401",
"0.6610837",
"0.66040087",
"0.65903443",
"0.6589... | 0.74603903 | 2 |
The bias is the global mean of the difference. | def oug5(euUL, gEVc):
assert len(euUL.shape) == 2, 'Need 2-d input'
assert len(gEVc.shape) == 2, 'Need 2-d input'
if euUL.shape != gEVc.shape:
print(f'Regrid required. Will interpolate observed {gEVc.shape} to measured grid {euUL.shape}.')
gEVc = gEVc.interp_like(euUL)
by6d = euUL - gEVc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oug5(YKHO):\n return YKHO._bias",
"def SgUT(YKHO):\n x7SB = 0\n r9Hf = 0\n for CBIr, LHvA, RrWF in YKHO.samples:\n if RrWF != 0:\n x7SB += RrWF\n r9Hf += 1\n x7SB = x7SB / r9Hf\n YKHO.b = x7SB",
"def oug5(YKHO) -> int:\n return YKHO._bias",
"def klBM(YKHO... | [
"0.7624693",
"0.7528382",
"0.7452615",
"0.73348045",
"0.7303164",
"0.72821915",
"0.7264035",
"0.7230605",
"0.7189974",
"0.71532905",
"0.71326095",
"0.71054935",
"0.71054935",
"0.70669895",
"0.7044796",
"0.70241296",
"0.6857241",
"0.6809334",
"0.6809334",
"0.67670506",
"0.6753... | 0.6404013 | 33 |
Sets the learning rate | def e_63(K0do, qtWj, qIxc):
tspZ = qIxc.lr
if 20 < qtWj <= 30:
tspZ = 0.0001
elif 30 < qtWj:
tspZ = 1e-05
for Lwm5 in K0do.param_groups:
Lwm5['lr'] = tspZ
print('learning rate -> {}\n'.format(tspZ)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kVtO(YKHO, Qj8D: float):\n pass",
"def Aaf0(YKHO, Tclk):\n YKHO.learningRate = Tclk",
"def kVtO(YKHO, tspZ=0.1):\n YKHO.learning_rate = tspZ\n return YKHO",
"def kVtO(YKHO, tspZ):\n if not isinstance(tspZ, float):\n raise TypeError('lr must be a float')\n else:\n YKHO._lea... | [
"0.85886705",
"0.85306805",
"0.8506579",
"0.8335991",
"0.8305426",
"0.82754505",
"0.82754505",
"0.8159271",
"0.8060031",
"0.7982775",
"0.79691017",
"0.79465806",
"0.7944637",
"0.7927076",
"0.7821988",
"0.7797926",
"0.7797926",
"0.7795433",
"0.77483195",
"0.76963514",
"0.76656... | 0.7381745 | 38 |
Calls a registered instance attribute as a function | def Qlwg(YKHO):
VpKb = (1, 2, 3)
class DispatchedClass:
def F6ET(YKHO, *NArs):
raise Qn43.DispatchExc(NArs)
qAYJ = WSwI.server.SimpleXMLRPCDispatcher()
qAYJ.register_instance(U6G9())
with YKHO.assertRaises(YKHO.DispatchExc) as h8am:
qAYJ._dispatch('dispatched_func', VpK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MkOA(**B2fa):\n ucm2()(**B2fa)",
"def PCU8(YKHO, mWFP: str, BWXx: t.Callable) -> None:\n YKHO.__call__(mWFP)(BWXx)",
"def nrOS(YKHO, WKvO):\n return YKHO.evaluate(WKvO)",
"def JgjC(YKHO, hkS8):\n return getattr(YKHO.__instance, hkS8)",
"def PCU8(YKHO, hkS8, BWXx):\n return setattr(YKHO._... | [
"0.67463773",
"0.67359406",
"0.66754735",
"0.6637875",
"0.66171956",
"0.65901744",
"0.65901744",
"0.65673697",
"0.65673697",
"0.6561701",
"0.6535243",
"0.6535243",
"0.6509413",
"0.6509413",
"0.6496172",
"0.6495653",
"0.6495653",
"0.6495653",
"0.6495653",
"0.6495653",
"0.64956... | 0.0 | -1 |
A variation on support.captured_stdout() which gives a text stream having a `buffer` attribute. | def y5JU(tZ2K='utf-8'):
XJqi = HwRy.stdout
HwRy.stdout = xDSY.TextIOWrapper(xDSY.BytesIO(), encoding=tZ2K)
try:
yield HwRy.stdout
finally:
HwRy.stdout = XJqi | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k5ES(YKHO, VquF):\n YKHO._mock_sys.stdout.buffer = VquF",
"def k5ES(YKHO, VquF):\n YKHO._mock_sys.stdout = VquF",
"def LG3o(YKHO, eEYG=False):\n hlel = YKHO.stdout_content.getvalue()\n if eEYG:\n YKHO.stdout_content.close()\n YKHO.replace_stdout_with_string_buffer()\n return hl... | [
"0.7197227",
"0.713081",
"0.7040135",
"0.67324466",
"0.67187494",
"0.6685367",
"0.6685367",
"0.66430694",
"0.6503609",
"0.648706",
"0.6437833",
"0.639381",
"0.63752836",
"0.63082504",
"0.629604",
"0.62569034",
"0.6251366",
"0.61888236",
"0.6151914",
"0.6150762",
"0.6077431",
... | 0.7055662 | 2 |
If the form is valid, save the associated model. | def lwXz(YKHO, L03z):
YKHO.object = L03z.save()
eE9C = YKHO.object.map_related.path.split(',')
luue = [eE9C[G1Hx:G1Hx + 10] for G1Hx in range(0, len(eE9C), 10)]
s57z = (YKHO.object.map_related.pos_init_y, YKHO.object.map_related.pos_init_x)
DK9H = (YKHO.object.map_related.pos_end_y, YKHO.object.map_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def deVW(YKHO, L03z):\n L03z.save()",
"def lwXz(YKHO, L03z):\n L03z.save()\n return super().form_valid(L03z)",
"def lwXz(YKHO, L03z):\n YKHO.object = L03z.save(YKHO.request.user)\n return Yd7Q(YKHO.get_success_url(), status=303)",
"def lwXz(YKHO, L03z):\n YKHO.object = L03z.save(YKHO.reques... | [
"0.7786421",
"0.7445933",
"0.7416595",
"0.7416595",
"0.7391896",
"0.7391896",
"0.7391896",
"0.7391896",
"0.71387583",
"0.7123397",
"0.7104942",
"0.7073247",
"0.7056793",
"0.7056793",
"0.705132",
"0.70319355",
"0.702643",
"0.7008229",
"0.7001526",
"0.6998036",
"0.69720834",
... | 0.0 | -1 |
Ensure that the recent entries page works properly. | def xR1e(YKHO):
geh0 = YKHO.client.get('/')
YKHO.assertContains(geh0, YKHO.text_entry.rendered_content, status_code=200) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rlIU(YKHO):\n from tribuna.content.entrypage import old_entry_pages\n xtX7 = YKHO.portal['entry-pages']\n nNXP.content.create(container=xtX7, type='tribuna.content.entrypage', title='Entry page 1')\n nNXP.content.create(container=xtX7, type='tribuna.content.entrypage', title='Entry page 2')\n nN... | [
"0.6816028",
"0.6457775",
"0.6238884",
"0.6012629",
"0.5995241",
"0.5957456",
"0.59522545",
"0.5946967",
"0.5926352",
"0.59211564",
"0.5902168",
"0.58533657",
"0.5844193",
"0.5821083",
"0.58164585",
"0.5812579",
"0.5798487",
"0.5795871",
"0.5793174",
"0.57910407",
"0.5783318"... | 0.7107347 | 0 |
Ensure that the 'tag cloud' page works properly. | def LCXj(YKHO):
geh0 = YKHO.client.get('/tags/')
YKHO.assertContains(geh0, 'tests', status_code=200) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def raNv(YKHO):\n geh0 = YKHO.client.get('/blog/tag/tag1')\n YKHO.assertEqual(geh0.status_code, 200)",
"def u8t_(YKHO):\n dJ1p = set(X5Jc.TAGS)\n if YKHO.type != 'labeled':\n dJ1p = dJ1p.difference(['entry', 'label', 'term'])\n v3uw = dJ1p.difference(YKHO.tag.keys())\n if v3uw:\n ... | [
"0.66660804",
"0.62633103",
"0.6243326",
"0.62171066",
"0.60909456",
"0.60085684",
"0.59949744",
"0.59675",
"0.5954726",
"0.5935468",
"0.59244823",
"0.59240544",
"0.5894018",
"0.58907473",
"0.58888364",
"0.58748555",
"0.58622247",
"0.5847",
"0.5834514",
"0.5792413",
"0.578809... | 0.742135 | 0 |
Takes a sentence, breaks it into words and sorts the words | def n4wW(yAmx):
V22M = nGs0(yAmx)
return dq9m(V22M) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n4wW(yAmx):\n V22M = nGs0(yAmx)\n return dq9m(V22M)",
"def n4wW(yAmx):\n V22M = nGs0(yAmx)\n return dq9m(V22M)",
"def n4wW(yAmx):\n V22M = nGs0(yAmx)\n return dq9m(V22M)",
"def n4wW(yAmx):\n V22M = nGs0(yAmx)\n return dq9m(V22M)",
"def n4wW(yAmx):\n V22M = nGs0(yAmx)\n ret... | [
"0.86753815",
"0.8644855",
"0.8644855",
"0.86021525",
"0.8584541",
"0.85701686",
"0.85568404",
"0.85568404",
"0.85568404",
"0.85568404",
"0.85568404",
"0.85568404",
"0.85568404",
"0.85568404",
"0.85568404",
"0.85568404",
"0.85568404",
"0.85568404",
"0.85568404",
"0.85568404",
... | 0.8539782 | 22 |
update a https listener rule with the specified options. | def zVVJ(YKHO, jXia, xsjL, l117=None, IesV=None, zbjk=None, bbRD=None, aLKn=None, xABd=None, XoOf=None, qBZP=None, MNGV=None, Oeem=None, G0BN=None, MyiY=None, oQTG=None, bxmU=None, mPz7=None, oNFu=None, qlve=None, N9f4=None, GPtr=None):
pmON = BfDw.append_uri(YKHO.version, 'blb', jXia, 'HTTPSlistener')
NArs = {... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aaAx(t3yS=None, fMvF=None, _e60=None, HNYX=None, j6eQ=None, trQA=None, IffF=None):\n pass",
"def Tqyq(YKHO, **B2fa) -> None:\n raise NotImplementedError()",
"async def update_listener(RUgX: OpenPeerPower, bTKY: ConfigEntry):\n oimG = RUgX.data[Sugg][bTKY.entry_id][RGZf]\n if oimG.update_options... | [
"0.62705475",
"0.602459",
"0.5987372",
"0.59014267",
"0.5898595",
"0.5854289",
"0.57500726",
"0.5690914",
"0.5690914",
"0.55638427",
"0.5466208",
"0.53411627",
"0.5309586",
"0.5287272",
"0.5238597",
"0.52376074",
"0.52282524",
"0.5144336",
"0.51375747",
"0.5136715",
"0.512135... | 0.58312005 | 6 |
Set the current chain head, does not validate that the block store is in a valid state, ie that all the head block and all predecessors are in the store. | def cula(YKHO, OxA6, k_UM=None):
ByVs = []
g8Lb = []
for SV8J in OxA6:
ByVs = ByVs + YKHO._build_add_block_ops(SV8J)
if k_UM is not None:
for SV8J in k_UM:
g8Lb = g8Lb + YKHO._build_remove_block_ops(SV8J)
ByVs.append(('chain_head_id', OxA6[0].identifier))
YKHO._block_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NWbf(YKHO, kMLo):\n kMLo.next = YKHO.head\n kMLo.previous = None\n if YKHO.head is not None:\n YKHO.head.previous = kMLo\n YKHO.head = kMLo\n if YKHO.end is None:\n YKHO.end = YKHO.head",
"def geji(YKHO, aoSX):\n YKHO._head = aoSX",
"def kIkj(YKHO):\n print('reverting to ... | [
"0.6706303",
"0.65877515",
"0.6360004",
"0.6352458",
"0.6334179",
"0.63335264",
"0.600405",
"0.59797835",
"0.59399337",
"0.57918423",
"0.5747683",
"0.5697503",
"0.5696869",
"0.56785625",
"0.56781155",
"0.567202",
"0.5646759",
"0.56313086",
"0.5616242",
"0.557918",
"0.557918",... | 0.0 | -1 |
Return the head block of the current chain. | def Sc0C(YKHO):
if 'chain_head_id' not in YKHO._block_store:
return None
if YKHO._block_store['chain_head_id'] in YKHO._block_store:
return YKHO.__getitem__(YKHO._block_store['chain_head_id'])
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sdCG(YKHO):\n XkN1 = YKHO.db.get(YKHO._head_hash)\n return XkN1",
"def xJZL(YKHO):\n return YKHO._gdgp()['head_block_number']",
"def sdCG(YKHO):\n if YKHO.is_empty():\n return None\n return YKHO._head",
"def C652(YKHO) -> n3Kt:\n return YKHO.chain[-1]",
"def sdCG(YKHO):\n re... | [
"0.7943831",
"0.75778335",
"0.75374174",
"0.74575394",
"0.74440616",
"0.73819035",
"0.73819035",
"0.73819035",
"0.73819035",
"0.73635334",
"0.7335631",
"0.7271068",
"0.726204",
"0.726204",
"0.7261045",
"0.72475505",
"0.72249305",
"0.71980244",
"0.7169495",
"0.71312577",
"0.71... | 0.8119615 | 0 |
ARN of the SecurityHub Hub created in the account. | def hMqs(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'arn') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mWFP(YKHO):\n return YKHO._hub_name",
"def EszR(YKHO) -> str:\n raise NotImplementedError",
"def BT90(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'hub_name')",
"def hMqs(YKHO) -> str:\n return qe4Y.get(YKHO, 'arn')",
"def hMqs(YKHO) -> str:\n return qe4Y.get(YKHO, 'arn')",
"def h... | [
"0.61589825",
"0.58957255",
"0.5859768",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5831287",
... | 0.0 | -1 |
ARN of the SecurityHub Hub created in the account. | def hMqs(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'arn') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mWFP(YKHO):\n return YKHO._hub_name",
"def EszR(YKHO) -> str:\n raise NotImplementedError",
"def BT90(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'hub_name')",
"def hMqs(YKHO) -> str:\n return qe4Y.get(YKHO, 'arn')",
"def hMqs(YKHO) -> str:\n return qe4Y.get(YKHO, 'arn')",
"def h... | [
"0.61589825",
"0.58957255",
"0.5859768",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5848013",
"0.5831287",
... | 0.5725641 | 25 |
Flatten list of lists | def PWgb(vC9B):
return [ZfUD for XuXy in vC9B for ZfUD in XuXy] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MKPt(nwEZ):\n Aofo = []\n for LihS in nwEZ:\n Aofo.extend(LihS)\n return Aofo",
"def _NRg(vC9B):\n yvT9 = []\n for ZfUD in vC9B:\n if isinstance(ZfUD, (list, tuple)):\n yvT9.extend(_NRg(ZfUD))\n else:\n yvT9.append(ZfUD)\n return yvT9",
"def PWgb... | [
"0.848603",
"0.84044063",
"0.8307074",
"0.8299051",
"0.8292341",
"0.82764584",
"0.8260715",
"0.8253566",
"0.82430226",
"0.8228287",
"0.81997573",
"0.81855756",
"0.81855756",
"0.81855756",
"0.8169693",
"0.8167887",
"0.81562734",
"0.8155116",
"0.8150038",
"0.81443846",
"0.81443... | 0.834351 | 2 |
Repeat all items in list n times repeat([1,2,3], 2) => [1,1,2,2,3,3] | def wPFE(vC9B, exwG):
return [WKvO for WKvO in vC9B for YRbF in range(exwG)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sWfS(WKvO, ywwl):\n return [ZfUD for ZfUD in WKvO for bGrB in range(ywwl)]",
"def tWMi(WhY1: Iterable[_T], exwG: int) -> bDy6[sb5H]:\n return Hs6x.chain.from_iterable((Hs6x.repeat(geyT, exwG) for geyT in WhY1))",
"def wPFE(OxJJ, exwG):\n for tTpl in OxJJ:\n for bGrB in range(exwG):\n ... | [
"0.78650266",
"0.78639793",
"0.77459687",
"0.76558995",
"0.72965163",
"0.72191775",
"0.7120264",
"0.70951533",
"0.7070954",
"0.70664054",
"0.7062925",
"0.69905216",
"0.6945115",
"0.69099",
"0.6883533",
"0.6870114",
"0.6839461",
"0.6832885",
"0.6819441",
"0.68167114",
"0.67319... | 0.87597513 | 0 |
Return a tensor with the input `shape` as a view into the 1D data starting at `start_index`. | def NMoC(YKHO, ROpF, V_8U):
ixQc = V_8U + ROpF.numel()
assert ixQc <= YKHO.numel, 'requested tensor is out of the buffer range.'
whKG = YKHO.data[V_8U:ixQc]
whKG = whKG.view(ROpF)
return whKG | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NMoC(YKHO, ROpF, V_8U):\n ixQc = V_8U + ROpF.numel()\n assert ixQc <= YKHO.numel, 'requested tensor is out of the buffer range.'\n whKG = YKHO.data[V_8U:ixQc]\n whKG = whKG.view(ROpF)\n S2Ft = None\n if YKHO.chunk_size_mb > 0:\n S2Ft = {}\n yOAJ = V_8U // YKHO.chunk_size_numel\n... | [
"0.68399453",
"0.6205586",
"0.61840576",
"0.601351",
"0.59260154",
"0.5923639",
"0.56977856",
"0.5692654",
"0.5607995",
"0.5607995",
"0.55722106",
"0.55469406",
"0.5503701",
"0.5488912",
"0.5483832",
"0.548155",
"0.54281",
"0.54267395",
"0.5413686",
"0.54016733",
"0.5383944",... | 0.74792767 | 0 |
Given three ints, a b c, return True if one of b or c is "close" (differing from a by at most 1), while the other is "far", differing from both other values by 2 or more. | def W5rR(jzdc, Fg_i, Z9rn):
return abs(jzdc - Fg_i) <= 1 and abs(jzdc - Z9rn) >= 2 and (abs(Fg_i - Z9rn) >= 2) or (abs(jzdc - Z9rn) <= 1 and abs(jzdc - Fg_i) >= 2 and (abs(Fg_i - Z9rn) >= 2)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KvQz(jzdc: int, Fg_i: int, Z9rn: int) -> bool:\n if jzdc <= 0 or Fg_i <= 0 or Z9rn <= 0:\n return False\n if Fg_i > Z9rn and Fg_i > jzdc:\n ycBG = Z9rn\n Z9rn = Fg_i\n Fg_i = ycBG\n elif jzdc > Z9rn and jzdc > Fg_i:\n ycBG = Z9rn\n Z9rn = jzdc\n jzdc = ... | [
"0.71815836",
"0.70824295",
"0.70739543",
"0.68577456",
"0.6846581",
"0.68103373",
"0.6766775",
"0.6705323",
"0.66909766",
"0.66416955",
"0.6593062",
"0.65872604",
"0.6561463",
"0.65589684",
"0.65484095",
"0.65334606",
"0.64958733",
"0.64958733",
"0.64949065",
"0.64842415",
"... | 0.80655634 | 0 |
Ensure that a ValueError is raised when one passes an init_vals argument of the wrong length. | def EwtJ(YKHO):
JfyU = E2GL.check_length_of_init_values
i1kd = YKHO.estimator.check_length_of_initial_values
for YRbF in [-1, 1]:
Enpg = oyIN.ones(YKHO.fake_design_3d.shape[2] + YRbF)
YKHO.assertRaisesRegexp(ValueError, 'wrong dimension', JfyU, YKHO.fake_design_3d, Enpg)
YKHO.assertR... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LjFi(YKHO):\n YKHO.failUnlessRaises(ValueError, AXCM, (5, 15), (0, 10))\n YKHO.failUnlessRaises(ValueError, AXCM, (5, 15), (6, 10))\n YKHO.failUnlessRaises(ValueError, AXCM, (5, 15), (0, 17))",
"def xCUo(YKHO):\n Ty9i = oyIN.zeros((4, 2))\n with YKHO.assertRaises(ValueError):\n XP5J = S... | [
"0.7353667",
"0.7016591",
"0.67153054",
"0.65869236",
"0.6476186",
"0.64497876",
"0.6427415",
"0.6396933",
"0.63915175",
"0.63465464",
"0.63291144",
"0.63291144",
"0.62569445",
"0.6237824",
"0.6178644",
"0.61576426",
"0.6144498",
"0.61329895",
"0.61130834",
"0.61068094",
"0.6... | 0.6573373 | 4 |
Ensure that a ValueError is raised when `return_long_probs == False` and `choice_col is None`. | def xKpG(YKHO):
JfyU = YKHO.mixl_obj.panel_predict
qIxc = [None, 20]
tO9_ = 'choice_col is None AND return_long_probs == False'
YKHO.assertRaisesRegexp(ValueError, tO9_, JfyU, *qIxc, return_long_probs=False, choice_col=None)
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zt9j(YKHO):\n JfyU = EqBn.calc_probabilities\n qIxc = [oyIN.arange(9).reshape((3, 3)), oyIN.arange(9).reshape((3, 3)), None, None, None, None]\n tO9_ = 'chosen_row_to_obs is None AND return_long_probs is False'\n YKHO.assertRaisesRegexp(ValueError, tO9_, JfyU, *qIxc)\n return None",
"def qnji(... | [
"0.69163567",
"0.5911815",
"0.54586476",
"0.54421043",
"0.54104686",
"0.5392935",
"0.5225253",
"0.52097213",
"0.5116874",
"0.5114808",
"0.5092475",
"0.5055703",
"0.5032665",
"0.5005064",
"0.50014937",
"0.49884328",
"0.49605396",
"0.49539605",
"0.4952425",
"0.48897374",
"0.488... | 0.6635685 | 1 |
Ensures that a ValueError is raised when users try to use any other type of initial value input methods other than the `init_vals` argument of `fit_mle()`. This prevents people from expecting the use of outside intercept or shape parameters to work with the Mixed Logit model. | def QoXg(YKHO):
k_ho = [YKHO.fake_betas, 800]
kS7o = {'init_shapes': oyIN.array([1, 2]), 'print_res': False}
rbe3 = {'init_intercepts': oyIN.array([1]), 'print_res': False}
Rcun = {'init_coefs': oyIN.array([1]), 'print_res': False}
for B2fa in [kS7o, rbe3, Rcun]:
YKHO.assertRaises(ValueError... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hMnU(YKHO, d7pR, B2fa, P1dF):\n with trZe.raises(P1dF):\n nPrm.Dense(d7pR, **B2fa)",
"def FIMM(YKHO, EcVT, **B2fa):\n super(lzS9, YKHO).__init__(EcVT, **B2fa)",
"def jLxA(NArs, YXxD):\n EcVT = [[1], [2]]\n with trZe.raises(ValueError, match=YXxD):\n qFQ2(**NArs).fit(EcVT)",
"def... | [
"0.59483165",
"0.5608867",
"0.5599926",
"0.5599926",
"0.5596578",
"0.5596578",
"0.55890113",
"0.55688256",
"0.5551122",
"0.5518817",
"0.55133975",
"0.5504748",
"0.5500485",
"0.5474647",
"0.54614806",
"0.5429727",
"0.54277843",
"0.54254746",
"0.5405873",
"0.5403165",
"0.539134... | 0.6131436 | 0 |
Ensure that the desired placeholder is returned since we don't calculate the analytic hessian, and the BHHH approximation is already used to approximate the hessian. | def zx2f(YKHO):
xgkW = oyIN.diag(-1 * oyIN.ones(YKHO.fake_betas_ext.shape[0]))
JfyU = YKHO.estimator.convenience_calc_fisher_approx
DoA8 = JfyU(YKHO.fake_betas_ext)
eQHC.assert_allclose(xgkW, DoA8)
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DQHZ(YKHO):\n YDbF = 1\n YKHO.estimator.constrained_pos = [YDbF]\n JfyU = YKHO.estimator.convenience_calc_hessian\n GL5i = JfyU(YKHO.fake_betas_ext)\n YKHO.assertEqual(GL5i[YDbF, :].tolist(), [0, -1, 0, 0])\n YKHO.assertEqual(GL5i[:, YDbF].tolist(), [0, -1, 0, 0])\n return None",
"def HM... | [
"0.66036457",
"0.6061728",
"0.5682625",
"0.5506261",
"0.54014033",
"0.53877294",
"0.53764963",
"0.53692824",
"0.5367385",
"0.53643185",
"0.5232455",
"0.5232455",
"0.5226799",
"0.52214354",
"0.52154684",
"0.5209896",
"0.5201649",
"0.5201649",
"0.5201649",
"0.51962686",
"0.5186... | 0.0 | -1 |
Returns the result of calling `fn` on master, broadcasted to all other ranks. Specifically, `fn` is only executed on master, but its result is returned by every rank by broadcasting the return value from master. | def ijYg(FYKK, UYxK):
Aofo = FYKK() if sO9y() else None
if UYxK:
mWFP = f'broadcast_return_{int(ITS7.time())}'
Aofo = bHf7.broadcast_object(Aofo, name=mWFP)
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ijYg(YKHO, FYKK):\n Aofo = FYKK() if YKHO.is_coordinator() else None\n if YKHO._distributed:\n mWFP = f'broadcast_return_{int(ITS7.time())}'\n Aofo = YKHO._distributed.broadcast_object(Aofo, name=mWFP)\n return Aofo",
"def zveg(YKHO, FYKK):\n return spHt.get([yzQ0.apply.remote(FYKK)... | [
"0.73020816",
"0.63803256",
"0.61052334",
"0.5873832",
"0.58617425",
"0.57582635",
"0.555623",
"0.5455191",
"0.54005426",
"0.5370589",
"0.5296988",
"0.52894586",
"0.5272977",
"0.5266363",
"0.5254119",
"0.5237568",
"0.5220896",
"0.5185394",
"0.51811314",
"0.5180963",
"0.514264... | 0.6971117 | 1 |
Get a command spec from the given (resolved) command, and distinguish default args vs. nondefault args. | def vsDQ(HCmI):
qIxc, B7wk, K9QH, kdNf = tq_1.getargspec(HCmI)
assert K9QH is None, 'Variable kwargs are not allowed in commands.'
if qIxc is None:
qIxc = tuple()
if kdNf is None:
kdNf = tuple()
if isinstance(HCmI, SnBA.MethodType):
qIxc = qIxc[1:]
Ti4m = len(qIxc) - len(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iDx9(YKHO, oUZx):\n hH5y = {'pattern': '\\\\[.*?\\\\] (\\\\/.*?)?\\\\>'}\n return hH5y[oUZx]",
"def VXZS(YKHO):\n Asoz = None\n if YKHO.cli_args[g2c2.SETUP] is True:\n Asoz = g2c2.SETUP\n elif YKHO.cli_args[g2c2.TEARDOWN] is True:\n Asoz = g2c2.TEARDOWN\n elif YKHO.cli_args[g2... | [
"0.6657886",
"0.653348",
"0.64140385",
"0.6362996",
"0.6137928",
"0.61336946",
"0.612885",
"0.6112686",
"0.61040497",
"0.60919684",
"0.60621774",
"0.60527813",
"0.60390544",
"0.5998448",
"0.59867686",
"0.59732217",
"0.59640974",
"0.5956698",
"0.5942562",
"0.59425205",
"0.5933... | 0.75725144 | 0 |
Displays the clip in a window, at the given frames per second (of movie) rate. It will avoid that the clip be played faster than normal, but it cannot avoid the clip to be played slower than normal if the computations are complex. In this case, try reducing the ``fps``. | def j67x(vJPk, XkN1, bW5R=15, D8Si=True, Ywat=22050, b2LS=3000, ZfOr=2):
D8Si = D8Si and vJPk.audio is not None
if D8Si:
E3f7 = T6FA.Event()
tgW4 = T6FA.Event()
gKdj = T6FA.Thread(target=vJPk.audio.preview, args=(Ywat, b2LS, ZfOr, tgW4, E3f7))
gKdj.start()
VXjJ = vJPk.get_fra... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cYAs(YKHO, bW5R=60, D8Si=False, Ywat=22050, b2LS=3000, ZfOr=2):\n D8Si = D8Si and vJPk.audio is not None\n if D8Si:\n E3f7 = T6FA.Event()\n tgW4 = T6FA.Event()\n gKdj = T6FA.Thread(target=vJPk.audio.preview, args=(Ywat, b2LS, ZfOr, tgW4, E3f7))\n gKdj.start()\n vJPk = YKHO.... | [
"0.6586971",
"0.63045156",
"0.6205363",
"0.6194887",
"0.619481",
"0.6191202",
"0.60074395",
"0.59631205",
"0.58414465",
"0.58214784",
"0.5806259",
"0.580223",
"0.58018655",
"0.57968754",
"0.57865983",
"0.5754097",
"0.5734025",
"0.57339174",
"0.5720081",
"0.56828195",
"0.56707... | 0.0 | -1 |
Return True if the current request is a JSON/AJAX request. | def xuf3():
m5r4 = QePW.content_type
return m5r4 and 'application/json' in m5r4 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ng8v(QePW: quart.local.LocalProxy) -> bool:\n return QePW.content_type == 'application/json'",
"def hXEJ(YKHO):\n YXRZ = YKHO.meta.get('HTTP_X_REQUESTED_WITH', '')\n return YXRZ.lower() == 'xmlHttpRequest'",
"def maTj() -> bool:\n ...",
"def maTj(YKHO):\n return YKHO.is_xhr",
"def eHEG(Q... | [
"0.80521184",
"0.78806704",
"0.7772284",
"0.777131",
"0.768944",
"0.76065636",
"0.7472567",
"0.7472567",
"0.7466093",
"0.74557555",
"0.72471505",
"0.72008604",
"0.71962184",
"0.7117631",
"0.70505714",
"0.7041531",
"0.7036446",
"0.69501287",
"0.69276774",
"0.6783062",
"0.67412... | 0.83278126 | 0 |
Returns the string representation of the model | def gTzM(YKHO):
return CgYo.pformat(YKHO.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return YKHO.text",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\... | [
"0.86418265",
"0.85103965",
"0.7853324",
"0.77442306",
"0.7712258",
"0.76979405",
"0.765959",
"0.7637644",
"0.76218504",
"0.7607561",
"0.7606604",
"0.7606604",
"0.7606604",
"0.75990754",
"0.7585653",
"0.758149",
"0.7570811",
"0.7567585",
"0.75392604",
"0.75392604",
"0.7527967... | 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 return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.8392633",
"0.8354901",
"0.82950056",
"0.8132309",
"0.81149805",
"0.8099986",
"0.809911",
"0.8097883",
"0.8097883",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8066694",
"0.80594814",
"0.805757",
"0.8046496",
"0.80461895",
"0.8043786",
"0.8043786",
... | 0.8092252 | 9 |
freeze vars. If freeze_bn then only freeze batch_norm params. | def M5wK(C3ST, XuY2, OXzC=False):
assert XuY2 in ['weight', 'bias', 'popup_scores']
for YRbF, Ty9i in C3ST.named_modules():
if hasattr(Ty9i, XuY2):
if not isinstance(Ty9i, (U78l.BatchNorm2d, U78l.BatchNorm2d)) or OXzC:
if getattr(Ty9i, XuY2) is not None:
g... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FiJ9(YKHO):\n for XP5J in YKHO.parameters():\n XP5J.requires_grad = False\n LTQ5.convert_frozen_batchnorm(YKHO)",
"def tMEJ(YKHO) -> None:\n if YKHO.frozen_stages >= 0:\n YKHO.patch_embed.eval()\n for xqoZ in YKHO.patch_embed.parameters():\n xqoZ.requires_grad = False... | [
"0.7836109",
"0.72791165",
"0.71713334",
"0.7138008",
"0.7085011",
"0.70803624",
"0.70672",
"0.7047827",
"0.7030976",
"0.70258784",
"0.69737315",
"0.6972279",
"0.693258",
"0.6788581",
"0.6788581",
"0.67379415",
"0.6736234",
"0.66700685",
"0.66398895",
"0.6619712",
"0.66020906... | 0.7223927 | 2 |
Convert a subnet state dict (with subnet layers) to dense i.e., which can be directly loaded in network with dense layers. | def Cf3n(i5Lm, XP5J):
A0RF = {}
for G1Hx, Ty9i in i5Lm.items():
if 'popup_scores' not in G1Hx:
A0RF[G1Hx] = Ty9i
for G1Hx, Ty9i in i5Lm.items():
if 'popup_scores' in G1Hx:
KCHu = ht2j.abs(i5Lm[G1Hx])
yvT9 = KCHu.clone()
bGrB, or8S = KCHu.flatte... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yxIO(C3ST, xA7f):\n C3ST.load_state_dict(xA7f, strict=False)",
"def n5rA(YKHO, BJY9):\n YKHO.nets.load_state_dict(BJY9)",
"def NG8_(YKHO):\n return l6ZH(XTiz.block(YKHO._b.tolist()))",
"def I7HR(YKHO, QTBn):\n ...",
"def Qn9b(Crrw, N6Z1, _mSQ):\n ZHfW = ZylS.cast(ZylS.ones_like(Crrw).to_... | [
"0.81308186",
"0.5815956",
"0.5633799",
"0.5566032",
"0.5557249",
"0.5530359",
"0.54852194",
"0.54819906",
"0.5471867",
"0.5411097",
"0.53862053",
"0.5329935",
"0.53092957",
"0.5274862",
"0.52647966",
"0.52590686",
"0.524682",
"0.5235268",
"0.5232913",
"0.52235806",
"0.521700... | 0.73843163 | 1 |
An exception is passed in and this function returns the proper string depending on the result so it is readable enough. | def R0ZH(BQDi):
if str(BQDi):
return '%s: %s' % (BQDi.__class__.__name__, BQDi)
else:
return '%s' % BQDi.__class__.__name__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fJRf(AJ5d):\n return '' if str(AJ5d) is None else ': ' + str(AJ5d)",
"def zAzQ(YKHO, XObx, QOe9):\n return XObx",
"def zAzQ(YKHO, XObx, QOe9):\n return QOe9.tidy_error(XObx)",
"def zAzQ(YKHO, XObx, QOe9):\n zXzD = super(tA6_, YKHO)._exc_info_to_string(XObx, QOe9)\n bGrB, BQDi, bGrB = XObx\... | [
"0.75154454",
"0.7345424",
"0.727316",
"0.7249816",
"0.7211436",
"0.7104965",
"0.70940036",
"0.70897156",
"0.70838743",
"0.7051901",
"0.7027484",
"0.7002266",
"0.6961192",
"0.6946989",
"0.6938228",
"0.68450963",
"0.6841432",
"0.6839627",
"0.68187314",
"0.6807045",
"0.6802849"... | 0.7015582 | 11 |
find pkgs in path and return their package names | def yJtI(Emd4, pmON):
k4DY = list()
for pGQh, iIh5, iumf in Hy7s.walk(pmON):
k4DY += [Hy7s.path.join(pGQh, mWFP) for mWFP in iumf if mWFP.endswith('deb')]
aj33 = list()
for hkDd in k4DY:
HCmI = ['dpkg-deb', '-f', hkDd, 'Package']
aj33.append(p4Z5(HCmI, quiet=True).rstrip())
r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ekv6(uD0t):\n return MSBX.getallkeys(uD0t, [])",
"def XtZ5(pmON: AnyStr=jONw, y0cW: AnyStr=''):\n yield y0cW\n y0cW += '.'\n for bGrB, mWFP, OZeO in KZ0I(pmON, y0cW):\n if OZeO:\n yield mWFP",
"def klC6():\n sKYw = BJsk.getPackageDir()\n for dir in sKYw:\n print('... | [
"0.721831",
"0.71974874",
"0.71120197",
"0.7081645",
"0.70679617",
"0.7051473",
"0.6922264",
"0.6922264",
"0.6922264",
"0.6922264",
"0.6922264",
"0.6922264",
"0.6922264",
"0.6922264",
"0.6902379",
"0.69007015",
"0.6850193",
"0.68488795",
"0.67545116",
"0.6715236",
"0.6710036"... | 0.0 | -1 |
Convert a string representation of truth to True or False True values are 'y', 'yes', or ''; caseinsensitive False values are 'n', or 'no'; caseinsensitive Raises ValueError if 'val' is anything else. | def YcAF(wEf2):
SfW7 = ['yes', 'y', '']
jwcL = ['no', 'n']
try:
wEf2 = wEf2.lower()
except AttributeError:
wEf2 = str(wEf2).lower()
if wEf2 in SfW7:
return True
elif wEf2 in jwcL:
return False
else:
raise ValueError('Invalid input value: %s' % wEf2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oOc6(wEf2):\n if wEf2 is None:\n return False\n wEf2 = wEf2.lower().strip()\n if wEf2 in ['true', 't', 'yes', 'y', '1', 'on']:\n return True\n elif wEf2 in ['false', 'f', 'no', 'n', '0', 'off']:\n return False",
"def oOc6(Sc9E):\n assert isinstance(Sc9E, str)\n Sc9E = S... | [
"0.83497494",
"0.79363406",
"0.79355955",
"0.79319495",
"0.79278433",
"0.7803689",
"0.77961403",
"0.7795392",
"0.77614105",
"0.77067256",
"0.76328236",
"0.76214576",
"0.7620553",
"0.76100045",
"0.7603119",
"0.7601774",
"0.7581703",
"0.7577883",
"0.7552534",
"0.749022",
"0.749... | 0.7927259 | 5 |
return the digits length of an integer | def Xhh8(FGW3):
return len(str(abs(FGW3))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XCMo(kAne):\n return len(str(abs(int(kAne))))",
"def CyTW(exwG: int) -> int:\n return len(str(exwG))",
"def c4sQ(kAne):\n BHGE = 0\n while kAne >= 1:\n BHGE += 1\n kAne = kAne / 10\n return BHGE",
"def XT8m(YKHO, FGW3):\n return len(str(FGW3))",
"def wCBj(exwG):\n ret... | [
"0.8995415",
"0.8494853",
"0.8160524",
"0.80124635",
"0.77777493",
"0.7681124",
"0.76258665",
"0.76146626",
"0.7600441",
"0.7599192",
"0.75596595",
"0.7557349",
"0.7483967",
"0.7404453",
"0.7372116",
"0.7355205",
"0.735434",
"0.73313785",
"0.73204535",
"0.7317363",
"0.7312565... | 0.8036458 | 3 |
Returns a matcher that returns the setting with the given interface. | def P0Vj(mBOY, dm7U, iquo):
wohN = (mBOY, dm7U, iquo)
def dTTS(begE):
for YqMg in begE.iterSettings():
if bcsr(YqMg) == wohN:
return YqMg
return dTTS | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gW2b(WURU, hkS8):\n OcoI = WURU.get_rtype()\n if isinstance(OcoI, QZcN.InterfaceView) and OcoI.has_property(hkS8):\n return AZfP\n else:\n return None",
"def WPcm(YKHO):\n fJbk = YKHO.ITestInterfaceMock(spec_set=True)\n KAOR = fJbk()\n tnCY(YKHO.ITestInterface, KAOR)\n YKHO... | [
"0.56034344",
"0.5592002",
"0.5372469",
"0.5371011",
"0.53291994",
"0.52994746",
"0.5181644",
"0.51618236",
"0.5146715",
"0.5119477",
"0.5081312",
"0.5051892",
"0.50505966",
"0.50318944",
"0.50262356",
"0.5012742",
"0.49713612",
"0.4936067",
"0.49330512",
"0.49330512",
"0.493... | 0.7050729 | 0 |
Return the camera of the active 3D viewport if any | def BuUZ():
return ccKF.lookThru(query=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ktfw(YKHO):\n BHv1 = next((f0tD for f0tD in kZw_.context.screen.areas if f0tD.type == 'VIEW_3D'))\n BHv1.spaces[0].region_3d.view_perspective = 'CAMERA'",
"def yDvq(YKHO):\n return YKHO.renderer.scene.camera",
"def yDvq(YKHO):\n from cross3d import SceneCamera\n yDvq = YKHO._nativeCamera()\n... | [
"0.78853434",
"0.7612008",
"0.76027864",
"0.7462959",
"0.7459398",
"0.7409842",
"0.73676956",
"0.718774",
"0.7093065",
"0.69362986",
"0.69132864",
"0.6883563",
"0.6862947",
"0.6850501",
"0.67423207",
"0.67335576",
"0.67181885",
"0.6717855",
"0.67072815",
"0.6644139",
"0.66209... | 0.71611613 | 8 |
Set all the models panels to the specified renderer. It will do a reset of everything regarding the Viewport 2.0 if no model panels use it. | def lfh0(pFW3, SiRx=True):
la8A = ccKF.getPanel(type='modelPanel') or []
for BcQj in la8A:
ccKF.modelEditor(BcQj, edit=True, rendererName=pFW3)
if SiRx or Hy7s.environ.get('MAYA_DISABLE_VP2_WHEN_POSSIBLE', False):
ccKF.ogs(reset=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zYcd(YKHO):\n for ZeqR in ['daylight_behaviours', 'daylight_ke']:\n YKHO.renderers[ZeqR].data_source.data = {'x': [], 'y': [], 'width': [], 'height': []}\n YKHO.renderers['ke'].data_source.data = {'x': [], 'y': []}\n for qLjU in ['trophallaxis', 'laying', 'entrance']:\n YKHO.renderers[qL... | [
"0.6404142",
"0.62488806",
"0.61697584",
"0.5715071",
"0.5708538",
"0.55064565",
"0.5500077",
"0.54926264",
"0.54825354",
"0.54265136",
"0.5397263",
"0.5386266",
"0.53055924",
"0.52697736",
"0.52277046",
"0.522312",
"0.5204477",
"0.51646906",
"0.51497453",
"0.51432633",
"0.51... | 0.82066196 | 0 |
Generate points on a spiral. | def v7OK(r1VO, YPaw, B1Wx=0.1, YylR=0.0, yKcO=0.0, XSoh=-1):
pImw = yKcO + 0.0
jNOo = []
while pImw * epAf.hypot(epAf.cos(YylR), epAf.sin(YylR)) < r1VO:
wk7y = []
wk7y.append(pImw * epAf.cos(YylR) * XSoh)
wk7y.append(pImw * epAf.sin(YylR))
jNOo.append(wk7y)
pImw += YP... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CCmU():\n exwG = vC9B = WKvO = LVAh = 0\n while True:\n exwG += 1\n Csk6 = (exwG + 1) / 2\n vC9B += Csk6\n G1Hx = exwG % 4\n if G1Hx == 1:\n WKvO += Csk6\n elif G1Hx == 2:\n LVAh += Csk6\n elif G1Hx == 3:\n WKvO -= Csk6\n ... | [
"0.79997426",
"0.7685126",
"0.76044756",
"0.74394727",
"0.7385333",
"0.7315298",
"0.72959065",
"0.7294219",
"0.7181277",
"0.6994483",
"0.69749635",
"0.696081",
"0.6960028",
"0.69446033",
"0.6924294",
"0.6862784",
"0.682365",
"0.6810389",
"0.67639667",
"0.67241526",
"0.6668996... | 0.67014104 | 20 |
convert query results to dictionary using date as key and prcp as value | def aj9W():
dixj = cuiw.query(Ny6I.date, Ny6I.prcp).all()
dixj = list(oyIN.ravel(dixj))
return pz3A(dixj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aCqS(YKHO):\n Csk6 = {}\n for JRYC, NZA8, WyFx, Lg1t, sOCm in YKHO.get_queryset().values_list('date', 'team1', 'team2', 'team1_result', 'team2_result'):\n H5ew = (NZA8, JRYC)\n Csk6[H5ew] = Lg1t\n gfpw = (WyFx, JRYC)\n Csk6[gfpw] = sOCm\n return Csk6",
"def OScg():\n \... | [
"0.71772313",
"0.71108717",
"0.7044618",
"0.69488907",
"0.69320506",
"0.6714008",
"0.66596466",
"0.66260993",
"0.6614652",
"0.65781146",
"0.65577",
"0.6540568",
"0.6510639",
"0.65062726",
"0.6501218",
"0.6494973",
"0.6486188",
"0.64687604",
"0.6366",
"0.6328501",
"0.6328501",... | 0.61601835 | 30 |
helper function to get a list of weights given a list of keras layers and tf variables | def iShw(yv6U):
_mSQ = []
for vC9B in yv6U:
if isinstance(vC9B, ZylS.Variable):
_mSQ.append(vC9B)
else:
_mSQ.extend(vC9B.weights)
return _mSQ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wT46():\n return [Ty9i for Ty9i in ZylS.get_collection(ZylS.GraphKeys.TRAINABLE_VARIABLES) if Ty9i.name.endswith('weights:0')]",
"def wT46(BHCt):\n _mSQ = []\n upAO = []\n fKMN = BHCt.get_variable_names()\n for lzjZ in fKMN:\n if lzjZ.endswith('kernel'):\n upAO.insert(0, BHCt... | [
"0.7893407",
"0.73828155",
"0.71986127",
"0.7134054",
"0.6961257",
"0.6934427",
"0.6865233",
"0.6835061",
"0.67869693",
"0.67865306",
"0.67865306",
"0.6710944",
"0.67090994",
"0.6666144",
"0.6663306",
"0.6651647",
"0.6635247",
"0.6611062",
"0.66021866",
"0.65998465",
"0.65829... | 0.7676927 | 1 |
Returns a list of all weights unique to agent | def wT46(Emd4):
return iShw(Emd4.layers) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _mSQ(YKHO) -> x1iM[float]:\n return [Acvy.weight for Acvy in YKHO.population]",
"def _mSQ(YKHO) -> x1iM:\n return YKHO._weights",
"def _mSQ(YKHO):\n VfKt = 1 / YKHO.b.rewards_count * 0.5\n YLhe = 1 / (len(YKHO) - YKHO.b.rewards_count) * 0.5\n _mSQ = []\n for a1PO in YKHO.b.trajectories:\n... | [
"0.70844215",
"0.70387495",
"0.70385665",
"0.6862263",
"0.6849158",
"0.68463546",
"0.6818284",
"0.6813623",
"0.68065816",
"0.6772876",
"0.6772876",
"0.6751869",
"0.67167485",
"0.67080945",
"0.6687405",
"0.6622557",
"0.6578711",
"0.6575505",
"0.6572575",
"0.6543801",
"0.653751... | 0.6057232 | 84 |
Returns a list of all weights shared by all agents | def KdOP(Emd4):
return iShw(Emd4.shared_layers) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wT46(YKHO):\n return [YRbF.get_weight() for YRbF in YKHO.synapses]",
"def _ZnB(Emd4):\n return iShw(Emd4.layers + Emd4.shared_layers)",
"def TqsC(YKHO):\n rEli = []\n if YKHO.edge_function is not None:\n rEli.extend(YKHO.edge_function.weights)\n if YKHO.node_function is not None:\n ... | [
"0.6689013",
"0.6433613",
"0.63470036",
"0.6326555",
"0.63225067",
"0.63077676",
"0.62624824",
"0.625918",
"0.61999136",
"0.6142702",
"0.61285776",
"0.6109704",
"0.606053",
"0.60584015",
"0.60385334",
"0.6034019",
"0.5986194",
"0.5983276",
"0.5971149",
"0.5971149",
"0.5949712... | 0.6737108 | 0 |
Returns a list of all agent weights | def _ZnB(Emd4):
return iShw(Emd4.layers + Emd4.shared_layers) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _mSQ(YKHO) -> x1iM:\n return YKHO._weights",
"def wT46(YKHO):\n _mSQ = []\n for Q6kx in YKHO.__nodes:\n _mSQ.append(Q6kx.get_weights())\n return _mSQ",
"def js1f(YKHO):\n return YKHO.weights",
"def _mSQ(YKHO) -> x1iM[float]:\n return [Acvy.weight for Acvy in YKHO.population]",
... | [
"0.75348526",
"0.7459169",
"0.73774284",
"0.73634845",
"0.73090535",
"0.724946",
"0.724946",
"0.7174892",
"0.71670824",
"0.7159578",
"0.71262854",
"0.71238446",
"0.70968753",
"0.7095251",
"0.70746607",
"0.70497245",
"0.70328546",
"0.70328546",
"0.70285374",
"0.70285374",
"0.7... | 0.6626325 | 63 |
If a user prefers both sexes (a 2 in the interest column), this will determine if the user prefers one gender over the other. | def X0Zn(mcYW):
YEhS = len(oyIN.where(mcYW == 1)[0])
W9Xv = len(oyIN.where(mcYW == 0)[0])
h5Sb = YEhS / (W9Xv + YEhS)
OvIQ = 1 - h5Sb
return (h5Sb, OvIQ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KKmm(YKHO):\n return int(YKHO.gender_code) % 2 != 0",
"def RKMB(YKHO):\n return int(YKHO.gender_code) % 2 == 0",
"def sZPm(jQ3Z):\n jQ3Z['is_Female'] = jQ3Z.Sex.apply(lambda rdlD: 0 if rdlD == 'male' else 1)\n return jQ3Z",
"def KKmm(YKHO):\n return YKHO.get_gender() in YKHO.male_codes",
... | [
"0.7241815",
"0.70580673",
"0.6750698",
"0.6693852",
"0.6642768",
"0.66228473",
"0.65315956",
"0.62543094",
"0.6237165",
"0.6184301",
"0.6153582",
"0.61280006",
"0.6101741",
"0.59126955",
"0.5911255",
"0.59075487",
"0.58998066",
"0.58964276",
"0.5895246",
"0.5885636",
"0.5871... | 0.6503289 | 7 |
If number is even (number // 2) else (3 number + 1) | def Q0A9(FGW3):
if FGW3 > 1:
paSp = 0
while FGW3 != 1:
if FGW3 % 2 == 0:
print('Number is even and will be divided by 2 without a decimal: ' + str(FGW3 // 2))
FGW3 = FGW3 // 2
paSp += 1
else:
print('Number is odd... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sTzf(FGW3):\n if FGW3 % 2 == 0:\n print('even')\n else:\n print('odd')",
"def s3mC(FGW3):\n if FGW3 % 2 == 0:\n return 'EVEN'\n else:\n return 'ODD'",
"def cLIG(FGW3):\n if FGW3 % 2 == 0:\n return 'even'\n if FGW3 % 1 == 0:\n return 'odd'",
"def... | [
"0.76017636",
"0.7447986",
"0.74461097",
"0.74332803",
"0.74065876",
"0.73843354",
"0.73843354",
"0.73843354",
"0.73843354",
"0.73538667",
"0.73436683",
"0.7339469",
"0.7328284",
"0.7319466",
"0.7266632",
"0.7221541",
"0.72168434",
"0.72168434",
"0.7207196",
"0.71726567",
"0.... | 0.0 | -1 |
Setup the test fixture for the Unit class. | def FCbF(YKHO):
YKHO.DUT = wOed() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FCbF(YKHO):\n YKHO.test_adapter = YB18()",
"def FCbF(YKHO) -> None:\n pass",
"def FCbF(YKHO) -> None:\n pass",
"def FCbF(YKHO) -> None:\n pass",
"def izSt(Emd4):\n pass",
"def izSt(Emd4):\n pass",
"def izSt(Emd4):\n pass",
"def FCbF(YKHO):\n pass",
"def FCbF(YKHO):\n ... | [
"0.75500804",
"0.75350076",
"0.75350076",
"0.75350076",
"0.7530247",
"0.7530247",
"0.7530247",
"0.75284714",
"0.75284714",
"0.75284714",
"0.75284714",
"0.75284714",
"0.75284714",
"0.75284714",
"0.75284714",
"0.75284714",
"0.75284714",
"0.75284714",
"0.75284714",
"0.75284714",
... | 0.0 | -1 |
Returns the satisfaction degree of v wrt. the partition element | def yGTL(YKHO, Ty9i):
U5bT = 0.0
if '*' in YKHO._cats:
U5bT = 1.0
elif Ty9i in YKHO._cats:
U5bT = YKHO._cats[Ty9i]
return U5bT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tjON(YKHO, Ty9i: int) -> int:\n pass",
"def tjON(YKHO, Ty9i):\n yKcO = YKHO.n_indptr[Ty9i]\n JCyR = YKHO.n_indptr[Ty9i + 1]\n return int(JCyR - yKcO)",
"def iiPn(iArr):\n return len(iArr[iArr > 0.5])",
"def tjON(YKHO, Ty9i):\n tjON = 0\n vtfo = False\n for tTpl in YKHO.edges:\n ... | [
"0.6883016",
"0.68186",
"0.6808155",
"0.67159504",
"0.6657336",
"0.6586303",
"0.6564956",
"0.65131074",
"0.6346365",
"0.6329687",
"0.6281105",
"0.6281105",
"0.62753356",
"0.6231786",
"0.6146011",
"0.61026615",
"0.6093302",
"0.6091334",
"0.6043284",
"0.6037294",
"0.60100067",
... | 0.0 | -1 |
Returns the satisfaction degree of v wrt. the partition element | def yGTL(YKHO, Ty9i):
yGTL = 0.0
if Ty9i is not None and Ty9i != 'NA':
Ty9i = float(Ty9i)
if Ty9i >= YKHO._maxSupport or Ty9i <= YKHO._minSupport:
yGTL = 0.0
elif Ty9i < YKHO._minCore:
yGTL = 1 - (YKHO._minCore - Ty9i) / (YKHO._minCore - YKHO._minSupport)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tjON(YKHO, Ty9i: int) -> int:\n pass",
"def tjON(YKHO, Ty9i):\n yKcO = YKHO.n_indptr[Ty9i]\n JCyR = YKHO.n_indptr[Ty9i + 1]\n return int(JCyR - yKcO)",
"def iiPn(iArr):\n return len(iArr[iArr > 0.5])",
"def tjON(YKHO, Ty9i):\n tjON = 0\n vtfo = False\n for tTpl in YKHO.edges:\n ... | [
"0.6882732",
"0.68174535",
"0.6807888",
"0.671559",
"0.6656638",
"0.6585624",
"0.65638447",
"0.65147597",
"0.6345168",
"0.632944",
"0.6280448",
"0.6280448",
"0.62769645",
"0.62306195",
"0.6146018",
"0.6102051",
"0.6094045",
"0.6092278",
"0.6044014",
"0.6036668",
"0.60114723",... | 0.0 | -1 |
Calculate deaths by applying death rates to nonmigrating population | def l6wl(jQ3Z, Aha8, IKzO):
jQ3Z['deaths'] = (jQ3Z['non_mig_pop'] * jQ3Z['death_rate']).round()
ovnL = jQ3Z[jQ3Z.deaths != 0].copy()
ovnL = ovnL.drop(['mig_in_net'], 1)
RKD7.insert_run('defm.db', Aha8, ovnL, 'deaths_by_cohort_by_age')
ovnL = ovnL.reset_index(drop=False)
ovnL = ovnL.drop(['non_mi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ei26(vxQw):\n a9Tm = rLdf.read_csv('../data/annualCauseofDeathProbs_age_gender_race.csv')\n GcI9 = rLdf.read_csv('../data/annualDeathProbs_age_gender_race.csv')\n GcI9[GcI9.annual_death_prob == FfMS] = 1.0\n hL0z = rLdf.read_csv('../data/job_indexed_likelihood.csv')\n pEvR = vxQw['age']\n oCf... | [
"0.6711303",
"0.6628052",
"0.65901995",
"0.65233254",
"0.6472335",
"0.63912326",
"0.6350136",
"0.6260819",
"0.62358797",
"0.61517406",
"0.6094961",
"0.6073923",
"0.60400766",
"0.6037209",
"0.60281664",
"0.60215694",
"0.6020825",
"0.6009645",
"0.59841555",
"0.59822863",
"0.597... | 0.72589064 | 0 |
take 1D float array of rewards and compute discounted reward | def AC1_(Mkmy):
g2lU = oyIN.zeros_like(Mkmy)
S8qo = 0
for a1PO in reversed(range(len(g2lU))):
if Mkmy[a1PO] != 0:
S8qo = 0
S8qo = Mkmy[a1PO] + S8qo * KMvS
g2lU[a1PO] = S8qo
return g2lU | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AC1_(cAvO):\n g2lU = oyIN.zeros_like(cAvO)\n S8qo = 0\n for d6pt in reversed(range(cAvO.size)):\n S8qo = S8qo * BR4e + cAvO[d6pt]\n g2lU[d6pt] = S8qo\n return g2lU",
"def AC1_(ezWE):\n bnZy = oyIN.zeros_like(ezWE)\n vOGg = 0\n for YRbF in reversed(range(ezWE.size)):\n ... | [
"0.8228387",
"0.8101504",
"0.794589",
"0.79116005",
"0.78897405",
"0.78536695",
"0.7846898",
"0.7795935",
"0.77391535",
"0.77332956",
"0.7728408",
"0.7695219",
"0.7656278",
"0.75764155",
"0.75764155",
"0.7554488",
"0.7541471",
"0.75083315",
"0.7498441",
"0.74695385",
"0.74671... | 0.7274711 | 32 |
Convert DataFrame to a list of materials interpreting the MultiIndex as atomic_number and mass_number Returns | def GFNQ(YKHO):
uPqz = [dict() for YRbF in range(len(YKHO.columns))]
for (lziW, QJCc), ww2c in YKHO.iterrows():
jwwx = '{0:s}{1:d}'.format(w7v4.name(lziW), QJCc)
for YRbF in range(len(YKHO.columns)):
uPqz[YRbF][jwwx] = ww2c[YRbF]
return [Mx95.Material(meLH) for meLH in uPqz] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yLtf(YKHO):\n LSZ7 = []\n for rdlD in YKHO.df.iterrows():\n Mx95 = {}\n for z0q4 in YKHO.get_column_names():\n Mx95[z0q4.replace('.', '').replace('$', '')] = rdlD[1][z0q4]\n LSZ7.append(Mx95)\n return LSZ7",
"def LSZ7(u4qd, b_VF):\n WKvO = rLdf.merge(u4qd, b_VF, on... | [
"0.6941935",
"0.5914872",
"0.5911457",
"0.5881668",
"0.5720489",
"0.560937",
"0.55436313",
"0.5528849",
"0.55101496",
"0.54937315",
"0.54339206",
"0.54097927",
"0.53729576",
"0.5372714",
"0.5348065",
"0.5348065",
"0.5333079",
"0.5326202",
"0.5296426",
"0.5261468",
"0.5253516"... | 0.7396891 | 0 |
Standard kinetic energy assuming unit masses. | def np1B(YKHO, XP5J):
return 0.5 * oyIN.dot(XP5J, XP5J) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def np1B(YKHO):\n return 0.5 * YKHO.mass * oyIN.linalg.norm(YKHO.velocity) ** 2",
"def np1B(YKHO):\n lD1n = YKHO.velocity[0] ** 2 + YKHO.velocity[1] ** 2 + YKHO.velocity[2] ** 2\n return 0.5 * YKHO.mass * lD1n",
"def D3bH(YKHO, nPrm):\n VjGZ = 'gas_density'\n if VjGZ in nPrm.keys():\n InL... | [
"0.77665544",
"0.7640849",
"0.7026742",
"0.6842071",
"0.6804529",
"0.6750779",
"0.6672251",
"0.6619225",
"0.6558536",
"0.6517131",
"0.6505125",
"0.644305",
"0.6409361",
"0.633059",
"0.6327777",
"0.6311189",
"0.6276027",
"0.62532544",
"0.62332827",
"0.62251985",
"0.6222916",
... | 0.62645674 | 17 |
Resampling momenta from a standard normal distribution. | def Y5Pq(YKHO, vexM):
return oyIN.random.standard_normal(oyIN.shape(vexM)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d39J(YKHO, qIxc):\n y906, bKZA = qIxc\n return uXlY(y906, bKZA, (YKHO.latent_cont_dim,))",
"def p98N(YKHO, JBMS, mJX1):\n YKHO.demand = oyIN.random.normal(JBMS, mJX1, YKHO.no_consumers)",
"def d39J(YKHO, qIxc):\n y906, bKZA = qIxc\n return uXlY(y906, bKZA, (YKHO.batch_size, YKHO.latent_cont_... | [
"0.6298515",
"0.62215525",
"0.6202333",
"0.6188683",
"0.61869615",
"0.61725384",
"0.60597384",
"0.5990835",
"0.5960494",
"0.5926933",
"0.5916036",
"0.59156805",
"0.5892945",
"0.5872493",
"0.5842045",
"0.58249325",
"0.5822577",
"0.5793485",
"0.5784602",
"0.57754713",
"0.576430... | 0.6870299 | 0 |