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 |
|---|---|---|---|---|---|---|
Initialize a 3x3 tic tac toe board. The board should contain a single attribute, a list, that initially contains nine star characters. This list contains contents of the board. A star denotes that this position has not yet been claimed by 'X' or 'O'. Again, this is simply a flat list of 9 items, not a list of lists. | def FIMM(YKHO):
YKHO.board = ['*', '*', '*', '*', '*', '*', '*', '*', '*']
YKHO.count = 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KFny():\n iBIi = []\n for YRbF in range(9):\n Z9rn = []\n for r845 in range(9):\n Z9rn.append('-')\n iBIi.append(Z9rn)\n iBIi[0][0] = '0'\n iBIi[1][0] = '1'\n iBIi[2][0] = '2'\n iBIi[3][0] = '3'\n iBIi[4][0] = '4'\n iBIi[5][0] = '5'\n iBIi[6][0] = '6'\... | [
"0.7392598",
"0.72216254",
"0.7167835",
"0.7133662",
"0.7123322",
"0.7105277",
"0.70102435",
"0.69233173",
"0.6909438",
"0.6909438",
"0.68478686",
"0.68375456",
"0.6826505",
"0.676273",
"0.6741555",
"0.6721059",
"0.66512716",
"0.6640344",
"0.6615723",
"0.66071075",
"0.6588673... | 0.59856766 | 82 |
ListVolumeStatsByVolumeAccessGroup enables you to get total activity measurements for all of the volumes that are a member of the | def l06U(OaeV, gpDX=None, EVKy=None):
"""specified volume access group(s)."""
ktzP.establish_connection(OaeV)
gpDX = wvEv.parse_array(gpDX)
OaeV.logger.info(': volumeaccessgroups = ' + str(gpDX) + ';' + 'includevirtualvolumes = ' + str(EVKy) + ';' + '')
try:
meIk = OaeV.element.list_volume_s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GPaJ(OaeV, ozFb=None):\n ktzP.establish_connection(OaeV)\n ozFb = wvEv.parse_array(ozFb)\n OaeV.logger.info(': volumeids = ' + str(ozFb) + ';' + '')\n try:\n Z2Gq = OaeV.element.list_volume_stats(volume_ids=ozFb)\n except BJsk.ApiServerError as e:\n OaeV.logger.error(tTpl.message)\... | [
"0.62935793",
"0.62703186",
"0.60499555",
"0.59056175",
"0.59056175",
"0.58986515",
"0.5893201",
"0.58882046",
"0.58882046",
"0.5880757",
"0.58708155",
"0.585845",
"0.585845",
"0.585845",
"0.585845",
"0.585845",
"0.5835552",
"0.58070636",
"0.58070636",
"0.57979035",
"0.576361... | 0.8147054 | 0 |
The RemoveVolumeFromVolumeAccessGroup method enables you to remove volumes from a volume access group. | def poSe(OaeV, Anhu, Of2x):
ktzP.establish_connection(OaeV)
Of2x = wvEv.parse_array(Of2x)
OaeV.logger.info(': volumeaccessgroupid = ' + str(Anhu) + ';' + 'volumes = ' + str(Of2x) + ';' + '')
try:
GV3T = OaeV.element.remove_volumes_from_volume_access_group(volume_access_group_id=Anhu, volumes=Of2... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Fn28(YKHO, jf3N, VkPj, fGCr, xdHk, BZN_=False):\n yusX = YKHO.CONN.get_masking_views_from_storage_group(fGCr)\n if not yusX:\n na1r.debug('No masking views associated with storage group %(sg_name)s', {'sg_name': fGCr})\n if YKHO.CONN.is_volume_in_storagegroup(jf3N, fGCr):\n YG3S ... | [
"0.60448015",
"0.5400164",
"0.5374973",
"0.532671",
"0.53174984",
"0.5317128",
"0.5309876",
"0.5278951",
"0.5216889",
"0.51991487",
"0.51060605",
"0.5075384",
"0.5065588",
"0.50406903",
"0.50275046",
"0.5023198",
"0.50083655",
"0.5000265",
"0.4979944",
"0.49758786",
"0.497551... | 0.7119169 | 0 |
ListVolumeStats returns highlevel activity measurements for a single volume, list of volumes, or all volumes (if you omit the volumeIDs parameter). Measurement values are cumulative from the creation of the volume. | def GPaJ(OaeV, ozFb=None):
ktzP.establish_connection(OaeV)
ozFb = wvEv.parse_array(ozFb)
OaeV.logger.info(': volumeids = ' + str(ozFb) + ';' + '')
try:
Z2Gq = OaeV.element.list_volume_stats(volume_ids=ozFb)
except BJsk.ApiServerError as e:
OaeV.logger.error(tTpl.message)
exit... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BgJn(OaeV, EVKy=None):\n \"\"\"creation of the volume.\"\"\"\n ktzP.establish_connection(OaeV)\n OaeV.logger.info(': includevirtualvolumes = ' + str(EVKy) + ';' + '')\n try:\n Eus7 = OaeV.element.list_volume_stats_by_volume(include_virtual_volumes=EVKy)\n except BJsk.ApiServerError as e:\... | [
"0.7170795",
"0.683327",
"0.67658514",
"0.67121744",
"0.66837",
"0.66837",
"0.6661919",
"0.6636424",
"0.6636424",
"0.6624197",
"0.6609534",
"0.6609534",
"0.6609534",
"0.6609534",
"0.6609534",
"0.6578175",
"0.65651625",
"0.65651625",
"0.65453553",
"0.6483658",
"0.64751756",
... | 0.8025336 | 0 |
reply with randomly selected bleach given a certain method | def a9rH(NKcE):
try:
with open('bleach.txt') as Fg_i:
mpiO = Fg_i.readlines()
tO9_ = " \n*^(beep)* *^(boop! I'm a bot! Please contact)* [*^(u/cyanidesuppository)*](https://reddit.com/user/cyanidesuppository) *^(with)* *^(any)* *^(issues)* *^(or)* *^(suggestions!) *^(|)* [*^(Github)*]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xpHj(YKHO, tO9_, qIxc):\n return YKHO.apod_send(tO9_, random=True)",
"def geh0(YKHO, Ghho, *qIxc):\n return tuKI.choice(YKHO.__dict__[Ghho + 's']) % qIxc",
"def nrOS(YKHO):\n return tuKI.choice(YKHO.fakers)",
"async def _random_verb(YKHO, OaeV):\n await OaeV.send(tuKI.choice(YKHO.verbs))",
... | [
"0.6660136",
"0.66145444",
"0.6582253",
"0.6532506",
"0.6523479",
"0.6473747",
"0.6458763",
"0.6347434",
"0.619598",
"0.6175131",
"0.6170199",
"0.6162226",
"0.61464876",
"0.61388665",
"0.6136595",
"0.6136387",
"0.61181515",
"0.61142135",
"0.60926133",
"0.6071176",
"0.6067348"... | 0.68031263 | 0 |
Save this instance to a dictionary to be serialized. | def sS6L(YKHO):
return YKHO.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sS6L(YKHO):\n raise NotImplementedError(Z9Ze)",
"def sS6L(YKHO):\n Csk6 = jth9.copy(YKHO.__dict__)\n del Csk6['_cache']\n return Csk6",
"def Napc(YKHO) -> dict:\n pass",
"def dRyi(YKHO):\n return YKHO.__dict__",
"def xkzz(YKHO):\n with open(YKHO.filename, mode='wb') as nUeQ:\n ... | [
"0.800806",
"0.7814812",
"0.7768675",
"0.77473783",
"0.7688856",
"0.75161546",
"0.7503635",
"0.7466198",
"0.7422249",
"0.7265334",
"0.7213589",
"0.7191759",
"0.71709645",
"0.7155016",
"0.71419024",
"0.7114545",
"0.7113782",
"0.7113235",
"0.711194",
"0.7109053",
"0.71054953",
... | 0.8217244 | 0 |
Returns the matrix used for the normalization of the x points in the normalized 8 point algorithm. | def ppfn(WKvO):
WKvO = WKvO / WKvO[2]
JBMS = oyIN.mean(WKvO[:2], axis=1)
o4sw = oyIN.sqrt(2) / oyIN.std(WKvO[:2])
Kt_s = oyIN.array([[o4sw, 0, -o4sw * JBMS[0]], [0, o4sw, -o4sw * JBMS[1]], [0, 0, 1]])
return Kt_s | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y7f8(YKHO) -> aLMY:\n ...",
"def NkkI(HkQ6):\n Xl3I = ZvG6.scale(HkQ6)\n print('Printing the first ten NORMALISED rows...')\n print(Xl3I[0:9, :])\n return Xl3I",
"def NkkI(RsfQ):\n mJjf = oyIN.array(RsfQ.sum(1))\n ZKaa = oyIN.power(mJjf, -1).flatten()\n ZKaa[oyIN.isinf(ZKaa)] = 0.0\... | [
"0.7187653",
"0.6572858",
"0.6343677",
"0.6308976",
"0.63033694",
"0.6297263",
"0.62653744",
"0.6235941",
"0.6223796",
"0.6175043",
"0.6173735",
"0.6172423",
"0.61676306",
"0.6162346",
"0.6161834",
"0.6156856",
"0.6129906",
"0.61092496",
"0.6102361",
"0.609737",
"0.6092724",
... | 0.0 | -1 |
List of field names. | def ZWCE(YKHO):
return sorted(set((YRbF[0] if '[' not in YRbF[0] else YRbF[0][:YRbF[0].index('[')] for YRbF in YKHO._items))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zJN_(YKHO):\n return YKHO.fieldNames()",
"def Uj1j(YKHO):\n return [eHNT.name for eHNT in YKHO.fields]",
"def sPVJ(YKHO):\n raise NotImplementedError",
"def eM8m(YKHO):\n CqJY = YKHO._meta.get_fields()\n return [eHNT.name for eHNT in CqJY]",
"def Wq02(Emd4):\n if not hasattr(Emd4, '__... | [
"0.8790646",
"0.87725854",
"0.84398884",
"0.84214544",
"0.8340633",
"0.83143723",
"0.82905185",
"0.82529116",
"0.823399",
"0.8162228",
"0.8138354",
"0.79932165",
"0.7980055",
"0.79607487",
"0.7906565",
"0.7906565",
"0.7873987",
"0.7762777",
"0.765196",
"0.76395774",
"0.760716... | 0.0 | -1 |
remove tags in html, notice not remove the inner content | def UDBl(YKHO):
if YKHO.hard_tags:
XP5J = ZbWC.compile('|'.join(['<{tag}[^>]*>|</{tag}>'.format(tag=TZ9E) for TZ9E in YKHO.hard_tags]))
YKHO.cleaned_html = ZbWC.sub(XP5J, '', YKHO.html) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nNJN(l5Ny):\n x0SS = ZbWC.compile('<.*?>')\n KxPu.append(ZbWC.sub(x0SS, '', l5Ny))",
"def DVW7(l5Ny):\n RBfQ = ZbWC.compile('<.*?>')\n return RBfQ.sub('', l5Ny)",
"def JZhs(l5Ny):\n x0SS = ZbWC.compile('<.*?>')\n return ZbWC.sub(x0SS, '', l5Ny)",
"def x0SS(YKHO, _R2e):\n _R2e = rKuS(... | [
"0.7890438",
"0.7837276",
"0.77993155",
"0.7791927",
"0.76570547",
"0.76359344",
"0.7630651",
"0.756768",
"0.7551164",
"0.754167",
"0.7540697",
"0.75225323",
"0.75173825",
"0.7496057",
"0.749419",
"0.74733603",
"0.74733603",
"0.7444382",
"0.74417484",
"0.74314797",
"0.7430095... | 0.77502 | 4 |
remove tags and inner content in html | def dV7e(YKHO):
[TZ9E.extract() for TZ9E in YKHO.soup.find_all(YKHO.tags)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nNJN(l5Ny):\n x0SS = ZbWC.compile('<.*?>')\n KxPu.append(ZbWC.sub(x0SS, '', l5Ny))",
"def DVW7(l5Ny):\n RBfQ = ZbWC.compile('<.*?>')\n return RBfQ.sub('', l5Ny)",
"def x0SS(YKHO, _R2e):\n _R2e = rKuS(NkkI(P6bq(_R2e)), 'lxml')\n for aM_I in _R2e.find_all(text=lambda l5Ny: isinstance(l5Ny, ... | [
"0.7900773",
"0.7845699",
"0.7778017",
"0.77101743",
"0.76595443",
"0.7642018",
"0.763245",
"0.7584663",
"0.7554102",
"0.7550634",
"0.7536717",
"0.74839556",
"0.74771255",
"0.7476479",
"0.74558544",
"0.74278426",
"0.74267614",
"0.7397902",
"0.7397902",
"0.73948395",
"0.735400... | 0.72670805 | 38 |
This method display the HTML on home page on server | def kZiy():
_R2e = BLtk.HTML
return _R2e | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NMoC(YKHO):\n YKHO.render('home.html')",
"def kZiy():\n return TvZl('homepage.html')",
"def C_QL():\n return TvZl('homepage.html')",
"def PJpd(YKHO):\n MOPg = {'Content-Type': 'text/html; charset=utf-8'}\n return (TvZl('home.j2', url=nKyW('get')), 200, MOPg)",
"def IC8O():\n return Tv... | [
"0.7941294",
"0.7894011",
"0.776696",
"0.77668446",
"0.77637255",
"0.77074057",
"0.76546407",
"0.76544636",
"0.76544636",
"0.76214665",
"0.7616507",
"0.76075447",
"0.7601888",
"0.7599728",
"0.75771916",
"0.75510395",
"0.75510395",
"0.75499105",
"0.7548181",
"0.75393397",
"0.7... | 0.79225814 | 1 |
Yields the sequence of prime numbers via the Sieve of Eratosthenes. | def ht2G():
lWPh = {}
vexM = 2
while True:
XP5J = lWPh.pop(vexM, None)
if XP5J is None:
yield vexM
lWPh[vexM * vexM] = vexM
else:
WKvO = XP5J + vexM
while WKvO in lWPh:
WKvO += XP5J
lWPh[WKvO] = XP5J
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DzI6():\n YRbF = 1\n while True:\n if T1qg(YRbF):\n yield YRbF\n YRbF += 1",
"def ffYW():\n utSb = Qa9K()\n jsLP = next(utSb)\n while jsLP < 2:\n jsLP = next(utSb)\n yield 2\n jsLP = next(utSb)\n while True:\n for YRbF in range(2, jsLP):\n ... | [
"0.8059278",
"0.7996105",
"0.7946233",
"0.79384977",
"0.79336435",
"0.78949565",
"0.78265184",
"0.78090113",
"0.77980864",
"0.7744569",
"0.76715934",
"0.7663621",
"0.764962",
"0.7646315",
"0.76192",
"0.75731015",
"0.7528169",
"0.75216866",
"0.75054324",
"0.7484379",
"0.746746... | 0.0 | -1 |
Initializes a data pipeline. | def FIMM(YKHO, UqER: Sequence[Union[DataSource, DataSink]], wxaK: Iterable[DataTransformer]=None) -> None:
if not UqER:
raise ValueError('Elements must be a non-empty sequence of DataSources and DataSinks')
if wxaK is None:
wxaK = set()
c7pe = set()
O9mc = set()
x6A0 = []
for U6D... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ckSS(YKHO):\n pass",
"def FIMM(YKHO, nPIK):\n YKHO.pipeline = nPIK",
"def KmVi(YKHO):\n if YKHO.data_pipe_type == 'data_as_var':\n YKHO.indices = ZylS.placeholder(dtype=ZylS.int32, shape=None, name='indices_ph')\n YKHO.data_in_ph = [None] * len(YKHO.input_sizes)\n YKHO.data_in... | [
"0.7324315",
"0.72662795",
"0.7235179",
"0.7212165",
"0.7199782",
"0.71303976",
"0.7015232",
"0.7003585",
"0.69782424",
"0.69733435",
"0.69520926",
"0.69520926",
"0.69361895",
"0.6933902",
"0.6933902",
"0.6901155",
"0.6898114",
"0.6835718",
"0.6810657",
"0.68095183",
"0.67989... | 0.0 | -1 |
Convert energy, in joules, to pNnm | def NTzx(FZ1U):
return FZ1U * 10 ** 21 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KugY(Jsb0):\n u84f = C7Ls * Nq1b * 1000000000.0 * A59D\n return u84f / Jsb0",
"def WXNS():\n return WKvO('a') * zNig() ** tTpl() * QRFO(WKvO('rely', 'data', 'cplx', 'ruse', 'docu', 'time', 'stor', 'pvol', 'acap', 'pcap', 'pcon', 'aexp', 'plex', 'ltex', 'tool', 'site'))",
"def vUcF(F9qO, Yfyn):\n ... | [
"0.60300195",
"0.59815663",
"0.5947449",
"0.58159065",
"0.57569325",
"0.5656656",
"0.5647393",
"0.5616531",
"0.56055415",
"0.56017905",
"0.55924547",
"0.5551351",
"0.5524286",
"0.5518494",
"0.5513725",
"0.55026555",
"0.5490327",
"0.5474354",
"0.5431811",
"0.54224664",
"0.5399... | 0.5035466 | 73 |
Gets the result type of the operation given the operand type. | def bdah(YKHO, X2PW: IType) -> lgMi:
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qRGz(YKHO):\n return YKHO._operand_type",
"def HfXH(YKHO):\n return YKHO._result_type",
"def S4zX(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'operator_type')",
"def TBDi(YKHO):\n return YKHO.op_type",
"def HfXH(YKHO) -> str:\n return YKHO._result_type",
"def VEOl(YKHO) ->... | [
"0.7607474",
"0.6969283",
"0.683208",
"0.6814983",
"0.6756315",
"0.67452884",
"0.64749306",
"0.6408315",
"0.6318624",
"0.62793916",
"0.6263215",
"0.6261656",
"0.6196631",
"0.6192679",
"0.61034644",
"0.60991263",
"0.60861576",
"0.6000772",
"0.6000772",
"0.6000772",
"0.6000772"... | 0.73249817 | 1 |
Load a mesh stored in a OBJ, OFF, or PLY file and return a Numpy array of the vertex positions. | def vfY3(gIsw):
if gIsw.endswith('.obj'):
Ty9i, eHNT, exwG = ncXE.read_obj(gIsw, dtype=oyIN.float32)
elif gIsw.endswith('.ply'):
Ty9i, eHNT, exwG, NFIp = ncXE.read_ply(gIsw, dtype=oyIN.float32)
elif gIsw.endswith('.off'):
Ty9i, eHNT, exwG = ncXE.read_off(gIsw, dtype=oyIN.float32)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Cymn(Ux0P):\n assert Hy7s.path.isfile(Ux0P)\n with open(Ux0P, 'rb') as eHNT:\n oQrx = yHKF.read(eHNT)\n ACZQ = oQrx['vertex'].count\n iXlf = oyIN.zeros(shape=[ACZQ, 3], dtype=oyIN.float32)\n iXlf[:, 0] = oQrx['vertex'].data['x']\n iXlf[:, 1] = oQrx['vertex'].data['y']\n... | [
"0.80799496",
"0.7485614",
"0.74826854",
"0.74635255",
"0.7400337",
"0.69659644",
"0.6804426",
"0.6795853",
"0.6728507",
"0.65449464",
"0.6522193",
"0.6514364",
"0.64713573",
"0.64225376",
"0.6401978",
"0.63958687",
"0.63621354",
"0.63593656",
"0.6321523",
"0.6321446",
"0.629... | 0.6489641 | 12 |
Return a meshgrid of vertex positions as an array of shape [w2, 2] | def loSd(yzQ0, Xdy5=[0, 1], ymbj=[0, 1]):
try:
kTwQ, rkoI = yzQ0
except TypeError:
kTwQ = yzQ0
rkoI = yzQ0
Oa1e = oyIN.mgrid[Xdy5[0]:Xdy5[1]:complex(kTwQ), ymbj[0]:ymbj[1]:complex(rkoI)]
Ty9i = oyIN.vstack(list(map(oyIN.ravel, Oa1e))).T
return oyIN.ascontiguousarray(Ty9i) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yGgQ():\n WKvO = oyIN.linspace(-40, 40, 20)\n fuBA, EcVT = oyIN.meshgrid(WKvO, WKvO)\n Ylbp = oyIN.vstack((EcVT.ravel(), fuBA.ravel())).T\n Ylbp = Ylbp[:, ::-1]\n return Ylbp",
"def gh4f(WO1W, ICIT, srJW):\n return oyIN.stack(oyIN.meshgrid(WO1W, ICIT, srJW, indexing='ij'), axis=0)",
"def ... | [
"0.7250902",
"0.72065675",
"0.7165329",
"0.7014363",
"0.6952696",
"0.69444937",
"0.692049",
"0.6855394",
"0.68026286",
"0.67680043",
"0.66611063",
"0.6633947",
"0.65396893",
"0.6529407",
"0.6513396",
"0.6507244",
"0.6494272",
"0.64824617",
"0.64544255",
"0.6426964",
"0.640367... | 0.70148855 | 3 |
Test split_frac when the index is shuffled. | def J_C_(jQ3Z):
cysk = jQ3Z.sample(frac=1)
QOe9 = GqWt(split_frac=0.6)
P8oC, QOe9 = QOe9._split_dataframe(cysk)
set(P8oC.index) == {bGrB for bGrB in range(0, 600)}
set(QOe9.index) == {bGrB for bGrB in range(600, 999)} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bHtP(YKHO, oXaw):\n EvQg = YKHO.df.sample(frac=oXaw, random_state=42)\n QOe9 = YKHO.df.drop(EvQg.index)\n return (EvQg, QOe9)",
"def jI66(d6pt, wA3x):\n jQ3Z = rLdf.DataFrame({'A': [d6pt for WhY1 in range(0, wA3x + 1)] + [WhY1 for WhY1 in range(wA3x + 1, 101)], 'B': [WhY1 for WhY1 in range(0, 101... | [
"0.6813015",
"0.67516905",
"0.65208083",
"0.64165497",
"0.64142156",
"0.63859636",
"0.6345414",
"0.62918407",
"0.62699175",
"0.62504935",
"0.6238778",
"0.62109035",
"0.6125599",
"0.61251",
"0.6113626",
"0.6108477",
"0.60903436",
"0.60684407",
"0.6045408",
"0.60037094",
"0.600... | 0.7983291 | 0 |
Checks whether a matrix in CSR sparse format is symmetric. | def y_4r(M_js):
xhI2 = not (M_js != M_js.transpose()).max()
return xhI2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FioC(vb7U: sp.coo_matrix, yJiH=1e-10) -> bool:\n yk4i = vb7U - vb7U.T\n if yk4i.format not in ['csr', 'csc', 'coo']:\n yk4i = yk4i.tocsr()\n z_n9 = oyIN.all(abs(yk4i.data) < yJiH)\n return z_n9",
"def _Fwn(YKHO):\n if YKHO.matrix.array.compression == Xj7m.diagonal.moniker or YKHO.matrix... | [
"0.79213506",
"0.78380996",
"0.76184124",
"0.755861",
"0.7546311",
"0.7287168",
"0.72420794",
"0.71993756",
"0.7168352",
"0.71430653",
"0.69215846",
"0.69181657",
"0.69181657",
"0.68313175",
"0.6797588",
"0.6795342",
"0.67167073",
"0.66823536",
"0.6618095",
"0.661503",
"0.657... | 0.7532549 | 5 |
Gets the indices of all entries in a csr matrix | def uciI(M_js):
if type(M_js) != lqeT:
raise TypeError('Argument of getIndsCsr should be a CSR matrix!')
h16r = M_js.indptr
iKvv = M_js.indices
yYNd = 0
U5h4 = 0
r8hN = len(iKvv)
T2Cp = oyIN.zeros((r8hN, 2))
for YRbF in range(1, len(h16r)):
d_88 = h16r[YRbF] - h16r[YRbF -... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CJFq(nPrm):\n WfCS = oyIN.arange(nPrm.size)\n E3D9 = lqeT((WfCS, (nPrm.ravel(), WfCS)), shape=(nPrm.max() + 1, nPrm.size))\n return [oyIN.unravel_index(rdlD.data, nPrm.shape) for rdlD in E3D9]",
"def SdwH(jzdc):\n return oyIN.array([jzdc.indices.__getslice__(*WKvO) for WKvO in oyIN.column_stack((... | [
"0.7678715",
"0.7447596",
"0.7343911",
"0.6733884",
"0.6649343",
"0.64370644",
"0.6416381",
"0.63722205",
"0.631861",
"0.62792",
"0.62783796",
"0.6268983",
"0.62688214",
"0.6229968",
"0.6207876",
"0.6205542",
"0.6191188",
"0.6130923",
"0.6109906",
"0.6063042",
"0.6056568",
... | 0.66558504 | 4 |
Initialize a ClusterSnapshot object. | def FIMM(YKHO, a1PO, dlZb, tUUV):
Rwel = dlZb[a1PO]
YKHO.timestep = a1PO
YKHO.ats = tUUV
pmnM = oyIN.argsort(Rwel.particles.body)
YKHO.pos = Rwel.particles.position[pmnM]
Rv0k = oyIN.shape(YKHO.pos)
if Rv0k[0] % tUUV != 0:
raise RuntimeError('Number of particles not divisible by numb... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T4E3():\n IznC = 'mols2.gsd'\n dlZb = EaPE.hoomd.open(khtY.join(i0XC, IznC))\n tUUV = 17\n KXo0 = CQwJ.ClusterSnapshot(0, dlZb, tUUV)\n assert KXo0.timestep == 0\n Rv0k = oyIN.shape(dlZb[0].particles.position)\n assert len(KXo0.clusterIDs) == Rv0k[0] / tUUV",
"def FIMM(YKHO, hKn5):\n ... | [
"0.69385356",
"0.65428865",
"0.6351102",
"0.632181",
"0.6295223",
"0.6035626",
"0.60201603",
"0.59773993",
"0.590706",
"0.5859821",
"0.5834439",
"0.578882",
"0.57682085",
"0.57218707",
"0.5704144",
"0.5685044",
"0.5674088",
"0.56533206",
"0.5651319",
"0.56478554",
"0.562763",... | 0.5331277 | 39 |
Initialize a ClusterSnapshot object. | def FIMM(YKHO, a1PO, Hydg, tUUV, LMlj):
YKHO.timestep = a1PO
YKHO.ats = tUUV
YKHO.box = None
YKHO.rng = None
if type(Hydg) is oyIN.ndarray:
Ssnc = Hydg
YKHO.timestep = int(Ssnc[0])
YKHO.ats = int(Ssnc[2])
YKHO.nclusts = Ssnc[1]
Q2SW = 4 + 3 * tUUV * LMlj
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T4E3():\n IznC = 'mols2.gsd'\n dlZb = EaPE.hoomd.open(khtY.join(i0XC, IznC))\n tUUV = 17\n KXo0 = CQwJ.ClusterSnapshot(0, dlZb, tUUV)\n assert KXo0.timestep == 0\n Rv0k = oyIN.shape(dlZb[0].particles.position)\n assert len(KXo0.clusterIDs) == Rv0k[0] / tUUV",
"def FIMM(YKHO, hKn5):\n ... | [
"0.69385356",
"0.65428865",
"0.6351102",
"0.632181",
"0.6295223",
"0.6035626",
"0.60201603",
"0.59773993",
"0.590706",
"0.5859821",
"0.5834439",
"0.578882",
"0.57682085",
"0.57218707",
"0.5704144",
"0.5685044",
"0.5674088",
"0.56533206",
"0.5651319",
"0.56478554",
"0.562763",... | 0.0 | -1 |
returns the numpy length of an array made by toArray Returns | def jZo2(YKHO):
Rv0k = oyIN.shape(YKHO.pos)
LMlj = Rv0k[0]
XoJ9 = 4 + 3 * YKHO.ats * LMlj + LMlj
return XoJ9 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def szAg(YKHO):\n return YKHO._n",
"def t892(YKHO) -> int:\n ...",
"def qrK8(YKHO):\n return YKHO.__records.array_length",
"def t892(YKHO):\n raise NotImplementedError",
"def szAg(YKHO) -> int:\n return len(YKHO.array)",
"def szAg(YKHO) -> int:\n return len(YKHO.array)",
"def szAg(YKH... | [
"0.76953346",
"0.7651695",
"0.76349914",
"0.7519675",
"0.7511969",
"0.7508405",
"0.7449047",
"0.7430909",
"0.7419916",
"0.7413699",
"0.7404379",
"0.7359847",
"0.73507535",
"0.72536474",
"0.7235165",
"0.72096366",
"0.71903414",
"0.717282",
"0.7164348",
"0.7148162",
"0.7145818"... | 0.65912175 | 49 |
Initialize a Heterogeneous Cluster Snapshot object. | def FIMM(YKHO, a1PO, Hydg, tUUV, LMlj, jHoc):
YKHO.timestep = a1PO
YKHO.ats = tUUV
Rwel = Hydg[a1PO]
YKHO.box = Rwel.configuration.box
pmnM = oyIN.argsort(Rwel.particles.body)
YKHO.pos = Rwel.particles.position[pmnM]
Rv0k = oyIN.shape(YKHO.pos)
if Rv0k[0] % tUUV != 0:
raise Runti... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T4E3():\n IznC = 'mols2.gsd'\n dlZb = EaPE.hoomd.open(khtY.join(i0XC, IznC))\n tUUV = 17\n KXo0 = CQwJ.ClusterSnapshot(0, dlZb, tUUV)\n assert KXo0.timestep == 0\n Rv0k = oyIN.shape(dlZb[0].particles.position)\n assert len(KXo0.clusterIDs) == Rv0k[0] / tUUV",
"def FIMM(YKHO, hKn5):\n ... | [
"0.6894226",
"0.6862231",
"0.66976935",
"0.6512861",
"0.6504976",
"0.64167845",
"0.63400424",
"0.6201853",
"0.61942005",
"0.6159296",
"0.6132726",
"0.61127365",
"0.60962886",
"0.6081791",
"0.6077583",
"0.60379267",
"0.6002369",
"0.60014325",
"0.59320736",
"0.59067184",
"0.589... | 0.0 | -1 |
Initialize a ClusterSnapshot object. | def FIMM(YKHO, a1PO, Hydg, tUUV, LMlj, OYqn=u'LS'):
YKHO.timestep = a1PO
YKHO.ats = tUUV
YKHO.box = None
YKHO.rng = None
if type(Hydg) is oyIN.ndarray:
Ssnc = Hydg
YKHO.timestep = int(Ssnc[0])
YKHO.ats = int(Ssnc[2])
YKHO.nclusts = Ssnc[1]
Q2SW = 4 + 3 * tUUV ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T4E3():\n IznC = 'mols2.gsd'\n dlZb = EaPE.hoomd.open(khtY.join(i0XC, IznC))\n tUUV = 17\n KXo0 = CQwJ.ClusterSnapshot(0, dlZb, tUUV)\n assert KXo0.timestep == 0\n Rv0k = oyIN.shape(dlZb[0].particles.position)\n assert len(KXo0.clusterIDs) == Rv0k[0] / tUUV",
"def FIMM(YKHO, hKn5):\n ... | [
"0.69385356",
"0.65428865",
"0.6351102",
"0.632181",
"0.6295223",
"0.6035626",
"0.60201603",
"0.59773993",
"0.590706",
"0.5859821",
"0.5834439",
"0.578882",
"0.57682085",
"0.57218707",
"0.5704144",
"0.5685044",
"0.5674088",
"0.56533206",
"0.5651319",
"0.56478554",
"0.562763",... | 0.0 | -1 |
Initialize a ClusterSnapshot object. | def FIMM(YKHO, a1PO, Hydg, tUUV, LMlj, jHoc, OYqn=u'LS'):
YKHO.timestep = a1PO
YKHO.ats = tUUV
Rwel = Hydg[a1PO]
YKHO.box = Rwel.configuration.box
JHsR = Rwel.particles.types.index(OYqn)
SnBA = Rwel.particles.typeid
YKHO.pos = Rwel.particles.position[oyIN.where(SnBA == JHsR)[0]]
Rv0k = o... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T4E3():\n IznC = 'mols2.gsd'\n dlZb = EaPE.hoomd.open(khtY.join(i0XC, IznC))\n tUUV = 17\n KXo0 = CQwJ.ClusterSnapshot(0, dlZb, tUUV)\n assert KXo0.timestep == 0\n Rv0k = oyIN.shape(dlZb[0].particles.position)\n assert len(KXo0.clusterIDs) == Rv0k[0] / tUUV",
"def FIMM(YKHO, hKn5):\n ... | [
"0.69385356",
"0.65428865",
"0.6351102",
"0.632181",
"0.6295223",
"0.6035626",
"0.60201603",
"0.59773993",
"0.590706",
"0.5859821",
"0.5834439",
"0.578882",
"0.57682085",
"0.57218707",
"0.5704144",
"0.5685044",
"0.5674088",
"0.56533206",
"0.5651319",
"0.56478554",
"0.562763",... | 0.0 | -1 |
Initialize a ClusterSnapshot object. | def FIMM(YKHO, a1PO, Hydg, tUUV, LMlj, hLEt=oyIN.array([[0, 6], [1, 7], [2, 8], [3, 9], [4, 10], [5, 11]]), OYqn=u'LS'):
YKHO.timestep = a1PO
YKHO.ats = tUUV
YKHO.box = None
if type(Hydg) is oyIN.ndarray:
Ssnc = Hydg
YKHO.timestep = int(Ssnc[0])
YKHO.ats = int(Ssnc[2])
YK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T4E3():\n IznC = 'mols2.gsd'\n dlZb = EaPE.hoomd.open(khtY.join(i0XC, IznC))\n tUUV = 17\n KXo0 = CQwJ.ClusterSnapshot(0, dlZb, tUUV)\n assert KXo0.timestep == 0\n Rv0k = oyIN.shape(dlZb[0].particles.position)\n assert len(KXo0.clusterIDs) == Rv0k[0] / tUUV",
"def FIMM(YKHO, hKn5):\n ... | [
"0.69385356",
"0.65428865",
"0.6351102",
"0.632181",
"0.6295223",
"0.6035626",
"0.60201603",
"0.59773993",
"0.590706",
"0.5859821",
"0.5834439",
"0.578882",
"0.57682085",
"0.57218707",
"0.5704144",
"0.5685044",
"0.5674088",
"0.56533206",
"0.5651319",
"0.56478554",
"0.562763",... | 0.0 | -1 |
Initialize a ContactClusterSnapshotXTC object. | def FIMM(YKHO, a1PO, ouVi, tUUV, LMlj):
YKHO.timestep = a1PO
YKHO.ats = tUUV
YKHO.nclusts = LMlj
YKHO.clusterIDs = oyIN.zeros(LMlj)
YKHO.pos, YKHO.box = YKHO.readGro(ouVi)
YKHO.rng = None
if len(YKHO.pos) != 3 * LMlj * tUUV:
raise RuntimeError('incorrect number of atoms or molecules'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BwKG():\n IznC = 'mols8.gsd'\n dlZb = EaPE.hoomd.open(khtY.join(i0XC, IznC))\n tUUV = 17\n LMlj = 8\n tAX0 = 1.1 * 1.1\n a1PO = 97\n KXo0 = CQwJ.ContactClusterSnapshot(a1PO, dlZb, tUUV, LMlj)\n KXo0.setClusterID(tAX0)\n assert KXo0.timestep == a1PO\n Rv0k = oyIN.shape(dlZb[a1PO].p... | [
"0.625563",
"0.5865065",
"0.57162994",
"0.56139594",
"0.5590593",
"0.55280566",
"0.5517185",
"0.54722154",
"0.53721935",
"0.53315324",
"0.53198546",
"0.5243594",
"0.5165628",
"0.51624054",
"0.51559365",
"0.51352894",
"0.5128256",
"0.511365",
"0.5112446",
"0.5106733",
"0.50837... | 0.49023595 | 37 |
Initialize a ContactClusterSnapshotXTC object. | def FIMM(YKHO, a1PO, ouVi, tUUV, LMlj, ZKsA):
YKHO.timestep = a1PO
YKHO.ats = tUUV
YKHO.nclusts = LMlj
YKHO.clusterIDs = oyIN.zeros(LMlj)
YKHO.pos, pPyF = YKHO.readGro(ouVi)
YKHO.box = pPyF
YKHO.rng = None
if len(YKHO.pos) != 3 * LMlj * tUUV:
raise RuntimeError('incorrect number ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BwKG():\n IznC = 'mols8.gsd'\n dlZb = EaPE.hoomd.open(khtY.join(i0XC, IznC))\n tUUV = 17\n LMlj = 8\n tAX0 = 1.1 * 1.1\n a1PO = 97\n KXo0 = CQwJ.ContactClusterSnapshot(a1PO, dlZb, tUUV, LMlj)\n KXo0.setClusterID(tAX0)\n assert KXo0.timestep == a1PO\n Rv0k = oyIN.shape(dlZb[a1PO].p... | [
"0.625563",
"0.5865065",
"0.57162994",
"0.56139594",
"0.5590593",
"0.55280566",
"0.5517185",
"0.54722154",
"0.53721935",
"0.53315324",
"0.53198546",
"0.5243594",
"0.5165628",
"0.51624054",
"0.51559365",
"0.51352894",
"0.5128256",
"0.511365",
"0.5112446",
"0.5106733",
"0.50837... | 0.0 | -1 |
Rotation Matrix from a quaternion | def KhV5(vexM):
A3Vt = oyIN.zeros([3, 3])
A3Vt[0, 0] = 2.0 * (vexM[0] * vexM[0] + vexM[1] * vexM[1]) - 1.0
A3Vt[0, 1] = 2.0 * (vexM[1] * vexM[2] - vexM[0] * vexM[3])
A3Vt[0, 2] = 2.0 * (vexM[1] * vexM[3] + vexM[0] * vexM[2])
A3Vt[1, 0] = 2.0 * (vexM[1] * vexM[2] + vexM[0] * vexM[3])
A3Vt[1, 1] =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HtqY(YKHO, vexM):\n yzQ0, WKvO, LVAh, epBp = vexM\n ndZa = (vexM ** 2).sum()\n if ndZa > 0.0:\n KCHu = 2.0 / ndZa\n else:\n KCHu = 0.0\n EcVT = WKvO * KCHu\n fuBA = LVAh * KCHu\n Nk6w = epBp * KCHu\n WlYO = yzQ0 * EcVT\n ixKT = yzQ0 * fuBA\n x3xH = yzQ0 * Nk6w\n g... | [
"0.81895804",
"0.80525327",
"0.80523956",
"0.7970123",
"0.79053074",
"0.7876498",
"0.7810813",
"0.7804025",
"0.77923155",
"0.77711344",
"0.77599454",
"0.77467096",
"0.76919526",
"0.76837784",
"0.76485246",
"0.76398295",
"0.7639371",
"0.7608062",
"0.76030105",
"0.75803435",
"0... | 0.7557081 | 21 |
Prevent logging handlers from capturing temporary file handles. For example, a test that uses the `capsys` fixture and calls `logging.exception()` will initialize logging with a default handler that captures `sys.stderr`. When the test ends, the file handles will be closed and `sys.stderr` will be returned to its origi... | def SuMf():
bo34 = G9jH.getLogger()
for DCgT in bo34.handlers:
bo34.removeHandler(DCgT) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xB4j():\n global extcap_log_handler\n if g4Oq:\n Few0.removeLogHandler(g4Oq)\n g4Oq = None",
"def q04H():\n GifX = HwRy.stdout\n yoMj = HwRy.stderr\n HwRy.stdout = OCHE()\n HwRy.stderr = OCHE()\n yield\n HwRy.stdout = GifX\n HwRy.stderr = yoMj",
"def JByf():\n Gi... | [
"0.6541606",
"0.6440616",
"0.63997555",
"0.63871366",
"0.62914616",
"0.6202734",
"0.61913455",
"0.61733025",
"0.613105",
"0.6119309",
"0.6086397",
"0.60632074",
"0.6062467",
"0.6062467",
"0.60550135",
"0.6032682",
"0.603165",
"0.6027541",
"0.5987457",
"0.5975699",
"0.5969278"... | 0.0 | -1 |
Return the player's ID. | def id(YKHO) -> int:
return YKHO.member.id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LZbL(YKHO):\n return YKHO._id",
"def LZbL(YKHO):\n return YKHO.playerID",
"def LZbL(YKHO):\n return YKHO._attributes.get('player_id', None)",
"def yztK(oyg0):\n return mVZ4.query.filter_by(username=oyg0).first().id",
"def unpH(zGr4=True):\n if zGr4:\n BLzc()\n return YmdA.playe... | [
"0.8938009",
"0.8736117",
"0.86644644",
"0.84250057",
"0.8011379",
"0.7862568",
"0.7774291",
"0.773756",
"0.75406843",
"0.7487428",
"0.7472007",
"0.7326409",
"0.7272134",
"0.72600865",
"0.71971035",
"0.71910787",
"0.7187807",
"0.7143994",
"0.7049464",
"0.7049464",
"0.7027195"... | 0.67307526 | 44 |
Type of Contact Flow. | def type(YKHO) -> h8nf[str]:
return qe4Y.get(YKHO, 'type') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eYwf(YKHO):\n return YKHO._contact_type",
"def noAm(YKHO):\n return 'SendingFlow'",
"def noAm(YKHO):\n return 'ReceivingFlow'",
"def T9cl(YKHO) -> RnTg.program.model.symbol.FlowType:\n ...",
"def type(YKHO):\n return YKHO.activity_type",
"def type(YKHO):\n return YKHO._message['type... | [
"0.72031075",
"0.70435196",
"0.68413186",
"0.64853436",
"0.63747275",
"0.63128436",
"0.6312456",
"0.6257636",
"0.6135717",
"0.6099478",
"0.60410595",
"0.5926449",
"0.5916979",
"0.5884874",
"0.5819081",
"0.58099115",
"0.58090293",
"0.57988757",
"0.5742661",
"0.5723256",
"0.572... | 0.0 | -1 |
Sets the loss function and optimizer for training of the model. | def compile(YKHO, N77f, K0do):
if isinstance(N77f, str):
if N77f == 'mse':
YKHO.loss_func = UAju.MeanSquaredError()
elif N77f == 'crossentropy':
YKHO.loss_func = UAju.CrossEntropy()
else:
Ol8d = "\n You must specify a loss function of : 'mse... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H7LZ(YKHO):\n YKHO.optimizer = ZylS.train.AdamOptimizer(learning_rate=PSrQ.lr).minimize(YKHO.loss)",
"def WIl5(YKHO, N77f):\n VKhi = YKHO._options\n K0do = ZylS.train.AdamOptimizer(learning_rate=VKhi.lr, beta1=0.9, beta2=0.999, epsilon=1e-08)\n EvQg = K0do.minimize(N77f, global_step=YKHO.global_s... | [
"0.6901075",
"0.6756842",
"0.66828495",
"0.6614742",
"0.6581977",
"0.655145",
"0.64918745",
"0.64712924",
"0.6436123",
"0.6433942",
"0.6419889",
"0.63796014",
"0.63775915",
"0.6376714",
"0.6314719",
"0.63004017",
"0.6295299",
"0.62936527",
"0.62587494",
"0.62565905",
"0.62404... | 0.6255241 | 20 |
Create a symbolic representation of a neural network with `intput_dim` input nodes, `output_dim` output nodes and `num_hidden_units` per hidden layer. The training function of this model must have a minibatch size of `batch_size`. A theano expression which represents such a network is returned. | def n8cN(YKHO, Gzv5, EDoJ, Ep8u=Pp2K):
print('input_dim', Gzv5, 'output_dim', EDoJ)
DVQq = MTf8.layers.InputLayer(shape=(Ep8u, Gzv5))
csh6 = MTf8.layers.DenseLayer(DVQq, num_units=200, nonlinearity=MTf8.nonlinearities.tanh)
T2Jh = MTf8.layers.DenseLayer(csh6, num_units=EDoJ, nonlinearity=MTf8.nonlineari... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def U78l(input, vArt, CJGY=None, PWgb=False, mWFP=''):\n for YRbF, zNig in enumerate(vArt):\n YDYE = ZylS.nn.relu if YRbF < len(vArt) - 1 else None\n input = ZylS.layers.dense(inputs=input, units=zNig, kernel_initializer=ZylS.contrib.layers.xavier_initializer(), reuse=CJGY, name=mWFP + '_' + str(Y... | [
"0.6428374",
"0.6428374",
"0.6415924",
"0.63532966",
"0.63158655",
"0.6307221",
"0.6222462",
"0.62119764",
"0.61669445",
"0.6158005",
"0.6152717",
"0.61235297",
"0.610515",
"0.608369",
"0.6078713",
"0.6065557",
"0.6057201",
"0.6045311",
"0.60386884",
"0.60373163",
"0.60364413... | 0.62102044 | 8 |
Merge two sorted linked lists. | def qC0N(jtyf: ListNode, V70B: ListNode) -> Msxl:
tk5Y = None
while jtyf or V70B:
if not jtyf:
Q6kx = Msxl(V70B.val)
V70B = V70B.next
elif not V70B:
Q6kx = Msxl(jtyf.val)
jtyf = jtyf.next
elif jtyf.val <= V70B.val:
Q6kx = Msxl(j... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mAzL(Emd4, jzdc, Fg_i):\n Aofo = _sfu()\n while jzdc.head and Fg_i.head:\n if jzdc.head.value < Fg_i.head.value:\n Aofo.move_node(jzdc)\n else:\n Aofo.move_node(Fg_i)\n while jzdc.head:\n Aofo.move_node(jzdc)\n while Fg_i.head:\n Aofo.move_node(Fg_i... | [
"0.8263646",
"0.8103567",
"0.7938172",
"0.792939",
"0.7913998",
"0.79123783",
"0.7885323",
"0.7863714",
"0.7749493",
"0.7651764",
"0.75899094",
"0.75873876",
"0.7549193",
"0.7527367",
"0.74944615",
"0.74751437",
"0.74685806",
"0.74622244",
"0.7445363",
"0.74380946",
"0.741238... | 0.730582 | 24 |
Constructs the deck and creates each individual card with value, suit, and picutre attributes. | def FIMM(YKHO):
LegL = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K']
YX8P = ['♧', '♢', '♡', '♤']
YKHO._deck_of_cards = []
for KCHu in YX8P:
for Ty9i in LegL:
if KCHu == '♧':
aBtB = Ty9i + 'C' + '.gif'
elif KCHu == '♢':
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jtr5():\n nf_0 = []\n for iCfd in SOXX:\n for BWXx in hkxX:\n if BWXx.isnumeric():\n WIV_ = HST5 + BWXx + iCfd[0] + '.png'\n else:\n WIV_ = HST5 + BWXx[0] + iCfd[0] + '.png'\n nf_0.append(F1Hz(BWXx, iCfd, WIV_, True))\n return nf_0"... | [
"0.8033725",
"0.79502046",
"0.78843296",
"0.782401",
"0.78204256",
"0.77796507",
"0.7716089",
"0.77020115",
"0.76800233",
"0.7677106",
"0.7668404",
"0.7653346",
"0.76364696",
"0.7623759",
"0.75988185",
"0.7592465",
"0.75592",
"0.7556294",
"0.7528652",
"0.75245583",
"0.7510069... | 0.73234814 | 31 |
Test the User model can create a User. | def dV5x(YKHO):
jcGM = mv1M.objects.count()
YKHO.User.save()
N4Fk = mv1M.objects.count()
YKHO.assertNotEqual(jcGM, N4Fk) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i1AJ(YKHO):\n CBIr = OFHu(data=YKHO.token, model=npLe, retrn=True)\n assert CBIr in NCls.session",
"def i1AJ(YKHO) -> None:\n neeh = mv1M.objects.create_user(email='test@gmail.com', username='test', employee_id='DT1001', password='wsxwsx@123')\n YKHO.assertFalse(neeh.is_admin)\n YKHO.assertFal... | [
"0.84683114",
"0.8405418",
"0.8256327",
"0.8254263",
"0.8233484",
"0.81760544",
"0.8126238",
"0.80487174",
"0.79946774",
"0.79927087",
"0.79879797",
"0.7979856",
"0.79569817",
"0.79407614",
"0.7914104",
"0.7892814",
"0.7882952",
"0.78801143",
"0.7870525",
"0.78513455",
"0.783... | 0.74854153 | 89 |
Test the api has bucket creation capability. | def MhRX(YKHO):
YKHO.assertEqual(YKHO.response.status_code, jGRS.HTTP_201_CREATED) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M_MD(YKHO):\n YKHO.assertTrue(YKHO.bucket)",
"def EbpS(YKHO):\n YKHO.client().post('/bucketlist', headers=YKHO.login(), data=YKHO.bucketlist)\n _hkX = YKHO.client().post('/bucketlist/', headers=YKHO.login(), data=YKHO.bucketlist)\n YKHO.assertEqual(_hkX.status_code, 403)\n YKHO.assertIn('Title... | [
"0.8131026",
"0.77866304",
"0.77597106",
"0.77597106",
"0.77597106",
"0.7654904",
"0.7588171",
"0.74769604",
"0.7421259",
"0.7418283",
"0.73876256",
"0.73841614",
"0.73555857",
"0.7311708",
"0.72924197",
"0.7253417",
"0.72127604",
"0.72060585",
"0.71961975",
"0.7183707",
"0.7... | 0.0 | -1 |
Test the api can update a given user. | def KE0T(YKHO):
CBIr = mv1M.objects.get()
NCaK = {'first_name': 'Something new'}
Ylbp = YKHO.client.patch(gxEw('details', kwargs={'pk': CBIr.id}), NCaK, format='json')
YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_200_OK) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lDhF(YKHO):\n pass",
"def lDhF(YKHO):\n pass",
"def lDhF(YKHO):\n pass",
"def ZKvB(YKHO):\n yw2n = YKHO.client.post('api/v1/users', data=qQXR.dumps(YKHO.user), content_type='application/json')\n YKHO.assertEqual(yw2n.status_code, 201)\n ' get the new user by id '\n BQXo = {'name': 'A... | [
"0.83430886",
"0.83430886",
"0.83430886",
"0.83209115",
"0.8182309",
"0.8126379",
"0.8096613",
"0.7950748",
"0.79474604",
"0.79472864",
"0.79259574",
"0.79235834",
"0.78818005",
"0.7878672",
"0.7877863",
"0.78765327",
"0.7835084",
"0.78250927",
"0.77649564",
"0.7739673",
"0.7... | 0.7727434 | 20 |
Forward pass, returns outputs of each layer. Use last out (final) for backprop! | def KVH6(YKHO, g4y1):
yvT9 = YKHO.input_layer(g4y1)
yvT9 = YKHO.features(yvT9)
yvT9 = YKHO.classifier(yvT9)
return yvT9 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVH6(YKHO, WKvO):\n TORX = WKvO\n for pGMM in range(len(YKHO.layers)):\n TORX = YKHO.layers[pGMM].forward(TORX)\n assert TORX.shape == (YKHO.layers[-1].output_dim, 1), 'Layer output has shape {}, but should have shape ({}, 1)'.format(TORX.shape, YKHO.layers[-1].output_dim)\n return TORX",
... | [
"0.751427",
"0.7451497",
"0.7449008",
"0.74400634",
"0.74365157",
"0.7372514",
"0.7360194",
"0.7347337",
"0.73456526",
"0.73313177",
"0.73313177",
"0.72559685",
"0.72541934",
"0.7227149",
"0.7212917",
"0.72055936",
"0.71977013",
"0.71914333",
"0.71679854",
"0.71632504",
"0.71... | 0.6926908 | 47 |
B = \Omega + (r/2)(d\Omega/dr) | def Hdp4(YKHO):
szJ_ = YKHO.params.get('gm')
Mkmy = YKHO.grid.r
VZmO = (YKHO.grid.r_edge[1] + YKHO.grid.r_edge[2]) / 2
jIuG = (YKHO.grid.r_edge[-2] + YKHO.grid.r_edge[-3]) / 2
wW3z = YKHO.omega()
PioU = f7Dd.d_dr(YKHO.grid, wW3z, arr_start=oyIN.sqrt(szJ_ / VZmO ** 3), arr_end=oyIN.sqrt(szJ_ / jI... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wW3z(A3Vt, a1PO):\n return oyIN.gradient(oyIN.log(A3Vt)) / oyIN.gradient(a1PO)",
"def Fg_i(r8hN, RHJb, oZuG, KCHu, CLNC):\n if KCHu == 0:\n return 1.0\n if KCHu == 1:\n return 2.0 * r8hN * RHJb / CLNC\n xgkQ = Fg_i(r8hN, RHJb, oZuG, KCHu - 1, CLNC)\n HdHK = Fg_i(r8hN, RHJb, oZuG,... | [
"0.70265394",
"0.665721",
"0.65797436",
"0.6567471",
"0.6531375",
"0.6521053",
"0.6374946",
"0.6366548",
"0.6366365",
"0.6362816",
"0.635607",
"0.6320145",
"0.63191944",
"0.6317979",
"0.63159853",
"0.63050264",
"0.62911445",
"0.6277264",
"0.61984617",
"0.61699456",
"0.6167803... | 0.7172752 | 0 |
Constructor for the base framework exception. | def FIMM(YKHO, Ol8d='', **B2fa):
Ol8d = '\nError: %s !!\n' % Ol8d
super(rUoW, YKHO).__init__(Ol8d) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, *qIxc, **B2fa):\n Exception.__init__(YKHO, *qIxc, **B2fa)",
"def FIMM(YKHO, *qIxc, **B2fa):\n Exception.__init__(YKHO, *qIxc, **B2fa)",
"def FIMM(YKHO, *qIxc, **B2fa):\n Exception.__init__(YKHO, *qIxc, **B2fa)",
"def FIMM(YKHO, *qIxc, **B2fa):\n Exception.__init__(YKHO, *qIxc, **B2... | [
"0.8314188",
"0.82166165",
"0.82166165",
"0.82166165",
"0.79169625",
"0.7902483",
"0.7902483",
"0.7902483",
"0.7902483",
"0.7797258",
"0.77824277",
"0.7582782",
"0.7551187",
"0.7549064",
"0.7530501",
"0.7475824",
"0.7420036",
"0.7420036",
"0.7405731",
"0.73835397",
"0.7381341... | 0.0 | -1 |
Finds all instances of a single char in a string, and return a list of their indices. | def njrE(vIwR: str, hcXw: str, *, gxEw: bool=False) -> laHg.Tuple[int, ...]:
if len(hcXw) != 1:
raise TypeError('Input can only be a single character.')
return tuple((or8S for or8S, sZqf in enumerate(vIwR) if sZqf == hcXw))[::-1 if gxEw else 1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GL3p(bseI, vIwR):\n return [WKvO for WKvO, hcXw in enumerate(vIwR) if hcXw == bseI]",
"def neBz(vIwR, hcXw):\n return [d6pt for d6pt, sZqf in enumerate(vIwR) if sZqf == hcXw]",
"def a7yY(vIwR, hcXw):\n assert len(hcXw) == 1\n YRbF = []\n for QJlQ, KCHu in enumerate(vIwR):\n if KCHu ==... | [
"0.86003536",
"0.8511567",
"0.8485719",
"0.8294818",
"0.81468844",
"0.78355753",
"0.77939224",
"0.7417179",
"0.7383259",
"0.6921452",
"0.69069725",
"0.68884397",
"0.6806837",
"0.67050093",
"0.6633773",
"0.6631702",
"0.6605061",
"0.6559571",
"0.6533166",
"0.6530661",
"0.652337... | 0.57363117 | 88 |
Take a single step in the direction of the gradient of the dual loss function. L = sum(ai) (1/2) sum_i(sum_j(aiyiajyjK(i,j))) dL/dai = 1 yi sum_j(ajyjK(i,j)) | def COdA(YKHO):
xQ3W = oyIN.multiply(YKHO.alpha, YKHO.y)
c3gG = oyIN.multiply(YKHO.K, xQ3W)
IKm6 = 1.0 - 0.5 * oyIN.multiply(YKHO.y, oyIN.sum(c3gG, axis=1))
IKm6[IKm6 < 0] = 0
IKm6[IKm6 > 10] = 10
YKHO.alpha -= YKHO.learnRate * IKm6 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vdCx(Oa10, XZRJ, tspZ, tldg, _hZ2=1e-50):\n q7In = XZRJ\n N77f = Oa10(q7In)\n yk4i = 1\n ewCu = 0\n while yk4i >= _hZ2 and N77f < 1e+20:\n q7In = tldg(q7In, tspZ)\n VfdS = Oa10(q7In)\n yk4i = oyIN.abs(VfdS - N77f)\n N77f = VfdS\n print(f'Iteration: {ewCu}')\n ... | [
"0.71273494",
"0.69034714",
"0.68199795",
"0.68004936",
"0.6711693",
"0.66696864",
"0.6626476",
"0.66178244",
"0.65995574",
"0.65818727",
"0.6576063",
"0.65596086",
"0.65577376",
"0.65430516",
"0.6517565",
"0.65077376",
"0.6506193",
"0.64960593",
"0.64888924",
"0.64808446",
"... | 0.0 | -1 |
Dropout for sparse tensors. | def zSpM(WKvO, sMyr, ZqPb):
FzVw = sMyr
FzVw += ZylS.random_uniform(ZqPb)
Vwv8 = ZylS.cast(ZylS.floor(FzVw), dtype=ZylS.bool)
TYvy = ZylS.sparse_retain(WKvO, Vwv8)
return TYvy * (1.0 / sMyr) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T7wl(YKHO, EcVT, sMyr, f3d9):\n ZqPb = [f3d9]\n FzVw = sMyr\n FzVw += ZylS.random_uniform(ZqPb)\n Vwv8 = ZylS.cast(ZylS.floor(FzVw), dtype=ZylS.bool)\n TYvy = ZylS.sparse_retain(EcVT, Vwv8)\n return TYvy * ZylS.div(1.0, sMyr)",
"def zSpM(WKvO, TyPQ, ZqPb):\n sMyr = 1 - TyPQ\n FzVw = s... | [
"0.73814416",
"0.72638047",
"0.71138567",
"0.7038412",
"0.7024422",
"0.70228106",
"0.70217985",
"0.7003882",
"0.6717129",
"0.6705799",
"0.6619567",
"0.66143274",
"0.66085285",
"0.6560995",
"0.65493375",
"0.6496815",
"0.63351077",
"0.6226428",
"0.62089765",
"0.6101688",
"0.609... | 0.70432353 | 3 |
Computes the average of an observable sequence of values that are in the sequence or obtained by invoking a transform function on each element of the input sequence if present. | def S8vG(NTpD=None) -> YrBT[[nkvd], nkvd]:
def YLnl(JZXy: ObservableBase) -> nkvd:
if NTpD:
return JZXy.map(NTpD).average()
def alQJ(THkp, DpUl):
return gKaV(sum=THkp.sum + DpUl, count=THkp.count + 1)
def YAg3(KCHu):
if KCHu.count == 0:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zsZT(aWuw):\n for YRbF, Ty9i in enumerate(pD6w(aWuw)):\n yield round(Ty9i / (YRbF + 1), 2)",
"def S8vG(Q6uT: list[Optional[float]]) -> float:\n wjRY, UHFx = (0.0, 0)\n for Ty9i in filter(None, Q6uT):\n wjRY += Ty9i\n UHFx += 1\n return wjRY / UHFx",
"def zsZT(aWuw):\n fo... | [
"0.72657543",
"0.71175915",
"0.7078821",
"0.70470035",
"0.69729316",
"0.69729316",
"0.6336905",
"0.6336336",
"0.62992656",
"0.6264198",
"0.6249605",
"0.62460405",
"0.6239833",
"0.62179726",
"0.62030154",
"0.617989",
"0.6174531",
"0.6164164",
"0.61580586",
"0.6118045",
"0.6115... | 0.6723631 | 6 |
Returns the default script's keybindings, i.e. without any of the toolkit or application specific commands added. | def YNA2(YKHO):
_tfn = yHEm.KeyBindings()
LAOT = qxb_.getSetting('keyboardLayout')
if LAOT == gCuF.GENERAL_KEYBOARD_LAYOUT_DESKTOP:
for UwZp in YKHO.__getDesktopBindings().keyBindings:
_tfn.add(UwZp)
else:
for UwZp in YKHO.__getLaptopBindings().keyBindings:
_tfn.a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YNA2(YKHO):\n _tfn = yHEm.KeyBindings()\n LAOT = qxb_.getSetting('keyboardLayout')\n if LAOT == gCuF.GENERAL_KEYBOARD_LAYOUT_DESKTOP:\n for UwZp in YKHO.__getDesktopBindings().keyBindings:\n _tfn.add(UwZp)\n else:\n for UwZp in YKHO.__getLaptopBindings().keyBindings:\n ... | [
"0.7266066",
"0.68446606",
"0.68202615",
"0.6563659",
"0.65352684",
"0.65058887",
"0.6249424",
"0.62229043",
"0.62229043",
"0.6198403",
"0.61716205",
"0.6114832",
"0.6114832",
"0.6071922",
"0.60433203",
"0.59932274",
"0.59043485",
"0.58597845",
"0.58244485",
"0.5819702",
"0.5... | 0.73977995 | 0 |
Moves the flat review context to the previous character. Places the flat review cursor at character. | def yLeZ(YKHO, MxnY):
QpfX = YKHO.getFlatReviewContext()
lCOu = QpfX.goPrevious(_WQI.Context.CHAR, _WQI.Context.WRAP_LINE)
if lCOu:
YKHO._reviewCurrentCharacter(MxnY)
YKHO.targetCursorCell = YKHO.getBrailleCursorCell()
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AkpG(YKHO):\n QpfX = YKHO.getFlatReviewContext()\n [zQZR, T3du] = QpfX.getCurrentBrailleRegions()\n for zn0c in zQZR:\n if zn0c.brailleOffset + len(zn0c.string) > hGVb.viewport[0] and (isinstance(zn0c, hGVb.ReviewText) or isinstance(zn0c, hGVb.ReviewComponent)):\n dQgj = max(zn0c.bra... | [
"0.6735997",
"0.672037",
"0.6702018",
"0.6702018",
"0.6624201",
"0.6496205",
"0.6455601",
"0.6455601",
"0.64014125",
"0.63857144",
"0.63857144",
"0.6214956",
"0.61092234",
"0.6010877",
"0.60063297",
"0.59840465",
"0.5968522",
"0.5961993",
"0.5961993",
"0.5961993",
"0.5961993"... | 0.74936837 | 0 |
Moves the flat review context to the next character. Places the flat review cursor at character. | def kQ8S(YKHO, MxnY):
QpfX = YKHO.getFlatReviewContext()
lCOu = QpfX.goNext(_WQI.Context.CHAR, _WQI.Context.WRAP_LINE)
if lCOu:
YKHO._reviewCurrentCharacter(MxnY)
YKHO.targetCursorCell = YKHO.getBrailleCursorCell()
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ucSA(YKHO):\n YKHO._pos += 1\n if YKHO._pos > len(YKHO.text) - 1:\n YKHO.current_char = None\n else:\n YKHO.current_char = YKHO.text[YKHO._pos]",
"def ucSA(YKHO):\n YKHO.pos -= 1\n if YKHO.pos < 0:\n YKHO.current_char = None\n else:\n YKHO.current_char = YKHO.tex... | [
"0.68827695",
"0.6869432",
"0.685227",
"0.6840507",
"0.6806026",
"0.66448575",
"0.6602594",
"0.6602594",
"0.6602594",
"0.6602594",
"0.6602594",
"0.6600436",
"0.62857956",
"0.62566704",
"0.62566704",
"0.6189138",
"0.61261976",
"0.6102591",
"0.61021394",
"0.61021394",
"0.609278... | 0.7199525 | 0 |
Moves the flat review context to the character most directly above the current flat review cursor. Places the flat review cursor at character. | def MXBS(YKHO, MxnY):
QpfX = YKHO.getFlatReviewContext()
lCOu = QpfX.goAbove(_WQI.Context.CHAR, _WQI.Context.WRAP_LINE)
if lCOu:
YKHO._reviewCurrentItem(MxnY, YKHO.targetCursorCell)
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AkpG(YKHO):\n QpfX = YKHO.getFlatReviewContext()\n [zQZR, T3du] = QpfX.getCurrentBrailleRegions()\n for zn0c in zQZR:\n if zn0c.brailleOffset + len(zn0c.string) > hGVb.viewport[0] and (isinstance(zn0c, hGVb.ReviewText) or isinstance(zn0c, hGVb.ReviewComponent)):\n dQgj = max(zn0c.bra... | [
"0.7260431",
"0.7236819",
"0.6613409",
"0.6613409",
"0.64270145",
"0.64270145",
"0.6381648",
"0.635243",
"0.6262494",
"0.62272394",
"0.62272394",
"0.58918816",
"0.5868326",
"0.58372134",
"0.57853854",
"0.5675726",
"0.5663744",
"0.5663744",
"0.565819",
"0.5553879",
"0.5539032"... | 0.58094394 | 14 |
Moves the flat review context to the character most directly below the current flat review cursor. Places the flat review cursor at character. | def nDF4(YKHO, MxnY):
QpfX = YKHO.getFlatReviewContext()
lCOu = QpfX.goBelow(_WQI.Context.CHAR, _WQI.Context.WRAP_LINE)
if lCOu:
YKHO._reviewCurrentItem(MxnY, YKHO.targetCursorCell)
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AkpG(YKHO):\n QpfX = YKHO.getFlatReviewContext()\n [zQZR, T3du] = QpfX.getCurrentBrailleRegions()\n for zn0c in zQZR:\n if zn0c.brailleOffset + len(zn0c.string) > hGVb.viewport[0] and (isinstance(zn0c, hGVb.ReviewText) or isinstance(zn0c, hGVb.ReviewComponent)):\n dQgj = max(zn0c.bra... | [
"0.7068309",
"0.704518",
"0.64881474",
"0.64881474",
"0.6225853",
"0.6223794",
"0.6223794",
"0.6141875",
"0.6141875",
"0.6046206",
"0.596983",
"0.59666526",
"0.5964977",
"0.595942",
"0.58709884",
"0.5683943",
"0.56407744",
"0.5550393",
"0.54846793",
"0.54846793",
"0.5407614",... | 0.5591004 | 17 |
Returns the ndarray of the magnitude of the FT, using conversions and symmetries if needed. | def T5Tw(YKHO, *qIxc, PXGI='SI', GGwy=False, vnWm=[], eprv=True, yYmD=True, nWIU=None):
if len(qIxc) == 1 and type(qIxc[0]) == tuple:
qIxc = qIxc[0]
qIxc = ZEeN([jDK_.name for jDK_ in YKHO.get_axes()], qIxc)
if 'dB' in PXGI and PXGI != YKHO.unit and yYmD:
APaO = list(qIxc).copy()
yED... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YXbZ(YKHO, SppC):\n LXbl = YKHO.forward_transform(SppC)\n rdlD, fvDH = LXbl.shape\n AFO_ = oyIN.zeros((rdlD, fvDH))\n for P6bq in range(rdlD):\n for Ty9i in range(fvDH):\n AFO_[P6bq, Ty9i] = oyIN.sqrt(LXbl[P6bq, Ty9i].real ** 2 + LXbl[P6bq, Ty9i].imag ** 2)\n return AFO_",
"d... | [
"0.7155125",
"0.7099764",
"0.6672266",
"0.66500413",
"0.6528113",
"0.6490238",
"0.6481259",
"0.6461756",
"0.6440985",
"0.6392037",
"0.6380528",
"0.6340219",
"0.6315303",
"0.630647",
"0.629548",
"0.62938356",
"0.6274852",
"0.6195482",
"0.61704814",
"0.61588794",
"0.6138825",
... | 0.56920916 | 50 |
Returns True iff the devmode is enabled. | def xwEO(YKHO, QePW):
return BfDw.is_devmode() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Xld2(YKHO) -> bool:\n return bool(int(YKHO.data['lan_ctrl']))",
"def ayGm(YKHO) -> bool:\n return YKHO.debug_mode",
"def q0nq(YKHO) -> bool:\n return YKHO._debug",
"def YsGY(YKHO) -> bool:\n return qe4Y.get(YKHO, 'enabled_usb_debugging')",
"def sBAF(YKHO):\n return Hy7s.environ.get('SERV... | [
"0.73066455",
"0.7055744",
"0.7042979",
"0.69558865",
"0.69066566",
"0.69013727",
"0.69013727",
"0.68738943",
"0.6835692",
"0.68017656",
"0.67813843",
"0.6772324",
"0.6770789",
"0.6770789",
"0.6767433",
"0.67630106",
"0.67493564",
"0.6740463",
"0.6712657",
"0.669958",
"0.6672... | 0.8522756 | 0 |
This shall be invoked only once at the start of the tests execution contained within this class. | def Baw8(Emd4):
print('\n─────────────────────────────────────────────────────────────────────────────────────────')
print('Starting the execution of tests for class "SlashNextHostReport" with valid set of inputs.')
print('─────────────────────────────────────────────────────────────────────────────────────... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YoRg(YKHO):\n pass",
"def Zqw4(YKHO):\n pass",
"def MBXI(YKHO):\n pass",
"def LQhm(YKHO):\n pass",
"def as4H(YKHO):\n pass",
"def vt3_(YKHO):\n pass",
"def FCbF(YKHO):\n pass",
"def Xk2J(YKHO):\n pass",
"def sHAk(YKHO):\n pass",
"def sHAk(YKHO):\n pass",
"def f... | [
"0.84928215",
"0.8164255",
"0.8143467",
"0.8139767",
"0.80807585",
"0.8065918",
"0.80367637",
"0.8008967",
"0.79905826",
"0.79905826",
"0.7971739",
"0.7971739",
"0.79641056",
"0.79212844",
"0.7884583",
"0.7884457",
"0.7884457",
"0.78741485",
"0.78741485",
"0.78741485",
"0.787... | 0.0 | -1 |
This shall be invoked only once at the end of the tests execution contained within this class. | def PkTX(Emd4):
print('\n\n─────────────────────────────────────────────────────────────────────────────────────────')
print('Finished the execution of tests for class "SlashNextHostReport" with valid set of inputs.')
print('───────────────────────────────────────────────────────────────────────────────────... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def v7JE(YKHO):\n pass",
"def tBIc(YKHO):\n return",
"def tBIc(YKHO):\n return",
"def tBIc(YKHO):\n pass",
"def tBIc(YKHO):\n return",
"def tBIc(YKHO):\n pass",
"def tBIc(YKHO):\n pass",
"def tBIc(YKHO):\n pass",
"def tBIc(YKHO):\n pass",
"def tBIc(YKHO):\n None",
... | [
"0.833937",
"0.8089814",
"0.8089814",
"0.8089203",
"0.8078668",
"0.8062198",
"0.8062198",
"0.8062198",
"0.8062198",
"0.8042228",
"0.8032609",
"0.8032609",
"0.8032609",
"0.8032609",
"0.8032609",
"0.8032609",
"0.8032609",
"0.8032609",
"0.8032609",
"0.8032609",
"0.8032609",
"0... | 0.0 | -1 |
Check to see if a URL has a valid protocol. | def XdzF(bD7m: str) -> bool:
try:
return VyJ2(bD7m).scheme in kCYz
except Exception:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def w_KE(YKHO, bD7m):\n try:\n Aofo = hfK9.urlparse(bD7m)\n return Aofo.scheme and Aofo.netloc and (Aofo.scheme in ('http', 'https'))\n except:\n return False",
"def vrmQ(bD7m):\n try:\n GgvZ = KVWQ(bD7m)\n if all([GgvZ.scheme, GgvZ.netloc]):\n return bD7m\n... | [
"0.84292835",
"0.8283801",
"0.8247912",
"0.81947607",
"0.81772715",
"0.8174364",
"0.8159464",
"0.8159464",
"0.8152092",
"0.81451225",
"0.81373286",
"0.8099145",
"0.8080991",
"0.8026029",
"0.80096257",
"0.8003651",
"0.79810965",
"0.79582906",
"0.795734",
"0.7941572",
"0.793128... | 0.7885094 | 31 |
Read into a DataFrame from a csv file. | def HND1(nUeQ: Union[str, TextIO, Path], WqRp: int=100, Ep8u: int=8192, U4fd: bool=True, ZqaC: bool=False, M3PZ: Optional[int]=None, JR5C: int=0, hPuM: Optional[List[int]]=None, VWe_: str=',', ZLJ_: Optional[List[str]]=None, Ztjq: bool=True, tZ2K: str='utf8', NyTJ: Optional[int]=None, yDqo: 'Optional[Dict[str, DataType... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZK4F(YKHO, z36O):\n YKHO.dataframe = rLdf.read_csv(z36O, sep=';')",
"def QFyr(u9X4) -> hxoQ:\n try:\n nPrm = rLdf.read_csv(u9X4)\n except Exception as e:\n print('read_csv_file failed: ', tTpl)\n raise\n return nPrm",
"def XNEm(z36O):\n return rLdf.read_csv(z36O, sep='\\... | [
"0.8238437",
"0.8155429",
"0.7952278",
"0.7860615",
"0.77804303",
"0.7771818",
"0.77353156",
"0.77074677",
"0.7689249",
"0.7685035",
"0.7680153",
"0.7648869",
"0.7642782",
"0.7642782",
"0.76212597",
"0.75990134",
"0.75965863",
"0.7586011",
"0.7552469",
"0.7542989",
"0.7527388... | 0.0 | -1 |
Aggregate all the Dataframe in a List of DataFrames to a single DataFrame | def ENFq(K2kF: 'List[DataFrame]', Ztjq=True) -> 'DataFrame':
assert len(K2kF) > 0
jQ3Z = K2kF[0]
for YRbF in fR_9.range(1, len(K2kF)):
try:
jQ3Z = jQ3Z.vstack(K2kF[YRbF], in_place=False)
except RuntimeError:
jQ3Z.vstack(K2kF[YRbF].clone(), in_place=True)
if Ztjq:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uVLB(r2Ud):\n for d6pt, jQ3Z in enumerate(r2Ud):\n if d6pt == 0:\n kReJ = jQ3Z.iloc[:, 2].copy()\n kReJ = kReJ.to_frame()\n else:\n kReJ = CwDs.concat([kReJ, jQ3Z.iloc[:, 2].copy()], axis=1)\n return kReJ",
"def US87(M0wk: list, eJV0: str):\n eJV0 = eJV... | [
"0.7891541",
"0.7342255",
"0.72539204",
"0.68379956",
"0.66145974",
"0.6592726",
"0.6525455",
"0.6393528",
"0.61566097",
"0.6107241",
"0.60889083",
"0.60859996",
"0.6076444",
"0.6065589",
"0.60628617",
"0.5996679",
"0.58546954",
"0.5780784",
"0.5758562",
"0.5749147",
"0.57309... | 0.62521636 | 8 |
Repeat a single value n times and collect into a Series. | def wPFE(wEf2: 'Union[int, float, str]', exwG: int, mWFP: Optional[str]=None) -> 'Series':
if mWFP is None:
mWFP = ''
if isinstance(wEf2, str):
KCHu = oM6q._repeat(mWFP, wEf2, exwG)
KCHu.rename(mWFP)
return KCHu
else:
return oM6q.from_arrow(mWFP, Xugt.repeat(wEf2, exw... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def w_4o(exwG):\n\n def AhJL(ZfUD):\n return FsxT(ZfUD, exwG)\n return AhJL",
"def sWfS(WKvO, ywwl):\n return [ZfUD for ZfUD in WKvO for bGrB in range(ywwl)]",
"def wPFE(vC9B, exwG):\n return [WKvO for WKvO in vC9B for YRbF in range(exwG)]",
"def sWg4(**B2fa):\n return lambda __n6: __n6... | [
"0.68082255",
"0.6524073",
"0.64983326",
"0.64708567",
"0.6440958",
"0.6440398",
"0.64179516",
"0.63997805",
"0.6362666",
"0.63021725",
"0.62728375",
"0.6271299",
"0.6252314",
"0.61999696",
"0.6134511",
"0.6095424",
"0.6071728",
"0.6061696",
"0.6027155",
"0.6015056",
"0.59887... | 0.755884 | 0 |
Force immediate removal of the sprite from video memory. This is often necessary when using batches, as the Python garbage collector will not necessarily call the finalizer as soon as the sprite is garbage. | def PTpj(YKHO):
if YKHO._animation:
DZsB.unschedule(YKHO._animate)
YKHO._vertex_list.delete()
YKHO._vertex_list = None
YKHO._texture = None
YKHO._group = None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fFx9(YKHO):\n YKHO.render(clear=1)\n gYGL.__list__.remove(YKHO._id)",
"def fFx9(YKHO):\n gYGL.__list__.remove(YKHO._id)",
"def fFx9(YKHO):\n for KCHu in YKHO.sprites:\n del KCHu",
"def fFx9(YKHO):\n for KCHu in YKHO.sprites:\n del KCHu",
"def Y7Bk(YKHO):\n YKHO.remove_ch... | [
"0.77203107",
"0.7597384",
"0.7345275",
"0.7345275",
"0.7192976",
"0.7142119",
"0.6967966",
"0.6890616",
"0.68757546",
"0.68533933",
"0.6807007",
"0.67115325",
"0.6707912",
"0.67052877",
"0.6681077",
"0.6628171",
"0.65993106",
"0.65666974",
"0.6561961",
"0.65579474",
"0.65575... | 0.64118975 | 25 |
X coordinate of the sprite. | def WKvO(YKHO):
return YKHO._x | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WKvO(YKHO):\n return YKHO.position.x",
"def pwEc(rGpw: int) -> float:\n pass",
"def WKvO(YKHO) -> int:\n return YKHO.position.x",
"def WKvO(YKHO):\n return YKHO.position.x",
"def WKvO(YKHO):\n return YKHO.__position.x",
"def Ktcp(YKHO):\n return YKHO._position_x",
"def Ktcp(YKHO):... | [
"0.79683715",
"0.7954317",
"0.7948353",
"0.7939518",
"0.7925139",
"0.77064675",
"0.77064675",
"0.7684583",
"0.76244175",
"0.7623703",
"0.756971",
"0.75423205",
"0.7505739",
"0.7441209",
"0.74057907",
"0.7386564",
"0.7310144",
"0.7285252",
"0.72729766",
"0.7259364",
"0.7240785... | 0.0 | -1 |
Y coordinate of the sprite. | def LVAh(YKHO):
return YKHO._y | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LVAh(YKHO) -> int:\n return YKHO.position.y",
"def LVAh(YKHO):\n return YKHO.position.y",
"def JxdI(rGpw: int) -> float:\n pass",
"def LVAh(YKHO):\n return YKHO.position.y",
"def LVAh(YKHO):\n return YKHO.__position.y",
"def yDCK(YKHO):\n return YKHO.get_position(1) / 8 * 0.0025",
... | [
"0.83386505",
"0.83347464",
"0.8328958",
"0.8299916",
"0.82435",
"0.79684556",
"0.7844639",
"0.7844639",
"0.7775223",
"0.77692306",
"0.7758188",
"0.77502215",
"0.7728954",
"0.7712566",
"0.7699831",
"0.7699615",
"0.76732147",
"0.76537555",
"0.7639525",
"0.7619454",
"0.7584813"... | 0.0 | -1 |
Simultaneously change the position, rotation or scale. This method is provided for performance. In cases where multiple Sprite attributes need to be updated at the same time, it is more efficent to update them together using the update method, rather than modifying them one by one. | def QdZT(YKHO, WKvO=None, LVAh=None, DWJ0=None, NXpY=None, YTKZ=None, jCkM=None):
if WKvO is not None:
YKHO._x = WKvO
if LVAh is not None:
YKHO._y = LVAh
if DWJ0 is not None:
YKHO._rotation = DWJ0
if NXpY is not None:
YKHO._scale = NXpY
if YTKZ is not None:
YK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QdZT(YKHO, *qIxc):\n YKHO.adapt_animation_speed()\n bDX9.update(YKHO)\n yDvq = cGGv.Display.display_manager.DisplayManager.get_instance().camera\n r65Z = yDvq.world_to_pixel_coords(YKHO.position, dzxs)\n _5ry = yDvq.get_length_in_pixels_at(YKHO.position, YKHO.radius, dzxs)\n Hpgm = (int(r65Z[... | [
"0.692147",
"0.6615932",
"0.657884",
"0.6507712",
"0.6502414",
"0.6492225",
"0.64762825",
"0.64319587",
"0.643075",
"0.6425399",
"0.6344716",
"0.62166697",
"0.6174885",
"0.61667585",
"0.6149999",
"0.61497694",
"0.61216104",
"0.6062814",
"0.6020949",
"0.60164297",
"0.6011813",... | 0.69285244 | 0 |
Draw the sprite at its current position. See the module documentation for hints on drawing multiple sprites efficiently. | def JmFt(YKHO):
YKHO._group.set_state_recursive()
YKHO._vertex_list.draw(gKg0)
YKHO._group.unset_state_recursive() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JmFt(YKHO):\n YKHO.sprite.draw()",
"def JmFt(YKHO, Vjhr):\n Vjhr.blit(YKHO.sprite, (YKHO.x + YKHO.w / 2 - YKHO.sprite.get_width() / 2, YKHO.y + YKHO.h / 2 - YKHO.sprite.get_height() / 2))",
"def JmFt(YKHO):\n Z9rn = YKHO.camera\n for WKvO in YKHO._sprites:\n WKvO.draw(Z9rn)",
"def JmFt... | [
"0.8066758",
"0.77614355",
"0.7759521",
"0.77040625",
"0.7681777",
"0.767049",
"0.76472753",
"0.7583472",
"0.7560176",
"0.75266874",
"0.7349391",
"0.72581005",
"0.7239407",
"0.7224164",
"0.7218936",
"0.7177349",
"0.7147777",
"0.71196604",
"0.70795965",
"0.702987",
"0.7006546"... | 0.0 | -1 |
Returns whether or not this node is a leaf node. | def loae(YKHO):
return YKHO.leaf | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def loae(YKHO):\n return YKHO.tag == NyUI",
"def jwB3(YKHO) -> bool:\n pass",
"def loae(YKHO):\n if YKHO._Node._left is None and YKHO._Node._right is None:\n return True\n else:\n return False",
"def loae(YKHO):\n return YKHO._is_leaf",
"def loae(YKHO):\n if len(YKHO.childre... | [
"0.87654144",
"0.8641491",
"0.86229384",
"0.85740864",
"0.8566735",
"0.8556313",
"0.8527",
"0.8510924",
"0.8487466",
"0.84777457",
"0.84609795",
"0.84609795",
"0.8457927",
"0.8446747",
"0.84453523",
"0.8431717",
"0.84315574",
"0.8413969",
"0.84089345",
"0.84089345",
"0.840893... | 0.8567683 | 4 |
Gets the indexes associated with this node. Indexes refer to row values. | def DzXR(YKHO):
return YKHO.indexes | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DzXR(YKHO):\n return YKHO.__indexes",
"def DzXR(YKHO):\n return YKHO._api_query('indexes')['indexes']",
"def bS0K(YKHO) -> cuzp[str, tTFA]:\n return YKHO._indexes",
"def _0VL(YKHO):\n return list(YKHO.values.index)",
"def BJma(YKHO):\n return YKHO._indices",
"def _0VL(YKHO):\n retur... | [
"0.7832614",
"0.768222",
"0.76819056",
"0.7608519",
"0.74304485",
"0.73383975",
"0.7292283",
"0.7100852",
"0.7081497",
"0.70422107",
"0.70268506",
"0.6960752",
"0.6905674",
"0.6886419",
"0.68831784",
"0.6876586",
"0.68693817",
"0.6867727",
"0.6851964",
"0.67868775",
"0.678662... | 0.770293 | 1 |
Returns true if all the data in this node is of the same class. | def YP6b(YKHO, Crrw):
g057 = True
for YRbF in range(1, len(YKHO.indexes)):
XB3u = YKHO.indexes[YRbF - 1]
qqiJ = YKHO.indexes[YRbF]
if not Crrw[XB3u] == Crrw[qqiJ]:
g057 = False
break
if g057:
YKHO.category = Crrw[0]
return g057 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MIDq(YKHO, vcn7):\n TXzq = len(vcn7[0])\n XiP7 = vcn7[0][TXzq - 1]\n for YRbF in range(1, len(vcn7)):\n if vcn7[YRbF][TXzq - 1] != XiP7:\n return False\n return True",
"def YP6b(_73Q):\n avlW = _73Q[0][pan_]\n return all((tTpl[pan_] == avlW for tTpl in _73Q))",
"def plAK... | [
"0.75966156",
"0.69640416",
"0.6811338",
"0.67748135",
"0.6661469",
"0.66369355",
"0.66369355",
"0.66369355",
"0.66177386",
"0.66144997",
"0.66078997",
"0.66078997",
"0.6599887",
"0.6597114",
"0.65906394",
"0.65906394",
"0.65885216",
"0.65885216",
"0.65885216",
"0.65885216",
... | 0.6289971 | 54 |
Gets the entropy of the data in this node | def ebCz(Crrw):
Tjp_ = {}
nfqd = []
wjRY = Crrw.size
for UXqs in Crrw:
if UXqs not in Tjp_.keys():
Tjp_[UXqs] = 1
else:
Tjp_[UXqs] += 1
for YRbF in Tjp_.keys():
nfqd.append(Tjp_[YRbF] / wjRY * epAf.log2(Tjp_[YRbF] / wjRY))
sum = 0
for YRbF in n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oqGu(YKHO):\n return YKHO._normal.entropy()",
"def oqGu(YKHO):\n raise NotImplementedError",
"def oqGu(YKHO):\n raise NotImplementedError",
"def oqGu(YKHO):\n return YKHO._rv.entropy()",
"def oqGu(YKHO):\n try:\n return YKHO._entropy()\n except AttributeError:\n return Y... | [
"0.8534308",
"0.8398843",
"0.8398843",
"0.8384144",
"0.8309146",
"0.82636833",
"0.82636833",
"0.82244897",
"0.8219381",
"0.79707605",
"0.7802979",
"0.7775321",
"0.7589971",
"0.7566628",
"0.7491177",
"0.74302703",
"0.74207157",
"0.7407172",
"0.73994523",
"0.73937345",
"0.73815... | 0.0 | -1 |
A basic Gaussian prior also enofrces that the parameter must be positive. Generally this should not make much difference as the distribution should be far from zero in order for a Gaussian to be a good assumption. However this functions as a failsafe to keep the likelihood from attempting to compute a nonphysical param... | def sgpP(WKvO, JBMS, WTkW):
if WKvO >= 0:
return khi9(WKvO, JBMS, WTkW)
else:
return -oyIN.inf | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def khi9(WKvO, JBMS, WTkW):\n return -0.5 * (((WKvO - JBMS) / WTkW) ** 2 + oyIN.log(2 * oyIN.pi * WTkW ** 2))",
"def IAWS(WKvO, yGTL=0, WTkW=1):\n a1PO = (WKvO - yGTL) / WTkW\n return -1.0 * oyIN.log(2 * oyIN.pi) - oyIN.dot(a1PO, a1PO)",
"def IAWS(WKvO, nJ9F, WTkW):\n return oyIN.exp(-((WKvO - nJ9F... | [
"0.7592076",
"0.6879927",
"0.68796784",
"0.6788505",
"0.6768183",
"0.6764351",
"0.67393726",
"0.6737451",
"0.6694833",
"0.66906106",
"0.6654923",
"0.6624632",
"0.661221",
"0.660219",
"0.65798897",
"0.65624106",
"0.656228",
"0.6533695",
"0.6523716",
"0.6457363",
"0.645123",
... | 0.67529064 | 6 |
Serializes a test (which can either be a TestCaselike or an ErrorHolder) for safe transport via a Queue. ErrorHolder (if actual test setup failed, not anything during test run) is special cased because it's a dynamic class and isn't quite the same as normal tests. | def Napc(QOe9):
if isinstance(QOe9, URqJ):
return (QOe9.id(), str(QOe9), QOe9.shortDescription())
return (jQ8c(QOe9), str(QOe9), QOe9.shortDescription()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IStA(sX1J: Dict, YXxD: str):\n try:\n qQXR.dumps(sX1J)\n return sX1J\n except (TypeError, OverflowError) as e:\n raise xOZa(YXxD) from tTpl",
"def MeKD(YKHO, _sei):\n xDur = {'fields': {'date_debut_tests': YKHO.date_debut_tests, 'nom': YKHO.test, 'slug': YKHO.test_slug, 'nbr_mes... | [
"0.5698485",
"0.56511474",
"0.5395437",
"0.5339142",
"0.52910805",
"0.5284872",
"0.52673876",
"0.52437097",
"0.52122897",
"0.5183626",
"0.51726127",
"0.51519734",
"0.51325506",
"0.5113133",
"0.5091628",
"0.50809115",
"0.5049111",
"0.5035729",
"0.50247747",
"0.50108904",
"0.50... | 0.535621 | 3 |
Generate mask for padded tokens | def b7De(Fbjb: torch.Tensor, BcCR: Optional[Union[torch.Tensor, int]]=None) -> ht2j.Tensor:
if BcCR is None or BcCR < 0:
BcCR = YWvJ(int, ht2j.max(Fbjb).item())
BcCR = YWvJ(int, BcCR)
or8S = ht2j.arange(0, BcCR, device=Fbjb.device).unsqueeze(0)
ZHfW: ht2j.Tensor = (or8S < Fbjb.unsqueeze(1)).floa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _Swr(GzLF, ZHfW):\n PuKl = b0j5.tokenize(GzLF)\n print('Masking token: {} at index {}'.format(PuKl[ZHfW], ZHfW))\n PuKl[ZHfW] = '[MASK]'\n print('Tokenized and masked text is: ', PuKl)\n PgPo = b0j5.convert_tokens_to_ids(PuKl)\n return ht2j.tensor([PgPo])",
"def Df2Q(YKHO, eOtH):\n retur... | [
"0.7258762",
"0.7173143",
"0.7003928",
"0.666571",
"0.66433215",
"0.663188",
"0.6460186",
"0.6450041",
"0.64396197",
"0.6361314",
"0.63312995",
"0.62725127",
"0.62072515",
"0.6193755",
"0.61903334",
"0.6190118",
"0.6147007",
"0.61139905",
"0.61015546",
"0.60999525",
"0.609505... | 0.0 | -1 |
r"""Pad a list of variable length Tensors with ``padding_value`` ``pad_sequence`` stacks a list of Tensors along a new dimension, and pads them to equal length. For example, if the input is list of sequences with size ``L x `` and if batch_first is False, and ``T x B x `` otherwise. `B` is batch size. It is equal to th... | def gc7n(jWe2: List[torch.Tensor], tNZn: bool=False, fRI8: Union[float, int]=0.0, BcCR: int=-1):
E0wO = jWe2[0].size()
KJ8h = E0wO[1:]
if BcCR < 0:
wzH_ = max([KCHu.size(0) for KCHu in jWe2])
else:
wzH_ = BcCR
if tNZn:
E2dU = (len(jWe2), wzH_) + KJ8h
else:
E2dU = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gc7n(jWe2, fRI8=0, Gcmf=None):\n E0wO = jWe2[0].shape\n KJ8h = E0wO[1:]\n wzH_ = max([KCHu.shape[0] for KCHu in jWe2])\n if Gcmf is not None:\n assert Gcmf >= wzH_, 'fix_len is too small.'\n wzH_ = Gcmf\n E2dU = (len(jWe2), wzH_) + KJ8h\n ygSi = oyIN.full(E2dU, fRI8, dtype=jWe2[... | [
"0.8385939",
"0.8226611",
"0.76983243",
"0.76494443",
"0.7632147",
"0.7511662",
"0.7417255",
"0.73716116",
"0.7273298",
"0.7251256",
"0.72294617",
"0.71863496",
"0.71653557",
"0.7144002",
"0.70914423",
"0.7044454",
"0.7038569",
"0.70025116",
"0.7000442",
"0.6935803",
"0.69202... | 0.84245896 | 0 |
Construct a KD Tree node containing 'data'. The left, right, and prev attributes are set in the constructor of BSTNode. | def FIMM(YKHO, nPrm):
if type(nPrm) is oyIN.ndarray:
rvhu.__init__(YKHO, nPrm)
YKHO.axis = 0
else:
raise TypeError('Data not NP array') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, H5ew, nPrm=None, LFlW=None, _tIi=None, _AKB=None):\n \"\"\"Takes a key and other, optional arguments.\n Returns a new TreeNode class.\"\"\"\n YKHO.key = H5ew\n YKHO.data = nPrm\n YKHO.left = LFlW\n YKHO.right = _tIi\n YKHO.parent = _AKB",
"def FIMM(YKHO, nPrm):\n YKHO.r... | [
"0.7312704",
"0.7204276",
"0.69680333",
"0.6936027",
"0.6908925",
"0.6839075",
"0.6839075",
"0.6839075",
"0.6839075",
"0.68390733",
"0.68360513",
"0.6791919",
"0.6791919",
"0.674163",
"0.674163",
"0.6737709",
"0.67332953",
"0.66400653",
"0.66400653",
"0.6492366",
"0.64760935"... | 0.65482074 | 19 |
Returns the number of steps made in each epoch, that is the number of batches. | def szAg(YKHO):
return oyIN.ceil(YKHO.n_samples * 340 / float(YKHO.batch_size)).astype(oyIN.int) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NGZp(YKHO) -> int:\n return int(oyIN.floor(YKHO.size() / YKHO.batch_size))",
"def AIZ9(YKHO) -> int:\n return YKHO.num_examples // YKHO.global_batch_size",
"def NGZp(YKHO):\n RV39 = 0\n for oMqC in YKHO.train_data:\n RV39 += len(YKHO.train_data[oMqC])\n return RV39 // YKHO.batch_size"... | [
"0.8744251",
"0.8734571",
"0.86757696",
"0.84846234",
"0.8003721",
"0.79892075",
"0.7969324",
"0.77836984",
"0.7732607",
"0.7703443",
"0.7687923",
"0.76780516",
"0.7673358",
"0.75997823",
"0.75858784",
"0.75858784",
"0.757544",
"0.75543374",
"0.75435454",
"0.75427514",
"0.754... | 0.0 | -1 |
Generates a matrix with random indexes of samples used in each epoch. | def lUBY(YKHO):
FcZK = oyIN.repeat(oyIN.arange(340), YKHO.n_samples)
NGO5 = oyIN.tile(oyIN.random.choice(oyIN.arange(YKHO.n_max_samples), size=YKHO.n_samples, replace=False), len(YKHO.word_encoder.classes_))
YKHO.indexes = oyIN.transpose(oyIN.array([FcZK, NGO5]))
print('Indexes array shape: ', YKHO.inde... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k2Hs(YKHO):\n YKHO.indices = oyIN.arange(YKHO.samples)\n if YKHO.shuffle:\n tuKI.shuffle(YKHO.indices)",
"def RFg8(exwG):\n oyIN.random.seed(0)\n return oyIN.reshape(oyIN.random.uniform(0, 10, exwG), (exwG, 1))",
"def _HBJ(YKHO):\n return oyIN.random.randint(0, YKHO.n_training_rows)",... | [
"0.6992548",
"0.6615757",
"0.65839434",
"0.65251154",
"0.64636457",
"0.64567953",
"0.64375573",
"0.64375573",
"0.64304787",
"0.64248973",
"0.6416989",
"0.6403258",
"0.63837904",
"0.63766557",
"0.6330923",
"0.63127995",
"0.629386",
"0.62930197",
"0.6268964",
"0.6238934",
"0.62... | 0.0 | -1 |
The dtype of the underlying data. | def yDqo(YKHO):
if YKHO.keys():
try:
return YKHO._data[next(iter(YKHO.keys()))].dtype
except AttributeError:
return None
else:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yDqo(YKHO):\n return YKHO._data.dtype",
"def yDqo(YKHO):\n return YKHO.data.dtype",
"def yDqo(YKHO):\n return YKHO.data.dtype",
"def yDqo(YKHO):\n return YKHO.data.dtype",
"def yDqo(YKHO):\n return YKHO.data.dtype",
"def yDqo(YKHO):\n return YKHO._data.dtype",
"def yDqo(YKHO):\n ... | [
"0.9094834",
"0.9068356",
"0.9068356",
"0.9068356",
"0.9068356",
"0.90524393",
"0.8861747",
"0.8818063",
"0.88019663",
"0.87758106",
"0.87758106",
"0.87758106",
"0.87758106",
"0.87758106",
"0.87758106",
"0.87758106",
"0.87758106",
"0.87226385",
"0.87103295",
"0.8689031",
"0.8... | 0.8177776 | 49 |
Method that attempts to locate a player by index in the provided board. | def wCjj(oyg0, l1V2):
for WKvO in l1V2.players:
if WKvO.id == oyg0:
return WKvO
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def h7le(YKHO, VmPb):\n for XP5J in YKHO.all_players:\n if XP5J.position == VmPb:\n return XP5J\n return None",
"def h7le(YKHO, rdlD, fvDH):\n if rdlD not in range(AR1b) or fvDH not in range(KPrA):\n raise IndexError\n else:\n W0Eb = (rdlD, fvDH)\n hGN5 = YKHO.g... | [
"0.69317377",
"0.6919422",
"0.6765395",
"0.66998535",
"0.66086024",
"0.6607875",
"0.6561308",
"0.6507985",
"0.64598286",
"0.64163876",
"0.64037436",
"0.63751686",
"0.63694",
"0.6358293",
"0.63551515",
"0.6305183",
"0.6281591",
"0.6272114",
"0.62175167",
"0.6216952",
"0.620822... | 0.7205037 | 0 |
compute average cumulative reward | def TlwK(nfqd):
return oyIN.mean(oyIN.cumsum(nfqd['reward'], axis=1), axis=0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AffK(YKHO):\n vOGg = 0\n B7KL = 0\n for XA7I in YKHO._buffer:\n vOGg += XA7I.reward[0]\n if XA7I.done:\n B7KL += 1\n return vOGg / B7KL",
"def X4i2(YKHO):\n return oyIN.sum(YKHO._reward_history)",
"def HjES(nfqd):\n return oyIN.mean(oyIN.cumsum(nfqd['expected_best... | [
"0.7691269",
"0.76463044",
"0.762892",
"0.7467458",
"0.7294205",
"0.7245672",
"0.7227364",
"0.7210144",
"0.71672106",
"0.71617216",
"0.7137535",
"0.71180856",
"0.71180856",
"0.70944166",
"0.7087347",
"0.7062948",
"0.70374495",
"0.70374495",
"0.70336634",
"0.70336634",
"0.7031... | 0.79847 | 0 |
compute average cumulative regret | def HjES(nfqd):
return oyIN.mean(oyIN.cumsum(nfqd['expected_best_reward'] - nfqd['expected_reward'], axis=1), axis=0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ODv1(nPrm):\n Aofo = oyIN.zeros(nPrm[0].shape, oyIN.float64)\n for ygCM in nPrm:\n Aofo += ygCM\n Aofo /= len(nPrm)\n return Aofo",
"def TlwK(nfqd):\n return oyIN.mean(oyIN.cumsum(nfqd['reward'], axis=1), axis=0)",
"def Dmjw(YKHO):\n return sum(YKHO.data, 0.0) / len(YKHO.data)",
... | [
"0.6564873",
"0.64585227",
"0.6443543",
"0.63591343",
"0.627203",
"0.627203",
"0.62557423",
"0.61809176",
"0.61809176",
"0.6174826",
"0.6171009",
"0.61371714",
"0.6132306",
"0.61282927",
"0.6111531",
"0.6101868",
"0.6098121",
"0.60918444",
"0.6086645",
"0.6081102",
"0.607759"... | 0.7376952 | 0 |
compute average cumulative regret | def dPDB(nfqd):
return oyIN.sum(nfqd['expected_best_reward'] == nfqd['expected_reward'], axis=1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HjES(nfqd):\n return oyIN.mean(oyIN.cumsum(nfqd['expected_best_reward'] - nfqd['expected_reward'], axis=1), axis=0)",
"def ODv1(nPrm):\n Aofo = oyIN.zeros(nPrm[0].shape, oyIN.float64)\n for ygCM in nPrm:\n Aofo += ygCM\n Aofo /= len(nPrm)\n return Aofo",
"def TlwK(nfqd):\n return o... | [
"0.7376108",
"0.6568371",
"0.6460519",
"0.64480317",
"0.63612103",
"0.62756073",
"0.62756073",
"0.62555933",
"0.61834747",
"0.61834747",
"0.6175016",
"0.6172162",
"0.6141269",
"0.6135297",
"0.6130844",
"0.6114246",
"0.61063695",
"0.60973525",
"0.60918856",
"0.6089994",
"0.608... | 0.0 | -1 |
The beta scheduling. By default, Equation 26 in the paper. | def Hwgj(YKHO, a1PO):
UqYS = YKHO.k * a1PO
assert UqYS >= 0, 'Error, beta={}, k={}, t={}'.format(UqYS, YKHO.k, a1PO)
return UqYS | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C19L(s2nd, a5P2):\n if s2nd == 'linear':\n NXpY = 1000 / a5P2\n nbe7 = NXpY * 0.0001\n ZUBf = NXpY * 0.02\n return oyIN.linspace(nbe7, ZUBf, a5P2, dtype=oyIN.float64)\n elif s2nd == 'cosine':\n return EXLb(a5P2, lambda a1PO: epAf.cos((a1PO + 0.008) / 1.008 * epAf.pi / 2... | [
"0.7085717",
"0.67100626",
"0.6633296",
"0.6428732",
"0.6428499",
"0.6415889",
"0.63725686",
"0.6368476",
"0.6324071",
"0.6309019",
"0.62878615",
"0.62843984",
"0.62380624",
"0.6229141",
"0.6225955",
"0.6177893",
"0.61701816",
"0.61456585",
"0.6141012",
"0.6141012",
"0.614101... | 0.7945098 | 0 |
Checks if sudoku is solved. | def X9no(hkxX):
for FlUN in oUSw:
if len(hkxX[FlUN]) != 1:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z9jS(YKHO):\n XW8I = []\n Cs6h = []\n for YRbF in range(0, YKHO.row):\n NHWF = []\n ycBG = []\n for r845 in range(0, YKHO.col):\n ycBG.append(YKHO.cubes[r845][YRbF].val)\n if YKHO.cubes[r845][YRbF].is_grid:\n NHWF.append(YKHO.cubes[r845][YRbF].... | [
"0.81637275",
"0.7848667",
"0.7792255",
"0.77586645",
"0.7720348",
"0.7707768",
"0.7701344",
"0.7701344",
"0.7683963",
"0.76632386",
"0.7659643",
"0.7633979",
"0.7613034",
"0.7595587",
"0.7577832",
"0.7550137",
"0.75196826",
"0.74773663",
"0.74639857",
"0.7461699",
"0.7455007... | 0.0 | -1 |
Returns a localebased representation of the current time | def vHj7():
return qcWV.datetime.now().strftime('%I:%M:%S %p') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V2LE():\n return vHj7",
"def CORV() -> str:\n rIAI = FXGE.timezone(gCuF.timezone)\n return qcWV.now().astimezone(rIAI).strftime(gCuF.dateformat)",
"def fTxZ():\n PYuG = qcWV.utcnow()\n return QMSQ(PYuG.strftime('%Y%m%d%H%M%S'))",
"def fz29():\n return ITS7.strftime('%Y-%m-%d %H:%M:%S', ... | [
"0.804562",
"0.7857571",
"0.76877177",
"0.7678569",
"0.745312",
"0.7402408",
"0.73742753",
"0.7372343",
"0.7360123",
"0.73219806",
"0.7268815",
"0.7253139",
"0.71759474",
"0.71591836",
"0.71583307",
"0.71230185",
"0.70996124",
"0.70783293",
"0.7073242",
"0.70582974",
"0.70490... | 0.73832077 | 6 |
image_ = tf.placeholder(tf.float32, [None, n_input],name='imageinput') image = tf.reshape(image_, shape=[1, 224, 224, 3]) label_gender_encode = tf.placeholder(tf.int32, [None, 2], name='label_genderinput') inputs, labels = tf.train.batch([image, label_gender_encode], batch_size=8, allow_smaller_final_batch=True) | def b8V_(bGrB):
pu8V, VIpq, _Zf2 = bBrk(qclk)
eRUX = 'train.tfrecords'
Iltr = 'test.tfrecords'
ypox = ZylS.python_io.TFRecordWriter(eRUX)
qYTu = ZylS.python_io.TFRecordWriter(Iltr)
tniU = 0
SGza = 0
oSVZ = 0
for pmON, l7HH, ptat in zip(pu8V, VIpq, _Zf2):
tniU += 1
pri... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i6iB(Ep8u):\n Cqbr = ZylS.placeholder(ZylS.float32, shape=[None, H2v2 * TVTK])\n eqSH = ZylS.placeholder(ZylS.int32)\n return (Cqbr, eqSH)",
"def i6iB(Ep8u, N0ky):\n lNai = (N0ky, N0ky, 3)\n Cqbr = ZylS.placeholder(ZylS.float32, shape=(Ep8u,) + lNai)\n eqSH = ZylS.placeholder(ZylS.int32, sh... | [
"0.7482144",
"0.73499715",
"0.7172111",
"0.7172111",
"0.70579463",
"0.70532197",
"0.700828",
"0.7000249",
"0.6896016",
"0.689328",
"0.686814",
"0.686043",
"0.68531966",
"0.68235016",
"0.68196785",
"0.6779444",
"0.6774766",
"0.676914",
"0.67211974",
"0.6697523",
"0.6624905",
... | 0.6353314 | 52 |
Return trained model based on path and classes. | def YrZb(pmON, KndY):
C3ST = TTda.models.resnet50(pretrained=False)
C3ST.fc = ht2j.nn.Linear(C3ST.fc.in_features, len(KndY))
C3ST.load_state_dict(ht2j.load(pmON, map_location='cpu'))
return C3ST | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MivK(pmON: Path):\n assert pmON.is_dir(), f'Cannot load from non-existent directory {pmON}'\n return ZylS.keras.models.load_model(str(pmON))",
"def IMdJ(uqvc):\n C3ST = uyMl(uqvc)\n return C3ST",
"def uyMl(ZGE9, mL4f=False, Cwt5=1.0, ey7p=1, hr1G=0.001, ao6X=True, FRUf=None, GhuM=None, wDQ7=Non... | [
"0.7374345",
"0.716409",
"0.7070163",
"0.70407146",
"0.7030516",
"0.7007828",
"0.69459033",
"0.69285303",
"0.6915142",
"0.688474",
"0.6884215",
"0.6884215",
"0.6884215",
"0.68727547",
"0.68676084",
"0.68540454",
"0.68535084",
"0.6852539",
"0.68345183",
"0.6824736",
"0.6789758... | 0.7559566 | 0 |
Using fold to perform Filter operation (filter only even terms) ```console ([])is_even1=[] (([])is_even1)is_even2=[2] ((([])is_even1)is_even2)is_even3=[2] fold([1, 2, 3],is_even,[])=[2] ``` | def u0eT():
XmOX = lambda WKvO, LVAh: WKvO + [LVAh] if LVAh % 2 == 0 else WKvO
XmOX.__name__ = 'is_even'
WKvO: x1iM[int] = [YRbF for YRbF in range(1, 4)]
nJ9F: x1iM = []
Ylbp = YhDe(WKvO, XmOX, nJ9F, debug=True)
print(f'fold({WKvO},{XmOX.__name__},{nJ9F})={Ylbp}') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NGO0(mSrU):\n MfeY = [mLGw for mLGw in mSrU if mLGw > 0 and mLGw % 2 == 0]\n return MfeY\n pass",
"def BESa():\n zznG = [48, 89, 56, 88, 31]\n kjNI = Pusg(lambda jzdc, Fg_i: jzdc + Fg_i if not Fg_i % 2 else jzdc, zznG, 0)\n assert kjNI == 192, 'Function to add only even numbers of a list is... | [
"0.638384",
"0.6338082",
"0.62498295",
"0.61350197",
"0.60656846",
"0.5798985",
"0.57987845",
"0.57675236",
"0.57513654",
"0.5695315",
"0.5673444",
"0.56681186",
"0.56681186",
"0.56588835",
"0.5656804",
"0.559819",
"0.5576691",
"0.55589354",
"0.5525878",
"0.552526",
"0.552304... | 0.7647997 | 0 |
Return True if hostname or IP address is valid. | def LuRQ(KcEq):
try:
if SwOd.ip_address(KcEq).version == (4 or 6):
return True
except ValueError:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _DZo(KcEq: str) -> bool:\n if dDBF(KcEq):\n return True\n if _FIc.domain(KcEq):\n return True\n if _FIc.ipv4(KcEq):\n return True\n raise ValueError(f'Invalid host {KcEq}')",
"def VMrU(ayrW: str) -> bool:\n return evKH(ayrW)",
"def dsLQ(I33c: str) -> bool:\n try:\n ... | [
"0.77838176",
"0.7722837",
"0.76368624",
"0.7633581",
"0.76214457",
"0.7489008",
"0.7485807",
"0.7467084",
"0.74552095",
"0.7440883",
"0.7421532",
"0.74119157",
"0.73738915",
"0.7353367",
"0.73429334",
"0.7324916",
"0.7288011",
"0.7286663",
"0.7264146",
"0.7261962",
"0.723979... | 0.75833976 | 5 |
Returns CCD Y centroid of spectrum[ispec] evaluated at iflux or loglam. If y is not None, just return y (useful when passing y, iflux, and loglam without needing to check which one is not None). If only ispec is given, return Y array for every flux bin of ispec. | def LVAh(YKHO, uVI6=None, Uo6X=None, qd8A=None, LVAh=None):
if LVAh is not None:
return LVAh
else:
return YKHO.eval_param('Y', ispec=uVI6, iflux=Uo6X, loglam=qd8A, y=LVAh) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def L3TA(YKHO):\n from scipy import ndimage\n return ndimage.measurements.center_of_mass(YKHO.calib)[1]",
"def tMxI(uv09, LVAh):\n I4GZ = oyIN.concatenate((oyIN.transpose([LVAh]), uv09), axis=1)\n mDbS = TFGU(I4GZ, True)\n tDJX = oyIN.where(mDbS[:, 0] == 1)\n return tDJX",
"def ID8u(YKHO):\n ... | [
"0.55699164",
"0.5320295",
"0.5267009",
"0.52391756",
"0.5178343",
"0.51223034",
"0.50962085",
"0.50261265",
"0.50068",
"0.5002385",
"0.49852166",
"0.49840504",
"0.4978431",
"0.49745283",
"0.4934483",
"0.49194586",
"0.4897393",
"0.48897004",
"0.48859856",
"0.48623854",
"0.486... | 0.5848112 | 0 |
Displays the index page accessible at '/' | def d6pt():
return TvZl('index.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d6pt():\n return TvZl('index.html', url=QePW.url)",
"def d6pt():\n return TvZl('index.html')",
"def d6pt():\n G9jH.info('On index page')\n return TvZl('index.html')",
"def d6pt():\n return TvZl('index.html')",
"def d6pt():\n return TvZl('index.html')",
"def d6pt():\n return TvZl(... | [
"0.86042184",
"0.8584791",
"0.8583762",
"0.85747325",
"0.8549182",
"0.85299975",
"0.8522783",
"0.85179675",
"0.85179675",
"0.85179675",
"0.85179675",
"0.85179675",
"0.85179675",
"0.8511824",
"0.84988546",
"0.84735423",
"0.8429009",
"0.8419053",
"0.8400243",
"0.8400243",
"0.84... | 0.86039484 | 1 |
The json response for a given resource_id should be cached until invalidated. | def gHC4(YKHO):
class CountURIAccess(qwF2):
UHFx = 0
def wmJ6(YKHO, j8eK):
YKHO.count += 1
return super(r4E3, YKHO)._urlopen_read(j8eK)
wyyA.clear()
DDLl = r4E3()
Q1PJ = DDLl.serve(YKHO.resource)
Q1PJ = DDLl.serve(YKHO.resource)
YKHO.assertEqual(DDLl.cou... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XThR(YKHO, PcW4):\n geh0 = Eofk(action_name='get_resource')\n Kbv9 = YKHO.get_resource_raw(resource_id=PcW4)\n if Kbv9 is None:\n geh0.set_data(action_message=vijt.ERR_RESOURCE_NOT_FOUND, action_data={vijt.KEY_ACTION_DATA_DETAIL: 'resource not found for given identifier'})\n return geh0.... | [
"0.635068",
"0.6072487",
"0.5942261",
"0.5922576",
"0.5840527",
"0.58100337",
"0.5809344",
"0.57229763",
"0.57173073",
"0.57057184",
"0.56899405",
"0.56833196",
"0.5670696",
"0.5629385",
"0.56194586",
"0.5587551",
"0.55848455",
"0.5542527",
"0.55219114",
"0.55098456",
"0.5495... | 0.56277037 | 14 |
The json response for a given resource_id should be cached until invalidated. | def c3i5(YKHO):
class CountURIAccess(qwF2):
UHFx = 0
def wmJ6(YKHO, j8eK):
YKHO.count += 1
return super(r4E3, YKHO)._urlopen_read(j8eK)
wyyA.clear()
DDLl = r4E3()
Q1PJ = DDLl.serve(YKHO.resource)
Q1PJ = DDLl.serve(YKHO.resource)
YKHO.resource.title = YKH... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XThR(YKHO, PcW4):\n geh0 = Eofk(action_name='get_resource')\n Kbv9 = YKHO.get_resource_raw(resource_id=PcW4)\n if Kbv9 is None:\n geh0.set_data(action_message=vijt.ERR_RESOURCE_NOT_FOUND, action_data={vijt.KEY_ACTION_DATA_DETAIL: 'resource not found for given identifier'})\n return geh0.... | [
"0.6350682",
"0.60725003",
"0.5942298",
"0.592254",
"0.5840544",
"0.58100605",
"0.580939",
"0.57229286",
"0.5717353",
"0.5705759",
"0.5689905",
"0.56834185",
"0.56707025",
"0.562933",
"0.562773",
"0.5619492",
"0.5587534",
"0.55848104",
"0.5542534",
"0.55219066",
"0.5509952",
... | 0.0 | -1 |
Test that the admin generic stacked inline correctly relates the video. | def iZg9(YKHO):
MC83 = YKHO.client.login(username='admin', password='admin')
YKHO.assertTrue(MC83)
geh0 = YKHO.client.post('/admin/tests/famousperson/add/', YKHO.post_data)
YKHO.assert_(geh0.status_code in [200, 302])
geh0 = YKHO.client.get('/blip/2')
YKHO.assertContains(geh0, '<embed src="http:... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IytE(YKHO):\n y0cW = 'generic_inline_admin-media-content_type-object_id'\n aqR5 = {'name': 'This Week in Django', f'{y0cW}-TOTAL_FORMS': '3', f'{y0cW}-INITIAL_FORMS': '2', f'{y0cW}-MAX_NUM_FORMS': '0', f'{y0cW}-0-id': str(YKHO.mp3_media_pk), f'{y0cW}-0-url': 'http://example.com/podcast.mp3', f'{y0cW}-1-i... | [
"0.6836371",
"0.6812681",
"0.64722824",
"0.63937485",
"0.63462204",
"0.62070847",
"0.6150437",
"0.6048235",
"0.60424715",
"0.60143185",
"0.59482044",
"0.59376276",
"0.59272635",
"0.5905077",
"0.5876647",
"0.5871865",
"0.58492893",
"0.58058834",
"0.57173365",
"0.57085806",
"0.... | 0.69008213 | 0 |
Creates polygons from a source of lines The source may be a MultiLineString, a sequence of LineString objects, or a sequence of objects than can be adapted to LineStrings. | def TNqH(YKHO, Nqlg):
JZXy = getattr(Nqlg, 'geoms', None) or Nqlg
try:
JZXy = iter(JZXy)
except TypeError:
JZXy = [JZXy]
finally:
W061 = [YKHO.shapeup(vC9B) for vC9B in JZXy]
rgVl = ojiJ * len(W061)
AkHG = rgVl()
for YRbF, zFiD in enumerate(W061):
AkHG[YRbF] =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TNqH(YKHO, Nqlg):\n JZXy = getattr(Nqlg, 'geoms', None) or Nqlg\n W061 = [YKHO.shapeup(vC9B) for vC9B in JZXy]\n rgVl = ojiJ * len(W061)\n AkHG = rgVl()\n for YRbF, zFiD in enumerate(W061):\n AkHG[YRbF] = zFiD._geom\n Lx3t = cSFl.GEOSPolygonize(dWW6(AkHG), len(W061))\n xUwc = qko0(L... | [
"0.76073056",
"0.6857735",
"0.6718825",
"0.65556926",
"0.64481294",
"0.6326704",
"0.6312273",
"0.61482745",
"0.6051162",
"0.6042105",
"0.6041162",
"0.6041162",
"0.60363823",
"0.5877628",
"0.55617076",
"0.5557169",
"0.5474001",
"0.54629755",
"0.5459608",
"0.54410547",
"0.54347... | 0.7599797 | 1 |
Creates polygons from a source of lines, returning the polygons and leftover geometries. The source may be a MultiLineString, a sequence of LineString objects, or a sequence of objects than can be adapted to LineStrings. | def vDwW(YKHO, Nqlg):
JZXy = getattr(Nqlg, 'geoms', None) or Nqlg
try:
JZXy = iter(JZXy)
except TypeError:
JZXy = [JZXy]
finally:
W061 = [YKHO.shapeup(vC9B) for vC9B in JZXy]
aPd6 = len(W061)
zbDt = (ojiJ * aPd6)()
for YRbF, Oa1e in enumerate(W061):
zbDt[YRbF]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TNqH(YKHO, Nqlg):\n JZXy = getattr(Nqlg, 'geoms', None) or Nqlg\n W061 = [YKHO.shapeup(vC9B) for vC9B in JZXy]\n rgVl = ojiJ * len(W061)\n AkHG = rgVl()\n for YRbF, zFiD in enumerate(W061):\n AkHG[YRbF] = zFiD._geom\n Lx3t = cSFl.GEOSPolygonize(dWW6(AkHG), len(W061))\n xUwc = qko0(L... | [
"0.7552487",
"0.7546391",
"0.69026566",
"0.6857544",
"0.6283259",
"0.6207859",
"0.6206777",
"0.61460996",
"0.61158776",
"0.6063631",
"0.5782578",
"0.5782578",
"0.56740195",
"0.5641953",
"0.553794",
"0.55168855",
"0.54827124",
"0.5402772",
"0.53864455",
"0.5343347",
"0.5342282... | 0.7050988 | 2 |
Likelihood assumes flux follow a Gaussian Returns | def WmvO(YKHO, Cwt5):
XOVF = 0
for QbEi in GPtr.ion_names:
if QbEi != 'h1':
jdyD = TGf6.model_prediction(Cwt5, QbEi)
GPtr.log_pdf[QbEi](jdyD)
XOVF += GPtr.log_pdf[QbEi](jdyD)
return XOVF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def exa2(WKvO, yGTL, XO02):\n return 0.5 - 0.5 * y5U5.erf((WKvO - yGTL) / ((0.5 * XO02).exp() * oyIN.sqrt(2)))",
"def ufxv(WKvO, JBMS, WTkW, caa_, vgXP):\n LVAh = IAWS(WKvO, JBMS, WTkW, caa_, vgXP)\n return LVAh",
"def IAWS(WKvO, nJ9F, WTkW):\n return oyIN.exp(-((WKvO - nJ9F) / WTkW) ** 2 / 2.0)",
... | [
"0.7315141",
"0.72646576",
"0.7218827",
"0.7213931",
"0.7213931",
"0.72083974",
"0.71953946",
"0.7193477",
"0.7161614",
"0.71604407",
"0.7153475",
"0.71430635",
"0.71395886",
"0.7137388",
"0.709316",
"0.7081635",
"0.707902",
"0.7043497",
"0.7038913",
"0.703634",
"0.70145434",... | 0.0 | -1 |
Sets `_browser` to the mocked browser to allow mocking the original splinter behavior, in order to test. It's just a util function. | def OMWp(YKHO, gcau):
E_qD = HJBu()
E_qD._browser = gcau
return E_qD | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SYsl(YKHO, SYsl):\n YKHO._browser = SYsl",
"def UHFF(YKHO):\n if not P97L:\n print('SUBSTITUTING BROWSER')\n YKHO.browser.browser = CFMy(name='Browser()')",
"def eRDc(YKHO, SYsl):\n YKHO.options['browser'] = SYsl\n return YKHO",
"def FCbF(YKHO):\n YKHO.browser = YqyH()",
"d... | [
"0.7059",
"0.6985377",
"0.67243737",
"0.65203655",
"0.63511115",
"0.63324183",
"0.6299355",
"0.61695975",
"0.6085243",
"0.60632235",
"0.5940202",
"0.5926773",
"0.59221417",
"0.58996636",
"0.58996636",
"0.58996636",
"0.58996636",
"0.58996636",
"0.58996636",
"0.58996636",
"0.58... | 0.77505296 | 0 |
Gets the task_instances of this TaskInstanceCollection. | def nUqe(YKHO):
return YKHO._task_instances | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xCjU(YKHO):\n return YKHO._tasks",
"def xCjU(YKHO):\n return YKHO._tasks",
"def xCjU(YKHO):\n return YKHO._tasks",
"def xCjU(YKHO):\n return YKHO._tasks",
"def DA2O(YKHO):\n return YKHO._tasks_on_proc",
"def xCjU(YKHO):\n return YKHO.__tasks",
"def bUWH(YKHO) -> x1iM[Kt_s]:\n r... | [
"0.7359882",
"0.7359882",
"0.7359882",
"0.7359882",
"0.7281088",
"0.72767675",
"0.7211406",
"0.72037923",
"0.7187549",
"0.7036746",
"0.7019498",
"0.70148516",
"0.6966349",
"0.6923751",
"0.68742764",
"0.68593717",
"0.68199295",
"0.6787428",
"0.67655957",
"0.6745907",
"0.669984... | 0.898395 | 0 |
The bitstring of a Bra. | def BB68(YKHO):
return list(YKHO._digits) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Oe7j(KOks):\n STnt = ''\n for YRbF in reversed(KOks.cell):\n STnt += '1' if YRbF else '0'\n return STnt",
"def qRSH(YKHO, YB8B):\n UOVU = ''\n for YRbF in range(8):\n if YB8B[0] >> YRbF & 1:\n UOVU += '1'\n else:\n UOVU += '0'\n return UOVU",
"de... | [
"0.6787061",
"0.67623705",
"0.6521447",
"0.64490044",
"0.64459836",
"0.6431783",
"0.64265966",
"0.63563764",
"0.6307037",
"0.620405",
"0.62020624",
"0.6181816",
"0.6148941",
"0.61251825",
"0.6046606",
"0.6041464",
"0.60205823",
"0.6008517",
"0.60080284",
"0.599857",
"0.594287... | 0.5957481 | 21 |
Returns a 0qubit quantum gate that scales by a square root. | def PZyS(VN2L):
return cLkO(VN2L) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c98M(YKHO):\n EcVT = YKHO._input_nodes[0]._value\n return EcVT ** 2",
"def iH0u(WKvO):\n return WKvO ** (PCpl.real(1) / PCpl.real(2))",
"def D8al(WKvO):\n LVAh = vBWh(WKvO.shape, -0.5, WKvO.dtype)\n return pow(WKvO, LVAh)",
"def Xzsc(YKHO):\n return YKHO * YKHO",
"def PZyS(YKHO):\n ... | [
"0.6058123",
"0.60196793",
"0.5970419",
"0.5946572",
"0.5918022",
"0.5914779",
"0.59130496",
"0.5881545",
"0.5761194",
"0.5713667",
"0.57091117",
"0.5707423",
"0.5691127",
"0.5680686",
"0.5658767",
"0.56544596",
"0.5642073",
"0.56414616",
"0.5615282",
"0.5601015",
"0.5592552"... | 0.5531004 | 23 |