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 |
|---|---|---|---|---|---|---|
Returns a driver object of the chrome web driver. This can be used for crawling. | def liSX():
return cSpz.Chrome() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def w1oU():\n E_qD = jJDz()\n E_qD.browser = 'chrome'\n return RpLl(E_qD)",
"def lF46():\n VBaM = GkAb('C:\\\\Users\\\\15314\\\\OneDrive\\\\Desktop') / 'chromedriver.exe'\n xAU6 = cSpz.chrome.options.Options()\n xAU6.set_headless(headless=True)\n E_qD = cSpz.Chrome(VBaM, options=xAU6)\n r... | [
"0.8257605",
"0.79149836",
"0.78454745",
"0.7808107",
"0.7653399",
"0.7500122",
"0.73545384",
"0.7312083",
"0.7186286",
"0.7022509",
"0.7020654",
"0.7012933",
"0.6935616",
"0.6907823",
"0.6884662",
"0.68749017",
"0.6870857",
"0.68530726",
"0.67593426",
"0.67363876",
"0.670191... | 0.74528474 | 6 |
Clicks the "show more" button when scrolling down the review page of a play store app Tested yet with review pages only. | def _PU2(E_qD, a9EH):
laNn = gCuF.platforms[a9EH]['search_listings']['show_more_xpath']
ITS7.sleep(1)
pTDN = E_qD.find_elements_by_xpath(laNn)[0]
E_qD.execute_script('arguments[0].click();', pTDN) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cJR3(YKHO):\n h7D2 = R3wq(E_qD, 5)\n try:\n WVtp = h7D2.until(i1TH.element_to_be_clickable((Q71O.XPATH, \".//div[@id='see_more_pager']//a[.= 'Lihat Hasil Selanjutnya'] \")))\n WVtp.click()\n except:\n try:\n WVtp = h7D2.until(i1TH.element_to_be_clickable((Q71O.XPATH, \"... | [
"0.7033098",
"0.6344363",
"0.60130936",
"0.5971481",
"0.5927033",
"0.59119856",
"0.5804481",
"0.57168674",
"0.5628345",
"0.5611567",
"0.5599046",
"0.54855263",
"0.54716974",
"0.54516166",
"0.543418",
"0.5370538",
"0.5298097",
"0.52818733",
"0.52784103",
"0.5269796",
"0.526903... | 0.6422785 | 1 |
boolean check for whether a string is a zmq url | def yto3(bD7m):
if '://' not in bD7m:
return False
mLim, rRzo = bD7m.split('://', 1)
if mLim.lower() not in ['tcp', 'pgm', 'epgm', 'ipc', 'inproc']:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XdzF(vIwR):\n return 'http' in vIwR",
"def yto3(vIwR):\n try:\n KVWQ(vIwR)\n return True\n except:\n return False",
"def XdzF(KCHu: str) -> bool:\n return KVWQ(KCHu).netloc != ''",
"def rx9o(YKHO, bD7m):\n if type(bD7m) == str:\n return bD7m.startswith('http://'... | [
"0.81032103",
"0.7645922",
"0.7644091",
"0.7643658",
"0.7643011",
"0.7352943",
"0.72288644",
"0.7144033",
"0.7083735",
"0.70466423",
"0.70048374",
"0.6976797",
"0.6920094",
"0.6914505",
"0.69056535",
"0.6895562",
"0.68839",
"0.6835494",
"0.68054456",
"0.6716606",
"0.6712718",... | 0.75069827 | 5 |
Join components of url into a relative url Use to prevent double slash when joining subpath. This will leave the initial and final / in place | def yTbG(*Zoh6):
RqgG = Zoh6[0].startswith('/')
lXgg = Zoh6[-1].endswith('/')
Cem8 = [KCHu.strip('/') for KCHu in Zoh6]
Aofo = '/'.join((KCHu for KCHu in Cem8 if KCHu))
if RqgG:
Aofo = '/' + Aofo
if lXgg:
Aofo = Aofo + '/'
if Aofo == '//':
Aofo = '/'
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TDhU(P8oC, *pmON):\n return Pusg(LIzS, pmON, P8oC)",
"def yTbG(*Zoh6):\n RqgG = Zoh6[0].startswith('/')\n lXgg = Zoh6[-1].endswith('/')\n EESs = [KCHu.strip('/') for KCHu in Zoh6]\n Aofo = '/'.join((KCHu for KCHu in EESs if KCHu))\n if RqgG:\n Aofo = '/' + Aofo\n if lXgg:\n ... | [
"0.75034314",
"0.7498832",
"0.7475863",
"0.74634165",
"0.74325925",
"0.7365204",
"0.73354787",
"0.73097575",
"0.73073596",
"0.72961533",
"0.7290866",
"0.7187557",
"0.71870315",
"0.7176675",
"0.71697366",
"0.7167138",
"0.7140325",
"0.7076596",
"0.7072414",
"0.7021766",
"0.7021... | 0.7462581 | 4 |
Convert a string into a literal value that can be used in Python source. This just calls C{repr}. No point in getting all complex when the language already gives us what we need. | def mtVx(KCHu):
return repr(KCHu) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g5IB(YKHO, MW_J):\n if isinstance(MW_J, KUXB):\n qXOC = str(MW_J).replace('-', 'Neg').replace('+', 'Pos').replace('.', 'point')\n elif isinstance(MW_J, exCv):\n qXOC = repr(MW_J)\n return qXOC",
"def R0LO(YKHO, MW_J):\n if isinstance(MW_J, bool):\n _dJZ = YKHO.cpp_types[MW_J]... | [
"0.72240233",
"0.71256787",
"0.6996777",
"0.6996777",
"0.66892284",
"0.6533683",
"0.6347035",
"0.6261261",
"0.61884165",
"0.6187074",
"0.6153223",
"0.61215895",
"0.59685224",
"0.58493763",
"0.5841717",
"0.57748306",
"0.56707436",
"0.56689525",
"0.5663161",
"0.5645122",
"0.561... | 0.0 | -1 |
Default implementation for _XMLIdentifierToPython For historical reasons, this converts the identifier from a str to unicode in the system default encoding. This should have no practical effect. | def jupO(Ilxn):
return jKi7.text_type(Ilxn) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rvQk(KkjV):\n global _XMLIdentifierToPython\n if KkjV is None:\n KkjV = jupO\n qIds = KkjV",
"def KHvY(YKHO, BWXx, tZ2K='utf8'):\n if isinstance(BWXx, str):\n return BWXx\n return str(BWXx, tZ2K)",
"def hQoz(YKHO, BWXx):\n return BWXx.replace('\"\"', '\"')",
"def brQJ(WKvO... | [
"0.6642679",
"0.6174144",
"0.60445756",
"0.5969381",
"0.5914155",
"0.59118557",
"0.587203",
"0.58548003",
"0.58026296",
"0.57193226",
"0.5715238",
"0.57140726",
"0.57060766",
"0.565981",
"0.56537277",
"0.56176376",
"0.5602993",
"0.55988634",
"0.5581407",
"0.55747074",
"0.5570... | 0.76331604 | 0 |
Convert a string into something suitable to be a Python identifier. The string is processed by L{_XMLIdentifierToPython}. Following this, dashes, spaces, and periods are replaced by underscores, and characters not permitted in Python identifiers are stripped. Furthermore, any leading underscores are removed. If the res... | def scih(KCHu, c3S0=False):
KCHu = qIds(KCHu)
KCHu = htUW.sub('', fWeB.sub('', EJiA.sub('_', KCHu)))
if c3S0:
KCHu = Ho40.sub(lambda fR9w: fR9w.group(0)[1].upper(), KCHu)
if oALs.match(KCHu):
KCHu = 'n' + KCHu
if 0 == len(KCHu):
KCHu = 'emptyString'
return KCHu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FhlS(vIwR):\n vIwR = vIwR.lower()\n vIwR = vIwR.strip()\n vIwR = vIwR.replace(' ', '_')\n vIwR = vIwR.replace(',', '__').replace('[', '__')\n vIwR = ZbWC.sub('[^0-9a-zA-Z_]', '', vIwR)\n vIwR = ZbWC.sub('^[^a-zA-Z_]+', '', vIwR)\n if vIwR in peBr.kwlist:\n vIwR += '_element'\n re... | [
"0.8302692",
"0.6752775",
"0.6718251",
"0.6598083",
"0.6587029",
"0.63822687",
"0.62174153",
"0.6135094",
"0.60881364",
"0.6069373",
"0.60202104",
"0.58889824",
"0.5888",
"0.5884226",
"0.5868551",
"0.58431655",
"0.5817622",
"0.57959217",
"0.57879376",
"0.57620525",
"0.5743887... | 0.71453947 | 1 |
Return the set of nodes calculated to be roots (i.e., those that have no incoming edges). This caches the roots calculated in a previous invocation unless the C{reset} keyword is given the value C{True}. | def YPJ1(YKHO, SiRx=False):
if SiRx or YKHO.__roots is None:
YKHO.__roots = set()
for exwG in YKHO.__nodes:
if not exwG in YKHO.__reverseMap:
YKHO.__roots.add(exwG)
return YKHO.__roots | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YPJ1(YKHO):\n if not YKHO.__roots:\n YKHO.__roots = set()\n for exwG in YKHO.__nodes:\n if exwG not in YKHO.__reverse_map:\n YKHO.__roots.add(exwG)\n return YKHO.__roots",
"def YPJ1(YKHO) -> x1iM[str]:\n return [Q6kx for Q6kx, tjON in YKHO.graph.in_degree() if... | [
"0.75745994",
"0.66823053",
"0.6606786",
"0.65892243",
"0.6557205",
"0.65282804",
"0.6425244",
"0.62325907",
"0.62034404",
"0.61831456",
"0.61707497",
"0.6147587",
"0.6117938",
"0.6115766",
"0.60967505",
"0.60475665",
"0.5984837",
"0.5928481",
"0.58924735",
"0.58659506",
"0.5... | 0.81035554 | 0 |
Return the set of nodes in the graph. The node collection data structure is a set containing node objects, whatever they may be. | def Ziit(YKHO):
return YKHO.__nodes | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ziit(YKHO):\n return list(set(YKHO._graph.keys() + [WKvO for WKvO in Hs6x.chain.from_iterable(YKHO._graph.values())]))",
"def gcH_(YKHO):\n return set(YKHO.nodeset)",
"def Ziit(YKHO):\n Ziit = list()\n for Q6kx in YKHO._nodes:\n if isinstance(Q6kx, Q1Kq):\n Ziit += Q6kx.nodes\... | [
"0.8089959",
"0.79780483",
"0.7861936",
"0.7711382",
"0.7673762",
"0.75728124",
"0.7571405",
"0.7556265",
"0.7542568",
"0.74974424",
"0.74076253",
"0.74076253",
"0.73716974",
"0.731814",
"0.7315418",
"0.7305688",
"0.7289411",
"0.7246893",
"0.7241622",
"0.71766764",
"0.7159215... | 0.69518363 | 33 |
Return the stronglyconnected components of the graph. The data structure is a set, each element of which is itself a set containing one or more nodes from the graph. | def cMkz(YKHO, SiRx=False):
if SiRx or YKHO.__scc is None:
YKHO.tarjan(SiRx)
return YKHO.__scc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def x1Fc(YKHO):\n for Q6kx in YKHO.graph:\n Q6kx.data.visited = False\n TwjO = YKHO.reverse_graph()\n ElU2 = eYNV(TwjO.graph, generate_stack=True)\n ElU2.search()\n bg88 = eYNV(YKHO.graph, generate_scc=True)\n while ElU2.stack:\n Q6kx = YKHO.graph.get_node(ElU2.stack.top_pop())\n ... | [
"0.7985178",
"0.7698458",
"0.76961863",
"0.7609017",
"0.7442105",
"0.742956",
"0.72614646",
"0.69919074",
"0.6983941",
"0.69524926",
"0.69312733",
"0.68971956",
"0.6861848",
"0.6823889",
"0.68053895",
"0.6686502",
"0.66422856",
"0.6598884",
"0.6594531",
"0.65940416",
"0.64684... | 0.0 | -1 |
Return the stronglyconnected component to which the given node belongs. Any keywords suppliend when invoking this method are passed to the L{sccMap} method. | def DtBq(YKHO, Q6kx, **YSA3):
return YKHO.sccMap(**YSA3).get(Q6kx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def x1Fc(YKHO):\n for Q6kx in YKHO.graph:\n Q6kx.data.visited = False\n TwjO = YKHO.reverse_graph()\n ElU2 = eYNV(TwjO.graph, generate_stack=True)\n ElU2.search()\n bg88 = eYNV(YKHO.graph, generate_scc=True)\n while ElU2.stack:\n Q6kx = YKHO.graph.get_node(ElU2.stack.top_pop())\n ... | [
"0.690451",
"0.68742985",
"0.6473766",
"0.64694965",
"0.6450434",
"0.6265773",
"0.615741",
"0.60335255",
"0.6008124",
"0.59753853",
"0.59593517",
"0.58773434",
"0.5864113",
"0.58441275",
"0.5814417",
"0.5794216",
"0.5786024",
"0.5770247",
"0.5719518",
"0.56839013",
"0.5667406... | 0.80238163 | 0 |
Return the nodes of the graph as a sequence of root sets. | def w84z(YKHO):
T4Wy = []
Ziit = set(YKHO.__nodes)
Grhq = {}
for Csk6, sl6n in jKi7.iteritems(YKHO.__edgeMap):
Grhq[Csk6] = sl6n.copy()
while Ziit:
Fmh0 = set()
for exwG in Ziit:
if not exwG in Grhq:
Fmh0.add(exwG)
if 0 == len(Fmh0):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ziit(YKHO):\n return list(set(YKHO._graph.keys() + [WKvO for WKvO in Hs6x.chain.from_iterable(YKHO._graph.values())]))",
"def AyQV(YKHO):\n JqV7 = []\n if not YKHO._root is None:\n JqV7.append(YKHO._root)\n YRbF = 0\n while YRbF < len(JqV7):\n for Q6kx in JqV7[YRbF]._... | [
"0.7568372",
"0.73262656",
"0.72023416",
"0.7110979",
"0.7023111",
"0.70091593",
"0.69215655",
"0.69215655",
"0.6888474",
"0.6885874",
"0.6873253",
"0.6856722",
"0.683893",
"0.68324894",
"0.68254215",
"0.6821848",
"0.6817674",
"0.6773258",
"0.67581",
"0.6743985",
"0.67398155"... | 0.0 | -1 |
Retrieve the contents of the uri as raw data. | def ILk3(j8eK, l4Pv=None):
from pyxb.utils.six.moves.urllib.request import urlopen
wOb_ = None
BQDi = None
if 0 <= j8eK.find(':'):
try:
wOb_ = urlopen(j8eK)
except Exception as e:
BQDi = tTpl
if wOb_ is None and jKi7.PY2:
import urllib
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SwtT(bD7m):\n qv1X = G4JS.get(bD7m, stream=True)\n qv1X.raw.decode_content = True\n return qv1X.raw",
"def SwtT(YKHO):\n return YKHO.content",
"def hGN5(YKHO):\n if hasattr(YKHO.raw_content, 'read'):\n if hasattr(YKHO.raw_content, 'seek'):\n YKHO.raw_content.seek(0)\n ... | [
"0.6983671",
"0.6981274",
"0.6734178",
"0.65938586",
"0.6462509",
"0.64124036",
"0.64124036",
"0.6373317",
"0.63549626",
"0.6221609",
"0.6131318",
"0.60972846",
"0.60972846",
"0.6080169",
"0.60431385",
"0.6040495",
"0.59788984",
"0.59753805",
"0.5974625",
"0.5908641",
"0.5903... | 0.0 | -1 |
Return a file object used to write binary data into the given file. Use the C{tag} keyword to preserve the contents of existing files that are not supposed to be overwritten. To get a writable file but leaving any existing contents in place, set the C{preserve_contents} keyword to C{True}. Normally, existing file conte... | def ewRH(gIsw, TZ9E=None, tSgy=False):
pmON, kjp6 = Hy7s.path.split(gIsw)
if pmON:
try:
Hy7s.makedirs(pmON)
except Exception as e:
if not (isinstance(tTpl, (OSError, IOError)) and d1hN.EEXIST == tTpl.errno):
raise
ytgA = open(gIsw, 'ab+')
if TZ9E i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def G5on(YKHO, Ux0P, kGys, SStx=True, eLpg=True):\n return YKHO._file_model.file_write(Ux0P, kGys, append=SStx, create=eLpg)",
"def nUeQ(YKHO):\n nUeQ = aKaX(b'the_file')\n nUeQ.name = YKHO.name\n return fnT7(nUeQ)",
"def zyFt(Ux0P: str, hGN5: str, Tuqy: str='w') -> diMR:\n with open(Ux0P, Tuqy)... | [
"0.61206645",
"0.54896116",
"0.54544973",
"0.5446193",
"0.54175335",
"0.5410322",
"0.5409091",
"0.54074293",
"0.5352646",
"0.53195566",
"0.5262908",
"0.5253602",
"0.52367777",
"0.52204037",
"0.5197529",
"0.5163391",
"0.51554316",
"0.51535887",
"0.51448315",
"0.51125944",
"0.5... | 0.6841961 | 0 |
Define an optional field of the specified `field_type`. | def PwLM(vF49: Union[Type[_T], str], ho12: Optional[str]=None) -> h8nf[sb5H]:
yIVm = {}
if ho12:
yIVm['relation_verbose_name'] = ho12
assert not isinstance(vF49, str) or vF49 == 'self'
return hkS8.ib(default=None, validator=hkS8.validators.optional(bD0O() if isinstance(vF49, str) else hkS8.valid... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UkL5(nIMu, F0Mv, nr1f):\n\n def xzCw(YKHO, WKvO):\n return None if WKvO is None else nr1f(WKvO)\n A97Q = 'A field which can be {name_of_type} or None'.format(name_of_type=F0Mv)\n return wsY0(nIMu, (), {'validate': xzCw, '__doc__': A97Q})",
"def vF49(YKHO, vF49):\n if YKHO.local_vars_config... | [
"0.6912172",
"0.6548607",
"0.5983148",
"0.5933199",
"0.5766476",
"0.5714636",
"0.57088166",
"0.57029545",
"0.5693993",
"0.56425905",
"0.5640413",
"0.5617874",
"0.56139416",
"0.55398256",
"0.5530448",
"0.551866",
"0.55133075",
"0.5423735",
"0.5400708",
"0.536897",
"0.5339176",... | 0.7133128 | 0 |
Validate that the given `value` is a positive integer (``None`` accepted if `none_allowed`). | def laww(BWXx: Any, rqIe: bool, qQNS: str) -> None:
if rqIe and BWXx is None:
return
if not isinstance(BWXx, int):
raise TypeError(f'{qQNS} must be a positive integer')
if BWXx <= 0:
raise ValueError(f'{qQNS} must be a positive integer') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xzCw(YKHO, BWXx):\n super(QhQR, YKHO).validate(BWXx)\n if BWXx is not None and BWXx < 0:\n raise sUXu('must be positive integer')\n return True",
"def UtDY(Emd4, BWXx):\n if BWXx < 0:\n raise ValueError('must be positive or zero')\n return BWXx",
"def fQ6O(BWXx):\n return No... | [
"0.7604798",
"0.74878687",
"0.7477893",
"0.7372281",
"0.7327428",
"0.7310186",
"0.7309169",
"0.72575694",
"0.72093",
"0.7166242",
"0.71568584",
"0.7155701",
"0.7137333",
"0.71311134",
"0.71014625",
"0.7099577",
"0.70873487",
"0.70630044",
"0.70425266",
"0.6931459",
"0.6927795... | 0.884364 | 0 |
Validate that the given `value` is a uuid (version 4) (``None`` accepted if `none_allowed`). | def Flfh(BWXx: Any, rqIe: bool, qQNS: str) -> None:
if rqIe and BWXx is None:
return
if not isinstance(BWXx, S7kj) or BWXx.version != 4:
raise TypeError(f'{qQNS} must be a UUID version 4') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hr4y(LPdC, Pn22=tuple([None, '']), m5CN=True):\n if LPdC in Pn22:\n return (LPdC, None if m5CN else 'Mandatory.')\n try:\n LPdC = str(qxeD.UUID(LPdC))\n except:\n return (LPdC, 'Invalid UUID value.')\n return (LPdC, None)",
"def Xs_K(BWXx: str | UUID) -> bool:\n if isinsta... | [
"0.7557076",
"0.7478994",
"0.69724876",
"0.6930316",
"0.6930316",
"0.67378175",
"0.6720659",
"0.6699453",
"0.6679053",
"0.6581491",
"0.6578702",
"0.65757734",
"0.6468944",
"0.63455117",
"0.62802315",
"0.6190816",
"0.6187551",
"0.6185069",
"0.61406916",
"0.6130624",
"0.6036289... | 0.8942554 | 0 |
Check if the `other` object is the same as the current entity. | def xa14(YKHO, Elif: Any) -> bool:
return YKHO.__class__ is Elif.__class__ and YKHO.identifier == Elif.identifier | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rEwH(YKHO, Elif) -> bool:\n return YKHO.x == Elif.x and YKHO.y == Elif.y",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def g_Z3(YKHO, Elif):\n return YKHO.id == Elif.getIdent()",
"def xa14(YKHO, E... | [
"0.7627001",
"0.7524863",
"0.75003135",
"0.74242216",
"0.7374001",
"0.73416567",
"0.73283696",
"0.7320224",
"0.73065877",
"0.7293747",
"0.7282203",
"0.7267234",
"0.7267234",
"0.72443",
"0.7168728",
"0.7168728",
"0.71605027",
"0.7157209",
"0.71495193",
"0.71488017",
"0.7118426... | 0.70562375 | 27 |
Returns the MAC addr of the default route interface. | def NLCZ():
P02x = xiQA(iface_filter=vJxz()[1])
return P02x.pop() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KBOU():\n _C8X = 'eth0'\n KYrJ = bT5T.ifaddresses(_C8X)[bT5T.AF_LINK][0]\n HXjy = KYrJ['addr']\n return HXjy",
"def QiWP():\n if not HwRy.platform.startswith('linux'):\n raise RuntimeError('Cannot get the MAC address on non-Linux platforms')\n fD9V = AWvr()\n KCHu = GGmw.socket(GG... | [
"0.7658759",
"0.74536973",
"0.7277858",
"0.72755444",
"0.7194526",
"0.71769273",
"0.7160586",
"0.7160586",
"0.70613533",
"0.7003071",
"0.69405645",
"0.6910481",
"0.66923755",
"0.66786265",
"0.6658495",
"0.66388994",
"0.6506183",
"0.6499232",
"0.64577436",
"0.6418158",
"0.6375... | 0.63501954 | 22 |
Returns a set of MAC addresses of the current host. | def xiQA(MEct=None):
IB18 = set()
if HwRy.platform.startswith('win'):
from scapy.arch.windows import NetworkInterface
if type(MEct) == NetworkInterface:
IB18.add(MEct.mac)
for YmHP in Sa_m.get_if_list():
if MEct is not None and YmHP != MEct:
continue
t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AdlJ(YKHO):\n ORiR = []\n oUZx = '/interface bridge host print terse'\n hlel = YKHO._send_command(oUZx)\n for KcEq in wD8l(hlel):\n ORiR.append({'mac': iJ3a(KcEq.get('mac-address')), 'interface': KcEq.get('interface'), 'vlan': -1, 'static': True if 'D' not in KcEq.get('_flags') else False, '... | [
"0.7482564",
"0.6907314",
"0.6590226",
"0.65625256",
"0.6528473",
"0.6510169",
"0.64578533",
"0.6432203",
"0.6377891",
"0.6288591",
"0.628722",
"0.6238919",
"0.61721426",
"0.612203",
"0.61172384",
"0.6117105",
"0.611112",
"0.6107273",
"0.6101588",
"0.61014223",
"0.6100259",
... | 0.6956676 | 1 |
Returns max value even if one value is None. Python cannot compare None and int, so build a wrapper around it. | def csgC(hQHm, jlSq):
if hQHm is None:
return jlSq
if jlSq is None:
return hQHm
return max(hQHm, jlSq) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F6w2(wNuL, Mlb1):\n return max(wNuL, Mlb1, key=lambda WKvO: -HwRy.maxint if WKvO is None else WKvO)",
"def zF2a(jzdc, Fg_i):\n if jzdc is None:\n return Fg_i\n if Fg_i is None:\n return jzdc\n return max(jzdc, Fg_i)",
"def QFzJ(*qIxc, **B2fa):\n L1CJ = [Ty9i for Ty9i in qIxc if... | [
"0.80553114",
"0.75645834",
"0.7535309",
"0.73482525",
"0.73250914",
"0.7310397",
"0.71636283",
"0.7039921",
"0.6897146",
"0.683178",
"0.683178",
"0.66911846",
"0.6678974",
"0.6672838",
"0.65168035",
"0.6475494",
"0.6462417",
"0.64038867",
"0.6399651",
"0.63938457",
"0.638854... | 0.6923149 | 8 |
Returns a new min_max_tuple with value considered. | def _oGm(t8S9, BWXx):
V46T, yew8 = t8S9
V46T = qAh7(V46T, BWXx)
yew8 = csgC(yew8, BWXx)
return (V46T, yew8) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SUNP(fUYa):\n kpLf = None\n JCoA = None\n for WKvO in fUYa:\n if kpLf is None or WKvO < kpLf:\n kpLf = WKvO\n if JCoA is None or WKvO > JCoA:\n JCoA = WKvO\n return (kpLf, JCoA)",
"def xOWs(DumB):\n return (min(DumB), max(DumB))",
"def Y00y(gXtX):\n HKl... | [
"0.6693996",
"0.64518523",
"0.64440703",
"0.6297684",
"0.62571377",
"0.62511533",
"0.62077963",
"0.6191093",
"0.60693395",
"0.60650694",
"0.606241",
"0.6000497",
"0.5987081",
"0.596118",
"0.59477913",
"0.5943709",
"0.59234643",
"0.5913458",
"0.59077615",
"0.58547777",
"0.5853... | 0.8177951 | 0 |
Read data from the specified file and return a DataFrame with initialized Woodwork typing information. | def Nwr9(VqRE=None, m5r4=None, mWFP=None, d6pt=None, it6R=None, qMWR=None, LY_E=None, KCB2=True, _m8C=None, xzCw=True, **B2fa):
if m5r4 is None:
biVd, bGrB = bmCH(VqRE)
if biVd is None:
raise RuntimeError('Content type could not be inferred. Please specify content_type and try again.')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ueki(Ux0P, y9CY=True):\n eHNT = open(Ux0P)\n Nqlg = eHNT.readlines()\n eHNT.close()\n for YRbF, zFiD in enumerate(Nqlg):\n if zFiD.startswith('# Columns:'):\n ZLJ_ = []\n NNri = YRbF\n for Q7me in ZbWC.split('Oxs_|Anv_|Southampton_', zFiD)[1:]:\n ... | [
"0.6507035",
"0.65043277",
"0.6450428",
"0.64499086",
"0.6407715",
"0.64070654",
"0.6400475",
"0.636086",
"0.63339907",
"0.6281543",
"0.62003183",
"0.6192413",
"0.6171629",
"0.61666185",
"0.61514276",
"0.6145966",
"0.6128902",
"0.6121019",
"0.60953605",
"0.6094487",
"0.608278... | 0.5963747 | 35 |
Checks if the given string is an url path. Returns a boolean. | def XdzF(vIwR):
return 'http' in vIwR | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yto3(vIwR):\n try:\n KVWQ(vIwR)\n return True\n except:\n return False",
"def HbQh(YKHO, pmON):\n from urllib.parse import urlparse\n ht58, RYr6, DOop, qgo9, LSGI, ZILt = urlparse(pmON)\n return bool(ht58 and RYr6)",
"def XdzF(KCHu: str) -> bool:\n return KVWQ(KCHu).n... | [
"0.7862628",
"0.7810629",
"0.767805",
"0.7643565",
"0.75058174",
"0.7505675",
"0.7447057",
"0.7316432",
"0.7258737",
"0.7161608",
"0.71375453",
"0.712712",
"0.7124779",
"0.7047876",
"0.69866467",
"0.6979022",
"0.6970283",
"0.69291806",
"0.6908584",
"0.68603164",
"0.6845472",
... | 0.7715387 | 2 |
Reformats LatLong columns to be tuples of floats. Uses np.nan for null values. | def lsdN(bEcX, z9u9=False):
if Aw8_(bEcX):
return oyIN.nan
if isinstance(bEcX, str):
try:
if 'nan' in bEcX:
bEcX = bEcX.replace('nan', 'None')
if 'NaN' in bEcX:
bEcX = bEcX.replace('NaN', 'None')
bEcX = jZ4I.literal_eval(bEcX)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def atkI(wEf2):\n if Aw8_(wEf2):\n return oyIN.nan\n try:\n return float(wEf2)\n except (ValueError, TypeError):\n raise ValueError(f'Latitude and Longitude values must be in decimal degrees. The latitude or longitude represented by {wEf2} cannot be converted to a float.')",
"def kW... | [
"0.62581193",
"0.61285114",
"0.60195297",
"0.5976948",
"0.5868812",
"0.58154327",
"0.58131707",
"0.5779865",
"0.5701041",
"0.5647569",
"0.56311095",
"0.55860037",
"0.5583961",
"0.5559613",
"0.5548943",
"0.55404603",
"0.553762",
"0.55290985",
"0.5450382",
"0.5439959",
"0.54382... | 0.7167407 | 0 |
Check if image is monochrome (1 channel or 3 identical channels) | def ftlz(Xn71):
if Xn71.mode not in ('L', 'RGB'):
raise ValueError('Unsuported image mode')
if Xn71.mode == 'RGB':
d7Eb = Xn71.split()
if lLoU.difference(d7Eb[0], d7Eb[1]).getextrema()[1] < 50:
return True
if lLoU.difference(d7Eb[1], d7Eb[2]).getextrema()[1] < 50:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E4ec(VXjJ):\n return len(VXjJ.shape) == nNS9",
"def CdmZ(VXjJ: np.ndarray) -> bool:\n return len(VXjJ.shape) >= 1 and VXjJ.shape[-1] == 3",
"def CdmZ(Xn71):\n if Xn71.ndim == 3:\n return True\n else:\n return False",
"def E4ec(YKHO):\n return YKHO.r == YKHO.g == YKHO.b",
"d... | [
"0.6841092",
"0.6761836",
"0.6705805",
"0.66970956",
"0.66970956",
"0.66915894",
"0.66832644",
"0.66789466",
"0.6668601",
"0.66212636",
"0.6512574",
"0.64841646",
"0.6445938",
"0.62805843",
"0.6196331",
"0.6193798",
"0.6140048",
"0.61379707",
"0.607563",
"0.5938107",
"0.58921... | 0.6241654 | 14 |
Pull all values of specified key from nested JSON. | def SMfb(YEnM, H5ew):
ezWE = []
def JDhM(YEnM, ezWE, H5ew):
"""Recursively search for values of key in JSON tree."""
if isinstance(YEnM, dict):
for G1Hx, Ty9i in YEnM.items():
if isinstance(Ty9i, (dict, list)):
JDhM(Ty9i, ezWE, H5ew)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SMfb(YEnM, H5ew):\n ezWE = []\n\n def JDhM(YEnM, ezWE, H5ew):\n \"\"\"Recursively search for values of key in JSON tree.\"\"\"\n if isinstance(YEnM, dict):\n for G1Hx, Ty9i in YEnM.items():\n if isinstance(Ty9i, (dict, list)):\n JDhM(Ty9i, ezWE, ... | [
"0.7464168",
"0.7443741",
"0.7369895",
"0.7284909",
"0.7274706",
"0.64360756",
"0.6146865",
"0.6104974",
"0.6104974",
"0.6104974",
"0.6104974",
"0.6104974",
"0.60903376",
"0.60786164",
"0.6048849",
"0.60177237",
"0.59510297",
"0.58260304",
"0.5792954",
"0.5788423",
"0.5784647... | 0.73674846 | 4 |
Compute sigmoid focal loss between logits and onehot labels logits and onehot_labels must have same shape [batchsize, num_classes] and the same data type (float16, 32, 64) | def SHpS(KeL5, Crrw, *qIxc, **PECO):
GPtr = qIxc[0]
Cwt5 = GPtr.alpha
KMvS = GPtr.gamma
mWFP = GPtr.name
rrBf = GPtr.scope
with ZylS.name_scope(rrBf, 'focal_loss') as Sa_m:
MEUA = ZylS.cast(KeL5, ZylS.float32)
Jj9R = ZylS.cast(Crrw, MEUA.dtype)
Jj9R = ZylS.cast(ZylS.expan... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R3Yq(Crrw, KeL5, Cwt5=0.5, KMvS=2):\n JxU2 = KeL5.sigmoid()\n Crrw = ht2j.nn.functional.one_hot(Crrw.squeeze().long(), num_classes=JxU2.shape[1])\n r4A7 = ht2j.clamp(KeL5, min=0) - KeL5 * Crrw + ht2j.log(1 + ht2j.exp(-ht2j.abs(KeL5)))\n Jjrq = Crrw * JxU2 + (1 - Crrw) * (1 - JxU2)\n Sn8X = ht2j.... | [
"0.7240234",
"0.7053479",
"0.6910648",
"0.6879288",
"0.6874337",
"0.68407536",
"0.6780927",
"0.6735924",
"0.6692267",
"0.6682686",
"0.66726583",
"0.6653518",
"0.6648617",
"0.66462076",
"0.6583057",
"0.65666443",
"0.65384763",
"0.6518688",
"0.6515234",
"0.6501828",
"0.64899045... | 0.6911841 | 2 |
Returns the article with the matching ID. If the input is invalid or the article is not found, empty list is returned. | async def read(GJ3U=True, PObu=False):
gCuF = await yZKv()
tyNF = gCuF['table']
if PObu:
UzPC = await Ykhp()
rdlD = await UzPC.fetch(f'\n SELECT * FROM "{tyNF}" WHERE "UID" = $1;\n ', str(PObu))
await UzPC.close()
return rdlD
try:
GJ3U = int(GJ3U)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rx7I(lo4R):\n return wHLq.query.get(lo4R)",
"def f3nk(YKHO, id):\n return YKHO.es.get(index=YKHO.index, doc_type=YKHO.doc_type, id=id)",
"def qH4N(NCls: Session, lo4R: int):\n return NCls.query(LJI6).filter(LJI6.id == lo4R).first()",
"def l3QS(YKHO, lo4R):\n return mrVf.Article(YKHO, lo4R)",
... | [
"0.7299674",
"0.72322524",
"0.66822433",
"0.6633324",
"0.6590151",
"0.65629405",
"0.65505624",
"0.6432341",
"0.6406346",
"0.63084596",
"0.618541",
"0.6159589",
"0.61246026",
"0.6113103",
"0.6112983",
"0.61097807",
"0.61086154",
"0.6098706",
"0.60838187",
"0.60618377",
"0.5965... | 0.5591262 | 37 |
Try to get an item which is not in cache. | def JFCo(YKHO):
wyyA = nmBN(5)
wyyA.put(1, 'aaa')
with trZe.raises(KeyError):
wyyA.get(2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tAev(YKHO):\n YKHO.assertEqual(YKHO.cache.get('ghost'), None)\n YKHO.assertEqual(YKHO.cache.get('ghost', 'never exists'), 'never exists')",
"def tLWm(ZfUD: str) -> object:\n ZfUD = str(ZfUD)\n wyyA = x3uu(ZfUD)\n if wyyA is not None:\n try:\n KwDD = t2lc.load(open(wyyA, 'rb')... | [
"0.7817607",
"0.7279909",
"0.72218347",
"0.6908121",
"0.6884229",
"0.6844522",
"0.6797734",
"0.6797734",
"0.67853546",
"0.66918856",
"0.66252756",
"0.65928084",
"0.6575667",
"0.6556451",
"0.65513223",
"0.65501046",
"0.64767206",
"0.6476355",
"0.64720345",
"0.6445206",
"0.6433... | 0.61973614 | 37 |
Returns the isotope specific mass of an element given it's symbol. | def tiBS(UXqs: str, S8vG=False):
kQKO = {'H': [1.00782503223, 1.007975], 'D': [2.01410177812, 1.007975], 'T': [3.0160492779, 1.007975], 'HE3': [3.0160293201, 4.002602], 'HE': [4.00260325413, 4.002602], 'LI6': [6.0151228874, 6.9675], 'LI': [7.0160034366, 6.9675], 'BE': [9.012183065, 9.0121831], 'B10': [10.01293695, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yrkk(U6D_):\n return Xf84.elements.isotope(U6D_).mass",
"def yrkk(LihS):\n return bMbF[W_Vi(LihS)]",
"def QJCc(qBv7):\n try:\n qBv7 = y_kz(qBv7)\n M7au = NCyK[qBv7]['mass_number']\n except TypeError:\n raise 'Incorrect type for mass_number input.'\n except ValueError:\n ... | [
"0.81476235",
"0.7638916",
"0.7026116",
"0.7023117",
"0.70116776",
"0.6974709",
"0.6889708",
"0.67309386",
"0.66481125",
"0.6505008",
"0.6422049",
"0.64141816",
"0.6231803",
"0.6203267",
"0.62013227",
"0.6162327",
"0.612443",
"0.6095404",
"0.60924655",
"0.6050567",
"0.6003955... | 0.61135614 | 17 |
Creates an instance of FullSlateQAgent. | def YypB(cb_Q, GikI, frhT, PxNv=None):
B2fa = {'observation_space': GikI.observation_space, 'action_space': GikI.action_space, 'summary_writer': PxNv, 'eval_mode': frhT}
return x59Z.FullSlateQAgent(cb_Q, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, YWSi: AEA) -> None:\n YKHO._agent = YWSi\n super().__init__()",
"def FIMM(YKHO, YWSi):\n YKHO.agent = YWSi",
"def ZVI_(Emd4, FkTU: int):\n NArs = nIYH()\n Tlei = dqTo(input_dim=FkTU)\n Qabx = KQUU(scorer=Tlei, sampler=sRZ6())\n CErl = C1HU(Qabx, **NArs.asdict())\n YWSi = ... | [
"0.54705834",
"0.54017335",
"0.5360143",
"0.53524786",
"0.532081",
"0.52880126",
"0.5275774",
"0.5245605",
"0.5162603",
"0.5136954",
"0.5133092",
"0.506478",
"0.5050614",
"0.5041798",
"0.5029602",
"0.50225794",
"0.5000415",
"0.49467543",
"0.494372",
"0.49293464",
"0.49257118"... | 0.7672317 | 0 |
build pytorch sparse tensor from scipy sparse matrix | def aEpp(aPd6):
ROpF = aPd6.shape
YRbF = ht2j.LongTensor(oyIN.vstack((aPd6.row, aPd6.col)).astype(int))
Ty9i = ht2j.FloatTensor(aPd6.data)
return ht2j.sparse.FloatTensor(YRbF, Ty9i, ht2j.Size(ROpF)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LoH6(On0F, qIxc):\n On0F = On0F.tocoo().astype(oyIN.float32)\n _0VL = vhpA(oyIN.vstack((On0F.row, On0F.col)), qIxc, ht2j.long)\n hkxX = vhpA(On0F.data, qIxc)\n ROpF = ht2j.Size(On0F.shape)\n return ht2j.sparse.FloatTensor(_0VL, hkxX, ROpF)",
"def FXf_(On0F):\n _0VL = ht2j.from_numpy(oyIN.vs... | [
"0.796601",
"0.7868917",
"0.7575538",
"0.7542745",
"0.7536977",
"0.7536977",
"0.7536977",
"0.7536977",
"0.7536977",
"0.7536977",
"0.7536977",
"0.7536977",
"0.7536977",
"0.7536977",
"0.7536977",
"0.7536977",
"0.7536977",
"0.7524836",
"0.7500391",
"0.7500391",
"0.7469076",
"0... | 0.71739733 | 29 |
Returns a series that is the sum of self and other. Other must be of type series. | def FOdN(YKHO, Elif):
try:
Elif = float(Elif)
rrpT = YKHO.copy()
for vC9B, aAe4 in enumerate(rrpT):
rrpT.coefficients[vC9B] += Elif
except:
YKHO.checkSameSeriesType(Elif)
Qyq4, kpFS = (YKHO, Elif)
if len(YKHO) < len(Elif):
Qyq4, kpFS = (Eli... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CaoY(YKHO, Elif):\n GtmO = YKHO._setup_numeric(Elif)\n YKHO.data[:] = YKHO.data + GtmO\n return YKHO",
"def H2v5(YKHO, Elif):\n return Hruk(YKHO.numerator * Elif.denominator + Elif.numerator * YKHO.denominator, YKHO.denominator * Elif.denominator)",
"def FOdN(YKHO, Elif):\n return MF4b(H2v5(... | [
"0.6732401",
"0.67292297",
"0.67142594",
"0.66830236",
"0.66806585",
"0.6671922",
"0.6629293",
"0.6621051",
"0.6610413",
"0.6592071",
"0.65873456",
"0.6580911",
"0.65693367",
"0.65573466",
"0.65534055",
"0.65260255",
"0.65138066",
"0.65138066",
"0.65107846",
"0.65107846",
"0.... | 0.7240741 | 0 |
Returns a string representation of the Legendre coefficients of self. | def zAg0(YKHO):
return ' '.join(['%g' % aAe4 for aAe4 in YKHO.coefficients]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO) -> str:\n Wbaq = ''\n for YRbF in range(YKHO.degree, -1, -1):\n if YKHO.coefficients[YRbF] == 0:\n continue\n elif YKHO.coefficients[YRbF] > 0:\n if Wbaq:\n Wbaq += ' + '\n else:\n Wbaq += ' - '\n if YRbF == 0:\n ... | [
"0.7132573",
"0.7088107",
"0.7008161",
"0.6643579",
"0.6630837",
"0.65799516",
"0.6563335",
"0.6466858",
"0.64041",
"0.6261458",
"0.61700726",
"0.60786355",
"0.60670334",
"0.6052568",
"0.60470456",
"0.59455264",
"0.59455264",
"0.5886966",
"0.5853961",
"0.5853961",
"0.5837405"... | 0.7432365 | 0 |
Returns the (l+1)^th Legendre coefficient. Returns 0 if l is greater than lMax. This is like __getitem__ but allows for l to be greater than lMax. | def _Gkq(YKHO, vC9B):
if vC9B >= len(YKHO):
return 0.0
return YKHO.coefficients[vC9B] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aPd6(YKHO) -> float:\n return YKHO._L",
"def XHHE(vC9B, r8hN):\n return (vC9B + 1) ** 2 - 1 - vC9B + r8hN",
"def ZKOD(YKHO):\n return YKHO._get_mean_and_samples_attribute('lmax')",
"def AJf5(aPd6):\n Bmzm = oyIN.linalg.eigvalsh(aPd6.todense()).max()\n MOqK = 1.01 * Bmzm\n return MOqK",
... | [
"0.5956594",
"0.56653345",
"0.56390405",
"0.549751",
"0.5469573",
"0.5406137",
"0.5384759",
"0.5371135",
"0.532755",
"0.5325025",
"0.5284894",
"0.5221713",
"0.5215056",
"0.5202324",
"0.5152489",
"0.51466537",
"0.51410526",
"0.5139852",
"0.5134509",
"0.51142156",
"0.5101439",
... | 0.61501306 | 0 |
This method returns a series instance that is the mirror of self about mu = 0. That is, returns a Legendre series which represent self's pdf(mu). | def CX33(YKHO):
vbvn = YKHO.copy()
for vC9B in Ni9Y(1, len(vbvn), 2):
vbvn.coefficients[vC9B] *= -1
return vbvn | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b7La(YKHO, yGTL):\n V6IE = 0.0\n for vC9B, aAe4 in enumerate(YKHO.coefficients):\n V6IE += (vC9B + 0.5) * aAe4 * fdK7(vC9B, yGTL, checkXRange=False)\n return V6IE",
"def fdK7(exwG, yGTL, Uurv=True):\n if exwG < 0:\n raise ValueError('\\nError, n = %d < 0' % exwG)\n if Uurv and ab... | [
"0.5843213",
"0.57312196",
"0.53982913",
"0.5381649",
"0.5314024",
"0.5301381",
"0.52957344",
"0.5271874",
"0.5208762",
"0.519065",
"0.5190122",
"0.515166",
"0.5136359",
"0.51294404",
"0.51028275",
"0.5095762",
"0.50956875",
"0.5048561",
"0.50120205",
"0.5002445",
"0.49968487... | 0.5081817 | 17 |
This method returns the XML string representation of self. | def UD1P(YKHO, MnRD='', **B2fa):
return '\n'.join(YKHO.toXMLList(**B2fa)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ry3J(YKHO):\n return QGpr.tostring(YKHO.get_etree())",
"def BbcR(YKHO):\n if YKHO._xml_string is not None:\n return YKHO._xml_string\n return QGpr.tostring(YKHO._xml_node)",
"def BbcR(YKHO):\n if YKHO._xml_string is not None:\n return YKHO._xml_string\n return QGpr.tostring(YKH... | [
"0.8714798",
"0.82712334",
"0.8227302",
"0.81430227",
"0.8142118",
"0.7979049",
"0.795583",
"0.795583",
"0.7886356",
"0.788343",
"0.7847425",
"0.7836799",
"0.7793108",
"0.76542884",
"0.7642132",
"0.7564833",
"0.75299317",
"0.7519748",
"0.7339653",
"0.7315094",
"0.7206009",
... | 0.70262665 | 32 |
This method returns self as a list of strings which converts to the XML string representation of self via the python statement '\n'.join( XMLList ). | def RXYT(YKHO, MnRD='', **B2fa):
RJ4z = MnRD + B2fa.get('incrementalIndent', ' ')
KwlM = VHXR.xDataFunctional.attributesToXMLAttributeStr(YKHO)
if None in YKHO.fixedDomain():
KwlM += ' domainMin="%s" domainMax="%s"' % (YKHO.domainMin, YKHO.domainMax)
if YKHO.lowerIndex != 0:
KwlM += ' l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UD1P(YKHO):\n return YKHO._xmlpre + '\\n'.join(map(lambda eHNT: eHNT.toXML(), YKHO._items)) + YKHO._xmlpost",
"def UD1P(YKHO, MnRD='', **B2fa):\n return '\\n'.join(YKHO.toXMLList(**B2fa))",
"def nS2j(YKHO, MnRD='', **B2fa):\n o8Kj = YKHO.standardXML_attributes()\n return ['%s<%s path=\"%s\"%s/>... | [
"0.7436939",
"0.7417716",
"0.7324204",
"0.721946",
"0.69914997",
"0.6972634",
"0.68538475",
"0.68122447",
"0.6602612",
"0.6596324",
"0.6501499",
"0.63801146",
"0.63736784",
"0.63727415",
"0.63483125",
"0.63483125",
"0.6346497",
"0.6341804",
"0.6306528",
"0.624068",
"0.6221831... | 0.6835477 | 7 |
Translate a series XML element into its python xData class. | def Se0K(Emd4, InJ9, SO6Y, jlwv, MPlV=None, **B2fa):
SO6Y.append(InJ9.tag)
CO53, zKsU = Emd4.fixedDomain()
o8Kj = {'label': None, 'index': None, 'value': None, 'domainMin': CO53, 'domainMax': zKsU, 'lowerIndex': 0}
azoT = {'label': str, 'index': int, 'value': float, 'domainMin': float, 'domainMax': floa... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qts2(YKHO, QToG):\n Csk6 = YKHO._xml_to_dict(QToG)\n Csk6 = Csk6['Data']\n if isinstance(Csk6, exCv):\n raise gSvM('Provided xml has no content.')\n fNDO = Csk6['Series']\n if YKHO.get_first:\n if isinstance(fNDO, list):\n return oM6q(**fNDO[0])\n else:\n ... | [
"0.7209701",
"0.5524327",
"0.5493264",
"0.5473774",
"0.5464128",
"0.5341623",
"0.5281256",
"0.52495944",
"0.5248997",
"0.5244229",
"0.51978624",
"0.51956004",
"0.5122658",
"0.5092953",
"0.5086773",
"0.5048923",
"0.502929",
"0.4988998",
"0.49827087",
"0.49827087",
"0.49813077"... | 0.6444945 | 1 |
Returns the key's algorithm. Returns the key's algorithm. For example, "DSA" indicates that this key is a DSA key and "AES" indicates that this key is an AES key. | def VNxf(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tCmu(YKHO) -> str:\n return qe4Y.get(YKHO, 'key_algorithm')",
"def E91_(YKHO) -> str:\n return qe4Y.get(YKHO, 'algorithm')",
"def E91_(YKHO) -> str:\n return qe4Y.get(YKHO, 'algorithm')",
"def AG0j(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'host_key_algorithm')",
"def AG0j(YKH... | [
"0.84255755",
"0.75325805",
"0.75325805",
"0.7440511",
"0.7440511",
"0.7440511",
"0.7440511",
"0.72322077",
"0.72157735",
"0.71145105",
"0.7000427",
"0.7000427",
"0.6930746",
"0.6767155",
"0.67049617",
"0.6699912",
"0.6699233",
"0.66160226",
"0.6573479",
"0.6413303",
"0.61284... | 0.6505716 | 19 |
The queryset method is provided so that it can be overridden. | def SR0I(YKHO, mJZc=None):
umWR = YKHO.model._default_manager.get_query_set()
if not mJZc:
mJZc = YKHO.ordering or ()
if mJZc:
umWR = umWR.order_by(*mJZc)
return umWR | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k66M(YKHO, QePW, SR0I):\n return SR0I",
"def k66M(YKHO):\n return None",
"def k66M(YKHO):\n return None",
"def k66M(YKHO) -> ZYvt:\n raise NotImplementedError()",
"def k66M(YKHO):\n return YKHO.model.objects.all()",
"def k66M(YKHO):\n return YKHO.model.objects.all()",
"def k66M(YK... | [
"0.81146026",
"0.8041351",
"0.8041351",
"0.8002094",
"0.76750034",
"0.7618564",
"0.7516059",
"0.74419713",
"0.73497534",
"0.7269164",
"0.7256817",
"0.7184655",
"0.71785027",
"0.71441925",
"0.7104195",
"0.7047709",
"0.7024951",
"0.6992142",
"0.6982073",
"0.6956003",
"0.6942959... | 0.0 | -1 |
A string representation of the ModelInsert to be used in the markup of our editor. | def NbSY(YKHO):
return YKHO.model._meta.module_name.title() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return super().__str__() + YKHO.model.__str__()",
"def zAg0(YKHO):\n tO9_ = [f'self.model={YKHO.model!r}', f'self.field={YKHO.field!r}', f'self.fxx={YKHO.fxx!r}', f'self.date={YKHO.date!r}', f'self.priority={YKHO.priority!r}']\n return '\\n'.join(tO9_)",
"def zAg0(YKHO):\n Ylbp = ... | [
"0.67001086",
"0.6655306",
"0.66115713",
"0.65009993",
"0.6498507",
"0.64522177",
"0.6450394",
"0.64110154",
"0.6365881",
"0.63304186",
"0.62966365",
"0.6292392",
"0.6285196",
"0.6281116",
"0.62788236",
"0.6260246",
"0.6245304",
"0.62451434",
"0.6235632",
"0.6235632",
"0.6227... | 0.0 | -1 |
Converts a "CamelCasedName" to "Camel Case Name". | def tlMk(uhRd):
gLiZ = []
for hcXw in uhRd:
if len(gLiZ) >= 2 and gLiZ[-1] != ' ':
if hcXw.isupper() and gLiZ[-1].islower():
gLiZ.append(' ')
elif hcXw.islower() and gLiZ[-1].isupper() and gLiZ[-2].isupper():
gLiZ.insert(len(gLiZ) - 1, ' ')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def O3vd(mWFP):\n j93S = ZbWC.sub('(.)([A-Z][a-z]+)', '\\\\1_\\\\2', mWFP)\n return ZbWC.sub('([a-z0-9])([A-Z])', '\\\\1_\\\\2', j93S).lower()",
"def HKFf(mWFP: str) -> str:\n KCHu = mWFP.lower().split('-')\n if len(mWFP) == 0:\n return mWFP\n return KCHu[0] + ''.join((YRbF.capitalize() for... | [
"0.8697703",
"0.843491",
"0.8326707",
"0.8243454",
"0.8046422",
"0.80459934",
"0.79421145",
"0.7935976",
"0.7869358",
"0.78269863",
"0.7812251",
"0.7740994",
"0.77106375",
"0.76953745",
"0.7690271",
"0.7606156",
"0.7602473",
"0.7591027",
"0.7572725",
"0.74933773",
"0.74553585... | 0.65566933 | 99 |
Month difference between two date | def nzGy(kepv, KhBf):
yk4i = h3X7(kepv, KhBf, date_format=qhSz.DATE_FORMAT)
return yk4i.years * 12 + yk4i.months | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JeNY(AjzU, _sQW):\n return lO1m(abs((AjzU.year - _sQW.year) * 12 + AjzU.month - _sQW.month))",
"def iayq(Ilc0, w0do):\n if Ilc0.daysTo(w0do) < 0:\n PYCW = Ilc0\n Ilc0 = w0do\n w0do = PYCW\n ulWt = w0do.year() - Ilc0.year()\n X_bn = w0do.month() - Ilc0.month()\n if X_bn < 0... | [
"0.82325315",
"0.8005704",
"0.741271",
"0.70641917",
"0.65974706",
"0.6472219",
"0.64395374",
"0.6343015",
"0.6343015",
"0.6265528",
"0.62616324",
"0.622663",
"0.6211122",
"0.6019535",
"0.6005004",
"0.5913367",
"0.5909849",
"0.58972967",
"0.58922505",
"0.5863856",
"0.5855514"... | 0.80673754 | 1 |
Convert a given time to a specified Timezone | def FPLx(ppPa, yl4j=FXGE.timezone('UTC'), DAsM=qhSz.DATE_TIME_ZONE_FORMAT):
ppPa = lVIr(date_time=ppPa, datetime_format=DAsM)
return ppPa.astimezone(yl4j) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FzuM(YKHO, HO4D):\n return YKHO.feedzone.localize(HO4D).astimezone(YKHO.localzone)",
"def FPLx(ITS7):\n if ITS7 is None:\n return None\n SjQe = yl4j.tzutc()\n t79W = yl4j.tzlocal()\n try:\n h5YN = qcWV.strptime(ITS7, '%Y-%m-%dT%H:%M:%S.%fZ')\n except:\n h5YN = qcWV.strp... | [
"0.69090134",
"0.65010804",
"0.641043",
"0.6359306",
"0.6335926",
"0.62799233",
"0.6257645",
"0.6246228",
"0.61895317",
"0.61705077",
"0.6158007",
"0.61537564",
"0.6142579",
"0.61303157",
"0.6061626",
"0.60292166",
"0.5995043",
"0.59764725",
"0.5971496",
"0.5970153",
"0.59701... | 0.6869383 | 1 |
Convert a Stanza Doc to a spaCy Doc. | def nrOS(YKHO, l5Ny):
if not l5Ny:
return VBgC(YKHO.vocab)
elif l5Ny.isspace():
return VBgC(YKHO.vocab, words=[l5Ny], spaces=[False])
kofA = YKHO.snlp(l5Ny)
l5Ny = kofA.text
oMNK, uUcL = YKHO.get_tokens_with_heads(kofA)
V22M = []
oi6k = []
oeNL = []
dJ1p = []
e_cA... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UKom(YKHO, A97Q):\n return YKHO.spacy(A97Q, tag=True, parse=False)",
"def KDIb(DIYd):\n Csk6 = VOUk()\n Csk6.setNLPID('spacy')\n for eOtH in DIYd:\n a1PO = H6rD(eOtH)\n Csk6.addToken(a1PO)\n WUsc = 0\n for yAmx in DIYd.sents:\n KCHu = W66f()\n xXZG = WUsc + (len(... | [
"0.65967274",
"0.62569404",
"0.60934687",
"0.59265536",
"0.5842362",
"0.5476757",
"0.54641235",
"0.53098583",
"0.53098583",
"0.530009",
"0.52783155",
"0.51491964",
"0.5110935",
"0.5090491",
"0.5075722",
"0.5042811",
"0.5037792",
"0.5030325",
"0.50129277",
"0.50013834",
"0.499... | 0.4635611 | 44 |
Tokenize a stream of texts. | def bCYe(YKHO, z_aV):
for l5Ny in z_aV:
yield YKHO(l5Ny) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wr3U(l5Ny):\n yAmx = W66f(l5Ny)\n return yAmx.tokens()",
"def wr3U(YKHO, Novh):\n zpSF = dFss(Novh.decode('utf8'))\n return YKHO.filter_tokens(zpSF)",
"def wr3U(YKHO, l5Ny):\n l5Ny = iuVY(l5Ny)\n l5Ny = l5Ny.translate(isxO.trans)\n s2mk = [a1PO for a1PO in l5Ny.split() if len(a1PO) >= ... | [
"0.6972144",
"0.6878096",
"0.6754484",
"0.66774136",
"0.6632644",
"0.66119075",
"0.65991056",
"0.6565779",
"0.6549146",
"0.65140474",
"0.64442205",
"0.6435342",
"0.6427228",
"0.64252615",
"0.6397074",
"0.63926095",
"0.638249",
"0.6379741",
"0.6365185",
"0.6360599",
"0.6302514... | 0.0 | -1 |
Get Stanza's pretrained word embedding for given token. | def P6zz(YKHO, eOtH):
KS8Z = YKHO.svecs.vocab.unit2id(eOtH.text)
return YKHO.svecs.emb[KS8Z] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EJO_(YKHO):\n return YKHO.emb.get_keras_embedding(trainable=YKHO.trainable_emb, input_length=YKHO.sent_maxlen)",
"def EJO_(YKHO):\n return YKHO.emb.get_keras_embedding(dropout=YKHO.emb_dropout, trainable=YKHO.trainable_emb, input_length=YKHO.sent_maxlen)",
"def Rks3(YKHO, eOtH):\n if YKHO.args.add... | [
"0.66952914",
"0.6684175",
"0.64566797",
"0.6257592",
"0.6242103",
"0.62221485",
"0.6134039",
"0.6131169",
"0.605735",
"0.60233706",
"0.5972393",
"0.59586847",
"0.5947365",
"0.5943483",
"0.59075576",
"0.58292437",
"0.5815401",
"0.58041406",
"0.5802354",
"0.5739737",
"0.573806... | 0.52482116 | 81 |
Like bisect.bisect_right, but works on functions. Return the index where to insert item x in list a, assuming a is sorted. | def eEIR(JfyU, wEf2, gqRb, ODP9):
jzdc = gqRb
Fg_i = ODP9
while Fg_i > jzdc:
mxlQ = (jzdc + Fg_i) // 2
if wEf2 >= JfyU(mxlQ):
jzdc = mxlQ + 1
else:
Fg_i = mxlQ
return jzdc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fr7v(jzdc, WKvO):\n YRbF = eEIR(jzdc, WKvO)\n if YRbF < len(jzdc):\n return YRbF\n raise ValueError",
"def jGtP(jzdc, FYKK):\n nEeK = 0\n ekgN = len(jzdc)\n while nEeK < ekgN:\n x1fj = (nEeK + ekgN) // 2\n if FYKK(jzdc[x1fj:]):\n nEeK = x1fj + 1\n else... | [
"0.7142199",
"0.7103383",
"0.70921564",
"0.707852",
"0.7020369",
"0.6890925",
"0.68828535",
"0.6873553",
"0.68617415",
"0.68513507",
"0.6836348",
"0.67377377",
"0.66642696",
"0.65970486",
"0.6552446",
"0.64633733",
"0.6312089",
"0.6254765",
"0.6208589",
"0.6143075",
"0.603459... | 0.63163966 | 16 |
Verify self.filekind is a supported filekind. | def xWBV(YKHO):
assert YKHO.filekind in YKHO.obs_package.FILEKINDS, 'Invalid filekind ' + repr(YKHO.filekind) + ' in ' + repr(YKHO.filename) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def buoY(YKHO, eJTR, pmON):\n return {FfT0.TEST: YKHO._IsTestFile, FfT0.RESOURCE: YKHO._IsResourceFile, FfT0.SUITE: YKHO._IsSuiteFile}[eJTR](pmON)",
"def d2kl(YKHO):\n P6bq = yYBj()\n for YBcr in P6bq.allowed_extensions:\n Ux0P = 'test.%s' % YBcr.upper()\n YXxD = 'This file: %s should be a... | [
"0.64936244",
"0.6368033",
"0.63460654",
"0.61710685",
"0.61701775",
"0.61468863",
"0.60850877",
"0.6062987",
"0.60531515",
"0.60286754",
"0.6024042",
"0.6004679",
"0.5960114",
"0.59362644",
"0.59286594",
"0.59258145",
"0.59241706",
"0.59177876",
"0.59172714",
"0.590702",
"0.... | 0.8553937 | 0 |
A subclasssafe repr which includes required parameters except for 'mapping' which is implied by the classname. | def wHJl(YKHO):
sWfS = YKHO.__class__.__name__ + '('
sWfS += repr(YKHO.filename)
sWfS += ', '
sWfS = sWfS[:-2] + ')'
return sWfS | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n qIxc = [YKHO.name]\n if YKHO.propertiesstr:\n qIxc.append(YKHO.propertiesstr)\n qIxc = map(repr, qIxc)\n return '%s(%s)' % (type(YKHO).__name__, ', '.join(qIxc))",
"def wHJl(YKHO):\n qIxc = []\n if YKHO.name != b5cw:\n qIxc.append(YKHO.name)\n if YKHO.prop... | [
"0.7597881",
"0.7584449",
"0.7495437",
"0.73655",
"0.7239932",
"0.710881",
"0.7055924",
"0.69361496",
"0.6904115",
"0.68714964",
"0.685295",
"0.68377435",
"0.6808689",
"0.67595285",
"0.67349494",
"0.6729093",
"0.66988355",
"0.66902626",
"0.6686592",
"0.6657674",
"0.6649637",
... | 0.0 | -1 |
Get the references mentioned by the closure of this mapping but not in the cache. | def nMo1(YKHO):
return [bf9h for bf9h in YKHO.reference_names() if not GPtr.file_in_cache(YKHO.name, YKHO.observatory)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def z3LN(YKHO) -> LRdN[k_bH]:\n return YKHO.__accesses",
"def OMtj(YKHO):\n return [J8oL for J8oL in YKHO.mapping_names() if not GPtr.file_in_cache(YKHO.name, YKHO.observatory)]",
"def O9bZ(R3gR):\n U5bT = []\n oPqv = bX8v(R3gR)\n if oPqv != MLXs:\n if HvbM(oPqv) != 'call':\n U... | [
"0.5917911",
"0.5849297",
"0.5824473",
"0.58160526",
"0.5787286",
"0.5781524",
"0.5726434",
"0.56811655",
"0.5641355",
"0.5490074",
"0.5472923",
"0.54542756",
"0.54375136",
"0.53960466",
"0.5391382",
"0.5391382",
"0.5377214",
"0.53681505",
"0.5359045",
"0.53483653",
"0.534032... | 0.6933123 | 0 |
Return the string representation of this mapping, i.e. pretty serialization. This is currently limited to initially creating rmaps, not rewriting them since it is based on internal representations and therefore loses comments. | def format(YKHO):
if YKHO.comment:
return 'header = {0}\n\ncomment = {1}\n\nselector = {2}\n'.format(YKHO._format_header(), YKHO._format_comment(), YKHO._format_selector())
else:
return 'header = {0}\n\nselector = {1}\n'.format(YKHO._format_header(), YKHO._format_selector()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ChRH(YKHO) -> str:\n return '\\n'.join(map(str, YKHO._mappings.values()))",
"def bizs(YKHO) -> str:\n return BfDw.to_json(YKHO.mapping)",
"def gTzM(YKHO) -> str:\n return CgYo.pformat(YKHO.dict())",
"def gTzM(YKHO):\n return CgYo.pformat(YKHO.to_dict())",
"def gTzM(YKHO):\n return CgYo.p... | [
"0.79474795",
"0.7814941",
"0.7383358",
"0.72989494",
"0.72989494",
"0.72544736",
"0.72544736",
"0.72544736",
"0.72544736",
"0.72544736",
"0.72544736",
"0.72544736",
"0.72544736",
"0.72544736",
"0.72544736",
"0.72544736",
"0.72544736",
"0.72544736",
"0.72544736",
"0.72544736",
... | 0.0 | -1 |
Return the code string for the mapping header. | def jh0N(YKHO):
return YKHO._format_dict(YKHO.header) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def scBR(WBPg):\n Wxnj = ''\n D9Ga = ZbWC.compile('>([^\\\\s]*).*')\n r8hN = D9Ga.match(WBPg)\n try:\n Wxnj = r8hN.group(1)\n except AttributeError as e:\n raise ValueError(f'No code in header: {WBPg}') from tTpl\n return Wxnj.lower()",
"def Wxnj(YKHO) -> str:\n return YKHO._co... | [
"0.685242",
"0.6815781",
"0.6815781",
"0.66704834",
"0.66704834",
"0.66704834",
"0.66616994",
"0.65887505",
"0.65712225",
"0.65712225",
"0.65712225",
"0.65712225",
"0.6516436",
"0.6516436",
"0.6516436",
"0.6516436",
"0.6414705",
"0.6414705",
"0.6414705",
"0.6414705",
"0.62989... | 0.0 | -1 |
Return an inmemory copy of this rmap as a new object. | def jth9(YKHO):
return YKHO.from_string(YKHO.format(), YKHO.filename, ignore_checksum=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jth9(YKHO) -> 'Map':\n return YKHO.__class__(YKHO)",
"def jth9(YKHO):\n return YKHO.__class__(*YKHO.maps[:-1], YKHO.maps[-1].copy())",
"def jth9(YKHO):\n piAD = YKHO._copyBase(STPm(YKHO[:]))\n piAD.cachesize = YKHO.cachesize\n return piAD",
"def jth9(YKHO):\n r8hN = nkvf(features=YKHO._... | [
"0.7539535",
"0.70756036",
"0.7063901",
"0.69762677",
"0.69151205",
"0.6899967",
"0.68468034",
"0.6713913",
"0.66372114",
"0.6632951",
"0.66171056",
"0.65902823",
"0.6583907",
"0.6566887",
"0.65535843",
"0.6543269",
"0.6524498",
"0.6511671",
"0.64668494",
"0.64515644",
"0.644... | 0.0 | -1 |
Return a 'pure data' dictionary representation of this mapping and it's children suitable for conversion to json. If `recursive` is nonzero, return that many levels of the hierarchy starting with this one. If recursive is zero, only return the filename and header of the next levels down, not the contents. | def IAhf(YKHO, znBS=10):
z2aV = dict([(H5ew, wEf2.todict(znBS - 1)) if znBS - 1 else (wEf2.basename, wEf2.header) for H5ew, wEf2 in YKHO.selections.normal_items()])
z2aV.update(dict([(H5ew, {'name': wEf2, 'text_descr': YKHO.obs_package.TEXT_DESCR[H5ew]}) for H5ew, wEf2 in YKHO.selections.special_items()]))
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IAhf(YKHO, znBS=10):\n UtCB = YKHO.selector.todict_flat()\n return {'header': {H5ew: YKHO.header[H5ew] for H5ew in YKHO.header}, 'text_descr': YKHO.obs_package.TEXT_DESCR[YKHO.filekind], 'parameters': tuple(UtCB['parameters']), 'selections': UtCB['selections']}",
"def MNRr(YKHO):\n yV28 = {'name': Y... | [
"0.6563336",
"0.6272748",
"0.6204542",
"0.6141629",
"0.6061648",
"0.6052795",
"0.60331994",
"0.603217",
"0.59721714",
"0.59569734",
"0.59464496",
"0.59462386",
"0.58574337",
"0.5791486",
"0.572643",
"0.5703174",
"0.5666113",
"0.56604475",
"0.565065",
"0.5646841",
"0.564678",
... | 0.6310611 | 1 |
Return a JSON representation of this mapping and it's children. | def Pdnt(YKHO, znBS=10):
return qQXR.dumps(YKHO.todict(recursive=znBS)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Xxid(YKHO):\n return qQXR.dumps(YKHO.root, default=lambda z1Rg: z1Rg.__dict__)",
"def qQXR(YKHO):\n return qQXR.dumps(YKHO, default=lambda z1Rg: z1Rg.__dict__, sort_keys=True, indent=4)",
"def MNRr(YKHO):\n Csk6 = {'Name': YKHO.name}\n if YKHO._children:\n Csk6['Children'] = [{'Ratio': d... | [
"0.7305289",
"0.71867734",
"0.71564966",
"0.7068548",
"0.7068548",
"0.7068548",
"0.70458394",
"0.70458394",
"0.70276153",
"0.70186067",
"0.6979341",
"0.6950104",
"0.68744373",
"0.68294626",
"0.680055",
"0.6786559",
"0.6766333",
"0.6766333",
"0.6757407",
"0.6750073",
"0.673961... | 0.68623036 | 13 |
Return the full path (in cache or absolute) of `filename` as determined by the current environment. | def R6sH(YKHO, Ux0P):
return R6sH(Ux0P, YKHO.observatory) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IhdV(Ux0P):\n lBW9 = Hy7s.path.abspath(Hy7s.path.dirname(xAKo))\n return Hy7s.path.join(lBW9, Ux0P)",
"def hgmy(Ux0P):\n TLI7 = Hy7s.path.dirname(Hy7s.path.abspath(xAKo))\n return Hy7s.path.join(TLI7, Ux0P)",
"def E0XI(Ux0P):\n if Hy7s.path.isabs(Ux0P):\n ex45 = Ux0P\n else:\n ... | [
"0.7651311",
"0.75702167",
"0.7496601",
"0.73335075",
"0.7290136",
"0.7274325",
"0.72494704",
"0.7221216",
"0.7181128",
"0.7128718",
"0.71173835",
"0.704928",
"0.70390624",
"0.7036771",
"0.7003301",
"0.6949869",
"0.69301736",
"0.6926948",
"0.6916549",
"0.68840206",
"0.6824637... | 0.0 | -1 |
Return the single reference file basename appropriate for `header_in` selected by this ReferenceMapping. | def TVbB(YKHO, GB85):
GB85 = dict(GB85)
RKD7.verbose('Getting bestrefs:', YKHO.basename, verbosity=55)
lOMv = BfDw.condition_header_keys(GB85)
YKHO.check_rmap_omit(lOMv)
YKHO.check_rmap_relevance(lOMv)
WBPg = YKHO._precondition_header(YKHO, GB85)
WBPg = YKHO.map_irrelevant_parkeys_to_na(WBPg... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aPr_(YKHO):\n return YKHO._getbyspec('basename')[0]",
"def aPr_(YKHO):\n return sYT0(YKHO.filename)",
"def aPr_(YKHO):\n return YKHO.name.basename",
"def aPr_(YKHO):\n return Hy7s.path.basename(YKHO.filepath)",
"def QCG8(YKHO):\n return YKHO._basename[:]",
"def aPr_(YKHO):\n return ... | [
"0.6580733",
"0.6361837",
"0.63229275",
"0.6290651",
"0.6271766",
"0.6257614",
"0.6214331",
"0.60836715",
"0.60500205",
"0.60349244",
"0.60340255",
"0.60092133",
"0.5975874",
"0.5960335",
"0.5958281",
"0.5940904",
"0.5915092",
"0.591501",
"0.58816713",
"0.5859509",
"0.5853816... | 0.0 | -1 |
Return the list of reference file basenames associated with this ReferenceMapping. | def iiy1(YKHO):
return [mWFP for mWFP in YKHO.selector.reference_names() if not MuwX(mWFP)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zFfh(YKHO):\n return [YKHO.basename]",
"def iumf(YKHO):\n ZWCE = []\n for ipV4 in oyIN.asarray(YKHO.fileuris).flat:\n ZWCE.append(ipV4)\n return ZWCE",
"def L1OJ() -> x1iM[str]:\n PSrQ.__get()\n assert PSrQ.__config is not None\n X3TW = PSrQ.__config.get('wsgi', 'reference_house... | [
"0.72517836",
"0.7085553",
"0.6623731",
"0.64200705",
"0.63682485",
"0.63540596",
"0.63540596",
"0.6315137",
"0.6271564",
"0.62680906",
"0.6234775",
"0.6202142",
"0.61822695",
"0.6161746",
"0.6111911",
"0.5999768",
"0.599912",
"0.5956905",
"0.59318477",
"0.58923733",
"0.58842... | 0.0 | -1 |
Return a 'pure data' dictionary representation of this mapping and it's children suitable for conversion to json. `recursive` is ignored. | def IAhf(YKHO, znBS=10):
UtCB = YKHO.selector.todict_flat()
return {'header': {H5ew: YKHO.header[H5ew] for H5ew in YKHO.header}, 'text_descr': YKHO.obs_package.TEXT_DESCR[YKHO.filekind], 'parameters': tuple(UtCB['parameters']), 'selections': UtCB['selections']} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MNRr(YKHO):\n\n def O4bD(Q6kx):\n if len(Q6kx.children) == 0:\n return Q6kx.info\n else:\n Yd6X = Q6kx.info.copy()\n Yd6X['children'] = []\n for Z9rn in Q6kx.children:\n Yd6X['children'].append(O4bD(Z9rn))\n return Yd6X\n ... | [
"0.6972573",
"0.6909221",
"0.68576676",
"0.6811422",
"0.6789981",
"0.67803043",
"0.67141736",
"0.6671803",
"0.6619471",
"0.661328",
"0.65686363",
"0.6470383",
"0.6460556",
"0.6457675",
"0.64259434",
"0.631434",
"0.6295591",
"0.62757254",
"0.62687325",
"0.6258878",
"0.62569636... | 0.587117 | 60 |
Load any `mapping`, ignoring the cache. Returns a unique object for each call. Slow but safe for any use, reads every file and returns a new copy. Return a PipelineContext, InstrumentContext, or ReferenceMapping. | def cIHs(J8oL, **sjXb):
sjXb['loader'] = cIHs
return zqQf.uncached(J8oL, **sjXb) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zqQf(J8oL, **sjXb):\n if J8oL.endswith('.pmap'):\n Emd4 = fQr8\n elif J8oL.endswith('.imap'):\n Emd4 = dcGo\n elif J8oL.endswith('.rmap'):\n Emd4 = JTFL\n else:\n if GPtr.S3_ENABLED:\n r8hN = GySg.from_s3(J8oL, **sjXb)\n else:\n r8hN = GySg.f... | [
"0.7033116",
"0.6688804",
"0.61699647",
"0.6006327",
"0.582595",
"0.56813157",
"0.56762385",
"0.56305736",
"0.55469227",
"0.55223274",
"0.5485086",
"0.54406196",
"0.5389387",
"0.5326323",
"0.53235817",
"0.53080964",
"0.5259044",
"0.52405286",
"0.52151686",
"0.51678425",
"0.51... | 0.63241136 | 2 |
Return True IFF `filename` is one of the special values which does not correspond to a file, e.g. N/A. >>> is_special_value("foo.fits") False >>> is_special_value("N/A") True | def MuwX(Ux0P):
return rCkD.is_special_value(str(Ux0P)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ET8B(BWXx):\n return BWXx == GARf(BWXx)",
"def BkLD(YKHO):\n Ux0P = 'somename'\n F4VP = BfDw.is_allowed_file(Ux0P)\n YKHO.assertFalse(F4VP)",
"def ET8B(Ux0P: str) -> bool:\n wgT_ = '|'.join(eVms.ALL_FORMAT)\n njyT = f'[a-zA-Z0-9][a-zA-Z0-9_()-\\\\.]*\\\\.({wgT_})$'\n return ZbWC.match(... | [
"0.64880186",
"0.6151668",
"0.6040881",
"0.60315907",
"0.6031464",
"0.59940237",
"0.59470975",
"0.59439623",
"0.5933223",
"0.59257495",
"0.59082377",
"0.59082377",
"0.5886398",
"0.58448243",
"0.58448243",
"0.584331",
"0.584331",
"0.58404434",
"0.5823541",
"0.5823541",
"0.5823... | 0.810885 | 0 |
Adds a sequence of tokens to this ngram. | def H2v5(YKHO, s2mk):
for eOtH in s2mk:
YKHO.vocab.add(eOtH)
for RiWf, eOtH in zxm6(s2mk, YKHO.size, include_terminator=YKHO.size != 1):
if RiWf not in YKHO.frequencies:
YKHO.frequencies[RiWf] = FqOV()
YKHO.frequencies[RiWf].add(eOtH) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _lYl(YKHO, s2mk):\n if YKHO.pad:\n s2mk = [DACR] * YKHO.order + s2mk + [fSqi]\n for YRbF in range(len(s2mk) - YKHO.order):\n DghZ = tuple(s2mk[YRbF:YRbF + YKHO.order])\n rxHc = s2mk[YRbF + YKHO.order]\n YKHO.add_state(DghZ, rxHc)",
"def _lYl(YKHO, s2mk):\n YKHO.result.ext... | [
"0.75078684",
"0.7305936",
"0.6542211",
"0.6363472",
"0.6322069",
"0.6322069",
"0.63194484",
"0.6162834",
"0.6157025",
"0.6140424",
"0.6065426",
"0.6058867",
"0.6050981",
"0.6041897",
"0.6028869",
"0.5976654",
"0.5961985",
"0.5961429",
"0.5950294",
"0.58862704",
"0.5872447",
... | 0.7533841 | 0 |
Generatees ngrams as pairs of leaders and tokens. If include_terminator is true an additional token and leader will be returned for the end of the sentence with the last token as None. | def zxm6(s2mk, ercu, *, HSJD=False):
if ercu <= 0:
raise Exception('ngram size must be positive')
if not HSJD:
for Jnwu in range(len(s2mk)):
RiWf = NSOv(s2mk, Jnwu, ercu - 1)
eOtH = s2mk[Jnwu]
yield (RiWf, eOtH)
else:
for Jnwu in range(len(s2mk) + ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aPuO(YKHO, s2mk):\n pCSA = []\n for YRbF in range(len(s2mk) - YKHO.N + 1):\n pCSA.append(tuple(s2mk[YRbF:YRbF + YKHO.N]))\n return pCSA",
"def kiTG(s2mk, exwG=2):\n pCSA = zip(*(uOgj(uOe2, or8S, None) for or8S, uOe2 in enumerate(y54_(s2mk, exwG))))\n return pCSA",
"def Qceb(YKHO, cufJ... | [
"0.560517",
"0.55146813",
"0.5456382",
"0.54148364",
"0.5371505",
"0.53318053",
"0.52578",
"0.5249324",
"0.5203259",
"0.5085066",
"0.50800323",
"0.50681764",
"0.5032283",
"0.5019726",
"0.50194144",
"0.5006687",
"0.49998164",
"0.4996819",
"0.49888602",
"0.49744505",
"0.4973431... | 0.7815241 | 0 |
Finds all primes in range [1,n]. | def DJ4N(exwG):
mSrU = [True for YRbF in range(exwG + 1)]
XP5J = 2
while XP5J ** 2 <= exwG:
if mSrU[XP5J]:
for YRbF in range(XP5J ** 2, exwG + 1, XP5J):
mSrU[YRbF] = False
XP5J += 1
rPed = EC_r(range(2, exwG + 1), mSrU[2:])
return list(rPed) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rPed(exwG):\n return [YRbF for YRbF in Ni9Y(1, exwG + 1) if kU5Q(YRbF)]",
"def DwOa(exwG):\n return list(uVDW(exwG))",
"def kAOJ(exwG):\n uED7 = []\n for YRbF in range(2, exwG):\n if T1qg(YRbF):\n uED7.append(YRbF)\n return uED7",
"def QT5F(exwG):\n rPed = []\n if e... | [
"0.86469895",
"0.82977706",
"0.8233397",
"0.8232103",
"0.8216812",
"0.80644727",
"0.79715544",
"0.79453987",
"0.79171306",
"0.79137146",
"0.7912284",
"0.7912284",
"0.78986275",
"0.7895275",
"0.78930616",
"0.7892848",
"0.7891296",
"0.78706557",
"0.783415",
"0.7817763",
"0.7792... | 0.7621685 | 30 |
Test case for update_record | def mmy9(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Tbie(YKHO):\n pass",
"def i2Mc(YKHO):\n pass",
"def X16d(IkKT, JgAn):\n ITS7.sleep(LWsT)\n AIu6 = dict(JgAn.get(mE27)[0])\n hm_4 = '0.00' if AIu6[fo8Q] != '0.00' else '1.00'\n nPrm = {'id': AIu6['id'], fo8Q: hm_4}\n kuSy = JgAn.record(method='update', data=nPrm, obj=mE27)\n assert k... | [
"0.7946309",
"0.7794273",
"0.7644227",
"0.7496466",
"0.7496466",
"0.7496466",
"0.7472344",
"0.7388909",
"0.72927755",
"0.7211169",
"0.714157",
"0.7070297",
"0.70664746",
"0.70474994",
"0.70445114",
"0.70120186",
"0.7008943",
"0.69905704",
"0.6927306",
"0.6923109",
"0.6922989"... | 0.9378655 | 0 |
Update DataFrame column from string to datatime | def bYFn(A1oe, Qg73):
for YRbF in range(len(A1oe)):
A1oe.loc[YRbF, Qg73] = wvEv.parse(A1oe.loc[YRbF, Qg73])
return A1oe | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ux9U(YKHO, bOBl, bL8c='UNIXTIME'):\n\n def cmSR(E3oo):\n return qcWV.fromtimestamp(float(E3oo) / 1000.0, BRdn)\n try:\n DwRD = bOBl[bL8c].apply(cmSR)\n bOBl['DATETIME'] = DwRD\n except KeyError:\n RKD7.warn('Could not add DATETIME column')",
"def Nuwf(jQ3Z, AAHb):\n jQ... | [
"0.6576167",
"0.6310115",
"0.6253117",
"0.62048435",
"0.5986647",
"0.5973783",
"0.593974",
"0.59374064",
"0.59224397",
"0.5899999",
"0.589413",
"0.58337736",
"0.57693267",
"0.5692432",
"0.5614722",
"0.5538695",
"0.55318815",
"0.54667735",
"0.5456263",
"0.5433656",
"0.5428522"... | 0.6806321 | 0 |
Return current max possible score | def jB5X(YKHO):
return YKHO.raw_possible | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jB5X(YKHO):\n return YKHO.lcp.get_max_score()",
"def jB5X(YKHO):\n return YKHO.points",
"def jB5X(YKHO):\n return max(YKHO._extract_set('score') or [0])",
"def jB5X(YKHO):\n jB5X = None\n if YKHO.check_if_done_and_scored():\n jB5X = YKHO._max_score\n return jB5X",
"def ehxu(cCr... | [
"0.83607095",
"0.82570076",
"0.8182481",
"0.81650966",
"0.79798025",
"0.79700476",
"0.79324347",
"0.78165346",
"0.77685696",
"0.7742203",
"0.76821244",
"0.7658756",
"0.7647138",
"0.7617604",
"0.76009655",
"0.75978607",
"0.7399104",
"0.7327616",
"0.7321057",
"0.7310825",
"0.73... | 0.8704153 | 0 |
Test if get_json_data throws Error 404. | def _465(YKHO):
geh0 = YKHO.app.test_client().get('/test/get_json_data/99999')
YKHO.assertEqual(geh0.json['status'], 'failure')
YKHO.assertEqual(geh0.json['error'], 'Test not found') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZNah(YKHO):\n geh0 = G4JS.get(url=YKHO.invalid_url)\n MOPg = geh0.headers\n zgjV = geh0.json()\n YKHO.assertEqual(geh0.status_code, 404, lwj6)\n YKHO.assertEqual(MOPg['Content-Type'], 'application/json', khAs)\n YKHO.assertTrue(YKHO.city == S8SU.get(cKBo, YKHO.city_id))\n YKHO.assertIn('er... | [
"0.77060896",
"0.7534178",
"0.7487082",
"0.731388",
"0.72731125",
"0.7251993",
"0.722905",
"0.71868604",
"0.7117255",
"0.71160656",
"0.7105604",
"0.70935243",
"0.707169",
"0.70526576",
"0.7050873",
"0.7020117",
"0.6991725",
"0.6990176",
"0.6933643",
"0.6896658",
"0.6866621",
... | 0.8633553 | 0 |
Test if it'll return a 404 on a non existent test. | def BPod(YKHO):
geh0 = YKHO.app.test_client().get('/test/99999')
YKHO.assertEqual(geh0.status_code, 404)
YKHO.assert_template_used('test/test_not_found.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KE2t(x0hE):\n geh0 = x0hE.get('/not-exists')\n assert geh0.status_code == 404",
"def v4ew(YKHO):\n bD7m = YKHO.baseurl + '/do-not-implement-this-page-it-is-not-found'\n try:\n qv1X = dTAH.urlopen(bD7m, None, 3)\n YKHO.assertTrue(False, 'Should have thrown an HTTP Error!')\n excep... | [
"0.8165085",
"0.8049307",
"0.8038956",
"0.799371",
"0.79879606",
"0.78720796",
"0.7839402",
"0.7789028",
"0.7788226",
"0.7763643",
"0.7756521",
"0.77174175",
"0.7707059",
"0.7660243",
"0.7599413",
"0.7591642",
"0.75879985",
"0.7513415",
"0.7468065",
"0.74625045",
"0.7425017",... | 0.78959966 | 5 |
Returns torrent client API version. | def EOwe(YKHO) -> str:
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kaPv(YKHO):\n return YKHO.api_version",
"def kaPv(YKHO):\n return YKHO.__make_api_call('get/version')",
"def Q2ji(YKHO):\n IJ4N, cbKy, Po4F = YKHO.client.config['api_version']\n return '%s.%s.%s' % (IJ4N, cbKy, Po4F)",
"def CPyo(YKHO):\n return YKHO._SendRequest(mdOq, '/version', None, Non... | [
"0.78064674",
"0.76813656",
"0.7661497",
"0.75911033",
"0.7587933",
"0.75630313",
"0.75506276",
"0.7464854",
"0.7457695",
"0.74385077",
"0.74318",
"0.7428514",
"0.7354802",
"0.73113",
"0.72949046",
"0.7292924",
"0.72704196",
"0.72546375",
"0.7234231",
"0.7234231",
"0.7234231"... | 0.0 | -1 |
Given a sequence [A, B, C] of size n, creates a new sequence of the same size where each new item is the pair of the item at a given position paired up with next item. | def r0y9(aWuw):
u54L = len(aWuw)
return [(aWuw[YRbF], aWuw[(YRbF + 1) % u54L]) for YRbF in range(u54L)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ASFp(aWuw):\n u54L = len(aWuw)\n return [(aWuw[YRbF], aWuw[YRbF + 1]) for YRbF in range(u54L - 1)]",
"def DtZ9(jzdc, Fg_i, Z9rn):\n YRbF = 1\n while True:\n yield (jzdc * YRbF ** 2 + Fg_i * YRbF + Z9rn)\n YRbF += 1",
"def KnxT(Q6uT, exwG=2):\n WhY1 = iter(Q6uT)\n Aofo = tupl... | [
"0.6895533",
"0.63150525",
"0.63032806",
"0.63032806",
"0.6104639",
"0.60620105",
"0.6022076",
"0.60071945",
"0.59853053",
"0.5976079",
"0.5930208",
"0.59097314",
"0.59072196",
"0.58934146",
"0.5870297",
"0.58660096",
"0.5795893",
"0.5791655",
"0.5769116",
"0.5760917",
"0.575... | 0.6257828 | 4 |
Given a sequence [A, B, C] of size n, creates a new sequence of size n 1 where each element is the pair of the element paired up with next item. [(A, B), (B, C)]. | def ASFp(aWuw):
u54L = len(aWuw)
return [(aWuw[YRbF], aWuw[YRbF + 1]) for YRbF in range(u54L - 1)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zu14(KCHu):\n return [(KCHu[YRbF - 1], KCHu[YRbF]) for YRbF in range(1, len(KCHu))]",
"def kgDL(yv6U):\n for YRbF in range(1, len(yv6U), 2):\n yield (yv6U[YRbF - 1], yv6U[YRbF])",
"def Zu14(yv6U):\n if not yv6U:\n return\n for YRbF in range(len(yv6U) - 1):\n yield (yv6U[YRb... | [
"0.6647065",
"0.6605497",
"0.6511508",
"0.6460928",
"0.6441834",
"0.63978654",
"0.63488936",
"0.63446945",
"0.6314862",
"0.62877",
"0.62877",
"0.62877",
"0.62877",
"0.6272627",
"0.6254846",
"0.6254846",
"0.6252398",
"0.6245274",
"0.6228544",
"0.6206464",
"0.62000936",
"0.61... | 0.742209 | 0 |
Reshaping happens during the call to forward. | def q3V_(YKHO, es2x, tlxW):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVH6(YKHO, input):\n Ep8u = input.size(0)\n ROpF = (Ep8u, *YKHO.shape)\n yvT9 = input.reshape(ROpF)\n return yvT9",
"def fK3f(YKHO):\n YKHO._frame._setup(width=YKHO._width, height=YKHO._height, startx=YKHO._x, starty=YKHO._y)",
"def KVH6(YKHO, WKvO):\n WKvO = WKvO.permute(0, 3, 1, 2)\n ... | [
"0.7052694",
"0.66112494",
"0.6553348",
"0.6553348",
"0.6445214",
"0.6263273",
"0.6219224",
"0.62077326",
"0.6204762",
"0.612587",
"0.612587",
"0.6098139",
"0.6093421",
"0.6090613",
"0.60858375",
"0.60803044",
"0.6076111",
"0.60631406",
"0.60622656",
"0.60548824",
"0.60481465... | 0.57463765 | 88 |
Returns a list of primes < n, sorted by length and digit | def NXb7(exwG):
KwQv = [True] * exwG
for YRbF in Ni9Y(3, int(exwG ** 0.5) + 1, 2):
if KwQv[YRbF]:
KwQv[YRbF * YRbF::2 * YRbF] = [False] * ((exwG - YRbF * YRbF - 1) / (2 * YRbF) + 1)
CPRh = dict()
for YRbF in range(1, len(str(exwG))):
CPRh[YRbF] = [[]] * 10
for r845 in... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _a2T(exwG):\n JscZ = []\n for YRbF in range(exwG):\n if T1qg(YRbF):\n JscZ.append(YRbF)\n return JscZ",
"def zxex(exwG):\n assert exwG > 0, 'Cannot generate a list of %d length primes.' % exwG\n jzdc = []\n for YRbF in range(10 ** (exwG - 1), 10 ** exwG):\n if T1qg(... | [
"0.7782975",
"0.7782333",
"0.7754201",
"0.77479",
"0.7745342",
"0.76620096",
"0.76518625",
"0.7648402",
"0.76306117",
"0.7629798",
"0.76070654",
"0.7606282",
"0.7568125",
"0.7483783",
"0.74646497",
"0.7384399",
"0.7381496",
"0.73769975",
"0.7351073",
"0.7291742",
"0.726924",
... | 0.0 | -1 |
Convert network prediction into a quantile prediction. | def FvPl(YKHO, aMgO: torch.Tensor) -> ht2j.Tensor:
if aMgO.ndim == 2:
aMgO = aMgO.unsqueeze(-1)
return aMgO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FvPl(YKHO, aMgO: torch.Tensor) -> ht2j.Tensor:\n return YKHO.metrics[0].to_quantiles(aMgO)",
"def _0qY(YKHO, aMgO: torch.Tensor) -> ht2j.Tensor:\n if aMgO.ndim == 3:\n if YKHO.quantiles is None:\n or8S = aMgO.size(-1) // 2\n else:\n or8S = YKHO.quantiles.index(0.5)\n... | [
"0.69405204",
"0.66854614",
"0.63962317",
"0.6220067",
"0.6220067",
"0.6220067",
"0.62083036",
"0.61750406",
"0.6122583",
"0.60333264",
"0.60130334",
"0.59850204",
"0.5856626",
"0.5762192",
"0.57340574",
"0.56476927",
"0.5630361",
"0.5611544",
"0.5575561",
"0.55525225",
"0.55... | 0.69842494 | 0 |
Convert network prediction into a quantile prediction. Will use first metric in ``metrics`` attribute to calculate result. | def FvPl(YKHO, aMgO: torch.Tensor) -> ht2j.Tensor:
return YKHO.metrics[0].to_quantiles(aMgO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FvPl(YKHO, aMgO: torch.Tensor) -> ht2j.Tensor:\n if aMgO.ndim == 2:\n aMgO = aMgO.unsqueeze(-1)\n return aMgO",
"def bqlY(YKHO, Ga6V, EcVT, Cwt5, DFvB=False):\n aMgO = YKHO.forecaster_.predict(fh=Ga6V, X=None)\n return YKHO._calculate_data_quantiles(aMgO, Cwt5, legacy_interface=DFvB)",
"... | [
"0.64407766",
"0.6166652",
"0.6106042",
"0.6106042",
"0.6106042",
"0.60184526",
"0.6003432",
"0.5676995",
"0.55563223",
"0.5442841",
"0.54117227",
"0.5411699",
"0.53962255",
"0.53373915",
"0.5334559",
"0.5313909",
"0.5313356",
"0.5305422",
"0.53017294",
"0.5263997",
"0.522271... | 0.71505016 | 0 |
Compute my distance from the origin | def JpbV(YKHO):
return (YKHO.x ** 2 + YKHO.y ** 2) ** 0.5 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JpbV(YKHO):\n return (YKHO.x ** 2 + YKHO.y ** 2) ** 0.5",
"def CD5L(YKHO):\n return oyIN.sqrt(YKHO.x ** 2 + YKHO.y ** 2)",
"def JpbV(YKHO) -> float:\n return YKHO._distance_from_origin",
"def OZF0(YKHO):\n return (YKHO.x ** 2 + YKHO.y ** 2) ** 0.5",
"def Z4u2(YKHO):\n return (YKHO.x ** 2... | [
"0.85651153",
"0.8497203",
"0.83239484",
"0.8296965",
"0.8215538",
"0.7733896",
"0.74213135",
"0.737899",
"0.72927284",
"0.7264867",
"0.7259701",
"0.72560894",
"0.72475415",
"0.7231078",
"0.7207231",
"0.7149887",
"0.71417105",
"0.71378225",
"0.71354437",
"0.71315557",
"0.7130... | 0.8566417 | 6 |
Return the halfway point between myself and the target | def Tf9J(YKHO, pan_):
RsfQ = (YKHO.x + pan_.x) / 2
suhQ = (YKHO.y + pan_.y) / 2
return PvyL(RsfQ, suhQ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Tf9J(YKHO, pan_):\n RsfQ = (YKHO.x + pan_.x) / 2\n suhQ = (YKHO.y + pan_.y) / 2\n return PvyL(RsfQ, suhQ)",
"def Tf9J(YKHO, pan_):\n RsfQ = (YKHO.x + pan_.x) / 2\n suhQ = (YKHO.y + pan_.y) / 2\n return PvyL(RsfQ, suhQ)",
"def xi3E(pan_, o3Uj):\n return hJJf(o3Uj, pan_)",
"def aZVB(YK... | [
"0.8789036",
"0.87399906",
"0.7259315",
"0.6758469",
"0.6579334",
"0.6313658",
"0.615805",
"0.60153526",
"0.59883934",
"0.58936673",
"0.58650094",
"0.58640325",
"0.585778",
"0.58406675",
"0.5820845",
"0.580087",
"0.5799157",
"0.5790215",
"0.5785922",
"0.5784319",
"0.5782862",... | 0.87813574 | 3 |
numerically stable log_softmax implementation that prevents overflow | def asmm(WKvO):
jDK_ = len(WKvO.get_shape()) - 1
r8hN = ZylS.reduce_max(WKvO, jDK_, keep_dims=True)
return WKvO - r8hN - ZylS.log(ZylS.reduce_sum(ZylS.exp(WKvO - r8hN), jDK_, keep_dims=True)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YH__(WKvO):\n OuhA = WKvO - oyIN.max(WKvO)\n nwEM = oyIN.exp(OuhA)\n return nwEM / oyIN.sum(nwEM)",
"def h_oU(input, tpio, LpaZ=False):\n return o8DQ.apply('LogSoftmax', input.device, [input], outputs=[input if LpaZ else None], axis=tpio)",
"def h_oU(WKvO: jnp.DeviceArray, *, jDK_: int=0) -> oL... | [
"0.77298",
"0.77168965",
"0.77082556",
"0.76411545",
"0.76040596",
"0.7375868",
"0.7343657",
"0.7335469",
"0.7319122",
"0.7316114",
"0.7291785",
"0.72785354",
"0.72421026",
"0.7237872",
"0.7236452",
"0.7203207",
"0.7203207",
"0.7200916",
"0.719867",
"0.7190057",
"0.71697676",... | 0.7334381 | 8 |
get all the none zero numbers | def OZSy(zFiD):
b_bB = []
for NxBK in range(0, len(zFiD)):
if zFiD[NxBK] != 0:
b_bB.append(zFiD[NxBK])
return b_bB | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AxqP(YKHO):\n return YKHO.serie.isin([0]).sum()",
"def YsSv(YKHO):\n return YKHO.tape.get_nonzeros(YKHO.machine.eval_symbol, YKHO.machine.eval_state(YKHO.state))",
"def AxqP(YKHO):\n Vh3D = YKHO.df[YKHO.col_name].isin([0]).sum(axis=0)\n return Vh3D",
"def pnwa(YKHO):\n return YKHO.__all_ze... | [
"0.7489233",
"0.7051678",
"0.6850389",
"0.67750067",
"0.6606803",
"0.6591398",
"0.65698874",
"0.6564203",
"0.65258455",
"0.6493081",
"0.63906497",
"0.636943",
"0.6283294",
"0.6272019",
"0.6255472",
"0.62469995",
"0.6233126",
"0.62146306",
"0.61789566",
"0.61694115",
"0.610810... | 0.69763607 | 2 |
get a list with all zero | def SzvC(zFiD):
q18A = []
for NxBK in range(0, len(zFiD)):
if zFiD[NxBK] == 0:
q18A.append(0)
return q18A | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JalG(XP5J):\n return [mM0K == 0 for mM0K in XP5J]",
"def AxqP(YKHO):\n return YKHO.serie.isin([0]).sum()",
"def pnwa(YKHO):\n return YKHO.__all_zeroes__",
"def VNqG(exwG):\n return [0 for YRbF in range(exwG)]",
"def OZSy(zFiD):\n b_bB = []\n for NxBK in range(0, len(zFiD)):\n i... | [
"0.7527247",
"0.7473732",
"0.74616665",
"0.72223026",
"0.7157325",
"0.70764",
"0.69731575",
"0.69689333",
"0.6843033",
"0.6677035",
"0.6616913",
"0.6585737",
"0.65591115",
"0.6550359",
"0.6548953",
"0.65457416",
"0.653905",
"0.64571196",
"0.64464927",
"0.64382565",
"0.6329977... | 0.7374514 | 3 |
Get the height of the board. | def VAHQ(YKHO):
return YKHO._grid_height | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H2v2(YKHO):\n return YKHO.board.shape[0]",
"def bAiv(YKHO):\n return YKHO.height",
"def bAiv(YKHO):\n return YKHO.height",
"def bAiv(YKHO):\n return YKHO._height",
"def VAHQ(YKHO):\n return YKHO._height",
"def VAHQ(YKHO):\n return YKHO._height",
"def xglF(YKHO):\n return YKHO._... | [
"0.85058457",
"0.7827244",
"0.7827244",
"0.7790992",
"0.77879226",
"0.77879226",
"0.7767336",
"0.7767336",
"0.7767336",
"0.7767336",
"0.77655625",
"0.7762097",
"0.775954",
"0.77538955",
"0.7741838",
"0.77374107",
"0.77206814",
"0.76960677",
"0.76933795",
"0.76933795",
"0.7693... | 0.74177706 | 75 |
String for representing the Model object (in Admin site etc.) | def zAg0(YKHO):
return '%s' % YKHO.name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return super().__str__() + YKHO.model.__str__()",
"def zAg0(YKHO):\n return '%s%s' % (YKHO.name, ' - %s' % YKHO.model if YKHO.model else '')",
"def zAg0(YKHO):\n C3ST = YKHO._meta.verbose_name.title()\n return f'{C3ST:s}: {YKHO.name:s}'",
"def zAg0(YKHO):\n C3ST = YKHO._meta.... | [
"0.7801624",
"0.77112937",
"0.767426",
"0.767426",
"0.7524702",
"0.74020135",
"0.7398639",
"0.7378346",
"0.7328583",
"0.7270028",
"0.7244434",
"0.7233179",
"0.7205981",
"0.7174358",
"0.7165676",
"0.7108926",
"0.70379156",
"0.70379156",
"0.7012156",
"0.69865996",
"0.6968002",
... | 0.6755977 | 55 |
String for representing the Model object (in Admin site etc.) | def zAg0(YKHO):
return '%s' % YKHO.name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return super().__str__() + YKHO.model.__str__()",
"def zAg0(YKHO):\n return '%s%s' % (YKHO.name, ' - %s' % YKHO.model if YKHO.model else '')",
"def zAg0(YKHO):\n C3ST = YKHO._meta.verbose_name.title()\n return f'{C3ST:s}: {YKHO.name:s}'",
"def zAg0(YKHO):\n C3ST = YKHO._meta.... | [
"0.78016543",
"0.7712146",
"0.7675692",
"0.7675692",
"0.7525264",
"0.740416",
"0.7396687",
"0.73751175",
"0.732573",
"0.72692174",
"0.7241136",
"0.7235689",
"0.72075593",
"0.7174236",
"0.71677464",
"0.710979",
"0.70352644",
"0.70352644",
"0.70127875",
"0.6987778",
"0.6966356"... | 0.6754608 | 54 |
String for representing the Model object (in Admin site etc.) | def zAg0(YKHO):
return '%s' % YKHO.name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return super().__str__() + YKHO.model.__str__()",
"def zAg0(YKHO):\n return '%s%s' % (YKHO.name, ' - %s' % YKHO.model if YKHO.model else '')",
"def zAg0(YKHO):\n C3ST = YKHO._meta.verbose_name.title()\n return f'{C3ST:s}: {YKHO.name:s}'",
"def zAg0(YKHO):\n C3ST = YKHO._meta.... | [
"0.7801624",
"0.77112937",
"0.767426",
"0.767426",
"0.7524702",
"0.74020135",
"0.7398639",
"0.7378346",
"0.7328583",
"0.7270028",
"0.7244434",
"0.7233179",
"0.7205981",
"0.7174358",
"0.7165676",
"0.7108926",
"0.70379156",
"0.70379156",
"0.7012156",
"0.69865996",
"0.6968002",
... | 0.6755977 | 56 |
String for representing the Model object (in Admin site etc.) | def zAg0(YKHO):
return '%s, %s: %s' % (YKHO.first_author, YKHO.year, YKHO.title) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return super().__str__() + YKHO.model.__str__()",
"def zAg0(YKHO):\n return '%s%s' % (YKHO.name, ' - %s' % YKHO.model if YKHO.model else '')",
"def zAg0(YKHO):\n C3ST = YKHO._meta.verbose_name.title()\n return f'{C3ST:s}: {YKHO.name:s}'",
"def zAg0(YKHO):\n C3ST = YKHO._meta.... | [
"0.78016543",
"0.7712146",
"0.7675692",
"0.7675692",
"0.7525264",
"0.740416",
"0.7396687",
"0.73751175",
"0.732573",
"0.72692174",
"0.7241136",
"0.7235689",
"0.72075593",
"0.7174236",
"0.71677464",
"0.710979",
"0.70352644",
"0.70352644",
"0.70127875",
"0.6987778",
"0.6966356"... | 0.0 | -1 |
String for representing the Model object (in Admin site etc.) | def zAg0(YKHO):
return '%s' % YKHO.name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return super().__str__() + YKHO.model.__str__()",
"def zAg0(YKHO):\n return '%s%s' % (YKHO.name, ' - %s' % YKHO.model if YKHO.model else '')",
"def zAg0(YKHO):\n C3ST = YKHO._meta.verbose_name.title()\n return f'{C3ST:s}: {YKHO.name:s}'",
"def zAg0(YKHO):\n C3ST = YKHO._meta.... | [
"0.7801624",
"0.77112937",
"0.767426",
"0.767426",
"0.7524702",
"0.74020135",
"0.7398639",
"0.7378346",
"0.7328583",
"0.7270028",
"0.7244434",
"0.7233179",
"0.7205981",
"0.7174358",
"0.7165676",
"0.7108926",
"0.70379156",
"0.70379156",
"0.7012156",
"0.69865996",
"0.6968002",
... | 0.6755977 | 53 |
String for representing the Model object (in Admin site etc.) | def zAg0(YKHO):
return '%s / %s - %s' % (YKHO.qualifier_name, YKHO.stratigraphic_qualifier, YKHO.level) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return super().__str__() + YKHO.model.__str__()",
"def zAg0(YKHO):\n return '%s%s' % (YKHO.name, ' - %s' % YKHO.model if YKHO.model else '')",
"def zAg0(YKHO):\n C3ST = YKHO._meta.verbose_name.title()\n return f'{C3ST:s}: {YKHO.name:s}'",
"def zAg0(YKHO):\n C3ST = YKHO._meta.... | [
"0.78016543",
"0.7712146",
"0.7675692",
"0.7675692",
"0.7525264",
"0.740416",
"0.7396687",
"0.73751175",
"0.732573",
"0.72692174",
"0.7241136",
"0.7235689",
"0.72075593",
"0.7174236",
"0.71677464",
"0.710979",
"0.70352644",
"0.70352644",
"0.70127875",
"0.6987778",
"0.6966356"... | 0.0 | -1 |
String for representing the Model object (in Admin site etc.) | def zAg0(YKHO):
if YKHO.reference is None:
return '%s - %s - %s' % (YKHO.name, YKHO.qualifier, YKHO.location)
else:
return '%s - %s - %s - %s' % (YKHO.name, YKHO.qualifier, YKHO.location, YKHO.reference) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return super().__str__() + YKHO.model.__str__()",
"def zAg0(YKHO):\n return '%s%s' % (YKHO.name, ' - %s' % YKHO.model if YKHO.model else '')",
"def zAg0(YKHO):\n C3ST = YKHO._meta.verbose_name.title()\n return f'{C3ST:s}: {YKHO.name:s}'",
"def zAg0(YKHO):\n C3ST = YKHO._meta.... | [
"0.7801624",
"0.77112937",
"0.767426",
"0.767426",
"0.7524702",
"0.74020135",
"0.7398639",
"0.7378346",
"0.7328583",
"0.7270028",
"0.7244434",
"0.7233179",
"0.7205981",
"0.7174358",
"0.7165676",
"0.7108926",
"0.70379156",
"0.70379156",
"0.7012156",
"0.69865996",
"0.6968002",
... | 0.0 | -1 |
String for representing the Model object (in Admin site etc.) | def zAg0(YKHO):
return '%s | %s' % (YKHO.name_one, YKHO.name_two) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return super().__str__() + YKHO.model.__str__()",
"def zAg0(YKHO):\n return '%s%s' % (YKHO.name, ' - %s' % YKHO.model if YKHO.model else '')",
"def zAg0(YKHO):\n C3ST = YKHO._meta.verbose_name.title()\n return f'{C3ST:s}: {YKHO.name:s}'",
"def zAg0(YKHO):\n C3ST = YKHO._meta.... | [
"0.78016543",
"0.7712146",
"0.7675692",
"0.7675692",
"0.7525264",
"0.740416",
"0.7396687",
"0.73751175",
"0.732573",
"0.72692174",
"0.7241136",
"0.7235689",
"0.72075593",
"0.7174236",
"0.71677464",
"0.710979",
"0.70352644",
"0.70352644",
"0.70127875",
"0.6987778",
"0.6966356"... | 0.0 | -1 |
String for representing the Model object (in Admin site etc.) | def zAg0(YKHO):
return '%s: %s' % (YKHO.binning_scheme.ts_name, YKHO.name) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return super().__str__() + YKHO.model.__str__()",
"def zAg0(YKHO):\n return '%s%s' % (YKHO.name, ' - %s' % YKHO.model if YKHO.model else '')",
"def zAg0(YKHO):\n C3ST = YKHO._meta.verbose_name.title()\n return f'{C3ST:s}: {YKHO.name:s}'",
"def zAg0(YKHO):\n C3ST = YKHO._meta.... | [
"0.7801624",
"0.77112937",
"0.767426",
"0.767426",
"0.7524702",
"0.74020135",
"0.7398639",
"0.7378346",
"0.7328583",
"0.7270028",
"0.7244434",
"0.7233179",
"0.7205981",
"0.7174358",
"0.7165676",
"0.7108926",
"0.70379156",
"0.70379156",
"0.7012156",
"0.69865996",
"0.6968002",
... | 0.0 | -1 |
Helper function that returns a dictionary with keys dpos, rotation from a raw input array. The first three elements are taken to be displacement in position, and a quaternion indicating the change in rotation with respect to . | def QOva(YKHO, XeOP, L1ID):
return {'dpos': XeOP[:3], 'rotation': Kt_s.quat2mat(Kt_s.quat_multiply(L1ID, XeOP[3:7]))} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def suG_(_Jov):\n KUEC = _Jov[0] * _Jov[1]\n L9IC = _Jov[0] * _Jov[2]\n WKkj = _Jov[0] * _Jov[3]\n Kt7F = _Jov[1] * _Jov[1]\n Bj_T = _Jov[1] * _Jov[2]\n aRJ9 = _Jov[1] * _Jov[3]\n mqaY = _Jov[2] * _Jov[2]\n Nswz = _Jov[2] * _Jov[3]\n bb80 = _Jov[3] * _Jov[3]\n DWJ0 = oyIN.zeros((3, 3)... | [
"0.625625",
"0.61586386",
"0.6103831",
"0.5944928",
"0.58292276",
"0.5763483",
"0.57279813",
"0.5696604",
"0.5662355",
"0.56512725",
"0.5570072",
"0.5568872",
"0.55359674",
"0.55227655",
"0.55147916",
"0.54981565",
"0.54951155",
"0.5437573",
"0.5435121",
"0.5415344",
"0.54141... | 0.577964 | 5 |
Returns the total from the inserted coins. | def of2f():
print('Please insert coins.')
rpdr = dict(quarters=int(input('How many quarters?:')) * 0.25, dime=int(input('How many dimes?: ')) * 0.1, nickles=int(input('How many nickles?: ')) * 0.05, pennies=int(input('How many pennies?: ')) * 0.01)
return round(sum(rpdr.values()), 2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f03F(YKHO):\n print('Please insert coins.')\n for ee8p in YKHO.COIN_VALUES:\n YKHO.money_received += int(input(f'How many {ee8p}?: ')) * YKHO.COIN_VALUES[ee8p]\n return YKHO.money_received",
"def h4aS(YKHO):\n NR94 = 5\n wjRY = (1 + int(YKHO.tax)) * int(YKHO.qty) * NR94\n return wjRY... | [
"0.6778034",
"0.6634102",
"0.66010493",
"0.659427",
"0.6579422",
"0.6553819",
"0.6552106",
"0.65307105",
"0.65197414",
"0.6518301",
"0.64949673",
"0.64945525",
"0.6466936",
"0.6466936",
"0.64489615",
"0.6425284",
"0.64176804",
"0.6413573",
"0.63965064",
"0.6382907",
"0.636799... | 0.6002329 | 62 |
wall constructor taking coordinates of two diagonally opposed points of the wall we consider that the width is null | def FIMM(YKHO, W0Eb):
YKHO.coordinates = W0Eb | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PBOL(YKHO, H2v2, TVTK) -> None:\n for WKvO in range(0, TVTK):\n Rlo4(YKHO, WKvO, 0)\n Rlo4(YKHO, WKvO, H2v2 - 1)\n for LVAh in range(1, H2v2 - 1):\n Rlo4(YKHO, 0, LVAh)\n Rlo4(YKHO, TVTK - 1, LVAh)",
"def AxUM(YKHO):\n for WKvO in range(YKHO.width + 1):\n if not YK... | [
"0.72221106",
"0.68333375",
"0.6824171",
"0.68057823",
"0.6713546",
"0.66135395",
"0.661195",
"0.6610027",
"0.6578747",
"0.64780056",
"0.6410548",
"0.6404219",
"0.63855517",
"0.6350937",
"0.634037",
"0.6237284",
"0.6136797",
"0.60747224",
"0.606391",
"0.60148156",
"0.5952303"... | 0.0 | -1 |
Extracts the starting age from the spoiler logs dicts. | def X6oN(dWY0):
return [0 if RKD7['randomized_settings']['starting_age'] == 'child' else 1 for RKD7 in dWY0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ghPC(dWY0, PWKZ):\n TDJt = [[RKD7['entrances']['Child Spawn -> KF Links House'], RKD7['entrances']['Adult Spawn -> Temple of Time']] for RKD7 in dWY0]\n return [[CAzz['region'] if isinstance(CAzz, dict) else CAzz for CAzz in WKvO] for WKvO in TDJt]",
"def pqwE():\n\n def N_N1(azSe):\n return ... | [
"0.56041646",
"0.5446686",
"0.54392344",
"0.53755945",
"0.5363894",
"0.534055",
"0.5318432",
"0.52772635",
"0.5261191",
"0.5216402",
"0.5192486",
"0.51863116",
"0.5176638",
"0.51354337",
"0.5112253",
"0.5093963",
"0.50713646",
"0.50247675",
"0.5003254",
"0.49770254",
"0.49599... | 0.74757224 | 0 |
Given num_people in circle, kill [kill_every]th person, return survivor. | def Jxq1(yEQi, tY7a):
Br4M = [1 for a70H in Ni9Y(yEQi)]
_zbW = 0
dQgj = -1
while _zbW < yEQi - 1:
for bGrB in Ni9Y(tY7a):
dQgj += 1
while Br4M[dQgj % yEQi] == 0:
dQgj += 1
Br4M[dQgj % yEQi] = 0
_zbW += 1
return Br4M.index(1) + 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YK91(YKHO):\n vexM = 5\n Xrqs = []\n for YRbF in range(YKHO._population_size):\n Wc9F = []\n for r845 in range(vexM):\n Mkmy = tuKI.randint(0, (YKHO._child2population_ratio + 1) * YKHO._population_size - 1)\n if Mkmy < YKHO._population_size:\n Wc9F.ap... | [
"0.5692708",
"0.5506005",
"0.5275919",
"0.5144234",
"0.51234853",
"0.5113955",
"0.50657177",
"0.50389415",
"0.50237817",
"0.5021013",
"0.49488246",
"0.4881141",
"0.4862901",
"0.48557314",
"0.48286477",
"0.4793314",
"0.47832945",
"0.47830445",
"0.47760513",
"0.47736254",
"0.47... | 0.81542957 | 0 |
Calculate the mean intracluster distance for sample i. | def fuOl(WCPv, Crrw, YRbF):
ZHfW = Crrw == Crrw[YRbF]
ZHfW[YRbF] = False
if not oyIN.any(ZHfW):
return 0
jzdc = oyIN.mean(WCPv[ZHfW])
return jzdc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def muOl(YKHO, YRbF, r845):\n MCOv = 0.0\n for QJlQ in YKHO.__indexclusters[YRbF]:\n for Y5bB in YKHO.__indexclusters[r845]:\n tm9g = YKHO.__sample_simi(QJlQ, Y5bB)\n MCOv += tm9g\n return MCOv / (len(YKHO.__indexclusters[YRbF]) * len(YKHO.__indexclusters[r845]))",
"def gMWh... | [
"0.62086725",
"0.6169589",
"0.61312467",
"0.60572255",
"0.5976423",
"0.59217167",
"0.5884832",
"0.5834737",
"0.5797622",
"0.57780486",
"0.575429",
"0.5702418",
"0.57006186",
"0.5698821",
"0.5696123",
"0.5643952",
"0.5616608",
"0.5607622",
"0.5513053",
"0.5504014",
"0.55019957... | 0.62878674 | 0 |