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 |
|---|---|---|---|---|---|---|
Parse number from string with automatic type detection. Parses input string and converts to a number using automatic type detection. If the number contains any fractional parts, then the number will be converted to float, otherwise the number will be converted to an int. | def GtcZ(WKvO: str) -> uLKX[int, float]:
BWXx: uLKX[int, float] = float(WKvO)
if BWXx.is_integer():
BWXx = int(BWXx)
return BWXx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oNf4(YKHO, str):\n if str.count('.') == 0:\n return int(str)\n if str.count('.') == 1:\n return float(str)\n return str",
"def KrkO(KCHu):\n try:\n return int(KCHu)\n except ValueError:\n return float(KCHu)",
"def vynC(KCHu):\n NKcE = {'float': vIwR.atof, 'int'... | [
"0.806247",
"0.7663109",
"0.76058894",
"0.7603773",
"0.7543853",
"0.75322175",
"0.74632233",
"0.7321434",
"0.72316444",
"0.7026305",
"0.7019086",
"0.7009801",
"0.6992993",
"0.69265276",
"0.690676",
"0.6881941",
"0.68817985",
"0.68067026",
"0.67965007",
"0.6696791",
"0.6664161... | 0.73269945 | 7 |
Return ``self == value``. | def xa14(YKHO, BWXx: object) -> bool:
if not isinstance(BWXx, O2fF):
return NotImplemented
return YKHO.__origin__ == BWXx.__origin__ and YKHO.__args__ == BWXx.__args__ and (YKHO.__unpacked__ == getattr(BWXx, '__unpacked__', YKHO.__unpacked__)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return YKHO.value == Elif.value",
"def xa14(YKHO, Elif):\n return YKHO.value == Elif or YKHO.value == Elif.value",
"def xa14(YKHO, Elif):\n if Elif is None:\n return False\n if YKHO.value == Elif.value:\n return True\n return False",
"def cIT_(YKHO, wEf2):... | [
"0.81785744",
"0.81545824",
"0.7910936",
"0.77516854",
"0.7656241",
"0.7656241",
"0.76422757",
"0.7580233",
"0.7384331",
"0.7323974",
"0.72412944",
"0.72412944",
"0.7133235",
"0.70649093",
"0.7051817",
"0.70497334",
"0.70427805",
"0.70339525",
"0.70094466",
"0.6975119",
"0.69... | 0.6931704 | 23 |
Convert the string form of the symmetry operation into the form of a mathematical function that can be directly applied to a vector to transform a point to a symmetry related point. | def M8FR(YKHO):
if YKHO.operation_function is not None:
return YKHO.operation_function
else:
YKHO.operation_function = iubQ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def J03l(dpnb, rmc3):\n dpnb = dpnb.replace('^', '**')\n FYKK = ljrb([FCE9.symbols(rmc3)], dpnb, 'numpy')\n return FYKK",
"def UFsq(WKvO):\n return (WKvO + ZylS.transpose(WKvO)) / 2",
"def Mu14(YKHO):\n return _VfD.Model_convertStoichiometryMath(YKHO)",
"def FMcG(YKHO):\n LVs3 = '{}'.format... | [
"0.64556384",
"0.5763819",
"0.5679932",
"0.5665814",
"0.5638721",
"0.55064327",
"0.5426737",
"0.54216206",
"0.5392853",
"0.53914815",
"0.53572667",
"0.53297466",
"0.5317339",
"0.5299851",
"0.5280908",
"0.527228",
"0.52579755",
"0.52576876",
"0.52001554",
"0.513768",
"0.513490... | 0.47996485 | 70 |
Loads the model weights once, so it can be reused for several images sequentially. | def uyMl(BZEu, do44, Jarx):
C3ST, WbAn, aMgO = aivK(do44, Jarx, YecV, bl9b).build()
Iw6c = nMvt.function([WbAn], [aMgO])
C3ST.load_weights(BZEu)
return (C3ST, Iw6c) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H_1o(YKHO):\n YKHO.npz_weights = oyIN.load(YKHO._weight_file)\n YKHO._load_byte_embedding()\n YKHO._load_cnn_weights()\n YKHO._load_highway()\n YKHO._load_projection()",
"def ks9j(YKHO):\n raise NotImplementedError",
"def uyMl(YKHO):\n ZylS.keras.backend.clear_session()\n YKHO.load_... | [
"0.74412036",
"0.74169856",
"0.72789735",
"0.7261369",
"0.7261095",
"0.7220132",
"0.718703",
"0.71257687",
"0.70274734",
"0.7009838",
"0.6920951",
"0.691932",
"0.6899038",
"0.687305",
"0.6852795",
"0.6798096",
"0.6764068",
"0.67364603",
"0.67252874",
"0.67067325",
"0.66952705... | 0.0 | -1 |
Given images and a model, return the results of the model prediction on those images. | def QJxq(C3ST, Yw_3, Iw6c, do44, Jarx):
if len(Yw_3) == 1:
return [b7La(C3ST, Yw_3[0], Iw6c, do44, Jarx)]
zNig = len(Yw_3)
Crrw = oyIN.ones([zNig, bl9b])
zk33 = oyIN.zeros([zNig, 1])
n5rq = oyIN.ones([zNig, 1])
Rwqe = oyIN.ones([zNig, do44, Jarx, 1])
for YRbF, LNo8 in enumerate(Yw_3)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YEmv(C3ST, Yw_3):\n return C3ST.predict_classes(Yw_3)",
"def AF5T(VXjJ, C3ST, Q6cb):\n VXjJ = VXjJ.resize((224, 224))\n WKvO = LNo8.img_to_array(VXjJ)\n WKvO = oyIN.expand_dims(WKvO, axis=0)\n WKvO = Q6cb(WKvO)\n aTLP = C3ST.predict(WKvO)\n return aTLP",
"def YEmv(C3ST, VXjJ):\n WKv... | [
"0.7901662",
"0.7528717",
"0.72941136",
"0.72903866",
"0.7132775",
"0.70108235",
"0.6991459",
"0.6991264",
"0.69582474",
"0.6955385",
"0.6889948",
"0.6857865",
"0.685432",
"0.67916816",
"0.67916816",
"0.6787396",
"0.6769087",
"0.6752149",
"0.67412907",
"0.6697111",
"0.6690872... | 0.66428125 | 28 |
read an object from json file | def bk3f(gIsw):
if Hy7s.path.exists(gIsw) is False:
print('Error read path: [%s]' % gIsw)
return None
with open(gIsw, 'r') as eHNT:
try:
YEnM = qQXR.load(eHNT)
except Exception:
print('Error json: [%s]' % eHNT.read()[0:10])
return None
retu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PSj2(Sd0C):\n with open(Sd0C, 'r') as eHNT:\n YEnM = qQXR.load(eHNT)\n return YEnM",
"def PSj2(FYKK):\n with open(FYKK) as eHNT:\n return qQXR.load(eHNT, object_hook=KsJi)",
"def MCoo(NqAa):\n object = qQXR.loads(NqAa)\n print(object)\n return object",
"def EBvf(Ux0P):\n ... | [
"0.79075253",
"0.7820032",
"0.778218",
"0.76092285",
"0.75858706",
"0.75614053",
"0.7538552",
"0.7453517",
"0.7453517",
"0.7428007",
"0.7397801",
"0.7393363",
"0.73734057",
"0.73734057",
"0.73653334",
"0.73588914",
"0.7321864",
"0.7318475",
"0.73151296",
"0.7285039",
"0.72725... | 0.77815557 | 3 |
Whether to use L2 weight decay for `param_name`. | def yKA8(YKHO, _N6A):
if not YKHO.weight_decay_rate:
return False
if YKHO.exclude_from_weight_decay:
for Mkmy in YKHO.exclude_from_weight_decay:
if ZbWC.search(Mkmy, _N6A) is not None:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yKA8(YKHO, _N6A):\n if YKHO._exclude_from_weight_decay:\n for Mkmy in YKHO._exclude_from_weight_decay:\n if ZbWC.search(Mkmy, _N6A) is not None:\n return False\n return True",
"def yKA8(YKHO, _N6A):\n if not YKHO._weight_decay:\n return False\n if YKHO._exc... | [
"0.70423925",
"0.70372206",
"0.6972458",
"0.6972458",
"0.6972458",
"0.6972458",
"0.61478865",
"0.61143965",
"0.60728186",
"0.5874968",
"0.57316977",
"0.5686603",
"0.5607701",
"0.5540735",
"0.5532297",
"0.5527218",
"0.5491086",
"0.5461098",
"0.5446388",
"0.54453504",
"0.544086... | 0.70576096 | 3 |
Whether to use L2 weight decay for `param_name`. | def yKA8(YKHO, _N6A):
if not YKHO.weight_decay_rate:
return False
if YKHO.exclude_from_weight_decay:
for Mkmy in YKHO.exclude_from_weight_decay:
if ZbWC.search(Mkmy, _N6A) is not None:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yKA8(YKHO, _N6A):\n if YKHO._exclude_from_weight_decay:\n for Mkmy in YKHO._exclude_from_weight_decay:\n if ZbWC.search(Mkmy, _N6A) is not None:\n return False\n return True",
"def yKA8(YKHO, _N6A):\n if not YKHO._weight_decay:\n return False\n if YKHO._exc... | [
"0.70423925",
"0.70372206",
"0.6972458",
"0.6972458",
"0.6972458",
"0.6972458",
"0.61478865",
"0.61143965",
"0.60728186",
"0.5874968",
"0.57316977",
"0.5686603",
"0.5607701",
"0.5540735",
"0.5532297",
"0.5527218",
"0.5491086",
"0.5461098",
"0.5446388",
"0.54453504",
"0.544086... | 0.70576096 | 2 |
Whether to use L2 weight decay for `param_name`. | def yKA8(YKHO, _N6A):
if not YKHO.weight_decay_rate:
return False
if YKHO.exclude_from_weight_decay:
for Mkmy in YKHO.exclude_from_weight_decay:
if ZbWC.search(Mkmy, _N6A) is not None:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yKA8(YKHO, _N6A):\n if YKHO._exclude_from_weight_decay:\n for Mkmy in YKHO._exclude_from_weight_decay:\n if ZbWC.search(Mkmy, _N6A) is not None:\n return False\n return True",
"def yKA8(YKHO, _N6A):\n if not YKHO._weight_decay:\n return False\n if YKHO._exc... | [
"0.70423925",
"0.70372206",
"0.6972458",
"0.6972458",
"0.6972458",
"0.6972458",
"0.61478865",
"0.61143965",
"0.60728186",
"0.5874968",
"0.57316977",
"0.5686603",
"0.5607701",
"0.5540735",
"0.5532297",
"0.5527218",
"0.5491086",
"0.5461098",
"0.5446388",
"0.54453504",
"0.544086... | 0.70576096 | 0 |
Whether to use L2 weight decay for `param_name`. | def yKA8(YKHO, _N6A):
if not YKHO.weight_decay_rate:
return False
if YKHO.exclude_from_weight_decay:
for Mkmy in YKHO.exclude_from_weight_decay:
if ZbWC.search(Mkmy, _N6A) is not None:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yKA8(YKHO, _N6A):\n if YKHO._exclude_from_weight_decay:\n for Mkmy in YKHO._exclude_from_weight_decay:\n if ZbWC.search(Mkmy, _N6A) is not None:\n return False\n return True",
"def yKA8(YKHO, _N6A):\n if not YKHO._weight_decay:\n return False\n if YKHO._exc... | [
"0.70423925",
"0.70372206",
"0.6972458",
"0.6972458",
"0.6972458",
"0.6972458",
"0.61478865",
"0.61143965",
"0.60728186",
"0.5874968",
"0.57316977",
"0.5686603",
"0.5607701",
"0.5540735",
"0.5532297",
"0.5527218",
"0.5491086",
"0.5461098",
"0.5446388",
"0.54453504",
"0.544086... | 0.70576096 | 1 |
Returns a 'allbatteriesinlcuded' feature generator from a given path (folder) | def tyeH(pmON: str):
Mw3_(f'Loading feature generator from: {pmON}')
with open(gzes(pmON, 'feature_generation.json'), 'r') as wM3v:
cXFM = wM3v.read()
yavH = FyMh.decode(cXFM)
yavH._load_internals(pmON)
return yavH | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uA4Y(R4rN):\n if not Hy7s.path.exists(Hy7s.path.join(R4rN, f'0_features.npy')):\n raise ValueError(f'The provided location {R4rN} does not contain any representation files')\n Orn0, os7T = ([], 0)\n while Hy7s.path.exists(Hy7s.path.join(R4rN, f'{os7T}_features.npy')):\n bySB = Npgh.from_... | [
"0.56279373",
"0.5607112",
"0.55230314",
"0.5483209",
"0.53291225",
"0.53291225",
"0.53084856",
"0.5268843",
"0.5251109",
"0.52350736",
"0.52210736",
"0.5193332",
"0.5169473",
"0.5160666",
"0.5146863",
"0.51414",
"0.5139911",
"0.5139759",
"0.51297855",
"0.5125928",
"0.5121712... | 0.5089232 | 22 |
Tensorflow for monitoring trained policy | def b8V_(bGrB):
qIxc = WeKc
Cqok = FVif(qIxc.num_workers, 1)
hKn5 = ZylS.train.ClusterSpec(Cqok).as_cluster_def()
def hqgk(Gaon, f4IJ):
bo34.warn('Received signal %s: exiting', Gaon)
HwRy.exit(128 + Gaon)
Gaon.signal(Gaon.SIGHUP, hqgk)
Gaon.signal(Gaon.SIGINT, hqgk)
Gaon.sig... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, sEAN, D5gV, HHoe, AIu6=False):\n YKHO.env = sEAN\n YKHO.task = D5gV\n LJpX = '/job:worker/task:{}/cpu:0'.format(D5gV)\n with ZylS.device(ZylS.train.replica_device_setter(1, worker_device=LJpX)):\n with ZylS.variable_scope('global'):\n YKHO.network = rXtn(sEAN.observatio... | [
"0.67439765",
"0.66909194",
"0.6592112",
"0.6452863",
"0.6382239",
"0.6316095",
"0.630651",
"0.6278101",
"0.62772006",
"0.6261835",
"0.62309563",
"0.62138945",
"0.6196782",
"0.61940974",
"0.61904985",
"0.61813486",
"0.6171826",
"0.6158264",
"0.6102216",
"0.6101969",
"0.608815... | 0.0 | -1 |
Given the current state sample an action from the policy network. Return a the index of the action [0..N). | def GUnc(YKHO, QTBn):
XeOP = YKHO.tf_sess.run(YKHO.sample, feed_dict={YKHO.X: QTBn.reshape(1, len(QTBn))})
return XeOP | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GHEz(YKHO, QTBn):\n return mvm2(range(0, YKHO.action_space), 1)[0]",
"def AMEM(YKHO, QTBn):\n if oyIN.random.rand() <= YKHO.epsilon:\n n_Lg = tuKI.randrange(YKHO.action_size)\n else:\n vexM = YKHO.model.predict(QTBn)\n n_Lg = oyIN.argmax(vexM)\n return n_Lg",
"def AMEM(YKHO... | [
"0.7715992",
"0.76681644",
"0.74845713",
"0.7317097",
"0.71172917",
"0.7105228",
"0.70912486",
"0.7057842",
"0.70544374",
"0.70031416",
"0.69955885",
"0.6986513",
"0.6960665",
"0.6937768",
"0.6922736",
"0.69145274",
"0.690203",
"0.68946403",
"0.68931156",
"0.684575",
"0.68448... | 0.65601355 | 39 |
Given the rewards for an epsiode discount them by gamma. Next since we are sending them into the neural network they should have a zero mean and unit variance. Return the new list of discounted and normalized rewards. | def uwjH(YKHO, vwlo):
x_jl = oyIN.empty(len(vwlo))
RHnR = 0
for YPaw in reversed(range(len(vwlo))):
RHnR = vwlo[YPaw] + RHnR * YKHO.gamma
x_jl[YPaw] = RHnR
Ma8z = x_jl.mean()
J5H7 = x_jl.std()
return [(vOGg - Ma8z) / J5H7 for vOGg in x_jl] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nrzS(YKHO, vwlo):\n x_jl = []\n for a1PO in range(len(vwlo)):\n bKx2 = 0\n RBFf = 0\n for Mkmy in vwlo[a1PO:]:\n bKx2 = bKx2 + YKHO.gamma ** RBFf * Mkmy\n RBFf = RBFf + 1\n x_jl.append(bKx2)\n x_jl = oyIN.array(x_jl)\n x_jl = (x_jl - x_jl.mean()) / ... | [
"0.78813607",
"0.7818528",
"0.77405256",
"0.75703305",
"0.7485824",
"0.7371996",
"0.7272344",
"0.7100034",
"0.7099121",
"0.7018618",
"0.6907162",
"0.6857457",
"0.67791605",
"0.6755919",
"0.67452127",
"0.6703027",
"0.66754395",
"0.6652472",
"0.6647539",
"0.6635979",
"0.6612237... | 0.77522385 | 2 |
QRectF.contains(QPointF) > bool QRectF.contains(QRectF) > bool QRectF.contains(float, float) > bool | def sjXf(YKHO, *zl2J):
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FYXB(YKHO, ZfUD: 'BoundingBox2D') -> bool:\n LD1V = ZfUD.xmin >= YKHO.xmin and ZfUD.ymin >= YKHO.ymin\n LL0R = ZfUD.xmax <= YKHO.xmax and ZfUD.ymax <= YKHO.ymax\n return LD1V and LL0R",
"def sjXf(YKHO, uLKX, fzCY=None, kSCb=None):\n return False",
"def sjXf(YKHO, Xf84):\n WKvO, LVAh = Xf84.a... | [
"0.7023224",
"0.6964382",
"0.6639134",
"0.6616067",
"0.6616067",
"0.66096723",
"0.6598423",
"0.6598423",
"0.65199876",
"0.64801264",
"0.6476461",
"0.6441724",
"0.64372414",
"0.6389606",
"0.63867176",
"0.6375359",
"0.6365074",
"0.6354819",
"0.63270384",
"0.62823135",
"0.623226... | 0.0 | -1 |
x.__nonzero__() x != 0 | def ebnO(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ebnO(YKHO):\n for tTpl in YKHO:\n if tTpl != 0:\n return True\n return False",
"def ebnO(YKHO):\n return YKHO.value.__nonzero__()",
"def ebnO(YKHO):\n return YKHO.__nonzero",
"def ebnO(YKHO):\n return YKHO.__nonzero",
"def ebnO(YKHO):\n return not YKHO.as_point == (0... | [
"0.77507436",
"0.76362675",
"0.74977964",
"0.74977964",
"0.749715",
"0.7277969",
"0.71057385",
"0.70980686",
"0.7076215",
"0.7038673",
"0.7013006",
"0.69773006",
"0.6971467",
"0.69356734",
"0.6927782",
"0.6920768",
"0.690163",
"0.6892301",
"0.6864851",
"0.6852248",
"0.6836008... | 0.62630165 | 66 |
0 is not the successor of any natural number. | def fpp6(YKHO, or8S: int, zFiD: Statement) -> None:
YKHO.at_most_refs(zFiD, 0, 'axiom 1')
if zFiD.formula != YKHO.AXIOMS[1].formula:
raise RKXm('not axiom 1') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yy40(WKvO) -> int:\n if WKvO > 0:\n return 1\n if WKvO < 0:\n return -1\n return 0",
"def ynLm(WKvO):\n tg7w = WKvO + 1 != WKvO\n hGZl = WKvO == WKvO\n return 1 - (tg7w & hGZl)",
"def Zihr(exwG):\n return (exwG > 0) - (exwG < 0)",
"def XP5J(WKvO):\n if WKvO < 0 or WK... | [
"0.6770732",
"0.6713736",
"0.6497921",
"0.64779",
"0.64756936",
"0.6468263",
"0.6449532",
"0.6415817",
"0.63191956",
"0.6266652",
"0.6248801",
"0.6143978",
"0.613796",
"0.61341465",
"0.6131532",
"0.6102842",
"0.6058444",
"0.6043784",
"0.60304385",
"0.6026586",
"0.59800816",
... | 0.0 | -1 |
Any natural number multiplied by 0 is 0. | def dO4U(YKHO, or8S: int, zFiD: Statement) -> None:
YKHO.at_most_refs(zFiD, 0, 'axiom 4')
if zFiD.formula != YKHO.AXIOMS[4].formula:
raise RKXm('not axiom 4') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sbx9(WKvO):\n return WKvO * 0",
"def sbx9(*bGrB, **IaaG) -> None:\n return",
"def VNqG(mLGw):\n if mLGw < 1:\n raise IndexError('num must be >= 1.')\n return lNLu.fromSequence([0] * mLGw)",
"def D_eQ(YKHO):\n CK9p = 0\n hlel = epAf.factorial(CK9p)\n aEqx = 1\n YKHO.assertEq... | [
"0.71559536",
"0.6750768",
"0.6670707",
"0.6597194",
"0.65920085",
"0.65668356",
"0.65656066",
"0.64535195",
"0.6385685",
"0.636736",
"0.6346667",
"0.6336748",
"0.6290091",
"0.6273333",
"0.62724316",
"0.62715787",
"0.6188883",
"0.6168746",
"0.61516285",
"0.6133803",
"0.608595... | 0.0 | -1 |
Creates a new instance of TrackwayDirectionStage. | def FIMM(YKHO, H5ew, qsJ6, **B2fa):
super(RxWS, YKHO).__init__(H5ew, qsJ6, label='Trackway Direction', **B2fa)
YKHO._paths = [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n super().__init__()\n YKHO.waypoint_vector = [-1, 10]",
"def T2xZ(YKHO):\n Csk6 = {'start': YKHO.get_start(), 'end': YKHO.get_end(), 'duration': YKHO.get_duration(), 'mode': YKHO.get_primary_mode(), 'price_range': YKHO.get_price_range(), 'legs': YKHO.get_legs(), 'start_location': YKHO.g... | [
"0.5205769",
"0.5060475",
"0.49711707",
"0.4937936",
"0.4937936",
"0.48164803",
"0.46623772",
"0.46488953",
"0.46384993",
"0.46002585",
"0.45988762",
"0.4572386",
"0.45723125",
"0.45568055",
"0.45305637",
"0.45285165",
"0.4508893",
"0.44773376",
"0.4474872",
"0.4455077",
"0.4... | 0.6856049 | 0 |
Creates a new textmessage SpamFilter trained on the given text messages and their associated labels. Performs any necessary preprocessing before training the SpamFilter's Naive Bayes Classifier. As part of this process, trains and stores the CountVectorizer used in the feature extraction process. | def FIMM(YKHO, EiSK, OXRT):
YKHO.vectorizer = LM0n(stop_words='english')
YKHO.features = YKHO.vectorizer.fit_transform(EiSK)
YKHO.nbc = mc7B().fit(YKHO.features, OXRT) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oUkS(YKHO, l5Ny, Crrw):\n M_NZ = gqM8.SVR()\n ZrYb = LM0n()\n wxWU = U1yC()\n BWz1 = ZrYb.fit_transform(l5Ny)\n s4H9 = wxWU.fit_transform(BWz1)\n M_NZ.fit(s4H9, Crrw)\n return (M_NZ, ZrYb, wxWU)",
"def pB7n(YKHO, l5Ny):\n jbYn, vG0E = YKHO.loadpklfile(YKHO.config['transform_path']['tr... | [
"0.59928596",
"0.5991479",
"0.58972853",
"0.5896386",
"0.5881257",
"0.58270174",
"0.5791569",
"0.57531697",
"0.56607693",
"0.5642098",
"0.56038517",
"0.55683374",
"0.5556388",
"0.5550796",
"0.5503383",
"0.54590356",
"0.53853714",
"0.53828907",
"0.5378921",
"0.5342874",
"0.534... | 0.624333 | 0 |
Takes a path to the raw data file (a csv spreadsheet) and creates a new Pandas DataFrame from it with only the message texts and labels as the remaining columns. | def K5bz(KAfx):
nPrm = rLdf.read_csv(KAfx, encoding='latin-1')
nPrm = nPrm.drop(columns=['Unnamed: 2', 'Unnamed: 3', 'Unnamed: 4'])
nPrm = nPrm.rename(columns={'v1': 'class', 'v2': 'text'})
return nPrm | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UlWi(XvcI: str=aisP) -> rLdf.DataFrame:\n jQ3Z = rLdf.read_csv(XvcI)[f0h7]\n return jQ3Z",
"def rxwA(pmON: str) -> rLdf.DataFrame:\n nPrm = []\n with open(pmON) as nUeQ:\n for zFiD in nUeQ:\n nPrm.append(zFiD)\n LMLK = rLdf.DataFrame(nPrm, columns={'tweet'})\n return LMLK"... | [
"0.71791464",
"0.70036703",
"0.69079787",
"0.66350573",
"0.6587034",
"0.6573408",
"0.65146476",
"0.6495639",
"0.649103",
"0.6491012",
"0.6479905",
"0.6461631",
"0.6417438",
"0.63850695",
"0.63770866",
"0.6361787",
"0.6361787",
"0.6361787",
"0.63617593",
"0.6361643",
"0.630978... | 0.5878654 | 76 |
Return boxes with a confidence >= `min_score` | def Urop(AjsF, oUSw, cCrA, KndY):
exwG = len(KndY)
DNs0 = []
for YRbF in range(exwG):
if cCrA[YRbF] >= AjsF:
DNs0.append(YRbF)
F29b = oUSw[DNs0, ...]
ox7g = cCrA[DNs0, ...]
ADUU = KndY[DNs0, ...]
return (F29b, ox7g, ADUU) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Urop(YKHO, AjsF, oUSw, cCrA, KndY):\n exwG = len(KndY)\n DNs0 = []\n for YRbF in range(exwG):\n if cCrA[YRbF] >= AjsF:\n DNs0.append(YRbF)\n F29b = oUSw[DNs0, ...]\n ox7g = cCrA[DNs0, ...]\n ADUU = KndY[DNs0, ...]\n return (F29b, ox7g, ADUU)",
"def EUsT(YKHO, AjsF, oUSw... | [
"0.7317321",
"0.72855526",
"0.72492224",
"0.72279024",
"0.6647105",
"0.6314491",
"0.63112724",
"0.61915874",
"0.6165219",
"0.61569124",
"0.6156313",
"0.61135215",
"0.6062302",
"0.5995685",
"0.59620845",
"0.5960607",
"0.5950879",
"0.59485",
"0.5940718",
"0.5940718",
"0.5936835... | 0.72886777 | 1 |
Draw bounding boxes on the image | def edPp(LNo8, oUSw, KndY, dGrG=4):
JmFt = nuov.Draw(LNo8)
for YRbF in range(len(oUSw)):
JyK9, LFlW, tlxW, _tIi = oUSw[YRbF, ...]
V8Gh = int(KndY[YRbF])
qfpW = 'blueviolet'
JmFt.line([(LFlW, tlxW), (LFlW, JyK9), (_tIi, JyK9), (_tIi, tlxW), (LFlW, tlxW)], width=dGrG, fill=qfpW) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sGG5(YKHO, QMAG):\n VXjJ = jbYn.imread(QMAG, jbYn.IMREAD_ANYDEPTH)\n c8oy = oyIN.zeros((VXjJ.shape[0], VXjJ.shape[1], 3), dtype=oyIN.uint8)\n kcwm, BWz1 = oyIN.unique(VXjJ, return_counts=True)\n for Zmen in kcwm:\n if Zmen == 0:\n continue\n YKHO.get_instance_bounding_box(V... | [
"0.80207103",
"0.7730494",
"0.7663894",
"0.75815976",
"0.75812364",
"0.7569874",
"0.7564505",
"0.7560773",
"0.74707085",
"0.74676245",
"0.7462541",
"0.7429634",
"0.7386207",
"0.73359627",
"0.73075604",
"0.73066705",
"0.73026776",
"0.72940755",
"0.7275691",
"0.72722554",
"0.72... | 0.0 | -1 |
Loads a frozen inference graph | def Ib5B(Rn65):
pNZh = ZylS.Graph()
with pNZh.as_default():
QPEZ = ZylS.compat.v1.GraphDef()
with ZylS.io.gfile.GFile(Rn65, 'rb') as hOYR:
fHkp = hOYR.read()
QPEZ.ParseFromString(fHkp)
ZylS.import_graph_def(QPEZ, name='')
return pNZh | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TyRR(jVhj, pNZh=None, cuiw=None):\n from diplomacy_research.utils.tensorflow import tf, tf_logging\n if not Hy7s.path.exists(jVhj):\n S0MI.error('The frozen graph %s does not exist.', jVhj)\n raise FileNotFoundError()\n pNZh = tf.Graph() if pNZh is None else pNZh\n with pNZh.as_defaul... | [
"0.7145618",
"0.71300054",
"0.6952633",
"0.64996564",
"0.6480352",
"0.64554673",
"0.6437847",
"0.6419772",
"0.6419772",
"0.63925844",
"0.638914",
"0.63779676",
"0.6364601",
"0.6306616",
"0.6300151",
"0.627973",
"0.6269959",
"0.6266776",
"0.6258529",
"0.62003803",
"0.6152927",... | 0.60229445 | 30 |
Return dict representing this Logger's state. | def k8jS(YKHO):
QTBn = YKHO.__dict__.copy()
QTBn['_logger'] = None
return QTBn | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k8jS(YKHO):\n QTBn = dict(YKHO.__dict__)\n del QTBn['logger']\n return QTBn",
"def kpel(YKHO):\n return {'log_formatstr': YKHO.log_formatstr, 'backend_interval': YKHO.backend_interval}",
"def ja6o(YKHO):\n return {}",
"def By99(YKHO):\n return {}",
"def ja6o(YKHO) -> dict:\n return... | [
"0.81866395",
"0.7860514",
"0.76662624",
"0.7611011",
"0.74871504",
"0.7330996",
"0.7326406",
"0.7326406",
"0.72727907",
"0.7172149",
"0.7114898",
"0.71087533",
"0.7103719",
"0.7102913",
"0.7094033",
"0.7051571",
"0.70221627",
"0.7014673",
"0.6977747",
"0.69748193",
"0.697239... | 0.70902884 | 15 |
Restore this Logger's state. | def UzTX(YKHO, QTBn):
YKHO.__dict__ = QTBn
YKHO._logger = G9jH.getLogger(YKHO._name)
YKHO.level = YKHO._level | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MuHt(YKHO):\n if YKHO._previous_action_logging_setting is not None:\n YKHO.action_logging_enabled = YKHO._previous_action_logging_setting\n YKHO._previous_action_logging_setting = None\n return",
"def sRHT(YKHO, QTBn: ale_py.ALEState):\n YKHO.ale.restoreState(QTBn)",
"def SiRx(YKHO):... | [
"0.69087595",
"0.6845371",
"0.6712689",
"0.66738003",
"0.6513239",
"0.6494111",
"0.6493251",
"0.6451605",
"0.6426061",
"0.6292491",
"0.6276428",
"0.6251882",
"0.6245137",
"0.6231107",
"0.6206482",
"0.61979216",
"0.6178583",
"0.6161093",
"0.61551374",
"0.61468834",
"0.6117147"... | 0.56713307 | 98 |
The View function for the about page. | def vsuQ(QePW):
return _1tc(QePW, 'wantedly_app/about.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vsuQ():\n return TvZl('about.html', title='About')",
"def cGKp(QePW):\n return {'message': 'Info about us.'}",
"def cD8n(QePW):\n return _1tc(QePW, 'ez_main/about_page.html')",
"def vsuQ():\n return TvZl('about.html')",
"def PzLT(QePW):\n return _1tc(QePW, 'aboutus.html')",
"def vsuQ()... | [
"0.80002",
"0.799056",
"0.79731536",
"0.79608667",
"0.7933555",
"0.7901159",
"0.7897344",
"0.7870512",
"0.7863864",
"0.7857774",
"0.78450185",
"0.784392",
"0.782511",
"0.7823544",
"0.7823544",
"0.7819948",
"0.7809141",
"0.78086245",
"0.7805979",
"0.7798565",
"0.7795315",
"0... | 0.77838695 | 21 |
Returns the current publish dir for the task. | def Zoug(Emd4, D5gV):
if not ifMI.Instance().pipeline_publish_dir():
return ''
ee9X = Emd4.GetOutDirForTask(D5gV)
if not ee9X:
return ''
ee9X = ee9X.replace(Emd4.GetOutSubDir(), ifMI.Instance().pipeline_publish_dir())
return Hy7s.path.join(Hy7s.path.dirname(ee9X), 'current') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k2DS(Emd4, D5gV):\n if not ifMI.Instance().pipeline_publish_dir():\n return ''\n ee9X = Emd4.GetOutDirForTask(D5gV)\n if not ee9X:\n return ''\n return ee9X.replace(Emd4.GetOutSubDir(), ifMI.Instance().pipeline_publish_dir())",
"def B6Nz(YKHO):\n return YKHO.dir",
"def H6oE(Emd... | [
"0.8311917",
"0.66121066",
"0.6603187",
"0.6539092",
"0.65207803",
"0.6476241",
"0.6405742",
"0.639465",
"0.6389074",
"0.6347666",
"0.6347057",
"0.6316912",
"0.62855846",
"0.6264913",
"0.6236826",
"0.6235748",
"0.6203303",
"0.6187073",
"0.61870384",
"0.61644363",
"0.61621976"... | 0.87881327 | 0 |
Check whether the matrix is Toeplitz using our routine. | def AbX3(vb7U):
for r845 in range(rdlD):
if not h9tD(vb7U, 0, r845):
return False
for YRbF in range(1, fvDH):
if not h9tD(vb7U, YRbF, 0):
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yMVt(SppC: np.ndarray) -> bool:\n return SppC.shape[0] == SppC.shape[1] and oyIN.linalg.det(SppC) != 0",
"def sciX(YKHO, SppC):\n for YRbF in range(YKHO.size):\n if (SppC[0][YRbF] + SppC[-1][YRbF] == YRbF % 2 or SppC[0][YRbF] + SppC[-1][YRbF] == (YRbF + 1) % 2) and (SppC[YRbF][0] + SppC[YRbF][-1... | [
"0.62021834",
"0.6143656",
"0.6061478",
"0.58724177",
"0.5847098",
"0.5835416",
"0.579894",
"0.57757217",
"0.5651579",
"0.564704",
"0.56339616",
"0.5586131",
"0.5580269",
"0.55736345",
"0.55596083",
"0.5545253",
"0.5520429",
"0.5501175",
"0.5497774",
"0.5475992",
"0.546678",
... | 0.8034812 | 0 |
Compute the width of a bounding box. | def Th8c(FlUN: ndarray) -> float:
yzQ0, bGrB = K9c2(FlUN)
return yzQ0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xiCJ(YKHO):\n return _VfD.BoundingBox_getWidth(YKHO)",
"def TVTK(YKHO) -> int:\n return YKHO.rect_uv.w",
"def xwT5(YKHO, cviu):\n if isinstance(cviu, LBWB.geometry.polygon.Polygon):\n cviu = cviu.bounds\n elif isinstance(cviu, tuple):\n pass\n else:\n raise TypeError(f'b... | [
"0.78384995",
"0.7405333",
"0.72103524",
"0.71854645",
"0.71309066",
"0.698792",
"0.69232786",
"0.69125646",
"0.68847704",
"0.68847704",
"0.681629",
"0.6795641",
"0.67908436",
"0.67605865",
"0.6724223",
"0.67201644",
"0.6717353",
"0.66922086",
"0.6662561",
"0.6651283",
"0.663... | 0.7852812 | 0 |
Strip and redirect requests with certain trailing characters left by bad URL parsers. | def V9Fv(tTee):
ajIU = ',./'
def b6ry(QePW, *qIxc, **B2fa):
if QePW.META['PATH_INFO'][-1] in ajIU:
return Yd7Q(QePW.META['PATH_INFO'].rstrip(ajIU))
return tTee(QePW, *qIxc, **B2fa)
return b6ry | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iY8l():\n assert gmoQ('http://example.com/?') == 'http://example.com/'\n assert gmoQ('http://example.com?') == 'http://example.com/'\n assert gmoQ('http://example.com/a?') == 'http://example.com/a'\n assert gmoQ('http://example.com/a/?') == 'http://example.com/a'",
"def QQ6h(YKHO, bD7m):\n ret... | [
"0.6716417",
"0.65329564",
"0.6438808",
"0.6175929",
"0.6159155",
"0.61399084",
"0.60827553",
"0.6058008",
"0.60463554",
"0.6016129",
"0.6008326",
"0.59506243",
"0.59365505",
"0.59365505",
"0.59365505",
"0.59365505",
"0.59365505",
"0.59365505",
"0.59365505",
"0.58958346",
"0.... | 0.6691305 | 1 |
Given xyz coordinates & dimensions of array, returns the vector index | def SQjR(WKvO, Htse):
YRbF = 0
for tpio, r845 in zip(Htse, WKvO):
YRbF *= tpio
YRbF += r845
return YRbF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kS1Y(asm6, jmlw):\n WKvO, LVAh, epBp = asm6.size()\n a1PO = asm6.reshape(WKvO * LVAh, epBp)\n rxEN = jmlw.reshape(WKvO * LVAh)\n Ty9i = a1PO[ht2j.arange(WKvO * LVAh), rxEN]\n Ty9i = Ty9i.reshape(WKvO, LVAh)\n return Ty9i",
"def K1VD(YKHO, *vexM):\n try:\n if len(vexM) == 1:\n ... | [
"0.6535142",
"0.6418414",
"0.63375473",
"0.62212586",
"0.60786873",
"0.6034432",
"0.6029652",
"0.60194445",
"0.6014285",
"0.5993988",
"0.5975879",
"0.59538525",
"0.59294975",
"0.5920307",
"0.5894706",
"0.58881086",
"0.58801156",
"0.5853542",
"0.5853542",
"0.58395815",
"0.5832... | 0.6307502 | 3 |
Returns an OptionParser object with all the default options. | def KzCv():
wvEv = WDqQ()
wvEv.add_argument('-o', '--host', dest='host', default='hldbv02', help='The hostname for the MySQL database')
wvEv.add_argument('-d', '--debug', action='store_true', default=False, help='debug mode, store results in dummy DB')
l3hd = wvEv.add_mutually_exclusive_group(required=T... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Tr7p():\n wvEv = PDen()\n Mmwk(wvEv)\n xAU6, qIxc = wvEv.parse_args([])\n return xAU6",
"def P7aj():\n G9jH.debug('initiating command line option parser')\n e2h5 = 'usage: %prog [options]'\n wvEv = PDen(e2h5)\n wvEv.add_option('--gen-answer-file', help='Generate a template of an answe... | [
"0.84064525",
"0.7035872",
"0.69315475",
"0.6762891",
"0.6612723",
"0.65971667",
"0.657549",
"0.65095645",
"0.65095645",
"0.63397056",
"0.6329244",
"0.63176024",
"0.6288814",
"0.6283019",
"0.6267587",
"0.6220962",
"0.6210075",
"0.6204305",
"0.6200668",
"0.619317",
"0.61901367... | 0.0 | -1 |
Returns all unique paths for files associated with the supplied packages ```package``` The package to be scanned ```absolute_path``` if set to True, returns the absolute path instead of a path relative to the repository root | def gZBF(YKHO, B5hb, SOoY=False):
dZfx = []
for XP5J in B5hb.package_versions:
dZfx.extend(YKHO.find_files_for_packageversion(XP5J, SOoY))
return dZfx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XU6y(YKHO, ZWMG, SOoY=False):\n dZfx = []\n for hkS8 in ('binary_packages', 'source_packages'):\n if hasattr(ZWMG, hkS8):\n for vI3f in getattr(ZWMG, hkS8):\n for RRlC in vI3f.package_files:\n if not RRlC.filename in dZfx:\n dZfx.... | [
"0.65744954",
"0.6538738",
"0.6327214",
"0.60860723",
"0.6070535",
"0.5906358",
"0.5833705",
"0.5832187",
"0.58272886",
"0.58078057",
"0.5749993",
"0.57397157",
"0.57397157",
"0.57397157",
"0.5738294",
"0.56959873",
"0.565308",
"0.563047",
"0.56227636",
"0.56075794",
"0.55792... | 0.7131917 | 0 |
Looks at a filename's extension and decides whether to accept it. We only want package files to be uploaded, after all. It returns a boolean of whether to accept the file or not. ``filename`` File to test. | def jd1p(YKHO, Ux0P):
for ZI14 in ['.changes', '.dsc', '.tar.gz', '.diff.gz', '.deb', '.udeb', '.tar.bz2', '.tar.xz']:
if Ux0P.endswith(ZI14):
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XT0o(Ux0P):\n if not '.' in Ux0P:\n return False\n YBcr = Ux0P.rsplit('.', 1)[1]\n if YBcr.lower() in nyOE:\n return True\n else:\n return False",
"def XT0o(Ux0P: str) -> bool:\n if Ux0P is None or Ux0P.strip() is None:\n return False\n return '.' in Ux0P and Ux0... | [
"0.82098633",
"0.7922775",
"0.790487",
"0.787731",
"0.7795147",
"0.7711532",
"0.7709475",
"0.7709475",
"0.77041215",
"0.77041215",
"0.76879025",
"0.76774913",
"0.76774913",
"0.76774913",
"0.76774913",
"0.76774913",
"0.76774913",
"0.76774913",
"0.76774913",
"0.76774913",
"0.76... | 0.74530524 | 36 |
Split a date string into units and epoch | def t9_v(JvEs: str):
try:
rYO3, bGrB, qtWj = JvEs.split(None, 2)
except ValueError:
raise ValueError(f'Invalid format: {JvEs}')
else:
return (rYO3.lower(), hfK9(qtWj)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ucfl(JvEs: str):\n try:\n qtWj = hfK9(JvEs)\n except ValueError:\n pass\n else:\n return (em2q(qtWj), 0.0)\n rYO3, qtWj = t9_v(JvEs)\n if rYO3 not in og_j.keys():\n raise ValueError(f'Invalid units: {rYO3}')\n return (em2q(qtWj), og_j[rYO3])",
"def Ucfl(JvEs: str... | [
"0.725681",
"0.72525626",
"0.6715245",
"0.64701724",
"0.6382786",
"0.619452",
"0.61797726",
"0.6074394",
"0.6071968",
"0.60437346",
"0.601686",
"0.6001186",
"0.59548134",
"0.5884169",
"0.5833305",
"0.58276343",
"0.5821117",
"0.581139",
"0.5810008",
"0.5795588",
"0.57780796",
... | 0.7802953 | 1 |
Convert a ``numpy`` ``datetime`` array to seconds since ``epoch`` | def w6KO(_c1T: float | np.ndarray, qtWj: str | tuple | list | np.datetime64=NAIZ):
if isinstance(qtWj, (tuple, list)):
qtWj = oyIN.datetime64(qcWV.datetime(*qtWj))
elif isinstance(qtWj, str):
qtWj = oyIN.datetime64(hfK9(qtWj))
return (_c1T - qtWj) / oyIN.timedelta64(1, 's') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jEKs(a1PO) -> float:\n return a1PO.astype(int) / 1000000000.0",
"def gdlA(a1PO):\n return qcWV.fromtimestamp(a1PO / 1000.0)",
"def SWek(ppPa, qtWj=None):\n return ccOx(ppPa) / 10.0 ** 6",
"def IMJE(_c1T):\n g75m = _c1T - qtWj\n return g75m.days * 86400 + g75m.seconds + float(g75m.microseco... | [
"0.7119384",
"0.70471823",
"0.67733616",
"0.6677283",
"0.6677283",
"0.66770333",
"0.65791225",
"0.6510859",
"0.64249825",
"0.62467736",
"0.62348825",
"0.62348825",
"0.61904925",
"0.6188793",
"0.6172504",
"0.5990658",
"0.5972928",
"0.5956192",
"0.59386444",
"0.59345615",
"0.59... | 0.72007585 | 1 |
Counts the number of leap seconds between a given GPS time and UTC | def QmcZ(CYvG: np.ndarray | float, G34s: bool=True):
ESY6 = YrGW(truncate=G34s)
Sgjt = oyIN.zeros_like(CYvG, dtype=oyIN.float64)
for YRbF, SBwZ in enumerate(ESY6):
UHFx = oyIN.count_nonzero(CYvG >= SBwZ)
if UHFx > 0:
_0VL = oyIN.nonzero(CYvG >= SBwZ)
Sgjt[_0VL] += 1.0... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ze60(h5YN, Ethl=18):\n Sz83 = '%Y-%m-%d %H:%M:%S'\n qtWj = qcWV.datetime.strptime('1980-01-06 00:00:00', Sz83)\n MtRo = h5YN - qtWj + qcWV.timedelta(seconds=Ethl)\n gn7z = MtRo.days // 7\n jbOH = MtRo.days - 7 * gn7z\n nzYb = MtRo.seconds + 86400 * (MtRo.days - 7 * gn7z)\n return (gn7z, jb... | [
"0.652139",
"0.58384943",
"0.57290035",
"0.56942356",
"0.56746274",
"0.5595739",
"0.55098593",
"0.5501737",
"0.53909945",
"0.5376595",
"0.5324631",
"0.5324156",
"0.5290026",
"0.5261761",
"0.5184121",
"0.5171609",
"0.51585203",
"0.5151989",
"0.51178706",
"0.5116599",
"0.505507... | 0.7145605 | 1 |
Binary to onehot conversion | def Z0XF(oMKS, zYcP):
_kHV = len(oMKS)
hF6q = 2 ** _kHV
@NIoj
def MXf_():
for YRbF in range(hF6q):
if oMKS == YRbF:
zYcP[YRbF] = 1
else:
zYcP[YRbF] = 0
return bUWH() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QfEj(ezWE: np.ndarray) -> oyIN.ndarray:\n Ylbp = oyIN.zeros((ezWE.shape[0], 2))\n Ylbp[oyIN.where(ezWE == 1)[0], 0] = 1\n Ylbp[oyIN.where(ezWE == 0)[0], 1] = 1\n return Ylbp",
"def zGX0(WKvO):\n hlel = oyIN.zeros((len(WKvO), 10))\n for YRbF, r845 in enumerate(WKvO):\n hlel[YRbF, r845... | [
"0.8336464",
"0.8243893",
"0.8077957",
"0.8006649",
"0.792823",
"0.79020256",
"0.7887456",
"0.7865496",
"0.78533834",
"0.7835221",
"0.7825861",
"0.7818072",
"0.7791989",
"0.7786955",
"0.77542466",
"0.77538735",
"0.77049476",
"0.7704875",
"0.76757723",
"0.76493716",
"0.7637535... | 0.0 | -1 |
Test each hospital has ranked only residents that have ranked it. If not, check that a warning is caught and the hospital has forgotten any such residents. | def LbR5(BH3N):
Otno = BH3N.hospitals[0]
LxSB = Otno.prefs[0]
LxSB._forget(Otno)
with trZe.warns(EfdQ) as AIu6:
BH3N._check_inputs_player_prefs_all_reciprocated('hospitals')
assert len(AIu6) == 1
Ol8d = str(AIu6[0].message)
assert Otno.name in Ol8d
assert LxSB.name in Ol8d
if... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IG6i(YKHO):\n UAju = []\n for Otno in YKHO.hospitals:\n N2qO = [Ylbp for Ylbp in YKHO.residents if Otno in Ylbp.prefs]\n if set(Otno.prefs) != set(N2qO):\n UAju.append(ValueError(f'{Otno} has not ranked all the residents that ranked it: {set(Otno.prefs)} != {set(N2qO)}.'))\n i... | [
"0.65927255",
"0.62228805",
"0.6033156",
"0.5816217",
"0.57702166",
"0.5740605",
"0.569085",
"0.56001204",
"0.552595",
"0.5460149",
"0.54297745",
"0.53983676",
"0.5360775",
"0.5351841",
"0.5335599",
"0.5331168",
"0.528455",
"0.5271201",
"0.52700424",
"0.52670234",
"0.5262435"... | 0.5287138 | 16 |
Test each hospital has ranked all residents that have ranked it. If not, check that a warning is caught and any such resident has forgotten the hospital. | def fYIw(BH3N):
Otno = BH3N.hospitals[0]
LxSB = Otno.prefs[0]
Otno._forget(LxSB)
with trZe.warns(EfdQ) as AIu6:
BH3N._check_inputs_player_reciprocated_all_prefs('hospitals', 'residents')
assert len(AIu6) == 1
Ol8d = str(AIu6[0].message)
assert Otno.name in Ol8d
assert LxSB.name i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IG6i(YKHO):\n UAju = []\n for Otno in YKHO.hospitals:\n N2qO = [Ylbp for Ylbp in YKHO.residents if Otno in Ylbp.prefs]\n if set(Otno.prefs) != set(N2qO):\n UAju.append(ValueError(f'{Otno} has not ranked all the residents that ranked it: {set(Otno.prefs)} != {set(N2qO)}.'))\n i... | [
"0.6707456",
"0.6244367",
"0.6030781",
"0.5817202",
"0.57967025",
"0.56785023",
"0.5596258",
"0.554864",
"0.5504701",
"0.5493291",
"0.54924923",
"0.5488279",
"0.5485713",
"0.54585725",
"0.5428704",
"0.5420342",
"0.5397366",
"0.5381196",
"0.53527856",
"0.53451216",
"0.53155655... | 0.58555126 | 3 |
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`. | def LwSz(Bcwd, KndY, NkkI=False, leAC='Confusion matrix', iMGt=QrM1.cm.Greens):
if NkkI:
Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]
print('Normalized confusion matrix')
else:
print('Confusion matrix, without normalization')
print(Bcwd)
QrM1.imshow(Bcwd, inter... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LwSz(Bcwd, KndY=[0, 1], NkkI=False, leAC='Confusion matrix', RMso=False):\n if NkkI:\n Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]\n print('Normalized confusion matrix')\n else:\n print('Confusion matrix, without normalization')\n if RMso:\n print(Bcwd)"... | [
"0.8192804",
"0.8094402",
"0.80277497",
"0.80176693",
"0.7992383",
"0.7989708",
"0.7979215",
"0.79741204",
"0.7959607",
"0.7955097",
"0.79358983",
"0.79329205",
"0.7932711",
"0.79295874",
"0.79247147",
"0.79228914",
"0.792216",
"0.79215133",
"0.7921201",
"0.7920765",
"0.79161... | 0.785076 | 44 |
Tests that the output html is generated correclty by the clustering function | def Mjre(ZqHk):
uvZ1 = Hy7s.path.join(ZqHk, 'test-cluster.html')
hKn5 = u40G(embedding_random_state=42, reducer_random_state=43, clustering_random_state=44)
EcVT = ['Wellcome Trust', 'The Wellcome Trust', 'Sir Henry Wellcome', 'Francis Crick', 'Crick Institute', 'Francis Harry Crick']
hKn5.fit(EcVT)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TNIa(YKHO):\n pass",
"def u79S(eHNT, QMzI, S8QS, sS2s, JlCo, lc0P, DfNH, oJ9d):\n dkYn = oJ9d\n rIM4 = len(dkYn)\n eHNT.write('\\n% 6. Cluster Classification')\n aVpf = '|' + 'c|' * len(JlCo[lc0P].unique())\n eHNT.write('\\n\\\\newcommand{\\\\%s}{%s}' % ('DivColumnsLatex', aVpf))\n BMFH ... | [
"0.68014586",
"0.64515656",
"0.6283319",
"0.6218219",
"0.61491203",
"0.6064487",
"0.5956804",
"0.5843667",
"0.5821508",
"0.5812067",
"0.5782588",
"0.5746487",
"0.572244",
"0.5716077",
"0.57043064",
"0.5677167",
"0.5629126",
"0.5620701",
"0.5605728",
"0.5572866",
"0.5569146",
... | 0.7976958 | 0 |
Does a single timestep. x is input at single timestep, with shape [B, input_size] h_mask has shape (1, hidden_size) w_rnn_mask has shape (hidden_size, hidden_size) | def nrOS(YKHO, WKvO, QTBn, nZTs=None, lCQy=None):
YKHO._initialize(WKvO)
MKlR, _kpU, Fm_K = QTBn
if YKHO.synapse_config == 'static':
FEpM = MKlR
else:
_kpU += YKHO.dynamic_synapse * (YKHO.alpha_std * (1 - _kpU) - YKHO.dt_sec * Fm_K * _kpU * MKlR)
Fm_K += YKHO.dynamic_synapse * (Y... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def u0tK(YKHO, WKvO, MKlR=None):\n qObx, bGrB = YKHO.rnn(WKvO, MKlR)\n yvT9 = YKHO.nonlin(qObx)\n yvT9 = YKHO.out(yvT9)\n return yvT9",
"def Lmqg(YKHO, WKvO, NgLN, cEBT, rA0U, zsPV, NGVJ):\n XA7I = WKvO.shape[0]\n o4Jx = []\n a1PO = 0\n MKlR = NgLN\n while a1PO < XA7I:\n REGG = ... | [
"0.6626418",
"0.6523465",
"0.6475527",
"0.6467861",
"0.63915914",
"0.6248351",
"0.62410563",
"0.6223673",
"0.61891216",
"0.61472535",
"0.5977498",
"0.5958096",
"0.5928593",
"0.5924435",
"0.5900401",
"0.58467704",
"0.5833496",
"0.5816832",
"0.57625586",
"0.5760914",
"0.5746896... | 0.6954587 | 0 |
Cleans text including removal of whitespace, punctuation, accented characters, special characters and transforming to lowercase. Assumes input text is string. Returns clean string. | def jPSC(A97Q: str, QxbH: bool=True, g3sw: bool=True, v_nw: bool=True) -> str:
v1Et = enx3()
if g3sw:
A97Q = zVCt.normalize(u'NFKD', A97Q).encode('ascii', 'ignore').decode('utf8')
A97Q = ZbWC.sub('[^a-zA-Z\\s]', '', A97Q)
A97Q = A97Q.lower()
A97Q = A97Q.strip()
if QxbH:
s2mk ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QrZ9(l5Ny):\n l5Ny = ZbWC.sub(\"[^A-Za-z0-9(),!?\\\\'\\\\`]\", ' ', l5Ny)\n l5Ny = ZbWC.sub(\"\\\\'s\", \" 's\", l5Ny)\n l5Ny = ZbWC.sub(\"\\\\'ve\", \" 've\", l5Ny)\n l5Ny = ZbWC.sub(\"n\\\\'t\", \" n't\", l5Ny)\n l5Ny = ZbWC.sub(\"\\\\'re\", \" 're\", l5Ny)\n l5Ny = ZbWC.sub(\"\\\\'d\", \" ... | [
"0.8544424",
"0.8435103",
"0.82290757",
"0.80813605",
"0.8073183",
"0.8063899",
"0.80336934",
"0.8000144",
"0.79784954",
"0.7964097",
"0.7964097",
"0.7964097",
"0.7964097",
"0.7964097",
"0.7964097",
"0.77424794",
"0.772857",
"0.77225435",
"0.7708242",
"0.76745415",
"0.7620131... | 0.0 | -1 |
Initialize this prefix tree node with the given character value, an empty structure of children nodes, and a boolean terminal property. | def FIMM(YKHO, bseI=None):
YKHO.character = bseI
YKHO.children = Ho36.CHILDREN_TYPE()
YKHO.children = [None] * 26
YKHO.terminal = False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n YKHO.end_of_ngram = False\n YKHO.value = None\n YKHO.children = dict()",
"def FIMM(YKHO, hcXw):\n import collections\n YKHO.char = hcXw\n YKHO.size = 0\n YKHO.children = dict()",
"def FIMM(YKHO) -> None:\n YKHO.children: cuzp[str, etby] = {}\n YKHO.end_of_word: bool... | [
"0.6665235",
"0.6543156",
"0.6469666",
"0.6381798",
"0.6364745",
"0.6266195",
"0.61163795",
"0.59772074",
"0.5968809",
"0.5961764",
"0.587357",
"0.58718324",
"0.5849852",
"0.5834361",
"0.57998735",
"0.57780296",
"0.5742961",
"0.5738601",
"0.57318425",
"0.5730069",
"0.57175416... | 0.8080057 | 0 |
Return this prefix tree node's child node that represents the given character if it is amongst its children, or raise ValueError if not. | def nUGE(YKHO, bseI):
if YKHO.has_child(bseI):
d6pt = YKHO._get_index(bseI.upper())
return YKHO.children[d6pt]
else:
raise ValueError(f'No child exists for character {bseI!r}') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M4sg(YKHO, bseI, XJxn):\n bseI = bseI.upper()\n if not bseI.isalpha():\n raise ValueError(f'Child can only be English letters!')\n if not YKHO.has_child(bseI):\n d6pt = YKHO._get_index(bseI)\n YKHO.children[d6pt] = XJxn\n else:\n raise ValueError(f'Child exists for chara... | [
"0.6411065",
"0.6123256",
"0.59505016",
"0.5816716",
"0.5716883",
"0.55713284",
"0.5504385",
"0.5464852",
"0.5397857",
"0.5277082",
"0.52383786",
"0.51611114",
"0.5122005",
"0.50697345",
"0.5056239",
"0.5043961",
"0.5043162",
"0.5042223",
"0.5009303",
"0.49876723",
"0.4982551... | 0.6819031 | 0 |
Return a code representation of this prefix tree node. | def wHJl(YKHO):
return f'PrefixTreeNode({YKHO.character!r})' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def y0cW(YKHO):\n return str(YKHO.data)",
"def t_Jp(YKHO):\n if YKHO.is_empty():\n return ''\n else:\n Npgh = str(YKHO.root_value())\n if YKHO.is_leaf():\n return Npgh\n elif YKHO.has_left():\n if YKHO.has_right():\n return Npgh + ' ' + YK... | [
"0.6528944",
"0.6526481",
"0.6429511",
"0.6429511",
"0.62779075",
"0.62705106",
"0.62266624",
"0.6158443",
"0.60770893",
"0.6044291",
"0.60248667",
"0.59881675",
"0.59881675",
"0.59881675",
"0.59881675",
"0.59868693",
"0.5969311",
"0.59661835",
"0.5922735",
"0.5877203",
"0.58... | 0.7174368 | 0 |
Return a string view of this prefix tree node. | def zAg0(YKHO):
return f'({YKHO.character})' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def t_Jp(YKHO):\n if YKHO.is_empty():\n return ''\n else:\n Npgh = str(YKHO.root_value())\n if YKHO.is_leaf():\n return Npgh\n elif YKHO.has_left():\n if YKHO.has_right():\n return Npgh + ' ' + YKHO.get_left().print_prefix() + ' ' + YKHO.get_ri... | [
"0.78688645",
"0.77090394",
"0.76721746",
"0.72109437",
"0.69245",
"0.6888956",
"0.68463635",
"0.68463635",
"0.68463635",
"0.6803383",
"0.6798295",
"0.6796307",
"0.6789594",
"0.67809397",
"0.67643434",
"0.67530656",
"0.6752193",
"0.6741303",
"0.6741303",
"0.6739444",
"0.67361... | 0.0 | -1 |
Return a index position of character where it should be placed in list of children. | def aqIr(YKHO, bseI):
n1EG = 65
d6pt = ord(bseI) - n1EG
return d6pt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WDvq(YKHO, aUGN):\n YKHO.__initChild()\n return YKHO.__child.index(aUGN)",
"def Vn7Z(YKHO, aUGN):\n for kS1Y, ZfUD in enumerate(YKHO.children):\n if ZfUD == aUGN:\n return kS1Y\n return -1",
"def Bc1k(YKHO, aUGN):\n return (aUGN - 1) // 2",
"def uI3T(YKHO):\n return 2 ... | [
"0.7009422",
"0.700826",
"0.66675276",
"0.6638552",
"0.6634376",
"0.65657616",
"0.65270454",
"0.64948785",
"0.6494254",
"0.64940816",
"0.6444423",
"0.6420129",
"0.6409724",
"0.640417",
"0.6361441",
"0.63218945",
"0.6315875",
"0.6286927",
"0.6285693",
"0.62847406",
"0.62767726... | 0.673267 | 2 |
Initialize the MixedDataset object | def FIMM(YKHO, Tuqy='train_with_val', gMbG=None, xAU6=lskq):
assert Tuqy in ['train_noval', 'val', 'train_with_val', 'test']
YKHO.mode = Tuqy
YKHO.opts = xAU6
YKHO._trn_IDs, YKHO._val_IDs, YKHO._tst_IDs = ([], [], [])
YKHO._trn_IDs_simpl, YKHO._val_IDs_simpl, YKHO._tst_IDs_simpl = ([], [], [])
Y... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, __n6: Dataset):\n YKHO.dataset = __n6",
"def FIMM(YKHO):\n YKHO.__dataset = None",
"def FIMM(YKHO, __n6):\n YKHO._dataset = __n6",
"def FIMM(YKHO, **B2fa):\n pVAc.__init__(YKHO, **B2fa)",
"def FIMM(YKHO, GPtr):\n bo34.info(f'{YKHO.__class__.__name__}: Dataset initializing ...'... | [
"0.7411658",
"0.72885245",
"0.71571064",
"0.7053392",
"0.68904114",
"0.6724314",
"0.6659843",
"0.6644623",
"0.6643797",
"0.66090095",
"0.66068286",
"0.65960044",
"0.65706927",
"0.65495265",
"0.6547606",
"0.6535818",
"0.65315616",
"0.6527384",
"0.64903736",
"0.64691925",
"0.64... | 0.0 | -1 |
Returns a reference to the object that is used to communicate with the local database. | def u_OD(YKHO):
return YKHO.database | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VmlM(YKHO):\n return pths(SZpq.ClientStorage((YKHO.server, YKHO.port)))",
"def YKY6(YKHO):\n if not hasattr(YKHO.__local, '__release_local__'):\n return YKHO.__local()\n try:\n return getattr(YKHO.__local, YKHO.__name__)\n except AttributeError:\n raise RuntimeError('no objec... | [
"0.6918891",
"0.6724008",
"0.6724008",
"0.6723868",
"0.6684718",
"0.6680489",
"0.6670846",
"0.65912634",
"0.65845156",
"0.65604097",
"0.65604097",
"0.6549198",
"0.65159595",
"0.64362836",
"0.6411684",
"0.6393103",
"0.639274",
"0.6376347",
"0.63745874",
"0.63585603",
"0.635642... | 0.65099496 | 13 |
Returns the id received from the storage. | def unpH(YKHO):
return YKHO.id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OyzV(YKHO):\n return str(YKHO._storage_id)",
"def kqDp(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'storage_id')",
"def kqDp(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'storage_id')",
"def kqDp(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'storage_id')",
"def id(YKHO):\n ... | [
"0.8605927",
"0.7899234",
"0.76329434",
"0.76329434",
"0.7469452",
"0.73761845",
"0.7328387",
"0.7303304",
"0.72675776",
"0.7265474",
"0.7242328",
"0.7242328",
"0.7242328",
"0.7242328",
"0.7242328",
"0.7242328",
"0.7217709",
"0.7217658",
"0.7214174",
"0.7199182",
"0.71714056"... | 0.7169344 | 35 |
Sets the id received from the storage. | def V_9M(YKHO, id):
YKHO.id = id
print('self id = ' + str(YKHO.id)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V_9M(YKHO, id):\n YKHO.data['id'] = id",
"def id(YKHO, _eu6):\n YKHO.metadata['id'] = _eu6",
"def V_9M(YKHO, id):\n YKHO.__id = id",
"def V_9M(YKHO, hbFX):\n YKHO.id_ = hbFX",
"def id(YKHO, id):\n YKHO._id = id",
"def id(YKHO, id):\n YKHO._id = id",
"def id(YKHO, id):\n YKHO._i... | [
"0.77089494",
"0.76720566",
"0.7640065",
"0.7606066",
"0.75123215",
"0.75123215",
"0.75123215",
"0.75123215",
"0.75123215",
"0.74815494",
"0.74815494",
"0.74815494",
"0.74815494",
"0.74815494",
"0.74815494",
"0.74815494",
"0.74815494",
"0.74815494",
"0.74815494",
"0.74815494",
... | 0.0 | -1 |
Status of the job. | async def status(YKHO) -> rKxn:
async with YKHO._redis.pipeline(transaction=True) as yKIT:
yKIT.exists(W9BL + YKHO.job_id)
yKIT.exists(DJQy + YKHO.job_id)
yKIT.zscore(YKHO._queue_name, YKHO.job_id)
ZZQq, ONrB, p1kx = await yKIT.execute()
if ZZQq:
return rKxn.complete
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jGRS(YKHO):\n return YKHO.job_proto.status",
"def jGRS(YKHO) -> str:\n return YKHO._check_job_status()",
"def jGRS(YKHO) -> qe4Y.Output['outputs.JobStatus']:\n return qe4Y.get(YKHO, 'status')",
"def VLTN(YKHO):\n return gTEQ('PrlJob_GetStatus', YKHO.handle)",
"def VLTN(YKHO):\n bD7m = 'd... | [
"0.8967504",
"0.87950474",
"0.83233553",
"0.82600874",
"0.8072488",
"0.7965151",
"0.79399073",
"0.79399073",
"0.7886714",
"0.7858171",
"0.7853358",
"0.7853358",
"0.78377676",
"0.78345966",
"0.78289896",
"0.78206897",
"0.78206897",
"0.78206897",
"0.78206897",
"0.78206897",
"0.... | 0.79390967 | 8 |
Change the canvas's scrollregion to reflect a change made to ``Gyro.circ_pad`` or the radius. | def HUKa(YKHO):
YKHO.configure(scrollregion=(-YKHO._radius - YKHO.circ_pad, -YKHO._radius - YKHO.circ_pad, YKHO._radius + YKHO.circ_pad, YKHO._radius + YKHO.circ_pad)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WwQh(YKHO, tvqc):\n WKvO, LVAh = (tvqc.width // 2, tvqc.height // 2)\n YKHO.canvas.config(scrollregion=(-WKvO, -LVAh, WKvO, LVAh))",
"def bh_V(YKHO, tvqc=None):\n YKHO.canvas.configure(scrollregion=YKHO.canvas.bbox('all'))",
"def dDB8(YKHO, tvqc):\n YKHO.testCanvas.configure(scrollregion=YKHO.t... | [
"0.6519079",
"0.6516638",
"0.60711473",
"0.60119116",
"0.5765868",
"0.57313836",
"0.56846607",
"0.55534095",
"0.5489553",
"0.5466302",
"0.54653174",
"0.544385",
"0.54332244",
"0.54172426",
"0.54033566",
"0.53885525",
"0.5371049",
"0.5363052",
"0.53378415",
"0.5244353",
"0.523... | 0.7807882 | 0 |
Wrapper around ``tkinter.Canvas.create_oval`` to make constructing circles more intuitive. | def vz_G(YKHO, WKvO, LVAh, Mkmy, **B2fa):
return YKHO.create_oval(*YKHO.circ_to_oval(WKvO, LVAh, Mkmy), **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nKcT(FKsd, mtDG, xgKV, HgvT):\n global _canvas\n global _current_color\n if VF9r == None:\n raise RuntimeError('Canvas is not open yet.')\n else:\n Vwtj = PQpQ(xgKV * 2, HgvT * 2, PvyL(FKsd, mtDG))\n wEXo(Vwtj)\n VF9r.add(Vwtj)",
"def c6yp(FKsd, mtDG, xgKV, HgvT):\n ... | [
"0.740658",
"0.70530504",
"0.69541764",
"0.66446006",
"0.6630347",
"0.65782756",
"0.65251106",
"0.64284277",
"0.639205",
"0.6383982",
"0.6344532",
"0.6344419",
"0.63228714",
"0.6318555",
"0.6304312",
"0.6300076",
"0.6299974",
"0.62963027",
"0.6232296",
"0.62321067",
"0.623210... | 0.7324109 | 1 |
Wait until the given networktables instance successfully connects and then populate the listboxes with data. This should be called after the ``NTBrowser`` is constructed if the networktables instance containing the root table is suspected to be disconnected. | def qKoA(YKHO, p4_k, tnc5=500):
if p4_k.isConnected():
YKHO.reload()
else:
YKHO.after(tnc5, BfDw.named_partial(YKHO.reload_when_connected, p4_k, tnc5)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wwb2(YKHO):\n YKHO.tables = YKHO.list_tables()\n for tyNF in YKHO.tables:\n YKHO.mylist.insert(FRMp, tyNF[0])\n YKHO.mylist.bind('<Double-1>', lambda WKvO: YKHO.select_table())",
"def _WV6(YKHO, tyNF):\n YKHO._curr_scroll_row = 0\n YKHO._disable_entry()\n YKHO._clear()\n YKHO._las... | [
"0.5657485",
"0.55829924",
"0.5064517",
"0.50618094",
"0.5032641",
"0.4853179",
"0.485243",
"0.4843599",
"0.47780308",
"0.4739779",
"0.4710635",
"0.46127602",
"0.4594483",
"0.45716617",
"0.45681164",
"0.45410395",
"0.454007",
"0.4516985",
"0.44975692",
"0.44831657",
"0.447321... | 0.0 | -1 |
Internal method used as the callback for ">" events on the listboxes. This method enables or disabled the entry as appropriate to the new data selection and sets ``NTBrowser._curr_indices``. | def pZeE(YKHO, bGrB):
YKHO._curr_indices = YKHO.key_listbox.curselection() or YKHO.value_listbox.curselection()
if YKHO._curr_indices:
eJTR = None
for or8S in YKHO._curr_indices:
if or8S <= YKHO._last_table_idx:
break
if eJTR is None:
eJTR ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZkpI(YKHO, KnxT, hkxX, SxJd, XguP):\n BfDw.convert_to_numeric(hkxX)\n if hkxX[XguP] in SxJd[XguP]:\n for za1K in SxJd[XguP][hkxX[XguP]]:\n if not isinstance(KnxT[za1K], _sef.Text):\n KnxT[za1K].update(disabled=False)\n KnxT[za1K].metadata = True\n ... | [
"0.56618375",
"0.5659626",
"0.5594502",
"0.55678624",
"0.55105686",
"0.54801536",
"0.5462772",
"0.5423531",
"0.5406913",
"0.5393726",
"0.53336704",
"0.5322919",
"0.5308489",
"0.5301149",
"0.5258873",
"0.5217732",
"0.5205504",
"0.5205093",
"0.51920545",
"0.5189554",
"0.5184486... | 0.6361306 | 0 |
View responding to AJAX request for list of all ingredients currently stored in database. | def foER(QePW):
DumB = _baS.objects.all().order_by('name')
QpfX = []
for ZfUD in DumB:
QpfX.append({ZfUD.name: ZfUD.pk})
return igJ6(qQXR.dumps(QpfX), content_type='application/json') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CbWe(YKHO):\n if YKHO._ingredients_view:\n YKHO._ingredients_view.destroy()\n NtEF = YKHO.food_service.get_user().get_username()\n zKHR = YKHO.food_service.list_added_ingredients(NtEF, expire=True)\n YKHO._ingredients_view = Dn5K(YKHO._ingredients_frame, zKHR, YKHO._handle_mark)\n YKHO._i... | [
"0.71443564",
"0.6621847",
"0.6533707",
"0.6456862",
"0.63419956",
"0.62605214",
"0.6260338",
"0.6219494",
"0.61849874",
"0.61646134",
"0.61379063",
"0.6126435",
"0.608624",
"0.60640466",
"0.60598683",
"0.6016408",
"0.6010413",
"0.5991127",
"0.59910214",
"0.59663296",
"0.5936... | 0.72881126 | 0 |
Convert number permission notation to symbolic notation. | def WXJ_(mLGw):
mLGw = str(mLGw)
if len(mLGw) == 3:
uOe2 = (mLGw[0], mLGw[1], mLGw[2])
bQsF = ''
for H5ew, BWXx in NKg_.items():
for Oa1e in uOe2:
if int(Oa1e) > 8 or int(Oa1e) < 0:
bQsF = 'Invalid Numerical Representation!'
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jqBr(fzB0: str) -> str:\n iIZD = {'r': 4, 'w': 2, 'x': 1, '-': 0}\n gLiZ = []\n ycBG = []\n for YRbF in range(len(fzB0)):\n wEf2 = iIZD.get(fzB0[YRbF])\n ycBG.append(wEf2)\n if len(ycBG) == 3:\n gLiZ.append(list((a1PO for a1PO in ycBG)))\n ycBG.clear()\n ... | [
"0.53374124",
"0.527418",
"0.5249602",
"0.520306",
"0.5150457",
"0.5133376",
"0.51284754",
"0.5085775",
"0.5078872",
"0.50376916",
"0.5032838",
"0.50220686",
"0.50122875",
"0.4994668",
"0.4976482",
"0.49640882",
"0.49295864",
"0.4921475",
"0.48928908",
"0.48783267",
"0.486434... | 0.6568608 | 0 |
Initialize the object from a dictionary of values | def uROc(Emd4, **B2fa):
return Emd4(**B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, sjXb, hkxX):\n YKHO.keys = sjXb\n YKHO.values = hkxX",
"def jG8h(Emd4, cmPJ: Dict[str, Any]):\n return Emd4(**cmPJ)",
"def jG8h(Emd4, fK8P):\n pass",
"def jG8h(Emd4, nPrm):\n return Emd4(**nPrm)",
"def jG8h(Emd4, nPrm):\n KAOR = Emd4()\n for H5ew, BWXx in nPrm.items():\n... | [
"0.7609474",
"0.74423563",
"0.7432553",
"0.7426584",
"0.7413911",
"0.74106115",
"0.73779005",
"0.7373955",
"0.73540986",
"0.73540986",
"0.73540986",
"0.73540986",
"0.73540986",
"0.73540986",
"0.73540986",
"0.73540986",
"0.73540986",
"0.73540986",
"0.73540986",
"0.73540986",
"... | 0.0 | -1 |
Retrieve the current values of the RAMSTKMode data model attributes. | def h6gc(YKHO):
mIvx = {'function_id': YKHO.function_id, 'hardware_id': YKHO.hardware_id, 'mode_id': YKHO.mode_id, 'critical_item': YKHO.critical_item, 'description': YKHO.description, 'design_provisions': YKHO.design_provisions, 'detection_method': YKHO.detection_method, 'effect_end': YKHO.effect_end, 'effect_loca... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R1i3(YKHO):\n nPrm = {'hidden': YKHO._hidden, 'temp_unit': YKHO.temperature_unit}\n if YKHO._device.temp_outside is not None and YKHO._device.temp_outside > -460:\n nPrm['temp_outside'] = YKHO._device.temp_outside\n if YKHO._device.temp_3 is not None and YKHO._device.temp_3 > -460:\n nPr... | [
"0.61570674",
"0.6085479",
"0.6055138",
"0.6028234",
"0.60274136",
"0.60102427",
"0.59539336",
"0.5916759",
"0.5916759",
"0.58789027",
"0.58387506",
"0.58357614",
"0.58318275",
"0.58289427",
"0.57944816",
"0.57702005",
"0.57553905",
"0.5739991",
"0.57087195",
"0.5681874",
"0.... | 0.54526293 | 57 |
translates x by subtracting its mean from every observation (so that the result has a mean = 0) | def XMAn(WKvO):
fTjR = JBMS(WKvO)
return [kidU - fTjR for kidU in WKvO] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UCnk(WKvO):\n fTjR = JBMS(WKvO)\n return [kidU - fTjR for kidU in WKvO]",
"def UCnk(WKvO):\n fTjR = JBMS(WKvO)\n return [kidU - fTjR for kidU in WKvO]",
"def UCnk(WKvO):\n fTjR = JBMS(WKvO)\n return [kidU - fTjR for kidU in WKvO]",
"def UCnk(WKvO):\n fTjR = JBMS(WKvO)\n return [ki... | [
"0.81177664",
"0.80826604",
"0.80826604",
"0.80826604",
"0.7419382",
"0.71917254",
"0.70956707",
"0.6826369",
"0.6820255",
"0.6728887",
"0.6728887",
"0.6612345",
"0.6566342",
"0.6563226",
"0.6550982",
"0.6509516",
"0.6455834",
"0.63640994",
"0.63588613",
"0.6349324",
"0.63412... | 0.68667185 | 7 |
BCE summed over the voxels intensities. | def tf7M(WKvO, cGWo, gyx_):
VsyH = ht2j.sum(vuvg.binary_cross_entropy(cGWo, WKvO) / gyx_.exp() + 2 * gyx_)
return VsyH | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z2T2(YKHO):\n sum = 0.0\n for xUfL in YKHO.sails:\n CJ6s = xUfL.cl(YKHO.awa) ** 2\n nqS6 = xUfL.cd(YKHO.awa) ** 2\n sum += xUfL.area * xUfL.vce * xUfL.bk * oyIN.sqrt(CJ6s + nqS6)\n YKHO._area()\n P9sl = 0 if YKHO.sails[1].up != True else (1 - YKHO.ftj) * 0.05 * YKHO.sails[1].IG... | [
"0.63061666",
"0.5997975",
"0.588063",
"0.5665232",
"0.564657",
"0.56458056",
"0.55187875",
"0.5485349",
"0.5484678",
"0.5478399",
"0.5470462",
"0.5465121",
"0.54145944",
"0.54053366",
"0.5383228",
"0.53753585",
"0.5371241",
"0.5369686",
"0.5359706",
"0.5344592",
"0.5335335",... | 0.55135 | 7 |
Gets and sets the vppOrganizationName | def Ovk1(YKHO):
if 'vppOrganizationName' in YKHO._prop_dict:
return YKHO._prop_dict['vppOrganizationName']
else:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ejLf(YKHO):\n if YKHO.organization is not None:\n return YKHO.organization.name\n return ''",
"def wbiw(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'organization')",
"def pBok(YKHO):\n return _VfD.ModelCreator_getOrganization(YKHO)",
"def PI_r(YKHO):\n return YKHO.refere... | [
"0.684137",
"0.6185486",
"0.61104095",
"0.60688007",
"0.6068101",
"0.6055266",
"0.59143037",
"0.5851724",
"0.5840031",
"0.58396685",
"0.58396685",
"0.58298886",
"0.5803846",
"0.5779328",
"0.5779328",
"0.56808895",
"0.56748295",
"0.56549084",
"0.5612998",
"0.5557546",
"0.54901... | 0.83878106 | 0 |
Gets and sets the seller | def FOLI(YKHO):
if 'seller' in YKHO._prop_dict:
return YKHO._prop_dict['seller']
else:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FOLI(YKHO, FOLI):\n YKHO._seller = FOLI",
"def Jyjr(YKHO):\n return YKHO.contact.seller",
"def azgM(YKHO, azgM):\n YKHO._buyer = azgM",
"def EEZ4(QpfX: Dict[str, Any]) -> h8nf[Gjoq]:\n CBIr: mv1M = QpfX['user']\n if CBIr.is_authenticated:\n try:\n FOLI = Gjoq.objects.get(... | [
"0.8109366",
"0.698005",
"0.62128127",
"0.6178388",
"0.6039728",
"0.6028439",
"0.5871527",
"0.57780135",
"0.5721163",
"0.56939894",
"0.56875074",
"0.5485203",
"0.5411141",
"0.53689885",
"0.5301218",
"0.5298088",
"0.5297234",
"0.52722865",
"0.52558464",
"0.5248467",
"0.5244013... | 0.83205086 | 0 |
Gets and sets the totalLicenseCount | def cZ1U(YKHO):
if 'totalLicenseCount' in YKHO._prop_dict:
return YKHO._prop_dict['totalLicenseCount']
else:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _457(YKHO):\n if 'usedLicenseCount' in YKHO._prop_dict:\n return YKHO._prop_dict['usedLicenseCount']\n else:\n return None",
"def Fp6V(YKHO) -> qe4Y.Output[h8nf[int]]:\n return qe4Y.get(YKHO, 'license_count')",
"def Fp6V(YKHO) -> h8nf[qe4Y.Input[int]]:\n return qe4Y.get(YKHO, 'lic... | [
"0.75288534",
"0.7378034",
"0.7028874",
"0.7028874",
"0.6017668",
"0.590693",
"0.5812739",
"0.5784844",
"0.57754",
"0.5763398",
"0.57567894",
"0.57275337",
"0.56986785",
"0.5680325",
"0.5677107",
"0.5677107",
"0.5677107",
"0.5677107",
"0.5677107",
"0.5677107",
"0.5677107",
... | 0.81494826 | 0 |
Density of gas assuming ideal gas law in kg/m^3. | def InLe(YKHO):
return 0.001 * YKHO.molar_mass * YKHO.pressure / (K6Rf * YKHO.temperature) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def y_om(bPV5, diNy, seEd):\n rLLL = 8.314\n WCpz = seEd / 145.038\n tUjD = diNy + 273.16\n KDR1 = WCpz / (4.892 - 0.4048 * bPV5)\n cbhz = tUjD / (94.72 + 170.75 * bPV5)\n k0lF = 0.03 + 0.00527 * (3.5 - cbhz) ** 3\n tjUW = 0.642 * cbhz - 0.007 * cbhz ** 4 - 0.52\n Nq1b = 0.109 * (3.85 - cbh... | [
"0.74058163",
"0.7005451",
"0.68938565",
"0.6806513",
"0.6706316",
"0.6634284",
"0.6574425",
"0.65566623",
"0.651678",
"0.6436798",
"0.63436514",
"0.633899",
"0.6326834",
"0.6320278",
"0.63081455",
"0.6297625",
"0.62733966",
"0.62247926",
"0.6177332",
"0.61762756",
"0.6155900... | 0.81784177 | 0 |
Vapour pressure in Pascals. | def WdDa(YKHO):
return YKHO.relative_humidity * YKHO.solvent.equilibrium_vapour_pressure(YKHO.temperature) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WkvI(YKHO):\n return QQA2(YKHO.TP, YKHO.TP + YKHO.FP)",
"def n1UN(ycBG: float) -> float:\n w520 = 17.27 * ycBG / (ycBG + 237.3)\n vuA2 = 611 * oyIN.exp(w520)\n return vuA2",
"def Omoj(F_MN):\n return 611.2 * kLQb(17.67 * F_MN / (243.5 + F_MN))",
"def IhET(EO1n):\n return EO1n / 10",
"... | [
"0.7080288",
"0.69284487",
"0.68418944",
"0.6743915",
"0.66257185",
"0.6582194",
"0.6576109",
"0.6573769",
"0.6532861",
"0.65210193",
"0.65180355",
"0.64524937",
"0.64445084",
"0.63541234",
"0.6329281",
"0.6282231",
"0.62752527",
"0.62735087",
"0.62735087",
"0.62735087",
"0.6... | 0.80786455 | 0 |
calcule la puissance de x ^ n | def Nlii(WKvO: float, exwG: int) -> float:
ezXV: float = 1
r4rh: int = 1
if exwG != 0:
if exwG <= 0:
exwG = -exwG
r4rh = -1
for Had7 in range(1, exwG + 1):
ezXV = ezXV * WKvO
if r4rh < 0:
ezXV = 1 / ezXV
return ezXV | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FaGQ(WKvO, ywwl):\n return (WKvO ** 2 + 1) % ywwl",
"def naF9(WKvO, exwG):\n naF9 = 1\n for YRbF in range(abs(exwG)):\n naF9 = wTxu(naF9, WKvO)\n return naF9",
"def JYo6(YKHO, exwG):\n XP5J = YKHO.power(exwG)\n return XP5J",
"def naF9(WKvO, exwG):\n BWXx = 1\n for YRbF in r... | [
"0.76149625",
"0.73387146",
"0.7324877",
"0.7267193",
"0.72311145",
"0.71934336",
"0.7170515",
"0.707581",
"0.69598484",
"0.69359",
"0.69332993",
"0.6889131",
"0.6868321",
"0.68481904",
"0.6832225",
"0.6832225",
"0.6831433",
"0.6818101",
"0.67940444",
"0.67862517",
"0.6785801... | 0.71249187 | 7 |
Create a LogEntry from the given dictionary. | def HZHS(Mjw9, W4ze=None):
return z82G(vin=Mjw9[z82G.VIN_FIELD], app_id=Mjw9[z82G.APP_ID_FIELD], level=Mjw9[z82G.LEVEL_FIELD], log_message=Mjw9[z82G.LOG_MESSAGE_FIELD], gps_position=Mjw9[z82G.GPS_POSITION_FIELD], time_unix=Mjw9[z82G.TIME_UNIX_FIELD], log_id=Mjw9[z82G.LOG_ID_FIELD], intrusion=W4ze) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jG8h(YKHO, un5i, UH0n=80):\n try:\n for H5ew in un5i:\n un5i[H5ew] = YKHO._convert_dict_key(un5i[H5ew])\n if YKHO._validate_dict_entry(un5i) or YKHO.info is not None:\n try:\n for hkS8 in YKHO.FIELDNAMES:\n setattr(YKHO, hkS8, un5i[hkS8])... | [
"0.6882139",
"0.68295366",
"0.6646199",
"0.6632009",
"0.634357",
"0.6288146",
"0.6288146",
"0.62512225",
"0.6236364",
"0.6207709",
"0.61589706",
"0.6122494",
"0.5947414",
"0.59346",
"0.5900016",
"0.5896469",
"0.58897763",
"0.58897763",
"0.58897763",
"0.58897763",
"0.58897763"... | 0.7672826 | 0 |
Dot product of vectors x and y | def BJ1H(WKvO, LVAh):
return sum([Y7fn * O5iP for Y7fn, O5iP in zip(WKvO, LVAh)]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yYJc(WKvO, LVAh):\n return sum((jzdc * Fg_i for jzdc, Fg_i in zip(WKvO, LVAh)))",
"def QLUs(WKvO, LVAh):\n if len(WKvO) != len(LVAh):\n raise ValueError('vector lengths differ')\n else:\n return sum([WKvO[YRbF] * LVAh[YRbF] for YRbF in range(len(WKvO))])",
"def BJ1H(WKvO, LVAh):\n ... | [
"0.8719347",
"0.85587317",
"0.81081426",
"0.79403627",
"0.7918046",
"0.78332645",
"0.7820983",
"0.78134316",
"0.7771925",
"0.77611864",
"0.7745346",
"0.7739358",
"0.76962656",
"0.7687426",
"0.7682485",
"0.7668282",
"0.7629572",
"0.76284784",
"0.7628374",
"0.7611728",
"0.75885... | 0.83901334 | 2 |
Get only the necessary fields of a tweet returns a Tweet with the needed attributes as a dict | def Fbs0(YKHO, q53Q):
LEh1 = {}
LEh1['created_at'] = q53Q['created_at']
LEh1['lang'] = q53Q['lang']
LEh1['text'] = q53Q['text']
LEh1['entities'] = q53Q['entities']
LEh1['favorite_count'] = q53Q['favorite_count']
LEh1['retweet_count'] = q53Q['retweet_count']
LEh1['user_followers_cnt'] = q... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RDP9(Mau6):\n Mau6 = g8pp(Mau6)\n return {'TWEET': Mau6}",
"def GAIW(Mau6: Tweet):\n if Mau6.other_data and len(Mau6.other_data) > 0:\n r845 = qQXR.loads(Mau6.other_data)\n return qQXR.loads(r845['user'])",
"def T3sD(Mau6):\n Csk6 = {}\n Csk6['hastags'] = [zTII['text'] for zTII... | [
"0.6789574",
"0.67805123",
"0.6629773",
"0.6599947",
"0.6406722",
"0.6375403",
"0.6339529",
"0.62415105",
"0.62412876",
"0.6117636",
"0.6082488",
"0.605193",
"0.60203075",
"0.5877773",
"0.58547664",
"0.5826857",
"0.57997686",
"0.57727486",
"0.5763892",
"0.57532144",
"0.573178... | 0.7178673 | 0 |
Set the range of Yaxis for display | def kSHX(YKHO, LSh8, CN9P):
YKHO.Y_AXIS_RANGE = (LSh8, CN9P) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yuZ1(YKHO):\n YKHO.ax.set_ylim(YKHO.ylims)\n UUS0 = [*range(0, YKHO.ymax, 5)]\n Vb5F = YKHO.settings.rcParams['axes.labelsize'] if YKHO.settings.otherParams['ylabel.fontsize'] is None else YKHO.settings.otherParams['ylabel.fontsize']\n qfpW = YKHO.settings.rcParams['axes.labelcolor'] if YKHO.settin... | [
"0.7353007",
"0.72912204",
"0.7056452",
"0.7000773",
"0.69802177",
"0.69701964",
"0.69701964",
"0.6961962",
"0.6933012",
"0.6850009",
"0.6794499",
"0.67578864",
"0.67419934",
"0.67419934",
"0.67362744",
"0.67272717",
"0.67264444",
"0.666699",
"0.66562355",
"0.6655635",
"0.662... | 0.8293696 | 0 |
The redshift for this distance assuming its physical distance is a luminosity distance. | def od0m(YKHO, QhKG=None):
from ..QhKG import luminosity_distance
from scipy import optimize
eHNT = lambda epBp, Csk6, YhSR: (luminosity_distance(epBp, YhSR).value - Csk6) ** 2
return optimize.brent(eHNT, (YKHO.Mpc, QhKG)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DS4x(YKHO, epBp):\n return YKHO.proper_distance(epBp) * (1 + epBp)",
"def DS4x(YKHO, epBp):\n SG6Y = YKHO.angular_diameter_distance(epBp)\n gzVs = SG6Y * (1.0 + epBp) ** 2.0\n return gzVs",
"def aUQr(YKHO):\n if YKHO.no_dist is False and YKHO.no_flux is False:\n pImw = YKHO.distance\n... | [
"0.5890186",
"0.58678305",
"0.5807113",
"0.5798565",
"0.56901914",
"0.5677453",
"0.5615042",
"0.5581174",
"0.5569656",
"0.5483461",
"0.5445089",
"0.52822375",
"0.5251608",
"0.5222585",
"0.5203338",
"0.5182899",
"0.5171239",
"0.5140096",
"0.5124801",
"0.51096433",
"0.510625",
... | 0.0 | -1 |
Returns the best individual if the islands converged to an acceptable fitness. Returns | def qy8K(YKHO):
return YKHO._best_indv | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Mft4(YKHO):\n return max(YKHO._population, key=GMHI('fitness'))",
"def fH6U(YKHO):\n return YKHO.population.best_individual()",
"def OmFP(YKHO) -> a4Hw:\n if not YKHO._best_chromosome is None:\n return YKHO._best_chromosome\n P6Dd = None\n L85O = None\n for q7V9 in YKHO._population... | [
"0.80649817",
"0.75292766",
"0.71652573",
"0.6961003",
"0.6884281",
"0.6873114",
"0.67495084",
"0.66600174",
"0.6649065",
"0.6631332",
"0.6609789",
"0.6591238",
"0.65880316",
"0.6585515",
"0.65848273",
"0.65382606",
"0.65047693",
"0.64753777",
"0.6447623",
"0.6391002",
"0.633... | 0.76329255 | 1 |
Allocate a TransposedConvLayer with shared variable internal parameters. | def FIMM(YKHO, input, gt4n, QJWG, _0fC=(2, 2), dvgN=(0, 0), YDYE=xlaR):
YKHO.input = input
YKHO.output = fhcK.TransposedConv2DLayer(YKHO.input, gt4n, QJWG, stride=_0fC, crop=dvgN, W=K55i()[0], b=K55i()[1], nonlinearity=YDYE) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l7uB(Fi_Q, yIp6, Kz5H, *qIxc, **B2fa):\n return nhQi(Fi_Q, yIp6.input_shape[1], yIp6.filter_size, *qIxc, stride=yIp6.stride, crop=yIp6.pad, W=yIp6.W, flip_filters=not yIp6.flip_filters, nonlinearity=Kz5H, **B2fa)",
"def eLpg(YKHO) -> None:\n if YKHO.torch is not None:\n return\n YKHO.torch = ... | [
"0.63744015",
"0.5864105",
"0.586131",
"0.5837967",
"0.5762193",
"0.5750853",
"0.57461226",
"0.57346827",
"0.57076824",
"0.5697772",
"0.56805575",
"0.5673117",
"0.5603193",
"0.5555773",
"0.5510417",
"0.5501909",
"0.5458268",
"0.5454152",
"0.5436939",
"0.54160196",
"0.5399038"... | 0.61901104 | 1 |
Get the name of the API resource. | def kFeU() -> str:
return 'contactTags' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mWFP(YKHO):\n return YKHO.raw_resource['name']",
"def mWFP(YKHO):\n return YKHO.resource['metadata']['name']",
"def YJsY(YKHO):\n return YKHO._resource_name",
"def kFeU(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'resource_name')",
"def kFeU(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'r... | [
"0.7821574",
"0.7735648",
"0.7670678",
"0.7447657",
"0.7447657",
"0.74427205",
"0.7221747",
"0.7221747",
"0.7221747",
"0.7221747",
"0.7221747",
"0.7201344",
"0.7172618",
"0.69053936",
"0.68893594",
"0.68083745",
"0.68061125",
"0.6781027",
"0.6781027",
"0.6777424",
"0.67408043... | 0.0 | -1 |
Initialize this dataset class. | def FIMM(YKHO, y7GR):
x_b5.__init__(YKHO, y7GR)
YKHO.A_paths = sorted(PK3w(y7GR.dataroot, y7GR.max_dataset_size))
UDrg = YKHO.opt.output_nc if YKHO.opt.direction == 'BtoA' else YKHO.opt.input_nc
YKHO.transform = K3I5(y7GR, grayscale=UDrg == 1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n YKHO.__dataset = None",
"def FIMM(YKHO, __n6):\n YKHO._dataset = __n6",
"def FIMM(YKHO, __n6: Dataset):\n YKHO.dataset = __n6",
"def FIMM(YKHO, GPtr):\n bo34.info(f'{YKHO.__class__.__name__}: Dataset initializing ...')\n super().__init__(GPtr)",
"def FIMM(YKHO, **B2fa):\n ... | [
"0.816631",
"0.81641185",
"0.8013762",
"0.76137954",
"0.7422038",
"0.7393049",
"0.7352237",
"0.73437655",
"0.7111143",
"0.71019876",
"0.7099074",
"0.7096382",
"0.70223516",
"0.696418",
"0.6961817",
"0.6889772",
"0.6879775",
"0.68740934",
"0.68599087",
"0.68520594",
"0.6842619... | 0.6548279 | 77 |
Return a data point and its metadata information. | def OP2O(YKHO, d6pt):
C2il = YKHO.A_paths[d6pt]
JzBy = oyIN.array(hnIv.open(C2il).convert('RGB'))
JzBy = YKHO.stack(JzBy)
JzBy = Einh(JzBy, (256, 256))
JzBy = oyIN.einsum('abc->cab', JzBy)
k0lF = zH59(JzBy, max_=1)
return {'A': k0lF, 'A_paths': C2il} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AU8u(YKHO):\n return (YKHO.x, YKHO.y, YKHO.z)",
"def DQ1s(YKHO):\n AU8u = {'point': [YKHO.pt[0], YKHO.pt[1], YKHO.pt[2]], 'layer_height': YKHO.layer_height, 'mesh_normal': YKHO.mesh_normal.to_data(), 'up_vector': YKHO.up_vector.to_data(), 'frame': YKHO.frame.to_data(), 'extruder_toggle': YKHO.extruder_... | [
"0.66095746",
"0.6598914",
"0.65769345",
"0.6538956",
"0.65237606",
"0.6339937",
"0.62947094",
"0.62947094",
"0.61600286",
"0.61509",
"0.6141212",
"0.6137378",
"0.6118088",
"0.6068833",
"0.605036",
"0.60272974",
"0.59920406",
"0.5991923",
"0.59914654",
"0.59783316",
"0.596601... | 0.0 | -1 |
Set up the SHC switch platform. | async def async_setup_entry(ajET: HomeAssistant, PhL6: ConfigEntry, QEEk: AddEntitiesCallback) -> None:
MMe4: list[eeCI] = []
cuiw: DwUA = ajET.data[Sugg][PhL6.entry_id][dkWn]
for FGW3 in cuiw.device_helper.thermostats + cuiw.device_helper.roomthermostats:
MMe4.append(_EYV(device=FGW3, parent_id=cui... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AbqV(ajET, GPtr, _WBE, tR5e=None):\n _WBE([oBIa('OviSwitch', _rDc), oBIa('AC', iKVK)])",
"def AbqV(ajET, GPtr, deL4, tR5e=None) -> None:\n D7WV = GPtr.get(ZRRU)\n Z2MB = GPtr.get(POer)\n deL4([zLuI(Z2MB, D7WV)], True)",
"def AbqV(ajET, GPtr, deL4, tR5e=None):\n mWFP = GPtr.get(BiEj)\n Pp4... | [
"0.61745834",
"0.6164841",
"0.6163982",
"0.60993034",
"0.6015168",
"0.5961966",
"0.5939102",
"0.59182364",
"0.59003484",
"0.58913684",
"0.58688366",
"0.58645135",
"0.5812807",
"0.5794662",
"0.5756036",
"0.57241225",
"0.57174337",
"0.5713566",
"0.570899",
"0.57045996",
"0.5627... | 0.0 | -1 |
Return the min value of the number. | def Kx2j(YKHO) -> float:
return YKHO._device.min_offset | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vELP(YKHO):\n return min(YKHO.numbers)",
"def xKXN(YKHO):\n return YKHO._minimum_number",
"def min(YKHO) -> qe4Y.Input[int]:\n return qe4Y.get(YKHO, 'min')",
"def min(YKHO) -> qe4Y.Input[int]:\n return qe4Y.get(YKHO, 'min')",
"def min(YKHO):\n return YKHO._reduce_for_stat_function(vuvg.m... | [
"0.8187885",
"0.8120689",
"0.7916179",
"0.7916179",
"0.78326535",
"0.7700931",
"0.7700931",
"0.7643324",
"0.76173663",
"0.76173663",
"0.76063895",
"0.75760686",
"0.7549816",
"0.7485435",
"0.7461791",
"0.7427969",
"0.7427969",
"0.74131995",
"0.73779243",
"0.7353689",
"0.732778... | 0.68672127 | 52 |
Return the max value of the number. | def X4Qf(YKHO) -> float:
return YKHO._device.max_offset | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wjPT(YKHO):\n return YKHO._maximum_number",
"def PtQX(YKHO):\n return max(YKHO.numbers)",
"def bQ6z(YKHO) -> int:\n return YKHO.__max_value",
"def max():\n return r0hN(int.__lt__)",
"def qfB5(YKHO):\n return YKHO._max",
"def max(YKHO) -> qe4Y.Input[int]:\n return qe4Y.get(YKHO, 'max... | [
"0.82954454",
"0.81974316",
"0.7996817",
"0.797404",
"0.78951424",
"0.7878407",
"0.7878407",
"0.7877468",
"0.78691196",
"0.7838583",
"0.7678307",
"0.7661671",
"0.7661671",
"0.765726",
"0.764877",
"0.76332706",
"0.7630812",
"0.76256377",
"0.76256377",
"0.76157844",
"0.7575633"... | 0.0 | -1 |
Query memory given an input embedding | def xDcj(YKHO, xDcj, hT0M):
if YKHO.added_memories == 0:
return None
if xDcj.dim() == 1:
xDcj.unsqueeze_(0)
or8S, TaUL = YKHO.get_nearest_entries_ixs(xDcj, hT0M)
return {'embedding': YKHO.memory_embeddings[or8S], 'label': YKHO.memory_labels[or8S], 'age': YKHO.memory_age[or8S], 'relevance... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ocQg(WbAn, jXxl, q4ee):\n wjQX = ZylS.Variable(ZylS.random_uniform((jXxl, q4ee), -1, 1))\n Q1PJ = ZylS.nn.embedding_lookup(wjQX, WbAn)\n return Q1PJ",
"def ocQg(WbAn, jXxl, q4ee):\n qF7n = ZylS.Variable(initial_value=ZylS.random_uniform([jXxl, q4ee], -1.0, 1.0))\n Q1PJ = ZylS.nn.embedding_look... | [
"0.63078344",
"0.63063365",
"0.5960762",
"0.5928939",
"0.58945125",
"0.58742183",
"0.58714825",
"0.5823085",
"0.5794332",
"0.5751944",
"0.56750214",
"0.5587403",
"0.55768526",
"0.557125",
"0.5565566",
"0.5550268",
"0.5541789",
"0.5470685",
"0.5447556",
"0.54236406",
"0.540829... | 0.6070764 | 3 |
Query memory given an input embedding | def xDcj(YKHO, xDcj, hT0M):
if YKHO.added_memories == 0:
return None
if xDcj.dim() == 1:
xDcj.unsqueeze_(0)
or8S, TaUL = YKHO.get_nearest_entries_ixs(xDcj, hT0M)
return {'embedding': YKHO.memory_embeddings[or8S], 'label': YKHO.memory_labels[or8S], 'age': YKHO.memory_age[or8S], 'relevance... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ocQg(WbAn, jXxl, q4ee):\n wjQX = ZylS.Variable(ZylS.random_uniform((jXxl, q4ee), -1, 1))\n Q1PJ = ZylS.nn.embedding_lookup(wjQX, WbAn)\n return Q1PJ",
"def ocQg(WbAn, jXxl, q4ee):\n qF7n = ZylS.Variable(initial_value=ZylS.random_uniform([jXxl, q4ee], -1.0, 1.0))\n Q1PJ = ZylS.nn.embedding_look... | [
"0.63078344",
"0.63063365",
"0.5960762",
"0.5928939",
"0.58945125",
"0.58742183",
"0.58714825",
"0.5823085",
"0.5794332",
"0.5751944",
"0.56750214",
"0.5587403",
"0.55768526",
"0.557125",
"0.5565566",
"0.5550268",
"0.5541789",
"0.5470685",
"0.5447556",
"0.54236406",
"0.540829... | 0.6070764 | 2 |
Ensure a date with no hours / minutes is retuned as a date. | def YR4Q(YKHO):
from sosbeacon.utils import format_datetime
_c1T = qcWV(year=2012, month=8, day=30)
ERVO = format_datetime(_c1T)
YKHO.assertEqual('08/30/12', ERVO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fX1c(Csk6):\n if isinstance(Csk6, J0YV):\n return _c1T(year=Csk6.year, month=Csk6.month, day=Csk6.day)\n else:\n return Csk6",
"def wZoB(BWXx):\n return _c1T(year=BWXx[0], month=BWXx[1], day=1)",
"def oZbG(BWXx: Union[Date, DateTime, str], **B2fa: int) -> Qrp8:\n return Z93Q(BWXx,... | [
"0.70018554",
"0.6946764",
"0.685827",
"0.6737637",
"0.6687125",
"0.66750145",
"0.65934587",
"0.64681107",
"0.64442796",
"0.6383153",
"0.6327889",
"0.6267114",
"0.62509316",
"0.6243825",
"0.61947256",
"0.61693084",
"0.6164787",
"0.61503243",
"0.6149337",
"0.6140435",
"0.61300... | 0.0 | -1 |
Ensure a date with minutes but no hours is retuned as a datetime. | def Z7He(YKHO):
from sosbeacon.utils import format_datetime
_c1T = qcWV(year=2012, month=8, day=30, hour=0, minute=13)
ERVO = format_datetime(_c1T)
YKHO.assertEqual('08/30/12 00:13', ERVO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cRDg(YKHO):\n from sosbeacon.utils import format_datetime\n _c1T = qcWV(year=2012, month=8, day=30, hour=19, minute=0)\n ERVO = format_datetime(_c1T)\n YKHO.assertEqual('08/30/12 19:00', ERVO)",
"def Z93Q(NZQz: AnyDatetime) -> qcWV.datetime:\n if isinstance(NZQz, qcWV.datetime):\n retur... | [
"0.694124",
"0.6576329",
"0.6497878",
"0.63341737",
"0.6285057",
"0.60327333",
"0.59235966",
"0.5857965",
"0.58377993",
"0.5830965",
"0.57997185",
"0.57975805",
"0.575214",
"0.5735291",
"0.5732054",
"0.57108104",
"0.5695891",
"0.5693779",
"0.5690543",
"0.5684678",
"0.56797",
... | 0.64184 | 3 |
Ensure a date with hours but no minutes is retuned as a datetime. | def cRDg(YKHO):
from sosbeacon.utils import format_datetime
_c1T = qcWV(year=2012, month=8, day=30, hour=19, minute=0)
ERVO = format_datetime(_c1T)
YKHO.assertEqual('08/30/12 19:00', ERVO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z7He(YKHO):\n from sosbeacon.utils import format_datetime\n _c1T = qcWV(year=2012, month=8, day=30, hour=0, minute=13)\n ERVO = format_datetime(_c1T)\n YKHO.assertEqual('08/30/12 00:13', ERVO)",
"def Z93Q(NZQz: AnyDatetime) -> qcWV.datetime:\n if isinstance(NZQz, qcWV.datetime):\n retur... | [
"0.68381727",
"0.6782348",
"0.6598675",
"0.6525046",
"0.6244653",
"0.6082294",
"0.6023994",
"0.6016812",
"0.6003925",
"0.59741217",
"0.5968216",
"0.5952586",
"0.59485435",
"0.5870531",
"0.586283",
"0.5861185",
"0.58541614",
"0.58484566",
"0.58302844",
"0.5829411",
"0.5792652"... | 0.6744739 | 2 |
Ensure a missing date returns the empty string. | def pF8y(YKHO):
from sosbeacon.utils import format_datetime
ERVO = format_datetime(None)
YKHO.assertEqual('', ERVO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i5dM(YKHO, d7pR, li6g=0):\n try:\n JRYC = qcWV.strptime(d7pR, '%d %b %Y')\n return JRYC\n except ValueError:\n raise ValueError(f'US42 - Illegitimate date of {d7pR}. GEDCOM line: {li6g}')\n else:\n return 'NA'",
"def cXxn(YKHO):\n Aofo = YKHO.client.get('/search?origin... | [
"0.66881824",
"0.6186882",
"0.61217904",
"0.61152357",
"0.60820913",
"0.6069122",
"0.6046784",
"0.60390896",
"0.60354966",
"0.602315",
"0.59958637",
"0.59915537",
"0.5989876",
"0.59784245",
"0.5972851",
"0.5956638",
"0.5951182",
"0.5942427",
"0.59409153",
"0.59297127",
"0.591... | 0.69573593 | 0 |
Returns the ROS time in seconds | def m7L9(Emd4):
wzkt = sQC5.Time.now()
return wzkt.secs + wzkt.nsecs * 10 ** (-9) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CCCh():\n return KmQs.russ_gettime()",
"def m7L9(YKHO):\n return YKHO.get_timed() / 10.0",
"def XT_3(YKHO):\n return int(round(ITS7.time()))",
"def Vj41():\n return ITS7.time()",
"def m7L9(YKHO) -> float:\n YKHO.rocket.update()\n return YKHO.rocket.time",
"def eO3_(YKHO):\n retur... | [
"0.75012565",
"0.72696334",
"0.704129",
"0.704039",
"0.70382655",
"0.69805497",
"0.6978949",
"0.6969247",
"0.69403255",
"0.69107735",
"0.6896041",
"0.6878848",
"0.685984",
"0.67993206",
"0.67879426",
"0.6787236",
"0.67727417",
"0.6743631",
"0.6704049",
"0.6703564",
"0.6699629... | 0.7948383 | 0 |
Calculate the distance in km between two points given in decimal degrees. Uses Haversine formula, i.e. assuming perfectly spherical earth | def ILZY(QltI, T4Nx):
igSk, GgQG, TGuP, tk0B = map(epAf.radians, QltI + T4Nx)
H91H = tk0B - GgQG
n_9K = TGuP - igSk
jzdc = epAf.sin(n_9K / 2) ** 2 + epAf.cos(igSk) * epAf.cos(TGuP) * epAf.sin(H91H / 2) ** 2
Z9rn = 2 * epAf.asin(epAf.sqrt(jzdc))
return 6371 * Z9rn | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GeVo(igSk, GgQG, TGuP, tk0B):\n GgQG, igSk, tk0B, TGuP = map(Y_1E, [GgQG, igSk, tk0B, TGuP])\n H91H = tk0B - GgQG\n n_9K = TGuP - igSk\n jzdc = YUNn(n_9K / 2) ** 2 + YhSR(igSk) * YhSR(TGuP) * YUNn(H91H / 2) ** 2\n Z9rn = 2 * P099(PZyS(jzdc))\n q5XV = 6367 * Z9rn\n return q5XV",
"def xQSI... | [
"0.7997606",
"0.79383963",
"0.7895904",
"0.78638697",
"0.7796029",
"0.77701026",
"0.77680063",
"0.77678233",
"0.77571",
"0.7750529",
"0.7741123",
"0.77320206",
"0.7727604",
"0.7691649",
"0.7687481",
"0.76833457",
"0.7681609",
"0.7681609",
"0.7670106",
"0.7646074",
"0.76412785... | 0.0 | -1 |
Check if uuid_to_test is a valid UUID. | def dSab(ZBt2, DpZH=4):
try:
GZSO = S7kj(ZBt2, version=DpZH)
except ValueError:
return False
return str(GZSO) == ZBt2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dSab(ZBt2, DpZH=4):\n try:\n GZSO = S7kj(ZBt2, version=DpZH)\n return True\n except:\n return False",
"def gD9s(qxeD):\n try:\n DwRD = S7kj(qxeD, version=4)\n except ValueError:\n return False\n return str(DwRD) == qxeD",
"def Flfh(YKHO, qxeD):\n kUBT = ... | [
"0.8684954",
"0.8333081",
"0.8155957",
"0.80367714",
"0.8028158",
"0.79428333",
"0.77374667",
"0.7734152",
"0.7734152",
"0.76239145",
"0.7593849",
"0.7555792",
"0.7149705",
"0.71090436",
"0.69526494",
"0.6922901",
"0.66879606",
"0.66867393",
"0.66619414",
"0.6655981",
"0.6640... | 0.8562131 | 1 |
This function tests a board for a winner and returns a value between 0 and 5 | def CY45(UM87):
Ylbp = 3
pOJF = 0
KIE3 = 0
for YRbF in UM87:
for r845 in YRbF:
if r845 == 0:
Ylbp = 0
elif r845 == 1:
pOJF += 1
elif r845 == 2:
KIE3 += 1
if Ylbp == 0:
if jNNc(UM87, 1) == []:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b7La(iBIi):\n bHVe = 0\n for oyg0 in [1, 2]:\n if SWd8(iBIi, oyg0) or rrCa(iBIi, oyg0) or STXT(iBIi, oyg0):\n bHVe = oyg0\n if oyIN.all(iBIi != 0) and bHVe == 0:\n bHVe = -1\n return bHVe",
"def f7Dd(iBIi):\n ufJO = bHVe(iBIi)\n if ufJO == EcVT:\n return 1\n ... | [
"0.8226638",
"0.7735134",
"0.7697947",
"0.7688143",
"0.76567584",
"0.7635804",
"0.7614953",
"0.76082647",
"0.76045525",
"0.7571411",
"0.7569988",
"0.7560676",
"0.7552569",
"0.7549131",
"0.7542866",
"0.75107414",
"0.7508619",
"0.75054234",
"0.7480221",
"0.7479761",
"0.747914",... | 0.76951003 | 3 |
Yields pairs from an iterable. | def kgDL(OxJJ):
AOBR = None
for ZfUD in OxJJ:
jvSB = ZfUD
if AOBR is not None:
yield (AOBR, jvSB)
AOBR = jvSB | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R2Yl(OxJJ):\n if isinstance(OxJJ, GySg):\n OxJJ = OxJJ.items()\n return iter(OxJJ)",
"def kgDL(yv6U):\n for YRbF in range(1, len(yv6U), 2):\n yield (yv6U[YRbF - 1], yv6U[YRbF])",
"def Zu14(OxJJ):\n jzdc = iter(OxJJ)\n return DMWo(jzdc, jzdc)",
"def kgDL(yv6U):\n YRbF = ite... | [
"0.81223637",
"0.7461575",
"0.7307938",
"0.7271222",
"0.714917",
"0.7142806",
"0.7133279",
"0.7094758",
"0.70062834",
"0.6977689",
"0.6964083",
"0.6942506",
"0.6933127",
"0.6882018",
"0.6859719",
"0.68461996",
"0.6843346",
"0.6843346",
"0.6843346",
"0.6824935",
"0.6753879",
... | 0.77604663 | 1 |
Returns the current date. That means every time the project is deployed, the datestamp will update. Returns a formatted date object, ala "Friday Feb. 20" | def cV9T(eXeU):
yo7_ = _c1T.today()
return yo7_.strftime('%A %B %d') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m6Z7():\n return qcWV.datetime.today().strftime(uwaB.DATE_FORMAT)",
"def DeyU() -> str:\n return qcWV.now().strftime('%Y-%m-%d')",
"def m6Z7(FMLJ='%Y-%m-%d'):\n return qcWV.datetime.now().strftime(FMLJ)",
"def slWZ():\n wzkt = qcWV.now()\n _c1T = wzkt.strftime('%Y%m%d')\n return _c1T",
... | [
"0.7824893",
"0.7507471",
"0.7391598",
"0.73774505",
"0.73269105",
"0.7283762",
"0.72370684",
"0.7218445",
"0.7215881",
"0.71713823",
"0.7162151",
"0.7127916",
"0.7113581",
"0.71124613",
"0.71002764",
"0.70509845",
"0.7046391",
"0.702825",
"0.6980741",
"0.69473976",
"0.694374... | 0.6653718 | 41 |
return ngrams as single spaceseparated strings with their occurences | def NMoC(YKHO, exwG):
SQ3m = [' '.join(Oa1e) for Oa1e in pCSA(YKHO.words, exwG)]
return LzVI(SQ3m) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JzP5(YKHO, H6GT):\n\n def tbgJ(IqQl, exwG):\n return zip(*[IqQl[YRbF:] for YRbF in range(exwG)])\n pCSA = []\n s2mk = H6GT.split()\n for zNig in range(1, YKHO._ngram_range + 1):\n SqIz = tbgJ(s2mk, zNig)\n UY2d = ['_'.join(wpEK) for wpEK in SqIz]\n pCSA.extend(UY2d)\n ... | [
"0.78278804",
"0.76701784",
"0.76432234",
"0.7412483",
"0.7388992",
"0.7383285",
"0.7343278",
"0.7261323",
"0.725827",
"0.7243522",
"0.72036326",
"0.7154389",
"0.7147983",
"0.71211857",
"0.71205693",
"0.70832944",
"0.70656013",
"0.70451486",
"0.70400804",
"0.6991556",
"0.6975... | 0.64976317 | 52 |
lemmatize words in noun_phrases, exclude phrases with `STOPWORDS` | def nnLc(YKHO):
e1T3 = [set(Ltnc(gmS1(XP5J).words.lemmatize())) for XP5J in YKHO.blob.noun_phrases]
return [' '.join(XP5J) for XP5J in e1T3 if not vDyF.intersection(XP5J)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sAwM(YKHO):\n A1xJ = []\n for GIN8 in YKHO.words:\n dhx_ = X1AK.lemmatize(GIN8, pos='v')\n A1xJ.append(dhx_)\n YKHO.words = A1xJ\n return YKHO",
"def YQi3(YKHO, V22M):\n LkXt = GFnk()\n A1xJ = []\n for GIN8 in V22M:\n dhx_ = LkXt.lemmatize(GIN8, pos='n')\n A1x... | [
"0.73897773",
"0.73393244",
"0.72585356",
"0.7244815",
"0.71327686",
"0.69146174",
"0.68672264",
"0.68209785",
"0.6816726",
"0.6812039",
"0.6789802",
"0.6779173",
"0.67476636",
"0.6746864",
"0.6731405",
"0.6731262",
"0.67183787",
"0.6701651",
"0.66856176",
"0.66856176",
"0.66... | 0.8088282 | 0 |
Given a ManagedProcess protobuf instance, create the corresponding ProcessNode and insert it into the graph. | def g5gD(YKHO, dIGz):
Q6kx = J6st(dIGz)
if Q6kx.name not in YKHO.nodes:
YKHO.nodes[Q6kx.name] = Q6kx
YKHO.logger.info('Created node for [{}]'.format(Q6kx.name))
else:
YKHO.logger.error('Detected request to add a managed process using the name [{}] which is already taken'.format(Q6kx.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SieP(mWFP, C9U5):\n NBjn = jWM8(mWFP)\n pths.session.add(NBjn)\n pths.session.commit()\n for XP5J in C9U5:\n QWcs = a5qf(NBjn.id, XP5J[0], XP5J[1], XP5J[2])\n pths.session.add(QWcs)\n pths.session.commit()\n return NBjn",
"def aBjj(YKHO, type, mWFP=None, GPtr=None):\n asser... | [
"0.6773554",
"0.64495486",
"0.60057384",
"0.5933061",
"0.5871152",
"0.58102006",
"0.5744983",
"0.57229316",
"0.5719331",
"0.56770027",
"0.5667292",
"0.5577523",
"0.5570289",
"0.55650806",
"0.55393213",
"0.55308384",
"0.5441535",
"0.5393277",
"0.5389408",
"0.5335206",
"0.52840... | 0.7839599 | 0 |
Sends a 401 response that enables basic auth | def NLCy():
return oGir('Could not verify your access level for that URL.\nYou have to login with proper credentials', 401, {'WWW-Authenticate': 'Basic realm="Login Required"'}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NLCy():\n return oGir('Not Authorized', 401, {'WWW-Authenticate': 'Basic realm=\"api\"'})",
"def NLCy():\n return oGir('', 401, {'WWW-Authenticate': 'Basic realm=\"Login Required\"'})",
"def NLCy():\n return oGir('You have to login with proper credentials', 401, {'WWW-Authenticate': 'Basic realm=\... | [
"0.8093736",
"0.80926424",
"0.7958403",
"0.7852648",
"0.7843114",
"0.7824419",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
"0.7810746",
... | 0.774767 | 34 |