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 |
|---|---|---|---|---|---|---|
map character to int | def Nrfr(YKHO, ppBc, TJBz):
print('Applying Vocab')
GJPu = []
for zFiD in PRqg(ppBc):
kYN8 = []
for r845 in range(len(zFiD)):
kYN8.append(TJBz.get(zFiD[r845]) or qtpH)
GJPu.append(kYN8)
return GJPu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dW0i(hcXw):\n pJ4u = {'O': 0, 'I': 1, 'L': 2, 'T': 3, 'S': 4, 'Z': 5, 'J': 6}\n return pJ4u[hcXw]",
"def kShN(Z9rn):\n Wxnj = 0\n if Z9rn == 'A':\n Wxnj = 0\n elif Z9rn == 'U':\n Wxnj = 1\n elif Z9rn == 'G':\n Wxnj = 2\n elif Z9rn == 'C':\n Wxnj = 3\n else:... | [
"0.77100396",
"0.74458015",
"0.7440113",
"0.73622864",
"0.7310755",
"0.71888816",
"0.7160366",
"0.70468485",
"0.69752586",
"0.69503516",
"0.6938068",
"0.6922089",
"0.6914186",
"0.6877441",
"0.6868882",
"0.6834608",
"0.6823023",
"0.6822027",
"0.6821746",
"0.67476",
"0.6727796"... | 0.0 | -1 |
Differentiable version of torchvision.functional.normalize default assumes color channel is at dim = 1 | def N3nw(vhpA, JBMS, M1Jx):
JBMS = JBMS[None, :, None, None]
M1Jx = M1Jx[None, :, None, None]
return vhpA.sub(JBMS).div(M1Jx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ekx3(WKvO):\n if oyIN.ndim(WKvO) == 3:\n YDR7 = oyIN.shape(WKvO)[0]\n elif oyIN.ndim(WKvO) == 4:\n YDR7 = oyIN.shape(WKvO)[1]\n else:\n print('ERROR: input image dimensions not 3 or 4')\n GkAI = (WKvO - sZZU[:, :YDR7, :, :]) / aSKM[:, :YDR7, :, :]\n return GkAI",
"def N3nw... | [
"0.7212909",
"0.71556777",
"0.7132102",
"0.7132102",
"0.7125081",
"0.70840514",
"0.7057019",
"0.7051009",
"0.70161",
"0.70047396",
"0.70047396",
"0.6976295",
"0.6952636",
"0.6935212",
"0.6912134",
"0.68978083",
"0.6897599",
"0.68946564",
"0.68197244",
"0.6797802",
"0.67887604... | 0.0 | -1 |
Retrieves expire date of hostname's ssl certificate | def vWmc(ayrW):
CmYw = '%b %d %H:%M:%S %Y %Z'
QpfX = i5iB.create_default_context()
w2B8 = QpfX.wrap_socket(GGmw.socket(GGmw.AF_INET), server_hostname=ayrW)
w2B8.settimeout(3.0)
w2B8.connect((ayrW, 443))
AdK5 = w2B8.getpeercert()
return qcWV.datetime.strptime(AdK5['notAfter'], CmYw) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bc41(ayrW):\n CmYw = '%b %d %H:%M:%S %Y %Z'\n QpfX = i5iB.create_default_context()\n w2B8 = QpfX.wrap_socket(GGmw.socket(GGmw.AF_INET), server_hostname=ayrW)\n w2B8.settimeout(3.0)\n w2B8.connect((ayrW, 443))\n AdK5 = w2B8.getpeercert()\n return qcWV.datetime.strptime(AdK5['notAfter'], CmY... | [
"0.76140106",
"0.6999377",
"0.69952327",
"0.6979493",
"0.69580454",
"0.68477994",
"0.6765256",
"0.67625093",
"0.6569344",
"0.6530248",
"0.6387568",
"0.63231516",
"0.6310951",
"0.6261364",
"0.6194916",
"0.618185",
"0.6069286",
"0.6057289",
"0.6016507",
"0.5989453",
"0.5966262"... | 0.7367078 | 1 |
Return a string representation of the current state of the game. | def zAg0(YKHO) -> str:
return YKHO.board.__str__() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n i8_y = 'Current Game State...\\n=======\\n'\n for YRbF in range(len(YKHO.stacks)):\n i8_y += '#%d %s\\n' % (YRbF, str(YKHO.stacks[YRbF]))\n i8_y += YKHO.hash() + '\\n'\n i8_y += '====='\n return i8_y",
"def Ov5A(YKHO):\n Aofo = 50 * ' *'\n Aofo += '\\ngame state\\n'\... | [
"0.8577555",
"0.8410851",
"0.8118005",
"0.79331696",
"0.78915936",
"0.7835785",
"0.7796893",
"0.77895707",
"0.77312845",
"0.7657722",
"0.7609375",
"0.7598432",
"0.75677514",
"0.75080377",
"0.7481863",
"0.7443051",
"0.7420263",
"0.7418682",
"0.7399048",
"0.7345822",
"0.7345822... | 0.0 | -1 |
Adds a 2D unpooling op. | def XwW0(dBuj, QyVM, _0fC=[1, 2, 2, 1], rrBf='unpool_2d'):
with ZylS.variable_scope(rrBf):
GhuM = ZylS.shape(dBuj)
oLRV = [GhuM[0], GhuM[1] * _0fC[1], GhuM[2] * _0fC[2], GhuM[3]]
wJUp = ZylS.reduce_prod(GhuM)
phgx = [oLRV[0], oLRV[1] * oLRV[2] * oLRV[3]]
a60D = ZylS.reshape(d... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uu7L(WKvO, _0fC):\n return kwv8(_0fC)(WKvO)",
"def WIt4():\n return U78l.MaxUnpool2d(kernel_size=2)",
"def uPKs(BWXx, mWFP='unpool'):\n with ZylS.name_scope(mWFP) as rrBf:\n lWrn = BWXx.get_shape().as_list()\n tpio = len(lWrn[1:-1])\n yvT9 = ZylS.reshape(BWXx, [-1] + lWrn[-tpi... | [
"0.732789",
"0.66076845",
"0.6453914",
"0.6411145",
"0.6392711",
"0.6374432",
"0.6239002",
"0.619357",
"0.60129815",
"0.59906536",
"0.5943407",
"0.59193146",
"0.5903142",
"0.5846828",
"0.58240855",
"0.5692167",
"0.552739",
"0.5482864",
"0.5460225",
"0.5455583",
"0.5385837",
... | 0.63476706 | 6 |
changes the password of the user | def faAE(QePW):
if QePW.user.check_password(QePW.POST['old_password']):
QePW.user.set_password(QePW.POST['new_password'])
MC83(QePW, QePW.user)
return GtGV(True)
return GtGV(False, error='Invalid password') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RtSS(YKHO, NtEF, jTXt):\n YKHO.sendcmd('site changepw %s %s' % (NtEF, jTXt))",
"def ZfHT(YKHO):\n YKHO.password = input('Enter your new password :')\n if YKHO.data.update_password(YKHO.user_name, YKHO.password):\n print('Password updated')\n else:\n print('Password not updated')",
... | [
"0.85271156",
"0.85020405",
"0.8477165",
"0.83650243",
"0.834789",
"0.83445805",
"0.83375835",
"0.8263347",
"0.82632774",
"0.8211412",
"0.8188421",
"0.8185847",
"0.81828684",
"0.8158082",
"0.8134383",
"0.8118668",
"0.8073453",
"0.80235124",
"0.80164975",
"0.801173",
"0.800390... | 0.0 | -1 |
Looks at all the possible moves using the AlphaZero MCTS algorithm and find the highest move value possible | def laOk(YKHO, sEAN: ChessEnv) -> (float, float):
L4cE = []
with _u6t(max_workers=YKHO.config.play.search_threads) as ZaUd:
for bGrB in range(YKHO.config.play.simulation_num_per_move):
L4cE.append(ZaUd.submit(YKHO.search_my_move, env=sEAN.copy(), is_root_node=True))
hkxX = [eHNT.result()... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TOA2(YKHO):\n if sum(YKHO.board) == 0:\n return 1\n uc7Q = -FfMS\n DQoW = -1\n for YRbF in range(YKHO.n * YKHO.n):\n q9ES = YKHO.board.copy()\n if YKHO.board[YRbF] == 0 and YKHO.board_map[YRbF] == 1:\n q9ES[YRbF] = 10\n Qj8D = YKHO.minmax(q9ES, YKHO.n, -Ff... | [
"0.7216932",
"0.69102025",
"0.68093145",
"0.67653656",
"0.6746051",
"0.66807365",
"0.6650928",
"0.6638863",
"0.66153187",
"0.6584624",
"0.65779555",
"0.654768",
"0.65409935",
"0.64986134",
"0.6495007",
"0.6492298",
"0.6485739",
"0.64777803",
"0.6477146",
"0.64724934",
"0.6464... | 0.0 | -1 |
Convert ISO date string into WbTime object. | def lSkD(_c1T):
_c1T = _c1T[:len('YYYY-MM-DD')].split('-')
if len(_c1T) == 3 and all((Myyj(WKvO) for WKvO in _c1T)):
Csk6 = int(_c1T[2])
if Csk6 == 0:
Csk6 = None
r8hN = int(_c1T[1])
if r8hN == 0:
r8hN = None
return RAnV.WbTime(year=int(_c1T[0]), m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tcj_(str):\n try:\n return qcWV.strptime(str, '%Y-%m-%dT%H:%M:%SZ')\n except:\n return None",
"def gcC6(BWXx: str) -> qcWV:\n return qcWV.strptime(BWXx, '%Y-%m-%dT%H:%M:%S.%fZ')",
"def gcC6(BWXx: str) -> qcWV:\n return qcWV.strptime(BWXx, '%Y-%m-%dT%H:%M:%S.%fZ')",
"def O6uR(VDD... | [
"0.71873665",
"0.71639395",
"0.71639395",
"0.7042901",
"0.6987052",
"0.6986902",
"0.6953919",
"0.6924466",
"0.68647045",
"0.68029433",
"0.67966557",
"0.67227596",
"0.6721989",
"0.67026937",
"0.66915494",
"0.66867447",
"0.66695577",
"0.6669246",
"0.6668982",
"0.66627073",
"0.6... | 0.7546174 | 0 |
Check if the given value is a positive integer. | def bPbE(BWXx):
if Myyj(BWXx) and int(BWXx) > 0:
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KRIH(Emd4, BWXx):\n try:\n BWXx = int(BWXx)\n except ValueError:\n return False\n return BWXx >= 0",
"def WSkS(BWXx):\n try:\n return int(BWXx) >= 0\n except (ValueError, TypeError):\n return False",
"def Jlsg(BWXx):\n if not type(BWXx) == int:\n raise T... | [
"0.9205181",
"0.86600953",
"0.8403597",
"0.826229",
"0.8170393",
"0.81300616",
"0.8080755",
"0.7990618",
"0.79723513",
"0.7960031",
"0.7938204",
"0.7922577",
"0.7904911",
"0.7868288",
"0.78545475",
"0.7846833",
"0.7825666",
"0.77856946",
"0.7757933",
"0.7754883",
"0.77304685"... | 0.8042016 | 7 |
Merge multiple values/lists into one list. | def Jdij(hkxX):
wHSX = []
for Ty9i in hkxX:
if Ty9i is not None:
Ty9i = YYDj(Ty9i)
wHSX += Ty9i
return wHSX | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gKI6(UHhk):\n OFuV = []\n for yv6U in YYDj(UHhk):\n OFuV += yv6U\n return OFuV",
"def pswC(YKHO, UHhk):\n nPrm = []\n for list in UHhk:\n nPrm.extend(list)\n return nPrm",
"def svc5(UHhk):\n return list(Hs6x.chain.from_iterable(UHhk))",
"def vGZu(*qIxc):\n U5bT = []\... | [
"0.7092154",
"0.7068631",
"0.6985697",
"0.6898003",
"0.68630266",
"0.6696494",
"0.6674972",
"0.65617156",
"0.653416",
"0.6467933",
"0.64362305",
"0.6417107",
"0.64065033",
"0.6394783",
"0.63766855",
"0.6373911",
"0.63678426",
"0.6359211",
"0.63365823",
"0.6320606",
"0.6318276... | 0.7403043 | 0 |
Guestimate the error based on the significant figures. This will assume the largest possible error in the case of integers. Requires that the number be given as a string (since sig. figs. may otherwise have been removed.) Note that this is now rarely needed since errors no longer need to be explicitly set. | def _513(BHGE):
eAkl, bGrB, e_aN = BHGE.partition('.')
if e_aN:
mLGw = '0.{}5'.format('0' * len(e_aN))
return float(mLGw)
elif int(eAkl) == 0:
return 0.5
else:
GwaV = len(eAkl) - len(eAkl.rstrip('0'))
return pow(10, GwaV) / 2.0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zhxy(WKvO, wEsz=4):\n if WKvO == 0:\n return '0'\n else:\n iSjc = int(oyIN.floor(oyIN.log10(abs(WKvO)))) - wEsz\n wKwT = oyIN.round(WKvO, -iSjc)\n return str(int(wKwT * pow(10, -iSjc))) + 'e' + str(iSjc)",
"def a8rq(BWXx, FYZD):\n if epAf.isnan(BWXx) or BWXx == 0:\n ... | [
"0.6392305",
"0.607449",
"0.6027354",
"0.59908605",
"0.59309334",
"0.5882093",
"0.58533",
"0.58533",
"0.58305806",
"0.580203",
"0.57463133",
"0.57095546",
"0.5659681",
"0.5647177",
"0.5641371",
"0.56110096",
"0.5594347",
"0.5594347",
"0.55910414",
"0.55039287",
"0.54856765",
... | 0.7530922 | 0 |
Insert extra extension before last extension of filename. | def UXfj(Ym5F, ecYE):
Ux0P, YBcr = Hy7s.path.splitext(Ym5F)
return Ux0P + ecYE + YBcr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ra6A(IznC, YBcr):\n if len(YBcr) and (not IznC.endswith(YBcr)):\n return '{}{}'.format(IznC, YBcr)\n else:\n return IznC",
"def LQLP(Ux0P, Fst3):\n bGrB, YBcr = Hy7s.path.splitext(Ux0P)\n if YBcr == '':\n return f'{Ux0P}.{Fst3}'\n else:\n return Ux0P",
"def ra6A(g... | [
"0.8236135",
"0.8158628",
"0.7995829",
"0.79055",
"0.7842464",
"0.779758",
"0.7721581",
"0.76708066",
"0.76602924",
"0.76271963",
"0.76101416",
"0.76048803",
"0.7555252",
"0.75296754",
"0.7508522",
"0.7480984",
"0.7470692",
"0.7396219",
"0.7388151",
"0.7361654",
"0.7337321",
... | 0.84141034 | 0 |
Returns the internal dictionary that represents this job interface | def hati(YKHO):
return YKHO.definition | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MNRr(YKHO):\n return {'jobid': YKHO.jobid}",
"def YqR2(YKHO):\n return YKHO.get_job().get('interface', {})",
"def iQG7(YKHO):\n return {'job_id': YKHO.job_id, 'spec': YKHO.spec, 'pars': YKHO.pars, 'state': YKHO.state.json()}",
"def hati(YKHO):\n raise NotImplementedError()",
"def hati(YKHO)... | [
"0.7060487",
"0.70544577",
"0.6986879",
"0.6977786",
"0.6936261",
"0.688237",
"0.685984",
"0.6789311",
"0.6766957",
"0.67248386",
"0.67190105",
"0.6704271",
"0.6687889",
"0.6687889",
"0.6687889",
"0.6687889",
"0.6687889",
"0.6687889",
"0.6687889",
"0.6687889",
"0.6687889",
... | 0.0 | -1 |
Return the command arguments string, populated with the properties from the job_data. | def knCL(YKHO, nPOI):
cmN7 = YKHO.definition['command_arguments']
tT1c = {}
for WbAn in YKHO.definition['input_data']:
dvBq = WbAn['name']
lt9u = WbAn['type']
if lt9u == 'property':
LY1P = nPOI.data_inputs_by_name[dvBq]['value']
tT1c[dvBq] = LY1P
cmN7 = YK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def orPS(YKHO):\n return ' '.join(YKHO.get_commandargs_list())",
"def igoK(YKHO, nPOI, hmfa, mBY9):\n cmN7 = YKHO.populate_command_argument_properties(nPOI)\n tT1c = {}\n for WbAn in YKHO.definition['input_data']:\n dvBq = WbAn['name']\n lt9u = WbAn['type']\n sLrt = WbAn['require... | [
"0.7064995",
"0.6989004",
"0.6897666",
"0.685491",
"0.68520176",
"0.6633379",
"0.6529253",
"0.65213656",
"0.64667225",
"0.6463661",
"0.6463661",
"0.64011335",
"0.636242",
"0.63511133",
"0.6345097",
"0.6343797",
"0.6343797",
"0.6343206",
"0.63298833",
"0.6329468",
"0.632761",
... | 0.71137464 | 0 |
Initialize the matrices W[1],...,W[L] and the vectors b[1],...,b[L] with random numbers from gaussian distribution with 0mean, and 1 variance. | def F3Mg(YKHO):
XcU5, Fg_i = ({}, {})
for YRbF in range(1, YKHO.L + 1):
XcU5[YRbF] = oyIN.random.normal(0, 1, (YKHO.layers[YRbF], YKHO.layers[YRbF - 1]))
Fg_i[YRbF] = oyIN.random.normal(0, 1, (YKHO.layers[YRbF], 1))
return (XcU5, Fg_i) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C0Lv(YKHO, r8hN):\n YKHO.rgen = oyIN.random.RandomState(YKHO.random_state)\n YKHO.w_ = YKHO.rgen.normal(loc=0.0, scale=0.01, size=1 + r8hN)\n YKHO.w_initialized = True",
"def vB93(YKHO):\n YKHO.U = oyIN.random.uniform(0, 1, (YKHO.A.shape[0], YKHO.args.dimensions))\n YKHO.V = oyIN.random.unifor... | [
"0.71753174",
"0.7148258",
"0.7117803",
"0.71021605",
"0.69133174",
"0.6867033",
"0.68356127",
"0.6829642",
"0.6826013",
"0.67777973",
"0.6681357",
"0.6575527",
"0.6522397",
"0.64887184",
"0.6479095",
"0.64384663",
"0.64123154",
"0.6275248",
"0.62611586",
"0.62504816",
"0.624... | 0.6455973 | 15 |
Forward propagation. Uses the current parameters W, b | def ytgA(YKHO, WKvO):
jzdc, epBp = ({}, {})
jzdc[0] = WKvO
aPd6 = YKHO.L
for YRbF in range(1, aPd6):
epBp[YRbF] = oyIN.dot(YKHO.W[YRbF], jzdc[YRbF - 1]) + YKHO.b[YRbF]
jzdc[YRbF] = YKHO.act_hid(epBp[YRbF])
epBp[aPd6] = YKHO.W[aPd6].dot(jzdc[aPd6 - 1]) + YKHO.b[aPd6]
jzdc[aPd6] = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sNVR(yzQ0, Fg_i, EcVT, fuBA):\n bGrB, r8hN = EcVT.shape\n k0lF = m1Hg(yzQ0.T.dot(EcVT) + Fg_i)\n k0lF[k0lF == 1.0] = 0.99999\n sSN_ = -(1.0 / r8hN) * oyIN.sum(fuBA * oyIN.log(k0lF) + (1.0 - fuBA) * oyIN.log(1.0 - k0lF))\n ncXl = 1.0 / r8hN * EcVT.dot((k0lF - fuBA).T)\n NCls = 1.0 / r8hN * oyI... | [
"0.77202296",
"0.76816297",
"0.76797277",
"0.7639649",
"0.7635552",
"0.76001453",
"0.75555754",
"0.749934",
"0.7495402",
"0.74589396",
"0.74568075",
"0.74442005",
"0.7433435",
"0.7396178",
"0.7391844",
"0.7388725",
"0.7378363",
"0.732782",
"0.73196167",
"0.72888947",
"0.72663... | 0.0 | -1 |
Bounce off orthogonally to the wall. | def Vvfi(Jqc7, g0hy, BH3N, C8gw=0):
if not n4TV(Jqc7, BH3N, 'lastbounce'):
return
Jqc7.speed *= 1.0 - C8gw
_J0c(Jqc7, g0hy, BH3N)
if abs(Jqc7.rect.centerx - g0hy.rect.centerx) > abs(Jqc7.rect.centery - g0hy.rect.centery):
Jqc7.orientation = (-Jqc7.orientation[0], Jqc7.orientation[1])
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _gq8(YKHO):\n YKHO.y_move *= -1",
"def Fhwk(YKHO):\n if YKHO.ball[0].ycor() <= -380:\n YKHO.ball[0].forward(0)\n YKHO.ball[0].left((180 - YKHO.ball[0].heading() / 2) * 4)",
"def ClAz(YKHO):\n YKHO.ball[0].forward(0)\n YKHO.ball[0].right(YKHO.ball[0].heading() + 358)",
"def LpAK(... | [
"0.76469195",
"0.6889739",
"0.669991",
"0.6625142",
"0.6538907",
"0.6530226",
"0.65030336",
"0.64606506",
"0.6460444",
"0.6460444",
"0.64495593",
"0.6432609",
"0.64133716",
"0.63723856",
"0.6349426",
"0.63180846",
"0.6304649",
"0.63031137",
"0.6294213",
"0.6289102",
"0.627481... | 0.62593657 | 22 |
If 'sprite' has more than a limit of the resource type given, it spawns a sprite of 'stype'. | def h5lD(Jqc7, g0hy, BH3N, Eorv, cCim, qoqK=1):
if Jqc7.resources[Eorv] >= qoqK:
BH3N.create_sprite(cCim, (Jqc7.rect.left, Jqc7.rect.top)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FtW9(Jqc7, g0hy, BH3N, Eorv, qoqK=1):\n if Jqc7.resources[Eorv] >= qoqK:\n M2ke(Jqc7, g0hy, BH3N)",
"def w8Wk(Jqc7, g0hy, BH3N, Eorv, qoqK=1):\n if Jqc7.resources[Eorv] <= qoqK:\n M2ke(Jqc7, g0hy, BH3N)",
"def uiAK(Jqc7, g0hy, BH3N, Eorv, qoqK=1):\n if g0hy.resources[Eorv] >= qoqK:\n... | [
"0.67750007",
"0.6669006",
"0.64088655",
"0.6249522",
"0.623986",
"0.6223333",
"0.60825765",
"0.59550476",
"0.58262056",
"0.5772284",
"0.5710845",
"0.5710566",
"0.5639252",
"0.56218255",
"0.55894727",
"0.55753464",
"0.55681175",
"0.554676",
"0.5543165",
"0.55387545",
"0.55241... | 0.8419832 | 0 |
If 'sprite' has more than a limit of the resource type given, it dies. | def FtW9(Jqc7, g0hy, BH3N, Eorv, qoqK=1):
if Jqc7.resources[Eorv] >= qoqK:
M2ke(Jqc7, g0hy, BH3N) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def h5lD(Jqc7, g0hy, BH3N, Eorv, cCim, qoqK=1):\n if Jqc7.resources[Eorv] >= qoqK:\n BH3N.create_sprite(cCim, (Jqc7.rect.left, Jqc7.rect.top))",
"def w8Wk(Jqc7, g0hy, BH3N, Eorv, qoqK=1):\n if Jqc7.resources[Eorv] <= qoqK:\n M2ke(Jqc7, g0hy, BH3N)",
"def uiAK(Jqc7, g0hy, BH3N, Eorv, qoqK=1)... | [
"0.7731891",
"0.7692859",
"0.7598358",
"0.72664964",
"0.617877",
"0.61079234",
"0.6077541",
"0.60346776",
"0.6005277",
"0.59749436",
"0.5956127",
"0.5945056",
"0.5901959",
"0.58301073",
"0.5784742",
"0.57205194",
"0.57205194",
"0.5618283",
"0.5609612",
"0.55867684",
"0.556303... | 0.79340357 | 0 |
If 'sprite' has less than a limit of the resource type given, it dies. | def w8Wk(Jqc7, g0hy, BH3N, Eorv, qoqK=1):
if Jqc7.resources[Eorv] <= qoqK:
M2ke(Jqc7, g0hy, BH3N) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FtW9(Jqc7, g0hy, BH3N, Eorv, qoqK=1):\n if Jqc7.resources[Eorv] >= qoqK:\n M2ke(Jqc7, g0hy, BH3N)",
"def h5lD(Jqc7, g0hy, BH3N, Eorv, cCim, qoqK=1):\n if Jqc7.resources[Eorv] >= qoqK:\n BH3N.create_sprite(cCim, (Jqc7.rect.left, Jqc7.rect.top))",
"def uiAK(Jqc7, g0hy, BH3N, Eorv, qoqK=1)... | [
"0.784064",
"0.7564843",
"0.7520532",
"0.7410403",
"0.63258696",
"0.61748147",
"0.6161438",
"0.6136608",
"0.6121787",
"0.6065828",
"0.59981394",
"0.59784496",
"0.59190077",
"0.58294785",
"0.5816538",
"0.5731956",
"0.56420255",
"0.56083906",
"0.55779386",
"0.5548031",
"0.55379... | 0.783004 | 1 |
The app_class fixture declares a Flask test_client, called in every API related unit tests. | def ZjZF(QePW):
P4t4 = LUif()
P4t4.config['TESTING'] = True
P4t4.config['LIVESERVER_PORT'] = 8943
P4t4.config['LIVESERVER_TIMEOUT'] = 10
nNXP = n4E9(P4t4)
DkbJ(nNXP)
QePW.cls.app = P4t4
QePW.cls.client = P4t4.test_client() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FCbF(YKHO):\n P4t4 = L2w0(__name__)\n P4t4.config['DEBUG'] = True\n P4t4.config['TESTING'] = True\n P4t4.config['SERVER_NAME'] = 'localhost:5000'\n P4t4.logger.disabled = True\n YKHO.flaskapp = P4t4\n YKHO.req = P4t4.test_client()\n Nf1o(YKHO.req)",
"def FCbF(YKHO):\n __kq.app.test... | [
"0.79600656",
"0.77458596",
"0.7733112",
"0.7686898",
"0.7648217",
"0.75820965",
"0.7576797",
"0.7533925",
"0.7526865",
"0.75268114",
"0.75268114",
"0.75268114",
"0.75248563",
"0.7504946",
"0.7503316",
"0.7501413",
"0.7498849",
"0.7498849",
"0.7498849",
"0.7498849",
"0.749884... | 0.72196233 | 60 |
Get one hot encoding for the whole data frame. The one hot vector is represented by the index where the value is 1. | def gnfq(YKHO):
print('one hot encoding: feature {0}'.format(YKHO.data.columns[2]))
bySB = oyIN.asarray(YKHO.data.iloc[:, 2])
KBlC = YKHO.one_hot_encoding(bySB, YKHO.get_feature_set(bySB))
for YRbF in range(3, YKHO.data.shape[1]):
print('one hot encoding: feature {0}'.format(YKHO.data.columns[YR... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zGX0(jQ3Z):\n jQ3Z = rLdf.get_dummies(jQ3Z, drop_first=True)\n return jQ3Z",
"def vzTG(WKvO):\n WKvO[oyIN.where(WKvO)[0]] = 1\n return WKvO",
"def KLLm(bOBl, fvDH):\n return rLdf.get_dummies(bOBl, columns=[fvDH])",
"def zGX0(WKvO):\n return oyIN.eye(WKvO.max() + 1)[WKvO]",
"def zGX0(j... | [
"0.8731769",
"0.8487917",
"0.83084816",
"0.8293519",
"0.82376987",
"0.8215483",
"0.81618613",
"0.8150709",
"0.80672807",
"0.8053075",
"0.8047516",
"0.8026537",
"0.7975379",
"0.7967392",
"0.79504883",
"0.7943656",
"0.7928842",
"0.79243857",
"0.7911481",
"0.79001325",
"0.789700... | 0.0 | -1 |
Matrix multiplication. Given the type constraint below, this will be selfother | def E_tF(YKHO, Elif):
if not isinstance(Elif, fAux):
raise TypeError('Can only multiply PdfMatrices by PdfMatrice')
return fAux(YKHO.a * Elif.a + YKHO.b * Elif.c, YKHO.a * Elif.b + YKHO.b * Elif.d, YKHO.c * Elif.a + YKHO.d * Elif.c, YKHO.c * Elif.b + YKHO.d * Elif.d, YKHO.e * Elif.a + YKHO.f * Elif.c + ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E_tF(YKHO, Elif):\n Lx3t = []\n fdOb = YKHO.g\n rlJB = Elif.T().g\n for XGFC in range(len(fdOb)):\n gAQa = []\n for CpeG in range(len(rlJB)):\n gAQa.append(YKHO.dot_product(fdOb[XGFC], rlJB[CpeG]))\n Lx3t.append(gAQa)\n return aLMY(Lx3t)",
"def E_tF(YKHO, Elif):... | [
"0.78280216",
"0.766501",
"0.7664658",
"0.7623234",
"0.7605508",
"0.7564547",
"0.7560255",
"0.7554473",
"0.75397193",
"0.7539378",
"0.7537273",
"0.7521812",
"0.7511777",
"0.7491361",
"0.74835813",
"0.74832964",
"0.7477699",
"0.74743605",
"0.7473768",
"0.7460525",
"0.7445558",... | 0.72422403 | 37 |
Return a copy of this matrix | def jth9(YKHO):
return fAux(YKHO.a, YKHO.b, YKHO.c, YKHO.d, YKHO.e, YKHO.f) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jth9(YKHO):\n return aLMY(YKHO.matrix)",
"def jth9(YKHO):\n return YKHO.__class__(YKHO.matrix.copy())",
"def jth9(YKHO) -> 'matrix':\n return SppC(YKHO.rows, YKHO.columns, *YKHO.array)",
"def jth9(YKHO):\n kiFE = aLMY(YKHO.rows, YKHO.cols)\n for rdlD in range(YKHO.rows):\n for fvDH ... | [
"0.9017155",
"0.8932666",
"0.8920464",
"0.8818259",
"0.88160974",
"0.8769872",
"0.8610098",
"0.85081434",
"0.8476326",
"0.833265",
"0.8298534",
"0.81987345",
"0.81313807",
"0.81313807",
"0.8088098",
"0.8020847",
"0.8016588",
"0.8009987",
"0.7975391",
"0.7908901",
"0.7872375",... | 0.83255494 | 10 |
Return number of factors which n has, including 1 and itself. | def KZyX(exwG):
Llmz = 0
di96 = 1
y8ay = exwG
while di96 < y8ay:
y8ay = exwG / di96
if y8ay.is_integer():
Llmz += 2
di96 += 1
if di96 == y8ay:
Llmz += 1
return Llmz | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KZyX(exwG):\n if exwG == 1:\n return 1\n UHFx = 0\n qoqK = int(exwG ** 0.5) + 1\n for YRbF in range(1, qoqK):\n if exwG % YRbF == 0:\n UHFx += 2\n return UHFx",
"def ZBvT(exwG):\n mLGw = 1\n for BWXx, UHFx in Llmz(exwG).items():\n mLGw *= UHFx + 1\n ret... | [
"0.8977536",
"0.891532",
"0.871263",
"0.8692123",
"0.8233794",
"0.810776",
"0.80632526",
"0.80632526",
"0.80282986",
"0.79927355",
"0.79627883",
"0.7955504",
"0.79522765",
"0.79485875",
"0.7917258",
"0.7905599",
"0.7838912",
"0.7819353",
"0.7814263",
"0.7805077",
"0.77848566"... | 0.8900722 | 2 |
Returns field type. In case it is not resolved, resolve it. | def vF49(YKHO):
if isinstance(YKHO._field_type, exCv):
if YKHO._field_type == 'self':
YKHO._field_type = YKHO._cls
else:
YKHO._field_type = rUYY.resolve(YKHO._field_type)
return YKHO._field_type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Tz7f(Jyyj, QpfX):\n if Jyyj.message_type is not None:\n return sYuO(Jyyj.message_type, QpfX)\n else:\n return oQlk[Jyyj.type]",
"def sdgl(YKHO):\n return YKHO.field_type",
"def vF49(Jyyj):\n if hasattr(Jyyj, 'field') and Jyyj.field:\n return Jyyj.field.__class__.__name__.lo... | [
"0.7558912",
"0.7531702",
"0.7413979",
"0.7339048",
"0.7138969",
"0.7124775",
"0.70788795",
"0.7076116",
"0.70735997",
"0.6990483",
"0.6990483",
"0.69107634",
"0.67503667",
"0.67475563",
"0.67300975",
"0.67002904",
"0.6631525",
"0.6629148",
"0.6582007",
"0.6576221",
"0.656726... | 0.8053247 | 0 |
Create a wrapped, monitored gym.Env for MuJoCo. | def WXPo(hipr, yokr):
cMGF(yokr)
sEAN = ch3p.make(hipr)
sEAN = FAHi(sEAN, bo34.get_dir())
sEAN.seed(yokr)
return sEAN | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def giNa(j9o5, stkY=None):\n i2I_ = j9o5.env_name\n assert i2I_.startswith('MarlGrid')\n sEAN = cx2Z(j9o5)\n sEAN = zXJo(sEAN)\n sEAN = jt0C(sEAN)\n return sEAN",
"def FIMM(YKHO, sEAN: gym.Env):\n YKHO._env = sEAN",
"def xwQb():\n\n def PPff():\n sEAN = ch3p.make(I6G3).env\n ... | [
"0.66291994",
"0.63476413",
"0.6225322",
"0.6209758",
"0.6209758",
"0.6209758",
"0.6209758",
"0.6147035",
"0.61286694",
"0.61231077",
"0.60688",
"0.59444684",
"0.5894337",
"0.58898157",
"0.5844328",
"0.5825636",
"0.5805097",
"0.57799816",
"0.57647777",
"0.57367",
"0.57140434"... | 0.622182 | 3 |
Create an empty argparse.ArgumentParser. | def ioG2():
import argparse
return argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yl6v():\n return j1Jz.ArgumentParser(argument_default=j1Jz.SUPPRESS)",
"def yl6v(Emd4) -> j1Jz.ArgumentParser:\n ...",
"def yl6v() -> j1Jz.ArgumentParser:\n wvEv = j1Jz.ArgumentParser()\n wvEv.add_argument('-i', '--input', default='input/', help='Path to directory with input data.')\n wvEv.a... | [
"0.7893149",
"0.74147564",
"0.7337067",
"0.7308105",
"0.7291926",
"0.72465783",
"0.7172002",
"0.7134962",
"0.701594",
"0.70043194",
"0.6985213",
"0.6983164",
"0.6968492",
"0.696249",
"0.69585776",
"0.6929639",
"0.6895047",
"0.68902355",
"0.6887605",
"0.68774146",
"0.68554825"... | 0.691722 | 16 |
Create an argparse.ArgumentParser for run_atari.py. | def YV12():
wvEv = ioG2()
wvEv.add_argument('--env', help='environment ID', default='PongNoFrameskip-v4')
wvEv.add_argument('--seed', help='RNG seed', type=int, default=0)
wvEv.add_argument('--num-timesteps', type=int, default=int(10000000.0))
return wvEv | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YV12():\n wvEv = ioG2()\n wvEv.add_argument('--env', help='environment ID', default='BreakoutNoFrameskip-v4')\n wvEv.add_argument('--seed', help='RNG seed', type=int, default=0)\n wvEv.add_argument('--num-timesteps', type=int, default=int(10000000.0))\n return wvEv",
"def yl6v(Emd4) -> j1Jz.Ar... | [
"0.78363585",
"0.73578465",
"0.7234901",
"0.7211733",
"0.7210513",
"0.7208574",
"0.71828145",
"0.7163763",
"0.7124569",
"0.71092445",
"0.7097862",
"0.708251",
"0.7078108",
"0.7027288",
"0.70057636",
"0.6994593",
"0.6991896",
"0.6990478",
"0.698401",
"0.6983785",
"0.6942432",
... | 0.78267044 | 1 |
Create an argparse.ArgumentParser for run_mujoco.py. | def WoDI():
wvEv = ioG2()
wvEv.add_argument('--env', help='environment ID', type=str, default='Reacher-v1')
wvEv.add_argument('--seed', help='RNG seed', type=int, default=0)
wvEv.add_argument('--num-timesteps', type=int, default=int(1000000.0))
return wvEv | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WoDI():\n wvEv = ioG2()\n wvEv.add_argument('--env', help='environment ID', type=str, default='Reacher-v2')\n wvEv.add_argument('--seed', help='RNG seed', type=int, default=0)\n wvEv.add_argument('--num-timesteps', type=int, default=int(1000000.0))\n wvEv.add_argument('--play', default=False, ac... | [
"0.77493626",
"0.7333391",
"0.72664756",
"0.72474957",
"0.7233194",
"0.72318697",
"0.7149912",
"0.71300685",
"0.7119881",
"0.70962644",
"0.7077443",
"0.7065635",
"0.706175",
"0.70567",
"0.7053598",
"0.704968",
"0.7041201",
"0.7034663",
"0.7026425",
"0.70201814",
"0.7020039",
... | 0.78861463 | 0 |
Defines the initial values for x, y, and z | def xZum(YKHO, TRVV=oyIN.array([0.1, 0.0, 0.0]), T4Wy=4):
nJ9F = TRVV[0]
nxyw = TRVV[1]
cflT = TRVV[2]
'Determines which order of Runge Kutta to apply to x, y, and z'
if T4Wy == 1:
YKHO.euler(TRVV)
elif T4Wy == 2:
YKHO.rk2(TRVV)
elif T4Wy == 4:
YKHO.rk4(TRVV)
else... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, WKvO=0, LVAh=0, epBp=0):\n YKHO.x = WKvO\n YKHO.y = LVAh\n YKHO.z = epBp",
"def FIMM(YKHO, WKvO=0, LVAh=0, epBp=0):\n YKHO.x = WKvO\n YKHO.y = LVAh\n YKHO.z = epBp",
"def FIMM(YKHO, WKvO=0, LVAh=0, epBp=0):\n YKHO.x = WKvO\n YKHO.y = LVAh\n YKHO.z = epBp",
"def FIMM(... | [
"0.7963192",
"0.794942",
"0.794942",
"0.794942",
"0.794942",
"0.78541625",
"0.77746195",
"0.7640825",
"0.76148045",
"0.7195506",
"0.70663685",
"0.7007005",
"0.7001025",
"0.6950805",
"0.6931438",
"0.6922752",
"0.6790948",
"0.6712095",
"0.6631337",
"0.6618484",
"0.6615086",
"... | 0.0 | -1 |
Returns negative reward if the robot turns. | def pkmh(YKHO, yzQ0, rZpw, knl1):
if abs(yzQ0) > knl1:
return abs(yzQ0) * -rZpw
else:
return 0.0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vOGg(YKHO, YWSi, EmUK):\n jzdc = EmUK.agents[0]\n S_1T = oyIN.sum(oyIN.square(jzdc.goal_a.state.p_pos - jzdc.goal_b.state.p_pos))\n return -S_1T",
"def oe4f(YKHO):\n if YKHO.on_target:\n Mkmy = 10\n else:\n Mkmy = 0\n return Mkmy",
"def vOGg(YKHO, bHVe):\n if bHVe == None... | [
"0.74698377",
"0.74153644",
"0.72151965",
"0.7164144",
"0.7160183",
"0.71500206",
"0.7149646",
"0.71445614",
"0.7054075",
"0.70492244",
"0.7042766",
"0.70224166",
"0.70165",
"0.69904155",
"0.69830334",
"0.69830334",
"0.6974451",
"0.69191515",
"0.69066423",
"0.6906382",
"0.688... | 0.0 | -1 |
Returns positive reward if the robot reaches the goal. | def jB49(YKHO, ARaQ, G1Hx):
PBsH = YKHO.mean_sqare_dist_(ARaQ.position.x, ARaQ.position.y)
if PBsH < YKHO.__goal_radius:
return G1Hx
else:
return 0.0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Jc_J(YKHO):\n if YKHO.status == IhUr.GOAL:\n return 1\n else:\n return 0",
"def qY_F(YKHO):\n Ayfi = YKHO.get_distance_to_goal()\n if epAf.isclose(Ayfi, YKHO.last_distance, rel_tol=0.0001):\n return 0\n elif Ayfi < YKHO.last_distance:\n vOGg = YKHO.calculate_positiv... | [
"0.75948566",
"0.75895727",
"0.75835365",
"0.7581693",
"0.74303526",
"0.7387944",
"0.73561066",
"0.72689116",
"0.7246003",
"0.7227247",
"0.71943074",
"0.7186194",
"0.71675",
"0.71610534",
"0.7160589",
"0.71523386",
"0.71506006",
"0.71380246",
"0.71285874",
"0.71212626",
"0.71... | 0.0 | -1 |
Creates a dict that connects object_id to all objects_ids it has a relationship with. | def wz6f(KQdn: List):
hHld: cuzp[str, set] = {}
for Qovt in KQdn:
JZXy = Qovt.get('source_ref')
pan_ = Qovt.get('target_ref')
if not JZXy or not pan_:
continue
if JZXy in hHld:
hHld[JZXy].add(pan_)
else:
hHld[JZXy] = {pan_}
if p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XaQC(YKHO, ei4T):\n TDnD = {}\n for H5ew, BWXx in YKHO.objects.items():\n TDnD.update({list(filter(lambda WKvO: WKvO.id == H5ew, ei4T))[0]: BWXx})\n YKHO.objects = TDnD",
"def tKgU(YKHO):\n hlel = {}\n for YEnM in YKHO.related_objects.filter(name__isnull=False):\n hlel[YEnM.name]... | [
"0.69308376",
"0.6830973",
"0.6535559",
"0.6389833",
"0.6384316",
"0.62570536",
"0.6182396",
"0.614007",
"0.6070683",
"0.6043452",
"0.59992313",
"0.59878755",
"0.59610975",
"0.59589016",
"0.5934362",
"0.59176034",
"0.5904222",
"0.5896438",
"0.5841444",
"0.57882243",
"0.577927... | 0.0 | -1 |
Returns the length of a vector. | def u54L(YKHO):
if YKHO.h == 0:
return PZyS(YKHO.x ** 2 + YKHO.y ** 2 + YKHO.z ** 2)
else:
raise wfPK('Points have no length') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i1gc(iArr):\n return oyIN.sqrt(oyIN.sum(oyIN.square(iArr)))",
"def i1gc(Ty9i):\n return oyIN.sqrt(oyIN.sum(oyIN.square(Ty9i)))",
"def Bq2S(iArr):\n i1gc = epAf.sqrt(oyIN.dot(iArr, iArr))\n return i1gc",
"def i1gc(iArr):\n return oyIN.sqrt(oyIN.dot(iArr, iArr))",
"def LDcD(iArr):\n zX1... | [
"0.8520101",
"0.8468207",
"0.82724226",
"0.820881",
"0.8172218",
"0.81672513",
"0.80954766",
"0.8056427",
"0.80217373",
"0.79895175",
"0.79785883",
"0.7915168",
"0.7888509",
"0.7865224",
"0.7863389",
"0.783891",
"0.7817035",
"0.78123355",
"0.7794845",
"0.7787785",
"0.7784691"... | 0.7039201 | 61 |
Calculates the cross product from two vectors and returns it. | def WHx2(YKHO, Ty9i):
if type(Ty9i) is not type(YKHO):
raise Exception('the given parameter is no HomVector')
elif YKHO.h == 0 and Ty9i.h == 0:
return TIte(YKHO.y * Ty9i.z - YKHO.z * Ty9i.y, -1 * (YKHO.x * Ty9i.z - YKHO.z * Ty9i.x), YKHO.x * Ty9i.y - YKHO.y * Ty9i.x, YKHO.h)
else:
ra... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hmBT(lSjb, v8Fa, Aofo):\n XOOk, pHXX, MgfK = (aj0M(lSjb[0]), aj0M(lSjb[1]), aj0M(lSjb[2]))\n kYGz, ftz7, _2fo = (aj0M(v8Fa[0]), aj0M(v8Fa[1]), aj0M(v8Fa[2]))\n Aofo[0] = pHXX * _2fo - MgfK * ftz7\n Aofo[1] = MgfK * kYGz - XOOk * _2fo\n Aofo[2] = XOOk * ftz7 - pHXX * kYGz\n return Aofo",
"de... | [
"0.8370378",
"0.8339202",
"0.8329297",
"0.83176374",
"0.827053",
"0.8221865",
"0.8131341",
"0.81180525",
"0.80886334",
"0.8085555",
"0.80709356",
"0.8005048",
"0.79628485",
"0.7922501",
"0.79220694",
"0.7914869",
"0.79122615",
"0.7903408",
"0.7859901",
"0.78507054",
"0.783222... | 0.0 | -1 |
Adds up two vectors by adding their components. | def FOdN(YKHO, Ty9i):
if type(Ty9i) is not type(YKHO):
raise Exception('the given parameter is no HomVector')
elif Ty9i.h == 1 and YKHO.h == 1:
raise wfPK('you cannot add two points')
else:
return TIte(YKHO.x + Ty9i.x, YKHO.y + Ty9i.y, YKHO.z + Ty9i.z, YKHO.h + Ty9i.h).adjust() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xXeU(jzdc, Fg_i):\n return (jzdc[0] + Fg_i[0], jzdc[1] + Fg_i[1])",
"def KfxW(hQHm, jlSq):\n return hQHm + jlSq",
"def GAyv(Yipr, Vkf3):\n return [jzdc + Fg_i for jzdc, Fg_i in zip(Yipr, Vkf3)]",
"def JsGA(jzdc, Fg_i):\n return tuple(map(H2v5, jzdc, Fg_i))",
"def FOdN(YKHO, Elif: Vector) ->... | [
"0.83882385",
"0.81675124",
"0.81145364",
"0.8082771",
"0.80708253",
"0.80627275",
"0.80627275",
"0.80627275",
"0.8062005",
"0.80456644",
"0.8025514",
"0.8018156",
"0.80137753",
"0.79472417",
"0.7908957",
"0.78847694",
"0.78672135",
"0.7844898",
"0.7843092",
"0.7792915",
"0.7... | 0.0 | -1 |
Flip image along first or second axis, or a combination of both if axis=2 (i.e. rotate 180 degrees). | def cvwt(Xn71, UXqs, jDK_=None):
if jDK_ == None:
jDK_ = oyIN.random.choice([0, 1, 2], size=1)[0]
if not UXqs in [0, 8]:
return Xn71
elif jDK_ == 2:
return oyIN.flip(oyIN.flip(Xn71, axis=0), axis=1)
else:
return oyIN.flip(Xn71, axis=jDK_) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XQz2(VXjJ, jDK_=None):\n if jDK_ == 'x':\n tfjD = xSzj(VXjJ)\n elif jDK_ == 'y':\n tfjD = MXYa(VXjJ)\n else:\n print('Please enter valid axis')\n return tfjD",
"def fh2j(LNo8, UXqs, jDK_=1):\n LNo8 = oyIN.flip(LNo8, axis=jDK_)\n UXqs = oyIN.flip(UXqs, axis=jDK_)\n re... | [
"0.76951677",
"0.7491126",
"0.74616736",
"0.7450386",
"0.74299306",
"0.708234",
"0.70812273",
"0.70231247",
"0.70044065",
"0.6971824",
"0.68873715",
"0.6877478",
"0.68564874",
"0.68390346",
"0.6820426",
"0.6818579",
"0.68158025",
"0.6757263",
"0.67301154",
"0.6717602",
"0.670... | 0.65011996 | 38 |
Add Gaussian noise through multiplication. | def eRrS(Xn71, BKn5=0.1):
ARTs = oyIN.random.normal(size=Xn71.shape) * BKn5 + 1
PZpk = oyIN.abs(Xn71 * ARTs)
PZpk = 255 - oyIN.abs(255 - PZpk)
PZpk = oyIN.clip(PZpk, a_min=0, a_max=255)
return PZpk | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def r5hI(WKvO, WTkW):\n return WKvO + oyIN.random.normal(scale=WTkW, size=len(WKvO))",
"def yjo7(LNo8, WTkW=0.05):\n LNo8 += oyIN.random.normal(0, WTkW, LNo8.shape)\n return LNo8",
"def miUb(VXjJ, PExG):\n if PExG == 0:\n Aofo = VXjJ\n else:\n Aofo = VXjJ + L84Y(oyIN.zeros(VXjJ.sha... | [
"0.74323976",
"0.7214198",
"0.7177713",
"0.7040755",
"0.69724315",
"0.6905702",
"0.6894855",
"0.6891205",
"0.68707025",
"0.68491465",
"0.6843975",
"0.6819212",
"0.6809603",
"0.6794476",
"0.6781124",
"0.67682815",
"0.6728808",
"0.6687557",
"0.6659448",
"0.6655987",
"0.66475546... | 0.0 | -1 |
Return a thresholded matrix, with low values corresponding to True. | def lPBb(SppC, BWXx):
DJQf = oyIN.empty_like(SppC)
DJQf.fill(BWXx)
return SppC < DJQf | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WyRY(Emd4, ezWE, gwAu):\n p06G = oyIN.zeros_like(ezWE, dtype=bool)\n p06G[oyIN.where(ezWE > gwAu)] = True\n return p06G",
"def kmPV(_qJz: IntensityTable, lbpu: float) -> oyIN.ndarray:\n with qmLP.catch_warnings():\n qmLP.simplefilter('ignore', RuntimeWarning)\n return oyIN.ravel(_qJ... | [
"0.6758828",
"0.6507932",
"0.6447286",
"0.63933015",
"0.63588744",
"0.6242742",
"0.61335415",
"0.60878545",
"0.60520065",
"0.6037739",
"0.59855634",
"0.59771264",
"0.595802",
"0.59353274",
"0.59313476",
"0.58944076",
"0.58891475",
"0.5867291",
"0.58546907",
"0.58486444",
"0.5... | 0.6489873 | 2 |
Format a duration in seconds to a human readable representation. | def ct8j(Emd4, lcOE):
for FMLJ in Emd4.time_formats:
if lcOE > FMLJ[0]:
continue
if len(FMLJ) == 2:
return FMLJ[1]
return '%s %s' % (int(epAf.ceil(lcOE / FMLJ[2])), FMLJ[1]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DhpL(C6wh):\n EIOD = ''\n if C6wh >= 3600:\n EIOD += '%d:' % (C6wh / 3600)\n C6wh %= 3600\n EIOD += '%02d:%02d' % (C6wh / 60, C6wh % 60)\n return EIOD",
"def DhpL(C6wh):\n g75m = fCoM(seconds=int(C6wh))\n return ('{}:'.format(g75m.days) if g75m.days > 0 else '') + ITS7.strftim... | [
"0.8148888",
"0.7952816",
"0.7863548",
"0.7797493",
"0.7786447",
"0.7714862",
"0.77088386",
"0.7606691",
"0.759384",
"0.75492424",
"0.7527116",
"0.7463934",
"0.7335843",
"0.7253785",
"0.7242479",
"0.723127",
"0.72107375",
"0.72106194",
"0.7203574",
"0.7192855",
"0.7169758",
... | 0.6871421 | 53 |
Place the next queen at the given row. | def Aofo(YKHO, QTBn, rdlD):
fvDH = QTBn.index(-1)
BdN0 = list(QTBn[:])
BdN0[fvDH] = rdlD
return tuple(BdN0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def G6LD(YKHO, A1i8, A314):\n if A314 == YKHO.size:\n YKHO.show_full_board(A1i8)\n YKHO.solutions += 1\n else:\n for iVRZ in range(YKHO.size):\n if YKHO.check_place(A1i8, A314, iVRZ):\n A1i8[A314] = iVRZ\n YKHO.put_queen(A1i8, A314 + 1)",
"def c... | [
"0.71586746",
"0.7049028",
"0.6995977",
"0.6903045",
"0.6896096",
"0.6464978",
"0.6432895",
"0.62315637",
"0.6146246",
"0.60949683",
"0.6035406",
"0.6015876",
"0.59911865",
"0.59276325",
"0.58980656",
"0.58900285",
"0.5880197",
"0.5822479",
"0.57815254",
"0.57713413",
"0.5731... | 0.0 | -1 |
Check if all columns filled, no conflicts. | def Fa6j(YKHO, QTBn):
if QTBn[-1] == -1:
return False
return not any((YKHO.conflicted(QTBn, QTBn[fvDH], fvDH) for fvDH in range(len(QTBn)))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Yykn(YKHO):\n for WKvO in Ni9Y(0, 7):\n if not YKHO.isColumnFull(WKvO):\n return False\n return True",
"def rkbA(YKHO):\n RCsa = False\n for iVRZ in range(9):\n if YKHO.uniqueCandidatecolumn(iVRZ):\n RCsa = True\n return RCsa",
"def A10v(YKHO):\n U6jE =... | [
"0.72604036",
"0.7124834",
"0.7106838",
"0.70497775",
"0.6989891",
"0.69202286",
"0.68599564",
"0.67878187",
"0.6731963",
"0.67285115",
"0.6719564",
"0.6672451",
"0.6637296",
"0.6635915",
"0.6626134",
"0.66025126",
"0.65949255",
"0.65878236",
"0.6572155",
"0.65434504",
"0.653... | 0.0 | -1 |
Function to compute softmax values for each sets of scores in x | def N93T(YKHO, WKvO):
re6M = oyIN.max(WKvO, axis=1, keepdims=True)
uw5A = oyIN.exp(WKvO - re6M)
return uw5A / oyIN.sum(uw5A, axis=1, keepdims=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oSvh(WKvO):\n S2MS = []\n if oyIN.array(WKvO).ndim == 1:\n hrCc = oyIN.exp(WKvO)\n RmXN = oyIN.sum(hrCc)\n xzMv = hrCc / RmXN\n dzye = xzMv\n else:\n dzye = oyIN.exp(cCrA) / oyIN.sum(oyIN.exp(cCrA), axis=0)\n return dzye",
"def N93T(WKvO):\n j1LR = oyIN.exp(o... | [
"0.8191333",
"0.8156253",
"0.8156253",
"0.7883367",
"0.78692526",
"0.78692526",
"0.78692526",
"0.78692526",
"0.78692526",
"0.78692526",
"0.78692526",
"0.78542084",
"0.7849718",
"0.77380216",
"0.7680024",
"0.76323247",
"0.76200217",
"0.75776666",
"0.75318986",
"0.75123614",
"0... | 0.0 | -1 |
Tests the root node. | def x2kL(YKHO, Bjnn):
Vb5F = WyUl(Bjnn)
tk5Y = Vb5F._tree
assert [] == tk5Y.ancestors
tO9_ = "The root node doesn't contribute a File ID component"
with trZe.raises(ValueError, match=tO9_):
tk5Y.component
assert tk5Y.file_set == Vb5F
assert tk5Y.parent is None
assert 3 == len(tk5... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kFcs(YKHO, Q6kx):\n return Q6kx == '(/,0)'",
"def RIs1(YKHO):\n Ziit, tk5Y = (YKHO.TreeNode, YKHO.TreeRoot)\n for YRbF in Ziit.values():\n assert YRbF.Root is tk5Y",
"def H8gT(YKHO):\n kzHR = KDbd(kJm3.StringIO('<r></r>'))\n YKHO.assertEqual(kzHR.root, 'r')",
"def K5QN(YKHO, Q6kx):\... | [
"0.75451607",
"0.74756366",
"0.7427855",
"0.7396742",
"0.739204",
"0.73437554",
"0.7249004",
"0.71962446",
"0.7179722",
"0.7149888",
"0.7146102",
"0.7118258",
"0.7103728",
"0.7101292",
"0.70912564",
"0.7078876",
"0.7047518",
"0.70473135",
"0.702121",
"0.699201",
"0.6976046",
... | 0.64828753 | 58 |
Test a leaf node. | def Fuqk(YKHO, Bjnn):
Vb5F = WyUl(Bjnn)
kjp6 = Vb5F._instances[5].node
assert [] == kjp6.children
assert kjp6.has_instance
JZlq = kjp6.ancestors
assert 3 == len(JZlq)
assert 'IMAGE' == kjp6.record_type
assert 'IM000002' == kjp6.component
assert 'SERIES' in str(JZlq[0])
assert 'SE... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def loae():\n return False",
"def Fuqk(YKHO):\n Q6kx = ep_x('test')\n assert Q6kx.is_leaf()\n Q6kx.add_child('code')\n assert not Q6kx.is_leaf()",
"def loae() -> bool:\n return True",
"def loae(YKHO):\n return True",
"def loae(J_Es):\n return not GZiu(J_Es)",
"def loae(J_Es):\n ... | [
"0.79641473",
"0.789226",
"0.784892",
"0.77239347",
"0.7678314",
"0.7678314",
"0.7613539",
"0.761094",
"0.759096",
"0.75767726",
"0.75700235",
"0.7539294",
"0.7539294",
"0.7539294",
"0.75307184",
"0.7502211",
"0.7489453",
"0.74811757",
"0.74733186",
"0.7468337",
"0.74219",
... | 0.6823941 | 94 |
Test a bad directory record raises an exception when loading. | def IuEd(YKHO, Bjnn):
del Bjnn.DirectoryRecordSequence[0].PatientID
tO9_ = 'The PATIENT directory record at offset 396 is missing a required element'
with trZe.raises(ValueError, match=tO9_):
WyUl(Bjnn)
Bjnn.DirectoryRecordSequence[0].PatientID = '77654033'
del Bjnn.DirectoryRecordSequence[1... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PZNJ(YKHO):\n gIsw = 'test_file1.pdf'\n uDXq = G_Zw(testing=True)\n uDXq.database = lKpv.test_directory + '/' + 'Bad Database.dtBase2'\n uDXq.group = 'Test Group'\n uDXq.tags = 'Action Required'\n uDXq.string1 = 'Test String 1'\n uDXq.string2 = 'Test String 2'\n uDXq.date_string = '2012... | [
"0.7754713",
"0.7600571",
"0.75959384",
"0.75514877",
"0.7532802",
"0.73520005",
"0.7300313",
"0.72860867",
"0.71530855",
"0.7151407",
"0.7090647",
"0.70361423",
"0.7035919",
"0.69984335",
"0.69927406",
"0.6981568",
"0.6895089",
"0.6875918",
"0.6805768",
"0.68045217",
"0.6804... | 0.7240133 | 8 |
Test bad directory record raises if missing required element. | def YICd(YKHO, Bjnn):
del Bjnn.DirectoryRecordSequence[0].DirectoryRecordType
tO9_ = 'The directory record at offset 396 is missing one or more required elements: DirectoryRecordType'
with trZe.raises(ValueError, match=tO9_):
WyUl(Bjnn) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IuEd(YKHO, Bjnn):\n del Bjnn.DirectoryRecordSequence[0].PatientID\n tO9_ = 'The PATIENT directory record at offset 396 is missing a required element'\n with trZe.raises(ValueError, match=tO9_):\n WyUl(Bjnn)\n Bjnn.DirectoryRecordSequence[0].PatientID = '77654033'\n del Bjnn.DirectoryRecor... | [
"0.7211499",
"0.71455926",
"0.7096199",
"0.68872386",
"0.68698245",
"0.68270075",
"0.67868346",
"0.67493933",
"0.67003363",
"0.66709566",
"0.6648881",
"0.66306716",
"0.66053045",
"0.6589666",
"0.65599734",
"0.6555434",
"0.65461344",
"0.64883476",
"0.6475797",
"0.645974",
"0.6... | 0.77133614 | 0 |
Test an new and empty Fileset. | def wSwd(YKHO):
Vb5F = WyUl()
assert 0 == len(Vb5F)
assert Vb5F.ID is None
assert Vb5F.UID.is_valid
assert Vb5F.path is None
assert Vb5F.is_staged
with trZe.raises(StopIteration):
next(iter(Vb5F))
KCHu = str(Vb5F)
assert 'DICOM File-set' in KCHu
assert 'Root directory: (n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UmF5(YKHO):\n YKHO.create_composite_resource()\n llW2 = 'fileset_folder'\n dCDd.create_folder(YKHO.composite_resource, llW2)\n YKHO.add_file_to_resource(file_to_add=YKHO.generic_file, upload_folder=llW2)\n YKHO.assertEqual(YKHO.composite_resource.files.all().count(), 1)\n _gvj = YKHO.composit... | [
"0.72797453",
"0.6978349",
"0.68837494",
"0.64815855",
"0.64623845",
"0.6450044",
"0.64062923",
"0.6346171",
"0.63328063",
"0.6321939",
"0.6302772",
"0.6302629",
"0.62968117",
"0.62895775",
"0.6287974",
"0.627865",
"0.6278154",
"0.6246146",
"0.6235435",
"0.62285274",
"0.62176... | 0.72803706 | 0 |
Test writing an empty Fileset. | def I6HL(YKHO, Qime):
Vb5F = WyUl()
PObu = Vb5F.UID
tO9_ = 'The path to the root directory is required for a new File-set'
with trZe.raises(ValueError, match=tO9_):
Vb5F.write()
pmON = GkAb(Qime.name)
Vb5F.write(pmON)
kGys = list(pmON.glob('**/*'))
assert 'DICOMDIR' == kGys[0].na... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wSwd(YKHO):\n Vb5F = WyUl()\n assert 0 == len(Vb5F)\n assert Vb5F.ID is None\n assert Vb5F.UID.is_valid\n assert Vb5F.path is None\n assert Vb5F.is_staged\n with trZe.raises(StopIteration):\n next(iter(Vb5F))\n KCHu = str(Vb5F)\n assert 'DICOM File-set' in KCHu\n assert 'Ro... | [
"0.73764944",
"0.6862096",
"0.6823473",
"0.64600056",
"0.64431065",
"0.6385573",
"0.6328619",
"0.63147",
"0.6243474",
"0.62192667",
"0.6190695",
"0.61733043",
"0.6127512",
"0.6107896",
"0.61060417",
"0.61007303",
"0.6100494",
"0.608872",
"0.6066656",
"0.60541004",
"0.6032209"... | 0.77177167 | 0 |
Test that the update structure comment appears. | def Korb(YKHO, sJwm):
Vb5F = WyUl(sJwm)
assert 'Changes staged for write(): DICOMDIR update, directory structure update' in str(Vb5F) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Uc0X(YKHO):\n pass",
"def Rqsf(YKHO):\n pass",
"def DzJc(YKHO):\n YKHO.assertEqual(Zngb.validate_comment_update({'comment': 54}), 'New Comment ought to be a valid sentence.')",
"def AP_y(YKHO):\n YKHO.assertTrue(len(_oDL.do_update.__doc__) > 10)",
"def aKx9(YKHO):\n import reversion\n ... | [
"0.8609822",
"0.7903423",
"0.73090935",
"0.6978274",
"0.67968017",
"0.67200404",
"0.67200404",
"0.6682605",
"0.6623765",
"0.66017866",
"0.65724295",
"0.65590304",
"0.6545846",
"0.6530969",
"0.6530969",
"0.6507181",
"0.6507181",
"0.6507181",
"0.6507181",
"0.6507181",
"0.644793... | 0.0 | -1 |
Test loading with a bad path. | def ILYm(YKHO, sJwm):
sJwm.filename = 'bad'
tO9_ = "Unable to load the File-set as the 'filename' attribute for the DICOMDIR dataset is not a valid path: bad"
with trZe.raises(FileNotFoundError, match=tO9_):
WyUl(sJwm) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EXwq(YKHO):\n with trZe.raises(RuntimeError):\n V66C._load_input_file('/path/does/not/exist')",
"def EXwq(YKHO):\n with trZe.raises(RuntimeError):\n z6ty._load_input_file('/path/does/not/exist')",
"def oxvK():\n FYrf = {'squeezenet_v1': 'invalid_model_file_path.model'}\n with trZe... | [
"0.77927965",
"0.7639812",
"0.73587364",
"0.7350734",
"0.7340403",
"0.73339146",
"0.73300165",
"0.7306469",
"0.72416496",
"0.72266597",
"0.7212929",
"0.72028023",
"0.7196213",
"0.7184584",
"0.71662205",
"0.7125875",
"0.7100199",
"0.7077521",
"0.7065812",
"0.70378125",
"0.7037... | 0.64253205 | 99 |
Test loading with a bad DICOMDIR filename type. | def Vzf7(YKHO, sJwm):
sJwm.filename = None
tO9_ = "Unable to load the File-set as the DICOMDIR dataset must have a 'filename' attribute set to the path of the DICOMDIR file"
with trZe.raises(TypeError, match=tO9_):
WyUl(sJwm) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ILYm(YKHO, sJwm):\n sJwm.filename = 'bad'\n tO9_ = \"Unable to load the File-set as the 'filename' attribute for the DICOMDIR dataset is not a valid path: bad\"\n with trZe.raises(FileNotFoundError, match=tO9_):\n WyUl(sJwm)",
"def PZNJ(YKHO):\n gIsw = 'test_file1.pdf'\n uDXq = G_Zw(tes... | [
"0.75448614",
"0.72114384",
"0.70562226",
"0.67581123",
"0.6672867",
"0.6667288",
"0.66557395",
"0.65503794",
"0.6488387",
"0.64668894",
"0.643014",
"0.64276296",
"0.6387452",
"0.6369673",
"0.62668705",
"0.6249934",
"0.6240263",
"0.62379706",
"0.6229701",
"0.6217666",
"0.6204... | 0.7599362 | 0 |
Test loading a record with an empty File ID. | def KNU7(YKHO, sJwm):
ZfUD = sJwm.DirectoryRecordSequence[5]
ZfUD.ReferencedFileID = None
PObu = ZfUD.ReferencedSOPInstanceUIDInFile
Vb5F = WyUl(sJwm)
assert [] == Vb5F.find(SOPInstanceUID=PObu)
assert 30 == len(Vb5F) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uNhP(YKHO):\n nPrm = {'input_data': [{'name': 'File1'}]}\n RRlC = {'File1': (True, False, DAmW())}\n YKHO.assertRaises(TB1c, Q_YR(nPrm).validate_input_files, RRlC)",
"def Iajz(YKHO):\n from querying import create_record\n xpOq = [(12345, None), (1967508, None), (2019849, None)]\n for UhtK i... | [
"0.6670212",
"0.6654723",
"0.66171247",
"0.65332985",
"0.6478808",
"0.6465176",
"0.6455833",
"0.64265513",
"0.63497365",
"0.6344111",
"0.6323695",
"0.6252837",
"0.62127763",
"0.620747",
"0.62063116",
"0.6170364",
"0.61507165",
"0.61320233",
"0.61197513",
"0.6113045",
"0.61088... | 0.74288625 | 0 |
Test loading a record with a bad File ID. | def cLGo(YKHO, sJwm):
ZfUD = sJwm.DirectoryRecordSequence[5]
ZfUD.ReferencedFileID[-1] = 'MISSING'
PObu = ZfUD.ReferencedSOPInstanceUIDInFile
tO9_ = 'The referenced SOP Instance for the directory record at offset 1220 does not exist:'
with trZe.warns(UserWarning, match=tO9_):
Vb5F = WyUl(sJw... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cGub(YKHO):\n RKD7.debug('===== START TEST INVALID RECORD ID =====')\n with open(Hy7s.path.join(goXa, 'bad_id_20140813.velpt.log'), 'rb') as G6EG:\n z69T = V93J = 50\n wvEv = O0VV(YKHO._telemetered_parser_config, G6EG, YKHO.exception_callback, None, None)\n BZ33 = wvEv.get_records(z6... | [
"0.7515481",
"0.7443826",
"0.7216815",
"0.69919795",
"0.69698936",
"0.69439113",
"0.6942376",
"0.691558",
"0.68410563",
"0.6802303",
"0.6702054",
"0.66178024",
"0.6448244",
"0.6426862",
"0.64038914",
"0.6396734",
"0.637078",
"0.6333211",
"0.6328906",
"0.630573",
"0.63048613",... | 0.74589324 | 1 |
Test loading orphaned records without a valid File ID. | def LVZH(YKHO, Bjnn):
Q6uT = Bjnn.DirectoryRecordSequence
Q6uT[1].OffsetOfReferencedLowerLevelDirectoryEntity = 0
Q6uT[5].ReferencedFileID = None
Vb5F = WyUl()
Vb5F.load(Bjnn)
assert 31 == len(Vb5F)
assert 'IMAGE' == Q6uT[5].DirectoryRecordType
assert [] == Vb5F.find(SOPInstanceUID=Q6uT[... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E99K(YKHO, lY0q):\n Vb5F = WyUl()\n KAOR = Vb5F.add(lY0q)\n del KAOR.node._record.ReferencedFileID\n tO9_ = \"No 'Referenced File ID' in the directory record\"\n with trZe.raises(AttributeError, match=tO9_):\n KAOR.node._file_id",
"def gJDi(YKHO, Bjnn):\n Q6uT = Bjnn.DirectoryRecordS... | [
"0.68265647",
"0.67571044",
"0.66144735",
"0.6401953",
"0.63939226",
"0.6373769",
"0.62360364",
"0.62184566",
"0.6032926",
"0.6027342",
"0.60013574",
"0.5936503",
"0.5917414",
"0.59009105",
"0.58521533",
"0.58306426",
"0.58299345",
"0.5824385",
"0.5789949",
"0.5789949",
"0.57... | 0.7131011 | 0 |
Test loading an implicit VR DICOMDIR. | def fGnw(YKHO, sJwm, Qime):
oxOY = QDP1(jXmk)
tO9_ = "The DICOMDIR dataset uses an invalid transfer syntax 'Implicit VR Little Endian' and will be updated to use 'Explicit VR Little Endian'"
with trZe.warns(UserWarning, match=tO9_):
Vb5F = WyUl(oxOY)
Vb5F, oxOY, ckRy = cVuI(Vb5F, Qime.name)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YN0I(YKHO):\n EuzH = 'sample_data/vincentka_sample/'\n YKHO.assertTrue(CKLz.is_dicom_dir(EuzH))",
"def sJwm():\n return QDP1(rrVU)",
"def nbMR(YKHO):\n u0s6 = BKva.join(BKva.dirname(BKva.dirname(xAKo)), 'test_files', 'VMAT', 'DRGSdmlc-105-example.dcm')\n mg3v = u0s6.replace('DR', 'DR_')\n ... | [
"0.72375935",
"0.6480363",
"0.6414051",
"0.63336164",
"0.617805",
"0.6146995",
"0.60033",
"0.5799684",
"0.55676156",
"0.5402245",
"0.5384858",
"0.5362572",
"0.53492785",
"0.5336353",
"0.5280635",
"0.52713555",
"0.52458996",
"0.5228439",
"0.5218335",
"0.5194218",
"0.5149621",
... | 0.72675693 | 0 |
Test FileSet.write() with use_existing raises with +/ changes. | def byS8(YKHO, wcKq, lY0q):
Qime, oxOY = wcKq
assert 'FileSetDescriptorFileID' not in oxOY
Vb5F = WyUl(oxOY)
Vb5F.add(lY0q)
assert Vb5F._stage['~']
assert Vb5F._stage['+']
assert not Vb5F._stage['-']
Vb5F.descriptor_file_id = ['1', '2', '3']
tO9_ = "'Fileset.write\\(\\)' called with ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DZG6(YKHO, sJwm, lY0q):\n Vb5F = WyUl(sJwm)\n Vb5F.remove(Vb5F._instances[0])\n Vb5F.add(lY0q)\n tO9_ = \"'Fileset.write\\\\(\\\\)' called with 'use_existing' but additions to the File-set's managed instances are staged\"\n with trZe.raises(ValueError, match=tO9_):\n Vb5F.write(use_existi... | [
"0.81698614",
"0.74467987",
"0.69936997",
"0.69213027",
"0.66716504",
"0.6331022",
"0.6323216",
"0.6285378",
"0.62415004",
"0.6219884",
"0.62003493",
"0.61801815",
"0.61646867",
"0.60663325",
"0.6047023",
"0.60374236",
"0.60371673",
"0.60284954",
"0.60246783",
"0.60242844",
"... | 0.76897806 | 1 |
Test that the File IDs character sets switch correctly. | def jET0(YKHO, TYgv):
Qime, oxOY = BzeZ(TYgv)
def WEqr(YKHO):
return 10 ** 6 + 1
WyUl.__len__ = WEqr
Vb5F = WyUl(oxOY)
assert 10 ** 6 + 1 == len(Vb5F)
oxOY, ckRy = X7vl(Vb5F)
KAOR = Vb5F._instances[-1]
assert 'IM00001E' in KAOR.path
def WEqr(YKHO):
return 35 ** 6 + ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KB_r():\n IMwm = ['aBCDEF123', 'aBCD1234', 'ABCD!', '1234)', ' ', '1/2/3/4/5/6/7/8/9', 'لنزار', 'ABCD.DCM', '123 ABCD']\n for XP5J in IMwm:\n assert not FrKS(GkAb(XP5J))\n W3Xw = ['ACBDEFGH', '12345678', '1/2/3/4/5/6/7/8', '0', '9', 'A', 'Z', 'ABCD1234', '1234ABCD', '_', '_ABCD', 'ABCD_', 'AB_C... | [
"0.6915354",
"0.6898747",
"0.68095076",
"0.6380144",
"0.6362902",
"0.634198",
"0.62474775",
"0.6186483",
"0.61079854",
"0.6098332",
"0.6021712",
"0.6019135",
"0.6017637",
"0.6006364",
"0.599158",
"0.59677166",
"0.59669805",
"0.5964087",
"0.5959841",
"0.59499085",
"0.5944289",... | 0.5999929 | 14 |
Test that the File IDs character sets switch correctly. | def FEGS(YKHO, TYgv, Qime):
def WEqr(YKHO):
return 10 ** 6 + 1
WyUl.__len__ = WEqr
Vb5F = WyUl(TYgv)
assert 10 ** 6 + 1 == len(Vb5F)
Vb5F, oxOY, ckRy = cVuI(Vb5F, Qime.name)
KAOR = Vb5F._instances[-1]
assert 'IM00001E' in KAOR.path
def WEqr(YKHO):
return 35 ** 6 + 1
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KB_r():\n IMwm = ['aBCDEF123', 'aBCD1234', 'ABCD!', '1234)', ' ', '1/2/3/4/5/6/7/8/9', 'لنزار', 'ABCD.DCM', '123 ABCD']\n for XP5J in IMwm:\n assert not FrKS(GkAb(XP5J))\n W3Xw = ['ACBDEFGH', '12345678', '1/2/3/4/5/6/7/8', '0', '9', 'A', 'Z', 'ABCD1234', '1234ABCD', '_', '_ABCD', 'ABCD_', 'AB_C... | [
"0.6915354",
"0.6898747",
"0.68095076",
"0.6362902",
"0.634198",
"0.62474775",
"0.6186483",
"0.61079854",
"0.6098332",
"0.6021712",
"0.6019135",
"0.6017637",
"0.6006364",
"0.5999929",
"0.599158",
"0.59677166",
"0.59669805",
"0.5964087",
"0.5959841",
"0.59499085",
"0.5944289",... | 0.6380144 | 3 |
Returns a list of files in the folder and all its subfolders recursively. The folder can be written with wildcards as with the Unix find command. | def DeQe(xtX7):
RRlC = []
for eHNT in SC2F.glob(xtX7):
if Hy7s.path.isdir(eHNT):
RRlC.extend(DeQe(eHNT + Hy7s.sep + '**'))
else:
RRlC.append(eHNT)
return RRlC | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oEq_(xtX7):\n return [Hy7s.path.join(TifC, eHNT) for TifC, CCrh, iumf in Hy7s.walk(xtX7) for eHNT in iumf]",
"def BN5y(xtX7: str, mXDZ: re.Pattern) -> x1iM[str]:\n CNwg = []\n for tk5Y, AQSv, RRlC in Hy7s.walk(xtX7):\n for eHNT in RRlC:\n if mXDZ.search(GkAb(eHNT).name):\n ... | [
"0.8279409",
"0.78848106",
"0.7751984",
"0.768889",
"0.76638323",
"0.7611366",
"0.75176877",
"0.7468514",
"0.74300206",
"0.73998195",
"0.7394034",
"0.73928386",
"0.7386473",
"0.73527956",
"0.73026466",
"0.72184205",
"0.7207083",
"0.7202724",
"0.7196903",
"0.7169511",
"0.71666... | 0.78568727 | 2 |
Take a string and return a valid filename constructed from the string. | def LWVQ(KCHu):
import string
jUwZ = '-_.() %s%s' % (string.ascii_letters, string.digits)
Ux0P = ''.join((Z9rn for Z9rn in KCHu if Z9rn in jUwZ))
Ux0P = Ux0P.replace(' ', '_')
return Ux0P | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XZ66(KCHu):\n KCHu = str(KCHu).strip().replace(' ', '_')\n return ZbWC.sub('(?u)[^-\\\\w.]', '', KCHu)",
"def XZ66(KCHu):\n KCHu = Qsf5(KCHu).strip().replace(' ', '')\n return ZbWC.sub('(?u)[^-\\\\w.]', '_', KCHu)",
"def XZ66(KCHu):\n KCHu = Qsf5(KCHu).strip().replace(' ', '')\n return Zb... | [
"0.7950362",
"0.7925517",
"0.7925517",
"0.7912138",
"0.79069126",
"0.78794444",
"0.78644323",
"0.7858221",
"0.7840025",
"0.78341967",
"0.7808364",
"0.7773531",
"0.7773531",
"0.7773531",
"0.7705511",
"0.7705511",
"0.77006346",
"0.77006346",
"0.76903695",
"0.7681221",
"0.766709... | 0.769298 | 18 |
Compute the mean wind direction over a given axis. Assumes that the input angles are specified in degrees, and returns the mean wind direction in degrees. Wrapper for scipy.stats.circmean | def DWaw(e1Cr, jDK_=0, wSUs='omit'):
return VI4H(e1Cr, high=360.0, axis=jDK_, nan_policy=wSUs) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cXDC(WKvO):\n quA1 = oyIN.sum(oyIN.sin(WKvO))\n LC8P = oyIN.sum(oyIN.cos(WKvO))\n JBMS = oyIN.arctan2(quA1, LC8P)\n return JBMS",
"def qlsZ(lbHk, jDK_=None, pQ4c=2 * mM0K):\n jzdc = 2 * mM0K / pQ4c\n gpRq = oyIN.mean(oyIN.exp(1j * lbHk * jzdc), axis=jDK_)\n return oyIN.angle(gpRq) / jzdc... | [
"0.6896911",
"0.68072474",
"0.6693665",
"0.6646159",
"0.65825826",
"0.6331246",
"0.6155219",
"0.6150669",
"0.6059192",
"0.603525",
"0.595798",
"0.5921978",
"0.584163",
"0.57616395",
"0.575463",
"0.5750469",
"0.5741042",
"0.5713202",
"0.5667069",
"0.5667063",
"0.5660426",
"0... | 0.7558262 | 0 |
Gets the primal objective from the solution of the LP problem | def gDIy(rlnY, SGPK=None):
if SGPK is None:
SGPK = {}
return BWXx(rlnY.objective) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qxSN(YKHO, puVb, aWZo, AnGN, hCYc):\n return wsG_.Minimize(100000.0 * wsG_.sum(YKHO.s_prime))",
"def rV9r(YKHO):\n return YKHO._objective",
"def qxSN(YKHO, puVb, aWZo, AnGN, hCYc):\n rV9r = None\n return rV9r",
"def hl9z(Tuqy, rV9r, gkIT):\n if Tuqy.lower() == 'max':\n Tuqy = QC02\n... | [
"0.7341318",
"0.7209103",
"0.71594274",
"0.6989895",
"0.69220513",
"0.69166446",
"0.6818481",
"0.67751896",
"0.6754859",
"0.6694884",
"0.66031843",
"0.660211",
"0.65914625",
"0.65767014",
"0.65106076",
"0.64715177",
"0.6442946",
"0.6417117",
"0.6413383",
"0.6413383",
"0.64031... | 0.6466055 | 16 |
Gets the points from the solution | def W_UT(rlnY, SGPK=None):
if SGPK is None:
SGPK = {}
bnFD = SGPK['maximize'] if 'maximize' in SGPK else False
tvHs = SGPK['return_when_none'] if 'return_when_none' in SGPK else False
FFA8 = SGPK['var_corr'] if 'var_corr' in SGPK else {}
if str(Ka_z[rlnY.status]) == 'Optimal':
kidU =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nkGx(YKHO):\n Ziit = YKHO.get_nodes()\n LTIa = []\n for Q6kx in Ziit:\n LTIa.append(Q6kx[1])\n return LTIa",
"def nkGx():\n return {(1.0, 5.0), (2.0, 8.0), (3.5, 12.5)}",
"def nkGx(YKHO):\n return YKHO.point",
"def LTIa(YKHO):\n y5bX = 0\n for yzq9 in YKHO.__solved:\n ... | [
"0.7558459",
"0.7473247",
"0.7467212",
"0.7459172",
"0.7449153",
"0.7354238",
"0.73388124",
"0.73377407",
"0.7332452",
"0.7332452",
"0.7297811",
"0.7230547",
"0.72245765",
"0.7138028",
"0.7135517",
"0.7135517",
"0.70840025",
"0.70818293",
"0.70655334",
"0.70655334",
"0.706553... | 0.6531414 | 63 |
Find threshold which approximately separates foreground from background Assumes image has not been padded, i.e. background noise extends to corners | def Q4iv(LNo8, Wskb=5):
jzdc, Fg_i = (slice(0, Wskb), slice(-Wskb, None))
HjHK = [[jzdc, jzdc, jzdc], [jzdc, jzdc, Fg_i], [jzdc, Fg_i, jzdc], [jzdc, Fg_i, Fg_i], [Fg_i, jzdc, jzdc], [Fg_i, jzdc, Fg_i], [Fg_i, Fg_i, jzdc], [Fg_i, Fg_i, Fg_i]]
JBMS = oyIN.median([oyIN.mean(LNo8[Z9rn]) for Z9rn in HjHK])
M... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hdu2(LNo8, gwAu):\n uq8o = LNo8.copy()\n c5bO = uq8o > gwAu\n uq8o[c5bO] = 0\n return uq8o",
"def O7bb(LNo8, ZHfW=None):\n hDNs = oyIN.array(LNo8.flat) if ZHfW is None else LNo8[ZHfW]\n if oyIN.product(hDNs.shape) == 0:\n return 0\n xYNz = oyIN.min(hDNs)\n jvuA = oyIN.max(hDNs)... | [
"0.7238135",
"0.7193954",
"0.69198054",
"0.69044626",
"0.68840826",
"0.6743838",
"0.6712886",
"0.66638654",
"0.6603608",
"0.65286034",
"0.65088546",
"0.649451",
"0.6426864",
"0.64015824",
"0.6391017",
"0.6388939",
"0.6383581",
"0.6315211",
"0.6304228",
"0.62880707",
"0.628731... | 0.0 | -1 |
Gets the namespace of this MultipartUpload. The namespace in which the inprogress multipart upload is stored. | def _63S(YKHO):
return YKHO._namespace | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _63S(YKHO) -> str:\n return qe4Y.get(YKHO, 'namespace')",
"def _63S(YKHO) -> str:\n return qe4Y.get(YKHO, 'namespace')",
"def _63S(YKHO) -> str:\n return qe4Y.get(YKHO, 'namespace')",
"def _63S(YKHO) -> str:\n return qe4Y.get(YKHO, 'namespace')",
"def _63S(YKHO) -> str:\n return qe4Y.get... | [
"0.729201",
"0.729201",
"0.729201",
"0.729201",
"0.729201",
"0.729201",
"0.729201",
"0.7179036",
"0.7179036",
"0.7179036",
"0.7179036",
"0.7179036",
"0.7114334",
"0.7090684",
"0.70858234",
"0.70858234",
"0.70858234",
"0.70019525",
"0.70019525",
"0.70019525",
"0.70019525",
"... | 0.7449907 | 1 |
Sets the namespace of this MultipartUpload. The namespace in which the inprogress multipart upload is stored. | def _63S(YKHO, _63S):
YKHO._namespace = _63S | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _63S(YKHO, _63S: str):\n YKHO.obj.metadata.namespace = _63S",
"def dwEx(YKHO, _63S):\n YKHO.__namespace = _63S",
"def _63S(YKHO, _63S):\n YKHO._namespace = _63S",
"def _63S(YKHO, _63S):\n YKHO._namespace = _63S",
"def _rnV(YKHO, _63S):\n YKHO.namespace = _63S",
"def o4dQ(YKHO, _63S):\n... | [
"0.73284364",
"0.72678304",
"0.70300937",
"0.70300937",
"0.6988001",
"0.69655025",
"0.67197615",
"0.6705696",
"0.6705696",
"0.6705696",
"0.63722116",
"0.6277616",
"0.62710917",
"0.60493445",
"0.59615165",
"0.59135693",
"0.5906041",
"0.5906041",
"0.5880686",
"0.5805165",
"0.57... | 0.7093779 | 2 |
Gets the bucket of this MultipartUpload. The bucket in which the inprogress multipart upload is stored. | def WE7e(YKHO):
return YKHO._bucket | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def czD3(YKHO):\n return YKHO.gcs_client.get_bucket(bucket_name=YKHO.bucket)",
"def WE7e(YKHO):\n if YKHO._bucket is None:\n YKHO._bucket = YKHO.s3_resource.Bucket(YKHO.bucket_name)\n return YKHO._bucket",
"def WE7e(YKHO):\n if YKHO._bucket is None:\n YKHO._bucket = YKHO._get_or_creat... | [
"0.83696455",
"0.80393577",
"0.80079645",
"0.7997952",
"0.7865351",
"0.7781046",
"0.7606875",
"0.7606875",
"0.7606875",
"0.7606875",
"0.7606875",
"0.7606875",
"0.7606875",
"0.7567804",
"0.7536667",
"0.7437345",
"0.7437345",
"0.7437345",
"0.7437345",
"0.7437345",
"0.7349641",
... | 0.7862019 | 7 |
Gets the object of this MultipartUpload. The object name of the inprogress multipart upload. | def object(YKHO):
return YKHO._object | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zbug(YKHO, zGKt, tB6k, MOPg=None):\n MOPg = MOPg or {}\n j1Rx = YKHO._get_object_path(zGKt, tB6k)\n NArs = {'uploads': ''}\n geh0 = YKHO.connection.request(j1Rx, method='POST', headers=MOPg, params=NArs)\n if geh0.status != B3z0.OK:\n raise YLs5('Error initiating multipart upload', driver... | [
"0.6463987",
"0.61121273",
"0.6068735",
"0.59702164",
"0.5926283",
"0.59219563",
"0.59069484",
"0.59069484",
"0.59046066",
"0.58316916",
"0.57956743",
"0.57097477",
"0.56712127",
"0.56712127",
"0.56712127",
"0.56712127",
"0.56712127",
"0.5617478",
"0.5586417",
"0.5570268",
"0... | 0.56088614 | 18 |
Gets the upload_id of this MultipartUpload. The unique identifier for the inprogress multipart upload. | def BhaS(YKHO):
return YKHO._upload_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RC9C(YKHO):\n return YKHO._upload_id_marker",
"def BTlJ(YKHO):\n if YKHO._upload_session_id_present:\n return YKHO._upload_session_id_value\n else:\n raise AttributeError(\"missing required field 'upload_session_id'\")",
"def Y_Ue(YKHO):\n return YKHO._next_upload_id_marker",
"d... | [
"0.6954693",
"0.66397893",
"0.6254673",
"0.62329334",
"0.6161721",
"0.61596864",
"0.60975057",
"0.6048371",
"0.59348935",
"0.591538",
"0.5912505",
"0.58533585",
"0.581842",
"0.58076155",
"0.57714456",
"0.57393515",
"0.5650389",
"0.5637067",
"0.5627672",
"0.56247437",
"0.56190... | 0.8513798 | 0 |
Sets the upload_id of this MultipartUpload. The unique identifier for the inprogress multipart upload. | def BhaS(YKHO, BhaS):
YKHO._upload_id = BhaS | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BhaS(YKHO):\n return YKHO._upload_id",
"def u9LW(YKHO, u9LW):\n if u9LW is None:\n raise ValueError('Invalid value for `symbol_upload_id`, must not be `None`')\n YKHO._symbol_upload_id = u9LW",
"def AwJp(YKHO, QePW, J9a6=None, ym_X=None):\n YKHO.cleanup()\n AwJp = WmKn(request=QePW, u... | [
"0.69620526",
"0.61732143",
"0.60312825",
"0.57262903",
"0.5713814",
"0.56252354",
"0.55861944",
"0.54651874",
"0.54552156",
"0.54491323",
"0.54288787",
"0.5357401",
"0.53384554",
"0.53206986",
"0.5312969",
"0.52995956",
"0.52979827",
"0.52979827",
"0.52875316",
"0.5272943",
... | 0.82717973 | 0 |
Gets the time_created of this MultipartUpload. The date and time the upload was created, as described in `RFC 2616`__, section 14.29. | def QT9s(YKHO):
return YKHO._time_created | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IWVZ(YKHO):\n return YKHO.__created_time",
"def IWVZ(YKHO):\n return YKHO.__created_time",
"def IWVZ(YKHO):\n return YKHO._created",
"def bZt2(YKHO):\n return YKHO._get_field('creationTime')",
"def wqpv(YKHO) -> str:\n return qe4Y.get(YKHO, 'created_time')",
"def wqpv(YKHO) -> str:\n ... | [
"0.80488956",
"0.80488956",
"0.79895777",
"0.7979494",
"0.78140444",
"0.78140444",
"0.78140444",
"0.78140444",
"0.78140444",
"0.78140444",
"0.78140444",
"0.77711844",
"0.7760304",
"0.7729467",
"0.7726423",
"0.7726423",
"0.77228826",
"0.77228826",
"0.77228826",
"0.77228826",
"... | 0.77648205 | 12 |
Sets the time_created of this MultipartUpload. The date and time the upload was created, as described in `RFC 2616`__, section 14.29. | def QT9s(YKHO, QT9s):
YKHO._time_created = QT9s | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wqpv(YKHO, wqpv):\n YKHO._created_time = wqpv",
"def QT9s(YKHO, QT9s):\n YKHO._time_created = QT9s",
"def QT9s(YKHO, QT9s):\n YKHO._time_created = QT9s",
"def QT9s(YKHO, QT9s):\n YKHO._time_created = QT9s",
"def Tt4d(YKHO, wqpv):\n from datetime import datetime\n if wqpv is not None a... | [
"0.78494865",
"0.7817704",
"0.7817704",
"0.7817704",
"0.762824",
"0.762824",
"0.7467992",
"0.7467992",
"0.72748303",
"0.71150035",
"0.71150035",
"0.71150035",
"0.71150035",
"0.71150035",
"0.71150035",
"0.71150035",
"0.71150035",
"0.71150035",
"0.71150035",
"0.71150035",
"0.69... | 0.7777462 | 5 |
Returns indices used for tf.gather_nd or tf.scatter_nd. | def TK9K(_0VL):
_0VL.get_shape().assert_has_rank(2)
MWN_ = ZylS.ones_like(_0VL) * ZylS.expand_dims(ZylS.range(ZylS.shape(input=_0VL)[0]), 1)
return ZylS.stack([MWN_, _0VL], axis=-1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rRyh(YKHO, ROpF):\n KCHu = ROpF\n kvqa = ZylS.shape(KCHu)\n mOYi = kvqa - 1\n obHv = kvqa - 2\n kl2R = ZylS.concat(0, [KCHu, ZylS.constant([1])])\n V8vG = ZylS.ones(obHv - 1, dtype='int32')\n xnRw = ZylS.ones(mOYi - 1, dtype='int32')\n qQO_ = ZylS.concat(0, [V8vG, ZylS.constant([-1]), Z... | [
"0.71388954",
"0.68791264",
"0.6857597",
"0.6850315",
"0.6819906",
"0.6798849",
"0.6769051",
"0.6754621",
"0.6736396",
"0.67113155",
"0.6685453",
"0.66803735",
"0.6629557",
"0.6628091",
"0.6615547",
"0.6573497",
"0.6539988",
"0.6520457",
"0.6496263",
"0.64901406",
"0.6487358"... | 0.68296814 | 4 |
Returns a boolean `Tensor` for label validity. | def Y1_Z(Crrw):
Crrw = ZylS.convert_to_tensor(value=Crrw)
return ZylS.greater_equal(Crrw, 0.0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y1_Z(Crrw):\n Crrw = ZylS.convert_to_tensor(value=Crrw)\n return ZylS.greater_equal(Crrw, 0.0)",
"def Trm8(Crrw):\n Crrw = IPme.convert_to_tensor(Crrw)\n return qkSJ.greater_equal(Crrw, 0.0)",
"def N7yb():\n GEgY = ZylS.random_uniform(m0vm, minval=0.7, maxval=1.2, dtype=YKHO.float_type)\n ... | [
"0.77211344",
"0.7077754",
"0.6653959",
"0.65973586",
"0.63069",
"0.59805954",
"0.5940951",
"0.5888226",
"0.5801302",
"0.56095135",
"0.5600947",
"0.5566574",
"0.55611485",
"0.5559893",
"0.5559893",
"0.5559893",
"0.5553473",
"0.5538118",
"0.55351096",
"0.5526032",
"0.55246276"... | 0.7583425 | 1 |
Gets indices which would shuffle a tensor. | def J7zs(ROpF, ZHfW=None, OGtt=True, yokr=None):
if OGtt:
yrA_ = ZylS.random.uniform(ROpF, seed=yokr)
else:
yrA_ = ZylS.zeros(ROpF, dtype=ZylS.float32)
if ZHfW is not None:
yrA_ = ZylS.where(ZHfW, yrA_, yrA_ + 2.0)
return ZylS.argsort(yrA_, stable=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mwOQ(YKHO):\n _0VL = ZylS.range(0, YKHO._dataset_info.sequence_size)\n _0VL = ZylS.random_shuffle(_0VL)\n _0VL = ZylS.slice(_0VL, begin=[0], size=[YKHO._example_size])\n return _0VL",
"def mwOQ(Z7fx, NHjC):\n _0VL = ZylS.range(0, Z7fx.sequence_size)\n _0VL = ZylS.random_shuffle(_0VL)\n _... | [
"0.78596574",
"0.7285493",
"0.71295863",
"0.7092531",
"0.6964866",
"0.6778678",
"0.6778678",
"0.6729635",
"0.6711717",
"0.6627555",
"0.65875584",
"0.65518576",
"0.6519985",
"0.6500151",
"0.6493004",
"0.6464264",
"0.6448915",
"0.6365309",
"0.631538",
"0.6300551",
"0.62842697",... | 0.7447751 | 1 |
Returns an int `Tensor` as the ranks (1based) after sorting scores. | def LpJU(cCrA, OGtt=True, yokr=None):
with ZylS.compat.v1.name_scope(name='sorted_ranks'):
Ep8u, sL7f = ZylS.unstack(ZylS.shape(input=cCrA))
FBNX = ZylS.tile(ZylS.expand_dims(ZylS.range(sL7f), 0), [Ep8u, 1])
PAsw = tGgw(cCrA, [FBNX], shuffle_ties=OGtt, seed=yokr)[0]
HRrY = ZylS.argso... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qA0O(cCrA):\n HRrY = oyIN.zeros(len(cCrA))\n jbXL = [(cCrA[YRbF], YRbF) for YRbF in range(len(cCrA))]\n jbXL.sort(key=lambda WKvO: WKvO[0], reverse=True)\n fdMZ, exwG, YRbF = (1, 1, 0)\n while YRbF < len(cCrA):\n r845 = YRbF\n while r845 < len(cCrA) - 1 and jbXL[r845][0] == jbXL[r8... | [
"0.75071806",
"0.75071806",
"0.73275876",
"0.72994465",
"0.7291809",
"0.7287241",
"0.7244985",
"0.72105277",
"0.71728605",
"0.71672845",
"0.71418333",
"0.7135208",
"0.7133129",
"0.7133129",
"0.7038229",
"0.70241165",
"0.7016511",
"0.6995423",
"0.6995423",
"0.695603",
"0.69078... | 0.7305836 | 3 |
Reshapes the first n dims of the input `tensor` to `new shape`. | def T3Jg(vhpA, J_hu, EZd9):
assert vhpA.get_shape().ndims is None or vhpA.get_shape().ndims >= J_hu, 'Tensor shape is less than {} dims.'.format(J_hu)
EZd9 = ZylS.concat([EZd9, ZylS.shape(input=vhpA)[J_hu:]], 0)
if isinstance(vhpA, ZylS.SparseTensor):
return ZylS.sparse.reshape(vhpA, EZd9)
retur... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VjTS(WKvO, exwG):\n OOcW = ihqc(WKvO)\n r8hN = OOcW[-1]\n if isinstance(r8hN, int) and isinstance(exwG, int):\n assert r8hN % exwG == 0\n return ZylS.reshape(WKvO, OOcW[:-1] + [int(exwG), int(r8hN // exwG)])",
"def VjTS(WKvO, exwG):\n OOcW = ihqc(WKvO)\n r8hN = OOcW[-1]\n if isins... | [
"0.73141104",
"0.730893",
"0.730893",
"0.71433455",
"0.7058292",
"0.69886994",
"0.69878066",
"0.6979443",
"0.6979443",
"0.69560504",
"0.68609583",
"0.68100685",
"0.67595005",
"0.6719521",
"0.66884565",
"0.66672444",
"0.6601282",
"0.65992534",
"0.6561213",
"0.6537394",
"0.6508... | 0.6666921 | 16 |
Converts the given `tensor` to a 2D `Tensor`. | def b7l5(vhpA):
with ZylS.compat.v1.name_scope(name='reshape_to_2d'):
fdMZ = vhpA.shape.rank if vhpA.shape is not None else None
if fdMZ is not None and fdMZ != 2:
if fdMZ >= 3:
vhpA = ZylS.reshape(vhpA, ZylS.shape(input=vhpA)[0:2])
else:
while... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ca86(vhpA):\n return vhpA.reshape(vhpA.shape[0], vhpA.shape[1] * vhpA.shape[2])",
"def b7l5(vhpA):\n with ZylS.compat.v1.name_scope(name='reshape_to_2d'):\n fdMZ = vhpA.shape.rank if vhpA.shape is not None else None\n if fdMZ is not None and fdMZ != 2:\n if fdMZ >= 3:\n ... | [
"0.78455853",
"0.78226143",
"0.68830717",
"0.6765858",
"0.6765858",
"0.67591393",
"0.67388797",
"0.6651205",
"0.6588084",
"0.6585215",
"0.65850747",
"0.6536185",
"0.6518792",
"0.6506823",
"0.6505797",
"0.64921695",
"0.64755803",
"0.64755803",
"0.64755803",
"0.64755803",
"0.64... | 0.7842456 | 1 |
Creates circular indices with padding and mask for nonpadded ones. This returns a indices and a mask Tensor, where the mask is True for valid entries and False for padded entries. The returned indices have the shape of [batch_size, size], where the batch_size is obtained from the 1st dim of `num_valid_entries`. For a b... | def iFFQ(zNig, S12t):
with ZylS.compat.v1.name_scope(name='circular_indices'):
ITSp = ZylS.tile(ZylS.expand_dims(ZylS.range(zNig), 0), [ZylS.shape(input=S12t)[0], 1])
S12t = ZylS.reshape(S12t, [-1, 1])
KAQe = ZylS.less(ITSp, S12t)
S12t = ZylS.where(ZylS.less(S12t, 1), ZylS.ones_like(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iFFQ(zNig, S12t):\n with ZylS.compat.v1.name_scope(name='circular_indices'):\n ITSp = ZylS.tile(ZylS.expand_dims(ZylS.range(zNig), 0), [ZylS.shape(S12t)[0], 1])\n S12t = ZylS.reshape(S12t, [-1, 1])\n KAQe = ZylS.less(ITSp, S12t)\n S12t = ZylS.compat.v1.where(ZylS.less(S12t, 1), Z... | [
"0.7724287",
"0.70211494",
"0.70211494",
"0.6085053",
"0.59562624",
"0.594772",
"0.58052814",
"0.577898",
"0.5767089",
"0.5744239",
"0.5716954",
"0.5716954",
"0.5716954",
"0.56983876",
"0.56983876",
"0.56967133",
"0.56738496",
"0.56261617",
"0.56261617",
"0.5620046",
"0.56084... | 0.77151614 | 1 |
Pads the invalid entries by valid ones and returns the nd_indices. For example, when we have a batch_size = 1 and list_size = 3. Only the first 2 | def daNe(SGVO, hXNa=False, yokr=None):
with ZylS.compat.v1.name_scope(name='nd_indices_with_padding'):
SGVO = ZylS.convert_to_tensor(value=SGVO)
sL7f = ZylS.shape(input=SGVO)[1]
S12t = ZylS.reduce_sum(input_tensor=ZylS.cast(SGVO, dtype=ZylS.int32), axis=1)
_0VL, ZHfW = iFFQ(sL7f, S12... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iFFQ(zNig, S12t):\n with ZylS.compat.v1.name_scope(name='circular_indices'):\n ITSp = ZylS.tile(ZylS.expand_dims(ZylS.range(zNig), 0), [ZylS.shape(S12t)[0], 1])\n S12t = ZylS.reshape(S12t, [-1, 1])\n KAQe = ZylS.less(ITSp, S12t)\n S12t = ZylS.compat.v1.where(ZylS.less(S12t, 1), Z... | [
"0.6192267",
"0.6174341",
"0.6151016",
"0.60680175",
"0.5939736",
"0.57878554",
"0.57868737",
"0.57815474",
"0.5768397",
"0.5660566",
"0.5647412",
"0.5631608",
"0.562029",
"0.560588",
"0.55687886",
"0.55047554",
"0.5442504",
"0.5427454",
"0.5424961",
"0.54023504",
"0.54014283... | 0.74110466 | 0 |
Converts given inputs from ragged tensors to dense tensors. | def Qn9b(Crrw, N6Z1, _mSQ):
ZHfW = ZylS.cast(ZylS.ones_like(Crrw).to_tensor(0.0), dtype=ZylS.bool)
Crrw = Crrw.to_tensor(lOup)
if N6Z1 is not None:
N6Z1 = N6Z1.to_tensor(xBfQ)
if isinstance(_mSQ, ZylS.RaggedTensor):
_mSQ = _mSQ.to_tensor(kvod)
return (Crrw, N6Z1, _mSQ, ZHfW) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVH6(YKHO, g4y1):\n WKvO = g4y1\n Ep8u = ZylS.shape(WKvO)[0]\n u54L = ZylS.shape(WKvO)[1]\n WKvO = ZylS.reshape(WKvO, [-1, WKvO.shape[-1]])\n hlel = YKHO.filter_dense_layer(WKvO)\n hlel = ZylS.nn.relu(hlel)\n hlel = ZylS.reshape(hlel, [Ep8u, -1, hlel.shape[-1]])\n if YKHO.is_train:\n ... | [
"0.62835276",
"0.6133821",
"0.602012",
"0.597887",
"0.59042597",
"0.587554",
"0.5867981",
"0.5867981",
"0.58139896",
"0.5810633",
"0.57968444",
"0.5785785",
"0.577915",
"0.57491237",
"0.5723539",
"0.5716738",
"0.5705163",
"0.5675192",
"0.5653042",
"0.56477386",
"0.56369376",
... | 0.6891263 | 0 |
Produces a normalized version of the given string. Both queries and documents need to be identically processed for lookups to succeed. | def jnV4(YKHO, NRcB: str) -> str:
return YKHO._normalizer.normalize(' '.join(YKHO._tokenizer.strings(YKHO._normalizer.canonicalize(NRcB)))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sDQ5(Emd4, vIwR):\n return NkkI(Emd4.udnorm, vIwR)",
"def I3lj(vIwR):\n return vIwR.lower().replace(' ', '')",
"def NkkI(vIwR: str) -> str:\n return Zf5h.only_word_characters(vIwR.replace(' ', '_')).lower()",
"def NkkI(vIwR):\n vIwR = vIwR.lower()\n vIwR = zVCt.normalize('NFKD', vIwR).enco... | [
"0.7165364",
"0.6807333",
"0.67667407",
"0.67539793",
"0.6749781",
"0.67185706",
"0.6646867",
"0.65585",
"0.6532917",
"0.65169394",
"0.65036184",
"0.6494388",
"0.64932364",
"0.64651245",
"0.6456397",
"0.6380363",
"0.63141763",
"0.6290779",
"0.62678075",
"0.62629026",
"0.62594... | 0.6639414 | 7 |
Every word of the form Aaaa is replaced by ""+Aaaa+"". | def pcVV(YKHO, KCHu):
import re
nNXP = 'https://fricas.github.io/api/'
hAVj = '([A-Z][A-Za-z0-9]*)'
YBmP = 'style="color:blue;text-decoration:none;"'
RqeO = '<a href="' + nNXP + '\\1.html" target="_blank" ' + YBmP + '>\\1</a>'
return re.sub(hAVj, RqeO, KCHu) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ulu3(GIN8):\n return ''.join([WKvO + WKvO for WKvO in GIN8])",
"def eC1R(GIN8):\n return GIN8.lower().replace('_+_', '_').replace(' ', '_')",
"def qAJe(V22M, A9IP=' '):\n return [str(GIN8) + A9IP for GIN8 in V22M]",
"def ymD6(GIN8: str):\n lzi6 = 'aeiou'\n return ''.join([chr(ord(YRbF) + 1... | [
"0.6634295",
"0.649552",
"0.64703965",
"0.64625937",
"0.64331913",
"0.6430033",
"0.6418618",
"0.6409153",
"0.63832414",
"0.6322158",
"0.62913036",
"0.6260532",
"0.6244033",
"0.6178619",
"0.6174806",
"0.61394435",
"0.6127894",
"0.6107665",
"0.6104629",
"0.61009526",
"0.609413"... | 0.0 | -1 |
Get the requests URL if the prefix matches the URL, None otherwise. | def aTT_(YKHO, y0cW) -> uLKX[str, None]:
if YKHO.flow['request']['url'].startswith(y0cW):
return YKHO.flow['request']['url']
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jxAh(QePW):\n if IbQB is not None:\n return IbQB\n else:\n Ylbp = '/'\n try:\n Ylbp = '/' + str(QePW.path).split('/')[1]\n except IndexError:\n Ylbp = '/'\n return Ylbp",
"def lWQw(qv1X=None):\n from uliweb import request\n Mkmy = qv1X or r... | [
"0.68446285",
"0.6654479",
"0.6347424",
"0.6278444",
"0.612358",
"0.61158824",
"0.61158824",
"0.61158824",
"0.61158824",
"0.61158824",
"0.61158824",
"0.61158824",
"0.61158824",
"0.61158824",
"0.61158824",
"0.61158824",
"0.61158824",
"0.61158824",
"0.61158824",
"0.61158824",
"... | 0.86973816 | 0 |
Return a signature for the provided hash, using the provided random nonce. It is absolutely vital that random_k be an unpredictable number in the range [1, self.public_key.point.order()1]. If an attacker can guess random_k, he can compute our private key from a single signature. Also, if an attacker knows a few highord... | def Zihr(YKHO, hash, PNkv):
yvY1 = YKHO.public_key.generator
exwG = yvY1.order()
G1Hx = PNkv % exwG
ZT17 = G1Hx + exwG
E00_ = ZT17 + exwG
if XxJb(ZT17) == XxJb(exwG):
EBgd = E00_ * yvY1
else:
EBgd = ZT17 * yvY1
Mkmy = EBgd.x() % exwG
if Mkmy == 0:
raise F5tx('... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uLJL(YKHO, dKPB, jn0m=None, Z4YF=r21A, G49c=b''):\n qlqg = YKHO.privkey.secret_multiplier\n jn0m = jn0m or YKHO.default_hashfunc\n dKPB = IaZG(dKPB)\n G49c = IaZG(G49c)\n\n def SXWV(Mkmy, KCHu, T4Wy):\n return (Mkmy, KCHu, T4Wy)\n HWy2 = 0\n while True:\n G1Hx = ybE_.generate... | [
"0.5631823",
"0.5618312",
"0.5612615",
"0.5557596",
"0.5552242",
"0.54499066",
"0.5387074",
"0.53377235",
"0.5278301",
"0.5262942",
"0.5220159",
"0.521305",
"0.51883805",
"0.5178708",
"0.5094915",
"0.50772035",
"0.5051425",
"0.50391537",
"0.502497",
"0.49924654",
"0.49781597"... | 0.81358594 | 0 |
The unique identifier of the firewall rule group. | def XNTy(YKHO) -> qe4Y.Input[str]:
return qe4Y.get(YKHO, 'firewall_rule_group_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XNTy(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'firewall_rule_group_id')",
"def XNTy(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'firewall_rule_group_id')",
"def ShR8(YKHO):\n return YKHO._group.id",
"def Dt19(YKHO) -> str:\n return qe4Y.get(YKHO, 'network_group_id')",
... | [
"0.8576196",
"0.81899405",
"0.7795333",
"0.7720589",
"0.7629348",
"0.7629348",
"0.7397897",
"0.73823404",
"0.73823404",
"0.73823404",
"0.73823404",
"0.73823404",
"0.73823404",
"0.73380303",
"0.73380303",
"0.7306542",
"0.72345525",
"0.72345525",
"0.7190895",
"0.714325",
"0.709... | 0.8334276 | 1 |
The unique identifier of the VPC that you want to associate with the rule group. | def xOeT(YKHO) -> qe4Y.Input[str]:
return qe4Y.get(YKHO, 'vpc_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fEOc(YKHO):\n return YKHO.network.regional_network.vpc.default_security_group_id",
"def xOeT():\n try:\n GXzF = qgI7.metadata['network']['interfaces']['macs']\n vEq1 = None\n for Pp4r, o8Kj in GXzF.items():\n if vEq1 is not None:\n return None\n ... | [
"0.70776373",
"0.7012093",
"0.69781184",
"0.69781184",
"0.69781184",
"0.69781184",
"0.69781184",
"0.69781184",
"0.69349855",
"0.6688658",
"0.66587996",
"0.66587996",
"0.66587996",
"0.66587996",
"0.66587996",
"0.66587996",
"0.66587996",
"0.66587996",
"0.66587996",
"0.66587996",
... | 0.66172016 | 23 |
The ARN (Amazon Resource Name) of the firewall rule group association. | def hMqs(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'arn') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Jd8n(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'rule_arn')",
"def FuT7(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'auto_scaling_group_arn')",
"def FuT7(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'auto_scaling_group_arn')",
"def RuE8(YKHO) -> str:\n mOrl = YKHO._get_para... | [
"0.61351526",
"0.60209256",
"0.60174865",
"0.58755296",
"0.5822712",
"0.5762073",
"0.5750025",
"0.5731244",
"0.57198393",
"0.5656187",
"0.5656187",
"0.5564121",
"0.55267847",
"0.55263424",
"0.55032367",
"0.55032367",
"0.55032367",
"0.55032367",
"0.55032367",
"0.55032367",
"0.... | 0.5347201 | 65 |
The unique identifier of the firewall rule group. | def XNTy(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'firewall_rule_group_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XNTy(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'firewall_rule_group_id')",
"def XNTy(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'firewall_rule_group_id')",
"def ShR8(YKHO):\n return YKHO._group.id",
"def Dt19(YKHO) -> str:\n return qe4Y.get(YKHO, 'network_group_id')",
"def h... | [
"0.8573966",
"0.83318394",
"0.7798776",
"0.77230513",
"0.7631787",
"0.7631787",
"0.7401554",
"0.73843676",
"0.73843676",
"0.73843676",
"0.73843676",
"0.73843676",
"0.73843676",
"0.73399705",
"0.73399705",
"0.73092896",
"0.7236851",
"0.7236851",
"0.71927744",
"0.7145483",
"0.7... | 0.8187694 | 2 |
The unique identifier of the VPC that you want to associate with the rule group. | def xOeT(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'vpc_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fEOc(YKHO):\n return YKHO.network.regional_network.vpc.default_security_group_id",
"def xOeT():\n try:\n GXzF = qgI7.metadata['network']['interfaces']['macs']\n vEq1 = None\n for Pp4r, o8Kj in GXzF.items():\n if vEq1 is not None:\n return None\n ... | [
"0.7079232",
"0.7010196",
"0.69752574",
"0.69752574",
"0.69752574",
"0.69752574",
"0.69752574",
"0.69752574",
"0.6932375",
"0.66866916",
"0.66557527",
"0.66557527",
"0.66557527",
"0.66557527",
"0.66557527",
"0.66557527",
"0.66557527",
"0.66557527",
"0.66557527",
"0.66557527",
... | 0.64661247 | 42 |
The ARN (Amazon Resource Name) of the firewall rule group association. | def hMqs(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'arn') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Jd8n(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'rule_arn')",
"def FuT7(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'auto_scaling_group_arn')",
"def FuT7(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'auto_scaling_group_arn')",
"def RuE8(YKHO) -> str:\n mOrl = YKHO._get_para... | [
"0.613564",
"0.6021224",
"0.6017428",
"0.58759475",
"0.58231026",
"0.5762708",
"0.5749539",
"0.5731439",
"0.57191545",
"0.5655821",
"0.5655821",
"0.55638266",
"0.552629",
"0.55258214",
"0.5502104",
"0.5444786",
"0.5392361",
"0.5391523",
"0.5391523",
"0.53905916",
"0.53838205"... | 0.5504237 | 21 |
The unique identifier of the firewall rule group. | def XNTy(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'firewall_rule_group_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XNTy(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'firewall_rule_group_id')",
"def XNTy(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'firewall_rule_group_id')",
"def ShR8(YKHO):\n return YKHO._group.id",
"def Dt19(YKHO) -> str:\n return qe4Y.get(YKHO, 'network_group_id')",
"... | [
"0.83318394",
"0.8187694",
"0.7798776",
"0.77230513",
"0.7631787",
"0.7631787",
"0.7401554",
"0.73843676",
"0.73843676",
"0.73843676",
"0.73843676",
"0.73843676",
"0.73843676",
"0.73399705",
"0.73399705",
"0.73092896",
"0.7236851",
"0.7236851",
"0.71927744",
"0.7145483",
"0.7... | 0.8573966 | 0 |
The unique identifier of the VPC that you want to associate with the rule group. | def xOeT(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'vpc_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fEOc(YKHO):\n return YKHO.network.regional_network.vpc.default_security_group_id",
"def xOeT():\n try:\n GXzF = qgI7.metadata['network']['interfaces']['macs']\n vEq1 = None\n for Pp4r, o8Kj in GXzF.items():\n if vEq1 is not None:\n return None\n ... | [
"0.70776373",
"0.7012093",
"0.69781184",
"0.69781184",
"0.69781184",
"0.69781184",
"0.69781184",
"0.69781184",
"0.69349855",
"0.6688658",
"0.6619316",
"0.66172016",
"0.66172016",
"0.66172016",
"0.66172016",
"0.66172016",
"0.66172016",
"0.66172016",
"0.66172016",
"0.66172016",
... | 0.66587996 | 11 |
Sets up the boundary conditions for nonormal flow at domain boundaries. Sets up the nonormalflow boundary conditions, storing the | def U5X1(YKHO, zrIJ, TGHe):
if 'u' not in YKHO.field_names:
raise NotImplementedError('No-normal-flow boundary conditions can only be applied ' + 'when there is a variable called "u" and none was found')
q8qn = zrIJ.spaces('HDiv')
if q8qn.extruded:
YKHO.bcs['u'].append(Ahx4(q8qn, 0.0, 'botto... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nevJ(YKHO):\n YKHO.low_bnd.states[0] = 1 - YKHO.cr3bp.mu - 1.5\n YKHO.upp_bnd.states[0] = 1 - YKHO.cr3bp.mu + 1.5\n YKHO.low_bnd.states[1] = -0.1\n YKHO.upp_bnd.states[1] = 0.1\n YKHO.low_bnd.states[2] = -0.5\n YKHO.upp_bnd.states[2] = 0.5\n YKHO.low_bnd.states[3] = -2\n YKHO.upp_bnd.st... | [
"0.67180645",
"0.66703624",
"0.6446436",
"0.629285",
"0.6278372",
"0.6124956",
"0.6031954",
"0.6010975",
"0.5959478",
"0.59343296",
"0.5909218",
"0.58851165",
"0.58104026",
"0.58062994",
"0.5776937",
"0.57505405",
"0.5711137",
"0.5702259",
"0.5692159",
"0.5688014",
"0.5664046... | 0.72567135 | 0 |
Returns the active tracer metadata object for a particular field. | def FNr5(YKHO, vXX7):
adCX = None
for YMh3 in YKHO.active_tracers:
if YMh3.name == vXX7:
adCX = YMh3
break
if adCX is None:
raise RuntimeError(f'Unable to find active tracer {vXX7}')
return adCX | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H5Nd(YKHO, zZcM, Jyyj, N1p7=None):\n N1p7 = YKHO.get_cursor(N1p7)\n if isinstance(zZcM, int):\n _gHB = zZcM\n else:\n _gHB = YKHO.get_tracform_meta(zZcM, cursor=N1p7)[0]\n return N1p7('\\n SELECT author, time\\n FROM forms_fields\\n WHERE id = %s... | [
"0.6095285",
"0.59061766",
"0.5901836",
"0.5897864",
"0.5778435",
"0.5717006",
"0.5704244",
"0.5703827",
"0.5703827",
"0.5703827",
"0.5703827",
"0.5703827",
"0.5703827",
"0.5703827",
"0.5684281",
"0.56795764",
"0.5669146",
"0.5655678",
"0.5531521",
"0.5517888",
"0.55107933",
... | 0.6371792 | 0 |
Token ids from Tokenizer vocab | def pD6a(s2mk, b0j5, G8d9):
juz4 = b0j5.convert_tokens_to_ids(s2mk)
Pha6 = juz4 + [0] * (G8d9 - len(juz4))
return Pha6 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wClh(CtWL, s2mk):\n A07C = []\n for eOtH in s2mk:\n A07C.append(CtWL[eOtH])\n return A07C",
"def wr3U(YKHO, s2mk):\n if isinstance(s2mk, str):\n s2mk = ZbWC.sub('\\\\d+', '<num>', s2mk).lower()\n Q4kH = s2mk.split(' ')\n i21Q = [YKHO.vocab_dict.get('<bos>')] + [YKHO.vo... | [
"0.78494143",
"0.7753004",
"0.7602236",
"0.7587555",
"0.72559714",
"0.7250086",
"0.7250086",
"0.72473884",
"0.7245224",
"0.72419375",
"0.72193146",
"0.7196743",
"0.71849084",
"0.71779513",
"0.71712494",
"0.7160337",
"0.7154762",
"0.71430236",
"0.71430236",
"0.7134397",
"0.709... | 0.7158371 | 16 |
Converts tokenized input to ids, masks and segments for BERT | def fb7u(Bq4y, b0j5, Kmcr):
Pha6 = pD6a(Bq4y, b0j5, Kmcr)
_mW4 = IbOm(Bq4y, Kmcr)
qM6u = ORXL(Bq4y, Kmcr)
return [Pha6, _mW4, qM6u] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Aaag(b0j5, PU1l, G8d9=256):\n if isinstance(PU1l, xr9L):\n Pha6 = [0] * G8d9\n qV0r = [0] * G8d9\n Uszf = [0] * G8d9\n return (Pha6, qV0r, Uszf)\n D56S = PU1l.text_a\n if len(D56S) > G8d9 - 2:\n D56S = D56S[0:G8d9 - 2]\n sWQ5 = []\n s2mk = []\n Uszf = []\n ... | [
"0.72311664",
"0.7051429",
"0.69460833",
"0.6819847",
"0.6640994",
"0.64476",
"0.6381955",
"0.6337645",
"0.6333708",
"0.63202685",
"0.63181674",
"0.63041717",
"0.629488",
"0.6272892",
"0.62390465",
"0.6164775",
"0.6160099",
"0.61489767",
"0.6147045",
"0.6145439",
"0.61305404"... | 0.6852523 | 3 |
Get a random element from the collection. | def UIrZ(YKHO):
return tuKI.choice(YKHO.data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def P8Zf(YKHO):\n try:\n return YKHO.object().random_element()\n except AttributeError:\n return Acvy(YKHO.list())",
"def LAaV(xUwc, q24Q=None):\n try:\n d6pt = tuKI.randint(0, len(xUwc) - 1)\n if q24Q is None:\n return xUwc[d6pt]\n else:\n return... | [
"0.82208097",
"0.77621496",
"0.75064623",
"0.7470788",
"0.7446439",
"0.73732936",
"0.7304979",
"0.7270751",
"0.71791035",
"0.7150966",
"0.71476245",
"0.70904005",
"0.70774186",
"0.7043801",
"0.7011797",
"0.6973212",
"0.6943404",
"0.6924073",
"0.6906942",
"0.69010395",
"0.6899... | 0.65191936 | 45 |