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 |
|---|---|---|---|---|---|---|
(Re)set parameter gradients to zero. | def frhb(YKHO):
for xqoZ in YKHO.parameters():
xqoZ.zero_grad() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def frhb(YKHO):\n for xqoZ in YKHO.params:\n xqoZ.grad = None",
"def sbx9(YKHO):\n for xqoZ in YKHO.parameters():\n if xqoZ.grad is None:\n xqoZ.grad = xqoZ.new(*xqoZ.shape)\n xqoZ.grad.zero_()",
"def qw6L(YKHO):\n for XP5J in YKHO.parameters():\n if XP5J.grad_v ... | [
"0.83086115",
"0.82766294",
"0.81677663",
"0.8101196",
"0.8010191",
"0.7950889",
"0.7919059",
"0.78753525",
"0.7785489",
"0.7785489",
"0.7785489",
"0.7785489",
"0.77682865",
"0.77682865",
"0.7746875",
"0.7746875",
"0.7741933",
"0.77403253",
"0.76801515",
"0.7665582",
"0.76494... | 0.7986274 | 6 |
Put the module in training mode. | def EvQg(YKHO):
YKHO.predicting = False
return YKHO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EvQg(YKHO):\n YKHO.train_mode = True\n for yR_P in YKHO.modules():\n yR_P.train_mode = True",
"def Y9ns(YKHO):\n YKHO.training = True",
"def Y9ns(YKHO):\n YKHO.config.is_train = True",
"def rtlt(YKHO):\n YKHO._mode = 'train'",
"def dt0H(YKHO):\n YKHO.model.train()",
"def EvQg... | [
"0.8420353",
"0.8108326",
"0.802619",
"0.7930669",
"0.7648938",
"0.75721914",
"0.7535088",
"0.7464799",
"0.7451548",
"0.74360013",
"0.7431341",
"0.74238366",
"0.73862076",
"0.7384827",
"0.7384205",
"0.7356002",
"0.7303083",
"0.72815335",
"0.72798944",
"0.72728395",
"0.7215679... | 0.66943765 | 80 |
Recording Configuration ARN is automatically generated on creation and assigned as the unique identifier. | def hMqs(YKHO) -> h8nf[str]:
return qe4Y.get(YKHO, 'arn') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _H6J(YKHO) -> str:\n return qe4Y.get(YKHO, 'sink_arn')",
"def FIMM(Ro_8, *, _hf0: pulumi.Input['RecordingConfigurationDestinationConfigurationArgs'], mWFP: Optional[pulumi.Input[str]]=None, gGtV: Optional[pulumi.Input[int]]=None, Eife: Optional[pulumi.Input['RecordingConfigurationRenditionConfigurationArg... | [
"0.56815004",
"0.562318",
"0.5614608",
"0.5544616",
"0.5520146",
"0.5476057",
"0.5465972",
"0.5291331",
"0.5291331",
"0.5291331",
"0.5291331",
"0.5291331",
"0.5291331",
"0.5291331",
"0.5291331",
"0.5291331",
"0.5291331",
"0.5291331",
"0.5291331",
"0.5291331",
"0.5291331",
"... | 0.50684947 | 70 |
Get the stationary distribution. | def YR3E(YKHO, rb7a, bMAz):
dixj = []
for bGrB in Ni9Y(bMAz):
yvGc = 1
for bGrB in Ni9Y(rb7a):
yvGc = YKHO._transition(yvGc)
while yvGc > len(dixj):
dixj.append(0)
dixj[yvGc - 1] += 1
return [Mkmy / bMAz for Mkmy in dixj] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ISnw(YKHO):\n return YKHO.dist",
"def VNqK(YKHO) -> oyIN.ndarray:\n if YKHO.is_diag(YKHO.P):\n yvT9 = oyIN.diag(YKHO.TM) / YKHO.TM.sum()\n else:\n aPd6, cAlv = oyIN.linalg.eig(YKHO.P.T)\n Ty9i = cAlv[:, oyIN.argmin(oyIN.abs(aPd6 - 1.0))]\n yvT9 = Ty9i / Ty9i.sum()\n pr... | [
"0.6908631",
"0.67285043",
"0.6722381",
"0.67189986",
"0.6716119",
"0.66590065",
"0.6618268",
"0.6586515",
"0.65319186",
"0.65121657",
"0.6470097",
"0.6462658",
"0.64309025",
"0.64259714",
"0.6423803",
"0.6317611",
"0.61771715",
"0.6163624",
"0.61592203",
"0.6084334",
"0.6056... | 0.5617397 | 68 |
Get the probability of selecting some letter from an arbitrary set. | def KO5N(BFeB, kdoz, imx5=None, qT_G=None, NVrm=None):
if imx5 is None:
imx5, qT_G, NVrm = (1, 0, 0)
if qT_G == kdoz:
imx5 *= BFeB[kdoz]
qT_G += 1
NVrm += 1
if qT_G == len(BFeB):
kDeS = 1
for JxU2 in BFeB:
kDeS *= 1 - JxU2
return imx5 / (NV... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def z6J6(BFeB):\n dzye = 0\n for kWvi, W410 in enumerate(BFeB):\n dzye += W410 * KO5N(BFeB, kWvi)\n return dzye",
"def Q7Be(GIN8, ywwl=sum(lZDZ.values())):\n return lZDZ[GIN8] / ywwl",
"def Ovm8(YKHO, KoG3):\n if isinstance(KoG3, str):\n KoG3 = list(KoG3)\n return YKHO.word_seq_... | [
"0.6760303",
"0.64731765",
"0.64539576",
"0.64218384",
"0.62773347",
"0.6151967",
"0.61253583",
"0.60879374",
"0.60200447",
"0.59902555",
"0.5972928",
"0.59432644",
"0.5937524",
"0.5925186",
"0.5924608",
"0.59032685",
"0.58973837",
"0.58973837",
"0.58817136",
"0.58705926",
"0... | 0.665311 | 1 |
Sets the was_completed of this Assessment. | def vuww(YKHO, vuww):
if vuww is None:
raise ValueError('Invalid value for `was_completed`, must not be `None`')
YKHO._was_completed = vuww | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g9mP(YKHO, g9mP):\n YKHO._completed = g9mP",
"def g9mP(YKHO, g9mP):\n YKHO._completed = g9mP",
"def g9mP(YKHO, g9mP: bool):\n YKHO._completed = g9mP",
"def CIuI(YKHO, CIuI):\n YKHO._completed_timestamp = CIuI",
"def g9mP(YKHO):\n YKHO.completed_at = qcWV.utcnow()\n YKHO.status = yEil.... | [
"0.78412884",
"0.78412884",
"0.7755829",
"0.73501754",
"0.73312634",
"0.6985057",
"0.6941122",
"0.6941122",
"0.6941122",
"0.6925778",
"0.68791795",
"0.68197715",
"0.6794315",
"0.67647225",
"0.67647225",
"0.6726071",
"0.66415733",
"0.66335344",
"0.6612873",
"0.6568733",
"0.645... | 0.8145284 | 0 |
Sets the enrichment_session of this Assessment. | def uqdF(YKHO, uqdF):
if uqdF is None:
raise ValueError('Invalid value for `enrichment_session`, must not be `None`')
YKHO._enrichment_session = uqdF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HQKj(YKHO, HQKj):\n YKHO._econsent_screening = HQKj",
"def kUrT(YKHO, cuiw):\n YKHO._session = cuiw",
"def kUrT(YKHO, cuiw):\n raise NotImplementedError",
"def cuiw(YKHO, cuiw):\n YKHO._session = cuiw",
"def kUrT(YKHO, cuiw):\n YKHO.session = cuiw",
"def kUrT(YKHO, cuiw):\n YKHO.ses... | [
"0.5838745",
"0.5770998",
"0.5709288",
"0.5708394",
"0.5688454",
"0.5688454",
"0.55989563",
"0.55303425",
"0.5429091",
"0.539789",
"0.53298515",
"0.53119224",
"0.51560414",
"0.5126263",
"0.50648504",
"0.5021596",
"0.50176036",
"0.50176036",
"0.50176036",
"0.50176036",
"0.5017... | 0.82166106 | 0 |
Returns the string representation of the model | def gTzM(YKHO):
return CgYo.pformat(YKHO.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return YKHO.text",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\... | [
"0.8640854",
"0.85093737",
"0.785447",
"0.7744496",
"0.77114135",
"0.7696879",
"0.76601094",
"0.7639409",
"0.7623007",
"0.7608497",
"0.7608497",
"0.7608497",
"0.76073915",
"0.7600974",
"0.75863326",
"0.75839657",
"0.7572215",
"0.7569474",
"0.75403374",
"0.75403374",
"0.752854... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.8392633",
"0.8354901",
"0.82950056",
"0.8132309",
"0.81149805",
"0.8099986",
"0.809911",
"0.8097883",
"0.8097883",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8066694",
"0.80594814",
"0.805757",
... | 0.0 | -1 |
Product synchronization should be triggered when a product's courses are cleared. | def wknR(YKHO, yQfP):
dZ4Q = Rqdq.CourseRunFactory()
sDlr = Rqdq.CourseFactory.create_batch(2)
Lx3t = Rqdq.ProductFactory(courses=sDlr, target_courses=[dZ4Q.course])
yQfP.reset_mock()
l91Z = list(Lx3t.course_relations.values_list('course__code', 'product__id').all())
Lx3t.courses.clear()
YKH... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vp52(YKHO):\n uDgo, gakj = Rqdq.CourseRunFactory.create_batch(2)\n W51C = Rqdq.ProductFactory(target_courses=[uDgo.course])\n G2h1 = Rqdq.ProductFactory(target_courses=[gakj.course])\n GQfX = Rqdq.CourseFactory(products=[W51C, G2h1])\n _LLx = list(FYrf.CourseProductRelation.objects.values_list('... | [
"0.6745569",
"0.6352654",
"0.6339931",
"0.6249712",
"0.6080397",
"0.60774714",
"0.60662836",
"0.59493583",
"0.5941936",
"0.5904375",
"0.58755857",
"0.5872185",
"0.581441",
"0.5782258",
"0.57457036",
"0.57301986",
"0.5724113",
"0.5706425",
"0.5634836",
"0.5631701",
"0.56237435... | 0.69706255 | 0 |
Product synchronization should be triggered when a course run restriction is removed from a product target course relation. | def ETnD(YKHO, yQfP):
Lx3t, bYuL = Rqdq.ProductFactory.create_batch(2)
zYtH = Rqdq.CourseFactory()
uDgo = Rqdq.CourseRunFactory(course=zYtH, start=qcWV(2022, 7, 7, 7, 0, tzinfo=nM7M('UTC')))
gakj = Rqdq.CourseRunFactory(course=zYtH, start=qcWV(2022, 8, 8, 8, 0, tzinfo=nM7M('UTC')))
Uq49 = Rqdq.Produ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UCAZ(YKHO, yQfP):\n W51C, G2h1 = Rqdq.ProductFactory.create_batch(2)\n zYtH = Rqdq.CourseFactory()\n Rqdq.CourseRunFactory(course=zYtH, start=qcWV(2022, 7, 7, 7, 0, tzinfo=nM7M('UTC')))\n dZ4Q = Rqdq.CourseRunFactory(course=zYtH, start=qcWV(2022, 8, 8, 8, 0, tzinfo=nM7M('UTC')))\n atIF = Rqdq.Pr... | [
"0.73164403",
"0.70664215",
"0.69935954",
"0.6773055",
"0.67424476",
"0.67336255",
"0.66646343",
"0.6609174",
"0.65914595",
"0.6487046",
"0.6362041",
"0.6305796",
"0.6235278",
"0.6210351",
"0.61717325",
"0.61049914",
"0.6047253",
"0.60387534",
"0.5915619",
"0.5858286",
"0.582... | 0.7433327 | 0 |
Product synchronization should be triggered when product target course relations are cleared for a course run. | def MUDe(YKHO, yQfP):
W51C, G2h1, jctT = Rqdq.ProductFactory.create_batch(3)
zYtH = Rqdq.CourseFactory()
Rqdq.CourseRunFactory(course=zYtH, start=qcWV(2022, 7, 7, 7, 0, tzinfo=nM7M('UTC')))
dZ4Q = Rqdq.CourseRunFactory(course=zYtH, start=qcWV(2022, 8, 8, 8, 0, tzinfo=nM7M('UTC')))
Rqdq.ProductTarget... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wknR(YKHO, yQfP):\n dZ4Q = Rqdq.CourseRunFactory()\n sDlr = Rqdq.CourseFactory.create_batch(2)\n Lx3t = Rqdq.ProductFactory(courses=sDlr, target_courses=[dZ4Q.course])\n yQfP.reset_mock()\n l91Z = list(Lx3t.course_relations.values_list('course__code', 'product__id').all())\n Lx3t.courses.clea... | [
"0.7647127",
"0.75941217",
"0.7562386",
"0.74330765",
"0.73095083",
"0.7297243",
"0.7287466",
"0.720559",
"0.72039044",
"0.7150069",
"0.69564515",
"0.68045837",
"0.66528374",
"0.6589397",
"0.6567296",
"0.65553206",
"0.6480432",
"0.64727235",
"0.646681",
"0.6464902",
"0.637951... | 0.7377518 | 4 |
Convert from a native value to a legitimate index. Return the resulting index (such that _minV is mapped to 0) | def oOYu(YKHO, wEf2):
try:
if isinstance(YKHO._minV, str):
YRbF = ord(wEf2) - ord(YKHO._minV)
else:
YRbF = int(wEf2 - YKHO._minV)
except TypeError:
raise TypeError('parameter ' + str(wEf2) + ' of incorrect type')
return YRbF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Frgl(YKHO):\n ...",
"def Ph9A(YKHO, cAlv):\n Csk6 = [0, None]\n for YRbF in range(len(cAlv)):\n vC9B = cAlv[YRbF].get_length()\n if Csk6[1] == None or vC9B < Csk6[1]:\n Csk6[1] = vC9B\n Csk6[0] = YRbF\n return cAlv[Csk6[0]]",
"def zXjM(nPrm) -> int:\n VAJu... | [
"0.684755",
"0.65381444",
"0.63547873",
"0.6335735",
"0.6299731",
"0.62858504",
"0.6264379",
"0.61947834",
"0.61480325",
"0.6124849",
"0.60934144",
"0.6090944",
"0.608854",
"0.6045907",
"0.60418975",
"0.60164833",
"0.60055375",
"0.59548825",
"0.5921072",
"0.59200245",
"0.5914... | 0.7330522 | 0 |
counts categories in the variable and generates plotly bar plot | def zvsb(jQ3Z, WKvO, leAC='', n_bv='', oRJx=''):
LAOT = iEax.Layout(font_family='Courier New, monospace', font_color='black', title_text=leAC, title_font_size=20, xaxis={'title': {'text': n_bv, 'font': {'family': 'Courier New, monospace', 'size': 12, 'color': '#002e4d'}}}, yaxis={'title': {'text': oRJx, 'font': {'f... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ps9z(T4kh, ZLJ_=None):\n aNZO = uuEx.barplot(pKzo.index, pKzo.values)\n FBNX = range(len(pKzo.values))\n for r5v8, UXqs in zip(FBNX, aNZO.get_xticklabels()):\n aNZO.text(FBNX[r5v8], pKzo.values[r5v8] + 0.05, pKzo.values[r5v8], horizontalalignment='center', size='small', color='b', weight='semib... | [
"0.7213001",
"0.68938357",
"0.67653203",
"0.67106265",
"0.6708927",
"0.66988087",
"0.6558888",
"0.6549756",
"0.6544286",
"0.65364367",
"0.6490924",
"0.64532995",
"0.64482623",
"0.6412265",
"0.64009124",
"0.6375891",
"0.63743246",
"0.6354378",
"0.635174",
"0.63510853",
"0.6343... | 0.7572506 | 0 |
returns the first elements of a list with total length < n. | def Fe3v(exwG, yv6U):
if not yv6U or len(yv6U[0]) > exwG:
return []
else:
return [yv6U[0]] + Fe3v(exwG - len(yv6U[0]), yv6U[1:]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ceA2(yv6U, exwG):\n if KdtW(yv6U):\n jbXL = vdyO(yv6U)\n return jbXL[0:exwG]\n return -1",
"def G_GM(aPd6, exwG):\n _pUq = []\n TEEK = list(oyIN.copy(aPd6))\n for YRbF in range(exwG):\n _pUq.append(min(TEEK))\n TEEK.remove(min(TEEK))\n return _pUq",
"def _iMd(O... | [
"0.76697034",
"0.7377449",
"0.7273592",
"0.7248493",
"0.72021884",
"0.71977735",
"0.71749747",
"0.71436685",
"0.7095585",
"0.7095585",
"0.7095585",
"0.70803034",
"0.7043972",
"0.69865274",
"0.69865274",
"0.6927573",
"0.68885463",
"0.6864475",
"0.6826859",
"0.68059796",
"0.679... | 0.6381677 | 42 |
Load a yaml config file. | def B4cB(Emd4, uBeC, Ux0P='(unknown)'):
try:
GPtr = eJb6.safe_load(uBeC)
except eJb6.YAMLError as err:
if hasattr(XObx, 'problem_mark'):
Bc7X = XObx.problem_mark
jMN5 = 'Invalid YAML syntax in Configuration file %(file)s at line: %(line)s, column: %(column)s.' % dict(file... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Yldr(SFUd):\n with open(SFUd, 'r') as wOb_:\n try:\n return eJb6.safe_load(wOb_)\n except eJb6.YAMLError as exc:\n raise ValueError('Yaml error - check yaml file')",
"def Dodi(pmON):\n with open(pmON) as eHNT:\n GPtr = eJb6.load(eHNT, Loader=eJb6.FullLoader)\n... | [
"0.84046465",
"0.8344664",
"0.832791",
"0.82594585",
"0.8249511",
"0.8241423",
"0.8218426",
"0.81802136",
"0.81799114",
"0.81669354",
"0.81669354",
"0.8147121",
"0.81254655",
"0.8115199",
"0.8085583",
"0.8077844",
"0.8068958",
"0.8066417",
"0.8052179",
"0.8048721",
"0.8044939... | 0.7788489 | 56 |
Turn seed into a np.random.RandomState instance If seed is None, return the RandomState singleton used by np.random. If seed is an int, return a new RandomState instance seeded with seed. If seed is already a RandomState instance, return it. Otherwise raise ValueError. | def p11e(yokr):
if yokr is None or yokr is oyIN.random:
return oyIN.random.mtrand._rand
if isinstance(yokr, (mSrU.Integral, oyIN.integer)):
return oyIN.random.RandomState(yokr)
if isinstance(yokr, oyIN.random.RandomState):
return yokr
raise ValueError('%r cannot be used to seed a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def p11e(yokr):\n if yokr is None or yokr is oyIN.random:\n return oyIN.random.mtrand._rand\n if isinstance(yokr, (mSrU.Integral, oyIN.integer)):\n return oyIN.random.RandomState(yokr)\n if isinstance(yokr, oyIN.random.RandomState):\n return yokr\n raise ValueError('%r cannot be us... | [
"0.84223783",
"0.837953",
"0.8280282",
"0.82543397",
"0.7676831",
"0.76356417",
"0.76210904",
"0.7608665",
"0.75437933",
"0.75163424",
"0.7482657",
"0.7428785",
"0.74245745",
"0.7252486",
"0.711804",
"0.7091268",
"0.7081321",
"0.6925479",
"0.6895403",
"0.6869278",
"0.6845312"... | 0.84039015 | 1 |
Get the raw content of the artifact. This returns a reference to the artifact so changes made to the returned object will be reflected when saving. | def Ctz2(YKHO):
return YKHO.definition | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ctz2(YKHO):\n return YKHO.content",
"def BuGO(YKHO):\n return open(YKHO.path, 'r').read()",
"def EPt3(YKHO):\n return open(YKHO.path).read()",
"def kGys(YKHO):\n if YKHO._contents == None:\n YKHO.image._file.seek(YKHO.offset)\n YKHO._contents = YKHO.image._file.read(YKHO.length)... | [
"0.72194",
"0.6988896",
"0.68790805",
"0.68160146",
"0.6728474",
"0.66692615",
"0.66504943",
"0.6613891",
"0.66109765",
"0.66109765",
"0.6560873",
"0.65582764",
"0.6520048",
"0.6517789",
"0.6505225",
"0.6495717",
"0.6461782",
"0.64523095",
"0.64466494",
"0.64053965",
"0.63906... | 0.62562007 | 53 |
Get the definition of the last signoff cycle of this specific workflow step. | def MvVt(YKHO):
q_DO = YKHO.client._perform_json('GET', '/artifact/%s/workflow/step/%s/signoff' % (YKHO.artifact_id, YKHO.step_id))
return Lvsl(YKHO.client, YKHO.artifact_id, YKHO.step_id, q_DO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UYB1(YKHO):\n QxIo = YKHO.get_summary()\n return QxIo.get('last', None)",
"def UYB1(YKHO):\n return YKHO.__sentinel.prev",
"def vLYb(YKHO):\n return YKHO.get_proc_step(-1)",
"def pKh4(YKHO):\n return YKHO.get('lastexposureduration')",
"def XVAW(YKHO) -> h8nf[str]:\n return qe4Y.get(YK... | [
"0.631395",
"0.6221068",
"0.6170706",
"0.61585194",
"0.60623246",
"0.60610247",
"0.6054141",
"0.6030748",
"0.6012135",
"0.5982892",
"0.5982892",
"0.5982892",
"0.5978312",
"0.59746706",
"0.5961276",
"0.5949392",
"0.5947294",
"0.594072",
"0.59366435",
"0.59142715",
"0.5896606",... | 0.7656361 | 0 |
Get the last signoff cycle details for this specific workflow step. This contains a list of computed users included in feedback groups and in the approval. | def c2sL(YKHO):
iQG7 = YKHO.client._perform_json('GET', '/artifact/%s/workflow/step/%s/signoff/details' % (YKHO.artifact_id, YKHO.step_id))
return vtJA(YKHO.client, YKHO.artifact_id, YKHO.step_id, iQG7) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UYB1(CBIr):\n return AGyz.objects.filter(user=CBIr).latest('datetime')",
"def mC6a(YKHO):\n return YKHO.user_rec.last_signon",
"def iGug(YKHO):\n return YKHO._feedback",
"def E5db(YKHO):\n return YKHO._as.get_state()",
"def Cx8b(YKHO):\n nPrm = YKHO.lazyload_data(refresh_cache=True)\n ... | [
"0.55041885",
"0.548566",
"0.52711076",
"0.52648103",
"0.52497405",
"0.5163851",
"0.5162108",
"0.5161733",
"0.5144807",
"0.51370615",
"0.51028687",
"0.5081882",
"0.50683826",
"0.5062878",
"0.50408816",
"0.50052994",
"0.49964908",
"0.49926233",
"0.49627754",
"0.4957807",
"0.49... | 0.6124513 | 0 |
Get the raw content of the signoff cycle details. | def Ctz2(YKHO):
return YKHO.details | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c2sL(YKHO):\n iQG7 = YKHO.client._perform_json('GET', '/artifact/%s/workflow/step/%s/signoff/details' % (YKHO.artifact_id, YKHO.step_id))\n return vtJA(YKHO.client, YKHO.artifact_id, YKHO.step_id, iQG7)",
"def Ctz2(YKHO):\n return YKHO.content",
"def Ctz2(YKHO):\n return YKHO.raw_data",
"def ... | [
"0.6759305",
"0.60065144",
"0.58454424",
"0.5804389",
"0.57658434",
"0.5735819",
"0.5642942",
"0.56090546",
"0.5595275",
"0.5594174",
"0.5565262",
"0.5565262",
"0.54911387",
"0.546949",
"0.545892",
"0.5458698",
"0.54582244",
"0.5455057",
"0.5436154",
"0.53924716",
"0.5369218"... | 0.6214851 | 1 |
Tests the validity of a Cryptol expression with random inputs. The expression must be a function with return type ``Bit``. If ``num_tests`` is ``"all"`` then the expression is tested exhaustively (i.e., against all possible inputs). If ``num_tests`` is omitted, Cryptol defaults to running 100 tests. | def GfdN(YKHO, VN2L: Any, *, fafq: Union[Literal['all'], int, None]=None, vYBr: Optional[float]=None) -> yL5m.Command:
vYBr = vYBr if vYBr is not None else YKHO.timeout
if fafq == 'all' or isinstance(fafq, int) or fafq is None:
YKHO.most_recent_result = t3wQ(YKHO, VN2L, fafq, vYBr)
return YKHO.m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JQZy(YKHO, Tp9Q):\n for exwG in range(1, Tp9Q + 1):\n print('Running exhaustive tests for %d bits' % exwG)\n ZZSa = YKHO.generate_functions(exwG)\n for aEqx, eHNT in ZZSa:\n jFwo, y2uw = YKHO.run_dj(eHNT)\n if y2uw != aEqx:\n raise ValueError('Test f... | [
"0.61489594",
"0.5880864",
"0.5807778",
"0.5607027",
"0.55637425",
"0.55570304",
"0.5520944",
"0.5500811",
"0.54521525",
"0.5387873",
"0.53648335",
"0.5257695",
"0.5219997",
"0.5218581",
"0.52093774",
"0.5194339",
"0.516155",
"0.51487327",
"0.51483226",
"0.5132738",
"0.511907... | 0.6022716 | 1 |
Root page view. This is essentially a singlepage app, if you ignore the login and admin parts. | def d6pt(QePW):
DFSo = uHxD.objects.order_by('title')
if QePW.method == 'POST':
L03z = ZICO(QePW.POST)
if L03z.is_valid():
_yCA = L03z.save(commit=False)
_yCA.save()
return vKnz('/')
else:
L03z = ZICO()
return _1tc(QePW, 'index.html', {'roo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tk5Y():\n CBIr = TKWP()\n return TvZl('index.html', homepage=True, user=CBIr)",
"def _fof(QePW):\n return _1tc(QePW, template_name='website/index.html')",
"def Ev1b():\n bo34.info('At main app page.')\n return TvZl('index.html')",
"def tk5Y():\n return TvZl('home.html')",
"def kZiy(Qe... | [
"0.8158468",
"0.77035934",
"0.76191354",
"0.75428396",
"0.7493715",
"0.73536134",
"0.7314526",
"0.72974",
"0.7296653",
"0.7257943",
"0.7254751",
"0.72336",
"0.7230346",
"0.7201111",
"0.7156257",
"0.7152482",
"0.71295834",
"0.71214056",
"0.711845",
"0.70985585",
"0.7072113",
... | 0.0 | -1 |
Test post request with changing the number of hours time spans No logo file | def DthY(YKHO):
q9zX = s9HI.objects.get(pk=1)
YKHO.assertEqual(q9zX.hours.count(), 3)
YKHO.client.login(username='test11', password='test11')
bD7m = gxEw('da:company_profile')
nPrm = {'company_name': 'May 15', 'founded_at': '2014', 'email': 'cc@ggg.com', 'payment_method': 'PayPal', 'subscription_pla... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _YgW(YKHO):\n YKHO.setup()\n geh0 = YKHO.client.get(gxEw('park_at_dcu:carpark_for_time'), {'time': '25'})\n YKHO.assertEqual(geh0.status_code, 200)\n YKHO.assertContains(geh0, 'Invalid time')",
"def DyU3(YKHO):\n C7pn = qcWV.now()\n SWox = C7pn - fCoM(0, 1800)\n kdxK = YKHO.scpp_req('pet... | [
"0.61371005",
"0.6060578",
"0.6056879",
"0.6014936",
"0.6000163",
"0.59833187",
"0.5956605",
"0.5956605",
"0.59538347",
"0.59238786",
"0.5919996",
"0.5898861",
"0.5866849",
"0.58659035",
"0.58445567",
"0.5777934",
"0.5761514",
"0.57555413",
"0.57376933",
"0.57276326",
"0.5724... | 0.53632694 | 69 |
Return the elapsed seconds since this GX instance started. The elapsed time is logged if logging is on. | def QZjh(YKHO, TZ9E='', RKD7=False):
N8Pq = qcWV.datetime.now() - YKHO._start
QZjh = N8Pq.seconds + N8Pq.microseconds / 1000000.0
if RKD7:
if TZ9E:
TZ9E = '{}> '.format(TZ9E)
YKHO.log('{}Elapsed seconds: {} ({} minutes, {}.{} seconds)'.format(TZ9E, QZjh, N8Pq.seconds // 60, N8Pq.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QZjh(YKHO) -> float:\n return YKHO.current_time_posix() - YKHO.start_time_posix()",
"def Mo6K(YKHO):\n return ITS7.time() - YKHO.start",
"def N8Pq(YKHO) -> float:\n return onpT.default_timer() - YKHO.start_time",
"def z59i(YKHO):\n if YKHO.__started:\n return ITS7.time() - YKHO.__start... | [
"0.7995241",
"0.79792905",
"0.7948133",
"0.7920225",
"0.7906315",
"0.79028124",
"0.7879645",
"0.78479904",
"0.7836599",
"0.783268",
"0.7830433",
"0.77832335",
"0.7767344",
"0.7762916",
"0.77129495",
"0.76812816",
"0.76700807",
"0.7601651",
"0.7587838",
"0.7574618",
"0.7554224... | 0.7175725 | 42 |
r""" Construct an object of a given class. | def l_xx(CQwJ, YKHO, Csk6):
fctm = hrqm(CQwJ.__init__)
if fctm.keywords is None:
Csk6 = {G1Hx: Ty9i for G1Hx, Ty9i in Csk6.items() if G1Hx in fctm.args}
CQwJ.__init__(YKHO, **Csk6) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fP9s(vOsx: typing.Type, vIwR: str) -> laHg.Any:\n ...",
"def JrvU(Emd4):\n return Emd4.__new__(Emd4)",
"def JrvU(Emd4):\n return Emd4.__new__(Emd4)",
"def i_PC(mWFP=None, mPQc=None, **B2fa):\n if not mWFP:\n raise RuntimeError('missing object name')\n if not mPQc:\n raise Run... | [
"0.7558998",
"0.7382186",
"0.7382186",
"0.7333894",
"0.7245626",
"0.7232073",
"0.7229197",
"0.7226755",
"0.7175519",
"0.70076287",
"0.69516075",
"0.6907403",
"0.6874308",
"0.68211716",
"0.678333",
"0.676366",
"0.6725397",
"0.6648048",
"0.66475487",
"0.6645636",
"0.6645636",
... | 0.0 | -1 |
Returns the CSRF token required for a POST form. The token is an alphanumeric value. A side effect of calling this function is to make the csrf_protect | def gNTt(QePW):
QePW.META['CSRF_COOKIE_USED'] = True
awai = QePW.META.get('CSRF_COOKIE', None)
return jnRN({'csrf': awai}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IpuJ(YKHO):\n eOtH = YKHO.__token\n if eOtH is None:\n return YKHO.new_csrf_token()\n return eOtH",
"def V5V3(YKHO):\n if YKHO.request.is_post() and (not YKHO.in_exempt()):\n eOtH = YKHO.request.header('HTTP_X_CSRF_TOKEN') or YKHO.request.input('__token')\n if not YKHO.csrf.v... | [
"0.8206024",
"0.7963533",
"0.7827414",
"0.78238374",
"0.7821313",
"0.779511",
"0.779511",
"0.7736493",
"0.76716083",
"0.75816023",
"0.75228935",
"0.7464997",
"0.74607724",
"0.74567276",
"0.742497",
"0.7421676",
"0.73440385",
"0.7247794",
"0.7136951",
"0.71366376",
"0.70598",
... | 0.661352 | 31 |
Resets all agents' attributes to their intial values and reset time and step attributes scheduler | def VWYQ(YKHO):
for YWSi in YKHO.agent_buffer():
YWSi.reset_agent()
YKHO.time = 0
YKHO.steps = 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SiRx(YKHO):\n for YWSi in YKHO.agents:\n YWSi.reset()",
"def SiRx(YKHO):\n for YWSi in YKHO.agents:\n YWSi.reset()",
"def SiRx(YKHO):\n for YWSi in YKHO.agents:\n YWSi.reset()",
"def SiRx(YKHO):\n for YWSi in YKHO.agents:\n YWSi.reset()",
"def SiRx(YKHO):\n YK... | [
"0.7322905",
"0.7322905",
"0.7322905",
"0.7322905",
"0.72094625",
"0.7190749",
"0.713335",
"0.69734573",
"0.6791269",
"0.67491794",
"0.6700956",
"0.663067",
"0.6578451",
"0.65572137",
"0.6554973",
"0.6543642",
"0.65094435",
"0.6481441",
"0.6458761",
"0.64281845",
"0.64213234"... | 0.7621897 | 0 |
Determines if the agent decides to switch strategies or not by comparing its own performance to a randomly selected other trader of the same market side | def ZWco(YKHO, YWSi, Elif, m2Q4):
if YWSi.surplus > Elif.surplus:
return (YWSi.strategy, m2Q4, YWSi.return_import_params())
elif YWSi.surplus < Elif.surplus:
JxU2 = (Elif.surplus - YWSi.surplus) / Elif.surplus
if tuKI.random() < JxU2:
if Elif.strategy != YWSi.strategy:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hqvb(YKHO):\n tuKI.seed(9)\n EBgd = Ue7z.HesitantQLearner()\n EBgd.state = 'CCDC'\n EBgd.Qs = {'': {'C': 0, 'D': 0}, 'CCDC': {'C': 2, 'D': 6}}\n HpuQ = Ue7z.Cooperator()\n YKHO.assertEqual(EBgd.strategy(HpuQ), 'C')\n YKHO.assertEqual(EBgd.strategy(HpuQ), 'D')\n YKHO.assertEqual(EBgd.str... | [
"0.6494046",
"0.6460936",
"0.63576514",
"0.6348627",
"0.62983",
"0.62965393",
"0.6192021",
"0.61502236",
"0.6002263",
"0.5995602",
"0.59585375",
"0.5920757",
"0.58850276",
"0.5871437",
"0.5871437",
"0.5841847",
"0.5835409",
"0.5781351",
"0.57635504",
"0.57506794",
"0.57506794... | 0.6926966 | 0 |
Test that URI with trailing slash works | def uEqd(YKHO):
Aofo = YKHO.client.get_resource_by_uri('mf:' + 'a' * 13 + '/')
YKHO.assertEqual(Aofo['folderkey'], 'a' * 13) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wSK8(YKHO):\n YKHO.assertRaises(ValueError, YKHO.client.api_execute, 'testpath/bar', YKHO.client._MPUT)",
"def n5IV(YKHO):\n pmON = '/stories/asdas-3/'\n YKHO.assertEqual('//floodlightproject.org/stories/asdas-3/', D3T3(pmON, None))",
"def IdoN(YKHO):\n cll5 = FYrf.ShortenedUrl.objects.create(u... | [
"0.6999967",
"0.69475853",
"0.6812014",
"0.67882204",
"0.66458327",
"0.66452855",
"0.6630918",
"0.66235656",
"0.6602238",
"0.6574242",
"0.654753",
"0.654143",
"0.6541061",
"0.65078807",
"0.64884335",
"0.63566905",
"0.63419473",
"0.63331723",
"0.6332278",
"0.6323124",
"0.63141... | 0.6934416 | 2 |
Decode a registrant from a JWT. | def RevE(eOtH: str, OXYg: str) -> GaaR:
AgdR = DvJO.decode(jwt=eOtH, key=OXYg, algorithms=[rgkn], options={'verify_aud': False})
return GaaR(subject=AgdR['sub'], agent=AgdR['ot_agent'], agent_id=AgdR['ot_aid']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yXnH(qv1X, ihSY):\n return DvJO.decode(ihSY, qv1X.settings.get('giriasecret', 'galado'))",
"def uPlZ(QePW):\n Jpbe = QePW.authorization[1]\n return DvJO.decode(Jpbe, key=XmI_, options={'verify_aud': False})",
"def LzyV(nPrm):\n AgdR = DvJO.decode(nPrm, b8It, algorithms=['HS256'], audience='renk... | [
"0.7461073",
"0.721323",
"0.71714455",
"0.71209544",
"0.7119403",
"0.70091546",
"0.7003467",
"0.6993867",
"0.68433654",
"0.6827483",
"0.68150586",
"0.67669123",
"0.6757224",
"0.6753019",
"0.6726386",
"0.6716052",
"0.6706369",
"0.66946906",
"0.6693101",
"0.66921824",
"0.664940... | 0.6650544 | 20 |
Decode the expiration time from a JWT. | def Oill(eOtH: str, OXYg: str) -> qcWV:
AgdR = DvJO.decode(jwt=eOtH, key=OXYg, algorithms=[rgkn], options={'verify_aud': False})
kLQb = AgdR['exp']
return qcWV.fromtimestamp(int(kLQb)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uBw6(YKHO, zgjV, QF7s):\n N850 = None\n a1Zf = zgjV.get('expiration', None)\n if a1Zf and a1Zf.strip():\n try:\n tgqj = TsP8.parse_isotime(a1Zf)\n N850 = TsP8.normalize_time(tgqj)\n except ValueError:\n na1r.exception('Problem parsing expiration date')\n ... | [
"0.6884724",
"0.6473865",
"0.64466864",
"0.6444377",
"0.6260076",
"0.62122595",
"0.6201512",
"0.619435",
"0.61883324",
"0.6168459",
"0.6149631",
"0.6131694",
"0.6127843",
"0.6124798",
"0.6120206",
"0.6099718",
"0.6071788",
"0.60686195",
"0.6067173",
"0.6064294",
"0.60608053",... | 0.74776196 | 0 |
Check the validity of a JWT. | def h3T1(OXYg: str, eOtH: str, PhGN: str) -> bool:
try:
DvJO.decode(jwt=eOtH, key=OXYg, algorithms=[rgkn], audience=PhGN)
except DvJO.exceptions.InvalidTokenError as e:
PurT.info(f'Invalid JWT: {tTpl}')
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uhbn(DvJO: str) -> bool:\n if not DvJO:\n return False\n try:\n WBPg = jdln(DvJO)\n except Bx6I.DecodeError:\n return False\n else:\n return WBPg['typ'].lower() == 'jwt'",
"def gDhF(zoLl, Iquw, uJjO, d6pt):\n try:\n pB3N = None\n xINX = None\n p... | [
"0.74611926",
"0.7384728",
"0.725223",
"0.7224656",
"0.70653856",
"0.7042856",
"0.70351195",
"0.6994592",
"0.6991432",
"0.68837374",
"0.68696404",
"0.6851199",
"0.68343854",
"0.6824034",
"0.6823918",
"0.6823719",
"0.6822446",
"0.67947435",
"0.6793595",
"0.67705715",
"0.672018... | 0.7293408 | 2 |
Load file with Tab Separated Values. Skip empty lines and remove leading and trailing spaces from values. | def vH85(VqRE):
with open(VqRE) as eHNT:
for zFiD in eHNT:
rdlD = [BWXx.strip() for BWXx in zFiD.split('\t')]
if rdlD != ['']:
yield rdlD | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m5GZ(a1PO):\n with open(a1PO) as eHNT:\n next(eHNT)\n while True:\n try:\n yield next(eHNT).strip('\\n').split('\\t')\n except StopIteration:\n break",
"def tyeH(YKHO, FYKK, VWe_='\\t'):\n YKHO.data = tyeH(FYKK, sep=VWe_).data\n YKHO.... | [
"0.6399309",
"0.63310325",
"0.616202",
"0.60500634",
"0.60266536",
"0.59737736",
"0.59085864",
"0.590824",
"0.5895426",
"0.5858792",
"0.5845232",
"0.5829906",
"0.5748333",
"0.57427496",
"0.57404387",
"0.5666937",
"0.5649893",
"0.56479144",
"0.56412286",
"0.56388175",
"0.56310... | 0.6873595 | 0 |
Creates a user, with temporary password. | def m8z6(YKHO, QePW, uJjO):
try:
CBIr = Qx8v.objects.get(pk=uJjO)
CBIr.activate()
CBIr.send_reset_password_email(QePW, True)
except Qx8v.DoesNotExist:
return igJ6(status=500)
return igJ6(status=201) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lRCS(YKHO):\n CBIr = mv1M.objects.create(username='testuser')\n CBIr.set_password('12345')\n CBIr.save()\n return CBIr",
"def lYUQ(D3lj, jTXt):\n XN37.create_user(D3lj, jTXt)",
"def lYUQ(Emd4):\n CBIr = NEJe.blend('auth.User')\n CBIr.set_password(k2eK)\n CBIr.save()\n Emd4.user =... | [
"0.8577083",
"0.82382256",
"0.79764086",
"0.7907479",
"0.7784179",
"0.7779549",
"0.7774415",
"0.77685356",
"0.77580297",
"0.77535194",
"0.77463967",
"0.774114",
"0.77178293",
"0.77178293",
"0.7690823",
"0.7689247",
"0.7662428",
"0.76533693",
"0.7652717",
"0.7648373",
"0.76450... | 0.0 | -1 |
Get ``WriteStrategy`` for csv/datafile/excel format Arguments | def _5y7(LF7u, iSzb, YasR=False) -> q18j:
YasR = True if YasR else False
if iSzb == 'datapackage':
y6YK: q18j = A4po(user_config=LF7u, write_defaults=YasR)
elif iSzb == 'excel':
y6YK = NUEm(user_config=LF7u, write_defaults=YasR)
elif iSzb == 'datafile':
y6YK = A50m(user_config=LF... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bp2l(qIxc, nPrm, knSv):\n jhfq = aJfY[1] if not qIxc.csv else aJfY[0]\n pwQG.export(nPrm, knSv, jhfq, 'comments')",
"def y6YK(YKHO) -> q18j:\n return YKHO._write_strategy",
"def Vzhv(mWFP, Xidb, WaDF, oemP):\n TMe1 = E0Ye.make_export_strategy(serving_input_fn=oemP)\n hbsH = oemP()\n ud6O,... | [
"0.59591645",
"0.5759382",
"0.529223",
"0.5169694",
"0.51641697",
"0.5147622",
"0.5087819",
"0.50548327",
"0.50074595",
"0.49798694",
"0.49395174",
"0.4894678",
"0.48875284",
"0.48582077",
"0.48458833",
"0.4823116",
"0.48186994",
"0.48084188",
"0.47900385",
"0.4779682",
"0.47... | 0.6969247 | 0 |
Return an iterable of `Token` instances for the nominated `formula` string. | def thS1(YKHO, l9Ur: str) -> iu5r[_J2v]:
A3lK = _J2v('1', kind=_J2v.Kind.VALUE)
pBYG = _J2v('+', kind=_J2v.Kind.OPERATOR)
HkwR = _J2v('-', kind=_J2v.Kind.OPERATOR)
s2mk = wr3U(l9Ur)
s2mk = BUvb(s2mk, '0', [HkwR, A3lK], kind=_J2v.Kind.VALUE)
if YKHO.include_intercept:
s2mk = list(rM_Y(s2m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W1SI(l9Ur):\n return ZbWC.findall('([A-Z][a-z]*|\\\\d+)', l9Ur)",
"def EMIZ(l9Ur):\n return ZbWC.findall('([A-Z][a-z]*\\\\d*)', l9Ur)",
"def hfK9(l9Ur):\n return NLCc.parse(l9Ur)",
"def thS1(KCHu):\n if not KCHu:\n return []\n return DZfd(KCHu).split()",
"def Mzae(U9W_, aEqx):\n ... | [
"0.73075473",
"0.7014053",
"0.64072937",
"0.6199039",
"0.61448634",
"0.6142573",
"0.6026409",
"0.5987715",
"0.5987715",
"0.5921635",
"0.58952856",
"0.5793775",
"0.5779497",
"0.57645255",
"0.5721478",
"0.5688471",
"0.5624171",
"0.5600119",
"0.5577584",
"0.5565506",
"0.5556144"... | 0.74362427 | 0 |
Permute axes according to specified axes_order parameter. | def eXAG(Q6kx, lSG9):
pfA5 = list(Q6kx.shape)
if lSG9 is None:
lSG9 = list(range(len(Q6kx.shape)))
elif len(lSG9) != len(Q6kx.shape):
raise z37R('Node (%s): provided axes count is different than input tensor rank.', Q6kx.name)
else:
for or8S, jDK_ in enumerate(lSG9):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Etel(YKHO, *T4Wy):\n assert list(sorted(T4Wy)) == list(range(len(YKHO.shape))), f'Must give a position to each dimension. Shape: {YKHO.shape} Order: {T4Wy}'\n return BnL1(YKHO._storage, tuple([YKHO.shape[z1Rg] for z1Rg in T4Wy]), tuple([YKHO._strides[z1Rg] for z1Rg in T4Wy]))",
"def qvpc(qw7D, MPlV, jt... | [
"0.61740506",
"0.6056716",
"0.6031464",
"0.5956401",
"0.5948028",
"0.5860982",
"0.5785038",
"0.57704204",
"0.5769019",
"0.5754998",
"0.5740501",
"0.5731967",
"0.55744004",
"0.55639213",
"0.5542664",
"0.5500354",
"0.54875815",
"0.53531945",
"0.53452593",
"0.5290738",
"0.526223... | 0.6241824 | 0 |
Return transposed tensor (with axes in reversed order). | def l7uB(Q6kx):
lSG9 = list(range(len(Q6kx.shape)))
lSG9.reverse()
return eXAG(Q6kx, lSG9) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l7uB(input, MPlV=None, Ni86=False, mWFP='transpose'):\n if ZylS.is_tensor(input) or ZylS.is_tensor(MPlV) or ZylS.is_tensor(Ni86):\n input = ZylS.transpose(input, MPlV, Ni86, name=mWFP)\n else:\n input = oyIN.transpose(input, MPlV)\n if Ni86:\n input = oyIN.conjugate(input,... | [
"0.7764462",
"0.77065116",
"0.7578671",
"0.7525755",
"0.7461689",
"0.7414166",
"0.7303091",
"0.71909064",
"0.7128023",
"0.70780426",
"0.7071303",
"0.7046873",
"0.7036418",
"0.7024576",
"0.7017399",
"0.6998038",
"0.6992333",
"0.6963232",
"0.6949707",
"0.69478756",
"0.6940572",... | 0.7515686 | 4 |
Flatten the input tensor into a 2D matrix. Flattening happens at axis specified by 'axis' attribute. First dimension of output tensor is the product of [d_0, ... d_{axis1}] dimensions of input tensor. | def PWgb(Q6kx, jDK_):
ROpF = list(Q6kx.shape)
eqhu = 1
nQ5H = 1
if jDK_ < 0:
jDK_ = len(ROpF) + jDK_
for d6pt in range(len(ROpF)):
nQ5H = nQ5H * ROpF[d6pt]
if d6pt < jDK_:
eqhu = nQ5H
nQ5H = int(nQ5H / eqhu)
oLRV = [eqhu, nQ5H]
return SMR4.reshape(Q6kx... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PWgb(input, Rf7_=None):\n ETfU = list(input.shape)\n if Rf7_ is not None:\n ETfU.insert(0, ETfU.pop(Rf7_))\n tNZn = input.transpose(ETfU)\n jTs7 = tNZn.reshape([ETfU[0], -1])\n else:\n jTs7 = input.reshape(-1)\n return jTs7",
"def PWgb(WKvO, wHMY=1, mWFP='Flatten'):\n ... | [
"0.7094547",
"0.6961301",
"0.6841068",
"0.68329614",
"0.6824646",
"0.6813351",
"0.6783671",
"0.67216873",
"0.66605765",
"0.66605765",
"0.66605765",
"0.66605765",
"0.6626074",
"0.66217697",
"0.652285",
"0.652259",
"0.6505314",
"0.6505314",
"0.6477572",
"0.6460478",
"0.6417061"... | 0.71700037 | 0 |
Use refresh_token to get new access_token and refresh_token | def Ag_D(YKHO, GQl3: str) -> str:
if YKHO.debug:
print('doing refresh')
f4AS = G4JS.post(YKHO.TOKEN_ENDPOINT_URL, data={'grant_type': 'refresh_token', 'client_id': YKHO.CLIENT_ID, 'refresh_token': GQl3})
if f4AS.status_code != 200:
print('Error refreshing tokens')
if YKHO.debug:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GQl3(YKHO):\n if not YKHO.auth_details or not 'refresh_token' in YKHO.auth_details or (not YKHO.auth_details['refresh_token']):\n raise Exception(\"auth_details['refresh_token'] does not contain a refresh token.\")\n GQl3 = YKHO.auth_details['refresh_token']\n NArs = [('grant_type', 'refresh_to... | [
"0.81091386",
"0.80976355",
"0.78924716",
"0.7883819",
"0.786817",
"0.78530484",
"0.7849114",
"0.7830773",
"0.7796181",
"0.77796006",
"0.7778332",
"0.77724797",
"0.7758872",
"0.7727136",
"0.7726129",
"0.77260816",
"0.7634501",
"0.7634501",
"0.7625085",
"0.7616382",
"0.7613697... | 0.7028029 | 73 |
Return a single item from a query. See "query" for more details. Returns None if nothing matches | def UQKt(YKHO, *qIxc, **B2fa):
try:
return next(YKHO.query(*qIxc, **B2fa))
except StopIteration:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ckbq(YKHO, xDcj):\n Aofo = YKHO.query(xDcj)\n if not Aofo:\n return None\n return str(Aofo[0])",
"def GgQQ(YKHO, xDcj):\n DpUl.execute(xDcj)\n nPrm = DpUl.fetchone()\n return nPrm",
"def gRvB(YKHO, qWbT):\n try:\n w2B8 = iHv3.connect(YKHO.db_path)\n Z9rn = w2B8.cur... | [
"0.75185937",
"0.7465598",
"0.7379184",
"0.7267702",
"0.72466946",
"0.71849334",
"0.70692706",
"0.7064164",
"0.7062177",
"0.69976586",
"0.69502",
"0.68814695",
"0.68602556",
"0.6851004",
"0.68110913",
"0.6807696",
"0.6798382",
"0.674148",
"0.67229736",
"0.6705338",
"0.6694353... | 0.72907597 | 3 |
Return the number of matched rows for a given query. See "query" for details on query construction | def UHFx(YKHO, *qIxc, **B2fa):
return len(YKHO._ixs(*qIxc, **B2fa)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DdgG(YKHO, xDcj):\n eHpk = YKHO.get_export_engine()\n dixj = eHpk.execute(YKHO.SELECT_COUNT_CMD.format(query=xDcj))\n AbqG = dixj.fetchall()[0][0]\n dixj.close()\n bo34.info('Query row count: {count}.'.format(count=AbqG))\n return AbqG",
"def mRfo(WMAm):\n return len(WMAm.fetchall())",
... | [
"0.75982714",
"0.73738426",
"0.7350416",
"0.73232543",
"0.7305658",
"0.7304256",
"0.72352153",
"0.72331685",
"0.72227514",
"0.7198494",
"0.7155778",
"0.7026413",
"0.69854313",
"0.6929832",
"0.68842983",
"0.6847746",
"0.67993945",
"0.6794616",
"0.6794134",
"0.6789897",
"0.6781... | 0.0 | -1 |
Factory that returns decorators that register commands to the bot. Commands are specially handled cases in on_message. This interface allows (keyword='foo') to return a decorator that wraps the following function/coro declaration. The returned decorator will associate the defined function with a command keyword, which ... | def gGJ9(YKHO, peBr, Zl3b=False, Zode=False):
def mrMx(NyFp):
async def handler_on_command(Ol8d, JZ1r, Q81v):
if Zode and (not Ol8d.channel.is_private):
return
oAWu = True
if Zl3b:
if not YKHO.privcheck:
tTpl = f"comma... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def v2me():\n\n def AuU4(JfyU):\n \"\"\"\n Add the function to the commands dictionary.\n \"\"\"\n oFgq[JfyU.__name__] = JfyU\n return JfyU\n return AuU4",
"def oUZx(*ZWCE: str):\n\n def mrMx(JfyU: Any):\n wEsz = aadv(JfyU)\n if not wEsz.return_annotation... | [
"0.72927314",
"0.6910122",
"0.66523653",
"0.66523653",
"0.6636352",
"0.64961374",
"0.64899975",
"0.64097285",
"0.6407535",
"0.6402453",
"0.6377157",
"0.6310086",
"0.62426186",
"0.6187139",
"0.6109682",
"0.60942763",
"0.6044959",
"0.59990805",
"0.5969892",
"0.5964877",
"0.5850... | 0.5644904 | 40 |
Bins values on edge according to the positions. `positions_on_edge` and `values_on_edge` are paired list. Each value in `values_on_edge` has its corresponding position in `positions_on_edge`. The `values_on_edge` are binned by their positions. Then within each bin, the mean values are calculated. | def lkcA(YKHO, JNBT, VLs2, rebk=None, Pyrc=None):
if len(JNBT) == 1:
G9jH.warning('One value in %s bins reduces to one value in one bin.', rebk)
return (JNBT, [VLs2[0]] * 2)
if all((VLs2[0] == XP5J for XP5J in VLs2)):
return ([sum(JNBT) / len(JNBT)], [VLs2[0]] * 2)
J3mT = Pyrc if Pyr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aNQy(emQY, wCw7, Sb_v):\n mC4V = Sb_v * oyIN.arange(emQY // Sb_v + 1, wCw7 // Sb_v)\n eKGI = (mC4V[:-1] + mC4V[1:]) / 2\n return (mC4V, eKGI)",
"def aNQy(emQY, wCw7, Sb_v):\n mC4V = Sb_v * oyIN.arange(emQY // Sb_v + 1, wCw7 // Sb_v)\n eKGI = (mC4V[:-1] + mC4V[1:]) / 2\n return (mC4V, eKGI)"... | [
"0.5772353",
"0.5772353",
"0.56955093",
"0.5671841",
"0.5649864",
"0.5649864",
"0.56465566",
"0.5595689",
"0.5595689",
"0.5592108",
"0.54698217",
"0.5451711",
"0.5367426",
"0.536425",
"0.52938706",
"0.5293827",
"0.52791166",
"0.5214529",
"0.51829237",
"0.5149542",
"0.5123226"... | 0.81271935 | 0 |
Estimates the area under the curve. | def Kmfi(Emd4, WKvO, LVAh, NKcE='trapz'):
if NKcE == 'trapz':
return oyIN.trapz(LVAh, x=WKvO)
else:
raise ValueError('Method "%s" is not supported. Try "trapz".' % NKcE) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a3PS(WKvO, LVAh):\n jzdc = 0.0\n for YRbF in range(0, len(WKvO) - 1):\n jzdc += (WKvO[YRbF + 1] - WKvO[YRbF]) * (LVAh[YRbF + 1] + LVAh[YRbF])\n jzdc = jzdc * 0.5\n return jzdc",
"def f0tD(YKHO):\n he6J = YKHO.tr - YKHO.bl\n return he6J.x * he6J.y",
"def f0tD(YKHO):\n return (YKH... | [
"0.7673286",
"0.7281175",
"0.7272571",
"0.72455275",
"0.72143686",
"0.71708965",
"0.7095795",
"0.70615786",
"0.702044",
"0.6972732",
"0.6962696",
"0.6933348",
"0.68965554",
"0.68876135",
"0.6878748",
"0.6831428",
"0.682848",
"0.68113875",
"0.680501",
"0.6804907",
"0.6796267",... | 0.0 | -1 |
Precalculate dynamic matrices This sets the model up for evaluation of model dynamics, such as evolving a conformation or propagating an ensemble. It should be called after any modification to model parameters, which is handled automatically for internal modifications (such as when `add_crosslinks` is called). If you m... | def rr2I(YKHO, JRYC=1.0):
YKHO._dynamics = {'needs_updating': False, 'N': YKHO.N, 'D': YKHO.D, 'k': YKHO.k, 'dt': JRYC, 'emkAt': Zxt2.linalg.expm(-YKHO.k * YKHO.A * JRYC)}
YKHO.update_invA()
YKHO.update_G()
YKHO.update_Sig() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IjYd(YKHO):\n raise NotImplementedError\n YKHO._update_variable_states(BgRj, YGYT)",
"def VaMZ(YKHO):\n for r8hN in range(YKHO.M):\n EnQo = YKHO.cur[r8hN].sample_list\n EcVT = EnQo.get_X()\n KkY2 = EnQo.get_U()\n YKHO.cur[r8hN].traj_info.dynamics.update_prior(EnQo)\n ... | [
"0.6129924",
"0.6121086",
"0.6071675",
"0.58600825",
"0.5569976",
"0.55642956",
"0.55089885",
"0.5466782",
"0.5447243",
"0.54291224",
"0.54018885",
"0.53782505",
"0.53695333",
"0.5336102",
"0.5333316",
"0.53321046",
"0.53297067",
"0.53205764",
"0.53054386",
"0.52994895",
"0.5... | 0.59322524 | 3 |
encodes ascii string to array of ints | def ltaR(PcHG, XHra):
return oyIN.array(list(map(lambda WKvO: qtLv[WKvO], PcHG)))[:XHra] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C4kW(cSAc: str):\n return [ord(hcXw) for hcXw in cSAc]",
"def ltaR(PcHG):\n return oyIN.array(list(map(lambda WKvO: qtLv[WKvO], PcHG)) + [0])",
"def _3Xs(yx1t):\n return [ord(WKvO) for WKvO in yx1t]",
"def PCNz(fmOq):\n yv6U = []\n for YRbF in range(len(fmOq)):\n yv6U.append(fmOq[YR... | [
"0.74840003",
"0.743815",
"0.69929016",
"0.6942707",
"0.6928745",
"0.6902705",
"0.6869475",
"0.6826714",
"0.6802096",
"0.67672956",
"0.6736094",
"0.6711862",
"0.6709392",
"0.66625655",
"0.66608316",
"0.6652883",
"0.66479766",
"0.6644287",
"0.6632945",
"0.6613448",
"0.66037077... | 0.68927693 | 6 |
Sets the network_rule of this RuleSchema. | def R3sI(YKHO, R3sI):
YKHO._network_rule = R3sI | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QQxj(YKHO, eD8c):\n YKHO._ctx_command = 'setRule'\n if not YKHO._configuration_valid:\n return\n YKHO._doSetRule(eD8c)",
"def VBOr(YKHO, eD8c):\n YKHO.options['rule'] = eD8c",
"def CHFA(YKHO, eVVj):\n YKHO.network = eVVj",
"def eVVj(YKHO, eVVj):\n YKHO._network = eVVj",
"def eV... | [
"0.680939",
"0.6696272",
"0.66872966",
"0.66808176",
"0.66808176",
"0.63220406",
"0.6252414",
"0.62406117",
"0.62287843",
"0.6216177",
"0.6097413",
"0.6097413",
"0.60948956",
"0.60948956",
"0.60354507",
"0.5979478",
"0.5904365",
"0.5814521",
"0.5767912",
"0.5746186",
"0.57409... | 0.86280316 | 0 |
Sets the rule_name of this RuleSchema. | def bKqw(YKHO, bKqw):
if bKqw is None:
raise ValueError('Invalid value for `rule_name`, must not be `None`')
if bKqw is not None and len(bKqw) > 64:
raise ValueError('Invalid value for `rule_name`, length must be less than or equal to `64`')
if bKqw is not None and (not ZbWC.search('^[a-z][a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bKqw(YKHO, bKqw):\n YKHO._rule_name = bKqw",
"def cqRg(YKHO, cqRg):\n YKHO._rule_set_name = cqRg",
"def urdg(YKHO, urdg):\n if urdg is None:\n raise ValueError('Invalid value for `ruleset_name`, must not be `None`')\n if urdg is not None and len(urdg) > 50:\n raise ValueError('Inv... | [
"0.83049685",
"0.7630523",
"0.6719093",
"0.6639869",
"0.662609",
"0.662609",
"0.6590865",
"0.6359884",
"0.62524235",
"0.62497956",
"0.6109061",
"0.6074235",
"0.6043661",
"0.60333604",
"0.59882563",
"0.59882563",
"0.59882563",
"0.59882563",
"0.59882563",
"0.5938211",
"0.590780... | 0.73780066 | 2 |
Sets the variable of this RuleSchema. | def Es0b(YKHO, Es0b):
YKHO._variable = Es0b | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set(YKHO, BWXx):\n BWXx = YKHO.validate_value(BWXx)\n YKHO.var.set(BWXx)",
"def uPxI(YKHO, uPxI):\n YKHO._schema = uPxI",
"def uPxI(YKHO, uPxI):\n YKHO._schema = uPxI",
"def uPxI(YKHO, uPxI):\n YKHO._schema = uPxI",
"def uPxI(YKHO, uPxI):\n YKHO._schema = uPxI",
"def uPxI(YKHO, uPxI... | [
"0.6453895",
"0.6313765",
"0.6313765",
"0.6313765",
"0.6313765",
"0.6313765",
"0.6313765",
"0.61958945",
"0.614667",
"0.61419684",
"0.61295325",
"0.5956031",
"0.5896099",
"0.58631694",
"0.58631694",
"0.5853404",
"0.5830632",
"0.58294886",
"0.58221596",
"0.58052367",
"0.576256... | 0.5798331 | 20 |
Sets the rule_properties of this RuleSchema. | def Xp9Q(YKHO, Xp9Q):
YKHO._rule_properties = Xp9Q | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c_NS(YKHO, c_NS):\n YKHO._rules = c_NS",
"def QQxj(YKHO, eD8c):\n YKHO._ctx_command = 'setRule'\n if not YKHO._configuration_valid:\n return\n YKHO._doSetRule(eD8c)",
"def eD8c(YKHO, eD8c):\n YKHO._rule = eD8c",
"def VBOr(YKHO, eD8c):\n YKHO.options['rule'] = eD8c",
"def E_VZ(Y... | [
"0.6226483",
"0.61795026",
"0.597518",
"0.59751564",
"0.5960724",
"0.5956245",
"0.5822657",
"0.5822657",
"0.5822657",
"0.5822657",
"0.5822657",
"0.5822657",
"0.5822657",
"0.5822657",
"0.5822657",
"0.5814908",
"0.57888263",
"0.577021",
"0.5754734",
"0.5728619",
"0.5728619",
... | 0.8397631 | 0 |
Returns the string representation of the model | def gTzM(YKHO):
return CgYo.pformat(YKHO.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return YKHO.text",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\... | [
"0.86418265",
"0.85103965",
"0.7853324",
"0.77442306",
"0.7712258",
"0.76979405",
"0.765959",
"0.7637644",
"0.76218504",
"0.7607561",
"0.7606604",
"0.7606604",
"0.7606604",
"0.75990754",
"0.7585653",
"0.758149",
"0.7570811",
"0.7567585",
"0.75392604",
"0.75392604",
"0.7527967... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.8392633",
"0.8354901",
"0.82950056",
"0.8132309",
"0.81149805",
"0.8099986",
"0.809911",
"0.8097883",
"0.8097883",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8066694",
"0.80594814",
"0.805757",
... | 0.0 | -1 |
Check if meeting hours are overlapping. | def yyQp(EywT, SWox, WbTE):
U1E_ = [(int(k57g[0]), int(k57g[1])) for k57g in EywT]
jhR7 = []
eCNf = 1
for vnE3 in U1E_:
if vnE3[1] - vnE3[0] == 2:
jhR7.append(vnE3[0])
jhR7.append(vnE3[0] + 1)
else:
jhR7.append(vnE3[0])
if int(SWox) in jhR7 or int(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V07V(EywT, SWox, WbTE):\n sjkI = 8\n xoh4 = 18\n if MBFa(SWox) and sjkI <= int(SWox) < xoh4 and (int(SWox) + int(WbTE) <= xoh4):\n if WbTE != 0 and yyQp(EywT, SWox, WbTE):\n print('ERROR: Meeting overlaps with existing meeting!')\n else:\n return True\n else:\n ... | [
"0.727365",
"0.7080683",
"0.69404554",
"0.6782432",
"0.6661492",
"0.65557075",
"0.6529937",
"0.6414177",
"0.6414159",
"0.6413932",
"0.637787",
"0.6328336",
"0.63205045",
"0.63135636",
"0.6312108",
"0.62962854",
"0.62942284",
"0.6290903",
"0.6215334",
"0.62145066",
"0.6212733"... | 0.79242903 | 0 |
Copied from earlier version of Keras. Precision metric. Only computes a batchwise average of precision. Computes the precision, a metric for multilabel classification of how many selected items are relevant. | def rhd_(Y8eF, aMgO):
COti = nMvt.sum(nMvt.round(nMvt.clip(Y8eF * aMgO, 0, 1)))
ftZB = nMvt.sum(nMvt.round(nMvt.clip(aMgO, 0, 1)))
rhd_ = COti / (ftZB + nMvt.epsilon())
return rhd_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lGpo(Y8eF, aMgO):\n COti = nMvt.sum(nMvt.round(nMvt.clip(Y8eF * aMgO, 0, 1)))\n ftZB = nMvt.sum(nMvt.round(nMvt.clip(aMgO, 0, 1)))\n Rrc1 = COti / (ftZB + nMvt.epsilon())\n return Rrc1",
"def o4KV(Y8eF, aMgO):\n COti = nMvt.sum(nMvt.round(nMvt.clip(Y8eF * aMgO, 0, 1)))\n ftZB = nMvt.sum(nMv... | [
"0.76834714",
"0.73985386",
"0.73985386",
"0.73350513",
"0.7278452",
"0.7269409",
"0.7269409",
"0.72658765",
"0.72628707",
"0.7241911",
"0.72369194",
"0.72259676",
"0.7222861",
"0.7215866",
"0.7161664",
"0.7161664",
"0.7161664",
"0.7161664",
"0.7161664",
"0.7161664",
"0.71616... | 0.7210247 | 18 |
Code from jonilaserson on Keras issues thread 2436. Given a keras [model], return an equivalent model which parallelizes the computation over [n_gpus] GPUs. Each GPU gets a slice of the input batch, applies the model on that slice and later the outputs of the models are concatenated to a single tensor, hence the user s... | def buDj(C3ST, u3wG=2):
with ZylS.device('/cpu:0'):
WKvO = X6a0(C3ST.input_shape[1:], name=C3ST.input_names[0])
uzSw = []
for Oa1e in range(u3wG):
with ZylS.device('/gpu:' + str(Oa1e)):
I0Lj = Zlsf(kAzV, lambda ROpF: ROpF, arguments={'n_gpus': u3wG, 'part': Oa1e})(WKvO)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IYUh(C3ST, YfpN=2):\n\n def hcIl(nPrm, or8S, SQ3m):\n \"\"\"\n Gets a slice of the batch for a given index.\n \"\"\"\n ROpF = ZylS.shape(nPrm)\n zNig = ZylS.concat([ROpF[:1] // SQ3m, ROpF[1:]], axis=0)\n _0fC = ZylS.concat([ROpF[:1] // SQ3m, ROpF[1:] * 0], axis=0)\n... | [
"0.78275913",
"0.73208725",
"0.6955846",
"0.66766655",
"0.66149527",
"0.64941204",
"0.642008",
"0.64176846",
"0.6412323",
"0.6385748",
"0.637531",
"0.63538164",
"0.6352331",
"0.6335569",
"0.63264877",
"0.63026077",
"0.6296831",
"0.62714016",
"0.6262287",
"0.6248029",
"0.62390... | 0.7321013 | 1 |
Keras model based on UNet CNN. | def yoaP(xMux=4, LeZt=2, K0do=qhl4()):
b2iO = X6a0(shape=(240, 240, xMux))
Kne0 = MGI5(b2iO)
FU4d = MGI5(Kne0)
GUAc = MGI5(FU4d)
oS25 = MGI5(GUAc)
LQA_ = GT8T(oS25)
GmxX = MPiJ([GUAc, LQA_])
gAJI = GT8T(GmxX)
TZ2w = MPiJ([FU4d, gAJI])
lEIL = GT8T(TZ2w)
wcNN = MPiJ([Kne0, lEIL... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LQs7():\n C3ST = ileL()\n C3ST.add(lTlC(32, 3, activation='relu', input_shape=Nq1b.INPUT_SHAPE))\n C3ST.add(ehTc(pool_size=2))\n C3ST.add(lTlC(64, 3, activation='relu'))\n C3ST.add(ehTc(pool_size=2))\n C3ST.add(lTlC(128, 3, activation='relu'))\n C3ST.add(ehTc(pool_size=2))\n C3ST.add(lT... | [
"0.76714414",
"0.7569412",
"0.74907947",
"0.74674994",
"0.7443369",
"0.74261624",
"0.7425323",
"0.7414033",
"0.74103135",
"0.7372531",
"0.7368652",
"0.7360297",
"0.735861",
"0.73493856",
"0.73394465",
"0.7333051",
"0.7319069",
"0.7312895",
"0.730345",
"0.72746557",
"0.7271219... | 0.0 | -1 |
Keras model based on UNet CNN. Full implementation based on 2015 paper. | def mdcm(GhuM=(240, 240, 4), LeZt=3, EcAO=(2, 2), FEri=(2, 2), N77f=kT60, K0do=qhl4(), Wbxz=[rhd_, AOzf, SBZK], u3wG=8):
b2iO = X6a0(shape=GhuM)
Kne0 = GVKG()(b2iO)
FU4d = cZo8(Kne0, filters=64)
GUAc = cZo8(FU4d, filters=64)
oS25 = BzBX(pool_size=EcAO, strides=FEri)(GUAc)
LQA_ = cZo8(oS25, filte... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KYEi():\n C3ST = ileL()\n C3ST.add(Ym4f(cropping=((64, 24), (0, 0)), input_shape=(160, 320, 3)))\n C3ST.add(Zlsf(lambda WKvO: WKvO / 127.5 - 1, input_shape=(72, 320, 3)))\n C3ST.add(WN4z(pool_size=(2, 4)))\n C3ST.add(Ofph(36, 5, 5, border_mode='valid', input_shape=(72, 320, 3)))\n C3ST.add(Mr... | [
"0.7788045",
"0.7755533",
"0.7711464",
"0.7707863",
"0.7644345",
"0.7617051",
"0.7606376",
"0.7590178",
"0.75824696",
"0.75761515",
"0.75682354",
"0.75465834",
"0.75231034",
"0.752286",
"0.75205976",
"0.7511724",
"0.75103533",
"0.7505776",
"0.75033325",
"0.74817985",
"0.74538... | 0.0 | -1 |
Zeros out optimizer slots whose connections have been recovered. This is done so that the aggregated values are zeroed out. | def vvSO(YKHO, K0do, upAO, gGxl):
for _DZj in K0do._optimizer.get_slot_names():
BNkP = K0do._optimizer.get_slot(upAO, _DZj)
Dbmo = ZylS.where(gGxl, ZylS.zeros_like(BNkP), BNkP)
BNkP.assign(Dbmo) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SiRx(YKHO):\n YKHO.prev_sol = oyIN.tile((YKHO.ac_lb + YKHO.ac_ub) / 2, [YKHO.plan_hor]).astype(oyIN.float32)\n YKHO.optimizer.reset()",
"def SiRx(YKHO):\n raise NotImplementedError('Reset optimization is not implemented.')",
"def SiRx(YKHO):\n import keras.backend as nMvt\n YKHO.cost = YKHO.... | [
"0.6770333",
"0.6580788",
"0.6521596",
"0.6503874",
"0.64961255",
"0.6475572",
"0.6344684",
"0.63260263",
"0.6321379",
"0.62902296",
"0.62826943",
"0.6249281",
"0.62458044",
"0.6224513",
"0.62005657",
"0.6186229",
"0.6173771",
"0.61376953",
"0.6127221",
"0.61218333",
"0.61193... | 0.5975267 | 48 |
Performs blockgranular masking of the weights. Block pruning occurs only if the block_height or block_width is > 1 and if the weight tensor, when squeezed, has ndims = 2. Otherwise, elementwise pruning occurs. | def d8Ud(YKHO, YPaw, K0do, U6WT, ZHfW, _mSQ, vtNT):
if YKHO._block_size == (1, 1):
return YKHO._update_mask(YPaw, K0do, U6WT, ZHfW, _mSQ, vtNT)
tUZW = ZylS.math.abs(_mSQ)
kp_S = g0Fr.factorized_pool(tUZW, window_shape=YKHO._block_size, pooling_type=YKHO._block_pooling_type, strides=YKHO._block_size,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def y0O3(EcVT, Mo5a, PzaZ, hXNa=True):\n EcVT = ht2j.abs(EcVT).cuda()\n GhWW = EcVT.size()\n P9o9 = len(GhWW)\n Mo5a = [lHmx if lHmx > 0 else oxOY for lHmx, oxOY in zip(Mo5a, GhWW)]\n bS9g = [int((oxOY - 1) / lHmx) + 1 for lHmx, oxOY in zip(Mo5a, GhWW)]\n BgK2 = [ht2j.arange(oxOY).long() for oxOY... | [
"0.6554431",
"0.6046316",
"0.5828245",
"0.5754934",
"0.5730915",
"0.57104015",
"0.56377125",
"0.5596372",
"0.55919623",
"0.55627495",
"0.5561536",
"0.5532097",
"0.5463558",
"0.5451473",
"0.5407946",
"0.5388277",
"0.5368449",
"0.5360199",
"0.53474724",
"0.5345541",
"0.5338608"... | 0.66465175 | 0 |
A view to show new books coming soon | def zjn9(QePW):
ZvJp = gUG6.objects.all()
QpfX = {'comingSoon': ZvJp}
return _1tc(QePW, 'products/coming.html', QpfX) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i8RB(QePW):\n i8RB = dl5x.objects.all()\n QpfX = {'books': i8RB}\n return _1tc(QePW, 'book_list.html', context=QpfX)",
"def mraa(QePW):\n QpfX = {'books': T6Eh(dl5x)}\n return _1tc(QePW, 'book_list.html', QpfX)",
"def F32_(QePW):\n i8RB = dl5x.objects.all()\n QpfX = {'books': i8RB}\n ... | [
"0.69299906",
"0.692363",
"0.6778005",
"0.66037023",
"0.65733856",
"0.6565425",
"0.6543103",
"0.65294665",
"0.6513364",
"0.6501754",
"0.6483271",
"0.6475186",
"0.6431246",
"0.64124566",
"0.64090127",
"0.6382387",
"0.6361306",
"0.63081735",
"0.6301297",
"0.6299146",
"0.6294966... | 0.5767664 | 85 |
Compare two configurations, returns True if equal | def GpIT(lGa3, flh0):
for G1Hx in lGa3.keys():
if G1Hx not in flh0:
return False
if lGa3[G1Hx] != flh0[G1Hx]:
return False
for G1Hx in flh0.keys():
if G1Hx not in lGa3:
return False
if lGa3[G1Hx] != flh0[G1Hx]:
return False
retu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tNxu(C5hj: DictConfig, IpAU: DictConfig) -> bool:\n return C5hj == IpAU",
"def azpz(YKHO):\n U5bT = azpz(self=YKHO)\n return U5bT",
"def xa14(YKHO, Elif: 'Configuration') -> bool:\n if not isinstance(Elif, YKHO.__class__):\n return False\n return YKHO.__dict__ == Elif.__dict__",
"de... | [
"0.83782184",
"0.7997693",
"0.7887425",
"0.7800524",
"0.7775902",
"0.76463056",
"0.7594653",
"0.7570397",
"0.7526382",
"0.74099296",
"0.73639226",
"0.7360832",
"0.7321804",
"0.7317716",
"0.7305027",
"0.72566175",
"0.71987087",
"0.71817106",
"0.7178395",
"0.71718156",
"0.71542... | 0.74123836 | 9 |
calculates the distance between two LAT/LON coordinates accurate up to 200km distances returns single LON/LAT vector difference | def tXlz(Y7V5, xMqw, ofRU, Av0C):
M7G_ = Y7V5 - ofRU
ybRb = xMqw - Av0C
OfWu = 111.19 * M7G_
Jgin = oyIN.deg2rad(Y7V5)
bzf2 = 111.19 * ybRb * oyIN.cos(Jgin)
Ayfi = oyIN.array([bzf2, OfWu])
WKvO, LVAh = Ayfi
return oyIN.sqrt(WKvO ** 2 + LVAh ** 2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AcQ8(igSk, PNCc, TGuP, v7YJ):\n return (igSk - TGuP) ** 2 + (PNCc - v7YJ) ** 2",
"def zG70(igSk, TGuP, PNCc, v7YJ):\n Jkam = (igSk, PNCc)\n Y_O7 = (TGuP, v7YJ)\n return CgaZ(Jkam, Y_O7).miles",
"def KgzA(YKHO, igSk, GgQG, TGuP, tk0B):\n GgQG, igSk, tk0B, TGuP = map(Y_1E, [GgQG, igSk, tk0B, T... | [
"0.76857746",
"0.7462426",
"0.7297673",
"0.72896004",
"0.72491693",
"0.724262",
"0.72283804",
"0.72086054",
"0.72073656",
"0.7206865",
"0.71796876",
"0.71604514",
"0.7158953",
"0.7157764",
"0.71576303",
"0.71576303",
"0.71576303",
"0.71576303",
"0.71576303",
"0.71576303",
"0.... | 0.72304934 | 6 |
Tests that base types which are meant to be JSON encodable are actually JSON encodable. | def wMzD():
for a1PO in irna:
assert sbPh(a1PO, failure_callback=Rj__)
assert sbPh(None, failure_callback=Rj__)
assert sbPh(ZjSO, failure_callback=Rj__) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jej1():\n\n class t:\n mWFP: str\n BWXx: int\n assert not sbPh(a1PO, failure_callback=Rj__)",
"def YcLy():\n for a1PO in Sc4C:\n assert not sbPh(wFpA[a1PO], failure_callback=Rj__)\n assert not sbPh(uLKX[a1PO, AzJI[int]], failure_callback=Rj__)\n assert not sbPh(h8n... | [
"0.74390274",
"0.72822315",
"0.72252",
"0.7206747",
"0.7170937",
"0.7099525",
"0.70949",
"0.7061742",
"0.7026942",
"0.7026942",
"0.6947455",
"0.6885707",
"0.6876236",
"0.68088835",
"0.6701084",
"0.66633457",
"0.65634906",
"0.65552783",
"0.6555215",
"0.6532993",
"0.6513928",
... | 0.8346069 | 0 |
Tests that some types which are not meant to be JSON encodable are actually not JSON encodable. | def jej1():
class t:
mWFP: str
BWXx: int
assert not sbPh(a1PO, failure_callback=Rj__) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wMzD():\n for a1PO in irna:\n assert sbPh(a1PO, failure_callback=Rj__)\n assert sbPh(None, failure_callback=Rj__)\n assert sbPh(ZjSO, failure_callback=Rj__)",
"def YcLy():\n for a1PO in Sc4C:\n assert not sbPh(wFpA[a1PO], failure_callback=Rj__)\n assert not sbPh(uLKX[a1PO, Az... | [
"0.76022345",
"0.7258305",
"0.69809484",
"0.68226534",
"0.6811252",
"0.6744125",
"0.67417675",
"0.6716625",
"0.6690483",
"0.6657028",
"0.66109836",
"0.6609662",
"0.66067684",
"0.65617436",
"0.6552093",
"0.6530993",
"0.6517561",
"0.6492623",
"0.64866716",
"0.6480209",
"0.64648... | 0.77061737 | 0 |
Tests that namedtuples are JSON encodable if and only if their attributes are of JSON encodable type. | def QsBo():
class HashableNamedTupleExampleT(WWu8):
mWFP: AzJI[str, ...]
BWXx: uLKX[int, float]
assert sbPh(GMlh, failure_callback=Rj__)
class NonHashableNamedTupleExampleT(WWu8):
mWFP: x1iM[str]
BWXx: uLKX[int, float, complex]
assert not sbPh(avWX, failure_callback=Rj_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bAkp(WKvO):\n try:\n qQXR.dumps(WKvO)\n return True\n except:\n return False",
"def bAkp(WKvO):\n try:\n qQXR.dumps(WKvO)\n return True\n except:\n return False",
"def acLI(vGaq):\n try:\n qQXR.dumps(vGaq)\n return True\n except Type... | [
"0.66905147",
"0.66905147",
"0.6674053",
"0.66681564",
"0.66330016",
"0.66205454",
"0.6609232",
"0.6278154",
"0.6237149",
"0.62303233",
"0.6198888",
"0.6175374",
"0.61636347",
"0.6143089",
"0.6005882",
"0.5964491",
"0.591072",
"0.5872852",
"0.587229",
"0.58486426",
"0.5841507... | 0.7155449 | 0 |
Tests that typed dicts are typecheckable if and only if their attributes are of JSON encodable type. | def rV0Z():
class TypedDictExample1T(BB8f):
mWFP: AzJI[str, ...]
BWXx: uLKX[int, float]
assert sbPh(RH65, failure_callback=Rj__)
class TypedDictExample2T(BB8f):
mWFP: x1iM[str] = ['Hello']
BWXx: uLKX[int, float]
assert sbPh(sIxA, failure_callback=Rj__)
class NonTyp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _kI8(BWXx: Any, HRJ_: _TTypedDict) -> OnHT[uMFu]:\n return isinstance(BWXx, dict) and all((G1Hx in BWXx for G1Hx in zhJ7(HRJ_))) and all((G1Hx in U3cS(HRJ_) for G1Hx in BWXx)) and all((mqgR(Ty9i, U3cS(HRJ_)[G1Hx]) for G1Hx, Ty9i in BWXx.items()))",
"def aEYs(YKHO, H5ew):\n if YKHO._has_cast(H5ew):\n ... | [
"0.7281638",
"0.7051478",
"0.69957256",
"0.69016844",
"0.6868854",
"0.6847994",
"0.67937744",
"0.6762823",
"0.675956",
"0.67031634",
"0.66690737",
"0.66656816",
"0.6662006",
"0.6646833",
"0.6624916",
"0.6603696",
"0.65830946",
"0.65823114",
"0.65818053",
"0.65738225",
"0.6566... | 0.79771835 | 0 |
Returns the mapfile path for a given dataset ID. | def yUDR(YKHO, c55i):
E3Ky = c55i.split('.')
Ux0P = '{0}.map'.format(c55i)
tJt8 = Hy7s.path.join(*E3Ky[:YKHO.mapfile_depth])
return Hy7s.path.join(YKHO.mapfile_root, tJt8, Ux0P) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qpa9(YKHO, c55i):\n return Hy7s.path.join(YKHO.data_root, c55i.replace('.', '/'))",
"def IXeh(c55i):\n return Hy7s.path.join(GPtr.staging.working_tree_dir, 'datasets', c55i)",
"def kktZ(Ux0P):\n oDqC = Hy7s.path.dirname(xAKo)\n return Hy7s.path.join(oDqC, 'maps', Ux0P)",
"def WQbV(YKHO, mm0e)... | [
"0.7077287",
"0.6630288",
"0.6607264",
"0.6500171",
"0.6500171",
"0.6425142",
"0.631423",
"0.62915385",
"0.6275322",
"0.6264608",
"0.62534595",
"0.6189563",
"0.618714",
"0.6142258",
"0.6142258",
"0.61370164",
"0.6127366",
"0.6124973",
"0.6083997",
"0.60789365",
"0.6068206",
... | 0.86455125 | 0 |
Return true if obj is instance of a class that inherited from a_class | def b_gB(YEnM, J9Xy):
return issubclass(type(YEnM), J9Xy) and type(YEnM) != J9Xy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b_gB(YEnM, J9Xy):\n if isinstance(YEnM, J9Xy) and type(YEnM) is J9Xy:\n return False\n else:\n return True",
"def b_gB(YEnM, J9Xy):\n if type(YEnM) is J9Xy or not isinstance(YEnM, J9Xy):\n return False\n else:\n return True",
"def Bk6c(YEnM, J9Xy):\n return True i... | [
"0.872132",
"0.8596984",
"0.85797703",
"0.8568148",
"0.8566082",
"0.85560113",
"0.85544145",
"0.8543391",
"0.8538105",
"0.85332495",
"0.85332495",
"0.85332495",
"0.85332495",
"0.85320675",
"0.8485175",
"0.8485175",
"0.84676945",
"0.84676945",
"0.84676945",
"0.84676945",
"0.84... | 0.8002881 | 76 |
Determine if the specified solver should be handled by this client. Default implementation accepts all solvers (always returns True). Override this predicate function with a subclass if you want to specialize your client for a particular type of solvers. | def uI4h(ykvB):
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uI4h(ykvB):\n return ykvB and ykvB.hybrid",
"def uI4h(ykvB):\n if not ykvB:\n return False\n return ykvB.id.startswith('c4-sw_')",
"def eGi5(YKHO, ykvB=None, **B2fa):\n if not ykvB:\n ykvB = YKHO.solver\n if not ykvB:\n ykvB = lSN7\n Hpc4, ckm_ = YKHO.fixObjective()\n... | [
"0.63433087",
"0.6302363",
"0.5345807",
"0.52144384",
"0.51477623",
"0.51461333",
"0.5141692",
"0.51078755",
"0.5048167",
"0.50474274",
"0.50198984",
"0.49941558",
"0.49842367",
"0.49725285",
"0.49683824",
"0.49279472",
"0.49025902",
"0.48885778",
"0.48798326",
"0.4879767",
"... | 0.6517089 | 0 |
Return edge value or False if tail nonexistent. >>> g = Graph(VertexType=WVertex) >>> g[1][3] False >>> g.add(1,3) >>> g[1][3] 1 | def OP2O(YKHO, J3uN):
return dict.get(YKHO, J3uN, False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rz7z(YKHO, sdCG: Vertex, J3uN: Vertex, upAO: int=0):\n if sdCG and J3uN in YKHO.vertices:\n YKHO.edges[sdCG][J3uN] = upAO\n YKHO.edges[J3uN][sdCG] = upAO\n YKHO._index[sdCG.id][J3uN.id] = upAO\n YKHO._index[J3uN.id][sdCG.id] = upAO\n return True\n else:\n return ... | [
"0.56374156",
"0.55263275",
"0.5377573",
"0.5343843",
"0.5290507",
"0.5275723",
"0.5261185",
"0.52484185",
"0.52285516",
"0.52231973",
"0.51740044",
"0.51443017",
"0.51286703",
"0.5127858",
"0.5126376",
"0.5095497",
"0.5078039",
"0.5071527",
"0.5064451",
"0.5063158",
"0.50616... | 0.5439801 | 2 |
Assert Vertex invariants. >>> g = Graph() >>> g.add(1,2) >>> dict.__setitem__(g[1], 3, 1) tail value 3 not in graph >>> g[1]._validate() | def sBY3(YKHO):
hash(YKHO._id)
assert isinstance(YKHO._graph, Q1Kq), '_graph attribute not a Graph'
assert YKHO._graph[YKHO._id] is YKHO, '_graph[_id] is not self'
for a1PO in YKHO:
assert a1PO in YKHO._graph, 'Non-existant tail %r in vertex %r' % (a1PO, YKHO._id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ncyo(yY0L):\n n5sN = 'Already has the vertex!'\n assert yY0L.add_vert('A') == n5sN",
"def v6gg(yY0L):\n yY0L.add_vert('G')\n assert yY0L.has_vert('G') is True",
"def VRMF():\n Ty9i = q0XR()\n Ty9i['elem1'] = 5\n with trZe.raises(TypeError):\n Ty9i['elem2'] = \"I'm not an integer... | [
"0.6884023",
"0.6778007",
"0.6742525",
"0.6491181",
"0.6436973",
"0.627266",
"0.62098426",
"0.6152924",
"0.6135818",
"0.61086893",
"0.608789",
"0.6032621",
"0.60188943",
"0.6018844",
"0.59495723",
"0.5948436",
"0.59325314",
"0.5913122",
"0.58984846",
"0.5881281",
"0.5851751",... | 0.6595675 | 3 |
Return number of edges pointing into vertex. | def PZjm(YKHO):
return len(YKHO.reverse) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MrQl(YKHO):\n return len(YKHO._edges)",
"def vi4d(YKHO):\n return YKHO._n",
"def GthF(YKHO):\n return YKHO.graph.vertexCount()",
"def fOCg(YKHO):\n return YKHO.graph.number_of_edges()",
"def GthF(YKHO):\n return len(YKHO._outgoing)",
"def GthF(YKHO):\n return len(YKHO._outgoing)",
... | [
"0.8292998",
"0.816287",
"0.8065282",
"0.80623674",
"0.80405337",
"0.80405337",
"0.80148184",
"0.7972968",
"0.79674214",
"0.79618865",
"0.79553556",
"0.7939969",
"0.7916421",
"0.7916421",
"0.7913934",
"0.7891358",
"0.7891358",
"0.7867623",
"0.7831616",
"0.7812658",
"0.7792980... | 0.0 | -1 |
Get the return value of the target of this task. If the task has not yet completed, accessing this property will block until it completes and a value is available. | def Aofo(YKHO):
YKHO._flag.wait()
return YKHO._result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Aofo(YKHO) -> Kt_s:\n return YKHO._future.result() if YKHO._future is not None else YKHO._value",
"def NMoC(YKHO):\n while YKHO.status != YKHO.Status.FINISHED:\n YKHO.wait()\n if YKHO.t != None:\n raise eTKn(YKHO.t)\n return YKHO.value",
"def K4aq(YKHO):\n return YKHO.target_va... | [
"0.7556342",
"0.7417925",
"0.7268594",
"0.7214671",
"0.7171968",
"0.71425515",
"0.69390357",
"0.6917841",
"0.6906388",
"0.68544865",
"0.6820704",
"0.67925066",
"0.6729367",
"0.6717226",
"0.6677884",
"0.6647705",
"0.6628846",
"0.6627889",
"0.66158885",
"0.6602421",
"0.65565014... | 0.64058363 | 34 |
Initialises a set of kbuckets. Kademlia stores a list up to k in size for each of the node ids bits. A 128 bit id has 128 such lists. Each list contains triple information (ip_address, udp_port, nodeid) | def FIMM(YKHO, G1Hx, F9Z0, id):
YKHO.id = id
YKHO.bucket_size = G1Hx
YKHO.buckets = [list() for bGrB in range(F9Z0)]
YKHO.lock = T6FA.Lock() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, G1Hx, Ziit, yokr=None):\n YKHO.k = G1Hx\n YKHO.nodes = Ziit\n YKHO._clusters = {}\n YKHO._best_clusters = {}\n YKHO.seed = yokr",
"def FIMM(YKHO):\n YKHO.size = 1000\n YKHO.buckets = [[] for bGrB in range(YKHO.size)]",
"def FIMM(YKHO, WkIM=8):\n YKHO.buckets = [_sfu() for... | [
"0.66396016",
"0.661293",
"0.65817046",
"0.6567327",
"0.6471744",
"0.6429635",
"0.6425771",
"0.6421123",
"0.6409926",
"0.6399571",
"0.633766",
"0.62991095",
"0.6199559",
"0.61846566",
"0.6179504",
"0.61764437",
"0.61605465",
"0.6151336",
"0.6149897",
"0.61404777",
"0.6136551"... | 0.7764645 | 0 |
Normalize a batch of predictions. | def VqIM(o4Jx, T9l5) -> None:
udlB = T9l5.image_threshold.value.cpu()
rpbJ = T9l5.pixel_threshold.value.cpu()
eQSh = T9l5.normalization_metrics.cpu()
o4Jx['pred_scores'] = NkkI(o4Jx['pred_scores'], udlB, eQSh.min, eQSh.max)
if 'anomaly_maps' in o4Jx:
o4Jx['anomaly_maps'] = NkkI(o4Jx['anomaly... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dG2h(cC56, VJv0, sAoX, H96n, HdOj):\n if cC56.dtype != 'float32':\n cC56 = cC56.astype('float32')\n if sAoX.dtype != 'float32':\n sAoX = sAoX.astype('float32')\n cC56 = (cC56 - oyIN.min(cC56)) / oyIN.ptp(cC56)\n sAoX = (sAoX - oyIN.min(sAoX)) / oyIN.ptp(sAoX)\n cC56 = oyIN.round(cC... | [
"0.7501874",
"0.7446399",
"0.73911566",
"0.7126714",
"0.7114949",
"0.6963244",
"0.6953992",
"0.6909897",
"0.6819063",
"0.68121606",
"0.67938125",
"0.67880976",
"0.6787762",
"0.67517793",
"0.6745297",
"0.6739615",
"0.6727832",
"0.6715007",
"0.67123276",
"0.66897345",
"0.668843... | 0.7271122 | 3 |
Return a prettyfied string of this object. This prettyfied string is useful for debugging and introspection. | def r7XA(YKHO, rb7a: int=0) -> str:
Nqlg = []
Nqlg.append('Global Data')
Nqlg.append(f'{Pks6}Message ID: {YKHO.message_id}')
Nqlg.append(f'{Pks6}Message max size: {YKHO.message_max_size}')
Nqlg.append(f'{Pks6}Flags: {YKHO.flags}')
Nqlg.append(f'{Pks6}Security Model: {YKHO.security_model}')
r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def r7XA(YKHO):\n return str(YKHO)",
"def zAg0(YKHO):\n return YKHO.pretty()",
"def H2bK(YKHO) -> str:\n return '\\n'.join(YKHO.pretty_list())",
"def zAg0(YKHO):\n return BfDw.pretty_print(YKHO, YKHO._kwargs)",
"def zAg0(YKHO):\n return BfDw.pretty_print(YKHO, YKHO._kwargs)",
"def i4h0(YKH... | [
"0.86710626",
"0.8108629",
"0.8097047",
"0.8095739",
"0.7962522",
"0.7891467",
"0.78186184",
"0.78186184",
"0.77467877",
"0.77467877",
"0.77467877",
"0.77467877",
"0.77467877",
"0.77467877",
"0.77467877",
"0.77467877",
"0.77467877",
"0.77467877",
"0.77467877",
"0.77467877",
"... | 0.0 | -1 |
Return a prettyfied string of this object. This prettyfied string is useful for debugging and introspection. | def r7XA(YKHO, rb7a: int=0) -> str:
A07C = Pks6
Nqlg = []
Nqlg.append('Scoped PDU')
Nqlg.append(f'{A07C}Context Engine ID: {YKHO.context_engine_id.value!r}')
Nqlg.append(f'{A07C}Context Name: {YKHO.context_name.value!r}')
Nqlg.extend(YKHO.data.pretty(1).splitlines())
return MnRD('\n'.join(Nq... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def r7XA(YKHO):\n return str(YKHO)",
"def zAg0(YKHO):\n return YKHO.pretty()",
"def H2bK(YKHO) -> str:\n return '\\n'.join(YKHO.pretty_list())",
"def zAg0(YKHO):\n return BfDw.pretty_print(YKHO, YKHO._kwargs)",
"def zAg0(YKHO):\n return BfDw.pretty_print(YKHO, YKHO._kwargs)",
"def i4h0(YKH... | [
"0.86702794",
"0.8107317",
"0.80966437",
"0.8094628",
"0.79614806",
"0.7891451",
"0.7817807",
"0.7817807",
"0.77463174",
"0.77463174",
"0.77463174",
"0.77463174",
"0.77463174",
"0.77463174",
"0.77463174",
"0.77463174",
"0.77463174",
"0.77463174",
"0.77463174",
"0.77463174",
"... | 0.0 | -1 |
Return a prettyfied string of this object. This prettyfied string is useful for debugging and introspection. | def r7XA(YKHO, rb7a: int=0) -> str:
Nqlg = []
Nqlg.append(f'SNMP Message (version-identifier={YKHO.version})')
Nqlg.extend(YKHO.header.pretty(rb7a + 1).splitlines())
Nqlg.append(MnRD('Security Parameters', Pks6 * (rb7a + 1)))
Nqlg.extend(CeLC(YKHO.security_parameters).pretty(rb7a + 2).splitlines())
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def r7XA(YKHO):\n return str(YKHO)",
"def zAg0(YKHO):\n return YKHO.pretty()",
"def H2bK(YKHO) -> str:\n return '\\n'.join(YKHO.pretty_list())",
"def zAg0(YKHO):\n return BfDw.pretty_print(YKHO, YKHO._kwargs)",
"def zAg0(YKHO):\n return BfDw.pretty_print(YKHO, YKHO._kwargs)",
"def i4h0(YKH... | [
"0.86703366",
"0.8106807",
"0.8096107",
"0.8093779",
"0.7960665",
"0.7890802",
"0.7816994",
"0.7816994",
"0.7745515",
"0.7745515",
"0.7745515",
"0.7745515",
"0.7745515",
"0.7745515",
"0.7745515",
"0.7745515",
"0.7745515",
"0.7745515",
"0.7745515",
"0.7745515",
"0.7745515",
... | 0.0 | -1 |
Validates that the old_password field is correct. | def XLEN(YKHO):
BfIX = YKHO.cleaned_data['old_password']
if not YKHO.user.check_password(BfIX):
raise H6V6.ValidationError(YKHO.error_messages['password_incorrect'], code='password_incorrect')
return BfIX | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XLEN(YKHO):\n BfIX = YKHO.cleaned_data['old_password']\n if not YKHO.user.check_password(BfIX):\n raise H6V6.ValidationError(YKHO.error_messages['password_incorrect'], code='password_incorrect')\n return BfIX",
"def XLEN(YKHO):\n aQqY = YKHO.cleaned_data['old_password']\n if not EvfH(pa... | [
"0.8667512",
"0.8659319",
"0.8652766",
"0.86361086",
"0.85784507",
"0.85723096",
"0.85723096",
"0.85723096",
"0.8485582",
"0.8143761",
"0.77407974",
"0.76747674",
"0.7597367",
"0.75554013",
"0.7549708",
"0.75053936",
"0.7466015",
"0.7386187",
"0.7385512",
"0.7346045",
"0.7289... | 0.86468667 | 3 |
Converts datetime.timedelta time in seconds to more readable days, hours, minutes, seconds | def PY3B(fCoM):
Sm0u, C6wh = (fCoM.days, fCoM.seconds)
Wave = C6wh // 3600
O66n = C6wh % 3600 // 60
C6wh = C6wh % 60
return '{}d {}h {}m {}s'.format(Sm0u, Wave, O66n, C6wh) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ct8j(C6wh):\n return str(fCoM(seconds=C6wh))",
"def netS(C6wh):\n ITS7 = float(C6wh)\n CjKC = ITS7 // (24 * 3600)\n ITS7 = ITS7 % (24 * 3600)\n ROt1 = ITS7 // 3600\n ITS7 %= 3600\n O66n = ITS7 // 60\n ITS7 %= 60\n C6wh = ITS7\n return '{} days, {} hours, {} minutes, and {} secon... | [
"0.79632217",
"0.7860901",
"0.7751575",
"0.7728019",
"0.7651225",
"0.7639476",
"0.7571762",
"0.756889",
"0.7558528",
"0.7556407",
"0.75542295",
"0.7527693",
"0.750025",
"0.74689674",
"0.7435312",
"0.74269134",
"0.74223506",
"0.73921126",
"0.73871255",
"0.73775035",
"0.7353114... | 0.73961896 | 17 |
Returns True if both players are in the whitelist or are the same name, False otherwise. | def iHzn(YKHO, KcSv, h3kA):
return KcSv in bJrJ and h3kA in bJrJ or KcSv == h3kA | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m9sd(u46J, x2B0):\n if u46J in x2B0:\n return True\n else:\n return False",
"def G8L1(YKHO, oyg0, Elif):\n E5hX = YKHO.pref_names\n return E5hX.index(oyg0.name) < E5hX.index(Elif.name)",
"def tsqo(YKHO, u46J):\n for YRbF in YKHO.players:\n if YRbF.name == u46J:\n ... | [
"0.7574781",
"0.6834781",
"0.680615",
"0.680088",
"0.669701",
"0.6497333",
"0.63836086",
"0.63730866",
"0.63702047",
"0.63516295",
"0.63192123",
"0.63030815",
"0.6271871",
"0.62639517",
"0.6226074",
"0.6223048",
"0.62209564",
"0.6182409",
"0.61734575",
"0.61588115",
"0.614042... | 0.84940517 | 0 |
Returns the function f(x) = ax2 + bx + c | def D16V(jzdc, Fg_i, Z9rn):
return lambda WKvO: jzdc * WKvO ** 2 + Fg_i * WKvO + Z9rn | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eHNT(WKvO):\n return jzdc * WKvO + Fg_i",
"def eHNT(jzdc, Fg_i, Z9rn, WKvO):\n return jzdc * WKvO ** 2 + Fg_i * oyIN.cos(Z9rn * WKvO * oyIN.pi)",
"def aGrs(YKHO, WKvO, jzdc, Fg_i, Z9rn, Csk6):\n return Z9rn / ((jzdc ** 2 - WKvO ** 2) ** 2 + (Fg_i * WKvO) ** 2) + Csk6",
"def eHNT(WKvO):\n retu... | [
"0.7759714",
"0.7616731",
"0.73605454",
"0.7278054",
"0.7278054",
"0.72495914",
"0.7210559",
"0.72051364",
"0.71699405",
"0.7139771",
"0.70565355",
"0.6995567",
"0.6953399",
"0.6953146",
"0.6953146",
"0.6953146",
"0.69481117",
"0.69438416",
"0.6928041",
"0.6864401",
"0.686055... | 0.0 | -1 |
Returns the first_name plus the last_name, with a space in between. | def xpqj(YKHO):
eHMM = '%s %s' % (YKHO.first_name, YKHO.last_name)
return eHMM.strip() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e1yb(c9ua, zp3f):\n eHMM = c9ua + ' ' + zp3f\n return eHMM",
"def xpqj(YKHO):\n return (YKHO.first_name + ' ' + YKHO.last_name).strip()",
"def zFMy(YKHO):\n return (YKHO.first_name or '') + (YKHO.first_name and ' ' or '') + (YKHO.last_name or '')",
"def e1yb(c9ua, zp3f):\n eHMM = c9ua.titl... | [
"0.82880116",
"0.8179762",
"0.81138706",
"0.80769557",
"0.8035051",
"0.8033299",
"0.8030618",
"0.8008134",
"0.8007723",
"0.80059886",
"0.8001464",
"0.79960465",
"0.7991572",
"0.7980273",
"0.7979902",
"0.79611486",
"0.7953192",
"0.7945468",
"0.7945468",
"0.79428333",
"0.794283... | 0.7748223 | 66 |
Applies divisive normalization on fully connected layers. Collect mean and variances on x on a local window. And apply | def LBqN(WKvO, I_QP, gx53, FEri, dvgN, KMvS=None, UqYS=None, gEmA=None, SGf8=1.0, rrBf='dn', mWFP='dn_out', T3xC=False):
if rrBf is None:
rrBf = '%s_%s' % (gEmA['names'][0], gEmA['normalization'][0])
with ZylS.variable_scope(rrBf):
WKvO = ZylS.expand_dims(WKvO, 2)
R4i3 = ZylS.ones([I_QP,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OEry(YKHO):\n YKHO.mean = oyIN.mean(YKHO.x_train)\n YKHO.std = oyIN.std(YKHO.x_train)\n YKHO.max = oyIN.max(YKHO.x_train)\n YKHO.min = oyIN.min(YKHO.x_train)\n print('train_shape', YKHO.x_train.shape, 'test_shape', YKHO.x_test.shape, 'val_shape', YKHO.x_val.shape)\n print('before_normalizatio... | [
"0.66583174",
"0.6552078",
"0.6543095",
"0.6542759",
"0.6510683",
"0.6494791",
"0.64793694",
"0.63566357",
"0.6344896",
"0.63444626",
"0.63427806",
"0.6317151",
"0.6249326",
"0.6235648",
"0.6216697",
"0.6213213",
"0.62061393",
"0.62061393",
"0.62043846",
"0.6169953",
"0.61688... | 0.63949573 | 7 |
Checks if the given username is available for registration. Results are returned in the on_username_uniqueness_received() callback | def Mzv_(YKHO, NtEF):
RKD7.info(f"[+] Checking for Uniqueness of username '{NtEF}'")
return YKHO._send_xmpp_element(inWi.CheckUsernameUniquenessRequest(NtEF)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ulhh(YKHO, NtEF: str) -> bool:\n pass",
"def mxq9(YKHO, *qIxc, JfyU):\n if (Aofo := JfyU(*qIxc)) == YKHO.auth_types.SUCCESS:\n NtEF = qIxc[0]\n if NtEF in YKHO._usernames:\n return YKHO.auth_types.USERNAME_ALREADY_EXISTS\n return YKHO.auth_types.SUCCESS\n return Aofo"... | [
"0.7728219",
"0.75919163",
"0.75022435",
"0.7380208",
"0.7322814",
"0.73194844",
"0.7202757",
"0.71745944",
"0.71471375",
"0.71127474",
"0.70664895",
"0.70521444",
"0.70518494",
"0.7041754",
"0.70415395",
"0.7038161",
"0.70359766",
"0.70209086",
"0.6998946",
"0.6998865",
"0.6... | 0.788624 | 0 |
Changes the login password | def faAE(YKHO, uGpu, D3lj):
RKD7.info('[+] Changing the password of the account')
return YKHO._send_xmpp_element(ZrNc.ChangePasswordRequest(YKHO.password, uGpu, D3lj, YKHO.username)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YxCE(YKHO) -> None:\n rn8m = AOO4.getpass('Current password: ')\n uGpu = YKHO.enter_password('New password: ', confirm=True)\n YKHO.client.change_user_password(rn8m, uGpu)\n print(\"Password changed. Next, use 'avn user login' to log in again using your new password.\")",
"def zZft(YKHO, zN5h):\n... | [
"0.8200306",
"0.8163785",
"0.807394",
"0.8068296",
"0.80593073",
"0.7986241",
"0.7975136",
"0.79636526",
"0.79492533",
"0.7908918",
"0.7901488",
"0.78967136",
"0.78943425",
"0.78927195",
"0.7877374",
"0.785159",
"0.7836343",
"0.7830188",
"0.77987176",
"0.7793802",
"0.77814376... | 0.0 | -1 |
Gets the path for the weights in a named tts checkpoint. | def uFJD(YKHO, mWFP):
return YKHO.tts_checkpoints / f'{mWFP}_weights.pyt' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n5PV(YKHO) -> str:\n deXY = Hy7s.listdir(YKHO._paths['checkpoint_folder'])\n if 'checkpoint' in deXY:\n deXY.remove('checkpoint')\n islL = []\n for vauY in deXY:\n try:\n islL.append((vauY, int(vauY.split('_')[5])))\n except ValueError:\n continue\n if ... | [
"0.7683047",
"0.6858894",
"0.684233",
"0.6767826",
"0.6735496",
"0.6673058",
"0.66479844",
"0.6646024",
"0.6627491",
"0.64490575",
"0.64083195",
"0.64083195",
"0.6347621",
"0.6303778",
"0.6270873",
"0.6267679",
"0.6263168",
"0.6263168",
"0.6256683",
"0.62499624",
"0.62476224"... | 0.70090866 | 1 |
Gets the path for the optimizer state in a named tts checkpoint. | def dVw_(YKHO, mWFP):
return YKHO.tts_checkpoints / f'{mWFP}_optim.pyt' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def z3cv(YKHO) -> str:\n return YKHO._checkpoint_path",
"def np8S(YKHO, rdtc, WMPk):\n return rdtc + '/checkpoints/' + WMPk",
"def OZtV(u262, qtWj):\n mWFP = 'checkpoint_epoch_{:05d}.pyth'.format(qtWj)\n return Hy7s.path.join(tiIF(u262), mWFP)",
"def MymS(YKHO) -> str:\n return Hy7s.path.join(... | [
"0.69429827",
"0.67719746",
"0.6644606",
"0.6612311",
"0.65304524",
"0.65130395",
"0.6507825",
"0.6419421",
"0.63336724",
"0.6325516",
"0.63058776",
"0.6184094",
"0.6162549",
"0.6141018",
"0.612868",
"0.6021975",
"0.6012653",
"0.6008461",
"0.59762555",
"0.59746104",
"0.596168... | 0.0 | -1 |
Generate a UDF that is setup to onehotencode rows with the given dictionary. | def XFNA(ukIG):
u54L = len(ukIG.value)
return TQhs(lambda WKvO: vzTG(WKvO, ukIG, u54L), YRfz()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XFNA(ukIG):\n return TQhs(lambda gbyd: vzTG(gbyd, ukIG), YRfz())",
"def XFNA(ukIG):\n u54L = len(ukIG.value)\n return TQhs(lambda WKvO: vzTG(WKvO, ukIG, u54L), YRfz())",
"def OjaS(IFJW, h96P):\n IFJW = IFJW.copy()\n for iVRZ, y0cW in h96P.items():\n ZrDu = rLdf.get_dummies(IFJW[iVRZ],... | [
"0.77272606",
"0.7719267",
"0.69360656",
"0.6775434",
"0.6448424",
"0.6280522",
"0.6256231",
"0.62066317",
"0.6201095",
"0.61973536",
"0.61231875",
"0.61099535",
"0.6109693",
"0.6085954",
"0.6066663",
"0.60563755",
"0.60397726",
"0.6028982",
"0.60208637",
"0.60136324",
"0.601... | 0.77822167 | 0 |
Creates a onehotencoder dictionary based on the input data. | def BxQk(QBPu):
return QBPu.select(TIOf(QBPu.features)).distinct().rdd.map(lambda WKvO: tuple(WKvO[0])).zipWithIndex().collectAsMap() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zGX0(YKHO):\n rL9T = B_Dz(YKHO.attributes)\n YKHO.attributes = n9Ta(YKHO.attributes, rL9T)\n rL9T.encode(YKHO.data)\n return rL9T",
"def BxQk(QBPu):\n dlBi = QBPu.select(TIOf('features')).distinct().rdd.map(lambda Mkmy: tuple(Mkmy[0])).zipWithIndex().collectAsMap()\n return dlBi",
"def zG... | [
"0.7557169",
"0.73852605",
"0.72647613",
"0.72612715",
"0.72562486",
"0.7224288",
"0.7191273",
"0.71840054",
"0.71467626",
"0.7127568",
"0.71147114",
"0.7113028",
"0.71110016",
"0.710489",
"0.7027255",
"0.7024422",
"0.7018673",
"0.701528",
"0.70028406",
"0.7002572",
"0.700017... | 0.73658776 | 2 |
Converts a \t separated string into a list of (featureID, value) tuples. | def kz_o(AU8u):
RWYF = AU8u.replace('\n', '').split('\t')
SbOW = []
for YRbF in range(1, len(RWYF)):
SbOW.append((YRbF - 1, RWYF[YRbF]))
return SbOW | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BZA3(YKHO, vIwR):\n njyT = '\\\\((\\\\d*),\\\\s([^\\\\)]*)\\\\)?'\n hlel = ZbWC.findall(njyT, vIwR)\n return list(hlel)",
"def kz_o(AU8u):\n yv6U = AU8u.split('\\t')[1:]\n return zip(range(len(yv6U)), yv6U)",
"def MtEZ(Nqlg):\n if not Nqlg:\n return []\n if Nqlg[0].startswith('F... | [
"0.612015",
"0.5730201",
"0.5604385",
"0.5563935",
"0.5525754",
"0.55244184",
"0.5515851",
"0.55034864",
"0.54762983",
"0.5473979",
"0.54640645",
"0.5435343",
"0.5417057",
"0.5414055",
"0.53912514",
"0.53795666",
"0.5367048",
"0.53599834",
"0.53478235",
"0.53460747",
"0.53415... | 0.51683134 | 43 |
Convert a DataFrame consisting of rows of comma separated text into labels and feature. | def zlSq(Pjam):
return Pjam.select(lpha(Pjam.text, '\t').getItem(0).cast('double').alias('label'), J6Qj(Pjam.text).alias('feature')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def klGW(KxLt, jQ3Z, lpha):\n V22M = [rdlD.text for YRbF, rdlD in jQ3Z.iterrows()]\n if lpha == 'train':\n LyKa = KxLt.fit_transform(V22M)\n else:\n LyKa = KxLt.transform(V22M)\n EcVT = LyKa.todense()\n fuBA = jQ3Z['label'].values\n return (EcVT, fuBA)",
"def m78g(jQ3Z, WGaO='text... | [
"0.6781672",
"0.6449666",
"0.63364416",
"0.6262695",
"0.6245254",
"0.6210186",
"0.6201344",
"0.61441284",
"0.61305153",
"0.6092638",
"0.6074078",
"0.6067529",
"0.59917504",
"0.59870535",
"0.59175056",
"0.5917338",
"0.5909731",
"0.59069914",
"0.586563",
"0.5864592",
"0.5831104... | 0.57135606 | 28 |
Computes and adds a 'log_loss' column to a DataFrame using 'p' and 'label' columns. | def dAou(jQ3Z):
return jQ3Z.select(ZpyY(jQ3Z.p == 0, _hZ2).otherwise(jQ3Z.p).alias('p'), 'label').select(ZpyY(fvDH('p') == 1, fvDH('p') - _hZ2).otherwise(fvDH('p')).alias('p'), 'label').select('*', ZpyY(fvDH('label') == 1, -1 * RKD7(fvDH('p'))).otherwise(-1 * RKD7(1 - fvDH('p'))).alias('log_loss')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dAou(jQ3Z):\n return jQ3Z.withColumn('log_loss', ZpyY(jQ3Z.label == 1, ZpyY(jQ3Z.p == 0, -RKD7(jQ3Z.p + _hZ2)).otherwise(-RKD7(jQ3Z.p))).otherwise(ZpyY(jQ3Z.p == 1, -RKD7(1 - jQ3Z.p + _hZ2)).otherwise(-RKD7(1 - jQ3Z.p))))",
"def dAou(jQ3Z):\n lmpc = jQ3Z.select('*', ZpyY(jQ3Z.label == 1, 0.0 - RKD7(jQ3... | [
"0.8426367",
"0.83902276",
"0.8198923",
"0.6784671",
"0.6734626",
"0.6708319",
"0.6673646",
"0.66361403",
"0.6548958",
"0.6353355",
"0.6281977",
"0.622861",
"0.6201929",
"0.6179169",
"0.61694366",
"0.6105586",
"0.608608",
"0.6043178",
"0.6027669",
"0.60209405",
"0.59945357",
... | 0.830185 | 2 |
Configure loggers with configurations defined in yaml | def B_4r(y2K9: str='logging.yml') -> None:
bjlF = eJb6.safe_load(GkAb(y2K9).read_text())
G9jH.config.dictConfig(bjlF) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FUyv(YKHO) -> None:\n with ANWz.resources.path('arpoc.resources', 'loggers.yml') as m2LZ, open(m2LZ) as c1qH:\n WvA1 = c1qH.read()\n WvA1 = WvA1.replace('DEFAULTLEVEL', YKHO.config.misc.log_level)\n WvA1 = WvA1.replace('ACCESS_LOG', YKHO.config.misc.access_log)\n WvA1 = WvA1.repl... | [
"0.7835998",
"0.7450933",
"0.74134755",
"0.73875713",
"0.7232675",
"0.7179646",
"0.71361566",
"0.7124193",
"0.7121287",
"0.7090099",
"0.6967464",
"0.6935132",
"0.69133556",
"0.68879706",
"0.6849935",
"0.68429583",
"0.68419933",
"0.68255705",
"0.68065214",
"0.6798426",
"0.6788... | 0.80589324 | 0 |
Simple logging wrapper that returns logger configured to log into file and console. | def fZx2(mWFP: str, wiAm: int=G9jH.DEBUG) -> G9jH.Logger:
bo34 = G9jH.getLogger(mWFP)
for q9Fz in bo34.handlers[:]:
bo34.removeHandler(q9Fz)
bo34.setLevel(wiAm)
bo34.addHandler(mn3L(BFqf))
return bo34 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vgix(mWFP='default', ABDL=G9jH.DEBUG, W1Sa=False, pRU9=True, Ux0P='default.log'):\n bo34 = G9jH.getLogger(mWFP)\n bo34.setLevel(ABDL)\n if W1Sa:\n Ga6V = G9jH.FileHandler(Ux0P)\n Ga6V.setLevel(ABDL)\n Ga6V.setFormatter(G9jH.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(mes... | [
"0.7535495",
"0.74940753",
"0.74916005",
"0.7488174",
"0.74716437",
"0.7469259",
"0.74643606",
"0.7461278",
"0.7454175",
"0.74337673",
"0.7429471",
"0.7428512",
"0.740442",
"0.73999894",
"0.73735833",
"0.736897",
"0.736897",
"0.7362333",
"0.7362333",
"0.7362333",
"0.7340549",... | 0.0 | -1 |
The bias for the neuron. | def Fg_i(YKHO):
return YKHO.__b | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oug5(YKHO) -> int:\n return YKHO._bias",
"def rC2j(YKHO):\n return YKHO.get_tensor_value('linear_regression/bias:0')",
"def rC2j(YKHO):\n return YKHO.get_tensor_value('logistic_regression/bias:0')",
"def oug5(YKHO):\n return YKHO._bias",
"def fthx(YKHO):\n return YKHO.getGlobalVariableBy... | [
"0.88543683",
"0.8680704",
"0.86127204",
"0.84911704",
"0.8402307",
"0.8402307",
"0.82982725",
"0.8009472",
"0.77528214",
"0.7715095",
"0.76597214",
"0.76007164",
"0.7600336",
"0.7434073",
"0.73725456",
"0.7351592",
"0.73316675",
"0.73175824",
"0.7314989",
"0.7216286",
"0.721... | 0.0 | -1 |
Calculates the forward propagation of the neuron | def c0cS(YKHO, EcVT):
Nk6w = oyIN.dot(YKHO.__W, EcVT) + YKHO.__b
YKHO.__A = m1Hg(Nk6w)
return YKHO.__A | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pijq(YKHO):\n for gEmA in YKHO.network.neuron_layers_list:\n for HgE9 in gEmA:\n HgE9.calc_sum()\n HgE9.calc_output()\n HgE9.delta = 0",
"def pijq(YKHO):\n for gEmA in YKHO.network.neuron_layers_list:\n for HgE9 in gEmA:\n HgE9.calc_sum()\n ... | [
"0.80003095",
"0.80003095",
"0.7418896",
"0.741716",
"0.7301511",
"0.7237452",
"0.7167798",
"0.71635383",
"0.70952904",
"0.70663315",
"0.7039245",
"0.703416",
"0.702494",
"0.7024494",
"0.70103025",
"0.7006216",
"0.6985589",
"0.69824994",
"0.6972076",
"0.69662285",
"0.6965963"... | 0.6923474 | 30 |
Test instantiating an Index with a database only. As a side effect this test also tests the design_document_id, name, type, and definition property methods. | def oHrV(YKHO):
d6pt = tTFA(YKHO.db)
YKHO.assertIsInstance(d6pt, tTFA)
YKHO.assertIsNone(d6pt.design_document_id)
YKHO.assertIsNone(d6pt.name)
YKHO.assertEqual(d6pt.type, 'json')
YKHO.assertEqual(d6pt.definition, {}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oHrV(YKHO):\n d6pt = oAAU(YKHO.db)\n YKHO.assertIsInstance(d6pt, oAAU)\n YKHO.assertIsNone(d6pt.design_document_id)\n YKHO.assertIsNone(d6pt.name)\n YKHO.assertEqual(d6pt.type, 'text')\n YKHO.assertEqual(d6pt.definition, {})",
"def NyHV(YKHO):\n d6pt = tTFA(YKHO.db, fields=['name', 'age'... | [
"0.7970138",
"0.78170556",
"0.7719575",
"0.7711683",
"0.7688695",
"0.7491262",
"0.7368847",
"0.7294269",
"0.7198111",
"0.7022518",
"0.7014706",
"0.6951597",
"0.69237703",
"0.6883905",
"0.68626827",
"0.6825739",
"0.6825724",
"0.679267",
"0.67607546",
"0.6754834",
"0.6732609",
... | 0.81832093 | 0 |