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 |
|---|---|---|---|---|---|---|
Serialise the object into a Python dictionary. | def bfiU(YKHO):
SCpB = YKHO.datetime_format(YKHO.created_on)
OqaB = YKHO.datetime_format(YKHO.updated_on)
return {'id': YKHO.id, 'created_on': SCpB, 'updated_on': OqaB} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Napc(YKHO):\n return dict(YKHO.__dict__)",
"def Napc(YKHO) -> dict:\n pass",
"def MNRr(YKHO):\n return {'id': YKHO.id, 'obj_type': YKHO.__class__.__name__}",
"def _fYl(YKHO) -> cuzp[str, ImMB]:\n return B4us(YKHO)",
"def _fYl(YKHO):\n return S3sg.to_primitive(YKHO, convert_instances=True... | [
"0.7913252",
"0.7857451",
"0.76433116",
"0.7622099",
"0.75762403",
"0.7553265",
"0.75336176",
"0.7533043",
"0.75241655",
"0.75166166",
"0.75146437",
"0.7497319",
"0.7495699",
"0.7494611",
"0.7472831",
"0.74444216",
"0.74416506",
"0.7439433",
"0.7426734",
"0.74116826",
"0.7411... | 0.0 | -1 |
Serialise the object into a Python dictionary. | def bfiU(YKHO):
aevO = YKHO.time_format(YKHO.start_time)
cGyw = YKHO.time_format(YKHO.end_time)
SG6Y = YKHO.date_format(YKHO.date)
oQRR = YKHO.tags.split('\r')
return {**super(oBOg, YKHO).serialise(), **{'title': YKHO.title, 'location': YKHO.location, 'location_detail': YKHO.location_detail, 'descri... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Napc(YKHO):\n return dict(YKHO.__dict__)",
"def Napc(YKHO) -> dict:\n pass",
"def MNRr(YKHO):\n return {'id': YKHO.id, 'obj_type': YKHO.__class__.__name__}",
"def _fYl(YKHO) -> cuzp[str, ImMB]:\n return B4us(YKHO)",
"def _fYl(YKHO):\n return S3sg.to_primitive(YKHO, convert_instances=True... | [
"0.79145634",
"0.7858821",
"0.76440275",
"0.7623617",
"0.7576926",
"0.7554061",
"0.7534989",
"0.753265",
"0.7525145",
"0.7516459",
"0.7514637",
"0.7497491",
"0.7496126",
"0.7495619",
"0.7474538",
"0.74453294",
"0.7442311",
"0.74406505",
"0.7426893",
"0.7411882",
"0.7411882",
... | 0.0 | -1 |
Defines the full discriminator loss, which is equal to the discriminator part of the full adversarial objective. | def zRN9(YKHO):
with ZylS.name_scope('disc_loss'), ZylS.device('/gpu:0'):
YKHO.gen(YKHO.source_enc_inputs, encode_only=True, reuse=True)
YKHO.truth(YKHO.target_enc_inputs, encode_only=True, reuse=True)
uTiq = YKHO.gen.enc.h_state
zHkq = YKHO.truth.enc.h_state
uTiq = ZylS.tanh... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AOC4(YKHO):\n return YKHO._discriminator_loss",
"def AOC4(cmtP, B9AX):\n return -(ht2j.mean(cmtP) - ht2j.mean(B9AX))",
"def AOC4(L4D4, dOi_):\n qxD9 = ZLdM(ZylS.ones_like(L4D4), L4D4)\n mxSF = ZLdM(ZylS.zeros_like(dOi_), dOi_)\n hkq2 = qxD9 + mxSF\n return hkq2",
"def AOC4(Y8eF, aMgO):\... | [
"0.76041853",
"0.7220762",
"0.7097356",
"0.70397246",
"0.7039111",
"0.7030609",
"0.6989854",
"0.6984374",
"0.69698447",
"0.69522405",
"0.6938935",
"0.69378716",
"0.6923801",
"0.6901136",
"0.68823165",
"0.6846983",
"0.67903435",
"0.67745775",
"0.67586833",
"0.66835505",
"0.656... | 0.7090791 | 3 |
Returns a random alpha numeric string of the given length. | def kPDB(u54L=10):
return ''.join([tuKI.choice('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz') for YRbF in Ni9Y(0, u54L)]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def drFW(u54L):\n return ''.join((tuKI.choice(vIwR.ascii_letters + vIwR.digits) for bGrB in range(u54L)))",
"def gSN1(u54L):\n return ''.join((tuKI.choice(H_Aw) for bGrB in range(u54L)))",
"def oHC8(u54L):\n return ''.join((Acvy(C1SZ + BHGE + FcoE) for WKvO in range(u54L)))",
"def BWvy(u54L):\n r... | [
"0.8849729",
"0.8826146",
"0.8779813",
"0.8766591",
"0.8766591",
"0.8761412",
"0.87460274",
"0.87442183",
"0.87277704",
"0.87246025",
"0.87208194",
"0.87017834",
"0.8688103",
"0.8662692",
"0.8660302",
"0.8643596",
"0.86215776",
"0.85924655",
"0.8592251",
"0.8553976",
"0.85516... | 0.9026187 | 0 |
Adds a node to the graph. | def LBdM(TTbv, IzRN, UXqs, TVTK=0.3, H2v2=0.3, ROpF='circle', OfK8='black', GAJY=14):
IzRN.write('node[width=%s,height=%s,shape=%s,colour=%s,fontsize=%s];\n' % (TVTK, H2v2, ROpF, OfK8, GAJY))
IzRN.write('%s [label="%s"];\n' % (TTbv, UXqs)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g5gD(YKHO, Q6kx):\n YKHO.graph[Q6kx]",
"def g5gD(YKHO, Q6kx):\n YKHO.nodes.add(Q6kx)",
"def g5gD(YKHO, Q6kx):\n YKHO._nodes.add(Q6kx)",
"def g5gD(YKHO, Q6kx):\n YKHO._check_nodes([Q6kx])\n jHsn.DiGraph.add_node.im_func(YKHO, Q6kx)",
"def g5gD(YKHO, Q6kx):\n YKHO.nodes.append(Q6kx)",
... | [
"0.89833",
"0.8455864",
"0.83965313",
"0.83696383",
"0.83613396",
"0.83613396",
"0.8339028",
"0.8280353",
"0.8257101",
"0.82200056",
"0.81799775",
"0.81763947",
"0.8143598",
"0.80873346",
"0.806757",
"0.8065594",
"0.80502516",
"0.8038804",
"0.7998562",
"0.7998562",
"0.7878067... | 0.0 | -1 |
Test when the FuzzTarget doesn't exist. | def LE6d(YKHO):
YKHO.testcase.project_name = 'proj'
YKHO.testcase.fuzzer_name = 'libFuzzer'
YKHO.testcase.set_metadata('fuzzer_binary_name', 'test')
YKHO.assertEqual({'binary': 'test', 'engine': 'libFuzzer', 'project': 'proj'}, YKHO.testcase.get_fuzz_target()._to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Fqa5(YKHO):\n with gbPf.TemporaryDirectory() as z_es:\n V6eb = Hy7s.path.join(z_es, 'build-out')\n Hy7s.makedirs(V6eb)\n g9eG = ('No fuzz targets were found in out directory: %s.', V6eb)\n YKHO._test_initialize_fail(g9eG, workspace=z_es)",
"def YyYn(YKHO):\n L6NK = TMAJ.Magi... | [
"0.7075999",
"0.6529552",
"0.6503431",
"0.6467067",
"0.6453649",
"0.64507204",
"0.6220548",
"0.6178424",
"0.61668533",
"0.615729",
"0.6128005",
"0.61124206",
"0.6106775",
"0.610226",
"0.60346437",
"0.60257554",
"0.60077375",
"0.598442",
"0.59199685",
"0.58825946",
"0.5877465"... | 0.65115863 | 2 |
r"""Fills the input Tensor with values drawn from the normal | def mhAC(vhpA, JBMS=0.0, M1Jx=1.0):
if isinstance(vhpA, U78l.Module):
for mWFP, upAO in vhpA.named_parameters():
if upAO.requires_grad == True and 'bias' not in mWFP:
DbxN.normal(upAO, mean=JBMS, std=M1Jx)
elif isinstance(vhpA, U78l.Parameter):
if vhpA.requires_grad:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QZoP(PU1l: tf.Tensor) -> ZylS.Tensor:\n return PU1l",
"def NclY(vhpA, JBMS=0.0, M1Jx=1.0):\n with _uqo.no_grad():\n if vhpA.is_local:\n return _uqo.normal(mean=JBMS, std=M1Jx, size=vhpA.shape, out=vhpA)\n else:\n return _uqo.normal(mean=JBMS, std=M1Jx, size=vhpA.shap... | [
"0.6676549",
"0.63963443",
"0.63437456",
"0.63293445",
"0.62639827",
"0.61893594",
"0.6075036",
"0.6073013",
"0.6068565",
"0.60609293",
"0.6058771",
"0.6058771",
"0.6058771",
"0.5984886",
"0.5947549",
"0.5917335",
"0.5903085",
"0.5899686",
"0.5895787",
"0.58924526",
"0.587377... | 0.5949521 | 14 |
r"""Fills the input Tensor with values drawn from a truncated normal distribution. The values are effectively drawn from the | def L6wv(vhpA, JBMS=0.0, M1Jx=1.0, jzdc=-2.0, Fg_i=2.0):
if isinstance(vhpA, U78l.Module):
for mWFP, upAO in vhpA.named_parameters():
if upAO.requires_grad == True and 'bias' not in mWFP:
DbxN.trunc_normal_(upAO, mean=JBMS, std=M1Jx, a=jzdc, b=Fg_i)
elif isinstance(vhpA, U78l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CQyn(vhpA, JBMS, M1Jx, jzdc, Fg_i):\n\n def _Ttn(WKvO):\n \"\"\"Computes standard normal cumulative distribution function\"\"\"\n return (1.0 + epAf.erf(WKvO / epAf.sqrt(2.0))) / 2.0\n if JBMS < jzdc - 2 * M1Jx or JBMS > Fg_i + 2 * M1Jx:\n G9jH.warn('mean is more than 2 std from [a, ... | [
"0.6656432",
"0.6615571",
"0.6615571",
"0.6615571",
"0.6555001",
"0.64920133",
"0.6402612",
"0.63304406",
"0.62309724",
"0.61513364",
"0.613715",
"0.6117932",
"0.6109388",
"0.6090065",
"0.606731",
"0.60517365",
"0.601126",
"0.597208",
"0.59550667",
"0.59086215",
"0.5884881",
... | 0.6065407 | 15 |
Gets the current current limit | def pG79(YKHO, wohN: int=0):
YIoF = YKHO.set_port(wohN)
if YIoF:
return 1
return float(YKHO.query('CURR?')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jqY7(YKHO) -> float:\n return YKHO._current_limit",
"def K3hO():\n return u406[0]",
"def K3hO(YKHO):\n return YKHO.__limit",
"def K3hO(YKHO):\n return YKHO.__limit",
"def K3hO(YKHO):\n return YKHO.__limit",
"def K3hO(YKHO):\n return YKHO.__limit__",
"def K3hO(YKHO):\n return YK... | [
"0.853179",
"0.85134596",
"0.8215946",
"0.8215946",
"0.8215946",
"0.8158086",
"0.81408733",
"0.81408733",
"0.81408733",
"0.7970456",
"0.7928602",
"0.7738455",
"0.7731163",
"0.7713632",
"0.7713632",
"0.7654801",
"0.7654801",
"0.7654801",
"0.7654801",
"0.7654801",
"0.7654801",
... | 0.73945403 | 24 |
The set of arguments for constructing a BigIqAs3 resource. | def FIMM(Ro_8, *, qBFD: pulumi.Input[str], J5Vt: pulumi.Input[str], NTiD: pulumi.Input[str], DELo: pulumi.Input[str], _sNC: Optional[pulumi.Input[str]]=None, wRky: Optional[pulumi.Input[str]]=None, c0Il: Optional[pulumi.Input[bool]]=None, Nnja: Optional[pulumi.Input[bool]]=None, Re9R: Optional[pulumi.Input[str]]=None):... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(Ro_8, kFeU: str, qIxc: BigIqAs3Args, VKhi: Optional[pulumi.ResourceOptions]=None):\n ...",
"def NMoC(kFeU: str, id: pulumi.Input[str], VKhi: Optional[pulumi.ResourceOptions]=None, qBFD: Optional[pulumi.Input[str]]=None, J5Vt: Optional[pulumi.Input[str]]=None, _sNC: Optional[pulumi.Input[str]]=None, N... | [
"0.81949365",
"0.6525535",
"0.65227985",
"0.61918175",
"0.6122546",
"0.6010726",
"0.5868854",
"0.58652395",
"0.58377856",
"0.57503504",
"0.5718003",
"0.56828254",
"0.56178683",
"0.56105274",
"0.5603417",
"0.5600806",
"0.55734974",
"0.5570239",
"0.5560514",
"0.5556939",
"0.555... | 0.5978754 | 6 |
type `bool`, if set to `true` enables Token based Authentication,default is `false` | def c0Il(YKHO) -> h8nf[qe4Y.Input[bool]]:
return qe4Y.get(YKHO, 'bigiq_token_auth') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lIHv(YKHO) -> bool:\n return bool(YKHO.token)",
"def rts1(YKHO):\n return True",
"def rts1(YKHO):\n return True",
"def rts1(YKHO):\n return True",
"def VUpK(YKHO) -> bool:\n return False",
"def PFoJ(**B2fa) -> bool:\n return B2fa.get('authentication', None) is not None",
"def rts1... | [
"0.7761915",
"0.70359236",
"0.7012551",
"0.6982919",
"0.6966588",
"0.6927989",
"0.6899903",
"0.68842983",
"0.6859024",
"0.6822968",
"0.67998606",
"0.67998606",
"0.67998606",
"0.67998606",
"0.67998606",
"0.67998606",
"0.67998606",
"0.67998606",
"0.67998606",
"0.67998606",
"0.6... | 0.6785816 | 34 |
type `bool`, if set to `true` enables Token based Authentication,default is `false` | def c0Il(YKHO) -> h8nf[qe4Y.Input[bool]]:
return qe4Y.get(YKHO, 'bigiq_token_auth') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lIHv(YKHO) -> bool:\n return bool(YKHO.token)",
"def rts1(YKHO):\n return True",
"def rts1(YKHO):\n return True",
"def rts1(YKHO):\n return True",
"def VUpK(YKHO) -> bool:\n return False",
"def PFoJ(**B2fa) -> bool:\n return B2fa.get('authentication', None) is not None",
"def rts1... | [
"0.7761915",
"0.70359236",
"0.7012551",
"0.6982919",
"0.6966588",
"0.6927989",
"0.6899903",
"0.68842983",
"0.6859024",
"0.6822968",
"0.67998606",
"0.67998606",
"0.67998606",
"0.67998606",
"0.67998606",
"0.67998606",
"0.67998606",
"0.67998606",
"0.67998606",
"0.67998606",
"0.6... | 0.6785816 | 35 |
type `bool`, if set to `true` enables Token based Authentication,default is `false` | def c0Il(YKHO) -> qe4Y.Output[h8nf[bool]]:
return qe4Y.get(YKHO, 'bigiq_token_auth') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lIHv(YKHO) -> bool:\n return bool(YKHO.token)",
"def rts1(YKHO):\n return True",
"def rts1(YKHO):\n return True",
"def rts1(YKHO):\n return True",
"def VUpK(YKHO) -> bool:\n return False",
"def PFoJ(**B2fa) -> bool:\n return B2fa.get('authentication', None) is not None",
"def rts1... | [
"0.7763602",
"0.703398",
"0.7010666",
"0.69811535",
"0.69665325",
"0.69278455",
"0.68986136",
"0.68826365",
"0.6858014",
"0.68216",
"0.6798162",
"0.6798162",
"0.6798162",
"0.6798162",
"0.6798162",
"0.6798162",
"0.6798162",
"0.6798162",
"0.6798162",
"0.6798162",
"0.6798162",
... | 0.6320131 | 69 |
Will attempt to validate the ticket. If validation fails, then False is returned. If validation is successful, then True is returned and the validated username is saved in the session under the key `CAS_USERNAME_SESSION_KEY`. | def xzCw(YXSb):
wk5E.logger.debug('validating token {}'.format(YXSb))
VpAF = kjRU(wk5E.config['CAS_SERVER'], wk5E.config['CAS_VALIDATE_ROUTE'], WsL5.url_for('.login', _external=True), YXSb)
wk5E.logger.debug('Making GET request to {}'.format(VpAF))
geh0 = Kf9k(VpAF)
MVva = {'1': Aq7r, '2': PMgX, '3'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NLCy(YKHO, QePW, YXSb, DO6x, zVa7):\n rtO9 = getattr(gCuF, 'CAS_CREATE_USER', True)\n lKbS = getattr(gCuF, 'CAS_CREATE_USER_WITH_ID', False)\n jLHv = getattr(gCuF, 'CAS_RENAME_ATTRIBUTES', {})\n lLPd = getattr(gCuF, 'CAS_PROXY_CALLBACK', None)\n DVyQ = getattr(gCuF, 'CAS_APPLY_ATTRIBUTES_TO_USER... | [
"0.6138389",
"0.6119316",
"0.5972189",
"0.5914326",
"0.58681226",
"0.5820943",
"0.5787062",
"0.57542735",
"0.5751917",
"0.56438285",
"0.5629033",
"0.56213677",
"0.5592592",
"0.5560668",
"0.5532256",
"0.5521664",
"0.551822",
"0.55063486",
"0.5479138",
"0.545853",
"0.54302317",... | 0.629565 | 0 |
This method returns a list of pretrained model which can be instantiated directly from NVIDIA's NGC cloud. | def j0Fd(Emd4) -> h8nf[sWYP]:
Aofo = []
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def j0Fd(Emd4) -> 'List[PretrainedModelInfo]':\n DTMN = []\n C3ST = sWYP(pretrained_model_name='tts_en_talknet', location='https://api.ngc.nvidia.com/v2/models/nvidia/nemo/tts_en_talknet/versions/1.0.0rc1/files/talknet_spect.nemo', description='This model is trained on LJSpeech sampled at 22050Hz, and can be... | [
"0.7350458",
"0.7290012",
"0.7265866",
"0.7253452",
"0.7220212",
"0.7131065",
"0.69249314",
"0.66910154",
"0.66216487",
"0.6605869",
"0.6597242",
"0.6591165",
"0.65440285",
"0.65338945",
"0.64267844",
"0.64267844",
"0.63940996",
"0.6385187",
"0.63653076",
"0.63337964",
"0.632... | 0.71926737 | 6 |
Calculates the difference between the two most probable classes and normalises it with tanh such that the resulting difference is between 0 and 1. This is multiplied by the current loss to bound the additonal loss term to numbers between 0 and the current cross entropy loss. This alleviates the CE loss the bigger the d... | def NgPP(x5TG, Yptr, N77f):
if oyIN.sum(x5TG) != 1:
x5TG = oyIN.array([oyIN.exp(WKvO) / oyIN.sum(oyIN.exp(x5TG)) for WKvO in x5TG])
BBqg = oyIN.argmax(x5TG, 1)
yexo = Yptr == BBqg
QyVM = oyIN.argpartition(x5TG, -2, axis=1)[:, -2:]
I05E = x5TG[oyIN.arange(x5TG.shape[0])[:, None], QyVM]
aU... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _kMf(YKHO):\n return YKHO.alpha.T.dot(YKHO.y_train) - 0.5 * YKHO.alpha.T.dot(YKHO.K_train.dot(YKHO.alpha))",
"def GHhb(x5TG, Yptr, N77f):\n if oyIN.sum(x5TG) != 1:\n x5TG = oyIN.array([oyIN.exp(WKvO) / oyIN.sum(oyIN.exp(x5TG)) for WKvO in x5TG])\n BBqg = oyIN.argmax(x5TG, 1)\n yexo = Yptr ... | [
"0.657201",
"0.6481695",
"0.6422502",
"0.6321312",
"0.6317077",
"0.6285854",
"0.6277353",
"0.62703013",
"0.62497425",
"0.6237269",
"0.6223897",
"0.6181073",
"0.6165621",
"0.6165058",
"0.61454546",
"0.6122351",
"0.6120773",
"0.61148024",
"0.6112187",
"0.6104816",
"0.60898376",... | 0.6442792 | 2 |
Sets the measure_results of this DashboardItemDataResultDetail. | def MZHq(YKHO, MZHq):
YKHO._measure_results = MZHq | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s3n0(YKHO, g2W_):\n YKHO._measures = g2W_",
"def AMnm(YKHO, AMnm):\n YKHO._dimension_results = AMnm",
"def wvto(YKHO, dixj: Optional[dict]):\n if dixj is None:\n return\n TZ9E = 'metrics/' if YKHO._current_mode != 'eval' else 'test/'\n for AcYW, Aofo in dixj.items():\n if isins... | [
"0.6104049",
"0.6102567",
"0.61001754",
"0.5914305",
"0.59111094",
"0.5903846",
"0.5886471",
"0.5886471",
"0.5871003",
"0.5734549",
"0.5673369",
"0.5456424",
"0.54473966",
"0.5418429",
"0.538035",
"0.53200406",
"0.52794003",
"0.52781177",
"0.5254055",
"0.52320373",
"0.5231275... | 0.8083865 | 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):
if not isinstance(Elif, EEiw):
return True
return YKHO.to_dict() != Elif.to_dict() | {
"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 |
Class constructor. start_value Raw start timestamp. end_value Raw end timestamp. | def FIMM(YKHO, kLRn, OEGN):
SWox = super(oeE_, YKHO).load(kLRn)
C7pn = super(oeE_, YKHO).load(OEGN)
try:
YKHO.value = C7pn - SWox
except TypeError:
YKHO.value = None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, hSQE=0, B7lP=0):\n YKHO.data = {'start_ms': hSQE, 'end_ms': B7lP}",
"def FIMM(YKHO, yKcO, Os4s):\n YKHO.start = yKcO\n YKHO.end = Os4s",
"def FIMM(YKHO, yKcO, Os4s):\n YKHO.start = yKcO\n YKHO.end = Os4s",
"def FIMM(YKHO, yKcO, Os4s):\n YKHO.start = yKcO\n YKHO.end = Os4s"... | [
"0.74310124",
"0.7401858",
"0.7401858",
"0.7401858",
"0.7401858",
"0.7401858",
"0.7384171",
"0.73654187",
"0.71874636",
"0.7104112",
"0.70454454",
"0.69846535",
"0.68316174",
"0.6807864",
"0.6756411",
"0.672676",
"0.670792",
"0.6702622",
"0.6694485",
"0.6643397",
"0.6641411",... | 0.6782132 | 14 |
Displays statistics on the most frequent times of travel. | def dWJR(jQ3Z):
print('\nCalculating The Most Frequent Times of Travel...\n')
SWox = ITS7.time()
X_bn = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
jQ3Z['Start Time'] = rLdf.to_datetime(jQ3Z['Start Time'])
jQ3Z['Months'] ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dWJR(jQ3Z):\n print('\\nCalculating The Most Frequent Times of Travel...\\n')\n SWox = ITS7.time()\n print('The most common month of travel is: {} '.format(jQ3Z.Month.mode()[0]))\n print('The most common day of travel is: {} '.format(jQ3Z.Day.mode()[0]))\n print('The most common hour of travel i... | [
"0.79996175",
"0.7920857",
"0.7891767",
"0.78612196",
"0.785926",
"0.7838814",
"0.779974",
"0.77848285",
"0.7735119",
"0.7723049",
"0.771342",
"0.7708436",
"0.770453",
"0.77017164",
"0.7689714",
"0.7685842",
"0.7680146",
"0.76788265",
"0.76721054",
"0.7661351",
"0.7660023",
... | 0.0 | -1 |
Displays statistics on the most popular stations and trip. | def Huc_(jQ3Z):
print('\nCalculating The Most Popular Stations and Trip...\n')
SWox = ITS7.time()
print('most commonly used start station', jQ3Z['Start Station'].mode()[0])
print('most commonly used end station', jQ3Z['End Station'].mode()[0])
Aiuw = jQ3Z.groupby(['Start Station', 'End Station']).si... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Huc_(jQ3Z):\n print('\\nCalculating The Most Popular Stations and Trip...\\n')\n SWox = ITS7.time()\n v6Be(jQ3Z)\n BeYU(jQ3Z)\n O6Ct(jQ3Z)\n print('\\nThis took %s seconds.' % (ITS7.time() - SWox))\n print('-' * 40)",
"def Huc_(jQ3Z):\n print('\\nCalculating The Most Popular Stations ... | [
"0.76664937",
"0.76271904",
"0.76108116",
"0.75858396",
"0.75767946",
"0.7567278",
"0.7558413",
"0.7538156",
"0.75297517",
"0.7503056",
"0.7499961",
"0.74967057",
"0.7487728",
"0.7484119",
"0.7475753",
"0.7473595",
"0.74375546",
"0.7436976",
"0.7433463",
"0.7428539",
"0.74269... | 0.72655624 | 61 |
Displays statistics on the total and average trip duration. | def kDMA(jQ3Z):
print('\nCalculating Trip Duration...\n')
SWox = ITS7.time()
jQ3Z['Start Time'] = rLdf.to_datetime(jQ3Z['Start Time'])
jQ3Z['End Time'] = rLdf.to_datetime(jQ3Z['End Time'])
jQ3Z['Travel Time'] = jQ3Z['End Time'].dt.hour * 60 + jQ3Z['End Time'].dt.minute - (jQ3Z['Start Time'].dt.hour ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kDMA(dMlt):\n print('\\nCalculating Trip Duration...\\n')\n SWox = ITS7.time()\n qZ1g = dMlt['Trip Duration'].sum()\n print('The total travel time is ', qZ1g, ' seconds.')\n NPSF = dMlt['Trip Duration'].mean()\n print('The average travel time is ', NPSF, ' seconds.')\n print('\\nThis took ... | [
"0.8251978",
"0.81471264",
"0.80965656",
"0.80127156",
"0.7987783",
"0.79834235",
"0.7978646",
"0.79705906",
"0.7965226",
"0.79636025",
"0.79616374",
"0.79614663",
"0.79523134",
"0.7948989",
"0.79445267",
"0.7937707",
"0.7923821",
"0.792045",
"0.79198813",
"0.7918623",
"0.791... | 0.0 | -1 |
Return assembled GitHub Repository URL. | def oF8s(qsJ6: str, boHx: str) -> str:
return '{}://{}/{}/{}'.format(YVpN, S9Cn, qsJ6, boHx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def S_3S(qsJ6, boHx):\n return f'{eu3n}/{qsJ6}/{boHx}'",
"def Pssr(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'repository_url')",
"def Pssr(YKHO) -> str:\n return qe4Y.get(YKHO, 'repository_url')",
"def TN9o(YKHO):\n pass",
"def gEJM():\n return '%s%s' % (GPtr['BASE_URL'], GPtr['REPO... | [
"0.8108255",
"0.7829765",
"0.7716083",
"0.7702173",
"0.77013403",
"0.7695614",
"0.75695676",
"0.75695676",
"0.7550973",
"0.7536768",
"0.75063485",
"0.74890333",
"0.74810755",
"0.74554336",
"0.7406568",
"0.73744845",
"0.73629904",
"0.72898245",
"0.72664535",
"0.7255846",
"0.72... | 0.75420946 | 9 |
Return parsed CLI args. | def dCXb() -> j1Jz.Namespace:
wvEv = j1Jz.ArgumentParser()
wvEv.add_argument('--cache', dest='cache', type=str, default=None, help='Path to cache file.')
wvEv.add_argument('--cache-expiration', dest='cache_expiration', type=int, default=t2Jq.EXPIRATION, help='Time, in seconds, for how long to keep items in ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dCXb():\n return wvEv.parse_args()",
"def rwTO(YKHO, qIxc):\n return YKHO.parser.parse_args(qIxc)",
"def TLzU(YKHO):\n pass",
"def ZcJB():\n wvEv = j1Jz.ArgumentParser(description='Generate bindings from mojom parser output.')\n wvEv.add_argument('-f', '--file-graph', dest='file_graph', he... | [
"0.8022793",
"0.79549766",
"0.7947135",
"0.7945673",
"0.7936852",
"0.79192156",
"0.78953314",
"0.7894193",
"0.7857342",
"0.7826418",
"0.7802797",
"0.7801646",
"0.77188736",
"0.768612",
"0.764838",
"0.76401955",
"0.76211447",
"0.7610373",
"0.76040304",
"0.76004744",
"0.7598372... | 0.0 | -1 |
Normalize name based on naming convention in CSV file. | def AgaR(jj8B):
if not jj8B.startswith(('_',)):
jj8B = jj8B.replace('_', '-')
jj8B = jj8B.replace('_sigplus', '')
jj8B = jj8B.replace('_vert', '')
jj8B = jj8B.replace('_lum', '')
jj8B = jj8B.replace('_sig', '')
jj8B = jj8B.replace('_either', '')
jj8B = jj8B.replace('_', '')
jj8B ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W0vu(YKHO, mWFP: str) -> str:\n return mWFP",
"def uD9m(mWFP):\n return mWFP",
"def W0vu(Emd4, mWFP: str) -> str:\n return mWFP.lower().replace('_', '-')",
"def uD9m(mWFP):\n if mWFP:\n mWFP = uZ7Y(mWFP).strip().title()\n return mWFP",
"def NkkI(mWFP):\n return ZbWC.sub('[^a-z0... | [
"0.7927075",
"0.7908884",
"0.78804773",
"0.74727523",
"0.74166054",
"0.7185011",
"0.7180581",
"0.71387416",
"0.7098484",
"0.7082226",
"0.7056249",
"0.7040516",
"0.6983895",
"0.69739145",
"0.6971383",
"0.6950747",
"0.6924444",
"0.69132787",
"0.68985844",
"0.6877168",
"0.683310... | 0.0 | -1 |
Generate a ragged tensor with random values. | def Te18(ROpF: List[Union[int, None, tf.Tensor]], yDqo: tf.dtypes.DType, bu4_: Optional[List[Any]]=None, bP_R: Tuple[int, int]=(2, 8), KMjn: tf.dtypes.DType=ZylS.int32, xzCw: bool=True) -> gigf.Field:
WsAd = []
if not isinstance(ROpF, list):
raise ValueError(f'Requested shape must be a list of integers,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SpGD(exwG, r8hN):\n return ht2j.tensor(oyIN.random.rand(exwG, r8hN))",
"def CLjO(YKHO, Ep8u, PO4e, mWFP=None):\n return ZylS.random_normal((Ep8u, PO4e), name=mWFP)",
"def AKbe(zNig):\n RW31 = ht2j.rand(zNig)\n return RW31",
"def Gsx1(YKHO, yokr=None):\n o4D3 = ZylS.random_uniform((1,), min... | [
"0.66297764",
"0.64749026",
"0.6474348",
"0.6446365",
"0.64070374",
"0.63934153",
"0.63732785",
"0.6362746",
"0.63548994",
"0.63418216",
"0.63410574",
"0.6339918",
"0.63312644",
"0.63235146",
"0.63232464",
"0.631514",
"0.63058734",
"0.63052934",
"0.6300608",
"0.6296428",
"0.6... | 0.6747721 | 0 |
Return the values from a TF feature proto. | def rFcu(RDhP: tf.train.Feature) -> uLKX[x1iM[str], x1iM[int], x1iM[float]]:
if RDhP.HasField('float_list'):
return list(RDhP.float_list.value)
elif RDhP.HasField('int64_list'):
return list(RDhP.int64_list.value)
elif RDhP.HasField('bytes_list'):
return list(RDhP.bytes_list.value)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H6sw(xKOQ):\n xTwk = {'image_bytes': ZylS.FixedLenFeature((), ZylS.string, default_value=''), 'mask_bytes': ZylS.FixedLenFeature((), ZylS.string, default_value='')}\n MeyO = ZylS.parse_single_example(xKOQ, xTwk)\n return MeyO",
"def hfK9(lGjS):\n\n def Ua9i(bySB, H5ew):\n bySB[H5ew] = ZylS... | [
"0.6956258",
"0.6501356",
"0.64582676",
"0.6364097",
"0.62879676",
"0.62849176",
"0.62849176",
"0.62849176",
"0.6250912",
"0.6250912",
"0.6250912",
"0.6250912",
"0.6238887",
"0.62184304",
"0.621792",
"0.61944944",
"0.61926097",
"0.6188101",
"0.6188101",
"0.617623",
"0.6154715... | 0.6991161 | 0 |
Function to calculate and return RMSE. | def ocei(cBA4, Sd2_, XpdH, F5V_, wUog, zDWE, mHaN, Tuqy='hybrid'):
cBA4 = cBA4.assign(business_idTempIntEncoding=Sd2_.loc[cBA4.business_id].values)
uk3r = cBA4.pivot_table(index='user_id', columns='business_idTempIntEncoding', values='stars')
if Tuqy == 'hybrid':
bPMP = uk3r.apply(lambda rdlD: xEWL(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kmMN(YKHO, k8N0, NVe0):\n return (sum((NVe0 - YKHO.predict(k8N0)) ** 2) / len(oyIN.array(NVe0).flatten())) ** 0.5",
"def K9sQ(YKHO):\n return oyIN.sqrt(YKHO.sum_of_square_of_residuals())",
"def K9sQ(YKHO, qqqI=True):\n hkHB = 0\n gEVc = YKHO.data.observed_train if qqqI else YKHO.data.observed_t... | [
"0.81110704",
"0.780147",
"0.77877796",
"0.7748553",
"0.7732326",
"0.7632891",
"0.76310974",
"0.76278174",
"0.76219094",
"0.7618899",
"0.76107407",
"0.7606383",
"0.7599869",
"0.75990885",
"0.7591163",
"0.7570068",
"0.7556486",
"0.75557786",
"0.7520479",
"0.75183666",
"0.75173... | 0.0 | -1 |
An iterator which returns chunks of items (i.e. size items per call, instead of 1). Setting size=1 returns a normal iterator. | def yOAJ(WhY1, zNig):
WhY1 = iter(WhY1)
return iter(lambda: tuple(uOgj(WhY1, zNig)), ()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yOAJ(WhY1, zNig):\n WhY1 = iter(WhY1)\n return iter(lambda: list(uOgj(WhY1, zNig)), [])",
"def iter(YKHO, zNig=None):\n zNig = YKHO.size\n for YRbF in YKHO.__iter__():\n yield YRbF\n YKHO.size = zNig",
"def yOAJ(WhY1: Iterable, zNig: int) -> iu5r:\n WhY1 = iter(WhY1)\n return it... | [
"0.76893085",
"0.7566631",
"0.7522065",
"0.7499493",
"0.7468478",
"0.7467562",
"0.7435606",
"0.7426129",
"0.7424275",
"0.7424275",
"0.7420071",
"0.7365618",
"0.7358455",
"0.72763705",
"0.727309",
"0.7264521",
"0.72311074",
"0.71915567",
"0.7151771",
"0.7131814",
"0.7126766",
... | 0.7542872 | 2 |
Building block for base network. Consists of common Conv, BN and ReLU sequence, followed by the same sequence but with a separable Conv. Paramters | def FIMM(YKHO, PuC8, VZxY, _0fC=1, k8UY=False):
super().__init__()
YKHO.return_both = k8UY
YKHO.conv_block = U78l.Sequential(U78l.Conv2d(PuC8, VZxY, 1, stride=1, bias=False), U78l.BatchNorm2d(VZxY, momentum=0.9, eps=1e-05), U78l.ReLU())
YKHO.sep_block = U78l.Sequential(U78l.Conv2d(VZxY, VZxY, 3, stride=... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F196(YKHO, NArs):\n with ZylS.variable_scope(name_or_scope=YKHO.name, reuse=ZylS.AUTO_REUSE):\n mQG_ = NArs['discriminator_base_conv_blocks'][0]\n Qe5i = YKHO.conv_layer_blocks[0]\n if NArs['use_minibatch_stddev']:\n HHkw = mQG_[0][3] + 1\n else:\n HHkw = mQ... | [
"0.76845217",
"0.73737085",
"0.72896796",
"0.726834",
"0.7247445",
"0.717959",
"0.71099687",
"0.70976037",
"0.70894194",
"0.6950936",
"0.6918786",
"0.68853134",
"0.68362415",
"0.6828012",
"0.68224293",
"0.681252",
"0.6784665",
"0.6783158",
"0.6761081",
"0.6744372",
"0.672332"... | 0.0 | -1 |
Forward pass for refiner. Expects `x` to be an array of three tensors, one per feature. Returns the same. | def KVH6(YKHO, WKvO):
ZGkZ, z6o7, _zac = WKvO
VkIH = YKHO.conv_stride8(ZGkZ)
yBkZ = YKHO.conv_stride16(z6o7)
zm2f = YKHO.conv_stride32(_zac)
OILu = vuvg.interpolate(zm2f, scale_factor=2)[:, :, :yBkZ.shape[2], :yBkZ.shape[3]]
yBkZ = YKHO.aggr_stride16(yBkZ + OILu)
IstL = vuvg.interpolate(yBkZ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVH6(YKHO, WKvO: torch.Tensor) -> ht2j.Tensor:\n if len(WKvO.shape) == 3:\n WKvO = WKvO.unsqueeze(0)\n WKvO = YKHO.net.feature_extractor(WKvO)\n bGrB = WKvO.register_hook(YKHO.activations_hook)\n return YKHO.net.fc_head(WKvO.view(WKvO.size(0), -1))",
"def KVH6(YKHO, WKvO):\n yvT9 = YKHO... | [
"0.7594914",
"0.73291755",
"0.72506166",
"0.7207241",
"0.7205987",
"0.70941913",
"0.70712763",
"0.7058143",
"0.7058143",
"0.70566815",
"0.7013284",
"0.7011369",
"0.6944188",
"0.69430125",
"0.69362587",
"0.69295263",
"0.691973",
"0.69061273",
"0.689721",
"0.6865895",
"0.686589... | 0.0 | -1 |
Forward pass for output predictor. Expects `x` to hold one feature map per stride. | def KVH6(YKHO, WKvO):
ZGkZ, z6o7, _zac = WKvO
vf92 = YKHO.cls_stride8(ZGkZ)
kqoW = YKHO.cls_stride16(z6o7)
DTgt = YKHO.cls_stride32(_zac)
ywwl, k0lF, C7Ls, XcU5 = vf92.shape
Rw0o = vuvg.softmax(vf92.view(ywwl, 2, -1, XcU5), dim=1).view(ywwl, k0lF, C7Ls, XcU5)
ywwl, k0lF, C7Ls, XcU5 = kqoW.sh... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVH6(YKHO, WKvO):\n WKvO = YKHO.features(WKvO)\n return WKvO.view(WKvO.size(0), -1)",
"def KVH6(YKHO, WKvO):\n YKHO.x = WKvO\n return YKHO.predict(WKvO)",
"def YEmv(YKHO, WKvO):\n return YKHO.__forward_pass(WKvO)",
"def KVH6(YKHO, WKvO):\n if YKHO.upsample:\n M7YT = []\n f... | [
"0.73793447",
"0.7206489",
"0.7106487",
"0.7074729",
"0.7051048",
"0.7049255",
"0.69990325",
"0.69803184",
"0.6978063",
"0.69659865",
"0.6960064",
"0.6907585",
"0.6881987",
"0.6866114",
"0.68128014",
"0.67936665",
"0.6781569",
"0.6741767",
"0.6694162",
"0.6679317",
"0.6651592... | 0.6641755 | 22 |
Enumerate a set of anchors for each scale wrt an anchor. | def _Y91(DNwW, m_03):
yzQ0, MKlR, hpig, HXha = cb7b(DNwW)
VTcd = yzQ0 * m_03
ObL9 = MKlR * m_03
qvIa = AiAU(VTcd, ObL9, hpig, HXha)
return qvIa | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _Y91(DNwW, m_03):\n yzQ0, MKlR, cBvt, KEUX = cb7b(DNwW)\n VTcd = yzQ0 * m_03\n ObL9 = MKlR * m_03\n qvIa = AiAU(VTcd, ObL9, cBvt, KEUX)\n return qvIa",
"def _Y91(DNwW, m_03):\n yzQ0, MKlR, cBvt, KEUX = cb7b(DNwW)\n VTcd = yzQ0 * m_03\n ObL9 = MKlR * m_03\n qvIa = AiAU(VTcd, ObL9, c... | [
"0.73347354",
"0.73347354",
"0.73347354",
"0.73347354",
"0.7314597",
"0.7314597",
"0.7314597",
"0.72364897",
"0.72318107",
"0.6789154",
"0.67825603",
"0.6611962",
"0.6576924",
"0.65554905",
"0.65540844",
"0.6551622",
"0.65409565",
"0.6529002",
"0.65203613",
"0.65140885",
"0.6... | 0.72907984 | 7 |
Generate anchor reference per stride, for the given settings. | def MvOq(gCuF=None, begE=iNzq):
SMrl = sorted(gCuF.keys(), reverse=True)
qvIa = []
for _0fC in SMrl:
xu65 = gCuF[_0fC]['base_size']
Dwvl = oyIN.array(gCuF[_0fC]['ratios'])
m_03 = oyIN.array(gCuF[_0fC]['scales'])
DNwW = ht2j.as_tensor(QCoC(xu65, Dwvl, m_03, _0fC), dtype=ht2j.f... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QCoC(xu65, Dwvl, m_03, _0fC):\n UJPK = oyIN.array([0, 0, xu65 - 1, xu65 - 1])\n lpql = srdr(UJPK, Dwvl)\n qvIa = oyIN.vstack([_Y91(lpql[YRbF, :], m_03) for YRbF in range(lpql.shape[0])])\n return qvIa",
"def QCoC(YScf=16, m_03=(32, 64, 128, 256, 512), Dwvl=(0.5, 1, 2)):\n return j672(YScf, oyI... | [
"0.68835413",
"0.6752611",
"0.64050084",
"0.6353994",
"0.6326535",
"0.63187236",
"0.6311453",
"0.6311453",
"0.6306858",
"0.6303981",
"0.6303043",
"0.6295422",
"0.62899244",
"0.6284528",
"0.62794054",
"0.62787104",
"0.6264743",
"0.62638587",
"0.623668",
"0.62335277",
"0.622918... | 0.8543802 | 0 |
Returns the local path to the model's weights. Goes through the list of checkpoints and returns the local path to the weights of the modell specified by `model_class`. If the weights are not downloaded, downloads them first. | def ihsl(VBTy, idDS=True):
NCls = KftF()
vauY = hCXS(NCls, VBTy)
i3p0 = HwRy.stdout.isatty()
if not vauY:
raise ValueError('Checkpoint not found.')
if vauY['status'] == 'NOT_DOWNLOADED':
if idDS and i3p0:
try:
k8wH.confirm('Checkpoint not present locally. ... | {
"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.7087388",
"0.70025426",
"0.6782421",
"0.65955305",
"0.65484494",
"0.6428035",
"0.64253145",
"0.63915944",
"0.6356479",
"0.63004196",
"0.62946945",
"0.6188164",
"0.6174165",
"0.6172244",
"0.6172244",
"0.6159818",
"0.6133746",
"0.60891724",
"0.60881287",
"0.60746425",
"0.605... | 0.6577501 | 4 |
Checks if currently occupied seat should become empty. | def DPXA(MKnG: List[str], YRbF: int, r845: int) -> bool:
rNz_ = 0
rNz_ += (vP2v(MKnG, YRbF, r845) == '#') + (oTDq(MKnG, YRbF, r845) == '#') + (LFlW(MKnG, YRbF, r845) == '#') + (_tIi(MKnG, YRbF, r845) == '#') + (d00F(MKnG, YRbF, r845) == '#') + (NxNK(MKnG, YRbF, r845) == '#') + (pXso(MKnG, YRbF, r845) == '#') + ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jzgC(YKHO):\n return not YKHO.isEmpty()",
"def vBWh(YKHO):\n return YKHO._seats == 0",
"def MBM0(YKHO, WKvO, LVAh):\n if (WKvO, LVAh) in YKHO.emptyseatcoords:\n return True\n else:\n return False",
"def FBfn(YKHO):\n return oyIN.count_nonzero(YKHO.slots) == 0",
"def xueM(MK... | [
"0.75383574",
"0.74785405",
"0.73376435",
"0.73114157",
"0.7296318",
"0.7247614",
"0.7204356",
"0.7115123",
"0.70772177",
"0.70772177",
"0.70669127",
"0.70569646",
"0.7045766",
"0.7016528",
"0.7006307",
"0.7006307",
"0.70045525",
"0.6999719",
"0.6976442",
"0.696997",
"0.69422... | 0.0 | -1 |
Checks if currently empty seat should become occupied. | def xueM(MKnG: List[str], YRbF: int, r845: int) -> bool:
return vP2v(MKnG, YRbF, r845) != '#' and oTDq(MKnG, YRbF, r845) != '#' and (LFlW(MKnG, YRbF, r845) != '#') and (_tIi(MKnG, YRbF, r845) != '#') and (d00F(MKnG, YRbF, r845) != '#') and (NxNK(MKnG, YRbF, r845) != '#') and (pXso(MKnG, YRbF, r845) != '#') and (HR6... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jzgC(YKHO):\n return not YKHO.isEmpty()",
"def CzyL(YKHO, TMtB):\n return YKHO.board[TMtB[0]][TMtB[1]] is not None",
"def MBM0(YKHO, WKvO, LVAh):\n if (WKvO, LVAh) in YKHO.emptyseatcoords:\n return True\n else:\n return False",
"def vBWh(YKHO):\n return YKHO._seats == 0",
"... | [
"0.76028466",
"0.7527077",
"0.7359005",
"0.71754545",
"0.7093702",
"0.70724684",
"0.7066215",
"0.7064191",
"0.7044319",
"0.7044319",
"0.70252323",
"0.69984734",
"0.6981684",
"0.6924087",
"0.6909852",
"0.6883763",
"0.6854982",
"0.6849945",
"0.68468916",
"0.68468916",
"0.683593... | 0.72675496 | 3 |
Takes a seating map with empty seats (L), filled | def C6M2(MKnG: List[str]) -> x1iM[str]:
r8hN = len(MKnG)
exwG = len(MKnG[0]) if r8hN else 0
O5gd = [['.' for bGrB in range(exwG)] for bGrB in range(r8hN)]
for YRbF in range(r8hN):
for r845 in range(exwG):
if MKnG[YRbF][r845] == 'L':
O5gd[YRbF][r845] = '#' if xueM(MKnG... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, cXiA: int, iEuH: np.ndarray):\n YKHO.totalseats = cXiA\n YKHO.seating = iEuH\n YKHO.unfilledseats = cXiA\n YKHO.emptyseatcoords = set(((WKvO, LVAh) for WKvO, LVAh in zip(oyIN.where(YKHO.seating == 0)[0], oyIN.where(YKHO.seating == 0)[1])))",
"def bRFC(cMl7):\n O7kA = []\n for zFi... | [
"0.6962361",
"0.6371686",
"0.6063625",
"0.5947944",
"0.586046",
"0.5843907",
"0.5690846",
"0.5613053",
"0.5600537",
"0.55637914",
"0.55221605",
"0.5481472",
"0.54146236",
"0.5405771",
"0.5403956",
"0.5382378",
"0.5293901",
"0.52708226",
"0.5263527",
"0.5253671",
"0.51808107",... | 0.5080371 | 25 |
Returns the callable method that returns Feast type given the raw column type. | def Lq6U() -> YrBT[[str], o04K]:
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A0Kw(YKHO, Jyyj):\n return YKHO.sqlTypeCallable(Jyyj)",
"def O1Gp(YKHO) -> YrBT[[str], ImMB]:\n return YKHO.data_type_mapping['type']",
"def nrOS(YKHO, fvDH):\n for p179, x9dB in dFuX.items():\n if isinstance(fvDH.type, p179):\n return x9dB(fvDH)",
"def YwLH(YKHO) -> YrBT:\n ... | [
"0.64146966",
"0.63814014",
"0.61686915",
"0.6063236",
"0.5954087",
"0.594261",
"0.5938276",
"0.58755773",
"0.58169",
"0.58093613",
"0.5767662",
"0.5728204",
"0.5714082",
"0.56679076",
"0.56428534",
"0.5623358",
"0.5584269",
"0.548987",
"0.5458372",
"0.54573655",
"0.5448135",... | 0.5928806 | 7 |
Returns the list of column names and raw column types. | def dDPc(YKHO, GPtr: RepoConfig) -> iu5r[AzJI[str, str]]:
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NkYV(YKHO) -> bdIy[str]:\n return list(YKHO._column_types)",
"def ursQ(YKHO) -> x1iM[int]:\n return YKHO.result_set.coltypes()",
"def mRRC(YKHO) -> x1iM[type]:\n return [fvDH.type for fvDH in YKHO.columns]",
"def jTPd(YKHO, tyNF):\n DpUl = YKHO.conn.cursor()\n Pe9W = 'PRAGMA TABLE_INFO(\"%... | [
"0.77309054",
"0.7701545",
"0.7446829",
"0.74264526",
"0.73283887",
"0.729615",
"0.7245825",
"0.7033587",
"0.70229864",
"0.6978177",
"0.69728535",
"0.69662154",
"0.68668026",
"0.6858384",
"0.68536544",
"0.6786459",
"0.6785876",
"0.6785186",
"0.6776383",
"0.67557544",
"0.67321... | 0.7413692 | 4 |
Returns a string that can directly be used to reference this table in SQL. | def zC9w(YKHO) -> str:
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mWFP(YKHO):\n return '.'.join([YKHO.schema, YKHO.table_name])",
"def tyNF(YKHO) -> str:\n return YKHO._table",
"def tyNF(YKHO) -> str:\n return YKHO._table",
"def zAg0(YKHO):\n return str(YKHO._table)",
"def zAg0(YKHO):\n return str(YKHO._table)",
"def zAg0(YKHO):\n return str(YKHO.... | [
"0.7616733",
"0.75748354",
"0.75748354",
"0.74985915",
"0.74985915",
"0.74985915",
"0.7495106",
"0.73191273",
"0.73191273",
"0.72633845",
"0.7231896",
"0.7216011",
"0.7207673",
"0.717618",
"0.7148133",
"0.7148133",
"0.71158075",
"0.71158075",
"0.70924294",
"0.7085326",
"0.702... | 0.7465911 | 7 |
Creates a RequestSource object. | def FIMM(YKHO, *qIxc, mWFP: Optional[str]=None, uPxI: Optional[Union[Dict[str, ValueType], List[Field]]]=None, JBZA: Optional[str]='', dJ1p: Optional[Dict[str, str]]=None, qsJ6: Optional[str]=''):
Iinq = ['name', 'schema']
XWXe = mWFP
daHB = uPxI
if qIxc:
qmLP.warn('Request source parameters sho... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hHqQ(YKHO, QePW):\n QUSx = YKHO.api_getItem(QePW)\n Emd4 = JZXy.allSources[int(QePW.args['idx'][0])]\n zZcM = Emd4(store=YKHO.store)\n zZcM.installOn(QUSx)\n return zZcM",
"def d9vn(YKHO, MgI3, *qIxc, **B2fa):\n return wcXs(MgI3, *qIxc, **B2fa)",
"def E2Sy(YKHO, QePW, *qIxc, **B2fa):\n ... | [
"0.6562358",
"0.6538697",
"0.64771765",
"0.6471295",
"0.63093865",
"0.6303074",
"0.6201309",
"0.6132894",
"0.61316216",
"0.60803735",
"0.6068509",
"0.6014056",
"0.5977833",
"0.59094846",
"0.5907951",
"0.5711894",
"0.5672371",
"0.56552625",
"0.5650388",
"0.5647674",
"0.5643852... | 0.6228321 | 6 |
This test checks if the SSR can be used by a client to fetch the content of a resource | def H6nj(qIxc, DUSS, Z7D_, Nm4E=False):
i8WE = str(qcWV.now())
LnKY = [eUk1]
phGJ = bNaV('FQDN|%s' % qcWV.now())
PCdL = dr9c(Z7D_)
bD7m = 'http://%s/detect/?req_id=%s' % (DUSS, phGJ)
if Nm4E:
LnKY.append(KePk)
umWR = QIYp({'target': bD7m, 'req_id': phGJ})
bD7m = 'http://%... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ykgQ(PKrO, x0hE):\n geh0 = x0hE.get(PKrO)\n assert geh0.status_code == 200",
"def kX8g():\n cuiw = G4JS.session()\n JG77 = False\n try:\n bD7m = 'http://localhost:3000/status'\n cuiw.get(bD7m)\n except G4JS.exceptions.ConnectionError:\n JG77 = True\n assert JG77\n ... | [
"0.7070535",
"0.6990887",
"0.67746884",
"0.6708066",
"0.6651828",
"0.6648258",
"0.6576715",
"0.65598637",
"0.6480728",
"0.64552855",
"0.6446286",
"0.6431947",
"0.63875496",
"0.6370699",
"0.6363049",
"0.636047",
"0.6348655",
"0.6332945",
"0.6310443",
"0.62930673",
"0.62919027"... | 0.0 | -1 |
This test checks if the SSR can be used by a client to fetch the content of a resource | def aBvV(qIxc, DUSS, Z7D_, Nm4E=False):
i8WE = str(qcWV.now())
LnKY = [HY9C]
phGJ = bNaV('FQDN|%s' % qcWV.now())
PCdL = dr9c(Z7D_)
bD7m = 'http://%s/bomb/gzipbomb?s=%s&req_id=%s' % (DUSS, qIxc.fetchcompr_test, phGJ)
if Nm4E:
LnKY.append(KePk)
umWR = QIYp({'target': bD7m, 'req_id'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ykgQ(PKrO, x0hE):\n geh0 = x0hE.get(PKrO)\n assert geh0.status_code == 200",
"def kX8g():\n cuiw = G4JS.session()\n JG77 = False\n try:\n bD7m = 'http://localhost:3000/status'\n cuiw.get(bD7m)\n except G4JS.exceptions.ConnectionError:\n JG77 = True\n assert JG77\n ... | [
"0.70725363",
"0.69898367",
"0.6774721",
"0.67084473",
"0.6652386",
"0.6648625",
"0.65777874",
"0.6562011",
"0.64811903",
"0.64571774",
"0.6447258",
"0.64326876",
"0.63867533",
"0.63709855",
"0.6364131",
"0.63624257",
"0.63489014",
"0.6335052",
"0.6312345",
"0.6293833",
"0.62... | 0.0 | -1 |
Get the raw data for this collection | def wIX3(YKHO, Rr59: str) -> iu5r[dict]:
VqRE = rNI2 / f'{Rr59}.json'
with open(VqRE, 'r') as hGN5:
return qQXR.load(hGN5) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ctz2(YKHO):\n return YKHO._data",
"def Ctz2(YKHO):\n return YKHO.raw_data",
"def WPdU(YKHO):\n return YKHO.__raw_data",
"def WPdU(YKHO):\n return YKHO._raw_data",
"def SwtT(YKHO):\n raise NotImplementedError",
"def SwtT(YKHO):\n raise NotImplementedError",
"def m6Me(YKHO):\n re... | [
"0.80541587",
"0.80049336",
"0.79301983",
"0.79264486",
"0.7860435",
"0.7860435",
"0.7830952",
"0.7811977",
"0.7791507",
"0.77457666",
"0.7734193",
"0.7684749",
"0.7636802",
"0.7620795",
"0.75877434",
"0.75877434",
"0.7586021",
"0.7566888",
"0.75628906",
"0.7540066",
"0.75249... | 0.0 | -1 |
Kinetic energy is a function of the momentum only. It is assumed that the planet has unit mass. | def nMvt(XP5J):
return 0.5 * oyIN.sum(oyIN.square(XP5J)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def np1B(YKHO):\n return 0.5 * YKHO.mass * oyIN.linalg.norm(YKHO.velocity) ** 2",
"def np1B(YKHO):\n lD1n = YKHO.velocity[0] ** 2 + YKHO.velocity[1] ** 2 + YKHO.velocity[2] ** 2\n return 0.5 * YKHO.mass * lD1n",
"def K1wq(y917, bMbF):\n G1Hx = 0.0\n for YRbF in y917:\n G1Hx += sum(0.5 * b... | [
"0.8144801",
"0.7958647",
"0.7627271",
"0.7426544",
"0.73291266",
"0.7309959",
"0.7293484",
"0.7198974",
"0.69830173",
"0.6860918",
"0.68204474",
"0.67831933",
"0.67739075",
"0.67645794",
"0.67567366",
"0.6744754",
"0.67369086",
"0.67340314",
"0.6684948",
"0.6665091",
"0.6634... | 0.0 | -1 |
Potential energy is a function of the position only. | def cAlv(vexM):
ywwl = vexM.shape[0]
Mkmy = oyIN.linalg.norm(vexM)
if ywwl == 1:
return oyIN.abs(Mkmy)
elif ywwl == 2:
return oyIN.log(Mkmy)
else:
return -Mkmy ** (2 - ywwl) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eZmY(YKHO, dQgj):\n pass",
"def VYvU(YKHO, dQgj, H0zq):\n Iy_q = -YKHO.log_likelihood_fn(dQgj)\n twLp = ZylS.reduce_sum(ZylS.square(H0zq) / 2, axis=0)\n wjRY = Iy_q + twLp\n return wjRY",
"def VYvU(YKHO):\n pass",
"def VYvU(YKHO):\n pass",
"def VYvU(YKHO):\n return (YKHO.m * oyI... | [
"0.7638278",
"0.7413077",
"0.7315042",
"0.7315042",
"0.70984524",
"0.70936173",
"0.7046935",
"0.7019214",
"0.7011308",
"0.69696134",
"0.6918166",
"0.6913624",
"0.6887539",
"0.68834627",
"0.6852678",
"0.6835908",
"0.68314993",
"0.6822404",
"0.68155915",
"0.6777543",
"0.6775965... | 0.0 | -1 |
Flip images, bounding boxes and polygons. | def heGH(YKHO, dixj: dict) -> None:
super()._flip(dixj)
if dixj.get('gt_polygons', None) is not None:
dixj['gt_polygons'] = YKHO.flip_polygons(dixj['gt_polygons'], dixj['img'].shape[:2], dixj['flip_direction']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HD0o(c8oy, yOrK, XSoh='horizontal'):\n assert c8oy.shape[-1] % 4 == 0\n assert XSoh in ['horizontal', 'vertical', 'diagonal']\n NKly = c8oy.clone()\n if XSoh == 'horizontal':\n NKly[..., 0::4] = yOrK[1] - c8oy[..., 2::4]\n NKly[..., 2::4] = yOrK[1] - c8oy[..., 0::4]\n elif XSoh == ... | [
"0.6959806",
"0.68343574",
"0.68174833",
"0.66375476",
"0.6545506",
"0.65133506",
"0.6466152",
"0.6459023",
"0.64468926",
"0.64318615",
"0.64239824",
"0.64232904",
"0.63332343",
"0.63024336",
"0.6293509",
"0.62931",
"0.62586313",
"0.62516063",
"0.62049526",
"0.61774623",
"0.6... | 0.7743315 | 0 |
Get the random prob to decide whether apply the transform. | def Kwea(YKHO) -> float:
return tuKI.random() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HY5N(YKHO, JxU2: tf.Tensor) -> bool:\n return ZylS.cast(ZylS.floor(YKHO.rng.uniform((), minval=0, maxval=1, dtype=ZylS.float32) + JxU2), ZylS.bool)",
"def uaJF(YKHO) -> float:\n return oyIN.random.random_sample()",
"def Cub0(JxU2):\n return ZylS.cast(ZylS.floor(ZylS.random.uniform([], dtype=ZylS.f... | [
"0.7484764",
"0.74298435",
"0.6999582",
"0.6910955",
"0.6910955",
"0.6910955",
"0.6910955",
"0.6910955",
"0.68899685",
"0.68459994",
"0.68459994",
"0.6761697",
"0.6741829",
"0.6702532",
"0.6668769",
"0.65651774",
"0.6487866",
"0.64611924",
"0.6450222",
"0.6440622",
"0.6425723... | 0.7712222 | 0 |
Allow users to contact staff | def Mxk0(QePW):
if QePW.method == 'POST':
L03z = JmDL()
if L03z.is_valid():
XRNE = L03z.save(commit=False)
XRNE.save()
yEHD.add_message(QePW, yEHD.INFO, 'Your message has been sent. Thank you.')
return vKnz('/')
else:
L03z = JmDL()
retu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def staff(YKHO, OaeV):\n try:\n try:\n CBIr = OaeV.message.mentions[0]\n except IndexError:\n await YKHO.bot.say('Please mention a user.')\n return\n if YKHO.has_role(CBIr, YKHO.bot.staff_role):\n await YKHO.bot.remove_roles(CBIr, YKHO.bot.s... | [
"0.72128135",
"0.69905096",
"0.6959348",
"0.6733788",
"0.6711042",
"0.6612165",
"0.6612165",
"0.6608381",
"0.6591407",
"0.65682846",
"0.6567064",
"0.65492797",
"0.65464306",
"0.65192527",
"0.64655876",
"0.64655876",
"0.6462215",
"0.64466655",
"0.6387696",
"0.6377141",
"0.6371... | 0.0 | -1 |
Return a JSON object containing all the Handlebars templates in the appropriate templates directory, indexed by name. | def OZ5C(QePW):
return igJ6(qQXR.dumps(zEXo(gCuF.XGDS_PLANNER_HANDLEBARS_DIRS), 'XGDS_PLANNER_HANDLEBARS_DIRS'), content_type='application/json') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dIMk():\n with FfT0.connection() as UzPC:\n return pz3A([WKvO._asdict() for WKvO in Tch8.all(UzPC)])",
"def w4H5():\n qaEx = Hy7s.path.join(jvSB.request.folder, 'modules', 'templates', 'templates.json')\n with open(qaEx, 'r') as nUeQ:\n DqlU = qQXR.loads(nUeQ.read())\n return DqlU",... | [
"0.72080773",
"0.7150664",
"0.71419275",
"0.70913815",
"0.70304847",
"0.6688369",
"0.66040874",
"0.65595335",
"0.64883906",
"0.64109534",
"0.6373943",
"0.6365342",
"0.6333006",
"0.62924325",
"0.6292129",
"0.6278518",
"0.62670135",
"0.6248123",
"0.6238911",
"0.62306124",
"0.62... | 0.7145341 | 2 |
Return the site frame with centroid closest to the given location | def nZIn(QnmL, FDPT):
if alNK():
if len(alNK()) == 1:
return alNK()[0]
qBJe = g5hO(QnmL, FDPT)
x9pd = (qBJe[0], qBJe[1])
KeIZ = None
pYWD = None
for qpDA in alNK():
C9U5 = qpDA.alternateCrs['properties']
gP4g = C9U5[QMSQ('originEast... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QQNa(YKHO):\n return BfDw.point_nearest_point(YKHO._shapely_points(), YKHO.centroid)",
"def GYE6(YKHO):\n YKHO.distances = YKHO.get_distance()\n return oyIN.argmin(YKHO.distances, axis=1)",
"def s4ms(Rci7, yHxN):\n vELP = 1000000\n I561 = 0\n r845 = 0\n for YRbF in yHxN:\n pImw ... | [
"0.6670942",
"0.65511614",
"0.6510564",
"0.6268648",
"0.6138802",
"0.6107495",
"0.60929245",
"0.6029434",
"0.60003155",
"0.5966142",
"0.59500825",
"0.5949317",
"0.5946716",
"0.59409946",
"0.592764",
"0.59226024",
"0.5890187",
"0.58884364",
"0.5861605",
"0.5851334",
"0.5849048... | 0.6907201 | 0 |
Extract the contours of the image by first converting it to grayscale and then call findContours | def Iowl(LNo8):
MOUG = XC5k.cvtColor(LNo8, XC5k.COLOR_BGR2GRAY)
Yjcv, Iowl, gEYm = XC5k.findContours(MOUG, XC5k.RETR_TREE, XC5k.CHAIN_APPROX_SIMPLE)
return (Iowl, gEYm) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QG_z(YKHO):\n YKHO.preprocess_image()\n aSof = XC5k.threshold(YKHO.preprocessed_image, 0, 255, XC5k.THRESH_BINARY)[1]\n gHid = XC5k.findContours(aSof, XC5k.RETR_EXTERNAL, XC5k.CHAIN_APPROX_SIMPLE)\n MkRe = h0qj.grab_contours(gHid)\n return (gHid, MkRe)",
"def OE17(LNo8):\n ITiw = jbYn.cvtCo... | [
"0.81120455",
"0.8054532",
"0.79597867",
"0.7837078",
"0.7745034",
"0.755465",
"0.7532146",
"0.75112545",
"0.7509053",
"0.749342",
"0.74393994",
"0.73714316",
"0.7365011",
"0.7329976",
"0.7317086",
"0.73118544",
"0.7290807",
"0.72428143",
"0.72062904",
"0.72024417",
"0.720244... | 0.78914887 | 3 |
Tests whether ``GuildJoinRequestDeleteEvent.__repr__`` works as intended. | def SuXG():
LRlk = 202305160019
uJjO = 202305160020
tvqc = suYU(guild_id=LRlk, user_id=uJjO)
Qg87.assert_instance(repr(tvqc), str) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Rwue():\n LRlk = 202305160025\n uJjO = 202305160026\n tvqc = suYU(guild_id=LRlk, user_id=uJjO)\n Qg87.assert_eq(len([*tvqc]), len(tvqc))",
"def DDcA():\n LRlk = 202305160023\n uJjO = 202305160024\n nURT = {'guild_id': LRlk, 'user_id': uJjO}\n tvqc = suYU(**nURT)\n Qg87.assert_eq(tv... | [
"0.6266643",
"0.60024846",
"0.58903134",
"0.5881762",
"0.58586055",
"0.58215535",
"0.5450562",
"0.5193932",
"0.5172812",
"0.5116395",
"0.5069441",
"0.5054773",
"0.5047181",
"0.50300515",
"0.4960582",
"0.49475566",
"0.4918765",
"0.4916953",
"0.4911627",
"0.49005377",
"0.489902... | 0.831018 | 0 |
Tests whether ``GuildJoinRequestDeleteEvent.__repr__`` works as intended. | def DDcA():
LRlk = 202305160023
uJjO = 202305160024
nURT = {'guild_id': LRlk, 'user_id': uJjO}
tvqc = suYU(**nURT)
Qg87.assert_eq(tvqc, tvqc)
Qg87.assert_ne(tvqc, object())
for jkf2, kcM4 in (('guild_id', 0), ('user_id', 0)):
l1Q9 = suYU(**{**nURT, jkf2: kcM4})
Qg87.assert_ne... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SuXG():\n LRlk = 202305160019\n uJjO = 202305160020\n tvqc = suYU(guild_id=LRlk, user_id=uJjO)\n Qg87.assert_instance(repr(tvqc), str)",
"def Rwue():\n LRlk = 202305160025\n uJjO = 202305160026\n tvqc = suYU(guild_id=LRlk, user_id=uJjO)\n Qg87.assert_eq(len([*tvqc]), len(tvqc))",
"d... | [
"0.831018",
"0.6266643",
"0.58903134",
"0.5881762",
"0.58586055",
"0.58215535",
"0.5450562",
"0.5193932",
"0.5172812",
"0.5116395",
"0.5069441",
"0.5054773",
"0.5047181",
"0.50300515",
"0.4960582",
"0.49475566",
"0.4918765",
"0.4916953",
"0.4911627",
"0.49005377",
"0.48990214... | 0.60024846 | 2 |
Tests whether ``GuildJoinRequestDeleteEvent`` unpacking works as intended. | def Rwue():
LRlk = 202305160025
uJjO = 202305160026
tvqc = suYU(guild_id=LRlk, user_id=uJjO)
Qg87.assert_eq(len([*tvqc]), len(tvqc)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ut4H():\n LRlk = 202305160015\n uJjO = 202305160016\n nPrm = {'guild_id': str(LRlk), 'user_id': str(uJjO)}\n tvqc = suYU.from_data(nPrm)\n iaTU(tvqc)\n Qg87.assert_eq(tvqc.guild_id, LRlk)\n Qg87.assert_eq(tvqc.user_id, uJjO)",
"def DDcA():\n LRlk = 202305160023\n uJjO = 20230516002... | [
"0.7800874",
"0.7607757",
"0.7187199",
"0.71557367",
"0.6950481",
"0.61102146",
"0.565985",
"0.5494586",
"0.54935104",
"0.54253125",
"0.53818333",
"0.53776985",
"0.53292215",
"0.53253675",
"0.53230435",
"0.5285082",
"0.5283129",
"0.5270587",
"0.5215491",
"0.5212519",
"0.51899... | 0.83616316 | 0 |
Get filename without extension. | def loi_(FYKK: str):
return Hy7s.path.splitext(FYKK)[0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AjhE(YKHO):\n return Hy7s.path.basename(YKHO.file.name).split('.')[0]",
"def t5OZ(qaEx):\n return gLx5(aPr_(qaEx))[0]",
"def icfS(pmON):\n return Hy7s.path.splitext(Hy7s.path.basename(pmON))[0]",
"def AjhE(qaEx):\n return Hy7s.path.basename(qaEx).split('.')[0]",
"def LnvH(nUeQ):\n return... | [
"0.9029477",
"0.88759154",
"0.87792313",
"0.8703273",
"0.8465727",
"0.83538127",
"0.83419716",
"0.83170736",
"0.83098334",
"0.82751185",
"0.8215295",
"0.8140234",
"0.813541",
"0.80598855",
"0.7991174",
"0.79064643",
"0.7896389",
"0.78554153",
"0.78408295",
"0.7837628",
"0.780... | 0.77977824 | 21 |
Map all streams from multiple files Like map_all_streams(), this will only map streams that are not already mapped. | def tgff(YKHO, RRlC: Iterable, Yp3m: bool=False) -> bdIy:
PCev = []
for nUeQ in RRlC:
for wOb_ in YKHO.task.add_input(nUeQ).streams:
if wOb_ in YKHO._mapped_sources:
if Yp3m:
PCev.append(YKHO.get_mapped_stream(wOb_))
else:
PCev.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hl6Y(YKHO, nUeQ: 'str | InputFile', Yp3m: bool=False) -> bdIy:\n PCev = []\n for wOb_ in YKHO.task.add_input(nUeQ).streams:\n if wOb_ in YKHO._mapped_sources:\n if Yp3m:\n PCev.append(YKHO.get_mapped_stream(wOb_))\n else:\n PCev.append(YKHO.map_stream_(w... | [
"0.72437096",
"0.63857895",
"0.5984222",
"0.5945362",
"0.58793586",
"0.58790195",
"0.587254",
"0.574787",
"0.5726976",
"0.57168716",
"0.5609699",
"0.5604122",
"0.5604122",
"0.55887026",
"0.5583291",
"0.55751187",
"0.5559876",
"0.5524158",
"0.54720795",
"0.5455515",
"0.5444727... | 0.70519114 | 1 |
Get a stdlib logger to output to | def fZx2(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XIAT():\n return G9jH.Logger(__name__)",
"def fZx2():\n return bo34",
"def bo34():\n return G9jH.getLogger(__name__)",
"def bo34():\n return G9jH.getLogger(__name__)",
"def bo34():\n return G9jH.getLogger(__name__)",
"def fZx2():\n return vzeF",
"def fZx2():\n G9jH.basicConfig(... | [
"0.7852529",
"0.78046024",
"0.76510304",
"0.76510304",
"0.76510304",
"0.7586636",
"0.7579509",
"0.75794405",
"0.7567055",
"0.7512051",
"0.7501431",
"0.74853957",
"0.74756193",
"0.74682146",
"0.7454093",
"0.7450771",
"0.7393367",
"0.73799664",
"0.73612016",
"0.7329916",
"0.731... | 0.7207684 | 29 |
Update and return an existing `Snippet` instance, given the validated data. | def QdZT(YKHO, KAOR, vGfb):
KAOR.title = vGfb.get('title', KAOR.title)
KAOR.code = vGfb.get('code', KAOR.code)
KAOR.linenos = vGfb.get('linenos', KAOR.linenos)
KAOR.language = vGfb.get('language', KAOR.language)
KAOR.style = vGfb.get('style', KAOR.style)
KAOR.save()
return KAOR | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QdZT(YKHO, KAOR, vGfb):\n KAOR.title = vGfb.get('title', KAOR.title)\n KAOR.comments = vGfb.get('comments', KAOR.comments)\n KAOR.description = vGfb.get('description', KAOR.description)\n KAOR.save()\n return KAOR",
"def QdZT(YKHO, KAOR, vGfb):\n KAOR.title = vGfb.get('title', KAOR.title)\n... | [
"0.67801327",
"0.6655712",
"0.6640556",
"0.652205",
"0.652205",
"0.6509049",
"0.64857805",
"0.6471242",
"0.642812",
"0.629971",
"0.6291086",
"0.6275658",
"0.6201591",
"0.61365765",
"0.6096549",
"0.60716563",
"0.6052537",
"0.6051132",
"0.60097694",
"0.596129",
"0.5956468",
"... | 0.6660324 | 1 |
initialize informations related dashboard Use this method you want to create a new dashboard | def gWaw(_M9w: str):
global dbody
global totalmetrics
kUBT = ZbWC.match('(.+)(\\d+)$', _M9w)
if kUBT:
_M9w = '{0}{1}'.format(kUBT.group(1), str(int(kUBT.group(2)) + 1))
else:
_M9w = '{0}-2'.format(_M9w)
QnX4 = {'widgets': []}
AAjQ = 0
return _M9w | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HgM9(YKHO):\n XmRU = oZf7.objects.get_or_create(name=YKHO.visualisationName, category=YKHO.category, description=YKHO.description, type='line', dataSource=YKHO.dataSource, sizeX=2, sizeY=2, xLabel='Date', yLabel=YKHO.visualisationName)[0]\n dJKn.objects.filter(visualisation=XmRU).delete()\n oPUu = YKH... | [
"0.7179087",
"0.6774657",
"0.6684411",
"0.6667681",
"0.6658168",
"0.6608836",
"0.6569282",
"0.65018255",
"0.64677197",
"0.6307006",
"0.6262737",
"0.6234641",
"0.61311674",
"0.6110711",
"0.60843813",
"0.6007287",
"0.59835654",
"0.59666085",
"0.5953892",
"0.5944496",
"0.5924607... | 0.0 | -1 |
Forms a vector into the crossproduct (AKA hat) matrix. | def Umnm(WKvO):
o4D3, ajwV, rNcn = WKvO
return oyIN.array([[0, -rNcn, ajwV], [rNcn, 0, -o4D3], [-ajwV, o4D3, 0]]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nSHN(Ty9i):\n return oyIN.array([[0, -Ty9i[2], Ty9i[1]], [Ty9i[2], 0, -Ty9i[0]], [-Ty9i[1], Ty9i[0], 0]])",
"def WHx2(YKHO, iArr):\n return YKHO.__class__(*XTiz.cross(YKHO._coords.A1[:3], iArr._coords.A1[:3]))",
"def EiRu(Ty9i):\n o4sw = aLMY.zero(3, 3)\n o4sw[1, 0] = Ty9i.z\n o4sw[2, 0] = -... | [
"0.75432134",
"0.7049023",
"0.70292133",
"0.6933105",
"0.68843025",
"0.68038625",
"0.67502564",
"0.66177577",
"0.66019654",
"0.6568654",
"0.6533341",
"0.6529612",
"0.64967865",
"0.6485753",
"0.63975674",
"0.63836014",
"0.6370711",
"0.636079",
"0.6357123",
"0.6351456",
"0.6333... | 0.59071887 | 58 |
Does cross product of two 3x1 np arrays. Normal numpy cross product only takes vectors. | def dcUW(WKvO, LVAh):
assert WKvO.shape[0] == 3
assert LVAh.shape[0] == 3
return oyIN.expand_dims(oyIN.cross(WKvO[:, 0], LVAh[:, 0]), axis=-1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WHx2(jzdc, Fg_i):\n Ylbp = oyIN.empty(3)\n Ylbp[0] = jzdc[1] * Fg_i[2] - Fg_i[1] * jzdc[2]\n Ylbp[1] = jzdc[2] * Fg_i[0] - Fg_i[2] * jzdc[0]\n Ylbp[2] = jzdc[0] * Fg_i[1] - Fg_i[0] * jzdc[1]\n return Ylbp",
"def WHx2(jzdc, Fg_i):\n return qw7D([jzdc[1] * Fg_i[2] - jzdc[2] * Fg_i[1], jzdc[2]... | [
"0.8096923",
"0.79041845",
"0.78336734",
"0.7774824",
"0.77549154",
"0.77541393",
"0.768268",
"0.76648444",
"0.76510036",
"0.76271015",
"0.7626613",
"0.76073873",
"0.75852394",
"0.754672",
"0.75423396",
"0.7511969",
"0.7501024",
"0.74940073",
"0.7458032",
"0.7444593",
"0.7425... | 0.79631644 | 1 |
If no blog entries exist (ie, only during testing), we should return 404. | def mEMU(YKHO):
geh0 = YKHO.client.get(gxEw('archive'))
YKHO.assertEqual(geh0.status_code, 404) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def h1VE(YKHO):\n geh0 = YKHO.client.get('/blog/1000')\n YKHO.assertEqual(geh0.status_code, 404)",
"def rTOQ(YKHO):\n geh0 = YKHO.client.get(gxEw('blog:detail', kwargs={'slug': 'random-post'}))\n YKHO.assertEqual(geh0.status_code, 404)",
"def WwU7(YKHO):\n geh0 = YKHO.client.get('/blog/nopage/')... | [
"0.80276006",
"0.7493035",
"0.7473821",
"0.71052086",
"0.6913654",
"0.6910896",
"0.6854013",
"0.68268603",
"0.6797749",
"0.6750156",
"0.67440885",
"0.6669526",
"0.664211",
"0.66407204",
"0.65238726",
"0.6489329",
"0.6482023",
"0.64675283",
"0.64614236",
"0.645343",
"0.645086"... | 0.68519104 | 7 |
If no blog entries exist, we should throw a 404. | def DNPy(YKHO):
wzkt = rIAI.now()
geh0 = YKHO.client.get(gxEw('article_day_archive', kwargs={'year': str(wzkt.year), 'month': str(wzkt.month), 'day': str(wzkt.day)}))
YKHO.assertEqual(geh0.status_code, 404) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def h1VE(YKHO):\n geh0 = YKHO.client.get('/blog/1000')\n YKHO.assertEqual(geh0.status_code, 404)",
"def rTOQ(YKHO):\n geh0 = YKHO.client.get(gxEw('blog:detail', kwargs={'slug': 'random-post'}))\n YKHO.assertEqual(geh0.status_code, 404)",
"def WwU7(YKHO):\n geh0 = YKHO.client.get('/blog/nopage/')... | [
"0.758572",
"0.71387625",
"0.6988136",
"0.68904316",
"0.6745405",
"0.6712254",
"0.66365945",
"0.659834",
"0.65937716",
"0.65304834",
"0.6457546",
"0.6412431",
"0.63960594",
"0.6351122",
"0.633175",
"0.6321772",
"0.6319131",
"0.6303125",
"0.62874055",
"0.6277623",
"0.6266832",... | 0.6590841 | 9 |
Retorna se eh possivel movimentar o peao. 0 se for possivel, 1 se impossivel, 2 se finalizado 1 se nao existir esse id. | def MUBs(Z9rn, EN18, l741):
XP5J = D0hD.selecionar_tabuleiro(Z9rn, peao=EN18)
if XP5J == -1:
return -1
oeNL = XP5J['pos']
iGHV = XP5J['eh_inicio']
wUMe = XP5J['eh_finalizado']
if wUMe or (oeNL >= 1000 and oeNL % 1000 == 5):
return 2
if iGHV:
return 0 if l741 == 6 else... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HIg2(YKHO, f3i3) -> int:\n for YRbF in range(YKHO.ultima_posicao + 1):\n if f3i3 == YKHO.valores[YRbF]:\n return YRbF\n return -1",
"def Uz37(Z9rn, EN18):\n XP5J = D0hD.selecionar_tabuleiro(Z9rn, peao=EN18)\n if XP5J == -1:\n return -1\n XP5J['pos'] = XP5J['pos_inicial... | [
"0.6222464",
"0.5589291",
"0.55726224",
"0.5552645",
"0.54952186",
"0.5438017",
"0.5397989",
"0.53858876",
"0.53631514",
"0.53182447",
"0.5277104",
"0.5198197",
"0.5182059",
"0.5145433",
"0.51381373",
"0.5127934",
"0.5103166",
"0.5099187",
"0.5087284",
"0.50622827",
"0.505117... | 0.75755006 | 0 |
Return the coords of given point in the coordinate system of given origin and with given angles (in degrees) with the standard system. | def FUze(AU8u: Coords, NOEm: Coords, p46v: Coords) -> kmiI:
AU8u = viQO(AU8u, NOEm)
AU8u = JlVk(AU8u, p46v)
return AU8u | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HKaI(hLRM, AU8u, YylR):\n YRSS, rUT8 = hLRM\n Xlvp, nfKA = AU8u\n jCyH = YRSS + epAf.cos(YylR) * (Xlvp - YRSS) - epAf.sin(YylR) * (nfKA - rUT8)\n PMVZ = rUT8 + epAf.sin(YylR) * (Xlvp - YRSS) + epAf.cos(YylR) * (nfKA - rUT8)\n return (jCyH, PMVZ)",
"def gfry(MppY, r1VO, ZAdw):\n nJ9F, nxyw =... | [
"0.6798119",
"0.65349215",
"0.64387697",
"0.64092267",
"0.6385916",
"0.6377067",
"0.63656276",
"0.6362236",
"0.62430257",
"0.6227735",
"0.6220362",
"0.621305",
"0.6208541",
"0.62052006",
"0.6204004",
"0.62029946",
"0.62029946",
"0.62029946",
"0.62017864",
"0.6201178",
"0.6173... | 0.61921394 | 20 |
Returns coordinates of given point after given rotation (in degrees) for each axis | def JlVk(AU8u: Coords, DWJ0: Coords) -> kmiI:
WhCK, YaAb, jHuL = map(epAf.radians, DWJ0)
Xlvp, nfKA, k19e = AU8u
YhSR, YUNn = (epAf.cos, epAf.sin)
if WhCK:
nfKA, k19e = (nfKA * YhSR(WhCK) - k19e * YUNn(WhCK), nfKA * YUNn(WhCK) + k19e * YhSR(WhCK))
if YaAb:
Xlvp, k19e = (Xlvp * YhSR(Y... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YxWc(WKvO, LVAh, q7In):\n \"\"\"\n Rotation of a point by an angle theta(rads)\n \"\"\"\n hHOo = WKvO * epAf.cos(q7In) - LVAh * epAf.sin(q7In)\n zK8A = WKvO * epAf.sin(q7In) + LVAh * epAf.cos(q7In)\n return [hHOo, zK8A]",
"def Uj2t(WKvO, LVAh, tjON, hLRM):\n YRSS, rUT8 = hLRM\n Y_1E =... | [
"0.69795823",
"0.69370645",
"0.6830573",
"0.6812586",
"0.67788774",
"0.6773126",
"0.6734429",
"0.6727589",
"0.6683106",
"0.6682577",
"0.6632794",
"0.6626947",
"0.65982985",
"0.6534606",
"0.65321195",
"0.6519361",
"0.65180236",
"0.651529",
"0.6509591",
"0.65017027",
"0.6488835... | 0.73028016 | 0 |
Replace redacted values with "[REDACTED]" string A group could have the name NaN, so apply to specific columns | def MKPg(Bv1b):
mxHD = '[REDACTED]'
QL4B = {XTiz.nan: mxHD}
Bv1b = Bv1b.replace({'numerator': QL4B, 'denominator': QL4B, 'value': QL4B})
return Bv1b | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xc3F(YKHO, jQ3Z: pd.DataFrame, AAHb: str):\n bY6q = set(jQ3Z[AAHb].unique()) - set(YKHO.category_unique[AAHb])\n if bY6q:\n for mAB6 in bY6q:\n jQ3Z[AAHb] = jQ3Z[AAHb].replace(mAB6, 'other ' + str(AAHb))\n return jQ3Z",
"def I9jj(YKHO):\n k0lF = oyIN.array([1.2, 3.1, None])\n ... | [
"0.5875811",
"0.56476235",
"0.5586414",
"0.54730386",
"0.5398099",
"0.5299611",
"0.5276405",
"0.52562654",
"0.5232807",
"0.5227943",
"0.52190256",
"0.51919895",
"0.5180509",
"0.5131953",
"0.50906295",
"0.50586706",
"0.50543916",
"0.50381804",
"0.50037533",
"0.49796346",
"0.49... | 0.6286498 | 0 |
Create list of iterator items before predicate is false, consuming them from the iterator. | def GHau(lgNN: typing.Callable, oHE7: typing.Iterator) -> laHg.Tuple[laHg.List, laHg.Iterator]:
if not isinstance(oHE7, g760.abc.Iterator):
raise TypeError
oUw_, ZWbb = WhY1.tee(oHE7)
Ylbp = [*WhY1.takewhile(lgNN, oUw_)]
E_nZ(ZWbb, len(Ylbp))
return (Ylbp, ZWbb) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Lpr_(OxJJ, lgNN):\n for ZfUD in OxJJ:\n if not lgNN(ZfUD):\n yield ZfUD\n else:\n return",
"def W2YQ(OxJJ, nvEb):\n XuXy = []\n for YRbF in OxJJ:\n if nvEb(YRbF):\n yield XuXy\n XuXy = []\n else:\n XuXy.append(YRbF)\n... | [
"0.69492686",
"0.666565",
"0.65284306",
"0.65284306",
"0.65185636",
"0.6292002",
"0.6208192",
"0.61919206",
"0.61665046",
"0.6166092",
"0.6165368",
"0.6162133",
"0.61610794",
"0.6153828",
"0.61471957",
"0.61454743",
"0.6127172",
"0.6119557",
"0.6085869",
"0.60743505",
"0.6027... | 0.6523888 | 4 |
Return a list of the ancestor types of this, excluding self. See parent_types. | def MNIF(YKHO):
MNIF = set()
YKHO._add_ancestor_types(MNIF)
return list(MNIF) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MPxY(YKHO, a1PO):\n urSp = set()\n for wizG, yLsG in YKHO.type_hierarchy.items():\n if a1PO in yLsG:\n urSp.add(wizG)\n urSp.update(YKHO._get_parent_types(wizG))\n return urSp",
"def JZlq(YKHO):\n YAiU = [YKHO]\n if YKHO.parent is not None:\n YAiU.extend(YKH... | [
"0.7629954",
"0.7623182",
"0.76167846",
"0.7284473",
"0.71986324",
"0.71321225",
"0.71105236",
"0.70792466",
"0.70088214",
"0.69839936",
"0.6974558",
"0.691453",
"0.68726707",
"0.679894",
"0.67604643",
"0.67592365",
"0.6719249",
"0.6719249",
"0.6719249",
"0.6719249",
"0.67192... | 0.8473646 | 0 |
Return the GraphQlFieldDescriptor for the specified field. Return the GraphQlFieldDescriptor for the field with the specified name on this object. Raise a ValueError if this has no such field, this is a scalar, enum, input object, or union type, or the field is present, but is a generic field common to all objects, suc... | def kINJ(YKHO, mWFP):
raise NotImplementedError('Subclasses must implement') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QTMT(YKHO, mWFP):\n Cqok = YKHO.fields.get(mWFP)\n if Cqok:\n return Cqok.field_from(YKHO.builder, YKHO.prefix)",
"def QTMT(YKHO, vXX7):\n bGrB, Jyyj = YKHO._get_index_and_field(vXX7)\n return Jyyj",
"def ssz0(uPxI, SH9l, vXX7):\n if vXX7 == qhJh.name and uPxI.get_query_type() == SH9l... | [
"0.6124389",
"0.5972233",
"0.59311277",
"0.59103715",
"0.5739733",
"0.5737413",
"0.5711495",
"0.56673884",
"0.5615324",
"0.5609078",
"0.5593269",
"0.557805",
"0.5568292",
"0.55632627",
"0.5527968",
"0.5515767",
"0.54800713",
"0.5446043",
"0.5429797",
"0.541142",
"0.54013926",... | 0.5643538 | 8 |
Decorate routes to require login. | def uKii(eHNT):
@zaGL(eHNT)
def SzLu(*qIxc, **B2fa):
if cuiw.get('username') is None:
return vKnz(nKyW('login', next=QePW.url))
return eHNT(*qIxc, **B2fa)
return SzLu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uKii(JfyU):\n\n @xBlr.wraps(JfyU)\n def WS4m(*qIxc, **B2fa):\n if not 'logged_in' in cuiw:\n return vKnz(nKyW('index', next=QePW.url))\n return JfyU(*qIxc, **B2fa)\n return WS4m",
"def uKii(JfyU):\n\n @xBlr.wraps(JfyU)\n def WS4m(*qIxc, **B2fa):\n if Oa1e.user i... | [
"0.7088609",
"0.69663906",
"0.6952313",
"0.6948969",
"0.6931239",
"0.6927372",
"0.69115704",
"0.6907733",
"0.68493545",
"0.6841979",
"0.6836448",
"0.6835364",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6821092",
"0.6806341",
"0.68061286",
"0.67956793",
"0.6780721",
"0.6773746"... | 0.66932434 | 28 |
Decorate routes to require login. | def uKii(eHNT):
@zaGL(eHNT)
def SzLu(*qIxc, **B2fa):
if cuiw.get('user_id') is None:
return vKnz('/login')
return eHNT(*qIxc, **B2fa)
return SzLu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uKii(JfyU):\n\n @xBlr.wraps(JfyU)\n def WS4m(*qIxc, **B2fa):\n if not 'logged_in' in cuiw:\n return vKnz(nKyW('index', next=QePW.url))\n return JfyU(*qIxc, **B2fa)\n return WS4m",
"def uKii(JfyU):\n\n @xBlr.wraps(JfyU)\n def WS4m(*qIxc, **B2fa):\n if Oa1e.user i... | [
"0.7088456",
"0.69661",
"0.69525415",
"0.6949141",
"0.6931404",
"0.69277924",
"0.69114035",
"0.6908829",
"0.68492377",
"0.68424016",
"0.68367666",
"0.68357086",
"0.6820801",
"0.6820801",
"0.6820801",
"0.6820801",
"0.6806658",
"0.68059635",
"0.67959154",
"0.6781016",
"0.677388... | 0.656372 | 61 |
Computes the values of the hidden layer | def rrOs(YKHO, input):
return Kt_s.nnet.sigmoid(Kt_s.dot(input, YKHO.W) + YKHO.b) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Yulo(YKHO, input):\n return YKHO.activation_func(Kt_s.dot(input, YKHO.W) + YKHO.b, *YKHO.act_func_args)",
"def rrOs(YKHO, input):\n return Kt_s.nnet.sigmoid(Kt_s.dot(input, YKHO.W) + YKHO.b)",
"def rrOs(YKHO, input):\n return Kt_s.tanh(Kt_s.dot(input, YKHO.W) + YKHO.b)",
"def ycep(YKHO):\n LV... | [
"0.7673139",
"0.73285306",
"0.73023975",
"0.72912633",
"0.7193014",
"0.7147416",
"0.69871134",
"0.6802896",
"0.672193",
"0.66734445",
"0.66485584",
"0.65918005",
"0.6577914",
"0.6549841",
"0.65233713",
"0.6473893",
"0.6469031",
"0.64481235",
"0.6430193",
"0.64164144",
"0.6410... | 0.7138596 | 6 |
Return a list of vertices of directed acyclic graph g in topological order. If graph g has a cycle, the result will be incomplete. This algorithm runs in O(n+m) time using O(n) auxiliary space if g is represented using a adjacency list/map. | def _Ypz(Oa1e):
xN0p = []
ASje = []
hNGV = {}
for P6bq in Oa1e.vertices():
hNGV[P6bq] = Oa1e.degree(P6bq, False)
if hNGV[P6bq] == 0:
ASje.append(P6bq)
while len(ASje) > 0:
P6bq = ASje.pop()
xN0p.append(P6bq)
for tTpl in Oa1e.incident_edges(P6bq):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _Ypz(pNZh: gu.Graph) -> x1iM:\n gGq6 = g5js()\n RKA2 = dict()\n for YRbF in range(pNZh.numVertices):\n RKA2[YRbF] = pNZh.get_indegree(YRbF)\n if RKA2[YRbF] == 0:\n gGq6.put(YRbF)\n YiKh = []\n while not gGq6.empty():\n SLBp = gGq6.get()\n YiKh.append(SL... | [
"0.7663267",
"0.7450479",
"0.74217653",
"0.7267972",
"0.71657455",
"0.7015109",
"0.68845034",
"0.68671054",
"0.68572694",
"0.68526196",
"0.6809581",
"0.6803997",
"0.6803251",
"0.6795363",
"0.67919344",
"0.679015",
"0.6788724",
"0.6782468",
"0.6781521",
"0.67582214",
"0.675588... | 0.806878 | 0 |
set logger level to INFO | def vUIa():
aG11(G9jH.INFO, '%(asctime)s %(levelname)s:%(name)s:%(message)s') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rgO4():\n S0MI.setLevel(G9jH.INFO)",
"def Knt9(bo34):\n qpwI(G9jH.INFO, bo34)",
"def jLO6():\n bo34.setLevel(G9jH.INFO)",
"def rt6G(YKHO):\n YKHO._logger.setLevel('INFO')",
"def aQ22(GPtr):\n GPtr['logger_level'] = G9jH.INFO\n return GPtr",
"def WAGa(Emd4) -> None:\n Emd4._set_lo... | [
"0.85053325",
"0.7671378",
"0.7659978",
"0.75166726",
"0.73637366",
"0.7288919",
"0.72654516",
"0.7164874",
"0.71075433",
"0.7104842",
"0.7051013",
"0.7049574",
"0.70397615",
"0.70219547",
"0.6979473",
"0.6939669",
"0.692801",
"0.6886227",
"0.6881194",
"0.68803495",
"0.688034... | 0.77654785 | 1 |
Generate the first block of UCoin. There is no previous data so we can add as we like. | def c3Ey(YKHO, nPrm=None):
tk5Y = None
return n3Kt(nPrm, tk5Y, 0, None, diff=3) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H4OB():\n return n3Kt(data='The first block', pre_hash='')",
"def H4OB(YKHO):\n R1kZ = n3Kt(qcWV.datetime.now(), 'First Block', '0')\n R1kZ.mine_block(YKHO.difficulty)\n YKHO.chain.append(R1kZ)",
"def _Pic():\n XkN1 = n3Kt(index=0, timestamp=qcWV.now(), score=0, traffic_signs=0, previous_has... | [
"0.7367953",
"0.7272225",
"0.6959497",
"0.6859358",
"0.6831847",
"0.68191415",
"0.66034937",
"0.6585872",
"0.65725094",
"0.6557639",
"0.6530478",
"0.64859706",
"0.6475268",
"0.6460749",
"0.6431473",
"0.6426191",
"0.63799334",
"0.6355281",
"0.6317014",
"0.63102233",
"0.6242223... | 0.66980535 | 6 |
Return the unique ID of the sensor. | def ShR8(YKHO) -> str:
return '{}-{}'.format(YKHO.flume.device_id, YKHO.sensor_type) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ShR8(YKHO):\n return YKHO._device.guid + YKHO._sensor_type['name']",
"def ShR8(YKHO):\n return f'{YKHO._device.uuid}-SENSOR'",
"def qi1f(YKHO):\n return YKHO.__sensor_id",
"def ShR8(YKHO):\n return f'{YKHO._zehnder.unique_id}-{YKHO._sensor_type}'",
"def ShR8(YKHO) -> str:\n return f'{YKH... | [
"0.901864",
"0.88188887",
"0.84581596",
"0.8448435",
"0.84320235",
"0.83861446",
"0.82974976",
"0.82913506",
"0.82427907",
"0.821484",
"0.8214634",
"0.81789184",
"0.8166236",
"0.8118113",
"0.81122285",
"0.8107867",
"0.8098117",
"0.8098117",
"0.8086943",
"0.8083652",
"0.805837... | 0.8552729 | 2 |
Return the state attributes of the sensor. | def R1i3(YKHO):
return YKHO._attr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R1i3(YKHO):\n return YKHO.attr\n 'Return the state attributes.'\n return YKHO.attr",
"def R1i3(YKHO):\n return YKHO.rest.data",
"def R1i3(YKHO):\n return YKHO.rest.data",
"def R1i3(YKHO):\n return YKHO._state_attributes",
"def R1i3(YKHO):\n return YKHO.data",
"def R1i3(YKHO):\n ... | [
"0.84218764",
"0.83480877",
"0.83480877",
"0.83477944",
"0.8342533",
"0.8255371",
"0.82501924",
"0.82501924",
"0.82501924",
"0.8242858",
"0.8242858",
"0.8242858",
"0.8242858",
"0.8168588",
"0.8168588",
"0.8168588",
"0.8168588",
"0.8168588",
"0.8144623",
"0.8144623",
"0.814462... | 0.816539 | 18 |
Type to convert strings to Boolean (returns input if not boolean) | def oOc6(BWXx):
if not isinstance(BWXx, str):
return BWXx
if BWXx.lower() in ('yes', 'true', 'y', '1'):
return True
elif BWXx.lower() in ('no', 'false', 'n', '0'):
return False
else:
return BWXx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DLhY(vIwR):\n if vIwR == 'True' or vIwR == 'true':\n return True\n if vIwR == 'False' or vIwR == 'false':\n return False\n raise ValueError('wrong type')",
"def M0mR(fZOT):\n if isinstance(fZOT, bool):\n return fZOT\n elif fZOT.lower() in ['1', 'true']:\n return Tru... | [
"0.8565985",
"0.85576737",
"0.8484709",
"0.8472012",
"0.8397457",
"0.83939743",
"0.83921874",
"0.8323884",
"0.8318754",
"0.83119",
"0.8297154",
"0.8270708",
"0.82655776",
"0.8264232",
"0.82332766",
"0.82256997",
"0.8223663",
"0.8219022",
"0.8204141",
"0.8203057",
"0.81838953"... | 0.82237875 | 16 |
Argparse type to convert strings to Boolean | def _M0e(BWXx):
BWXx = oOc6(BWXx)
if isinstance(BWXx, bool):
return BWXx
raise j1Jz.ArgumentTypeError('Boolean value expected.') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JiQe(d7pR):\n if d7pR.lower() in ('true', 't'):\n return True\n elif d7pR.lower() in ('false', 'f'):\n return False\n else:\n raise j1Jz.ArgumentTypeError('Boolean value expected.')",
"def fgVc(Ty9i):\n if isinstance(Ty9i, bool):\n return Ty9i\n if Ty9i.lower() == '... | [
"0.8345346",
"0.833499",
"0.83039975",
"0.83039975",
"0.8279317",
"0.8275289",
"0.8234815",
"0.81744534",
"0.8171308",
"0.8171308",
"0.8171308",
"0.8171308",
"0.81654066",
"0.81654066",
"0.81654066",
"0.81654066",
"0.81460834",
"0.81318647",
"0.81250095",
"0.81250095",
"0.812... | 0.82166106 | 7 |
Computes whether `value` can be cast to a float. | def SH_w(BWXx):
try:
float(BWXx)
return True
except ValueError:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SCR2(BWXx):\n try:\n float(BWXx)\n return True\n except:\n return False",
"def SCR2(BWXx):\n try:\n float(BWXx)\n return True\n except:\n return False",
"def KP6z(BWXx):\n try:\n float(BWXx)\n return True\n except:\n return Fa... | [
"0.86524624",
"0.8566163",
"0.83732694",
"0.81299007",
"0.81096286",
"0.8105568",
"0.8087353",
"0.80706304",
"0.80691946",
"0.8014482",
"0.7991438",
"0.7921894",
"0.7900675",
"0.78380054",
"0.7767495",
"0.77638125",
"0.76559186",
"0.76049465",
"0.7565532",
"0.75174564",
"0.74... | 0.79982775 | 10 |
Generate an ARN for this resource | def zTzf(Emd4: Type['AccountResourceSpec'], PcW4: str, Z31E: str='', zn0c: str='') -> str:
return f'arn:aws::::account/{PcW4}' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EszR(YKHO) -> str:\n raise NotImplementedError",
"def hMqs(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'arn')",
"def hMqs(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'arn')",
"def hMqs(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'arn')",
"def hMqs(YKHO) -> qe4Y.Output[s... | [
"0.74283177",
"0.71487826",
"0.71487826",
"0.71487826",
"0.71487826",
"0.71487826",
"0.71487826",
"0.71487826",
"0.71487826",
"0.71487826",
"0.71487826",
"0.71487826",
"0.71487826",
"0.71487826",
"0.71487826",
"0.71487826",
"0.71487826",
"0.71487826",
"0.71487826",
"0.71487826"... | 0.786046 | 0 |
Configure and initialize logger. | def fZx2(mWFP: str, ABDL: str=wnrn, hpnr: str=MTA8, Bjmr: str=GGme, Ux0P: str=None):
if not Ux0P:
DCgT = G9jH.StreamHandler(stream=HwRy.stderr)
else:
DCgT = G9jH.FileHandler(Ux0P)
DCgT.addFilter(TeQM())
DCgT.setFormatter(G9jH.Formatter(hpnr, datefmt=Bjmr))
RKD7 = G9jH.getLogger(mWFP)... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nWQP():\n Ylj8(GPtr['logging'])\n RKD7.info('app logger initialized')\n return",
"def nWQP(YKHO):\n YKHO.logger = G9jH.getLogger('vkasync')\n YKHO.log_path = Hy7s.path.join(YKHO.conf_path, 'vkasync.log')\n L8wK = G9jH.FileHandler(YKHO.log_path)\n L8wK.setLevel(G9jH.ERROR)\n uaPq = G9j... | [
"0.79591924",
"0.79485816",
"0.79452497",
"0.7888304",
"0.78626245",
"0.7856077",
"0.7831796",
"0.7737849",
"0.7734695",
"0.77072316",
"0.7686882",
"0.76580966",
"0.76409847",
"0.763158",
"0.7626103",
"0.7573983",
"0.7569282",
"0.7569129",
"0.7546937",
"0.75468266",
"0.751872... | 0.0 | -1 |
Read file and convert it to a base64 encoding | def naFL(LNo8):
with open(LNo8, 'rb') as eHNT:
UiEM = eHNT.read()
a3Ys = QMfv(UiEM).decode('UTF-8')
return a3Ys | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dbH5(pmON):\n return WR89.b64encode(open(pmON, 'rb').read()).decode('utf-8')",
"def HdNW(Ux0P: pathlib.Path) -> str:\n with open(Ux0P, 'rb') as hOYR:\n return 'base64,' + WR89.b64encode(hOYR.read()).decode()",
"def Crvn(nUeQ):\n return WR89.b64encode(nUeQ).decode()",
"def mlKt(Ux0P):\n ... | [
"0.81658274",
"0.7990778",
"0.77605736",
"0.77599907",
"0.77599907",
"0.76978713",
"0.76015973",
"0.7519195",
"0.7499813",
"0.7478748",
"0.74395597",
"0.7197269",
"0.70605457",
"0.7059766",
"0.7045441",
"0.7037037",
"0.69756025",
"0.69756025",
"0.68630993",
"0.6829822",
"0.68... | 0.6569298 | 29 |
Create a bias variable with appropriate initialization. | def Y7ph(YKHO, ROpF):
RqgG = ZylS.constant(0.1, shape=ROpF)
return ZylS.Variable(RqgG) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n1Xm(ROpF, MuED=ZylS.zeros_initializer()):\n return ZylS.get_variable(name='b', shape=ROpF, initializer=MuED)",
"def Y7ph(ROpF, ECSy=0.025):\n RqgG = ZylS.constant(ECSy, shape=ROpF)\n return ZylS.Variable(RqgG)",
"def KR18(YKHO, ROpF):\n return ZylS.Variable(ZylS.constant(0.0, shape=ROpF, dtype... | [
"0.79858303",
"0.7918969",
"0.78149676",
"0.7800119",
"0.77055323",
"0.75624096",
"0.75623584",
"0.7561029",
"0.7559047",
"0.755641",
"0.75428504",
"0.75428504",
"0.75323683",
"0.7528323",
"0.7528323",
"0.7528323",
"0.7528323",
"0.7528323",
"0.7528323",
"0.7528323",
"0.752832... | 0.7608229 | 5 |
Mocked AWS Credentials for moto. | def hYr6():
Hy7s.environ['AWS_ACCESS_KEY_ID'] = 'testing'
Hy7s.environ['AWS_SECRET_ACCESS_KEY'] = 'testing'
Hy7s.environ['AWS_SECURITY_TOKEN'] = 'testing'
Hy7s.environ['AWS_SESSION_TOKEN'] = 'testing' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PUyH():\n Hy7s.environ['AWS_ACCESS_KEY_ID'] = 'testing'\n Hy7s.environ['AWS_DEFAULT_REGION'] = 'ap-southeast-2'\n Hy7s.environ['AWS_SECRET_ACCESS_KEY'] = 'testing'\n Hy7s.environ['AWS_SECURITY_TOKEN'] = 'testing'\n Hy7s.environ['AWS_SESSION_TOKEN'] = 'testing'",
"def MU4w(eXVH, Ehsq):\n Ehs... | [
"0.8539649",
"0.7609735",
"0.72904336",
"0.72635967",
"0.7212455",
"0.7182388",
"0.71761876",
"0.71761876",
"0.71761876",
"0.71761876",
"0.7143531",
"0.7143531",
"0.7143531",
"0.7143531",
"0.7143531",
"0.7143531",
"0.7141403",
"0.7063853",
"0.66895556",
"0.64615655",
"0.64268... | 0.64185965 | 21 |
Add/remove weapon to racer | def z6_D(YKHO, xT8c='Banana'):
YKHO.weapon = xT8c | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lBMp(YKHO, xT8c):\n YKHO.abilities.append(xT8c)",
"def lBMp(YKHO, xT8c):\n YKHO.abilities.append(xT8c)",
"def CzJ3(YKHO):\n if YKHO.weapon is not None:\n if isinstance(YKHO.weapon, mJgt):\n YKHO.stats['atk'] -= YKHO.weapon.might\n for QmN4 in YKHO.weapon.stats:\n ... | [
"0.7428022",
"0.702512",
"0.70135736",
"0.6938004",
"0.6662654",
"0.6582411",
"0.64421463",
"0.63695383",
"0.6283315",
"0.6224755",
"0.6202492",
"0.6199754",
"0.61914366",
"0.61071104",
"0.6104841",
"0.60927916",
"0.6084542",
"0.60811967",
"0.6067764",
"0.6062032",
"0.605108"... | 0.66987395 | 4 |
Returns true if the ship is not trying to 'flee'. This is determined by the top order in the queue being "move to" or some similar instruction. Bombard, Assault and similar 'beligerant' actions cannot be taken if enemy ships are in system. | def ocgn(YKHO):
if YKHO.orders == [] and YKHO.attack > 0:
return True
if YKHO.attack == 0:
return False
T4Wy, bGrB = YKHO.orders[0]
if T4Wy == 'move to':
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pOfD(YKHO) -> bool:\n for C7MP in YKHO._ships:\n for Q7me in C7MP:\n if Q7me.state is N_lA.SHIP:\n return True\n return False",
"def _fdx(YKHO):\n return len(YKHO.enumerate_moves()) == 0",
"def gt0w(YKHO) -> bool:\n return YKHO.ship is None",
"def TfQr(YKHO) -... | [
"0.6722476",
"0.6447866",
"0.63637465",
"0.6337434",
"0.631273",
"0.62739307",
"0.62569",
"0.6256416",
"0.62238497",
"0.6175869",
"0.61566216",
"0.61520344",
"0.60814387",
"0.60699224",
"0.6066607",
"0.6064576",
"0.60611534",
"0.60465896",
"0.5996808",
"0.5986166",
"0.5985626... | 0.70647174 | 0 |
Put a measure in the queue if it pass the tests. First the check method of the measure is called. If the tests pass, the measure is enqueued and finally saved in the default folder ('default_path' attribute of the `RootTask` describing the measure). Otherwise the list of the failed tests is displayed to the user. | def xxW5(YKHO, Tcon):
bo34 = G9jH.getLogger(__name__)
aM69 = YKHO.workbench.get_plugin('enaml.workbench.core')
HCmI = u'hqc_meas.dependencies.collect_dependencies'
Ylbp = aM69.invoke_command(HCmI, {'obj': Tcon.root_task}, YKHO.plugin)
if not Ylbp[0]:
for id in Ylbp[1]:
bo34.warn(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xxW5(YKHO, Tcon):\n Tcon.forced_enqueued = False\n Ylbp, tO9_, UAju = Tcon.dependencies.collect_runtimes()\n if not Ylbp:\n if 'Failed' in tO9_:\n x7wJ = FfvG(errors=UAju, title=tO9_)\n x7wJ.exec_()\n Tcon.dependencies.reset()\n return False\n ... | [
"0.73476326",
"0.6314596",
"0.5911627",
"0.58593315",
"0.5672906",
"0.5670496",
"0.5643503",
"0.5636927",
"0.5567944",
"0.55661315",
"0.5550725",
"0.554862",
"0.55480796",
"0.5441448",
"0.5429217",
"0.53635776",
"0.53148735",
"0.53148735",
"0.5242319",
"0.5186895",
"0.5174425... | 0.694224 | 1 |
Mark a measure already in queue as fitted to be executed. This method can be used to reenqueue a measure that previously failed, for example becuse a profile was missing, the measure can then be edited again and will be executed in its turn. | def MvLs(YKHO, Tcon):
Tcon.enter_edition_state()
Tcon.status = 'READY'
Tcon.infos = 'Measure re-enqueued by the user' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xxW5(YKHO, Tcon):\n Tcon.forced_enqueued = False\n Ylbp, tO9_, UAju = Tcon.dependencies.collect_runtimes()\n if not Ylbp:\n if 'Failed' in tO9_:\n x7wJ = FfvG(errors=UAju, title=tO9_)\n x7wJ.exec_()\n Tcon.dependencies.reset()\n return False\n ... | [
"0.6529628",
"0.63889354",
"0.6233247",
"0.61157495",
"0.5944392",
"0.5839367",
"0.5751202",
"0.5747225",
"0.5652253",
"0.5508935",
"0.5497692",
"0.5446415",
"0.54326046",
"0.5398377",
"0.53831697",
"0.52742475",
"0.5262495",
"0.52470636",
"0.52146256",
"0.5204451",
"0.520137... | 0.7107446 | 0 |
Return a list with all the prime numbers lesser than n. Custom implementation of Eratosthenes's sieve. | def Kcg7(exwG):
Boug = set([])
KYJZ = []
FGW3 = 2
while FGW3 < exwG:
if FGW3 not in Boug:
KYJZ.append(FGW3)
ounV = FGW3 * FGW3
while ounV < exwG:
Boug.add(ounV)
ounV += FGW3
FGW3 += 1
return KYJZ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rPed(exwG):\n KwQv = [True] * exwG\n for YRbF in Ni9Y(3, int(exwG ** 0.5) + 1, 2):\n if KwQv[YRbF]:\n KwQv[YRbF * YRbF::2 * YRbF] = [False] * ((exwG - YRbF * YRbF - 1) / (2 * YRbF) + 1)\n return [2] + [YRbF for YRbF in Ni9Y(3, exwG, 2) if KwQv[YRbF]]",
"def rCHC(exwG):\n KwQv = ... | [
"0.8507365",
"0.85045326",
"0.84784955",
"0.84671736",
"0.8427734",
"0.83550024",
"0.8335453",
"0.8314524",
"0.83084583",
"0.8305547",
"0.8296828",
"0.8287661",
"0.82782125",
"0.8256988",
"0.8256392",
"0.8240647",
"0.82242227",
"0.82019836",
"0.8193608",
"0.81919545",
"0.8188... | 0.8091247 | 49 |
Return logger with formatter | def fZx2(EeCs=None):
G9jH.basicConfig(level=G9jH.DEBUG)
bo34 = G9jH.getLogger(EeCs)
bo34.setLevel(Hy7s.environ.get('LOG_LEVEL', G9jH.DEBUG))
bo34.addFilter(G9jH.StreamHandler())
return bo34 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EIn1(YKHO):\n if not YKHO.fmt:\n YKHO.fmt = '%(asctime)s.%(msecs)03d {host} {progname} (%(process)d): %(message)s'.format(host=YKHO.hostname, progname=YKHO.progname)\n if not YKHO.datefmt:\n YKHO.datefmt = '%Y-%m-%dT%H:%M:%S'\n return G9jH.Formatter(fmt=YKHO.fmt, datefmt=YKHO.datefmt)",
... | [
"0.7850366",
"0.75369465",
"0.7318676",
"0.71011144",
"0.7033216",
"0.70329916",
"0.7019338",
"0.7019056",
"0.69648856",
"0.6951055",
"0.6917766",
"0.6916795",
"0.68328494",
"0.6818701",
"0.6812482",
"0.680446",
"0.67771703",
"0.6768164",
"0.6767079",
"0.67494553",
"0.6744463... | 0.0 | -1 |
trim to common valid time period, including optional clip | def Cqfh(YKHO):
LYZB = oyIN.max([YKHO.A_full.time.values[0], YKHO.B_full.time.values[0]])
_RMP = oyIN.min([YKHO.A_full.time.values[-1], YKHO.B_full.time.values[-1]])
if YKHO.clip_start is not None and YKHO.clip_start > LYZB:
LYZB = YKHO.clip_start
if YKHO.clip_stop is not None and YKHO.clip_stop... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nOOm(YKHO):\n HbfQ = []\n for yKcO, Os4s in YKHO.stamps:\n if not (Os4s < YKHO.tStart or yKcO > YKHO.tEnd):\n HbfQ.append((max(yKcO, YKHO.tStart), min(Os4s, YKHO.tEnd)))\n YKHO.stamps = HbfQ",
"def O358(ITS7, shSu, _EMw):\n W3Xw = oyIN.where((oyIN.isfinite(shSu) == True) & (shSu... | [
"0.67440695",
"0.63257146",
"0.61915416",
"0.6141227",
"0.6077278",
"0.6054006",
"0.60235906",
"0.59849316",
"0.59439695",
"0.5936814",
"0.59090096",
"0.5888521",
"0.5881262",
"0.58809936",
"0.5843666",
"0.5828138",
"0.5800391",
"0.5800391",
"0.57990617",
"0.577598",
"0.57736... | 0.66820365 | 1 |
Return the current time (in the local time zone). | def wzkt():
return qcWV.datetime.now(d5IO.tz.tzlocal()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vHj7() -> qcWV:\n return qcWV.now().astimezone()",
"def ApjM():\n return qcWV.now(Vsdc())",
"def UlPi(YKHO):\n return Kmii(qcWV.datetime.now(), location=YKHO.location)",
"def DDc8():\n return qcWV.datetime.now(d5IO.tz.tzlocal())",
"def vHj7(YKHO):\n return Kmii(qcWV.datetime.utcnow(), lo... | [
"0.8678097",
"0.8666686",
"0.85738754",
"0.83565456",
"0.8306652",
"0.819606",
"0.8121976",
"0.81041527",
"0.8030998",
"0.7993495",
"0.7989504",
"0.7975292",
"0.7965162",
"0.79609287",
"0.79244405",
"0.79160184",
"0.79103696",
"0.79094297",
"0.78771013",
"0.7858899",
"0.78557... | 0.7815505 | 27 |
This method assigns the parameter EMAs saved in self.shadow to the given model. The current parameter values of the model are saved to self.original. These original parameters can be restored using self.resume. | def bD1G(YKHO, C3ST: torch.nn.Module):
for mWFP, xqoZ in C3ST.named_parameters():
if xqoZ.requires_grad:
YKHO.original[mWFP] = xqoZ.clone()
xqoZ.data.copy_(YKHO.shadow[mWFP].data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bD1G(YKHO, C3ST):\n for mWFP, xqoZ in C3ST.named_parameters():\n if xqoZ.requires_grad:\n assert mWFP in YKHO.shadow\n YKHO.original[mWFP] = xqoZ.data.clone()\n xqoZ.data = YKHO.shadow[mWFP]",
"def kvfq(YKHO, C3ST):\n for mWFP, xqoZ in C3ST.named_parameters():\n ... | [
"0.706647",
"0.6630584",
"0.6310897",
"0.62240416",
"0.61820996",
"0.61541396",
"0.61489004",
"0.6143016",
"0.60968155",
"0.6073566",
"0.60689",
"0.6000963",
"0.590944",
"0.590944",
"0.5887923",
"0.5752443",
"0.5744094",
"0.5696249",
"0.5695551",
"0.5681505",
"0.5668227",
"... | 0.65413237 | 2 |
Method that manually applies weight decay to model parameters that match the specified parameter names and types. | def jgKd(C3ST: torch.nn.Module, TI1B: float, DTb0: List=['conv', 'fc'], SnBA: List=['weight']):
with ht2j.no_grad():
for mWFP, xqoZ in C3ST.state_dict().items():
if any([lBdC(cPmv, mWFP) for cPmv in Lx3t(DTb0, SnBA)]):
xqoZ.mul_(1 - TI1B) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def krxR(YKHO, vtNT):\n return [Oa1e + YKHO.config.weight_decay * Ty9i if Ty9i.name.endswith('kernel:0') else Oa1e for Oa1e, Ty9i in zip(vtNT, YKHO.trainable_variables)]",
"def oNEO(**B2fa):\n return -B2fa['weights']",
"def qsqA(C3ST, Cwt5):\n for gEmA in C3ST.layers:\n if isinstance(gEmA, bdPE... | [
"0.6812221",
"0.6738519",
"0.6721454",
"0.6360393",
"0.6356971",
"0.63527596",
"0.6335934",
"0.6294054",
"0.6294054",
"0.62751955",
"0.62678593",
"0.62678593",
"0.6240801",
"0.6237118",
"0.62273514",
"0.62261444",
"0.62245554",
"0.62245554",
"0.62245554",
"0.62245554",
"0.621... | 0.67320335 | 2 |
Get list of model parameters to which weight decay should be applied. The function basically filters out all BatchNormrelated parameters to which weight decay should not be applied. | def A3kx(C3ST: torch.nn.Module):
Ut2j, W974 = ([], [])
for mWFP, xqoZ in C3ST.named_parameters():
if 'bn' in mWFP:
W974.append(xqoZ)
else:
Ut2j.append(xqoZ)
return [{'params': Ut2j}, {'params': W974, 'weight_decay': 0}] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rx36(YKHO, oNEO: float=0.0, h8oy: bool=False, *qIxc, **B2fa):\n WdDP = TjuQ(*qIxc, named_parameters=YKHO.named_parameters, weight_decay=oNEO, no_decay_bn_filter_bias=h8oy, **B2fa)\n return (WdDP, [1.0] * len(WdDP))",
"def Jvyi(C3ST: nn.Module, aF2y: float, oNEO: Number, Fshd: Number=None, pOBA: Number=... | [
"0.7079651",
"0.70739937",
"0.70603055",
"0.6804897",
"0.67854714",
"0.6773945",
"0.6727182",
"0.6721197",
"0.6677628",
"0.6677628",
"0.6653636",
"0.6615057",
"0.66062367",
"0.65278316",
"0.6527083",
"0.6523559",
"0.64970326",
"0.6483329",
"0.64500964",
"0.6433563",
"0.640197... | 0.8047558 | 0 |