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 |
|---|---|---|---|---|---|---|
Sets default values for the object. | def G_hU(YKHO, RZyL):
if RZyL:
YKHO.letters = WErR.LETTERS
YKHO.word_constructions = WErR.WORD_CONSTRUCTIONS
YKHO.word_sizes = WErR.WORD_SIZES
YKHO.sentence_sizes = WErR.SENTENCE_SIZES
YKHO.paragraph_sizes = WErR.PARAGRAPH_SIZES
YKHO.punctuation_midline = WErR.PUNCTUA... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def G_hU(YKHO):\n for G1Hx, Ty9i in YKHO.DEFAULTS.items():\n if not getattr(YKHO, G1Hx, None):\n setattr(YKHO, G1Hx, Ty9i)",
"def GfX1(YKHO):\n Ylbp = YKHO.__obj.setdefaults()\n if Ylbp != 0:\n Aofo, tO9_ = YKHO.__getlasterror(Ylbp)\n raise xxyF(piss(Ylbp), tO9_)",
"def... | [
"0.79113126",
"0.776834",
"0.7531978",
"0.73837537",
"0.7346018",
"0.7205495",
"0.7124789",
"0.7029042",
"0.6950056",
"0.6884912",
"0.6884912",
"0.6884912",
"0.6821938",
"0.6803345",
"0.676307",
"0.6750649",
"0.6750649",
"0.673596",
"0.67225254",
"0.66957563",
"0.66957563",
... | 0.6298108 | 55 |
Take a character and add it to the relevant ProbabilitySet. | def RtAj(YKHO, bseI):
if bseI in KoG3:
YKHO.letters.add(bseI)
elif bseI in YKHO.MATCHED_PUNCTUATION:
d6pt = YKHO.MATCHED_PUNCTUATION.find(bseI)
if d6pt % 2 != 0:
return
H5ew = YKHO.MATCHED_PUNCTUATION[d6pt:d6pt + 2]
YKHO.punctuation_matched.add(H5ew)
elif ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Jt5I(YKHO, hcXw):\n YKHO.guessedChars.append(hcXw)",
"async def character(YKHO, OaeV, bseI=None):\n if bseI.lower() in [Z9rn.lower() for Z9rn in YKHO.characters]:\n return await OaeV.send(f'`ERROR: Duplicate Character` {bseI} is already added.')\n KSei = Z67T.create_character(bseI.capitalize(... | [
"0.6437056",
"0.59943604",
"0.58539104",
"0.5816475",
"0.5519025",
"0.5466264",
"0.5197941",
"0.5180241",
"0.5177656",
"0.5129904",
"0.5105205",
"0.50422406",
"0.50342023",
"0.50062567",
"0.50062567",
"0.49946484",
"0.49736342",
"0.49531725",
"0.49469993",
"0.4945008",
"0.488... | 0.49474654 | 18 |
Gets the device data. | def nPrm(YKHO):
return YKHO.content | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def get_device_data(YKHO):\n pass",
"def yLtf(YKHO):\n YKHO._send_command(YKHO._adapter.get_data())",
"def yLtf(YKHO):\n return WSqu(bus=YKHO.bus, address=YKHO.address)",
"def ObKV(YKHO, KAfx):\n return YKHO.read_data(KAfx)",
"def wIX3(YKHO):\n Z9rn = RZs0(YKHO.host, YKHO.username, YKH... | [
"0.85546774",
"0.74737453",
"0.7421417",
"0.72829604",
"0.72538984",
"0.7214651",
"0.721224",
"0.7165726",
"0.7165726",
"0.7162357",
"0.7146811",
"0.7146811",
"0.71413344",
"0.712045",
"0.7034801",
"0.7034801",
"0.7034801",
"0.7016369",
"0.7016369",
"0.7016369",
"0.7016369",
... | 0.0 | -1 |
Customizable logic to determine whether the data should be refreshed. By default, this returns False. Consumers can set `refresh_always` to True or assign their own function that takes a singleargument (the last reponse) and returns a boolean. | def HOYI(YKHO):
return YKHO.refresh_always or pb5Q.should_refresh_client_fnc(YKHO.response) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _s4n(geh0):\n return not geh0",
"def B8TE(YKHO):\n if not YKHO._is_cache_enabled():\n return False\n N8Pq = ITS7.time() - YKHO._last_ts\n return N8Pq > YKHO._refresh_interval_sec",
"def brjo(YKHO):\n return YKHO._auto_refresh",
"def eWZe(YKHO, CR4h: Request, qmX3: float=None) -> boo... | [
"0.7081736",
"0.64856315",
"0.64296556",
"0.6410178",
"0.6032431",
"0.6032431",
"0.60149574",
"0.58555883",
"0.5756816",
"0.57453173",
"0.57453173",
"0.57453173",
"0.57453173",
"0.57453173",
"0.5710015",
"0.57030165",
"0.567462",
"0.56660634",
"0.56660634",
"0.56232643",
"0.5... | 0.73922545 | 0 |
Transform a word to camelCase. | def K1u_(GIN8, o4P_=False):
V22M = [WKvO.capitalize() or '_' for WKvO in GIN8.split('_')]
if not o4P_:
V22M[0] = V22M[0].lower()
return ''.join(V22M) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hr_R(GIN8):\n return ''.join((WKvO.capitalize() or '_' for WKvO in GIN8.split('_')))",
"def hr_R(GIN8):\n return ''.join((WKvO.capitalize() or '_' for WKvO in GIN8.split('_')))",
"def MDZz(V22M):\n l1kM = ''\n for GIN8 in V22M:\n if l1kM == '':\n l1kM = GIN8[:1].lower() + GIN8... | [
"0.79109997",
"0.79109997",
"0.7795171",
"0.7714735",
"0.7683873",
"0.7656575",
"0.7654179",
"0.7488696",
"0.7386074",
"0.73723394",
"0.7336169",
"0.7286182",
"0.7227418",
"0.72009003",
"0.71525687",
"0.7149686",
"0.71401083",
"0.71379423",
"0.7099917",
"0.7099433",
"0.708348... | 0.709428 | 20 |
Returns the time to wait before running this job. The returned value can be negative, indicating that the run should have already been started. If a run is very late, the returned negative value may not accurately represent how long ago the run should have started. | def yFDA(YKHO):
pQ4c, pZ68 = (YKHO.period, YKHO.last_start_time)
wzkt = wj6w()
if isinstance(pQ4c, FxIh):
suE3 = wzkt.replace(hour=pQ4c.hour, minute=10, second=0, microsecond=0)
Sm0u = (pQ4c.weekday - wzkt.isoweekday()) % 7
if Sm0u:
suE3 += fCoM(days=Sm0u)
if (pZ6... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MwCK(YKHO) -> int:\n tLtr = YKHO.get_next_timestamp()\n if tLtr is None:\n return max(0, YKHO.min_wait)\n return min((tLtr - wvEv.parse(YKHO.event['timestamp'])).seconds, YKHO.max_wait)",
"def aSPh(YKHO):\n if YKHO.job_started_at is not None:\n if YKHO.job_completed_at is not None:\... | [
"0.77566355",
"0.7449364",
"0.72762674",
"0.719089",
"0.7132132",
"0.7118637",
"0.70672184",
"0.6920451",
"0.69094855",
"0.68709403",
"0.6808784",
"0.678187",
"0.6755234",
"0.6697267",
"0.6665306",
"0.6609517",
"0.6555602",
"0.6546795",
"0.65352637",
"0.64738184",
"0.6473074"... | 0.7100557 | 6 |
Function to remove punctuations, stem words and finally convert the text into lower case | def nLwS(Emd4, l5Ny: str) -> str:
y_3X = l5Ny.translate(str.maketrans('', '', vIwR.punctuation)).lower()
P26x = dFss(y_3X)
vJg6 = []
for GIN8 in P26x:
vJg6.append(wgQP.stem(GIN8))
vJg6.append(' ')
return ''.join(vJg6) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Xosv(l5Ny):\n return VVVf(UZ5j(l5Ny))",
"def NkkI(l5Ny):\n pdSH = dict(((ord(hcXw), None) for hcXw in vIwR.punctuation))\n return RAD4(Dhdw.word_tokenize(l5Ny.lower().translate(pdSH)))",
"def MXOF(KCHu: str) -> str:\n KCHu = KCHu.translate(str.maketrans('', '', vIwR.punctuation))\n KCHu = Zb... | [
"0.8196806",
"0.78944397",
"0.7856684",
"0.78247017",
"0.7714756",
"0.76489437",
"0.76489437",
"0.7587302",
"0.7584339",
"0.75777483",
"0.75670075",
"0.7516437",
"0.75076956",
"0.7506685",
"0.7483201",
"0.74531823",
"0.7430232",
"0.7362402",
"0.73271775",
"0.73247397",
"0.730... | 0.7090709 | 35 |
Returns true if file is a known media extension. This list is selfmaintained. | def H2Ty(nUeQ):
return nUeQ.lower().endswith(CXbU) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _0TC(Fst3: str) -> bool:\n return Y1M_(Fst3) is not None",
"def zBCQ(YKHO, Ux0P):\n return any((Ux0P.endswith(YBcr) for YBcr in YKHO.config['document-extensions']))",
"def HCde(vC9B):\n if '.mpeg' in str(vC9B):\n return 1\n else:\n return 0",
"def pT8a(YKHO, Ux0P):\n Fst3 = U... | [
"0.7715759",
"0.7290552",
"0.7252331",
"0.7247137",
"0.7134413",
"0.70900923",
"0.703342",
"0.7006105",
"0.7005341",
"0.6998105",
"0.6968491",
"0.69278425",
"0.6858323",
"0.6823715",
"0.68025523",
"0.6800015",
"0.6790841",
"0.67759055",
"0.67607844",
"0.6729701",
"0.6699359",... | 0.8435781 | 0 |
Returns true if file is a known subtitle extension. This list is selfmaintained. | def SNPT(nUeQ):
return nUeQ.lower().endswith(aA7k) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zc6t(YKHO, Ux0P):\n if Ux0P is None:\n return False\n return Ux0P.split('.')[-1].lower() in YKHO.extensions",
"def zBCQ(YKHO, Ux0P):\n return any((Ux0P.endswith(YBcr) for YBcr in YKHO.config['document-extensions']))",
"def pT8a(YKHO, Ux0P):\n Fst3 = Ux0P.rsplit('.', 1)[1]\n return Fst... | [
"0.725117",
"0.71732587",
"0.69373",
"0.69332296",
"0.6831451",
"0.67917275",
"0.67758065",
"0.6760962",
"0.6631628",
"0.663049",
"0.6602128",
"0.6560397",
"0.6558565",
"0.65360624",
"0.6481933",
"0.6469865",
"0.6469865",
"0.64661765",
"0.64196044",
"0.64022356",
"0.63865197"... | 0.84408325 | 0 |
Returns true if file is a known manga file extension. This list is selfmaintained. | def qCsK(nUeQ):
return nUeQ.lower().endswith(ZZ7l) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pT8a(YKHO, Ux0P):\n Fst3 = Ux0P.rsplit('.', 1)[1]\n return Fst3 in xql6.supported_extensions",
"def zc6t(YKHO, Ux0P):\n if Ux0P is None:\n return False\n return Ux0P.split('.')[-1].lower() in YKHO.extensions",
"def auR8(knSv):\n global im_ext_\n for eS2V in drzG:\n if knSv.l... | [
"0.7768693",
"0.75858337",
"0.74395084",
"0.7438519",
"0.74237555",
"0.73428005",
"0.7329734",
"0.7262043",
"0.71752834",
"0.7127566",
"0.7086381",
"0.7047793",
"0.70406044",
"0.70379883",
"0.7032205",
"0.7007886",
"0.70009905",
"0.6985098",
"0.6908625",
"0.6896287",
"0.68942... | 0.8054451 | 0 |
Find the documents whose attribute values have the closest date to the query date. The date field field is indexed as 'keyword' to enable use of this similarity metric. | def pTp6(H8H8, z7fU, upAO, NXpY, WMj5):
po8D = {'script_score': {'query': {'exists': {'field': H8H8}}, 'script': {'params': {'attrib': H8H8, 'origin': z7fU, 'scale': NXpY, 'offset': '0', 'decay': WMj5, 'weight': upAO}, 'source': 'decayDateExp(params.origin, params.scale, params.offset, params.decay, doc[params.attr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XJhD(YKHO, A97Q, *qIxc, **B2fa):\n exwG = B2fa.get('n', 5)\n cjUO = B2fa.get('distance_threshold', 0.4)\n TaUL = []\n gGD8 = YKHO.vectorizer.transform([A97Q])\n for YRbF in range(YKHO.vectors.shape[0]):\n Ayfi = gKk5(gGD8, YKHO.vectors[YRbF])\n if Ayfi[0] > cjUO:\n TaUL.... | [
"0.55266094",
"0.55023867",
"0.53997016",
"0.5353275",
"0.5253669",
"0.5195839",
"0.5052103",
"0.5045156",
"0.50290847",
"0.49706817",
"0.4961016",
"0.49455598",
"0.4920742",
"0.48854512",
"0.48792627",
"0.4833882",
"0.4785057",
"0.47798833",
"0.47738934",
"0.47621465",
"0.47... | 0.6085392 | 0 |
Vertices are equivalent if they are sufficiently close. Use the "is" operator to test if they are identical. | def xa14(YKHO, Elif):
return abs(YKHO.x - Elif.x) + abs(YKHO.y - Elif.y) < Yegm.epsilon | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E3Zh(YKHO, hQHm, jlSq, SGf8=1e-08):\n if abs(hQHm[0] - jlSq[0]) > SGf8:\n return False\n if abs(hQHm[1] - jlSq[1]) > SGf8:\n return False\n if abs(hQHm[2] - jlSq[2]) > SGf8:\n return False\n return True",
"def pH3P(LWvH: List[np.ndarray], ovLg: List[np.ndarray]) -> bool:\n ... | [
"0.7453717",
"0.72692144",
"0.7005311",
"0.6835252",
"0.6734327",
"0.6692228",
"0.6658585",
"0.6639025",
"0.6619329",
"0.661404",
"0.65609276",
"0.6522427",
"0.65069145",
"0.6498356",
"0.6480899",
"0.6462569",
"0.6453289",
"0.6429027",
"0.64131904",
"0.64131904",
"0.6385622",... | 0.74623466 | 0 |
Returns the hidden units of this LSTM. | def Zode(YKHO):
return YKHO._hidden | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PBQt():\n Lh1F = list(map(int, SGPK.HYPER_PARAMS.hidden_units.split(',')))\n if SGPK.HYPER_PARAMS.layer_sizes_scale_factor > 0:\n N7LA = Lh1F[0]\n SnCn = SGPK.HYPER_PARAMS.layer_sizes_scale_factor\n CLda = SGPK.HYPER_PARAMS.num_layers\n Lh1F = [max(2, int(N7LA * SnCn ** YRbF))... | [
"0.7207112",
"0.6767588",
"0.6767588",
"0.6764774",
"0.673488",
"0.67207533",
"0.66979086",
"0.66979086",
"0.66210943",
"0.65917397",
"0.64599586",
"0.634236",
"0.6336924",
"0.6326442",
"0.627039",
"0.6241771",
"0.62320715",
"0.61960256",
"0.6159398",
"0.6156961",
"0.6156961"... | 0.5680201 | 56 |
Assigns to the hidden units of this LSTM. | def Zode(YKHO, BWXx):
if BWXx is not None:
BWXx.get_shape().assert_is_compatible_with(YKHO._output_shape)
YKHO._hidden = BWXx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l6ZH(YKHO, rYO3):\n YKHO.hidden_units.append(rYO3)",
"def MP8d(YKHO, Ep8u, begE):\n if YKHO.mode == 'LSTM':\n return (ht2j.ones((1 + YKHO.bidirectional, Ep8u, YKHO.hidden_dim), device=begE), ht2j.ones((1 + YKHO.bidirectional, Ep8u, YKHO.hidden_dim), device=begE))\n else:\n return ht2j.... | [
"0.70018655",
"0.65942407",
"0.65757746",
"0.65757746",
"0.6498418",
"0.6498418",
"0.64616543",
"0.6407301",
"0.6398214",
"0.6325727",
"0.6319952",
"0.6297466",
"0.6297466",
"0.62516034",
"0.62516034",
"0.62516034",
"0.62516034",
"0.62516034",
"0.62516034",
"0.62516034",
"0.6... | 0.58051866 | 48 |
Returns the cell units of this LSTM. | def VmPb(YKHO):
return YKHO._cell | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _nDu(YKHO):\n return str(YKHO._modeler.GetModelUnits())",
"def rYO3(YKHO):\n return YKHO._units",
"def rYO3(YKHO):\n return YKHO._units",
"def wPGm(YKHO):\n return _VfD.Compartment_getUnits(YKHO)",
"def rYO3(YKHO):\n pass",
"def b82i(YKHO):\n return YKHO._units",
"def ZPDW(YKHO):\... | [
"0.7405619",
"0.7378982",
"0.7378982",
"0.7116993",
"0.70852137",
"0.70472515",
"0.6907479",
"0.6865392",
"0.68638694",
"0.68318707",
"0.6808857",
"0.67885274",
"0.67645055",
"0.67587507",
"0.67471164",
"0.6735788",
"0.6690739",
"0.6654465",
"0.6653194",
"0.6643801",
"0.66433... | 0.0 | -1 |
This is home page | def kZiy(QePW):
u7Th = Z5Dc.objects.first()
for bGrB in Z5Dc.objects.all():
if bGrB.customer_price > u7Th.customer_price:
u7Th = bGrB
return _1tc(QePW, 'core/index.html', {'products': msfn.objects.all(), 'latest': msfn.objects.first(), 'big_sale': u7Th}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kZiy(QePW):\n return _1tc(QePW, 'compta/home.html')",
"def kZiy():\n return TvZl('index.html', title='Home Page', year=qcWV.now().year)",
"def kZiy():\n return TvZl('home_page.html')",
"def kZiy():\n return TvZl('home.html', title='Home Page', year=qcWV.now().year)",
"def kZiy():\n retur... | [
"0.86175734",
"0.8544187",
"0.85058725",
"0.84684956",
"0.84201914",
"0.83735985",
"0.8364351",
"0.83584195",
"0.83513796",
"0.83238906",
"0.8323269",
"0.83168477",
"0.83031785",
"0.83031785",
"0.83031785",
"0.83031785",
"0.83031785",
"0.83031785",
"0.83031785",
"0.83031785",
... | 0.0 | -1 |
This is to check if the email entered on the form is already existing | def KStv(QePW):
D3lj = QePW.POST.get('email')
XnWo = mv1M.objects.filter(email=D3lj).exists()
if XnWo:
return igJ6(True)
else:
return igJ6(False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PGGO(L03z, Jyyj):\n if mv1M.select().where(mv1M.email == Jyyj.data).exists():\n raise sUXu('A user with that E-mail already exists.')",
"def Bt7w(L03z, Jyyj):\n if mv1M.query.filter_by(email=L03z.email.data).first():\n L03z.email.errors.append('Email already associated with account!')\n ... | [
"0.76347697",
"0.7629023",
"0.7594589",
"0.7559888",
"0.7533228",
"0.752166",
"0.7465833",
"0.7465089",
"0.73603636",
"0.73602974",
"0.73001945",
"0.72843295",
"0.7282299",
"0.7262615",
"0.7246313",
"0.72427374",
"0.72328043",
"0.7227731",
"0.72234446",
"0.7185513",
"0.717102... | 0.6613285 | 57 |
Construct a full path to a TFRecord file to be stored in the data_directory. Will also ensure the data directory exists | def rNI2(uRIH: str, mWFP: str) -> str:
if not Hy7s.path.isdir(uRIH):
Hy7s.makedirs(uRIH)
return Hy7s.path.join(uRIH, '{}.tfrecords'.format(mWFP)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qmzz(G8MP: str='', cmvh: Optional[str]=None) -> str:\n QhE0 = cmvh or ''\n return vcs0(pmON.join(G8MP, rR2t, QhE0))",
"def JAUl(tETI):\n return Hy7s.path.join(tETI, 'pokemon.tfrecord')",
"def AVKf(*Ux0P):\n import os\n return eH5C(os.path.join(oEge, *Ux0P))",
"def zTNP():\n return Hy7s.... | [
"0.70185626",
"0.6525818",
"0.65037584",
"0.64261127",
"0.64106345",
"0.6286697",
"0.62441295",
"0.6237005",
"0.6170105",
"0.61235625",
"0.61235625",
"0.61235625",
"0.6091769",
"0.60649973",
"0.60647696",
"0.6057862",
"0.6057388",
"0.60410446",
"0.599134",
"0.5973309",
"0.596... | 0.7803677 | 0 |
Create a Int64List Feature | def Oety(BWXx: int) -> ZylS.train.Features.FeatureEntry:
return ZylS.train.Feature(int64_list=ZylS.train.Int64List(value=[BWXx])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Oety(BWXx):\n BWXx = rOXd(BWXx)\n return ZylS.train.Feature(int64_list=ZylS.train.Int64List(value=BWXx))",
"def Oety(BWXx):\n return ZylS.train.Feature(int64_list=ZylS.train.Int64List(value=[int(Ty9i) for Ty9i in BWXx]))",
"def Oety(BWXx):\n return ZylS.train.Feature(int64_list=ZylS.train.Int64... | [
"0.83878964",
"0.8369726",
"0.836711",
"0.8360846",
"0.8324094",
"0.83171684",
"0.83171684",
"0.8310096",
"0.8310096",
"0.8310096",
"0.8297459",
"0.8297459",
"0.8283516",
"0.8283516",
"0.8283516",
"0.8283516",
"0.827969",
"0.827969",
"0.827969",
"0.827969",
"0.827969",
"0.8... | 0.7979693 | 44 |
Returns a float representing the crawl delay specified for this user agent, or None if the crawl delay was unspecified or not a float. | def dDeS(YKHO, Lb1u):
if ovrz < 3 and (not isinstance(Lb1u, QMSQ)):
Lb1u = Lb1u.decode()
for D_63 in YKHO.__rulesets:
if D_63.does_user_agent_match(Lb1u):
return D_63.crawl_delay
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dDeS(YKHO, VrxA='*'):\n vFZW = None\n try:\n vFZW = YKHO.rp.crawl_delay(useragent=VrxA)\n bo34.info('Crawl delay is %s' % vFZW)\n except Exception as e:\n bo34.error('get_crawl_delay:\\n%s' % tTpl)\n if not vFZW:\n return 4\n return vFZW",
"def __e8(YKHO):\n h7D2... | [
"0.77960306",
"0.63386637",
"0.62997276",
"0.6232375",
"0.61948",
"0.6143157",
"0.6143157",
"0.60890985",
"0.6088594",
"0.6088594",
"0.60790205",
"0.595705",
"0.59461033",
"0.5936903",
"0.58981216",
"0.5835806",
"0.5829424",
"0.5766042",
"0.5766042",
"0.5766042",
"0.5766042",... | 0.7142257 | 1 |
Determine if the named feature is enabled for the current request. If the feature has no override in the database, it will default to False. Features must be documented, and an UnknownFeatureError will be thrown if an undocumented feature is interrogated. When the internal cache is empty, it will automatically load the... | def etR_(YKHO, mWFP):
if mWFP not in NDOe:
raise F0Kv('{0} is not a valid feature name'.format(mWFP))
if not YKHO._cache:
YKHO.load()
return YKHO._cache[mWFP] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n30Z(YKHO, RDhP):\n if RDhP in YKHO._disabled:\n return False\n if RDhP in YKHO._enabled:\n return True\n return YKHO.default_enabled is True",
"def nrOS(YKHO, RDhP):\n return YKHO.is_enabled(RDhP)",
"def NPo2(YKHO, RDhP):\n bySB = YKHO.features\n if bySB is None:\n r... | [
"0.6690882",
"0.6646818",
"0.61427927",
"0.6095452",
"0.6087122",
"0.5996685",
"0.59492666",
"0.58852005",
"0.5782755",
"0.5782755",
"0.5782394",
"0.5782394",
"0.5782394",
"0.5782394",
"0.5718162",
"0.5718162",
"0.5718162",
"0.5718162",
"0.5701245",
"0.56945777",
"0.56353956"... | 0.7392259 | 0 |
Remove old feature flags from the database on startup. | def zjdz(tvqc):
if 'H_SCRIPT' in Hy7s.environ:
return
brq2()
Kh6j.commit() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def brq2():\n d6AQ = set(NDOe) | set(XTMj)\n ILLq = V_n5.query.filter(RyuO.not_(V_n5.name.in_(d6AQ)))\n UHFx = ILLq.delete(synchronize_session=False)\n if UHFx > 0:\n RKD7.info('removed %d old/unknown feature flags from database', UHFx)",
"def l40M():\n TMAJ = CFMy()\n with Po4F.dict(L_C... | [
"0.7830818",
"0.60210323",
"0.59815943",
"0.593286",
"0.5920289",
"0.58938146",
"0.5876648",
"0.5871416",
"0.5839587",
"0.58393186",
"0.57996804",
"0.579703",
"0.5795434",
"0.57841665",
"0.5746831",
"0.5744737",
"0.5671682",
"0.56663114",
"0.5662509",
"0.5660765",
"0.56586766... | 0.7267699 | 1 |
x y = 2 x (y/2), if y is even x y = x + 2 x (y/2), if y is odd | def wTxu(WKvO, LVAh):
if LVAh == 1:
return WKvO
a1PO = wTxu(WKvO, LVAh >> 1)
a1PO *= 2
if LVAh & 1:
a1PO += WKvO
return a1PO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hxx9(WKvO, LVAh):\n ncql = (WKvO + LVAh) / LVAh\n return ncql",
"def sG0r(WKvO):\n if C_CQ(WKvO):\n WKvO += exwG\n return WKvO // 2 % exwG",
"def kYZq(YKHO, WKvO):\n return WKvO % 2",
"def kYZq(WKvO):\n return WKvO % 2 != 0",
"def ubP8(WKvO):\n return WKvO % 2 == 0",
"def ... | [
"0.7994391",
"0.7377836",
"0.7197594",
"0.7083101",
"0.69985926",
"0.6888534",
"0.6752689",
"0.67415154",
"0.67125684",
"0.67055327",
"0.6698801",
"0.6681415",
"0.6652178",
"0.66503036",
"0.6628694",
"0.6623073",
"0.65621513",
"0.6560653",
"0.653861",
"0.64981854",
"0.6484753... | 0.0 | -1 |
Checks whether or not the given context is from an admin. | def _Kb1(OaeV) -> bool:
return NCls.user(OaeV.author).is_admin | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dLqG(QpfX):\n if not QpfX:\n qmLP.warn(bGrB('Use of empty request context is deprecated'), DeprecationWarning)\n raise Exception('die')\n return QpfX.is_admin",
"def dLqG(QpfX):\n if not QpfX:\n qmLP.warn(bGrB('Use of empty request context is deprecated'), DeprecationWarning)\n ... | [
"0.86990875",
"0.86990875",
"0.86990875",
"0.85682356",
"0.84782094",
"0.8324588",
"0.82164264",
"0.7774166",
"0.76384264",
"0.76384264",
"0.7605712",
"0.75500697",
"0.74654675",
"0.74615836",
"0.74223846",
"0.73787975",
"0.73736405",
"0.73587173",
"0.73031425",
"0.72948384",
... | 0.8055054 | 7 |
Determines if given datetime object is set to midnight. | def xQrG(JRYC):
return JRYC.hour == 0 and JRYC.minute == 0 and (JRYC.second == 0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def niXe(yo7_):\n if isinstance(yo7_, qcWV):\n if yo7_.day == 1 and yo7_.month == 1:\n return True\n elif yo7_.day == 1 and yo7_.month == 4:\n return True\n elif yo7_.day == 1 and yo7_.month == 7:\n return True\n elif yo7_.day == 1 and yo7_.month == 1... | [
"0.6316294",
"0.6185327",
"0.6185327",
"0.60319597",
"0.5906638",
"0.59025776",
"0.5823405",
"0.5798733",
"0.57395375",
"0.5674077",
"0.56247437",
"0.5597596",
"0.5577019",
"0.5562061",
"0.5554642",
"0.5542466",
"0.5540736",
"0.552818",
"0.5467706",
"0.54512024",
"0.5443104",... | 0.8336064 | 0 |
Inicializa y carga lista de stopwords desde el path recibido | def FIMM(YKHO, vs9Z):
Io6r = open(vs9Z, 'r', encoding='utf-8')
YKHO.stp_wrds = [zFiD.strip() for zFiD in Io6r]
Io6r.close() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ScxC():\n with open('../data/stop_words.txt', 'r') as LYwR:\n return LYwR.read().split()",
"def NibK():\n global _stopword_set\n if CXIi:\n return CXIi\n knSv = 'stopword.list'\n if Hy7s.path.isfile(knSv):\n Ylbp = set()\n with open(knSv) as eHNT:\n for z... | [
"0.70847505",
"0.7051989",
"0.69990194",
"0.699775",
"0.6894505",
"0.6890229",
"0.68880403",
"0.6702198",
"0.6643121",
"0.661804",
"0.6568817",
"0.6564261",
"0.63946927",
"0.63723576",
"0.63657683",
"0.6362664",
"0.6362664",
"0.62694436",
"0.62655616",
"0.6248142",
"0.6236767... | 0.7769529 | 0 |
Remueve las stopwords dentro de un cuerpo de texto. | def bXoU(YKHO, UfhV):
w2fL = Dhdw.tokenize
Vo9i = w2fL.word_tokenize(UfhV)
vQzc = []
for uvWR in Vo9i:
if uvWR not in YKHO.stp_wrds:
vQzc.append(uvWR)
XWJv = ''
for YRbF in range(len(vQzc)):
if vQzc[YRbF] in vIwR.punctuation:
XWJv = XWJv.strip() + vQzc[YRb... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aUcs(l5Ny):\n l5Ny = ' ' + l5Ny\n l5Ny = l5Ny.upper()\n for GIN8 in jMRN:\n l5Ny = l5Ny.replace(GIN8.upper(), ' ')\n return l5Ny",
"def wkDh(YKHO):\n s2mk = str(YKHO.doc).split()\n zLya = [eOtH for eOtH in s2mk if eOtH.lower() not in YKHO.stopword_list]\n YKHO.doc = ' '.join(zLya)... | [
"0.8186614",
"0.8167427",
"0.80849475",
"0.80665344",
"0.80609053",
"0.7961596",
"0.7913977",
"0.7758668",
"0.77576387",
"0.77263385",
"0.7659319",
"0.76445484",
"0.7564671",
"0.7508944",
"0.74831736",
"0.74475497",
"0.7446147",
"0.7437394",
"0.7379602",
"0.736228",
"0.728529... | 0.72882515 | 20 |
Function to create a linked list | def rm5c(IqQl):
if len(IqQl) == 0:
return None
sdCG = igy8(IqQl[0])
RvYZ = sdCG
HhSp = None
for YRbF in range(1, len(IqQl)):
if RvYZ.value is not None:
HhSp = RvYZ
RvYZ = igy8(IqQl[YRbF])
HhSp.next = RvYZ
return sdCG | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rm5c(IqQl):\n sdCG = None\n for BWXx in IqQl:\n if sdCG is None:\n sdCG = o7DN(BWXx)\n else:\n kMLo = sdCG\n while kMLo.next:\n kMLo = kMLo.next\n kMLo.next = o7DN(BWXx)\n return sdCG",
"def uwhX():\n CLNC = _sfu()\n CLNC... | [
"0.77214336",
"0.75695115",
"0.73824114",
"0.7363659",
"0.7302192",
"0.73002917",
"0.7205697",
"0.7196152",
"0.7162771",
"0.71372133",
"0.705602",
"0.7041141",
"0.7028409",
"0.6987021",
"0.6983965",
"0.69128084",
"0.6884512",
"0.6869112",
"0.67818743",
"0.6706874",
"0.6663436... | 0.7513225 | 2 |
Returns a string containing the name of the Pepper C type for |type_|. If array is True, returns the name of an array of |type_|. If optional is True, returns the name of an optional |type_|. If both array and optional are True, returns the name of an optional array of |type_|. | def fT7N(YKHO, kN9s, qw7D=False, CYSX=False):
if isinstance(kN9s, C3ST.Function) or kN9s.property_type in (C3ST.PropertyType.OBJECT, C3ST.PropertyType.ENUM):
return YKHO._FormatPpapiTypeName(qw7D, CYSX, '_'.join((P5EI.Classname(KCHu) for KCHu in YKHO._NameComponents(kN9s))), namespace=P5EI.Classname(YKHO._n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zh8B(u2uV):\n if isinstance(u2uV, (list, tuple)):\n if len(u2uV) > 1:\n return ', '.join([WKvO.__name__ for WKvO in u2uV[:-1]]) + ' or ' + u2uV[-1].__name__\n return u2uV[0].__name__\n return u2uV.__name__",
"def l87X(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, ... | [
"0.6798284",
"0.6208575",
"0.61560285",
"0.6118705",
"0.603263",
"0.6015443",
"0.59415644",
"0.5903752",
"0.5857458",
"0.5834035",
"0.5829078",
"0.58240837",
"0.57987493",
"0.57529175",
"0.5741216",
"0.56974566",
"0.56773055",
"0.5657199",
"0.5656581",
"0.56545234",
"0.563576... | 0.64665055 | 1 |
Returns True if an optional |type_| is required. | def cUK7(YKHO, kN9s):
return YKHO._NameComponents(kN9s) in YKHO._optional_types | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fy_S(m5r4: str) -> bool:\n m5r4 = m5r4.strip()\n if not m5r4.startswith('pt:optional'):\n return False\n if not Xr6R(m5r4):\n return False\n if not ITzr(m5r4):\n return False\n yLsG = QEPK(m5r4)\n if len(yLsG) != 1:\n return False\n oPUJ = yLsG[0]\n return lJ... | [
"0.723862",
"0.6928058",
"0.6731056",
"0.6610195",
"0.64665216",
"0.6466331",
"0.63721937",
"0.63449675",
"0.6337248",
"0.6314173",
"0.6304244",
"0.6241088",
"0.6241088",
"0.62294996",
"0.6092895",
"0.608791",
"0.60751784",
"0.6070337",
"0.605822",
"0.6050811",
"0.6048762",
... | 0.85003793 | 0 |
Builds user object from json dictionary. | def jG8h(XVNM):
CBIr = mv1M()
CBIr.id = XVNM['id']
CBIr.first_name = XVNM['first_name']
CBIr.surname = XVNM['surname']
CBIr.full_name = '{} {}'.format(CBIr.first_name, CBIr.surname)
CBIr.email = XVNM['email']
CBIr.organisation = XVNM['organisation']
CBIr.roles = XVNM['roles']
CBIr.st... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jG8h(Emd4, qQXR, CBIr=None):\n if CBIr is None:\n CBIr = Emd4()\n CBIr.username = qQXR['username']\n CBIr.first_name = qQXR['first_name']\n CBIr.last_name = qQXR['last_name']\n CBIr.password = qQXR['password']\n return CBIr",
"def MITz(nPrm: Dict[Any, Any]) -> mv1M:\n return mv1M(... | [
"0.788263",
"0.77517813",
"0.6843238",
"0.6741426",
"0.6678272",
"0.66541845",
"0.6630228",
"0.65087795",
"0.6477479",
"0.6359624",
"0.63080406",
"0.6287949",
"0.6206536",
"0.62037516",
"0.61982036",
"0.6137657",
"0.61068296",
"0.6100292",
"0.60984886",
"0.6090608",
"0.608252... | 0.7691353 | 2 |
Logically compare two Firefox version strings. Split the string into pieces, and compare each piece numerically. Returns 1, 0, or 1 depending on whether a is less than, equal to, or greater than b. | def p337(jzdc, Fg_i):
if jzdc == Fg_i:
return 0
VqfF = [int(XP5J) for XP5J in jzdc.split('.')]
vI3f = [int(XP5J) for XP5J in Fg_i.split('.')]
vH0K = len(VqfF)
H6LQ = len(vI3f)
g2zq = vH0K
if H6LQ < g2zq:
g2zq = H6LQ
for YRbF in range(g2zq):
if VqfF[YRbF] < vI3f[YR... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jHFT(YKHO, jzdc, Fg_i):\n CHJY = '^[0-9]+\\\\.[0-9]+\\\\.[0-9]+$'\n if not ZbWC.search(CHJY, jzdc) or not ZbWC.search(CHJY, Fg_i):\n raise ValueError('input semver_greater_than not conforming to semver string with three components')\n JTgH = [int(WKvO) for WKvO in jzdc.split('.')]\n K9fJ = [... | [
"0.6895598",
"0.6743786",
"0.6740128",
"0.66319966",
"0.65628123",
"0.65443957",
"0.64480853",
"0.6446703",
"0.6441994",
"0.64305896",
"0.6421748",
"0.6416959",
"0.6401585",
"0.63995934",
"0.63389623",
"0.62862116",
"0.6275784",
"0.62654954",
"0.6259658",
"0.6259658",
"0.6194... | 0.7151355 | 0 |
Get the predicted taxid of a cluster | def jkEL(YKHO, hKn5, Vu16=None):
assert isinstance(hKn5, list)
assert isinstance(Vu16, dict)
BG3t, SOxW = YKHO.load_lineages(hKn5)
tk5Y = {'count': 0, 'c': {}, 'p': None}
pcsc = [0] * len(YKHO._ranks)
for YoW8 in BG3t:
Q6kx = tk5Y
for I7pb in Ni9Y(len(YKHO._ranks) - 1, 0, -1):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YEmv(YKHO, FMhG):\n return YKHO.find_closest(FMhG)[1].class_id",
"def YEmv(PBtk=None):\n if not PBtk:\n PBtk = gigf.generate_test_cases(1)[0]\n PBtk = oyIN.asarray(PBtk)\n PBtk = PBtk.reshape(1, -1)\n oC6w = k6eJ.load('training_data.pkl')\n print(oC6w.predict(PBtk))",
"def _Xe2(AU8... | [
"0.61873776",
"0.59227043",
"0.5879525",
"0.58381927",
"0.5827772",
"0.58084744",
"0.579759",
"0.579388",
"0.5715172",
"0.5692964",
"0.5692964",
"0.5692964",
"0.5692964",
"0.56203836",
"0.56029224",
"0.5600961",
"0.55800897",
"0.557896",
"0.5554138",
"0.5523848",
"0.55089825"... | 0.6975198 | 0 |
Converts a date/time to an ISO8601 date string | def Weve(ppPa):
assert not ppPa.utcoffset()
return ppPa.strftime('%Y-%m-%dT%H:%M:%S.%f') + 'Z' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Tj6b(_c1T):\n ZQoY = _c1T.strftime('%Y-%m-%dT%H:%M:%S')\n Nsvo = _c1T.strftime('%z')[0:1]\n e1jd = '%s:%s' % (_c1T.strftime('%z')[1:3], _c1T.strftime('%z')[3:5])\n return '{dateTimeStr}{tzsign}{timezone}'.format(dateTimeStr=ZQoY, tzsign=Nsvo, timezone=e1jd).replace(':', '%3A').replace('+', '%2B')",... | [
"0.74979764",
"0.74902165",
"0.7431974",
"0.7419218",
"0.7412657",
"0.7403743",
"0.7371318",
"0.7325647",
"0.7270622",
"0.7265942",
"0.71070457",
"0.7059399",
"0.70436025",
"0.70258117",
"0.7015273",
"0.6989766",
"0.6948633",
"0.69454974",
"0.6882652",
"0.68742526",
"0.682166... | 0.7737572 | 0 |
This function computes the Hamming distance between the two input strings. | def kzPA(j93S, Nqp_):
if j93S is None or Nqp_ is None:
return oyIN.NaN
if rLdf.isnull(j93S) or rLdf.isnull(Nqp_):
return oyIN.NaN
Tcon = vg0C.HammingDistance()
j93S = vlUL.convert_to_str_unicode(j93S)
Nqp_ = vlUL.convert_to_str_unicode(Nqp_)
return Tcon.get_raw_score(j93S, Nqp_) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AIZO(Y0Fj, Pb4f):\n rV1i = 0\n JoWv = len(Y0Fj)\n for YRbF in range(JoWv):\n if Y0Fj[YRbF] != Pb4f[YRbF]:\n rV1i = rV1i + 1\n return rV1i",
"def RkO6(Y0Fj, Pb4f):\n mDfF = 0\n for YRbF, P8oC in enumerate(Y0Fj):\n if P8oC != Pb4f[YRbF]:\n mDfF += 1\n re... | [
"0.87342846",
"0.86569554",
"0.864575",
"0.8600363",
"0.858226",
"0.84849864",
"0.84785",
"0.8473925",
"0.83067364",
"0.8301702",
"0.82530946",
"0.82253784",
"0.82091683",
"0.81999475",
"0.80688906",
"0.79166293",
"0.78850746",
"0.78613204",
"0.77716285",
"0.7766682",
"0.7750... | 0.81839216 | 14 |
This function computes the relative difference between two numbers | def E3QF(AjzU, _sQW):
if AjzU is None or _sQW is None:
return oyIN.NaN
if rLdf.isnull(AjzU) or rLdf.isnull(_sQW):
return oyIN.NaN
try:
AjzU = float(AjzU)
_sQW = float(_sQW)
except ValueError:
return oyIN.NaN
if AjzU == 0.0 and _sQW == 0.0:
return 0
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def by6d(_1qI, zDMu):\n return abs(_1qI - zDMu)",
"def YonT(Hkam, xfrN):\n return float((xfrN - Hkam) / Hkam * 100)",
"def E3QF(WKvO, LVAh, ord=2):\n return oyIN.linalg.norm(WKvO - LVAh, ord=ord) / oyIN.linalg.norm(LVAh, ord=ord)",
"def wncN(UXsi, c163):\n return 1 / (1.0 / UXsi - 1.0 / c163)",
... | [
"0.78438365",
"0.7366058",
"0.71686053",
"0.715922",
"0.6943712",
"0.68633705",
"0.68463707",
"0.6832445",
"0.68225986",
"0.68112576",
"0.67888916",
"0.6780808",
"0.6780808",
"0.67792785",
"0.6770976",
"0.6770976",
"0.6768049",
"0.67509234",
"0.67287207",
"0.6695316",
"0.6695... | 0.78984976 | 0 |
Basic dynamics of xdot = u + w X = [x, y, theta, v] U = [a, thetadot] | def bQ_W(YKHO, a1PO, WKvO, P6bq, yzQ0):
jzdc = P6bq[0]
OzY6 = P6bq[1]
q7In = WKvO[2]
Ty9i = WKvO[3]
yzQ0 = yzQ0 * YKHO.w_scale
return oyIN.array([Ty9i * oyIN.cos(q7In), Ty9i * oyIN.sin(q7In), OzY6, jzdc]) + oyIN.array([oyIN.cos(q7In) * yzQ0[0] - oyIN.sin(q7In) * yzQ0[1], oyIN.sin(q7In) * yzQ0[0]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kMz2(YKHO, WKvO, a1PO, P6bq):\n if YKHO.is_irrecoverable(ignore_force_check=True):\n return oyIN.concatenate([WKvO[3:], -100 * WKvO[3:]])\n olIi = YKHO._compute_omega_dot(WKvO, P6bq)\n return oyIN.concatenate([WKvO[3:], olIi])",
"def BJ1H(P6bq, Ty9i, yzQ0, jzdc, Fg_i):\n RlDC, TKB8 = P6bq\... | [
"0.7095485",
"0.67280114",
"0.6631565",
"0.6583655",
"0.6473879",
"0.64622515",
"0.6437646",
"0.6346359",
"0.6318589",
"0.6317359",
"0.6280072",
"0.62792444",
"0.6275815",
"0.62749016",
"0.6229366",
"0.6229271",
"0.6220608",
"0.6207483",
"0.6186498",
"0.616053",
"0.61565715",... | 0.8511646 | 0 |
Load the data in the file as YAML, then deserialize into the model with the schema | def jnN0(YKHO, pmON):
with pmON.open('r') as nVrR:
nPrm = f9B0(nVrR)
YKHO.set_all(**YKHO.SCHEMA.load(nPrm).data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f9B0(IznC, uPxI=None):\n with open(IznC) as Ga6V:\n nPrm = eJb6.safe_load(Ga6V.read())\n if uPxI:\n import jsonschema\n jsonschema.validate(nPrm, schema=uPxI)\n return nPrm",
"def f9B0():\n y3cF = Hy7s.path.join(rnJd, 'ff_data.yaml')\n with open(y3cF, 'r') as wOb_:\n ... | [
"0.7052859",
"0.6938935",
"0.6663248",
"0.66504115",
"0.6547714",
"0.65372574",
"0.6492213",
"0.6489156",
"0.6478954",
"0.6426492",
"0.642378",
"0.6408891",
"0.63940364",
"0.63902265",
"0.63423324",
"0.6328812",
"0.6247367",
"0.6204342",
"0.61898434",
"0.6164526",
"0.6142374"... | 0.70614487 | 0 |
Starts the webdriver (dls if needed) and returns it. | def FM0M(zlwC=False) -> cSpz.Chrome:
X8hU.install()
xAU6 = cSpz.ChromeOptions()
xAU6.headless = zlwC
xAU6.add_experimental_option('excludeSwitches', ['enable-logging'])
return cSpz.Chrome(options=xAU6) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qez4(YKHO) -> cSpz:\n if YKHO.driver is None:\n return TWLF.run_chromedriver()\n return YKHO.driver",
"def aDzh():\n try:\n if len(HwRy.argv) > 1:\n if jJDz._driver is None:\n uh1m = lE6K()\n uh1m.add_argument('--headless')\n uh1m... | [
"0.7084599",
"0.6941087",
"0.6816508",
"0.67303175",
"0.658199",
"0.65801823",
"0.65406185",
"0.6523861",
"0.65219396",
"0.65053314",
"0.65053314",
"0.64913964",
"0.6454579",
"0.6397404",
"0.6382118",
"0.6368231",
"0.6346839",
"0.6334337",
"0.6273411",
"0.6243833",
"0.6226587... | 0.6257622 | 19 |
Return datetime with necessary twint formatting | def V2LE() -> qcWV.strftime:
wzkt = qcWV.now()
XRk0 = wzkt - fCoM(minutes=30)
vHj7 = XRk0.strftime('%Y-%m-%d %H:%M:%S')
return vHj7 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zb98(YKHO, nPrm):\n nPrm = Gfg6(nPrm)\n if YKHO.datetime_formatting == 'rfc-2822':\n return Zb98(nPrm)\n return nPrm.isoformat()",
"def jT2f() -> qcWV.datetime:\n return qcWV.datetime.now()",
"def Zb98(JRYC):\n return V8MO.format(Gfg6(JRYC), 'r')",
"def Wq7q(YKHO, JRYC):\n if RlM... | [
"0.7101346",
"0.709166",
"0.70681345",
"0.69130504",
"0.68483335",
"0.6827547",
"0.68235683",
"0.68001056",
"0.67996854",
"0.67662156",
"0.67649925",
"0.6669421",
"0.66533226",
"0.662465",
"0.66046804",
"0.656051",
"0.65203434",
"0.65191424",
"0.6514996",
"0.64962417",
"0.647... | 0.61613846 | 71 |
Returns average of all stored heart rates for user since some time if given | def fxbA(YKHO, Wz69=None):
try:
import numpy as oyIN
except ImportError as e:
print('Necessary import failed: {}'.format(tTpl))
return None
gqtN = oyIN.array(YKHO.heart_rate)
if Wz69 is not None:
Jlxv = oyIN.array([])
for d6pt, mVUw in enumerate(gqtN):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eNQ9():\n import statistics as aevO\n from tach_detect import tach_detect\n Mkmy = QePW.get_json()\n try:\n D3lj = Mkmy['user_email']\n except KeyError:\n return (pz3A('no email input'), 400)\n raise LookupError('no email input')\n WIr9 = RoUp(D3lj)\n if WIr9.user_exis... | [
"0.7452025",
"0.72157973",
"0.71164423",
"0.68806595",
"0.6503524",
"0.648473",
"0.63955784",
"0.6392288",
"0.63793623",
"0.63394165",
"0.622651",
"0.62148166",
"0.6195902",
"0.614133",
"0.61285305",
"0.60863906",
"0.60718745",
"0.60439956",
"0.59818286",
"0.59671843",
"0.594... | 0.75091505 | 0 |
Compares given heart rate to calculated tachycardia range based on age of user | def E0Ut(YKHO, gqtN):
IDsK = YKHO.tachycardic_range()
return gqtN > IDsK | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KPXh(gWiH, ZJe_):\n if ZJe_ <= 2 / 365:\n if gWiH > 159:\n nXET = True\n else:\n nXET = False\n elif ZJe_ <= 6 / 365:\n if gWiH > 166:\n nXET = True\n else:\n nXET = False\n elif ZJe_ <= 3 / 52:\n if gWiH > 182:\n ... | [
"0.7398071",
"0.72204703",
"0.69691634",
"0.66293794",
"0.59498596",
"0.56704354",
"0.5597344",
"0.5525531",
"0.5506919",
"0.54604435",
"0.54198134",
"0.5403759",
"0.53974295",
"0.5394925",
"0.5381238",
"0.53441626",
"0.5324112",
"0.52596605",
"0.5242152",
"0.5221587",
"0.515... | 0.5055697 | 35 |
Determines lower bound for tachycardia given age of User | def ZRWA(YKHO):
YKHO.adjust_age()
if YKHO.age_units == 'day':
if YKHO.age <= 2:
return 159
elif YKHO.age <= 6:
return 166
elif YKHO.age_units == 'week':
return 182
elif YKHO.age_units == 'month':
if YKHO.age <= 2:
return 179
eli... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def B_3E(YKHO):\n if YKHO.age < 0 & YKHO.age >= 3:\n YKHO.age_range = '1-3'\n if YKHO.age >= 4 & YKHO.age <= 8:\n YKHO.age_range = '4-8'\n if YKHO.age >= 9 & YKHO.age <= 13:\n YKHO.age_range = '9-13'\n if YKHO.age >= 14 & YKHO.age <= 18:\n YKHO.age_range = '14-18'\n if YK... | [
"0.662293",
"0.63977665",
"0.637395",
"0.61643904",
"0.61416554",
"0.61267847",
"0.61246365",
"0.607577",
"0.60466456",
"0.60255307",
"0.59957397",
"0.59957397",
"0.59515685",
"0.595111",
"0.59409004",
"0.5940497",
"0.59309125",
"0.5921905",
"0.5916597",
"0.59147346",
"0.5910... | 0.6890343 | 0 |
Check is current user is post's author | def m4il(YKHO, QePW, tTee, YEnM):
if QePW.method in M_tO:
return True
return YEnM.author == QePW.user | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Iw6c(YKHO):\n m8z6 = YKHO.get_object()\n if YKHO.request.user == m8z6.author:\n return True\n return False",
"def Iw6c(YKHO):\n m8z6 = YKHO.get_object()\n if YKHO.request.user == m8z6.author:\n return True\n return False",
"def Iw6c(YKHO):\n m8z6 = YKHO.get_object()\n ... | [
"0.80038464",
"0.80038464",
"0.80038464",
"0.796662",
"0.7854536",
"0.7854536",
"0.78025186",
"0.72946584",
"0.71438634",
"0.709326",
"0.6963413",
"0.6963413",
"0.6937156",
"0.6879236",
"0.68672705",
"0.6850146",
"0.68334633",
"0.6752733",
"0.66836405",
"0.6623497",
"0.662070... | 0.65593725 | 22 |
Check is current user not a post author | def m4il(YKHO, QePW, tTee, YEnM):
if QePW.user.is_authenticated:
return YEnM.author != QePW.user
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Iw6c(YKHO):\n m8z6 = YKHO.get_object()\n if YKHO.request.user == m8z6.author:\n return True\n return False",
"def Iw6c(YKHO):\n m8z6 = YKHO.get_object()\n if YKHO.request.user == m8z6.author:\n return True\n return False",
"def Iw6c(YKHO):\n m8z6 = YKHO.get_object()\n ... | [
"0.74935424",
"0.74935424",
"0.74935424",
"0.74569714",
"0.72762245",
"0.72762245",
"0.70809954",
"0.7062695",
"0.679221",
"0.6767452",
"0.66439694",
"0.6595933",
"0.65019596",
"0.6484669",
"0.64813435",
"0.64813435",
"0.64530545",
"0.6415335",
"0.64117104",
"0.62986076",
"0.... | 0.6459719 | 16 |
Return a list of comments relaited to post | def Tj1O(YKHO, QePW, _sei=None):
m8z6 = YKHO.get_object()
Tj1O = jY1u.objects.filter(post=m8z6).order_by('created_at')
ZMzz = W8M2(Tj1O, many=True)
return oGir(ZMzz.data, jGRS.HTTP_200_OK) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C5sy(m8z6):\n Tj1O = jY1u.objects.all().filter(post=m8z6).order_by('-published')\n wrdL = FAtY.objects.all().filter(post=m8z6).order_by('published')\n aN3A = list()\n if Tj1O:\n for aM_I in Tj1O:\n yX4E = dict()\n yX4E['author'] = wGBK(aM_I.author)\n yX4E['co... | [
"0.7933662",
"0.7580084",
"0.72869974",
"0.7130854",
"0.71116847",
"0.7075892",
"0.7057774",
"0.701222",
"0.6956028",
"0.6911711",
"0.6910088",
"0.69061166",
"0.69061166",
"0.68957275",
"0.6878161",
"0.6851139",
"0.6831488",
"0.68124086",
"0.68124086",
"0.68124086",
"0.677959... | 0.70599663 | 6 |
Calculate rolling average from a column. We apply mean for each values of a specific column within the range of last week date and date itself | def vgYo(_c1T, jQ3Z, iVRZ):
csKG = qcWV.strftime(qcWV.strptime(_c1T, '%Y-%m-%d') - fCoM(days=6), '%Y-%m-%d')
return jQ3Z[(jQ3Z['date'] >= csKG) & (jQ3Z['date'] <= _c1T)].mean()[iVRZ].mean().round(0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CJhE(jQ3Z, ABDL, dYNY, GzF1, iVRZ):\n jQ3Z = jQ3Z.sort_values(by=['date'])\n jQ3Z = jQ3Z.reset_index(drop=True)\n jQ3Z['date_7days_ago'] = jQ3Z['date'].apply(lambda WKvO: qcWV.strftime(qcWV.strptime(WKvO, '%Y-%m-%d') - fCoM(days=7), '%Y-%m-%d'))\n jQ3Z['mean'] = jQ3Z['date'].apply(lambda WKvO: vgYo... | [
"0.7191205",
"0.7113405",
"0.7069829",
"0.69824106",
"0.6897152",
"0.67890257",
"0.6559756",
"0.64659315",
"0.6439951",
"0.64124846",
"0.64092994",
"0.6393626",
"0.6359574",
"0.61933124",
"0.61762893",
"0.6158098",
"0.6112367",
"0.6096859",
"0.6073577",
"0.5938104",
"0.586631... | 0.79241586 | 0 |
getter for size Returns thee width of Rectangle setter validates same as Rectangle's attributes setter sets width and height | def zNig(YKHO):
return YKHO.width | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FA0d(YKHO):\n x7Ls.reset_objects()\n J1b4 = _UKz(1, 2, 2, 3)\n YKHO.assertEqual(J1b4.size, 1)",
"def m8C1(YKHO):\n x7Ls.reset_objects()\n J1b4 = _UKz(1, 2, 2, 3)\n YKHO.assertEqual(J1b4.size, 1)\n J1b4.size = 100\n YKHO.assertEqual(J1b4.size, 100)",
"def zNig(YKHO, BWXx):\n YKHO.... | [
"0.734276",
"0.7205998",
"0.7125906",
"0.7124103",
"0.7121435",
"0.7013606",
"0.70032203",
"0.69812363",
"0.69812363",
"0.69812363",
"0.69812363",
"0.69812363",
"0.69812363",
"0.69812363",
"0.6974362",
"0.6974362",
"0.6881332",
"0.6848292",
"0.68293625",
"0.67739934",
"0.6738... | 0.6829797 | 18 |
Initial w & b will be set to be randomized, (mean, sd) = (0, 1). In the future maybe need to be enable to set user's initial w & b. | def VvpB(YKHO):
YKHO.w = oyIN.append(YKHO.iniW, YKHO.iniB) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vfX0(YKHO, JBMS=0, z2bo=1):\n YKHO.slp_weights = oyIN.random.normal(JBMS, z2bo, size=(YKHO.n_rbfs, YKHO.n_targets))",
"def sIsp():\n KiuJ.set_states({'v_th': oyIN.random.normal(x_eT, x_eT * mulP, E3D9)})\n o4sw.set_states({'w': oyIN.random.normal(sIfp, sIfp * mulP, ywwl * E3D9), 'w_min': oyIN.random... | [
"0.6921931",
"0.66863215",
"0.66731817",
"0.6559594",
"0.6518764",
"0.6325679",
"0.6285662",
"0.62785685",
"0.6272078",
"0.624063",
"0.61963147",
"0.61382467",
"0.6137038",
"0.6127892",
"0.6124035",
"0.6104662",
"0.6078483",
"0.60777825",
"0.6056588",
"0.6050402",
"0.6047216"... | 0.0 | -1 |
Filter this queryset to select status objects as of status_date. | def xDJ1(YKHO, c65Y: datetime.date) -> ZYvt:
return YKHO.model._filter_queryset_status_as_of(YKHO, c65Y) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Msn6(Emd4, SR0I: QuerySet, c65Y: datetime.date, Kh6H: str='', _h7H: Literal(['queryset', 'q_obj'])='queryset') -> ZYvt:\n if Kh6H != '':\n Kh6H += '__'\n ywJe = T8ck(**{Kh6H + 'applies_from__lte': c65Y}) & (T8ck(**{Kh6H + 'applies_to__isnull': True}) | T8ck(**{Kh6H + 'applies_to__gt': c65Y}))\n ... | [
"0.664834",
"0.6547365",
"0.63360095",
"0.6248208",
"0.584044",
"0.57783943",
"0.57516164",
"0.566526",
"0.55965686",
"0.55448085",
"0.55358857",
"0.5526163",
"0.54578",
"0.5449902",
"0.5433801",
"0.5403676",
"0.53997964",
"0.5394545",
"0.5364103",
"0.5323609",
"0.5303084",
... | 0.8398093 | 0 |
Filter queryset to select status objects as of status_date. Can be used on querysets where the base object is not a subclass of StatusModel, in which case the django model path to the relevant StatusModel subclass should be provided in 'status_model_path'. e.g. StatusModel._filter_queryset_status_as_of(queryset = Invoi... | def Msn6(Emd4, SR0I: QuerySet, c65Y: datetime.date, Kh6H: str='', _h7H: Literal(['queryset', 'q_obj'])='queryset') -> ZYvt:
if Kh6H != '':
Kh6H += '__'
ywJe = T8ck(**{Kh6H + 'applies_from__lte': c65Y}) & (T8ck(**{Kh6H + 'applies_to__isnull': True}) | T8ck(**{Kh6H + 'applies_to__gt': c65Y}))
if _h7H ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xDJ1(YKHO, c65Y: datetime.date) -> ZYvt:\n return YKHO.model._filter_queryset_status_as_of(YKHO, c65Y)",
"def opN5(YKHO, SR0I, mWFP, BWXx):\n return SR0I.filter(status=BWXx)",
"def k66M(YKHO):\n B2fa = {}\n if YKHO.start_at:\n B2fa.update({'%s__gte' % YKHO.date_field: YKHO.start_at})\n ... | [
"0.74970436",
"0.6207123",
"0.60850483",
"0.5749448",
"0.5747517",
"0.5700742",
"0.563528",
"0.55883414",
"0.5555127",
"0.5464583",
"0.54423386",
"0.5425324",
"0.5415296",
"0.5364315",
"0.53392094",
"0.5288445",
"0.52402896",
"0.5209048",
"0.51790655",
"0.5161116",
"0.5143606... | 0.87326074 | 0 |
Add a new StatusModel record for an observed object. Any previously 'current' status (if one exists) is marked as ending the day prior to the new status, and the new status is added with no end date. If the prior status starts on the same day as the new status, the prior status is removed completely. | def T2TL(Emd4, Q74b: StatusModel):
XmeV = DUJO.atomic if not Lvsd() else jCn0
with XmeV():
if Q74b.applies_to is not None:
raise kWA1('Inserting a new status with non-blank "applies_to" not yet implemented')
tnIC = Q74b._get_observed_obj()
try:
YnnX = Emd4.objects... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sR6s(Q74b):\n eHNY = PvBj.get_timeline()\n d6pt = [eHNY.index(jGRS) for jGRS in eHNY if hfK9(jGRS['pubdate']) < hfK9(Q74b['pubdate'])]\n if len(d6pt) == 0:\n eHNY.insert(0, Q74b)\n else:\n eHNY.insert(d6pt[0], Q74b)\n if len(eHNY) > 1000:\n eHNY = eHNY[0:999]\n PI6f(PvBj.... | [
"0.58432233",
"0.53649807",
"0.52297235",
"0.5140238",
"0.50651693",
"0.50297964",
"0.50025034",
"0.49827248",
"0.49414158",
"0.49335182",
"0.49262938",
"0.49026427",
"0.4882126",
"0.48527563",
"0.48283255",
"0.48227394",
"0.47830966",
"0.4775569",
"0.4770164",
"0.47696376",
... | 0.76023984 | 0 |
an activation function which outputs the value between (0,1) | def m1Hg(EcVT, ffYW=False):
if ffYW:
return m1Hg(EcVT) * (1.0 - m1Hg(EcVT))
else:
return 1.0 / (1.0 + oyIN.exp(-EcVT)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YDYE(WKvO):\n return oyIN.maximum(0, WKvO)",
"def YDYE(WKvO):\n return 1 / (1 + ht2j.exp(-WKvO))",
"def v9B7(WKvO):\n jzdc = -1\n return 1 / (1 + oyIN.exp(-jzdc * WKvO))",
"def YDYE(epBp):\n return 1 / (1 + oyIN.exp(-epBp))",
"def YDYE(MKlR):\n if MKlR > 0:\n return 1\n else... | [
"0.81871647",
"0.81268454",
"0.80985284",
"0.8092218",
"0.7895913",
"0.7782559",
"0.7763995",
"0.7745626",
"0.76560044",
"0.76304865",
"0.7563744",
"0.7448612",
"0.74253803",
"0.73874706",
"0.73762214",
"0.73255867",
"0.73056066",
"0.7304794",
"0.72955924",
"0.7286714",
"0.72... | 0.0 | -1 |
an activation function which outputs the value between (1,1) | def madw(EcVT):
if isinstance(EcVT, oyIN.ndarray):
return 2.0 / (1.0 + oyIN.exp(-(2 * EcVT))) - 1
else:
EcVT = oyIN.array(EcVT)
return madw(EcVT) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YDYE(WKvO):\n return oyIN.maximum(0, WKvO)",
"def YDYE(WKvO):\n return 1 / (1 + ht2j.exp(-WKvO))",
"def v9B7(WKvO):\n jzdc = -1\n return 1 / (1 + oyIN.exp(-jzdc * WKvO))",
"def YDYE(epBp):\n return 1 / (1 + oyIN.exp(-epBp))",
"def ECMu(YKHO, epBp):\n return 1.0 / (1.0 + oyIN.exp(-oyIN... | [
"0.81185746",
"0.8103764",
"0.8068882",
"0.7992871",
"0.77595955",
"0.7734101",
"0.771974",
"0.76860505",
"0.76188684",
"0.7604401",
"0.75070393",
"0.74875855",
"0.74425083",
"0.7411527",
"0.74002546",
"0.73841685",
"0.73841685",
"0.7334966",
"0.73050106",
"0.72710514",
"0.72... | 0.0 | -1 |
Reads source and target sequences from txt files. | def FIMM(YKHO, OZ2o, TwZd, p5ok, Fbpr, ZE1x, wzH_, D9kY, ShoO, yHil, QpEg, Y9tA, A7JQ, rZMj, xUIP, Ubjl):
YKHO.src_seqs = OZ2o
YKHO.trg_seqs = TwZd
YKHO.index_seqs = p5ok
YKHO.num_total_seqs = len(YKHO.src_seqs)
YKHO.src_word2id = Fbpr
YKHO.trg_word2id = ZE1x
YKHO.max_len = wzH_
YKHO.con... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uaX7(gY90, YB6w):\n c7pe = []\n x6A0 = []\n with qJi5.GFile(gY90, 'r') as Xf36:\n for zFiD in Xf36:\n c7pe.append(zFiD.rstrip('\\n'))\n with qJi5.GFile(YB6w, 'r') as Xf36:\n for zFiD in Xf36:\n x6A0.append(zFiD.rstrip('\\n'))\n _73Q = list(zip(c7pe, x6A0))\n ... | [
"0.7004346",
"0.6208018",
"0.61497456",
"0.6132846",
"0.6076196",
"0.60475314",
"0.6025892",
"0.5775756",
"0.56896174",
"0.5674089",
"0.5657116",
"0.56105125",
"0.5501782",
"0.5494425",
"0.5476749",
"0.5456228",
"0.54284465",
"0.54284143",
"0.5420703",
"0.5415088",
"0.5394724... | 0.0 | -1 |
Returns a list of sentences from a paragraph This is a rather naive implementation; there are probably better ones out there Assumes that the paragraph has proper punctuation. | def Y2KJ(HKwb):
pC3l = ZbWC.compile('[\\.!?]')
Rhv4 = [yAmx.strip() for yAmx in pC3l.split(HKwb)]
Rhv4 = filter(lambda WKvO: WKvO, Rhv4)
return Rhv4 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Rhv4(YKHO) -> x1iM[str]:\n return [yAmx for yAmx in ZbWC.split('(?<=[.!?])', YKHO.text)]",
"def Y2KJ(l5Ny):\n return l5Ny.split('.')",
"def lpha(l5Ny):\n A97Q = K9NE(l5Ny)\n Rhv4 = [WKvO.text_with_ws for WKvO in A97Q.sents]\n return Rhv4",
"def Rhv4(YKHO) -> x1iM[str]:\n return [YKHO.te... | [
"0.76229024",
"0.74522465",
"0.73308635",
"0.72472256",
"0.72472256",
"0.71657723",
"0.7106902",
"0.70726115",
"0.70445025",
"0.70266235",
"0.69980454",
"0.6881847",
"0.68521893",
"0.6851337",
"0.6841656",
"0.6837825",
"0.67499644",
"0.67206156",
"0.6693907",
"0.66668844",
"0... | 0.88997257 | 0 |
return True if this is an UPDATE operation. | def VEAD(YKHO) -> bool:
return YKHO.statement.is_dml and YKHO.statement.is_update | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VEAD(YKHO):\n return YKHO.action in ['update', 'partial_update']",
"def _IUh(YKHO):\n return YKHO._update_action",
"def zAjS(cuiw, rdlD):\n if NCls.check_for_older_ops(cuiw, rdlD):\n return False\n if NCls.check_for_pending_or_processing_ops(cuiw, rdlD.object_uuid, operation=wHGk.ODL_CRE... | [
"0.80514944",
"0.68959904",
"0.68557453",
"0.6854025",
"0.68472934",
"0.6791104",
"0.6708837",
"0.6699989",
"0.65150803",
"0.6434282",
"0.63465744",
"0.6344334",
"0.6336636",
"0.632303",
"0.6250073",
"0.6207",
"0.62066543",
"0.6184201",
"0.613155",
"0.6125278",
"0.6116963",
... | 0.8240323 | 0 |
Return True if the operation is refreshing columnoriented attributes on an existing ORM object. | def NWzF(YKHO) -> bool:
VKhi = YKHO._orm_compile_options()
return VKhi is not None and VKhi._for_refresh_state | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VEAD(YKHO) -> bool:\n return YKHO.statement.is_dml and YKHO.statement.is_update",
"def w3PF(YKHO, KAOR: object, z01Z: bool=True) -> bool:\n QTBn = EIp9(KAOR)\n if not QTBn.modified:\n return False\n fGC9 = QTBn.dict\n for hkS8 in QTBn.manager.attributes:\n if not z01Z and hasattr... | [
"0.6629238",
"0.62679005",
"0.62371886",
"0.60928726",
"0.6065252",
"0.5895536",
"0.5853559",
"0.5758199",
"0.5731893",
"0.5689342",
"0.5689342",
"0.56879103",
"0.56879103",
"0.56705713",
"0.56613517",
"0.5660778",
"0.5656837",
"0.5642546",
"0.5632726",
"0.562552",
"0.5582123... | 0.72165644 | 0 |
Return True if this load is loading objects on behalf of a relationship. This means, the loader in effect is either a LazyLoader, SelectInLoader, SubqueryLoader, or similar, and the entire SELECT statement being emitted is on behalf of a relationship load. Handlers will very likely not want to add any options to querie... | def XrhF(YKHO) -> bool:
VKhi = YKHO._orm_compile_options()
if VKhi is None:
return False
pmON = YKHO.loader_strategy_path
return pmON is not None and (not pmON.is_root) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uLvE(YKHO):\n return 'load' in YKHO.__class__.__dict__",
"def nyms(YKHO):\n return YKHO.requires_loaded_models",
"def qPgS(YKHO):\n return YKHO._momentary_follow_sense_prop.is_loaded and YKHO._momentary_mode_on_prop.is_loaded and YKHO._momentary_on_off_trigger_prop.is_loaded",
"def j7eD(YKHO, Bz... | [
"0.61518866",
"0.6142196",
"0.5921451",
"0.59201634",
"0.58543783",
"0.58315754",
"0.581896",
"0.5817962",
"0.57505995",
"0.57488155",
"0.574867",
"0.57023674",
"0.567425",
"0.5661016",
"0.5628691",
"0.5619242",
"0.5564777",
"0.55491865",
"0.55205286",
"0.5505779",
"0.5499632... | 0.80417824 | 0 |
Close out the transactional resources and ORM objects used by this | def DDI8(YKHO) -> None:
YKHO._close_impl(invalidate=False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HuIG(YKHO):\n if YKHO.__session is not None:\n YKHO._rollback()\n YKHO.__session.close()",
"def FFhn(YKHO):\n YKHO._orm_session.close()\n YKHO._db_transaction.rollback()\n YKHO._db_connection.close()\n YKHO._db_engine = None\n YKHO._db_connection = None\n YKHO._db_transacti... | [
"0.7748021",
"0.76051176",
"0.74547166",
"0.7376286",
"0.7350675",
"0.72431904",
"0.71759796",
"0.7152448",
"0.71482897",
"0.70926946",
"0.70919955",
"0.7059159",
"0.7049967",
"0.7033401",
"0.70193446",
"0.69770193",
"0.69692546",
"0.691628",
"0.6904176",
"0.68347526",
"0.683... | 0.0 | -1 |
Close this Session, using connection invalidation. | def kELS(YKHO) -> None:
YKHO._close_impl(invalidate=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DDI8(YKHO):\n YKHO.session.close()\n YKHO.session = None",
"def DDI8(YKHO):\n YKHO.__session.close()",
"def DDI8(YKHO):\n YKHO.__session.close()",
"def DDI8(YKHO):\n YKHO.__session.close()",
"def DDI8(YKHO):\n YKHO.__session.close()",
"def DDI8(YKHO):\n YKHO.__session.close()",
... | [
"0.80742514",
"0.80438524",
"0.80438524",
"0.80438524",
"0.80438524",
"0.80438524",
"0.80438524",
"0.7951826",
"0.7924638",
"0.7924638",
"0.7924638",
"0.7921705",
"0.78882855",
"0.7862392",
"0.7854252",
"0.7811027",
"0.77958727",
"0.7767702",
"0.7764065",
"0.7617149",
"0.7600... | 0.0 | -1 |
Flush all the object changes to the database. Writes out all pending object creations, deletions and modifications to the database as INSERTs, DELETEs, UPDATEs, etc. Operations are automatically ordered by the Session's unit of work dependency solver. Database operations will be issued in the current transactional cont... | def RFOL(YKHO, ei4T: Optional[Sequence[Any]]=None) -> None:
if YKHO._flushing:
raise f0Wp.InvalidRequestError('Session is already flushing')
if YKHO._is_clean():
return
try:
YKHO._flushing = True
YKHO._flush(ei4T)
finally:
YKHO._flushing = False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RFOL(YKHO):\n if not YKHO.is_active:\n return\n YKHO._orm_session.flush()",
"def RFOL(YKHO, YEnM=None):\n if YKHO.impl.db is None:\n return\n if YEnM is None:\n YKHO.uow.flush()\n else:\n aevO = QTBn(YEnM)\n if aevO.status == aevO.new:\n YKHO.inser... | [
"0.7843716",
"0.78038573",
"0.7351902",
"0.7191872",
"0.7152729",
"0.6979132",
"0.6927588",
"0.68423975",
"0.6799363",
"0.67682743",
"0.6751423",
"0.6713329",
"0.6673304",
"0.65490985",
"0.65426314",
"0.6481903",
"0.64765257",
"0.6473595",
"0.64652073",
"0.6461828",
"0.645061... | 0.6564672 | 13 |
The set of all persistent states considered dirty. This method returns all states that were modified including those that were possibly deleted. | def vBYu(YKHO) -> iu5r[P4QK[ImMB]]:
return YKHO.identity_map._dirty_states() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K5BR(YKHO) -> gVqG:\n return gVqG([QTBn.obj() for QTBn in YKHO._dirty_states if QTBn not in YKHO._deleted])",
"def wspz(YKHO):\n from copy import copy\n return copy(YKHO._states_)",
"def K43E(YKHO):\n return YKHO._states",
"def gPmN(YKHO):\n return set(YKHO.final_states)",
"def fqm3(YKHO... | [
"0.81482345",
"0.70150477",
"0.6917673",
"0.68806714",
"0.68650913",
"0.6763983",
"0.648369",
"0.6442556",
"0.6442415",
"0.6415415",
"0.6394742",
"0.6382415",
"0.6304089",
"0.62843317",
"0.6263013",
"0.6244383",
"0.6112895",
"0.60938674",
"0.6065263",
"0.60623515",
"0.6061572... | 0.8290956 | 0 |
The set of all persistent instances considered dirty. | def K5BR(YKHO) -> gVqG:
return gVqG([QTBn.obj() for QTBn in YKHO._dirty_states if QTBn not in YKHO._deleted]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vBYu(YKHO) -> iu5r[P4QK[ImMB]]:\n return YKHO.identity_map._dirty_states()",
"def Tcc6(YKHO):\n return set()",
"def Gn_7(YKHO):\n return True in [exwG.is_dirty for exwG in YKHO.nodes]",
"def IBo3(YKHO):\n return []",
"def ATAz(YKHO):\n Tin8 = []\n for H5ew, BWXx in YKHO.values.iterite... | [
"0.7383943",
"0.642375",
"0.6398122",
"0.63735354",
"0.6362377",
"0.61284876",
"0.60679007",
"0.60633314",
"0.60006493",
"0.5981661",
"0.59665096",
"0.5963429",
"0.5932468",
"0.5932468",
"0.5932468",
"0.5932468",
"0.5932468",
"0.5932468",
"0.59288013",
"0.591709",
"0.5893051"... | 0.7940066 | 0 |
Tests initialisation of Aquarius objects. | def as4H():
oLXZ = k8eV('http://something/api/v1/aquarius/assets')
assert oLXZ.url == 'http://something/api/v1/aquarius/assets/ddo', 'Different URL from the specified one.'
assert oLXZ.root_url == 'http://something', 'Different root URL from the specified one.' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g8ku(YKHO):\n g2VT = ig7Y()\n assert g2VT.a is None\n assert g2VT.loc is None\n assert g2VT.scale is None",
"def as4H(YKHO):\n YKHO.assertIsNotNone(GfzA(), YKHO.ec.db)",
"def as4H(YKHO):\n LXpV = BvZP(s_kX)\n YKHO.assertEqual(LXpV.authtoken, s_kX)\n YKHO.assertEqual(LXpV.person.auth... | [
"0.70525175",
"0.69626737",
"0.68798745",
"0.68673795",
"0.6812885",
"0.6807057",
"0.6797245",
"0.67916226",
"0.6714089",
"0.6689329",
"0.6682552",
"0.66112345",
"0.6610447",
"0.65597427",
"0.65076184",
"0.649798",
"0.6455297",
"0.64524794",
"0.6437213",
"0.6428168",
"0.63993... | 0.76929474 | 0 |
Tests query search with an invalid query. | def iniv(PKbx):
C9uy = dict()
C9uy['sort'] = 'foo_sort'
with trZe.raises(ValueError):
PKbx.query_search(search_query=C9uy, sort='foo_sort') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uq4z(YKHO):\n for w2IS in YKHO.endpoints:\n Ylbp = YKHO.app.get('/api/%s?wrongfield=value' % w2IS)\n XObx = qQXR.loads(Ylbp.data)\n assert Ylbp.status_code == 415, XObx\n assert XObx['status'] == 'failed', XObx\n assert XObx['action'] == 'GET', XObx\n assert XObx['e... | [
"0.7463945",
"0.73862934",
"0.7294621",
"0.7236369",
"0.72287714",
"0.71919495",
"0.7167107",
"0.7147223",
"0.7132126",
"0.70846224",
"0.7081743",
"0.7079348",
"0.70627487",
"0.7033699",
"0.702306",
"0.69042057",
"0.68690693",
"0.6863569",
"0.6847299",
"0.6805821",
"0.6796804... | 0.8103058 | 0 |
Pulls the value for the given key from the object, applies the field's formatting and returns the result. | def Napc(YKHO, hkS8: str, YEnM: typing.Any, CU1e: typing.Callable[[typing.Any, str, typing.Any], typing.Any] | None=None, **B2fa):
if YKHO._CHECK_ATTRIBUTE:
BWXx = YKHO.get_value(YEnM, hkS8, accessor=CU1e)
if BWXx is U0rw:
WmM4 = YKHO.dump_default
BWXx = WmM4() if callable(Wm... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XbWQ(YKHO, H5ew):\n wEf2 = YKHO[H5ew]\n if isinstance(wEf2, str):\n try:\n return YKHO.get_processed_string(wEf2)\n except KeyError as err:\n TEnV = XObx.args[0]\n raise lgk4(f\"Unable to format '{wEf2}' at context['{H5ew}'] with {{{TEnV}}}, because context[... | [
"0.6378401",
"0.61252886",
"0.6114411",
"0.5919362",
"0.5901136",
"0.5885049",
"0.5812164",
"0.5710396",
"0.56931174",
"0.5648728",
"0.5634506",
"0.5630991",
"0.5610064",
"0.55813605",
"0.55700916",
"0.55591625",
"0.5540824",
"0.55239403",
"0.55100405",
"0.5497037",
"0.549266... | 0.0 | -1 |
Creates a JSONoriented Flask app. All error responses that you don't specifically manage yourself will have applications/json content type, and will contain JSON like this (just an example) | def YodZ(Eub1, **B2fa):
def c7qY(aTqo):
geh0 = pz3A(message=str(aTqo), code=aTqo.code if isinstance(aTqo, pgG1) else 500)
geh0.status_code = aTqo.code if isinstance(aTqo, pgG1) else 500
return geh0
P4t4 = L2w0(Eub1, **B2fa)
for Wxnj in DB69.iterkeys():
P4t4.error_handler_spe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YodZ(Eub1, **B2fa):\n\n def c7qY(aTqo):\n CgYo.pprint(aTqo)\n geh0 = pz3A(message=str(aTqo))\n geh0.status_code = aTqo.code if isinstance(aTqo, pgG1) else 500\n CgYo.pprint(geh0)\n return geh0\n P4t4 = L2w0(Eub1, **B2fa)\n P4t4.secret_key = wPWn(24)\n for Wxnj in ... | [
"0.81635195",
"0.8133192",
"0.79274666",
"0.79274666",
"0.6972535",
"0.6880173",
"0.6824953",
"0.6748881",
"0.6580665",
"0.6562327",
"0.65008616",
"0.6497854",
"0.6444903",
"0.64056337",
"0.6374306",
"0.63120764",
"0.6223792",
"0.6220883",
"0.6203432",
"0.6147896",
"0.6102387... | 0.7894046 | 4 |
Returns the transaction id for an iTunes transaction. The returned id is usable as a range key for Subscription.Query. | def s9TD(Emd4, x4Ag):
return j811 + x4Ag.GetRenewalTransactionId() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hwzv():\n FrKw = hqsM(str(int(ITS7.time() * 1000)).encode('utf-8'))\n dnGy = FrKw.hexdigest().lower()[0:32]\n return dnGy",
"def HPCD(YKHO, nPrm):\n TXzX = nPrm['transactionId']\n return TXzX",
"def kMXT(YKHO):\n YKHO.tx_id = YKHO.get_sign_data()",
"def Kh6j(YKHO, vkFH: str):\n retur... | [
"0.6896837",
"0.6791971",
"0.6683428",
"0.63106054",
"0.6138712",
"0.59663343",
"0.58990246",
"0.5886493",
"0.5816034",
"0.56646365",
"0.56619567",
"0.55866027",
"0.5493326",
"0.5445639",
"0.54284066",
"0.5374061",
"0.5373262",
"0.53542167",
"0.53393805",
"0.53177744",
"0.529... | 0.61795217 | 4 |
Returns the subscription id for an iTunes transaction. THe returned id will be the same for all transactions in a series of renewals. | def jMJk(Emd4, x4Ag):
return j811 + x4Ag.GetOriginalTransactionId() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JuHa(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'subscription_id')",
"def dYAF(YKHO):\n JuHa = YKHO.get_intermediate('subscription_id', None)\n if not JuHa:\n JuHa = YKHO.cmd.cli_ctx.data.get('subscription_id')\n if not JuHa:\n JuHa = SYRW(cli_ctx=YKHO.cmd.cli_ctx).ge... | [
"0.6922909",
"0.66919905",
"0.6434174",
"0.6358435",
"0.6095308",
"0.5967596",
"0.59468853",
"0.59185296",
"0.57001954",
"0.5659351",
"0.5659351",
"0.5658425",
"0.56308174",
"0.5568889",
"0.5521859",
"0.5473928",
"0.5415231",
"0.5415182",
"0.52769345",
"0.52344084",
"0.520371... | 0.7144965 | 0 |
Creates a subscription object for an iTunes transaction. The verify_response argument is a response from viewfinder.backend.services.itunes_store.ITunesStoreClient.VerifyReceipt. The new object is returned but not saved to the database. | def omrm(Emd4, uJjO, x4Ag):
assert x4Ag.IsValid()
MFLc = dict(user_id=uJjO, transaction_id=oZou.GetITunesTransactionId(x4Ag), subscription_id=oZou.GetITunesSubscriptionId(x4Ag), timestamp=x4Ag.GetTransactionTime(), expiration_ts=x4Ag.GetExpirationTime(), payment_type='itunes', extra_info=x4Ag.GetLatestReceiptIn... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n0yO(Emd4, x0hE, db6b, uJjO, x4Ag):\n finE = oZou.CreateFromITunes(uJjO, x4Ag)\n finE.Update(x0hE, db6b)",
"def vXRW(YKHO, geh0: pubsub.Subscription) -> c6QV.Subscription:\n return geh0",
"def eLpg(YKHO, vGfb):\n mouR = super().create(vGfb)\n mouR.send_verification_email()\n return mouR",... | [
"0.7048045",
"0.61676496",
"0.5990635",
"0.59361476",
"0.5884864",
"0.55695355",
"0.5556764",
"0.541712",
"0.5386612",
"0.53512514",
"0.5335941",
"0.5322247",
"0.5300988",
"0.5213497",
"0.52041996",
"0.5198155",
"0.51571894",
"0.50963527",
"0.499864",
"0.49974996",
"0.4977607... | 0.6756502 | 1 |
Creates a subscription record for an iTunes transaction and saves it to the database. The verify_response argument is a response from viewfinder.backend.services.itunes_store.ITunesStoreClient.VerifyReceipt. | def n0yO(Emd4, x0hE, db6b, uJjO, x4Ag):
finE = oZou.CreateFromITunes(uJjO, x4Ag)
finE.Update(x0hE, db6b) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vXRW(YKHO, geh0: pubsub.Subscription) -> c6QV.Subscription:\n return geh0",
"def omrm(Emd4, uJjO, x4Ag):\n assert x4Ag.IsValid()\n MFLc = dict(user_id=uJjO, transaction_id=oZou.GetITunesTransactionId(x4Ag), subscription_id=oZou.GetITunesSubscriptionId(x4Ag), timestamp=x4Ag.GetTransactionTime(), expi... | [
"0.60433036",
"0.5971549",
"0.57673633",
"0.57216924",
"0.5666896",
"0.56634444",
"0.5558759",
"0.5525311",
"0.55051625",
"0.53845364",
"0.53136545",
"0.53124315",
"0.5200569",
"0.5187778",
"0.5142988",
"0.5119962",
"0.51056916",
"0.50879365",
"0.5056159",
"0.50197226",
"0.50... | 0.75471354 | 0 |
Returns a list of Subscription objects for the given user. By default only includes currentlyactive subscriptions, and only one transaction per subscription. To return expired subscriptions, pass include_expired=True. To return all transactions (even those superceded by a renewal transaction for the same subscription),... | def cJFM(Emd4, x0hE, db6b, uJjO, MmJn=False, FeC_=False):
B_hT = []
fsbt = {}
def yTK5(finE, db6b):
if FeC_:
B_hT.append(finE)
else:
if finE.expiration_ts < ITS7.time() and (not MmJn):
db6b()
return
if finE.subscription_id ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HFw2(uJjO):\n CBIr = bt8D(uJjO)\n eSe8 = CBIr.subscriptions\n return eSe8",
"def Tfir(YKHO, i0Q8):\n return YKHO.__GetJson('/users/' + i0Q8 + '/subscriptions', True)",
"def pXrm(YKHO, i0Q8):\n return YKHO.__GetJson('/users/' + i0Q8 + '/subscriptions/from', True)",
"def qwGD(YKHO, JLBP=Fals... | [
"0.72044915",
"0.71607876",
"0.7076956",
"0.6945214",
"0.6808065",
"0.66882795",
"0.66704553",
"0.6560594",
"0.65368223",
"0.65074223",
"0.64766574",
"0.64761186",
"0.6420109",
"0.62767226",
"0.62731695",
"0.62687385",
"0.61983347",
"0.61374867",
"0.60987484",
"0.608197",
"0.... | 0.7135429 | 2 |
Converts KTensor to a dense ndarray. | def vBWh(YKHO):
Hbam = YKHO.factors[0] @ LRuF(YKHO.factors[1:]).T
return oyIN.reshape(Hbam, YKHO.shape) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RLxn(YKHO):\n Hdfo(YKHO.indices is None, 'sparseTensor to ndarray is not supported')\n return oyIN.array(YKHO.storage, dtype=qxps(YKHO.bigdl_type)).reshape(YKHO.shape)",
"def zd4T(YKHO, vhpA: tf.Tensor, oLRV: tf.TensorShape) -> ZylS.Tensor:\n return ZylS.scatter_nd(YKHO.observations_index, vhpA, oLR... | [
"0.6649719",
"0.65330756",
"0.6274775",
"0.62331015",
"0.61421955",
"0.60363954",
"0.60149133",
"0.5951555",
"0.5858377",
"0.5730846",
"0.57231045",
"0.5667669",
"0.5553754",
"0.5500901",
"0.54917526",
"0.5465225",
"0.54026896",
"0.5399308",
"0.53902495",
"0.53844714",
"0.536... | 0.0 | -1 |
Returns all the proxies registered in the server | def Odov(YKHO):
Odov = uk1U.get('/proxies').json()
Zlj6 = {}
for mWFP, hkxX in kg1t(Odov):
kMyc = eWlL(**hkxX)
Zlj6.update({mWFP: kMyc})
return Zlj6 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pi1E(YKHO):\n return YKHO.proxies",
"def YCm2():\n bX0M = fRlP(category='ALL', print_err_trace=False)\n nPrm = bX0M.getProxies()\n Odov = []\n for ZfUD in nPrm.proxies:\n Odov.append('{}:{}'.format(ZfUD.ip, ZfUD.port))\n return Odov",
"def K3GM(YKHO):\n D_3T = 'https://www.sslpr... | [
"0.82872874",
"0.82591",
"0.7790209",
"0.77358323",
"0.7701172",
"0.75207084",
"0.7369183",
"0.7362553",
"0.725647",
"0.7144428",
"0.6910044",
"0.6874921",
"0.68709165",
"0.6850851",
"0.68429357",
"0.6809145",
"0.674759",
"0.6735651",
"0.66016173",
"0.6597222",
"0.65918005",
... | 0.7611807 | 5 |
Returns all the words of a string. | def V22M(KCHu):
return (NkkI(yzQ0) for yzQ0 in epBA.findall(KCHu)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LHLn(str):\n return set(ZbWC.findall('\\\\w+', str.lower()))",
"def V22M(YKHO, l5Ny):\n return ZbWC.findall('\\\\w+', l5Ny)",
"def JgZ3(vIwR):\n vC9B = []\n GIN8 = ''\n for Z9rn in vIwR + ' ':\n if Z9rn.isalpha():\n GIN8 += Z9rn\n else:\n if GIN8 != '':\n ... | [
"0.7867398",
"0.7798272",
"0.7793118",
"0.7711489",
"0.7556821",
"0.7495844",
"0.7442168",
"0.7396945",
"0.7370289",
"0.7360776",
"0.73555183",
"0.7345942",
"0.73215896",
"0.72583306",
"0.72428656",
"0.72195673",
"0.71984345",
"0.71700275",
"0.7147852",
"0.71264493",
"0.71194... | 0.81549746 | 0 |
Tests that the function raises an error for treatments and probs of different sizes | def UIg3(YXyb):
YfSf = 3
with trZe.raises(Exception):
k7Yy(data=YXyb['data'], block_cols=['block'], treats=YfSf, idx_col=YXyb['idx_col'], probs=YXyb['probs']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z_uF(YKHO):\n YKHO._assert_raise_error(probabilities=[0.5, 0.5], random_nums=[0], error=h3WC, code=1)",
"def CECE(YKHO):\n with YKHO.assertRaises(ValueError):\n ZnHA(oyIN.ones(10), oyIN.ones(10), oyIN.ones(5), 0.3)",
"def RHyb():\n jzdc = [1, 2, 3, 4, 5, 6, 7, 8]\n with cR0t(ValueError):... | [
"0.68574584",
"0.6850788",
"0.6673953",
"0.66249496",
"0.6617276",
"0.65843415",
"0.6540696",
"0.65219265",
"0.64802504",
"0.64198655",
"0.63976234",
"0.6339576",
"0.63279814",
"0.62746906",
"0.62368834",
"0.6234616",
"0.6228064",
"0.62276286",
"0.6216054",
"0.6172493",
"0.61... | 0.655758 | 6 |
Tests that the function's output contains the `block_id`' | def mLIU(Hwdg):
kqZZ = Hwdg['treatments']
assert 'block_id' in kqZZ.columns, 'Block_id column is missing' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ige8(YKHO):\n SUGj = TI0e.dedent('\\n DEVNAME=/dev/sda1\\n UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\\n TYPE=xfs\\n PARTUUID=YYYYYYYY-YY\\n\\n DEVNAME=/dev/sdb1\\n PARTUUID=ZZZZZZZZ-ZZZZ-ZZZZ-ZZZZ-ZZZZZZZZZZZZ\\n ')\n YKHO.asser... | [
"0.6573601",
"0.64442587",
"0.63301694",
"0.62979084",
"0.6242147",
"0.62361515",
"0.620644",
"0.61887836",
"0.61803836",
"0.6176128",
"0.61706054",
"0.6140707",
"0.6127305",
"0.61247945",
"0.6113252",
"0.60858834",
"0.6081884",
"0.6074062",
"0.60737556",
"0.6070936",
"0.6053... | 0.60131603 | 23 |
Converts pandas TimeSta,mp into a date str | def F0Fn(wEf2, lpha='-'):
Ylbp = ''
if isinstance(wEf2, rLdf.Timestamp):
tOwQ = wEf2.date()
elif isinstance(wEf2, str):
tOwQ = ''
if wEf2.find(lpha) == 4:
tOwQ = JRYC.datetime.strptime(wEf2, lpha.join(['%Y', '%m', '%d']))
elif wEf2.find('/') == 4:
tOwQ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JeLU(Tvv2):\n Tvv2['time'] = Tvv2['time'].dt.strftime('%Y-%m-%dT%H:%M:%S')\n return Tvv2",
"def pbe6(YKHO, i8WE):\n g55J = qcWV.datetime.fromtimestamp(i8WE)\n return YKHO.format_datetime(g55J)",
"def Px7F(YKHO):\n try:\n if not YKHO._time:\n raise ValueError\n GUy1 =... | [
"0.6096868",
"0.59809893",
"0.5731243",
"0.57030106",
"0.56523174",
"0.56303304",
"0.55953336",
"0.5541693",
"0.5524897",
"0.5504463",
"0.54928905",
"0.548618",
"0.5470752",
"0.5464102",
"0.5448914",
"0.5424861",
"0.54167324",
"0.54162085",
"0.5408807",
"0.53879124",
"0.53837... | 0.0 | -1 |
Function that saves the created dataframe as a csv. | def xkzz(jQ3Z, ebdv, mWFP):
jQ3Z.to_csv(ebdv + mWFP + '.csv', index=False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eFxq(Kiac, qaEx):\n Kiac.to_csv(qaEx)\n return None",
"def bJJP(bOBl, Ux0P):\n with open(Ux0P, 'w', encoding='utf8') as _RR0:\n bOBl.to_csv(_RR0, sep=',')",
"def RZtn(YKHO):\n YKHO.tableView.df.to_csv('Data export.csv', index=False)\n print('CSV file exported')",
"def aVpL(YKHO, Ux0... | [
"0.808599",
"0.8040939",
"0.78697246",
"0.7795784",
"0.77626383",
"0.7737777",
"0.76815236",
"0.7584483",
"0.75417167",
"0.7527897",
"0.7408575",
"0.73884004",
"0.737903",
"0.7372637",
"0.73557115",
"0.73516923",
"0.7351631",
"0.73451465",
"0.7331499",
"0.7320402",
"0.7298884... | 0.7638196 | 7 |
A function that preprocesses the data (so that it is displayed per sentence), and saves is as a .csv file for later use. | def wpph(i0XC, BJHp):
_pwN = hnVk(i0XC)
Rhv4 = bUxN(_pwN)
godv = rLdf.DataFrame(oyIN.array(Rhv4), columns=['sentences'])
godv.drop_duplicates(keep='first', inplace=True)
mWFP = Hy7s.path.basename(i0XC)
xkzz(godv, BJHp, mWFP[:-4])
print(mWFP, 'done') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nKSm(YKHO, __n6):\n y_KH = []\n for qaEx in YKHO.list_news_path:\n with open(qaEx, 'r') as eHNT:\n A97Q = qQXR.load(eHNT)\n if A97Q['title'] == '' or A97Q['text'] == '':\n pass\n else:\n y_KH.append({'title': ZjwF(A97Q['title']), 'body... | [
"0.6811158",
"0.6722584",
"0.6567336",
"0.6514871",
"0.64818025",
"0.6445955",
"0.6345094",
"0.6313514",
"0.6310771",
"0.6289682",
"0.6245924",
"0.6188296",
"0.61736614",
"0.61571324",
"0.6153687",
"0.61359787",
"0.6103529",
"0.6078087",
"0.607136",
"0.60638565",
"0.6058391",... | 0.75479275 | 0 |
Takes standard tail file and returns a pandas dataframe | def pvMH(G9Se):
wZ4A = E4M2(G9Se)
fcTc = []
for J3uN in wZ4A:
type = J3uN[2][J3uN[2].find('|') + 1:]
mWFP = J3uN[2][:J3uN[2].find('|')]
o9CD([mWFP, J3uN[3], J3uN[4], J3uN[5], type], fcTc, int(J3uN[1]))
jQ3Z = rLdf.DataFrame(fcTc, columns=['Gene', '3Loc', 'TailLength', 'TailSeq', ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hfK9(YKHO):\n if YKHO.filename.endswith('.gz'):\n Rrsh = 'gzip'\n elif YKHO.filename.endswith('.bz2'):\n Rrsh = 'bz2'\n else:\n Rrsh = None\n jQ3Z = rLdf.read_table(YKHO.filename, compression=Rrsh)\n jQ3Z.dropna(axis=1, how='all', inplace=True)\n return jQ3Z",
"def iXC1... | [
"0.6500923",
"0.646392",
"0.6263773",
"0.62481827",
"0.6194304",
"0.6129559",
"0.6078942",
"0.6003204",
"0.5984774",
"0.5977539",
"0.5956512",
"0.5915594",
"0.5912465",
"0.59102386",
"0.5903589",
"0.5870863",
"0.58514863",
"0.58370113",
"0.58322597",
"0.58320403",
"0.5828572"... | 0.57136476 | 30 |
Reads in a translation file in json format. | def PSj2(YKHO, okC2):
S5VI = qQXR.load(okC2)
YKHO.language = j1ZM['lang']
YKHO.translations = j1ZM['strings'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bObL(pmON, DuqQ, P4t4):\n oDPw = {}\n if Hy7s.path.exists(pmON):\n with open(pmON, 'r') as eHNT:\n oDPw = qQXR.loads(eHNT.read())\n return oDPw",
"def DYEb(r6VR: str, Ux0P: str):\n lvUe = gCuF.TWLIGHT_HOME\n VqRE = '{twlight_home}/locale/{language_code}/{filename}.json'.forma... | [
"0.76486564",
"0.7577767",
"0.7166459",
"0.71568304",
"0.71235466",
"0.71235466",
"0.7073017",
"0.70480293",
"0.70153415",
"0.70153415",
"0.7010124",
"0.6991458",
"0.69871974",
"0.6984109",
"0.6969324",
"0.6948705",
"0.69473696",
"0.6935583",
"0.69271183",
"0.6904846",
"0.688... | 0.8315508 | 0 |
Writes a translation file in json format. | def uP8n(YKHO, jY1r):
jY1r.write(qQXR.dumps(YKHO.translations, sort_keys=True, indent=4)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Lsrz(YKHO, Mu0k=None):\n HeoJ = qQXR.dumps(YKHO.json_dict, indent=2)\n YKHO._write_json_text(HeoJ, Mu0k)",
"def bFLq(YKHO, nUeQ, hGN5):\n with open(nUeQ, 'w', encoding='utf-8') as eHNT:\n qQXR.dump(hGN5, eHNT, indent=2)",
"def VacN(YKHO):\n with open(YKHO._file_path, 'w') as eHNT:\n ... | [
"0.7375926",
"0.73411995",
"0.72907406",
"0.71562773",
"0.7133225",
"0.70734954",
"0.70544845",
"0.70544845",
"0.7030629",
"0.7023544",
"0.6961805",
"0.6953743",
"0.67956346",
"0.6769627",
"0.6737666",
"0.6707589",
"0.66768265",
"0.6640878",
"0.6636975",
"0.66189843",
"0.6613... | 0.80532444 | 0 |
The L{pyxb.binding.basis.complexTypeDefinition} instance to which the content would belong, if available. | def zGKt(YKHO):
return YKHO.__container | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hybD(mWFP, q_DO, uPxI):\n Csk6 = dict()\n A01H = None\n lrXa = q_DO.basedef\n if lrXa and lrXa != kVFA:\n A01H = hybD(lrXa.name, lrXa, uPxI)\n if q_DO.content_type.is_element_only():\n C3ST = q_DO.content_type.partical.term\n ZfUi(C3ST, Csk6, uPxI)\n ONNi(q_DO.attributes,... | [
"0.662026",
"0.6006497",
"0.5994679",
"0.5994679",
"0.58757013",
"0.5805625",
"0.5772228",
"0.56741375",
"0.56511194",
"0.5400544",
"0.5376184",
"0.5365635",
"0.53551865",
"0.53486794",
"0.5348674",
"0.531267",
"0.52907616",
"0.5270401",
"0.52625525",
"0.5256683",
"0.52520835... | 0.0 | -1 |
Returns absolute seq start and end indices for a given target frame. | def cYjJ(Gkwc, q4aw, gqD8=1):
FmSQ = int((q4aw - 1) / 2) * gqD8
ixQc = Gkwc + FmSQ
V_8U = ixQc - (q4aw - 1) * gqD8
return (V_8U, ixQc) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nWge(YKHO, B9Kb: Union[int, None]=None, FD0k: Union[int, None]=None):\n if B9Kb is None:\n DbxN = 0\n else:\n DbxN = oyIN.searchsorted(YKHO._spikestimes, B9Kb, side='left')\n if FD0k is None:\n AwgJ = YKHO._spikestimes.shape[0]\n else:\n AwgJ = oyIN.searchsorted(YKHO._sp... | [
"0.6715035",
"0.65553015",
"0.65001374",
"0.61677617",
"0.6032674",
"0.5994794",
"0.5814949",
"0.5793697",
"0.5750009",
"0.5744181",
"0.57312435",
"0.57003564",
"0.5687238",
"0.5666919",
"0.5661147",
"0.56553286",
"0.56158334",
"0.5595851",
"0.5521909",
"0.5520214",
"0.54729"... | 0.6275845 | 3 |
Returns true if obj is a numpy array. | def ceOy(YEnM):
return type(YEnM).__module__ == oyIN.__name__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PFXX(YKHO, ezWE):\n return isinstance(ezWE, oyIN.ndarray)",
"def QvQx(YEnM):\n return 'numpy' in str(type(YEnM))",
"def qJca(YEnM):\n if isinstance(YEnM, list):\n return True\n elif isinstance(YEnM, oyIN.ndarray):\n return True\n elif isinstance(YEnM, rLdf.Series):\n ret... | [
"0.84035677",
"0.8076048",
"0.77647555",
"0.7741642",
"0.7736499",
"0.76953906",
"0.73582894",
"0.7268553",
"0.7229395",
"0.7178989",
"0.70816004",
"0.6987525",
"0.694164",
"0.6726651",
"0.6638855",
"0.6638471",
"0.6598614",
"0.65872633",
"0.63607806",
"0.63399965",
"0.630668... | 0.8832039 | 0 |
Returns list of variables that should be saved/restored. | def KqHH(aqBD=None):
PwS0 = ZylS.trainable_variables()
VtcP = [Ty9i for Ty9i in ZylS.global_variables() if 'moving_mean' in Ty9i.op.name or 'moving_variance' in Ty9i.op.name or 'mu' in Ty9i.op.name or ('sigma' in Ty9i.op.name) or ('global_scale_var' in Ty9i.op.name)]
PwS0.extend(VtcP)
PwS0 = sorted(PwS0... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kc1W(YKHO):\n if jSDU.in_save_context():\n return [YKHO._vars[0]]\n return YKHO._vars",
"def hjmx():\n d9X6 = ['DeInceptionV4']\n yUkU = [rrBf.strip() for rrBf in d9X6]\n mK7E = []\n for SRYB in Fz20.get_model_variables():\n em9o = False\n for mlB2 in yUkU:\n ... | [
"0.80383086",
"0.7528085",
"0.7279273",
"0.7255528",
"0.71498054",
"0.70009124",
"0.6987614",
"0.6874694",
"0.68420756",
"0.6826596",
"0.6821036",
"0.67975426",
"0.6795456",
"0.6788206",
"0.67689455",
"0.674274",
"0.66833127",
"0.6675252",
"0.6659809",
"0.66465116",
"0.664018... | 0.66378254 | 21 |
Compute the distance between 2 points in a globe. The points are represented as a tuple | def GeVo(EBgd=None, HpuQ=None):
igSk, GgQG = EBgd
TGuP, tk0B = HpuQ
XP5J = mM0K / 180
jzdc = 0.5 - YhSR((TGuP - igSk) * XP5J) / 2 + YhSR(igSk * XP5J) * YhSR(TGuP * XP5J) * (1 - YhSR((tk0B - GgQG) * XP5J)) / 2
return 12742 * P099(PZyS(jzdc)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eve5(igSk, GgQG, TGuP, tk0B):\n return PZ77.WGS84.Inverse(igSk, GgQG, TGuP, tk0B)['s12']",
"def WWYU(X3qZ: tuple, ZYCo: tuple) -> float:\n return ((ZYCo[1] - X3qZ[1]) ** 2 + (ZYCo[0] - X3qZ[0]) ** 2) ** 0.5",
"def Ayfi(jzdc: Point, Fg_i: Point) -> float:\n return epAf.sqrt(epAf.pow(Fg_i.x - jzdc.x... | [
"0.73098433",
"0.7125958",
"0.707803",
"0.70702195",
"0.7053283",
"0.70495915",
"0.70466983",
"0.7016189",
"0.7011612",
"0.7010642",
"0.6999341",
"0.6999278",
"0.69990706",
"0.6995437",
"0.69907564",
"0.6977105",
"0.6975708",
"0.69574225",
"0.69553965",
"0.6937835",
"0.693607... | 0.0 | -1 |
Return a printable representation of the Courier model. | def wHJl(YKHO):
return f'<Courier id: {YKHO.id}>' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return YKHO.printable()",
"def zAg0(YKHO):\n raise NotImplementedError('Subclasses must define how to layout Character printing')",
"def zAg0(YKHO):\n TQrU = '{\\n'\n for mWFP, bGrB in YKHO.contracts.iteritems():\n TQrU += ' ' + mWFP + ',\\n'\n return TQrU + '}'",
"de... | [
"0.69444114",
"0.6600302",
"0.6576843",
"0.65622246",
"0.65294516",
"0.6454514",
"0.6442508",
"0.64392525",
"0.6436804",
"0.6405665",
"0.6395191",
"0.63725376",
"0.6365719",
"0.6334325",
"0.63229877",
"0.63111085",
"0.6304928",
"0.62987095",
"0.6296187",
"0.6281976",
"0.62819... | 0.69949245 | 0 |
Printable representation of RestaurantCourier model. | def wHJl(YKHO):
return f'<RestaurantCourier restaurant: {YKHO.restaurant_id} courier: {YKHO.courier_id}>' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n return f'<Restaurant id: {YKHO.id}>'",
"def wHJl(YKHO):\n return f'<RestaurantProduct restaurant: {YKHO.restaurant_id} product: {YKHO.product_id}>'",
"def wHJl(YKHO):\n return f'<Courier id: {YKHO.id}>'",
"def wHJl(YKHO):\n return '<Truck truck_id={} name={} address={}>'.format(... | [
"0.71120787",
"0.70763516",
"0.6993424",
"0.66813153",
"0.6545185",
"0.65208304",
"0.648358",
"0.64835733",
"0.6406419",
"0.6375339",
"0.63424045",
"0.63126546",
"0.63126546",
"0.63126546",
"0.63126546",
"0.63126546",
"0.6304636",
"0.6280823",
"0.627803",
"0.62755007",
"0.624... | 0.8167621 | 0 |
Printable representation of RestaurantProduct model. | def wHJl(YKHO):
return f'<RestaurantProduct restaurant: {YKHO.restaurant_id} product: {YKHO.product_id}>' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n return '<Product: {}>'.format(YKHO.name)",
"def wHJl(YKHO):\n return f'<Restaurant id: {YKHO.id}>'",
"def wHJl(YKHO):\n return f'<RestaurantCourier restaurant: {YKHO.restaurant_id} courier: {YKHO.courier_id}>'",
"def zAg0(YKHO):\n return f'Order Number: {YKHO._order_number} Prod... | [
"0.7284317",
"0.7115957",
"0.6930726",
"0.65813386",
"0.65726453",
"0.65726453",
"0.6404084",
"0.63658136",
"0.63448894",
"0.63268375",
"0.6320364",
"0.62845737",
"0.62160903",
"0.619781",
"0.61736524",
"0.61555886",
"0.6143565",
"0.6117131",
"0.60542434",
"0.60510373",
"0.60... | 0.84345436 | 0 |
Input > Model path for the object detection model Model type> Foot or Hand Output > Inference model for getting the predictions on test images | def ncoM(uqvc, DMw4):
if DMw4 == 'Foot_detection':
C3ST, SRbu, FWql = dkJV(backbone_retinanet=PqMZ('resnet50').retinanet, num_classes=5, weights=None, multi_gpu=False, freeze_backbone=True, lr=0.001, config=trUu('/usr/local/bin/Config files/config_foot.ini'))
SRbu.load_weights(uqvc)
BHjZ = u... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SsvM(YKHO, input, hlel, y6vV):\n if Hy7s.path.isfile(y6vV) is False:\n raise IOError('trained model: %s not exist' % y6vV)\n M_NZ = k6eJ.load(y6vV)\n r7Kl = 500\n uePJ = 500\n saYn = 0\n TJ2s = 0\n WD4p = Hy7s.path.dirname(input)\n rTBW = Hy7s.path.basename(input)\n pYGY = 'in... | [
"0.709018",
"0.70268166",
"0.69897854",
"0.684806",
"0.68473697",
"0.68058217",
"0.68043005",
"0.67794544",
"0.67151695",
"0.6711857",
"0.66996366",
"0.6670149",
"0.6654578",
"0.6625851",
"0.6591974",
"0.65632236",
"0.6540678",
"0.6506307",
"0.65026563",
"0.6493569",
"0.64884... | 0.6911334 | 3 |
Probability density function of custom sympy.stats models | def kzAT(YKHO, Cs6h, u95t):
return YKHO.density(u95t[0], *Cs6h) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Eo2K(YKHO, EcVT):\n raise NotImplementedError",
"def kzAT(KCHu, WKvO):\n WKvO = jcWa.sympify(WKvO)\n return 1 / (KCHu.sigma * PZyS(2 * mM0K)) * kLQb(-(WKvO - KCHu.mu) ** 2 / (2 * KCHu.sigma ** 2))",
"def InLe(YKHO, d7pR):\n JBMS = -YKHO.sigma ** 2 * YKHO.data['maturity']\n M1Jx = YKHO.sigma ... | [
"0.69486904",
"0.6839655",
"0.66942906",
"0.66268593",
"0.64896435",
"0.6424063",
"0.63419783",
"0.63395894",
"0.6316561",
"0.6316308",
"0.6266159",
"0.62060744",
"0.6195742",
"0.61901736",
"0.61862254",
"0.6165573",
"0.61443615",
"0.6138411",
"0.61313474",
"0.6098505",
"0.60... | 0.57563996 | 49 |
Probability density function of the Bernoulli model | def kzAT(YKHO, Cs6h, u95t):
ycBG = Cs6h[0][:]
ycBG[ycBG > 1.0] = 0.0
ycBG[ycBG < 0.0] = 0.0
if u95t[0]:
pass
else:
ycBG = 1.0 - ycBG
return ycBG | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Eo2K(YKHO, EcVT):\n raise NotImplementedError",
"def ITwm(YKHO, WKvO):\n return 1.0 / WKvO",
"def InLe(YKHO, WKvO):\n ywwl = len(YKHO.train_data)\n LTIa = list(YKHO.train_data)\n eFr6 = [oyIN.linalg.norm(WKvO - AU8u) ** 2 for AU8u in LTIa]\n nwEM = [oyIN.exp(-pImw / (2 * YKHO.bandwidth **... | [
"0.7435315",
"0.71138096",
"0.71096843",
"0.7105216",
"0.7027108",
"0.70075536",
"0.6847766",
"0.68142974",
"0.67728186",
"0.67084306",
"0.6619479",
"0.65256804",
"0.652328",
"0.6516417",
"0.64901376",
"0.64700055",
"0.6467701",
"0.646181",
"0.64494973",
"0.6434902",
"0.64326... | 0.0 | -1 |
Probability density function of the Gaussian model. | def kzAT(YKHO, Cs6h, u95t):
return oyIN.exp(-(u95t[0] - Cs6h[0]) ** 2.0 / (2.0 * Cs6h[1] ** 2.0) - 0.5 * oyIN.log(2.0 * oyIN.pi * Cs6h[1] ** 2.0)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Eo2K(YKHO, EcVT):\n raise NotImplementedError",
"def kzAT(WKvO):\n return -oyIN.exp(YKHO.ks_gaussian.score_samples(WKvO.reshape(1, -1)))",
"def NXCA(YKHO):\n g2VT = kuG0(C77I)\n g2VT.fit(YKHO.data)\n EcVT = oyIN.array([2000.0, 200.0, 0.0])\n Ggta = 0.032245296420409846\n Aofo = g2VT.pr... | [
"0.7947804",
"0.7553608",
"0.7516566",
"0.74003404",
"0.72932565",
"0.7274971",
"0.7039543",
"0.70161957",
"0.7002861",
"0.69926655",
"0.6945719",
"0.6930526",
"0.69161403",
"0.6892972",
"0.68551993",
"0.68442243",
"0.6843304",
"0.6830255",
"0.68098533",
"0.6800575",
"0.67849... | 0.0 | -1 |
Probability density function of the Autoregressive process of first order | def kzAT(YKHO, Cs6h, u95t):
return oyIN.exp(-(u95t[1] - Cs6h[0] * u95t[0]) ** 2.0 / (2.0 * Cs6h[1] ** 2.0) - 0.5 * oyIN.log(2.0 * oyIN.pi * Cs6h[1] ** 2.0)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Eo2K(YKHO, EcVT):\n raise NotImplementedError",
"def InLe(YKHO, WKvO):\n ywwl = len(YKHO.train_data)\n LTIa = list(YKHO.train_data)\n eFr6 = [oyIN.linalg.norm(WKvO - AU8u) ** 2 for AU8u in LTIa]\n nwEM = [oyIN.exp(-pImw / (2 * YKHO.bandwidth ** 2)) for pImw in eFr6]\n YUQd = sum(nwEM)\n ... | [
"0.7367533",
"0.70152324",
"0.6963267",
"0.6902381",
"0.68423057",
"0.67976856",
"0.6771773",
"0.6758305",
"0.6725957",
"0.6685036",
"0.6590607",
"0.6552273",
"0.64996487",
"0.6477976",
"0.6434538",
"0.6408131",
"0.6395663",
"0.6391381",
"0.6362059",
"0.63470787",
"0.63468486... | 0.0 | -1 |
Probability density function of the Autoregressive process of first order | def kzAT(YKHO, Cs6h, u95t):
Mkmy = Cs6h[0]
KCHu = Cs6h[1]
FCpD = KCHu * oyIN.sqrt(1 - Mkmy ** 2.0)
return oyIN.exp(-(u95t[1] - Mkmy * u95t[0]) ** 2.0 / (2.0 * FCpD ** 2.0) - 0.5 * oyIN.log(2.0 * oyIN.pi * FCpD ** 2.0)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Eo2K(YKHO, EcVT):\n raise NotImplementedError",
"def InLe(YKHO, WKvO):\n ywwl = len(YKHO.train_data)\n LTIa = list(YKHO.train_data)\n eFr6 = [oyIN.linalg.norm(WKvO - AU8u) ** 2 for AU8u in LTIa]\n nwEM = [oyIN.exp(-pImw / (2 * YKHO.bandwidth ** 2)) for pImw in eFr6]\n YUQd = sum(nwEM)\n ... | [
"0.7368097",
"0.70158595",
"0.6962699",
"0.69000155",
"0.68427974",
"0.67974037",
"0.67711955",
"0.6757439",
"0.6728212",
"0.66863847",
"0.6589417",
"0.6550291",
"0.6497331",
"0.6476294",
"0.6435491",
"0.64073396",
"0.6393094",
"0.6389788",
"0.6361023",
"0.6348426",
"0.634430... | 0.0 | -1 |
Consider x, y are vectors. Take L2 of the difference of the them after being normalized by their length | def ci98(WKvO, LVAh):
lnFo = ht2j.sqrt(ht2j.sum(WKvO ** 2))
o9Bw = ht2j.sqrt(ht2j.sum(LVAh ** 2))
return ht2j.sqrt(ht2j.sum((WKvO / lnFo - LVAh / o9Bw) ** 2)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V70B(WKvO, LVAh):\n return oyIN.sum((WKvO - LVAh) ** 2)",
"def V70B(o4D3, ajwV):\n return oyIN.sqrt((o4D3 - ajwV) ** 2)",
"def V70B(P6bq: np.ndarray, Ty9i: np.ndarray) -> oyIN.ndarray:\n return (P6bq - Ty9i) ** 2",
"def jz9k(WKvO):\n return WKvO / TuJO.norm(WKvO)",
"def V70B(he6J):\n ret... | [
"0.7676341",
"0.7434906",
"0.72900474",
"0.714216",
"0.7127061",
"0.69866174",
"0.69731694",
"0.69207644",
"0.6865735",
"0.6836043",
"0.683185",
"0.6808437",
"0.680253",
"0.6744852",
"0.6740793",
"0.673373",
"0.6713935",
"0.670696",
"0.66888577",
"0.6678042",
"0.66719097",
... | 0.0 | -1 |
Visualize an image once. Used to visualize generator before training. | def U4_H(C3B2):
with ZylS.Session() as cb_Q:
cb_Q.run(ZylS.global_variables_initializer())
with ZylS.contrib.slim.queues.QueueRunners(cb_Q):
esdR = cb_Q.run(C3B2)
QrM1.axis('off')
QrM1.imshow(oyIN.squeeze(esdR), cmap='gray') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WjA1(VXjJ):\n QrM1.figure(figsize=(10, 4))\n QrM1.imshow(VXjJ)\n QrM1.show()",
"def i5J1(YKHO):\n XC5k.imshow(YKHO.config.DISPLAY_NAME, YKHO.image)",
"def EYAw(LNo8):\n LNo8 = LNo8.cpu()\n assert type(LNo8) is ht2j.Tensor, 'Image to plot is not torch.Tensor'\n N0ky = int(oyIN.sqrt(LNo8... | [
"0.7095515",
"0.7071908",
"0.7070959",
"0.7046643",
"0.7039195",
"0.7019985",
"0.7013595",
"0.6947819",
"0.6936294",
"0.69345164",
"0.69298977",
"0.69109917",
"0.6891952",
"0.6877533",
"0.6846699",
"0.6822457",
"0.6799582",
"0.67991686",
"0.67932516",
"0.67726105",
"0.6700117... | 0.6129074 | 82 |