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 |
|---|---|---|---|---|---|---|
return True if the current user has right to view this event | def uoJg(tvqc, CBIr):
if tvqc.privacy == QRWf.PRIVACY_PUBLIC:
return True
elif not CBIr.is_active:
return False
if tvqc.privacy == QRWf.PRIVACY_COMPANY:
if BKuk(CBIr):
return False
else:
if not BKuk(CBIr):
return True
mSIi = [WKvO[0] for WK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uoJg(YKHO, tvqc, QePW):\n return uoJg(tvqc, QePW.user)",
"def Pn7U(YKHO):\n return YKHO.user_has_access(DW23.get_current_user())",
"def Qh7G(YKHO, CBIr):\n return CBIr.has_perm('agenda.can_see')",
"def eTnD(YKHO, CBIr):\n return True",
"def KKMP(YKHO, CBIr):\n return True",
"def qHTF(Y... | [
"0.7915212",
"0.7818065",
"0.7703481",
"0.75753987",
"0.7568369",
"0.7486999",
"0.7486999",
"0.7486999",
"0.74635386",
"0.73556936",
"0.7343641",
"0.72791964",
"0.72654754",
"0.7238292",
"0.72046363",
"0.71644276",
"0.71246845",
"0.7109007",
"0.70908797",
"0.70885503",
"0.704... | 0.78389686 | 1 |
Prompt the user to enter their api key. | def jDuy(YKHO, *qIxc):
GD_A = MtmM().getObject('UserInterface')
leAC = 'WakaTime'
UXqs = ' Enter your WakaTime API Key: \n' + ' (https://wakatime.com/settings) '
WmM4 = YKHO._getApiKey()
l5Ny, raTX = LLCE.getText(GD_A, leAC, UXqs, vj3Z.Normal, WmM... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rJDA(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'api_key')",
"def rJDA(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'api_key')",
"def rJDA(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'api_key')",
"def rJDA(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'api_key')",
"def... | [
"0.7120944",
"0.7120944",
"0.7120944",
"0.7120944",
"0.6932976",
"0.68626016",
"0.68626016",
"0.6603749",
"0.65838504",
"0.65284735",
"0.6507273",
"0.6492358",
"0.64648634",
"0.64390355",
"0.63309836",
"0.6316187",
"0.63127744",
"0.62042844",
"0.6181693",
"0.6166776",
"0.6152... | 0.77280456 | 0 |
True if the string is safe to use as a filename | def ET8B(BWXx):
return BWXx == GARf(BWXx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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(njyT, Ux0P) is not None",
"def ET8B(nUeQ: Union[str, FileStorage]) -> bool:\n Ux0P = xbwC(nUeQ)\n OZRe = '|'.join(Rulv)\n njyT = f'[a-zA-Z0-9][a-zA-Z0-9... | [
"0.8067586",
"0.7748462",
"0.7342562",
"0.7242904",
"0.7170299",
"0.7157121",
"0.71241206",
"0.7072818",
"0.7001556",
"0.6972817",
"0.69697255",
"0.68990976",
"0.68700737",
"0.684477",
"0.6821284",
"0.67766917",
"0.6764531",
"0.6752482",
"0.672251",
"0.6707125",
"0.6705961",
... | 0.85510355 | 0 |
Load data from a JSON string | def pktP(YKHO, m6Me, cuiw=False):
nPrm = qQXR.loads(m6Me)
YKHO.from_dict(nPrm, session=cuiw) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uikv(YKHO, nP0Q: str):\n YKHO.data = qQXR.loads(nP0Q)",
"def lc9H(YKHO):\n YKHO.load_json_str(YKHO.get_json_str())",
"def lc9H(nMY2):\n return X1VS._load_json(nMY2)",
"def lc9H(zEKB):\n return qQXR.loads(zEKB)",
"def uYrM(YKHO, qBwD):\n try:\n nPrm = qQXR.loads(qBwD)\n except q... | [
"0.82914174",
"0.80282855",
"0.78992426",
"0.7808813",
"0.7692054",
"0.75382525",
"0.7322359",
"0.72367465",
"0.7226408",
"0.72021925",
"0.71726143",
"0.7160995",
"0.71252286",
"0.71111035",
"0.70970374",
"0.70613444",
"0.7029962",
"0.7026443",
"0.70237446",
"0.7000534",
"0.6... | 0.0 | -1 |
Find environment variables containing config data and return a dict of them | def uBRI():
_wWf = ['SQLALCHEMY_DATABASE_URI', 'SECRET_KEY']
dixj = {}
for H5ew in _wWf:
if H5ew in Hy7s.environ:
dixj[H5ew] = Hy7s.environ[H5ew]
return dixj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W4Gt():\n return {sEAN: Hy7s.environ[sEAN] for sEAN in NArs.ENV_DIRS if sEAN in Hy7s.environ}",
"def C4pr(YKHO):\n return dict(((ZfUD[0], ZfUD[1]) for ZfUD in [tTpl.split('=', 1) for tTpl in YKHO.env]))",
"def crI6(kvcN, tG07=True):\n wOGa = {}\n y0cW = '{0}_'.format(kvcN.upper())\n for H5ew... | [
"0.74902755",
"0.73133004",
"0.7204992",
"0.7140691",
"0.7140691",
"0.7140691",
"0.7140691",
"0.7130744",
"0.71007246",
"0.70807976",
"0.6958684",
"0.6953522",
"0.69449145",
"0.6886404",
"0.6864564",
"0.68270713",
"0.6826755",
"0.680241",
"0.67708033",
"0.6747287",
"0.6731064... | 0.8224719 | 0 |
Returns a Flask application object | def LUif(mWFP, pmON, sCKU=None, BHNg=True):
P4t4 = L2w0(mWFP, instance_relative_config=True)
P4t4.config.from_object('linkedlist.config')
P4t4.config.from_pyfile('config.py', silent=True)
P4t4.config.from_object(sCKU)
uh4A = uBRI()
for H5ew, BWXx in uh4A.iteritems():
P4t4.config[H5ew] = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def P4t4():\n P4t4 = LUif()\n return P4t4",
"def P4t4():\n return LUif()",
"def WTdB():\n global _app\n if wMcu is None:\n b7JE = tgzD().get('APP_ENTRYPOINT')\n if not b7JE:\n raise RuntimeError('APP_ENTRYPOINT missing from config')\n LCet, I0U6 = b7JE.split(':')\... | [
"0.842095",
"0.8246454",
"0.82030857",
"0.8168864",
"0.81045556",
"0.8066337",
"0.79880565",
"0.78597844",
"0.78327835",
"0.7810589",
"0.77686507",
"0.7738555",
"0.7729705",
"0.7726699",
"0.77229196",
"0.7715562",
"0.7682923",
"0.76532614",
"0.76347286",
"0.76232916",
"0.7598... | 0.0 | -1 |
Return a human readable representation of the model instance. | def zAg0(YKHO):
return '{}'.format(YKHO.name) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return super().__str__() + YKHO.model.__str__()",
"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.verbose_name.title()\n return f'{C3ST:s}: {YKHO.name:s}'",
"def zAg0(YKHO):\n return '%s%s... | [
"0.79865694",
"0.778825",
"0.778825",
"0.7578485",
"0.7573961",
"0.7508439",
"0.73869205",
"0.725669",
"0.725669",
"0.72521317",
"0.7250976",
"0.72447103",
"0.72447103",
"0.7238946",
"0.72377145",
"0.72135806",
"0.7196659",
"0.71778005",
"0.7177506",
"0.7173099",
"0.7172897",... | 0.0 | -1 |
Index function for homepage of the website | def d6pt():
i4vA = gvDn(QePW.form)
jz2v = Qr0p(QePW.form)
f6WR = Tb5o(QePW.form)
gACw = []
N5kS = []
if QePW.method == 'POST':
if i4vA.register.data or i4vA.update.data:
if i4vA.validate():
Wl8K(i4vA, N5kS, gACw)
else:
gACw.append(b... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C_QL():\n return TvZl('home/index.html', title='Bem vindo!')",
"def d6pt():\n fyvm = 'Home'\n return TvZl('index.html', page_title=fyvm)",
"def d6pt():\n return TvZl('index.html', title='Home')",
"def kZiy():\n return TvZl('index.html', title='Home Page', year=qcWV.now().year)",
"def C_Q... | [
"0.81353927",
"0.80929625",
"0.8064895",
"0.8062962",
"0.8013738",
"0.80034924",
"0.8002165",
"0.798977",
"0.79885477",
"0.79661703",
"0.7932537",
"0.7927669",
"0.7927669",
"0.7910875",
"0.7894913",
"0.7884207",
"0.7880908",
"0.7867198",
"0.7854982",
"0.78476435",
"0.7836588"... | 0.0 | -1 |
Sets the id of this BankAccount. | def id(YKHO, id):
YKHO._id = id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def psjw(YKHO, id):\n YKHO.id = int(id)",
"def Nz0Z(YKHO, Nz0Z):\n YKHO._account_bank_id = Nz0Z",
"def V_9M(YKHO, hbFX):\n YKHO.id_ = hbFX",
"def V_9M(YKHO, id):\n YKHO.__id = id",
"def sp9U(YKHO, sp9U):\n YKHO._bank_id = sp9U",
"def V_9M(YKHO, id):\n YKHO.data['id'] = id",
"def ekm0(... | [
"0.7284551",
"0.72422296",
"0.7194926",
"0.7166639",
"0.71349657",
"0.7039895",
"0.69491154",
"0.6903764",
"0.6802818",
"0.6707203",
"0.6687408",
"0.66853243",
"0.6681096",
"0.66660535",
"0.66660535",
"0.66660535",
"0.66660535",
"0.66660535",
"0.66660535",
"0.66660535",
"0.66... | 0.0 | -1 |
Sets the type of this BankAccount. | def type(YKHO, type):
YKHO._type = type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dhPZ(YKHO, dhPZ):\n YKHO._account_type = dhPZ",
"def dhPZ(YKHO, dhPZ):\n YKHO._account_type = dhPZ",
"def dhPZ(YKHO, dhPZ):\n YKHO._account_type = dhPZ",
"def dhPZ(YKHO, dhPZ):\n YKHO._account_type = dhPZ",
"def TG_K(YKHO, type):\n YKHO.type = type",
"def TG_K(YKHO, type):\n YKHO.ty... | [
"0.7822151",
"0.7822151",
"0.7822151",
"0.7822151",
"0.7269691",
"0.7269691",
"0.7228186",
"0.7053937",
"0.69883746",
"0.6925743",
"0.68565696",
"0.6764424",
"0.6677695",
"0.6586367",
"0.6586367",
"0.65282446",
"0.65282446",
"0.65282446",
"0.6505576",
"0.64929366",
"0.6355008... | 0.66197646 | 37 |
Sets the type_text of this BankAccount. | def tnnd(YKHO, tnnd):
YKHO._type_text = tnnd | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dhPZ(YKHO, dhPZ):\n YKHO._account_type = dhPZ",
"def dhPZ(YKHO, dhPZ):\n YKHO._account_type = dhPZ",
"def dhPZ(YKHO, dhPZ):\n YKHO._account_type = dhPZ",
"def dhPZ(YKHO, dhPZ):\n YKHO._account_type = dhPZ",
"def type(YKHO, type: str):\n YKHO._type = type",
"def TG_K(YKHO, type):\n Y... | [
"0.69994986",
"0.69994986",
"0.69994986",
"0.69994986",
"0.67338675",
"0.6733089",
"0.6733089",
"0.6598233",
"0.65434355",
"0.6420724",
"0.63547665",
"0.63243747",
"0.63243747",
"0.63243747",
"0.63243747",
"0.63243747",
"0.63243747",
"0.63243747",
"0.63243747",
"0.63243747",
... | 0.8325671 | 0 |
Sets the bank_id of this BankAccount. | def sp9U(YKHO, sp9U):
YKHO._bank_id = sp9U | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Nz0Z(YKHO, Nz0Z):\n YKHO._account_bank_id = Nz0Z",
"def rsqw(YKHO, rsqw):\n YKHO._bank_link_id = rsqw",
"def cg8H(YKHO, cg8H):\n if cg8H is None:\n raise ValueError('Invalid value for `bank_connection_id`, must not be `None`')\n YKHO._bank_connection_id = cg8H",
"def qwxf(YKHO, qwxf):\... | [
"0.85761595",
"0.76104563",
"0.7233686",
"0.69656855",
"0.6965274",
"0.6584222",
"0.64605635",
"0.61643994",
"0.61526424",
"0.61526424",
"0.61526424",
"0.61526424",
"0.61526424",
"0.61526424",
"0.5989961",
"0.59329146",
"0.5888447",
"0.58465505",
"0.58465505",
"0.5741217",
"0... | 0.87485594 | 0 |
Sets the bank_name of this BankAccount. | def pl8n(YKHO, pl8n):
YKHO._bank_name = pl8n | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y4_a(YKHO, gDpE: str):\n if YKHO.is_bank_name_valid(gDpE):\n YKHO.bank_name = gDpE\n else:\n raise ValueError('Bank name is not valid!')",
"def sp9U(YKHO, sp9U):\n YKHO._bank_id = sp9U",
"def Nz0Z(YKHO, Nz0Z):\n YKHO._account_bank_id = Nz0Z",
"def OnKS(YKHO, OnKS):\n YKHO._fu... | [
"0.7720608",
"0.69549406",
"0.68231165",
"0.6589278",
"0.6535265",
"0.6535265",
"0.6467967",
"0.62740004",
"0.6060285",
"0.59841347",
"0.5965224",
"0.59646434",
"0.59646434",
"0.59447044",
"0.59406394",
"0.59212345",
"0.59212345",
"0.59212345",
"0.59212345",
"0.59212345",
"0.... | 0.8693754 | 0 |
Sets the name of this BankAccount. | def mWFP(YKHO, mWFP):
YKHO._name = mWFP | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zPdd(YKHO, mWFP):\n YKHO.name = mWFP",
"def pl8n(YKHO, pl8n):\n YKHO._bank_name = pl8n",
"def WZrJ(YKHO, mWFP):\n YKHO._name = mWFP",
"def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP",
"def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP",
"def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP",
"def WZrJ(YKHO,... | [
"0.7643278",
"0.76228815",
"0.7620233",
"0.7609547",
"0.7609547",
"0.7609547",
"0.7609547",
"0.7609547",
"0.75583524",
"0.7482153",
"0.7482153",
"0.7475732",
"0.74252516",
"0.73911494",
"0.73911494",
"0.73849213",
"0.73849213",
"0.73787886",
"0.7317502",
"0.7301202",
"0.72500... | 0.0 | -1 |
Sets the currency_id of this BankAccount. | def qPCP(YKHO, qPCP):
YKHO._currency_id = qPCP | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SEoG(YKHO, SEoG):\n YKHO._card_currency = SEoG",
"def VIXL(YKHO, VIXL):\n YKHO._currency = VIXL",
"def VIXL(YKHO, VIXL):\n YKHO._currency = VIXL",
"def VIXL(YKHO, VIXL):\n YKHO._currency = VIXL",
"def VIXL(YKHO, VIXL):\n YKHO._currency = VIXL",
"def Nz0Z(YKHO, Nz0Z):\n YKHO._account... | [
"0.6789982",
"0.6657007",
"0.6657007",
"0.6657007",
"0.6657007",
"0.66185945",
"0.6618233",
"0.65618694",
"0.6548402",
"0.6548402",
"0.6548402",
"0.6548402",
"0.6548402",
"0.65144926",
"0.64059883",
"0.6260949",
"0.6260949",
"0.6260949",
"0.6260949",
"0.6260949",
"0.6260949",... | 0.8229745 | 1 |
Sets the currency_code of this BankAccount. | def uvmn(YKHO, uvmn):
YKHO._currency_code = uvmn | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y9p9(YKHO, Y9p9):\n YKHO._transaction_currency_code = Y9p9",
"def SEoG(YKHO, SEoG):\n YKHO._card_currency = SEoG",
"def edML(YKHO, edML):\n YKHO._bank_transaction_code = edML",
"def VIXL(YKHO, VIXL):\n YKHO._currency = VIXL",
"def VIXL(YKHO, VIXL):\n YKHO._currency = VIXL",
"def VIXL(Y... | [
"0.72288096",
"0.6596726",
"0.64978516",
"0.6352416",
"0.6352416",
"0.6352416",
"0.6352416",
"0.63117045",
"0.629458",
"0.61955637",
"0.6184762",
"0.6184762",
"0.6184762",
"0.6183992",
"0.60516715",
"0.60116154",
"0.59786963",
"0.59148085",
"0.5851118",
"0.5722165",
"0.561708... | 0.82565314 | 4 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, fExc):
return False
return YKHO.__dict__ == Elif.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748"
] | 0.0 | -1 |
Create a bullet object, at the ship's current position. | def FIMM(YKHO, gCuF, Vjhr, C7MP):
super().__init__()
YKHO.screen = Vjhr
YKHO.settings = gCuF
YKHO.ship = C7MP
YKHO.image = a9eO.image.load('Resources/UI/bullet1.png')
YKHO.rect = YKHO.image.get_rect()
YKHO.screen_rect = YKHO.screen.get_rect()
YKHO.init(C7MP)
YKHO.pos_x = float(YKHO.r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hy9P(tJm0, Vjhr, C7MP, WFC2):\n jbub = GBVa(tJm0, Vjhr, C7MP)\n WFC2.add(jbub)",
"def FIMM(YKHO, g_NO=0, Mqqi=yapS, emuu=WPli, poka=0, s7Kh=0, Pzn5=None):\n ahCL.__init__(YKHO, g_NO, Mqqi, xPos=poka, yPos=s7Kh)\n YKHO.creationTime = ITS7.time()\n YKHO.entityThatCreatedMe = Pzn5\n YKHO.bulle... | [
"0.73586845",
"0.7345611",
"0.72411704",
"0.72100544",
"0.71051365",
"0.70906675",
"0.70333636",
"0.7021773",
"0.69993305",
"0.6995749",
"0.6953252",
"0.68985444",
"0.6826661",
"0.6810716",
"0.68016636",
"0.68016636",
"0.6794188",
"0.67631125",
"0.6733617",
"0.67141086",
"0.6... | 0.6809471 | 14 |
Create a bullet object, at the ship's current position. | def FIMM(YKHO, gCuF, Vjhr, oeNL):
super().__init__()
YKHO.screen = Vjhr
YKHO.settings = gCuF
YKHO.image = a9eO.image.load('Resources/UI/bullet2.png')
YKHO.rect = YKHO.image.get_rect()
YKHO.rect.centerx, YKHO.rect.top = oeNL
YKHO.screen_rect = YKHO.screen.get_rect()
YKHO.pos_x = float(YKH... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hy9P(tJm0, Vjhr, C7MP, WFC2):\n jbub = GBVa(tJm0, Vjhr, C7MP)\n WFC2.add(jbub)",
"def FIMM(YKHO, g_NO=0, Mqqi=yapS, emuu=WPli, poka=0, s7Kh=0, Pzn5=None):\n ahCL.__init__(YKHO, g_NO, Mqqi, xPos=poka, yPos=s7Kh)\n YKHO.creationTime = ITS7.time()\n YKHO.entityThatCreatedMe = Pzn5\n YKHO.bulle... | [
"0.73590076",
"0.73439646",
"0.7240352",
"0.72086555",
"0.71039873",
"0.7090023",
"0.703365",
"0.7021064",
"0.6999259",
"0.6994923",
"0.6952836",
"0.6898781",
"0.68250096",
"0.6809888",
"0.68092275",
"0.6801225",
"0.6801225",
"0.6792556",
"0.6762551",
"0.673309",
"0.67130476"... | 0.6251366 | 33 |
Returns a queryset for all devices of this class that belong to the given user. | def Edd4(YKHO, CBIr, xUXW=None):
YfpN = YKHO.model.objects.filter(user=CBIr)
if xUXW is not None:
YfpN = YfpN.filter(confirmed=bool(xUXW))
return YfpN | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Yib7(YKHO, uJjO):\n if YKHO.database is None:\n raise Exception('No database.')\n if uJjO is None or len(uJjO) == 0:\n raise Exception('Bad parameter.')\n YfpN = YKHO.database.retrieve_user_devices(uJjO)\n if YfpN is not None:\n YfpN = list(set(YfpN))\n return YfpN",
"def ... | [
"0.7426704",
"0.70703536",
"0.6745388",
"0.6709743",
"0.6606088",
"0.64538157",
"0.6346481",
"0.6333398",
"0.6319248",
"0.62833875",
"0.6259093",
"0.6248734",
"0.61839086",
"0.61656326",
"0.6078591",
"0.60602796",
"0.605198",
"0.6048005",
"0.60383916",
"0.6034938",
"0.6034938... | 0.75948817 | 0 |
Generates a challenge value that the user will need to produce a token. This method is permitted to have side effects, such as transmitting information to the user through some other channel (email or SMS, perhaps). And, of course, some devices may need to commit the challenge to the database. | def ksg3(YKHO):
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ksg3(YKHO):\n tYvF = YKHO.totp_obj()\n eOtH = format(tYvF.token(), '06d')\n Ol8d = gCuF.OTP_TWILIO_TOKEN_TEMPLATE.format(token=eOtH)\n if gCuF.OTP_TWILIO_NO_DELIVERY:\n bo34.info(Ol8d)\n else:\n YKHO._deliver_token(Ol8d)\n yzq9 = gCuF.OTP_TWILIO_CHALLENGE_MESSAGE.format(token=eO... | [
"0.76210827",
"0.7384942",
"0.7228068",
"0.6863153",
"0.6795763",
"0.6706473",
"0.63787925",
"0.61515945",
"0.6132233",
"0.61092913",
"0.6060839",
"0.600915",
"0.6005161",
"0.5988815",
"0.59869313",
"0.5976093",
"0.5961075",
"0.59452605",
"0.5930759",
"0.5905588",
"0.5901082"... | 0.76744676 | 0 |
Returns 'cpu' or 'cuda' based on the device. | def VeaS(YKHO) -> str:
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def begE() -> str:\n import torch\n if torch.cuda.is_available() and torch.cuda.device_count() > 0:\n if hasattr(PSrQ().trainer, 'parallelized') and PSrQ().trainer.parallelized:\n begE = 'cuda'\n else:\n begE = 'cuda:' + str(tuKI.randint(0, torch.cuda.device_count() - 1))\... | [
"0.8067079",
"0.7917954",
"0.78129965",
"0.7779421",
"0.77591217",
"0.7382151",
"0.7312989",
"0.73088163",
"0.73088163",
"0.73088163",
"0.73088163",
"0.716866",
"0.71592695",
"0.71398836",
"0.71277714",
"0.7122792",
"0.7008257",
"0.6983328",
"0.6969115",
"0.69687873",
"0.6919... | 0.64525086 | 39 |
Compute the classifier accuracy trained on the outputs to predict the labels. A single output has a scalar format from the range <0,output_dim), A single label has a scalar format from the range <0,n_classes). | def DuRy(YKHO, o4Jx: torch.Tensor, Crrw: torch.Tensor, EDoJ: int) -> float:
YAq3 = BJw4(o4Jx, Crrw, n_classes=YKHO._num_classes, custom_input_length=EDoJ, log_loss=False, max_epochs=50)
return YAq3 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vjyh(o4Jx, Crrw):\n PjQx = o4Jx.argmax(dim=1)\n gXXc = (PjQx == Crrw).sum().item()\n return gXXc / Crrw.size(0)",
"def vjyh(o4Jx, Crrw):\n Crrw = Crrw.ravel()\n ZHfW = Crrw >= 0\n o4Jx = oyIN.argmax(o4Jx, axis=1)\n return oyIN.sum(o4Jx == Crrw) / float(oyIN.sum(ZHfW))",
"def vjyh(XWIy,... | [
"0.81931907",
"0.81465113",
"0.80907303",
"0.80473256",
"0.8045122",
"0.80298996",
"0.80298996",
"0.80142766",
"0.79513043",
"0.78830415",
"0.7639278",
"0.75438124",
"0.7520743",
"0.7491489",
"0.74834496",
"0.74675596",
"0.74417704",
"0.743137",
"0.7400949",
"0.73621196",
"0.... | 0.78595906 | 10 |
Correct Vcmax based on defined by PFTspecific upper and lower temperature params, see Clark et al. (mol CO2 m2 s1) | def QEZD(YKHO, XE1N, iuac):
mLGw = YKHO.Q10_func(XE1N, YKHO.Q10_Vcmax, iuac)
OCOs = (1.0 + epAf.exp(0.3 * (iuac - YKHO.Tupper))) * (1.0 + epAf.exp(0.3 * (YKHO.Tlower - iuac)))
return mLGw / OCOs | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ShRA(YKHO, GPIy, rOvQ):\n return rOvQ * YKHO.VCMAX0 * kLQb(YKHO.HAV / (A3Vt * YKHO.TO) * (1.0 - YKHO.TO / GPIy)) / (1.0 + kLQb((YKHO.SVC * GPIy - YKHO.HDV) / (A3Vt * GPIy)))",
"def mbTE(il4J, nveM, ITS7):\n if il4J.active == 1:\n il4J.vmax = nveM.vscale * il4J.SCL ** nveM.d",
"def HmvA(YKHO):\... | [
"0.72130996",
"0.6881328",
"0.6812122",
"0.67136365",
"0.63841337",
"0.6383194",
"0.62809044",
"0.62629044",
"0.6258925",
"0.6205267",
"0.6161748",
"0.61336195",
"0.61061066",
"0.60839695",
"0.6054992",
"0.6025407",
"0.5984552",
"0.59812474",
"0.59707934",
"0.59521735",
"0.59... | 0.6719963 | 3 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, VNwP):
return False
return YKHO.__dict__ == Elif.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748"
] | 0.0 | -1 |
Get a dictionary of singlequbit randomized benchmarking fidelities (for simultaneous gate operation across the chip, normalized to unity) from the specs, keyed by qubit index. | def NMwe(YKHO) -> cuzp[int, h8nf[float]]:
return {umWR.id: umWR.f1Q_simultaneous_RB for umWR in YKHO.qubits_specs} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EL8w(YKHO) -> cuzp[int, h8nf[float]]:\n return {umWR.id: umWR.T1 for umWR in YKHO.qubits_specs}",
"def rYLM(YKHO) -> cuzp[int, h8nf[float]]:\n return {umWR.id: umWR.f1QRB for umWR in YKHO.qubits_specs}",
"def CrCQ(YKHO):\n Mz_G = 100\n CI4F = scnU.measure_circuits_qobj_deterministic(allow_sampl... | [
"0.6405501",
"0.63267994",
"0.586585",
"0.5862669",
"0.5841792",
"0.5782346",
"0.5715171",
"0.5701122",
"0.5598223",
"0.5582311",
"0.5579969",
"0.5570852",
"0.5533324",
"0.550857",
"0.5499589",
"0.54724675",
"0.5440346",
"0.54012805",
"0.53740746",
"0.53307194",
"0.53010356",... | 0.6788763 | 0 |
Recreate the Specs from a dictionary representation. | def jG8h(Csk6: Dict[str, Any]) -> 'Specs':
return tXGZ(qubits_specs=sorted([VqF4(id=int(vexM), fRO=P2o0.get('fRO'), f1QRB=P2o0.get('f1QRB'), f1QRB_std_err=P2o0.get('f1QRB_std_err'), f1Q_simultaneous_RB=P2o0.get('f1Q_simultaneous_RB'), f1Q_simultaneous_RB_std_err=P2o0.get('f1Q_simultaneous_RB_std_err'), T1=P2o0.get(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jG8h(YKHO, WwuE):\n try:\n YKHO.label = WwuE['label']\n except KeyError:\n raise DQrD('All species must have a label')\n YKHO.run_time = qcWV.timedelta(seconds=WwuE['run_time']) if 'run_time' in WwuE else None\n YKHO.t1 = WwuE['t1'] if 't1' in WwuE else None\n YKHO.e_elect = WwuE['... | [
"0.61800086",
"0.583812",
"0.58163005",
"0.5778212",
"0.5772694",
"0.57669944",
"0.5706261",
"0.5648898",
"0.56048036",
"0.56007177",
"0.5517956",
"0.5506859",
"0.5460887",
"0.5444614",
"0.54336846",
"0.53778005",
"0.5370809",
"0.5347907",
"0.5347901",
"0.5345304",
"0.5343918... | 0.66261363 | 0 |
initializes the account balance to 0. | def FIMM(YKHO):
YKHO.account_balance = 0
YKHO.amount = 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, zXdC=0):\n YKHO.balance = zXdC",
"def FIMM(YKHO):\n YKHO.balance = 0",
"def FIMM(YKHO, VKNh):\n YKHO.balance = VKNh\n YKHO.fees = 0",
"def FIMM(YKHO, wMl7=0):\n YKHO.balance = wMl7",
"def FIMM(YKHO):\n YKHO.balance = D4St()\n YKHO.bet = 0",
"def bn31(YKHO, wMl7=0.0):\n... | [
"0.77155954",
"0.7682677",
"0.7551734",
"0.7323435",
"0.67907226",
"0.6743896",
"0.6743896",
"0.6726501",
"0.6647526",
"0.6644126",
"0.6605843",
"0.65363574",
"0.65005654",
"0.64424235",
"0.64424235",
"0.64424235",
"0.61881495",
"0.61835986",
"0.6150073",
"0.61258584",
"0.606... | 0.7928584 | 0 |
Return the next item from the container. | def UDAb(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a3Tc(YKHO):\n pass",
"def next(YKHO):\n NlZ_ = YKHO.readentry()\n if NlZ_ is None:\n raise StopIteration\n return NlZ_",
"def a3Tc(YKHO):\n return YKHO.ui.listItemList.model().get_next(YKHO.selected_item)",
"def OPHn(YKHO):\n return YKHO.next",
"def OPHn(YKHO):\n return YKHO... | [
"0.84444296",
"0.7455769",
"0.74323374",
"0.74011606",
"0.74011606",
"0.7369738",
"0.7368069",
"0.7347361",
"0.72823435",
"0.7258089",
"0.7254842",
"0.72465545",
"0.7240386",
"0.72401816",
"0.7239885",
"0.7205326",
"0.717315",
"0.7170962",
"0.71504486",
"0.714327",
"0.714327"... | 0.0 | -1 |
Initializes a Person object. | def FIMM(YKHO, mWFP, ZJe_):
YKHO.name = mWFP
YKHO.age = ZJe_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, mWFP):\n YKHO.name = mWFP",
"def wYQx(YKHO):\n a70H = nj3W(YKHO.initial_year, YKHO.name, YKHO.birth_date, retirement_date=YKHO.retirement_date)\n YKHO.assertEqual(a70H.name, YKHO.name)\n YKHO.assertEqual(a70H.birth_date, YKHO.birth_date)\n YKHO.assertEqual(a70H.retirement_date, YKHO... | [
"0.6878999",
"0.66809994",
"0.64028704",
"0.6365746",
"0.62811184",
"0.62777156",
"0.6240137",
"0.6240034",
"0.6209613",
"0.6209613",
"0.6209613",
"0.6209613",
"0.6209613",
"0.6209613",
"0.6209613",
"0.6209613",
"0.6198115",
"0.6167236",
"0.6134421",
"0.6131545",
"0.61032367"... | 0.57260823 | 45 |
Returns True or False, depending on whether the root user for this instance has been enabled. | def mPwf(YKHO):
j8eK = '/instances/%s/root' % YKHO.id
_hkX, TBsA = YKHO.manager.api.method_get(j8eK)
return TBsA['rootEnabled'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mNSd(YKHO, KAOR):\n return KAOR.enable_root_user()",
"def vgnu():\n return bool(JALd.IsUserAnAdmin())",
"def o3y5():\n return Hy7s.geteuid() == 0",
"def ZncZ(YKHO) -> h8nf[qe4Y.Input[bool]]:\n return qe4Y.get(YKHO, 'has_root_access')",
"def PJLv():\n return True if Hy7s.getuid() == 0 els... | [
"0.8131893",
"0.8048091",
"0.78824264",
"0.78400505",
"0.77383095",
"0.7678279",
"0.726169",
"0.71904343",
"0.71799356",
"0.7128314",
"0.70309466",
"0.7027943",
"0.69647485",
"0.69645506",
"0.6933054",
"0.68817663",
"0.68744314",
"0.68074656",
"0.6785048",
"0.6769912",
"0.674... | 0.75799143 | 6 |
Changes the size of the volume for this instance. | def IPlf(YKHO, zNig):
jeDP = YKHO.volume.size
if zNig <= jeDP:
raise BQDi.InvalidVolumeResize("The new volume size must be larger than the current volume size of '%s'." % jeDP)
TBsA = {'volume': {'size': zNig}}
YKHO.manager.action(YKHO, 'resize', body=TBsA) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Einh(YKHO, zNig):\n YKHO.instance.resize_volume(zNig)\n YKHO.size = zNig",
"def JCeF(YKHO, akib, XqwL):\n Fzfk = YKHO._get_spdk_volume_name(akib.name)\n NArs = {'name': Fzfk, 'size': XqwL * rYO3.Gi}\n YKHO._rpc_call('bdev_lvol_resize', NArs)",
"def WiYd(YKHO, zNig):\n if zNig is not None ... | [
"0.8288842",
"0.7152017",
"0.7039675",
"0.7015468",
"0.68967843",
"0.6839727",
"0.6839727",
"0.6839727",
"0.6839727",
"0.6727076",
"0.6654916",
"0.664991",
"0.66362894",
"0.6555233",
"0.65343976",
"0.64699996",
"0.64603525",
"0.6446079",
"0.6431379",
"0.6431214",
"0.6424814",... | 0.7768492 | 1 |
Finds the user in the given instance with the specified name, and returns a CloudDatabaseUser object. If no match is found, a NoSuchUser exception is raised. | def TKWP(YKHO, KAOR, mWFP):
return KAOR.get_user(mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BlJI(YKHO, Gjbv, KAOR, aBzZ=True):\n KAOR = YKHO._get_resource(_1IC.Instance, KAOR)\n return YKHO._find(yHA2.User, Gjbv, instance_id=KAOR.id, ignore_missing=aBzZ)",
"def TKWP(YKHO, mWFP):\n try:\n return YKHO._user_manager.get(mWFP)\n except BQDi.NotFound:\n raise BQDi.NoSuchDatabas... | [
"0.79625195",
"0.76373035",
"0.7330081",
"0.72199327",
"0.696431",
"0.68186736",
"0.6743377",
"0.6677676",
"0.66285974",
"0.65689415",
"0.65581423",
"0.65291554",
"0.6513396",
"0.65023434",
"0.6423479",
"0.6390939",
"0.6358115",
"0.6344449",
"0.63274324",
"0.63066614",
"0.629... | 0.73112166 | 3 |
Export Pytorch model to ONNX model and verify the outputs are same between Pytorch and ONNX. | def p_ob(C3ST, GhuM, bwrw=11, nUHY=False, UXEK='tmp.onnx', qutR=False):
C3ST.cpu().eval()
if isinstance(C3ST.decode_head, U78l.ModuleList):
jTqs = C3ST.decode_head[-1].num_classes
else:
jTqs = C3ST.decode_head.num_classes
K0I9 = JLLY(GhuM, jTqs)
xkjI = K0I9.pop('imgs')
Scjb = K0I... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s3Di(YKHO):\n GiAJ = T4BZ()\n CrBO = ht2j.empty(10, 10)\n with xDSY.BytesIO() as eHNT:\n eiuE._export_pytorch_model(eHNT, GiAJ, CrBO)",
"def ArqV(YKHO):\n GiAJ = T4BZ()\n CrBO = ht2j.empty(10, 10)\n with xDSY.BytesIO() as eHNT:\n eHNT = eiuE._export_pytorch_model(eHNT, GiAJ, C... | [
"0.8001319",
"0.73981786",
"0.708819",
"0.68216825",
"0.6707142",
"0.66436833",
"0.65463984",
"0.6543401",
"0.64953166",
"0.63451",
"0.62029266",
"0.61725897",
"0.6159554",
"0.6062806",
"0.6057905",
"0.6022507",
"0.6010744",
"0.5993026",
"0.5977195",
"0.59687734",
"0.59529",
... | 0.69549173 | 3 |
Determine if the input value is numeric an int, float, decimal.Decimal, or a string such as '1', '1.23', etc. | def ye72(KCHu: Any) -> bool:
try:
int(KCHu)
return True
except ValueError:
pass
try:
float(KCHu)
return True
except ValueError:
pass
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dece(BWXx):\n return isinstance(BWXx, int) or isinstance(BWXx, float)",
"def wGQU(wEf2):\n if wEf2 == None:\n return False\n if isinstance(wEf2, (float, int, Swre)):\n return True\n if isinstance(wEf2, (str, QMSQ)):\n try:\n exwG = float(wEf2)\n if not i... | [
"0.8177763",
"0.7902721",
"0.78973424",
"0.78730375",
"0.775293",
"0.7660114",
"0.76314026",
"0.75975525",
"0.7587173",
"0.7545988",
"0.7531515",
"0.7501617",
"0.7480066",
"0.747651",
"0.74657536",
"0.74657536",
"0.74657536",
"0.7454203",
"0.74465585",
"0.74388295",
"0.743373... | 0.781281 | 4 |
Determine if the input string appears to represent a fraction. This does not include mixed numbers such as 1 1/3 | def O_Y2(KCHu: Any) -> bool:
return bool(ZbWC.match('^-?\\d+/\\d+$', KCHu)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oXaw(fktj, uAiz=False):\n if uAiz == False:\n g9G7 = lambda pKvt: float(kteF(pKvt))\n elif uAiz == True:\n g9G7 = kteF\n try:\n return g9G7(fktj)\n except ValueError:\n if fktj == '':\n return g9G7('0/1')\n elif fktj == '?':\n return oyIN.nan... | [
"0.7073657",
"0.66727126",
"0.65205353",
"0.6499013",
"0.647601",
"0.6416415",
"0.63426524",
"0.6293448",
"0.625244",
"0.6211022",
"0.6205079",
"0.61960167",
"0.61827934",
"0.6156284",
"0.61013836",
"0.60888964",
"0.6086599",
"0.60792184",
"0.6057164",
"0.60564476",
"0.604926... | 0.86758184 | 0 |
Take a quantity string and return a decimal. Handles one hundred, two hundred, three hundred twenty five, 1, 1 1/4, 1 and 1/4, 1.25, .25. Negative values should have the negative sign first, such as 1/4 or 1 1/4 | def nxVN(TOPy: str) -> ZjSO:
TOPy = TOPy.strip()
TOPy = ZbWC.sub('\\b(\\d+)\\s+/\\s+(\\d+)\\b', '\\1/\\2', TOPy)
if ye72(TOPy):
return ZjSO(TOPy)
if O_Y2(TOPy):
return zwmh(TOPy)
cLVD = -1 if TOPy.startswith('-') else 1
TOPy = TOPy.replace('-', ' ')
SQ3m = TOPy.split()
N2... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WG2R(vIwR):\n if vIwR.lower() in ['ev', 'even', '100', '+100']:\n return 1.0\n elif ZbWC.match('[+-][0-9]+?', vIwR):\n zFiD = float(vIwR[1:])\n if vIwR[0] == '+':\n return zFiD / 100.0\n else:\n return 100.0 / zFiD\n elif ZbWC.match('[0-9]+?', vIwR):\n... | [
"0.68759644",
"0.6698485",
"0.6554765",
"0.6272967",
"0.62640774",
"0.6253111",
"0.6222533",
"0.621012",
"0.62048554",
"0.61253256",
"0.6037588",
"0.60268945",
"0.60208285",
"0.5994501",
"0.5990835",
"0.59812343",
"0.5978315",
"0.5955434",
"0.5931994",
"0.59006685",
"0.587125... | 0.765134 | 0 |
Convert strings such as '1/4' to a Decimal | def zwmh(wA3x: str) -> ZjSO:
SQ3m = wA3x.split('/')
M6pt = int(SQ3m[0])
UUZ1 = int(SQ3m[1])
return ZjSO(M6pt / UUZ1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a8Pe(lLQL):\n try:\n return float(lLQL)\n except ValueError:\n mLGw, ciZM = lLQL.split('/')\n return float(mLGw) / float(ciZM)",
"def oNf4(YKHO, str):\n if str.count('.') == 0:\n return int(str)\n if str.count('.') == 1:\n return float(str)\n return str",
"... | [
"0.6712094",
"0.65168357",
"0.6514631",
"0.6488972",
"0.6453594",
"0.6352461",
"0.6313063",
"0.6297261",
"0.62813073",
"0.62050706",
"0.6168849",
"0.61630976",
"0.6130576",
"0.61172074",
"0.60611856",
"0.6048418",
"0.6031567",
"0.602669",
"0.60096455",
"0.6000484",
"0.5992137... | 0.71383834 | 0 |
checks whether this Employee object and the supplied other are identical | def aPi6(YKHO, Elif):
return YKHO.employee_id == Elif.employee_id and YKHO.gender == Elif.gender and (YKHO.sales == Elif.sales) and (YKHO.bmi == Elif.bmi) and (YKHO.salary == Elif.salary) and (YKHO.birthday == Elif.birthday) and (YKHO.age == Elif.age) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif) -> bool:\n return YKHO.Firstname == Elif.Firstname and YKHO.LastName == Elif.LastName",
"def xa14(YKHO, Elif):\n return YKHO.last_name == Elif.last_name and YKHO.first_name == Elif.first_name",
"def xa14(YKHO, Elif) -> bool:\n return type(YKHO) == type(Elif) and YKHO._id == Elif.i... | [
"0.75566244",
"0.7387581",
"0.72227025",
"0.71725994",
"0.71301",
"0.71117663",
"0.71117663",
"0.71117663",
"0.70770377",
"0.7076466",
"0.7073752",
"0.7070425",
"0.70691836",
"0.7068052",
"0.702942",
"0.7027328",
"0.7017299",
"0.7017299",
"0.7016588",
"0.70160574",
"0.6998108... | 0.74171084 | 1 |
(Restaurant, Restaurant) > bool Return whether this restaurant has the same name and price_range as other. >>> r1 = Restaurant('Dumplings R Us', '$$', ['Chinese', 'Japanese']) >>> r2 = Restaurant('Dumplings R Us', '$$', ['Chinese', 'Japanese']) >>> r3 = Restaurant('Deep Fried Everything', '$', ['Canadian']) >>> r1 == r... | def xa14(YKHO, Elif):
return YKHO.name == Elif.name and YKHO.price_range == Elif.price_range | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n if YKHO is Elif:\n return True\n if type(YKHO) == type(Elif):\n return YKHO._name == Elif._name and YKHO._calories == Elif._calories and (YKHO._carbohydrates == Elif._carbohydrates) and (YKHO._fat == Elif._fat) and (YKHO._proteins == Elif._proteins)",
"def xa14(YKHO, E... | [
"0.6902268",
"0.68999815",
"0.67332125",
"0.65908897",
"0.6482407",
"0.6423603",
"0.64177847",
"0.6410736",
"0.6371539",
"0.6337903",
"0.63209957",
"0.6319568",
"0.63061655",
"0.6294533",
"0.6286708",
"0.627964",
"0.6268629",
"0.6262128",
"0.6258317",
"0.62577486",
"0.6248587... | 0.75323975 | 0 |
Derivative of the demo univariate function. | def jQ3Z(YKHO, WKvO):
return 2 * epAf.exp(WKvO * 2) - epAf.exp(WKvO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eGBw(YKHO, WKvO, WbhW=None):\n return 2 * kLQb(-WKvO ** 2) / PZyS(mM0K)",
"def BHbO(YKHO, *qIxc):\n return nvSv.Adaptor3d_InterFunc_Derivative(YKHO, *qIxc)",
"def BXW4(JfyU: Callable[[ndarrray], ndarray], CK9p: ndarray, RA_F: float=0.001) -> gyIm:\n return (JfyU(CK9p + RA_F) - JfyU(CK9p - RA_F)) /... | [
"0.7154575",
"0.7047326",
"0.6904753",
"0.6830699",
"0.67763203",
"0.67484254",
"0.6674235",
"0.667172",
"0.6661976",
"0.6639033",
"0.6565484",
"0.6530874",
"0.65278894",
"0.65199006",
"0.65096354",
"0.6505534",
"0.6505534",
"0.64882743",
"0.6472193",
"0.645865",
"0.645865",
... | 0.0 | -1 |
Derivative of the first demo multivariate function with respect to second variable. | def PVkD(YKHO, EcVT):
return -2 * EcVT[1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BBQg(JfyU, WKvO, gGnb):\n jzdc = mNmR\n oK3k = JfyU(WKvO + 2 * jzdc, gGnb)\n Ntv0 = JfyU(WKvO + jzdc, gGnb)\n AOlJ = JfyU(WKvO, gGnb)\n return (oK3k - 2 * Ntv0 + AOlJ) / jzdc ** 2",
"def o_mM():\n WKvO, LVAh = (rGNu.Variable(), rGNu.Variable())\n eHNT = rGNu.exp(WKvO / LVAh)\n Np08 = ... | [
"0.6998013",
"0.6945655",
"0.6819102",
"0.67878294",
"0.6755553",
"0.67505074",
"0.65766984",
"0.65667206",
"0.6565861",
"0.6561191",
"0.65507364",
"0.65169543",
"0.65002924",
"0.6492773",
"0.6470775",
"0.6459247",
"0.6410779",
"0.6396152",
"0.6389956",
"0.6365788",
"0.636432... | 0.5759675 | 88 |
Derivative of the second demo multivariate function with respect to first variable. | def OqFb(YKHO, EcVT):
return 2 * EcVT[0] - 2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BBQg(JfyU, WKvO, gGnb):\n jzdc = mNmR\n oK3k = JfyU(WKvO + 2 * jzdc, gGnb)\n Ntv0 = JfyU(WKvO + jzdc, gGnb)\n AOlJ = JfyU(WKvO, gGnb)\n return (oK3k - 2 * Ntv0 + AOlJ) / jzdc ** 2",
"def o_mM():\n WKvO, LVAh = (rGNu.Variable(), rGNu.Variable())\n eHNT = rGNu.exp(WKvO / LVAh)\n Np08 = ... | [
"0.7090587",
"0.70327544",
"0.69019234",
"0.69009197",
"0.6882074",
"0.67597866",
"0.6719899",
"0.6595466",
"0.6590669",
"0.65454537",
"0.654265",
"0.6542233",
"0.6539736",
"0.65253234",
"0.6522854",
"0.64694166",
"0.64640486",
"0.64640486",
"0.64494026",
"0.64303935",
"0.640... | 0.0 | -1 |
Derivative of the second demo multivariate function with respect to second variable. | def thKP(YKHO, EcVT):
return 3 * EcVT[1] ** 2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BBQg(JfyU, WKvO, gGnb):\n jzdc = mNmR\n oK3k = JfyU(WKvO + 2 * jzdc, gGnb)\n Ntv0 = JfyU(WKvO + jzdc, gGnb)\n AOlJ = JfyU(WKvO, gGnb)\n return (oK3k - 2 * Ntv0 + AOlJ) / jzdc ** 2",
"def o_mM():\n WKvO, LVAh = (rGNu.Variable(), rGNu.Variable())\n eHNT = rGNu.exp(WKvO / LVAh)\n Np08 = ... | [
"0.7274507",
"0.7165489",
"0.7019225",
"0.6999153",
"0.69980603",
"0.6767395",
"0.6683145",
"0.6642778",
"0.66160053",
"0.6574214",
"0.6564908",
"0.6529273",
"0.6485721",
"0.64846903",
"0.6435201",
"0.64021164",
"0.6373839",
"0.633251",
"0.63178",
"0.63142693",
"0.63135934",
... | 0.6311451 | 21 |
Return a list of ``count``length slices from an integer iterable. | def SuPp(BHGE, UHFx):
XVAW = len(BHGE) - UHFx + 1
if UHFx == 0:
raise ValueError('Zero-length slices are not allowed.')
elif XVAW <= 0:
raise ValueError('Slice is longer than the string itself.')
else:
dy_H = []
for yKcO in range(XVAW):
Npeo = BHGE[yKcO:yKcO +... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SuPp(n9WX, UHFx):\n if UHFx > len(n9WX) or not UHFx:\n raise ValueError(\"Slice can't be smaller than input!\")\n return [map(int, list(n9WX[YRbF:YRbF + UHFx])) for YRbF in Ni9Y(len(n9WX) - UHFx + 1)]",
"def XLp3(dy_H, yKcO, u54L):\n return [int(KCHu) for KCHu in dy_H[yKcO:yKcO + u54L]]",
"... | [
"0.67554826",
"0.6530764",
"0.6426799",
"0.64160615",
"0.6366345",
"0.6290533",
"0.62764454",
"0.62764454",
"0.6210647",
"0.6190838",
"0.6190838",
"0.61892176",
"0.6128175",
"0.6124298",
"0.60630196",
"0.60578364",
"0.59810305",
"0.5885153",
"0.5731288",
"0.5730528",
"0.56893... | 0.6313807 | 5 |
Function for calculating the magnitude for the ``filter_name``. | def wjNy(YKHO, RFcK: Dict[str, Union[float, List[float]]], jIFO=None) -> AzJI[AzJI[float, None], AzJI[float, None]]:
if 'teff' in RFcK and isinstance(RFcK['teff'], list):
RFcK = YKHO.update_parameters(RFcK)
_owh = YKHO.get_spectrum(RFcK, 100.0)
if jIFO is None:
jIFO = NUue.SyntheticPhotometr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QEDN(YKHO, Ebru, Oz1B='AB'):\n if Oz1B not in ('AB', 'Vega'):\n raise ValueError('`system` must be one of `AB` or `Vega`')\n Dyub = YKHO.calculate_flux(Ebru)\n if Dyub > 0:\n YXbZ = -2.5 * PCK9(Dyub / Ebru.flux[Oz1B])\n if Oz1B == 'Vega':\n YXbZ += 0.026\n else:\n ... | [
"0.6284845",
"0.62217325",
"0.59489876",
"0.59429955",
"0.5883451",
"0.5868979",
"0.58666056",
"0.58340514",
"0.5829398",
"0.5826518",
"0.5817128",
"0.5798922",
"0.57729346",
"0.5761314",
"0.5750273",
"0.573597",
"0.57326967",
"0.57184833",
"0.56658536",
"0.5661677",
"0.56269... | 0.5895239 | 4 |
Function for calculating two colors in the range of 10010000 K. | def Fzmx(aoB2: np.ndarray, r1VO: float, omgM: Tuple[Tuple[str, str], Tuple[str, str]]) -> FlUN.ColorColorBox:
Q8jn = []
nugz = []
for ZfUD in aoB2:
RFcK = {'teff': ZfUD, 'radius': r1VO, 'distance': 10.0}
XLTB = amPB(filter_name=omgM[0][0])
gW21 = amPB(filter_name=omgM[0][1])
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AxsX(dg7v, iYf1):\n return sum(((jzdc - Fg_i) ** 2 for jzdc, Fg_i in zip(x49m(dg7v), x49m(iYf1))))",
"def GEoZ(VTC_, sMGd):\n YGeH = iwQW(VTC_[0], VTC_[1], VTC_[2])\n td96 = iwQW(sMGd[0], sMGd[1], sMGd[2])\n NuMo = nNkg(YGeH, t_Ao)\n QKSU = nNkg(td96, t_Ao)\n ppNV = VhHX(NuMo, QKSU)\n re... | [
"0.68192273",
"0.6789395",
"0.6767154",
"0.67273617",
"0.6499797",
"0.64398926",
"0.64366484",
"0.64298755",
"0.6428867",
"0.6424603",
"0.63442063",
"0.6324817",
"0.63237154",
"0.63202584",
"0.6312862",
"0.6297631",
"0.6290631",
"0.6280015",
"0.6273409",
"0.62622875",
"0.6252... | 0.0 | -1 |
Align and crop a face image by landmarks | def ko8O(VXjJ, CWXo, RIMP, HLKd=572, A8wp=0.45, LvDN='similarity', T4Wy=3, Tuqy='edge'):
GoGv = {0: XC5k.INTER_NEAREST, 1: XC5k.INTER_LINEAR, 2: XC5k.INTER_AREA, 3: XC5k.INTER_CUBIC, 4: XC5k.INTER_LANCZOS4, 5: XC5k.INTER_LANCZOS4}
MX3a = {'constant': XC5k.BORDER_CONSTANT, 'edge': XC5k.BORDER_REPLICATE, 'symmetr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UgIY(Id76, W6KD, pV99, a6Jb=1024, EIef=1024, zwP4=True, K0JX=1, Y0cU=1, bo0o=0.1, Cwt5=False):\n CWnC = oyIN.array(pV99)\n rzH7 = CWnC[0:17]\n h6Ud = CWnC[17:22]\n c_2W = CWnC[22:27]\n aye2 = CWnC[27:31]\n Wmbf = CWnC[31:36]\n FZC5 = CWnC[36:42]\n nXFu = CWnC[42:48]\n rbMD = CWnC[48:... | [
"0.726591",
"0.7229944",
"0.71488667",
"0.66053444",
"0.65924925",
"0.65797514",
"0.64696044",
"0.6375372",
"0.63631606",
"0.63463944",
"0.63150406",
"0.62817866",
"0.6257367",
"0.62543607",
"0.62420964",
"0.6240839",
"0.61946523",
"0.61838573",
"0.61664724",
"0.616206",
"0.6... | 0.7401443 | 0 |
Parse conversion configuration from the provided YAML file. This function parses the conversion configuration contained in the YAML file provided as an argument. It ensures proper serialization of hls4ml objects and should be called on YAML files created by hls4ml. A minimal | def KHpd(Nu1S):
def dEU8(DWkG, Q6kx):
from tensorflow.keras.models import load_model
PRPb = DWkG.construct_scalar(Q6kx)
return load_model(PRPb)
eJb6.add_constructor('!keras_model', dEU8, Loader=eJb6.SafeLoader)
print('Loading configuration from', Nu1S)
with open(Nu1S) as nUeQ:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hfK9(YKHO, Nu1S):\n YKHO.options = eJb6.load(open(Nu1S))",
"def GcDA(YKHO):\n try:\n with open(YKHO.parsed_cfg_path, 'r') as cok8:\n YKHO.from_yaml_cfg_dict = eJb6.load(cok8)\n except Exception as exc:\n print(BQDi)\n wVCK.print_exc()\n YKHO.from_yaml_cfg_dict ... | [
"0.6276491",
"0.6112377",
"0.5986719",
"0.5902252",
"0.5884811",
"0.58618176",
"0.5813338",
"0.56595254",
"0.5630324",
"0.5594361",
"0.55579704",
"0.5538933",
"0.54916924",
"0.5481259",
"0.54735905",
"0.546859",
"0.5458762",
"0.5452728",
"0.5391796",
"0.53752816",
"0.53727406... | 0.5929939 | 3 |
Return the vector of partial derivatives \partial C_x / \partial a for the output activations. y is the actual win/loss. | def KX7l(YKHO, XH02, LVAh):
return XH02 - LVAh | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KX7l(YKHO, XH02, LVAh):\n return XH02 - LVAh",
"def KX7l(YKHO, XH02, LVAh):\n return XH02 - LVAh",
"def KX7l(YKHO, XH02, LVAh):\n return XH02 - LVAh",
"def KX7l(YKHO, XH02, LVAh):\n return XH02 - LVAh",
"def KX7l(YKHO, XH02, LVAh):\n return XH02 - LVAh",
"def KX7l(XH02, LVAh):\n ret... | [
"0.68356496",
"0.6744445",
"0.6744445",
"0.6744445",
"0.6744445",
"0.6668455",
"0.6634679",
"0.6509509",
"0.6384005",
"0.61824125",
"0.6129577",
"0.6041654",
"0.6014967",
"0.59947425",
"0.5987453",
"0.59800047",
"0.59151214",
"0.58971643",
"0.58891535",
"0.5853985",
"0.582582... | 0.6753196 | 1 |
Create an operation future from a gapic client. This interacts with the longrunning operations `service`_ (specific to a given API) via a gapic client. | def gBqY(oPhP, qGE0, HfXH, ZJMq=None, **B2fa):
uUrB = xBlr.partial(qGE0.get_operation, oPhP.name, metadata=ZJMq)
A0m2 = xBlr.partial(qGE0.cancel_operation, oPhP.name, metadata=ZJMq)
return WGrh(oPhP, uUrB, A0m2, HfXH, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vuB2(YKHO) -> None:\n YKHO._client = rX6M.JobServiceClient(client_options=dict(api_endpoint=YKHO._region + UMy4))",
"def qGE0(YKHO) -> ubrK.OperationsAsyncClient:\n if YKHO._operations_client is None:\n YKHO._operations_client = ubrK.OperationsAsyncClient(YKHO.grpc_channel)\n return YKHO._ope... | [
"0.57153046",
"0.5562876",
"0.5562876",
"0.555662",
"0.55103457",
"0.534156",
"0.5295509",
"0.5292307",
"0.52681047",
"0.52581203",
"0.5254014",
"0.52445525",
"0.52170354",
"0.5177179",
"0.51706386",
"0.5121105",
"0.50933254",
"0.50844055",
"0.5078402",
"0.5067994",
"0.502592... | 0.69012654 | 0 |
load the yaml file to TaskGraph object Arguments | def gHST(Ux0P):
with open(Ux0P) as eHNT:
eJb6 = rtqJ.yaml.YAML(typ='safe')
eJb6.constructor.yaml_constructors[u'tag:yaml.org,2002:timestamp'] = eJb6.constructor.yaml_constructors[u'tag:yaml.org,2002:str']
YEnM = eJb6.load(eHNT)
a1PO = umkP(YEnM)
return a1PO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fzyU(YKHO, Ux0P):\n YKHO.G = jHsn.read_yaml(Ux0P)",
"def sbff(YKHO, qIxc):\n QQka = []\n for nUeQ in qIxc:\n with open(nUeQ, 'r') as wOb_:\n QQka.append(wOb_.read())\n HIk3 = ''\n for KCHu in QQka:\n HIk3 = HIk3 + '\\n' + KCHu\n YKHO.data = eJb6.load(HIk3)",
"asyn... | [
"0.6445745",
"0.62672144",
"0.61445665",
"0.61214024",
"0.60905254",
"0.59989923",
"0.58965605",
"0.5883612",
"0.58551216",
"0.5852209",
"0.5843519",
"0.58381903",
"0.5826303",
"0.5820304",
"0.57884884",
"0.5767811",
"0.57481486",
"0.56785256",
"0.5675653",
"0.56592107",
"0.5... | 0.6857499 | 0 |
In the constructor we instantiate two nn.Linear modules and assign them as member variables. | def FIMM(YKHO, RDhP, KWJ4, ykHV, A7LZ):
super(ALyT, YKHO).__init__()
YKHO.model_ft = FYrf.alexnet(pretrained=True)
YKHO.num_ftrs = YKHO.model_ft.classifier[6].in_features
YKHO.feature_model = list(YKHO.model_ft.classifier.children())
YKHO.feature_model.pop()
YKHO.feature_model.pop()
YKHO.fea... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, *qIxc):\n super(byfJ, YKHO).__init__()\n YKHO.fc = U78l.Linear(*qIxc)",
"def FIMM(YKHO, Ce0Y, Q9YM, N93T=False):\n super(zSGR, YKHO).__init__()\n assert len(Q9YM) == len(Ce0Y) - 1\n G1Hx = len(Ce0Y)\n assert all([Ce0Y[r845][1] == Ce0Y[r845 + 1][0] for r845 in range(G1Hx - 1)])\n ... | [
"0.77401125",
"0.75483596",
"0.75074446",
"0.74346",
"0.7366003",
"0.7335429",
"0.73152226",
"0.7286699",
"0.7273464",
"0.72729063",
"0.72729063",
"0.7268201",
"0.72429734",
"0.72211164",
"0.72030157",
"0.7167753",
"0.7111596",
"0.7077496",
"0.7065618",
"0.7063983",
"0.705345... | 0.0 | -1 |
Decay learning rate by a factor of 0.1 every lr_decay_epoch epochs. | def eDsF(K0do, qtWj, DJmW, jnHZ):
tspZ = DJmW * 0.1 ** ((qtWj - 1) // jnHZ)
if (qtWj - 1) % jnHZ == 0:
print('LR is set to {}'.format(tspZ))
for Lwm5 in K0do.param_groups:
Lwm5['lr'] = tspZ
return K0do | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def biVQ(qtWj):\n tspZ = b0Ix\n if qtWj >= 60:\n tspZ *= 0.1\n print('Learning rate: ', tspZ)\n return tspZ",
"def biVQ(qtWj):\n oLNr = 0.1\n ReNU = 0.5\n Gn2V = 10.0\n fqnS = oLNr * epAf.pow(ReNU, epAf.floor((1 + qtWj) / Gn2V))\n return fqnS",
"def Qh2O(YPaw):\n return Cwt... | [
"0.8267355",
"0.817801",
"0.7811282",
"0.7761358",
"0.77191705",
"0.7691683",
"0.7691683",
"0.7604844",
"0.7585767",
"0.75532204",
"0.75233716",
"0.74977565",
"0.7488197",
"0.74663943",
"0.7409523",
"0.7392131",
"0.7390558",
"0.7389717",
"0.73854584",
"0.7382199",
"0.7374641"... | 0.0 | -1 |
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`. | def LwSz(Bcwd, KndY, NkkI=False, leAC='Confusion matrix', iMGt=QrM1.cm.Blues):
if NkkI:
Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]
print('Normalized confusion matrix')
else:
print('Confusion matrix')
print(Bcwd)
QrM1.imshow(Bcwd, interpolation='nearest', cmap... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LwSz(Bcwd, KndY=[0, 1], NkkI=False, leAC='Confusion matrix', RMso=False):\n if NkkI:\n Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]\n print('Normalized confusion matrix')\n else:\n print('Confusion matrix, without normalization')\n if RMso:\n print(Bcwd)"... | [
"0.8194862",
"0.80949175",
"0.8029915",
"0.8019153",
"0.79941195",
"0.7991258",
"0.7980955",
"0.7976606",
"0.79610753",
"0.79590565",
"0.79378676",
"0.7934962",
"0.7934504",
"0.79313844",
"0.7926313",
"0.7924577",
"0.79241234",
"0.7923211",
"0.7923023",
"0.7921931",
"0.791787... | 0.78745896 | 38 |
Returns the max depth (number of edge types) in the batch | def TGra(kjNI):
Fy0I = [oyIN.shape(eK5b[0]) for eK5b in kjNI if eK5b is not None]
return max([zsWa[-3] for zsWa in Fy0I], default=0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sX7H(YKHO):\n qi10 = 0\n for Q6kx, nPrm in YKHO.traverse():\n qi10 = max(qi10, nPrm['level'])\n return qi10",
"def I1to():\n nPrm = v_rS(True)\n return max([nPrm[0][YRbF][-1].flatten().item() for YRbF in range(len(nPrm))])",
"def rb7a(YKHO):\n return YKHO._max_depth",
"def tALi(Y... | [
"0.76936966",
"0.7605427",
"0.7585155",
"0.7497043",
"0.74924105",
"0.74078757",
"0.7355973",
"0.72077584",
"0.7180307",
"0.7129896",
"0.7109606",
"0.70448124",
"0.70025915",
"0.6977709",
"0.6965651",
"0.6960334",
"0.69345546",
"0.69150555",
"0.6885291",
"0.68641394",
"0.6822... | 0.67782664 | 24 |
Splits a sentence into a list of words. | def q2Lj(YKHO, yAmx):
return ZbWC.split(YKHO.word_split_pattern, yAmx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HPLn(Rhv4):\n return list(Rhv4.split(' '))",
"def bb19(yAmx: str) -> x1iM[str]:\n return list(map(wm2H, yAmx.split(' ')))",
"def BBQH(Rhv4):\n return list(Hs6x.chain(*[bGrB.split(' ') for bGrB in Rhv4]))",
"def BBQH(Rhv4):\n return list(Hs6x.chain(*[bGrB.split(' ') for bGrB in Rhv4]))",
"de... | [
"0.839093",
"0.8328795",
"0.8278341",
"0.8278341",
"0.8247464",
"0.7886386",
"0.7748876",
"0.7702795",
"0.7640652",
"0.7610905",
"0.76034474",
"0.7584799",
"0.74990726",
"0.7388187",
"0.7298104",
"0.7248387",
"0.72372454",
"0.72277707",
"0.7168449",
"0.7161924",
"0.71543217",... | 0.854961 | 0 |
Tries making a sentence of no more than `max_chars` characters and optionally no less than `min_chars` characters, passing kwargs to `self.make_sentence`. | def K_uP(YKHO, ai8o, __wk=0, **B2fa):
h5J3 = B2fa.get('tries', GGo8)
for bGrB in range(h5J3):
yAmx = YKHO.make_sentence(**B2fa)
if yAmx and __wk <= len(yAmx) <= ai8o:
return yAmx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R_Hu(YKHO, ai8o=50):\n if len(YKHO.text) > ai8o:\n return YKHO.text[:ai8o] + '...'\n else:\n return YKHO.text",
"def cgdD(bLqG=3, nyMv=1000):\n for yAmx in LQkd.gen_random_sentences():\n V22M = Wxwj.split(yAmx)\n V22M = filter(None, map(tW_k, V22M))\n yAmx = ' '.jo... | [
"0.6095302",
"0.5819537",
"0.56781554",
"0.5637372",
"0.56108356",
"0.5603103",
"0.5558823",
"0.5543857",
"0.54824555",
"0.5467604",
"0.54280376",
"0.5425181",
"0.54055136",
"0.5369214",
"0.53447944",
"0.53248703",
"0.5298687",
"0.5253001",
"0.52371365",
"0.52371365",
"0.5210... | 0.8437237 | 0 |
Init a Text class based on an existing chain JSON string or object If corpus is None, overlap checking won't work. | def PxU3(Emd4, xv_T, rrSk=None, oB2Y=None):
eNCK = BTTw.from_json(xv_T)
return Emd4(rrSk or None, parsed_sentences=oB2Y, state_size=eNCK.state_size, chain=eNCK) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, l5Ny: Union[str, Text, None]=None):\n if isinstance(l5Ny, str):\n l5Ny = RJW6().parse(l5Ny)\n if l5Ny is not None:\n YKHO.text = l5Ny",
"def FIMM(YKHO, FUjE='', _oIy='utf-8'):\n super(n3F4, YKHO).__init__(__txt=None, __rawtxt=FUjE, __scope=None, __SCOPEUPDATED=False)\n YK... | [
"0.69495267",
"0.60898894",
"0.6055206",
"0.604253",
"0.60330147",
"0.60256404",
"0.5980836",
"0.5953081",
"0.5942606",
"0.5942606",
"0.5863197",
"0.5858944",
"0.5816861",
"0.5816861",
"0.58047324",
"0.577506",
"0.5771009",
"0.5761173",
"0.5688844",
"0.5678",
"0.56764644",
... | 0.64903337 | 1 |
Reset this optimizer without losing the compiled loss and gradient functions. | def SiRx(YKHO, pWm4=None, FGw5=True, WK8G=None):
if pWm4 is not None:
YKHO._set_tn(pWm4)
if FGw5:
YKHO._reset_tracking_info(loss_target=WK8G) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SiRx():\n global optimizer_data\n global optimizer_len\n DgBG = []\n eSgx = 0\n return",
"def YP7j(YKHO):\n YKHO.optimizer.zero_grad()",
"def YP7j(YKHO):\n YKHO.g_optimizer.zero_grad()\n YKHO.d_optimizer.zero_grad()\n YKHO.dr_optimizer.zero_grad()",
"def SiRx(YKHO):\n YKHO.l... | [
"0.7746544",
"0.7668442",
"0.76402324",
"0.76092446",
"0.75474644",
"0.75459784",
"0.75459784",
"0.75459784",
"0.7540876",
"0.75120944",
"0.7140316",
"0.7094543",
"0.7090118",
"0.7073485",
"0.7056893",
"0.7013742",
"0.7009912",
"0.7005744",
"0.6985951",
"0.69115394",
"0.69082... | 0.0 | -1 |
The value of the loss function at vector ``x``. | def UvBb(YKHO, WKvO):
YKHO.vectorizer.vector[:] = WKvO
Sk_F = YKHO.vectorizer.unpack()
YKHO.loss = YKHO.handler.value(Sk_F).item()
YKHO.losses.append(YKHO.loss)
YKHO._n += 1
YKHO._maybe_update_pbar()
YKHO._check_loss_target()
YKHO._maybe_call_callback()
return YKHO.loss | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N77f(YKHO, WKvO):\n return YKHO._svi.evaluate_loss(*WKvO)",
"def N77f(YKHO, WKvO, LVAh):\n return WKvO",
"def N77f(YKHO, WKvO, KCHu):\n return sum(U7YL.abs(WKvO + KCHu[YKHO.w] - oyIN.log(YKHO.y)))",
"def Zmkp(YKHO, WKvO):\n return oyIN.dot(YKHO.w, WKvO)",
"def xBoL(YKHO, WKvO, UXqs):\n u... | [
"0.8424094",
"0.7410628",
"0.72768956",
"0.72642356",
"0.71729285",
"0.71583694",
"0.69923615",
"0.69820946",
"0.69820946",
"0.6934446",
"0.6931785",
"0.6860803",
"0.6849904",
"0.68063277",
"0.6734244",
"0.67270046",
"0.67184466",
"0.6687467",
"0.66776717",
"0.66444796",
"0.6... | 0.7342532 | 2 |
Converts a das data back into float format. | def k905(gXuE, Sjw2):
ZHfW = gXuE < 1
kpLf, JCoA = Sjw2
gXuE -= 1
gXuE = gXuE.astype(float) * JCoA / (65535 - 1)
gXuE += kpLf
return (gXuE, ZHfW) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oKpa(Csk6, mWFP):\n nPrm = list(Csk6[mWFP])\n while '' in nPrm:\n nPrm.remove('')\n return list(map(float, nPrm))",
"def jhGN(nPrm, **B2fa):\n return C1zu('ToFloat', arguments={'data': C1zu.of(nPrm)}, options={}, constraints=B2fa)",
"def Wglv(YKHO, mWFP):\n s7Be = YKHO._get_type(mWFP)... | [
"0.6600073",
"0.6448667",
"0.63835263",
"0.6343803",
"0.6319486",
"0.62636155",
"0.6189612",
"0.61531544",
"0.6141721",
"0.61352986",
"0.6130416",
"0.61013424",
"0.6058522",
"0.6038942",
"0.60367775",
"0.6000969",
"0.59840655",
"0.5979823",
"0.59585637",
"0.5956267",
"0.59328... | 0.0 | -1 |
Decays LR by 10 after 90, 180 and 270 epochs | def e_63(K0do: torch.optim.SGD, qtWj: int, qIxc: Namespace):
tspZ = qIxc.lr * 0.1 ** (qtWj // 90) * 0.1 ** (qtWj // 180) * 0.1 ** (qtWj // 270)
if qIxc.tensorboard:
Fqw2('learning_rate', tspZ, qtWj)
for Lwm5 in K0do.param_groups:
Lwm5['lr'] = tspZ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZT_s(qtWj):\n tspZ = 0.001\n if qtWj > 180:\n tspZ *= 0.0005\n elif qtWj > 160:\n tspZ *= 0.001\n elif qtWj > 120:\n tspZ *= 0.01\n elif qtWj > 80:\n tspZ *= 0.1\n print('Learning rate: ', tspZ)\n return tspZ",
"def ZT_s(qtWj):\n tspZ = 0.001\n if qtWj >... | [
"0.7870507",
"0.7816371",
"0.7816371",
"0.7816371",
"0.7816371",
"0.7736713",
"0.75606304",
"0.75248253",
"0.74722517",
"0.7454768",
"0.7450532",
"0.74315774",
"0.73081434",
"0.72106004",
"0.71888596",
"0.7175406",
"0.7078988",
"0.7072119",
"0.70515317",
"0.70453715",
"0.7044... | 0.0 | -1 |
Computes the precision for the specified values of k | def vjyh(hlel: torch.Tensor, pan_: torch.Tensor, hz5a: tuple=(1,)) -> list[ht2j.Tensor]:
Gq8e = max(hz5a)
Ep8u = pan_.size(0)
bGrB, nvEb = hlel.topk(Gq8e, 1, True, True)
nvEb = nvEb.t()
gXXc = nvEb.eq(pan_.view(1, -1).expand_as(nvEb))
Ylbp = []
for G1Hx in hz5a:
R2Dg = gXXc[:G1Hx].vi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhd_(_ger, nvEb, G1Hx):\n G1Hx = min(len(nvEb), G1Hx)\n OCOs = min(len(_ger), G1Hx)\n return sum([int(nvEb[YRbF] in _ger) for YRbF in range(G1Hx)]) / OCOs",
"def sEak(Mkmy, G1Hx):\n assert G1Hx >= 1\n Mkmy = oyIN.asarray(Mkmy)[:G1Hx] != 0\n if Mkmy.size != G1Hx:\n raise ValueError('R... | [
"0.76427615",
"0.74189496",
"0.7418079",
"0.72710466",
"0.72456723",
"0.72446615",
"0.7237539",
"0.72213703",
"0.7210107",
"0.7058935",
"0.6852219",
"0.6786084",
"0.67836976",
"0.6768417",
"0.67273885",
"0.67181736",
"0.67181736",
"0.67181736",
"0.67181736",
"0.67181736",
"0.... | 0.0 | -1 |
Returns the last action. | def QWAH(YKHO):
return YKHO.history[YKHO.position] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E7NO(YKHO):\n return YKHO.a_",
"def Xiid(YKHO):\n return YKHO.last_action",
"def dCEc(YKHO):\n return YKHO._action_list[-1]['repeat']",
"def AMEM(YKHO):\n return YKHO.current_action",
"def NjKL(YKHO):\n return YKHO.previous_action",
"def GNzx(YKHO):\n return YKHO._action_list[-1]['p... | [
"0.9066298",
"0.806668",
"0.79009575",
"0.76312876",
"0.74450755",
"0.74030536",
"0.73665595",
"0.7341361",
"0.723364",
"0.72315",
"0.7214738",
"0.7170566",
"0.7098485",
"0.70505255",
"0.70479053",
"0.69788265",
"0.69309396",
"0.69309396",
"0.69309396",
"0.69309396",
"0.69309... | 0.0 | -1 |
Returns the next action. | def mROQ(YKHO):
return YKHO.history[YKHO.position + 1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XeOP(YKHO):\n HUMG = YKHO.strategy.get_next_move(YKHO)\n return HUMG",
"def mq_y(YKHO):\n P6bq = YKHO.plan.pop(0)\n return P6bq",
"def mq_y(YKHO):\n eUNT = None\n while eUNT is None:\n Acvy = input('Action: ')\n eUNT = d5fj.get(Acvy)\n return eUNT",
"def bp5l(YKHO):\n ... | [
"0.81929576",
"0.81275356",
"0.7947645",
"0.7455102",
"0.720421",
"0.7128966",
"0.7006066",
"0.70024776",
"0.693337",
"0.6893309",
"0.68680626",
"0.6865206",
"0.6849412",
"0.68324244",
"0.67408854",
"0.66489077",
"0.6647903",
"0.6627994",
"0.65668654",
"0.6510381",
"0.6510381... | 0.0 | -1 |
like str.join but for lists, automatically chain list of lists | def D0oL(BWXx, DumB):
if not DumB:
return
WhY1 = iter(DumB)
RJ0C = False
while True:
try:
sdCG = next(WhY1)
except StopIteration:
break
if RJ0C:
yield BWXx
else:
RJ0C = True
if isinstance(sdCG, (list, tuple))... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JbwW(DumB: Iterable[str]) -> str:\n return lcpj.join(DumB)",
"def _rV6(yv6U, VWe_):\n tO9_ = ''\n for YRbF in yv6U:\n if isinstance(YRbF, tuple) or isinstance(YRbF, list):\n tO9_ += _rV6(YRbF, VWe_)\n else:\n tO9_ += YRbF + VWe_\n return tO9_",
"def irIg(DMbc... | [
"0.75198615",
"0.74211353",
"0.7389019",
"0.7297125",
"0.7196023",
"0.70937216",
"0.6973663",
"0.69703054",
"0.6932075",
"0.6922636",
"0.6877718",
"0.6778548",
"0.6766702",
"0.6741797",
"0.6733835",
"0.65953445",
"0.6549627",
"0.6549627",
"0.6549627",
"0.6549627",
"0.65237683... | 0.0 | -1 |
Returns the sum of the numbers from 0 to n (inclusive). If n is negative, returns None. | def wjRY(exwG):
if exwG < 0:
return None
else:
Aofo = 0
for YRbF in range(exwG + 1):
Aofo += YRbF
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sum(exwG):\n if exwG == 0:\n return 0\n return sum(exwG - 1) + exwG",
"def SdCg(exwG):\n if exwG > 0:\n return sum(range(exwG + 1))\n else:\n return 0",
"def LXk7():\n try:\n UnuI = int(input('Enter value for n: '))\n except:\n return None\n iDAL = 0\... | [
"0.7728651",
"0.7549618",
"0.7298949",
"0.7172998",
"0.7162448",
"0.70967263",
"0.7032798",
"0.6990254",
"0.69229853",
"0.6916972",
"0.6859973",
"0.6836657",
"0.6827941",
"0.68139833",
"0.672767",
"0.6696201",
"0.6694914",
"0.6536323",
"0.65196896",
"0.64874995",
"0.64776725"... | 0.78280175 | 1 |
Returns whether two numbers are prime relative to one another, meaning if the only common factor is "1" between the two numbers, function returns True | def uRrA(exwG, r8hN):
Aofo = True
wfQS = exwG
if r8hN > exwG:
wfQS = r8hN
for YRbF in range(1, wfQS + 1):
if exwG % YRbF == 0 and r8hN % YRbF == 0:
if YRbF == 1:
Aofo = True
else:
Aofo = False
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VJHp(jzdc, Fg_i):\n if ML2l(jzdc, Fg_i) == 1:\n return True\n else:\n return False",
"def Q3Pm(jzdc, Fg_i):\n return ML2l(jzdc, Fg_i) == 1",
"def VJHp(jzdc, Fg_i):\n if jzdc % Fg_i == 1:\n return True\n elif jzdc % Fg_i == 0:\n return False\n else:\n Mkm... | [
"0.8176672",
"0.75883496",
"0.75319326",
"0.7505304",
"0.72947055",
"0.7263977",
"0.70985687",
"0.70903563",
"0.70804167",
"0.7052747",
"0.6971458",
"0.6967196",
"0.69444907",
"0.6923393",
"0.6917334",
"0.69152874",
"0.6906821",
"0.6893945",
"0.68924296",
"0.6882768",
"0.6873... | 0.6867407 | 22 |
Returns the digit that most commonly occur in given integer | def qdx3(exwG):
ycBG = dict()
Aofo = 0
Ap2X = 0
exwG = abs(exwG)
while exwG != 0:
wEf2 = exwG % 10
if wEf2 in ycBG:
ycBG[wEf2] += 1
else:
ycBG[wEf2] = 1
exwG = exwG // 10
for G1Hx, Ty9i in ycBG.items():
if Ty9i >= Ap2X:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YKwG(exwG):\n uOe2 = g760.defaultdict(int)\n CjUr = 0\n for YRbF in range(1, exwG + 1):\n mLGw = YRbF\n UHFx = 0\n while mLGw >= 10:\n UHFx += mLGw % 10\n mLGw //= 10\n UHFx += mLGw\n uOe2[UHFx] += 1\n CjUr = max(CjUr, uOe2[UHFx])\n re... | [
"0.6303546",
"0.62543774",
"0.6246602",
"0.6242716",
"0.62082636",
"0.6179915",
"0.61003655",
"0.60774714",
"0.6059381",
"0.60159713",
"0.60123885",
"0.5958193",
"0.58911604",
"0.585496",
"0.58540314",
"0.5805185",
"0.574943",
"0.574943",
"0.57484955",
"0.5734084",
"0.5726823... | 0.7287928 | 0 |
generate random msg with varible lenght | def uAxD() -> str:
w7kn = tuKI.randint(8, 20)
YRbF = 0
KCHu = ''
for exwG in range(w7kn):
if YRbF == w7kn:
break
jVxi = tuKI.randint(0, len(vIwR.ascii_lowercase) - 1)
KCHu += vIwR.ascii_lowercase[jVxi]
YRbF += 1
return KCHu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sGEl(YKHO):\n return Hy7s.urandom(YKHO.messageSize)",
"def B5fA(zNig=32, SRYB=0):\n if SRYB:\n zNig = tuKI.randint(zNig - SRYB, zNig + SRYB)\n return ''.join((tuKI.choice(vIwR.ascii_uppercase) for bGrB in range(zNig)))",
"def KREW(zNig):\n return Hy7s.urandom(zNig)",
"def pIB0(u54L=Xbs... | [
"0.78360534",
"0.72770643",
"0.72565335",
"0.71919554",
"0.7153328",
"0.68699247",
"0.6868486",
"0.68300223",
"0.673388",
"0.6704045",
"0.67018807",
"0.6690742",
"0.6675773",
"0.66562545",
"0.6653962",
"0.6625286",
"0.6610047",
"0.65713227",
"0.65683055",
"0.65443546",
"0.654... | 0.7852546 | 0 |
Evaluate the model eagerly on the evaluation dataset. This method will compute the evaluation metrics specified in the configs on the entire evaluation dataset, then return the metrics. It will also log the metrics to TensorBoard. | def BP2r(rFEb, b32v, FUPx, ND3i=False, QFMZ=False, Aak1=None):
ynwe = b32v['train_config']
_A3K = b32v['eval_input_config']
xbdA = b32v['eval_config']
EU_4 = ynwe.add_regularization_loss
LT6S = False
rFEb._is_training = LT6S
ZylS.keras.backend.set_learning_phase(LT6S)
ein5 = vkFs.evaluat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b7La(YKHO) -> cuzp[str, float]:\n Ycl9 = YKHO.get_eval_dataloader()\n hlel = YKHO._prediction_loop(Ycl9, description='Evaluation')\n return hlel.metrics",
"def b7La(_Fei: DictConfig):\n evlW = _Fei.get('experiment_type', f'{_Fei.model.name}_only')\n uONT = _Fei.get('fixed_t0', False)\n YBcr... | [
"0.7102267",
"0.68620574",
"0.67821705",
"0.67241156",
"0.6696348",
"0.6691182",
"0.6674414",
"0.6674196",
"0.66276413",
"0.6590031",
"0.6588168",
"0.65827966",
"0.6565333",
"0.65477735",
"0.65286255",
"0.6503664",
"0.6494033",
"0.6454866",
"0.6452057",
"0.64466405",
"0.64462... | 0.637657 | 26 |
Deletes a reward with the given reward_id. | def PTpj(QePW, _6uB):
try:
_6uB = int(str(_6uB))
except ValueError:
raise uhgT
ZrNc = QePW.session['account']
VUF1 = _hSU.get_store(QePW.session)
vwlo = VUF1.get('rewards')
JuB7 = {vOGg['reward_id']: vOGg for vOGg in vwlo}
try:
vOGg = JuB7[_6uB]
except KeyError:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ML7I(YKHO, M5uv):\n return YKHO.get_json('/reward/%s' % str(M5uv))",
"def vOGg(YKHO, Gi6Q, vOGg):\n pass",
"def FzRH(QePW, Bs3P, Aujj=None):\n aBQM = Iofl(LAjp, pk=Bs3P)\n FtFz = aBQM.badge.name\n aBQM.delete()\n yEHD.success(QePW, 'Award was deleted successfully.', extra_tags='awards')\n... | [
"0.6410588",
"0.60932976",
"0.60260445",
"0.5929437",
"0.5707292",
"0.5610597",
"0.5568858",
"0.5547917",
"0.54966253",
"0.54309714",
"0.54212993",
"0.53692997",
"0.53522444",
"0.53504336",
"0.5343851",
"0.5297846",
"0.5279684",
"0.5270955",
"0.52592087",
"0.5185132",
"0.5181... | 0.75750613 | 0 |
Raise an exception if the specified file/s are not functional gifti. | def Gnft(*qIxc):
for IznC in qIxc:
assert IznC.endswith('.func.gii'), 'file must be a functional gifti (func.gii): {}'.format(IznC) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jPgb(*qIxc):\n for IznC in qIxc:\n assert IznC.endswith('.surf.gii'), 'file must be a surface gifti (surf.gii): {}'.format(IznC)",
"def yRS_(YKHO):\n YKHO.assertRaises(JPHO.checkFile('blah', 'write'))",
"def JOqV(Sd0C: str, _PM_: bool):\n if not _PM_:\n if Hy7s.path.exists(Sd0C):\n ... | [
"0.6637329",
"0.59407943",
"0.5931642",
"0.58725005",
"0.58255327",
"0.58191395",
"0.5772434",
"0.5720803",
"0.57036084",
"0.57036084",
"0.5702096",
"0.56842667",
"0.5665184",
"0.56519955",
"0.5636446",
"0.5629092",
"0.5616985",
"0.561177",
"0.56089705",
"0.56048226",
"0.5590... | 0.66287357 | 1 |
Return the index of the given letter in an alphabet list. | def tdR8(sZqf):
return ord(sZqf.lower()) - PeHq | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def etjM(sZqf):\n gZgb = 'abcdefghijklmnopqrstuvwxyz'\n yPrR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n if sZqf.isupper() == True:\n for WKvO in yPrR:\n if sZqf == WKvO:\n dQgj = yPrR.index(WKvO)\n return dQgj\n else:\n for WKvO in gZgb:\n if sZqf... | [
"0.78031665",
"0.77974206",
"0.76734906",
"0.7583449",
"0.7554691",
"0.7432476",
"0.7423165",
"0.7180686",
"0.7029244",
"0.6769329",
"0.6769329",
"0.6769329",
"0.6688472",
"0.6613892",
"0.6590025",
"0.658861",
"0.65874064",
"0.6517312",
"0.64405686",
"0.63059664",
"0.63059664... | 0.81031424 | 1 |
Print horizontal line in terminal. | def NHM9(u54L=None, o61b='='):
if u54L == None:
try:
bGrB, u54L = DRL6()
except:
u54L = 50
print(o61b * u54L) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m0DR():\n for YRbF in range(12):\n print('-', end='')\n print()",
"def oHYm():\n (print('+ - - - - + - - - - +'),)",
"def KZhR():\n print('-------------------------------------------------------------')",
"def SL_6(TVTK=72):\n print('-' * TVTK)",
"def oHYm(zFiD, ZUDr=False):\n ... | [
"0.7489932",
"0.74544644",
"0.68511426",
"0.67388237",
"0.6733194",
"0.66523504",
"0.66264534",
"0.6619123",
"0.6595182",
"0.6454544",
"0.64418423",
"0.64250535",
"0.63298273",
"0.6321937",
"0.628159",
"0.62410754",
"0.61680657",
"0.61606765",
"0.61603504",
"0.6138188",
"0.61... | 0.77199095 | 0 |
Find the cell in open set with the smallest f score. | def AeOG(sD4a, DM2A):
Q8ua = dict([jzdc for jzdc in DM2A.items() if jzdc[0] in sD4a])
return min(Q8ua, key=Q8ua.get) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def peR5(YKHO):\n return sorted(YKHO.open_cells, key=lambda VmPb: VmPb.f)[0]",
"def AjsF(YKHO):\n return min(YKHO._extract_set('score') or [0])",
"def k9Va(YKHO):\n uBsB = YKHO.C.max()\n Nq1b = YKHO.C + YKHO.row_cover[:, oyIN.newaxis] * uBsB\n Nq1b += YKHO.col_cover * uBsB\n return Nq1b.min()... | [
"0.7738727",
"0.67827576",
"0.6618954",
"0.65826356",
"0.6505747",
"0.64693487",
"0.64576846",
"0.64404434",
"0.6421414",
"0.6396712",
"0.6396712",
"0.63525033",
"0.63000214",
"0.6236328",
"0.61933583",
"0.6193137",
"0.6175177",
"0.61705387",
"0.6156253",
"0.6100206",
"0.6081... | 0.7625026 | 2 |
Convenience method that converts None entries of cuts list | def Ci27(BIfU):
SPgA = []
for o7uO in BIfU:
o7uO = list(o7uO)
if o7uO[1] == None:
o7uO[1] = float('-inf')
if o7uO[2] == None:
o7uO[2] = float('inf')
o7uO = tuple(o7uO)
SPgA.append(o7uO)
return SPgA | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f0eB(hkxX: Iterable) -> list:\n return [WKvO if WKvO is not None else T2Pq for WKvO in hkxX]",
"def nhjs(d7pR, lTIZ=None):\n if lTIZ is None:\n lTIZ = T2Pq\n if type(d7pR) is SnBA.ListType:\n return [YRbF for YRbF in d7pR if YRbF not in lTIZ]\n elif type(d7pR) is SnBA.TupleType:\n ... | [
"0.6128967",
"0.5996578",
"0.5767134",
"0.5713516",
"0.5708201",
"0.564221",
"0.5564271",
"0.55511147",
"0.5550933",
"0.5540367",
"0.55326724",
"0.5485154",
"0.53882974",
"0.53234714",
"0.53099906",
"0.52810603",
"0.52799094",
"0.5256074",
"0.5252276",
"0.5232365",
"0.5225693... | 0.67457974 | 0 |
Callback for finding task specific learning rate | def FIMM(YKHO, IF_C=1e-05, PsQ8=1, HasU=1, Z7gf=True):
super().__init__()
YKHO.min_lr = IF_C
YKHO.max_lr = PsQ8
YKHO.epochs = HasU
YKHO.use_plotly = Z7gf
YKHO.scheduler = None
YKHO.gamma = 0
YKHO.history = {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NkTt():\n return 1e-05",
"def nrOS(YKHO, qtWj):\n b0Ix = YKHO.schedule(qtWj)\n ZylS.summary.scalar('learning rate', data=b0Ix, step=qtWj)\n return b0Ix",
"def NkTt(y7GR, jvSB, P6Dd, ewCu, b0Ix):\n if jvSB > P6Dd:\n P6Dd = jvSB\n ewCu = 0\n elif ewCu > y7GR['delay']:\n ... | [
"0.6960934",
"0.6843069",
"0.67668796",
"0.663102",
"0.65240175",
"0.6493668",
"0.6484662",
"0.6461858",
"0.64162546",
"0.6374676",
"0.6357389",
"0.63514364",
"0.63490355",
"0.63194525",
"0.62696743",
"0.6234547",
"0.6220066",
"0.6220066",
"0.621396",
"0.6207748",
"0.6203574"... | 0.0 | -1 |
Test listing supplies authenticated as user | def U2Q_(YKHO):
QePW = YKHO.factory.get('/api/supplies')
rliA(QePW, user=YKHO.testuser1)
geh0 = PuNA.as_view()(QePW)
YKHO.assertEqual(geh0.status_code, jGRS.HTTP_200_OK) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def U6lG(YKHO):\n YKHO.client.force_authenticate(YKHO.user)\n geh0 = YKHO.client.get(YKHO.list_url)\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_200_OK)",
"def raf4(YKHO):\n bD7m = gxEw('post-list')\n YKHO.client.force_authenticate(user=YKHO.user)\n geh0 = YKHO.client.get(bD7m)\n YKHO.asse... | [
"0.8223138",
"0.8045665",
"0.783253",
"0.76140547",
"0.74250907",
"0.7412044",
"0.7402031",
"0.74005944",
"0.73971736",
"0.73767966",
"0.73697644",
"0.73501337",
"0.734557",
"0.7342337",
"0.7319705",
"0.7296174",
"0.7265814",
"0.72154063",
"0.7189685",
"0.7186148",
"0.7152279... | 0.7787935 | 3 |
Test listing supplies with no authentication | def ozM_(YKHO):
QePW = YKHO.factory.get('/api/supplies')
geh0 = PuNA.as_view()(QePW)
YKHO.assertEqual(geh0.status_code, jGRS.HTTP_401_UNAUTHORIZED) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QUG_(YKHO):\n geh0 = YKHO.client.get('/api/products/')\n aEqx = {'detail': 'Authentication credentials were not provided.'}\n YKHO.assertEqual(geh0.status_code, 401)\n YKHO.assertEqual(geh0.json(), aEqx)",
"def VpGB(YKHO):\n geh0 = YKHO.client.get(gxEw('user-list'))\n hGN5 = {'detail': 'Aut... | [
"0.78245306",
"0.77175856",
"0.7536064",
"0.73869556",
"0.73555213",
"0.73339677",
"0.73313177",
"0.7249594",
"0.71939224",
"0.7183721",
"0.71835554",
"0.71832544",
"0.7156579",
"0.71267843",
"0.7097886",
"0.7088167",
"0.7057511",
"0.70253474",
"0.70159745",
"0.70142674",
"0.... | 0.7507808 | 3 |
Create a 3D scatter plot. | def m7eQ(nPrm, Crrw, eKGI=None, gXgy=None):
LZpg = QrM1.figure(figsize=(25, 25))
aNZO = LZpg.add_subplot(111, projection='3d')
aNZO.set_proj_type('ortho')
aNZO.view_init(-22.5, -45)
aNZO.scatter(nPrm[:, 0], nPrm[:, 1], nPrm[:, 2], c=Crrw.map({0: 'green', 1: 'red'}), marker='o', linewidths=0.05, s=2)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iKRa(WKvO, LVAh, epBp, ogMi, NYLY, kyIY):\n LZpg = QrM1.figure()\n aNZO = LZpg.add_subplot(projection='3d')\n aNZO.scatter(WKvO, LVAh, epBp, marker='.')\n if ogMi:\n aNZO.set_xlabel(ogMi['x'])\n aNZO.set_ylabel(ogMi['y'])\n aNZO.set_zlabel(ogMi['z'])\n if kyIY:\n aNZO... | [
"0.7635949",
"0.7585923",
"0.7524859",
"0.7411168",
"0.7389905",
"0.73628044",
"0.73240596",
"0.7289997",
"0.7072961",
"0.69969016",
"0.69541806",
"0.6943289",
"0.693428",
"0.6905351",
"0.6853237",
"0.6839082",
"0.67875725",
"0.6765641",
"0.67195946",
"0.66599864",
"0.6656628... | 0.7004175 | 9 |
Plot a confusion matrix using skplot. | def YsYU(Y8eF, aMgO):
uN_p.plot_confusion_matrix(Y8eF, aMgO, normalize=True)
QrM1.show() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LwSz(YKHO):\n pTn1 = beib.from_learner(YKHO.learn)\n pTn1.plot_confusion_matrix()",
"def LwSz(mWFP, cpdv, Z5wO, H96n):\n LZpg, aNZO = QrM1.subplots()\n LZpg.tight_layout()\n Bcwd = YsYU(H96n, cpdv.predict(Z5wO), normalize='all')\n psLw(Bcwd, display_labels=['False', 'True']).plot(ax=aNZO)\n... | [
"0.75599146",
"0.73580045",
"0.7341262",
"0.70718974",
"0.70618755",
"0.7024849",
"0.7010704",
"0.6994628",
"0.6984062",
"0.6974565",
"0.6945511",
"0.6926418",
"0.69062096",
"0.6880006",
"0.68752444",
"0.68589",
"0.6852855",
"0.6848795",
"0.68471",
"0.68376106",
"0.683245",
... | 0.7609457 | 0 |
Retrieves and parses the command line arguments created and defined using the argparse module. This function returns these arguments as an ArgumentParser object. | def agXF():
wvEv = j1Jz.ArgumentParser()
wvEv.add_argument('image_path', help='Path to image', type=str)
wvEv.add_argument('checkpoint', help='path to checkpoint', default='checkpoint.pth', type=str)
wvEv.add_argument('--top_k', help='top k classes of image', default=5, type=int)
wvEv.add_argument('... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gGZX():\n qIxc = Xt1H()\n wvEv = j1Jz.ArgumentParser('Update river flow directions')\n wvEv.add_argument('python_config_filename', metavar='python-config-filename', help='Full path to python configuration file', type=str)\n wvEv.parse_args(namespace=qIxc)\n return qIxc",
"def KPGg():\n wvEv... | [
"0.8138782",
"0.79517275",
"0.78769577",
"0.78217745",
"0.779941",
"0.779941",
"0.7774491",
"0.77692086",
"0.7760826",
"0.773166",
"0.7715235",
"0.77124196",
"0.7626294",
"0.7610812",
"0.75815564",
"0.7573426",
"0.7565669",
"0.7555788",
"0.7530112",
"0.7528781",
"0.7527054",
... | 0.0 | -1 |
Computes Hermite's polynom Hn between min and max with N points | def koi4(exwG, min, max, ywwl):
FVka = abs((max - min) / ywwl)
WKvO = min
Aofo = oyIN.array([])
for YRbF in range(0, ywwl):
Aofo = oyIN.append(Aofo, C7Ls(exwG, WKvO))
WKvO += FVka
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ok8c(WKvO, exwG):\n nPrm = WKvO\n for bGrB in Ni9Y(exwG):\n nPrm = MKlR(nPrm)\n return nPrm",
"def eynQ(exwG: int) -> int:\n return int(exwG * (5 * exwG - 3) / 2)",
"def C7Ls(exwG, WKvO):\n bnyr = []\n bnyr.append(1)\n bnyr.append(2 * WKvO)\n if exwG > 1:\n for YRbF in... | [
"0.71132356",
"0.69802856",
"0.696812",
"0.6884305",
"0.66561925",
"0.66005677",
"0.63991517",
"0.6263722",
"0.61933285",
"0.6161913",
"0.61318135",
"0.61293066",
"0.59849536",
"0.5968287",
"0.59290284",
"0.59086215",
"0.5907617",
"0.58984476",
"0.5894257",
"0.587678",
"0.584... | 0.77294046 | 0 |
Get the products assiociated with this user shop. | def JsB8(QePW):
H__F = Yb8w.objects.get(user=QePW.user)
Ldyl = c0_m.objects.filter(shop_rel=H__F)
oDn_ = fNWj.PageNumberPagination()
oDn_.page_size = 7
tpDc = oDn_.paginate_queryset(Ldyl, request=QePW)
ZMzz = m1o5(tpDc, many=True)
return oDn_.get_paginated_response(ZMzz.data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ldyl(YKHO):\n return YKHO._products",
"def Ldyl(YKHO):\n return YKHO._products",
"def NMoC(YKHO):\n return c0_m().get_all_products()",
"def Ldyl(YKHO):\n return list(msfn.select())",
"def uQsB(YKHO):\n return YKHO._make_get_request(YKHO._urls['products'])",
"def Ldyl(YKHO):\n return... | [
"0.74293786",
"0.72564685",
"0.722878",
"0.7134896",
"0.71149504",
"0.7064715",
"0.70074445",
"0.69740665",
"0.6860416",
"0.6700805",
"0.67001706",
"0.6693325",
"0.6676763",
"0.6621401",
"0.65877783",
"0.6573072",
"0.65007657",
"0.64683115",
"0.6449971",
"0.64330256",
"0.6373... | 0.6211679 | 28 |
Convert the elapsed time into seconds | def kRsb(YKHO):
return YKHO.read() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bQkZ(ITS7):\n return 3600 * ITS7",
"def bQkZ(YKHO):\n return YKHO.hours * 3600 + YKHO.minutes * 60 + YKHO.seconds",
"def eO3_(YKHO):\n return YKHO._elapsed_time_in_seconds",
"def W3xo(YKHO):\n return YKHO.t / YKHO.parameters['time_conversion']",
"def bQkZ(YKHO):\n return YKHO.hours * 360... | [
"0.771219",
"0.73355097",
"0.7316226",
"0.72687596",
"0.7256337",
"0.71504724",
"0.69973135",
"0.6895417",
"0.6860521",
"0.68201065",
"0.679488",
"0.67580366",
"0.6753473",
"0.6738132",
"0.6708478",
"0.66726875",
"0.66690636",
"0.6630715",
"0.6603114",
"0.66029364",
"0.659722... | 0.6505221 | 31 |
Generate a time stamp | def DZsB(YKHO):
return ITS7.clock_gettime(ITS7.CLOCK_MONOTONIC) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IJ8b():\n return F803('%Y%m%dT%H%M%S')",
"def ghLW() -> str:\n return qcWV.datetime.now().strftime('%Y%m%d')",
"def YLTo():\n return qcWV.now().strftime('%Y-%m-%d-%H-%M-%S')",
"def Gz62():\n return str(qcWV.now().strftime('%H%M%S'))",
"def B1Ou(YKHO):\n return str(bin(int(round(ITS7.time... | [
"0.84484076",
"0.81545067",
"0.80481887",
"0.8028092",
"0.79324174",
"0.7848481",
"0.77792066",
"0.7749148",
"0.7731803",
"0.7648559",
"0.76471174",
"0.7644689",
"0.76422656",
"0.75678486",
"0.75481355",
"0.74750304",
"0.74682057",
"0.7465322",
"0.7455983",
"0.74463737",
"0.7... | 0.0 | -1 |
Early stopping iterator. Keeps track of the best model state during training. Resets the model to its best state, when either the number of maximum epochs or the patience [number of epochs without improvement) is reached. Also includes a convenient way to reduce the learning rate. Takes as an additional input a PyTorch... | def VxE8(C3ST, rV9r, VOlW=5, QCuz=20, yKcO=0, SYxB=1000, bnFD=True, D1sU=1e-05, _lVu=True, MsVj=True, Edrf=None, IesV=None, ILPn=1):
xGPk = C3ST.training
def oJ_X():
if _lVu:
C3ST.eval()
U5bT = rV9r(C3ST)
if _lVu:
C3ST.train(xGPk)
return U5bT
def fd7... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xdCB(YKHO, QB7s, QCuz, PJWX):\n if PJWX:\n print('=== training ChebNet model ===')\n K0do = sqQC.Adam(YKHO.parameters(), lr=YKHO.lr, weight_decay=YKHO.weight_decay)\n Crrw = YKHO.data.y\n LncD, l7at = (YKHO.data.train_mask, YKHO.data.val_mask)\n VxE8 = QCuz\n k4AE = 100\n for YRbF i... | [
"0.70969135",
"0.66711897",
"0.66637784",
"0.66478735",
"0.6583702",
"0.6560357",
"0.6560357",
"0.65172607",
"0.65171415",
"0.6463181",
"0.64101076",
"0.64014256",
"0.6388776",
"0.6334788",
"0.6323229",
"0.63058347",
"0.619649",
"0.6192976",
"0.6174986",
"0.615822",
"0.615527... | 0.6918384 | 1 |
Given multiple iterators, returns a generator that alternatively visit one element from each iterator at a time. | def WRty(*qIxc):
for rdlD in zip(*qIxc):
yield from rdlD | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nfjV(*IrPK):\n AsCw = oRi_()\n for or8S, WRKq in enumerate(IrPK):\n try:\n AsCw[or8S] = [next(WRKq), or8S, WRKq]\n except StopIteration:\n pass\n PtoX = seET.itemgetter(1)\n while AsCw:\n or8S, o3VM = min(AsCw.items(), key=PtoX)\n BWXx, bGrB, WRKq =... | [
"0.75546885",
"0.75123835",
"0.715824",
"0.7122773",
"0.69594467",
"0.67921436",
"0.67729753",
"0.6765857",
"0.6750847",
"0.6750847",
"0.6750847",
"0.6750847",
"0.67386055",
"0.67343456",
"0.67343456",
"0.67274785",
"0.6713396",
"0.66651595",
"0.66651595",
"0.66651595",
"0.66... | 0.6805151 | 5 |
Return an ASCIIonly JSON representation of a Python string | def iGZj(KCHu):
if isinstance(KCHu, str) and HAIz.search(KCHu) is not None:
KCHu = KCHu.decode('utf-8')
def qx_G(kUBT):
KCHu = kUBT.group(0)
try:
return I0A5[KCHu]
except KeyError:
exwG = ord(KCHu)
if exwG < 65536:
return '\\u{... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IxRr(YKHO, vIwR):\n B2fa = {'cls': sFr4, 'indent': 1, 'sort_keys': True, 'separators': (',', ': ')}\n return Ur3m(qQXR.dumps(vIwR, **B2fa), 'utf-8')",
"def Dbb4(YKHO, vIwR):\n return qQXR.dumps(vIwR)",
"def Xxid(object):\n return qQXR.dumps(object, ensure_ascii=False)",
"def vmDR(KCHu):\n ... | [
"0.8173381",
"0.7761752",
"0.73871756",
"0.7306732",
"0.7114988",
"0.6949071",
"0.6896345",
"0.68929964",
"0.6786643",
"0.67857534",
"0.6751209",
"0.66860336",
"0.66523707",
"0.66367877",
"0.6627448",
"0.66205585",
"0.6590046",
"0.6590046",
"0.6590046",
"0.6590046",
"0.659004... | 0.0 | -1 |
Computes the precision for the specified values of k | def vjyh(hlel, pan_, hz5a=(1,)):
with ht2j.no_grad():
Gq8e = max(hz5a)
Ep8u = pan_.size(0)
bGrB, nvEb = hlel.topk(Gq8e, 1, True, True)
nvEb = nvEb.t()
gXXc = nvEb.eq(pan_.view(1, -1).expand_as(nvEb))
Ylbp = []
for G1Hx in hz5a:
R2Dg = gXXc[:G1Hx].v... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhd_(_ger, nvEb, G1Hx):\n G1Hx = min(len(nvEb), G1Hx)\n OCOs = min(len(_ger), G1Hx)\n return sum([int(nvEb[YRbF] in _ger) for YRbF in range(G1Hx)]) / OCOs",
"def sEak(Mkmy, G1Hx):\n assert G1Hx >= 1\n Mkmy = oyIN.asarray(Mkmy)[:G1Hx] != 0\n if Mkmy.size != G1Hx:\n raise ValueError('R... | [
"0.76427615",
"0.74189496",
"0.7418079",
"0.72710466",
"0.72456723",
"0.72446615",
"0.7237539",
"0.72213703",
"0.7210107",
"0.7058935",
"0.6852219",
"0.6786084",
"0.67836976",
"0.6768417",
"0.67273885",
"0.67181736",
"0.67181736",
"0.67181736",
"0.67181736",
"0.67181736",
"0.... | 0.0 | -1 |
get camera_location (x, y, z) you can write your own version of camera_location function to return the camera loation in the blender world coordinates system | def uyev(NyAp, yzQA, pImw):
rVnq = float(yzQA)
q7In = float(NyAp)
pImw = float(pImw)
WKvO = pImw * epAf.cos(rVnq) * epAf.cos(q7In)
LVAh = pImw * epAf.cos(rVnq) * epAf.sin(q7In)
epBp = pImw * epAf.sin(rVnq)
return (WKvO, LVAh, epBp) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uyev(YKHO) -> dNTi:\n return YKHO._location",
"def igcO(YKHO):\n return ITC7(TAm4(YKHO.camera, YKHO.camera.position, invert=True), TAm4(YKHO.camera, YKHO.camera.focal_point, invert=True), YKHO.camera.up)",
"def jPRh(YKHO, XP5J):\n Aofo = YKHO.camPos\n Aofo += XP5J[2] * YKHO.camZ\n Aofo += XP... | [
"0.6978486",
"0.6845743",
"0.65382594",
"0.6482532",
"0.6382791",
"0.6357661",
"0.6334138",
"0.628754",
"0.6276525",
"0.62225354",
"0.622146",
"0.62176895",
"0.61722606",
"0.615152",
"0.60883665",
"0.60853165",
"0.60726494",
"0.6057531",
"0.60207283",
"0.5974146",
"0.59305996... | 0.73757243 | 0 |
Make window with set elements, returns window object | def YRvD():
_sef.theme('DarkBlack1')
taxn = [[_sef.Text('Select File'), _sef.In(size=(35, 1), key='-FILE-'), _sef.FileBrowse(button_text='File', file_types=(('Text Files', '*.txt'),)), _sef.FolderBrowse(button_text='Folder', target=(rDXd, -2), key='-FOB PARSE-'), _sef.Button(button_text='Add', enable_events=Tru... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ao30(YKHO, yzQ0):\n YKHO.window = yzQ0\n return YKHO",
"def FrZO(YKHO, mWFP, Mxc4, Bihd, yiYd, NKrm, MX3a=False):\n YKHO.windows[mWFP] = ao30(Mxc4, Bihd, yiYd, NKrm, MX3a)\n return YKHO.windows[mWFP]",
"def raT0(cuiw):\n\n def raT0():\n tGRm = cuiw.handles\n mWFP = cuiw.execute... | [
"0.66863805",
"0.65620005",
"0.6553244",
"0.6481401",
"0.64812434",
"0.6424367",
"0.6331128",
"0.63295686",
"0.6319351",
"0.63108695",
"0.6305862",
"0.6247642",
"0.6223596",
"0.6202475",
"0.619606",
"0.61541015",
"0.61454266",
"0.6143997",
"0.6137831",
"0.6136887",
"0.6086896... | 0.0 | -1 |
Randomly selects four colors color list | def ZZ7d(YKHO):
sRzR = 4
bbhk = []
for YRbF in range(sRzR):
qfpW = tuKI.choice(JkF8.COLORS)
wvVa = KHJC(qfpW)
bbhk.append(wvVa)
GERS = EFoo(bbhk)
YKHO.model.guesses['solution'] = GERS | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pph3():\n XEpb = [255, 0, 0]\n tuKI.shuffle(XEpb)\n return tuple(XEpb)",
"def pph3():\n return tuKI.choice(Jw9H)",
"def OLAd(YKHO):\n bctv = range(0, 256)\n return tuple((tuKI.choice(bctv) for bGrB in range(3)))",
"def xt3l():\n Mkmy = ajWY(0, 255)\n Oa1e = ajWY(0, 255)\n Fg_i ... | [
"0.78718174",
"0.7705423",
"0.7641151",
"0.7612031",
"0.760041",
"0.7538865",
"0.75220114",
"0.74447376",
"0.7427404",
"0.74066377",
"0.7360473",
"0.7336653",
"0.72404",
"0.72404",
"0.72404",
"0.72396636",
"0.72254944",
"0.7223335",
"0.72187173",
"0.7195887",
"0.7179196",
"... | 0.0 | -1 |
Compute Median Absolute Deviation of features. | def S7L8(YKHO):
XDzn = {}
for BZ2A in YKHO.feature_names:
usD_ = oyIN.median(YKHO.train_data[BZ2A].values)
B1mH = abs(YKHO.train_data[BZ2A].values - usD_)
XNqj = oyIN.median(B1mH)
if XNqj <= 0.0:
XNqj = 1.0
XDzn[BZ2A] = XNqj
return XDzn | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vLNW(WKvO, jDK_=None):\n return 1.4826 * oyIN.nanmedian(oyIN.abs(WKvO - oyIN.nanmedian(WKvO, jDK_)), jDK_)",
"def xmsr(fUYa):\n jzdc = qqgr(fUYa)\n return PZyS(sum([(WKvO - jzdc) ** 2 for WKvO in fUYa]) / (len(fUYa) - 1))",
"def Wown(nPrm):\n sum = 0\n VQvZ = S8vG(nPrm)\n for YRbF in nPrm... | [
"0.71527714",
"0.7113388",
"0.70079046",
"0.70061976",
"0.70061976",
"0.69930345",
"0.69928783",
"0.6978568",
"0.697292",
"0.6843644",
"0.68169683",
"0.68085957",
"0.6792761",
"0.6777352",
"0.6774723",
"0.67431194",
"0.6691886",
"0.6681689",
"0.66740364",
"0.6649821",
"0.6649... | 0.0 | -1 |
Plot boxplot for each feature. | def CJvp(YKHO):
HhVR = len(YKHO.feature_names)
LZpg, aNZO = QrM1.subplots(nrows=1, ncols=HhVR, figsize=(50, 2), tight_layout=True)
LZpg.suptitle('Boxplots of 19 features', fontsize=14)
for YRbF in range(HhVR):
aNZO[YRbF].boxplot(YKHO.train_data[YKHO.train_data.columns[YRbF]])
aNZO[YRbF].... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wLS1(nPrm):\n uuEx.boxplot(nPrm, width=0.5, palette='colorblind')\n uuEx.swarmplot(nPrm, color='red', alpha=0.75)",
"def vvch(jQ3Z, WKvO, LVAh, ZPhI=0, s51Q=False, rs1P=False, pPtU=False, RBZG=1, a2vR=False, BqxI=None):\n VXoW = jQ3Z[WKvO].value_counts()\n uuEx.set(font_scale=2)\n eHNT, aNZO =... | [
"0.73225975",
"0.72694457",
"0.70212394",
"0.70091724",
"0.6988831",
"0.68876237",
"0.6881457",
"0.6821177",
"0.66874355",
"0.6681656",
"0.66667587",
"0.6620936",
"0.6585161",
"0.6497521",
"0.6493323",
"0.64753103",
"0.64355385",
"0.64240825",
"0.6423418",
"0.6365268",
"0.636... | 0.8290184 | 0 |
Applies a bidirectional GRU to sequence of embeddings x. The input minibatch x needs to be sorted by length. x should have dimensions [batch, time, dim]. | def KVH6(YKHO, WKvO, ZHfW, Fbjb):
HNC5 = Skgb(WKvO, Fbjb, batch_first=True)
hlel, lXgg = YKHO.rnn(HNC5)
hlel, bGrB = Yl2X(hlel, batch_first=True)
FM45 = lXgg[0][0:lXgg[0].size(0):2]
p__f = lXgg[0][1:lXgg[0].size(0):2]
YJpt = ht2j.cat([FM45, p__f], dim=2)
JgEp = lXgg[1][0:lXgg[1].size(0):2]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def obxW(g4y1, NXmX, QjBU, EvQg, mWFP):\n with ZylS.variable_scope(mWFP):\n OZ4w = ZylS.nn.rnn_cell.MultiRNNCell([qSKs(QjBU, EvQg) for bGrB in range(QjBU.num_hidden_layers)])\n fW0d = ZylS.nn.rnn_cell.MultiRNNCell([qSKs(QjBU, EvQg) for bGrB in range(QjBU.num_hidden_layers)])\n (MQDh, T7Xm),... | [
"0.5958678",
"0.55314916",
"0.5486782",
"0.53264564",
"0.5306856",
"0.53068465",
"0.53049946",
"0.530387",
"0.5303579",
"0.52948797",
"0.52849853",
"0.5242737",
"0.5242376",
"0.5241319",
"0.5209092",
"0.5202257",
"0.51923174",
"0.51715285",
"0.51625097",
"0.51385784",
"0.5137... | 0.0 | -1 |