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 |
|---|---|---|---|---|---|---|
Get the current SparkSession. This should almost never be called directly instead you should call with_spark_session, with_cpu_session, or with_gpu_session for spark_session. This is to guarantee that the session and it's config is setup in a repeatable way. | def L9fk():
return XGYN | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def x189(YKHO) -> 'SparkSession':\n return lBG2(connectionString=YKHO._options['spark.connect.location'])",
"def f5WJ() -> h8nf[lBG2]:\n if StUT():\n return None\n return lBG2.getActiveSession()",
"def lXGf(Fv2L=None):\n if hasattr(XYQe, 'getOrCreate'):\n with XYQe._lock:\n ... | [
"0.83361834",
"0.8017564",
"0.72829324",
"0.71886766",
"0.7124039",
"0.70395494",
"0.7002167",
"0.69029814",
"0.6891381",
"0.6889373",
"0.68796927",
"0.68790424",
"0.67660606",
"0.6756618",
"0.67470205",
"0.67470205",
"0.67470205",
"0.67470205",
"0.67470205",
"0.67470205",
"0... | 0.5767239 | 77 |
Finds appropriate final for the existing initial in the beginning of the string | def Erlp(YKHO, Q6uT, oj22, Vb5F):
o8xR = Q6uT[oj22:]
if len(o8xR) > 0:
sZqf = o8xR[0]
if sZqf in Vb5F:
if len(o8xR) > 1:
iSy9 = o8xR[0] == 'ё'
z1Rg = o8xR[0] == 'о'
if iSy9:
lXgg = o8xR[0]
wwX2 = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def S7ta(ToxW: str):\n return 0",
"def k4b7(YKHO, Q6uT, mgFW):\n sZqf = Q6uT[0]\n if sZqf in mgFW:\n if sZqf in ['д', 'т', 'ц', 'с']:\n rrO6 = Q6uT[:2]\n if rrO6 in mgFW:\n RqgG = rrO6\n BTVo = 2\n else:\n RqgG = sZqf\n... | [
"0.6504398",
"0.64863306",
"0.62235117",
"0.6147827",
"0.6123986",
"0.6117677",
"0.6115104",
"0.6099541",
"0.6037493",
"0.6006822",
"0.59931403",
"0.59713787",
"0.59424376",
"0.58818465",
"0.5862199",
"0.58426005",
"0.57888037",
"0.5776179",
"0.5762034",
"0.57319695",
"0.5713... | 0.6029499 | 9 |
This nifty function returns optimally different N colors. | def c7xy(ywwl):
w05E = [(WKvO * 1.0 / ywwl, 0.5, 1) for WKvO in range(ywwl)]
return 255 * oyIN.array(map(lambda WKvO: h478.hsv_to_rgb(*WKvO), w05E)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fRt4(exwG):\n qfpW = Bcwd.rainbow(oyIN.linspace(0, 1, exwG))\n return qfpW",
"def AR1n(exwG):\n yfUf = []\n for YRbF in range(1, exwG + 1):\n yfUf.append(360.0 / YRbF)\n ObL9 = []\n for Hafq in yfUf:\n MKlR = epAf.floor(Hafq / 60) % 6\n ObL9.append(MKlR)\n Vb5F = []\... | [
"0.81784624",
"0.76313496",
"0.76093274",
"0.74209183",
"0.72971255",
"0.7240023",
"0.723426",
"0.72120696",
"0.7147514",
"0.7129822",
"0.7117894",
"0.7109832",
"0.7101755",
"0.7039201",
"0.7016885",
"0.6901744",
"0.68700016",
"0.68700016",
"0.68700016",
"0.6859234",
"0.68417... | 0.7962473 | 1 |
Sets the password for the current user | def G3s8(YKHO, Ud05):
YKHO.password = Mi51.generate_password_hash(Ud05, length=12) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zZft(YKHO, zN5h):\n pass",
"def G3s8(YKHO, jTXt):\n YKHO.password = jTXt",
"def G3s8(YKHO, jTXt):\n YKHO.PASS = jTXt",
"def G3s8(YKHO, jTXt):\n YKHO.PASSWORD = jTXt",
"def G3s8(YKHO, jTXt):\n YKHO.authentication.password = jTXt",
"def G3s8(YKHO, jTXt):\n YKHO.password = YKHO.hash_pa... | [
"0.84354645",
"0.8294644",
"0.8171011",
"0.81626123",
"0.81604874",
"0.79363024",
"0.7900748",
"0.789865",
"0.78963995",
"0.7885437",
"0.783411",
"0.78173596",
"0.779471",
"0.7791343",
"0.7780889",
"0.7749631",
"0.77423096",
"0.77415335",
"0.77415335",
"0.7714359",
"0.7677772... | 0.75310177 | 34 |
The protocol that is prepended to the path when no protocol is specified. | def OPfJ(YKHO):
return 'sftp://' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vBWh(YKHO):\n bD7m = YKHO.scheme + ':' if YKHO.scheme else ''\n bD7m += '//' + YKHO.netloc + YKHO.relative()\n return bD7m",
"def iquo(YKHO, Wxnj):\n return YKHO.url.scheme",
"def F9yi():\n if TzmZ():\n iquo = 'https'\n else:\n iquo = 'http'\n return iquo",
"def F9yi(YK... | [
"0.7042303",
"0.68645024",
"0.6796369",
"0.66449445",
"0.6639021",
"0.66347957",
"0.6587682",
"0.65815717",
"0.6463956",
"0.6432269",
"0.64169014",
"0.63885194",
"0.637642",
"0.63464826",
"0.63070315",
"0.63038194",
"0.6285968",
"0.6284639",
"0.6273279",
"0.6232282",
"0.61876... | 0.6496454 | 8 |
List of valid protocols for this remote provider. | def KnDm(YKHO):
return ['ssh://', 'sftp://'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PdBI(YKHO):\n if YKHO._protocols is None:\n j8eK = '/loadbalancers/protocols'\n _hkX, TBsA = YKHO.method_get(j8eK)\n YKHO._protocols = [mLim['name'] for mLim in TBsA['protocols']]\n return YKHO._protocols",
"def KZVI(YKHO):\n return None",
"def PdBI(YKHO) -> h8nf[qe4Y.Input['S... | [
"0.7651498",
"0.74760866",
"0.7419388",
"0.7419388",
"0.7416596",
"0.73027986",
"0.71258956",
"0.71041834",
"0.7048602",
"0.6874758",
"0.68362963",
"0.6821392",
"0.6777845",
"0.6715972",
"0.6657224",
"0.6510108",
"0.6402245",
"0.634065",
"0.634065",
"0.6271006",
"0.6240057",
... | 0.76382434 | 1 |
Get positions associated with this trajectory. | def FBNX(YKHO, cuiw):
FBNX = cuiw.query(_d44.position_x, _d44.position_y, _d44.position_z).filter(_d44.id.between(YKHO.start_timepoint_id, YKHO.end_timepoint_id))
return oyIN.array(FBNX.all()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wJ89(YKHO):\n return YKHO.positions",
"def FBNX(YKHO) -> wMyT:\n return YKHO._positions",
"def wJ89(YKHO):\n return oyIN.array([XP5J.position for XP5J in YKHO.particles])",
"def FBNX(YKHO) -> x1iM[f7Q3]:\n return YKHO._positions",
"def dopZ(YKHO):\n return YKHO._read(xooG)",
"def wJ89(... | [
"0.84711593",
"0.8203754",
"0.79634273",
"0.7848154",
"0.7775634",
"0.7673052",
"0.7620762",
"0.76060194",
"0.7578538",
"0.754801",
"0.7509511",
"0.7438377",
"0.72961754",
"0.7236715",
"0.7198844",
"0.71925884",
"0.7185704",
"0.71019137",
"0.7048299",
"0.7012711",
"0.698081",... | 0.7812257 | 4 |
Get velocities associated with this trajectory. | def ojhJ(YKHO, cuiw):
ojhJ = cuiw.query(_d44.velocity_x, _d44.velocity_y, _d44.velocity_z).filter(_d44.id.between(YKHO.start_timepoint_id, YKHO.end_timepoint_id))
return oyIN.array(ojhJ.all()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def L2IE(YKHO):\n return oyIN.array([XP5J.velocity for XP5J in YKHO.particles])",
"def qQbh(YKHO):\n return YKHO._read(FqGG)",
"def p8Jz(YKHO):\n return YKHO._vel.to_list()",
"def ojhJ(YKHO, bYKb=False):\n if bYKb:\n return YKHO.si_values()[3:6]\n return [YKHO.v_r, YKHO.v_t, YKHO.v_p]",... | [
"0.80992746",
"0.7651511",
"0.75910735",
"0.7439461",
"0.7437422",
"0.7411741",
"0.7396428",
"0.73263454",
"0.69972074",
"0.696681",
"0.6852393",
"0.6852393",
"0.6658361",
"0.65947944",
"0.6468669",
"0.6456955",
"0.6335266",
"0.63252604",
"0.6323118",
"0.6269025",
"0.62665343... | 0.8118398 | 0 |
Create a Flask application using the app factory pattern. | def LUif():
P4t4 = L2w0(__name__)
gCuF = {'DEBUG': True, 'WEBPACK_MANIFEST_PATH': './build/manifest.json', 'SECRET_KEY': 'the quick brown fox jumps over the lazy dog', 'SQLALCHEMY_DATABASE_URI': 'sqlite:///db.sqlite', 'SQLALCHEMY_COMMIT_ON_TEARDOWN': True, 'UPLOAD_FOLDER': XKCD, 'ALLOWED_EXTENSIONS': set(['txt'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LUif():\n P4t4 = L2w0(__name__)\n P4t4.config.from_object('app.configs.config')\n P4t4.config.from_object('app.configs.settings')\n return P4t4",
"def LUif(GPtr=PSrQ):\n P4t4 = L2w0(__name__)\n P4t4.config.from_object(GPtr)\n NCls.init_app(P4t4)\n nNXP.init_app(P4t4)\n fHeP.init_ap... | [
"0.8629991",
"0.8587432",
"0.8567094",
"0.8560846",
"0.8548992",
"0.8533256",
"0.8532855",
"0.85154873",
"0.8468547",
"0.84618294",
"0.84501874",
"0.8400496",
"0.83925307",
"0.8380182",
"0.8366697",
"0.8356823",
"0.8333603",
"0.83313555",
"0.8325678",
"0.8316702",
"0.8298241"... | 0.76400965 | 99 |
Returns the prefix of 'fork_proof' until first common block with 'proof' (included) and the index of the first common block in 'proof' | def gXeV(YKHO, XwK4, A2ts):
Txb3 = 0
iPpc = []
for MKlR, KCHu in A2ts:
iPpc.append((MKlR, KCHu))
d6pt = YKHO.header_in_proof(MKlR, XwK4)
if d6pt >= 0:
Txb3 = d6pt
break
return (iPpc, Txb3) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BOv5(YKHO, tUIE, J2JC, bmLl):\n return YKHO.proof_dir() + 'proof_' + str(tUIE) + '_-' + str(J2JC) + '_+' + str(bmLl) + '.pkl'",
"def fQFq(HtBp):\n XwK4 = HtBp + 1\n while (XwK4 + HtBp) % 7 != 0:\n XwK4 += 1\n return XwK4",
"def KVND(XwK4, ZVIo):\n DNiN = XwK4[ZVIo][0]\n KmFC = oYhX... | [
"0.6036129",
"0.56677",
"0.55868095",
"0.5318388",
"0.5290814",
"0.5212556",
"0.5109114",
"0.50985086",
"0.5083289",
"0.50599456",
"0.5046585",
"0.50303346",
"0.4998983",
"0.49905926",
"0.49814957",
"0.4972389",
"0.49185932",
"0.48938513",
"0.48541486",
"0.48350638",
"0.48179... | 0.69225454 | 0 |
Inicializa os atributos first_name, last_name, birthday, username | def FIMM(YKHO, c9ua, zp3f, Kb0M, NtEF):
YKHO.first_name = c9ua
YKHO.last_name = zp3f
YKHO.birthday = Kb0M
YKHO.username = NtEF
YKHO.login_attempts = 0
YKHO.age = YKHO.set_birthday() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, c9ua, zp3f, D3lj, HL10, BaHi):\n YKHO.first_name = c9ua\n YKHO.last_name = zp3f\n YKHO.email = D3lj\n YKHO.mobile = HL10\n YKHO.user_name = BaHi",
"def FIMM(YKHO, c9ua, zp3f, ZJe_, EE3v):\n YKHO.first_name = c9ua\n YKHO.last_name = zp3f\n YKHO.age = ZJe_\n YKHO.gender = ... | [
"0.72359663",
"0.6952287",
"0.6933373",
"0.6933373",
"0.6903471",
"0.6882865",
"0.6835947",
"0.68204296",
"0.6761467",
"0.6761467",
"0.6761467",
"0.6761467",
"0.6761467",
"0.6761467",
"0.6761467",
"0.6761467",
"0.6741649",
"0.67281073",
"0.6722837",
"0.6678801",
"0.66787654",... | 0.74937445 | 0 |
Initialize the RoBERTa weights for pretraining from scratch. | def DGqa(yR_P):
if isinstance(yR_P, ht2j.nn.Linear):
yR_P.weight.data.normal_(mean=0.0, std=0.02)
if yR_P.bias is not None:
yR_P.bias.data.zero_()
if isinstance(yR_P, ht2j.nn.Embedding):
yR_P.weight.data.normal_(mean=0.0, std=0.02)
if yR_P.padding_idx is not None:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C0Lv(YKHO):\n pass",
"def sTi3(YKHO):\n dIoi.WeightsInitializer.initialize_layer_or_model(YKHO._batch)",
"def vB93(YKHO, mL4f=None):\n YKHO.online_backbone.init_weights()\n for r5E1 in YKHO.online_necks:\n r5E1.init_weights(init_linear='kaiming')\n for l8gS, wq_d in zip(YKHO.online_ba... | [
"0.759782",
"0.75005144",
"0.7489344",
"0.74103695",
"0.7356487",
"0.7306913",
"0.7301942",
"0.7244464",
"0.7244009",
"0.72021514",
"0.7183205",
"0.71815354",
"0.71640164",
"0.70826256",
"0.70263875",
"0.7012906",
"0.7001938",
"0.6962845",
"0.6946414",
"0.69345844",
"0.691405... | 0.0 | -1 |
Return an accumulator function that takes a single numeric argument and accumulates that argument into total, then returns total. >>> acc = make_accumulator() >>> acc(15) 15 >>> acc(10) 25 >>> acc2 = make_accumulator() >>> acc2(7) 7 >>> acc3 = acc2 >>> acc3(6) 13 >>> acc2(5) 18 >>> acc(4) 29 | def bMpl():
sum = []
def alQJ(WKvO):
sum.append(WKvO)
wjRY = 0
for LihS in sum:
wjRY += LihS
return wjRY
return alQJ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bMpl():\n pass",
"def k06t(YKHO):\n raise NotImplementedError",
"def GzH2():\n wjRY = 0\n\n def ksZE(WKvO):\n nonlocal total\n wjRY = wjRY + WKvO\n return wjRY\n return ksZE",
"def pD6w(Jt4_, P8oC, exwG, OXAZ):\n wjRY, G1Hx = (P8oC, 1)\n while G1Hx <= exwG:\n ... | [
"0.69172853",
"0.6434933",
"0.6258502",
"0.6211058",
"0.612421",
"0.612421",
"0.6039905",
"0.6028204",
"0.60177207",
"0.59702575",
"0.59314597",
"0.5864398",
"0.580567",
"0.5756715",
"0.5719138",
"0.5702417",
"0.56508857",
"0.5623562",
"0.5620629",
"0.54984903",
"0.54888505",... | 0.75680274 | 0 |
Return an accumulator function that takes a single numeric argument and accumulates that argument into total, then returns total. >>> acc = make_accumulator_nonlocal() >>> acc(15) 15 >>> acc(10) 25 >>> acc2 = make_accumulator_nonlocal() >>> acc2(7) 7 >>> acc3 = acc2 >>> acc3(6) 13 >>> acc2(5) 18 >>> acc(4) 29 | def GzH2():
wjRY = 0
def ksZE(WKvO):
nonlocal total
wjRY = wjRY + WKvO
return wjRY
return ksZE | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bMpl():\n sum = []\n\n def alQJ(WKvO):\n sum.append(WKvO)\n wjRY = 0\n for LihS in sum:\n wjRY += LihS\n return wjRY\n return alQJ",
"def bMpl():\n pass",
"def k06t(YKHO):\n raise NotImplementedError",
"def B0gN(WKvO):\n alQJ.append(1)\n return ... | [
"0.72292084",
"0.6776719",
"0.6225273",
"0.6104024",
"0.60464644",
"0.58669615",
"0.5792564",
"0.5581595",
"0.55052733",
"0.5468486",
"0.5432375",
"0.54273343",
"0.53780293",
"0.5372026",
"0.53283644",
"0.529984",
"0.529984",
"0.5293362",
"0.5284647",
"0.52454",
"0.52083284",... | 0.8228942 | 0 |
Initialize the model. Weights are initialized to small random values and biases are initialized to zero. Weights and biases are stored in the | def FIMM(YKHO, zi3C, wjbX, a6Jb, M1Jx=0.0001):
YKHO.params = {}
YKHO.params['W1'] = M1Jx * oyIN.random.randn(zi3C, wjbX)
YKHO.params['b1'] = oyIN.zeros(wjbX)
YKHO.params['W2'] = M1Jx * oyIN.random.randn(wjbX, a6Jb)
YKHO.params['b2'] = oyIN.zeros(a6Jb) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vB93(YKHO) -> None:\n U78l.init.kaiming_normal_(YKHO._U)\n U78l.init.kaiming_normal_(YKHO._W)\n U78l.init.kaiming_normal_(YKHO._V)\n U78l.init.normal_(YKHO._b)",
"def vB93(C3ST):\n ...",
"def C0Lv(YKHO):\n pass",
"def CtUP(YKHO):\n YKHO.w = -1 + 2 * oyIN.random.rand(YKHO.num_of_input... | [
"0.76824474",
"0.7617724",
"0.75832707",
"0.7547074",
"0.7516082",
"0.74999434",
"0.74890685",
"0.7443786",
"0.74371445",
"0.7393023",
"0.73923856",
"0.73923856",
"0.73923856",
"0.7347765",
"0.73190415",
"0.7305585",
"0.7300658",
"0.7296879",
"0.7293287",
"0.72304404",
"0.720... | 0.0 | -1 |
Reshape a 4D tensor of image data to a grid for easy visualization. | def dCWp(sIOC, h7aq=255.0, dvgN=1):
ywwl, C7Ls, XcU5, Nq1b = sIOC.shape
U4F5 = int(lO1m(PZyS(ywwl)))
IDGo = C7Ls * U4F5 + dvgN * (U4F5 - 1)
v5wB = XcU5 * U4F5 + dvgN * (U4F5 - 1)
Cs6h = oyIN.zeros((IDGo, v5wB, Nq1b))
IZ2i = 0
nxyw, si3g = (0, C7Ls)
for LVAh in range(U4F5):
nJ9F, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fK3f(YKHO, nPrm):\n Csk6 = oyIN.zeros((32, 32, 3))\n gTJx = nPrm[0:1024].reshape(32, 32)\n uJVk = nPrm[1024:2048].reshape(32, 32)\n Xf5N = nPrm[2048:].reshape(32, 32)\n for MKlR in range(32):\n for yzQ0 in range(32):\n for Z9rn in range(3):\n if Z9rn == 0:\n ... | [
"0.69275147",
"0.68927044",
"0.66429174",
"0.66399515",
"0.6569427",
"0.65163445",
"0.64027023",
"0.63976663",
"0.6344992",
"0.63068163",
"0.62804306",
"0.6278322",
"0.62271667",
"0.6149602",
"0.6141104",
"0.61091465",
"0.608741",
"0.60288805",
"0.5931444",
"0.5919866",
"0.59... | 0.0 | -1 |
Tokenize text. Checks for add_prefix_space; handles accordingly. | def kLcZ(YKHO, l5Ny: str) -> x1iM[str]:
if YKHO.add_prefix_space:
l5Ny = f' {l5Ny}'
_Roc = 1
zs9G = 0
Zoh6: x1iM[AzJI[str, int]] = [(l5Ny, zs9G)]
for jubr in YKHO._special_tokens.keys():
YRbF = 0
while YRbF < len(Zoh6):
Ndlv, jGRS = Zoh6[YRbF]
if jGRS ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wr3U(l5Ny):\n return l5Ny.split(' ')",
"def wr3U(YKHO, l5Ny):\n l5Ny = eIAz(l5Ny)\n pRF9 = []\n for eOtH in R_0c(l5Ny):\n gLiZ = list(eOtH)\n if len(gLiZ) > YKHO.max_input_chars_per_word:\n pRF9.append(YKHO.unk_token)\n continue\n fyuJ = False\n y... | [
"0.69731855",
"0.69462204",
"0.67840964",
"0.6744452",
"0.6723315",
"0.6636732",
"0.6613293",
"0.66086936",
"0.6586379",
"0.64890635",
"0.6482547",
"0.64719623",
"0.6459763",
"0.64515984",
"0.6450444",
"0.6432965",
"0.64255637",
"0.639371",
"0.63857424",
"0.6384636",
"0.63830... | 0.0 | -1 |
Tokenize using Gpt2 BPE tokenizer. | def p2vp(YKHO, l5Ny: str):
return YKHO.bpe_tokenize(l5Ny) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wr3U(YKHO, l5Ny):\n if YKHO.type == 'gpt2':\n return YKHO._tokenizer.tokenize(l5Ny)\n if YKHO.type == 'bpe':\n return YKHO._tokenizer.EncodeAsPieces(l5Ny)",
"def NInT(YKHO, l5Ny):\n cgWS = []\n for eOtH in ZbWC.findall(YKHO.pat, l5Ny):\n cgWS.extend([a1PO for a1PO in YKHO.bpe... | [
"0.687929",
"0.67572945",
"0.64769626",
"0.6442713",
"0.6226997",
"0.6158872",
"0.6085537",
"0.60330755",
"0.59015256",
"0.58886445",
"0.5860805",
"0.57932",
"0.57040703",
"0.5693508",
"0.56695867",
"0.5667489",
"0.56334084",
"0.5624651",
"0.5618376",
"0.5615",
"0.5604609",
... | 0.7900036 | 0 |
Return a sequence of BPEtokens from the text. | def uJBf(YKHO, l5Ny: str) -> x1iM[str]:
return YKHO.bpe.encode(l5Ny) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NInT(YKHO, l5Ny):\n cgWS = []\n for eOtH in ZbWC.findall(YKHO.pat, l5Ny):\n cgWS.extend([a1PO for a1PO in YKHO.bpe(eOtH).split(' ')])\n return cgWS",
"def NInT(YKHO, l5Ny: str) -> x1iM[str]:\n s2mk = []\n for eOtH in ZbWC.findall(YKHO._pat, l5Ny):\n s2mk.extend((xAmD for xAmD in ... | [
"0.84533674",
"0.79552776",
"0.75899315",
"0.7553431",
"0.7354912",
"0.72681004",
"0.71521646",
"0.7140753",
"0.6992216",
"0.6924547",
"0.6887083",
"0.68444735",
"0.68028706",
"0.67906797",
"0.6781835",
"0.6773047",
"0.6723961",
"0.67196184",
"0.66787004",
"0.66550314",
"0.66... | 0.79793483 | 1 |
Convert a vector of IDs to a string. Converts a vector (iterable of ints) into a string, with each token separated by the delimiter (default ``' '``). | def wl5K(YKHO, iArr: List[int]) -> str:
s2mk = [YKHO._index_lookup(or8S) for or8S in iArr]
l5Ny = YKHO.bpe.decode(s2mk)
return l5Ny | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sIoH(iArr):\n KS8l = '['\n for YRbF in iArr:\n KS8l += str(YRbF) + ', '\n KS8l = KS8l[:-2] + ']'\n return KS8l",
"def ddrW(he6J):\n zFiD = ''\n for Ty9i in he6J:\n zFiD += str(Ty9i) + ','\n return zFiD[:-1]",
"def mOvs(VxB1):\n if len(VxB1) == 1:\n return '{:d}'... | [
"0.71467876",
"0.7004644",
"0.69701",
"0.65466064",
"0.6472608",
"0.6381667",
"0.63486797",
"0.62186414",
"0.61884373",
"0.615916",
"0.6129425",
"0.60274935",
"0.600327",
"0.5985542",
"0.5984306",
"0.5948397",
"0.5932644",
"0.59297",
"0.5923613",
"0.5906003",
"0.5897926",
"... | 0.5421353 | 59 |
Get path to device Returns | def pmON(YKHO):
return YKHO._path | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def smW4(YKHO):\n return YKHO._engine.device_path()",
"def smW4(YKHO):\n return YKHO._device_path",
"def Od5p(YKHO, qoLw):\n uMf9 = YKHO._get_mount_path(qoLw)\n return Hy7s.path.join(uMf9, qoLw['data']['name'])",
"def iG_d(YKHO):\n return YKHO._character_device_path",
"def E0XI(begE):\n i... | [
"0.8567297",
"0.8357072",
"0.759747",
"0.7507442",
"0.7399353",
"0.730129",
"0.71707857",
"0.7139689",
"0.7110824",
"0.6956383",
"0.6900391",
"0.66961676",
"0.6638523",
"0.6578572",
"0.6568287",
"0.6556761",
"0.65145344",
"0.65145344",
"0.6507716",
"0.6498858",
"0.6494834",
... | 0.0 | -1 |
Test that an attempt to add a topic by an unauthenticated user fails | def bnbo(YKHO):
YlPN = {'name': 'PostedTopic'}
geh0 = YKHO.client.post('/topics/', YlPN, format='json')
YKHO.assertEqual(geh0.status_code, jGRS.HTTP_401_UNAUTHORIZED) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WPs3(YKHO):\n YlPN = {'name': 'PostedTopic'}\n YKHO.client.credentials(HTTP_AUTHORIZATION='Token ' + YKHO.free_token.key)\n geh0 = YKHO.client.post('/topics/', YlPN, format='json')\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_403_FORBIDDEN)\n YKHO.client.credentials(HTTP_AUTHORIZATION='Token '... | [
"0.7691029",
"0.7420523",
"0.73918724",
"0.7241643",
"0.7239827",
"0.71022105",
"0.69290817",
"0.6843764",
"0.67550004",
"0.6744476",
"0.66760015",
"0.6582037",
"0.65727323",
"0.64932996",
"0.64806724",
"0.64806235",
"0.64461315",
"0.64250994",
"0.6414499",
"0.64098954",
"0.6... | 0.8186521 | 0 |
Check that an authenticated user can access a topic | def lVfJ(YKHO):
YKHO.client.credentials(HTTP_AUTHORIZATION='Token ' + YKHO.free_token.key)
geh0 = YKHO.client.get('/topic/Topic 1/', format='json')
nPrm = qQXR.loads(geh0.content)
YKHO.assertEqual(geh0.status_code, jGRS.HTTP_200_OK)
YKHO.assertEqual(nPrm['name'], 'Topic 1')
YKHO.assertEqual(nPrm... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hnyJ(YKHO):\n YKHO.client.credentials(HTTP_AUTHORIZATION='Token ' + YKHO.free_token.key)\n geh0 = YKHO.client.get('/topics/', format='json')\n nPrm = qQXR.loads(geh0.content)\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_200_OK)\n YKHO.assertEqual(nPrm['count'], 3)\n YKHO.assertTrue({'name':... | [
"0.70851797",
"0.70010316",
"0.70010316",
"0.6946185",
"0.6940789",
"0.6892911",
"0.67047775",
"0.66921407",
"0.66921407",
"0.66921407",
"0.651007",
"0.6436121",
"0.6401158",
"0.633687",
"0.63004017",
"0.6274719",
"0.624575",
"0.6241417",
"0.62304896",
"0.62040776",
"0.620178... | 0.68443596 | 6 |
Gets the current organization | def yu6g(YKHO):
return OqHK.deserialize(YKHO._get_single('org', {}, from_results=False)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wbiw(YKHO):\n return YKHO._tower.get_organization_by_id(YKHO._data.get('organization'))",
"def PI_r(YKHO):\n return YKHO.reference[Issx][NNfF]",
"def jOes(QePW):\n if QePW.organization:\n return QePW.organization.slug\n else:\n return None",
"def pBok(YKHO):\n return _VfD.Mod... | [
"0.8365602",
"0.83431554",
"0.78126556",
"0.78037596",
"0.76222175",
"0.7610173",
"0.7515312",
"0.7285391",
"0.7284314",
"0.72149926",
"0.72015625",
"0.714974",
"0.7137949",
"0.7126743",
"0.6982778",
"0.6981135",
"0.6948353",
"0.69405967",
"0.69192415",
"0.6896074",
"0.689607... | 0.7455882 | 7 |
Updates the configuration information in the catalog. | def YYiC():
hPIx = JfWB.DbURL()
w2B8 = JfWB.connect(hPIx, utility=True)
bo34.info('Updating catalog...')
Pe9W = 'SELECT gp_activate_standby()'
JfWB.execSQL(w2B8, Pe9W)
w2B8.commit()
w2B8.close()
bo34.info('Database catalog updated successful') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H3IP(YKHO):\n pass",
"def QdZT(YKHO):\n YKHO.save_config_file()",
"def hZhS(YKHO, GPtr):\n for RcQu in YKHO.plugins:\n for H5ew in YKHO.plugins[RcQu]:\n YKHO.plugins[RcQu][H5ew].config(what='set', params=GPtr)\n return",
"def QdZT(YKHO, _fuv):\n YKHO._update(_fuv, allow_n... | [
"0.6957198",
"0.6939233",
"0.6549464",
"0.650648",
"0.6373588",
"0.6360476",
"0.6249494",
"0.6162477",
"0.61604637",
"0.61403096",
"0.61029786",
"0.60967916",
"0.60956615",
"0.60859114",
"0.60628897",
"0.599833",
"0.5945838",
"0.5919373",
"0.588443",
"0.5877999",
"0.58527386"... | 0.66104096 | 2 |
Checks if the gpsyncmaster process is running. | def qwYn(xAU6):
return U_NH.getSyncmasterPID('localhost', xAU6.master_data_dir) > 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mrMd(YKHO):\n if not YKHO.hasBeenStarted():\n return False\n if not YKHO._slave_dhcp_client_proc.poll():\n return False\n for Ii1o in YKHO._all_processes_pid:\n if not YKHO._checkPid(Ii1o):\n return False\n return True",
"def WTIh(YKHO):\n if YKHO._process and Y... | [
"0.7660873",
"0.7509967",
"0.74740016",
"0.73999083",
"0.7362178",
"0.73276377",
"0.73108155",
"0.72690094",
"0.72119063",
"0.7155337",
"0.71464986",
"0.7123168",
"0.7106698",
"0.71064216",
"0.7092272",
"0.7004716",
"0.6997182",
"0.69735944",
"0.69693404",
"0.6948965",
"0.694... | 0.82756114 | 0 |
Determines if we are running inside of a gunicorn process. | def lbP3():
Lyf3 = False
try:
if hasattr(HwRy, 'argv'):
for d7pR in HwRy.argv:
if d7pR.find('gunicorn') >= 0:
Lyf3 = True
elif Hy7s.path.isfile('/proc/self/cmdline'):
with open('/proc/self/cmdline') as HCmI:
kGys = HCmI.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b3qr():\n if Hy7s.name == 'nt':\n print('Sorry, gunicorn is not available on windows')\n exit(1)\n dmBS = LTte(config=None)\n dmBS.run()",
"def mC5R(YKHO):\n return BfDw.ProcessIsRunning(YKHO._gocode_handle)",
"def F_9j():\n return xw_P() or WeQ1()",
"def GZs6():\n rIZE = ... | [
"0.6328807",
"0.6025046",
"0.59816766",
"0.59427446",
"0.59371257",
"0.59124607",
"0.5765382",
"0.5760677",
"0.57023394",
"0.56423384",
"0.561056",
"0.56010705",
"0.55936104",
"0.55420935",
"0.55373627",
"0.55339676",
"0.551627",
"0.54778796",
"0.544401",
"0.54347944",
"0.543... | 0.87763053 | 0 |
combines lists into a single string | def gat9(rrSk):
AVC_ = ' '.join(rrSk)
return AVC_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def whrw(list):\n vIwR = ''\n for WKvO in list:\n vIwR = vIwR + str(WKvO)\n return vIwR",
"def vxch(YKHO, list) -> str:\n vIwR = ''\n for U6D_ in list:\n vIwR = vIwR + str(U6D_) + '\\n'\n return vIwR",
"def sCS9(aPd6):\n o4sw = ''\n for WKvO in aPd6:\n o4sw += str(W... | [
"0.76283526",
"0.734844",
"0.7332902",
"0.7294538",
"0.72431105",
"0.720123",
"0.7179508",
"0.71750575",
"0.7139563",
"0.71107775",
"0.7063473",
"0.70395356",
"0.70255876",
"0.70049584",
"0.70037574",
"0.69663775",
"0.6953621",
"0.6948518",
"0.6921201",
"0.69114035",
"0.69067... | 0.0 | -1 |
Constructor registers required visa name and resource manager handle as class attributes. Initiates device handle to None | def FIMM(YKHO, TquA, jAz9):
YKHO.rm = TquA
YKHO.visaName = jAz9
YKHO.handle = None
YKHO.timeout = 5 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, dKpx):\n YKHO.device_handle = dKpx",
"def FIMM(YKHO):\n YKHO._device_info = None",
"def FIMM(YKHO):\n import visa\n TquA = visa.ResourceManager()\n pan_ = 'Agilent Technologies,8163B,MY48208514,V5.25(72637)'\n for M4N3 in TquA.list_resources():\n try:\n p4_k =... | [
"0.7202857",
"0.6961231",
"0.68139666",
"0.67441726",
"0.67354673",
"0.66945916",
"0.6592244",
"0.6453252",
"0.6446044",
"0.64066863",
"0.6369176",
"0.6369086",
"0.63621855",
"0.6310466",
"0.6266502",
"0.62636983",
"0.6247163",
"0.6246054",
"0.62321836",
"0.62283134",
"0.6215... | 0.6304306 | 14 |
Provide a "zero value" for the type, compatible in dimensions with the provided ``value`` (e.g., a zero vector) | def sbx9(YKHO, BWXx):
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CppX(YKHO, ROpF):\n return XTiz.zeros(ROpF, dtype=YKHO.dtype)",
"def tZV7(YKHO):\n YKHO.piDD = {'[0]': None}\n YKHO.top_node = '[0]'\n YKHO.dim = 0",
"def TxWX(yDqo=None):\n return RIrr(0.0, dtype=yDqo)",
"def hkxX(BWXx, ROpF, yDqo=nMvt.floatx()):\n return BWXx * pSfY(ROpF, yDqo)",
"d... | [
"0.6850535",
"0.66939825",
"0.6570053",
"0.6426577",
"0.6379816",
"0.63710946",
"0.63710946",
"0.63077116",
"0.62514496",
"0.6235996",
"0.619775",
"0.6151911",
"0.6130113",
"0.61229855",
"0.61035347",
"0.6096001",
"0.60484684",
"0.60484684",
"0.6041714",
"0.60417014",
"0.6019... | 0.77672267 | 0 |
Return the ghost position considered most likely by our current model. | def zhVf(YKHO):
GAR0 = None
YFl7 = None
KHbn = YKHO.getBeliefDistribution()
for Q7me in YKHO.particles:
kahN = KHbn[Q7me]
if GAR0 is None or kahN > YFl7:
GAR0 = Q7me
YFl7 = kahN
return GAR0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vt5M(YKHO, Ov5A):\n icVf = [Ov5A.getAgentState(YRbF) for YRbF in YKHO.getOpponents(Ov5A)]\n komd = [jzdc for jzdc in icVf if not jzdc.isPacman and jzdc.getPosition() != None]\n oUFT = YKHO.getCurrentObservation().getAgentState(YKHO.index).getPosition()\n if len(komd) > 0:\n kZIt = 9999\n ... | [
"0.68020844",
"0.6776744",
"0.6767892",
"0.6739302",
"0.6678001",
"0.6666229",
"0.6541564",
"0.6426933",
"0.6425937",
"0.6425727",
"0.6425727",
"0.64240336",
"0.6415314",
"0.64045924",
"0.63838553",
"0.6369763",
"0.63661844",
"0.63661844",
"0.63621676",
"0.63343173",
"0.63260... | 0.60919905 | 59 |
Sets the first_name of this ApiCreateUser. | def c9ua(YKHO, c9ua):
YKHO._first_name = c9ua | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Lnj8(YKHO, c9ua):\n YKHO.first_name = c9ua",
"def c9ua(YKHO, mWFP):\n YKHO._first_name = mWFP",
"def c9ua(YKHO, c9ua):\n if c9ua is None:\n raise ValueError('Invalid value for `first_name`, must not be `None`')\n YKHO._first_name = c9ua",
"def c9ua(YKHO, c9ua: str):\n if c9ua is Non... | [
"0.82840514",
"0.7804813",
"0.75748736",
"0.7562617",
"0.7468363",
"0.7468363",
"0.70900446",
"0.7012503",
"0.696567",
"0.6706558",
"0.6632535",
"0.6489563",
"0.6449575",
"0.64358115",
"0.6351745",
"0.6351745",
"0.6290188",
"0.6268522",
"0.6268522",
"0.6268522",
"0.6268137",
... | 0.78500754 | 9 |
Sets the last_name of this ApiCreateUser. | def zp3f(YKHO, zp3f):
YKHO._last_name = zp3f | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zsQz(YKHO, zp3f):\n YKHO.last_name = zp3f",
"def DHa6(YKHO, jBHA):\n YKHO.lastname = jBHA\n return YKHO",
"def jBHA(YKHO, jBHA):\n YKHO._lastname = jBHA",
"def zp3f(YKHO, mWFP):\n YKHO._last_name = mWFP",
"def zp3f(YKHO, zp3f: str):\n if zp3f is None:\n raise ValueError('Invali... | [
"0.7899366",
"0.7581795",
"0.7336264",
"0.7335938",
"0.7281499",
"0.6923646",
"0.6601541",
"0.6590861",
"0.64360315",
"0.64360315",
"0.63050866",
"0.6298679",
"0.6230194",
"0.6146401",
"0.61400867",
"0.61277753",
"0.6077291",
"0.6077291",
"0.6077291",
"0.6077291",
"0.60676694... | 0.75508946 | 10 |
Sets the password of this ApiCreateUser. | def jTXt(YKHO, jTXt):
YKHO._password = jTXt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def G3s8(YKHO, jTXt):\n YKHO.password = B8ni.generate_password_hash(jTXt)",
"def G3s8(YKHO, jTXt):\n YKHO.password = jTXt",
"def G3s8(YKHO, jTXt):\n YKHO.password = vT87(jTXt)",
"def G3s8(YKHO, jTXt):\n YKHO.authentication.password = jTXt",
"def G3s8(YKHO, jTXt):\n YKHO.PASSWORD = jTXt",
"... | [
"0.7569658",
"0.75412476",
"0.7529651",
"0.7424518",
"0.74234474",
"0.740829",
"0.7384946",
"0.73749655",
"0.73749655",
"0.73473185",
"0.73174644",
"0.7258208",
"0.72026306",
"0.72016877",
"0.7187275",
"0.7134158",
"0.70616955",
"0.7016133",
"0.7015449",
"0.70122325",
"0.7012... | 0.71415734 | 18 |
Sets the status of this ApiCreateUser. | def jGRS(YKHO, jGRS):
if YKHO.local_vars_configuration.client_side_validation and jGRS is None:
raise ValueError('Invalid value for `status`, must not be `None`')
BbPm = ['active', 'locked', 'disabled', 'changepassword']
if YKHO.local_vars_configuration.client_side_validation and jGRS not in BbPm:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def w8Lw(YKHO, jGRS):\n YKHO.status = jGRS",
"def w8Lw(YKHO, jGRS):\n YKHO.status = jGRS",
"def w8Lw(YKHO, jGRS):\n YKHO.status = jGRS",
"def w8Lw(YKHO, jGRS):\n YKHO.status = jGRS",
"def zgTk(YKHO):\n pass",
"def gYPd(YKHO, jGRS):\n YKHO.status = jGRS",
"def jGRS(YKHO, jGRS):\n YK... | [
"0.65133536",
"0.65133536",
"0.65133536",
"0.63500416",
"0.62891114",
"0.62697387",
"0.62640774",
"0.62640774",
"0.62640774",
"0.62640774",
"0.62640774",
"0.62640774",
"0.62640774",
"0.62640774",
"0.62640774",
"0.62640774",
"0.62640774",
"0.62640774",
"0.62640774",
"0.62640774"... | 0.62241644 | 36 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, UhzC):
return False
return YKHO.to_dict() == Elif.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
if not isinstance(Elif, UhzC):
return True
return YKHO.to_dict() != Elif.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.8456082",
"0.83912885",
"0.81436425",
"0.81406975",
"0.8131807",
"0.8093013",
"0.80912536",
"0.80912536",
"0.80912536",
"0.8084505",
"0.8084505",
"0.8075543",
"0.8075543",
"0.8065009",
"0.80417395",
"0.80417395",
"0.80417395",
"0.80417395",
"0.80417395",
"0.80417395",
"0.8... | 0.0 | -1 |
Get bookmark counts per domain for a set of bookmarks. | def jpWK(YXPh: Iterator[sqlite3.Row]) -> cuzp[str, int]:
BWz1 = {}
for _Qdr in YXPh:
H5ew = _Qdr['url'].display_domain
if H5ew not in BWz1:
BWz1[H5ew] = CnSx.engine.publish('bookmarks:domaincount', _Qdr['url']).pop()
return BWz1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XSfc(QePW):\n jjDm = zPMs.count()\n iQDW = zPMs.count(distinct=True)\n return JbNc(QePW, {'count': jjDm, 'unique_count': iQDW})",
"def UVoG(YKHO, bD7m: Url) -> int:\n Pe9W = 'SELECT count(*) FROM bookmarks WHERE domain=?'\n if 'reddit.com' not in bD7m.domain:\n UHFx = YKHO._selectFirst(... | [
"0.6782979",
"0.61377466",
"0.61032593",
"0.56535363",
"0.5621936",
"0.5609579",
"0.5579951",
"0.53599304",
"0.5348809",
"0.53208125",
"0.5319914",
"0.5318016",
"0.53063786",
"0.52663606",
"0.52474993",
"0.52397895",
"0.5204962",
"0.5179946",
"0.51618093",
"0.51443076",
"0.51... | 0.8372352 | 0 |
Priority Queue constructor method. | def FIMM(YKHO):
YKHO.dict = {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Rdbh():\n from src.priorityq import PriorityQueue\n Rdbh = PriorityQueue()\n return Rdbh",
"def FIMM(YKHO, *qIxc):\n VQ6Z = _VfD.new_Priority(*qIxc)\n try:\n YKHO.this.append(VQ6Z)\n except:\n YKHO.this = VQ6Z",
"def FIMM(YKHO, G1Hx, WKvO, LVAh):\n YKHO.x = WKvO\n YKHO... | [
"0.7677465",
"0.7296557",
"0.7251821",
"0.71273446",
"0.7078991",
"0.70632946",
"0.7032628",
"0.6940273",
"0.68929386",
"0.6870056",
"0.68341726",
"0.6800709",
"0.6763921",
"0.6734797",
"0.6728725",
"0.67237735",
"0.6715893",
"0.67144924",
"0.67118245",
"0.6703275",
"0.669239... | 0.0 | -1 |
Establish figure setup with subplots. | def Lydu(wytA, KB0O, e1Do=None, CDwc=None):
uuEx.set(style='whitegrid', font_scale=0.7, color_codes=True, palette='colorblind', rc={'grid.linestyle': 'dotted', 'axes.linewidth': 0.6})
if CDwc is None:
CDwc = []
if e1Do is None:
e1Do = dict()
eHNT = QrM1.figure(figsize=wytA, constrained_l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HpEB(YKHO):\n QrM1.figure(1)\n QrM1.clf()\n YKHO._tsne_window = QrM1.axes([0.05, 0.05, 0.4, 0.4])\n YKHO._main_window = QrM1.axes([0.05, 0.55, 0.4, 0.4])\n YKHO._sub_windows = []\n for rdlD in range(3):\n for fvDH in range(3):\n rxEN = QrM1.axes([0.5 + 0.17 * fvDH, 0.75 - 0.... | [
"0.76958567",
"0.749131",
"0.7275107",
"0.7181476",
"0.71661067",
"0.7017503",
"0.69431347",
"0.6824381",
"0.6815413",
"0.6813725",
"0.6806582",
"0.6789073",
"0.67691576",
"0.67462534",
"0.671325",
"0.6609621",
"0.65829384",
"0.65783787",
"0.6575226",
"0.65705746",
"0.6564328... | 0.6707028 | 15 |
Checks whether password is valid for user, tries to avoid timing attacks. | def _yej(NtEF: str, jTXt: str) -> bool:
CBIr = mv1M.query.filter_by(username=NtEF).first()
if CBIr is None:
vhgk = VrP3
else:
vhgk = CBIr.password
return z8jj(vhgk, jTXt) and CBIr is not None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EoXa(jTXt):\n pass",
"def SqNO(YKHO):\n RnXU = wsY0(''.join(['x' * int(YKHO.app.config['MAX_PWD_LEN'])]))\n UpdD(None, RnXU)",
"def tWk5(YKHO, jTXt):\n if YKHO.password_regex.search(jTXt) is not None:\n print('Correct password')\n return True\n else:\n print('Wrong passw... | [
"0.78246236",
"0.77548677",
"0.7628582",
"0.76030827",
"0.7587207",
"0.7578026",
"0.75390357",
"0.7538208",
"0.75296605",
"0.7492888",
"0.7476429",
"0.74678195",
"0.74333286",
"0.74327207",
"0.7426207",
"0.7418069",
"0.7412159",
"0.7401178",
"0.73902905",
"0.7372283",
"0.7369... | 0.0 | -1 |
Returns probability of variable taking on a "state" given "parentstates" This method is a simple lookup in the conditional probability table, it does not calculate anything. | def Q7Be(YKHO, QTBn, J3Q1):
if not isinstance(QTBn, int):
raise TypeError(f'Expected state to be of type int; got type {type(QTBn)}.')
if not isinstance(J3Q1, dict):
raise TypeError(f'Expected parentstates to be of type dict; got type {type(J3Q1)}.')
if QTBn >= YKHO.no_states:
raise ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hUTb(QTBn):\n XP5J = zRFr(QTBn['text'], QTBn['char_to_ix'], QTBn['frequency_statistics'], QTBn['transition_matrix'])\n return XP5J",
"def vjor(YKHO, aotE=None, PDj_=None):\n aotE = YKHO.getnodenamed(aotE)\n AU9z = YKHO.getnodenumberstates(aotE)\n yuWy = YKHO._numconditions(aotE)\n if yuWy =... | [
"0.6875037",
"0.6661049",
"0.65830684",
"0.65791667",
"0.6572518",
"0.65018827",
"0.6396448",
"0.63704896",
"0.62373734",
"0.6208282",
"0.60877115",
"0.607937",
"0.6071279",
"0.6066414",
"0.60638475",
"0.6032118",
"0.60280424",
"0.6021494",
"0.5988089",
"0.5937896",
"0.593785... | 0.876945 | 0 |
Adds an edge from one variable to another in the network. Both variables must have been added to the network before calling this method. | def rz7z(YKHO, pF3L, szaN):
if pF3L not in YKHO.variables.values():
raise ValueError('Parent variable is not added to list of variables.')
if szaN not in YKHO.variables.values():
raise ValueError('Child variable is not added to list of variables.')
YKHO.edges[pF3L].append(szaN) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rz7z(YKHO, hQHm, jlSq):\n pass",
"def rz7z(YKHO, CBRg, j9ly):\n CBRg.add_outgoing_node(j9ly)\n j9ly.add_incoming_node(CBRg)",
"def rz7z(YKHO, MxXY, cWFu, upAO):\n YKHO.edges[MxXY.identifier][cWFu.identifier] = upAO",
"def rz7z(YKHO, MxXY, cWFu, upAO):\n YKHO.edges[MxXY.identifier][cWFu.ide... | [
"0.74670506",
"0.737735",
"0.72625434",
"0.7254013",
"0.72430503",
"0.7241259",
"0.7221408",
"0.71802413",
"0.71552324",
"0.7141597",
"0.7111728",
"0.7102019",
"0.70838153",
"0.7078364",
"0.7075918",
"0.7069939",
"0.70667267",
"0.7059868",
"0.7045763",
"0.7039363",
"0.6991168... | 0.75098205 | 0 |
Create the PConvUnet. If variable data size, set data_rows and data_cols to None | def FIMM(YKHO, SpLS=128, Xt6n=128, ZVjn=None, VrcB=False, hR_b='default', EpYW=1):
YKHO.weight_filepath = ZVjn
YKHO.data_rows = SpLS
YKHO.data_cols = Xt6n
YKHO.img_overlap = 30
YKHO.inference_only = VrcB
YKHO.net_name = hR_b
YKHO.gpus = EpYW
assert YKHO.data_rows >= 64, 'Height must be >... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def p54D():\n g4y1 = X6a0((UrEU, eNs7, 1))\n j2cC = yHwh(32, (3, 3), activation='relu', padding='same')(g4y1)\n j2cC = yHwh(32, (3, 3), activation='relu', padding='same')(j2cC)\n HXYP = BzBX(pool_size=(2, 2))(j2cC)\n I7zk = yHwh(64, (3, 3), activation='relu', padding='same')(HXYP)\n I7zk = yHwh(6... | [
"0.6257657",
"0.6084616",
"0.59108645",
"0.5729787",
"0.56837165",
"0.5605725",
"0.55451787",
"0.5540791",
"0.55403966",
"0.5535931",
"0.5534691",
"0.55064917",
"0.54370636",
"0.53986883",
"0.5394083",
"0.5377542",
"0.53648275",
"0.53636694",
"0.5361258",
"0.5339088",
"0.5334... | 0.49907824 | 81 |
Count the number of rows in a data frame Return the data frame counting number of values each column of df | def UHFx(jQ3Z):
W6FC = dict()
for YRbF, fvDH in enumerate(jQ3Z.columns):
W6FC[fvDH] = jQ3Z[fvDH].count()
WPhc = rLdf.DataFrame(W6FC, index=['Count'])
return WPhc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ONUA(jQ3Z, BWXx=0, jDK_=0):\n return (jQ3Z == BWXx).astype(int).sum(axis=1 - jDK_)",
"def RTy5(YKHO):\n BLg0 = YKHO.df.shape\n DR2N = BLg0[0]\n return DR2N",
"def G5xC(jQ3Z, *qIxc):\n JLuc = {}\n for AAHb in qIxc:\n fvDH = jQ3Z[AAHb]\n for bTKY in fvDH:\n if bTKY ... | [
"0.7444141",
"0.7435567",
"0.7332497",
"0.725425",
"0.7079579",
"0.6984152",
"0.69706225",
"0.6946158",
"0.69371367",
"0.6873948",
"0.6821664",
"0.67707634",
"0.67120755",
"0.67061836",
"0.6700464",
"0.6686793",
"0.6677457",
"0.65922916",
"0.65912133",
"0.65431505",
"0.651771... | 0.82595336 | 0 |
Calculate quantile values (25%, 50%, 75%) of data in each column in a data frame Return the data frame calculating the quantile values of data in each column of df | def aM62(jQ3Z):
R2t6 = dict()
for YRbF, fvDH in enumerate(jQ3Z.columns):
R2t6[fvDH] = [jQ3Z[fvDH].quantile(0.25), jQ3Z[fvDH].quantile(0.5), jQ3Z[fvDH].quantile(0.75)]
RFS5 = rLdf.DataFrame(R2t6, index=['Quantile (25%)', 'Quantile (50%)', 'Quantile (75%)'])
rLdf.set_option('precision', 2)
ret... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qj6Z(jQ3Z, gqRb=0.1, ODP9=0.9):\n hbUd = jQ3Z.quantile(gqRb)\n iv7Q = jQ3Z.quantile(ODP9)\n print(hbUd)\n print(iv7Q)\n return (jQ3Z[jQ3Z < hbUd], jQ3Z[jQ3Z > iv7Q])",
"def PWTF(jQ3Z):\n E3D9 = jQ3Z.values.copy()\n T8ck = E3D9.argsort(axis=0)\n r8hN, exwG = E3D9.shape\n o7bE = oyIN... | [
"0.6923515",
"0.6755445",
"0.6726396",
"0.6712304",
"0.66732675",
"0.6672203",
"0.65379256",
"0.6515497",
"0.63787097",
"0.63745576",
"0.62693137",
"0.6257521",
"0.62258136",
"0.6215715",
"0.61886966",
"0.61278194",
"0.6097395",
"0.60973287",
"0.60827404",
"0.60744447",
"0.60... | 0.8064678 | 0 |
Calculate the coefficient of variation of data in each column of a data frame Return the data frame storing the coefficient of variation of data in each column of df | def AgIU(jQ3Z):
wUCu = dict()
for YRbF, fvDH in enumerate(jQ3Z.columns):
wUCu[fvDH] = [jQ3Z[fvDH].std() / jQ3Z[fvDH].mean()]
pYWC = rLdf.DataFrame(wUCu, index=['Coeefficient of Variation'])
rLdf.set_option('precision', 2)
return pYWC | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZCnw(jQ3Z):\n WfCS = jQ3Z.columns\n sum = jQ3Z.sum(axis=1)\n G_PE = jQ3Z.loc[:, WfCS[1]:WfCS[-1]].div(sum, axis=0)\n return G_PE",
"def hdI4(jQ3Z):\n import numpy as oyIN\n r8hN = jQ3Z.select(jQ3Z['scaledFeatures']).map(lambda WKvO: WKvO[0]).mean()\n utpW = jQ3Z.select(jQ3Z['scaledFeatur... | [
"0.6777264",
"0.6297776",
"0.620117",
"0.6134756",
"0.6116155",
"0.60713226",
"0.60713226",
"0.5990437",
"0.59884435",
"0.5921438",
"0.5913866",
"0.58637226",
"0.5861806",
"0.58443433",
"0.5830381",
"0.581873",
"0.57336956",
"0.5725797",
"0.5691557",
"0.5680072",
"0.5674473",... | 0.77735484 | 0 |
Get package version. If no file return empty | def gurJ():
nUeQ = gzes(LIOs(), 'VERSION')
if vtfo(nUeQ):
with open(nUeQ) as nUeQ:
return nUeQ.read()
return '' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kaPv():\n Bicb = Hy7s.path.dirname(Hy7s.path.realpath(xAKo))\n shAH = Hy7s.path.join(Bicb, R2BB)\n with open(shAH, 'r') as YgMx:\n return YgMx.read().strip()",
"def DpZH(hiHK=sEjH, HqjL=aAOj):\n if Hy7s.path.exists(hiHK):\n IexU, jtRV = dV_d(hiHK)\n else:\n NhaB = oQco(Hqj... | [
"0.7862243",
"0.7718955",
"0.7715279",
"0.76233286",
"0.7536525",
"0.7481337",
"0.74566495",
"0.7434582",
"0.7416315",
"0.739349",
"0.7374908",
"0.73561203",
"0.7353495",
"0.7312504",
"0.7312504",
"0.73112655",
"0.72833306",
"0.7270493",
"0.72498435",
"0.72337055",
"0.7232792... | 0.86852396 | 0 |
saves into a csv | def B6gX(Emd4, Nkld):
knSv = Emd4.__name__ + '.csv'
with open(knSv, 'w', newline='') as eHNT:
if Nkld is None or Nkld == []:
eHNT.write('[]')
else:
if Emd4.__name__ == 'Rectangle':
MKlR = ['id', 'width', 'height', 'x', 'y']
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aVpL(YKHO, Ux0P):\n YKHO.data.to_csv(Ux0P)",
"def aVpL(YKHO):\n if not YKHO.__is_csv():\n YKHO.__create_csv()\n try:\n with open(YKHO.__csv_file_name, 'a', newline='', encoding='utf-8') as z36O:\n WJI9 = m6_J.DictWriter(z36O, fieldnames=YKHO.__csv_fields, delimiter=';')\n ... | [
"0.826135",
"0.7793586",
"0.76861036",
"0.7594757",
"0.7551063",
"0.74792004",
"0.74374306",
"0.742743",
"0.73932505",
"0.73600066",
"0.7314766",
"0.7307525",
"0.7287429",
"0.7277141",
"0.7272538",
"0.7268541",
"0.72408915",
"0.7229592",
"0.72173005",
"0.7213289",
"0.7195206"... | 0.0 | -1 |
Calculate the great circle distance between two points on the earth (specified in decimal degrees) | def GeVo(GgQG, igSk, tk0B, TGuP):
GgQG, igSk, tk0B, TGuP = map(epAf.radians, [GgQG, igSk, tk0B, TGuP])
H91H = tk0B - GgQG
n_9K = TGuP - igSk
jzdc = epAf.sin(n_9K / 2) ** 2 + epAf.cos(igSk) * epAf.cos(TGuP) * epAf.sin(H91H / 2) ** 2
Z9rn = 2 * epAf.asin(oyIN.sqrt(jzdc))
Mkmy = 6371
return Z9r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KzuF(rCSf, hjIX, FNKk, T3JP):\n hjIX = r8hN.radians(hjIX)\n rCSf = r8hN.radians(rCSf)\n T3JP = r8hN.radians(T3JP)\n FNKk = r8hN.radians(FNKk)\n Csk6 = 2 * 6367.45 * r8hN.asin(r8hN.sqrt(GeVo(FNKk - rCSf) + r8hN.cos(rCSf) * r8hN.cos(FNKk) * GeVo(T3JP - hjIX)))\n return Csk6",
"def T97B(GgQG, ... | [
"0.81450045",
"0.7863265",
"0.76322985",
"0.76064754",
"0.75978696",
"0.75965863",
"0.75944835",
"0.75720793",
"0.75630087",
"0.7555095",
"0.7528691",
"0.7517629",
"0.7492963",
"0.7467739",
"0.7452678",
"0.7434477",
"0.73914117",
"0.7357736",
"0.73484355",
"0.73318124",
"0.73... | 0.0 | -1 |
Encode the Amplitude into CSV format. | def VcWR(YKHO, JRYC, FAuI, myi1, eXeU, nkck):
FMmI = []
for DAMg in range(YKHO.element_multiplier):
for NeqB in range(YKHO.num_elements):
wEf2 = YKHO.Amplitude[NeqB][DAMg]
FMmI.append(P7u4.gen_csv_line(JRYC, P7u4.CSV_AMP, FAuI, myi1, NeqB, DAMg, eXeU, nkck, wEf2))
return FMmI | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m6_J(YKHO):\n return '{:.6f},{},{}'.format(YKHO.sample_time, YKHO.value, YKHO.status)",
"def m6_J(YKHO):\n return '{:.6f},{:.6f},{},{}'.format(YKHO.sample_time, YKHO.value_time, YKHO.value, YKHO.status)",
"def zUgM(YKHO, Jmpp):\n tA4O = rLdf.Series(YKHO)\n tA4O.to_csv(Jmpp)",
"def LdUA(YKHO):... | [
"0.67478204",
"0.6700819",
"0.62866646",
"0.61557317",
"0.6065151",
"0.6004344",
"0.5988709",
"0.5988709",
"0.5982883",
"0.59545183",
"0.59026086",
"0.58935064",
"0.58594626",
"0.5838659",
"0.5835032",
"0.5830365",
"0.58200127",
"0.5815997",
"0.5749347",
"0.57133895",
"0.5681... | 0.6931896 | 0 |
Removes all relations from patched data. | def _t05(nPrm=None, **B2fa):
if QePW.method == 'OPTIONS':
return
qaaQ = []
for H5ew, wEf2 in nPrm.iteritems():
if type(nPrm[H5ew]) is list:
qaaQ.append(H5ew)
for H5ew in qaaQ:
del nPrm[H5ew] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QOj3(YKHO):\n for wvau in kLxY.RELS:\n delattr(YKHO, 'tmp_{}'.format(wvau))",
"def lWVH(YKHO):\n YKHO._review_obj.delete_many({'entity_id': YKHO._entity_id})",
"def PTpj(YKHO):\n for YEnM in YKHO:\n nV7a(YEnM)\n YKHO.update(deleted=wzkt())",
"def Cqyg(YKHO):\n pass",
"def u... | [
"0.67140204",
"0.6455568",
"0.6337633",
"0.63131124",
"0.62446815",
"0.6190276",
"0.61534166",
"0.60374516",
"0.6033138",
"0.6033138",
"0.6033138",
"0.5998219",
"0.599732",
"0.5953319",
"0.5930222",
"0.59030896",
"0.59030896",
"0.58921844",
"0.58610255",
"0.5845649",
"0.58395... | 0.67338175 | 0 |
Returns true if the head of the snake is in the same position as an apple, otherwise returns false. The head of the snake is the final element in the snake list. | def GYOi(EX77, iBIi):
return iBIi.board[EX77.snake[-1][1]][EX77.snake[-1][0]] == 'a' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JtGC(YKHO):\n for XP5J in EX77.nodes:\n if XP5J == YKHO.apple:\n return True\n return False",
"def M8Ai(YKHO, V3FR, h4ZE):\n if V3FR == YKHO.x and h4ZE == YKHO.y:\n return True",
"def _OkJ(YKHO):\n if YKHO.nodes[0] == YKHO.apple:\n YKHO.expand_snake()\n YK... | [
"0.82804906",
"0.6415298",
"0.62952095",
"0.60529107",
"0.6011994",
"0.5917902",
"0.57784027",
"0.56879157",
"0.56660795",
"0.56368804",
"0.56249446",
"0.5554827",
"0.5549523",
"0.5525887",
"0.5503104",
"0.54068685",
"0.5392866",
"0.5391586",
"0.5369516",
"0.5346485",
"0.5333... | 0.71202666 | 1 |
Tests if the field is a OneToOneField. If a route exists for this field's model and it's target model, ensure this is the field that should be used to join the the two tables. | def afmc(YKHO, Jyyj):
if isinstance(Jyyj, FYrf.OneToOneField):
if YKHO._join_allowed(Jyyj.model, Jyyj.rel.to, Jyyj):
return Jyyj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QMPB(YKHO, wvau):\n Jyyj = wvau.field\n if isinstance(Jyyj, FYrf.OneToOneField):\n if YKHO._join_allowed(wvau.parent_model, wvau.model, Jyyj):\n return wvau",
"def j7eD(YKHO, BzZr, RL4V, **MDDt):\n if BzZr._meta.label_lower in YKHO.route_encuestas or RL4V._meta.label_lower in YKHO.... | [
"0.6432983",
"0.5610659",
"0.54294074",
"0.5429102",
"0.53602386",
"0.527183",
"0.52544534",
"0.52448857",
"0.5222093",
"0.51960945",
"0.5159376",
"0.5119522",
"0.49791703",
"0.4929335",
"0.48836753",
"0.4850413",
"0.482581",
"0.48066378",
"0.47761446",
"0.47643787",
"0.47637... | 0.72543687 | 0 |
Tests if this RelatedObject represents a OneToOneField. If a route exists for this field's model and it's target model, ensure this is the field that should be used to join the the two tables. | def QMPB(YKHO, wvau):
Jyyj = wvau.field
if isinstance(Jyyj, FYrf.OneToOneField):
if YKHO._join_allowed(wvau.parent_model, wvau.model, Jyyj):
return wvau | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def afmc(YKHO, Jyyj):\n if isinstance(Jyyj, FYrf.OneToOneField):\n if YKHO._join_allowed(Jyyj.model, Jyyj.rel.to, Jyyj):\n return Jyyj",
"def j7eD(YKHO, BzZr, RL4V, **MDDt):\n if BzZr._meta.label_lower in YKHO.route_encuestas or RL4V._meta.label_lower in YKHO.route_encuestas:\n ret... | [
"0.7127669",
"0.59652066",
"0.5784414",
"0.5783634",
"0.5774796",
"0.5615379",
"0.55627906",
"0.5482189",
"0.5343726",
"0.5320097",
"0.5252952",
"0.5250731",
"0.52360576",
"0.52273184",
"0.5223983",
"0.51934505",
"0.51843",
"0.5154437",
"0.5096623",
"0.5083829",
"0.50523585",... | 0.67805064 | 1 |
Tests if this field is a ForeignKey. If a route exists for this field's model and it's target model, ensure this is the field that should be used to join the the two tables. | def dcPV(YKHO, Jyyj):
if isinstance(Jyyj, FYrf.ForeignKey):
if YKHO._join_allowed(Jyyj.model, Jyyj.rel.to, Jyyj):
return Jyyj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hCko(Emd4, q8R2):\n return isinstance(q8R2, V_D6.ForeignKeyField)",
"def hCko(YKHO):\n return YKHO._foreignKey",
"def hH7o(YKHO, wvau):\n Jyyj = wvau.field\n if isinstance(Jyyj, FYrf.ForeignKey):\n if YKHO._join_allowed(wvau.parent_model, wvau.model, Jyyj):\n return wvau",
"... | [
"0.7084627",
"0.6769837",
"0.6413649",
"0.58019847",
"0.57855636",
"0.5689534",
"0.5668583",
"0.56441414",
"0.5640483",
"0.5568142",
"0.55012286",
"0.5471998",
"0.54698074",
"0.54644835",
"0.5441331",
"0.5429922",
"0.53804934",
"0.53610194",
"0.53146863",
"0.5289472",
"0.5288... | 0.6932029 | 1 |
Tests if this RelatedObject represents a ForeignKey. If a route exists for this field's model and it's target model, ensure this is the field that should be used to join the the two tables. | def hH7o(YKHO, wvau):
Jyyj = wvau.field
if isinstance(Jyyj, FYrf.ForeignKey):
if YKHO._join_allowed(wvau.parent_model, wvau.model, Jyyj):
return wvau | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dcPV(YKHO, Jyyj):\n if isinstance(Jyyj, FYrf.ForeignKey):\n if YKHO._join_allowed(Jyyj.model, Jyyj.rel.to, Jyyj):\n return Jyyj",
"def hCko(Emd4, q8R2):\n return isinstance(q8R2, V_D6.ForeignKeyField)",
"def hCko(YKHO):\n return YKHO._foreignKey",
"def XtF7(YKHO, KAOR: models.M... | [
"0.7011864",
"0.6826253",
"0.6785149",
"0.6005135",
"0.5983279",
"0.597368",
"0.5922101",
"0.58798677",
"0.58700687",
"0.58460355",
"0.5805568",
"0.5790304",
"0.57772136",
"0.562784",
"0.56067526",
"0.55733424",
"0.55512494",
"0.5548611",
"0.5518151",
"0.5502844",
"0.54830766... | 0.68277216 | 1 |
Returns a list of JOIN connections that can be manually applied to a QuerySet object. See `.add_joins()` This allows for the ORM to handle setting up the JOINs which may be different depending on the QuerySet being altered. | def pdez(YKHO, C3ST, **B2fa):
lcZf = YKHO._node_path(C3ST)
kIRk = []
for YRbF, Q6kx in enumerate(lcZf):
if YRbF > 0:
kIRk.extend(Q6kx.get_joins(**B2fa)[1:])
else:
kIRk.extend(Q6kx.get_joins(**B2fa))
return kIRk | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kIRk(YKHO):\n return YKHO._joins",
"def pdez(YKHO, **B2fa):\n B2fa.setdefault('nullable', YKHO.nullable)\n if hbZn.VERSION < (1, 7):\n B2fa.setdefault('outer_if_first', YKHO.nullable)\n kIRk = []\n jth9 = B2fa.copy()\n jth9['connection'] = YKHO.get_connection(None, YKHO.parent.db_tab... | [
"0.71101946",
"0.70173943",
"0.673386",
"0.61273474",
"0.5879717",
"0.56646603",
"0.5511987",
"0.5421328",
"0.53752714",
"0.5343265",
"0.52763104",
"0.52763104",
"0.52203184",
"0.5207282",
"0.52055025",
"0.5199943",
"0.51791143",
"0.51493305",
"0.514017",
"0.51153594",
"0.510... | 0.634292 | 3 |
Takes a `models.Field` instance and returns a query string relative to the root model. | def DGfy(YKHO, Jyyj, seET=None, C3ST=None):
if C3ST:
if C3ST._meta.proxy and C3ST._meta.proxy_for_model is not Jyyj.model:
raise AUXf('proxied model must be the field model')
else:
C3ST = Jyyj.model
if isinstance(Jyyj, kQZ4):
Q4kH = [Jyyj.field.related_query_name()]
e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OPRw(YKHO):\n lpha = YKHO.path_s.split('?', 1)\n if len(lpha) == 1:\n return ''\n else:\n return lpha[1]",
"def oUkv(YKHO):\n return '/search/{query}/{page}'",
"def oeXr(YKHO) -> str:\n return qe4Y.get(YKHO, 'field_path')",
"def oeXr(YKHO) -> str:\n return qe4Y.get(YKHO, '... | [
"0.6095897",
"0.6088002",
"0.6078557",
"0.6078557",
"0.6078557",
"0.6078557",
"0.6078557",
"0.6078557",
"0.6078557",
"0.6078557",
"0.6078557",
"0.6078557",
"0.6078557",
"0.6078557",
"0.6078557",
"0.6078557",
"0.6078557",
"0.6078557",
"0.6078557",
"0.6078557",
"0.6078557",
"... | 0.65267235 | 0 |
Constructor for the creation of a node in a Linked List chain | def FIMM(YKHO, H5ew, BWXx):
YKHO.key = H5ew
YKHO.value = BWXx
YKHO.next = None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n Q6kx = Msxl(0)\n YKHO.head = Q6kx\n YKHO.tail = Q6kx\n YKHO.len = 0",
"def FIMM(YKHO):\n YKHO.head = Msxl()",
"def FIMM(YKHO):\n YKHO.head = jAnR('', False)",
"def FIMM(YKHO, sdCG: ListNode):\n YKHO.head = sdCG",
"def FIMM(YKHO, sdCG: ListNode):\n YKHO.head = sdCG"... | [
"0.7413",
"0.7365796",
"0.7325737",
"0.7231195",
"0.7231195",
"0.7231195",
"0.7231195",
"0.7231195",
"0.7035727",
"0.6972258",
"0.6893458",
"0.6884542",
"0.6850907",
"0.68316936",
"0.6771286",
"0.6751224",
"0.66953355",
"0.6674617",
"0.66725296",
"0.6669687",
"0.66429126",
... | 0.0 | -1 |
List all subscriptions in the tenant. | def lYkv(x0hE: KeyVaultClient) -> lLRR:
geh0 = x0hE.list_subscriptions_request()
l2LW = k5Fh('Subscriptions List', geh0, ['subscriptionId', 'tenantId', 'state', 'displayName'], removeNull=True, headerTransform=ouV3)
return lLRR(outputs_prefix='AzureKeyVault.Subscription', outputs_key_field='id', outputs=geh... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XU4s(YKHO):\n return YKHO.request('getAllSubscriptions')",
"def rDYv(YKHO):\n return YKHO.__GetJson('/subscriptions', True)",
"def YGI8() -> object:\n NCls = aGHv()\n return NCls.Subscriptions.objects().to_json()",
"def list(Emd4, **B2fa):\n geh0 = tV5k().list_subscriptions(**B2fa)\n re... | [
"0.8035786",
"0.7226261",
"0.72258407",
"0.7086792",
"0.70776016",
"0.6984204",
"0.6983721",
"0.6912258",
"0.68588793",
"0.66833955",
"0.66468096",
"0.6555108",
"0.6513404",
"0.65121925",
"0.6400548",
"0.6395195",
"0.6367344",
"0.6361999",
"0.63297665",
"0.63160646",
"0.62571... | 0.68806654 | 8 |
Apply one step of gradient descent on the loss function `loss`, with stepsize `step_size`, and returns the updated parameters of the neural network. | def x2Fr(YKHO, N77f, Rf07=0.5, X4mj=False):
YKHO.optim.zero_grad()
N77f.backward()
U78l.utils.clip_grad_norm(YKHO.parameters(), YKHO.grad_clip_norm)
YKHO.optim.step()
'\n for (name, param) in self.named_parameters():\n updated_params[name] = param.clone()\n if param.grad... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def x2Fr(YKHO, N77f, Rf07=0.5, X4mj=False):\n vtNT = ht2j.autograd.grad(N77f, YKHO.parameters(), create_graph=not X4mj)\n vGU_ = U8Lr()\n for (mWFP, xqoZ), Ro40 in zip(YKHO.named_parameters(), vtNT):\n vGU_[mWFP] = xqoZ - Rf07 * Ro40\n return vGU_",
"def KCeI(QTBn, N77f, MTad):\n vtNT = Zyl... | [
"0.68319064",
"0.6696704",
"0.6502688",
"0.625313",
"0.62398595",
"0.6239656",
"0.6238582",
"0.62382096",
"0.6225333",
"0.62092435",
"0.616521",
"0.6116684",
"0.60662365",
"0.604013",
"0.6036855",
"0.6036855",
"0.60286844",
"0.6027265",
"0.6012288",
"0.6002277",
"0.59572786",... | 0.6775933 | 1 |
Draw detected bounding boxes. | def PDog(l40E, EtA1=1, _2sc='None', qfpW=(255, 255, 255), NXpY=1.0, knl1=0.5, qonS=(2, 2)):
_aqg = []
noZV = oyIN.where(l40E[:, -1] >= knl1)[0]
if len(noZV) == 0:
return _aqg
for YRbF in noZV:
cviu = l40E[YRbF, :4] / NXpY
Yvhv = l40E[YRbF, -1]
if cviu[3] - cviu[1] <= qonS... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sGG5(YKHO, NncF, hlel):\n for YRbF, edvT in enumerate(NncF):\n if edvT[2] > hlel.shape[1] or edvT[3] > hlel.shape[0] or edvT[0] < 0 or (edvT[1] < 0):\n continue\n XC5k.rectangle(oyIN.asarray(hlel), (edvT[0], edvT[1]), (edvT[2], edvT[3]), YKHO.colors[YRbF % len(YKHO.colors)], thickne... | [
"0.77598673",
"0.7638101",
"0.7510348",
"0.72977304",
"0.7150563",
"0.7103931",
"0.7101873",
"0.7083905",
"0.7020769",
"0.6993739",
"0.6974172",
"0.69637305",
"0.6859061",
"0.68521667",
"0.68319523",
"0.6830371",
"0.6809837",
"0.6805064",
"0.67750585",
"0.6774759",
"0.6742592... | 0.0 | -1 |
list of values, find the first index closest to the target | def aQzf(wU56, pan_):
pan_ = oyIN.atleast_1d(pan_)
wU56 = oyIN.array(wU56)
oMB_ = []
for ZfUD in pan_:
ILP8 = oyIN.argmin(oyIN.abs(wU56 - ZfUD))
oMB_.append(ILP8)
return oMB_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uiJA(mSrU, pan_):\n mSrU = oyIN.asarray(mSrU)\n or8S = oyIN.abs(mSrU - pan_).argmin()\n return mSrU[or8S]",
"def llo_(list, wEf2):\n return min(range(len(list)), key=lambda YRbF: abs(list[YRbF] - wEf2))",
"def jZnZ(wEf2, yv6U):\n d6pt = 0\n for ZfUD in yv6U:\n if ZfUD > wEf2:\n ... | [
"0.79877585",
"0.78621215",
"0.76162183",
"0.7527833",
"0.7460819",
"0.7441944",
"0.74199677",
"0.7359263",
"0.73556554",
"0.7317626",
"0.7300372",
"0.72569174",
"0.7247898",
"0.7238868",
"0.7215002",
"0.7137729",
"0.71359056",
"0.7125038",
"0.711125",
"0.711125",
"0.710519",... | 0.73963726 | 7 |
Initializes an API instance. | def FIMM(YKHO, H5ew):
YKHO._key = H5ew
YKHO.log = G9jH.getLogger(__name__)
YKHO.base_url = 'https://osu.ppy.sh/api/{}?k=' + YKHO._key | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n YKHO.api = fyIx(consumer_key=Vt89['consumer_key'], consumer_secret=Vt89['consumer_secret'], access_token_key=Vt89['access_token_key'], access_token_secret=Vt89['access_token_secret'])",
"def FIMM(YKHO, rJDA, s32t):\n YKHO.api_key = rJDA\n YKHO.api_name = s32t\n YKHO.raven_client = w... | [
"0.78006256",
"0.76134866",
"0.7568439",
"0.75531006",
"0.75356835",
"0.7535342",
"0.75169504",
"0.7471052",
"0.7429334",
"0.73568124",
"0.7318394",
"0.7285327",
"0.7281806",
"0.7273331",
"0.7227702",
"0.7151092",
"0.7149876",
"0.71258557",
"0.7061571",
"0.705841",
"0.7049321... | 0.0 | -1 |
Split a dataframe into a train and test set | def Zv6i(jQ3Z, NI2E=0.1, t3eI=42):
x4W3, Dmme = bHtP(jQ3Z, test_size=NI2E, random_state=t3eI)
return (x4W3, Dmme) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bHtP(jQ3Z):\n jcFe = int(len(jQ3Z) * 0.67)\n NI2E = int(len(jQ3Z) - jcFe)\n EvQg, QOe9 = (jQ3Z[0:jcFe], jQ3Z[jcFe:len(jQ3Z)])\n return (EvQg, QOe9)",
"def bHtP(jQ3Z, NI2E=0.3):\n zBu_ = int(jQ3Z.shape[0] * (1 - NI2E))\n NI2E = jQ3Z.shape[0] - zBu_\n EvQg = jQ3Z[:zBu_]\n QOe9 = jQ3Z[zB... | [
"0.8687677",
"0.8679001",
"0.84975994",
"0.8479245",
"0.8389284",
"0.8317432",
"0.82733214",
"0.8199719",
"0.81595784",
"0.8105398",
"0.80834407",
"0.8063808",
"0.8036414",
"0.79702836",
"0.7887742",
"0.77327996",
"0.7688568",
"0.7650159",
"0.7625151",
"0.7585574",
"0.7573206... | 0.8235048 | 7 |
Edit VM size configuration of a project. Passing empty string value will remove project from a VM size category. | def hSGh(B5PH: str, xMrE: ConfigAzureClient=JHvC(wjUl), oMFE: VMSizes | Literal['']=OsWG(embed=True)):
xMrE.set_project_vm_size(B5PH, oMFE or None) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NVrm(YKHO, SmsD):\n YKHO.bunch_size = SmsD",
"def P0hC(YKHO, VFHf, sYx5):\n Xdm5 = YKHO._get_vm_id_by_name(VFHf)\n jDnk = YKHO.connection.get_flavor_by_ram(sYx5).id\n try:\n YKHO.connection.compute.resize_server(Xdm5, jDnk)\n except fqzn:\n pass",
"def npfx(YKHO, IAPz):\n b2... | [
"0.54475933",
"0.53949726",
"0.5328427",
"0.5310221",
"0.5140511",
"0.51007795",
"0.5088823",
"0.5048857",
"0.50260985",
"0.49107397",
"0.48879477",
"0.48345664",
"0.4829681",
"0.48136324",
"0.48122758",
"0.4788685",
"0.478289",
"0.4773701",
"0.4773242",
"0.47650912",
"0.4735... | 0.76543856 | 0 |
Computes the forward pass for an affine (fullyconnected) layer. The input x has shape (N, d_1, ..., d_k) and contains a minibatch of N examples, where each example x[i] has shape (d_1, ..., d_k). We will reshape each input into a vector of dimension D = d_1 ... d_k, and then transform it to an output vector of dimensio... | def Fav1(WKvO, yzQ0, Fg_i):
yvT9 = None
aX9U = WKvO[0].shape
EcVT = WKvO.reshape(WKvO.shape[0], oyIN.prod(aX9U))
yvT9 = EcVT.dot(yzQ0) + Fg_i
wyyA = (WKvO, yzQ0, Fg_i)
return (yvT9, wyyA) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Fav1(WKvO, yzQ0, Fg_i):\n yvT9 = None\n GhuM = WKvO.shape\n QRFO = 1\n for YRbF in range(1, len(GhuM)):\n QRFO *= GhuM[YRbF]\n jzdc = WKvO.reshape(WKvO.shape[0], QRFO)\n yvT9 = oyIN.dot(jzdc, yzQ0) + Fg_i\n wyyA = (WKvO, yzQ0, Fg_i)\n return (yvT9, wyyA)",
"def KVH6(YKHO, WKvO)... | [
"0.6998358",
"0.6884048",
"0.6687758",
"0.65118337",
"0.6506395",
"0.6459772",
"0.6447961",
"0.6414125",
"0.6406224",
"0.63576955",
"0.6356106",
"0.634593",
"0.6335362",
"0.6323145",
"0.63084984",
"0.63041466",
"0.62997454",
"0.62980896",
"0.6297971",
"0.6291862",
"0.6287952"... | 0.6348984 | 11 |
Computes the backward pass for an affine layer. | def Kt1o(zYcP, wyyA):
WKvO, yzQ0, Fg_i = wyyA
Jw7X, ncXl, NCls = (None, None, None)
aWf9 = oyIN.prod(WKvO[0].shape)
ywwl = WKvO.shape[0]
EcVT = WKvO.reshape(ywwl, aWf9)
Jw7X = zYcP.dot(yzQ0.T)
Jw7X = Jw7X.reshape(WKvO.shape)
ncXl = EcVT.T.dot(zYcP)
NCls = zYcP.sum(axis=0)
return ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wxmU(zYcP, wyyA):\n A45l, GhMp = wyyA\n SG6Y = fhcK.relu_backward(zYcP, GhMp)\n Jw7X, ncXl, NCls = fhcK.affine_backward(SG6Y, A45l)\n return (Jw7X, ncXl, NCls)",
"def Kt1o(zYcP, wyyA):\n WKvO, yzQ0, Fg_i = wyyA\n Jw7X, ncXl, NCls = (None, None, None)\n a1PO = oyIN.reshape(WKvO, (WKvO.sha... | [
"0.75195765",
"0.73108387",
"0.7302581",
"0.7302581",
"0.7302581",
"0.7302581",
"0.72437024",
"0.718039",
"0.7174265",
"0.71736616",
"0.71681154",
"0.71321785",
"0.71093744",
"0.7098627",
"0.70855993",
"0.70688856",
"0.704539",
"0.70410854",
"0.6994073",
"0.69874126",
"0.6985... | 0.7515717 | 1 |
Computes the forward pass for a layer of rectified linear units (ReLUs). | def wN5Y(WKvO):
yvT9 = None
yvT9 = oyIN.maximum(0, WKvO)
wyyA = WKvO
return (yvT9, wyyA) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def drfk(YKHO):\n\n def XVC9(yR_P, g6LF, EYyA):\n \"\"\"\n If there is a negative gradient, change it to zero\n \"\"\"\n nWP1 = YKHO.forward_relu_outputs[-1]\n nWP1[nWP1 > 0] = 1\n e1d4 = nWP1 * ht2j.clamp(g6LF[0], min=0.0)\n del YKHO.forward_relu_outputs... | [
"0.67781115",
"0.6632084",
"0.6605096",
"0.6526154",
"0.6511326",
"0.64492893",
"0.6385915",
"0.6269099",
"0.6206479",
"0.61808866",
"0.6153661",
"0.61401606",
"0.6063327",
"0.605535",
"0.60494256",
"0.604728",
"0.6020283",
"0.5998557",
"0.59922504",
"0.5971186",
"0.59643835"... | 0.58001614 | 37 |
Computes the backward pass for a layer of rectified linear units (ReLUs). | def PPFh(zYcP, wyyA):
Jw7X, WKvO = (None, wyyA)
Jw7X = zYcP * (WKvO > 0)
return Jw7X | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PPFh(YKHO, gEpz, wyyA):\n WKvO = wyyA\n WKvO = oyIN.array(WKvO, copy=True)\n WKvO[WKvO <= 0] = 0\n WKvO[WKvO > 0] = 1\n cf5c = gEpz * WKvO\n return cf5c",
"def ZD5u(OaeV, pwN3):\n N77f, lQ3t, P6bq, OCi3 = OaeV.saved_tensors\n begE = P6bq.device\n SGf8 = 1e-10\n Ro40, = ht2j.auto... | [
"0.70412636",
"0.694716",
"0.6897693",
"0.6847592",
"0.6847592",
"0.6846935",
"0.6841099",
"0.68178034",
"0.6766849",
"0.6754919",
"0.67536426",
"0.67530656",
"0.67419785",
"0.6739244",
"0.6713423",
"0.6708748",
"0.6699276",
"0.66860896",
"0.6665928",
"0.6665928",
"0.6665928"... | 0.6696307 | 18 |
Convenience layer that performs an affine transform followed by a ReLU | def lDHV(WKvO, yzQ0, Fg_i):
jzdc, A45l = Fav1(WKvO, yzQ0, Fg_i)
yvT9, GhMp = wN5Y(jzdc)
wyyA = (A45l, GhMp)
return (yvT9, wyyA) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YxOf(WKvO, yzQ0, Fg_i, KMvS, UqYS, QLJ1):\n cSEP, A45l = Fav1(WKvO, yzQ0, Fg_i)\n zgIO, oyJl = wucA(cSEP, KMvS, UqYS, QLJ1)\n yvT9, GhMp = wN5Y(zgIO)\n wyyA = (A45l, oyJl, GhMp)\n return (yvT9, wyyA)",
"def ANoO(WKvO, EDoJ):\n yzQ0 = ZylS.get_variable('w', [WKvO.get_shape()[1], EDoJ])\n ... | [
"0.6848942",
"0.65821934",
"0.648105",
"0.64699006",
"0.6463087",
"0.6463087",
"0.6463087",
"0.6463087",
"0.62628835",
"0.6260788",
"0.62383676",
"0.62174976",
"0.6196862",
"0.61698824",
"0.6155895",
"0.6155852",
"0.6124598",
"0.60800135",
"0.6056793",
"0.60549027",
"0.605344... | 0.72396773 | 3 |
set logger level to INFO | def vUIa():
aG11(G9jH.INFO, '%(asctime)s %(levelname)s:%(name)s:%(message)s') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ujSR(Ry7x=['vaex']):\n aQ22(Ry7x, G9jH.INFO)",
"def xgtA(YKHO, tO9_):\n YKHO.log(tO9_, level=aJcw)",
"def gtIc(YKHO, tO9_):\n YKHO.logger.info(tO9_)",
"def xgtA(YKHO, tO9_):\n YKHO.logger.info(tO9_)",
"def RKD7(YKHO, tO9_):\n RKD7.msg(tO9_, level=RKD7.INFO)",
"def U34r(YKHO, tO9_, *qIx... | [
"0.74036115",
"0.7351019",
"0.72148365",
"0.71757716",
"0.7169846",
"0.7143662",
"0.70610005",
"0.7045136",
"0.69612265",
"0.695386",
"0.69421446",
"0.694169",
"0.68945",
"0.6877003",
"0.6863229",
"0.68453217",
"0.6836823",
"0.68036646",
"0.67933124",
"0.67811984",
"0.6779641... | 0.7767203 | 0 |
Set logger level and format. | def aG11(ABDL, format):
uaPq = G9jH.Formatter(fmt=format)
bo34.handlers[0].setFormatter(uaPq)
bo34.setLevel(ABDL) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X0hY(YKHO, ABDL):\n RKD7.basicConfig(format='[%(asctime)s %(levelname)s]: %(message)s', level=RKD7._nameToLevel.get(ABDL.upper(), RKD7.DEBUG))",
"def pcXt(YKHO, BWXx):\n YKHO.PDFreactorConfiguration.in1['logLevel'] = BWXx",
"def X0hY(YKHO, ABDL):\n RKD7.basicConfig(format='[%(levelname)s]: %(mess... | [
"0.75328964",
"0.7516207",
"0.7485943",
"0.74267536",
"0.72920215",
"0.72700924",
"0.72204626",
"0.71320343",
"0.7101901",
"0.7080053",
"0.70730275",
"0.7067666",
"0.7051171",
"0.70327723",
"0.7029139",
"0.70218116",
"0.70072067",
"0.6999228",
"0.69948256",
"0.6987871",
"0.69... | 0.76595855 | 0 |
Creates an instance of this model from a dictionary | def rQfz(Emd4, cmPJ):
if cmPJ is None:
return None
jTXt = cmPJ.get('password')
mWFP = cmPJ.get('name')
UHUx = cmPJ.get('tagIds')
V8nS = cmPJ.get('eldAdverseWeatherExemptionEnabled')
VUKu = cmPJ.get('eldBigDayExemptionEnabled')
u4Tj = cmPJ.get('eldDayStartHour')
szLM = cmPJ.get('e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rQfz(Emd4, cmPJ):\n if cmPJ is None:\n return None\n id = cmPJ.get('id')\n mWFP = cmPJ.get('name')\n tDvy = cmPJ.get('type')\n fFb7 = cmPJ.get('usageBytes')\n return Emd4(id, mWFP, tDvy, fFb7)",
"def eLpg(Emd4, cmPJ):\n return Emd4(**cmPJ)",
"def eLpg(Emd4, cmPJ):\n return Em... | [
"0.8317533",
"0.81689686",
"0.81689686",
"0.81188685",
"0.808892",
"0.7977596",
"0.7949056",
"0.79225504",
"0.78983366",
"0.7893884",
"0.7887517",
"0.7882494",
"0.7881197",
"0.7876339",
"0.78581846",
"0.78387725",
"0.78037786",
"0.78037786",
"0.78037786",
"0.78037786",
"0.780... | 0.75897974 | 78 |
Get previous value for direction and speed. Returns ActionOut Previous (direction, speed) tuple for relative actions. | def g1qH(YKHO):
u_ln = mrim()
u_ln.speed = YKHO.speed
if YKHO.config.direction_type == YuzY.HEADING:
u_ln.dir = YKHO.heading
elif YKHO.config.direction_type == YuzY.STEERING:
u_ln.dir = YKHO.steering
return u_ln | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kJci(YKHO, XSoh):\n return oBbS[XSoh]",
"def lP7F(YKHO, XeOP, XSoh):\n LFlW = [2, 3, 1, 0]\n _tIi = [3, 2, 0, 1]\n if XSoh == 0:\n v_oM = XeOP\n elif XSoh == -1:\n v_oM = LFlW[XeOP]\n elif XSoh == 1:\n v_oM = _tIi[XeOP]\n else:\n raise Exception('getDir receiv... | [
"0.6076192",
"0.59882724",
"0.59442836",
"0.5870353",
"0.5833274",
"0.5819874",
"0.5756624",
"0.5755088",
"0.5721165",
"0.56954294",
"0.56071323",
"0.55129224",
"0.5511683",
"0.55102605",
"0.55097055",
"0.5483802",
"0.54277796",
"0.542034",
"0.54124224",
"0.54035324",
"0.5390... | 0.62399465 | 0 |
Get mean lidar data. | def TGGl(YKHO, Pyrc=12, Qth0=False):
f_ZH = int(360 / Pyrc)
if Qth0 is True:
WKvO = YKHO.lidar_relative
else:
WKvO = YKHO.lidar_absolute
WKvO = WKvO.reshape((-1, f_ZH))
return oyIN.mean(WKvO, axis=1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DH4Z(YKHO):\n YKHO.meanval = oyIN.mean(YKHO.adulist)",
"def m8ad(P39p, qIxc, or8S=0):\n Byl2 = sT1r()\n for YRbF in P39p:\n if isinstance(YRbF, list):\n Byl2.update(YRbF[or8S])\n else:\n Byl2.update(YRbF)\n go03 = Byl2.mean\n if go03.ndim == 2:\n go03... | [
"0.7057644",
"0.6730877",
"0.66848236",
"0.6682252",
"0.66629845",
"0.65891695",
"0.6577949",
"0.6569015",
"0.6458197",
"0.6457365",
"0.6422946",
"0.64073145",
"0.6402291",
"0.63775605",
"0.63775605",
"0.63559073",
"0.6331921",
"0.63245344",
"0.6320915",
"0.63183767",
"0.6269... | 0.6560634 | 8 |
Return an iterator over the parameters (if any). The iterator has the same order as get_params_grad. The elements returned by the iterator are editable inplace. | def wWN0(YKHO):
return [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wWN0(YKHO):\n return Hs6x.chain(oyIN.nditer(YKHO.W, op_flags=['readwrite']), oyIN.nditer(YKHO.b, op_flags=['readwrite']))",
"def u1Ug(YKHO) -> x1iM[XDS4]:\n return [XP5J for XP5J in YKHO.parameters() if XP5J.grad is not None]",
"def u1Ug(YKHO) -> x1iM[XDS4]:\n return [XP5J for XP5J in YKHO.paramet... | [
"0.7512843",
"0.7350124",
"0.7270569",
"0.7133222",
"0.686863",
"0.67067677",
"0.6674968",
"0.6581909",
"0.6552274",
"0.6537611",
"0.6537611",
"0.6526105",
"0.6306226",
"0.6271036",
"0.62509674",
"0.6234052",
"0.62195385",
"0.6163327",
"0.6135617",
"0.60692143",
"0.5985063",
... | 0.7128284 | 4 |
Return a list of gradients over the parameters. The list has the same order as the get_params_iter iterator. X is the input. output_grad is the gradient at the output of this layer. | def HGOS(YKHO, EcVT, kaGj):
return [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HGOS(YKHO, EcVT, kaGj):\n iZO3 = EcVT.T.dot(kaGj)\n qu0i = oyIN.sum(kaGj, axis=0)\n return [Oa1e for Oa1e in Hs6x.chain(oyIN.nditer(iZO3), oyIN.nditer(qu0i))]",
"def ICX2(YKHO, Q6kx, kaGj):\n return [kaGj, kaGj]",
"def ICX2(YKHO, Q6kx, kaGj):\n return [kaGj]",
"def ICX2(YKHO, Q6kx, kaGj):\... | [
"0.84572774",
"0.7508135",
"0.7495668",
"0.73628736",
"0.73628736",
"0.7315574",
"0.7312526",
"0.7164749",
"0.71257406",
"0.7105775",
"0.7101116",
"0.7085119",
"0.70572406",
"0.70412076",
"0.70188177",
"0.6992223",
"0.69575894",
"0.6954603",
"0.694641",
"0.6889138",
"0.682883... | 0.8274612 | 1 |
Perform the forward step linear transformation. X is the input. | def LI2u(YKHO, EcVT):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVH6(YKHO, WKvO):\n WKvO = YKHO.lin(WKvO)\n return WKvO",
"def KVH6(YKHO, WKvO):\n WKvO = YKHO.sparseModel(WKvO)\n WKvO = YKHO.linear(WKvO)\n return WKvO",
"def KVH6(YKHO, WKvO):\n return YKHO.l1(WKvO)",
"def KVH6(YKHO, WKvO, **B2fa):\n hlel = YKHO.lin1(WKvO)\n hlel = YKHO.lin2(hl... | [
"0.78196967",
"0.78167725",
"0.7367827",
"0.7338931",
"0.7210416",
"0.7182924",
"0.716749",
"0.716749",
"0.716749",
"0.7159463",
"0.71134436",
"0.7106139",
"0.7096794",
"0.7049805",
"0.7032724",
"0.70214635",
"0.7011207",
"0.69987196",
"0.6978379",
"0.6978379",
"0.69762003",
... | 0.0 | -1 |
Return the gradient at the inputs of this layer. Y is the precomputed output of this layer (not needed in this case). output_grad is the gradient at the output of this layer (gradient at input of next layer). Output layer uses targets T to compute the gradient based on the output error instead of output_grad | def hhWh(YKHO, fuBA, kaGj=None, Kt_s=None):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hhWh(YKHO, fuBA, kaGj):\n return kaGj.dot(YKHO.W.T)",
"def hhWh(YKHO, fuBA, kaGj):\n return oyIN.multiply(Uyz1(fuBA), kaGj)",
"def hhWh(YKHO, fuBA, kaGj):\n return oyIN.multiply(SvFO(fuBA), kaGj)",
"def hhWh(YKHO, fuBA, Kt_s):\n return (fuBA - Kt_s) / fuBA.shape[0]",
"def ICX2(YKHO, Q6kx, k... | [
"0.7918568",
"0.7686882",
"0.7535455",
"0.73901004",
"0.7265463",
"0.7249724",
"0.7218724",
"0.7218724",
"0.72161746",
"0.7210566",
"0.71470034",
"0.71293074",
"0.7120052",
"0.7109056",
"0.7104818",
"0.7088414",
"0.70878685",
"0.7074955",
"0.7066357",
"0.7063907",
"0.7054003"... | 0.803751 | 0 |
Initialize hidden layer parameters. n_in is the number of input variables. n_out is the number of output variables. | def FIMM(YKHO, Ya2q, _LFN):
YKHO.W = oyIN.random.randn(Ya2q, _LFN) * 0.1
YKHO.b = oyIN.zeros(_LFN) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X8Xp(YKHO, Ya2q, _LFN):\n N23w = YKHO.uniform_weight(Ya2q, _LFN)\n YKHO.W_i = e89i.shared(value=N23w, name='W_i', borrow=True)\n YKHO.params = [YKHO.W_i]",
"def FIMM(YKHO, imVz, hASO, _LFN):\n YKHO.dim_in = imVz + 1\n YKHO.dim_hid = hASO\n YKHO.dim_out = _LFN\n YKHO.dim_node = YKHO.dim_i... | [
"0.75068676",
"0.73300445",
"0.70677334",
"0.70647705",
"0.7008385",
"0.6959278",
"0.69574106",
"0.6919026",
"0.68726116",
"0.6849472",
"0.681036",
"0.6799331",
"0.6766631",
"0.6751028",
"0.6731683",
"0.6670479",
"0.66649777",
"0.66494703",
"0.6612854",
"0.6611358",
"0.658734... | 0.6460819 | 29 |
Defines a onehot encoding array for specified index. | def KLLm(d6pt):
hlel = oyIN.zeros(100)
hlel[d6pt] = 1
return hlel | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aFAW(d6pt):\n AdYp = 2\n aFAW = oyIN.zeros(AdYp)\n aFAW[d6pt] = 1.0\n return aFAW",
"def KLLm(d6pt, Htse, yDqo=oyIN.uint8):\n tsWk = len(d6pt)\n U5bT = oyIN.zeros((tsWk, Htse), yDqo)\n for YRbF in range(tsWk):\n U5bT[YRbF][d6pt[YRbF]] = 1\n return U5bT",
"def HTA3(d6pt, exwG)... | [
"0.8623009",
"0.8526019",
"0.8452525",
"0.8304615",
"0.8234413",
"0.7850017",
"0.78417283",
"0.7827304",
"0.7799253",
"0.77824956",
"0.77414185",
"0.75635886",
"0.7556846",
"0.74951917",
"0.7480593",
"0.747049",
"0.74646866",
"0.74583596",
"0.73808664",
"0.736309",
"0.7312017... | 0.87401515 | 0 |
Returns unspent transaction balance for a given public key. | def rCkj(cAvH, rmyT):
wMl7 = 0
for XkN1 in rmyT:
if XkN1.transactions.to_pk == cAvH:
wMl7 += XkN1.transactions.amount
if XkN1.transactions.from_pk == cAvH:
wMl7 -= XkN1.transactions.amount
return wMl7 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def u0LD(sz11):\n return sum((hlel['value'] for hlel in sz11.values()))",
"def O8uC(YKHO, JYgU, VIXL):\n return",
"def wMl7(YKHO, _c1T=None):\n umWR = YKHO._entries()\n if _c1T:\n umWR = umWR.filter(transaction__t_stamp__lt=_c1T)\n Mkmy = umWR.aggregate(b=zphJ('amount'))\n Fg_i = Mkmy[... | [
"0.5885487",
"0.5719444",
"0.56902117",
"0.567527",
"0.5659281",
"0.56399536",
"0.5580581",
"0.55722743",
"0.5546668",
"0.55227065",
"0.5496131",
"0.54322803",
"0.5421806",
"0.5412379",
"0.5411639",
"0.5399782",
"0.53500855",
"0.5331782",
"0.5320737",
"0.53198594",
"0.5307876... | 0.67212254 | 0 |
Calculates the total gas density distribution | def meJ3(Cs6h=None, nIjK=None):
rR8k = oyIN.meshgrid(Cs6h.x, Cs6h.y, Cs6h.z, indexing='ij')
if nIjK['crd_sys'] == 'sph':
x6aZ = rR8k[0]
rxEN = rR8k[1]
_oWe = rR8k[2]
CAzz = x6aZ * oyIN.sin(rxEN) * oyIN.sin(_oWe)
Jd40 = x6aZ * oyIN.sin(rxEN) * oyIN.cos(_oWe)
Ud7_ =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def InLe(YKHO):\n return 0.001 * YKHO.molar_mass * YKHO.pressure / (K6Rf * YKHO.temperature)",
"def y_om(bPV5, diNy, seEd):\n rLLL = 8.314\n WCpz = seEd / 145.038\n tUjD = diNy + 273.16\n KDR1 = WCpz / (4.892 - 0.4048 * bPV5)\n cbhz = tUjD / (94.72 + 170.75 * bPV5)\n k0lF = 0.03 + 0.00527 * ... | [
"0.71246976",
"0.69465566",
"0.67306685",
"0.6410357",
"0.62949795",
"0.6269599",
"0.626525",
"0.6260228",
"0.6186723",
"0.61853653",
"0.617477",
"0.6128605",
"0.61184174",
"0.60929406",
"0.608601",
"0.6082533",
"0.6082533",
"0.6082533",
"0.6049827",
"0.6004767",
"0.5997749",... | 0.6994993 | 1 |
Returns the table name for this repository. | def GTA_(YKHO) -> str:
return YKHO.model._meta.db_table | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LKuW(YKHO):\n return YKHO._table",
"def GTA_(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'table_name')",
"def GTA_() -> str:\n pass",
"def tyNF(YKHO):\n return YKHO._table_name",
"def GTA_(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'table_name')",
"def GTA_(YKHO) -> qe4Y.... | [
"0.82748",
"0.82637185",
"0.8112258",
"0.7999641",
"0.78599066",
"0.78599066",
"0.78599066",
"0.77608806",
"0.76477003",
"0.7512858",
"0.7442876",
"0.74084663",
"0.73887527",
"0.73285073",
"0.7034749",
"0.702189",
"0.6892916",
"0.6888258",
"0.6852236",
"0.68435985",
"0.683430... | 0.80808324 | 3 |
Define a pretrained model to use. params training True for training mode, False for test mode. returns model a model for training or test. | def YrZb(Y9ns=True):
C3ST = FYrf.alexnet(pretrained=True)
AmnI = U78l.Sequential(U8Lr([('fc1', U78l.Linear(9216, 2024)), ('relu', U78l.ReLU()), ('dropout', U78l.Dropout(p=0.7)), ('fc2', U78l.Linear(2024, 516)), ('relu', U78l.ReLU()), ('dropput', U78l.Dropout(p=0.7)), ('fc3', U78l.Linear(516, 5)), ('output', U78... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def su3b(ZGE9, TFPw):\n if ZGE9 == 'vgg16':\n C3ST = FYrf.vgg16(pretrained=True)\n for xqoZ in C3ST.parameters():\n xqoZ.requires_grad = False\n qepc = C3ST.classifier[6].in_features\n C3ST.classifier[6] = U78l.Sequential(U78l.Linear(qepc, 256), U78l.ReLU(), U78l.Dropout(0... | [
"0.6809797",
"0.6580505",
"0.6549405",
"0.6540274",
"0.64882255",
"0.64824384",
"0.64065886",
"0.6401762",
"0.63960826",
"0.63715506",
"0.63633484",
"0.6355317",
"0.63497865",
"0.6336184",
"0.63135195",
"0.6306535",
"0.6274274",
"0.62690586",
"0.6231239",
"0.62281173",
"0.622... | 0.65795845 | 2 |
Preprocess an image to feed the model. params img PIL image. returns img preprocessed tensor image. | def biH0(VXjJ):
JBMS = oyIN.array([0.485, 0.456, 0.406])
M1Jx = oyIN.array([0.229, 0.224, 0.225])
VXjJ = VXjJ.resize(size=(224, 224))
VXjJ = oyIN.array(VXjJ, dtype=oyIN.float64)
VXjJ = (VXjJ - JBMS) / M1Jx
VXjJ = VXjJ.transpose((2, 0, 1))
VXjJ = ht2j.from_numpy(VXjJ)
return VXjJ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def biH0(YKHO, VXjJ):\n t9mp = LNo8.load_img(VXjJ, target_size=(299, 299))\n t9mp = LNo8.img_to_array(t9mp)\n t9mp = oyIN.expand_dims(t9mp, axis=0)\n t9mp = fjyB(t9mp)\n return t9mp",
"def biH0(YKHO, Xn71, JBMS=None):\n if JBMS:\n Xn71 = Einh(Xn71, (227, 227)) - JBMS\n else:\n ... | [
"0.7884702",
"0.74426657",
"0.7070077",
"0.687904",
"0.6874277",
"0.6844147",
"0.68041897",
"0.68041897",
"0.6767351",
"0.67615294",
"0.6743081",
"0.6728418",
"0.67210937",
"0.6695991",
"0.6657512",
"0.6650531",
"0.6647138",
"0.66239464",
"0.65570956",
"0.6549486",
"0.6539712... | 0.73933655 | 2 |
Return a JSONserializable representation of this result. The output of this function can be converted to a serialized string | def qQXR(YKHO):
return {'qualified_name': YKHO.qualified_name, 'description': YKHO.description, 'data': YKHO.data} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Napc(YKHO):\n return qQXR.dumps(YKHO.as_dict())",
"def oD7C(YKHO):\n return qQXR.dumps(YKHO.serialize())",
"def oD7C(YKHO):\n return qQXR.dumps(YKHO.for_json())",
"def Pdnt(YKHO):\n return qQXR.dumps(YKHO.jsonable())",
"def EeSr(YKHO):\n return qQXR.encode(YKHO.__toJSON())",
"def Napc(... | [
"0.8424164",
"0.8293793",
"0.8217683",
"0.81915045",
"0.8184411",
"0.8159761",
"0.80613476",
"0.8061119",
"0.8054152",
"0.8054152",
"0.80284095",
"0.8028207",
"0.8028207",
"0.8028207",
"0.8023654",
"0.8022",
"0.80133784",
"0.80133784",
"0.80133784",
"0.80093104",
"0.80093104"... | 0.0 | -1 |
Test that invalid assignment throws a TypeError. | def pryM():
with trZe.raises(TypeError):
Qq9K(property=SUDK('id', 'a15'))
with trZe.raises(TypeError):
Qq9K(property=KG2U('property'), conditions=[FRJU('condition'), SUDK('scope', 'id')]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Kdi3():\n with trZe.raises(ValueError):\n jhMV('missing_type', {})",
"def QZtn(YKHO):\n ZlgM = xEYJ('table', [])\n with YKHO.assertRaises(PvNT):\n ZlgM.add_assignment_clause('x=5')",
"def QZtn(YKHO):\n ZlgM = xEYJ('table', [])\n with YKHO.assertRaises(PvNT):\n ZlgM.add_a... | [
"0.6923433",
"0.6909115",
"0.6875627",
"0.67500514",
"0.6740249",
"0.67324466",
"0.6725503",
"0.6685543",
"0.6678759",
"0.66671157",
"0.66615397",
"0.66235274",
"0.66124415",
"0.6600779",
"0.6580775",
"0.65743834",
"0.6560061",
"0.65450007",
"0.6533935",
"0.653258",
"0.651419... | 0.7343256 | 0 |
Checks that queries with a TransactionNow() parameter are not cached. | def Ri9O(YKHO):
YEnM = STnF.objects.create(datetime='1992-07-02T12:00:00')
umWR = STnF.objects.filter(datetime__lte=P9H_())
with YKHO.assertRaises(tlPp):
YKHO.assert_tables(umWR, STnF)
YKHO.assert_query_cached(umWR, [YEnM], after=1)
YEnM.delete() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QNXD(YKHO):\n vexM = aEKu.objects.no_cache().cache(12).filter(id=1)\n NaW5(vexM.timeout, 12)\n Nlgd = vexM.no_cache()\n NaW5(vexM.timeout, 12)\n assert Nlgd.timeout != 12\n assert not hasattr(Nlgd.get(), 'from_cache')\n NaW5(vexM.get().id, 1)\n assert hasattr(vexM.get(), 'from_cache')",... | [
"0.65873754",
"0.65434366",
"0.6111932",
"0.60805",
"0.6062309",
"0.5831925",
"0.5749737",
"0.57496566",
"0.57154137",
"0.5707434",
"0.56087804",
"0.559169",
"0.55760676",
"0.5576006",
"0.55711",
"0.5567866",
"0.5561702",
"0.5535374",
"0.5533996",
"0.5518297",
"0.5511918",
... | 0.7330192 | 0 |
Write dockercompose to a path in order to use it with dockercompose ( config check ) | def D1Iw(pmON, zujB, VMsw):
if pmON.lower().endswith(('.yml', '.yaml')):
qaEx = pmON
Z0kE = Hy7s.path.dirname(pmON)
else:
Z0kE = pmON
qaEx = Hy7s.path.join(Z0kE, mtMZ[0])
if Hy7s.path.isdir(Z0kE) is False:
Hy7s.mkdir(Z0kE)
try:
with NTfD.utils.files.fopen(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oyEy(khjS: Any) -> ImMB:\n return Hy7s.path.join(str(khjS.rootdir), './', 'docker-compose.yml')",
"def oyEy(khjS):\n return Hy7s.path.join(str(khjS.rootdir), 'tests', 'docker-compose.yml')",
"def eLpg(pmON, zujB):\n if zujB:\n U5bT = D1Iw(pmON, zujB, already_existed=False)\n if isins... | [
"0.72773117",
"0.6826645",
"0.6804615",
"0.6153526",
"0.6096249",
"0.5946425",
"0.5809439",
"0.5750655",
"0.5641869",
"0.55633897",
"0.54744136",
"0.5454378",
"0.5443656",
"0.5438875",
"0.5408235",
"0.53471535",
"0.5344977",
"0.53430104",
"0.5338488",
"0.5337685",
"0.5324776"... | 0.7942182 | 0 |
Load a dockercompose project from path | def JYQV(pmON):
qaEx = UeOe(pmON)
if qaEx is None:
tO9_ = 'Could not find docker-compose file at {}'.format(pmON)
return cbmv(False, tO9_, None, None)
return q_L2(qaEx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pniB(pmON):\n qaEx = UeOe(pmON)\n if qaEx is None:\n tO9_ = 'Could not find docker-compose file at {}'.format(pmON)\n return (None, cbmv(False, tO9_, None, None))\n if not Hy7s.path.isfile(qaEx):\n return (None, cbmv(False, 'Path {} is not present'.format(qaEx), None, None))\n ... | [
"0.6835263",
"0.6689488",
"0.6439544",
"0.622838",
"0.6009252",
"0.5995533",
"0.59210384",
"0.588785",
"0.58126724",
"0.57850766",
"0.576354",
"0.57551694",
"0.5711305",
"0.5657802",
"0.5614034",
"0.55559033",
"0.55520815",
"0.5512243",
"0.5510658",
"0.54853284",
"0.5443572",... | 0.8517256 | 0 |
Get the content of the dockercompose file into a directory path Path where the dockercompose file is stored on the server | def NMoC(pmON):
qaEx = UeOe(pmON)
if qaEx is None:
return cbmv(False, 'Path {} is not present'.format(pmON), None, None)
Z2Vk = lVP6(qaEx)
if not Z2Vk['status']:
return Z2Vk
bNKA = JYQV(pmON)
if isinstance(bNKA, dict):
Z2Vk['return']['valid'] = False
else:
Z2V... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oyEy(khjS: Any) -> ImMB:\n return Hy7s.path.join(str(khjS.rootdir), './', 'docker-compose.yml')",
"def oyEy(khjS):\n return Hy7s.path.join(str(khjS.rootdir), 'tests', 'docker-compose.yml')",
"def D1Iw(pmON, zujB, VMsw):\n if pmON.lower().endswith(('.yml', '.yaml')):\n qaEx = pmON\n Z... | [
"0.75657314",
"0.709417",
"0.6934029",
"0.6886011",
"0.67807806",
"0.6409151",
"0.6285854",
"0.61683273",
"0.6044491",
"0.59650165",
"0.58391017",
"0.5771815",
"0.5720905",
"0.5691218",
"0.5683606",
"0.56742376",
"0.5627102",
"0.56093",
"0.5573163",
"0.55534405",
"0.5431933",... | 0.6638801 | 5 |
Create the definition of a dockercompose service This fails when the service already exists This does not pull or up the service This wil rewrite your yaml file. Comments will be lost. Indentation is set to 2 spaces path Path where the dockercompose file is stored on the server service_name Name of the service to creat... | def eYbi(pmON, bSEa, q_DO):
kWu6, AUeM, XObx = aNPn(pmON, q_DO)
if XObx:
return XObx
B373 = kWu6['compose_content']['services']
if bSEa in B373:
tO9_ = 'Service {} already exists'.format(bSEa)
return cbmv(False, tO9_, None, None)
B373[bSEa] = AUeM
return xDB2(pmON, kWu6, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vwvR(pmON, bSEa, q_DO):\n kWu6, AUeM, XObx = aNPn(pmON, q_DO)\n if XObx:\n return XObx\n B373 = kWu6['compose_content']['services']\n if bSEa in B373:\n tO9_ = 'Service {} already exists'.format(bSEa)\n return cbmv(False, tO9_, None, None)\n B373[bSEa] = AUeM\n return xDB... | [
"0.68075156",
"0.66995794",
"0.63227934",
"0.6103154",
"0.5950564",
"0.59071606",
"0.5882466",
"0.58698624",
"0.5853003",
"0.56863904",
"0.56229836",
"0.5621275",
"0.56046015",
"0.55999744",
"0.55704623",
"0.5559334",
"0.5555121",
"0.5498306",
"0.54369533",
"0.5411161",
"0.53... | 0.79874635 | 0 |
Create or update the definition of a dockercompose service This does not pull or up the service This wil rewrite your yaml file. Comments will be lost. Indentation is set to 2 spaces path Path where the dockercompose file is stored on the server service_name Name of the service to create definition Service definition a... | def vwvR(pmON, bSEa, q_DO):
kWu6, AUeM, XObx = aNPn(pmON, q_DO)
if XObx:
return XObx
B373 = kWu6['compose_content']['services']
if bSEa in B373:
tO9_ = 'Service {} already exists'.format(bSEa)
return cbmv(False, tO9_, None, None)
B373[bSEa] = AUeM
return xDB2(pmON, kWu6, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eYbi(pmON, bSEa, q_DO):\n kWu6, AUeM, XObx = aNPn(pmON, q_DO)\n if XObx:\n return XObx\n B373 = kWu6['compose_content']['services']\n if bSEa in B373:\n tO9_ = 'Service {} already exists'.format(bSEa)\n return cbmv(False, tO9_, None, None)\n B373[bSEa] = AUeM\n return xDB... | [
"0.74985135",
"0.6445458",
"0.60631627",
"0.5978318",
"0.59001344",
"0.55588377",
"0.55379766",
"0.55068725",
"0.5487751",
"0.54670787",
"0.5425984",
"0.54113424",
"0.54099447",
"0.5391461",
"0.53341955",
"0.53015614",
"0.5273596",
"0.52600443",
"0.5246454",
"0.5232178",
"0.5... | 0.6854243 | 1 |
Do not return anything, modify rooms inplace instead. | def awDp(YKHO, DFSo: List[List[int]]) -> None:
if len(DFSo) == 0:
return DFSo
exwG, r8hN = (len(DFSo), len(DFSo[0]))
for YRbF in range(exwG):
for r845 in range(r8hN):
if DFSo[YRbF][r845] == 0:
vexM = [(YRbF, r845, 0)]
while vexM:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DFSo(YKHO, DFSo):\n YKHO._rooms = DFSo",
"def eEEi(YKHO):\n DFSo = YKHO.model.get_all_rooms()\n for abiq in DFSo:\n YKHO._add_room(abiq)",
"def DFSo(*qIxc):\n s_GD.system_message('\\n'.join(DFSo()))",
"def pUc1(YKHO):\n pass",
"def a12t(YKHO, gv2B: str, BdN0: str):\n for abiq i... | [
"0.67922723",
"0.6150443",
"0.5985418",
"0.59520423",
"0.5938853",
"0.5910455",
"0.5802791",
"0.5788961",
"0.57677865",
"0.56960684",
"0.56584203",
"0.56518275",
"0.5649922",
"0.56375164",
"0.5580176",
"0.5570199",
"0.5540112",
"0.5534412",
"0.5534412",
"0.5529608",
"0.549605... | 0.535828 | 35 |
Checks whether there is a four in a row in the downward right diagonal | def GWNh(YKHO, YRbF, r845, iBIi):
qfpW = iBIi.pieceAt(YRbF, r845)
rdlD = True
for G1Hx in range(4):
rdlD &= iBIi.pieceAt(YRbF + G1Hx, r845 + G1Hx) is qfpW
if rdlD:
return qfpW
else:
return HRmL.EMPTY | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Niej(YKHO, rdlD, fvDH):\n return YKHO.is_neg_diagonal_four(rdlD, fvDH) or YKHO.is_pos_diagonal_four(rdlD, fvDH)",
"def aBPj(YKHO, rdlD, fvDH):\n oyg0 = YKHO.board[rdlD][fvDH]\n Kax8 = 0\n jvSB = oyg0\n YRbF = rdlD\n r845 = fvDH\n while jvSB == oyg0:\n Kax8 += 1\n YRbF -= 1\... | [
"0.80697626",
"0.79389244",
"0.7929298",
"0.78796417",
"0.7733377",
"0.75398463",
"0.74274844",
"0.7236405",
"0.71303105",
"0.69762534",
"0.69188464",
"0.69162035",
"0.68777204",
"0.6788734",
"0.67829597",
"0.6773064",
"0.67599905",
"0.6751465",
"0.67349017",
"0.66804975",
"0... | 0.6458254 | 30 |
Make XML to UTF8 String. | def vwqL(YKHO, tZ2K='utf-8'):
return vwqL(YKHO.dom, tZ2K) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kDOd(J_Es):\n if jKi7.PY2:\n return GXnK.tostring(J_Es)\n else:\n return GXnK.tostring(J_Es, encoding='unicode')",
"def qqj4(QToG, uC_X=True):\n BbcR = QGpr.tostring(QToG, xml_declaration=True, encoding='utf-8', pretty_print=True)\n if uC_X:\n return WR89.standard_b64encode(B... | [
"0.710719",
"0.68319476",
"0.66769594",
"0.65126383",
"0.6419384",
"0.6393383",
"0.6357978",
"0.631629",
"0.63001513",
"0.62554073",
"0.6238711",
"0.6228109",
"0.6215047",
"0.6211786",
"0.61151385",
"0.6099358",
"0.6078633",
"0.6055261",
"0.60503304",
"0.60116404",
"0.6007575... | 0.5930737 | 25 |
Return a metadata dictionary for the given attribute. | def J3uF(hkS8: Attr, DwIs: Optional[str]) -> cuzp:
yIVm = dict(name=None if hkS8.is_nameless or hkS8.local_name == _j8X(hkS8.name) else hkS8.local_name, type=hkS8.xml_type, namespace=hkS8.namespace if DwIs != hkS8.namespace or hkS8.is_attribute else None, **hkS8.restrictions.asdict())
return {H5ew: BWXx for H5e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oUlR(YKHO, xC3W):\n return YKHO.metadata.get(xC3W, None)",
"def A11e(YKHO):\n Xfhm = g760.defaultdict(dict)\n for xC3W in YKHO.attributes:\n Xfhm[xC3W.name]['valuemap'] = xC3W.valuemap\n Xfhm[xC3W.name]['qualifiers'] = xC3W.qualifiers\n return dict(Xfhm)",
"def Pjzv(YKHO, hGI9):\n... | [
"0.80611295",
"0.6640201",
"0.6310064",
"0.6282465",
"0.62235844",
"0.6186647",
"0.61527765",
"0.6104153",
"0.60708326",
"0.59096164",
"0.58917516",
"0.5883121",
"0.5864295",
"0.58617693",
"0.5850732",
"0.5843104",
"0.58422196",
"0.5841524",
"0.5826108",
"0.58245003",
"0.5811... | 0.7190434 | 1 |