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 |
|---|---|---|---|---|---|---|
Walk the tree and find the node where 'key' should be inserted. Raise an Exception if this key is already in the tree. This isn't a must for B Trees but for my use case I should never see a duplicate key so for now I am going to sanity check for this. | def JnzR(YKHO, Q6kx, H5ew):
if Q6kx.is_leaf():
if Q6kx.has_key(H5ew):
raise A1au('%s already has %s' % (Q6kx, H5ew))
return Q6kx
else:
dtUY = Ce1H.bisect_right(Q6kx.keys, H5ew)
XJxn = Q6kx.children[dtUY]
return YKHO._find_key_insert_node(XJxn, H5ew)
return... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TgwQ(YKHO, H5ew):\n if YKHO._node_empty(YKHO._root):\n raise ValueError('Tree is empty.')\n _AKB = None\n XSoh = 0\n Q6kx = YKHO.root\n while True:\n if H5ew == Q6kx.key:\n return Q6kx\n else:\n XSoh = 0 if H5ew <= Q6kx.key else 1\n _AKB = Q6... | [
"0.760516",
"0.758526",
"0.75082976",
"0.7411754",
"0.7411414",
"0.7392125",
"0.73553735",
"0.73466766",
"0.7333377",
"0.7332928",
"0.7299881",
"0.7290512",
"0.72469",
"0.7237833",
"0.71658427",
"0.7135013",
"0.71316814",
"0.7127396",
"0.7127396",
"0.7119347",
"0.7119294",
... | 0.815014 | 0 |
Returns a sliding window (of width n) over data from the iterable s > (s0,s1,...s[n1]), (s1,s2,...,sn), ... | def KnxT(Q6uT, exwG=2):
WhY1 = iter(Q6uT)
Aofo = tuple(Hs6x.islice(WhY1, exwG))
if len(Aofo) == exwG:
yield Aofo
for LihS in WhY1:
Aofo = Aofo[1:] + (LihS,)
yield Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K3Td(Q6uT, exwG=2):\n WhY1 = iter(Q6uT)\n Aofo = tuple(uOgj(WhY1, exwG))\n if len(Aofo) == exwG:\n yield Aofo\n for LihS in WhY1:\n Aofo = Aofo[1:] + (LihS,)\n yield Aofo",
"def KnxT(AV8I, exwG):\n \"\"\" s -> (s0,s1,...s[n-1]), (s1,s2,...,sn), ... \"\"... | [
"0.79060006",
"0.7708997",
"0.76823086",
"0.7575593",
"0.7575593",
"0.75278705",
"0.75278705",
"0.7421265",
"0.7368363",
"0.73411655",
"0.73324084",
"0.7267541",
"0.71439284",
"0.7133535",
"0.7096484",
"0.70228076",
"0.69244343",
"0.6921799",
"0.69216466",
"0.6886619",
"0.686... | 0.750381 | 7 |
Interpolate NAN elements in matrix. | def cFgE(SppC):
try:
raTX = ~oyIN.isnan(SppC)
fsgT = raTX.ravel().nonzero()[0]
ytgA = SppC[~oyIN.isnan(SppC)]
WKvO = oyIN.isnan(SppC).ravel().nonzero()[0]
SppC[oyIN.isnan(SppC)] = oyIN.interp(WKvO, fsgT, ytgA)
return SppC
except:
return SppC | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TFWP(tolH):\n EcVT = IYWQ.copy()\n MFrU, fRuM = EcVT.shape\n BBA6 = oyIN.zeros(shape=(MFrU, fRuM), dtype=float) * oyIN.nan\n a1PO = oyIN.arange(fRuM)\n for P2GO in range(0, MFrU):\n Y7fn = EcVT[P2GO, :]\n NTak = oyIN.where(oyIN.isnan(Y7fn))\n RvHA = oyIN.where(~oyIN.isnan(Y7... | [
"0.7804323",
"0.73843354",
"0.73638684",
"0.7046488",
"0.6822202",
"0.67438775",
"0.6732302",
"0.6601746",
"0.6553677",
"0.65385735",
"0.6532767",
"0.64844304",
"0.6460937",
"0.6442243",
"0.63989705",
"0.6330955",
"0.6324167",
"0.62957",
"0.62459564",
"0.6221165",
"0.6112765"... | 0.79751 | 0 |
Get a random element from the set. | def UIrZ(YKHO) -> int:
Mkmy = tuKI.randint(1, YKHO.size)
return YKHO.keys[Mkmy] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def P8Zf(YKHO):\n try:\n return YKHO.object().random_element()\n except AttributeError:\n return Acvy(YKHO.list())",
"def UIrZ(YKHO) -> int:\n IZL_ = YKHO.randomizedSet.pop()\n YKHO.randomizedSet.add(IZL_)\n return IZL_",
"def UIrZ(YKHO):\n or8S = tuKI.randint(0, YKHO.length - 1... | [
"0.78055954",
"0.77602583",
"0.76503676",
"0.69756",
"0.6970386",
"0.69696873",
"0.69170576",
"0.6903906",
"0.68794334",
"0.6843657",
"0.68179744",
"0.68171364",
"0.6815859",
"0.6779796",
"0.6774275",
"0.6763151",
"0.6747374",
"0.67292315",
"0.6693236",
"0.6683133",
"0.666994... | 0.63645893 | 55 |
return list of a columns (or fields) of a table | def FSKv(YKHO, tyNF):
YKHO.cursor.execute("PRAGMA table_info('%s')" % tyNF)
return [TPwt[1] for TPwt in YKHO.cursor.fetchall()] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FSKv(YKHO, tyNF):\n Z9rn = YKHO.db.cursor()\n Z9rn.execute('SELECT * FROM %s LIMIT 1;' % tyNF)\n return [YRbF[0] for YRbF in Z9rn.description]",
"def FSKv(YKHO, tyNF):\n YKHO.c.execute('show columns from ' + tyNF + ';')\n return YKHO.c.fetchall()",
"def FSKv(YKHO):\n tyNF = YKHO.get_table... | [
"0.85307926",
"0.8375537",
"0.8142457",
"0.8138854",
"0.80362976",
"0.80143344",
"0.7984564",
"0.79201007",
"0.79153574",
"0.78832465",
"0.78653413",
"0.78617704",
"0.7849685",
"0.78355986",
"0.78252995",
"0.78226125",
"0.77989906",
"0.77538425",
"0.77497214",
"0.77497214",
"... | 0.8253192 | 2 |
Set up an argument parser, and parse then arguments with it. | def dCXb():
wvEv = j1Jz.ArgumentParser(description='Cave fish dadi analyses', add_help=True)
wvEv.add_argument('-f', '--sfs', required=True, help='Joint SFS file, in dadi format')
wvEv.add_argument('-m', '--model', required=True, action='append', choices=_vtG, type=str, help='Specify a model to run. May be ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Jp2l():\n wvEv = j1Jz.ArgumentParser(description='The agent.py application implements a non-blocking readeron serial usb port or a Kafka server, a translator of the data parsed and a writer to web ContextBroker (Orion)', usage='agent.py [options] input_stream service_location')\n i5wp = wvEv.add_argument... | [
"0.75238675",
"0.7494778",
"0.74677926",
"0.7453865",
"0.7378268",
"0.73577976",
"0.7324416",
"0.7324138",
"0.7323608",
"0.7322733",
"0.7313859",
"0.7311654",
"0.7309198",
"0.73086536",
"0.7287427",
"0.72630167",
"0.72573376",
"0.7253839",
"0.72492564",
"0.72317386",
"0.72259... | 0.0 | -1 |
Get paginator query parameters. | def kMQO(YKHO, oDn_):
return [wxBM.Parameter(name='page_size', in_=wxBM.IN_QUERY, type=wxBM.TYPE_INTEGER, description='Number of items per page', default=6), wxBM.Parameter(name='page', in_=wxBM.IN_QUERY, type=wxBM.TYPE_INTEGER, description='Page number', default=1)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kMQO(YKHO, oDn_):\n return [wxBM.Parameter('offset', wxBM.IN_QUERY, 'Offset for Pagination', False, None, wxBM.TYPE_INTEGER), wxBM.Parameter('limit', wxBM.IN_QUERY, 'Page Size', False, None, wxBM.TYPE_INTEGER)]",
"def W6RH(YKHO, xDcj=None, B2Dn=None, vgXP=None, **B2fa):\n return {'q': xDcj, 'page': B2D... | [
"0.7890548",
"0.78630704",
"0.7683268",
"0.74794316",
"0.7384741",
"0.72518873",
"0.72420764",
"0.7241277",
"0.7206977",
"0.71982116",
"0.71411574",
"0.69324213",
"0.6876725",
"0.6873304",
"0.6872155",
"0.68597984",
"0.6800569",
"0.6792958",
"0.6745574",
"0.6739788",
"0.67018... | 0.77217984 | 2 |
r"""Reshapes a tensor. Given `tensor`, this operation returns a new `tf.Tensor` that has the same values as `tensor` in the same order, except with a new shape given by `shape`. >>> t1 = [[1, 2, 3], ... [4, 5, 6]] >>> print(tf.shape(t1).numpy()) [2 3] >>> t2 = tf.reshape(t1, [6]) >>> t2 | def q3V_(vhpA, ROpF, mWFP=None):
Aofo = tTyL.reshape(vhpA, ROpF, mWFP)
SL95.maybe_set_static_shape(Aofo, ROpF)
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def q3V_(FRUf: tf.Tensor, ROpF: List[int], mWFP: str='tf_util_reshape'):\n return ZylS.reshape(FRUf, ROpF, mWFP)",
"def q3V_(WKvO, ROpF, mWFP='Reshape'):\n GhuM = WKvO.shape.as_list()\n EZd9 = []\n for YRbF in ROpF:\n if YRbF is None:\n EZd9.append(-1)\n elif isinstance(YRbF,... | [
"0.8488951",
"0.7750706",
"0.77002174",
"0.77002174",
"0.7684932",
"0.76252156",
"0.75598735",
"0.7274353",
"0.7248263",
"0.7229187",
"0.71419746",
"0.7113297",
"0.7099953",
"0.70502275",
"0.7038214",
"0.7030296",
"0.6878729",
"0.68224686",
"0.67899394",
"0.6770137",
"0.67311... | 0.81325567 | 1 |
Returns a tensor with a length 1 axis inserted at index `axis`. Given a tensor `input`, this operation inserts a dimension of length 1 at the dimension index `axis` of `input`'s shape. The dimension index follows Python | def wmvz(input, jDK_=None, mWFP=None, tpio=None):
jDK_ = ni8q.deprecated_argument_lookup('axis', jDK_, 'dim', tpio)
if jDK_ is None:
raise ValueError('Must specify an axis argument to tf.expand_dims()')
return KxAP(input, jDK_, mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def U1fi(WKvO, QqFZ, BxNl):\n cZDQ = list(range(WKvO.shape.ndims))\n if BxNl < 0:\n BxNl += len(cZDQ)\n nW8f = cZDQ.pop(QqFZ)\n cZDQ.insert(BxNl, nW8f)\n return ZylS.transpose(WKvO, cZDQ)",
"def KxAP(input, jDK_, mWFP=None):\n return tTyL.expand_dims(input, jDK_, mWFP)",
"def wmvz(vhpA... | [
"0.7198505",
"0.6903703",
"0.68011826",
"0.66865075",
"0.6561106",
"0.6520109",
"0.6484199",
"0.63785696",
"0.6372038",
"0.6365153",
"0.62841254",
"0.6220068",
"0.6175634",
"0.61591715",
"0.6123381",
"0.60806847",
"0.6057281",
"0.60072803",
"0.59715813",
"0.59473985",
"0.5933... | 0.6837451 | 2 |
Returns a tensor with a length 1 axis inserted at index `axis`. Given a tensor `input`, this operation inserts a dimension of length 1 at the dimension index `axis` of `input`'s shape. The dimension index follows Python | def KxAP(input, jDK_, mWFP=None):
return tTyL.expand_dims(input, jDK_, mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def U1fi(WKvO, QqFZ, BxNl):\n cZDQ = list(range(WKvO.shape.ndims))\n if BxNl < 0:\n BxNl += len(cZDQ)\n nW8f = cZDQ.pop(QqFZ)\n cZDQ.insert(BxNl, nW8f)\n return ZylS.transpose(WKvO, cZDQ)",
"def wmvz(input, jDK_=None, mWFP=None, tpio=None):\n jDK_ = ni8q.deprecated_argument_lookup('axis'... | [
"0.71982855",
"0.6835936",
"0.6799957",
"0.66872066",
"0.65599775",
"0.65193254",
"0.64843816",
"0.63782877",
"0.63710755",
"0.6364448",
"0.62839323",
"0.62199694",
"0.61756957",
"0.6159686",
"0.6122185",
"0.60795236",
"0.6056186",
"0.6005234",
"0.59714466",
"0.59483606",
"0.... | 0.6903409 | 1 |
Computes the difference between two lists of numbers or strings. Given a list x and a list y, this operation returns a list out that represents all values that are in x but not in y. The returned list out is sorted in the same order that the numbers appear in x (duplicates are preserved). This operation also returns a ... | def ibVN(WKvO, LVAh, hKzz=m1c7.int32, mWFP=None):
return tTyL.list_diff(WKvO, LVAh, hKzz, mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yk4i(jzdc, Fg_i):\n return [D9cM for D9cM in jzdc if D9cM not in Fg_i]",
"def by6d(jzdc, Fg_i):\n return [geyT for geyT in jzdc if geyT not in Fg_i]",
"def wncN(WKvO, LVAh):\n exwG = len(WKvO)\n assert len(LVAh) == exwG\n return map(lambda YRbF: WKvO[YRbF] - LVAh[YRbF], range(0, exwG))",
"... | [
"0.70562875",
"0.7029673",
"0.6839631",
"0.6791677",
"0.6732574",
"0.66869664",
"0.6670226",
"0.6570096",
"0.6529913",
"0.64474523",
"0.6441498",
"0.6421182",
"0.6409787",
"0.6389188",
"0.635638",
"0.63431257",
"0.6311099",
"0.6311009",
"0.62865144",
"0.62831193",
"0.6279931"... | 0.6588561 | 7 |
Finds unique elements in a 1D tensor. See also `tf.unique_with_counts`. This operation returns a tensor `y` containing all the unique elements of `x` sorted in the same order that they occur in `x`. This operation also returns a tensor `idx` the same size as `x` that contains the index | def kcwm(WKvO, FlcU=m1c7.int32, mWFP=None):
return tTyL.unique(WKvO, FlcU, mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ONhe(WKvO, FlcU=oyIN.int32, mWFP=None):\n WKvO = oyIN.array(WKvO)\n if len(WKvO.shape) != 1:\n raise UAju.InvalidArgumentError('unique expects a 1D vector.')\n LVAh, or8S = oyIN.unique(WKvO, return_index=True, return_inverse=False, return_counts=False, axis=None)\n or8S = or8S.astype(BfDw.nu... | [
"0.708687",
"0.70464754",
"0.7009508",
"0.6692324",
"0.6397414",
"0.6302789",
"0.6257782",
"0.6221717",
"0.6149903",
"0.613021",
"0.6050868",
"0.60328966",
"0.6013779",
"0.5872633",
"0.5797178",
"0.5787812",
"0.5762965",
"0.5739385",
"0.56769514",
"0.5663021",
"0.5660922",
... | 0.68034637 | 3 |
Transposes `a`, where `a` is a Tensor. Permutes the dimensions according to the value of `perm`. The returned tensor's dimension `i` will correspond to the input dimension `perm[i]`. If `perm` is not given, it is set to (n1...0), where n is the rank of the input tensor. Hence, by default, this operation performs a regu... | def B_dj(jzdc, IuXB=None, Ni86=False, mWFP='transpose'):
return l7uB(a=jzdc, perm=IuXB, name=mWFP, conjugate=Ni86) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l7uB(jzdc, IuXB=None, mWFP='transpose', Ni86=False):\n with IPme.name_scope(mWFP, 'transpose', [jzdc]) as mWFP:\n if not E7LX.is_tf_type(jzdc):\n jzdc = IPme.convert_to_tensor(jzdc, name='a')\n if Ni86 and jzdc.dtype.is_complex:\n rf86 = tTyL.conjugate_transpose\n ... | [
"0.85784805",
"0.7723273",
"0.7549967",
"0.7356772",
"0.7211927",
"0.7111804",
"0.70518965",
"0.69986546",
"0.6967681",
"0.67960334",
"0.66979057",
"0.6661511",
"0.66213596",
"0.65121293",
"0.64188594",
"0.6415513",
"0.63966227",
"0.6372023",
"0.6280447",
"0.62584966",
"0.615... | 0.75617164 | 2 |
Transposes `a`. Permutes the dimensions according to `perm`. The returned tensor's dimension i will correspond to the input dimension `perm[i]`. If `perm` is not given, it is set to (n1...0), where n is the rank of the input tensor. Hence, by default, this operation performs a regular matrix transpose on 2D input Tenso... | def l7uB(jzdc, IuXB=None, mWFP='transpose', Ni86=False):
with IPme.name_scope(mWFP, 'transpose', [jzdc]) as mWFP:
if not E7LX.is_tf_type(jzdc):
jzdc = IPme.convert_to_tensor(jzdc, name='a')
if Ni86 and jzdc.dtype.is_complex:
rf86 = tTyL.conjugate_transpose
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H2DR(jzdc, mWFP='matrix_transpose', Ni86=False):\n with IPme.name_scope(mWFP, values=[jzdc]):\n jzdc = IPme.convert_to_tensor(jzdc, name='a')\n Bjgb = jzdc.get_shape()\n kvqa = Bjgb.ndims\n if kvqa is not None:\n if kvqa < 2:\n raise ValueError(f'Argumen... | [
"0.7871805",
"0.757994",
"0.754173",
"0.73494494",
"0.73391587",
"0.71753716",
"0.7154327",
"0.69857967",
"0.6932827",
"0.69219023",
"0.69039387",
"0.68427634",
"0.666251",
"0.6526994",
"0.6497446",
"0.62983644",
"0.62849146",
"0.62471485",
"0.6185309",
"0.6168078",
"0.616420... | 0.86759794 | 0 |
Transposes last two dimensions of tensor `a`. | def H2DR(jzdc, mWFP='matrix_transpose', Ni86=False):
with IPme.name_scope(mWFP, values=[jzdc]):
jzdc = IPme.convert_to_tensor(jzdc, name='a')
Bjgb = jzdc.get_shape()
kvqa = Bjgb.ndims
if kvqa is not None:
if kvqa < 2:
raise ValueError(f'Argument `a` should... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l7uB(jzdc, MPlV=None):\n if not StCl(vuvg.typeof(jzdc)):\n RwK6('Input is not Tensor.')\n return jzdc.transpose(MPlV)",
"def l7uB(jzdc):\n return kp_e(jzdc, -1, -2)",
"def l7uB(jzdc, MPlV=None):\n return jzdc.transpose(MPlV)",
"def l7uB(jzdc, MPlV=None):\n return jzdc.transpose(MPlV... | [
"0.79269874",
"0.7789579",
"0.75695074",
"0.75123554",
"0.7454177",
"0.7385504",
"0.72625214",
"0.7094447",
"0.7020332",
"0.69653213",
"0.6813519",
"0.6781291",
"0.6769778",
"0.67366886",
"0.67002684",
"0.66242737",
"0.65957534",
"0.6534943",
"0.6510109",
"0.64224184",
"0.639... | 0.7128244 | 7 |
Inserts a placeholder for a tensor that will be always fed. | def HMZy(yDqo, ROpF=None, mWFP=None):
if QpfX.executing_eagerly():
raise RuntimeError('tf.placeholder() is not compatible with eager execution.')
return tTyL.placeholder(dtype=yDqo, shape=ROpF, name=mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oc70(YKHO, hmKQ, g4y1):\n MPlV = WhAa(hmKQ)\n VvXn = SMR4.placeholder(MPlV).named(hmKQ.name)\n return VvXn",
"def RrIs(YKHO):\n with ZylS.name_scope('placeholder'):\n YKHO.input = ZylS.placeholder(ZylS.float32, shape=[YKHO.config.batch_size, YKHO.config.num_of_stages, YKHO.config.input_dim... | [
"0.70383775",
"0.686418",
"0.6859862",
"0.68130976",
"0.6795428",
"0.67288566",
"0.6702816",
"0.66518575",
"0.6621836",
"0.6542519",
"0.65360814",
"0.6489713",
"0.64839023",
"0.648129",
"0.6474709",
"0.64722943",
"0.64646196",
"0.6458431",
"0.63839096",
"0.6369336",
"0.633163... | 0.63117987 | 21 |
Computes the Levenshtein distance between sequences. This operation takes variablelength sequences (`hypothesis` and `truth`), each provided as a `SparseTensor`, and computes the Levenshtein distance. You can normalize the edit distance by length of `truth` by setting `normalize` to true. | def ynZz(W3ev, w75t, NkkI=True, mWFP='edit_distance'):
if not isinstance(W3ev, (BtZX.SparseTensor, BtZX.SparseTensorValue)):
raise TypeError('Hypothesis must be a SparseTensor.')
if not isinstance(w75t, (BtZX.SparseTensor, BtZX.SparseTensorValue)):
raise TypeError('Truth must be a SparseTensor.'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KX6q(cntZ, CsFy):\n qSXZ = len(cntZ) + len(CsFy)\n RhJP = Dhdw.edit_distance(cntZ, CsFy, transpositions=True)\n if qSXZ == 0:\n return 0\n return (qSXZ - RhJP) / qSXZ",
"def ZJXU(YKHO):\n Aofo = YKHO.runner.levenshtein('asdf', 'asd')\n assert fh3O(Aofo).equals(1)\n Aofo = YKHO.run... | [
"0.62532604",
"0.6166698",
"0.6159837",
"0.6123037",
"0.6086181",
"0.60851234",
"0.60652417",
"0.60643137",
"0.6059684",
"0.60283893",
"0.59786487",
"0.59696996",
"0.59682757",
"0.59284425",
"0.59004354",
"0.5858955",
"0.5823278",
"0.5821697",
"0.58128",
"0.58125585",
"0.5812... | 0.6654476 | 0 |
Calculate padding required to make block_shape divide input_shape. This function can be used to calculate a suitable paddings argument for use with space_to_batch_nd and batch_to_space_nd. | def HhAp(GhuM, r3OS, Y6VE=None, mWFP=None):
with IPme.name_scope(mWFP, 'required_space_to_batch_paddings', [GhuM, r3OS]):
GhuM = IPme.convert_to_tensor(GhuM, dtype=m1c7.int32, name='input_shape')
r3OS = IPme.convert_to_tensor(r3OS, dtype=m1c7.int32, name='block_shape')
r3OS.get_shape().asser... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ARUe(YKHO, GhuM, oLRV):\n if YKHO.padding == 'valid':\n return (0, 0, 0, 0)\n vZFX, AFmr = oLRV[1:3]\n CIys, ft8c = YKHO.kernel_size\n _Dqh, TVXH = GhuM[1:3]\n Rg2u = max((vZFX - 1) * YKHO.stride[0] + CIys - _Dqh, 0)\n CTFf = max((AFmr - 1) * YKHO.stride[1] + ft8c - TVXH, 0)\n L5iE ... | [
"0.75173736",
"0.73467827",
"0.71725994",
"0.7158543",
"0.7110268",
"0.7110195",
"0.70824397",
"0.70036644",
"0.699813",
"0.6960509",
"0.6862166",
"0.68615514",
"0.681392",
"0.6793511",
"0.67613053",
"0.6754479",
"0.6725875",
"0.67237",
"0.6677916",
"0.6657602",
"0.66506034",... | 0.76279724 | 0 |
BatchToSpace for ND tensors of type T. This operation reshapes the "batch" dimension 0 into `M + 1` dimensions of shape `block_shape + [batch]`, interleaves these blocks back into the grid defined by the spatial dimensions `[1, ..., M]`, to obtain a result with the same rank as the input. The spatial dimensions of this... | def xr5g(input, r3OS, dtAY, mWFP=None):
if isinstance(r3OS, int):
r3OS = oyIN.array([r3OS, r3OS], dtype=oyIN.int64)
return nrRD(input=input, block_shape=r3OS, crops=dtAY, name=mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uuZU(Ddli, r3OS, LkVj):\n Ddli = oyIN.array(Ddli)\n r3OS = oyIN.array(r3OS)\n NlmM = len(r3OS)\n LkVj = oyIN.array(LkVj).reshape((len(r3OS), 2))\n H5Km = oyIN.pad(Ddli, pad_width=[[0, 0]] + list(LkVj) + [[0, 0]] * (Ddli.ndim - 1 - NlmM), mode='constant')\n vidb = [Ddli.shape[0]]\n oLRV = [... | [
"0.6116728",
"0.54286706",
"0.5357946",
"0.5323358",
"0.53045017",
"0.52930087",
"0.52887267",
"0.52872914",
"0.5245267",
"0.52302665",
"0.52099633",
"0.5169443",
"0.51607645",
"0.5114229",
"0.5103644",
"0.5054342",
"0.505072",
"0.4982422",
"0.49659202",
"0.49565223",
"0.4940... | 0.68278396 | 0 |
Returns a onehot tensor. See also `tf.fill`, `tf.eye`. The locations represented by indices in `indices` take value `on_value`, while all other locations take value `off_value`. `on_value` and `off_value` must have matching data types. If `dtype` is also provided, they must be the same data type as specified by `dtype`... | def KLLm(_0VL, rb7a, QExF=None, QQss=None, jDK_=None, yDqo=None, mWFP=None):
with IPme.name_scope(mWFP, 'one_hot', [_0VL, rb7a, QExF, QQss, jDK_, yDqo]) as mWFP:
HtFX = QExF is not None
UCx6 = QQss is not None
if HtFX:
QExF = IPme.convert_to_tensor(QExF, dtype_hint=yDqo)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zGX0(YKHO, _0VL, ROpF):\n hlel = oyIN.zeros(ROpF)\n hlel[oyIN.arange(len(_0VL)), _0VL] = 1\n return hlel",
"def F9zB(zNig, QyVM):\n qw7D = oyIN.zeros(zNig)\n qw7D[QyVM] = 1\n return qw7D",
"def KLLm(_0VL, rb7a, jDK_=-1, yDqo=oyIN.float32):\n hkxX = oyIN.asarray(_0VL)\n fdMZ = len(hk... | [
"0.6916715",
"0.66881835",
"0.66465926",
"0.65714",
"0.6553769",
"0.6542018",
"0.6528897",
"0.64744365",
"0.6414915",
"0.6413257",
"0.6371642",
"0.6355043",
"0.63493586",
"0.633494",
"0.63324434",
"0.6323799",
"0.6314038",
"0.61882156",
"0.61776394",
"0.6152002",
"0.61393553"... | 0.8026933 | 0 |
Returns a mask tensor representing the first N positions of each cell. If `lengths` has shape `[d_1, d_2, ..., d_n]` the resulting tensor `mask` has dtype `dtype` and shape `[d_1, d_2, ..., d_n, maxlen]`, with ``` mask[i_1, i_2, ..., i_n, j] = (j < lengths[i_1, i_2, ..., i_n]) ``` | def rWMo(Fbjb, KLk8=None, yDqo=m1c7.bool, mWFP=None):
with IPme.name_scope(mWFP, 'SequenceMask', [Fbjb, KLk8]):
Fbjb = IPme.convert_to_tensor(Fbjb)
if KLk8 is None:
KLk8 = CT6C._max(Fbjb, DpT3(Fbjb))
KLk8 = CT6C.maximum(si3H(0, KLk8.dtype), KLk8)
else:
KLk... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PoLS(Fbjb, BcCR=None, yDqo=None, mWFP=None):\n with ZylS.name_scope(mWFP, 'mask_from_lengths'):\n yDqo = Fbjb.dtype if yDqo is None else yDqo\n BcCR = ZylS.reduce_max(Fbjb) if BcCR is None else BcCR\n bS0K = ZylS.range(BcCR, dtype=Fbjb.dtype)\n ZHfW = ZylS.less(ZylS.expand_dims(b... | [
"0.73885375",
"0.7314311",
"0.72871804",
"0.7264659",
"0.72550243",
"0.7237537",
"0.72213906",
"0.7212414",
"0.7182213",
"0.71150273",
"0.71003866",
"0.70926374",
"0.7037476",
"0.699532",
"0.6989668",
"0.6989668",
"0.698925",
"0.6956383",
"0.6953879",
"0.6933716",
"0.6911028"... | 0.7192047 | 8 |
r"""Gather slices from params axis `axis` according to indices. Gather slices from `params` axis `axis` according to `indices`. `indices` must be an integer tensor of any dimension (often 1D). `Tensor.__getitem__` works for scalars, `tf.newaxis`, and | def v6ln(NArs, _0VL, iLoJ=None, mWFP=None, jDK_=None, Xng_=0):
del iLoJ
if jDK_ is None:
jDK_ = Xng_
if E7LX.constant_value(jDK_) != 0:
return tTyL.gather_v2(NArs, _0VL, jDK_, batch_dims=Xng_, name=mWFP)
try:
return NArs.sparse_read(_0VL, name=mWFP)
except AttributeError:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iWf1(NArs, _0VL):\n pfA5 = _0VL.shape[:-1]\n _0VL = _0VL.unsqueeze(0).transpose(0, -1)\n qC1Y = _0VL.shape[0]\n _0VL = _0VL.long()\n or8S = ht2j.zeros_like(_0VL[0], device=_0VL.device).long()\n r8hN = 1\n for YRbF in range(qC1Y)[::-1]:\n or8S += _0VL[YRbF] * r8hN\n r8hN *= NA... | [
"0.6895524",
"0.6753957",
"0.66729206",
"0.66078246",
"0.6537912",
"0.65272814",
"0.64806",
"0.6341473",
"0.62369275",
"0.6178352",
"0.61276084",
"0.60349876",
"0.5947389",
"0.59425557",
"0.59319574",
"0.59271127",
"0.59008926",
"0.58953947",
"0.5877558",
"0.58131903",
"0.580... | 0.5966435 | 12 |
Gather slices from params according to indices with leading batch dims. | def _Mru(NArs, _0VL, mWFP=None):
with IPme.name_scope(mWFP, 'BatchGather', [NArs, _0VL]):
_0VL = IPme.convert_to_tensor(_0VL, name='indices')
NArs = IPme.convert_to_tensor(NArs, name='params')
if _0VL.shape.ndims is None:
raise ValueError('batch_gather does not allow indices with... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iWf1(NArs, _0VL):\n pfA5 = _0VL.shape[:-1]\n _0VL = _0VL.unsqueeze(0).transpose(0, -1)\n qC1Y = _0VL.shape[0]\n _0VL = _0VL.long()\n or8S = ht2j.zeros_like(_0VL[0], device=_0VL.device).long()\n r8hN = 1\n for YRbF in range(qC1Y)[::-1]:\n or8S += _0VL[YRbF] * r8hN\n r8hN *= NA... | [
"0.7189986",
"0.6619241",
"0.6607036",
"0.6602788",
"0.66018957",
"0.6601156",
"0.6539323",
"0.64989614",
"0.64699095",
"0.645317",
"0.6425039",
"0.6424536",
"0.63879174",
"0.63879174",
"0.63367414",
"0.6320389",
"0.6264296",
"0.6141451",
"0.6130169",
"0.61170715",
"0.6067033... | 0.6354363 | 14 |
r"""Gather slices from params according to indices with leading batch dims. This operation assumes that the leading `batch_dims` dimensions of `indices` and `params` are batch dimensions; and performs a `tf.gather` operation within each batch. (If `batch_dims` is not specified, then it defaults to `rank(indices)1`.) In... | def XxxS(NArs, _0VL, Xng_, jDK_=None):
if Xng_ is not None and (not isinstance(Xng_, int)):
raise TypeError(f'Argument `batch_dims` must be an int. Received `batch_dims` = {Xng_} instead')
_0VL = IPme.convert_to_tensor(_0VL, name='indices')
NArs = IPme.convert_to_tensor(NArs, name='params')
taa3... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iWf1(NArs, _0VL):\n pfA5 = _0VL.shape[:-1]\n _0VL = _0VL.unsqueeze(0).transpose(0, -1)\n qC1Y = _0VL.shape[0]\n _0VL = _0VL.long()\n or8S = ht2j.zeros_like(_0VL[0], device=_0VL.device).long()\n r8hN = 1\n for YRbF in range(qC1Y)[::-1]:\n or8S += _0VL[YRbF] * r8hN\n r8hN *= NA... | [
"0.755124",
"0.75320715",
"0.7470134",
"0.73089015",
"0.7251467",
"0.71982056",
"0.7001165",
"0.69590193",
"0.6957891",
"0.6877844",
"0.679049",
"0.6789563",
"0.6710082",
"0.6642118",
"0.6578264",
"0.64309275",
"0.6423412",
"0.63781685",
"0.63592607",
"0.6221046",
"0.61742646... | 0.80174917 | 0 |
r"""Gather slices from `params` into a Tensor with shape specified by `indices`. `indices` is a `Tensor` of indices into `params`. The index vectors are arranged along the last axis of `indices`. This is similar to `tf.gather`, in which `indices` defines slices into the first dimension of `params`. In `tf.gather_nd`, `... | def Dj3I(NArs, _0VL, mWFP=None, Xng_=0):
b0AM = E7LX.constant_value(Xng_)
if b0AM is not None:
Xng_ = int(b0AM)
if Xng_ == 0:
try:
return NArs.gather_nd(_0VL, name=mWFP)
except AttributeError:
return tTyL.gather_nd(NArs, _0VL, name=mWFP)
else:
retu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iWf1(NArs, _0VL):\n pfA5 = _0VL.shape[:-1]\n _0VL = _0VL.unsqueeze(0).transpose(0, -1)\n qC1Y = _0VL.shape[0]\n _0VL = _0VL.long()\n or8S = ht2j.zeros_like(_0VL[0], device=_0VL.device).long()\n r8hN = 1\n for YRbF in range(qC1Y)[::-1]:\n or8S += _0VL[YRbF] * r8hN\n r8hN *= NA... | [
"0.8209424",
"0.75644624",
"0.7518006",
"0.74566466",
"0.7447114",
"0.7383401",
"0.7347421",
"0.7219317",
"0.7216879",
"0.709623",
"0.70440614",
"0.69733965",
"0.6790687",
"0.6688231",
"0.66606617",
"0.66248864",
"0.65896374",
"0.6535488",
"0.65294516",
"0.6460957",
"0.646095... | 0.7209997 | 9 |
gather_nd implementation with batch support. | def x4hI(NArs, _0VL, Xng_, mWFP=None):
with IPme.name_scope(mWFP, 'BatchGatherND', [NArs, _0VL]):
_0VL = IPme.convert_to_tensor(_0VL, name='indices')
NArs = IPme.convert_to_tensor(NArs, name='params')
if not isinstance(Xng_, int):
raise TypeError(f'Argument `batch_dims` must be a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Dj3I(NArs, _0VL, mWFP=None, Xng_=0):\n b0AM = E7LX.constant_value(Xng_)\n if b0AM is not None:\n Xng_ = int(b0AM)\n if Xng_ == 0:\n try:\n return NArs.gather_nd(_0VL, name=mWFP)\n except AttributeError:\n return tTyL.gather_nd(NArs, _0VL, name=mWFP)\n else... | [
"0.7387917",
"0.7292322",
"0.7207078",
"0.7134294",
"0.7055063",
"0.70193857",
"0.6991011",
"0.6978321",
"0.68588656",
"0.6809772",
"0.6757495",
"0.6729593",
"0.67156845",
"0.66752386",
"0.6628615",
"0.66192347",
"0.66172224",
"0.65517163",
"0.6459487",
"0.6421314",
"0.641018... | 0.725147 | 2 |
Scatter `updates` into an existing tensor according to `indices`. This operation creates a new tensor by applying sparse `updates` to the input `tensor`. This is similar to an index assignment. ``` | def tpmO(vhpA, _0VL, Vhxs, mWFP=None):
return tTyL.tensor_scatter_update(tensor=vhpA, indices=_0VL, updates=Vhxs, name=mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vXiY(vhpA, _0VL, Vhxs, mWFP=None):\n _0VL = uBcD(_0VL)\n vhpA = uBcD(vhpA)\n Vhxs = uBcD(Vhxs)\n _0VL = tuple((_0VL[..., YRbF] for YRbF in range(_0VL.shape[-1])))\n if kamu:\n return vhpA.at[_0VL].set(Vhxs)\n vhpA[_0VL] = Vhxs\n return vhpA",
"def xl7E(_0VL, Vhxs, ROpF):\n U5bT... | [
"0.7715592",
"0.7387787",
"0.7387787",
"0.7280843",
"0.7159762",
"0.6950661",
"0.69144577",
"0.6876577",
"0.67138344",
"0.6670604",
"0.6531527",
"0.64681363",
"0.64659077",
"0.645185",
"0.6445665",
"0.6426203",
"0.63151085",
"0.6305456",
"0.6254396",
"0.6184811",
"0.6171812",... | 0.7569545 | 1 |
r"""Extract `patches` from `images`. This op collects patches from the input image, as if applying a convolution. All extracted patches are stacked in the depth (last) dimension of the output. Specifically, the op extracts patches of shape `sizes` which are `strides` apart in the input image. The output is subsampled u... | def iHwf(Yw_3, maxY, FEri, b5Lm, dvgN, mWFP=None):
return tTyL.extract_image_patches(Yw_3, maxY, FEri, b5Lm, dvgN, mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JQEy(Yw_3, sTgx=None, FEri=None, b5Lm=None, dvgN=None, mWFP=None, maxY=None):\n sTgx = ni8q.deprecated_argument_lookup('sizes', maxY, 'ksizes', sTgx)\n return tTyL.extract_image_patches(Yw_3, sTgx, FEri, b5Lm, dvgN, mWFP)",
"def JQEy(WKvO, sTgx, Q7C8, dvgN='SAME', wH3T='channels_last'):\n WZcn = [1,... | [
"0.76243013",
"0.756964",
"0.6997681",
"0.6823339",
"0.68036616",
"0.66786796",
"0.66237617",
"0.6551078",
"0.64744693",
"0.6418257",
"0.63662565",
"0.6330528",
"0.63161695",
"0.6301265",
"0.6220418",
"0.6180882",
"0.61735195",
"0.61512697",
"0.6150261",
"0.605817",
"0.605777... | 0.75524616 | 2 |
Converts the given value to an integer Tensor. | def eG44(vhpA, mWFP, yDqo=m1c7.int32):
vhpA = IPme.convert_to_tensor(vhpA, name=mWFP, preferred_dtype=yDqo or m1c7.int32)
if vhpA.dtype.is_integer:
if yDqo is not None:
vhpA = CT6C.cast(vhpA, yDqo)
else:
raise TypeError(f'Argument `tensor` (name: {mWFP}) must be of type integer. ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UnH3(vhpA):\n return ZylS.cast(vhpA, dtype=ZylS.int32)",
"def MD8Z(BWXx):\n if BWXx:\n return vhpA([BWXx])\n return vhpA([-1])",
"def pXId(BWXx: Any) -> vkbR.Tensor:\n if BWXx is None:\n return vkbR.Tensor()\n elif isinstance(BWXx, int):\n return vkbR.Tensor(int_val=[BWX... | [
"0.7197321",
"0.7061022",
"0.6530225",
"0.6209769",
"0.6174092",
"0.61525035",
"0.6065201",
"0.6022985",
"0.6005379",
"0.59075135",
"0.5896087",
"0.5865215",
"0.5826269",
"0.57955885",
"0.5791844",
"0.57859856",
"0.57787687",
"0.57563806",
"0.57563806",
"0.57466525",
"0.57352... | 0.628466 | 3 |
Validate an `axis` parameter, and normalize it to be positive. If `ndims` is known (i.e., not `None`), then check that `axis` is in the range `ndims = 0`) or `axis + ndims` (otherwise). If `ndims` is not known, and `axis` is positive, then return it asis. If `ndims` is not known, and `axis` is negative, then report an ... | def lF88(jDK_, kvqa, wl_9='axis', kS2C='ndims'):
if not isinstance(jDK_, int):
raise TypeError(f'{wl_9} must be an int; got {type(jDK_).__name__}')
if kvqa is not None:
if 0 <= jDK_ < kvqa:
return jDK_
elif -kvqa <= jDK_ < 0:
return jDK_ + kvqa
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aV1X(WKvO, jDK_):\n WKvO = uM5J(WKvO)\n if jDK_ is None:\n jDK_ = []\n elif isinstance(jDK_, (int, oyIN.integer)) or (isinstance(jDK_, oyIN.ndarray) and jDK_.ndim == 0):\n jDK_ = [int(jDK_)]\n elif isinstance(jDK_, (tuple, list, oyIN.ndarray)):\n jDK_ = [int(YRbF) for YRbF in j... | [
"0.7137819",
"0.63342804",
"0.608238",
"0.59891117",
"0.5863075",
"0.5842667",
"0.5749487",
"0.5689351",
"0.56271666",
"0.56152105",
"0.5599889",
"0.5572369",
"0.55659926",
"0.55659926",
"0.55659926",
"0.55659926",
"0.55659926",
"0.55600345",
"0.55572206",
"0.55457383",
"0.55... | 0.64472055 | 1 |
Tiles a single dimension of a tensor. | def nPgB(nPrm, jDK_, ounV):
if nPrm.shape.ndims is not None:
S2wa = [1] * nPrm.shape.ndims
S2wa[jDK_] = ounV
else:
yyIQ = pSfY(fdMZ(nPrm), m1c7.int32)
S2wa = ENFq([yyIQ[:jDK_], [ounV], yyIQ[jDK_ + 1:]], axis=0)
return eL5z(nPrm, S2wa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eL5z(WKvO: Tensor, UHFx: int, tpio=0) -> llWB:\n if isinstance(WKvO, tuple):\n MKlR, Z9rn = WKvO\n return (eL5z(MKlR, UHFx, dim=tpio), eL5z(Z9rn, UHFx, dim=tpio))\n IuXB = list(range(len(WKvO.size())))\n if tpio != 0:\n IuXB[0], IuXB[tpio] = (IuXB[tpio], IuXB[0])\n WKvO = W... | [
"0.7387013",
"0.72348917",
"0.71427983",
"0.7055255",
"0.69021326",
"0.6686433",
"0.66823244",
"0.6672608",
"0.6663003",
"0.6663003",
"0.6663003",
"0.6663003",
"0.6593747",
"0.65726584",
"0.65508693",
"0.65122926",
"0.64601475",
"0.64224833",
"0.6407597",
"0.63949513",
"0.635... | 0.68238366 | 5 |
Save data into a json file | def uP8n(pmON: str, nPrm: dict) -> None:
assert isinstance(pmON, str)
with open(pmON, 'w') as PcZo:
qQXR.dump(nPrm, PcZo, indent=2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def U1ai(YKHO, nPrm):\n with open(YKHO.filename, 'w') as UXEK:\n qQXR.dump(nPrm, UXEK, indent=4)",
"def eGRE(YKHO, pmON):\n with open(pmON, 'w') as _RR0:\n qQXR.dump(YKHO.data, _RR0)",
"def U1ai(YKHO, nPrm, pmON):\n VqRE = Hy7s.path.join(YKHO.base_path, pmON)\n with open(VqRE, 'w+') a... | [
"0.88707405",
"0.8785206",
"0.8692968",
"0.8673046",
"0.8632959",
"0.8614065",
"0.8584298",
"0.83975816",
"0.83858174",
"0.83836645",
"0.8377141",
"0.8362766",
"0.83508295",
"0.8341686",
"0.8323736",
"0.8318946",
"0.83105636",
"0.8303906",
"0.8299473",
"0.82886463",
"0.825481... | 0.0 | -1 |
Get file path from absolute or relative path without file name. | def B6Nz(pmON: str) -> str:
assert isinstance(pmON, str), 'Path must be a string'
if not Hy7s.path.exists(pmON):
if '.' not in pmON[:-5]:
return pmON
elif Hy7s.path.isdir(pmON):
return pmON
lpha = Hy7s.path.split(pmON)
if len(lpha) == 1:
return './'
return lph... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nUeQ(pmON):\n return Hy7s.path.abspath(pmON)",
"def WQbV(Ux0P):\n P6bq = KVWQ(Ux0P)\n ht58 = P6bq.scheme\n if not ht58:\n return Hy7s.path.abspath(Ux0P)\n if ht58 == 'file':\n return P6bq.path\n return Ux0P",
"def Zg0d(pmON, Ux0P):\n if not Hy7s.path.isabs(Ux0P):\n ... | [
"0.78021866",
"0.77221197",
"0.7710755",
"0.77021784",
"0.7564042",
"0.754339",
"0.75325906",
"0.7517427",
"0.75135165",
"0.74988115",
"0.74910384",
"0.74743116",
"0.7444522",
"0.7431978",
"0.7397349",
"0.7388012",
"0.73618984",
"0.734951",
"0.7338",
"0.73197997",
"0.73056227... | 0.0 | -1 |
Make path relative with respect to a root directory | def YKX9(pmON: str, mSqg: str) -> str:
PNjT = pmON.replace(mSqg, '')
if PNjT:
if PNjT[0] == '/':
PNjT = PNjT[1:]
return PNjT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sKie(YKHO, *MNSL):\n return Hy7s.path.join(YKHO._root_dir, *MNSL)",
"def g9hV(pmON, tk5Y):\n if Hy7s.path.normcase(pmON).startswith(tk5Y):\n return pmON[len(tk5Y):]\n return pmON",
"def ndr1(pmON):\n ejh1 = rsxK()\n if pmON == ejh1:\n return 'root'\n else:\n pmON = pm... | [
"0.7500815",
"0.74746865",
"0.73812366",
"0.73771816",
"0.73612535",
"0.71899474",
"0.71092075",
"0.7075705",
"0.70583487",
"0.7056178",
"0.70476735",
"0.7031951",
"0.70156735",
"0.7014577",
"0.70018137",
"0.6977166",
"0.6963935",
"0.6962692",
"0.6948276",
"0.6930921",
"0.689... | 0.7890576 | 0 |
Return a custom 404 error. | def m7kB(tTpl):
return ('Sorry, Nothing at this URL.', 404) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o3cf(P1dF):\n return '404'",
"def mZnU():\n return oGir(RA4y, '<h1>404 Error : Some crap went down, so just <a href=\"/\">HEAD HOME</a>.</h1>', [])",
"def eJkH(XObx):\n return dict(err=XObx)",
"def o3cf(P1dF):\n return G3KB('Not Found', 404)",
"def RQdI(P1dF):\n return 'Sorry, Nothing at... | [
"0.8263737",
"0.79933435",
"0.79192984",
"0.78825426",
"0.7845269",
"0.78424567",
"0.7818006",
"0.7818006",
"0.7818006",
"0.7816168",
"0.78139937",
"0.78001934",
"0.77720594",
"0.77618265",
"0.7702134",
"0.76248384",
"0.7620647",
"0.76148254",
"0.75642604",
"0.75578934",
"0.7... | 0.72552013 | 77 |
Return a custom 500 error. | def e_kA(tTpl):
return ('Sorry, unexpected error: {}'.format(tTpl), 500) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C89g(tTpl):\n return (TvZl('500.html'), 500)",
"def e_kA(tTpl):\n return ('Sorry, unexpected error: {}'.format(tTpl), 500)",
"def r1yd(tTpl):\n return (TvZl('500.html'), 500)",
"def e_kA(tTpl):\n return ('Sorry, unexpected error: {}'.format(tTpl), 500)",
"def r1yd(XObx):\n return (TvZl('... | [
"0.77419347",
"0.77353114",
"0.7727835",
"0.76502776",
"0.76437634",
"0.7625618",
"0.7604917",
"0.7602182",
"0.7597321",
"0.75885934",
"0.7562816",
"0.7562463",
"0.75489175",
"0.75489175",
"0.75374174",
"0.75283426",
"0.75283426",
"0.74986404",
"0.74597794",
"0.7424432",
"0.7... | 0.7710948 | 5 |
Return the path of the scikitlearn data dir. This folder is used by some large dataset loaders to avoid downloading the data several times. By default the data dir is set to a folder named 'scikit_learn_data' in the user home folder. Alternatively, it can be set by the 'SCIKIT_LEARN_DATA' environment variable or progra... | def Oh5_(nUtl=None):
if nUtl is None:
nUtl = PNq_.get('SCIKIT_LEARN_DATA', gzes('~', 'crf_learn_data'))
nUtl = hIOi(nUtl)
if not vtfo(nUtl):
eviw(nUtl)
return nUtl | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s8df() -> GkAb:\n i0XC = xBNw() / 'data'\n if not i0XC.is_dir():\n return GkAb.home() / '.scyan_data'\n return i0XC",
"def s8df():\n tETI = WQbV(TLI7(xAKo))\n h_xa = gzes(tETI, 'data')\n return h_xa",
"def kyd_():\n xtX7 = Hy7s.environ.get('RATER_DATA_FOLDER', Hy7s.path.expandus... | [
"0.7766947",
"0.7471835",
"0.73118293",
"0.72841716",
"0.7258708",
"0.7201278",
"0.7188874",
"0.71332765",
"0.7119021",
"0.7075864",
"0.7059744",
"0.7050692",
"0.7048534",
"0.7044649",
"0.70389956",
"0.69628525",
"0.6950673",
"0.69494605",
"0.69227105",
"0.6915462",
"0.691058... | 0.71019286 | 9 |
Return the path of the scikitlearn data dir. This folder is used by some large dataset loaders to avoid downloading the data several times. By default the data dir is set to a folder named 'scikit_learn_data' in the user home folder. Alternatively, it can be set by the 'SCIKIT_LEARN_DATA' environment variable or progra... | def Aa2v(jKe5=None):
if jKe5 is None:
jKe5 = PNq_.get('SCIKIT_LEARN_MODEL', gzes('~', 'crf_learn_model'))
jKe5 = hIOi(jKe5)
if not vtfo(jKe5):
eviw(jKe5)
return jKe5 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s8df() -> GkAb:\n i0XC = xBNw() / 'data'\n if not i0XC.is_dir():\n return GkAb.home() / '.scyan_data'\n return i0XC",
"def s8df():\n tETI = WQbV(TLI7(xAKo))\n h_xa = gzes(tETI, 'data')\n return h_xa",
"def kyd_():\n xtX7 = Hy7s.environ.get('RATER_DATA_FOLDER', Hy7s.path.expandus... | [
"0.7768214",
"0.7473039",
"0.731234",
"0.7285525",
"0.725998",
"0.72025365",
"0.71900517",
"0.7134413",
"0.71199775",
"0.71022344",
"0.7077959",
"0.7061365",
"0.7052467",
"0.7050326",
"0.70455176",
"0.7040257",
"0.6964541",
"0.695187",
"0.69503564",
"0.69236875",
"0.6916636",... | 0.0 | -1 |
This function returns all the links in the html doc such that the links belong the parent domain given. beautifulsoup returns url in unicode format. Need to conver it into string class with proper encoding. | def FAng(yo3L, Kuqu, xSnU):
if yo3L is None or len(yo3L) <= 0:
return []
try:
Z9JV = rKuS(yo3L, 'html5lib')
except TypeError:
return []
Aofo = list()
wPdp = Z9JV.find_all('a')
for QZnA in wPdp:
QZnA = QZnA.get('href')
if QZnA is None:
continue
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aQVH(pecq):\n fgTi = G4JS.get(pecq)\n _R2e = rKuS(fgTi.content, 'lxml')\n wPdp = {}\n for QZnA in _R2e.findAll('a'):\n wPdp[QZnA.get('href').encode('ascii', 'ignore')] = pecq\n return wPdp",
"def x3O5(uXvl, flR5, _AKB):\n F_cW = []\n mEbC = {}\n wvEv = rKuS(uXvl, features='html... | [
"0.70320994",
"0.68306535",
"0.6416142",
"0.6376084",
"0.636115",
"0.6242247",
"0.6216324",
"0.61994874",
"0.6191864",
"0.61868113",
"0.6181139",
"0.61548364",
"0.6107181",
"0.60871744",
"0.60836434",
"0.60675406",
"0.60574615",
"0.6047675",
"0.6030309",
"0.60155785",
"0.5970... | 0.755905 | 0 |
Return list of products code related to category id | def o7O1(YKHO, FfUs):
uQsB = []
YKHO.cursor.execute(x1Jh.format(FfUs))
for rdlD in YKHO.cursor:
if rdlD[0] not in uQsB:
uQsB.append(rdlD[0])
return uQsB | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GnyI(YKHO, Mc9N):\n usx6 = YKHO.db.query('SELECT PC_CAT_id FROM product_category WHERE PC_PROD_id = :prod_id', prod_id=Mc9N)\n return qQXR.loads(usx6.export('json'))",
"def WFl_(YKHO, wKI2):\n QePW = 'SELECT * FROM products WHERE id_category = \"{}\"'.format(wKI2)\n JG0v.cursor.execute... | [
"0.7121788",
"0.6878401",
"0.6765072",
"0.66650623",
"0.652561",
"0.64705074",
"0.63227606",
"0.63078475",
"0.624926",
"0.62410486",
"0.6223771",
"0.6190216",
"0.61756724",
"0.6174861",
"0.6110798",
"0.61049265",
"0.60955304",
"0.6079826",
"0.60709643",
"0.60514075",
"0.60159... | 0.66536283 | 4 |
Must change String from environment variable into Boolean defaults to True | def TAVI(input):
if isinstance(input, str):
if input in ('False', 'false'):
return False
else:
return True
else:
return input | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WyM0(wEf2):\n return True if Hy7s.environ.get(wEf2, False) == 'True' else False",
"def tYgd(H5ew: str) -> bool:\n return str(Hy7s.getenv(H5ew.upper())).upper() == 'TRUE'",
"def Jwq5(XuY2):\n return True if yfwM(XuY2) else False",
"def UYdb(H5ew: str) -> bool:\n return nBmD(H5ew).upper() in ('... | [
"0.8179099",
"0.79314375",
"0.7893607",
"0.7845236",
"0.7553814",
"0.7372836",
"0.7320539",
"0.73169446",
"0.72585636",
"0.7232808",
"0.71767765",
"0.71749264",
"0.7147405",
"0.7144668",
"0.7108181",
"0.70863944",
"0.70649415",
"0.70317864",
"0.7029237",
"0.69961",
"0.6986859... | 0.7787538 | 4 |
Load img with opencv and reshape | def mqgm(p4m8, zNig, ayvu):
if ayvu == 1:
VXjJ = XC5k.imread(p4m8, 0)
VXjJ = oyIN.expand_dims(VXjJ, axis=-1)
else:
print(p4m8)
hnIv.open(p4m8)
VXjJ = XC5k.imread(p4m8.strip())
VXjJ = VXjJ[:, :, ::-1]
yzQ0 = VXjJ.shape[1]
G6bM = VXjJ[:, :yzQ0 // 2, :]
L... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DnY5(YKHO, QMAG):\n MKlR, yzQ0 = (YKHO.__height, YKHO.__width)\n VXjJ = jbYn.imread(QMAG)\n VXjJ = jbYn.cvtColor(VXjJ, jbYn.COLOR_BGR2RGB)\n VXjJ = jbYn.resize(VXjJ, (MKlR, yzQ0))\n return VXjJ.reshape(1, MKlR, yzQ0, 3)",
"def q5aE(pmON):\n Xn71 = XC5k.imread(pmON)\n Wve5 = Xn71.shape\n ... | [
"0.7458003",
"0.72182935",
"0.6977507",
"0.68968856",
"0.68968856",
"0.67853147",
"0.67672145",
"0.67600477",
"0.67200094",
"0.67143774",
"0.6698246",
"0.66803855",
"0.66234404",
"0.6568432",
"0.65419215",
"0.6539928",
"0.64812297",
"0.64806545",
"0.6474877",
"0.64578515",
"0... | 0.0 | -1 |
Return a list of the unique actors involved in this history. | def gig7(YKHO):
return list(set([tvqc.who for tvqc in YKHO.events])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gig7(YKHO):\n return YKHO._actors",
"def VnoF(YKHO):\n return YKHO.actors",
"def VnoF(YKHO):\n return YKHO.actors",
"def wOwg(YKHO):\n return YKHO.history.actors()",
"def _cDf(YKHO) -> iu5r[str]:\n return set((cmJd.actor_id for cmJd in YKHO._my_signals.values()))",
"def _cDf(YKHO) -> i... | [
"0.72568756",
"0.7228454",
"0.72280085",
"0.71736354",
"0.7139596",
"0.7097138",
"0.70592433",
"0.70592433",
"0.7041978",
"0.6865948",
"0.6718137",
"0.661104",
"0.66094387",
"0.65723056",
"0.65691566",
"0.65691566",
"0.6546266",
"0.65066844",
"0.64657044",
"0.63730145",
"0.61... | 0.78766096 | 0 |
When a requested doc is not present, we should return a 404 | def v4ew(YKHO, X47D):
X47D.return_value.preamble.return_value = None
tTee = uK8v.PreambleView.as_view()
YKHO.assertRaises(uhgT, tTee, b9AL().get('/preamble/1/c/x'), paragraphs='1/c/x') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o3cf(P1dF):\n return Yxsy(pz3A({'error': 'Document not found'}), 404)",
"def o3cf(YKHO):\n raise lW34()",
"def Gftu(YKHO):\n eOtH = LQUb('1234', 'foo@user.com', 'foouser', scope=[uC2a.READ_COMPILE, uC2a.CREATE_COMPILE, uC2a.READ_FULLTEXT, uC2a.CREATE_FULLTEXT])\n with YKHO.app.app_context():\n ... | [
"0.7578598",
"0.7412772",
"0.7090618",
"0.69218004",
"0.6913944",
"0.69016755",
"0.6878704",
"0.68533784",
"0.68449885",
"0.68190384",
"0.6776456",
"0.6775375",
"0.6757295",
"0.67182577",
"0.6707824",
"0.6695624",
"0.6692449",
"0.66878587",
"0.66715884",
"0.66703695",
"0.6654... | 0.671186 | 15 |
Sets the learning rate to the initial LR decayed by 10 every 30 epochs | def e_63(K0do):
for Lwm5 in K0do.param_groups:
Lwm5['lr'] /= 5 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e_63(K0do, qtWj):\n nIX4 = nIX4 * 0.1 ** ((qtWj - 117) // 30)",
"def e_63(K0do, qtWj, qIxc):\n tspZ = qIxc.lr * 0.1 ** (qtWj // 30)\n K0do.state_dict()['param_groups'][-1]['lr'] = tspZ",
"def e_63(ma4o, K0do, qtWj, ctbl):\n tspZ = ma4o * 0.1 ** (qtWj // int(epAf.ceil(30.0 / ctbl)))\n for Lwm... | [
"0.7991837",
"0.7940576",
"0.78895533",
"0.78278863",
"0.7822731",
"0.78170556",
"0.7810941",
"0.78027624",
"0.77914375",
"0.7788607",
"0.7782131",
"0.7765793",
"0.77645",
"0.77609223",
"0.7749379",
"0.7739108",
"0.7731853",
"0.77242327",
"0.77121335",
"0.7708826",
"0.7704794... | 0.0 | -1 |
Resizes an image keeping the aspect ratio unchanged. | def lmn5(LNo8, QzZ7=None, kvoN=None, MZZH=None, Tuqy='square', RqpP: bool=False):
knmd = LNo8.dtype
MKlR, yzQ0 = LNo8.shape[:2]
KnxT = (0, 0, MKlR, yzQ0)
NXpY = 1
dvgN = [(0, 0), (0, 0), (0, 0)]
NAnm = None
if Tuqy == 'none':
return (LNo8, KnxT, NXpY, dvgN, NAnm)
if QzZ7:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zb6e(LNo8, BURA=100):\n wyQG, uy17 = LNo8.size\n pAIe = uy17 / float(wyQG)\n C2f8 = int(pAIe * BURA)\n FHlE = LNo8.resize((BURA, C2f8))\n return FHlE",
"def Zb6e(LNo8, BURA=100):\n wyQG, uy17 = LNo8.size\n pAIe = uy17 / float(wyQG)\n C2f8 = int(pAIe * BURA)\n FHlE = LNo8.resize((BU... | [
"0.77165127",
"0.77165127",
"0.7700993",
"0.7700715",
"0.7678399",
"0.7676612",
"0.76722294",
"0.7617307",
"0.7615193",
"0.7614333",
"0.759295",
"0.7588328",
"0.7556676",
"0.7499443",
"0.7479154",
"0.7479154",
"0.74774885",
"0.74686897",
"0.74213475",
"0.7408797",
"0.7408262"... | 0.0 | -1 |
Compute bounding boxes from masks. | def p5Lc(ZHfW):
oUSw = oyIN.zeros([ZHfW.shape[-1], 4], dtype=oyIN.int32)
for YRbF in range(ZHfW.shape[-1]):
r8hN = ZHfW[:, :, YRbF]
GO_b = oyIN.where(oyIN.any(r8hN, axis=0))[0]
mFka = oyIN.where(oyIN.any(r8hN, axis=1))[0]
if GO_b.shape[0]:
o4D3, ajwV = GO_b[[0, -1]]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def p5Lc(YKHO, ZHfW):\n oUSw = oyIN.zeros([ZHfW.shape[-1], 4], dtype=oyIN.int32)\n for YRbF in range(ZHfW.shape[-1]):\n r8hN = ZHfW[:, :, YRbF]\n GO_b = oyIN.where(oyIN.any(r8hN, axis=0))[0]\n mFka = oyIN.where(oyIN.any(r8hN, axis=1))[0]\n if GO_b.shape[0]:\n o4D3, ajwV... | [
"0.8053253",
"0.79046696",
"0.78671235",
"0.78048664",
"0.7801408",
"0.7797915",
"0.77164906",
"0.77041256",
"0.7686475",
"0.7634595",
"0.75643206",
"0.7510227",
"0.74642205",
"0.7463141",
"0.7463141",
"0.7409578",
"0.7344366",
"0.7048421",
"0.70444256",
"0.70380414",
"0.7017... | 0.78134555 | 3 |
Recursively find the files with `extension` in the directory `dir_path` and its subdirectories. | def UDxs(pGQh: str, Fst3: str) -> x1iM[str]:
ckRy = []
Fst3 = Fst3.strip('.').lower()
for nJTJ, bGrB, RRlC in Hy7s.walk(pGQh):
for Ux0P in RRlC:
if pmON.splitext(Ux0P)[1].strip('.').lower() == Fst3:
ckRy.append(pmON.join(nJTJ, Ux0P))
return ckRy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A99F(pmON, Uk1R, AeXe=True):\n RRlC = []\n eQqJ = []\n for Ux0P in Hy7s.listdir(pmON):\n if Hy7s.path.splitext(Ux0P)[1].lower() in Uk1R:\n RRlC.append(Hy7s.path.join(pmON, Ux0P))\n elif Hy7s.path.isdir(Hy7s.path.join(pmON, Ux0P)):\n eQqJ.append(Hy7s.path.join(pmON, ... | [
"0.8174856",
"0.808779",
"0.7957607",
"0.788642",
"0.7868416",
"0.783674",
"0.76963186",
"0.76815665",
"0.7622774",
"0.76078063",
"0.76050967",
"0.7586972",
"0.7584602",
"0.74931186",
"0.7443411",
"0.7422749",
"0.74219686",
"0.74216825",
"0.741009",
"0.7389425",
"0.7377181",
... | 0.795123 | 3 |
Return the size of current neighbor. | def pkqb(YKHO):
return YKHO.neighbor.shape[0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pkqb(YKHO):\n return len(YKHO.neighbor)",
"def p4dh(YKHO, *qIxc):\n return super().get_neighlist_size(*qIxc).result()",
"def Tecz(YKHO):\n return len(YKHO.neighbor_array)",
"def BvsR(YKHO):\n return YKHO._num_neighbors",
"def szAg(YKHO):\n return len(YKHO._neighbors)",
"def pINe(YKHO):... | [
"0.8951505",
"0.78699744",
"0.7569327",
"0.7533319",
"0.7488731",
"0.73792446",
"0.7271943",
"0.72628295",
"0.7150993",
"0.71208894",
"0.70766836",
"0.70502084",
"0.70456433",
"0.7037824",
"0.69797486",
"0.69748086",
"0.6974363",
"0.69635713",
"0.6934436",
"0.6921457",
"0.691... | 0.86314297 | 1 |
Return the size of current neighbor. | def pkqb(YKHO):
return len(YKHO.neighbor) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pkqb(YKHO):\n return YKHO.neighbor.shape[0]",
"def pkqb(YKHO):\n return YKHO.neighbor.shape[0]",
"def p4dh(YKHO, *qIxc):\n return super().get_neighlist_size(*qIxc).result()",
"def Tecz(YKHO):\n return len(YKHO.neighbor_array)",
"def BvsR(YKHO):\n return YKHO._num_neighbors",
"def szAg(... | [
"0.86314297",
"0.86314297",
"0.78699744",
"0.7569327",
"0.7533319",
"0.7488731",
"0.73792446",
"0.7271943",
"0.72628295",
"0.7150993",
"0.71208894",
"0.70766836",
"0.70502084",
"0.70456433",
"0.7037824",
"0.69797486",
"0.69748086",
"0.6974363",
"0.69635713",
"0.6934436",
"0.6... | 0.8951505 | 0 |
Replace every digit in a string by a zero. | def k1ZV(KCHu):
return ZbWC.sub('\\d', '0', KCHu) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VQKx(KCHu):\n for YRbF in ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']:\n KCHu = KCHu.replace(YRbF, '')\n return KCHu",
"def hfhL(l5Ny: str) -> str:\n Yxnq = ZbWC.sub('\\\\d+', '0', l5Ny)\n return Yxnq",
"def icwO(fktj):\n if fktj[-1].isdigit() and fktj[-2] == '0':\n retu... | [
"0.7878671",
"0.728198",
"0.6812238",
"0.67331153",
"0.6677174",
"0.6612402",
"0.66112536",
"0.6577562",
"0.65314966",
"0.64957863",
"0.6487779",
"0.64717394",
"0.646032",
"0.6425013",
"0.63594866",
"0.6307897",
"0.6281237",
"0.6273477",
"0.6246789",
"0.62312657",
"0.6230497"... | 0.8449677 | 1 |
get current auth token | def gNTt() -> h8nf[_J2v]:
KCHu: unF8 = _J2v.search()
KCHu = KCHu.query('match_all')
dixj: oGir = KCHu.execute()
for eOtH in dixj:
return eOtH
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vu5X(YKHO):\n rxBR = YKHO.token_manager.get_token()\n return rxBR",
"def Yexg(YKHO):\n return CBIr.get_token()",
"def TDQy():\n try:\n eOtH = Lgk9()\n except _OuM as error:\n raise rDSL(kQI7['BAD_AUTH_HEADER'], P1dF.message)\n return eOtH",
"def rxBR(YKHO):\n return YKH... | [
"0.8641816",
"0.8474754",
"0.84513694",
"0.8352746",
"0.82684463",
"0.82518953",
"0.8226376",
"0.8205053",
"0.82046825",
"0.8192301",
"0.8159493",
"0.81491816",
"0.8086992",
"0.80684215",
"0.8038082",
"0.80314344",
"0.8025117",
"0.80056155",
"0.795158",
"0.791682",
"0.7912399... | 0.0 | -1 |
Check if value is float. | def SH_w(BWXx):
try:
float(BWXx)
return True
except ValueError:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NLLz(YKHO, BWXx):\n try:\n float(BWXx)\n except ValueError:\n return False\n return True",
"def float(BWXx: Any):\n if isinstance(BWXx, float):\n return True\n return False",
"def SH_w(BWXx):\n try:\n float(BWXx)\n return True\n except Exception:\n ... | [
"0.895241",
"0.8860462",
"0.8745419",
"0.8736567",
"0.8687121",
"0.8687121",
"0.8687121",
"0.8687121",
"0.86332923",
"0.8632971",
"0.8595905",
"0.85800743",
"0.8520608",
"0.8514507",
"0.84909064",
"0.83557117",
"0.8314303",
"0.83069474",
"0.8289948",
"0.824047",
"0.820861",
... | 0.8854159 | 2 |
Sets the to_leg of this TripRequestResponseJourneyFareZone. | def UxBs(YKHO, UxBs):
YKHO._to_leg = UxBs | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Br5Q(YKHO, Br5Q):\n if Br5Q is None:\n raise ValueError('Invalid value for `to`, must not be `None`')\n YKHO._to = Br5Q",
"def Br5Q(YKHO, Br5Q):\n YKHO._to = Br5Q",
"def Br5Q(YKHO, Br5Q):\n YKHO._to = Br5Q",
"def Br5Q(YKHO, Br5Q):\n YKHO._to = Br5Q",
"def Br5Q(YKHO, Br5Q):\n YK... | [
"0.5920316",
"0.5749428",
"0.5749428",
"0.5749428",
"0.5749428",
"0.5447428",
"0.5396328",
"0.53804773",
"0.5265702",
"0.5265702",
"0.5249514",
"0.5223773",
"0.5110385",
"0.4989677",
"0.49770117",
"0.49406278",
"0.49406278",
"0.49406278",
"0.48768497",
"0.48635763",
"0.484154... | 0.69090796 | 0 |
Sets the from_leg of this TripRequestResponseJourneyFareZone. | def pFWD(YKHO, pFWD):
YKHO._from_leg = pFWD | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def haVx(YKHO, haVx):\n if haVx is None:\n raise ValueError('Invalid value for `_from`, must not be `None`')\n YKHO.__from = haVx",
"def UxBs(YKHO, UxBs):\n YKHO._to_leg = UxBs",
"def Dbo5(YKHO, BWXx):\n return YKHO._set_attr('from', str(BWXx))",
"def Dbo5(YKHO, BWXx):\n return YKHO._se... | [
"0.51738566",
"0.5127128",
"0.5114328",
"0.50885195",
"0.5075627",
"0.499727",
"0.499727",
"0.49669477",
"0.49669477",
"0.49669477",
"0.495758",
"0.4879575",
"0.48695529",
"0.47862017",
"0.47862017",
"0.47862017",
"0.47239017",
"0.46834204",
"0.4575642",
"0.4575642",
"0.45295... | 0.67500657 | 0 |
Returns the string representation of the model | def gTzM(YKHO):
return CgYo.pformat(YKHO.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return YKHO.text",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\... | [
"0.86418265",
"0.85103965",
"0.7853324",
"0.77442306",
"0.7712258",
"0.76979405",
"0.765959",
"0.7637644",
"0.76218504",
"0.7607561",
"0.7606604",
"0.7606604",
"0.7606604",
"0.75990754",
"0.7585653",
"0.758149",
"0.7570811",
"0.7567585",
"0.75392604",
"0.75392604",
"0.7527967... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.8392633",
"0.8354901",
"0.82950056",
"0.8132309",
"0.81149805",
"0.8099986",
"0.809911",
"0.8097883",
"0.8097883",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8066694",
"0.80594814",
"0.805757",
... | 0.8043786 | 73 |
Returns the closest parent of this Tag that matches the given criteria. | def iZD2(YKHO, mWFP=None, o8Kj={}, **B2fa):
Mkmy = None
vC9B = YKHO.find_parents(mWFP, o8Kj, 1, **B2fa)
if vC9B:
Mkmy = vC9B[0]
return Mkmy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iZD2(YKHO, mWFP=None, o8Kj={}, **B2fa):\n Mkmy = None\n vC9B = YKHO.find_parents(mWFP, o8Kj, 1)\n if vC9B:\n Mkmy = vC9B[0]\n return Mkmy",
"def _AKB(YKHO, TZ9E=None):\n if TZ9E is None or YKHO._parent is None or YKHO._parent.tag == TZ9E:\n return YKHO._parent\n return YKHO._p... | [
"0.70727396",
"0.68220246",
"0.67739683",
"0.66741866",
"0.66411936",
"0.66402894",
"0.6568228",
"0.65679175",
"0.6511159",
"0.6475504",
"0.64558077",
"0.64550316",
"0.644834",
"0.6441224",
"0.6430453",
"0.64248294",
"0.64147615",
"0.6404935",
"0.63981634",
"0.63927764",
"0.6... | 0.7069373 | 1 |
Returns the parents of this Tag that match the given criteria. | def DZKU(YKHO, mWFP=None, o8Kj={}, qoqK=None, **B2fa):
return YKHO._find_all(mWFP, o8Kj, None, qoqK, YKHO.parents, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ACnF(YKHO) -> Tzpv:\n return YKHO._parents",
"def ACnF(YKHO):\n ACnF = []\n PwWw = set()\n for Z9rn in YKHO.children:\n XP5J = Z9rn.parent\n if XP5J is not None:\n if XP5J not in PwWw:\n ACnF.append(XP5J)\n PwWw.add(XP5J)\n elif Z9rn n... | [
"0.7387748",
"0.7209852",
"0.71508825",
"0.70368874",
"0.7019119",
"0.69608754",
"0.691165",
"0.691165",
"0.691165",
"0.6894299",
"0.6893079",
"0.6891554",
"0.68574333",
"0.68487453",
"0.6845794",
"0.682989",
"0.68286765",
"0.6812288",
"0.68056345",
"0.6798575",
"0.67745763",... | 0.70014066 | 5 |
Returns true iff this tag is not identical to the other tag, as defined in __eq__. | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif):\n return not YKHO == Elif",
"def hTUE(YKHO, Elif):\n return YKHO.__ne__(Elif)",
"def Vdqg(YKHO, Elif):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n return ... | [
"0.81467134",
"0.8129461",
"0.81002766",
"0.81002766",
"0.81002766",
"0.81002766",
"0.8095856",
"0.80941457",
"0.80941457",
"0.80941457",
"0.80941457",
"0.80941457",
"0.80941457",
"0.80941457",
"0.80941457",
"0.80941457",
"0.80941457",
"0.80941457",
"0.80941457",
"0.80941457",
... | 0.81083906 | 2 |
Returns a Unicode representation of this tag and its contents. | def x8I_(YKHO, jEzb=None, EzhT=wka9, uaPq='minimal'):
if not callable(uaPq):
uaPq = YKHO._formatter_for_name(uaPq)
o8Kj = []
if YKHO.attrs:
for H5ew, wEf2 in sorted(YKHO.attrs.items()):
if wEf2 is None:
AgdR = H5ew
else:
if isinstance(w... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _MNB(YKHO):\n return QMSQ(YKHO.__str__())",
"def uZ7Y(YKHO):\n return QMSQ(YKHO.get_utf8(), 'utf8')",
"def zX3X(YKHO) -> str:\n return ''.join([chr(WKvO) for WKvO in YKHO.elements_])",
"def XbD9(YKHO) -> bytes:\n return YKHO._raw_tag",
"def Ueki(YKHO):\n return QMSQ(YKHO)",
"def l5Ny(Y... | [
"0.69975907",
"0.6982332",
"0.6888343",
"0.6823011",
"0.67561764",
"0.66686195",
"0.6654169",
"0.6654169",
"0.66096145",
"0.65643597",
"0.65555084",
"0.6528696",
"0.65007424",
"0.64956117",
"0.6483557",
"0.6482776",
"0.6482776",
"0.6482776",
"0.64357954",
"0.6413791",
"0.6397... | 0.0 | -1 |
Make sure that the given tags have the correct text. This is used in tests that define a bunch of tags, each containing a single string, and then select certain strings by some mechanism. | def thgo(YKHO, dJ1p, JVpE):
YKHO.assertEqual([TZ9E.string for TZ9E in dJ1p], JVpE) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Dukg(YKHO):\n for A0cm in YKHO.TAGS:\n dJ1p = YKHO.TAGS[A0cm]\n if isinstance(dJ1p, str):\n YKHO.TAGS[A0cm] = [dJ1p]\n dJ1p = YKHO.TAGS[A0cm]\n assert isinstance(dJ1p, (tuple, list)), ' '.join(['ERROR:', 'Expected tags for {phrase} to be str or List[str]', f'but got {d... | [
"0.6840811",
"0.67948186",
"0.6768965",
"0.64185524",
"0.63724846",
"0.6284694",
"0.6245476",
"0.6239464",
"0.6224606",
"0.62033665",
"0.6187578",
"0.6180261",
"0.6145461",
"0.61155605",
"0.61139953",
"0.61111134",
"0.6091463",
"0.60849833",
"0.60849833",
"0.6074137",
"0.6049... | 0.6877544 | 0 |
Make sure that the given tags have the correct IDs. This is used in tests that define a bunch of tags, each containing a single string, and then select certain strings by some mechanism. | def DVY3(YKHO, dJ1p, JVpE):
YKHO.assertEqual([TZ9E['id'] for TZ9E in dJ1p], JVpE) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def thgo(YKHO, dJ1p, JVpE):\n YKHO.assertEqual([TZ9E.string for TZ9E in dJ1p], JVpE)",
"def thgo(YKHO, dJ1p, JVpE):\n YKHO.assertEqual([TZ9E.string for TZ9E in dJ1p], JVpE)",
"def qEWg(YKHO):\n pass",
"def Dukg(YKHO):\n for A0cm in YKHO.TAGS:\n dJ1p = YKHO.TAGS[A0cm]\n if isinstance... | [
"0.67961794",
"0.67961794",
"0.6696065",
"0.64821404",
"0.63697857",
"0.62635386",
"0.616177",
"0.61556673",
"0.6141649",
"0.614153",
"0.60920304",
"0.6088168",
"0.60402155",
"0.60226613",
"0.5954958",
"0.59398884",
"0.5935757",
"0.5909604",
"0.59092814",
"0.59006476",
"0.589... | 0.7835791 | 0 |
Test that URIs are invariant under the transformation. | def OJzz(YKHO):
QMS2 = [u'ftp://ftp.is.co.za/rfc/rfc1808.txt', u'http://www.ietf.org/rfc/rfc2396.txt', u'ldap://[2001:db8::7]/c=GB?objectClass?one', u'mailto:John.Doe@example.com', u'news:comp.infosystems.www.servers.unix', u'tel:+1-816-555-1212', u'telnet://192.0.2.16:80/', u'urn:oasis:names:specification:docbook:... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def O5jX(YKHO):\n assert not ExNN('sip:foo.com').verify(object())",
"def RiRZ(p9bx):\n E_AB = FlJ9\n fmAV = BQ5X(tas=E_AB, fain=None, uri='abc', allocation_transfer_agency=None)\n EPWh = oKfx(tas=E_AB, submission_id=fmAV.submission_id, fain=None, uri='xyz', allocation_transfer_agency=None)\n UAju ... | [
"0.68155605",
"0.6576166",
"0.6529548",
"0.6322631",
"0.6309019",
"0.6308812",
"0.6278143",
"0.62440944",
"0.62195885",
"0.6215628",
"0.61966324",
"0.6185794",
"0.61839795",
"0.6182045",
"0.616811",
"0.61196005",
"0.6104845",
"0.60970885",
"0.6074359",
"0.6059575",
"0.6026463... | 0.7327949 | 0 |
Test that the right type of escaping is done for each part of the URI. | def KLUX(YKHO):
YKHO.assertEqual('http://xn--o3h.com/%E2%98%84', WqiH(u'http://☄.com/☄'))
YKHO.assertEqual('http://bitworking.org/?fred=%E2%98%84', WqiH(u'http://bitworking.org/?fred=☄'))
YKHO.assertEqual('http://bitworking.org/#%E2%98%84', WqiH(u'http://bitworking.org/#☄'))
YKHO.assertEqual('#%E2%98%84... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def agDw(YKHO):\n oKzE = '/foo/bar/test.txt c:\\\\foo\\\\bar'\n sGEu = '\\\\/foo\\\\/bar\\\\/test\\\\.txt c:\\\\\\\\foo\\\\\\\\bar'\n gvGd = BfDw.escape_query_string(oKzE)\n YKHO.assertEqual(gvGd, sGEu)",
"def jwRv():\n assert xE1Z().parse('d\\\\.i:\\\\nr/ut\\\\\\\\ils.max(whatever)') == [['d.i:nr... | [
"0.72037095",
"0.7072427",
"0.67606145",
"0.6624958",
"0.6513173",
"0.6513173",
"0.64492047",
"0.6419921",
"0.62257034",
"0.6186563",
"0.6111597",
"0.60958457",
"0.6085438",
"0.5992829",
"0.5988248",
"0.5971221",
"0.5945577",
"0.5935895",
"0.59091794",
"0.59091794",
"0.590258... | 0.5405288 | 80 |
wrapmodule(module) Attempts to replace a module's socket library with a SOCKS socket. Must set a default proxy using setdefaultproxy(...) first. This will only work on modules that import socket directly into the namespace; most of the Python Standard Library falls into this category. | def l_qn(yR_P):
if Uvsl != None:
yR_P.socket.socket = IfFh
else:
raise e20F((4, 'no proxy specified')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AyEJ(yR_P):\n if IfFh.default_proxy:\n yR_P.socket.socket = IfFh\n else:\n raise e20F('No default proxy specified')",
"def kMyc(YKHO, yR_P):\n return eWlL(hjar(YKHO, yR_P))",
"def keqO(Ehsq):\n Ehsq.setattr('socket.socket', xheD)",
"def Xs2y(YKHO):\n nGaG = GGmw.socket\n G... | [
"0.90025",
"0.6371931",
"0.6216157",
"0.6147957",
"0.6147957",
"0.60730284",
"0.59341586",
"0.5755115",
"0.5624008",
"0.5425849",
"0.52902997",
"0.5260904",
"0.5231329",
"0.5138125",
"0.51207936",
"0.5114766",
"0.5072591",
"0.50663096",
"0.50550157",
"0.50226367",
"0.5000342"... | 0.8989226 | 1 |
Create a base class with a metaclass. | def rSS7(e5kH, P8oC=object):
return e5kH('NewBase', (P8oC,), {}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rSS7(e5kH, P8oC=object):\n return e5kH('NewBase', (P8oC,), {})",
"def rSS7(e5kH, P8oC=object):\n return e5kH('NewBase', (P8oC,), {})",
"def rSS7(e5kH, P8oC=object):\n return e5kH('NewBase', (P8oC,), {})",
"def rSS7(e5kH, P8oC=object):\n return e5kH('NewBase', (P8oC,), {})",
"def pjJO(y4vQ=t... | [
"0.82321227",
"0.82321227",
"0.82321227",
"0.82321227",
"0.8203042",
"0.80391204",
"0.80391204",
"0.80391204",
"0.8017039",
"0.8017039",
"0.78227603",
"0.77492",
"0.7551718",
"0.7547112",
"0.74752706",
"0.74461424",
"0.74461424",
"0.7396246",
"0.73674446",
"0.7348712",
"0.733... | 0.82980454 | 1 |
Return longitude, latitude of northeast (top, right) corner of bounding box, as a tuple. This assumes that bounding box is always a rectangle, which appears to be the case at present. | def oM1k(YKHO):
return tuple(YKHO.coordinates[0][2]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K5Jk(cviu):\n return cviu.get_lower_left() + cviu.get_upper_right()",
"def i5eZ(cviu):\n LFlW, CN9P, _tIi, LSh8 = cviu\n TVTK, H2v2 = (_tIi - LFlW, LSh8 - CN9P)\n if TVTK > H2v2:\n yRWF = (CN9P + LSh8) // 2\n CN9P = yRWF - TVTK // 2\n LSh8 = CN9P + TVTK\n else:\n EA... | [
"0.76826763",
"0.725806",
"0.71692026",
"0.707299",
"0.70195276",
"0.69274354",
"0.6902553",
"0.6900244",
"0.68874174",
"0.6879696",
"0.68688035",
"0.6867696",
"0.6852947",
"0.6843145",
"0.6806493",
"0.6795893",
"0.67875934",
"0.67644864",
"0.67502815",
"0.6744283",
"0.674182... | 0.0 | -1 |
Escape a URL including any /. | def IguF(KCHu):
return uRlK.quote(KCHu, safe='~') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CYkN(bD7m):\n X4T_ = kLJC(bD7m)\n return X4T_._replace(netloc=X4T_.netloc.encode('idna').decode('ascii'), path=Sz4w(X4T_.path), params=Sz4w(X4T_.params), query=Sz4w(X4T_.query), fragment=Sz4w(X4T_.fragment)).geturl()",
"def A5Qt(bD7m, KXjL='/'):\n return ILZP(uRlK.quote(cJ_x(bD7m), cJ_x(KXjL)))",
... | [
"0.75820833",
"0.7284564",
"0.7246915",
"0.72054595",
"0.7123162",
"0.6962088",
"0.68669903",
"0.6846568",
"0.684164",
"0.6838139",
"0.6811676",
"0.67771345",
"0.67492026",
"0.67492026",
"0.6720022",
"0.67010546",
"0.6656133",
"0.6612842",
"0.65894395",
"0.65835565",
"0.65751... | 0.6916909 | 6 |
Turn URL string into parameters. | def pmNP(Oohf):
SGPK = SwjJ.parse_qs(Oohf, keep_blank_values=False)
for G1Hx, Ty9i in SGPK.iteritems():
SGPK[G1Hx] = uRlK.unquote(Ty9i[0])
return SGPK | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pmNP(Oohf):\n SGPK = _Ibt(Oohf.encode('utf-8'), keep_blank_values=True)\n for G1Hx, Ty9i in SGPK.iteritems():\n SGPK[G1Hx] = uRlK.unquote(Ty9i[0])\n return SGPK",
"def UqZf(Oohf):\n SGPK = KVWQ.parse_qs(Oohf, keep_blank_values=False)\n for G1Hx, Ty9i in SGPK.iteritems():\n SGPK[G... | [
"0.7349705",
"0.71719503",
"0.710244",
"0.68732923",
"0.6846075",
"0.6709672",
"0.658793",
"0.6523556",
"0.64784896",
"0.64761007",
"0.64753073",
"0.64412576",
"0.6423888",
"0.642368",
"0.6368142",
"0.6295908",
"0.62867635",
"0.62533367",
"0.62488884",
"0.6236591",
"0.6234501... | 0.73078614 | 1 |
Test that the query uri is as expected. | def qsK3(YKHO):
YKHO.assertEqual(Dd0S.uri, u'http://query.yahooapis.com/v1/yql?q=select+*+from+flickr.photos.search+where+text%3D%22panda%22+limit+3') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MjZb(YKHO, umWR=''):\n aEqx = KVWQ.parse_qs(umWR)\n YKHO.assertEqual(aEqx, _sCb.last_request().querystring)",
"def gzmG(YKHO):\n YKHO.assertIsNone(LM5P.get_query(''))\n YKHO.assertIsNone(LM5P.get_query('http://www.example.com'))\n YKHO.assertIsNone(LM5P.get_query('http://www.example.com/'))\n ... | [
"0.7803873",
"0.7632849",
"0.74519044",
"0.6982969",
"0.68836427",
"0.6875658",
"0.6831566",
"0.6777918",
"0.6772567",
"0.6740219",
"0.66176814",
"0.66074675",
"0.66058636",
"0.6598353",
"0.65901446",
"0.6473422",
"0.6470021",
"0.646399",
"0.64202446",
"0.64180595",
"0.636012... | 0.64259624 | 18 |
mute [channel] Makes the bot mute a channel.. If [channel] is blank the bot will mute the channel the command was used in. | def KkzS(pKvt, w2B8=None, FyXI=None, vTGh=None):
IJwb('+m', 'mute', pKvt, FyXI, w2B8, vTGh) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def set_mute_role(YKHO, OaeV, *, LmAn: RoleConv=None):\n bo34.info(\"Setting mute role for guild '%s' (%d) to '%s'\", OaeV.guild.name, OaeV.guild.id, LmAn)\n if LmAn is not None:\n await YKHO.check_role(OaeV, LmAn)\n with YKHO.bot.sql.transaction():\n YKHO.bot.sql.settings.set_special_... | [
"0.688747",
"0.6866456",
"0.6862659",
"0.68154573",
"0.6745259",
"0.66909105",
"0.66867596",
"0.66730493",
"0.66683674",
"0.66424036",
"0.66366965",
"0.6624884",
"0.66226697",
"0.659054",
"0.658254",
"0.6569339",
"0.6548623",
"0.65298826",
"0.6513643",
"0.6485649",
"0.6483261... | 0.67941785 | 4 |
mute [channel] Makes the bot mute a channel.. If [channel] is blank the bot will mute the channel the command was used in. | def hpKF(pKvt, w2B8=None, FyXI=None, vTGh=None):
IJwb('-m', 'unmute', pKvt, FyXI, w2B8, vTGh) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def set_mute_role(YKHO, OaeV, *, LmAn: RoleConv=None):\n bo34.info(\"Setting mute role for guild '%s' (%d) to '%s'\", OaeV.guild.name, OaeV.guild.id, LmAn)\n if LmAn is not None:\n await YKHO.check_role(OaeV, LmAn)\n with YKHO.bot.sql.transaction():\n YKHO.bot.sql.settings.set_special_... | [
"0.688747",
"0.6866456",
"0.6862659",
"0.68154573",
"0.67941785",
"0.6745259",
"0.66909105",
"0.66867596",
"0.66730493",
"0.66683674",
"0.66424036",
"0.66366965",
"0.6624884",
"0.66226697",
"0.659054",
"0.658254",
"0.6569339",
"0.6548623",
"0.65298826",
"0.6513643",
"0.648564... | 0.0 | -1 |
Truncates a string after a certain number of words. | def jbiC(hGN5, u54L=10, ZI14='...'):
iGmB = hGN5.split(' ')
yvT9 = None
WKvO = 0
for YRbF in iGmB:
if WKvO <= u54L:
if yvT9:
yvT9 = yvT9 + ' ' + iGmB[WKvO]
else:
yvT9 = iGmB[WKvO]
WKvO += 1
if WKvO <= u54L:
return yvT9
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def G34s(l5Ny):\n V22M = 25\n return ' '.join(ZbWC.sub('(?s)<.*?>', ' ', l5Ny).split()[:V22M])",
"def PAqT(KCHu: str, u54L: int) -> str:\n V22M = KCHu.split(' ')\n if len(V22M) <= u54L:\n return KCHu\n else:\n return f'{' '.join(V22M[:u54L])} …'",
"def vQat(l5Ny):\n haNY = 40\n ... | [
"0.7906503",
"0.772852",
"0.7704852",
"0.76755553",
"0.7386462",
"0.733495",
"0.7330213",
"0.7327862",
"0.7325432",
"0.7288775",
"0.7268876",
"0.7261494",
"0.7255067",
"0.7252813",
"0.72317415",
"0.7224855",
"0.7160419",
"0.71267885",
"0.7065875",
"0.7062099",
"0.70571357",
... | 0.76227903 | 4 |
r""" Generator that splits a string by spaces, leaving quoted phrases together. Supports both single and double quotes, and supports escaping quotes with backslashes. In the output, strings will keep their initial and trailing quote marks and escaped quotes will remain escaped (the results can then be further processed... | def VKK_(l5Ny):
for HkJz in gxDx.finditer(l5Ny):
yield HkJz.group(0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RXAQ(KCHu, Cp3Z=None, PenU='\"\\''):\n if Cp3Z is None:\n import string\n Cp3Z = string.whitespace\n lzQg = None\n vC9B = []\n eOtH = []\n for Z9rn in KCHu:\n if Z9rn in PenU:\n if Z9rn == lzQg:\n lzQg = None\n elif lzQg is None:\n ... | [
"0.70304525",
"0.68840545",
"0.6784767",
"0.6749424",
"0.6743461",
"0.6711847",
"0.66785556",
"0.6579529",
"0.6392235",
"0.6382673",
"0.63729924",
"0.6315747",
"0.6252186",
"0.62249106",
"0.61538625",
"0.60369414",
"0.5955764",
"0.5944217",
"0.5848776",
"0.58447266",
"0.58312... | 0.0 | -1 |
Takes two datetime objects and returns the time between d and now as a nicely formatted string, e.g. "10 minutes". If d occurs after now, then "0 minutes" is returned. Units used are years, months, weeks, days, hours, and minutes. Seconds and microseconds are ignored. Up to two adjacent units will be displayed. For exa... | def i1Gn(Csk6, wzkt=None):
eHxA = ((60 * 60 * 24 * 365, ('year', 'years')), (60 * 60 * 24 * 30, ('month', 'months')), (60 * 60 * 24 * 7, ('week', 'weeks')), (60 * 60 * 24, ('day', 'days')), (60 * 60, ('hour', 'hours')), (60, ('minute', 'minutes')))
if isinstance(Csk6, int) or isinstance(Csk6, float):
Cs... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ct8j(Csk6):\n nd0d = lambda WKvO: 's' if WKvO > 1 else ''\n jrSF = lambda WKvO: WKvO[:-1]\n YG9g = lambda PXGI, mWFP: '%s %s%s' % (PXGI, mWFP, nd0d(PXGI)) if PXGI > 0 else ''\n M5Gi = ['years', 'months', 'days', 'hours', 'minutes', 'seconds']\n wzkt = qcWV.datetime.utcnow()\n Zma6 = d5IO.rela... | [
"0.7058902",
"0.6899877",
"0.6655705",
"0.64242035",
"0.6195161",
"0.6130635",
"0.6108759",
"0.6083173",
"0.60537565",
"0.60441333",
"0.6011244",
"0.59836733",
"0.59787226",
"0.59551966",
"0.5936604",
"0.5932836",
"0.59311026",
"0.59269583",
"0.59051836",
"0.5890135",
"0.5882... | 0.6865072 | 2 |
Basic test of compute_notebook_file() that creates a notebook programatically, writes it, and executes it. | def pTbJ(TBXe):
TgG9 = GkAb(TBXe) / 'notebook.ipynb'
K_hV = n3Ja.v4.new_notebook()
K_hV.cells.append(n3Ja.v4.new_code_cell('1 + 2\n'))
n3Ja.write(K_hV, str(TgG9))
esV0(TgG9)
GPal = n3Ja.read(str(TgG9), as_version=n3Ja.NO_CONVERT)
assert GPal.cells[0].outputs[0]['data']['text/plain'] == '3' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qdYn(cHRH, SGPK, SJos=None, AcwX='Python3'):\n print('Running the {} notebook'.format(cHRH))\n E3oo = qcWV.utcnow().strftime('%Y%m%d%H%M')\n TAVV = g2zq.current_process().pid\n y0cW = '{}-'.format(E3oo)\n hEAh = '{}'.format(TAVV)\n print(' - process id: {}'.format(TAVV))\n if not SJos:\n ... | [
"0.72163904",
"0.7022181",
"0.7001509",
"0.6942339",
"0.6829178",
"0.6668303",
"0.6657451",
"0.6470282",
"0.64398545",
"0.6413518",
"0.639782",
"0.6388455",
"0.6340108",
"0.63308334",
"0.6306272",
"0.62685245",
"0.6257271",
"0.6245529",
"0.62363553",
"0.6235545",
"0.62290263"... | 0.8567951 | 0 |
Returns a random 8char password of uppercase, lowercase, numbers, and symbols | def t4Un():
jTXt = []
for YRbF in range(2):
jTXt.append(tuKI.choice(LSh8))
jTXt.append(tuKI.choice(CN9P))
jTXt.append(tuKI.choice(rmc3))
jTXt.append(tuKI.choice(mSrU))
tuKI.shuffle(jTXt)
return ''.join(jTXt) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BSw2():\n return ''.join((tuKI.choice(vIwR.ascii_uppercase + vIwR.digits) for WKvO in range(8)))",
"def ikbr():\n return ''.join((jxbx().choice(tcl1 + BHGE) for bGrB in range(8)))",
"def Ywt8():\n w5bg = C1SZ + BHGE + '!@#$%^&()'\n jTXt = ''.join((Acvy(w5bg) for YRbF in range(8)))\n return j... | [
"0.88325715",
"0.8790802",
"0.86368364",
"0.85477555",
"0.83599585",
"0.8329541",
"0.83160174",
"0.8291155",
"0.82773995",
"0.82623243",
"0.82432026",
"0.8233766",
"0.82127166",
"0.8191963",
"0.8176112",
"0.8164454",
"0.816095",
"0.8139269",
"0.8133886",
"0.8132913",
"0.81164... | 0.7730611 | 57 |
Renders map onto screen. | def _1tc(YKHO):
for WKvO in range(TVTK):
for LVAh in range(H2v2):
bseI = YKHO.map[LVAh][WKvO]
ooFh = YKHO.tiles[bseI]
D1I4.blit(ooFh, (WKvO * pA0V, LVAh * pA0V)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NxsK(YKHO):\n a9eO.draw.rect(YKHO._window, a9eO.Color(255, 255, 255, 255), a9eO.Rect(0, 0, PSrQ.ResolutionWidth(), PSrQ.ResolutionHeight()))\n YKHO._displayTiles(0, 0, YKHO._map.blockWidth - 1, YKHO._map.blockHeight - 1)",
"def JmFt(YKHO):\n YKHO.map.draw()\n YKHO.sprites.draw()",
"def BjsW(YKH... | [
"0.8023376",
"0.75207716",
"0.74891335",
"0.7469868",
"0.74088657",
"0.7372338",
"0.731596",
"0.7206601",
"0.7141381",
"0.7133491",
"0.7047789",
"0.702301",
"0.7022189",
"0.70000273",
"0.6999628",
"0.6965464",
"0.6950648",
"0.6916179",
"0.6876376",
"0.68435353",
"0.6790946",
... | 0.7439249 | 4 |
Sends a GET request to the Internode API. | def NMoC(YKHO, bD7m='', **B2fa):
bD7m = '%s/%s' % (YKHO.host, bD7m)
geh0 = G4JS.get(bD7m, auth=YKHO.auth, headers=YKHO.headers, **B2fa)
assert geh0.status_code != 401, 'Request failed. Authentication was missing or invalid.'
J_Es = LL_W.fromstring(geh0.content)
rhwM = J_Es.find('error/msg')
asse... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f2Ot(YKHO) -> 'outputs.HTTPGetActionResponse':\n return qe4Y.get(YKHO, 'http_get')",
"def Wp7P(YKHO):\n try:\n YKHO.get()\n except VrQA:\n import sys\n Wxnj, tO9_ = sys.exc_value\n YKHO.send_error(Wxnj, tO9_)",
"def Wp7P(YKHO):\n YKHO.handle_request('GET')",
"def N... | [
"0.7267906",
"0.7199147",
"0.7130832",
"0.69661283",
"0.6936423",
"0.69196993",
"0.6918064",
"0.68990296",
"0.68798757",
"0.68271834",
"0.6826687",
"0.6816163",
"0.67806613",
"0.67442536",
"0.6737624",
"0.6725838",
"0.6725725",
"0.6710537",
"0.67076594",
"0.6704295",
"0.66838... | 0.0 | -1 |
Return a list of triples (x, y, z) of positive numbers all less than or equal to n, such that x ^ 2 + y ^ 2 == z ^ 2, with no duplicate triples or premutations of ealier triples. No recursion, no higherorder functions. Use list comprehension! | def P5tZ(FGW3):
return [(WKvO, LVAh, epBp) for epBp in range(FGW3 + 1) for LVAh in range(epBp) for WKvO in range(LVAh) if WKvO * WKvO + LVAh * LVAh == epBp * epBp] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jeEe(exwG):\n return [(WKvO, LVAh, epBp) for WKvO in range(1, exwG + 1) for LVAh in range(WKvO, exwG + 1) for epBp in range(LVAh, exwG + 1) if epBp * epBp == WKvO * WKvO + LVAh * LVAh]",
"def K_24(exwG):\n vC9B = []\n if exwG > 3:\n for Z9rn in range(5, exwG):\n for Fg_i in range(4... | [
"0.81033546",
"0.7822151",
"0.7780683",
"0.76653963",
"0.7286041",
"0.7260038",
"0.7232431",
"0.71660674",
"0.7129023",
"0.70070904",
"0.69242835",
"0.68773973",
"0.68298566",
"0.67875177",
"0.6772684",
"0.67326033",
"0.6560801",
"0.65504766",
"0.6550067",
"0.65071577",
"0.64... | 0.79061407 | 1 |
Method to build and return a HumanChallenge object from a dictionary | def KggH(YKHO, R0eo):
tO9_ = a6Uk()
tO9_.behavior = YKHO.convert_behavior_to_int(R0eo['behavior'])
if R0eo.get('part_place_condition'):
tO9_.condition.type = FRJU.PART_PLACE
tO9_.condition.part_place_condition.part.type = YKHO.convert_part_type_to_int(R0eo['part_place_condition']['type'])
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eLpg(QePW):\n nPrm = QePW.form or QePW.get_json()\n yzq9 = igHx(**nPrm)\n NCls.session.add(yzq9)\n NCls.session.commit()\n return yzq9",
"def eLpg(QePW):\n nPrm = QePW.form or QePW.get_json()\n print(nPrm)\n yzq9 = LQRT(**nPrm)\n NCls.session.add(yzq9)\n NCls.session.commit()\n ... | [
"0.6093356",
"0.58772814",
"0.58720475",
"0.5745371",
"0.5716052",
"0.57045364",
"0.56776935",
"0.5651786",
"0.5651786",
"0.56466174",
"0.56297016",
"0.5576063",
"0.55758715",
"0.55648977",
"0.55621105",
"0.55570674",
"0.55564",
"0.55240726",
"0.5508275",
"0.54874617",
"0.545... | 0.7340893 | 0 |
Serializes resource properties so that they are ready for marshaling to the gRPC endpoint. | def zcP2(lhy8):
BlNT = rmMe.Struct()
for G1Hx, Ty9i in list(lhy8.items()):
BlNT[G1Hx] = CNet(Ty9i)
return BlNT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tWwp(YKHO):\n return {}",
"def KsYs(YKHO):\n DkWr = 15\n GL2u = 0\n JbyC = []\n udmN, A2jl = ([], [])\n lhy8 = YKHO.properties\n lhy8.setdefault('content_encoding', 'utf-8')\n for H5ew, Zkik in YKHO.PROPERTIES:\n wEf2 = lhy8.get(H5ew, None)\n if wEf2 is not None:\n ... | [
"0.6842378",
"0.6451994",
"0.63902336",
"0.61813945",
"0.6116393",
"0.610482",
"0.6092167",
"0.6004505",
"0.6000916",
"0.5977413",
"0.5969009",
"0.5926923",
"0.5886955",
"0.58622426",
"0.58558816",
"0.58435696",
"0.5829534",
"0.5787254",
"0.5780506",
"0.5780506",
"0.5773155",... | 0.71752626 | 0 |
Deserializes a protobuf `struct_pb2.Struct` into a Python dictionary containing normal Python types. | def kqun(HSBX):
assert isinstance(HSBX, rmMe.Struct)
if roQy in HSBX:
if HSBX[roQy] == M0uQ:
if 'path' in HSBX:
return i69c.new_file_asset(HSBX['path'])
if 'text' in HSBX:
return i69c.new_string_asset(HSBX['text'])
if 'uri' in HSBX:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eVnH(BlNT):\n S3A1 = lambda vF49: (vF49[0], getattr(BlNT, vF49[0]))\n return dict(list(map(S3A1, BlNT._fields_)))",
"def O1r5(SRYB):\n Aofo = {}\n for hkS8 in SRYB.struct_value:\n if hkS8.type == _wfx.TYPE_ENUM:\n Aofo[hkS8.name] = N1EN(hkS8)\n elif hkS8.type == _wfx.TYPE... | [
"0.7462101",
"0.745352",
"0.64398193",
"0.6418094",
"0.63611764",
"0.6324369",
"0.62323654",
"0.6043048",
"0.6003273",
"0.589749",
"0.57978064",
"0.5723017",
"0.5710466",
"0.5700515",
"0.5694805",
"0.5687803",
"0.5687803",
"0.5675372",
"0.5675372",
"0.5675372",
"0.5675372",
... | 0.0 | -1 |
Return cos solar incidence of surface slopes (surf_theta, surf_az) given sun location (sun_theta, sun_az) using the dot product. If cinc 90 degrees. Limit these values to cinc = 0. | def Abpq(ENNw, bDpn, CX4k, WduW):
gpNQ = uL0C.sph2cart(oyIN.radians(ENNw), oyIN.radians(bDpn))
kJBx = uL0C.sph2cart(oyIN.radians(CX4k), oyIN.radians(WduW))
OBWz = (kJBx * gpNQ).sum(axis=2)
OBWz[OBWz < 0] = 0
if isinstance(ENNw, zuVY.DataArray):
OBWz = zuVY.ones_like(ENNw) * OBWz
OBWz... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Bjao(Fo6H, _HZ0, Ir38, VMex):\n dt5m = Ir38 - _HZ0\n PJN4 = oyIN.cos(Fo6H) * oyIN.cos(VMex) + oyIN.sin(Fo6H) * oyIN.sin(VMex) * oyIN.cos(dt5m)\n return PJN4",
"def ipRX(WKvO, LVAh, epBp, P6bq, Ty9i, yzQ0):\n GUkd = WKvO * Ty9i - LVAh * P6bq\n nQ85 = oyIN.sqrt((LVAh * yzQ0 - epBp * Ty9i) ** 2 +... | [
"0.592083",
"0.58763963",
"0.57609814",
"0.56899005",
"0.561652",
"0.5597033",
"0.5511582",
"0.5477673",
"0.547718",
"0.5457991",
"0.5431273",
"0.53878367",
"0.5380933",
"0.5339606",
"0.5299667",
"0.52854735",
"0.5271913",
"0.5263705",
"0.5245131",
"0.5231924",
"0.52225655",
... | 0.8352279 | 0 |
Return blackbody radiance at given wavelength(s) and temp(s). | def XbTD(__d3, ycBG):
return vYx4(cLZT(__d3), ycBG, 'wl') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fRvR(uK7a, ycBG):\n na1r.debug('Using wavelengths when calculating the Blackbody temp...')\n if oyIN.isscalar(ycBG):\n ovGo = oyIN.array([ycBG], dtype='float64')\n else:\n ovGo = oyIN.array(ycBG, dtype='float64')\n ROpF = ovGo.shape\n if oyIN.isscalar(uK7a):\n __d3 = oyIN.ar... | [
"0.78886235",
"0.78002954",
"0.73445284",
"0.69220227",
"0.6638906",
"0.6626465",
"0.66205215",
"0.6437712",
"0.6422248",
"0.6399421",
"0.6263604",
"0.62218666",
"0.6204242",
"0.6115792",
"0.60506976",
"0.6045941",
"0.5977764",
"0.5970674",
"0.5964917",
"0.59605837",
"0.59212... | 0.5905852 | 21 |
Return blackbody radiance at given wavenumber(s) and temp(s). | def vYx4(GxyA, ycBG, UKA4='wn'):
jzdc = 2 * 6.6260755e-34 * 29979245800.0 * 29979245800.0
Fg_i = 1.43879
if isinstance(ycBG, (float, int)):
if ycBG <= 0:
ycBG = 1
elif isinstance(ycBG, zuVY.DataArray):
ycBG = ycBG.clip(min=1)
else:
ycBG[ycBG < 0] = 1
with qmLP... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NQ_1(GxyA, ycBG):\n na1r.debug('Using wave numbers when calculating the Blackbody temp...')\n if oyIN.isscalar(ycBG):\n ovGo = oyIN.array([ycBG], dtype='float64')\n else:\n ovGo = oyIN.array(ycBG, dtype='float64')\n ROpF = ovGo.shape\n if oyIN.isscalar(GxyA):\n TNS7 = oyIN.a... | [
"0.8200032",
"0.7342117",
"0.72576106",
"0.70239675",
"0.6607272",
"0.6546472",
"0.62312305",
"0.622136",
"0.6179472",
"0.6148315",
"0.6121485",
"0.6111754",
"0.6109615",
"0.6055807",
"0.6033204",
"0.60276634",
"0.60079205",
"0.5973798",
"0.59529907",
"0.59141695",
"0.5899263... | 0.663277 | 4 |
Convert radiance from units W/(cm2 sr cm1) to W/(cm2 sr um). | def Bely(GxyA, Wskb):
yzTi = GxyA * 0.0001
XAdV = Wskb * 10000.0
return XAdV * yzTi ** 2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a8Pe(YKHO, Br5Q):\n if YKHO.unit and (YKHO.unit.name == 'ft' or YKHO.unit.name == 'ft') and (Br5Q == 'm'):\n YKHO.unit.name = Br5Q\n return YKHO.value / 3.281\n return YKHO.value",
"def _5gs(YKHO):\n ycBG = 298.15\n aM8h = ZFIl / 1000.0 * ycBG * k8Sc\n return aM8h",
"def iz9l()... | [
"0.67320645",
"0.6571254",
"0.6479919",
"0.6462926",
"0.6345918",
"0.6275268",
"0.6264807",
"0.6258155",
"0.62201154",
"0.6199296",
"0.6183272",
"0.6165362",
"0.61484224",
"0.61293525",
"0.61187744",
"0.61019385",
"0.60413694",
"0.6036055",
"0.6034966",
"0.6032788",
"0.601625... | 0.6162407 | 12 |
Convert radiance from units W/(cm2 sr cm1) to W/(cm2 sr um). | def TG18(lNm8, zSB7):
X1AK = 1 / lNm8
XK9l = zSB7 / X1AK ** 2
return XK9l * 0.0001 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a8Pe(YKHO, Br5Q):\n if YKHO.unit and (YKHO.unit.name == 'ft' or YKHO.unit.name == 'ft') and (Br5Q == 'm'):\n YKHO.unit.name = Br5Q\n return YKHO.value / 3.281\n return YKHO.value",
"def _5gs(YKHO):\n ycBG = 298.15\n aM8h = ZFIl / 1000.0 * ycBG * k8Sc\n return aM8h",
"def iz9l()... | [
"0.67321855",
"0.6570534",
"0.6479912",
"0.6462447",
"0.634582",
"0.6276484",
"0.62638915",
"0.6219451",
"0.6199709",
"0.6183013",
"0.6165366",
"0.6163804",
"0.61482453",
"0.6128241",
"0.61187834",
"0.61028117",
"0.60423154",
"0.60366327",
"0.60349345",
"0.60331106",
"0.60164... | 0.6259478 | 7 |
Test the validation behavior of FleurBandDosWorkChain if wrong input is provided it should throw an exitcode and not start a Fleur run or crash | def m59p(_zr0, c4rg, RYm_, d_R7, C6iK, rQfP):
xAU6 = {'resources': {'num_machines': 1, 'num_mpiprocs_per_machine': 1}, 'max_wallclock_seconds': 5 * 60, 'withmpi': False, 'custom_scheduler_commands': ''}
xAU6 = zPjx.Dict(dict=xAU6).store()
i5q2 = _zr0
NhPF = c4rg
g8x2 = d_R7()
g8x2.store()
KN... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Wp7e(J5dx):\n NBjn = J5dx(exit_code=qmi2(0))\n NBjn.setup()\n sVwB = NBjn.ctx.children[-1]\n assert NBjn.sanity_check_insufficient_bands(sVwB) is None",
"def V4Mk(YKHO):\n try:\n KKTL.run.main(['tripddd'])\n except SystemExit as e:\n YKHO.assertEqual(tTpl.code, 2)",
"def jII... | [
"0.6764179",
"0.654576",
"0.6429379",
"0.6428122",
"0.6413183",
"0.64113784",
"0.6407701",
"0.6326635",
"0.63204986",
"0.630159",
"0.62949324",
"0.62942344",
"0.62679887",
"0.62392694",
"0.62142885",
"0.62035966",
"0.61608696",
"0.61479574",
"0.61071694",
"0.6089002",
"0.6084... | 0.66382486 | 1 |
Returns the string representation of the model | def gTzM(YKHO):
return EyO9(YKHO.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return YKHO.text",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\... | [
"0.86416155",
"0.8510352",
"0.78545547",
"0.77443707",
"0.77117187",
"0.7697595",
"0.76603293",
"0.7638324",
"0.76217484",
"0.7607743",
"0.7607743",
"0.7607743",
"0.76074046",
"0.75997984",
"0.7585864",
"0.7583017",
"0.75715595",
"0.75687325",
"0.7539626",
"0.7539626",
"0.752... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.8392633",
"0.8354901",
"0.82950056",
"0.8132309",
"0.81149805",
"0.8099986",
"0.809911",
"0.8097883",
"0.8097883",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8066694",
"0.80594814",
"0.805757",
... | 0.0 | -1 |
The set of arguments for constructing a WorkspaceSqlAadAdmin resource. | def FIMM(Ro_8, *, TRLE: pulumi.Input[str], vSUp: pulumi.Input[str], m0KV: Optional[pulumi.Input[str]]=None, MC83: Optional[pulumi.Input[str]]=None, Wswm: Optional[pulumi.Input[str]]=None, mLXZ: Optional[pulumi.Input[str]]=None):
qe4Y.set(Ro_8, 'resource_group_name', TRLE)
qe4Y.set(Ro_8, 'workspace_name', vSUp)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(Ro_8, kFeU: str, qIxc: WorkspaceSqlAadAdminArgs, VKhi: Optional[pulumi.ResourceOptions]=None):\n ...",
"def NMoC(kFeU: str, id: pulumi.Input[str], VKhi: Optional[pulumi.ResourceOptions]=None) -> 'WorkspaceSqlAadAdmin':\n VKhi = qe4Y.ResourceOptions.merge(VKhi, qe4Y.ResourceOptions(id=id))\n r6D... | [
"0.80509615",
"0.6331329",
"0.58526725",
"0.556568",
"0.5472528",
"0.5360174",
"0.5347982",
"0.52237153",
"0.52193475",
"0.5112555",
"0.5100943",
"0.5097708",
"0.50873095",
"0.50840414",
"0.50596863",
"0.5020952",
"0.5012916",
"0.49976394",
"0.49943238",
"0.49614128",
"0.4947... | 0.5378229 | 5 |
The name of the resource group. The name is case insensitive. | def TRLE(YKHO) -> qe4Y.Input[str]:
return qe4Y.get(YKHO, 'resource_group_name') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TRLE(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_group_name')",
"def TRLE(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_group_name')",
"def IXKo(YKHO) -> str:\n return qe4Y.get(YKHO, 'group_name')",
"def TRLE(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'resource_group_name')",
... | [
"0.8590243",
"0.8590243",
"0.8364527",
"0.8202957",
"0.8202957",
"0.8202957",
"0.8202957",
"0.8202957",
"0.8202957",
"0.8202957",
"0.8202957",
"0.8202957",
"0.8202957",
"0.8202957",
"0.8202957",
"0.8202957",
"0.8202957",
"0.8202957",
"0.8202957",
"0.8202957",
"0.8202957",
"... | 0.80886495 | 42 |
Tenant ID of the workspace active directory administrator | def mLXZ(YKHO) -> h8nf[qe4Y.Input[str]]:
return qe4Y.get(YKHO, 'tenant_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xBVc():\n return dp9S.Tenant(QpfX.GLOBAL.ldap.conn)",
"def mLXZ(YKHO) -> str:\n return qe4Y.get(YKHO, 'tenant_id')",
"def mLXZ(YKHO) -> str:\n return qe4Y.get(YKHO, 'tenant_id')",
"def mLXZ(YKHO) -> str:\n return qe4Y.get(YKHO, 'tenant_id')",
"def mLXZ(YKHO) -> str:\n return qe4Y.get(YKH... | [
"0.79251474",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.7465739",... | 0.68456304 | 61 |
Tenant ID of the workspace active directory administrator | def mLXZ(YKHO) -> qe4Y.Output[h8nf[str]]:
return qe4Y.get(YKHO, 'tenant_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xBVc():\n return dp9S.Tenant(QpfX.GLOBAL.ldap.conn)",
"def mLXZ(YKHO) -> str:\n return qe4Y.get(YKHO, 'tenant_id')",
"def mLXZ(YKHO) -> str:\n return qe4Y.get(YKHO, 'tenant_id')",
"def mLXZ(YKHO) -> str:\n return qe4Y.get(YKHO, 'tenant_id')",
"def mLXZ(YKHO) -> str:\n return qe4Y.get(YKH... | [
"0.79251474",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.75344414",
"0.7465739",... | 0.6921231 | 50 |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" | def type(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'type') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qjbs(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_type')",
"def Qjbs(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_type')",
"def Qjbs(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_type')",
"def Qjbs(YKHO) -> str:\n return qe4Y.get(YKHO, 'resource_type')",
"def Qjbs(YKHO) -> str:\n ... | [
"0.82019424",
"0.82019424",
"0.82019424",
"0.82019424",
"0.82019424",
"0.82019424",
"0.82019424",
"0.82019424",
"0.82019424",
"0.82019424",
"0.82019424",
"0.82019424",
"0.82019424",
"0.82019424",
"0.8096315",
"0.79813987",
"0.79813987",
"0.79813987",
"0.79813987",
"0.79813987",... | 0.0 | -1 |
Creates a new edge. `key` is the `EdgeKey` that identifies the edge. `weight` is the weight to set the edge to; it must be between 1.0 and 1.0. | def bsXo(YKHO, H5ew, upAO):
YKHO._add(action='create_edge', key=H5ew.to_dict(), weight=upAO)
return YKHO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bsXo(YKHO, H5ew):\n YKHO._add(action='create_edge', key=H5ew.to_dict())\n return YKHO",
"def rz7z(YKHO, IDWK, rdjO, upAO=1):\n YKHO.vertices[IDWK].add_neighbour(YKHO.vertices[rdjO], upAO)",
"def rz7z(YKHO, B2hD, gfpw, upAO=1):\n if YKHO.get_vertex(B2hD) is None:\n YKHO.add_vertex(B2hD)\n... | [
"0.76582766",
"0.6955431",
"0.6872636",
"0.6872636",
"0.68677086",
"0.67830294",
"0.6729547",
"0.6613952",
"0.6564953",
"0.65279883",
"0.6302421",
"0.6266122",
"0.6220645",
"0.6220269",
"0.61575294",
"0.61169636",
"0.60725427",
"0.60573983",
"0.6036036",
"0.6023957",
"0.60171... | 0.9118448 | 0 |
Gets the number of edges that match a given query. `query` specifies the `EdgeQuery` to use. | def St5B(YKHO, xDcj):
YKHO._add(action='get_edge_count', query=xDcj.to_dict())
return YKHO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f3FV(YKHO, xDcj):\n return e0lz.checkResult(YKHO._lib().indigoCountMatches(YKHO.id, xDcj.id))",
"def DUZc(YKHO, xDcj=None):\n return YKHO.db.alerts.find(xDcj).count()",
"def BTk3(YKHO, xDcj):\n gGq6 = MUE7()\n gGq6.append(YKHO.root)\n UHFx = 0.0\n while len(gGq6) > 0:\n ZbOB = gGq6... | [
"0.6527488",
"0.64368635",
"0.6228582",
"0.62077856",
"0.60860854",
"0.6034128",
"0.6034128",
"0.59040225",
"0.58105516",
"0.5773949",
"0.5768661",
"0.5764478",
"0.57511765",
"0.56968075",
"0.5680602",
"0.56582725",
"0.5629111",
"0.5565791",
"0.5562072",
"0.5549712",
"0.55254... | 0.8040666 | 0 |
Flatten a list with arbitrary dimensions. | def Pusg(qw7D: Union[List[str], Alias, str], Aofo: List[str]=[]) -> x1iM[str]:
if isinstance(qw7D, str):
qw7D = [qw7D]
for ZfUD in qw7D:
if isinstance(ZfUD, str):
if ZfUD in YKHO.aliases:
Pusg(YKHO.aliases[ZfUD], Aofo)
else:
Aofo.append(ZfU... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PWgb(yv6U: list) -> x1iM:\n return xBlr.reduce(seET.iconcat, yv6U, [])",
"def GarA(vC9B):\n if not j7j0(vC9B):\n return vC9B\n return [r845 for YRbF in vC9B for r845 in YRbF]",
"def PWgb(pKvt: List[list]) -> list:\n return [YRbF for finE in pKvt for YRbF in finE]",
"def PWgb(vC9B):\n\n... | [
"0.73870116",
"0.7352408",
"0.72255343",
"0.7224037",
"0.72154266",
"0.71909213",
"0.7187439",
"0.71648186",
"0.7163836",
"0.7150465",
"0.7140468",
"0.712784",
"0.7124767",
"0.7111591",
"0.7103083",
"0.7103083",
"0.7103083",
"0.7084356",
"0.7070282",
"0.7059571",
"0.70503986"... | 0.0 | -1 |