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 items for a particular category | def P1e3(YKHO, Ghho, Z2t2=False, q8f8=None, FGW3=None):
if Ghho.id is r3yn.UNCATEGORIZED_ID:
return None
return YKHO._getFeedContent(Ghho.fetchUrl, Z2t2, q8f8, FGW3) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k66M(YKHO):\n Ghho = YKHO.kwargs['category']\n return QKm6.objects.filter(category=Ghho)",
"def jTHL():\n bo34.info('Searching by category')\n NArs = QePW.args.to_dict()\n if not NArs:\n raise UAju.ApiError(70001, 'Missing required key params')\n eLoB = {'id_category'}\n if not eL... | [
"0.7600397",
"0.7533739",
"0.72146314",
"0.71818197",
"0.7138146",
"0.71276563",
"0.70383745",
"0.7018635",
"0.69893634",
"0.69677305",
"0.69355065",
"0.692658",
"0.69253427",
"0.69235677",
"0.6917343",
"0.68937624",
"0.6873052",
"0.6849598",
"0.6827433",
"0.6822611",
"0.6794... | 0.0 | -1 |
Return a path from PuzzleNode(puzzle) to a PuzzleNode containing a solution, with each child containing an extension of the puzzle in its parent. Return None if this is not possible. | def RawI(eZzF):
def K2kF(mEUU, PwWw):
if mEUU.fail_fast():
return None
elif mEUU.is_solved():
return G954(mEUU)
else:
_9jN = G954(mEUU)
for Fst3 in mEUU.extensions():
if str(Fst3) not in PwWw:
PwWw.add(str(F... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OyQC(Q6kx):\n eJmz = Q6kx\n while eJmz.puzzle is not None and eJmz.parent is not None:\n eJmz.parent.children = [eJmz]\n eJmz = eJmz.parent\n return eJmz",
"def Ytxw(Q6kx):\n jvSB = Q6kx\n while jvSB.parent is not None and jvSB.puzzle is not None:\n jvSB.parent.children = ... | [
"0.7250631",
"0.69628626",
"0.6702078",
"0.64568436",
"0.63682663",
"0.6169959",
"0.6022562",
"0.60113084",
"0.599318",
"0.59218484",
"0.5891527",
"0.5881572",
"0.5826133",
"0.578092",
"0.57768637",
"0.57609355",
"0.57152414",
"0.5673344",
"0.56596005",
"0.5610586",
"0.559169... | 0.63332933 | 5 |
Return a path from PuzzleNode(puzzle) to a PuzzleNode containing a solution, with each child PuzzleNode containing an extension of the puzzle in its parent. Return None if this is not possible. | def X2ZK(eZzF):
def OyQC(Q6kx):
"""
Get the root_node with the path to the target node.
@type node: PuzzleNode
@rtype: PuzzleNode
"""
eJmz = Q6kx
while eJmz.puzzle is not None and eJmz.parent is not None:
eJmz.parent.children = [eJmz]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OyQC(Q6kx):\n eJmz = Q6kx\n while eJmz.puzzle is not None and eJmz.parent is not None:\n eJmz.parent.children = [eJmz]\n eJmz = eJmz.parent\n return eJmz",
"def Ytxw(Q6kx):\n jvSB = Q6kx\n while jvSB.parent is not None and jvSB.puzzle is not None:\n jvSB.parent.children = ... | [
"0.72689986",
"0.70075244",
"0.6669919",
"0.653633",
"0.63879657",
"0.638647",
"0.6256638",
"0.60902476",
"0.60515404",
"0.5983194",
"0.5953612",
"0.5898729",
"0.58247983",
"0.5816835",
"0.5808374",
"0.5792663",
"0.5753174",
"0.5709781",
"0.5665633",
"0.5662873",
"0.5654934",... | 0.60365236 | 9 |
Return whether PuzzleNode self is equivalent to other | def xa14(YKHO, Elif):
return type(YKHO) == type(Elif) and YKHO.puzzle == Elif.puzzle and all([WKvO in YKHO.children for WKvO in Elif.children]) and all([WKvO in Elif.children for WKvO in YKHO.children]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return type(Elif) is type(YKHO) and YKHO._node == Elif._node",
"def xa14(YKHO, Elif):\n return type(Elif) is type(YKHO) and Elif._node is YKHO._node",
"def xa14(YKHO, Elif):\n return isinstance(Elif, o7DN) and YKHO.state == Elif.state",
"def xa14(YKHO, Elif):\n return isin... | [
"0.75908893",
"0.75750256",
"0.75735235",
"0.7557899",
"0.7543936",
"0.7535108",
"0.7530965",
"0.7529764",
"0.7529764",
"0.7529764",
"0.7529764",
"0.7529764",
"0.7529764",
"0.75001234",
"0.7490661",
"0.7456083",
"0.7439674",
"0.7387702",
"0.7385273",
"0.7341408",
"0.7315656",... | 0.7678238 | 2 |
Dump an instance of this class to JSON. | def oD7C(YKHO: 'JSONType', pS5s=None, qCcK=None):
pS5s = pS5s or {}
qCcK = qCcK or {}
uPxI = YKHO.__marshmallow_schema__(**pS5s)
return uPxI.dump(YKHO, **qCcK) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e1Ec(YKHO) -> str:\n YEnM = YKHO.as_dict()\n return qQXR.dumps(YEnM)",
"def Xxid(YKHO):\n Aofo = qQXR.dumps(YKHO, default=lambda z1Rg: z1Rg.__dict__, sort_keys=True, indent=4)\n return Aofo",
"def PjZe(YKHO):\n return qQXR.dumps(YKHO.__dict__)",
"def PjZe(YKHO) -> str:\n return qQXR.dum... | [
"0.80471456",
"0.792715",
"0.787105",
"0.7828634",
"0.78257984",
"0.77642024",
"0.7712322",
"0.7712322",
"0.7712322",
"0.7651882",
"0.7507512",
"0.7414006",
"0.7388194",
"0.73575073",
"0.7353309",
"0.7353309",
"0.7353309",
"0.7353309",
"0.7351166",
"0.73401403",
"0.73401403",... | 0.0 | -1 |
get product id load model and preprocessed data find similarity for this product sort and select top 10 recommendation return pd dataframe includes name and similarity score | def x0wi(rnvV):
n5mj = rLdf.read_csv('./extracted_df/events_doc2vec.csv')
with open('./extracted_model/doc2vec.pkl', 'rb') as nUeQ:
iKio = t2lc.load(nUeQ)
n8KJ = n5mj.loc[n5mj['productid'] == rnvV, 'product_name'].unique()[0]
n8KJ = n8KJ.split(' ')
Vz6Q = iKio.infer_vector(n8KJ)
cGLt = i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MN0q(ECaJ, moxz=u4ME, DumB=sV3k[['original_title', 'keywords']], G1Hx=5):\n d6pt = moxz.loc[:, ECaJ].to_numpy().argpartition(range(-1, -G1Hx, -1))\n mp07 = moxz.columns[d6pt[-1:-(G1Hx + 2):-1]]\n mp07 = mp07.drop(ECaJ, errors='ignore')\n return rLdf.DataFrame(mp07).merge(DumB).head(G1Hx)",
"def W... | [
"0.676194",
"0.67437905",
"0.65929866",
"0.6555495",
"0.64103633",
"0.640677",
"0.6315817",
"0.63115364",
"0.63030064",
"0.6299212",
"0.6274452",
"0.62145495",
"0.61955374",
"0.6187455",
"0.61752826",
"0.6115099",
"0.6052567",
"0.6048823",
"0.6042336",
"0.60341626",
"0.602205... | 0.66276973 | 2 |
Return a humanreadable time delta as a string. | def QaAj(BWXx):
Zoh6 = []
if BWXx.days:
Zoh6.append(f'{BWXx.days}d')
C6wh = BWXx.seconds
if C6wh >= 3600:
Wave = int(C6wh / 3600)
Zoh6.append(f'{Wave}h')
C6wh -= Wave * 3600
if C6wh >= 60:
O66n = int(C6wh / 60)
Zoh6.append(f'{O66n}m')
C6wh -= O... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ejIZ(YKHO):\n TAxb = YKHO.time()\n if TAxb < 1.0:\n return '{0} ms'.format(TAxb * 1000.0)\n else:\n return str(yNWX.timedelta(seconds=TAxb))",
"def YF_A(YKHO):\n Zihr, Sm0u, Wave, O66n, C6wh = YKHO.get_list()\n if Zihr == -1:\n G2eZ = '-'\n else:\n G2eZ = ''\n ... | [
"0.7759588",
"0.76420236",
"0.7599348",
"0.74293226",
"0.7422279",
"0.7418403",
"0.7332901",
"0.7327367",
"0.725267",
"0.7232313",
"0.7159226",
"0.7132185",
"0.71224755",
"0.705121",
"0.70447046",
"0.69543356",
"0.6900739",
"0.68985975",
"0.68978643",
"0.688027",
"0.68651986"... | 0.67797524 | 25 |
Return True for 'true', False for 'false', original value otherwise. | def kcnm(BWXx):
if BWXx == 'true':
return True
if BWXx == 'false':
return False
return BWXx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ovrE(BWXx):\n return True if BWXx.lower() == 'true' else False",
"def m2ls(BWXx):\n return BWXx is True",
"def Y5iq(BWXx):\n return BWXx == 'True' or BWXx == 'true'",
"def qqUT(YKHO, BWXx):\n if BWXx == 'False':\n return False\n else:\n return True",
"def ZzqV(YKHO):\n Y... | [
"0.81487274",
"0.7890289",
"0.7859711",
"0.776091",
"0.77533984",
"0.77192897",
"0.75000614",
"0.7488439",
"0.74502313",
"0.7441262",
"0.743532",
"0.7429496",
"0.7423099",
"0.7392999",
"0.73818547",
"0.7361009",
"0.7357952",
"0.7331147",
"0.7325353",
"0.73059314",
"0.7295841"... | 0.7414055 | 13 |
Make np_arr array to have length arr_len. If the array is shorter than arr_len, then it is padded from the front with zeros. If it is longer, then it is clipped either from the back or from the front. Only the first dimension is modified. | def rsAz(p891, np77, sJTu=True, Y9_h=False):
ROpF = list(p891.shape)
x_5g = np77 - ROpF[0]
wRD2 = None
if x_5g < 0:
if sJTu:
wRD2 = p891[-x_5g:, :]
else:
wRD2 = p891[:np77, :]
elif x_5g > 0:
dvgN = oyIN.zeros([x_5g] + ROpF[1:], dtype=p891.dtype)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _O5Y(ezWE, np77):\n OeK1 = oyIN.zeros(np77)\n OeK1[:ezWE.shape[0]] = ezWE\n return OeK1",
"def PnDp(p891, u54L):\n Aofo = oyIN.zeros(u54L)\n Aofo[-p891.shape[0]:-1] = p891\n return Aofo",
"def PnDp(p891, u54L):\n Aofo = oyIN.zeros(u54L)\n Aofo[0:p891.shape[0]] = p891\n return Aof... | [
"0.83733207",
"0.7879764",
"0.77629703",
"0.73300004",
"0.7046057",
"0.7046057",
"0.69565207",
"0.6842604",
"0.6669926",
"0.6554415",
"0.6432748",
"0.6347828",
"0.6345648",
"0.62816536",
"0.6249258",
"0.6230922",
"0.6230922",
"0.62281",
"0.62281",
"0.62244457",
"0.62091064",
... | 0.7416829 | 3 |
Constructs a Task input/output config. | def FIMM(YKHO, g4y1, hlel, xDcj=None):
nWTg = g760.namedtuple('IOConfig', ['type', 'shape'])
def L1BJ(GPtr):
if not isinstance(GPtr, tuple):
raise ValueError('config must be a tuple. Received {}'.format(type(GPtr)))
if len(GPtr) != 2:
raise ValueError('config must have 2... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, mWFP, D3KC, GPtr):\n o2Vr.__init__(YKHO, mWFP, D3KC, GPtr)\n YKHO.key_inputs = YKHO.stream_keys['inputs']\n YKHO.key_targets = YKHO.stream_keys['targets']\n YKHO.inputs = []\n YKHO.targets = []",
"def SlDh(GPtr):\n D5gV = wcJN[GPtr.TRAINER.TASK_NAME].from_config(GPtr)\n return... | [
"0.7117614",
"0.67072827",
"0.6532256",
"0.64367926",
"0.63650835",
"0.6305352",
"0.6281423",
"0.6255195",
"0.62484556",
"0.61593384",
"0.612446",
"0.6116238",
"0.61041707",
"0.60859734",
"0.60756075",
"0.6075477",
"0.6055443",
"0.6040006",
"0.6028853",
"0.6016031",
"0.601053... | 0.56487113 | 60 |
A loss for training a task model. This loss measures the discrepancy between the task outputs, the true and predicted ones. | def q9TF(YKHO, nigS, x6A0, _mSQ=None):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N77f(YKHO, C3ST, D5gV):\n raise NotImplementedError('implement me')",
"def wOmn(YKHO):\n with ZylS.variable_scope('loss'):\n N77f = ZylS.reduce_mean((YKHO.targets - YKHO.predictions) ** 2, name='loss')\n return N77f",
"def N77f(YKHO, aMgO: Tensor, Y8eF: Tensor) -> float:\n raise NotI... | [
"0.75727487",
"0.7332777",
"0.7179303",
"0.7104994",
"0.70993334",
"0.7067124",
"0.70555687",
"0.6957531",
"0.6956531",
"0.6935624",
"0.6921968",
"0.6921517",
"0.6908269",
"0.6908269",
"0.6908269",
"0.6908007",
"0.6846115",
"0.68379533",
"0.68360513",
"0.6829653",
"0.6819104"... | 0.65502447 | 53 |
Returns a reward. The tasks has to compute a reward based on the state of the environment. The reward computation, though, is task specific. The task is to use the environment interface, as defined in task_env.py, to compute the reward. If this interface does not expose enough information, it is to be updated. | def vOGg(YKHO, W061, _ins, U34r):
return (W061, 0.0, _ins, U34r) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _KvT(YKHO, pR3T, _ins):\n return vOGg",
"def vOGg(YKHO, QTBn, a1PO):\n return YKHO._reward(QTBn, a1PO)",
"def xyVK(YKHO):\n if YKHO.reward is None:\n YKHO.reward = YKHO.all_rewards[tuple(YKHO.path)]\n return YKHO.reward",
"def _KvT(YKHO):\n vOGg = YKHO._env_config['success_reward'] ... | [
"0.718831",
"0.70639366",
"0.6935772",
"0.6874555",
"0.67771",
"0.67751163",
"0.67251116",
"0.67077273",
"0.6659887",
"0.66322404",
"0.6610752",
"0.660374",
"0.65899086",
"0.65587413",
"0.65557635",
"0.65530354",
"0.65413636",
"0.6537416",
"0.6527297",
"0.65133166",
"0.649718... | 0.0 | -1 |
A loss for training a task model. This loss measures the discrepancy between the task outputs, the true and predicted ones. | def q9TF(YKHO, nigS, x6A0, _mSQ=None):
Jk1z = x6A0.get_shape().as_list()
_38q = nigS.get_shape().as_list()
if len(Jk1z) != 3 or len(_38q) != 3:
raise ValueError('invalid shape for targets or true_targets_shape')
if oyIN.any(Jk1z != _38q):
raise ValueError('the shape of targets and true_t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N77f(YKHO, C3ST, D5gV):\n raise NotImplementedError('implement me')",
"def wOmn(YKHO):\n with ZylS.variable_scope('loss'):\n N77f = ZylS.reduce_mean((YKHO.targets - YKHO.predictions) ** 2, name='loss')\n return N77f",
"def N77f(YKHO, aMgO: Tensor, Y8eF: Tensor) -> float:\n raise NotI... | [
"0.7574337",
"0.7332928",
"0.7178336",
"0.71039003",
"0.71001136",
"0.70676017",
"0.705432",
"0.6956714",
"0.69566566",
"0.69363284",
"0.69225365",
"0.6920292",
"0.6908118",
"0.69077665",
"0.69077665",
"0.69077665",
"0.6846611",
"0.68382716",
"0.6835323",
"0.6829956",
"0.6818... | 0.0 | -1 |
A loss for training a task model. This loss measures the discrepancy between the task outputs, the true and predicted ones. | def q9TF(YKHO, nigS, x6A0, _mSQ=None):
Jk1z = x6A0.get_shape().as_list()
_38q = nigS.get_shape().as_list()
if len(Jk1z) != 3 or len(_38q) != 3:
raise ValueError('invalid shape for targets or true_targets_shape')
if oyIN.any(Jk1z != _38q):
raise ValueError('the shape of targets and true_t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N77f(YKHO, C3ST, D5gV):\n raise NotImplementedError('implement me')",
"def wOmn(YKHO):\n with ZylS.variable_scope('loss'):\n N77f = ZylS.reduce_mean((YKHO.targets - YKHO.predictions) ** 2, name='loss')\n return N77f",
"def N77f(YKHO, aMgO: Tensor, Y8eF: Tensor) -> float:\n raise NotI... | [
"0.75746584",
"0.7333747",
"0.71795905",
"0.7105344",
"0.7101388",
"0.7068226",
"0.7056397",
"0.69582295",
"0.6957841",
"0.6935243",
"0.692243",
"0.69214976",
"0.69091326",
"0.69087255",
"0.69087255",
"0.69087255",
"0.6847686",
"0.68390065",
"0.6836483",
"0.6831341",
"0.68196... | 0.0 | -1 |
The function to generate random password | def kico(YKHO, u54L=5, q1js=True, RpmZ=True, MxOw=True, GlKO=True):
if u54L <= 0:
raise fwpV.NoLengthToPassword('The Password must have a length greater than 0!')
gLiZ = ''
if q1js:
gLiZ += vIwR.ascii_uppercase
if RpmZ:
gLiZ += vIwR.ascii_lowercase
if MxOw:
gLiZ += vI... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ywt8():\n return GLL2(tuKI.randint(8, 16), 1, 1, 1)",
"def ikbr():\n return ''.join((jxbx().choice(tcl1 + BHGE) for bGrB in range(8)))",
"def ENfd(len=12):\n import random, string\n rmc3 = string.ascii_letters + string.digits\n QTBn = random.getstate()\n random.seed()\n Aofo = ''.join(... | [
"0.88986444",
"0.883882",
"0.88186044",
"0.8737109",
"0.8730123",
"0.8622614",
"0.8582582",
"0.8554684",
"0.8550243",
"0.8517345",
"0.85131186",
"0.84825385",
"0.84330785",
"0.8347441",
"0.8321844",
"0.8317865",
"0.82937557",
"0.82568824",
"0.82322514",
"0.82072634",
"0.81814... | 0.74875575 | 84 |
Reset the step counter. | def SiRx(YKHO, W9gz: GameState):
YKHO.steps = 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SiRx(YKHO):\n YKHO.steps = 0",
"def SiRx(YKHO):\n YKHO.steps = 0.0",
"def SiRx(YKHO):\n YKHO.instance.currentTimeStep = 0",
"def SiRx(YKHO) -> None:\n YKHO.trace = 0.0\n YKHO._statistics = dict(YKHO._initial_statistics)",
"def ka5c(YKHO, YPaw, qtWj):\n YKHO._iterator.Reset(YPaw, qtWj)... | [
"0.8395056",
"0.81886435",
"0.790392",
"0.75537306",
"0.75151336",
"0.7472516",
"0.73609674",
"0.7226421",
"0.718404",
"0.7147744",
"0.71292174",
"0.7126878",
"0.7111503",
"0.7103348",
"0.7092053",
"0.70748895",
"0.7059363",
"0.7045598",
"0.7023616",
"0.70195484",
"0.7001383"... | 0.7689299 | 3 |
Reset the step counter. | def SiRx(YKHO, W9gz: GameState):
YKHO.episode_goals = 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SiRx(YKHO):\n YKHO.steps = 0",
"def SiRx(YKHO):\n YKHO.steps = 0.0",
"def SiRx(YKHO):\n YKHO.instance.currentTimeStep = 0",
"def SiRx(YKHO, W9gz: GameState):\n YKHO.steps = 0",
"def SiRx(YKHO) -> None:\n YKHO.trace = 0.0\n YKHO._statistics = dict(YKHO._initial_statistics)",
"def ka5... | [
"0.8395056",
"0.81886435",
"0.790392",
"0.7689299",
"0.75537306",
"0.75151336",
"0.7472516",
"0.73609674",
"0.7226421",
"0.718404",
"0.7147744",
"0.71292174",
"0.7126878",
"0.7111503",
"0.7103348",
"0.7092053",
"0.70748895",
"0.7059363",
"0.7045598",
"0.7023616",
"0.70195484"... | 0.0 | -1 |
Normalize array to [0, 1] | def GqPG(VXjJ: np.ndarray, kgDh: tuple[int, int]) -> oyIN.ndarray:
VeM_ = kgDh[0]
KOcM = kgDh[1]
return (VXjJ.astype(oyIN.float32).clip(VeM_, KOcM) - VeM_) / (KOcM - VeM_) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NkkI(qw7D):\n qw7D -= qw7D.min()\n qw7D /= qw7D.max()\n return qw7D",
"def n4XC(qw7D):\n return (qw7D - qw7D.min()) / (qw7D.max() - qw7D.min())",
"def n4XC(qw7D):\n return (qw7D - qw7D.min()) / (qw7D.max() - qw7D.min())",
"def NkkI(ezWE):\n ezWE = ezWE / oyIN.abs(ezWE).max(axis=0)\n ... | [
"0.8380723",
"0.8185181",
"0.8147476",
"0.7942988",
"0.7916512",
"0.7913127",
"0.7866488",
"0.785896",
"0.78122896",
"0.77700865",
"0.77045286",
"0.7632976",
"0.75615126",
"0.7532874",
"0.7507189",
"0.74779266",
"0.74754083",
"0.7463206",
"0.7407994",
"0.7358734",
"0.7297448"... | 0.0 | -1 |
Compute the nth pentagonal number | def nEwE(exwG):
return exwG * (3 * exwG - 1) // 2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lEC5(exwG):\n return exwG * (3 * exwG - 1) >> 1",
"def oBTK(exwG):\n return int(exwG * (3 * exwG - 1) / 2)",
"def Lh5v(YRbF):\n return YRbF * (3 * YRbF - 1) / 2",
"def nlKF(exwG):\n return int(exwG * (5 * exwG - 3) / 2)",
"def rBn2(exwG):\n return exwG * (5 * exwG - 3) >> 1",
"def _AnF... | [
"0.87672615",
"0.8687245",
"0.73704976",
"0.733724",
"0.72396046",
"0.7208438",
"0.70630574",
"0.7043333",
"0.691187",
"0.6891678",
"0.6846242",
"0.6846242",
"0.6813612",
"0.67698115",
"0.662922",
"0.65579736",
"0.6536447",
"0.65321445",
"0.6510132",
"0.6450108",
"0.6377482",... | 0.85879743 | 2 |
test if the id of two instances are different | def APmz(YKHO):
gBB0 = KcDH()
w6nv = KcDH()
YKHO.assertNotEqual(gBB0.id, w6nv.id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bhGy(YKHO):\n YEnM = KcDH()\n RL4V = KcDH()\n YKHO.assertNotEqual(YEnM.id, RL4V.id)",
"def CPzi(YKHO):\n V76R = KcDH()\n ZIaK = KcDH()\n YKHO.assertNotEqual(V76R, ZIaK)",
"def CPzi(YKHO):\n print('test_different_id')\n YKHO.assertNotEqual(YKHO.dummy1.id, YKHO.dummy2.id)\n YKHO.as... | [
"0.81244755",
"0.80510837",
"0.7987687",
"0.78845054",
"0.78682727",
"0.77440906",
"0.77004904",
"0.7352224",
"0.7258894",
"0.7248449",
"0.72151315",
"0.7200538",
"0.7136645",
"0.7132791",
"0.7131439",
"0.7130915",
"0.7106057",
"0.7078055",
"0.70543605",
"0.703791",
"0.702841... | 0.6558124 | 71 |
Load a text classification model from Transformers. | def FIMM(YKHO, U0Yo: str='bhadresh-savani/distilbert-base-uncased-emotion', TBez: Optional[str]=None, b0j5: Optional[str]=None, IHts: int=0, xCBd: bool=False, D5gV: str='text-classification', Crrw: Optional[List[str]]=None):
YKHO.set_config(model_name_or_path=U0Yo, model_version=TBez, tokenizer=b0j5, use_gpu=IHts, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uyMl(ZGE9):\n return owzf(ZGE9)",
"def S5f0(mWFP, ppBc, VB6U=None, nsmv=None, EYDd=True, PJWX=1):\n if not isinstance(ppBc, tuple) and (not KkY2.is_huggingface_from_data(ppBc)):\n XObx = '\\n Please pass training data in the form of a tuple of numpy.ndarrays\\n or data retu... | [
"0.6769608",
"0.6658606",
"0.6535713",
"0.6506235",
"0.64700377",
"0.6427944",
"0.64084065",
"0.63449323",
"0.6338396",
"0.6320497",
"0.63177836",
"0.6313926",
"0.6259554",
"0.6247996",
"0.6239777",
"0.6148713",
"0.61144286",
"0.607262",
"0.6053294",
"0.6040775",
"0.60276425"... | 0.0 | -1 |
Convert 'dictionary' to a networkX object and return it. | def hMDq(cmPJ):
fkk4 = jHsn.Graph()
for YRbF in cmPJ.keys():
for r845 in cmPJ[YRbF]:
fkk4.add_edge(YRbF, r845)
return fkk4 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hMDq(cmPJ):\n Oa1e = jHsn.Graph()\n for Q6kx in cmPJ:\n for D70y in cmPJ[Q6kx]:\n Oa1e.add_edge(Q6kx, D70y)\n return Oa1e",
"def jG8h(YKHO, fGC9):\n YKHO.logger.debug('Converting from dictionary')\n return hgNT(fGC9, YKHO)",
"def o3nN(Yn4h):\n JxJH = jHsn.Graph()\n Jx... | [
"0.749362",
"0.6765167",
"0.64825547",
"0.6427345",
"0.6401314",
"0.60757864",
"0.59490395",
"0.58822",
"0.58160555",
"0.5730156",
"0.56910187",
"0.5676144",
"0.5621772",
"0.5576807",
"0.5561262",
"0.54786026",
"0.54653883",
"0.54534656",
"0.5448831",
"0.5445303",
"0.5431812"... | 0.7427288 | 1 |
r"""Splits list `xs` by value `y`. | def zAOX(fUYa, LVAh):
XP5J = 0
for or8S, WKvO in enumerate(fUYa):
if WKvO == LVAh:
if or8S - XP5J > 0:
yield fUYa[XP5J:or8S]
XP5J = or8S + 1
if len(fUYa) - XP5J > 0:
yield fUYa[XP5J:] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lpha(YKHO, EcVT, LVAh=None, moMn=None):\n return super().split(EcVT, LVAh, moMn)",
"def lpha(YKHO, EcVT, LVAh=None, moMn=None):\n return super().split(EcVT, LVAh, moMn)",
"def lpha(YKHO, EcVT, LVAh=None, moMn=None):\n return super().split(EcVT, LVAh, moMn)",
"def lpha(YKHO, EcVT, LVAh=None, moMn... | [
"0.676244",
"0.676244",
"0.676244",
"0.676244",
"0.6487782",
"0.6487782",
"0.64383066",
"0.6417914",
"0.6175556",
"0.61109",
"0.6028869",
"0.59302855",
"0.59274846",
"0.59274846",
"0.58871573",
"0.5835179",
"0.57755166",
"0.57727724",
"0.57408273",
"0.57383865",
"0.56875265",... | 0.81196815 | 0 |
json representation of the User model | def qQXR(YKHO):
return qQXR.dumps({'id': YKHO.id, 'name': YKHO.username, 'email': YKHO.email, 'password': YKHO.password, 'isDriver': YKHO.isDriver}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Napc(YKHO):\n return {'name': YKHO.user_name, 'email': YKHO.user_email, 'id': YKHO.id}",
"def Napc(YKHO):\n return {'user_id': YKHO.user_id, 'username': YKHO.username, 'email': YKHO.email}",
"def qQXR(YKHO):\n return {'id': YKHO.id, 'fullnames': YKHO.fullnames, 'username': YKHO.username, 'email': ... | [
"0.7938498",
"0.7820297",
"0.7809918",
"0.7685436",
"0.7663747",
"0.75866157",
"0.7515091",
"0.7482731",
"0.73967063",
"0.73526525",
"0.73449016",
"0.73263806",
"0.7325603",
"0.7313503",
"0.72962415",
"0.7289304",
"0.72796106",
"0.7276376",
"0.7247451",
"0.72474355",
"0.72336... | 0.77780414 | 3 |
Override the inequality operator. | def Vdqg(YKHO, Elif):
return not YKHO.__eq__(Elif) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif):\n return not YKHO == Elif",
"def Vdqg(YKHO, RKYb):\n return not YKHO == RKYb",
"def Vdqg(YKHO, Elif):\n return super().__eq__(Elif)",
"def wU_U(YKHO, Elif):\n return not YKHO.__eq__(Elif)",
"def wU_U(YKHO, Elif):\n return not YKHO.__eq__(Elif)",
"def wU_U(YKHO, Elif):... | [
"0.7807075",
"0.764936",
"0.75294083",
"0.7510712",
"0.7510712",
"0.7510712",
"0.74750304",
"0.7451779",
"0.7431682",
"0.7423164",
"0.74040306",
"0.7386829",
"0.7384395",
"0.7377292",
"0.7357632",
"0.7357632",
"0.73560584",
"0.73491085",
"0.73410296",
"0.73361146",
"0.732935"... | 0.72825044 | 35 |
The hash code for the record key. | def uq1P(YKHO):
return YKHO._hash_code | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rjHV(YKHO) -> int:\n return hash(YKHO._hash_key)",
"def uq1P(YKHO, H5ew):\n if H5ew is None:\n return 0\n else:\n MKlR = hash(H5ew)\n return MKlR ^ MKlR >> 16",
"def D9QR(YKHO, H5ew):\n if isinstance(H5ew, int):\n return H5ew\n elif isinstance(H5ew, str):\n ... | [
"0.78112566",
"0.7592092",
"0.75537866",
"0.75380194",
"0.75329",
"0.7532281",
"0.7485376",
"0.74830914",
"0.74731004",
"0.74677634",
"0.7457993",
"0.7457993",
"0.7457993",
"0.7457993",
"0.7457993",
"0.7399985",
"0.7359413",
"0.7350128",
"0.7340759",
"0.7340759",
"0.7339277",... | 0.80579823 | 0 |
Add a char8 string to the buffer (can be null)eight bytes. | def Xa2W(YKHO, wEf2):
YKHO.add_charN(wEf2, 8) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H2v5(YKHO, YB8B):\n try:\n bseI = YB8B.decode('utf-8')\n except UnicodeDecodeError:\n if YKHO._buf and isinstance(YKHO._buf[-1], str):\n try:\n bseI = (YKHO._buf[-1] + YB8B).decode('utf-8')\n except UnicodeDecodeError:\n YKHO._buf[-1] = YK... | [
"0.669559",
"0.6502866",
"0.61607593",
"0.60053575",
"0.59609836",
"0.5950264",
"0.59261155",
"0.59061676",
"0.58634716",
"0.58628595",
"0.58151025",
"0.5805223",
"0.57407945",
"0.5704125",
"0.5647148",
"0.56194067",
"0.5537456",
"0.55022615",
"0.5498822",
"0.5480998",
"0.547... | 0.7449137 | 0 |
Internal helper method to convert a hexadecimal digit to integer. | def IvHM(tQ5k):
if tQ5k.isdigit():
return int(tQ5k)
elif tQ5k >= 'A' and tQ5k <= 'F':
return ord(tQ5k) - ord('A') + 10
elif tQ5k >= 'a' and tQ5k <= 'f':
return ord(tQ5k) - ord('a') + 10
else:
raise kYC3('Unknown hexadecimal value given ({})!'.format(tQ5k)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xCpn(WKvO):\n try:\n return int(WKvO, 16)\n except ValueError:\n return float('nan')",
"def DZmC(NGB6):\n return int(NGB6, 16)",
"def IvHM(x30t):\n KbaZ = 16\n GUuJ = int(x30t, KbaZ)\n return GUuJ",
"def kXTn(Ty9i):\n return int(Ty9i, 0)",
"def wqIk(X9sb):\n try:\n... | [
"0.8097048",
"0.7902506",
"0.78791803",
"0.776682",
"0.7753014",
"0.7700634",
"0.75377923",
"0.7330411",
"0.7314703",
"0.73057044",
"0.7284562",
"0.7243964",
"0.7178931",
"0.717292",
"0.71484613",
"0.7119223",
"0.7083989",
"0.70771885",
"0.7062383",
"0.7056849",
"0.70548123",... | 0.81409466 | 0 |
Force a highavailability cluster failover. Check the health of the cluster (either head node only, or head node and worker ranks, based on the retriever configuration), and use it if healthy. If no healthy cluster is found, then throw an error. Otherwise, stop at the first healthy cluster. | def JUhw(YKHO, BigN, RTIr):
for YRbF in range(0, YKHO.gpudb.ha_ring_size):
try:
YKHO.__log_debug('Forced HA failover attempt #{}'.format(YRbF))
YKHO.gpudb._GPUdb__switch_url(BigN, RTIr)
except zc2u as ex:
raise aTqo
except kJFk as ex:
raise aTq... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GrTB(YKHO, DHvX=False):\n oUZx = DHvX and b'FORCE' or b'TAKEOVER'\n S8Ct = YKHO.execute(b'CLUSTER', b'FAILOVER', oUZx)\n return ULpP(S8Ct)",
"def QZod(YKHO) -> str:\n if YKHO.is_healthiest_node():\n if YKHO.acquire_lock():\n us2Q = YKHO.cluster.failover\n if us2Q:\n ... | [
"0.73620445",
"0.68502706",
"0.6818043",
"0.6360968",
"0.5935699",
"0.5887794",
"0.57681805",
"0.5684512",
"0.5614146",
"0.55919874",
"0.5496271",
"0.54552245",
"0.5442599",
"0.5408853",
"0.5396923",
"0.5383476",
"0.5375408",
"0.53631395",
"0.53539735",
"0.5352556",
"0.535177... | 0.7104562 | 1 |
Return the instance of GPUdb client used by this ingestor. | def OgmS(YKHO):
return YKHO.gpudb | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sHe9():\n if OtFK._db_client is None:\n OtFK._db_client = iVGz.client('dynamodb')\n return OtFK._db_client",
"def bxbw():\n with QZXY.suppress(Exception):\n VUF1 = kF3y.from_URI()\n assert isinstance(VUF1, ZmfP.storage.MongoDBStorage)\n return VUF1.db.database.client",
... | [
"0.6761993",
"0.674027",
"0.6593715",
"0.6532162",
"0.6521557",
"0.6494167",
"0.6467622",
"0.64484483",
"0.64352286",
"0.64318395",
"0.6358448",
"0.63474804",
"0.63202506",
"0.63171905",
"0.62836105",
"0.62704295",
"0.62380004",
"0.62380004",
"0.6211363",
"0.6185769",
"0.6172... | 0.0 | -1 |
Sets the number of times ingestion will be attempted upon failure. Must be a positive integer. | def T0bq(YKHO, BWXx):
try:
BWXx = int(BWXx)
except:
raise kYC3("Expected a numeric value, got: '{}'".format(BWXx))
if BWXx < 0:
raise kYC3("Expected a positive integer; got '{}'".format(BWXx))
YKHO.__retry_count = BWXx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xbU0(YKHO, BWXx):\n if BWXx > 0:\n YKHO.numRetries = BWXx",
"def T0bq(YKHO):\n return 0",
"def VSch(YKHO, VSch):\n YKHO._errored_count = VSch",
"def b2P6(YKHO, b2P6):\n YKHO._fail_count = b2P6",
"def AJOs(YKHO, BWXx):\n assert type(BWXx) == int and BWXx >= 0\n YKHO._tries = BWX... | [
"0.7120794",
"0.6915635",
"0.6822298",
"0.6718634",
"0.6661902",
"0.66366494",
"0.65783757",
"0.6545588",
"0.64920574",
"0.6490865",
"0.6412265",
"0.6412265",
"0.64118826",
"0.6374991",
"0.63318336",
"0.62067753",
"0.6160256",
"0.6145046",
"0.61110806",
"0.60692364",
"0.60605... | 0.6794768 | 3 |
Return the GPUdb table associated with this ingestor. | def LKuW(YKHO):
return YKHO.table_name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ja1s(YKHO):\n return YKHO.table",
"def ja1s(YKHO):\n return YKHO.table",
"def B8Ax(YKHO):\n return YKHO.getDbRecord().getColumnValue(s_qC)",
"def B8Ax(YKHO):\n return YKHO._table",
"def B8Ax(YKHO):\n return YKHO.table",
"def tyNF(YKHO) -> str:\n return YKHO._table",
"def tyNF(YKHO... | [
"0.7161515",
"0.7161515",
"0.7156032",
"0.70207155",
"0.6951478",
"0.67817724",
"0.67817724",
"0.6742647",
"0.6742647",
"0.6742647",
"0.6742647",
"0.6742647",
"0.6742647",
"0.6742647",
"0.67179304",
"0.6679281",
"0.66380733",
"0.66380733",
"0.65676457",
"0.65676457",
"0.65676... | 0.64804727 | 30 |
Initializes the RecordRetriever instance. | def FIMM(YKHO, Xc8U, GTA_, Bmg9, fHUa=None, Oz41=False):
if not isinstance(Xc8U, hI3E):
raise kYC3("Parameter 'gpudb' must be of type GPUdb; given %s" % str(type(Xc8U)))
if not isinstance(GTA_, exCv):
raise kYC3("Parameter 'table_name' must be astring; given %s" % str(type(GTA_)))
if not isi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uIcm(YKHO, AIu6):\n pass",
"def FIMM(YKHO, AIu6):\n YKHO.record = AIu6",
"def q3KG(YKHO):\n bo34.info('initializing retrieval')\n YKHO.index.init_index()",
"def uIcm(YKHO):\n YKHO.dao = YKHO.dao or YKHO._generate_dao(db_uri=YKHO.db_uri, initialize=True)\n YKHO.sources = YKHO._source_spe... | [
"0.771185",
"0.669926",
"0.6631936",
"0.6576977",
"0.63919246",
"0.63557094",
"0.63521343",
"0.63219404",
"0.6251885",
"0.6251885",
"0.6251885",
"0.6251885",
"0.6251885",
"0.6208829",
"0.6176441",
"0.61743116",
"0.6165524",
"0.61608464",
"0.6157808",
"0.6139506",
"0.6126984",... | 0.0 | -1 |
Force a highavailability cluster failover. Check the health of the cluster (either head node only, or head node and worker ranks, based on the retriever configuration), and use it if healthy. If no healthy cluster is found, then throw an error. Otherwise, stop at the first healthy cluster. | def JUhw(YKHO, dVss, RTIr):
YKHO.__log_debug('Forced failover begin...')
BigN = dVss
for YRbF in range(0, YKHO.gpudb.ha_ring_size):
try:
YKHO.__log_debug('Forced HA failover attempt #{}'.format(YRbF))
YKHO.gpudb._GPUdb__switch_url(BigN, RTIr)
except vHHC as ex:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GrTB(YKHO, DHvX=False):\n oUZx = DHvX and b'FORCE' or b'TAKEOVER'\n S8Ct = YKHO.execute(b'CLUSTER', b'FAILOVER', oUZx)\n return ULpP(S8Ct)",
"def JUhw(YKHO, BigN, RTIr):\n for YRbF in range(0, YKHO.gpudb.ha_ring_size):\n try:\n YKHO.__log_debug('Forced HA failover attempt #{}'.f... | [
"0.73628354",
"0.71051884",
"0.68502384",
"0.63609093",
"0.5934973",
"0.58879864",
"0.57688785",
"0.56847775",
"0.5614046",
"0.55916345",
"0.54952186",
"0.5453502",
"0.54418194",
"0.5408138",
"0.5397301",
"0.5383114",
"0.53760546",
"0.53635305",
"0.53531647",
"0.5352125",
"0.... | 0.6818955 | 3 |
Raise an error if callable cannot be used in dispatch otherwise do nothing. The dispatcher base class simply checks that function passed in can accept arguements since this is the most basic requirement for a callable to be used in dispatch. Children of `Dispatcher` should override this method and call super().validate... | def Kd0M(YKHO, eHNT: Callable):
if not GZVz(eHNT):
raise R6oW(eHNT, 'dispatch functions must accept args.') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IF4E(YKHO):\n BfDw.check_raises(lambda: aNZO.evaluate_call(int), GqHr, msg=\"invalid callable non-lambda 'call' should raise\")\n BfDw.check_raises(lambda: aNZO.evaluate_call(lambda: int, fallback=int), GqHr, msg=\"invalid callable non-lambda 'fallback' should raise\")",
"def Vh7k(**B2fa):\n for H5e... | [
"0.67468494",
"0.6549318",
"0.65471977",
"0.65371704",
"0.6224835",
"0.62195724",
"0.6127246",
"0.6112606",
"0.6074004",
"0.59813374",
"0.59801364",
"0.5968162",
"0.5965984",
"0.5931426",
"0.58832175",
"0.5871815",
"0.58585346",
"0.58515686",
"0.58319217",
"0.5798409",
"0.578... | 0.86009634 | 0 |
register a function with the dispatcher. | def CYJb(YKHO, zF0X: Union[Hashable, Callable], *qIxc, **B2fa) -> YrBT:
return NotImplemented | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aWzQ(YKHO, JfyU):\n YKHO.functions.append(JfyU)",
"def gr_i(YKHO, JfyU: Callable) -> YrBT:\n pass",
"def gr_i(FYKK):\n oL5I.append(FYKK)",
"def gr_i(YKHO):\n YKHO.func(YKHO, True, *YKHO.args, **YKHO.kwargs)",
"def gr_i(YKHO, JfyU=None, mWFP=None):\n raise NotImplementedError",
"def gr_... | [
"0.7731714",
"0.7701123",
"0.76260537",
"0.75043666",
"0.74877447",
"0.7419718",
"0.73523974",
"0.7234787",
"0.7226887",
"0.71442044",
"0.71351695",
"0.7092796",
"0.7021636",
"0.7021636",
"0.7021636",
"0.7021636",
"0.7021636",
"0.7021636",
"0.7003824",
"0.6945911",
"0.6944824... | 0.6405817 | 54 |
Compute the squared error between the balanced (e.g. IPweighted) ROC AUC to the diagonal, i.e. AUC=0.5. Shimoni, Y., et al. (2019) An evaluation toolkit to guide model selection and cohort definition in causal inference. | def YJt7(Y8eF, aMgO, xF06):
DUJF = Qq_d(Y8eF, aMgO, sample_weight=xF06)
VtQK = 0.5
p1kx = (DUJF - VtQK) ** 2
return p1kx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def No_o(YKHO):\n if oyIN.sum(YKHO.y_true) != len(YKHO.y_true) / 2.0:\n qmLP.warn('AUROC is not recommended in the case of class imbalance. ', Warning)\n return Qq_d(YKHO.y_true, YKHO.y_pred)",
"def No_o(YKHO):\n if oyIN.sum(YKHO.y_true) != len(YKHO.y_true) / 2.0:\n qmLP.warn('AUROC is not... | [
"0.6576315",
"0.6576315",
"0.65045244",
"0.64883655",
"0.64306855",
"0.63671523",
"0.6350954",
"0.6343822",
"0.6125688",
"0.6077198",
"0.6076634",
"0.6060662",
"0.6059025",
"0.60370314",
"0.60316515",
"0.60315114",
"0.60285896",
"0.60241884",
"0.60210925",
"0.59993404",
"0.59... | 0.0 | -1 |
Compute the squared error between the expected ROCAUC given the provided scores and the actual ROCAUC they produce. Shimoni, Y., et al. (2019) An evaluation toolkit to guide model selection and cohort definition in causal inference. | def Dd0Y(Y8eF, aMgO, **B2fa):
XP5J = oyIN.hstack((aMgO, aMgO))
yzQ0 = oyIN.hstack((aMgO, 1 - aMgO))
pan_ = oyIN.hstack((oyIN.ones_like(aMgO), oyIN.zeros_like(aMgO)))
zHWZ = Qq_d(pan_, XP5J, sample_weight=yzQ0)
zUeS = Qq_d(Y8eF, aMgO)
p1kx = (zHWZ - zUeS) ** 2
return p1kx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JKWI(H96n, aMgO):\n XId6 = []\n yjZz = []\n for YRbF in range(len(bbj6)):\n XId6.append(oyIN.math.sqrt(Kxs4.metrics.mean_squared_error(H96n[:, YRbF], aMgO[YRbF])))\n yjZz.append(Kxs4.metrics.r2_score(H96n[:, YRbF], aMgO[YRbF]))\n return (yjZz, XId6)",
"def DGmw(Y8eF, jXdl, PJWX=True... | [
"0.69458807",
"0.67496324",
"0.67191166",
"0.6715949",
"0.65607506",
"0.6522949",
"0.6510467",
"0.6502906",
"0.6488377",
"0.6475479",
"0.6471821",
"0.64698935",
"0.64599353",
"0.6450134",
"0.6433779",
"0.6390753",
"0.63599575",
"0.63448596",
"0.63275206",
"0.6306313",
"0.6296... | 0.6269414 | 24 |
Wraps hidden states in new Tensors, to detach them from their history. | def IOWm(MKlR):
if isinstance(MKlR, ht2j.Tensor):
return MKlR.detach()
else:
return tuple((IOWm(Ty9i) for Ty9i in MKlR)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YmeV(YKHO):\n YKHO.hidden = (ht2j.zeros(1, YKHO.batch_size, YKHO.hidden_size), ht2j.zeros(1, YKHO.batch_size, YKHO.hidden_size))",
"def eIRW(Zode):\n if isinstance(Zode, ht2j.Tensor):\n return Zode.detach()\n else:\n return tuple((eIRW(Ty9i) for Ty9i in Zode))",
"def MAw8(YKHO):\n ... | [
"0.68798447",
"0.64511824",
"0.6377841",
"0.63081974",
"0.6251541",
"0.6234771",
"0.62035614",
"0.61973006",
"0.61876655",
"0.61876655",
"0.6126576",
"0.6119143",
"0.6070477",
"0.6001602",
"0.5996448",
"0.59940463",
"0.5970282",
"0.59635544",
"0.59480536",
"0.5938309",
"0.593... | 0.56927955 | 38 |
Find and return the index of ch in string. Return 1 if ch does not occur in string. | def neBz(Bpww, Npgh, yKcO=0, Os4s=None):
p6S0 = 0
if Os4s is None:
Os4s = len(Bpww)
while p6S0 < Os4s:
if Bpww[p6S0] == Npgh:
return p6S0
p6S0 += 1
return -1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jt5q(YKHO, Npgh):\n return YKHO.chars.index(Npgh)",
"def neBz(KCHu, Npgh):\n return [YRbF for YRbF, HcKE in enumerate(KCHu) if HcKE == Npgh]",
"def UHFx(KCHu: str, Npgh: str) -> int:\n YRbF = 0\n UHFx = 0\n while True:\n YRbF = KCHu.find(Npgh, YRbF)\n if YRbF == -1:\n ... | [
"0.7719009",
"0.7692391",
"0.748205",
"0.7110635",
"0.7090147",
"0.69741166",
"0.6939944",
"0.69257545",
"0.6826464",
"0.67842126",
"0.6751167",
"0.67395216",
"0.66687596",
"0.6583129",
"0.65638787",
"0.65637505",
"0.65637505",
"0.6535042",
"0.6532768",
"0.6444285",
"0.643992... | 0.7601841 | 2 |
Helper method used to save a form if the information is valid | def YhRe(L03z, cHms, AbU0, ypow):
if L03z.is_valid():
yEHD = L03z.save(commit=False)
yEHD.thread = cHms
yEHD.sentto = AbU0
yEHD.sentfrom = ypow
yEHD.publish()
yEHD.save() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def deVW(YKHO, L03z):\n L03z.save()",
"def Dhzb(YKHO, L03z, HTyp, zLTc, SftP, P1dp, gLgi, bzQA):\n YKHO.object = L03z.save()\n HTyp.instance = YKHO.object\n HTyp.save()\n zLTc.instance = YKHO.object\n zLTc.save()\n SftP.instance = YKHO.object\n SftP.save()\n P1dp.instance = YKHO.object... | [
"0.7883377",
"0.75610733",
"0.73957396",
"0.73274195",
"0.7222966",
"0.7202608",
"0.7167011",
"0.7115626",
"0.7052447",
"0.7033633",
"0.6994176",
"0.6992372",
"0.6920177",
"0.6901077",
"0.6901077",
"0.6890712",
"0.68849206",
"0.6864811",
"0.68138146",
"0.6794242",
"0.6794242"... | 0.0 | -1 |
View for sending an initial message to a user via contact | def WdaX(QePW, _sei):
CBIr = QePW.user
if not CBIr.is_authenticated:
return vKnz('home')
ypow, AbU0, MgeT = xr35(CBIr, _sei)
if ypow is None:
return vKnz('home')
l5Ny = 'Send a message to ' + AbU0.username
if QePW.method == 'POST':
L03z = VPh7(QePW.POST)
if L03z.i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gK1d(YKHO):\n RqgG = super(glfk, YKHO).get_initial()\n CBIr = YKHO.request.user\n if CBIr.is_authenticated():\n RqgG.update({'sender': '%s (%s)' % (CBIr.username, CBIr.get_full_name()), 'email': CBIr.email})\n return RqgG",
"def Mxk0():\n return TvZl('general/contact.html', user=CBIr)",... | [
"0.7065061",
"0.7040968",
"0.69491684",
"0.6942461",
"0.6910707",
"0.68884283",
"0.6800335",
"0.6797136",
"0.6777487",
"0.6776885",
"0.6770478",
"0.6767254",
"0.6757081",
"0.67242736",
"0.67162234",
"0.6714897",
"0.6711177",
"0.67070144",
"0.67051584",
"0.6697249",
"0.6672403... | 0.68164927 | 6 |
Get last modification time of the file. | def UYB1(YKHO):
return YKHO.last_modified | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TO1Y(YKHO):\n return qcWV.fromtimestamp(YKHO._info.file.mtime)",
"def N1yv(Sd0C):\n return Hy7s.path.getmtime(Sd0C)",
"def YaxP(Emd4, qaEx):\n mXGG = Hy7s.path.getctime(qaEx)\n return qcWV.utcfromtimestamp(mXGG).isoformat()",
"def rc8I(qaEx):\n try:\n E3oo = Hy7s.stat(qaEx).st_mtime... | [
"0.8429495",
"0.8223746",
"0.8213311",
"0.82053924",
"0.8190163",
"0.80279946",
"0.79579014",
"0.7899941",
"0.78727573",
"0.7855635",
"0.7792938",
"0.7789154",
"0.7757905",
"0.77561516",
"0.7742402",
"0.7734666",
"0.7693443",
"0.76819557",
"0.7675668",
"0.7675668",
"0.764228"... | 0.7093489 | 65 |
Get all external links from page | def YVAm(Gelc, lIE0):
gEug = []
try:
wPdp = Gelc.find_all('a', href=ZbWC.compile('^(http|www)((?!' + lIE0 + ').)*$'))
except AttributeError as error:
print(P1dF)
return None
else:
for QZnA in wPdp:
if QZnA.attrs['href'] is not None:
if QZnA.att... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f2JJ(bD7m, B2Dn):\n ...",
"def x3O5(YKHO):\n YKHO.update_links(save=True)\n wPdp = YKHO.get_links()\n return [YRbF for YRbF in wPdp if YRbF.startswith('http')]",
"def x3O5(YKHO, geh0, bD7m):\n wPdp = YKHO.get_links(geh0)\n return list(filter(lambda QZnA: not YKHO.is_link_internal(bD7m, QZ... | [
"0.8245195",
"0.80003136",
"0.7652456",
"0.76065147",
"0.75433487",
"0.7485072",
"0.74826354",
"0.74822617",
"0.7473983",
"0.74591744",
"0.7453345",
"0.74413204",
"0.73770624",
"0.73592186",
"0.734968",
"0.73481065",
"0.734564",
"0.73130786",
"0.73023987",
"0.73006046",
"0.72... | 0.73513097 | 14 |
Validates definition files in a directory. | def yNJh(YKHO, pmON, Fst3='yaml'):
Aofo = True
if Fst3:
GN5w = Hy7s.path.join(pmON, f'*.{Fst3:s}')
else:
GN5w = Hy7s.path.join(pmON, '*')
for sGH5 in sorted(SC2F.glob(GN5w)):
if not YKHO.CheckFile(sGH5):
Aofo = False
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KylI(ISiN):\n Qqlc = ['01-*.md', 'CONDUCT.md', 'CONTRIBUTING.md', 'discussion.md', 'index.md', 'instructors.md', 'LICENSE.md', 'README.md', 'reference.md']\n deVW = True\n for jeGQ in Qqlc:\n fUw5 = Hy7s.path.join(ISiN, jeGQ)\n if not SC2F.glob(fUw5):\n G9jH.error('Missing fil... | [
"0.6916828",
"0.68704635",
"0.67023826",
"0.66686016",
"0.6666739",
"0.6654083",
"0.66160333",
"0.6560644",
"0.65544575",
"0.64513606",
"0.6435445",
"0.64323777",
"0.6394484",
"0.6390169",
"0.63896424",
"0.63661397",
"0.62753063",
"0.6211189",
"0.6170379",
"0.6079605",
"0.607... | 0.61438215 | 19 |
Analyze text for sentiment, returning its score. | def JybI(YKHO, l5Ny):
b0j5 = Dhdw.tokenize.TweetTokenizer()
s2mk = b0j5.tokenize(l5Ny)
p1kx = 0
for GIN8 in s2mk:
if GIN8.lower() in YKHO.positives:
p1kx += 1
if GIN8.lower() in YKHO.negatives:
p1kx -= 1
return p1kx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JybI(YKHO, l5Ny):\n p1kx = 0\n b0j5 = Dhdw.tokenize.TweetTokenizer()\n s2mk = b0j5.tokenize(l5Ny)\n for zFiD in YKHO.positives:\n if zFiD == s2mk[0]:\n p1kx += 1\n else:\n p1kx += 0\n for zFiD in YKHO.negatives:\n if zFiD == s2mk[0]:\n p1kx -... | [
"0.87208176",
"0.85311913",
"0.82421094",
"0.81936306",
"0.8187723",
"0.81874937",
"0.8126702",
"0.8122368",
"0.80681616",
"0.8063584",
"0.8044609",
"0.80404395",
"0.802662",
"0.80199224",
"0.7970823",
"0.7925178",
"0.79161304",
"0.79069155",
"0.787933",
"0.7875431",
"0.78247... | 0.79697996 | 15 |
div on PN modulo a/b mod q as a inv(b, q) mod q >>> assert n inv(n, q) % q == 1 | def dKc3(exwG, vexM):
tTpl = N5DO(exwG, vexM)
assert tTpl[2] == 1
return tTpl[0] % vexM | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dKc3(exwG, vexM):\n return N5DO(exwG, vexM)[0] % vexM",
"def GCaQ(Fg_i, exwG):\n Oa1e, WKvO, bGrB = HT_1(Fg_i, exwG)\n if Oa1e == 1:\n return WKvO % exwG",
"def divmod(jzdc, Fg_i, r8hN):\n return jzdc * f03v(Fg_i, r8hN) % r8hN",
"def NRd4(Fg_i, exwG):\n Oa1e, WKvO, bGrB = ML2l(Fg_i,... | [
"0.8061429",
"0.739382",
"0.71964836",
"0.7194514",
"0.7071983",
"0.70707107",
"0.70540667",
"0.7051217",
"0.70498675",
"0.6996551",
"0.6995346",
"0.6985655",
"0.6964284",
"0.69574136",
"0.69391924",
"0.68680876",
"0.6855621",
"0.68494207",
"0.68480295",
"0.6805411",
"0.67999... | 0.7784818 | 1 |
Create a new mint for this wallet. | async def api_cashu_create(nPrm: Cashu, hGMD: WalletTypeInfo=JHvC(N6nF)):
suzL = x1RP()
THSM = await zOs3.load_keyset(suzL)
ehOn = await O38p(cashu_id=suzL, keyset_id=THSM.id, wallet_id=hGMD.wallet.id, data=nPrm)
bo34.debug(ehOn)
return ehOn.dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DWdQ(YKHO, bJ0V: str, WEuV: str, Z5kt: int, i_PE: str='') -> 'tronpy.tron.TransactionBuilder':\n t14Q = YKHO.get_rcm()\n pB3N = {'from_amount': str(Z5kt), 'shielded_receives': {'note': {'value': Z5kt // YKHO.scale_factor, 'payment_address': WEuV, 'rcm': t14Q, 'memo': i_PE.encode().hex()}}, 'shielded_TRC2... | [
"0.66948634",
"0.6493066",
"0.6384242",
"0.62904364",
"0.6027431",
"0.5855139",
"0.5832718",
"0.57713294",
"0.57634526",
"0.57406515",
"0.5723993",
"0.5715021",
"0.5699066",
"0.5691405",
"0.5689624",
"0.56852746",
"0.5641545",
"0.55873483",
"0.55785674",
"0.5569972",
"0.55515... | 0.0 | -1 |
Multiply a and b. | def mEwV():
jzdc = int(QePW.args.get('a'))
Fg_i = int(QePW.args.get('b'))
Aofo = hObQ(jzdc, Fg_i)
return str(Aofo) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wTxu(YKHO, jzdc, Fg_i):\n return jzdc * Fg_i",
"def wTxu(jzdc, Fg_i):\n return jzdc * Fg_i",
"def wTxu(jzdc, Fg_i):\n return jzdc * Fg_i",
"def wTxu(jzdc, Fg_i):\n return jzdc * Fg_i",
"def wTxu(jzdc, Fg_i):\n return jzdc * Fg_i",
"def wTxu(jzdc, Fg_i):\n return jzdc * Fg_i + 1",
... | [
"0.8989252",
"0.838677",
"0.8333157",
"0.8333157",
"0.8333157",
"0.8331123",
"0.8323805",
"0.8262293",
"0.82050127",
"0.8202443",
"0.8202443",
"0.8202443",
"0.81645846",
"0.8060939",
"0.79793906",
"0.7945057",
"0.79105276",
"0.78411657",
"0.78411657",
"0.783812",
"0.7834109",... | 0.0 | -1 |
Calculates mu = sum(x) / length(x), sigma2 = (x mu)' (xmu) / length(x) | def VCjD(nPrm):
WKvO = qw7D(nPrm)
r8hN = len(WKvO)
yGTL = 1.0 * sum(WKvO) / r8hN
UkX0 = 1.0 * sum((WKvO - yGTL) ** 2) / r8hN
return (yGTL, UkX0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bN1p(e_2d):\n JBMS = sum(e_2d) / len(e_2d)\n i9Rn = 0.0\n for tpio in e_2d:\n i9Rn += (tpio - JBMS) ** 2\n z2bo = (i9Rn / (len(e_2d) - 1)) ** 0.5\n return (JBMS, z2bo)",
"def mbkz(YKHO, nPrm):\n nPrm = oyIN.transpose(nPrm, [0, 2, 1])\n yGTL = oyIN.mean(nPrm, axis=(0, 1))\n WTkW... | [
"0.7155619",
"0.7150913",
"0.70162654",
"0.69530547",
"0.6951194",
"0.67226475",
"0.66472447",
"0.65834475",
"0.65529734",
"0.65508056",
"0.654617",
"0.6528011",
"0.6527765",
"0.6503578",
"0.6450496",
"0.64238185",
"0.6405679",
"0.6392337",
"0.63822335",
"0.6376911",
"0.63680... | 0.62233007 | 38 |
Sort the list for the MayerViertoris blowup by dimension of sigma. | def hhfA(oO6_):
xuP5 = []
for Z9rn in oO6_:
YRbF = len(xuP5)
eOtH = True
while eOtH:
if YRbF == 0:
xuP5.insert(YRbF, Z9rn)
eOtH = False
elif xuP5[YRbF - 1].name.tuple[0].dimension > Z9rn.name.tuple[0].dimension:
YRbF... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XG57(eJh7, uQ_S, WTkW=0.1):\n yk4i = (eJh7.reshape(-1, 1) - uQ_S.reshape(1, -1)) ** 2\n qw8G = oyIN.exp(-yk4i / (2 * WTkW ** 2))\n return (qw8G.T / oyIN.sum(qw8G, axis=1)).T",
"def GBBF(YKHO):\n pxtC(YKHO.records['ll']['sigma'], XTiz.array([0.4736068]), 0.0001)",
"def D_Yj(INK1, WKvO, WTkW=0.1,... | [
"0.58615047",
"0.5758555",
"0.574648",
"0.5622294",
"0.55820656",
"0.5579199",
"0.5539611",
"0.5510902",
"0.54242766",
"0.53647786",
"0.5331984",
"0.5311901",
"0.5305927",
"0.5293818",
"0.5290352",
"0.5289576",
"0.5269409",
"0.523115",
"0.52221125",
"0.51989377",
"0.51976186"... | 0.71790814 | 0 |
Split (an optionally bracketed) commaseparated list into items and return a list containing them. If supplied then brackets must be a list of containing two strings, the first being the opening bracket and the second the closing bracket. | def WN62(zFiD, ZfUD=None, M6hN=',', b9TY=False, LXIT=None):
zFiD = zFiD.strip()
if not zFiD:
return []
if LXIT:
if not isinstance(LXIT, tuple):
raise _OuM('split_comma: brackets must be a tuple')
if len(LXIT) != 2:
raise _OuM('split_comma: brackets tuple must ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BvSz(FUjE):\n mXDZ = '\\\\s*\\\\[\\\\[(.*?)\\\\]\\\\]\\\\s*'\n yte9 = ZbWC.findall(mXDZ, FUjE)\n _Id0 = ZbWC.sub(mXDZ, ' ', FUjE).strip()\n _Id0 = ZbWC.split('[ \\\\n]', _Id0)\n return [ZfUD for ZfUD in _Id0 + yte9 if ZfUD]",
"def vKbd(zFiD, ZfUD=None):\n if zFiD.count('(') > 1 or zFiD.coun... | [
"0.7654805",
"0.7088404",
"0.6691426",
"0.6683003",
"0.66206783",
"0.62765694",
"0.6189558",
"0.6158569",
"0.6106173",
"0.60495025",
"0.60007375",
"0.5965837",
"0.59334916",
"0.59167206",
"0.5900208",
"0.58910173",
"0.5880009",
"0.58620024",
"0.5813828",
"0.576337",
"0.575500... | 0.61996573 | 6 |
Returns the solution! If `get_same_responses_only` is `True` this will return the part two solution. | def GERS(WbAn, rBI9=False):
return nVIP(aGny(WbAn), rBI9) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GERS(YKHO):\n return YKHO.results['solution']",
"def JJbR(YKHO):\n return YKHO._dual_solution",
"def Vg1S(YKHO):\n jbXL = YKHO.results.solution[0]\n YKHO.assertEqual(jbXL, YKHO.soln)",
"def b8V_():\n print(zD0C().solution)\n print(xpJC().solution)",
"def XP5J():\n return HYva().get... | [
"0.6297166",
"0.59520423",
"0.56559503",
"0.5646872",
"0.5628483",
"0.5561592",
"0.5561592",
"0.55396575",
"0.54873",
"0.5457027",
"0.5450483",
"0.54381615",
"0.54239076",
"0.539725",
"0.5387313",
"0.53753406",
"0.534747",
"0.53352034",
"0.53063285",
"0.53063285",
"0.5297859"... | 0.6656787 | 0 |
Used to rownormalize a coordinate formatspecified sparse matrix. Ignores rows past n_points. | def orOt(Pfcj, Csk6, KR0Q):
FCOy = oyIN.empty(Csk6.shape)
FtBq = [0.0 for YRbF in range(KR0Q)]
for YRbF in range(len(Pfcj)):
rdlD = Pfcj[YRbF]
if rdlD < KR0Q:
KCHu = FtBq[Pfcj[YRbF]]
FtBq[Pfcj[YRbF]] = KCHu + Csk6[YRbF]
for YRbF in range(len(Csk6)):
rdlD =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aB7J(YKHO) -> 'vnl_matrixSS &':\n return hBPC.vnl_matrixSS_normalize_rows(YKHO)",
"def aB7J(YKHO) -> 'vnl_matrixD &':\n return hBPC.vnl_matrixD_normalize_rows(YKHO)",
"def aB7J(YKHO) -> 'vnl_matrixSLL &':\n return hBPC.vnl_matrixSLL_normalize_rows(YKHO)",
"def U95B(WKvO):\n return WKvO / oyIN... | [
"0.71469307",
"0.69107026",
"0.67621773",
"0.67324066",
"0.67277074",
"0.67253894",
"0.671186",
"0.67063457",
"0.6700735",
"0.6682472",
"0.6638694",
"0.6509302",
"0.6499278",
"0.64852405",
"0.6446238",
"0.6437766",
"0.6411128",
"0.6405577",
"0.6404846",
"0.63426477",
"0.63426... | 0.6744299 | 3 |
Onehot representation of active task. | def gZgB(YKHO):
if YKHO._metaworld_mt:
return YKHO.env.active_task_one_hot
KLLm = oyIN.zeros(YKHO.task_space.shape)
d6pt = YKHO.active_task_index or 0
KLLm[d6pt] = YKHO.task_space.high[d6pt]
return KLLm | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V_jn(YKHO, W061):\n Thip = oyIN.concatenate([YKHO.active_task_one_hot, W061])\n return Thip",
"def sAJt(YKHO, xASv):\n veRW = oyIN.zeros((YKHO.params['batch_size'], 4))\n for YRbF in range(len(xASv)):\n veRW[YRbF][int(xASv[YRbF])] = 1\n return veRW",
"def sAJt(YKHO, xASv):\n veRW =... | [
"0.7290925",
"0.692509",
"0.692509",
"0.692509",
"0.6447307",
"0.64013195",
"0.6383244",
"0.6234951",
"0.62345237",
"0.62105465",
"0.61746114",
"0.6174539",
"0.61519176",
"0.6145527",
"0.61393195",
"0.612752",
"0.6127285",
"0.6118942",
"0.6115804",
"0.6112026",
"0.6111124",
... | 0.8434474 | 0 |
Return a list of splitted indices from a DataSet. Indices can be used with DataLoader to build a train and validation set. | def AZqj(__n6, NI2E=0.25, hXNa=False, igb0=0):
u54L = __n6.real_length()
_0VL = list(range(1, u54L))
if hXNa == True:
tuKI.seed(igb0)
tuKI.shuffle(_0VL)
if type(NI2E) is float:
lpha = pBSp(NI2E * u54L)
elif type(NI2E) is int:
lpha = NI2E
else:
raise ValueE... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eTG2(__n6):\n L6ao = __n6.get_idx_split()\n d8cP = L6ao['train']\n Icox = L6ao['valid']\n ILf9 = L6ao['test']\n DCb8 = set(d8cP)\n DCb8 = DCb8.union(set(Icox))\n DCb8 = DCb8.union(set(ILf9))\n return DCb8",
"def ryil(__n6: Dataset, ClYY: int, ebmv: Optional[str]=None, hXNa: bool=False... | [
"0.7623109",
"0.67916274",
"0.6781592",
"0.67144257",
"0.6680956",
"0.6500724",
"0.64686507",
"0.64608043",
"0.63589907",
"0.63464165",
"0.6203859",
"0.62005925",
"0.61886036",
"0.61413896",
"0.6130213",
"0.6114858",
"0.6108804",
"0.6105945",
"0.61059177",
"0.60963863",
"0.60... | 0.0 | -1 |
Return wether all values in 'mat' fall between low and high. | def C33m(vb7U, gqRb, ODP9):
return ht2j.all(ht2j.logical_and(vb7U >= 0, vb7U <= 1)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zoe8(SppC, XT48):\n for YRbF, r845 in Hs6x.product(XT48[0], XT48[1]):\n if SppC[YRbF][r845] == 2:\n return False\n return True",
"def gwAu(YKHO, gqRb=0, ODP9=255):\n return (YKHO.image >= gqRb) & (YKHO.image <= ODP9)",
"def M6Mc(vb7U: np.ndarray, DuZT: float, vP2v: bool=True) -> ... | [
"0.59351647",
"0.5734896",
"0.5616765",
"0.55753934",
"0.552726",
"0.5490868",
"0.5476805",
"0.54182285",
"0.5416051",
"0.5410317",
"0.5391028",
"0.52948743",
"0.52946776",
"0.5293854",
"0.52912045",
"0.5289918",
"0.5280116",
"0.52782965",
"0.52782965",
"0.5269024",
"0.526348... | 0.7684439 | 0 |
Retrieves the update link for this entity | def LzPG(YKHO) -> Qw_p:
return next(filter(lambda WKvO: WKvO.rel == 'edit', YKHO.links), None) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zxcn(YKHO):\n return YKHO.get_list_url() + '?action=update&pk=' + str(YKHO.pk)",
"def Zxcn(YKHO, zVa7, fJ6C, a0oU, DpZH):\n return '%s/%supdate?%s=%s,%d' % (YKHO.base_url, zVa7, fJ6C, a0oU, DpZH)",
"def HYjU(YKHO):\n return YKHO.link",
"def HYjU(YKHO):\n return YKHO.link",
"def HYjU(YKHO):\... | [
"0.7716517",
"0.65338194",
"0.60086644",
"0.60086644",
"0.60086644",
"0.60086644",
"0.59967816",
"0.5956207",
"0.5956207",
"0.59552836",
"0.5949278",
"0.59077626",
"0.58731747",
"0.58731747",
"0.58731747",
"0.5788589",
"0.57313365",
"0.57276547",
"0.5726313",
"0.5726313",
"0.... | 0.6991996 | 1 |
Calcular la cantidad de nacimientos para cada uno de los hospitales para el mes de Octubre de 2017 e indicar aquellos hospitales que superan el promedio de nacimientos mensuales | def p9OT(W8Zq, uywI) -> fHNa[int]:
S5IE = W8Zq[(W8Zq['mes_nacimiento'] == 10) & (W8Zq['anio_nacimiento'] == 2017)]
S5IE = S5IE.groupby('id_hospital').agg({'peso_al_nacer': 'count'})
XIcQ = rLdf.merge(S5IE, uywI, on='id_hospital', how='inner')
return set(XIcQ[XIcQ.peso_al_nacer > XIcQ.promedio_nacimiento... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def y1RG(jf_X, nmxw, sFQW, pEbB, aMDE):\n if jf_X == nmxw:\n sFQW += 1\n FVWV('Ganaste!!! → ', jf_X, sFQW, pEbB, aMDE)\n elif pEbB == 8:\n FVWV('Perdiste!!! → ', jf_X, sFQW, pEbB, aMDE)",
"def bYEM(pJSr):\n try:\n Z4mj = Q28N(pJSr)\n BKHh = TVt9()\n D0ln, lseK =... | [
"0.61445343",
"0.59555",
"0.58342",
"0.58148205",
"0.58036083",
"0.5800779",
"0.5715047",
"0.5689308",
"0.5683707",
"0.56715995",
"0.56285655",
"0.5619979",
"0.5592702",
"0.5588113",
"0.5581907",
"0.55671215",
"0.5557059",
"0.5542132",
"0.55286294",
"0.55260956",
"0.5517703",... | 0.5596905 | 12 |
Adds an edge to the graph. Distances are updated in case it replaces the same edge with higher costs. | def rz7z(YKHO, MxXY, cWFu, Z9rn):
if YKHO.graph.has_edge(MxXY, cWFu):
zXzD = YKHO.graph[MxXY][cWFu]['weight']
if zXzD > Z9rn:
YKHO.graph[MxXY][cWFu]['weight'] = Z9rn
return True
else:
return False
YKHO.graph.add_edge(MxXY, cWFu, weight=Z9rn)
return... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rz7z(YKHO, D70y):\n YKHO.edges.append(D70y)",
"def rz7z(YKHO, D70y):\n YKHO.edges.append(D70y)",
"def rz7z(YKHO, tTpl):\n Ty9i = tTpl.from_vertex()\n yzQ0 = tTpl.to_vertex()\n YKHO._validate_vertex(Ty9i)\n YKHO._validate_vertex(yzQ0)\n YKHO._adj[Ty9i].add(tTpl)\n YKHO._indegree[yzQ0... | [
"0.76660454",
"0.76660454",
"0.76215255",
"0.757307",
"0.75326",
"0.7499192",
"0.74760884",
"0.7459462",
"0.74061376",
"0.73963386",
"0.7381128",
"0.73606277",
"0.7344434",
"0.7300104",
"0.7298414",
"0.72849774",
"0.7252045",
"0.7223248",
"0.71974003",
"0.7188436",
"0.7185483... | 0.0 | -1 |
Add a vertex to the graph. | def ohmD(YKHO, oqUi):
YKHO.vertices[oqUi] = set() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ohmD(YKHO, SLBp):\n YKHO.vertices.append(SLBp)",
"def ohmD(YKHO, SLBp):\n Ty9i = Yegm(SLBp)\n YKHO._vertices[SLBp] = Ty9i",
"def ohmD(YKHO, SLBp):\n Ty9i = Yegm(SLBp)\n YKHO._vertices[SLBp] = Ty9i",
"def ohmD(YKHO, SLBp):\n Ty9i = Yegm(SLBp)\n YKHO._vertices[SLBp] = Ty9i",
"def ohm... | [
"0.876498",
"0.8674855",
"0.8674855",
"0.8674855",
"0.8674855",
"0.8674855",
"0.8655163",
"0.8531929",
"0.842015",
"0.84112304",
"0.8328189",
"0.8269451",
"0.8237771",
"0.82342374",
"0.8208921",
"0.8208921",
"0.817981",
"0.81537074",
"0.80292004",
"0.8029009",
"0.7977791",
... | 0.73068595 | 67 |
Add a directed edge to the graph. | def rz7z(YKHO, hQHm, jlSq):
if hQHm in YKHO.vertices and jlSq in YKHO.vertices:
YKHO.vertices[hQHm].add(jlSq)
else:
raise IndexError('Vertex does not exist in graph') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rz7z(YKHO, tTpl: DirectedEdge):\n YKHO.adj_list[tTpl.from_()].add(tTpl)",
"def WYRu(YKHO, hQHm, jlSq):\n if hQHm in YKHO.vertices:\n YKHO.vertices[hQHm].edges.add(jlSq)\n else:\n raise IndexError('That vertex does not exists!')",
"def rz7z(YKHO, D70y):\n aF0O, Br5Q = D70y\n YKH... | [
"0.79309064",
"0.77966154",
"0.7781488",
"0.7707925",
"0.7668771",
"0.7651526",
"0.7651526",
"0.7525656",
"0.74792147",
"0.7456717",
"0.7428733",
"0.74133873",
"0.7366123",
"0.7355302",
"0.7293762",
"0.7286324",
"0.7276579",
"0.7252237",
"0.72504747",
"0.72469753",
"0.722693"... | 0.0 | -1 |
Return a list containing a path from starting_vertex to destination_vertex in depthfirst order. | def K2kF(YKHO, mmUT, RVDX):
c7pe = {mmUT: None}
azXi = {mmUT}
E5BI = S9Ut()
E5BI.push(mmUT)
while E5BI.size() > 0:
jvSB = E5BI.pop()
if jvSB == RVDX:
break
for Ty9i in YKHO.get_neighbors(jvSB):
if Ty9i not in azXi:
c7pe[Ty9i] = jvSB
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W0UJ(E_MB, ohRA) -> list:\n return J7lT(E_MB, ohRA)",
"def K2kF(YKHO, mmUT, RVDX):\n E5BI = S9Ut()\n E5BI.push([mmUT])\n azXi = set()\n while E5BI.size() > 0:\n pmON = E5BI.pop()\n SLBp = pmON[-1]\n if SLBp not in azXi:\n if SLBp == RVDX:\n return... | [
"0.7783784",
"0.7404306",
"0.73785645",
"0.7354188",
"0.7340596",
"0.73011875",
"0.72949994",
"0.72733784",
"0.7263815",
"0.7223911",
"0.7188659",
"0.7181115",
"0.71477175",
"0.71432954",
"0.71327394",
"0.71116",
"0.71055573",
"0.7075222",
"0.70627594",
"0.70490324",
"0.70470... | 0.78847337 | 0 |
Load back the object from a json file. | def tyeH(Emd4, AGPF):
with open(AGPF, 'r') as ytgA:
HVIF = afQN(0, 0)
OE44 = qQXR.load(ytgA)
HVIF.portfolio_name = OE44['portfolio_name']
HVIF.initial_cash = OE44['initial_cash']
HVIF.total_nav = OE44['total_nav']
HVIF.cash = OE44['cash']
HVIF.commission_rate ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WEhu(nUeQ):\n with open(nUeQ, 'rb') as input:\n YbAN = qQXR.load(input)\n return YbAN",
"def KrsJ(pmON: str) -> object:\n with open(pmON, encoding='utf-8') as Fwbn:\n return WEhu(Fwbn)",
"def AXOg(YKHO):\n with open(f'{YKHO.directory}/{YKHO.filename}') as nUeQ:\n return qQX... | [
"0.84290785",
"0.8267407",
"0.82113355",
"0.8094509",
"0.80385715",
"0.7972202",
"0.7957067",
"0.7949054",
"0.79385614",
"0.79305464",
"0.7903255",
"0.78799057",
"0.7850283",
"0.7850283",
"0.7846649",
"0.78438723",
"0.7841657",
"0.78171235",
"0.7812323",
"0.7802077",
"0.78008... | 0.0 | -1 |
Store edges in a dict where the keys are the edge times | def WqKt(GRLv):
CHKC = {}
for YRbF in range(len(GRLv)):
vHj7 = GRLv[YRbF, 0]
if not vHj7 in CHKC:
CHKC[vHj7] = []
CHKC[vHj7].append(GRLv[YRbF, 1:3].tolist())
NNym = sorted(CHKC.keys())
print('Number of unique epochs: ' + str(len(NNym)))
return (NNym, CHKC, len(GRL... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X_rT(mC4V=None):\n if HwRy.version_info.minor < 6:\n from collections import OrderedDict\n v4Nw = OrderedDict()\n else:\n v4Nw = dict()\n if mC4V is not None:\n for YRbF, r845 in mC4V:\n H5ew = '%d,%d' % (YRbF, r845)\n if H5ew in v4Nw:\n ... | [
"0.69003004",
"0.67325515",
"0.6692976",
"0.66588545",
"0.6502578",
"0.6490292",
"0.6486416",
"0.639544",
"0.636207",
"0.63488096",
"0.6335997",
"0.6309564",
"0.6297903",
"0.62861395",
"0.628307",
"0.62775373",
"0.62770444",
"0.62707996",
"0.6264157",
"0.62446576",
"0.6220951... | 0.76275057 | 0 |
Get the target attribute | def BK83(YKHO) -> GFJP.Attribute:
return YKHO.metadata.target_column | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pan_(YKHO):\n if YKHO._target_present:\n return YKHO._target_value\n else:\n raise AttributeError(\"missing required field 'target'\")",
"def zldD(YKHO):\n return YKHO.target",
"def zldD(YKHO):\n return YKHO.target",
"def BK83(YKHO):\n return YKHO.target",
"def BK83(YKHO):\... | [
"0.76406354",
"0.7396005",
"0.72801",
"0.7232282",
"0.7196403",
"0.7140856",
"0.70721",
"0.7016224",
"0.69850445",
"0.69850445",
"0.69850445",
"0.69850445",
"0.69850445",
"0.6958801",
"0.69558895",
"0.694731",
"0.69212407",
"0.6811704",
"0.6811704",
"0.6811704",
"0.6811704",
... | 0.7193692 | 5 |
(Cimpl.Image) > None Convert the specified picture into a grayscale image with improved results takes human perception into account >>> image = load_image(choose_file()) >>> weighted_grayscale(image) >>> show(image) | def tYal(VXjJ):
for e3Fk in VXjJ:
WKvO, LVAh, fvDH = e3Fk
Mkmy, Oa1e, Fg_i = fvDH
QhUx = Mkmy * 0.299
mTCQ = Mkmy * 0.587
X7qy = Mkmy * 0.114
wUlJ = QhUx + mTCQ + X7qy
ITiw = egIk(wUlJ, wUlJ, wUlJ)
rqSI(VXjJ, WKvO, LVAh, ITiw) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zI1D(LNo8, _mSQ):\n return oyIN.dot(LNo8, [0.299, 0.587, 0.144])",
"def tYal(LNo8):\n FHlE = jth9(LNo8)\n for WKvO, LVAh, (Mkmy, Oa1e, Fg_i) in LNo8:\n asva = Mkmy * 0.299 + Oa1e * 0.587 + Fg_i * 0.114\n ITiw = egIk(asva, asva, asva)\n rqSI(FHlE, WKvO, LVAh, ITiw)\n return FH... | [
"0.732109",
"0.73054326",
"0.7261529",
"0.71303296",
"0.6803749",
"0.6729673",
"0.66180813",
"0.661457",
"0.6605464",
"0.6593452",
"0.6554813",
"0.6554813",
"0.6532551",
"0.6512843",
"0.65096056",
"0.65086657",
"0.647765",
"0.64724606",
"0.64496225",
"0.644948",
"0.644478",
... | 0.7055449 | 4 |
(Cimpl.Image,float)>None Modify the specified image using edge detection. An edge is detected when a pixel's brightness differs from that of its neighbour by an amount that is greater then the specified threshold. >>>image=load_image(choose_file()) >>>detect_edges_better(image,10.0) >>>show(image) | def bnks(VXjJ, gwAu):
for LVAh in range(1, xglF(VXjJ) - 1):
for WKvO in range(1, V8C_(VXjJ) - 1):
GLHo, jGoe, pWQs = PICn(VXjJ, WKvO, LVAh)
NW3T, Kvb4, SoJu = PICn(VXjJ, WKvO, LVAh + 1)
JkP1, bG1s, MKSa = PICn(VXjJ, WKvO + 1, LVAh)
Zrmn = (GLHo + jGoe + pWQs) ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bnks(LNo8, gwAu):\n AX3l = egIk(255, 255, 255)\n z13o = egIk(0, 0, 0)\n FHlE = jth9(LNo8)\n for WKvO in range(1, V8C_(LNo8) - 1):\n for LVAh in range(1, xglF(LNo8) - 1):\n Mkmy, Oa1e, Fg_i = PICn(LNo8, WKvO, LVAh)\n yKIT, dY8P, V2zj = PICn(LNo8, WKvO, LVAh + 1)\n ... | [
"0.78542095",
"0.7812594",
"0.76963043",
"0.7690333",
"0.7537787",
"0.750254",
"0.7472193",
"0.738702",
"0.7274967",
"0.72250736",
"0.705448",
"0.70070463",
"0.69663846",
"0.6893311",
"0.6885185",
"0.68665004",
"0.68312794",
"0.67560816",
"0.66989475",
"0.66862345",
"0.666546... | 0.80094093 | 0 |
saves an object into a json file | def ncJT(WKvO, VqRE):
with open(Hy7s.path.join(Qeo_, VqRE), 'w') as _RR0:
qQXR.dump(WKvO, _RR0, sort_keys=True, indent=4, separators=(',', ': ')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ncJT(object, nUeQ):\n with open(nUeQ, 'wb') as hlel:\n qQXR.dump(object, hlel)",
"def M8gv(YEnM, Ux0P):\n with open(Ux0P, 'w') as nUeQ:\n qQXR.dump(YEnM, nUeQ, cls=uXd0)",
"def ncJT(IznC, YEnM):\n with open(IznC, 'w') as eHNT:\n eHNT.write(qQXR.dumps(YEnM))",
"def eGRE(YEnM,... | [
"0.8694908",
"0.847777",
"0.8471914",
"0.8414604",
"0.8412307",
"0.8377346",
"0.83633447",
"0.8350993",
"0.8350993",
"0.83374596",
"0.83309406",
"0.83219385",
"0.8295184",
"0.8287733",
"0.82841945",
"0.8262892",
"0.8262892",
"0.8262721",
"0.82618135",
"0.825302",
"0.8253007",... | 0.0 | -1 |
loads a json file from the relative path given | def WEhu(VqRE):
with open(Hy7s.path.join(Qeo_, VqRE), 'r') as apum:
z21l = qQXR.load(apum)
return z21l | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M0GL(pmON):\n pGKR = TLI7(xAKo)\n with xDSY.open(gzes(pGKR, pmON), encoding='utf-8') as nUeQ:\n hGN5 = nUeQ.read()\n return qQXR.loads(hGN5)",
"def V9dS(nUeQ):\n EY3W = GkAb(nUeQ)\n if EY3W.is_file():\n nPrm = qQXR.load(open(nUeQ))\n else:\n print('json file or director... | [
"0.8145823",
"0.80854666",
"0.8014892",
"0.79398453",
"0.7872433",
"0.78705615",
"0.7820118",
"0.78060114",
"0.77991635",
"0.77939993",
"0.7785498",
"0.7768594",
"0.7764777",
"0.77608764",
"0.7728337",
"0.77207536",
"0.7704924",
"0.7676682",
"0.76450115",
"0.76233006",
"0.760... | 0.7470156 | 27 |
Returns the current RGB color of the led. an integer corresponding to the current RGB color of the led On failure, throws an exception or returns YColorLed.RGBCOLOR_INVALID. | def NHwy(YKHO):
if YKHO._cacheExpiration <= NA0M.GetTickCount():
if NA0M.YISERR(YKHO.load(NA0M.DefaultCacheValidity)):
return OSiy.RGBCOLOR_INVALID
return YKHO._rgbColor | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oRbD(YKHO):\n YKHO._write_bytes(yEUM)\n Mkmy, Oa1e, Fg_i = YKHO._read_bytes(3)\n return (Mkmy, Oa1e, Fg_i)",
"def Cs0X(YKHO):\n ZbVW = 'rgb_color'\n return YKHO._get_return_value(ZbVW, YKHO._state_hue)",
"def Cs0X(YKHO) -> tuple[int, int, int] | None:\n QTBn = YKHO._state\n if not YKHO... | [
"0.7809408",
"0.78081614",
"0.76075274",
"0.748933",
"0.74859506",
"0.7389252",
"0.73677105",
"0.73322815",
"0.7258367",
"0.7225831",
"0.72161824",
"0.71961623",
"0.71961623",
"0.7179814",
"0.7162502",
"0.7145726",
"0.71255016",
"0.7122031",
"0.7122031",
"0.71180695",
"0.7111... | 0.8586351 | 0 |
Returns the configured color to be displayed when the module is turned on. an integer corresponding to the configured color to be displayed when the module is turned on On failure, throws an exception or returns YColorLed.RGBCOLORATPOWERON_INVALID. | def Jolx(YKHO):
if YKHO._cacheExpiration <= NA0M.GetTickCount():
if NA0M.YISERR(YKHO.load(NA0M.DefaultCacheValidity)):
return OSiy.RGBCOLORATPOWERON_INVALID
return YKHO._rgbColorAtPowerOn | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def O6Pu(YKHO):\n if YKHO.get_powergood_status():\n return YKHO.STATUS_LED_COLOR_GREEN\n else:\n return YKHO.STATUS_LED_COLOR_OFF",
"def NHwy(YKHO):\n if YKHO._cacheExpiration <= NA0M.GetTickCount():\n if NA0M.YISERR(YKHO.load(NA0M.DefaultCacheValidity)):\n return OSiy.RG... | [
"0.75338465",
"0.7385169",
"0.73730487",
"0.72104466",
"0.71628875",
"0.69934154",
"0.6991926",
"0.6948267",
"0.69363785",
"0.6902542",
"0.68703854",
"0.68565536",
"0.68385893",
"0.68231386",
"0.6788329",
"0.6783506",
"0.6781352",
"0.6781352",
"0.67133826",
"0.6712496",
"0.67... | 0.82526284 | 0 |
Tests that device category filter returns requested results. | def K6rF(YKHO, r8hN):
r8hN.post(el5c.LOGIN_URL, text=ccXJ.post_response_ok())
r8hN.get(el5c.OAUTH_TOKEN_URL, text=EZcK.get_response_ok())
r8hN.post(el5c.LOGOUT_URL, text=_1nf.post_response_ok())
r8hN.get(el5c.PANEL_URL, text=TQOv.get_response_ok(mode=el5c.MODE_STANDBY))
Pr5E = '[' + d4TU.device(devi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vl6z(YKHO):\n pass",
"def fBlK(YKHO):\n YKHO._product.variations.all().delete()\n YKHO.assertCategoryFilteredProducts(0)\n o4Rl, xAU6 = list(YKHO._options.items())[0]\n hpNF, mAnY = xAU6[:2]\n YKHO._product.variations.create_from_options({o4Rl: [hpNF]})\n MTKo = Tv3u.objects.get(type=o4R... | [
"0.6918223",
"0.67670715",
"0.6765367",
"0.6754144",
"0.67416054",
"0.66870624",
"0.66708994",
"0.6610571",
"0.6436663",
"0.6433528",
"0.64317244",
"0.64299244",
"0.6408678",
"0.63686424",
"0.6365271",
"0.6343973",
"0.6267071",
"0.62521386",
"0.62317413",
"0.6226893",
"0.6213... | 0.8056249 | 0 |
Tests that device level changes work as expected. | def SKU_(YKHO, r8hN):
r8hN.post(el5c.LOGIN_URL, text=ccXJ.post_response_ok())
r8hN.get(el5c.OAUTH_TOKEN_URL, text=EZcK.get_response_ok())
r8hN.post(el5c.LOGOUT_URL, text=_1nf.post_response_ok())
r8hN.get(el5c.PANEL_URL, text=TQOv.get_response_ok(mode=el5c.MODE_STANDBY))
r8hN.get(el5c.DEVICES_URL, te... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BAUD(YKHO, r8hN):\n r8hN.post(el5c.LOGIN_URL, text=ccXJ.post_response_ok())\n r8hN.get(el5c.OAUTH_TOKEN_URL, text=EZcK.get_response_ok())\n r8hN.post(el5c.LOGOUT_URL, text=_1nf.post_response_ok())\n r8hN.get(el5c.PANEL_URL, text=TQOv.get_response_ok(mode=el5c.MODE_STANDBY))\n r8hN.get(el5c.DEVIC... | [
"0.71710616",
"0.69185555",
"0.67771584",
"0.65928006",
"0.6565753",
"0.6525432",
"0.64377576",
"0.63834757",
"0.63765013",
"0.63480204",
"0.63254356",
"0.63190424",
"0.62229615",
"0.6209714",
"0.6209352",
"0.6208221",
"0.6180075",
"0.61543643",
"0.6152327",
"0.61486644",
"0.... | 0.8419699 | 0 |
Constructor for the Tokenizer. | def FIMM(YKHO, qxS6, dNli):
G9jH.debug('Tokenizer::init token_string=%s' % dNli)
YKHO.token_re = qxS6
YKHO.token_string = dNli
YKHO.originals = [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, l5Ny, b0j5, UXqs, wzH_=512):\n YKHO.text = l5Ny\n YKHO.label = UXqs\n YKHO.max_len = wzH_\n YKHO.tokenizer = b0j5",
"def FIMM(YKHO, b0j5=None):\n\n def wr3U(l5Ny):\n return BfDw.tokenize(l5Ny, lowercase=True)\n YKHO._tokenize = b0j5 or wr3U",
"def FIMM(YKHO, **qIxc):\n ... | [
"0.7672179",
"0.76463354",
"0.7638809",
"0.7547432",
"0.74137133",
"0.7381671",
"0.72828466",
"0.72557354",
"0.72557354",
"0.7204003",
"0.7166431",
"0.71156424",
"0.70797366",
"0.70604086",
"0.70563465",
"0.7049812",
"0.70475835",
"0.70420766",
"0.70213157",
"0.696703",
"0.69... | 0.80207723 | 0 |
Returns weighted KL divergence between distributions q and p. | def TJ2z(vz4J, qTZE, jTqs):
if jTqs == 2:
vexM = ZylS.nn.sigmoid(vz4J)
bISY = -ZylS.nn.sigmoid_cross_entropy_with_logits(logits=vz4J, labels=vexM) + ZylS.nn.sigmoid_cross_entropy_with_logits(logits=qTZE, labels=vexM)
bISY = ZylS.squeeze(bISY)
else:
vexM = ZylS.nn.softmax(vz4J)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dzAH(XP5J, vexM):\n return XP5J * RKD7(XP5J / vexM) + (1.0 - XP5J) * RKD7((1.0 - XP5J) / (1.0 - vexM))",
"def dzAH(XP5J, vexM):\n XP5J = oyIN.asarray(XP5J, dtype=oyIN.float)\n vexM = oyIN.asarray(vexM, dtype=oyIN.float)\n mYb5 = 0\n g95K = 0\n for YRbF in range(0, XP5J.size):\n if XP... | [
"0.7970804",
"0.78746617",
"0.7839907",
"0.7754461",
"0.7748328",
"0.7746438",
"0.76097155",
"0.7590641",
"0.7368349",
"0.7353148",
"0.73472387",
"0.72067785",
"0.7171708",
"0.71263975",
"0.71263975",
"0.7095894",
"0.7056278",
"0.70165664",
"0.7016558",
"0.69936156",
"0.69784... | 0.61896133 | 70 |
Get surrent speed setting in mm/s. | def ERGf(YKHO):
yvT9 = YKHO._command('SP ?, ?')
yvT9 = yvT9.split(',')
Ldmx = float(yvT9[0]) / vaWu
QA7v = float(yvT9[1]) / rpaG
print('Current speed: X %0.1f Y %0.1f mm/s' % (Ldmx, QA7v))
return Ldmx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ERGf(YKHO):\n return YKHO.__speed",
"def ERGf(YKHO):\n return YKHO.__speed",
"def ERGf(YKHO):\n return YKHO._speed",
"def ERGf(YKHO):\n return YKHO._speed",
"def DDP8(YKHO):\n return YKHO._get_value('SPEED')",
"def ERGf(YKHO):\n XP5J = YKHO._get_sub_text('speed')\n if not XP5J:\n... | [
"0.74812037",
"0.74812037",
"0.74741346",
"0.74667555",
"0.74666697",
"0.73288673",
"0.7308252",
"0.72749186",
"0.7261009",
"0.7257412",
"0.7257412",
"0.7257412",
"0.72314906",
"0.720885",
"0.7194519",
"0.7194519",
"0.7181451",
"0.71722937",
"0.7147516",
"0.7109621",
"0.70666... | 0.7491788 | 0 |
Deterministic heuristic to get head of subtree. | def tmL8(QToG):
sdCG = None
JHg6 = None
for aUGN in QToG:
if not len(aUGN):
JHg6 = aUGN.get('label')
sdCG = IYvb(aUGN.text.strip())
return (sdCG, JHg6)
return (sdCG, JHg6) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zGab(U7TE, XSoh, DpDo):\n for tmoj in DpDo:\n sdCG = wjwA(U7TE, XSoh, [tmoj])\n if sdCG:\n return sdCG\n if XSoh:\n return U7TE[0]\n else:\n return U7TE[-1]",
"def coTx(U7TE):\n if type(U7TE) == QMSQ or type(U7TE) == str:\n return U7TE\n if U7TE.no... | [
"0.7066313",
"0.68283665",
"0.67365897",
"0.659327",
"0.65112436",
"0.6510973",
"0.64509",
"0.64455444",
"0.643212",
"0.6403913",
"0.6362216",
"0.6355796",
"0.63286585",
"0.6325883",
"0.6304585",
"0.62694275",
"0.6265499",
"0.624139",
"0.61834574",
"0.6173024",
"0.61590046",
... | 0.0 | -1 |
The password that will successfully authenticiate with the server. | def jTXt(YKHO) -> str:
return YKHO._password | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QVq7(YKHO):\n return YKHO.password",
"def jTXt(YKHO):\n return YKHO._get('password')",
"def jTXt(YKHO):\n return YKHO.data.password",
"def jTXt(YKHO):\n return YKHO._data.get('password')",
"def jTXt(YKHO):\n return YKHO._data.get('password')",
"def QVq7(YKHO):\n return YKHO._passwor... | [
"0.8340216",
"0.8274553",
"0.82203996",
"0.8214948",
"0.8214948",
"0.8176973",
"0.8176973",
"0.8176973",
"0.81424135",
"0.8137542",
"0.8109199",
"0.8109199",
"0.8109199",
"0.8109199",
"0.81015027",
"0.80751586",
"0.80751586",
"0.80751586",
"0.80751586",
"0.80751586",
"0.80751... | 0.78824085 | 48 |
Take a position (optionally on the temporary board), return True if the Square is empty. | def lJk_(dQgj: str, _mQX: bool=False) -> bool:
WKvO, LVAh = aPd6.convertPositionToCoordinate(dQgj)
PENY = o4sw.getBoardObject(_mQX)
if len(PENY[LVAh][WKvO]) == 0:
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def punv(dQgj, iBIi):\n if iBIi[dQgj[0]][dQgj[1]] == '-':\n return True\n return False",
"def punv(dQgj, iBIi):\n return iBIi[dQgj[0]][dQgj[1]] == '-'",
"def Ntn2(YKHO, BHsk):\n lsmZ = False\n if YKHO.board[BHsk[0]][BHsk[1]] == None:\n lsmZ = True\n return lsmZ",
"def panj(iBI... | [
"0.8003667",
"0.78289396",
"0.75995725",
"0.74899405",
"0.73868144",
"0.7379641",
"0.722288",
"0.7205843",
"0.71753687",
"0.71695924",
"0.7165246",
"0.7152469",
"0.7139966",
"0.70633435",
"0.70462203",
"0.70116407",
"0.6969108",
"0.6969108",
"0.69404256",
"0.6938119",
"0.6936... | 0.7885946 | 1 |
Take endPosition and an axis, raise an Error if both are None. Return True otherwise. | def oH8z(Bo1q: str, jDK_: str) -> bool:
if jDK_ is None and Bo1q is None:
raise AttributeError('\n Either axis or endPosition must be given.\n ')
else:
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IOzI(YKHO, yKcO: tuple, Os4s: tuple):\n WKvO, LVAh, pImw = YKHO.vector(yKcO, Os4s)\n return abs(WKvO) == 0 and abs(LVAh) != 0 or (abs(LVAh) == 0 and abs(WKvO) != 0)",
"def GNCp(i4Va, rUTj):\n LZXU = oyIN.isclose(i4Va[0], rUTj[0])\n if not LZXU:\n d3SF = oyIN.isclose(i4Va[1], rUTj[1])\n ... | [
"0.6135605",
"0.60954237",
"0.60931677",
"0.6047007",
"0.6039839",
"0.6012964",
"0.5999659",
"0.59556764",
"0.5940318",
"0.5924563",
"0.5873867",
"0.5788669",
"0.57693195",
"0.57684636",
"0.5709989",
"0.568328",
"0.56761533",
"0.5631136",
"0.56193364",
"0.55979776",
"0.558579... | 0.8652113 | 0 |
Loads a YAML file from given path, a wrapper to load() | def J2u4(YKHO, Ux0P: str, QF7s: str):
qaEx = YKHO.find_path_by_name(Ux0P, '')
if not qaEx:
raise FileNotFoundError('YAML file "%s" not found in any of lookup paths: %s' % (Ux0P, str(YKHO.get_lookup_paths(''))))
with open(qaEx, 'rb') as eHNT:
return YKHO.load(eHNT.read(), QF7s) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f9B0(pmON):\n pmON = GkAb(pmON)\n RKD7.debug('Reading {}'.format(pmON))\n with pmON.open() as Ga6V:\n nPrm = eJb6.safe_load(Ga6V)\n return nPrm",
"def MfvL(SFUd):\n with open(SFUd, 'r') as eHNT:\n t44K = eJb6.safe_load(eHNT)\n return t44K",
"def xRMc(pmON: Union[Path, str]):... | [
"0.8493894",
"0.8464533",
"0.82639474",
"0.82256085",
"0.8210118",
"0.81863374",
"0.81656665",
"0.8149486",
"0.8121825",
"0.81083953",
"0.8065042",
"0.8065042",
"0.80480343",
"0.8028781",
"0.7881119",
"0.7876307",
"0.78508663",
"0.7841712",
"0.7808202",
"0.7792526",
"0.778934... | 0.0 | -1 |
Return encoded URL parameters that are the same as the current request's parameters, only with the specified GET parameters added or changed. It also removes any empty parameters to keep things neat, so you can remove a parm by setting it to ``""``. For example, if you're on the page ``/things/?with_frosting=true&page=... | def j546(QpfX, **B2fa):
Csk6 = QpfX['request'].GET.copy()
for G1Hx, Ty9i in B2fa.items():
Csk6[G1Hx] = Ty9i
for G1Hx in [G1Hx for G1Hx, Ty9i in Csk6.items() if not Ty9i]:
del Csk6[G1Hx]
return Csk6.urlencode() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AcHs(QpfX, **B2fa):\n QePW = QpfX['request']\n NArs = QePW.GET.copy()\n for H5ew, BWXx in B2fa.items():\n if BWXx == '':\n if H5ew in NArs:\n del NArs[H5ew]\n else:\n NArs[H5ew] = BWXx\n return '?' + NArs.urlencode() if NArs else ''",
"def rldq(Q... | [
"0.7691945",
"0.744313",
"0.71460366",
"0.7117897",
"0.70287824",
"0.6952436",
"0.6867641",
"0.6797193",
"0.6731436",
"0.67119586",
"0.67069143",
"0.66849566",
"0.6560607",
"0.65539956",
"0.6528513",
"0.6507315",
"0.6506605",
"0.6503217",
"0.65008134",
"0.6496696",
"0.6482896... | 0.72044826 | 2 |
Finds the k nearest neighbors of point p and returns their indices | def boAI(XP5J, LTIa, G1Hx=3):
TaUL = oyIN.zeros(LTIa.shape[0])
for YRbF in range(len(TaUL)):
TaUL[YRbF] = Ayfi(XP5J, LTIa[YRbF])
QyVM = TaUL.argsort()
return QyVM[:G1Hx] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def alIi(XP5J, LTIa, G1Hx=3):\n TaUL = oyIN.zeros(LTIa.shape[0])\n for YRbF in range(len(TaUL)):\n TaUL[YRbF] = Ayfi(XP5J, LTIa[YRbF])\n QyVM = oyIN.argsort(TaUL)\n return QyVM[:G1Hx]",
"def boAI(XP5J, LTIa, G1Hx=5):\n TaUL = oyIN.zeros(LTIa.shape[0])\n for YRbF in range(len(TaUL)):\n ... | [
"0.8680768",
"0.8674053",
"0.85228324",
"0.80653405",
"0.8022114",
"0.7908549",
"0.7841853",
"0.7642256",
"0.7592308",
"0.7589466",
"0.7564072",
"0.752863",
"0.75081325",
"0.7456062",
"0.744215",
"0.7391337",
"0.7338199",
"0.73363894",
"0.733534",
"0.73171574",
"0.73171574",
... | 0.86867046 | 0 |
Collate the the list of samples into batches. For each patient, you need to pad the diagnosis sequences to the sample shape (max visits, max diagnosis codes). The padding infomation is stored in `mask`. | def QxcP(nPrm):
jWe2, Crrw = zip(*nPrm)
LVAh = ht2j.tensor(Crrw, dtype=ht2j.float)
xg5p = len(jWe2)
RTwz = [len(lhUb) for lhUb in jWe2]
vCRY = [len(TClq) for lhUb in jWe2 for TClq in lhUb]
v3Wk = max(RTwz)
Su6D = max(vCRY)
WKvO = ht2j.zeros((xg5p, v3Wk, Su6D), dtype=ht2j.long)
G4jV =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X8fE(YKHO, Wc9F):\n Ys30 = max([len(a1PO) for a1PO in Wc9F])\n ty06, aHnM = ([], [])\n for a1PO in Wc9F:\n Kt_s = len(a1PO)\n aHnM.append(Kt_s)\n ty06.append(a1PO + [YKHO.pad_value] * (Ys30 - Kt_s))\n return [oyIN.array(ty06), oyIN.array(aHnM)]",
"def X8fE(YKHO, Wc9F):\n Y... | [
"0.669869",
"0.6375241",
"0.63562506",
"0.63421845",
"0.6231665",
"0.61268",
"0.60923535",
"0.6088733",
"0.6046679",
"0.60180753",
"0.6013876",
"0.59766775",
"0.59556675",
"0.5922042",
"0.5916464",
"0.5902993",
"0.5891904",
"0.5843768",
"0.5842647",
"0.58390474",
"0.58378327"... | 0.55496657 | 68 |
The entrance pupil is the image of the aperture stop as seen from the object. To obtain this image, we simply need to know the tranfer matrix to the aperture stop, then find the "backward" conjugate, which means finding the position of the "image" (the entrance pupil) that would lead to the "object" (aperture stop) at ... | def OaeA(YKHO):
if YKHO.hasFiniteApertureDiameter():
tgQ1, lMBG = YKHO.apertureStop()
ZzEo = YKHO.transferMatrix(upTo=tgQ1)
_aHI, n_zk = ZzEo.backwardConjugate()
kS4z, chGK = n_zk.magnification()
return (-_aHI, lMBG / kS4z)
else:
return (None, None) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OaeA(YKHO):\n if YKHO.hasFiniteApertureDiameter():\n tgQ1, lMBG = YKHO.apertureStop()\n ZzEo = YKHO.transferMatrix(upTo=tgQ1)\n _aHI, n_zk = ZzEo.backwardConjugate()\n if n_zk is None:\n return pm1c(None, None)\n else:\n kS4z, chGK = n_zk.magnificatio... | [
"0.7585605",
"0.5804804",
"0.5700191",
"0.5688253",
"0.5631201",
"0.56217486",
"0.5584807",
"0.5561969",
"0.5484341",
"0.5478785",
"0.54637927",
"0.54324204",
"0.5424398",
"0.537242",
"0.53687084",
"0.53564245",
"0.5299538",
"0.52938884",
"0.52714837",
"0.5254118",
"0.5241937... | 0.779859 | 0 |
The field stop is the aperture that limits the image size (or field of view) Returns the position and diameter of the field stop. | def wTPq(YKHO):
KMeR, Vo9x = YKHO.apertureStop()
b4l8 = None
u1PL = float('+Inf')
if YKHO.hasFiniteApertureDiameter() and KMeR != 0:
eUWA = YKHO.precision * 100
LVAh = 0.0
TXPt = False
ynhL = []
while abs(eUWA) > YKHO.precision or not TXPt:
xZt3 = YKHO... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wTPq(YKHO):\n KMeR, Vo9x = YKHO.apertureStop()\n b4l8 = None\n u1PL = float('+Inf')\n if YKHO.hasFiniteApertureDiameter() and KMeR != 0:\n eUWA = YKHO.precision * 100\n LVAh = 0.0\n TXPt = False\n ynhL = []\n while abs(eUWA) > YKHO.precision or not TXPt:\n ... | [
"0.75306004",
"0.71099067",
"0.7037768",
"0.66567796",
"0.6514882",
"0.64769",
"0.5997077",
"0.59963274",
"0.59963274",
"0.59963274",
"0.59963274",
"0.5981938",
"0.58255607",
"0.571322",
"0.5698102",
"0.5682837",
"0.5635225",
"0.56161815",
"0.5533028",
"0.55294853",
"0.552609... | 0.77213335 | 0 |
Set metadata. Note that Nova adds key/value pairs into metadata instead of replacement. | def kUXN(YKHO, mcAH, ojPI):
try:
YKHO.nova.aggregates.set_metadata(mcAH, ojPI)
except Exception:
YKHO.logger.error(wVCK.format_exc())
return 'error while setting metadata of host-aggregate in Nova'
return 'ok' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HSI9(YKHO, rqDn, rilJ):\n YKHO._metadata[rqDn] = rilJ",
"def HSI9(YKHO, DUYk):\n YKHO.metadata = DUYk",
"def HSI9(YKHO, H5ew, yIVm):\n raise NotImplementedError",
"def HSI9(YKHO, yIVm):\n YKHO.metadata = yIVm\n return YKHO",
"def HSI9(YKHO, yIVm):\n YKHO.metadata = yIVm\n return YK... | [
"0.76193535",
"0.75097114",
"0.73806113",
"0.7311367",
"0.7311367",
"0.7299273",
"0.71999145",
"0.7178453",
"0.7171079",
"0.7097567",
"0.7077266",
"0.7034608",
"0.7016993",
"0.7014381",
"0.69903773",
"0.69829106",
"0.6975871",
"0.6945217",
"0.6936654",
"0.69067556",
"0.689392... | 0.0 | -1 |
A list of scaled gradient Tensors. | def wBiF(YKHO):
return YKHO._scaled_grads | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gMD7(YKHO, vtNT):\n Vpyj = YKHO._loss_scale()\n bDWE = 1.0 / Vpyj\n return [Oa1e * qkSJ.cast(bDWE, Oa1e.dtype) if Oa1e is not None else None for Oa1e in vtNT]",
"def N_Q3(N77f, kc1W, Vpyj):\n return [Ro40 / Vpyj for Ro40 in ZylS.gradients(N77f * Vpyj, kc1W)]",
"def N_Q3(N77f, kc1W, Vpyj):\n ... | [
"0.6330024",
"0.6293484",
"0.6293484",
"0.61042106",
"0.59946275",
"0.5931798",
"0.59178513",
"0.5891126",
"0.58708835",
"0.58265775",
"0.58044565",
"0.5776663",
"0.57153773",
"0.5714488",
"0.5644887",
"0.56271327",
"0.5595447",
"0.5585929",
"0.5543423",
"0.5543423",
"0.55327... | 0.54710287 | 24 |
given a list of items containing keyvalue pairs, flatten into a sorted list of unique keyvalue pairs | def uitd(tZK9):
return sorted(list(set(Hs6x.chain.from_iterable([LihS.keys() for LihS in tZK9])))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZD05(DumB):\n from collections import OrderedDict\n return list(OrderedDict.fromkeys(DumB))",
"def CB08(list, H5ew):\n list.sort(key=lambda WKvO: WKvO[H5ew])\n return [G1Hx for G1Hx, Ty9i in wk71(list, key=lambda WKvO: WKvO[H5ew])]",
"def aIUk(DumB):\n return list(set(DumB))",
"def AGIn(HU... | [
"0.76916647",
"0.74000996",
"0.7327066",
"0.7230507",
"0.71430653",
"0.70055425",
"0.6924804",
"0.68556273",
"0.6829881",
"0.6812171",
"0.6784377",
"0.6735344",
"0.67021894",
"0.66926026",
"0.6684634",
"0.6594531",
"0.65802",
"0.65539616",
"0.65274274",
"0.64978623",
"0.64958... | 0.732415 | 3 |
Given radius r the function returns area of circle | def f0tD(Mkmy):
return epAf.pi * Mkmy ** 2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LA4l(Mkmy):\n return epAf.pi * Mkmy * Mkmy",
"def yX2h(Mkmy):\n return mM0K * Mkmy ** 2",
"def yX2h(Mkmy):\n return float(Mkmy) ** 2 * epAf.pi",
"def LA4l(Mkmy):\n jzdc = 9 ** 2 * epAf.pi\n return jzdc",
"def yX2h(Mkmy):\n return epAf.pi * Mkmy ** 2",
"def Bjvh(Mkmy):\n return mM... | [
"0.8986097",
"0.89316595",
"0.89120173",
"0.8900175",
"0.8886746",
"0.8839167",
"0.8808455",
"0.86707723",
"0.860951",
"0.86041266",
"0.8600858",
"0.8585669",
"0.8532776",
"0.85276383",
"0.8482925",
"0.8459519",
"0.84590864",
"0.8324724",
"0.8122404",
"0.76375824",
"0.7617529... | 0.8464504 | 15 |
returns the list of categories for this user. this list contains user tailored data like the number of tasks in each category | def VKJd():
uJjO, rxBR = ql4B(QePW)
Y3AH = WUiJ(uJjO)
Logs = 'no_tasks' if sum([ACia['available_tasks_count'] for ACia in Y3AH]) == 0 else 'default'
return pz3A(status='ok', categories=Y3AH, header_message=Q4Sl(uJjO, Logs)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LQuW(YKHO):\n MOPg = {'Accept': 'application/json', 'user-key': YKHO.user_key}\n Mkmy = G4JS.get(NKRf + 'categories', headers=MOPg).content.decode('utf-8')\n jzdc = qQXR.loads(Mkmy)\n YKHO.is_key_invalid(jzdc)\n YKHO.is_rate_exceeded(jzdc)\n LeZt = {}\n for Ghho in jzdc['categories']:\n ... | [
"0.7387618",
"0.7382669",
"0.7382669",
"0.7272135",
"0.72691435",
"0.7247432",
"0.7212087",
"0.718445",
"0.7183451",
"0.71789086",
"0.71537733",
"0.7150141",
"0.7108822",
"0.7092544",
"0.7092544",
"0.7092544",
"0.7092544",
"0.7092544",
"0.7034839",
"0.70248526",
"0.7001074",
... | 0.75988513 | 0 |
return the list of discoverable apps for user's platform | def LwBa():
from .models.app_discovery import LwBa
uJjO, rxBR = ql4B(QePW)
if not uJjO:
raise dSn5('missing user_id')
kUUT = Y6yB(uJjO)
return pz3A(LwBa(kUUT)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xrYC(YKHO):\n XLL2 = GPtr.supportedApplications(YKHO.SHOW)\n return XLL2",
"async def app_list(YKHO) -> cuzp[str, object]:\n return await YKHO._send_command('FetchLaunchableApplicationsEvent', {})",
"async def app_list(YKHO) -> cuzp[str, object]:\n return await YKHO._send_command('FetchLaunchab... | [
"0.72342694",
"0.7168042",
"0.7168042",
"0.69511634",
"0.6893545",
"0.68663824",
"0.67772186",
"0.67772186",
"0.67653704",
"0.672449",
"0.6700266",
"0.6613394",
"0.6599349",
"0.6595885",
"0.65720975",
"0.652022",
"0.64879334",
"0.6445766",
"0.6421441",
"0.63952094",
"0.637889... | 0.73469514 | 0 |
Get the set of column names | def ZWCE(YKHO):
return YKHO._column_names | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CSa0(Emd4):\n return set(Emd4.__table__.c.keys())",
"def Txl5(YKHO):\n return YKHO.implementation.col_names",
"def NKcn(YKHO) -> x1iM[str]:\n return YKHO.result_set.colnames()",
"def Txl5(YKHO):\n return YKHO._column_names.output",
"def Txl5(YKHO) -> AzJI[str, ...]:\n return YKHO._column... | [
"0.8530057",
"0.8288493",
"0.81962955",
"0.8185283",
"0.81706977",
"0.81706977",
"0.81706977",
"0.81706977",
"0.81706977",
"0.81706977",
"0.81312394",
"0.81156135",
"0.8110957",
"0.8104042",
"0.80828506",
"0.8046715",
"0.8042455",
"0.8030989",
"0.8027055",
"0.80107033",
"0.80... | 0.8148417 | 10 |
Mostly to check if the nltk stopwords list still available | def zq3O():
l5Ny = ['au', 'aux', 'avec', 'ce', 'ces', 'dans', 'de', 'des', 'du', 'qu', 'que', 'qui', 'sa', 'se', 'ses', 'son', 'sur', 'ta', 'te', 'tes', 'toi', 'ton', 'tu', 'un', 'une', 'vos', 'votre']
yvT9 = _oWe.remove_stopwords(l5Ny)
assert len(yvT9) == 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xrnL(GIN8):\n return GIN8 in set(di0c.words())",
"def at55(GIN8):\n hwHU = Dhdw.corpus.stopwords.words()\n return GIN8 in hwHU",
"def ONai(di0c, GIN8):\n return eCgU(di0c, GIN8)",
"def UIS8(yIWr, V22M):\n if not V22M in yIWr.value:\n return V22M",
"def riSw(YKHO):\n JDit.CONFIG... | [
"0.7485635",
"0.7424362",
"0.7370488",
"0.7316407",
"0.71609706",
"0.71457565",
"0.69971454",
"0.69594175",
"0.69479126",
"0.69479126",
"0.69015515",
"0.68954045",
"0.68804085",
"0.68663025",
"0.6789337",
"0.67376035",
"0.67367005",
"0.67359734",
"0.67231727",
"0.66551363",
"... | 0.6622784 | 23 |
Type of authentication strategy for this user. | def type(YKHO) -> h8nf['UserAuthenticationModePropertiesType']:
return qe4Y.get(YKHO, 'type') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zkAN(YKHO):\n return YKHO._auth_type",
"def v7lV(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'authentication_type')",
"def v7lV(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'authentication_type')",
"def v7lV(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'authe... | [
"0.75906736",
"0.74531245",
"0.74531245",
"0.74531245",
"0.74238634",
"0.74238634",
"0.74238634",
"0.74238634",
"0.74238634",
"0.74238634",
"0.74238634",
"0.74238634",
"0.741457",
"0.741457",
"0.741457",
"0.741457",
"0.72533935",
"0.7219206",
"0.7219206",
"0.7149894",
"0.7129... | 0.7102412 | 21 |
The DNS address of the primary readwrite node. | def UTX6(YKHO) -> h8nf[str]:
return qe4Y.get(YKHO, 'address') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RyT2(YKHO):\n return YKHO._node_address",
"def I2qM(YKHO):\n return YKHO._nodeAddr",
"def UTX6(YKHO):\n return YKHO._addr",
"def _gTC(YKHO):\n return YKHO._addr",
"def _gTC(YKHO):\n return YKHO._addr",
"def _gTC(YKHO):\n return YKHO._addr",
"def MrYf(YKHO):\n if YKHO.force_auto... | [
"0.73201895",
"0.72322774",
"0.70947164",
"0.6959133",
"0.6959133",
"0.6959133",
"0.6860769",
"0.6860769",
"0.68413067",
"0.67812717",
"0.67812717",
"0.67747355",
"0.67358816",
"0.6706284",
"0.6706284",
"0.6706284",
"0.6706284",
"0.66396046",
"0.66396046",
"0.66390234",
"0.66... | 0.0 | -1 |
The key for the tag. May not be null. | def H5ew(YKHO) -> str:
return qe4Y.get(YKHO, 'key') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H5ew(YKHO):\n return YKHO._tag.key",
"def D2cZ(YKHO) -> str:\n return qe4Y.get(YKHO, 'tag_key')",
"def D2cZ(YKHO) -> str:\n return qe4Y.get(YKHO, 'tag_key')",
"def ESEY(YKHO) -> int:\n return qe4Y.get(YKHO, 'key_tag')",
"def D2cZ(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'tag_key')",
... | [
"0.8984402",
"0.8777768",
"0.8777768",
"0.8642197",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"... | 0.77100605 | 47 |
The tag's value. May be null. | def BWXx(YKHO) -> str:
return qe4Y.get(YKHO, 'value') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BWXx(YKHO):\n return YKHO._tag.value",
"def DgUE(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'tag_value')",
"def DgUE(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'tag_value')",
"def DgUE(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'tag_value')",
"def DgUE(YKHO) -> h8nf[str]:\n return qe4... | [
"0.874623",
"0.8722637",
"0.8722637",
"0.8722637",
"0.8722637",
"0.8722637",
"0.8722637",
"0.8722637",
"0.8722637",
"0.8722637",
"0.8722637",
"0.8722637",
"0.8722637",
"0.8722637",
"0.8722637",
"0.8722637",
"0.8722637",
"0.8722637",
"0.8722637",
"0.8722637",
"0.8722637",
"0... | 0.6977211 | 84 |
The key for the tag. May not be null. | def H5ew(YKHO) -> str:
return qe4Y.get(YKHO, 'key') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H5ew(YKHO):\n return YKHO._tag.key",
"def D2cZ(YKHO) -> str:\n return qe4Y.get(YKHO, 'tag_key')",
"def D2cZ(YKHO) -> str:\n return qe4Y.get(YKHO, 'tag_key')",
"def ESEY(YKHO) -> int:\n return qe4Y.get(YKHO, 'key_tag')",
"def D2cZ(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'tag_key')",
... | [
"0.8984402",
"0.8777768",
"0.8777768",
"0.8642197",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"0.8592764",
"... | 0.77100605 | 46 |