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 |
|---|---|---|---|---|---|---|
Get the credentials from secrets manager | def OZbX(H5ew):
cuiw = iVGz.session.Session()
x0hE = cuiw.client(service_name='secretsmanager', region_name='us-east-1')
ljay = x0hE.get_secret_value(SecretId=H5ew)
return ljay | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TNQQ():\n VUF1 = kF3y('credentials.json')\n GoZD = VUF1.get()\n if not GoZD or GoZD.invalid:\n _uqo = x0hE.flow_from_clientsecrets('client_secret.json', nUMN)\n GoZD = bWeC.run_flow(_uqo, VUF1)\n return GoZD",
"def TNQQ():\n appV = Hy7s.path.join('.', '.credentials')\n if not ... | [
"0.7586094",
"0.75485337",
"0.7545506",
"0.7533716",
"0.7491286",
"0.74582946",
"0.74390316",
"0.7429053",
"0.7372254",
"0.73122746",
"0.7304671",
"0.72997344",
"0.7299221",
"0.7268301",
"0.72391075",
"0.72331",
"0.72286385",
"0.72236073",
"0.72135764",
"0.72134984",
"0.72083... | 0.0 | -1 |
Test case for companies_company_id_connections_connection_id_data_commerce_orders_get | def SU1N(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dX1n(YKHO):\n pass",
"def IRRD(YKHO):\n pass",
"def dKkp(YKHO):\n pass",
"def BjUg(YKHO):\n pass",
"def bi6q(YKHO):\n pass",
"def xixn(YKHO):\n pass",
"def xixn(YKHO):\n pass",
"def mKoc(YKHO):\n pass",
"def Cffs(YKHO):\n pass",
"def zYK1(YKHO):\n pass",
"def D... | [
"0.913037",
"0.8309079",
"0.81052816",
"0.7723362",
"0.7350355",
"0.68918985",
"0.68918985",
"0.658655",
"0.64672816",
"0.6199502",
"0.6119675",
"0.60889375",
"0.6072764",
"0.6052015",
"0.60362273",
"0.60078454",
"0.6001532",
"0.59751916",
"0.5967039",
"0.59421635",
"0.594187... | 0.95365185 | 0 |
Returns the master node of the scene, called by the GUI | def kqxe(YKHO):
if YKHO._model is not None:
return YKHO._model._rootNode | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LDIG(YKHO):\n return YKHO._vidget_master",
"def LDIG(YKHO):\n if YKHO._parent.is_widget():\n return YKHO._parent\n else:\n return YKHO._parent.master()",
"def LDIG(YKHO):\n return YKHO['master']",
"def LDIG(YKHO):\n return YKHO['master']",
"def LDIG(YKHO):\n return YKHO[... | [
"0.71792287",
"0.7100001",
"0.70869577",
"0.70869577",
"0.70869577",
"0.70869577",
"0.69590855",
"0.6882482",
"0.68517566",
"0.6845688",
"0.67863655",
"0.67661947",
"0.6755247",
"0.6681439",
"0.65043634",
"0.64799047",
"0.64521515",
"0.64367986",
"0.6371043",
"0.6352373",
"0.... | 0.6058449 | 44 |
Compute dL / dC_pos where C_pos is the context word embedding for the context word of the positive example. | def y9K3(Q0lj: Result, ywmp: Iterable[Result]) -> oyIN.ndarray:
return (Q0lj['probability'] - 1) * Q0lj['target_word_embedding'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVH6(YKHO, input, pJ7d, y6WW):\n nMvt = y6WW.size(0) // input.size(0)\n rWrZ = YKHO.input_embedding(input)\n KVGH = ht2j.cat([rWrZ] * nMvt, dim=0)\n y4BV = YKHO.context_embedding(pJ7d)\n o0ok = YKHO.context_embedding(y6WW)\n WQ_f = (y4BV * rWrZ).sum(dim=1, keepdim=True)\n aPe9 = (o0ok * KV... | [
"0.55097365",
"0.52945346",
"0.5193066",
"0.5148485",
"0.5123199",
"0.51222503",
"0.5117782",
"0.5111358",
"0.51070637",
"0.50991976",
"0.5083133",
"0.5067333",
"0.5055827",
"0.50533855",
"0.50067157",
"0.50033987",
"0.4988587",
"0.49794388",
"0.49784002",
"0.49784002",
"0.49... | 0.55328745 | 0 |
List all container groups in a resource group. | def G3pm(x0hE, TRLE=None):
if TRLE is None:
return x0hE.container_groups.list()
return x0hE.container_groups.list_by_resource_group(TRLE) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _Fmd():\n TRFU = []\n ACO7 = {}\n Az5W = {'Action': 'ListGroups'}\n return crPO(TRFU, ACO7, Az5W)",
"def _Fmd():\n with zVa7() as nNXP:\n A97Q = nNXP.groups().list_groups()\n tyNF = YJgg(['ID', 'Name'], [iWi5] * 2)\n for Oa1e in A97Q[Crrw.GROUP_LIST]:\n tyNF.add([Oa1e[Crrw.... | [
"0.75483567",
"0.75477725",
"0.7295024",
"0.7282393",
"0.7160853",
"0.7038611",
"0.702396",
"0.7009451",
"0.70045567",
"0.6949552",
"0.6919302",
"0.69186467",
"0.6885582",
"0.68717885",
"0.68489635",
"0.6821008",
"0.68196714",
"0.67860353",
"0.678215",
"0.67813236",
"0.677093... | 0.7111634 | 5 |
Creates a color plot with over composition chemical potential | def E6YP(nPrm, gXv_, KbTp):
try:
N7l_ = []
Kt_s = []
hJTo = []
Pd3F = oyIN.inf
LCSx = -oyIN.inf
for H5ew, BWXx in nPrm.iteritems():
if BWXx['mu_c1_0'] < Pd3F:
Pd3F = BWXx['mu_c1_0']
if BWXx['mu_c1_0'] > LCSx:
LCS... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bx_z(YKHO, LZpg, aNZO, zlOD):\n jk7u = UtRw(NArs.xlim, YKHO.vars['lon'])\n rTQi = UtRw(NArs.ylim, YKHO.vars['lat'])\n EcVT = YKHO.vars['lon'].filled()\n fuBA = YKHO.vars['lat'].filled()\n Nk6w = YKHO.vars[NArs.plot_var][zlOD, :, :]\n aNZO = QrM1.subplot(1, 1, 1, projection=gDdM.PlateCarree())... | [
"0.67582697",
"0.6554852",
"0.65268606",
"0.63725114",
"0.6292036",
"0.62753254",
"0.62753254",
"0.6142491",
"0.6099871",
"0.6082009",
"0.6049269",
"0.6044644",
"0.60065997",
"0.59834266",
"0.59739",
"0.5960709",
"0.595297",
"0.594613",
"0.5942945",
"0.5934473",
"0.59209543",... | 0.0 | -1 |
Compute the total number of events given the distribution type and its duration. Subclasses should override this method. The default implementation returns self.numEvents | def G6kI(YKHO):
YKHO.numEvents = None
return | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def G6kI(YKHO):\n YKHO.numEvents = int(YKHO.duration / YKHO.interval)\n return",
"def G6kI(YKHO):\n YKHO.numEvents = int(epAf.log(YKHO.duration) / YKHO.interval)\n return",
"def S7Ob(YKHO) -> int:\n Aofo: int = 0\n for QOe9 in YKHO._tests:\n Aofo += QOe9.events\n return Aofo",
"de... | [
"0.7630493",
"0.75943077",
"0.69339955",
"0.68852574",
"0.6704157",
"0.6618729",
"0.65482926",
"0.6388309",
"0.6382113",
"0.6182099",
"0.6165819",
"0.61558557",
"0.6138653",
"0.61138856",
"0.6106761",
"0.6096237",
"0.6040294",
"0.60115534",
"0.5988124",
"0.5968252",
"0.594580... | 0.6614908 | 6 |
reset the number of served people. | def IACx(YKHO, FGW3):
YKHO.number_served = FGW3 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IACx(YKHO, X259):\n YKHO.number_served = X259\n print('The number of customers served: ' + str(YKHO.number_served))",
"def SiRx(YKHO):\n YKHO.n_partners = 0\n YKHO.partnerships = list()\n YKHO.is_infected = False\n YKHO.disease = None\n YKHO.iDOD = None",
"def Uj_y(YKHO):\n YKHO.cou... | [
"0.69516736",
"0.66255796",
"0.6588202",
"0.6411451",
"0.6403669",
"0.63909715",
"0.6258654",
"0.62311345",
"0.62245274",
"0.6219681",
"0.6196499",
"0.6190062",
"0.6184252",
"0.6183544",
"0.6177752",
"0.61606306",
"0.611218",
"0.610118",
"0.6094368",
"0.6058425",
"0.60512406"... | 0.0 | -1 |
Adds or removes a simple emoji reaction to a given message | async def handle_simple_reaction(YKHO, Ol8d: Message, hGN5: str):
pan_ = await YKHO._get_shortcut_target(Ol8d)
await YKHO._handle_reaction(pan_, hGN5[1], hGN5[0] == '+') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def reaction(YKHO, OaeV, JUOb: Union[discord.Emoji, str]):\n if isinstance(JUOb, ZOrr.Emoji):\n if JUOb.guild_id != OaeV.guild.id:\n await OaeV.send('Custom emojis must be from the same guild the ticket reaction systemis being set up in.')\n return\n NJTi = JUOb\n ... | [
"0.7595721",
"0.7516078",
"0.7275618",
"0.6985048",
"0.6674638",
"0.6616459",
"0.65940505",
"0.6585027",
"0.6537126",
"0.6519994",
"0.64608717",
"0.64487374",
"0.6437323",
"0.64239",
"0.64239",
"0.64101905",
"0.63962406",
"0.6378719",
"0.63508046",
"0.63508046",
"0.63402563",... | 0.6524601 | 9 |
Adds or removes a custom emoji reaction to a given message | async def handle_custom_reaction(YKHO, Ol8d: Message, hGN5: str):
pan_ = await YKHO._get_shortcut_target(Ol8d)
Eg4k = u8t9.fullmatch(hGN5).groupdict()
if (JUOb := YKHO.get_emoji(int(Eg4k['id']))):
pB3N = JUOb
else:
for Uw2J in pan_.reactions:
if Uw2J.emoji.id == int(Eg4k['id'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def reaction(YKHO, OaeV, JUOb: Union[discord.Emoji, str]):\n if isinstance(JUOb, ZOrr.Emoji):\n if JUOb.guild_id != OaeV.guild.id:\n await OaeV.send('Custom emojis must be from the same guild the ticket reaction systemis being set up in.')\n return\n NJTi = JUOb\n ... | [
"0.76877666",
"0.76110977",
"0.7210314",
"0.66970646",
"0.6674284",
"0.6661276",
"0.66567767",
"0.6641529",
"0.6641529",
"0.66210085",
"0.66082036",
"0.66082036",
"0.6583071",
"0.6536713",
"0.6507282",
"0.64920706",
"0.6463461",
"0.6461149",
"0.6457175",
"0.6377737",
"0.63470... | 0.76741195 | 1 |
Takes in a list of tickers and returns a new list where any tickers that aren't in self.allowed_tics are removed | def CtR0(YKHO, xXyj):
if not YKHO.allowed_tics:
return xXyj
else:
piSu = []
for a1PO in xXyj:
if a1PO in YKHO.allowed_tics:
piSu.append(a1PO)
return piSu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QMln(YKHO, xXyj: list):\n if type(xXyj) is list:\n for YRbF in xXyj:\n YKHO.tickers.remove(YRbF)\n elif type(xXyj) is str:\n YKHO.tickers.remove(xXyj)\n YKHO.prices = rLdf.DataFrame(columns=YKHO.tickers)",
"def S6Jz(dQgO=0):\n if dQgO == 0:\n bD7m = 'http://www.net... | [
"0.7343492",
"0.61316466",
"0.6011157",
"0.5843983",
"0.5813229",
"0.58054286",
"0.5779867",
"0.57563126",
"0.5685588",
"0.56836164",
"0.5657266",
"0.5655505",
"0.5618243",
"0.5594413",
"0.5536693",
"0.55252826",
"0.5523699",
"0.54818434",
"0.5469173",
"0.5465081",
"0.5456826... | 0.74393994 | 0 |
This function takes a filename as input, and returns a dataframe with raw data read from that file in a Pandas DataFrame. The DataFrame index should be the year, month and day of the observation. DataFrame headers should be "agency_cd", "site_no", "Date", "Discharge", "Quality". The "Date" column should be used as the ... | def Xjnt(uRP3):
XqVA = ['agency_cd', 'site_no', 'Date', 'Discharge', 'Quality']
rnof = rLdf.read_csv(uRP3, header=1, names=XqVA, delimiter='\\s+', parse_dates=[2], comment='#', na_values=['Eqp'])
rnof = rnof.set_index('Date')
rnof['Discharge'].mask(rnof['Discharge'] < 0, oyIN.nan, inplace=True)
jocF... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Xjnt(uRP3):\n XqVA = ['agency_cd', 'site_no', 'Date', 'Discharge', 'Quality']\n rnof = rLdf.read_csv(uRP3, header=1, names=XqVA, delimiter='\\\\s+', parse_dates=[2], comment='#', na_values=['Eqp'])\n rnof = rnof.set_index('Date')\n rnof.loc[~(rnof['Discharge'] > 0), 'Discharge'] = oyIN.nan\n joc... | [
"0.72314155",
"0.7229401",
"0.6986912",
"0.6966768",
"0.69422865",
"0.693432",
"0.67933667",
"0.6557084",
"0.6431086",
"0.64252126",
"0.64068824",
"0.6399821",
"0.6375382",
"0.63658124",
"0.6364797",
"0.63491607",
"0.634821",
"0.6345856",
"0.6321424",
"0.6319429",
"0.6295532"... | 0.7281759 | 0 |
This function clips the given time series dataframe to a given range of dates. Function returns the clipped dataframe and and the number of missing values. | def r3oK(rnof, WIo6, T196):
rnof = rnof[WIo6:T196]
jocF = rnof['Discharge'].isna().sum()
return (rnof, jocF) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def r3oK(rnof, WIo6, T196):\n rnof = rnof.loc[WIo6:T196]\n jocF = rnof['Discharge'].isna().sum()\n return (rnof, jocF)",
"def XUHL(YKHO):\n _lYe = rLdf.DataFrame({'Time': [0, 1, 2, 3, 4], 'Daily Top': ['GME', 'AMC', 'BB', 'DOGE', 'NOK'], 'Vals': [10, 12, 45, 88, 90]})\n qaAi = rLdf.DataFrame({'Tim... | [
"0.6984046",
"0.61241484",
"0.6106815",
"0.59650385",
"0.5943148",
"0.57513005",
"0.57213867",
"0.56934184",
"0.56920904",
"0.5624598",
"0.5590523",
"0.55863494",
"0.5569304",
"0.55607164",
"0.55422664",
"0.55131966",
"0.55085194",
"0.5483656",
"0.54830766",
"0.5455915",
"0.5... | 0.75004745 | 0 |
returns the current square area | def f0tD(YKHO):
return YKHO.__size * YKHO.__size | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f0tD(YKHO):\n return YKHO.h * YKHO.w",
"def f0tD(YKHO):\n return YKHO._Square__size ** 2",
"def f0tD(YKHO):\n return YKHO.width() * YKHO.height()",
"def f0tD(YKHO):\n return YKHO.__width * YKHO.__height",
"def f0tD(YKHO):\n return YKHO.__width * YKHO.__height",
"def f0tD(YKHO):\n re... | [
"0.8345856",
"0.82767934",
"0.82444036",
"0.8185984",
"0.81425005",
"0.81425005",
"0.8103396",
"0.8101604",
"0.8096612",
"0.8091366",
"0.8091366",
"0.8091366",
"0.8079929",
"0.8079929",
"0.8079929",
"0.8079929",
"0.8061959",
"0.8061959",
"0.803549",
"0.80350345",
"0.80163306"... | 0.7931458 | 59 |
The average of current spot_price is out 3 sigma range and original data is also out. | def YpjC(YKHO):
Z9rn = sFjc()
Z9rn.prod_mode = False
Z9rn.spot_prices = [50000 / 3, 50001 / 3, 50002 / 3]
Z9rn.last_sigma = 150
Z9rn.last_mean = 49000
Z9rn.past_price = [49200, 49800, 49900, 49000, 48000]
Aofo = Z9rn.calculate()
YKHO.assertEqual(Aofo[0], 50001)
YKHO.assertEqual(Aofo[... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _w_4(YKHO):\n raise NotImplementedError('Should implement inv_avg_price()')",
"def tqeo(YKHO):\n if YKHO.quantity == 0:\n return 0.0\n else:\n return YKHO.total_value / YKHO.quantity",
"def ubR_(YKHO):\n return (YKHO.open + YKHO.close) / 2",
"def nQhZ(YKHO):\n try:\n J... | [
"0.69740915",
"0.68275684",
"0.6718667",
"0.64129084",
"0.62325186",
"0.61850494",
"0.6166716",
"0.6128647",
"0.6059723",
"0.6048149",
"0.6012528",
"0.5968371",
"0.59672016",
"0.5920006",
"0.5917306",
"0.5913955",
"0.58870566",
"0.5880857",
"0.5870798",
"0.5860028",
"0.585139... | 0.0 | -1 |
The average of current spot_price is in 3 sigma range. | def pwjH(YKHO):
Z9rn = sFjc()
Z9rn.prod_mode = False
Z9rn.spot_prices = [49300 / 3, 49200 / 3, 49100 / 3]
Z9rn.last_sigma = 150
Z9rn.last_mean = 49000
Z9rn.past_price = [49200, 49800, 49900, 49000, 48000]
Aofo = Z9rn.calculate()
YKHO.assertEqual(Aofo[0], 49199.99999999999)
YKHO.asser... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tqeo(YKHO):\n if YKHO.quantity == 0:\n return 0.0\n else:\n return YKHO.total_value / YKHO.quantity",
"def ubR_(YKHO):\n return (YKHO.open + YKHO.close) / 2",
"def _w_4(YKHO):\n raise NotImplementedError('Should implement inv_avg_price()')",
"def JBMS(YKHO):\n return 3.2",
... | [
"0.730643",
"0.71451426",
"0.6924364",
"0.6821444",
"0.6745182",
"0.67257273",
"0.6362545",
"0.6357916",
"0.63575774",
"0.6344586",
"0.62921935",
"0.6252432",
"0.62348944",
"0.6226842",
"0.62156975",
"0.62104404",
"0.6199744",
"0.61940795",
"0.6192025",
"0.61904985",
"0.61574... | 0.0 | -1 |
Returns a new array of given size with 64 bit integers bounded by given interval. | def oAQy(c_pY, gqRb, xlLU, zNig, yDqo):
yvT9 = oyIN.empty(zNig, dtype=yDqo)
if xlLU == 0:
for YRbF in oyIN.ndindex(zNig):
yvT9[YRbF] = gqRb
elif xlLU <= 4294967295:
if xlLU == 4294967295:
for YRbF in oyIN.ndindex(zNig):
yvT9[YRbF] = gqRb + bhro(c_pY)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def S3W7(DpyC, tan8):\n u1SZ = tan8 // 2\n ANfV = XTiz.random.randint(-u1SZ, u1SZ, DpyC)\n return ANfV",
"def iamK(ezWE, P8oC=10):\n P8oC = float(P8oC)\n ezWE = mLGw.array(ezWE)\n assert ezWE.ndim == 1\n qiac = h7Ld(ezWE.min(), base=P8oC)\n V4Fn = aS9Z(ezWE.max(), base=P8oC)\n kKbZ = m... | [
"0.59613764",
"0.5934433",
"0.5860978",
"0.5764537",
"0.5750123",
"0.56845665",
"0.5676679",
"0.5594308",
"0.5564475",
"0.547909",
"0.54758906",
"0.5471724",
"0.54695475",
"0.5462809",
"0.5448344",
"0.5428388",
"0.54271334",
"0.54106003",
"0.5395389",
"0.5389018",
"0.538727",... | 0.6279158 | 0 |
Returns a new array of given size with 32 bit integers bounded by given interval. | def lH5k(c_pY, gqRb, xlLU, zNig, yDqo):
yvT9 = oyIN.empty(zNig, dtype=yDqo)
if xlLU == 0:
for YRbF in oyIN.ndindex(zNig):
yvT9[YRbF] = gqRb
elif xlLU == 4294967295:
for YRbF in oyIN.ndindex(zNig):
yvT9[YRbF] = gqRb + bhro(c_pY)
else:
for YRbF in oyIN.ndind... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iamK(ezWE, P8oC=10):\n P8oC = float(P8oC)\n ezWE = mLGw.array(ezWE)\n assert ezWE.ndim == 1\n qiac = h7Ld(ezWE.min(), base=P8oC)\n V4Fn = aS9Z(ezWE.max(), base=P8oC)\n kKbZ = mLGw.arange(qiac, V4Fn + 0.5 * P8oC, P8oC)\n return kKbZ",
"def JfDl(nPrm, TVTK):\n nEeK, ekgN = zpIh(nPrm)\n ... | [
"0.6191273",
"0.59567255",
"0.58505064",
"0.57793635",
"0.5769697",
"0.5759322",
"0.57555026",
"0.57555026",
"0.56960624",
"0.5673016",
"0.56449753",
"0.5633415",
"0.558543",
"0.554508",
"0.5531313",
"0.55141085",
"0.55070984",
"0.5468196",
"0.54587466",
"0.5456385",
"0.54454... | 0.6120726 | 1 |
Returns a new array of given size with 16 bit integers bounded by given interval. | def XGh2(c_pY, gqRb, xlLU, zNig, yDqo):
LaVg = 0
T4YH = 0
yvT9 = oyIN.empty(zNig, dtype=yDqo)
if xlLU == 0:
for YRbF in oyIN.ndindex(zNig):
yvT9[YRbF] = gqRb
elif xlLU == 65535:
for YRbF in oyIN.ndindex(zNig):
wEf2, T4YH, LaVg = wGaC(c_pY, T4YH, LaVg)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iamK(ezWE, P8oC=10):\n P8oC = float(P8oC)\n ezWE = mLGw.array(ezWE)\n assert ezWE.ndim == 1\n qiac = h7Ld(ezWE.min(), base=P8oC)\n V4Fn = aS9Z(ezWE.max(), base=P8oC)\n kKbZ = mLGw.arange(qiac, V4Fn + 0.5 * P8oC, P8oC)\n return kKbZ",
"def S3W7(DpyC, tan8):\n u1SZ = tan8 // 2\n ANfV... | [
"0.57722664",
"0.5622073",
"0.56149125",
"0.5560039",
"0.5542636",
"0.5540244",
"0.5530282",
"0.55238646",
"0.54866105",
"0.54479",
"0.53391516",
"0.5318358",
"0.5300947",
"0.5298373",
"0.52737343",
"0.52631724",
"0.52181107",
"0.52117175",
"0.5201953",
"0.5176083",
"0.515799... | 0.61065376 | 0 |
Returns a new array of given size with boolean values. | def zdyl(c_pY, gqRb, xlLU, zNig, yDqo):
LaVg = 0
T4YH = 0
yvT9 = oyIN.empty(zNig, dtype=yDqo)
for YRbF in oyIN.ndindex(zNig):
wEf2, T4YH, LaVg = Ra6w(c_pY, gqRb, xlLU, T4YH, LaVg)
yvT9[YRbF] = gqRb + wEf2
return yvT9 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HEfD(Glhg):\n uRUg = []\n for YRbF in range(int(Glhg)):\n uRUg.append(S1_d)\n return uRUg",
"def zNYk(_M71):\n return [1 if Fg_i.get() else 0 for Fg_i in _M71]",
"def Yjcp(*qIxc, **B2fa):\n return oyIN.array(*qIxc, dtype=bool, **B2fa)",
"def BYrD(Glhg, _J6_):\n uRUg = []\n for... | [
"0.69035107",
"0.68144125",
"0.68126184",
"0.6702497",
"0.6592267",
"0.6505195",
"0.650187",
"0.63475436",
"0.629699",
"0.61798686",
"0.6144058",
"0.60945857",
"0.60423225",
"0.60253555",
"0.6023814",
"0.5887978",
"0.58069503",
"0.579161",
"0.5767571",
"0.5699785",
"0.5664813... | 0.62079406 | 9 |
Create and save a User with the given email and password. | def lYUQ(YKHO, NtEF, D3lj, hJ6d, jTXt, **wdCM):
if not NtEF:
raise ValueError(bGrB('The Username must be set'))
if not D3lj:
raise ValueError(bGrB('The Email must be set'))
if not hJ6d:
raise ValueError(bGrB('The User Uid must be set'))
CBIr = YKHO.model(username=NtEF, email=YKHO... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xWi2(YKHO, D3lj, jTXt, **wdCM):\n if not D3lj:\n raise ValueError('The email must be set')\n D3lj = YKHO.normalize_email(D3lj)\n CBIr = YKHO.model(email=D3lj, **wdCM)\n CBIr.set_password(jTXt)\n CBIr.save()",
"def xWi2(YKHO, D3lj, jTXt, **wdCM):\n D3lj = YKHO.normalize_email(D3lj)\n ... | [
"0.8765867",
"0.85452795",
"0.85368717",
"0.8527806",
"0.85269475",
"0.85257876",
"0.85186416",
"0.8508724",
"0.8504736",
"0.8504567",
"0.8504567",
"0.8504567",
"0.8494046",
"0.8494046",
"0.84938884",
"0.8492852",
"0.849132",
"0.8490454",
"0.8488974",
"0.8488869",
"0.84884715... | 0.0 | -1 |
Create and save a SuperUser with the given email and password. | def Zp54(YKHO, NtEF, D3lj, hJ6d, jTXt, **wdCM):
wdCM.setdefault('is_staff', True)
wdCM.setdefault('is_superuser', True)
wdCM.setdefault('is_active', True)
if wdCM.get('is_staff') is not True:
raise ValueError(bGrB('Superuser must have is_staff=True.'))
if wdCM.get('is_superuser') is not True... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zp54(YKHO, D3lj, jTXt=None, **dDGN):\n YKHO._create_user(D3lj, True, jTXt, **dDGN)",
"def Zp54(YKHO, D3lj: str, jTXt: str, **wdCM: Dict[str, bool]):\n wdCM.setdefault('is_staff', True)\n wdCM.setdefault('is_superuser', True)\n wdCM.setdefault('is_active', True)\n if wdCM.get('is_staff') is not... | [
"0.81715554",
"0.80949867",
"0.8072965",
"0.80660135",
"0.80614394",
"0.80550295",
"0.80352277",
"0.79790324",
"0.79607594",
"0.7955878",
"0.7946088",
"0.7942262",
"0.7942262",
"0.7942262",
"0.7942262",
"0.7942262",
"0.7942262",
"0.7942262",
"0.7942262",
"0.7939117",
"0.79350... | 0.0 | -1 |
Sets a list of commandline elements usable by the commandLines() method. | def MkPy(YKHO):
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AH7Z(YKHO, isiZ):\n YKHO.pArgs.extend(isiZ)",
"def qOpy(YKHO, qIxc):\n if not isinstance(qIxc, (list, tuple)):\n raise TypeError('args should either be a tuple or list of strings')\n if qIxc:\n for d7pR in qIxc:\n if not isinstance(d7pR, exCv):\n raise TypeErr... | [
"0.6742746",
"0.6339401",
"0.6156365",
"0.6156365",
"0.61282414",
"0.60841215",
"0.6060792",
"0.6039064",
"0.60293025",
"0.60115284",
"0.59191513",
"0.5910131",
"0.5908647",
"0.5889076",
"0.5862096",
"0.5860515",
"0.58467567",
"0.5844709",
"0.58137494",
"0.5791358",
"0.575942... | 0.0 | -1 |
Returns the class type for this command. | def kTwp(oUZx):
return wAvY[oUZx].commandClass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def D3KC(YKHO):\n return YKHO._class_type",
"def YwLH(YKHO):\n return Um9M(YKHO)",
"def Bo4O(YKHO):\n return J28z(app_name=YKHO.app_name, name=YKHO.name)",
"def kQ76(YKHO):\n if not YKHO._cmd_type:\n YKHO._cmd_type = YKHO.CmdGraph.load_cmd_type()\n return YKHO._cmd_type",
"def Bo4O(YK... | [
"0.7848697",
"0.7715791",
"0.7522212",
"0.75058824",
"0.7470818",
"0.73607355",
"0.730677",
"0.7296678",
"0.7275614",
"0.7275614",
"0.7275614",
"0.7275614",
"0.71930337",
"0.71467835",
"0.7134377",
"0.71127766",
"0.7096495",
"0.7092241",
"0.70783955",
"0.70777106",
"0.7077710... | 0.7528934 | 2 |
Create a shallow copy of this matrix. Creates a new instance of Matrix but with data referencing the data of the original matrix. | def FzJk(YKHO):
Ylbp = aLMY(YKHO.m, YKHO.n, init=False)
Ylbp.data = YKHO.data
return Ylbp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jth9(YKHO):\n return aLMY(YKHO.matrix)",
"def jth9(YKHO):\n return YKHO.__class__(YKHO.matrix.copy())",
"def jth9(YKHO):\n r8hN = aLMY(YKHO.rows, YKHO.cols)\n for YRbF in range(YKHO.rows):\n for r845 in range(YKHO.cols):\n r8hN.data[YRbF][r845] = YKHO.data[YRbF][r845]\n ret... | [
"0.85392684",
"0.84102964",
"0.8406483",
"0.82979065",
"0.81930774",
"0.8163443",
"0.8082114",
"0.8052157",
"0.8032475",
"0.78498626",
"0.77836007",
"0.7765904",
"0.7724391",
"0.77078134",
"0.77078134",
"0.76331073",
"0.76231873",
"0.74819314",
"0.7394554",
"0.7358529",
"0.73... | 0.8736029 | 0 |
Create a deep copy of this matrix. Creates a new instance of Matrix with data copied from the original matrix. | def d9kX(YKHO, J0fK={}):
Ylbp = aLMY(YKHO.m, YKHO.n, init=False)
Ylbp.data = _qLf(YKHO.data)
return Ylbp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FzJk(YKHO):\n Ylbp = aLMY(YKHO.m, YKHO.n, init=False)\n Ylbp.data = YKHO.data\n return Ylbp",
"def jth9(YKHO):\n return aLMY(YKHO.matrix)",
"def jth9(YKHO):\n return YKHO.__class__(YKHO.matrix.copy())",
"def jth9(YKHO):\n r8hN = aLMY(YKHO.rows, YKHO.cols)\n for YRbF in range(YKHO.row... | [
"0.85812485",
"0.8529297",
"0.8527786",
"0.84281814",
"0.83028483",
"0.8270678",
"0.8249743",
"0.8159108",
"0.811046",
"0.811046",
"0.78352237",
"0.78096074",
"0.7696657",
"0.76416904",
"0.75639075",
"0.7553822",
"0.7517792",
"0.74925905",
"0.7397892",
"0.7382874",
"0.7273412... | 0.8453649 | 3 |
Add a valid object to this matrix and return the result. Doesn't modify the current matrix. Valid objects include other matrices and numeric scalars | def FOdN(YKHO, YEnM):
if isinstance(YEnM, aLMY):
if not (YKHO.m == YEnM.m and YKHO.n == YEnM.n):
raise BQDi.ComformabilityError('matrices must have the same dimensions')
Ylbp = aLMY(YKHO.m, YKHO.n)
for YRbF in range(YKHO.m):
for r845 in range(YKHO.n):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FOdN(YKHO, nGHW):\n if not isinstance(nGHW, aLMY):\n nGHW = aLMY(nGHW)\n return YKHO._add(nGHW)",
"def FOdN(YKHO, zMHD):\n if isinstance(zMHD, f9X8):\n if not YKHO.units.same_dimensions_as(zMHD.units):\n raise Exception('You cannot add these quantities because their dimensio... | [
"0.67166036",
"0.6359785",
"0.62735635",
"0.62460464",
"0.6089284",
"0.60835314",
"0.60702395",
"0.60251087",
"0.60131514",
"0.59951645",
"0.5983863",
"0.5981809",
"0.5974723",
"0.5974242",
"0.5934717",
"0.5934509",
"0.5934504",
"0.59304",
"0.5909773",
"0.5903728",
"0.590297"... | 0.8000892 | 0 |
Subtract a valid object from this matrix and return the result. Doesn't modify the current matrix. Valid objects include other matrices and numeric scalars | def qjfR(YKHO, YEnM):
if isinstance(YEnM, aLMY):
if not (YKHO.m == YEnM.m and YKHO.n == YEnM.n):
raise BQDi.ComformabilityError('matrices must have the same dimensions')
Ylbp = aLMY(YKHO.m, YKHO.n)
for YRbF in range(YKHO.m):
for r845 in range(YKHO.n):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qjfR(YKHO, nGHW):\n if not isinstance(nGHW, aLMY):\n nGHW = aLMY(nGHW)\n return YKHO._sub(nGHW)",
"def eRcp(YKHO, nGHW):\n kVrw = nGHW\n if not isinstance(kVrw, aLMY):\n kVrw = aLMY(kVrw)\n J80H = kVrw._sub(YKHO)\n if isinstance(nGHW, aLMY):\n return J80H\n else:\n ... | [
"0.7166712",
"0.70903933",
"0.70692176",
"0.7060472",
"0.6809172",
"0.67128193",
"0.67092323",
"0.66058296",
"0.65954286",
"0.65867305",
"0.65793365",
"0.6573375",
"0.6570829",
"0.65708",
"0.6557231",
"0.6521695",
"0.6514561",
"0.6510724",
"0.6485163",
"0.64673555",
"0.640641... | 0.84014624 | 0 |
Multiply this matrix by a valid object and return the result. Doesn't modify the current matrix. Valid objects include other matrices and numeric scalars. In the case where the other object is a matrix, multiplication occurs with the current matrix on the lefthand side | def E_tF(YKHO, YEnM):
if isinstance(YEnM, aLMY):
if not YKHO.n == YEnM.m:
raise BQDi.ComformabilityError('column dimension of first matrix much match row ' + 'dimension of second matrix')
Ylbp = aLMY(YKHO.m, YEnM.n)
for YRbF in range(YKHO.m):
for r845 in range(YEnM.n)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E_tF(YKHO, Elif):\n if isinstance(Elif, aLMY):\n if YKHO._col_no == Elif._row_no:\n RI88 = aLMY(YKHO._row_no, Elif._col_no)\n RI88._matrix = oyIN.dot(YKHO._matrix, Elif._matrix)\n return RI88\n else:\n return None\n elif isinstance(Elif, (int, flo... | [
"0.7788343",
"0.7589539",
"0.75639117",
"0.756204",
"0.7539431",
"0.7532834",
"0.7511972",
"0.7380508",
"0.7357436",
"0.7326347",
"0.72733027",
"0.7249591",
"0.71154755",
"0.7106039",
"0.7099281",
"0.7096312",
"0.70941365",
"0.7092287",
"0.7075517",
"0.70340836",
"0.703104",
... | 0.8544579 | 0 |
Transpose this matrix and return the result. | def l7uB(YKHO):
r8hN, exwG = (YKHO.n, YKHO.m)
Ylbp = aLMY(r8hN, exwG, init=False)
Ylbp.data = [list(fvDH) for fvDH in zip(*YKHO.data)]
return Ylbp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l7uB(YKHO):\n YKHO.matrix = v65A(YKHO.matrix)",
"def l7uB(YKHO):\n RI88 = aLMY(YKHO._col_no, YKHO._row_no)\n RI88._matrix = oyIN.transpose(YKHO._matrix)\n return RI88",
"def l7uB(YKHO):\n ycBG = aLMY(YKHO.num_col, YKHO.num_row)\n for YRbF in range(YKHO.num_row):\n for r845 in range... | [
"0.8546402",
"0.8457172",
"0.842246",
"0.83820325",
"0.83743733",
"0.83473724",
"0.8235959",
"0.8226408",
"0.8190512",
"0.8171116",
"0.809968",
"0.80469227",
"0.80082184",
"0.79858196",
"0.7982281",
"0.79703397",
"0.79491043",
"0.7883878",
"0.7874077",
"0.78457254",
"0.781042... | 0.8262098 | 6 |
Return True if and only if this matrix is symmetric. | def FioC(YKHO):
return YKHO == YKHO.transpose() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _Fwn(YKHO):\n if YKHO.matrix.array.compression == Xj7m.diagonal.moniker or YKHO.matrix.array.symmetry in (Xj7m.symmetryUpperToken, Xj7m.symmetryLowerToken):\n return True\n ezWE = YKHO.matrix.array.constructArray()\n return XTiz.all(ezWE == ezWE.T)",
"def FioC(YKHO):\n return not YKHO.is_f... | [
"0.88109213",
"0.86945343",
"0.85120094",
"0.8428095",
"0.82643765",
"0.8215081",
"0.8213001",
"0.8085785",
"0.8069879",
"0.803558",
"0.7841654",
"0.7744721",
"0.7610882",
"0.7492922",
"0.7492922",
"0.74766856",
"0.7467411",
"0.7425184",
"0.7320231",
"0.7177515",
"0.7123317",... | 0.8398165 | 4 |
Return True if and only if this matrix is skewsymmetric. | def BWP_(YKHO):
return YKHO == -YKHO.transpose() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FioC(YKHO):\n return not YKHO.is_full_matrix() and (not YKHO.is_special())",
"def _Fwn(YKHO):\n if YKHO.matrix.array.compression == Xj7m.diagonal.moniker or YKHO.matrix.array.symmetry in (Xj7m.symmetryUpperToken, Xj7m.symmetryLowerToken):\n return True\n ezWE = YKHO.matrix.array.constructArra... | [
"0.75271785",
"0.7381279",
"0.7361795",
"0.7297848",
"0.72462106",
"0.722953",
"0.718401",
"0.70978403",
"0.7090714",
"0.70810366",
"0.7050279",
"0.7047111",
"0.69207203",
"0.68246776",
"0.68246776",
"0.6782157",
"0.6723712",
"0.6525956",
"0.6496575",
"0.63677377",
"0.6334979... | 0.88008195 | 0 |
Apply the Toeplitz decomposition to this matrix. Decompose this matrix into the sum of a symmetric and skewsymmetric matrix, returning the result as a tuple. | def Qsnz(YKHO):
if YKHO.m != YKHO.n:
raise BQDi.DecompositionError('non-square matrices do not have a ' + 'a Toeplitz decomposition')
aDi_ = (YKHO + YKHO.transpose()) * 0.5
uRwD = (YKHO - YKHO.transpose()) * 0.5
return (aDi_, uRwD) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rKDD(YKHO):\n if YKHO.shape != (3, 3):\n raise xwhD('Dimensions incorrect, expected (3, 3), got ' + str(YKHO.shape))\n elif not YKHO.is_anti_symmetric():\n raise ValueError('Matrix is not skew-symmetric')\n else:\n return YKHO._new(3, 1, (YKHO[2, 1], YKHO[0, 2], YKHO[1, 0]))",
"... | [
"0.52245975",
"0.5168606",
"0.49788922",
"0.4909354",
"0.49002323",
"0.48337996",
"0.48121852",
"0.47953936",
"0.47568733",
"0.47516668",
"0.47483128",
"0.4746661",
"0.47429544",
"0.470593",
"0.4693542",
"0.46761423",
"0.46754622",
"0.46687287",
"0.4666756",
"0.46666995",
"0.... | 0.7496513 | 0 |
Return the rowreduced form of this matrix. | def naUg(YKHO):
Ylbp = YKHO.row_echelon()
for YRbF in range(1, Ylbp.m):
for r845 in range(Ylbp.n):
if Ylbp[YRbF, r845] == 1:
for G1Hx in range(YRbF):
si3H = Ylbp[G1Hx, r845]
Ylbp.data[G1Hx] = [C7Np - vAb4 * si3H for vAb4, C7Np in zip(Yl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qlJF(Vy9t):\n lBp9(Vy9t)\n MkIU(Vy9t)",
"def aB7J(YKHO) -> 'vnl_matrixD &':\n return hBPC.vnl_matrixD_normalize_rows(YKHO)",
"def aB7J(YKHO) -> 'vnl_matrixUS &':\n return hBPC.vnl_matrixUS_normalize_rows(YKHO)",
"def aB7J(YKHO) -> 'vnl_matrixSC &':\n return hBPC.vnl_matrixSC_normalize_rows... | [
"0.69120175",
"0.6748014",
"0.6732159",
"0.67078346",
"0.6699835",
"0.66647136",
"0.66331565",
"0.66306466",
"0.6630077",
"0.65710646",
"0.65158874",
"0.6487646",
"0.64872915",
"0.64870834",
"0.6483857",
"0.64773715",
"0.64650667",
"0.6463666",
"0.64599377",
"0.64599377",
"0.... | 0.66288227 | 9 |
Create random matrix. Make a random matrix of dimension m by n with elements chosen independently and uniformly from the interval (min, max). | def NhSR(Emd4, r8hN, exwG, min=0, max=1):
YEnM = aLMY(r8hN, exwG, init=False)
for beF2 in range(r8hN):
YEnM.data.append([tuKI.randrange(min, max) for sWeS in range(exwG)])
return YEnM | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def glVU(r8hN, exwG, LSh8=-0.5, CN9P=0.5):\n return oyIN.array([tuKI.uniform(LSh8, CN9P) for YRbF in range(r8hN * exwG)]).reshape(r8hN, exwG)",
"def PB7L(r8hN, exwG, yDqo, ytCQ):\n SppC = tuKI.uniform(a1hi, GLcw, (r8hN, exwG)).astype(yDqo)\n if ytCQ:\n SppC = cYXn(SppC)\n return SppC",
"def ... | [
"0.82169265",
"0.8039242",
"0.792063",
"0.7770839",
"0.75516677",
"0.74936056",
"0.74349564",
"0.74349564",
"0.7433492",
"0.734927",
"0.73423123",
"0.732252",
"0.7009784",
"0.69851553",
"0.6901765",
"0.6901479",
"0.68637294",
"0.68539166",
"0.67676",
"0.6758174",
"0.6741425",... | 0.8391746 | 0 |
Make an identity matrix of dimension m by m. | def XD8v(Emd4, r8hN):
YEnM = aLMY(r8hN, r8hN, init=False)
for YRbF in range(r8hN):
YEnM.data.append([1 if YRbF == r845 else 0 for r845 in range(r8hN)])
return YEnM | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UOV2(exwG: int) -> aLMY:\n return OqWE(exwG, exwG, lambda YRbF, r845: 1 if YRbF == r845 else 0)",
"def UOV2():\n return XTiz.identity(4, dtype=XTiz.float64)",
"def UOV2():\n return XTiz.identity(4, dtype=XTiz.float64)",
"def _E99(exwG):\n YRbF = aLMY(exwG, exwG)\n for rdlD in range(YRbF.ro... | [
"0.8001022",
"0.78530395",
"0.78530395",
"0.78421617",
"0.7787642",
"0.7716807",
"0.76231205",
"0.74007905",
"0.7363547",
"0.7320387",
"0.7318861",
"0.7273275",
"0.72684926",
"0.7222419",
"0.71772635",
"0.7159361",
"0.7152815",
"0.71493846",
"0.7146435",
"0.71230674",
"0.7033... | 0.824481 | 0 |
Function to transform a pytorch tensor to numpy image | def AP7o(LNo8: torch.Tensor):
LNo8 = LNo8.detach().cpu()
LNo8 = LNo8 - LNo8.min()
LNo8 = LNo8 / LNo8.max()
LNo8 = LNo8.numpy()
if len(LNo8.shape) == 2:
return LNo8
assert LNo8.shape[0] == 3, 'Expected color channel to be on first axis. Got: {}'.format(LNo8.shape)
LNo8 = oyIN.moveaxis... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oYDm(VXjJ):\n FhQ1(VXjJ.permute(1, 2, 0))",
"def bJ9i(vhpA):\n if not isinstance(vhpA, oyIN.ndarray):\n if isinstance(vhpA, ht2j.Tensor):\n return vhpA.detach().cpu().numpy()\n return vhpA",
"def uaVh(vhpA):\n vhpA = vhpA.mul(255).add_(0.5).clamp_(0, 255).permute(1, 2, 0)\n ... | [
"0.83413893",
"0.8210778",
"0.82096475",
"0.82096475",
"0.7813993",
"0.76535076",
"0.7636818",
"0.7622779",
"0.75969905",
"0.752228",
"0.75101113",
"0.7498566",
"0.74884826",
"0.74414134",
"0.7404018",
"0.73393303",
"0.7306384",
"0.7301034",
"0.72924566",
"0.7257021",
"0.7187... | 0.663065 | 83 |
! Return the name of the model. Name of the model. | def W0tD(YKHO) -> str:
return YKHO.name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TbE8(YKHO):\n pass",
"def ZGE9(YKHO) -> str:\n return YKHO._model_name",
"def ZGE9(YKHO) -> str:\n return YKHO._model_name",
"def ZGE9(YKHO):\n return YKHO._model_name",
"def ZGE9(YKHO):\n return YKHO._model_name",
"def txlv(YKHO):\n return YKHO.wink.model_name()",
"def ZGE9(YKHO)... | [
"0.9037246",
"0.9035217",
"0.9035217",
"0.9013971",
"0.9013971",
"0.8855832",
"0.88181436",
"0.88018465",
"0.88018465",
"0.8799364",
"0.8790899",
"0.87831295",
"0.8721589",
"0.8703995",
"0.86768496",
"0.84510267",
"0.83675325",
"0.83019245",
"0.83019245",
"0.8251553",
"0.8251... | 0.0 | -1 |
! Return the state name. time_deriv The timederiviative required (i.e. position is 0, velocity is 1, etc.) The state name in the form {name}/{d}{symbol}, where "name" is the model name, d is a string given by 'd'time_deriv, and symbol is the symbol for the model state. | def rlcK(YKHO, ktiv: int) -> str:
assert ktiv in YKHO.time_derivs, f'Given time derivative time_deriv={ktiv} is not recognized, only allowed {YKHO.time_derivs}'
return YKHO.name + '/' + 'd' * ktiv + YKHO.symbol | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Rk3i(YKHO, ktiv: int) -> str:\n assert ktiv in YKHO.time_derivs, f'Given time derivative time_deriv={ktiv} is not recognized, only allowed {YKHO.time_derivs}'\n return YKHO.name + '/' + 'd' * ktiv + YKHO.symbol + '/' + 'x'",
"def QGYG(YKHO, ktiv: int) -> str:\n assert ktiv in YKHO.time_derivs, f'Giv... | [
"0.83108246",
"0.7922879",
"0.652061",
"0.630337",
"0.6136437",
"0.61088896",
"0.6100523",
"0.595567",
"0.58431196",
"0.57947963",
"0.57863677",
"0.573688",
"0.5720316",
"0.5662243",
"0.5651039",
"0.5645249",
"0.56207925",
"0.5582528",
"0.5556566",
"0.5555659",
"0.5511311",
... | 0.871891 | 0 |
! Return the model limits. time_deriv The timederiviative required (i.e. position is 0, velocity is 1, etc.) lower The model lower limit. upper The model upper limit. | def J_5G(YKHO, ktiv: int) -> AzJI[cQpX]:
assert ktiv in YKHO.time_derivs, f'Given time derivative time_deriv={ktiv} is not recognized, only allowed {YKHO.time_derivs}'
assert ktiv in YKHO.dlim.keys(), f'Limit for time derivative time_deriv={ktiv} has not been given'
return YKHO.dlim[ktiv] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c5uu(wEf2, jDK_):\n if wEf2 == 'TEFF':\n Xk2t = [3000, 8000]\n if jDK_ == 'x':\n Xk2t.reverse()\n if wEf2 == 'LOGG':\n Xk2t = [-1, 6]\n if jDK_ == 'y':\n Xk2t.reverse()\n if wEf2 == 'M_H':\n Xk2t = [-2, 0.5]\n if wEf2 == 'ALPHA_M':\n X... | [
"0.62324524",
"0.6084104",
"0.5889094",
"0.58620405",
"0.57551205",
"0.5718429",
"0.5717369",
"0.57124305",
"0.56837654",
"0.5647262",
"0.56275594",
"0.55982506",
"0.5590317",
"0.5581579",
"0.55793315",
"0.55793315",
"0.5563394",
"0.55538523",
"0.55411375",
"0.55394346",
"0.5... | 0.6129467 | 1 |
! Initializer for the JointTypeNotSupported exception. joint_type The joint type given An instance of the exception class. | def FIMM(YKHO, N6EG: str):
tO9_ = f'{N6EG} joints are currently not supported\n'
tO9_ += 'if you require this joint type please raise an issue at '
tO9_ += 'https://github.com/cmower/optas/issues'
super().__init__(tO9_) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N6EG(YKHO, N6EG):\n yn3W = ['revolute', 'prismatic']\n try:\n assert N6EG in yn3W\n YKHO._joint_type = N6EG\n except AssertionError:\n raise f'Joint type {N6EG} not defined!'",
"def KmNi(YKHO, N6EG):\n return YKHO.__try_add(nNXP.hebiRobotModelElementCreateJoint(k5oz.parse_joi... | [
"0.71046436",
"0.6757704",
"0.5727048",
"0.5714669",
"0.5707634",
"0.5652001",
"0.55479354",
"0.5493072",
"0.536958",
"0.53245395",
"0.5317533",
"0.5210657",
"0.5196967",
"0.51861966",
"0.509751",
"0.508697",
"0.502095",
"0.501248",
"0.49911222",
"0.4960463",
"0.49432966",
... | 0.78380567 | 0 |
! Return the lower limit for a given joint. joint The joint instance from the URDF. The lower limit, when undefined the value 1e9 is returned. | def LkYG(YKHO, HMCV: Joint) -> float:
if HMCV.limit is None:
return -1000000000.0
return HMCV.limit.lower | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bYzB(YKHO, HMCV: Joint) -> float:\n if HMCV.limit is None:\n return 1000000000.0\n return HMCV.limit.upper",
"def E0zH(YKHO):\n return GYhQ.b2PrismaticJoint___GetLowerLimit(YKHO)",
"def E0zH(YKHO):\n return GYhQ.b2RevoluteJoint___GetLowerLimit(YKHO)",
"def oAmO(YKHO):\n return YKHO.... | [
"0.75807905",
"0.72081846",
"0.69646007",
"0.6708859",
"0.6632714",
"0.6606422",
"0.6563363",
"0.63343626",
"0.6229049",
"0.62040335",
"0.6198391",
"0.61527795",
"0.6113253",
"0.6113253",
"0.6113253",
"0.6113253",
"0.6113253",
"0.6113253",
"0.60446733",
"0.60290545",
"0.59999... | 0.89696056 | 0 |
! Return the upper limit for a given joint. joint The joint instance from the URDF. The upper limit, when undefined the value 1e9 is returned. | def bYzB(YKHO, HMCV: Joint) -> float:
if HMCV.limit is None:
return 1000000000.0
return HMCV.limit.upper | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LQxL(YKHO):\n return GYhQ.b2PrismaticJoint___GetUpperLimit(YKHO)",
"def kOPW(YKHO):\n return YKHO.upperLimit",
"def LQxL(YKHO):\n return GYhQ.b2RevoluteJoint___GetUpperLimit(YKHO)",
"def LkYG(YKHO, HMCV: Joint) -> float:\n if HMCV.limit is None:\n return -1000000000.0\n return HMCV.... | [
"0.74092394",
"0.719479",
"0.71796715",
"0.7053032",
"0.70385414",
"0.7032846",
"0.6852373",
"0.67801416",
"0.6757987",
"0.6602679",
"0.65882194",
"0.6523201",
"0.6484653",
"0.6484653",
"0.6484653",
"0.6484653",
"0.6484653",
"0.6484653",
"0.6440247",
"0.639128",
"0.63763696",... | 0.9011342 | 0 |
! Property that defines the lower actuated joint limits. The lower joint position limits. | def ouIU(YKHO) -> gtI8.DM:
return gtI8.DM([YKHO.get_joint_lower_limit(ACHM) for ACHM in YKHO.urdf.joints if ACHM.type != 'fixed']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E0zH(YKHO):\n return GYhQ.b2PrismaticJoint___GetLowerLimit(YKHO)",
"def xp0E(YKHO):\n sQC5.logdebug('Clamping current_joint_pose>>>' + str(YKHO.current_joint_pose))\n s5xb = YKHO.current_joint_pose[0]\n i7gU = YKHO.current_joint_pose[1]\n w8eV = YKHO.current_joint_pose[2]\n w6DH = YKHO.curr... | [
"0.7577037",
"0.7501339",
"0.73274577",
"0.7295529",
"0.72458",
"0.7116009",
"0.69108725",
"0.68058264",
"0.67164934",
"0.6672314",
"0.6661693",
"0.6625051",
"0.66247034",
"0.65787613",
"0.6541483",
"0.6541328",
"0.65369874",
"0.6525067",
"0.640562",
"0.6391374",
"0.6384791",... | 0.75083375 | 1 |
! Property that defines the lower optimized joint limits. The lower joint position limits. | def FLRT(YKHO) -> gtI8.DM:
return gtI8.DM([YKHO.get_joint_lower_limit(ACHM) for ACHM in YKHO.urdf.joints if ACHM.name in YKHO.optimized_joint_names]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E0zH(YKHO):\n return GYhQ.b2PrismaticJoint___GetLowerLimit(YKHO)",
"def xp0E(YKHO):\n sQC5.logdebug('Clamping current_joint_pose>>>' + str(YKHO.current_joint_pose))\n s5xb = YKHO.current_joint_pose[0]\n i7gU = YKHO.current_joint_pose[1]\n w8eV = YKHO.current_joint_pose[2]\n w6DH = YKHO.curr... | [
"0.7410361",
"0.7378928",
"0.7318639",
"0.7298434",
"0.71354586",
"0.7109067",
"0.70661825",
"0.7025598",
"0.6939484",
"0.6665202",
"0.666459",
"0.66554135",
"0.66479236",
"0.66124964",
"0.65126395",
"0.6475051",
"0.6440688",
"0.64132744",
"0.63433814",
"0.6324931",
"0.631123... | 0.7548344 | 0 |
! Property that defines the upper optimized joint limits. The upper joint position limits. | def tVKc(YKHO) -> gtI8.DM:
return gtI8.DM([YKHO.get_joint_upper_limit(ACHM) for ACHM in YKHO.urdf.joints if ACHM.name in YKHO.optimized_joint_names]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oblB(YKHO):\n A2Fp = oyIN.zeros(YKHO._get_observation_dimension())\n vIGw = YKHO.minitaur.num_motors\n A2Fp[0:vIGw] = epAf.pi\n A2Fp[vIGw:2 * vIGw] = x5Be\n A2Fp[2 * vIGw:3 * vIGw] = LB0k\n A2Fp[3 * vIGw:] = 1.0\n return A2Fp",
"def LQxL(YKHO):\n return GYhQ.b2PrismaticJoint___GetUppe... | [
"0.7580606",
"0.7579831",
"0.7561529",
"0.7398571",
"0.7327717",
"0.73011994",
"0.71262884",
"0.7124835",
"0.6937727",
"0.6657342",
"0.65303177",
"0.6509945",
"0.648441",
"0.6464634",
"0.64107615",
"0.6409307",
"0.6366649",
"0.63658905",
"0.6295373",
"0.62351424",
"0.6230736"... | 0.7741824 | 0 |
! Get the function that computes the position of a link in a given base frame. link Name of the endeffector link. base_link Name of the base frame link. n Number of joint states to expect when the function is called. Default is 1. numpy_output When true, the output will be a NumPy array. A CasADi function that computes... | def A86m(YKHO, QZnA: str, YrBi: str, exwG: int=1, WrXF: bool=False) -> gtI8.Function:
return YKHO.make_function('p', QZnA, YKHO.get_link_position, n=exwG, base_link=YrBi, numpy_output=WrXF) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X4Uc(YKHO, QZnA: str, YrBi: str, exwG: int=1, WrXF: bool=False) -> aVFA:\n return YKHO.make_function('T', QZnA, YKHO.get_link_transform, base_link=YrBi, n=exwG, numpy_output=WrXF)",
"def P2LM(YKHO, QZnA: str, exwG: int=1, WrXF: bool=False) -> gtI8.Function:\n return YKHO.make_function('p', QZnA, YKHO.g... | [
"0.7093089",
"0.6765911",
"0.6678528",
"0.6529042",
"0.63662034",
"0.63036746",
"0.62700444",
"0.6182042",
"0.61190045",
"0.611853",
"0.6033236",
"0.59632885",
"0.5948649",
"0.59245425",
"0.59229624",
"0.5859894",
"0.58551115",
"0.58343077",
"0.57416886",
"0.5681992",
"0.5604... | 0.7478964 | 0 |
! Get a quaternion in the global frame. link Name of the endeffector link. q Joint position array. Quaternion array. | def pb8y(YKHO, QZnA: str, vexM: ArrayType) -> aVFA:
assert QZnA in YKHO.urdf.link_map.keys(), 'given link does not appear in URDF'
tk5Y = YKHO.urdf.get_root()
_Jov = R5H8(0.0, 0.0, 0.0, 1.0)
if QZnA == tk5Y:
return _Jov.getquat()
for fP61 in YKHO.urdf.get_chain(tk5Y, QZnA, links=False):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kEOz(YKHO, QZnA: str, vexM: ArrayType, YrBi: str) -> aVFA:\n fcNy = R5H8.fromvec(YKHO.get_global_link_quaternion(QZnA, vexM))\n bRQB = R5H8.fromvec(YKHO.get_global_link_quaternion(YrBi, vexM))\n return (fcNy * bRQB.inv()).getquat()",
"def M_Hv(YKHO) -> oyIN.ndarray:\n if YKHO.index == -1:\n ... | [
"0.8024641",
"0.7546718",
"0.73002034",
"0.70404154",
"0.6865579",
"0.6798334",
"0.6757917",
"0.6696718",
"0.6502836",
"0.64686584",
"0.64259607",
"0.6354687",
"0.627325",
"0.6171301",
"0.6165816",
"0.6163411",
"0.6160028",
"0.6126518",
"0.61220115",
"0.61009955",
"0.60945",
... | 0.82599705 | 0 |
! Get the function that computes a quaternion in the global frame. link Name of the endeffector link. n Number of joint states to expect when the function is called. Default is 1. numpy_output When true, the output will be a NumPy array. A CasADi function that computes the quaternion for a given joint state. If n > 1 t... | def kAdg(YKHO, QZnA: str, exwG: int=1, WrXF: bool=False) -> gtI8.Function:
return YKHO.make_function('quat', QZnA, YKHO.get_global_link_quaternion, n=exwG, numpy_output=WrXF) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def brFp(YKHO, QZnA: str, YrBi: str, exwG: int=1, WrXF: bool=False) -> gtI8.Function:\n return YKHO.make_function('quat', QZnA, YKHO.get_link_quaternion, n=exwG, base_link=YrBi, numpy_output=WrXF)",
"def jMet(YKHO, QZnA: str, exwG: int=1, WrXF: bool=False):\n return YKHO.make_function('quat', QZnA, YKHO.ge... | [
"0.7502164",
"0.6720885",
"0.65804905",
"0.62592345",
"0.61786824",
"0.61564887",
"0.6062835",
"0.5963228",
"0.592614",
"0.59212404",
"0.5867162",
"0.58595073",
"0.58334255",
"0.5802384",
"0.58017075",
"0.57332546",
"0.5706485",
"0.5604209",
"0.55958503",
"0.5522269",
"0.5501... | 0.7823544 | 0 |
! Get the quaternion defined in a given base frame. link Name of the endeffector link. q Joint position array. base_link Name of the base frame link. Quaternion array. | def kEOz(YKHO, QZnA: str, vexM: ArrayType, YrBi: str) -> aVFA:
fcNy = R5H8.fromvec(YKHO.get_global_link_quaternion(QZnA, vexM))
bRQB = R5H8.fromvec(YKHO.get_global_link_quaternion(YrBi, vexM))
return (fcNy * bRQB.inv()).getquat() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pb8y(YKHO, QZnA: str, vexM: ArrayType) -> aVFA:\n assert QZnA in YKHO.urdf.link_map.keys(), 'given link does not appear in URDF'\n tk5Y = YKHO.urdf.get_root()\n _Jov = R5H8(0.0, 0.0, 0.0, 1.0)\n if QZnA == tk5Y:\n return _Jov.getquat()\n for fP61 in YKHO.urdf.get_chain(tk5Y, QZnA, links=F... | [
"0.7881863",
"0.74256706",
"0.73535085",
"0.7295493",
"0.6739852",
"0.6695248",
"0.66134113",
"0.64374244",
"0.6296635",
"0.6172833",
"0.60416",
"0.6040813",
"0.5996058",
"0.598834",
"0.5979593",
"0.59587413",
"0.5939607",
"0.59394526",
"0.5918249",
"0.58982885",
"0.58961743"... | 0.86188346 | 0 |
! Get the function that computes a quaternion defined in a given base frame. link Name of the endeffector link. base_link Name of the base frame link. n Number of joint states to expect when the function is called. Default is 1. numpy_output When true, the output will be a NumPy array. A CasADi function that computes t... | def brFp(YKHO, QZnA: str, YrBi: str, exwG: int=1, WrXF: bool=False) -> gtI8.Function:
return YKHO.make_function('quat', QZnA, YKHO.get_link_quaternion, n=exwG, base_link=YrBi, numpy_output=WrXF) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kAdg(YKHO, QZnA: str, exwG: int=1, WrXF: bool=False) -> gtI8.Function:\n return YKHO.make_function('quat', QZnA, YKHO.get_global_link_quaternion, n=exwG, numpy_output=WrXF)",
"def kEOz(YKHO, QZnA: str, vexM: ArrayType, YrBi: str) -> aVFA:\n fcNy = R5H8.fromvec(YKHO.get_global_link_quaternion(QZnA, vexM... | [
"0.7432444",
"0.6878675",
"0.64000475",
"0.63989043",
"0.6382536",
"0.6365555",
"0.6124811",
"0.6112576",
"0.603593",
"0.6000608",
"0.5965834",
"0.59180886",
"0.5889246",
"0.5876281",
"0.58750117",
"0.58645475",
"0.57704824",
"0.57595396",
"0.57032305",
"0.5701919",
"0.562825... | 0.79585403 | 0 |
! Get the angular part of the geometric jacobian in a given base frame. link Name of the endeffector link. q Joint position array. base_link Name of the base frame link. Angular part of the geometric Jacobian. | def trr4(YKHO, QZnA: str, vexM: ArrayType, YrBi: str) -> aVFA:
Oa10 = YKHO.get_link_geometric_jacobian(QZnA, vexM, YrBi)
return Oa10[3:, :] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def r2ig(YKHO, QZnA: str, vexM: ArrayType) -> aVFA:\n Oa10 = YKHO.get_global_link_geometric_jacobian(QZnA, vexM)\n return Oa10[3:, :]",
"def kHhv(YKHO, QZnA: str, vexM: ArrayType, YrBi: str) -> aVFA:\n NDV4 = gtI8.SX.sym('q_sym', YKHO.ndof)\n jr_h = YKHO.get_link_rpy(QZnA, NDV4, YrBi)\n nuNJ = gtI... | [
"0.74817294",
"0.73304445",
"0.7165071",
"0.7097251",
"0.6931609",
"0.6878267",
"0.674182",
"0.65766764",
"0.65377694",
"0.6421312",
"0.61279464",
"0.6074542",
"0.6062946",
"0.6007366",
"0.59824264",
"0.58809406",
"0.58488095",
"0.5834439",
"0.5817627",
"0.57019234",
"0.56796... | 0.78876835 | 0 |
! Compute the link axis, this is a direction vector defined in the endeffector frame (e.g. the x/y/z link axis). link Name of the endeffector link. q Joint position array. axis The axis (direction vector) defined in the endeffector frame. If 'x', 'y', 'z' is passed then the corresponding subarray of the homogenous tran... | def COaD(YKHO, QZnA: str, vexM: ArrayType, jDK_: Union[str, ArrayType], YrBi: str) -> aVFA:
WJMk = YKHO.get_link_transform(QZnA, vexM, YrBi)
gDPJ = {'x': 0, 'y': 1, 'z': 2}
if isinstance(jDK_, str):
assert jDK_ in gDPJ, "axis must be either 'x', 'y', 'z' or a 3-array"
d6pt = gDPJ[jDK_]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eluQ(YKHO, QZnA: str, vexM: ArrayType, jDK_: Union[str, ArrayType]) -> aVFA:\n return YKHO.get_link_axis(QZnA, vexM, jDK_, YKHO.get_root_link())",
"def El1R(YKHO, QZnA: str, jDK_: Union[str, ArrayType], YrBi: str, exwG: int=1, WrXF: bool=False) -> gtI8.Function:\n return YKHO.make_function('a', QZnA, Y... | [
"0.6629539",
"0.6476981",
"0.5984912",
"0.5925316",
"0.5875713",
"0.58552855",
"0.57719547",
"0.5714113",
"0.5642767",
"0.550699",
"0.546987",
"0.5444432",
"0.5376953",
"0.5366561",
"0.5264976",
"0.51890236",
"0.517819",
"0.51482",
"0.5088928",
"0.50882655",
"0.50835437",
"... | 0.7668917 | 0 |
! Compute the link axis, this is a direction vector defined in the endeffector frame (e.g. the x/y/z link axis) in the global frame. link Name of the endeffector link. q Joint position array. axis The axis (direction vector) defined in the endeffector frame. If 'x', 'y', 'z' is passed then the corresponding subarray of... | def eluQ(YKHO, QZnA: str, vexM: ArrayType, jDK_: Union[str, ArrayType]) -> aVFA:
return YKHO.get_link_axis(QZnA, vexM, jDK_, YKHO.get_root_link()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def COaD(YKHO, QZnA: str, vexM: ArrayType, jDK_: Union[str, ArrayType], YrBi: str) -> aVFA:\n WJMk = YKHO.get_link_transform(QZnA, vexM, YrBi)\n gDPJ = {'x': 0, 'y': 1, 'z': 2}\n if isinstance(jDK_, str):\n assert jDK_ in gDPJ, \"axis must be either 'x', 'y', 'z' or a 3-array\"\n d6pt = gDPJ... | [
"0.73344505",
"0.60798055",
"0.5932059",
"0.56000876",
"0.54767215",
"0.54663277",
"0.54355574",
"0.5363568",
"0.53136533",
"0.52902246",
"0.5269561",
"0.5268622",
"0.52431774",
"0.52096564",
"0.51948375",
"0.5181355",
"0.51784444",
"0.5177015",
"0.5125419",
"0.5073571",
"0.5... | 0.6860345 | 1 |
Convert a list of Points to an ndarray of coordinates | def Im7j(Ocsy, ABDL):
return szpc(ABDL) / Ocsy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OfPk(YKHO, y5bX):\n TLbF = []\n for YRbF, r845 in y5bX:\n TLbF.append(YRbF)\n TLbF.append(r845)\n g4FV = (gk2W.c_float * (len(y5bX) * 2))(*TLbF)\n return g4FV",
"def lNKL(_3NM):\n return [JRmQ.point(mM0K) for mM0K in _3NM]",
"def Pxxy(OE5R):\n ejx_ = []\n Nyyq = []\n f... | [
"0.7631082",
"0.7628451",
"0.7594887",
"0.75301",
"0.72117406",
"0.71725166",
"0.7154221",
"0.7020507",
"0.70005214",
"0.69986004",
"0.68695515",
"0.6812281",
"0.67970544",
"0.6774842",
"0.6748098",
"0.66466194",
"0.6642191",
"0.6554928",
"0.65428257",
"0.6500299",
"0.6487981... | 0.0 | -1 |
returns the full image path | def kEKH(YKHO, d6pt: int) -> h8nf[str]:
if len(YKHO._overlayImages) > d6pt >= 0:
return YKHO._overlayImages[d6pt]
else:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QMAG(YKHO):\n pass",
"def QMAG(YKHO):\n return YKHO._image_path",
"def QMAG(IznC):\n tk5Y = GkAb(xAKo).parent.parent\n return str((tk5Y / 'images' / GkAb(IznC)).resolve())",
"def qaEx(YKHO):\n return YKHO.image_file.path",
"def eEoI(YKHO):\n return YKHO._impath",
"def SUL8(Ux0P):\n ... | [
"0.8328739",
"0.82023156",
"0.8089315",
"0.8030509",
"0.8024231",
"0.79916185",
"0.7950236",
"0.790596",
"0.7901912",
"0.7901912",
"0.789315",
"0.78883195",
"0.7789876",
"0.7702106",
"0.7610179",
"0.75816953",
"0.74804485",
"0.7479981",
"0.7475187",
"0.7469461",
"0.7468856",
... | 0.0 | -1 |
Return ``text`` indented by the given number of spaces. If text is not a string, it is assumed to be a list of lines and will be joined by ``\\n`` prior to indenting. When ``strip`` is ``True``, a minimum amount of whitespace is removed from the lefthand side of the given string (so that relative indents are preserved,... | def MnRD(l5Ny, oi6k=4, Nlxd=False):
if not hasattr(l5Ny, 'splitlines'):
l5Ny = '\n'.join(l5Ny)
if Nlxd:
l5Ny = TI0e.dedent(l5Ny)
y0cW = ' ' * oi6k
hlel = '\n'.join((y0cW + zFiD for zFiD in l5Ny.splitlines()))
hlel = hlel.strip()
hlel = y0cW + hlel
return hlel | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MnRD(YKHO, l5Ny, oi6k):\n Nqlg = l5Ny.strip().split('\\n')\n Xg1X = ' ' * oi6k\n Nqlg = [Xg1X + WKvO for WKvO in Nqlg]\n Nqlg.append('')\n return '\\n'.join(Nqlg)",
"def MnRD(l5Ny, GO7z='', aDSm=0):\n if not GO7z and aDSm <= 0:\n return l5Ny\n c31X = ' ' * aDSm + GO7z\n return ... | [
"0.67284393",
"0.6491089",
"0.6341161",
"0.6287665",
"0.62284136",
"0.62255114",
"0.6168446",
"0.6097734",
"0.6089312",
"0.5951",
"0.5945846",
"0.59439546",
"0.58951753",
"0.5879635",
"0.58790636",
"0.5849697",
"0.58473444",
"0.58348924",
"0.5819959",
"0.57916814",
"0.5785230... | 0.82007605 | 0 |
boxoverlap computes intersection over union for bbox a and b in KITTI format. If the criterion is 'union', overlap = (a inter b) / a union b). If the criterion is 'a', overlap = (a inter b) / a, where b should be a dontcare area. | def RjuK(jzdc, Fg_i, OPAs='union'):
o4D3 = oyIN.maximum(jzdc[0], Fg_i[0])
si3g = oyIN.maximum(jzdc[1], Fg_i[1])
ajwV = oyIN.minimum(jzdc[2], Fg_i[2])
skBL = oyIN.minimum(jzdc[3], Fg_i[3])
yzQ0 = oyIN.maximum(0.0, ajwV - o4D3)
MKlR = oyIN.maximum(0.0, skBL - si3g)
C7_8 = yzQ0 * MKlR
cxuF ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kriM(jzdc, Fg_i, OPAs='union'):\n o4D3 = max(jzdc.x1, Fg_i.x1)\n si3g = max(jzdc.y1, Fg_i.y1)\n ajwV = min(jzdc.x2, Fg_i.x2)\n skBL = min(jzdc.y2, Fg_i.y2)\n yzQ0 = ajwV - o4D3\n MKlR = skBL - si3g\n if yzQ0 <= 0.0 or MKlR <= 0.0:\n return 0.0\n C7_8 = yzQ0 * MKlR\n cxuF = (jz... | [
"0.79057753",
"0.7175148",
"0.71492374",
"0.70704156",
"0.7053159",
"0.70276463",
"0.7016224",
"0.6985986",
"0.6979984",
"0.69235396",
"0.690006",
"0.68963265",
"0.68865",
"0.6863687",
"0.6804186",
"0.6796538",
"0.678366",
"0.6772999",
"0.6761193",
"0.6757648",
"0.67496437",
... | 0.6505288 | 44 |
Gets an Upcoming Action. | def OKfl(YKHO, B5PH: str, q2LX: str, zGUQ: str, uJjO: str='me', **B2fa: Any) -> nC76:
KVtY = {401: lhwm, 404: llBy, 409: DKDz, 304: AVtL}
KVtY.update(B2fa.pop('error_map', {}) or {})
kkzV = B2fa.pop('headers', {}) or {}
Vlb9 = B2fa.pop('params', {}) or {}
Emd4: urG6[nC76] = B2fa.pop('cls', None)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XeOP(YKHO, mWFP: str) -> 'UpnpAction':\n return YKHO.actions.get(mWFP, None)",
"def AMEM(YKHO) -> 'Action':\n QTBn = YKHO.env.get_state(agent_name=YKHO.name)\n XeOP = YKHO._get_action(dIw3(QTBn))\n return XeOP",
"def XeOP(YKHO, mWFP: str) -> 'UpnpAction':\n return YKHO.actions[mWFP]",
"def... | [
"0.6305009",
"0.62984365",
"0.61977816",
"0.61183363",
"0.60785896",
"0.60495156",
"0.6026252",
"0.60106826",
"0.5996033",
"0.5986893",
"0.5924939",
"0.5924939",
"0.5924939",
"0.5910691",
"0.5883306",
"0.58322227",
"0.5829576",
"0.58051705",
"0.57946754",
"0.57946754",
"0.578... | 0.5973898 | 10 |
Generate random colors. To get visually distinct colors, generate them in HSV space then convert to RGB. | def aw6y(ywwl, fBVY=True):
asva = 1.0 if fBVY else 0.7
Cd_s = [(YRbF / ywwl, 1, asva) for YRbF in range(ywwl)]
Jw9H = list(map(lambda Z9rn: h478.hsv_to_rgb(*Z9rn), Cd_s))
tuKI.seed(8888)
tuKI.shuffle(Jw9H)
return Jw9H | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hvFE():\n Wr7U = 0.618033988749895\n MKlR = oyIN.random.rand()\n MKlR += Wr7U\n MKlR %= 1.0\n return h478.hsv_to_rgb(MKlR, 0.7, 0.9)",
"def gOt5(YKHO):\n return [qukk(0, 255) / 255.0 for bGrB in range(3)]",
"def Q5jr():\n Mkmy = tuKI.randint(0, 255)\n Oa1e = tuKI.randint(0, 255)\n ... | [
"0.80079985",
"0.78964853",
"0.78836304",
"0.77853537",
"0.7744173",
"0.771987",
"0.76658183",
"0.7602383",
"0.7532667",
"0.749308",
"0.747088",
"0.7435598",
"0.74303186",
"0.74297434",
"0.7413811",
"0.7398812",
"0.73903185",
"0.7381925",
"0.73613316",
"0.7360501",
"0.7346236... | 0.7304981 | 31 |
Get connected dbus interface. | async def fixture_dbus_interface(VOOz: MessageBus) -> Jk49:
UUrb = Jk49('/org/freedesktop/NetworkManager/Devices/1')
await UUrb.connect(VOOz)
yield UUrb | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jGqY(YKHO, sH8T, YmHP):\n wJul = YKHO.bus.get_object(YKHO.NM_SERVICE_NAME, sH8T)\n M4N3 = d2t1.Interface(wJul, YmHP)\n return (M4N3, OkAc(M4N3))",
"def whPp(YKHO, YEnM, wohN):\n return getattr(YEnM, wohN)",
"def NMoC(YKHO):\n return YKHO.connection.get_network_interface(YKHO.id)",
"def UIQ... | [
"0.72376823",
"0.7128272",
"0.7056261",
"0.68890685",
"0.68890685",
"0.68890685",
"0.68890685",
"0.68890685",
"0.68890685",
"0.68890685",
"0.68890685",
"0.68890685",
"0.68890685",
"0.68890685",
"0.68890685",
"0.68890685",
"0.68890685",
"0.68890685",
"0.68890685",
"0.68890685",
... | 0.63183194 | 30 |
Returns the iris dataset as (train_x, train_y), (test_x, test_y). | def UlWi(PqEP='Species'):
rrl5 = ZylS.keras.utils.get_file(LM93.split('/')[-1], LM93)
eH4Y = ZylS.keras.utils.get_file(ruq7.split('/')[-1], ruq7)
EvQg = rLdf.read_csv(rrl5, names=DCH0, header=0)
nzV8, OJCd = (EvQg, EvQg.pop(PqEP))
QOe9 = rLdf.read_csv(eH4Y, names=DCH0, header=0)
BVu8, PdIf = (QO... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mLPe():\n Ty8a = gMbG.load_iris()\n nPrm = Ty8a['data']\n pan_ = Ty8a['target']\n nPrm = oyIN.array([[0, 0], [0, 1], [1, 0], [1, 1]])\n pan_ = oyIN.array([0, 1, 1, 0])\n ywwl, E3D9 = nPrm.shape\n qc42 = oyIN.ones((ywwl, E3D9 + 1))\n qc42[:, 1:] = nPrm\n print('-----------------------... | [
"0.8254849",
"0.7785476",
"0.77149874",
"0.73897415",
"0.7318375",
"0.7135033",
"0.70486",
"0.70200354",
"0.6972516",
"0.6912202",
"0.6906828",
"0.6882462",
"0.6606793",
"0.66040796",
"0.6536538",
"0.65305966",
"0.6526278",
"0.6505371",
"0.6493021",
"0.6457295",
"0.6443025",
... | 0.62765354 | 41 |
Recursively remove invalid values like NaN and Infinity Returns true if the value should be deleted | def OKv2(Ty9i):
if isinstance(Ty9i, dict):
for H5ew, BWXx in Ty9i.items():
if OKv2(BWXx):
del Ty9i[H5ew]
return False
elif isinstance(Ty9i, list):
for YRbF in range(len(Ty9i) - 1, -1, -1):
if OKv2(Ty9i[YRbF]):
del Ty9i[YRbF]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tlsQ(BWXx):\n if BWXx == -9999:\n BWXx = oyIN.NaN\n return BWXx",
"def YXKr(AIu6):\n UDhb = [Jyyj for Jyyj in AIu6 if isinstance(AIu6[Jyyj], float)]\n for Jyyj in UDhb:\n if oyIN.isnan(AIu6[Jyyj]):\n del AIu6[Jyyj]",
"def x0SS(YRbF, c4yI=0):\n YRbF[XTiz.isnan(YRbF)] ... | [
"0.6510581",
"0.6231513",
"0.5957895",
"0.58779377",
"0.5858583",
"0.58581805",
"0.5834393",
"0.58106256",
"0.5777526",
"0.5775496",
"0.5761125",
"0.57573783",
"0.57512736",
"0.5733095",
"0.57217985",
"0.56955045",
"0.5689685",
"0.56677324",
"0.56501245",
"0.56404006",
"0.563... | 0.7306667 | 0 |
Recursively fetches a list of file paths with the specified extension in a path | def QVTd(pmON, Fst3='bson.gz'):
RRlC = []
for Mkmy, Csk6, eHNT in Hy7s.walk(pmON):
for Ux0P in eHNT:
if Ux0P[(len(Fst3) + 1) * -1:] == '.' + Fst3:
RRlC.append(Hy7s.path.join(Mkmy, Ux0P))
return RRlC | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UNPZ(pmON, Fst3):\n vC9B = []\n for tk5Y, AQSv, RRlC in Hy7s.walk(pmON):\n for eHNT in RRlC:\n if eHNT.endswith(Fst3):\n vC9B.append(Hy7s.path.join(tk5Y, eHNT))\n return vC9B",
"def tyg7(pmON: str, Fst3: str, znBS=True):\n return [eHNT for eHNT in SC2F.glob(pmON +... | [
"0.80777",
"0.79504615",
"0.78955233",
"0.78641826",
"0.776177",
"0.77617353",
"0.77171016",
"0.7710632",
"0.7695568",
"0.76880413",
"0.7680596",
"0.76678854",
"0.7624113",
"0.7619666",
"0.75660163",
"0.753771",
"0.74979556",
"0.7475187",
"0.7470479",
"0.74532473",
"0.7428399... | 0.7641839 | 12 |
Set all values to Embed.Empty to avoid keyerrors. | def z5hh(Mkk7: dict) -> dict:
try:
hGN5 = Mkk7['content']
except KeyError:
hGN5 = ''
try:
V8Mb = Mkk7['embed']
except KeyError:
V8Mb = Mkk7
if 'type' not in V8Mb:
V8Mb['type'] = 'rich'
if 'timestamp' in V8Mb:
V8Mb['timestamp'] = tNAa.Empty
retu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UWU9(YKHO):\n for G1Hx, Ty9i in YKHO.iteritems():\n Ty9i.set_null()",
"def lsmZ(YKHO):\n YKHO.values = {}",
"def jlxd(YKHO):\n YKHO.word_embeddings.weight.data.fill_(0)\n YKHO.word_embeddings.weight.shared = True\n YKHO.position_embeddings.weight.data.fill_(0)\n YKHO.position_embed... | [
"0.6973339",
"0.68614143",
"0.68535775",
"0.68535775",
"0.6757465",
"0.6757465",
"0.673592",
"0.6536123",
"0.65115887",
"0.6496917",
"0.6453075",
"0.6451095",
"0.64329636",
"0.6394713",
"0.63613856",
"0.6359597",
"0.63524854",
"0.6334797",
"0.6308922",
"0.625528",
"0.62364215... | 0.0 | -1 |
A view that renders current bookings | def q7CD(QePW):
return _1tc(QePW, 'booking/booking.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cdhY():\n if c5ow.UserType == 'ADMIN':\n GXqQ = NCls.session.query(xVxx).all()\n return TvZl('myBooking.html', bookings=GXqQ, car_coordinates=fRFq)\n else:\n return (TvZl('errors/401.html'), 401)",
"def q7CD(CBIr, o6yu):\n return chxx(CBIr, o6yu.game)",
"def o6yu(QePW):\n r... | [
"0.7488755",
"0.7191162",
"0.7122668",
"0.7032598",
"0.6968488",
"0.6923512",
"0.68678075",
"0.6828409",
"0.67799604",
"0.6706567",
"0.6703224",
"0.661159",
"0.66026133",
"0.6572106",
"0.6440003",
"0.6425306",
"0.6334242",
"0.6333207",
"0.63273734",
"0.6325016",
"0.6312738",
... | 0.7160993 | 2 |
Computes the precision for the specified values of k | def vjyh(hlel, pan_, hz5a=(1,)):
Gq8e = max(hz5a)
Ep8u = pan_.size(0)
bGrB, nvEb = hlel.topk(Gq8e, 1, True, True)
nvEb = nvEb.t()
gXXc = nvEb.eq(pan_.view(1, -1).expand_as(nvEb))
Ylbp = []
for G1Hx in hz5a:
R2Dg = gXXc[:G1Hx].view(-1).float().sum(0, keepdim=True)
Ylbp.append(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhd_(u5Ef, G1Hx):\n return len(u5Ef) / G1Hx",
"def sEak(Mkmy, G1Hx):\n assert G1Hx >= 1\n Mkmy = oyIN.asarray(Mkmy)[:G1Hx]\n return oyIN.mean(Mkmy)",
"def sEak(YKHO, G1Hx):\n fdMZ = YKHO.pred_rankings.rdd.map(lambda SjLr: (SjLr[2], SjLr[1]))\n Wbxz = rRQi(fdMZ)\n return Wbxz.precisionA... | [
"0.8003303",
"0.7974974",
"0.7973838",
"0.7941408",
"0.78644186",
"0.7804143",
"0.7707982",
"0.76218164",
"0.75933",
"0.75614214",
"0.75204575",
"0.74303335",
"0.7412347",
"0.7376026",
"0.7374732",
"0.7321644",
"0.72547084",
"0.72369593",
"0.72281915",
"0.7204618",
"0.7137449... | 0.0 | -1 |
Return the name, url, and price of a portfolio | def HSCd(G7vu):
try:
JXw3 = G7vu.find('a', class_='shared-item_cards-item_name_component__itemNameLink')
mWFP = JXw3.text
bD7m = str(JXw3).split('href="')[1].split('" tabindex')[0]
turI = G7vu.find('div', class_='shared-item_cards-price_component__root')
hI0L = int(turI.text.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F0NY(rhJQ: Text) -> HVIF.Portfolio:\n wSG7 = fPyy()\n return wSG7[rhJQ]",
"def CgRQ(HVIF, Sm0u):\n if not jFVZ(HVIF):\n k8wH.echo(\"Portfolio {} doesn't exists\".format(HVIF))\n HwRy.exit(0)\n a7_t(HVIF, Sm0u)",
"def HVIF(YKHO):\n bD7m = YKHO.base_url + '/v1/accounts/' + YKHO.a... | [
"0.70077294",
"0.6845446",
"0.67245674",
"0.6674146",
"0.66132116",
"0.651897",
"0.63995856",
"0.63976544",
"0.6395882",
"0.62734395",
"0.6237056",
"0.6222404",
"0.61436176",
"0.6132999",
"0.61279696",
"0.6108425",
"0.6105153",
"0.610245",
"0.6069334",
"0.6066766",
"0.6066345... | 0.71172214 | 0 |
Create Poker objects from a string of two hands. Where Player 1 has the first 5 cards and Player 2 has the other 5 cards. | def raa8(oMjv):
CBSv = GN8v(oMjv.split()[:5])
IiK0 = GN8v(oMjv.split()[5:])
return (CBSv, IiK0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sWMp(zFiD):\n EOVu = zFiD.split(' ')[:5]\n zzpC = zFiD.split(' ')[5:]\n for Z9rn in EOVu:\n dxhl = F1Hz(Z9rn[0], Z9rn[1])\n EOVu[EOVu.index(Z9rn)] = dxhl\n ZnXF = MsG1(*EOVu)\n for Z9rn in zzpC:\n dxhl = F1Hz(Z9rn[0], Z9rn[1])\n zzpC[zzpC.index(Z9rn)] = dxhl\n IXCr... | [
"0.7493887",
"0.63930315",
"0.62111557",
"0.6188729",
"0.6115629",
"0.60802007",
"0.60185814",
"0.5965128",
"0.5891978",
"0.5823926",
"0.57829773",
"0.57719636",
"0.5753237",
"0.57346886",
"0.5729828",
"0.5713193",
"0.56911176",
"0.56788635",
"0.5654767",
"0.5647444",
"0.5616... | 0.79513 | 0 |
Load Pretrained VGG Model into TensorFlow. | def LbAo(cb_Q, VyBP):
lFgm = 'vgg16'
kvAN = 'image_input:0'
jlSf = 'keep_prob:0'
XYEU = 'layer3_out:0'
Fq6D = 'layer4_out:0'
FI61 = 'layer7_out:0'
pNZh = ZylS.saved_model.loader.load(cb_Q, [lFgm], VyBP)
njad = cb_Q.graph.get_tensor_by_name(kvAN)
sMyr = cb_Q.graph.get_tensor_by_name(j... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LbAo(cb_Q, VyBP):\n lFgm = 'vgg16'\n kvAN = 'image_input:0'\n jlSf = 'keep_prob:0'\n XYEU = 'layer3_out:0'\n Fq6D = 'layer4_out:0'\n FI61 = 'layer7_out:0'\n ZylS.saved_model.loader.load(cb_Q, [lFgm], VyBP)\n pNZh = ZylS.get_default_graph()\n input = pNZh.get_tensor_by_name(kvAN)\n ... | [
"0.79139525",
"0.78912765",
"0.7886453",
"0.7886453",
"0.78115135",
"0.77844846",
"0.7764394",
"0.7755438",
"0.7742855",
"0.773247",
"0.77111346",
"0.77089316",
"0.7696031",
"0.76932967",
"0.7681593",
"0.76731616",
"0.7656345",
"0.7629141",
"0.76261705",
"0.7620557",
"0.76192... | 0.7560229 | 25 |
Unit test for get_cis method in ClassificationConfidenceIntervals class. | def UHXW(P4s4, Bk4e, vYLb, j2DZ, O3ch, bDO6, wcyX):
umks = Y1kj(sample_labels=P4s4, sample_predictions=Bk4e, population_size=vYLb, population_flagged_count=j2DZ, confidence_level=O3ch, exact_precision=bDO6)
umks.get_cis(n_iters=100, plot_filename=wcyX) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NUP0(P4s4, Bk4e, vYLb, j2DZ, O3ch, bDO6, eQ2E, wcyX):\n umks = Y1kj(sample_labels=P4s4, sample_predictions=Bk4e, population_size=vYLb, population_flagged_count=j2DZ, confidence_level=O3ch, exact_precision=bDO6)\n with trZe.raises(Exception):\n umks.get_cis(n_iters=eQ2E, plot_filename=wcyX)",
"de... | [
"0.7123114",
"0.6492022",
"0.6428499",
"0.6209679",
"0.61017895",
"0.59549254",
"0.5820912",
"0.5806832",
"0.5798583",
"0.57875097",
"0.57285035",
"0.572322",
"0.5715752",
"0.5713375",
"0.5689734",
"0.56812143",
"0.5678895",
"0.56759006",
"0.5669399",
"0.5661509",
"0.5634726"... | 0.7500041 | 0 |
Unit test for bad inputs to get_cis method in ClassificationConfidenceIntervals class. | def NUP0(P4s4, Bk4e, vYLb, j2DZ, O3ch, bDO6, eQ2E, wcyX):
umks = Y1kj(sample_labels=P4s4, sample_predictions=Bk4e, population_size=vYLb, population_flagged_count=j2DZ, confidence_level=O3ch, exact_precision=bDO6)
with trZe.raises(Exception):
umks.get_cis(n_iters=eQ2E, plot_filename=wcyX) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LH18(YKHO):\n BkYD = QyXt(URok(2, YKHO.SAMPLES, YKHO.CHANNELS_X), axes=[[0, 1], YKHO.dat_x.axes[0], YKHO.dat_x.axes[1]], names=['class', 'time', 'channel'], units=['#', 'ms', '#'])\n with YKHO.assertRaises(AssertionError):\n yjNL(BkYD, YKHO.dat_x)",
"def LjFi(P4s4, Bk4e, vYLb, j2DZ, O3ch, bDO6):... | [
"0.6647879",
"0.64406615",
"0.643325",
"0.63890284",
"0.6238634",
"0.62334114",
"0.6204553",
"0.6183838",
"0.61630225",
"0.611956",
"0.6091084",
"0.5999202",
"0.5957886",
"0.5936374",
"0.591442",
"0.5912285",
"0.5841394",
"0.5822136",
"0.58169913",
"0.5808303",
"0.57969064",
... | 0.771414 | 0 |
__init__ should return instance of SimilarItem data model. | def G1of(tmtU):
DHlI = FZto(tmtU)
assert isinstance(DHlI, FZto)
assert isinstance(DHlI.tree, UD_O)
assert isinstance(DHlI.dao, aYE0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, ZfUD):\n YKHO._item = ZfUD",
"def kNmo(tmtU, VoII):\n DHlI = LBiy(tmtU, VoII, test='True')\n assert isinstance(DHlI, LBiy)\n assert isinstance(DHlI._dtm_data_model, FZto)",
"def FIMM(YKHO, YCtt):\n nLaE = y2U9('sqlite:///' + YCtt + '/lastfm_similars.db')\n Pe9W = 'SELECT tid, t... | [
"0.6312286",
"0.624031",
"0.6201038",
"0.6175404",
"0.6156382",
"0.61397594",
"0.5984395",
"0.59287685",
"0.59260195",
"0.5832971",
"0.5751438",
"0.57471055",
"0.5729449",
"0.57052535",
"0.5687545",
"0.5669332",
"0.5650945",
"0.5641832",
"0.56240946",
"0.5618417",
"0.56121624... | 0.62958324 | 1 |
__init__() should return instance of SimilarItem data controller. | def kNmo(tmtU, VoII):
DHlI = LBiy(tmtU, VoII, test='True')
assert isinstance(DHlI, LBiy)
assert isinstance(DHlI._dtm_data_model, FZto) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, ZfUD):\n YKHO._item = ZfUD",
"def FIMM(YKHO, ZfUD, Z7L0: UniFiController) -> None:\n YKHO._item = ZfUD\n YKHO.controller = Z7L0\n YKHO.controller.entities[YKHO.DOMAIN][YKHO.TYPE].add(YKHO.key)",
"def FIMM(YKHO, ZfUD):\n object.__init__(YKHO)\n YKHO.item = ZfUD",
"def FIMM(YKH... | [
"0.634841",
"0.62779105",
"0.61290556",
"0.5941088",
"0.5872767",
"0.58247197",
"0.57871765",
"0.57871765",
"0.5756997",
"0.57424325",
"0.5690627",
"0.56626695",
"0.5657913",
"0.5627333",
"0.5622479",
"0.56071895",
"0.5601769",
"0.55877054",
"0.5577263",
"0.556181",
"0.555760... | 0.6453135 | 0 |
Render the homepage template on the / route | def C_QL():
return TvZl('index.html', title='Welcome') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C_QL():\n return TvZl('home.html')",
"def C_QL():\n return TvZl('home.html')",
"def C_QL():\n return TvZl('home.html')",
"def C_QL():\n return TvZl('home.html')",
"def C_QL():\n return TvZl('homepage.html')",
"def kZiy():\n return TvZl('homepage.html')",
"def kZiy():\n return T... | [
"0.85673344",
"0.8563182",
"0.8539366",
"0.8539366",
"0.8535036",
"0.85138595",
"0.85138595",
"0.848972",
"0.8456827",
"0.84357065",
"0.8424191",
"0.8424191",
"0.8424191",
"0.8424191",
"0.8424191",
"0.8415442",
"0.8412444",
"0.833204",
"0.83252907",
"0.8321982",
"0.8313638",
... | 0.8311824 | 22 |
The id of the token. | def oFhs(YKHO) -> qe4Y.Input[str]:
return qe4Y.get(YKHO, 'token_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oFhs(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'token_id')",
"def id(YKHO):\n return YKHO.session_token",
"def oFhs(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'token_id')",
"def oFhs(YKHO):\n NArs = {'eauth': 'pam', 'username': YKHO.__user, 'password': YKHO.__password}\n... | [
"0.8502329",
"0.83297414",
"0.8180704",
"0.78832966",
"0.78451294",
"0.78418",
"0.76626456",
"0.7571801",
"0.75537425",
"0.75537425",
"0.75344646",
"0.75150394",
"0.75150394",
"0.7501773",
"0.7446086",
"0.7410956",
"0.74066675",
"0.73462296",
"0.73462296",
"0.7337432",
"0.731... | 0.84825546 | 1 |
The id of the token. | def oFhs(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'token_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oFhs(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'token_id')",
"def oFhs(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'token_id')",
"def id(YKHO):\n return YKHO.session_token",
"def oFhs(YKHO):\n NArs = {'eauth': 'pam', 'username': YKHO.__user, 'password': YKHO.__password}\n hG... | [
"0.8502329",
"0.84825546",
"0.83297414",
"0.78832966",
"0.78451294",
"0.78418",
"0.76626456",
"0.7571801",
"0.75537425",
"0.75537425",
"0.75344646",
"0.75150394",
"0.75150394",
"0.7501773",
"0.7446086",
"0.7410956",
"0.74066675",
"0.73462296",
"0.73462296",
"0.7337432",
"0.73... | 0.8180704 | 3 |
The id of the token. | def oFhs(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'token_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oFhs(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'token_id')",
"def id(YKHO):\n return YKHO.session_token",
"def oFhs(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'token_id')",
"def oFhs(YKHO):\n NArs = {'eauth': 'pam', 'username': YKHO.__user, 'password': YKHO.__password}\n ... | [
"0.84825546",
"0.83297414",
"0.8180704",
"0.78832966",
"0.78451294",
"0.78418",
"0.76626456",
"0.7571801",
"0.75537425",
"0.75537425",
"0.75344646",
"0.75150394",
"0.75150394",
"0.7501773",
"0.7446086",
"0.7410956",
"0.74066675",
"0.73462296",
"0.73462296",
"0.7337432",
"0.73... | 0.8502329 | 0 |
Take a pandas DataFrame and output a latex table. | def mH0n(jQ3Z, av9l, leAC=None, jrsJ=False):
oAb3.Path(av9l).mkdir(parents=True, exist_ok=True)
if leAC:
U9_c = av9l + '/_describe_' + leAC + '.tex'
else:
U9_c = av9l + '/_describe.tex'
YDwv = len(jQ3Z.columns)
with open(U9_c, 'w') as hlel:
hlel.writelines(['\\documentclass{a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SM2e(jQ3Z, KzVY=None, ZSt6=None):\n with rLdf.option_context('max_colwidth', None):\n MiMA = jQ3Z.to_latex(longtable=True, index=False, escape=False, caption=KzVY, column_format=ZSt6)\n wvEv = QGpr.HTMLParser()\n J_Es = QGpr.parse(kJm3(MiMA.replace('\\\\n', '')), wvEv)\n tk5Y = J_Es.getroot(... | [
"0.7975672",
"0.79681814",
"0.7957344",
"0.77535725",
"0.7608613",
"0.7529808",
"0.7523631",
"0.73867685",
"0.71633416",
"0.70936334",
"0.70788",
"0.70461386",
"0.7019428",
"0.69920844",
"0.6927769",
"0.6921575",
"0.6880534",
"0.68372947",
"0.6791659",
"0.67297965",
"0.672931... | 0.6896344 | 16 |
Checks if the game board is filled or if there are still empty boxes | def sf28(iBIi):
for WKvO in range(3):
for LVAh in range(3):
if not iBIi[0, WKvO, LVAh] and (not iBIi[1, WKvO, LVAh]):
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LWCs(YKHO):\n for LVAh in range(8):\n for WKvO in range(8):\n if YKHO.board[WKvO][LVAh] == KAvf:\n return False\n return True",
"def LWCs(YKHO):\n for LVAh in range(8):\n for WKvO in range(8):\n if YKHO.board[WKvO][LVAh] == KAvf:\n re... | [
"0.8089506",
"0.8089506",
"0.79582924",
"0.7952722",
"0.7904227",
"0.78829455",
"0.77991104",
"0.7712207",
"0.76492923",
"0.76438254",
"0.7621512",
"0.7566425",
"0.7563544",
"0.7548576",
"0.754565",
"0.7534638",
"0.7533311",
"0.7476943",
"0.7474061",
"0.746758",
"0.74584115",... | 0.73484975 | 31 |
Calculates distance in nautical miles between two geographical points. | def AUp_(LiyW, HYi2, YH1M, Hmdc):
A3Vt = 6373.0
LiyW = Y_1E(LiyW)
HYi2 = Y_1E(HYi2)
YH1M = Y_1E(YH1M)
Hmdc = Y_1E(Hmdc)
H91H = Hmdc - HYi2
n_9K = YH1M - LiyW
jzdc = YUNn(n_9K / 2) ** 2 + YhSR(LiyW) * YhSR(YH1M) * YUNn(H91H / 2) ** 2
Z9rn = 2 * vwZf(PZyS(jzdc), PZyS(1 - jzdc))
Ayf... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NRgP(GV2Y, vtQY, bCQA, uEdW):\n igSk = epAf.radians(GV2Y)\n TGuP = epAf.radians(bCQA)\n GgQG = epAf.radians(vtQY)\n tk0B = epAf.radians(uEdW)\n A3Vt = 3956\n CQo4 = epAf.acos(epAf.sin(igSk) * epAf.sin(TGuP) + epAf.cos(igSk) * epAf.cos(TGuP) * epAf.cos(tk0B - GgQG)) * A3Vt * 1.609344\n retu... | [
"0.78135514",
"0.75769854",
"0.75348395",
"0.7432418",
"0.7397327",
"0.73312753",
"0.7250708",
"0.72085106",
"0.718829",
"0.7175027",
"0.71351814",
"0.71005726",
"0.7072555",
"0.70621836",
"0.70601606",
"0.70444465",
"0.7030461",
"0.7016486",
"0.70141447",
"0.70139545",
"0.70... | 0.0 | -1 |
fiksvm_load_model(model_file_name) > model Load a fik_approx_model from model_file_name and return. | def qRwy(wgqG):
C3ST = uVKq.fiksvm_load_model(wgqG)
if not C3ST:
print("can't open model file %s" % wgqG)
return None
C3ST = FDYr(C3ST)
return C3ST | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uyMl(Ux0P):\n pass",
"def uyMl(YKHO, ZGE9):\n gIsw = 'best_models\\\\' + ZGE9 + '.pkl'\n print('Loading model from: ' + gIsw)\n YKHO.model_name = ZGE9\n YKHO.model = k6eJ.load(gIsw)\n print('Model loaded successfully!')",
"def uyMl(YKHO, PXIK):\n with open(PXIK + '.pkl', 'rb') as Fwbn:... | [
"0.73786926",
"0.73036426",
"0.7177104",
"0.71646327",
"0.71439224",
"0.7082096",
"0.70801234",
"0.7076324",
"0.7076324",
"0.6996136",
"0.69828093",
"0.6947313",
"0.69400454",
"0.69350815",
"0.69350815",
"0.69350815",
"0.69350815",
"0.69350815",
"0.69350815",
"0.69109917",
"0... | 0.8267487 | 0 |
Euler and PEC should be equal if forces are not recomputed. | def kPMW(YKHO):
YRbF = ndKX(useXSPH=False)
tTpl = L_wX()
JRYC, VAP5 = YKHO.some_particle(qvOa.Fluid)
oB8n = jth9(VAP5)
VAP5 = YRbF.predict(JRYC, VAP5, 0)
VAP5 = YRbF.correct(JRYC, VAP5, 0)
oB8n = tTpl.predict(JRYC, oB8n)
oB8n = tTpl.correct(JRYC, oB8n)
YKHO.assertAlmostEqual(VAP5['x'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f_im(YKHO):\n xUg0 = 0\n QqqK = 0\n YKHO.forces = oyIN.zeros((len(YKHO.connections), 3))\n WkOB = set()\n Da_j = set()\n for WhQ6 in YKHO.connections:\n Ayfi = oyIN.sqrt(((YKHO.locations - YKHO.locations[WhQ6 - 1]) ** 2).sum(axis=1))\n for W0I0 in YKHO.ref_dist_bond[WhQ6]:\n ... | [
"0.61420876",
"0.6137344",
"0.60019636",
"0.5909043",
"0.5831619",
"0.57511395",
"0.57310957",
"0.57274556",
"0.5675574",
"0.56633645",
"0.5660623",
"0.5602169",
"0.55993134",
"0.55867803",
"0.555538",
"0.555531",
"0.55430686",
"0.5495297",
"0.5491946",
"0.5491946",
"0.546304... | 0.69965774 | 0 |
Gets the angle that forms the branch at segment. Sees further by max_n segments. If there is another branch inside these segments, measures the angle only up to that branching point. | def BYPJ(hTWD, Mkmy, m7Yz=15, NX3D=0):
GZiu = [hTWD.children[0], hTWD.children[1]]
hLRM = hTWD.get(Mkmy)
for YRbF in Ni9Y(m7Yz):
FohR = [Fg_i.get(Mkmy) for Fg_i in GZiu]
if YRbF == NX3D:
TRVV = FohR
if len(GZiu[0].children) != 1 or len(GZiu[1].children) != 1:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YylR(YKHO):\n iArr = lNLu.createFromSegment(YKHO)\n return iArr.angle()",
"def YylR(YKHO, Elif: 'Segment', LZhb: ty.Optional[int]=None) -> float:\n if not isinstance(Elif, GoRQ):\n raise TypeError('The type of \"other\" argument must be \\'Segment\\'.')\n return fygb.segments_angle(YKHO, E... | [
"0.6632644",
"0.63755774",
"0.62070423",
"0.6166351",
"0.6112626",
"0.61026436",
"0.6093827",
"0.6081289",
"0.60624725",
"0.6058935",
"0.60546947",
"0.60310537",
"0.6028049",
"0.6023154",
"0.60154045",
"0.6014195",
"0.6007171",
"0.600415",
"0.5992607",
"0.59425634",
"0.591634... | 0.7359332 | 0 |
String for representing the model object (in Admin site etc.). | def zAg0(YKHO):
return YKHO.parish | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return f'{YKHO.name} object'",
"def zAg0(YKHO):\n return YKHO.object_repr",
"def wHJl(YKHO):\n return '<{}>'.format(YKHO.model_type)",
"def zAg0(YKHO):\n return str(YKHO.obj)",
... | [
"0.80849355",
"0.7840405",
"0.75379914",
"0.74929273",
"0.7423138",
"0.74176884",
"0.7415336",
"0.7348241",
"0.72734416",
"0.7268462",
"0.72420084",
"0.72420084",
"0.7233399",
"0.72273576",
"0.7219989",
"0.7175819",
"0.7175819",
"0.7175819",
"0.71729136",
"0.71516144",
"0.715... | 0.0 | -1 |
String for representing the model object (in Admin site etc.). | def zAg0(YKHO):
return YKHO.site_ref | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return f'{YKHO.name} object'",
"def zAg0(YKHO):\n return YKHO.object_repr",
"def wHJl(YKHO):\n return '<{}>'.format(YKHO.model_type)",
"def zAg0(YKHO):\n return str(YKHO.obj)",
... | [
"0.80849355",
"0.7840405",
"0.75379914",
"0.74929273",
"0.7423138",
"0.74176884",
"0.7415336",
"0.7348241",
"0.72734416",
"0.7268462",
"0.72420084",
"0.72420084",
"0.7233399",
"0.72273576",
"0.7219989",
"0.7175819",
"0.7175819",
"0.7175819",
"0.71729136",
"0.71516144",
"0.715... | 0.0 | -1 |
String for representing the model object (in Admin site etc.). | def zAg0(YKHO):
return YKHO.app_ref | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return f'{YKHO.name} object'",
"def zAg0(YKHO):\n return YKHO.object_repr",
"def wHJl(YKHO):\n return '<{}>'.format(YKHO.model_type)",
"def zAg0(YKHO):\n return str(YKHO.obj)",
... | [
"0.80848616",
"0.7840583",
"0.7536963",
"0.749124",
"0.7422296",
"0.7416443",
"0.74140847",
"0.7347969",
"0.7272467",
"0.7268412",
"0.7240774",
"0.7240774",
"0.72333133",
"0.72251594",
"0.72178864",
"0.7173845",
"0.7173845",
"0.7173845",
"0.7172913",
"0.71498495",
"0.71498495... | 0.0 | -1 |
String for representing the model object (in Admin site etc.). | def zAg0(YKHO):
return 'Added ' + str(YKHO.created_on)[:10] + ' by ' + str(YKHO.author) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return f'{YKHO.name} object'",
"def zAg0(YKHO):\n return YKHO.object_repr",
"def wHJl(YKHO):\n return '<{}>'.format(YKHO.model_type)",
"def zAg0(YKHO):\n return str(YKHO.obj)",
... | [
"0.80849355",
"0.7840405",
"0.75379914",
"0.74929273",
"0.7423138",
"0.74176884",
"0.7415336",
"0.7348241",
"0.72734416",
"0.7268462",
"0.72420084",
"0.72420084",
"0.7233399",
"0.72273576",
"0.7219989",
"0.7175819",
"0.7175819",
"0.7175819",
"0.71729136",
"0.71516144",
"0.715... | 0.0 | -1 |
String for representing the model object (in Admin site etc.). | def zAg0(YKHO):
return YKHO.plot_no | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return f'{YKHO.name} object'",
"def zAg0(YKHO):\n return YKHO.object_repr",
"def wHJl(YKHO):\n return '<{}>'.format(YKHO.model_type)",
"def zAg0(YKHO):\n return str(YKHO.obj)",
... | [
"0.80849355",
"0.7840405",
"0.75379914",
"0.74929273",
"0.7423138",
"0.74176884",
"0.7415336",
"0.7348241",
"0.72734416",
"0.7268462",
"0.72420084",
"0.72420084",
"0.7233399",
"0.72273576",
"0.7219989",
"0.7175819",
"0.7175819",
"0.7175819",
"0.71729136",
"0.71516144",
"0.715... | 0.0 | -1 |
Try to strip '.yaml' file extension and return a name ends with '.json'. | def pjLZ(SFUd):
mWFP, YBcr = Hy7s.path.splitext(SFUd)
if YBcr.lower() != '.yaml':
mWFP = SFUd
return mWFP + '.json' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a0qw(Emd4, qaEx: Path) -> str:\n if qaEx.with_suffix('.json').exists():\n return '.json'\n if qaEx.with_suffix('.yaml').exists():\n return '.yaml'\n if qaEx.with_suffix('.yml').exists():\n return '.yml'\n return ''",
"def yFjF(mWFP):\n return mWFP.replace('/', '_') + '.jso... | [
"0.7013005",
"0.68556875",
"0.6733244",
"0.6650706",
"0.65830386",
"0.65724146",
"0.65566605",
"0.65541154",
"0.653378",
"0.65307343",
"0.6525123",
"0.65142864",
"0.6506552",
"0.65043586",
"0.64901835",
"0.6488333",
"0.6487189",
"0.6486303",
"0.647193",
"0.64536875",
"0.64430... | 0.7037643 | 0 |
Iterator accumulating the outgoing paths from a switch of the large train track, along outgoing branches starting from the specified side. | def criu(YKHO, XO2N, QZSB):
wjRY = YKHO._get_zero_intersection_array()
for JUzv in YKHO._large_tt.outgoing_branches(XO2N, QZSB):
wjRY += YKHO.paths_in_large_branch(JUzv)
yield (JUzv, wjRY) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mTb6(YKHO, XO2N, DyJi, HEZd):\n for jehQ, wjRY in YKHO.accumulate_outgoing_paths(XO2N, HEZd):\n if all(wjRY >= DyJi):\n return DyJi - (wjRY - YKHO.get_intersections(ZIBF, jehQ))",
"def hQP3(YKHO, L7Pz, HEZd):\n XO2N = YKHO._large_tt.branch_endpoint(-L7Pz)\n for JUzv, wjRY in YKHO.a... | [
"0.60960156",
"0.603865",
"0.600686",
"0.593646",
"0.5847103",
"0.58109796",
"0.57068604",
"0.5589993",
"0.5572207",
"0.5570106",
"0.55540615",
"0.5519944",
"0.54818475",
"0.5447168",
"0.5432285",
"0.54067475",
"0.53916466",
"0.5369862",
"0.53687215",
"0.5358982",
"0.52958137... | 0.787286 | 0 |
Return the array of paths outgoing from a large switch on the specified side of an outgoing branch. | def hQP3(YKHO, L7Pz, HEZd):
XO2N = YKHO._large_tt.branch_endpoint(-L7Pz)
for JUzv, wjRY in YKHO.accumulate_outgoing_paths(XO2N, HEZd):
if JUzv == L7Pz:
return wjRY - YKHO.get_intersections(ZIBF, L7Pz) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def criu(YKHO, XO2N, QZSB):\n wjRY = YKHO._get_zero_intersection_array()\n for JUzv in YKHO._large_tt.outgoing_branches(XO2N, QZSB):\n wjRY += YKHO.paths_in_large_branch(JUzv)\n yield (JUzv, wjRY)",
"def mTb6(YKHO, XO2N, DyJi, HEZd):\n for jehQ, wjRY in YKHO.accumulate_outgoing_paths(XO2N,... | [
"0.73317367",
"0.69277513",
"0.68562526",
"0.6411897",
"0.6324013",
"0.607702",
"0.6013069",
"0.5967508",
"0.5941066",
"0.59377414",
"0.57003444",
"0.56148934",
"0.55748296",
"0.55680907",
"0.55505097",
"0.553762",
"0.54689157",
"0.5425604",
"0.54121965",
"0.53900737",
"0.538... | 0.71096694 | 1 |
Generate pseudorandom nonce that is unlikely to repeat. Per `section 3.3`_ of the OAuth 1 RFC 5849 spec. Per `section 3.2.1`_ of the MAC Access Authentication spec. A random 64bit number is appended to the epoch timestamp for both randomness and to decrease the likelihood of collisions. | def kBBd():
return wCZ0(wCZ0(tuKI.getrandbits(64)) + hqie()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zvbt():\n hash = HBct.sha1()\n hash.update(str(ITS7.time()).encode('utf-8'))\n return int.from_bytes(hash.digest()[:2], byteorder=HwRy.byteorder)",
"def ypP6(YKHO):\n return jry1(k6HT(12))",
"def kBBd():\n return hex(SI9y(128))[2:-1]",
"def EZJP():\n return tuKI.getrandbits(64)",
"def... | [
"0.84716207",
"0.84550536",
"0.84408695",
"0.83750093",
"0.8109793",
"0.79775244",
"0.7914965",
"0.78533274",
"0.7820888",
"0.7694995",
"0.7639314",
"0.7616693",
"0.754218",
"0.754218",
"0.75143045",
"0.7378611",
"0.73621535",
"0.7326781",
"0.7305382",
"0.7258615",
"0.7091515... | 0.8160847 | 4 |
Generates a nonguessable OAuth token OAuth (1 and 2) does not specify the format of tokens except that they should be strings of random characters. Tokens should not be guessable and entropy when generating the random characters is important. Which is why SystemRandom is used instead of the default random.choice method... | def LQUb(u54L=30, gLiZ=uAXd):
ADdS = tuKI.SystemRandom()
return ''.join((ADdS.choice(gLiZ) for WKvO in range(u54L))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TQGb():\n mrPm = vIwR.ascii_letters + vIwR.digits\n SuM2 = [tuKI.choice(mrPm) for bGrB in range(64)]\n return ''.join(SuM2)",
"def LQUb():\n Jnqb = lambda: ''.join((tuKI.choice(vIwR.ascii_letters) for bGrB in range(5)))\n return Jnqb() + '-' + Jnqb()",
"def LQUb():\n zZas = 'ABCDEFGHIJKLM... | [
"0.72081864",
"0.7160491",
"0.7092145",
"0.7075171",
"0.69522786",
"0.69438934",
"0.6914173",
"0.686157",
"0.6794187",
"0.6783167",
"0.67649156",
"0.6740141",
"0.6726234",
"0.6717569",
"0.6707837",
"0.67059416",
"0.66993016",
"0.6697167",
"0.66491026",
"0.66129196",
"0.658745... | 0.6823919 | 8 |
Append OAuth params to an existing set of parameters. Both params and oauth_params is must be lists of 2tuples. Per `section 3.5.2`_ and `3.5.3`_ of the spec. | def tk8u(SZIX, NArs):
XIcQ = list(NArs)
XIcQ.extend(SZIX)
XIcQ.sort(key=lambda YRbF: YRbF[0].startswith('oauth_'))
return XIcQ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pu1V(YKHO, *NArs):\n for xqoZ in NArs:\n YKHO.__params += (xqoZ,)",
"def RfBi(YKHO, NArs):\n if YKHO.version:\n NArs['v'] = YKHO.version\n if YKHO.userless:\n NArs['client_id'] = YKHO.client_id\n NArs['client_secret'] = YKHO.client_secret\n else:\n NArs['oauth_t... | [
"0.64466304",
"0.62580615",
"0.6014981",
"0.5982816",
"0.59211487",
"0.590903",
"0.5900321",
"0.5891472",
"0.5873187",
"0.5821652",
"0.573118",
"0.5698209",
"0.5668866",
"0.56627065",
"0.5609159",
"0.55856276",
"0.5472934",
"0.544236",
"0.54151136",
"0.54103464",
"0.5373742",... | 0.8639376 | 0 |
Dummy access token used when an invalid token was supplied. | def GPbk(YKHO):
raise NotImplementedError('Subclasses must implement this function.') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TYuz(YKHO):\n raise NotImplementedError('Subclasses must implement this function.')",
"def NT__(*qIxc, **B2fa):\n return None",
"def ceH_(YKHO):\n KUn3 = TO61()\n QePW = b9AL().get('/api/v1/something', secure=True)\n QePW.META['HTTP_AUTHORIZATION'] = 'bearer invalidtoken'\n jGRS = KUn3.is... | [
"0.7285667",
"0.72061455",
"0.71674997",
"0.714576",
"0.714576",
"0.6922852",
"0.68909824",
"0.6830565",
"0.6819053",
"0.6747923",
"0.67467606",
"0.6727308",
"0.672083",
"0.6699892",
"0.66911495",
"0.6682563",
"0.66501737",
"0.664523",
"0.66416234",
"0.6633195",
"0.6629868",
... | 0.82916725 | 0 |
Retrieves the shared secret associated with the request token. | def zGaM(YKHO, hJxb, eOtH, QePW):
raise NotImplementedError('Subclasses must implement this function.') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vh0A(YKHO):\n return YKHO.config['sharedsecret']",
"def hG2U():\n return RMC9.leader_get(OLET)",
"def e9r0(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'shared_secret')",
"def e9r0(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'shared_secret')",
"def kZ4P(YKHO, hJxb, eOtH, Q... | [
"0.78593624",
"0.7371119",
"0.7271783",
"0.7244838",
"0.69020665",
"0.68880236",
"0.68228054",
"0.66745317",
"0.6651093",
"0.66377324",
"0.6568407",
"0.65648645",
"0.6564118",
"0.65268725",
"0.6522492",
"0.65142727",
"0.65127397",
"0.65012586",
"0.6461275",
"0.64405257",
"0.6... | 0.7254845 | 3 |
Validates that supplied client key is a registered and valid client. | def zrMq(YKHO, hJxb, QePW):
raise NotImplementedError('Subclasses must implement this function.') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f93v(YKHO, H5ew):\n assert not t2pA(YKHO.lti_consumer).check_client_key(H5ew)",
"def shUL(YKHO):\n H5ew = YKHO.lti_consumer.consumer_key\n assert t2pA(YKHO.lti_consumer).check_client_key(H5ew)",
"def xULW(YKHO, hJxb):\n LSh8, CN9P = YKHO.client_key_length\n return set(hJxb) <= YKHO.safe_char... | [
"0.75568795",
"0.7231119",
"0.69933414",
"0.65973175",
"0.6449369",
"0.6328188",
"0.6309812",
"0.6151477",
"0.61261004",
"0.61261004",
"0.61252385",
"0.6105458",
"0.60579425",
"0.60315865",
"0.6019625",
"0.60051",
"0.59987324",
"0.5991856",
"0.5985411",
"0.597275",
"0.594594"... | 0.803761 | 0 |
Validates that supplied access token is registered and valid. | def JKQx(YKHO, hJxb, eOtH, QePW):
raise NotImplementedError('Subclasses must implement this function.') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JKQx(YKHO):\n XdDx = {'Authorization': 'OAuth ' + YKHO.access_token}\n geh0 = G4JS.get(Wt9L, headers=XdDx)\n if geh0.ok:\n return\n YKHO.get_twitch_app_access_token()",
"def dvle(YKHO, NT__, uJjO=None):\n geh0, nPrm = YKHO.request_token_validation(NT__)\n nPrm = YKHO.get_data_from_va... | [
"0.71729016",
"0.7064601",
"0.7034409",
"0.70279187",
"0.70023125",
"0.69490474",
"0.68608457",
"0.68334544",
"0.6734302",
"0.6721909",
"0.6675652",
"0.66516495",
"0.6647581",
"0.6647211",
"0.6644951",
"0.66258603",
"0.66175973",
"0.6601874",
"0.6589919",
"0.657511",
"0.65293... | 0.73364776 | 0 |
Initialize a client with commonly used attributes. | def FIMM(YKHO, zb3C, DTaW=Z4Pu, sOU6='Bearer', NT__=None, GQl3=None, J3eH=None, k1jj=None, eOtH=None, **B2fa):
YKHO.client_id = zb3C
YKHO.default_token_placement = DTaW
YKHO.token_type = sOU6
YKHO.access_token = NT__
YKHO.refresh_token = GQl3
YKHO.mac_key = J3eH
YKHO.mac_algorithm = k1jj
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Pntg(YKHO):\n YKHO.client = i9zE()",
"def FIMM(YKHO, x0hE):\n YKHO.client = x0hE\n YKHO.initialize()",
"def FIMM(YKHO, **B2fa):\n YKHO.client = i9zE(**B2fa)",
"def FIMM(YKHO, x0hE) -> None:\n YKHO._client = x0hE",
"def FIMM(YKHO, x0hE) -> None:\n YKHO._client = x0hE",
"def FIMM(YKHO... | [
"0.79001737",
"0.788767",
"0.7850475",
"0.74959725",
"0.74959725",
"0.7476858",
"0.7476858",
"0.7476858",
"0.72943836",
"0.72943836",
"0.72943836",
"0.72943836",
"0.72943836",
"0.72943836",
"0.72943836",
"0.72943836",
"0.72943836",
"0.72943836",
"0.7241687",
"0.71793306",
"0.... | 0.0 | -1 |