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 |
|---|---|---|---|---|---|---|
Convert an image from XYZ color space to RGB color space | def yYbR(LNo8: tf.Tensor) -> ZylS.Tensor:
WKvO, LVAh, epBp = ZylS.unstack(LNo8, axis=-1)
w7_P = WKvO / 100
DIi8 = LVAh / 100
p9ny = epBp / 100
kDk3 = w7_P * 3.2406 + DIi8 * -1.5372 + p9ny * -0.4986
xsx2 = w7_P * -0.9689 + DIi8 * 1.8758 + p9ny * 0.0415
rpeW = w7_P * 0.0557 + DIi8 * -0.204 + p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YDCE(RM3a, qtgM, Oa0a, npm9, hTtR='CAT02', oxbn=None):\n E3D9 = eqQE(UqRx(apUU(qtgM)), UqRx(apUU(Oa0a)), transform=hTtR)\n lvaY = Sk3l(E3D9, RM3a)\n swaY = Sk3l(npm9, lvaY)\n if oxbn is not None:\n swaY = oxbn(swaY)\n return swaY",
"def QnV5(YKHO):\n Exmq = YKHO.z[:, :, dxBm]\n re... | [
"0.6828028",
"0.68103015",
"0.68066865",
"0.6763418",
"0.66843706",
"0.66742265",
"0.66261303",
"0.65840024",
"0.6561155",
"0.6552539",
"0.64690375",
"0.645088",
"0.63681024",
"0.6365761",
"0.63621247",
"0.6326144",
"0.6306346",
"0.6306079",
"0.6283632",
"0.6256421",
"0.62433... | 0.7146014 | 0 |
Convert an image from RGB color space to XYZ color space | def QoC3(LNo8: tf.Tensor) -> ZylS.Tensor:
Mkmy, Oa1e, Fg_i = ZylS.unstack(LNo8, axis=-1)
kDk3 = Mkmy / 255
xsx2 = Oa1e / 255
rpeW = Fg_i / 255
kDk3 = ZylS.where(kDk3 > 0.04045, ZylS.pow((kDk3 + 0.055) / 1.055, 2.4), kDk3 / 12.92)
xsx2 = ZylS.where(xsx2 > 0.04045, ZylS.pow((xsx2 + 0.055) / 1.055,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QoC3(Cs0X):\n Mkmy = Cs0X[0] / 255\n Oa1e = Cs0X[1] / 255\n Fg_i = Cs0X[2] / 255\n if Mkmy > 0.04045:\n Mkmy = ((Mkmy + 0.055) / 1.055) ** 2.4\n else:\n Mkmy = Mkmy / 12.92\n if Oa1e > 0.04045:\n Oa1e = ((Oa1e + 0.055) / 1.055) ** 2.4\n else:\n Oa1e = Oa1e / 12.... | [
"0.6907906",
"0.6867097",
"0.68299574",
"0.66412497",
"0.66398394",
"0.65136164",
"0.6503859",
"0.6343428",
"0.6280779",
"0.6266033",
"0.62629265",
"0.620036",
"0.61658543",
"0.6152105",
"0.60904413",
"0.6024829",
"0.5986624",
"0.59797454",
"0.597226",
"0.5968314",
"0.5912936... | 0.7601516 | 0 |
Checks if the given character is a number. | def ye72(Z9rn):
return '0' <= Z9rn <= '9' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I6l3(WKvO):\n return ord('0') <= ord(WKvO) <= ord('9')",
"def ihEW(Z9rn: str) -> bool:\n return Z9rn.isdigit() or Z9rn == '.'",
"def ye72(KCHu):\n try:\n int(KCHu)\n return True\n except ValueError:\n return False",
"def ye72(KCHu):\n try:\n int(KCHu)\n r... | [
"0.8297935",
"0.80840826",
"0.7704204",
"0.76546836",
"0.75744826",
"0.7568717",
"0.7393754",
"0.73098946",
"0.7302559",
"0.7258665",
"0.72420657",
"0.7230359",
"0.7195663",
"0.71815383",
"0.7179277",
"0.7152408",
"0.71477836",
"0.71332264",
"0.71325856",
"0.71297145",
"0.712... | 0.82398206 | 1 |
Fetches the soundcloud.com main page, looks for the 'app' js file and tries to pull a client_id out of that. Returns None on failure or a string client_id on success. | def EJqG():
zJsh('Attempting to fetch a public soundcloud client ID:\n')
zJsh(' * Fetching main page... ')
geh0 = G4JS.get('http://www.soundcloud.com')
zJsh('HTTP %d, %d bytes\n' % (geh0.status_code, len(geh0.content)))
zJsh(' * Locating app.js... ')
deys = ZbWC.findall('"(http.+?[^"]+?/app-.+?j... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bxbw():\n x0hE = zyll.Client(client_id=TafS)\n return x0hE",
"def QG3V(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'client_app_id')",
"def sao5(id):\n YiIL = ''\n try:\n B2Dn = H69_.get_page(n8pQ + str(id))\n except (VrQA, VugH) as e:\n return (YiIL, tTpl.code)\n... | [
"0.58945185",
"0.5666564",
"0.54652476",
"0.5451408",
"0.539826",
"0.5342123",
"0.53111964",
"0.5309336",
"0.528899",
"0.52842605",
"0.5255024",
"0.5202958",
"0.5173291",
"0.5158253",
"0.5108697",
"0.5082016",
"0.50815004",
"0.50447154",
"0.50221217",
"0.49919608",
"0.4989508... | 0.8254922 | 0 |
Get the suffix applied to the target in order to specify the variation. May be empty. | def XREA(Emd4, jNA5: RawDisable) -> str:
TATJ = jNA5.parent_test.variations
VlwX = jNA5.node.find(f'.//{Emd4.VARIATION_TAG}')
if VlwX is None:
return ''
gFIc = VlwX.text
if gFIc not in TATJ:
raise cYtK(f'could not find {gFIc!r} in defined variations; skipping node')
or8S = TATJ.i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZI14(YKHO):\n return YKHO.__suffix",
"def ZI14(YKHO):\n return YKHO.__suffix",
"def ZI14(YKHO):\n return YKHO['suffix']",
"def ZI14(YKHO):\n return YKHO['suffix']",
"def JOls():\n ZI14 = ''\n if DWFX.USE_TAIL:\n ZI14 += '_use_tail'\n else:\n ZI14 += '_no_tail'\n if... | [
"0.76173544",
"0.76173544",
"0.75478005",
"0.75478005",
"0.74529225",
"0.7412734",
"0.7412734",
"0.7412734",
"0.7360355",
"0.7269723",
"0.71980673",
"0.7079693",
"0.6851911",
"0.68245083",
"0.68245083",
"0.6713023",
"0.67029065",
"0.6577348",
"0.6507357",
"0.64197314",
"0.634... | 0.74623406 | 4 |
Verifies the input username is valid according to the regular expression. | def PgZC(NtEF):
zODr = ZbWC.compile('^[a-zA-Z0-9_-]{3,20}$')
return NtEF and zODr.match(NtEF) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QoUL(NtEF: str) -> bool:\n mXDZ = ZbWC.compile('^[A-Za-z]+[A-Za-z0-9]*$')\n return mXDZ.match(NtEF)",
"def Gt2s(YKHO, NtEF):\n gVaL = '^[a-zA-Z]{3,}$'\n return ZbWC.match(gVaL, NtEF)",
"def PgZC(MlDp):\n return lUx9.match(MlDp)",
"def Z3WL(NtEF):\n if ZbWC.match('^[a-zA-Z0-9åäöÅÄÖ]{3,20... | [
"0.8635296",
"0.85105777",
"0.84749115",
"0.84299684",
"0.8233236",
"0.8211792",
"0.82028437",
"0.80628586",
"0.80201393",
"0.8015239",
"0.80012465",
"0.79015553",
"0.7776255",
"0.7739225",
"0.7723503",
"0.76907295",
"0.7611532",
"0.7544536",
"0.74407434",
"0.7410977",
"0.739... | 0.8407929 | 4 |
Verifies the input password is valid according to the regular expression. | def sNjs(jTXt):
Vbf8 = ZbWC.compile('^.{3,20}$')
return jTXt and Vbf8.match(jTXt) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZsQY(L03z, Jyyj):\n _J6U = compile('^.*(?=.{8,})(?=.*[a-zA-Z])(?=.*?[A-Z])(?=.*\\\\d)[a-zA-Z0-9!@£$%^&*()_+={}?:~\\\\[\\\\]]+$')\n if not oJuv(_J6U, Jyyj.data):\n raise sUXu(message='Password must match the specific pattern')",
"def tg18(jTXt):\n if ZbWC.match('^[a-zA-Z0-9]{10,30}$', jTXt):\n... | [
"0.8172635",
"0.80864406",
"0.79701066",
"0.79516107",
"0.79046965",
"0.78755134",
"0.7869727",
"0.78578925",
"0.76754445",
"0.7663901",
"0.7564994",
"0.75507975",
"0.7501534",
"0.7475722",
"0.74369824",
"0.7372461",
"0.73591304",
"0.72783804",
"0.7235953",
"0.71788555",
"0.7... | 0.78625745 | 7 |
Activate interact mode enabling to control the robot using keyboard. It stops automatically as soon as 'done' flag is True. One has to press a key to start the interaction. If no key is pressed, the action is not updated and the previous one keeps being sent to the robot. | def JfEz(YKHO, _jS2: Optional[bool]=None, ZEMK: bool=True, xSGg: bool=True, PJWX: bool=True, **B2fa: Any) -> None:
LT6S = YKHO.is_training
YKHO._is_interactive = True
if LT6S:
YKHO.eval()
if not (YKHO.simulator.is_viewer_available and YKHO.simulator.viewer.has_gui()):
YKHO.simulator.rend... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PInA(YKHO):\n YKHO.__interact()",
"def b27A(YKHO):\n YKHO.robot = YKHO.behavior_system.robot\n YKHO.cozmo = YKHO.robot.cozmo\n g5jk = YKHO.robot.drive_system.active_drive\n if g5jk.name == 'solo-drive':\n YKHO.search_behavior = YKHO.cozmo.start_behavior(Uprz.behavior.BehaviorTypes.LookA... | [
"0.6769111",
"0.59950536",
"0.5923037",
"0.58485824",
"0.5848065",
"0.5804152",
"0.5769291",
"0.5753545",
"0.56294817",
"0.5598662",
"0.5595247",
"0.54722005",
"0.5426522",
"0.5399201",
"0.5387124",
"0.5344916",
"0.53276813",
"0.5326153",
"0.5296999",
"0.52966607",
"0.5266821... | 0.5420535 | 13 |
Returns the spawn location of the bot, using the position of the first created townhall. This will be None if the bot is run on an arcade or custom map that does not feature townhalls at game start. | def Urye(YKHO) -> m7iN:
return YKHO._game_info.player_start_location | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YPhw(YKHO):\n while True:\n Xf84 = (tuKI.uniform(YKHO.worldbox.tl[0], YKHO.worldbox.br[0]), tuKI.uniform(YKHO.worldbox.tl[1], YKHO.worldbox.br[1]))\n if not YKHO.is_wall(Xf84) and (not YKHO.is_target(Xf84)):\n return Xf84",
"def PVqH(QTBn):\n return QTBn['gladiators'][QTBn['cur... | [
"0.6612017",
"0.6241278",
"0.6221538",
"0.61222285",
"0.6099413",
"0.60546064",
"0.6032275",
"0.5985243",
"0.5865068",
"0.5855679",
"0.5854281",
"0.5794015",
"0.5790127",
"0.57702297",
"0.57702297",
"0.5757652",
"0.5727618",
"0.5719318",
"0.5711941",
"0.5711941",
"0.568639",
... | 0.5751474 | 16 |
Returns available abilities of one or more units. Right now only checks cooldown, energy cost, and whether the ability has been researched. | async def get_available_abilities(YKHO, rYO3: Union[List[Unit], Units], nM_o: bool=False) -> x1iM[x1iM[mJjM]]:
return await YKHO._client.query_available_abilities(rYO3, nM_o) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def capabilities(YKHO, pNRJ):\n AViC = []\n for x2cn in pNRJ:\n if YKHO.privileged_to_run(x2cn) and x2cn.find_executors(YKHO.executors, YKHO.platform):\n AViC.append(x2cn)\n return AViC",
"def wN_Y(YKHO) -> mBkc:\n Qw0g = mBkc()\n for PXGI in YKHO.units + YKHO.structures:\n... | [
"0.6250166",
"0.60964966",
"0.602298",
"0.59705406",
"0.59497154",
"0.58937514",
"0.5730924",
"0.5714051",
"0.5709866",
"0.57032293",
"0.56360984",
"0.56252784",
"0.5617863",
"0.5564902",
"0.5512842",
"0.54977745",
"0.54958105",
"0.54682755",
"0.54319596",
"0.5417294",
"0.541... | 0.72035104 | 0 |
We have two monkeys, a and b, and the parameters a_smile and b_smile indicate if each is smiling. We are in trouble if they are both smiling or if neither of them is smiling. Return True if we are in trouble. | def s0Bn(CGi5, BYQf):
return CGi5 == BYQf | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s0Bn(CGi5, BYQf):\n if CGi5 and BYQf:\n return True\n if not CGi5 and (not BYQf):\n return True\n return False",
"def s0Bn(CGi5, BYQf):\n if CGi5 and BYQf or (not CGi5 and (not BYQf)):\n return True\n else:\n return False",
"def F45q(CGi5, BYQf):\n if CGi5 == B... | [
"0.79823065",
"0.78019583",
"0.7594713",
"0.5834833",
"0.5834833",
"0.57597196",
"0.5667989",
"0.5522477",
"0.54367316",
"0.5385709",
"0.53549284",
"0.5349871",
"0.53201574",
"0.5308919",
"0.5245264",
"0.51797724",
"0.5175183",
"0.517413",
"0.51414156",
"0.5138198",
"0.512017... | 0.77675396 | 2 |
Given a string, return a new string where the first and last chars have been exchanged. | def pDuZ(str):
if len(str) <= 1:
return str
x1fj = str[1:-1]
return str[-1] + x1fj + str[0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cvwt(KCHu):\n PVwg = KCHu\n for YRbF in range(1, len(KCHu) + 1):\n PVwg += KCHu[-YRbF]\n return PVwg",
"def yoIr(o9EA):\n return o9EA + GoVQ(o9EA)",
"def QdOO(q4cj: str, jzdc: str, Fg_i: str) -> str:\n q4cj = list(q4cj)\n for YRbF in range(len(q4cj)):\n if q4cj[YRbF] == jzdc... | [
"0.684129",
"0.68122196",
"0.6695513",
"0.6433872",
"0.6390908",
"0.63346535",
"0.6311137",
"0.63090163",
"0.6304786",
"0.6295904",
"0.6265807",
"0.62651616",
"0.62593347",
"0.61720115",
"0.61687523",
"0.6154329",
"0.61427444",
"0.61234826",
"0.609927",
"0.60931015",
"0.60733... | 0.5754931 | 64 |
Retrieve a list of all nonignored files, including untracked files, excluding deleted files. | def Kn9x():
arPH = SC55('--cached', '--others', '--exclude-standard')
nXK0 = SC55('--deleted')
return sorted(arPH - nXK0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lNmU(YKHO):\n Nylg = set(YKHO.retrieve_all_files()) - set(YKHO.retrieve_tracked_files())\n return Nylg",
"def Nylg():\n Ylbp = iXC1('cd %s ; git status' % SGLk, stdout=h5ye, stderr=h5ye, universal_newlines=True, shell=True)\n Aofo = [zFiD.strip() for zFiD in Ylbp.stdout.split('\\n')]\n RRlC = ... | [
"0.7845568",
"0.7812254",
"0.77045214",
"0.73962283",
"0.7363428",
"0.7302657",
"0.7254765",
"0.7217443",
"0.70587367",
"0.69560546",
"0.6850955",
"0.6825047",
"0.6698035",
"0.66879463",
"0.66263133",
"0.6596644",
"0.65811634",
"0.6567983",
"0.6562467",
"0.6524902",
"0.652490... | 0.6220324 | 37 |
Queries database to see if table_name exists in tables. | def PJaC(jyYI, GTA_):
return jyYI.execute("SELECT COUNT(*)\n FROM sqlite_master\n WHERE type='table' AND name=?;", (GTA_,)).fetchone()[0] != 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rZzA(GTA_):\n return GTA_ in UzPC.introspection.table_names()",
"def rZzA(NCls, GTA_):\n xDcj = \"\\n SELECT name FROM sqlite_master\\n WHERE type='table' AND name='%s'\" % GTA_\n N1p7 = NCls.execute(xDcj)\n dixj = N1p7.fetchmany()\n return len(dixj) > 0",
"def n2Bh(GTA_):\n ... | [
"0.876392",
"0.8616101",
"0.85560894",
"0.8430031",
"0.8422178",
"0.8337477",
"0.8318655",
"0.83150667",
"0.83040786",
"0.8292064",
"0.82844245",
"0.82619524",
"0.8195732",
"0.8178198",
"0.8103807",
"0.8034697",
"0.8029937",
"0.79777163",
"0.7946561",
"0.7936039",
"0.7852319"... | 0.82233644 | 12 |
The tempo of the song. | def YLyM(YKHO):
l5Ny = YKHO._get_menu_item_text('Edit->Tempo')
return float(ZbWC.search('\\[([0-9.,]+)\\]$', l5Ny).group(1)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VFdg(YKHO, YLyM):\n YKHO._tempo = YLyM",
"def YLyM(Gaon, Vb5F, er8O=64, **B2fa):\n YLyM, rk5s = gLif.beat.beat_track(y=Gaon, sr=Vb5F, hop_length=er8O)\n return YLyM",
"def Y9kT(YKHO, mvm2):\n YTRp = YKHO.tempo_analyzer(mvm2)\n if YTRp:\n CdYM = YKHO.tempo_analyzer.get_last_s()\n ... | [
"0.69736135",
"0.6595954",
"0.6365309",
"0.6310555",
"0.61785966",
"0.61531806",
"0.6058358",
"0.576273",
"0.57180995",
"0.57065964",
"0.5647518",
"0.56118566",
"0.56033045",
"0.5536001",
"0.5516438",
"0.5497539",
"0.5480728",
"0.5466305",
"0.5449493",
"0.5441588",
"0.5440897... | 0.6787653 | 1 |
Given a vector, returns a orthogonal/perpendicular vector of equal length. Returns | def tP4o(iArr):
return (-1 * iArr[1], iArr[0]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a20U(iArr):\n if iArr[1] == 0:\n return oyIN.asarray([0.0, 1.0])\n ssXz = 1.0\n GQ8j = -(iArr[0] / iArr[1])\n jlSq = oyIN.asarray([ssXz, GQ8j])\n return jlSq / oyIN.linalg.norm(jlSq)",
"def LezA(Ty9i):\n if Ty9i[1] == 0 and Ty9i[2] == 0:\n if Ty9i[0] == 0:\n raise V... | [
"0.8108887",
"0.8046012",
"0.80115205",
"0.8010986",
"0.79765224",
"0.77215797",
"0.75200254",
"0.73142374",
"0.7283013",
"0.7026917",
"0.6834823",
"0.6834823",
"0.6834823",
"0.6834823",
"0.6834823",
"0.6834823",
"0.6834823",
"0.6834823",
"0.6834823",
"0.6834823",
"0.6834823"... | 0.8325588 | 0 |
Given an image numpy array, it returns a minimum area rectangle that will contain the mask. It will not necessarily be vertically or horizontally aligned. input | def RrJ9(Uw2I):
YSe7 = _OJa(Uw2I)
znCg = list()
for NBcv in YSe7.keys():
tM3I = YSe7[NBcv]
tM3I = tuple(tM3I)
M0Jd = [tM3I[d6pt] for d6pt in L8G0(tM3I).vertices]
M0Jd.append(M0Jd[0])
if len(M0Jd) < 5:
continue
M0Jd = tuple(M0Jd)
TOgM = oxRy... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JcC1(VXjJ):\n usx6 = oyIN.any(VXjJ, axis=1)\n WfCS = oyIN.any(VXjJ, axis=0)\n s_8f, X17R = oyIN.where(usx6)[0][[0, -1]]\n Yd35, ZfiU = oyIN.where(WfCS)[0][[0, -1]]\n X17R += 1\n ZfiU += 1\n return [s_8f, X17R, Yd35, ZfiU]",
"def JcC1(Xn71):\n jNOo = oyIN.where(Xn71)\n return oyIN.a... | [
"0.69519705",
"0.66886437",
"0.643538",
"0.6417303",
"0.63201237",
"0.62712115",
"0.6126436",
"0.6126436",
"0.6108796",
"0.609959",
"0.609959",
"0.60787183",
"0.6067797",
"0.6058804",
"0.60508186",
"0.60463417",
"0.6030054",
"0.600243",
"0.5979333",
"0.59788084",
"0.59653753"... | 0.58815217 | 28 |
checks for same repeating number in array of format [1,1,1,1,1,21,1,1] and return the same repeating number | def UWUP(ezWE):
fTIp = 0
for YRbF in range(1, 3):
if ezWE[fTIp] == ezWE[YRbF]:
return ezWE[YRbF]
return ezWE[1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DVQL(ezWE):\n return sum([geyT for geyT in ezWE if ezWE.count(geyT) == 1])",
"def eUMe(YKHO, k0lF: List[int]) -> int:\n \"\"\" \n A = sorted(A)\n if A[0] == A[1]:\n return A[0]\n return A[int(len(A)/2)]\n \"\"\"\n Ylbp = set()\n for jzdc in k0lF:\n ... | [
"0.7462376",
"0.68985116",
"0.68213654",
"0.6791498",
"0.66626716",
"0.6654712",
"0.66019726",
"0.6586871",
"0.65565526",
"0.6502662",
"0.6475282",
"0.64584553",
"0.6427284",
"0.6316363",
"0.6316358",
"0.62999094",
"0.62543565",
"0.61959225",
"0.61065865",
"0.610497",
"0.6078... | 0.587011 | 26 |
Return the String associated with an operating system environment variable envstring Optional. String expression containing the name of an environment variable. number Optional. Numeric expression corresponding to the numeric order of the environment string in the environmentstring table. The number argument can be any... | def BiQr(NWfZ):
try:
L4pP = int(NWfZ)
except ValueError:
return Hy7s.environ.get(NWfZ, '')
try:
return '%s=%s' % (list(Hy7s.environ.keys())[L4pP], list(Hy7s.environ.values())[L4pP])
except IndexError:
return '' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tv8Y(YqMg, WmM4=''):\n return Hy7s.environ.get(YqMg, WmM4)",
"def AAKL(YKHO):\n pass",
"def E6J6(H5ew: str) -> str:\n BWXx = Hy7s.getenv(H5ew)\n assert isinstance(BWXx, str), f'the {H5ew} environment variable must be set and a string, value={BWXx!r}'\n return BWXx",
"def ODQh(mWFP: str, Wm... | [
"0.6552138",
"0.62165606",
"0.6127461",
"0.61043334",
"0.5977026",
"0.5974327",
"0.5880715",
"0.58638054",
"0.58064455",
"0.57543194",
"0.5713163",
"0.5692808",
"0.56204563",
"0.5599559",
"0.55874664",
"0.5569792",
"0.5565246",
"0.5565246",
"0.55345047",
"0.5521654",
"0.55209... | 0.780673 | 0 |
Return the closest int of a value | def m3p6(mLGw):
exwG = round(float(mLGw))
if -32767 <= exwG <= 32767:
return int(exwG)
else:
raise ValueError('Out of range in Int (%s)' % exwG) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MJ6n(mLGw):\n return int(oyIN.round(mLGw))",
"def xoYv(OxJJ, BWXx):\n return min(enumerate(OxJJ), key=lambda YRbF: abs(YRbF[1] - BWXx))",
"def llo_(list, wEf2):\n return min(range(len(list)), key=lambda YRbF: abs(list[YRbF] - wEf2))",
"def QmQF(qw7D: np.array, BWXx: float) -> int:\n return oy... | [
"0.78813636",
"0.7478715",
"0.6939693",
"0.6915604",
"0.688788",
"0.6883412",
"0.6875989",
"0.68616486",
"0.6823435",
"0.6811447",
"0.6811447",
"0.6807053",
"0.6807053",
"0.680144",
"0.6783059",
"0.6664683",
"0.66444117",
"0.6554003",
"0.65234077",
"0.64769626",
"0.6472988",
... | 0.0 | -1 |
Return the closest long of a value | def x6Zj(mLGw):
return int(round(float(mLGw))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xoYv(OxJJ, BWXx):\n return min(enumerate(OxJJ), key=lambda YRbF: abs(YRbF[1] - BWXx))",
"def pBSp(YKHO, JXkx, wEf2, UYdI=1):\n RI88 = wEf2 - wEf2 % UYdI if wEf2 != None else None\n return RI88",
"def sBrV(WKvO):\n return epAf.fabs(WKvO)",
"def GScs(w_3R: list, Te46: int):\n gdEx = lambda I... | [
"0.6566261",
"0.6300067",
"0.6277293",
"0.62159926",
"0.620714",
"0.6115691",
"0.6098417",
"0.6038472",
"0.60353285",
"0.6025655",
"0.6025655",
"0.59926397",
"0.59917086",
"0.5961563",
"0.5934293",
"0.5928968",
"0.5906726",
"0.5848198",
"0.5812461",
"0.5812461",
"0.5800306",
... | 0.0 | -1 |
Determine if an object is an array | def c8Fz(YEnM):
return isinstance(YEnM, (list, tuple)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qJca(YEnM):\n if isinstance(YEnM, list):\n return True\n elif isinstance(YEnM, oyIN.ndarray):\n return True\n elif isinstance(YEnM, rLdf.Series):\n return True\n elif isinstance(YEnM, rLdf.DataFrame):\n return True\n return False",
"def PFXX(RjIW):\n if isinstanc... | [
"0.8131859",
"0.78075755",
"0.77648115",
"0.774824",
"0.76568",
"0.75508946",
"0.7546086",
"0.74527085",
"0.7409406",
"0.73134905",
"0.71920586",
"0.7132876",
"0.70407593",
"0.70193404",
"0.6981981",
"0.68952763",
"0.6841536",
"0.6817918",
"0.67961663",
"0.67788136",
"0.67067... | 0.8533337 | 0 |
Return true if the string contains a valid number | def mt6Q(l5Ny):
try:
bGrB = float(l5Ny)
except ValueError:
return 0
else:
return 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nkCT(YKHO, NPoT):\n return bool(ZbWC.search('\\\\d', NPoT))",
"def QirG(Dhyu):\n return Myyj(Dhyu) or QpCZ(Dhyu)",
"def ye72(KCHu):\n try:\n int(KCHu)\n return True\n except ValueError:\n return False",
"def ye72(KCHu):\n try:\n int(KCHu)\n return True\n ... | [
"0.85815185",
"0.8289997",
"0.8270631",
"0.8235928",
"0.81586367",
"0.809362",
"0.80234414",
"0.8018477",
"0.7955613",
"0.79463774",
"0.7942422",
"0.7923322",
"0.79207367",
"0.79207367",
"0.79156023",
"0.7906338",
"0.78547174",
"0.7820686",
"0.7810391",
"0.7808907",
"0.780890... | 0.71502 | 68 |
Join a list of strings | def j1Zt(bXU5, W41k=' '):
b25f = list(map(str, bXU5))
return W41k.join(b25f) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JbwW(DumB: Iterable[str]) -> str:\n return lcpj.join(DumB)",
"def irIg(DMbc):\n return ' '.join(DMbc)",
"def N4Dy(ZPAo):\n return ','.join(ZPAo)",
"def VDwR(JbwW):\n jUW6 = '[{}]'.format(JbwW, JbwW)\n return jUW6",
"def gzes(YKHO, OxJJ) -> FgBH:\n pass",
"def gzes(VWe_, fUYa):\n ... | [
"0.83958447",
"0.8349963",
"0.7805593",
"0.7734362",
"0.7621587",
"0.7588923",
"0.74768436",
"0.7426868",
"0.7301969",
"0.72622794",
"0.725474",
"0.7220788",
"0.7193344",
"0.7181325",
"0.7089761",
"0.7000197",
"0.6942799",
"0.69354165",
"0.69297576",
"0.69290656",
"0.69134676... | 0.67666805 | 31 |
Return a Long whole number representing an RGB color value The value for any argument to RGB that exceeds 255 is assumed to be 255. If any argument is less than zero then this results in a ValueError. | def swaY(Mkmy, Oa1e, Fg_i):
TquA = min(255, Ibqj(Mkmy))
Ggxb = min(255, Ibqj(Oa1e))
ut3e = min(255, Ibqj(Fg_i))
if TquA < 0 or Ggxb < 0 or ut3e < 0:
raise ValueError('RGB values must be >= 0, were (%s, %s, %s)' % (Mkmy, Oa1e, Fg_i))
return (ut3e * 256 + Ggxb) * 256 + TquA | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tNNf(BWXx):\n try:\n Ty9i = int(BWXx)\n if 0 <= Ty9i <= 255:\n return Ty9i\n except:\n return 255",
"def kfDQ(d7Eb):\n Mkmy, Oa1e, Fg_i = d7Eb\n return (Mkmy + Oa1e + Fg_i) // 3",
"def kfDQ(YKHO):\n return (YKHO.r + YKHO.g + YKHO.b) // 3",
"def Fa72(*qIxc):\... | [
"0.65882045",
"0.65604985",
"0.6269075",
"0.6263342",
"0.6221491",
"0.6202926",
"0.62008274",
"0.61333966",
"0.6085049",
"0.6076616",
"0.6073239",
"0.60437983",
"0.6026575",
"0.6025366",
"0.6011845",
"0.59900916",
"0.598508",
"0.59843445",
"0.5974619",
"0.59649116",
"0.596430... | 0.631638 | 2 |
Returns a string in which a specified substring has been replaced with another substring a specified number of times The return value of the Replace function is a string, with substitutions made, that begins at the position specified by start and and concludes at the end of the expression string. It is not a copy of th... | def ZWnH(lsX7, neBz, qx_G, yKcO=1, UHFx=-1):
if neBz:
return lsX7[:yKcO - 1] + lsX7[yKcO - 1:].replace(neBz, qx_G, UHFx)
else:
return lsX7 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LpcW(fIjn, WEAy, yLAt, DIeq):\n if WEAy < 1:\n raise ValueError('start_num invalid')\n return fIjn[:WEAy - 1] + DIeq + fIjn[WEAy - 1 + yLAt:]",
"def TBn3(vIwR, u54L, Npeo, or8S):\n return vIwR[:or8S] + Npeo + vIwR[or8S + u54L:]",
"def finE(YKHO, qx_G, vIwR, UHFx=0):\n return YKHO.re.sub(... | [
"0.69472235",
"0.6930251",
"0.66695154",
"0.64962995",
"0.63499135",
"0.6083488",
"0.6069293",
"0.6031655",
"0.6022877",
"0.598244",
"0.5966292",
"0.5940701",
"0.5935663",
"0.5875606",
"0.58752525",
"0.58342385",
"0.57794666",
"0.57153463",
"0.5702825",
"0.56442857",
"0.56126... | 0.7357595 | 0 |
Get a setting from the central setting file | def M2zz(i1I_, XLMv, H5ew, WmM4=None):
gCuF = wjIU(i1I_)
try:
return gCuF[XLMv, H5ew]
except GPtr.configparser.Error:
if WmM4 is not None:
return WmM4
raise | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gCuF():\n return v083()[1]",
"def OZKS(YqMg: str) -> ImMB:\n try:\n with open('config.json') as Nu1S:\n nPrm = qQXR.load(Nu1S)\n return nPrm[YqMg]\n except Exception as e:\n print(f'Failed get json setting. Error: {tTpl}')",
"def o59G(YKHO, YqMg):\n return YKHO.d... | [
"0.75953954",
"0.7489524",
"0.7417485",
"0.73691297",
"0.73165554",
"0.7299111",
"0.71707577",
"0.7038714",
"0.69166815",
"0.6869451",
"0.6869085",
"0.68282914",
"0.6781696",
"0.6778681",
"0.6777153",
"0.67645085",
"0.6737452",
"0.6735574",
"0.66980755",
"0.6696956",
"0.66344... | 0.6653763 | 20 |
Return the sign of a number | def ImgP(mLGw):
exwG = float(mLGw)
if exwG < 0:
return -1
elif exwG == 0:
return 0
else:
return 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zihr(mLGw: float):\n return 1 if mLGw >= 0 else -1",
"def VGrK(YKHO, FGW3):\n return eHkp(FGW3, 0)",
"def Zihr(WKvO):\n if WKvO >= 0:\n return 1\n else:\n return -1",
"def Zihr(WKvO):\n if WKvO >= 0:\n return 1\n return -1",
"def Zihr(exwG):\n return (exwG > 0)... | [
"0.86808735",
"0.8180675",
"0.8142889",
"0.8080412",
"0.805586",
"0.80516213",
"0.7749056",
"0.76728755",
"0.76457745",
"0.7544772",
"0.7440243",
"0.73207474",
"0.719852",
"0.7096866",
"0.69429314",
"0.65968424",
"0.65949637",
"0.65688556",
"0.6490249",
"0.6485607",
"0.648235... | 0.5939975 | 44 |
Return the upper bound for the index | def QCrd(YEnM, e_2d=1):
try:
return YEnM.__ubound__(e_2d)
except AttributeError:
if e_2d == 1:
try:
return len(YEnM)
except TypeError:
pass
raise ValueError('UBound called for invalid object') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gLHL(YKHO):\n return YKHO._upper_bound",
"def A2Fp(YKHO) -> float:\n ...",
"def y6S3(YKHO) -> int:\n return YKHO.upper_bound",
"def azeE(d6pt):\n YRbF = d6pt[0]\n return zCp5[YRbF].pmax",
"def Anhc(YKHO):\n if YKHO._all_nodes:\n return min((Q6kx.upper_bound for Q6kx in YKHO._al... | [
"0.81943715",
"0.79659086",
"0.78783196",
"0.76580983",
"0.707804",
"0.69440764",
"0.68226254",
"0.671483",
"0.66756105",
"0.666539",
"0.66157496",
"0.66157496",
"0.6594715",
"0.65075356",
"0.64967626",
"0.64928114",
"0.64666486",
"0.6462994",
"0.6452403",
"0.6446879",
"0.642... | 0.0 | -1 |
Return the value of a string This function finds the longest leftmost number in the string and returns it. If there are no valid numbers then it returns 0. The method chosen here is very poor we just keep trying to convert the string to a float and just use the last successful as we increase the size of the string. A R... | def cnpU(l5Ny):
P6Dd = 0
for or8S in range(len(l5Ny)):
try:
P6Dd = float(l5Ny[:or8S + 1])
except ValueError:
pass
return P6Dd | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JqI1(KCHu: str):\n qw7D = ZbWC.findall('[0-9]+', KCHu)\n if qw7D.__len__() is 0:\n return -1\n return int(qw7D[-1])",
"def KTP1(WKvO):\n try:\n return float(WKvO)\n except ValueError:\n raise ValueError('Unknown element')",
"def float(KCHu):\n if KCHu is None or KCHu ... | [
"0.66451454",
"0.64589363",
"0.63910717",
"0.6363433",
"0.63494194",
"0.630394",
"0.61770207",
"0.616602",
"0.6151756",
"0.61081976",
"0.60855013",
"0.6082988",
"0.60598946",
"0.6020905",
"0.60046595",
"0.5965904",
"0.5914045",
"0.58885247",
"0.58840555",
"0.58837414",
"0.584... | 0.7048725 | 0 |
Set character's energy to zero which ends the game. | def VtS_(K9Fg: dict, zANN: str):
K9Fg['Energy'] = 0
print(zANN + " is persistent and painful and you lose all interest in the case.\nYou secretly slink out the back entrance so the butler doesn't see that\nyou've given up.\n\nGame over!") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JCyR(YKHO):\n YKHO.change_power(0)",
"def yV87():\n global character\n bseI['HP'] = 10",
"def SiRx(YKHO):\n g74T.event.clear()\n YKHO.stop_powerpellet()\n if not YKHO.eaten:\n YKHO.dot_counter = 0\n YKHO.eaten = False\n YKHO.eat_ghost = False\n YKHO.reset_energizer_flag()\... | [
"0.64097255",
"0.62823176",
"0.6174342",
"0.6149164",
"0.6142883",
"0.610212",
"0.6058763",
"0.60425085",
"0.60215926",
"0.5955238",
"0.59329295",
"0.586241",
"0.58558756",
"0.58372647",
"0.5812641",
"0.5810026",
"0.5805393",
"0.5804163",
"0.5733548",
"0.5711218",
"0.56904644... | 0.5333339 | 73 |
Given `src_lines`, a list of lines of a single record, this will instantiate and populate an object corresponding to the data. | def FIMM(YKHO, r_dp):
YKHO.study_id = None
YKHO.citation = None
YKHO.abstract = None
YKHO.authors = []
YKHO.study_matrices = {}
YKHO.history_date = None
YKHO.history_time = None
YKHO.history_person = None
YKHO.history_event = None
YKHO.analyses = []
YKHO.parse_src_lines(r_dp) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lK2r(Emd4, Nqlg: List[str], Tuqy: str):\n for zFiD in Nqlg:\n if zFiD.startswith('Original Input'):\n w0fi = zFiD[zFiD.find(':') + 1:].strip()\n elif zFiD.startswith('Predicted Str'):\n nvEb = zFiD[zFiD.find(':') + 1:].strip()\n elif zFiD.startswith('Ground-Truth')... | [
"0.6313051",
"0.614401",
"0.60776645",
"0.60666007",
"0.5890082",
"0.5835735",
"0.57116175",
"0.56871676",
"0.56600964",
"0.5596233",
"0.5578453",
"0.556857",
"0.556857",
"0.556857",
"0.55126864",
"0.5510738",
"0.54882395",
"0.54770136",
"0.54094434",
"0.5392297",
"0.53723717... | 0.7402475 | 0 |
Test the string representation of a Resources instance. | def Dt2g(YKHO, Mkmy, sWfS):
assert str(Mkmy) == sWfS | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Dt2g(YKHO):\n Eorv = ISu2(1, 'White Noise', av29('Don', '', 'DeLillo'), \"Delillo's White Noise follows narrator Jack Gladney, a professor at a small Liberal Arts college and describes an academic year. Jack teaches at a school called the College-on-the-Hill, where he serves as the department chair of Hitle... | [
"0.69858843",
"0.6690042",
"0.65925443",
"0.65398246",
"0.63936853",
"0.6231223",
"0.6173892",
"0.61191833",
"0.60786456",
"0.5948287",
"0.5941849",
"0.588382",
"0.5881345",
"0.5877128",
"0.5874582",
"0.5856679",
"0.58358604",
"0.5779244",
"0.577448",
"0.57712156",
"0.5765452... | 0.5395529 | 63 |
Test the repr method of a Resources instance looks as expected. | def H4zp(YKHO, Mkmy, sWfS):
assert repr(Mkmy) == sWfS | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H4zp(YKHO):\n Eorv = ISu2(1, 'White Noise', av29('Don', '', 'DeLillo'), \"Delillo's White Noise follows narrator Jack Gladney, a professor at a small Liberal Arts college and describes an academic year. Jack teaches at a school called the College-on-the-Hill, where he serves as the department chair of Hitle... | [
"0.80957806",
"0.79900897",
"0.7360948",
"0.72866344",
"0.7135619",
"0.71316963",
"0.7114563",
"0.7029921",
"0.7014224",
"0.6987679",
"0.69360983",
"0.69288915",
"0.69223106",
"0.6910305",
"0.68883425",
"0.6882751",
"0.6816729",
"0.6804138",
"0.67528766",
"0.6745733",
"0.6745... | 0.7317369 | 3 |
Visualize Fashion MNIST samples via pyplot | def UtJ2(c2Yh, C3ST, sAoX, H96n, B6Y5=False):
tGDF = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat', 'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']
k1TJ = {}
for YRbF in c2Yh:
if not B6Y5:
VR7D = sAoX[YRbF].reshape(1, 28 * 28)
else:
VR7D = sAoX[YRbF].resha... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V6hz(YKHO):\n SNvb = YKHO.imageprepare(YKHO.image_path)\n NRS5 = YKHO.reshape_pixel_array(SNvb)\n QrM1.imshow(NRS5, interpolation='nearest')\n QrM1.savefig('MNIST_IMAGE.png')\n QrM1.show()",
"def p1dx(EcVT):\n Xn71 = EcVT.reshape(28, 28)\n ycBG = QrM1.imshow(Xn71)\n QrM1.show()",
"d... | [
"0.7037436",
"0.7002827",
"0.6939112",
"0.69223297",
"0.6922288",
"0.6649379",
"0.6452064",
"0.6440104",
"0.6397068",
"0.6394533",
"0.6347079",
"0.63302267",
"0.63108045",
"0.63045776",
"0.6270363",
"0.6266844",
"0.6266804",
"0.62562644",
"0.62232316",
"0.6215262",
"0.6177606... | 0.0 | -1 |
Horizontally concatenate a list of images with a border. This is similar to numpy's hstack except that it adds a border around each image. The borders can be controlled with the optional border_width and border_value arguments. See also vstack. | def bjuQ(Yw_3, e7ZM=2, b8BR=0):
if e7ZM == 0:
return oyIN.hstack(Yw_3)
Kt_s, cAlv = (e7ZM, b8BR)
Aofo = []
for LNo8 in Yw_3[:-1]:
Aofo.append(ocD5(LNo8, Kt_s, cAlv, 'LTB'))
Aofo.append(ocD5(Yw_3[-1], Kt_s, cAlv))
return oyIN.hstack(Aofo) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZEEG(Yw_3, e7ZM=2, b8BR=0):\n if e7ZM == 0:\n return oyIN.vstack(Yw_3)\n Kt_s, cAlv = (e7ZM, b8BR)\n Aofo = []\n for LNo8 in Yw_3[:-1]:\n Aofo.append(ocD5(LNo8, Kt_s, cAlv, 'LTR'))\n Aofo.append(ocD5(Yw_3[-1], Kt_s, cAlv))\n return oyIN.vstack(Aofo)",
"def lT6m(Yw_3):\n qw7... | [
"0.7960261",
"0.69222003",
"0.67834777",
"0.6604934",
"0.6577598",
"0.6484754",
"0.6211543",
"0.61573285",
"0.6119428",
"0.61114365",
"0.61083424",
"0.5949176",
"0.5925623",
"0.59040356",
"0.5842073",
"0.5829911",
"0.581459",
"0.58126813",
"0.5722141",
"0.56652904",
"0.564144... | 0.83008605 | 0 |
Enforces that all numpy arrays are 2D | def mA6a(EcVT):
if len(EcVT.shape) == 1:
EcVT = oyIN.reshape(EcVT, (-1, EcVT.shape[0]))
return EcVT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f9s7(WKvO, LVAh, ooIy, hoj6):\n assert WKvO.ndim == LVAh.ndim\n Htse = oyIN.delete(oyIN.arange(WKvO.ndim), -2)\n assert all([WKvO.shape[G1Hx] == LVAh.shape[G1Hx] for G1Hx in Htse])",
"def LE2z(Jyyj):\n assert len(oyIN.shape(Jyyj)) == 2, 'Variable fields must be a 2D array'",
"def A5mx(YKHO):\n ... | [
"0.69607204",
"0.69541734",
"0.685842",
"0.68151885",
"0.675131",
"0.67469525",
"0.6726605",
"0.67196745",
"0.6677873",
"0.6656172",
"0.6653277",
"0.66295964",
"0.66173494",
"0.6605646",
"0.6597243",
"0.65929127",
"0.65756637",
"0.65693486",
"0.6558567",
"0.65577745",
"0.6527... | 0.66363525 | 11 |
Gets two positive integer numbers m and n (m > n). Returns True if they are coprime, otherwise, returns False. | def Q3Pm(r8hN, exwG):
if exwG == 0 and r8hN > 1:
return False
elif exwG == 0 and r8hN == 1:
return True
return Q3Pm(exwG, r8hN - exwG * (r8hN // exwG)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Q3Pm(jzdc: int, Fg_i: int):\n return bJun(jzdc, Fg_i) == 1",
"def Q3Pm(jzdc, Fg_i):\n return ML2l(jzdc, Fg_i) == 1",
"def Q3Pm(YKHO, WKvO, LVAh):\n return WKvO == 1 or LVAh == 1 or (not bool(YKHO.cofactors(WKvO, LVAh)))",
"def uRrA(exwG, r8hN):\n Aofo = True\n wfQS = exwG\n if r8hN > ex... | [
"0.79076767",
"0.7667604",
"0.72574323",
"0.6289784",
"0.59262717",
"0.5853223",
"0.5806163",
"0.5744549",
"0.5737769",
"0.5737769",
"0.5732557",
"0.5720091",
"0.56966656",
"0.56965023",
"0.568913",
"0.5660022",
"0.5632094",
"0.5599034",
"0.5597036",
"0.55894285",
"0.5589392"... | 0.7949466 | 0 |
Gets the range of possible integer perimeters. Generates a set of all possible perimeters of rightangled triangles with integer sides. Also generates a set of perimeters of rightangled triangles with integer sides which can be formed using more than one set of values of the sides. | def _hfn(aPd6, ewCu=0):
for r8hN in range(2, int(aPd6 ** (1 / 2)) + 1):
for exwG in range(1, r8hN):
qoqK = r8hN * (r8hN + exwG)
if qoqK > 750000:
break
if Q3Pm(r8hN, exwG) and (r8hN - exwG) % 2 > 0:
for G1Hx in range(1, 750000 // qoqK + 1):... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gmX5(Emd4):\n for exwG in range(1, 10):\n r8hN = exwG + 1\n while True:\n jzdc, Fg_i, Z9rn = (2 * r8hN * exwG, r8hN * r8hN - exwG * exwG, r8hN * r8hN + exwG * exwG)\n if jzdc <= 200 and Fg_i <= 200 and (Z9rn <= 200):\n yield (jzdc, Fg_i, Z9rn)\n ... | [
"0.593584",
"0.5841993",
"0.574564",
"0.5671036",
"0.5518445",
"0.54776615",
"0.54388785",
"0.54362965",
"0.52928966",
"0.52676713",
"0.5253598",
"0.5241637",
"0.52206737",
"0.5196224",
"0.51582533",
"0.51150614",
"0.50665206",
"0.50629294",
"0.49804005",
"0.49755204",
"0.497... | 0.0 | -1 |
Get the current user. | def IIka(YKHO):
return YKHO._api_call('get', '/me') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W84Y(YKHO):\n return YKHO.current_user",
"def W84Y(YKHO):\n return YKHO.get_secure_cookie('user')",
"def c5ow(YKHO):\n fnHH = YKHO.auth.get_user_by_session()\n return YKHO.auth.store.user_model.get_by_id(fnHH['user_id'])",
"def c5ow(YKHO):\n fnHH = YKHO.auth.get_user_by_session()\n if f... | [
"0.8836685",
"0.87018216",
"0.86910814",
"0.8619504",
"0.85802186",
"0.8505428",
"0.8505428",
"0.8505428",
"0.8500047",
"0.8500047",
"0.84839404",
"0.8483425",
"0.84567",
"0.838958",
"0.8296931",
"0.8281396",
"0.82328916",
"0.815139",
"0.8126627",
"0.8124535",
"0.81106335",
... | 0.0 | -1 |
Get projects owned by the team. | def PKRp(YKHO, b2mu):
w2IS = '/teams/{}/projects'.format(b2mu)
return YKHO._api_call('get', w2IS) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PKRp(YKHO):\n return YKHO._gitlab.owned_projects(per_page=1000)",
"def PKRp(YKHO):\n return YKHO.http_call('get', url=f'{YKHO.base_url}/projects').json()",
"def PKRp(YKHO):\n llaM = []\n B2Dn = 1\n while not len(llaM) % 100:\n llaM += YKHO._get('/projects?{0}'.format(uRlK.urlencode({'... | [
"0.8055631",
"0.71431756",
"0.6982873",
"0.6950596",
"0.69087213",
"0.68157524",
"0.6773247",
"0.6765266",
"0.67424154",
"0.66995823",
"0.66808534",
"0.6675837",
"0.66692793",
"0.6655742",
"0.66494966",
"0.6611001",
"0.66000354",
"0.6599352",
"0.6567951",
"0.65166676",
"0.651... | 0.720342 | 1 |
Fetch a single user's data if a user_id is specified. Otherwise fetch the list of all users. Returned info contains user_id, name, group name,email, admin status, and date_created. | def NMoC(YKHO, uJjO):
if uJjO:
return NNdu(uJjO)
else:
if not c5ow.is_admin:
P1dF(403, 'Logged in user not admin ')
EQak = qsod.fetchall(Oa1e.database)
Bv0m: cuzp[str, x1iM[cuzp[str, str]]] = {'users': []}
for nOBV in EQak:
Bv0m['users'].append({'i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def fetch_user(YKHO, id: str):\n CBIr = await YKHO.http.get_user(id)\n return mv1M(state=YKHO.http, data=CBIr)",
"def NMoC(YKHO, id):\n try:\n H6Ho.logger.debug('We are getting the user: %d', id)\n return ud_Z.get(id)\n except AssertionError as e:\n WWEd.abort(400, tTpl.arg... | [
"0.72157097",
"0.7131999",
"0.70872533",
"0.7083722",
"0.7074586",
"0.7070638",
"0.7040221",
"0.70230114",
"0.6946631",
"0.69372654",
"0.6927964",
"0.6918322",
"0.69075227",
"0.68962216",
"0.68914783",
"0.688945",
"0.6877585",
"0.6864886",
"0.6854097",
"0.68460727",
"0.681894... | 0.7235378 | 0 |
Given an iterator which returns (key, value) pairs, returns a new iterator of (k, value) pairs such that every list or tuplevalued key in the original sequence yields an individual pair. | def PWgb(DumB):
for G1Hx, Ty9i in DumB:
if isinstance(G1Hx, (list, tuple)):
for H5ew in G1Hx:
yield (H5ew, Ty9i)
else:
yield (G1Hx, Ty9i) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R2Yl(OxJJ):\n if isinstance(OxJJ, GySg):\n OxJJ = OxJJ.items()\n return iter(OxJJ)",
"def kgDL(OxJJ):\n AOBR = None\n for ZfUD in OxJJ:\n jvSB = ZfUD\n if AOBR is not None:\n yield (AOBR, jvSB)\n AOBR = jvSB",
"def lutp(YKHO):\n for H5ew in YKHO:\n ... | [
"0.691934",
"0.64335775",
"0.6234379",
"0.62247425",
"0.6090052",
"0.6072828",
"0.6056752",
"0.6033201",
"0.60265905",
"0.59873533",
"0.59600586",
"0.5856685",
"0.58540154",
"0.5830519",
"0.58234537",
"0.57890534",
"0.5769367",
"0.57635",
"0.57286495",
"0.5683447",
"0.5672941... | 0.513164 | 94 |
Set the access key as key=your_googlemaps_key. This must be called prior to contacting the API. | def qMZg(**B2fa):
aA7m['key'] = B2fa['key'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yElH(YKHO, rJDA):\n YKHO._api_key = rJDA",
"def yElH(YKHO, rJDA):\n YKHO._api_key = rJDA",
"def yElH(YKHO, rJDA):\n YKHO._analyzer.SetAPIKey(rJDA)",
"def H_cf(YKHO, H5ew):\n YKHO._api_key = H5ew",
"def rJDA(YKHO, rJDA):\n YKHO._api_key = rJDA",
"def TqtU(YKHO, rJDA):\n YKHO.request(... | [
"0.6702951",
"0.6702951",
"0.64656013",
"0.63789594",
"0.63458663",
"0.63154477",
"0.62301403",
"0.62292933",
"0.62059003",
"0.61881185",
"0.60916674",
"0.60765517",
"0.5990251",
"0.5933332",
"0.58120465",
"0.5781521",
"0.57431203",
"0.57308316",
"0.5702196",
"0.56874853",
"0... | 0.6750033 | 0 |
Creates a millisecond based timestamp of UTC now. | def iFPm() -> int:
return int(qcWV.datetime.now(qcWV.timezone.utc).timestamp() * 1000) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Jtli():\n Oa8f = (qcWV.datetime.utcnow() - DfBS).total_seconds() / 86400.0\n return Kmii(Oa8f)",
"def wzkt() -> qcWV:\n wzkt = qcWV.now(tz=rIAI.utc)\n return wzkt.replace(microsecond=wzkt.microsecond - wzkt.microsecond % 1000)",
"def nOtw(PXGI: TimeUnit=r5MW.SECONDS) -> float:\n return p8ch.... | [
"0.7358585",
"0.73144686",
"0.73085713",
"0.7295754",
"0.72463673",
"0.719578",
"0.71388984",
"0.71132016",
"0.71132016",
"0.7087358",
"0.70538455",
"0.70202845",
"0.69747436",
"0.69600034",
"0.6942168",
"0.6916312",
"0.69006324",
"0.68955755",
"0.68503773",
"0.68242997",
"0.... | 0.7725665 | 0 |
Loads the image from disk, returns image with axis in the natural order (deep last). Data format should be numpy.uint8. Time complexity goes square if numpy.uint16, especially for segmentation. | def tyeH(YKHO, pmON, ROpF=(1024, 1024, 35), yDqo='uint16'):
oyLU = ['uint8', 'uint16']
if yDqo not in oyLU:
raise ValueError('dtype should be either one of %s' % ', '.join(oyLU))
Xn71 = xDSY.imread(pmON)
Xn71 = XTiz.rollaxis(Xn71, 0, 3)
if Xn71.shape != ROpF and ROpF is not None:
Llm... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DWkG(pmON):\n VXjJ = oyIN.load(pmON)\n VXjJ = VXjJ[1:4]\n if oyIN.random.choice((True, False)):\n VXjJ = VXjJ[:, :, ::-1]\n VXjJ = oyIN.array(VXjJ)\n if oyIN.random.choice((True, False)):\n VXjJ = VXjJ[:, ::-1, :]\n VXjJ = oyIN.array(VXjJ)\n VXjJ = VXjJ.transpose((1, ... | [
"0.6431803",
"0.6287837",
"0.62287796",
"0.619413",
"0.6191195",
"0.61317974",
"0.6061726",
"0.5990384",
"0.59458464",
"0.5924528",
"0.58976215",
"0.5853149",
"0.5837823",
"0.58332664",
"0.58236",
"0.5814487",
"0.581173",
"0.581148",
"0.5806939",
"0.5799971",
"0.5781366",
"... | 0.65080833 | 0 |
Get arguments from CLI | def rwTO():
wvEv = j1Jz.ArgumentParser(description='Arguments for talking to vCenter')
wvEv.add_argument('-s', '--host', required=True, action='store', help='vSpehre service to connect to')
wvEv.add_argument('-o', '--port', type=int, default=443, action='store', help='Port to connect on')
wvEv.add_argum... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mbGV(YKHO):\n pass",
"def rwTO():\n wvEv = xuJu()\n qIxc = wvEv.parse_args()\n return qIxc",
"def Ugfm():\n wvEv = j1Jz.ArgumentParser(description='list all installed packages')\n wvEv.add_argument('-v', '--verbose', help='increase output verbosity', action='store_true')\n wvEv.add_arg... | [
"0.83995515",
"0.7696954",
"0.7674078",
"0.7656369",
"0.75491726",
"0.7546294",
"0.7523218",
"0.7521475",
"0.7514517",
"0.75119865",
"0.74877495",
"0.74807847",
"0.74693704",
"0.7466727",
"0.74665916",
"0.74520636",
"0.74513096",
"0.7427955",
"0.7422721",
"0.74211824",
"0.740... | 0.700868 | 72 |
This is the main page of our website. | def d6pt(mWFP=None):
return TvZl('tree.html', name=mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b8V_():\n return TvZl('index.html', title='Home', heading='Dublin Bus')",
"def Ozko():\n return TvZl('index.html')",
"def d6pt():\n return TvZl('main/index.html', title='Main page')",
"def Ozko():\n return TvZl('main_page.html')",
"def d6pt():\n fyvm = 'Home'\n return TvZl('index.html... | [
"0.8140115",
"0.80469155",
"0.7960196",
"0.7864964",
"0.7812475",
"0.77935606",
"0.77392304",
"0.7707471",
"0.7697759",
"0.7618798",
"0.7606769",
"0.76046544",
"0.7594974",
"0.7594974",
"0.7594974",
"0.7594974",
"0.7594974",
"0.7594974",
"0.7594974",
"0.7594974",
"0.7594974",... | 0.0 | -1 |
R""" inequality comparison between this and another Classifier, simply checks if A B > 0 | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jmxi(YKHO, Elif):\n return YKHO.x ** 2 + YKHO.y ** 2 > Elif.x ** 2 + Elif.y ** 2",
"def jmxi(YKHO, Elif):\n return YKHO.weight > Elif.weight",
"def jmxi(YKHO, Elif):\n return YKHO.eval_score < Elif.eval_score",
"def jmxi(YKHO, Elif):\n return YKHO.weight() > Elif.weight()",
"def Zcf_(YKHO, ... | [
"0.7323742",
"0.7207339",
"0.7196521",
"0.717408",
"0.7116371",
"0.7098813",
"0.70613265",
"0.7005404",
"0.700271",
"0.69787747",
"0.69742733",
"0.6962742",
"0.6956827",
"0.6956827",
"0.6939363",
"0.6920388",
"0.69108945",
"0.69108945",
"0.6898756",
"0.6889111",
"0.68718845",... | 0.0 | -1 |
Creates and displays a simple frame containing the RichTextPanel. | def wTi8(_AKB, leAC, zhN4=True):
f4IJ = lnPd.Frame(_AKB, -1, leAC, size=(630, 320), style=lnPd.DEFAULT_FRAME_STYLE)
BcQj = ZaRE(zhN4, f4IJ, -1)
f4IJ.Show()
return BcQj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NBdp(YKHO, mWFP, _AKB=None, oeNL=None, zNig=(900, 700), _Cnz=lnPd.DEFAULT_FRAME_STYLE, oWb2=True):\n if oeNL is None:\n oeNL = YKHO._CheckBoundaries(zNig)\n f4IJ = YKHO.mf.MainFrame(YKHO, mWFP, _AKB, oeNL, zNig, _Cnz, YKHO.text_editor)\n YKHO.frame_position = (oeNL[0] + 50, oeNL[1] + 50)\n Y... | [
"0.60286325",
"0.5938992",
"0.59213364",
"0.58199555",
"0.5770706",
"0.5710505",
"0.5705657",
"0.57053775",
"0.5688911",
"0.567008",
"0.563585",
"0.5622285",
"0.5615228",
"0.56087345",
"0.5592374",
"0.55808675",
"0.55758315",
"0.5544468",
"0.55370015",
"0.5525293",
"0.5516264... | 0.7123116 | 0 |
safe to call on floats and arrays get_shape(1) > None, get_shape(ones(2)) > (2,) | def kbUw(WKvO):
return None if oLG2.isscalar(WKvO) else WKvO.shape | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Fuw0(gOGe, KDwe):\n return True",
"def ZOJM(gyIm, mWFP):\n K_Zo(gyIm, (oyIN.float, oyIN.int), (2,), mWFP)",
"def r2yH(ROpF):\n return vuvg.shape_mul(ROpF) == 1",
"def ZzML(ROpF):\n return P1F3(T1j7(ROpF), 0)",
"def UpNN(ezWE):\n return len(ezWE.shape) < 2 or ezWE.shape[0] == 1",
"def F... | [
"0.72709566",
"0.67900205",
"0.67742664",
"0.67406166",
"0.6730081",
"0.6688898",
"0.664606",
"0.6638844",
"0.66229963",
"0.65788215",
"0.6564183",
"0.65422463",
"0.6526019",
"0.65226525",
"0.65096045",
"0.64582187",
"0.6442337",
"0.64415085",
"0.6415565",
"0.63730866",
"0.63... | 0.586161 | 76 |
Trains the network using back propagation, use the logistic activation function and the square loss, along with bias inputs | def WgYu(YKHO, EcVT, LVAh, Cwt5, a1PO):
r8hN = EcVT.shape[0]
exwG = EcVT.shape[1]
akMG = NkkI(EcVT)
nMvt = len(oyIN.unique(LVAh))
if nMvt == 2:
nMvt = 1
fuBA = oyIN.zeros((r8hN, nMvt))
for YRbF in range(r8hN):
fuBA[YRbF][LVAh[YRbF]] = 1
mccU = epAf.sqrt(6 / (exwG + YKHO.s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QADO(YKHO, WKvO, LVAh):\n M9YB = []\n for Fg_i in YKHO.biases:\n M9YB.append(oyIN.zeros(Fg_i.shape))\n INKt = []\n for yzQ0 in YKHO.weights:\n INKt.append(oyIN.zeros(yzQ0.shape))\n YDYE = WKvO\n oQvm = [WKvO]\n fERC = []\n for Fg_i, yzQ0 in zip(YKHO.biases, YKHO.weights):\... | [
"0.70576835",
"0.6613435",
"0.6567604",
"0.6545431",
"0.65237206",
"0.65193415",
"0.64829934",
"0.6418162",
"0.64143413",
"0.64051306",
"0.6401433",
"0.6364397",
"0.6361401",
"0.6345978",
"0.6330163",
"0.63294196",
"0.6279485",
"0.6272271",
"0.6270294",
"0.6262799",
"0.625279... | 0.0 | -1 |
The derivative of the sigmoid function | def GQYm(epBp):
return oyIN.multiply(Oa1e(epBp), 1 - Oa1e(epBp)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NZml(WKvO):\n return WKvO * (1 - WKvO)",
"def BV7B(WKvO):\n return WKvO * (1 - WKvO)",
"def BV7B(WKvO):\n return WKvO * (1 - WKvO)",
"def NZml(WKvO):\n return WKvO * (1.0 - WKvO)",
"def NZml(WKvO):\n return m1Hg(WKvO) * (1 - m1Hg(WKvO))",
"def NZml(WKvO):\n KCHu = m1Hg(WKvO)\n ox... | [
"0.8931355",
"0.88970494",
"0.88970494",
"0.88566244",
"0.8723297",
"0.8572503",
"0.83397293",
"0.82558525",
"0.81656826",
"0.7952699",
"0.7922646",
"0.7874329",
"0.7820545",
"0.77842283",
"0.77320105",
"0.7693423",
"0.7673917",
"0.767192",
"0.764811",
"0.760601",
"0.7604099"... | 0.0 | -1 |
This function split one dataset into the training set and the test set with different standardization; | def S6Kd():
w2B8 = MuIv.connect(GPtr.DB_FILE)
ol4k = rLdf.read_sql_query('select pubmed_id, review_id, included, title, abstract from article ', w2B8)
FKeu = ol4k['review_id'].unique()
oyIN.random.seed(2)
G3cZ = list(oyIN.random.choice(FKeu, 10, replace=False))
JfnO = list(FKeu.copy())
with ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F_Ph(YKHO):\n YKHO.train, YKHO.valid, bGrB, bGrB = bHtP(YKHO.data, YKHO.data, test_size=0.2)\n YKHO.valid, YKHO.test, bGrB, bGrB = bHtP(YKHO.valid, YKHO.valid, test_size=0.5)",
"def cTf9(onqj):\n XxFT, t4zr = bHtP(onqj, test_size=0.2, random_state=42)\n return (XxFT, t4zr)",
"def Qb89(YKHO, nPr... | [
"0.7990251",
"0.7974505",
"0.7581833",
"0.7565025",
"0.7559627",
"0.7552167",
"0.75416225",
"0.75179213",
"0.74247026",
"0.7367997",
"0.73663753",
"0.7344645",
"0.730346",
"0.7287729",
"0.7281219",
"0.72798365",
"0.72691244",
"0.7258459",
"0.7252591",
"0.7251626",
"0.71612626... | 0.6987368 | 50 |
Redirect index to students page | def d6pt() -> str:
return vKnz('/students') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d6pt():\n return vKnz(nKyW('second_page'))",
"def vja_():\n return vKnz('/users')",
"def or8S(N0q9):\n return Yd7Q('/home')",
"def foPs():\n return vKnz(nKyW('index'))",
"def o7Xd():\n return vKnz('/')",
"def d6pt(QePW):\n return vKnz('polls:index')",
"def C_QL():\n return vKnz... | [
"0.6889249",
"0.685594",
"0.68496305",
"0.6730005",
"0.6604118",
"0.651976",
"0.6506114",
"0.6469121",
"0.6458482",
"0.64317304",
"0.640421",
"0.6387237",
"0.63767403",
"0.6375142",
"0.6348239",
"0.6342875",
"0.6328945",
"0.6312688",
"0.630708",
"0.63059723",
"0.6292399",
"... | 0.8471828 | 0 |
returns True if `obj` is changed or deleted on the database | def cgIa(YEnM):
_PTK = mDK6(YEnM)
DpZH = FPY6(YEnM)
return not YEnM.__class__.objects.filter(**{YEnM._meta.pk.name: YEnM.pk, _PTK: DpZH}).exists() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UVGt(YKHO, YEnM):\n Y49q = Uegc(YKHO.model)\n if Y49q == YEnM:\n return True\n return False",
"def PFbn(YKHO, QePW, YEnM=None):\n if YEnM is not None:\n return False\n return super().has_change_permission(QePW, YEnM)",
"def FIDN(YKHO):\n pass",
"def vtfo(YKHO, YEnM):\n ... | [
"0.6930333",
"0.6525286",
"0.64501333",
"0.64336836",
"0.6431397",
"0.64131296",
"0.64131296",
"0.6349598",
"0.63452303",
"0.63142246",
"0.63139683",
"0.6300048",
"0.62984204",
"0.62824523",
"0.6207841",
"0.616058",
"0.61573696",
"0.6101484",
"0.60884404",
"0.60836864",
"0.60... | 0.80351144 | 0 |
Search through a table and return the first [row, column] pair who's value is None. | def Zkyy(tyNF):
for rdlD in range(len(tyNF)):
for iVRZ in range(len(tyNF[rdlD])):
if tyNF[rdlD][iVRZ] is None:
return (rdlD, iVRZ)
return (rdlD, iVRZ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wvia(Emd4, Csk6):\n a1PO = oyIN.where(Csk6[:, 2] > 0)[0]\n if len(a1PO):\n return (Csk6[a1PO[0], 0], Csk6[a1PO[0], 1], a1PO[0])\n return (None, None, None)",
"def WswY(iBIi):\n for YRbF in range(9):\n for r845 in range(9):\n if iBIi[YRbF][r845] == 0:\n retu... | [
"0.64960337",
"0.634782",
"0.633694",
"0.6331864",
"0.6245917",
"0.6233299",
"0.60606706",
"0.60600805",
"0.5962007",
"0.5913134",
"0.5856047",
"0.5801559",
"0.57643837",
"0.57631135",
"0.5742628",
"0.5713552",
"0.56185967",
"0.5603105",
"0.559049",
"0.55511755",
"0.54848987"... | 0.7773614 | 0 |
Converts colorspace vector back to RGB image. Colorspace can have extra columns | def ryCN(EChr: DataFrame, r8hN: int, exwG: int) -> oyIN.array:
assert isinstance(EChr, hxoQ), 'Colorspace must be a dataframe'
assert len(EChr) == r8hN * exwG, 'Image dimensions must match'
assert all(oyIN.isin(['R', 'G', 'B'], EChr.columns)), 'Colorspace must contain RGB columns'
Aofo = oyIN.empty([r8h... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QY4h(EcVT, Gl89):\n if Gl89 == 'BGR':\n return EcVT\n EcVT = oyIN.array(EcVT)\n if Gl89 == 'HLS':\n gtI8 = XC5k.COLOR_BGR2HLS\n elif Gl89 == 'HSV':\n gtI8 = XC5k.COLOR_BGR2HSV\n elif Gl89 == 'LUV':\n gtI8 = XC5k.COLOR_BGR2LUV\n elif Gl89 == 'YUV':\n gtI8 = X... | [
"0.6144378",
"0.60548836",
"0.6034356",
"0.5993296",
"0.5984861",
"0.5929783",
"0.58545554",
"0.58436054",
"0.5751462",
"0.573934",
"0.5706569",
"0.5676334",
"0.567407",
"0.5654705",
"0.56331134",
"0.5625428",
"0.5621792",
"0.5558728",
"0.5558652",
"0.5552761",
"0.5528596",
... | 0.6287839 | 0 |
Tests that all signals are constructed. | def NN1M(YKHO):
ez7B = DBB8(rLdf.read_csv('raw_data/sample_raw_data.csv'), Hoav)
assert 'completely_home_prop' in set(ez7B.columns)
assert 'full_time_work_prop' in set(ez7B.columns)
assert 'part_time_work_prop' in set(ez7B.columns)
assert 'median_home_dwell_time' in set(ez7B.columns) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ILHa(YKHO):\n AoVp(YKHO.test_extension, YKHO.signal, YKHO._on_signal_fired)\n YKHO.assertEqual(len(YKHO._on_signal_fired.calls), 0)\n YKHO.signal.send(YKHO)\n YKHO.assertEqual(len(YKHO._on_signal_fired.calls), 1)",
"def Gua6(YKHO):\n kYGz = n3Kt()\n ftz7 = n3Kt()\n YKHO.configure_block(k... | [
"0.7198699",
"0.6961123",
"0.6867601",
"0.68594754",
"0.67881685",
"0.66899323",
"0.66274303",
"0.6527756",
"0.65197617",
"0.6457534",
"0.6406589",
"0.63431233",
"0.6326639",
"0.62745726",
"0.627386",
"0.62715155",
"0.62302566",
"0.6204464",
"0.61189145",
"0.60972494",
"0.600... | 0.627173 | 15 |
Tests that aggregation at the state level creates nonzerovalued signals. | def mwlu(YKHO):
ez7B = DBB8(rLdf.read_csv('raw_data/sample_raw_data.csv'), Hoav)
jQ3Z = Qemi(ez7B, Hoav, 'state')
assert oyIN.all(jQ3Z[f'{Hoav[0]}_n'].values > 0)
WKvO = jQ3Z[f'{Hoav[0]}_se'].values
assert oyIN.all(WKvO[~oyIN.isnan(WKvO)] >= 0)
assert jQ3Z.shape == (54, 17) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kbbA(YKHO):\n ez7B = DBB8(rLdf.read_csv('raw_data/sample_raw_data.csv'), Hoav)\n jQ3Z = Qemi(ez7B, Hoav, 'nation')\n assert oyIN.all(jQ3Z[f'{Hoav[0]}_n'].values > 0)\n WKvO = jQ3Z[f'{Hoav[0]}_se'].values\n assert oyIN.all(WKvO[~oyIN.isnan(WKvO)] >= 0)\n assert jQ3Z.shape == (1, 17)",
"def D... | [
"0.61210126",
"0.5934089",
"0.589467",
"0.5892433",
"0.5861224",
"0.5711701",
"0.5653383",
"0.5630056",
"0.5579708",
"0.5577906",
"0.5550419",
"0.5545783",
"0.55085456",
"0.5499616",
"0.5489012",
"0.5481875",
"0.5469063",
"0.5461217",
"0.54575956",
"0.5446156",
"0.5441203",
... | 0.748049 | 0 |
Tests that aggregation at the state level creates nonzerovalued signals. | def ni4Z(YKHO):
ez7B = DBB8(rLdf.read_csv('raw_data/sample_raw_data.csv'), Hoav)
jQ3Z = Qemi(ez7B, Hoav, 'msa')
assert oyIN.all(jQ3Z[f'{Hoav[0]}_n'].values > 0)
WKvO = jQ3Z[f'{Hoav[0]}_se'].values
assert oyIN.all(WKvO[~oyIN.isnan(WKvO)] >= 0)
assert jQ3Z.shape == (372, 17) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mwlu(YKHO):\n ez7B = DBB8(rLdf.read_csv('raw_data/sample_raw_data.csv'), Hoav)\n jQ3Z = Qemi(ez7B, Hoav, 'state')\n assert oyIN.all(jQ3Z[f'{Hoav[0]}_n'].values > 0)\n WKvO = jQ3Z[f'{Hoav[0]}_se'].values\n assert oyIN.all(WKvO[~oyIN.isnan(WKvO)] >= 0)\n assert jQ3Z.shape == (54, 17)",
"def k... | [
"0.7479666",
"0.6121371",
"0.5934786",
"0.5891897",
"0.5862976",
"0.57110685",
"0.56545264",
"0.5631428",
"0.55796295",
"0.5577801",
"0.55514765",
"0.554494",
"0.5510593",
"0.5500976",
"0.54901975",
"0.54840297",
"0.5469475",
"0.54619354",
"0.54598",
"0.5447684",
"0.54426587"... | 0.58947563 | 3 |
Tests that aggregation at the state level creates nonzerovalued signals. | def IKwL(YKHO):
ez7B = DBB8(rLdf.read_csv('raw_data/sample_raw_data.csv'), Hoav)
jQ3Z = Qemi(ez7B, Hoav, 'hrr')
assert oyIN.all(jQ3Z[f'{Hoav[0]}_n'].values > 0)
WKvO = jQ3Z[f'{Hoav[0]}_se'].values
assert oyIN.all(WKvO[~oyIN.isnan(WKvO)] >= 0)
assert jQ3Z.shape == (306, 17) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mwlu(YKHO):\n ez7B = DBB8(rLdf.read_csv('raw_data/sample_raw_data.csv'), Hoav)\n jQ3Z = Qemi(ez7B, Hoav, 'state')\n assert oyIN.all(jQ3Z[f'{Hoav[0]}_n'].values > 0)\n WKvO = jQ3Z[f'{Hoav[0]}_se'].values\n assert oyIN.all(WKvO[~oyIN.isnan(WKvO)] >= 0)\n assert jQ3Z.shape == (54, 17)",
"def k... | [
"0.74809134",
"0.6120178",
"0.5934026",
"0.58936185",
"0.5890962",
"0.5861368",
"0.5712922",
"0.5653689",
"0.56298804",
"0.55801994",
"0.55768",
"0.5550667",
"0.55458176",
"0.55086803",
"0.549904",
"0.5489132",
"0.54822505",
"0.5468543",
"0.54612315",
"0.54581416",
"0.5446415... | 0.53738433 | 29 |
Tests that aggregation at the state level creates nonzerovalued signals. | def kbbA(YKHO):
ez7B = DBB8(rLdf.read_csv('raw_data/sample_raw_data.csv'), Hoav)
jQ3Z = Qemi(ez7B, Hoav, 'nation')
assert oyIN.all(jQ3Z[f'{Hoav[0]}_n'].values > 0)
WKvO = jQ3Z[f'{Hoav[0]}_se'].values
assert oyIN.all(WKvO[~oyIN.isnan(WKvO)] >= 0)
assert jQ3Z.shape == (1, 17) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mwlu(YKHO):\n ez7B = DBB8(rLdf.read_csv('raw_data/sample_raw_data.csv'), Hoav)\n jQ3Z = Qemi(ez7B, Hoav, 'state')\n assert oyIN.all(jQ3Z[f'{Hoav[0]}_n'].values > 0)\n WKvO = jQ3Z[f'{Hoav[0]}_se'].values\n assert oyIN.all(WKvO[~oyIN.isnan(WKvO)] >= 0)\n assert jQ3Z.shape == (54, 17)",
"def D... | [
"0.74812746",
"0.59329057",
"0.5895889",
"0.58929867",
"0.58616966",
"0.5710675",
"0.565309",
"0.5629537",
"0.557881",
"0.5575357",
"0.5549657",
"0.55448717",
"0.55095005",
"0.54987305",
"0.54884887",
"0.54829407",
"0.5467536",
"0.54628205",
"0.5458857",
"0.5445779",
"0.54409... | 0.6122557 | 1 |
Tests that aggregation at the state level creates nonzerovalued signals. | def syKG(YKHO):
ez7B = DBB8(rLdf.read_csv('raw_data/sample_raw_data.csv'), Hoav)
jQ3Z = Qemi(ez7B, Hoav, 'hhs')
assert oyIN.all(jQ3Z[f'{Hoav[0]}_n'].values > 0)
WKvO = jQ3Z[f'{Hoav[0]}_se'].values
assert oyIN.all(WKvO[~oyIN.isnan(WKvO)] >= 0)
assert jQ3Z.shape == (10, 17) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mwlu(YKHO):\n ez7B = DBB8(rLdf.read_csv('raw_data/sample_raw_data.csv'), Hoav)\n jQ3Z = Qemi(ez7B, Hoav, 'state')\n assert oyIN.all(jQ3Z[f'{Hoav[0]}_n'].values > 0)\n WKvO = jQ3Z[f'{Hoav[0]}_se'].values\n assert oyIN.all(WKvO[~oyIN.isnan(WKvO)] >= 0)\n assert jQ3Z.shape == (54, 17)",
"def k... | [
"0.748049",
"0.61210126",
"0.5934089",
"0.589467",
"0.5892433",
"0.5861224",
"0.5711701",
"0.5653383",
"0.5630056",
"0.5579708",
"0.5577906",
"0.5550419",
"0.5545783",
"0.55085456",
"0.5499616",
"0.5489012",
"0.5481875",
"0.5469063",
"0.54575956",
"0.5446156",
"0.5441203",
... | 0.5461217 | 18 |
Converts a TyDi 'entry' from `create_entry_from_json` to `TyDiExample`. | def PNzD(bTKY, LT6S):
if LT6S:
ANfV = AUFz(bTKY['contexts'], bTKY['answer'])
ds2V = ANfV.offset
eXQA = ANfV.offset + yR_q(ANfV.text)
else:
ANfV = None
ds2V = None
eXQA = None
return sgY5(example_id=int(bTKY['id']), language_id=gL5W(bTKY['language']), question=... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def P0O5(bTKY):\n RAUw.create(**bTKY)\n return bTKY",
"def jG8h(Emd4, qHj0) -> 'Todo':\n return gnPz.deserialize_model(qHj0, Emd4)",
"def jbse(pofk):\n return qQXR.loads(pofk)",
"def u9VE(YKHO, YGFP: JsonDict) -> ec6H:\n E6fF = YGFP['premise']\n Dbo9 = YGFP['hypothesis']\n UCf9 = YGFP['s... | [
"0.58346426",
"0.5392077",
"0.5235372",
"0.5232819",
"0.52080363",
"0.51707566",
"0.5161617",
"0.5157883",
"0.5148814",
"0.51232684",
"0.51134694",
"0.5111602",
"0.5105579",
"0.51049596",
"0.5095554",
"0.50900686",
"0.5078553",
"0.5064115",
"0.5054117",
"0.50366974",
"0.50366... | 0.74971884 | 0 |
Return a list of all child elements that are instances of the given type. The returned list maintains the order in which children were added. | def oR3l(YKHO, HI6E):
NKcE = getattr(YKHO.__class__, '_getChildrenOfType' + HI6E.__name__)
return NKcE(YKHO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def B5QF(YKHO, type: str):\n return list(B5QF(YKHO.type_tree, type))",
"def wgJ9(YKHO, PNan):\n KWkg = []\n if YKHO is None:\n return KWkg\n if YKHO.tag_type == PNan:\n KWkg.append(YKHO)\n for aUGN in YKHO.children:\n if aUGN is None:\n continue\n yVK4 = aUGN... | [
"0.7072542",
"0.6878987",
"0.6743088",
"0.6691061",
"0.6669156",
"0.6660059",
"0.66244364",
"0.6470436",
"0.64007956",
"0.6340226",
"0.62596714",
"0.6195003",
"0.61464643",
"0.6143393",
"0.6124976",
"0.60636926",
"0.6059035",
"0.6055325",
"0.603803",
"0.6019386",
"0.60062987"... | 0.61959624 | 11 |
(Deprecated) Add a BindInput to this shader reference. | def b7WQ(YKHO, mWFP, type=utOQ):
qmLP.warn('This function is deprecated; shader references have been replaced with shader nodes in 1.38.', DeprecationWarning, stacklevel=2)
return YKHO.addInput(mWFP, type) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lZRe(YKHO, mWFP, type=utOQ):\n qmLP.warn('This function is deprecated; shader references have been replaced with shader nodes in 1.38.', DeprecationWarning, stacklevel=2)\n return YKHO.addInput(mWFP, type)",
"def iCJh(YKHO):\n qmLP.warn('This function is deprecated; shader references have been repla... | [
"0.7632342",
"0.65786767",
"0.573658",
"0.5379098",
"0.5296212",
"0.5178297",
"0.5159998",
"0.5151385",
"0.5066717",
"0.49228904",
"0.4916024",
"0.48976418",
"0.48940352",
"0.48545158",
"0.47804457",
"0.47647017",
"0.4753692",
"0.47506797",
"0.4747506",
"0.47449464",
"0.47333... | 0.84288436 | 0 |
(Deprecated) Return a vector of all BindInput elements in this shader reference. | def iCJh(YKHO):
qmLP.warn('This function is deprecated; shader references have been replaced with shader nodes in 1.38.', DeprecationWarning, stacklevel=2)
return YKHO.getInputs() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xJey(YKHO):\n qmLP.warn('This function is deprecated; shader references have been replaced with shader nodes in 1.38.', DeprecationWarning, stacklevel=2)\n return list()",
"def qLOy(YKHO):\n qmLP.warn('This function is deprecated; shader references have been replaced with shader nodes in 1.38.', Dep... | [
"0.7248788",
"0.68201584",
"0.61971897",
"0.6057106",
"0.6041571",
"0.60374856",
"0.60374856",
"0.60374856",
"0.6018457",
"0.59155166",
"0.5823089",
"0.57687944",
"0.5762386",
"0.5726699",
"0.5726699",
"0.5726699",
"0.5711171",
"0.5709276",
"0.5706087",
"0.5700484",
"0.568270... | 0.83538413 | 0 |
Return the default data search path. | def fKss():
return aJKb(Hy7s.path.dirname(xAKo)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CQmF(YKHO):\n return Hy7s.path.join(_Fei.DATA_DIR, 'vehicles_dataset_v{}'.format(YKHO._version))",
"def codg(YKHO):\n return YKHO._default_data_dir",
"def CQmF(YKHO):\n return Hy7s.path.join(_Fei.DATA_DIR, 'visual_genome')",
"def CQmF(YKHO):\n return Hy7s.path.join(_Fei.ROOT_DIR, 'data', 'KIT... | [
"0.8129479",
"0.8007878",
"0.79695016",
"0.79296505",
"0.7858564",
"0.7470226",
"0.743667",
"0.7417918",
"0.74098426",
"0.74098426",
"0.7362305",
"0.7316143",
"0.72809714",
"0.72342837",
"0.72125745",
"0.7184736",
"0.7136621",
"0.70106024",
"0.69430655",
"0.6912006",
"0.68595... | 0.8906264 | 0 |
Convert bbox representation from `camera_view_bounds_2d` to a more standard PILfriendly representation. | def GPN3(cviu, TVTK, H2v2):
JRC0, LChT, IA3S, dCLF = cviu
JRC0 *= TVTK
IA3S *= TVTK
LChT = (1 - LChT) * H2v2
dCLF = (1 - dCLF) * H2v2
return (JRC0, LChT, IA3S, dCLF) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UX2B(YKHO, oRQ3):\n si3g, o4D3, skBL, ajwV = biH0.apply_transformation(oRQ3, oyIN.linalg.inv(YKHO.transformation))\n yzQ0, MKlR = YKHO.image_size\n si3g, o4D3, skBL, ajwV = (si3g * MKlR, o4D3 * yzQ0, skBL * MKlR, ajwV * yzQ0)\n return _Sas.Rectangle(o4D3, si3g, ajwV - o4D3, skBL - si3g)",
"def R0... | [
"0.67457765",
"0.66060835",
"0.66052955",
"0.6402712",
"0.62045026",
"0.6073645",
"0.5911082",
"0.5882305",
"0.58592385",
"0.5842651",
"0.58156204",
"0.5749467",
"0.57198113",
"0.57176834",
"0.56508476",
"0.56418383",
"0.5637036",
"0.5637036",
"0.56326663",
"0.5607498",
"0.56... | 0.6208672 | 4 |
Returns the circular velocity. | def WXvV(Mkmy, hzEX, yvY1=1.0):
if yvY1 is None:
yvY1 = 1.0
return oyIN.sqrt(yvY1 * hzEX / Mkmy) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uxsC(YKHO):\n return YKHO.momentum / YKHO.mass",
"def afMV(YKHO):\n return oyIN.array([0, YKHO.wz, 0])",
"def GiOJ(YKHO):\n return epAf.pi * YKHO.radius * 2",
"def zohc(YKHO):\n p8Jz = YKHO.orbitalAngularVelocity * YKHO.r\n return p8Jz",
"def GiOJ(YKHO):\n return 2 * epAf.pi * YKHO.__... | [
"0.7257846",
"0.7252623",
"0.69760185",
"0.6974948",
"0.6948337",
"0.6904478",
"0.68118125",
"0.6809711",
"0.679329",
"0.679329",
"0.67710674",
"0.6732156",
"0.6705026",
"0.66750187",
"0.65806377",
"0.64651424",
"0.64618456",
"0.64478517",
"0.64435196",
"0.6440419",
"0.640747... | 0.0 | -1 |
Returns the density enclosed within rmax. | def YTDa(bMbF, Mkmy, X17R):
or8S = Mkmy < X17R
return bMbF[or8S].sum() / sVRR(X17R) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BWxS(YKHO):\n oRRe = str(YKHO.density.index(min(YKHO.density)) + 1)\n print(oRRe)\n return oRRe",
"def SsUV(YKHO):\n return YKHO.rmax",
"def Lk9W(YKHO):\n if YKHO.max_radius:\n return YKHO.max_radius\n SWJY, jccF = YKHO.get_annual_occurrence_rates()[-1]\n for IchJ, oyIN in YKHO.... | [
"0.7466451",
"0.68567127",
"0.6770987",
"0.64775264",
"0.64172965",
"0.63328725",
"0.6259476",
"0.6152548",
"0.6098544",
"0.606421",
"0.6053934",
"0.60529995",
"0.5983414",
"0.5938681",
"0.5918545",
"0.5912345",
"0.589474",
"0.5892661",
"0.5886185",
"0.5880672",
"0.58720237",... | 0.61871815 | 7 |
Squeezes 3D positions along y and z axes while preserving volume. | def uYBr(oeNL, oIAH=-1, SgwL=-1):
QIb0 = 1.0
if oIAH > 0:
QIb0 *= oIAH
oeNL[:, 1] *= oIAH
if SgwL > 0:
QIb0 *= SgwL
oeNL[:, 2] *= SgwL
oeNL *= QIb0 ** (-1.0 / 3.0)
return oeNL | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def L_vz(YKHO, cTRz, GQNi, LdzP):\n GQNi = int(GQNi)\n LdzP = int(LdzP)\n bK54 = YKHO.get_plane(cTRz, 'yz', GQNi)\n wUpc = oyIN.array(list(Hs6x.product(YKHO.Z, YKHO.Y)))\n bK54 = bK54.flatten()\n yUA5 = oyIN.array(list(Hs6x.repeat(WKvO[GQNi], len(bK54))))\n Q8KW = oyIN.zeros((wUpc.shape[0], 4)... | [
"0.5905184",
"0.583379",
"0.5720596",
"0.5672659",
"0.5666331",
"0.5634003",
"0.5627785",
"0.5615881",
"0.56032383",
"0.5562901",
"0.5532643",
"0.55280274",
"0.5481719",
"0.54555655",
"0.54548764",
"0.54529595",
"0.5406398",
"0.5384927",
"0.53750247",
"0.53184706",
"0.5297355... | 0.57265604 | 2 |
Convert number to string, replacing punctuation. | def tCKz(_uCR, AGLZ=None, sxk0='p', WJwt='n', HVUZ=3, iWiX=True):
import copy
from string import maketrans
if AGLZ is None:
AGLZ = '.{}g'.format(HVUZ)
if iWiX and (not isinstance(_uCR, (int, Swre))):
LAww = 10.0 ** (-(HVUZ - 1))
if _uCR == 0:
_uCR = int(_uCR)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SZFh(KCHu):\n return 'digit ' + str(KCHu)",
"def a8Pe(FGW3):\n yvT9 = ''\n if FGW3 % 3 == 0:\n yvT9 = 'Pling'\n if FGW3 % 5 == 0:\n yvT9 = yvT9 + 'Plang'\n if FGW3 % 7 == 0:\n yvT9 = yvT9 + 'Plong'\n if yvT9 == '':\n yvT9 = str(FGW3)\n return yvT9",
"def SZF... | [
"0.6683302",
"0.6635494",
"0.6613576",
"0.6592942",
"0.6592942",
"0.6592942",
"0.6575372",
"0.65695816",
"0.64755034",
"0.64755034",
"0.6431362",
"0.6401847",
"0.6401584",
"0.6375053",
"0.63302994",
"0.6309738",
"0.6306367",
"0.6301587",
"0.62851566",
"0.6232513",
"0.6218883"... | 0.5528809 | 76 |
Returns a double, the average number of days between the rating objects specified in the list parameter. | def N7YX(vC9B):
if len(vC9B) <= 1:
return str(None)
wjRY = 0.0
for Ty9i in range(0, len(vC9B) - 1):
wjRY = wjRY + float((vC9B[Ty9i + 1]['date'] - vC9B[Ty9i]['date']).days)
return str(float(wjRY / (len(vC9B) - 1))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qqgr(list):\n return sum(list) / len(list)",
"def OAeO(exwG: list) -> float:\n Ttgg = rNV6(exwG)\n return sum(Ttgg) / len(Ttgg)",
"def Z70p(sach):\n mwlV = []\n try:\n for Fg_i in sach:\n mwlV.append(Fg_i['rating'])\n except KeyError:\n pass\n S0G2 = float(sum(... | [
"0.68933636",
"0.66389376",
"0.6581203",
"0.65615976",
"0.65188193",
"0.6491516",
"0.64800775",
"0.64580154",
"0.6454823",
"0.6444565",
"0.6435506",
"0.64231765",
"0.64099354",
"0.63959163",
"0.6393575",
"0.63914645",
"0.63865495",
"0.63710004",
"0.6341628",
"0.6338856",
"0.6... | 0.6772968 | 1 |
Split dataset into train and test data | def wsYj(v_aT, enqh, wFVV, ogMi):
syTg = list(range(len(v_aT)))
_Yph = syTg[0::enqh]
for LihS in syTg:
if LihS in _Yph:
syTg.remove(LihS)
a1PO, yzQ0, MKlR, eHNT = v_aT[0].data[wFVV].shape
VLNV = a1PO
cUEj = eHNT
bA0y = a1PO * eHNT
vDyK = oyIN.zeros([0, bA0y])
for ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F_Ph(YKHO):\n YKHO.train, YKHO.valid, bGrB, bGrB = bHtP(YKHO.data, YKHO.data, test_size=0.2)\n YKHO.valid, YKHO.test, bGrB, bGrB = bHtP(YKHO.valid, YKHO.valid, test_size=0.5)",
"def cTf9(onqj):\n XxFT, t4zr = bHtP(onqj, test_size=0.2, random_state=42)\n return (XxFT, t4zr)",
"def FJfc(YKHO, NI2... | [
"0.8715163",
"0.8671336",
"0.8420628",
"0.8248627",
"0.8183213",
"0.8146104",
"0.8093698",
"0.8087583",
"0.8075708",
"0.8037415",
"0.80204433",
"0.8016",
"0.8002609",
"0.79591835",
"0.79122245",
"0.78805375",
"0.7857199",
"0.78511673",
"0.78495",
"0.78276145",
"0.77810913",
... | 0.0 | -1 |
Split dataset into train and test data | def MRUP(v_aT, wFVV, ogMi):
for qgBk in v_aT:
bySB = oyIN.array([qgBk.data[wFVV]])
for qgBk in v_aT:
Crrw = oyIN.array([qgBk.mask_timeless[ogMi]])
XP5J, a1PO, yzQ0, MKlR, eHNT = bySB.shape
VLNV = a1PO
cUEj = eHNT
bySB = oyIN.moveaxis(bySB, 1, 3).reshape(yzQ0 * MKlR, a1PO * eHNT)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F_Ph(YKHO):\n YKHO.train, YKHO.valid, bGrB, bGrB = bHtP(YKHO.data, YKHO.data, test_size=0.2)\n YKHO.valid, YKHO.test, bGrB, bGrB = bHtP(YKHO.valid, YKHO.valid, test_size=0.5)",
"def cTf9(onqj):\n XxFT, t4zr = bHtP(onqj, test_size=0.2, random_state=42)\n return (XxFT, t4zr)",
"def FJfc(YKHO, NI2... | [
"0.8715228",
"0.867129",
"0.8421134",
"0.8248853",
"0.8183687",
"0.8146796",
"0.8093657",
"0.8088005",
"0.8075957",
"0.80384034",
"0.80211496",
"0.80177146",
"0.80029935",
"0.79595435",
"0.7912857",
"0.7880697",
"0.7858649",
"0.78521097",
"0.7849592",
"0.78286815",
"0.7782076... | 0.0 | -1 |
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`. | def LwSz(Bcwd, KndY, NkkI=False, leAC='Confusion matrix', iMGt=QrM1.cm.Blues, IICq='True label', VoLU='Predicted label', Ux0P=None):
oyIN.set_printoptions(precision=2, suppress=True)
if NkkI:
Bcwd = Bcwd.astype('float') / (Bcwd.sum(axis=1)[:, oyIN.newaxis] + oyIN.finfo(oyIN.float).eps)
QrM1.imshow(B... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LwSz(Bcwd, KndY=[0, 1], NkkI=False, leAC='Confusion matrix', RMso=False):\n if NkkI:\n Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]\n print('Normalized confusion matrix')\n else:\n print('Confusion matrix, without normalization')\n if RMso:\n print(Bcwd)"... | [
"0.8195649",
"0.8095532",
"0.803007",
"0.8019817",
"0.7994959",
"0.7991904",
"0.79818887",
"0.79766536",
"0.7961735",
"0.7957412",
"0.79385704",
"0.7935568",
"0.79352015",
"0.7932079",
"0.79270303",
"0.7925357",
"0.79243845",
"0.7923781",
"0.792341",
"0.79226786",
"0.7918532"... | 0.0 | -1 |
Return the first empty board space. | def zwT7(iBIi, oyg0):
qieF = list((YRbF for YRbF in range(16) if iBIi[YRbF] == 0))
otTu = min(qieF)
Jw1e = {}
otTu = zdN3(qieF, jth9.copy(iBIi), oyg0)
return otTu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a0dL(iBIi: list) -> tuple:\n NZyS = len(iBIi)\n for YRbF in range(NZyS):\n for r845 in range(NZyS):\n if iBIi[YRbF][r845] == 0:\n return (YRbF, r845)",
"def VjM2(YKHO):\n return YKHO.tiles[-1]",
"def WswY(iBIi):\n for YRbF in range(9):\n for r845 in range... | [
"0.7228956",
"0.72194856",
"0.71157676",
"0.70752555",
"0.7033004",
"0.7023246",
"0.69070786",
"0.6800406",
"0.67626697",
"0.67131233",
"0.67107725",
"0.6703432",
"0.6672965",
"0.6548556",
"0.6537903",
"0.65232265",
"0.64945805",
"0.64092594",
"0.6404099",
"0.63550234",
"0.63... | 0.0 | -1 |
Test to see if profile for user1 can be edited anon and logged in | def Qb61(YKHO):
S0MI.debug('Test GET /rango/edit/ for anon user')
w9fq = YKHO.client.get('/rango/edit/')
YKHO.assertEquals(302, w9fq.status_code)
YKHO.assertRedirects(w9fq, 'http://testserver/accounts/login/?next=/rango/edit/')
S0MI.debug('Test GET /rango/edit/ for logged in user')
YKHO.client.l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SybY(YKHO, TjJE):\n if TjJE.is_superuser:\n return True\n if TjJE == YKHO.user:\n return True\n if YKHO.creator and YKHO.creator == TjJE or (YKHO.owner and YKHO.owner == TjJE):\n if YKHO.status:\n return True\n if TjJE.has_perm('profiles.change_profile', YKHO):\n ... | [
"0.7439114",
"0.7438289",
"0.71257675",
"0.7101223",
"0.69775563",
"0.6966782",
"0.6948189",
"0.69078314",
"0.67476374",
"0.67433494",
"0.67346734",
"0.66897315",
"0.6654319",
"0.6628165",
"0.66166735",
"0.66134465",
"0.6602346",
"0.6597451",
"0.6586665",
"0.65701985",
"0.649... | 0.70152277 | 4 |
Samples bs random locations along a sphere of radius r. Uses the specified distribution. | def C6_T(begE, lHmx=1, Mkmy=1, dMSF=1, zRp1=1, aRCs=epAf.pi * 0.5, ho1J=epAf.pi * 0.5, Tuqy='normal'):
if Tuqy == 'uniform':
q7In = (ht2j.rand((lHmx, 1), device=begE) - 0.5) * 2 * dMSF + aRCs
rVnq = (ht2j.rand((lHmx, 1), device=begE) - 0.5) * 2 * zRp1 + ho1J
elif Tuqy == 'normal' or Tuqy == 'gau... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def y8hm(Mkmy):\n WKvO = oyIN.random.normal()\n LVAh = oyIN.random.normal()\n epBp = oyIN.random.normal()\n AU8u = oyIN.array([WKvO, LVAh, epBp])\n AU8u *= Mkmy / (WKvO ** 2 + LVAh ** 2 + epBp ** 2) ** 0.5\n return AU8u",
"def eoHv(cDK5, rIHd, r1VO, Zaug=2, Tuqy='sphere', jdC6=None, yokr=None):... | [
"0.7045139",
"0.6714708",
"0.6683562",
"0.6669991",
"0.65136045",
"0.6468937",
"0.6257552",
"0.6257188",
"0.62165225",
"0.6169153",
"0.6119341",
"0.6071606",
"0.6061659",
"0.60455453",
"0.6028003",
"0.60168177",
"0.60071576",
"0.59225005",
"0.5913367",
"0.59113646",
"0.586713... | 0.0 | -1 |
Initialize parameters using 6/sqrt(fanin+fanout) | def N9iG(YKHO):
maxY = [YKHO.inputDim] + YKHO.layerSizes + [YKHO.outputDim]
m_03 = [oyIN.sqrt(6) / oyIN.sqrt(exwG + r8hN) for exwG, r8hN in zip(maxY[:-1], maxY[1:])]
YKHO.stack = [[oyIN.random.rand(r8hN, exwG) * 2 * KCHu - KCHu, oyIN.zeros((r8hN, 1))] for exwG, r8hN, KCHu in zip(maxY[:-1], maxY[1:], m_03)]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xyz5(IddF, XNhq, si3H=1):\n gqRb = -si3H * oyIN.sqrt(6 / (IddF + XNhq))\n ODP9 = si3H * oyIN.sqrt(6.0 / (IddF + XNhq))\n return ZylS.random_uniform((IddF, XNhq), minval=gqRb, maxval=ODP9, dtype=ZylS.float32)",
"def xyz5(IddF, XNhq, si3H=1):\n gqRb = -si3H * oyIN.sqrt(6 / (IddF + XNhq))\n ODP9 ... | [
"0.69680864",
"0.69680864",
"0.6911937",
"0.6851623",
"0.6725929",
"0.6668688",
"0.64314777",
"0.63509566",
"0.62880355",
"0.62276816",
"0.62222147",
"0.6196339",
"0.6129628",
"0.60937446",
"0.599177",
"0.5940592",
"0.5920254",
"0.5912472",
"0.5905206",
"0.5896622",
"0.582124... | 0.0 | -1 |
Convert Node to string | def wHJl(YKHO):
return str(YKHO.data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BZEt(Emd4, Q6kx):\n return JrOA.etree.tostring(Q6kx, method='html').decode()",
"def rIkN(Q6kx):\n VuiE = ' '.join((G1Hx for G1Hx, bGrB in Q6kx.leaves()))\n return u' '.join(VuiE.split())",
"def Tlhx(*qIxc):\n return _VfD.XMLNode_convertXMLNodeToString(*qIxc)",
"def jIBX(YKHO):\n eHNT = Ta4... | [
"0.8408117",
"0.8214098",
"0.7415175",
"0.7378646",
"0.7310514",
"0.7247914",
"0.69681686",
"0.69587487",
"0.6936375",
"0.6902002",
"0.6853445",
"0.6851775",
"0.67991513",
"0.67764467",
"0.6768847",
"0.6712302",
"0.6707059",
"0.6660956",
"0.66056967",
"0.65918684",
"0.6575423... | 0.0 | -1 |
Add an element to the linked list using add_last | def H2v5(YKHO, LihS):
YKHO.add_last(LihS) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tj6L(YKHO, LihS):\n if YKHO.is_empty():\n YKHO.head = YKHO.tail = YKHO.Node(LihS, None, None)\n else:\n YKHO.tail.nxt = YKHO.Node(LihS, YKHO.tail, None)\n YKHO.tail = YKHO.tail.nxt\n YKHO.size += 1",
"def AtWC(YKHO, U6D_):\n if U6D_ is None:\n raise TypeError('The inpu... | [
"0.82564276",
"0.8080936",
"0.7951037",
"0.794131",
"0.7875399",
"0.7835852",
"0.77919906",
"0.76805675",
"0.7517425",
"0.7477709",
"0.68978375",
"0.6834634",
"0.6787018",
"0.67224365",
"0.67016476",
"0.66619736",
"0.65850174",
"0.65378225",
"0.6514077",
"0.65035224",
"0.6492... | 0.7951242 | 2 |
Add element to the front of the linked list | def rMGb(YKHO, LihS):
if YKHO.is_empty():
YKHO.head = YKHO.tail = YKHO.Node(LihS, None, None)
else:
YKHO.head.prev = YKHO.Node(LihS, None, YKHO.head)
YKHO.head = YKHO.head.prev
YKHO.size += 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def byB9(YKHO, ZfUD):\n Esd_ = o7DN(ZfUD)\n if YKHO.head is None:\n YKHO.head = Esd_\n else:\n Esd_.next = YKHO.head\n YKHO.head = Esd_\n YKHO.n += 1",
"def LYLL(YKHO, nPrm):\n S06t = NSB4(nPrm)\n ycBG = YKHO._head\n if YKHO._head is None:\n YKHO._head = S06t\n ... | [
"0.80121136",
"0.79267305",
"0.7808346",
"0.7732094",
"0.76805055",
"0.76805055",
"0.7647048",
"0.7646265",
"0.75800365",
"0.7575906",
"0.7505272",
"0.74870515",
"0.7333277",
"0.73185617",
"0.7314353",
"0.73134905",
"0.7302316",
"0.7267416",
"0.724614",
"0.7222592",
"0.717940... | 0.71153533 | 25 |
Add to the end of the Linked list by append to tail.next O(n) | def tj6L(YKHO, LihS):
if YKHO.is_empty():
YKHO.head = YKHO.tail = YKHO.Node(LihS, None, None)
else:
YKHO.tail.nxt = YKHO.Node(LihS, YKHO.tail, None)
YKHO.tail = YKHO.tail.nxt
YKHO.size += 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oHxR(YKHO, wEf2):\n Q6kx = Msxl(wEf2)\n if YKHO.head == None:\n YKHO.head = Q6kx\n else:\n DpUl = YKHO.head\n while DpUl.next != None:\n DpUl = DpUl.next\n DpUl.next = Q6kx",
"def oHxR(YKHO, wEf2):\n ZbOB = YKHO.head\n while ZbOB.next:\n ZbOB = ZbO... | [
"0.80428195",
"0.80340844",
"0.7985346",
"0.7985346",
"0.79472816",
"0.7919729",
"0.7888224",
"0.78487927",
"0.784192",
"0.7733067",
"0.76617414",
"0.7581593",
"0.7545408",
"0.75196856",
"0.74800986",
"0.74454",
"0.7366315",
"0.7358709",
"0.7313949",
"0.730378",
"0.72863746",... | 0.6921185 | 36 |
Convert from ParseResults to normal list. | def bylS(L70P):
if isinstance(L70P, r3As):
return [bylS(S6Fl) for S6Fl in L70P]
else:
return L70P | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C9s3(YKHO, Ylbp):\n net2 = []\n for Mkmy in Ylbp:\n net2.append(Mkmy)\n return net2",
"def QwCY(Oguu):\n usx6 = []\n for rdlD in Oguu:\n usx6.append(rdlD)\n Oguu.close()\n return usx6",
"def UoUF(YKHO, Aofo: Result) -> x1iM[x1iM]:\n Pm2F = []\n for YRbF in range(len... | [
"0.67065823",
"0.6454018",
"0.6392541",
"0.61657304",
"0.6103048",
"0.60968775",
"0.600516",
"0.5954104",
"0.58549696",
"0.5853532",
"0.5851375",
"0.5830539",
"0.5825065",
"0.5800057",
"0.5794257",
"0.57913077",
"0.57792944",
"0.5751782",
"0.5738138",
"0.57195807",
"0.5705452... | 0.7606971 | 0 |
My delimited list. Allows for length zero list and uses no delimiter by default. | def x1iM(VN2L, SAEY=''):
if not SAEY:
return cQ68(CcJS(VN2L))
else:
return cQ68(h8nf(VN2L + CcJS(kDme(SAEY) + VN2L))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Keew(VWe_, ZfUD):\n return ZfUD + CcJS(VWe_ + ZfUD) + h8nf(VWe_)",
"def YYDj(ZfUD, TDw3=','):\n if not ZfUD:\n return []\n if type(ZfUD) is str:\n ZfUD = ZfUD.split(TDw3)\n if type(ZfUD) is not list:\n raise TypeError(\"'listify' must take None, str, or list!\")\n return Z... | [
"0.7051483",
"0.6357497",
"0.6287068",
"0.62133163",
"0.6168434",
"0.61420405",
"0.6067352",
"0.5842047",
"0.57866776",
"0.5777707",
"0.5761801",
"0.57346326",
"0.5694061",
"0.56513804",
"0.5629008",
"0.56282747",
"0.5587309",
"0.55792344",
"0.5534608",
"0.5531955",
"0.551274... | 0.6472422 | 1 |
Returns True if the user has the specified permission. This method queries all available auth backends, but returns immediately if any backend returns True. Thus, a user who has permission from a single auth backend is assumed to have permission in general. If an object is provided, permissions for this specific object... | def M1EP(YKHO, CBIr, IuXB, YEnM=None):
if CBIr.is_active and CBIr.is_superuser:
return True
return b94L(CBIr, IuXB, YEnM) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M1EP(YKHO, IuXB, YEnM=None):\n if YKHO.is_active and YKHO.is_superuser:\n return True\n return b94L(YKHO, IuXB, YEnM)",
"def M1EP(YKHO, IuXB, YEnM=None):\n if YKHO.is_active and YKHO.is_superuser:\n return True\n return b94L(YKHO, IuXB, YEnM)",
"def b94L(CBIr, IuXB, YEnM):\n fo... | [
"0.7863119",
"0.7828964",
"0.7681567",
"0.7681567",
"0.7347684",
"0.730742",
"0.7284849",
"0.72575694",
"0.72098434",
"0.7167823",
"0.7167823",
"0.71654195",
"0.7089648",
"0.70708424",
"0.70448405",
"0.7043486",
"0.69482195",
"0.6947326",
"0.69120204",
"0.69032484",
"0.684018... | 0.7860136 | 1 |
Test scenario where branch is deleted by someone. | def QS57(WY3t):
trZe.run(WY3t, ['git', 'checkout', 'feature'])
trZe.run(WY3t, ['git', 'push', 'origin', '--delete', 'feature'])
WY3t.join('README').write('Changed by local.')
n5sN = rfFO(str(WY3t), 'origin', ofzy(Nw2C))
assert n5sN is True
trZe.run(WY3t, ['git', 'diff-index', '--quiet', 'HEAD', ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def j4GU(QePW, ZGx0):\n jehQ = FYrf.Branch.get_by_id(int(ZGx0))\n if jehQ.owner != QePW.user:\n return vNxZ('You do not own this branch', status=403)\n vs0P = jehQ.repo_key\n jehQ.key.delete()\n vyce = FYrf.Branch.query(FYrf.Branch.repo_key == vs0P).count()\n if not vyce:\n vs0P.del... | [
"0.70407706",
"0.6978257",
"0.6950403",
"0.69398266",
"0.69226867",
"0.6910521",
"0.68338317",
"0.6806933",
"0.67489284",
"0.6737305",
"0.67202115",
"0.6653965",
"0.65832716",
"0.65230274",
"0.65227497",
"0.6496914",
"0.64698577",
"0.6468279",
"0.6465555",
"0.64556766",
"0.64... | 0.7768845 | 0 |
Test scenario where the remote repo is unavailable (e.g. repo deleted from GitHub). | def SxsR(WY3t, y5Cv):
WY3t.join('README').write('Changed by local.')
y5Cv.remove()
with trZe.raises(_LMt) as BQDi:
rfFO(str(WY3t), 'origin', ofzy(Nw2C))
assert 'Could not read from remote repository' in BQDi.value.output | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ndov(boHx):\n with trZe.raises(ValueError):\n Bwjp.pull(boHx.working_tree_dir)",
"def kNTJ(YKHO):\n bD7m = 'http://gitlab.com/ivacf/archi'\n with YKHO.assertRaises(DWtv):\n U6rx().fetch(bD7m)",
"def xbPj(xtX7):\n with trZe.raises(ValueError):\n Bwjp.pull(xtX7)",
"def jvkC... | [
"0.7890153",
"0.74834275",
"0.73048943",
"0.7264386",
"0.72429395",
"0.722274",
"0.7192378",
"0.7177005",
"0.6923777",
"0.6869419",
"0.6749882",
"0.66887414",
"0.66767913",
"0.666739",
"0.6656174",
"0.6620313",
"0.6619437",
"0.6606312",
"0.6595402",
"0.65802604",
"0.65629005"... | 0.6526773 | 21 |
Return true if light is on. | def Debg(YKHO):
return YKHO._state | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fBZe(YKHO):\n return YKHO._light == 'ON'",
"def fBZe(YKHO):\n return YKHO._light == 'ON'",
"def Debg(YKHO):\n return YKHO._light_on",
"def h0Nz(YKHO) -> bool:\n return f34S.Light.value in YKHO.type_data.attributes",
"def h0Nz(YKHO) -> bool:\n return f34S.Light.value in YKHO.type_data.att... | [
"0.9035416",
"0.89275813",
"0.86664206",
"0.8008696",
"0.8008696",
"0.78880787",
"0.7866302",
"0.7610281",
"0.7565963",
"0.7415077",
"0.7345493",
"0.7335999",
"0.73116577",
"0.7303292",
"0.72991306",
"0.7243393",
"0.71792775",
"0.71722543",
"0.7157757",
"0.7157757",
"0.715775... | 0.0 | -1 |
Instruct the light to turn off. | def Z_rv(YKHO, **B2fa):
YKHO._brightness = 0
YKHO._state = 'off'
vzeF.info('turn_off() is called') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z_rv(YKHO):\n xi8C.output(YKHO.gpio, False)",
"def fnTm(YKHO):\n YKHO._light = 'OFF'",
"def fnTm(YKHO):\n YKHO._light = 'OFF'",
"def V8X5(YKHO):\n YKHO.turnOff()",
"def Z_rv(YKHO, **B2fa: Any) -> None:\n YKHO._set_light(r7z_)",
"def Z_rv(YKHO, **B2fa: Any) -> None:\n YKHO._light.tur... | [
"0.9141917",
"0.89695406",
"0.89557284",
"0.89015293",
"0.8897358",
"0.8873913",
"0.87862444",
"0.87764317",
"0.86670524",
"0.86476165",
"0.847877",
"0.8473624",
"0.84669805",
"0.8463841",
"0.8435901",
"0.8370482",
"0.83494097",
"0.8275936",
"0.82717854",
"0.82705396",
"0.825... | 0.8805522 | 6 |
Returns a plane going through a point at pos, oriented orthogonally to the vector norm and of width and height sx, sy. | def eCZC(YKHO, oeNL=None, CkYf=None, kEC0=None, o0ZM=None, BhJz=None, qfpW='lightgray', Cwt5=0.25, **B2fa):
qCRP = dict(sagittal=(0, 1), horizontal=(2, 0), frontal=(2, 1))
if oeNL is None:
oeNL = YKHO.root._mesh.centerOfMass()
try:
CkYf = CkYf or YKHO.space.plane_normals[kEC0]
except Key... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Epat(CkYf, Csk6, y5bX):\n jzdc = CkYf[0]\n Fg_i = CkYf[1]\n Z9rn = CkYf[2]\n XP5J = []\n for YRbF in range(len(y5bX)):\n irsQ = y5bX[YRbF][0]\n AYir = y5bX[YRbF][1]\n C9QJ = y5bX[YRbF][2]\n if jzdc != 0:\n ZbiE = (Fg_i * Fg_i + Z9rn * Z9rn) * irsQ - jzdc * ... | [
"0.6396546",
"0.6396546",
"0.6183506",
"0.6174271",
"0.6145053",
"0.61160415",
"0.6035465",
"0.5979914",
"0.59591293",
"0.5913918",
"0.59053445",
"0.5904647",
"0.5876737",
"0.58654743",
"0.58250505",
"0.58204174",
"0.57940704",
"0.5756824",
"0.57409114",
"0.57186556",
"0.5703... | 0.68663776 | 0 |
! Get number of vertices for the entity type (pyD3VOGLModel.GLEntityType) | def Z_JL(YKHO):
if YKHO._enttype == k7RA.QUAD:
return 4
elif YKHO._enttype == k7RA.TRIA:
return 3
elif YKHO._enttype == k7RA.LINE:
return 2
else:
return 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VVUP(YKHO) -> int:\n raise NotImplementedError",
"def poMF(YKHO):\n return len(YKHO)",
"def poMF(YKHO):\n return len(YKHO.vertices)",
"def poMF(YKHO):\n return len(YKHO.vertices)",
"def zHmr(YKHO):\n return len(YKHO.vertices.keys())",
"def nAk3(YKHO):\n return YKHO._nVertices",
"d... | [
"0.70886576",
"0.6977656",
"0.6910094",
"0.6910094",
"0.6875554",
"0.68577117",
"0.6852669",
"0.6802562",
"0.67703396",
"0.6729522",
"0.6707347",
"0.6678461",
"0.6672218",
"0.6627881",
"0.65335345",
"0.6504911",
"0.6445821",
"0.64410627",
"0.63270456",
"0.6130506",
"0.6094207... | 0.67097986 | 10 |
Calculates and returns Y position to draw the graph or the border lines on canvas. Correct calculation is based on given sensor. | def E3ji(BWXx, XtFw):
if xToX.check_value(BWXx, XtFw):
return (32 - int(BWXx)) * 12.5 + 50 if XtFw == 't' else 450 - int(BWXx) / 10 * 40
return | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def boAb(YKHO):\n return YKHO.actual_coordinates[1]",
"def BBTF(YKHO):\n return YKHO.position.y",
"def boAb(YKHO):\n return YKHO.rect.y",
"def BBTF(YKHO):\n etR_ = YKHO.num_enabled\n if YKHO.heart_enabled:\n YKHO._heart_y = 45 * (YKHO.num_enabled - etR_) + 75\n etR_ -= 1\n if ... | [
"0.66574275",
"0.6487656",
"0.6412374",
"0.6384742",
"0.63770056",
"0.63079816",
"0.63051313",
"0.62791324",
"0.6248244",
"0.6188574",
"0.61683464",
"0.61539483",
"0.6150818",
"0.6133438",
"0.61187756",
"0.6089482",
"0.6060128",
"0.605848",
"0.60405856",
"0.60292876",
"0.6007... | 0.78490245 | 0 |
This method is used internally to check if the current animation needs to be skipped or not. It also checks if the number of animations that were played correspond to the number of animations that need to be played, and raises an EndSceneEarlyException if they don't correspond. | def phUQ(YKHO):
if YKHO.file_writer.sections[-1].skip_animations:
YKHO.skip_animations = True
if GPtr['from_animation_number'] and YKHO.num_plays < GPtr['from_animation_number']:
YKHO.skip_animations = True
if GPtr['upto_animation_number'] and YKHO.num_plays > GPtr['upto_animation_number']:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TE3H(YKHO):\n uqmj = len(YKHO.queued_animations)\n while len(YKHO.queued_animations) >= uqmj and len(YKHO.queued_animations) > 0:\n YKHO.update(100)",
"def smim(YKHO):\n YKHO._fast_forward_to_penultimate_play()\n if YKHO.game_status.game_over:\n YKHO.reset()\n return False\n ... | [
"0.5900172",
"0.55246276",
"0.5460398",
"0.5384421",
"0.53802437",
"0.5294638",
"0.5283734",
"0.52820474",
"0.52820474",
"0.5280884",
"0.5170907",
"0.5156991",
"0.5137927",
"0.5131808",
"0.5128726",
"0.50902385",
"0.50789577",
"0.5078137",
"0.50726855",
"0.50664717",
"0.50526... | 0.746912 | 0 |
If graph is a dag (directional acyclic graph), returns a list of the Nodes in graph such that for each edge A > B, A appears before B. If graph is not a dag, returns a list of the keys in graph in decreasing order of their Nodes' finishTime as determined from a DFS. | def _Ypz(pNZh, Lszu=None):
pNZh.reset()
Ne_V = []
global time
ITS7 = 0
if Lszu is not None:
Zlil(pNZh, Lszu, Ne_V)
TdNG = list(pNZh.adjacencyMap.keys())
TdNG.sort()
for H5ew in TdNG:
if pNZh.vertexMap[H5ew].searchStatus == 'undiscovered':
Zlil(pNZh, H5ew, Ne_V... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ao7q(pNZh):\n BTss = dict.fromkeys(pNZh.keys(), eYNV.WHITE)\n ao7q = []\n\n def K2kF(SLBp):\n BTss[SLBp] = eYNV.GRAY\n for AAbN in pNZh[SLBp]:\n if BTss[AAbN] == eYNV.WHITE:\n K2kF(AAbN)\n BTss[SLBp] = eYNV.BLACK\n ao7q.append(SLBp)\n for SLBp i... | [
"0.6870418",
"0.6653123",
"0.62808746",
"0.6193029",
"0.615637",
"0.60633636",
"0.59539557",
"0.59509176",
"0.59378695",
"0.5868872",
"0.5856139",
"0.5848763",
"0.5805774",
"0.578109",
"0.57603496",
"0.5736487",
"0.5732424",
"0.5702125",
"0.57002413",
"0.5691765",
"0.56834507... | 0.6322051 | 2 |
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`. | def LwSz(Bcwd, NkkI=False, leAC=None, iMGt=QrM1.cm.Blues, HOVt=None):
if not leAC:
if NkkI:
leAC = 'Normalized confusion matrix'
else:
leAC = 'Confusion matrix, without normalization'
KndY = HOVt
if NkkI:
Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LwSz(Bcwd, KndY=[0, 1], NkkI=False, leAC='Confusion matrix', RMso=False):\n if NkkI:\n Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]\n print('Normalized confusion matrix')\n else:\n print('Confusion matrix, without normalization')\n if RMso:\n print(Bcwd)"... | [
"0.8194862",
"0.80949175",
"0.8029915",
"0.8019153",
"0.79941195",
"0.7991258",
"0.7980955",
"0.7976606",
"0.79610753",
"0.79590565",
"0.79378676",
"0.7934962",
"0.7934504",
"0.79313844",
"0.7926313",
"0.7924577",
"0.79241234",
"0.7923211",
"0.7923023",
"0.7921931",
"0.791787... | 0.0 | -1 |
Taking secp256k1's G as a seed, either in compressed or uncompressed form, append "index" as a byte, and append a second byte "counter" try to create a new NUMS base point from the sha256 of that bytestring. Loop counter and alternate compressed/uncompressed until finding a valid curve point. The first such point is co... | def IeyZ(d6pt=0):
assert d6pt in range(256)
nqxn = None
for yvY1 in [zPB5(True), zPB5(False)]:
yokr = yvY1 + chr(d6pt)
for ewCu in range(256):
FCOw = yokr + chr(ewCu)
lfBQ = HBct.sha256(FCOw).digest()
Kie4 = '\x02' + lfBQ
try:
n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E2ML(YKHO, d6pt=0):\n G1Hx = Hy7s.urandom(32)\n Oa10 = IeyZ(d6pt)\n EEAl = dPpg.PrivateKey(G1Hx, ctx=OaeV).pubkey\n A3I0 = Oa10.tweak_mul(G1Hx)\n YKHO.P2 = RszU(YKHO.priv, Oa10)\n YKHO.get_commitment()\n YKHO.e = HBct.sha256(''.join([WKvO.serialize() for WKvO in [EEAl, A3I0, YKHO.P, YKHO.P... | [
"0.588711",
"0.55167645",
"0.5486731",
"0.5389965",
"0.5368635",
"0.5368635",
"0.5340812",
"0.5231569",
"0.5220929",
"0.5193509",
"0.51206154",
"0.5085955",
"0.5046237",
"0.5041022",
"0.502793",
"0.5023869",
"0.50096273",
"0.49974316",
"0.49673843",
"0.49673653",
"0.49479038"... | 0.78247774 | 0 |