query stringlengths 10 3.6k | document stringlengths 19 61.4k | metadata dict | negatives listlengths 0 101 | negative_scores listlengths 0 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
Get a job resource. | def NMoC(YKHO, mWFP: str) -> W7aK:
if not isinstance(mWFP, str):
raise oXZl(f'{mWFP} is a invalid input for client.jobs.get().')
dtag = YKHO._get_job(mWFP)
if not S9dR(dtag):
oCfW = W7aK._from_rest_object(dtag)
if dtag.properties.job_type != pxQM.AUTO_ML:
oCfW = YKHO._res... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UIzg(YKHO, rjee):\n return YKHO._action(['jobs', 'read'], params={'id': rjee})",
"def Co5F(YKHO, QpfX, oCfW):\n return YKHO._manager.job_get(QpfX, vDgp(oCfW))",
"def UIzg(YKHO, MFhG: str) -> cuzp:\n return YKHO.service.projects().programs().jobs().get(name=MFhG).execute()",
"def UIzg(YKHO, kVad)... | [
"0.7715111",
"0.76759",
"0.7649729",
"0.75360596",
"0.74940264",
"0.74729407",
"0.7443035",
"0.7338554",
"0.73059547",
"0.73003036",
"0.72919947",
"0.7226451",
"0.7199313",
"0.7195802",
"0.7190586",
"0.7158269",
"0.7135498",
"0.71279716",
"0.7022176",
"0.7008516",
"0.7008516"... | 0.6892954 | 28 |
Resolve arm_id for SparkJob. | def ffWc(YKHO, oCfW: Spark, C7Pp: Callable) -> W7aK:
if oCfW.code is not None and ZVLV(oCfW.code):
tO9_ = 'Format not supported for code asset: {}'
raise _xWe(message=tO9_.format(oCfW.code), target=r2Dj.JOB, no_personal_data_message=tO9_.format('[job.code]'), error_category=lmBB.USER_ERROR)
if o... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gVjX(YKHO, oCfW: Job, C7Pp: Callable) -> W7aK:\n if oCfW.code is not None and (not w0oj(oCfW.code, liCn.CODE)):\n oCfW.code = C7Pp(VKEj(base_path=oCfW._base_path, path=oCfW.code), azureml_type=liCn.CODE)\n oCfW.environment = C7Pp(oCfW.environment, azureml_type=liCn.ENVIRONMENT)\n oCfW.compute =... | [
"0.72836334",
"0.7189356",
"0.71184087",
"0.7062344",
"0.68433034",
"0.6483252",
"0.617811",
"0.61631674",
"0.589186",
"0.5888643",
"0.58449197",
"0.5838139",
"0.57468724",
"0.57468724",
"0.57088596",
"0.56395626",
"0.5610164",
"0.5605998",
"0.55800563",
"0.5568243",
"0.55544... | 0.78432125 | 0 |
Appends the user's tenant ID to the end of the studio URL so the UI knows against which tenant to authenticate. | def jufX(YKHO, oCfW: Job) -> None:
try:
iYLI = oCfW.services.get('Studio', None)
SEyY = iYLI.endpoint
mdUF = DjZf(dm7g())
SOR8.debug('default_scopes used: `%s`\n', mdUF)
x8I_ = DvJO.decode(YKHO._credential.get_token(*mdUF).token, options={'verify_signature': False, 'verify_au... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mLXZ(YKHO) -> str:\n return qe4Y.get(YKHO, 'tenant_id')",
"def mLXZ(YKHO) -> str:\n return qe4Y.get(YKHO, 'tenant_id')",
"def mLXZ(YKHO) -> str:\n return qe4Y.get(YKHO, 'tenant_id')",
"def mLXZ(YKHO) -> str:\n return qe4Y.get(YKHO, 'tenant_id')",
"def mLXZ(YKHO) -> str:\n return qe4Y.get... | [
"0.5918772",
"0.5918772",
"0.5918772",
"0.5918772",
"0.5918772",
"0.5918772",
"0.5918772",
"0.5918772",
"0.5918772",
"0.5918772",
"0.5918772",
"0.5918772",
"0.5918772",
"0.5918772",
"0.5918772",
"0.5918772",
"0.5918772",
"0.5918772",
"0.58587533",
"0.58537936",
"0.58537936",
... | 0.6778243 | 0 |
Returns a squared image by adding black padding | def mck4(VXjJ):
ZNpz = (0, 0, 0)
TVTK, H2v2 = VXjJ.size
if TVTK == H2v2:
return VXjJ
elif TVTK > H2v2:
Aofo = hnIv.new(VXjJ.mode, (TVTK, TVTK), ZNpz)
Aofo.paste(VXjJ, (0, (TVTK - H2v2) // 2))
return Aofo
else:
Aofo = hnIv.new(VXjJ.mode, (H2v2, H2v2), ZNpz)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bXPI(VXjJ):\n Ylkb = oyIN.max(VXjJ.shape[:2])\n fdbj = Ylkb - VXjJ.shape[:2]\n VXjJ = oyIN.pad(array=VXjJ, pad_width=((0, fdbj[0]), (0, fdbj[1]), (0, 0)), mode='constant')\n return (VXjJ, fdbj)",
"def vLND(VXjJ: Img, HThn=True) -> lEJO:\n DQlU = isinstance(VXjJ, oyIN.ndarray)\n if not DQlU:... | [
"0.72284496",
"0.6831975",
"0.68170154",
"0.68170154",
"0.6753586",
"0.6633447",
"0.6572787",
"0.65277",
"0.6455275",
"0.6446714",
"0.64411676",
"0.62997544",
"0.6296733",
"0.62629527",
"0.622562",
"0.62141794",
"0.61920875",
"0.61736184",
"0.6162075",
"0.6047898",
"0.598625"... | 0.73047966 | 0 |
Squares all images in a given path (inplace). Please note that this method overwrites existing images in the path. | def kEpY(pmON):
RRlC = SC2F(Hy7s.path.join(pmON, '*.png')) + SC2F(Hy7s.path.join(pmON, '*.jpg'))
for nUeQ in RRlC:
Xn71 = hnIv.open(nUeQ)
xOH6 = mck4(Xn71)
xOH6.save(nUeQ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OyOK(pmON, TVTK, H2v2):\n RRlC = SC2F(Hy7s.path.join(pmON, '*.png')) + SC2F(Hy7s.path.join(pmON, '*.jpg'))\n for nUeQ in RRlC:\n Xn71 = hnIv.open(nUeQ)\n SWxl = Xn71.resize((TVTK, H2v2), hnIv.ANTIALIAS)\n SWxl.save(nUeQ)",
"def OyOK(pmON):\n for nUeQ in Hy7s.listdir(pmON):\n ... | [
"0.62086844",
"0.5920094",
"0.5825733",
"0.5786534",
"0.57461107",
"0.5725202",
"0.56109107",
"0.56032443",
"0.55697876",
"0.5544906",
"0.5533843",
"0.5506994",
"0.5497255",
"0.5464062",
"0.54526174",
"0.54356134",
"0.54264396",
"0.5424127",
"0.5356124",
"0.5354367",
"0.53469... | 0.7845526 | 0 |
Process GET requests to the /index URI; render the index.html page. | def qvrJ():
global base_grant_url
global user_continue_url
global success_url
KcEq = QePW.host_url
ZQwj = QePW.args.get('base_grant_url')
YcB7 = QePW.args.get('user_continue_url')
Zlpf = QePW.args.get('node_mac')
EinA = QePW.args.get('client_ip')
ZrF0 = QePW.args.get('client_mac')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d6pt():\n return TvZl('index.html', url=QePW.url)",
"def d6pt():\n G9jH.info('On index page')\n return TvZl('index.html')",
"def d6pt():\n return CfgF(open('index.html').read())",
"def d6pt():\n bo34.info('Request@/index.html')\n return DqlU.get_template('index.html').render()",
"def ... | [
"0.8109959",
"0.80090064",
"0.79988426",
"0.7909164",
"0.7840516",
"0.77950764",
"0.77909654",
"0.7762794",
"0.7748405",
"0.77347267",
"0.7727027",
"0.7725058",
"0.77220595",
"0.77220595",
"0.77220595",
"0.77220595",
"0.77220595",
"0.77220595",
"0.77220595",
"0.770157",
"0.77... | 0.0 | -1 |
Log an artifact as an input or output of this run to metadata backend serivce. This method expects `artifact` to have ARTIFACT_TYPE_NAME string field the form of /. serialization() method to return a openapi_client.MlMetadataArtifact. This method will set artifact.id. | def RKD7(YKHO, dIeA):
pIty = dIeA.serialization()
if pIty.custom_properties == None:
pIty.custom_properties = {}
if MSXC in pIty.custom_properties:
raise ValueError('custom_properties contains reserved key %s' % MSXC)
if Oiz4 in pIty.custom_properties:
raise ValueError('custom_pr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TgDU(YKHO, dIeA: metadata_store_pb2.Artifact):\n YKHO.artifact = dIeA",
"def zNg6(YKHO, mWFP, dIeA):\n return YKHO.tracker.log_artifact(mWFP, dIeA)",
"def VwuA(YKHO, zQSw: metadata_store_pb2.ArtifactType):\n YKHO.artifact_type = zQSw\n YKHO.artifact.type_id = zQSw.id",
"def zNg6(YKHO, pmON, m... | [
"0.73689306",
"0.73449403",
"0.6702524",
"0.63303614",
"0.62811327",
"0.6267317",
"0.62481076",
"0.62481076",
"0.62481076",
"0.62481076",
"0.62481076",
"0.62481076",
"0.62481076",
"0.62481076",
"0.62481076",
"0.62481076",
"0.6155486",
"0.61051786",
"0.6084843",
"0.604258",
"0... | 0.80395126 | 0 |
Find the interval [ts, ts + `offset`) where `datetime` is in. | def NVoZ(qcWV: pd.Timestamp, vgXP: pd.DateOffset) -> AzJI[rLdf.Timestamp, rLdf.Timestamp]:
QiCI = rLdf.Timestamp(year=1970, month=1, day=1)
while jx5R(QiCI) <= jx5R(qcWV):
QiCI += vgXP
return (QiCI - vgXP, QiCI) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uCod(GYyL, lGE9, zuTP):\n exwG = len(GYyL)\n XRN_ = None\n I4DH = None\n for YRbF in Ni9Y(exwG):\n if lGE9 <= GYyL[YRbF] and XRN_ is None:\n XRN_ = YRbF\n if zuTP >= GYyL[exwG - (YRbF + 1)] and I4DH is None:\n I4DH = exwG - (YRbF + 1)\n if XRN_ is not None... | [
"0.64319575",
"0.59949327",
"0.5626082",
"0.5578745",
"0.54285324",
"0.53947705",
"0.53464025",
"0.5271008",
"0.52164817",
"0.5167871",
"0.51372343",
"0.5132788",
"0.51085776",
"0.506816",
"0.5056354",
"0.5043794",
"0.50388926",
"0.5000429",
"0.4996176",
"0.49955314",
"0.4973... | 0.6937175 | 0 |
Construct a unit normalized slit function | def OSUY(mC4V, zNig=None, BQtV=1, WTkW=None):
if len(mC4V) % 2 != 0:
raise ValueError('Must provide synchronized set of left and right edges.')
vgXP, zj7s = jeO1(mC4V, oversample=BQtV)
t_lK = zj7s if zNig is None else zNig
if t_lK < zj7s:
print(t_lK, zj7s)
qmLP.warn('Array does n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ne3v(WKvO):\n return Zxt2.stats.norm.sf(WKvO)",
"def Ih18(WKvO):\n return (1 - epAf.erf(WKvO / epAf.sqrt(2))) / 2",
"def o4sw(oxWs, vC9B):\n return oxWs / vC9B",
"def NkkI(EcVT, r8hN, KCHu):\n return (EcVT - r8hN) / KCHu",
"def NkkI(EcVT, r8hN, KCHu):\n return (EcVT - r8hN) / KCHu",
"d... | [
"0.67795956",
"0.67065746",
"0.67054397",
"0.65356857",
"0.65356857",
"0.64406306",
"0.64224595",
"0.63895",
"0.63477314",
"0.6268635",
"0.6250747",
"0.6245054",
"0.6239337",
"0.6186458",
"0.6148712",
"0.61428756",
"0.61076456",
"0.608369",
"0.60630846",
"0.60534894",
"0.6052... | 0.0 | -1 |
Check if Table exists. Running only in Development. | def n2Bh(Emd4) -> None:
GikI = Hy7s.getenv('ENVIRONMENT', 'develop')
bo34.debug(f"Check if table {Emd4.Meta.table_name} on '{GikI}' exists...")
if GikI == 'develop':
if not Emd4.exists():
bo34.warning(f'Table {Emd4.Meta.table_name} in {GikI} does not exist. Creating...')
Emd4... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PJaC(YKHO):\n Ylbp = VoXU('GET', YKHO.taburl, None)\n return True if Ylbp.status_code == 200 else False",
"def cSUO(YKHO, tyNF):\n return YKHO.count('sqlite_master', f\"WHERE type='table' AND name='{tyNF}'\") > 0",
"def gZ17():\n NCls = iHv3.connect(pths)\n N1p7 = NCls.cursor()\n Aofo = N... | [
"0.8555949",
"0.82325196",
"0.8206203",
"0.8195877",
"0.819302",
"0.8149137",
"0.80954456",
"0.80919117",
"0.8080253",
"0.80417466",
"0.80160356",
"0.8012101",
"0.80012614",
"0.7972151",
"0.7969624",
"0.7968842",
"0.79652655",
"0.79446965",
"0.78880113",
"0.78601205",
"0.7850... | 0.8783574 | 0 |
Combines the mean and variance for two samples | def XFuS(jzdc, Fg_i):
r8hN, zYFX, PXCa = jzdc
exwG, xeS3, hEtc = Fg_i
I2_u = zYFX * r8hN
aGqg = xeS3 * exwG
wjRY = r8hN + exwG
JBMS = float(I2_u + aGqg) / wjRY
XWh8 = PXCa * r8hN
WFjp = hEtc * exwG
NDQy = XWh8 + WFjp + float(r8hN) / (exwG * wjRY) * (float(exwG) / r8hN * I2_u - aGqg) ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WWZj(XaIe, oawl):\n srfb, kEQo = (len(XaIe), len(oawl))\n OxHo, MNml = (I8JS(XaIe), I8JS(oawl))\n return (OxHo + MNml) / (srfb + kEQo - 2)",
"def X0Yl():\n YVv6 = TTda.datasets.CIFAR10('./data', train=True, download=True, transform=_J6p())\n rA0f = TTda.datasets.CIFAR10('./data', train=False, ... | [
"0.7329727",
"0.7128744",
"0.71006525",
"0.69390815",
"0.6835451",
"0.6825387",
"0.6797957",
"0.6795218",
"0.6699297",
"0.6693334",
"0.6653548",
"0.659395",
"0.65805846",
"0.65199137",
"0.65120703",
"0.65120703",
"0.65107936",
"0.6480944",
"0.64788616",
"0.64712435",
"0.64661... | 0.68786246 | 4 |
Allow argument to be a string or a list | def hy9U(YKHO, yEHD):
if not isinstance(yEHD, (list, tuple)):
yEHD = [yEHD]
return yEHD | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aBbO(d7pR):\n if isinstance(d7pR, exCv):\n return [d7pR]\n else:\n return d7pR",
"def w1Ya(Cwmt):\n if isinstance(Cwmt, str):\n return Cwmt.split()\n return Cwmt",
"def aBbO(d7pR):\n if isinstance(d7pR, i7ut.string_types):\n return [d7pR]\n else:\n retur... | [
"0.76964694",
"0.76633644",
"0.7640217",
"0.761414",
"0.75634044",
"0.7097269",
"0.7028365",
"0.7010589",
"0.7004211",
"0.69547397",
"0.691096",
"0.6888124",
"0.6871676",
"0.68629843",
"0.68386835",
"0.6833413",
"0.68145406",
"0.678806",
"0.6777592",
"0.6751101",
"0.6690502",... | 0.0 | -1 |
Initializes the ``SentenceEmbeddings`` layer. | def FIMM(YKHO, mWFP, GPtr):
wOed.__init__(YKHO, mWFP, gMzp, GPtr)
N1Vv.__init__(YKHO, mWFP, gMzp, GPtr)
YKHO.key_inputs = YKHO.stream_keys['inputs']
YKHO.key_outputs = YKHO.stream_keys['outputs']
YKHO.embeddings_size = YKHO.config['embeddings_size']
YKHO.globals['embeddings_size'] = YKHO.embeddi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yyKB(YKHO):\n YKHO.embed = Kb4M.Module('https://tfhub.dev/google/universal-sentence-encoder-large/3', trainable=False)\n with ZylS.variable_scope('sentence_embeddings'):\n WKvO = []\n for YRbF in range(YKHO.num_context_turns):\n WKvO.append(YKHO.embed(ZylS.reshape(YKHO.context_se... | [
"0.6992547",
"0.6580768",
"0.6572183",
"0.65450203",
"0.6494169",
"0.6482835",
"0.6450888",
"0.62993956",
"0.62933344",
"0.62933344",
"0.6282382",
"0.62712455",
"0.6269949",
"0.6252853",
"0.6247738",
"0.6176714",
"0.61685205",
"0.6164771",
"0.6161291",
"0.6145441",
"0.6129795... | 0.6577171 | 2 |
Function returns a dictionary with definitions of output data produced the component. | def Q1jq(YKHO):
return {YKHO.key_outputs: NXGg([-1, -1, YKHO.embeddings_size], [ht2j.Tensor], 'Batch of embedded sentences [BATCH_SIZE x SENTENCE_LENGTH x EMBEDDING_SIZE]')} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uiVo(YKHO) -> cuzp[str, cuzp[str, ImMB]]:\n return {G1Hx: hlel.to_dict() for G1Hx, hlel in YKHO.template.outputs.items()}",
"def Q1jq(YKHO):\n return {}",
"def jSjS(YKHO):\n aT8L = {}\n for n80H in YKHO.provided_outputs:\n aT8L[n80H.full_path] = YKHO.get_value(n80H)\n return aT8L",
... | [
"0.8136349",
"0.7764409",
"0.73960334",
"0.73960334",
"0.73347735",
"0.70787895",
"0.7052765",
"0.69553405",
"0.6941508",
"0.6842331",
"0.67744386",
"0.6764595",
"0.6740655",
"0.67340636",
"0.67235976",
"0.6717084",
"0.66600955",
"0.66551214",
"0.65830207",
"0.6580949",
"0.65... | 0.6888878 | 9 |
Get current CPS Should return a float | def ZUxg(YKHO):
return YKHO._current_cps | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZUxg(YKHO):\n return YKHO.current_cps",
"def ZUxg(YKHO):\n return YKHO.curr_CPS",
"def ZUxg(YKHO):\n return YKHO._current_cps",
"def ZUxg(YKHO):\n return YKHO._current_cps",
"def ZUxg(YKHO):\n return YKHO._current_cps",
"def ZUxg(YKHO):\n return YKHO._cps",
"def ZUxg(YKHO):\n r... | [
"0.74181783",
"0.7388875",
"0.7357009",
"0.7357009",
"0.7357009",
"0.7144441",
"0.71215343",
"0.7039115",
"0.70333546",
"0.70333546",
"0.70187736",
"0.69165146",
"0.68792653",
"0.6864813",
"0.6743252",
"0.6692437",
"0.6552465",
"0.65462667",
"0.6425512",
"0.6425512",
"0.63897... | 0.7484859 | 0 |
Used to return a time series instance with each value being negative of the original. The times are left untouched. | def la4d(YKHO):
i8WE = g3yD.get(YKHO._id)
return QOL6(i8WE.times(), -i8WE.values()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def la4d(YKHO):\n cAPO = [-1 * YKHO._values[YRbF] for YRbF in range(len(YKHO._values))]\n return YXTX(YKHO._times, cAPO)",
"def la4d(YKHO):\n Mkmy = YKHO.copy()\n jzdc = Mkmy._a\n for YRbF in range(len(jzdc)):\n jzdc[YRbF] = -jzdc[YRbF]\n return Mkmy",
"def En_H(YKHO):\n return YXTX... | [
"0.90387475",
"0.71142375",
"0.6874452",
"0.686033",
"0.6653268",
"0.66356343",
"0.65198004",
"0.64852875",
"0.63451195",
"0.6303122",
"0.6290391",
"0.6260359",
"0.62506247",
"0.62217355",
"0.6199504",
"0.6117641",
"0.6111226",
"0.6111226",
"0.60909957",
"0.6053833",
"0.60500... | 0.7518451 | 1 |
Method used to calculate the standard deviation of the time series. | def M1Jx(YKHO, yOAJ=None):
i8WE = g3yD.get(YKHO._id)
return oyIN.std(i8WE._values, ddof=1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ee6l(YKHO):\n raise NotImplementedError",
"def M1Jx(dy_H):\n ifkm = dy_H.std(ddof=0)\n return ifkm",
"def ee6l(BkYD):\n return qw7D.standardDeviation(BkYD)",
"def upUS(YKHO):\n JBMS = YKHO.Mean()\n M1Jx = 0.0\n for WKvO in YKHO.samples:\n M1Jx = M1Jx + epAf.pow(WKvO - JBMS, 2)... | [
"0.82961404",
"0.79881436",
"0.79585296",
"0.77756566",
"0.77456987",
"0.767674",
"0.7674309",
"0.7660493",
"0.762837",
"0.7621232",
"0.7617392",
"0.75994325",
"0.7578437",
"0.7545431",
"0.75250685",
"0.75234205",
"0.7501669",
"0.7479761",
"0.7458045",
"0.7398571",
"0.7379141... | 0.0 | -1 |
This function returns the area of the Rectangle instance | def f0tD(YKHO):
return YKHO.__width * YKHO.__height | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f0tD(YKHO):\n f0tD = YKHO.__width * YKHO.__height\n return f0tD",
"def jGjA(u54L, TVTK):\n f0tD = u54L * TVTK\n return f0tD",
"def f0tD(YKHO):\n f0tD = YKHO.length * YKHO.width\n return f0tD",
"def f0tD(YKHO):\n return rSWe(YKHO.dimensions).area()",
"def f0tD(YKHO):\n return YKH... | [
"0.82542396",
"0.82037956",
"0.8173534",
"0.81071645",
"0.80978245",
"0.8074706",
"0.8074706",
"0.8029734",
"0.80287814",
"0.80287814",
"0.80287814",
"0.80216444",
"0.80216444",
"0.80110294",
"0.8005731",
"0.8005731",
"0.8005731",
"0.8005731",
"0.8004581",
"0.7991116",
"0.797... | 0.7988671 | 21 |
Check whether it is a sequence of some type. | def _vXL(Q6uT, cpuL, n4z0=None):
if n4z0 is None:
DSWN = ftIh.Sequence
else:
assert isinstance(n4z0, type)
DSWN = n4z0
if not isinstance(Q6uT, DSWN):
return False
for ZfUD in Q6uT:
if not isinstance(ZfUD, cpuL):
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _vXL(Q6uT, cpuL, n4z0=None):\n if n4z0 is None:\n DSWN = NBDK.Sequence\n else:\n assert isinstance(n4z0, type)\n DSWN = n4z0\n if not isinstance(Q6uT, DSWN):\n return False\n for ZfUD in Q6uT:\n if not isinstance(ZfUD, cpuL):\n return False\n return ... | [
"0.8258242",
"0.8206704",
"0.81645846",
"0.79976517",
"0.7829905",
"0.77842194",
"0.764908",
"0.76089853",
"0.7603208",
"0.75340915",
"0.7514014",
"0.7493761",
"0.7486896",
"0.74784356",
"0.7460502",
"0.74170816",
"0.73749",
"0.72803265",
"0.72540563",
"0.7207468",
"0.7207468... | 0.8278625 | 0 |
Register a module. A record will be added to `self._module_dict`, whose key is the class name or the specified name, and value is the class itself. It can be used as a decorator or a normal function. | def _ofH(YKHO, mWFP=None, DHvX=False, yR_P=None):
if not isinstance(DHvX, bool):
raise TypeError(f'force must be a boolean, but got {type(DHvX)}')
if isinstance(mWFP, type):
return YKHO.deprecated_register_module(mWFP, force=DHvX)
if yR_P is not None:
YKHO._register_module(module_cla... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _ofH(YKHO, mWFP, yR_P):\n YKHO.modules_[mWFP] = yR_P",
"def gr_i(Emd4, sqb0, YSA3=None):\n if not issubclass(sqb0, PkNZ):\n raise TypeError(f'Modules must inherit from \"ModuleBase\".')\n Emd4.subclasses.append((sqb0, YSA3))\n if YSA3 is not None:\n bo34.info(f'Registered module \"{... | [
"0.7518504",
"0.7147288",
"0.7061053",
"0.7023567",
"0.67617",
"0.6711341",
"0.66049427",
"0.65515256",
"0.6505552",
"0.64885414",
"0.64885414",
"0.6425622",
"0.6367903",
"0.63431835",
"0.63126403",
"0.62476087",
"0.6220827",
"0.62166",
"0.6216143",
"0.6202683",
"0.6152557",
... | 0.6879726 | 4 |
Constructor. Attributes are immutable. | def FIMM(YKHO, F3PV, aZal, XqjA, dFCC, wIje, akib=None):
YKHO.__pool_id = F3PV
YKHO.__rack_barcode = aZal
YKHO.__rack_position = XqjA
YKHO.__tube_barcode = dFCC
YKHO.__concentration = wIje * TTLW
if akib is None:
YKHO.__volume = None
else:
YKHO.__volume = akib * _jmZ
YKHO... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, o8Kj):\n YKHO._attrs = o8Kj",
"def FIMM(YKHO, **o8Kj):\n YKHO.attributes = {} if YKHO.attributes is None else YKHO.attributes\n YKHO.update_attributes(o8Kj)",
"def FIMM(YKHO):\n raise NotImplementedError",
"def FIMM(YKHO):\n raise NotImplementedError",
"def FIMM(YKHO):\n ra... | [
"0.75660825",
"0.75054985",
"0.7214685",
"0.71603477",
"0.71603477",
"0.71603477",
"0.71603477",
"0.71603477",
"0.7104854",
"0.7070677",
"0.7019569",
"0.70131975",
"0.6975963",
"0.6974858",
"0.69739723",
"0.69571245",
"0.69571245",
"0.6957041",
"0.6933751",
"0.69149",
"0.6897... | 0.0 | -1 |
Returns the term for the pool clause (after the operator). | def FzyF(YKHO):
raise NotImplementedError('Abstract method.') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OXAZ(YKHO):\n Q6kx = YKHO.factor()\n while YKHO.current_token.value in ('*', '/', 'DIV', 'MOD', '^'):\n seET = uS0y(YKHO.current_token)\n YKHO.check_token_type('OPERATION')\n Q6kx = Ldrg(Q6kx, seET, YKHO.factor())\n return Q6kx",
"def YfwU():\n return kbpH.nas_get_operator_na... | [
"0.58858377",
"0.5832554",
"0.5828611",
"0.5813999",
"0.58084786",
"0.5795024",
"0.5795024",
"0.5769121",
"0.57215947",
"0.57027894",
"0.5702232",
"0.56637084",
"0.563863",
"0.56097025",
"0.5554247",
"0.5551602",
"0.55323213",
"0.55323213",
"0.55080754",
"0.55039436",
"0.5480... | 0.6518252 | 0 |
Ensure ``PeopleCollection`` has proper string representation. | def Elsq(LtTT):
wzkt = qcWV.datetime(2020, 8, 30, 10, 54, tzinfo=qcWV.timezone.utc)
xUwc = LtTT.build(created_at=wzkt)
assert '<2020-08-30T10:54+00:00>' in str(xUwc)
assert 'example.csv"' in str(xUwc) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OlRK(YKHO):\n YKHO.assertEqual(YKHO.person.__unicode__(), 'Alex Messer')",
"def zAg0(YKHO):\n return str(YKHO.collection)",
"def CwL7(YKHO):\n lgWp = o13x(source='blah')\n YKHO.assertIsInstance(repr(lgWp), str)",
"def aQys(YKHO):\n T1p0 = [('Email', 'test'), ('WTF', 'test2')]\n KCHu = O... | [
"0.64372414",
"0.62132996",
"0.59658116",
"0.59568954",
"0.57237333",
"0.571002",
"0.5697257",
"0.5605748",
"0.55958927",
"0.55718297",
"0.5522637",
"0.55026287",
"0.5476685",
"0.54618675",
"0.5452249",
"0.5434512",
"0.54338837",
"0.54271305",
"0.5414243",
"0.53981483",
"0.53... | 0.7298592 | 0 |
A string representation of this twitter.UserStatus instance. The return value is the same as the JSON string representation. | def zAg0(YKHO):
return YKHO.AsJsonString() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return '{0} : {1} | {2}'.format(YKHO.user_status_id, YKHO.user_id.email, YKHO.updated_time)",
"def wHJl(YKHO) -> str:\n return f'<SessionStatus status=\"{YKHO.status}\" />'",
"def jGRS(YKHO):\n return str(YKHO.data['status'])",
"def jGRS(YKHO) -> str:\n return laHg.cast(str, YKH... | [
"0.73418486",
"0.70453846",
"0.70209247",
"0.6866316",
"0.6866316",
"0.6866316",
"0.6866316",
"0.6866316",
"0.6866316",
"0.6832015",
"0.6779341",
"0.6731119",
"0.67231977",
"0.67170656",
"0.67109853",
"0.67109853",
"0.67109853",
"0.67109853",
"0.6644649",
"0.6586322",
"0.6551... | 0.0 | -1 |
A JSON string representation of this twitter.UserStatus instance. | def DOHU(YKHO):
return qQXR.dumps(YKHO.AsDict(), sort_keys=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VLTN():\n CBIr = mv1M.query.filter_by(id=Oa1e.token_data['user_id']).first()\n Aofo = KyKO.dump(CBIr)[0]\n return pz3A(Aofo)",
"def jGRS():\n return qQXR.dumps({})",
"def zAg0(YKHO):\n return '{0} : {1} | {2}'.format(YKHO.user_status_id, YKHO.user_id.email, YKHO.updated_time)",
"def jGRS(Y... | [
"0.72035897",
"0.6939799",
"0.682953",
"0.6766619",
"0.6651518",
"0.6579848",
"0.6579848",
"0.6579848",
"0.6579848",
"0.6579848",
"0.6579848",
"0.65788794",
"0.65772957",
"0.6567659",
"0.651591",
"0.64961666",
"0.6489312",
"0.64860237",
"0.64518625",
"0.64439774",
"0.6442336"... | 0.0 | -1 |
A dict representation of this twitter.UserStatus instance. The return value uses the same key names as the JSON representation. | def anFX(YKHO):
nPrm = {}
if YKHO.name:
nPrm['name'] = YKHO.name
if YKHO.id:
nPrm['id'] = YKHO.id
if YKHO.id_str:
nPrm['id_str'] = YKHO.id_str
if YKHO.screen_name:
nPrm['screen_name'] = YKHO.screen_name
if YKHO.following:
nPrm['following'] = YKHO.following... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _fYl(YKHO):\n return {'username': YKHO.username, 'type': YKHO.type, 'email': YKHO.email, 'create_date': YKHO.create_date}",
"def MNRr(YKHO) -> dict:\n return {'username': YKHO.username, 'level': str(YKHO.level)}",
"def MNRr(YKHO) -> cuzp:\n tbx9 = {}\n if hasattr(YKHO, 'status') and YKHO.status... | [
"0.7039259",
"0.7029584",
"0.7008047",
"0.699732",
"0.6983705",
"0.69693166",
"0.6951377",
"0.69246477",
"0.69119376",
"0.6859809",
"0.68535614",
"0.6814746",
"0.67843366",
"0.67530084",
"0.67316604",
"0.6724768",
"0.67231154",
"0.67155856",
"0.66989654",
"0.66899395",
"0.668... | 0.0 | -1 |
Get the geographic location of this user. | def yuHr(YKHO):
return YKHO._location | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pBSi(YKHO):\n return YKHO._geo_location",
"def hbd3(YKHO):\n if YKHO.ip_address is not None:\n return YKHO.gis.lat_lon(YKHO.ip_address)",
"def pBSi(YKHO) -> hqbZ:\n return hqbZ()",
"def hx3m(YKHO):\n return YKHO._user_location_info",
"def zADr():\n Oa1e = Yha6.ip('me')\n print(... | [
"0.79892755",
"0.7925014",
"0.7455642",
"0.7347451",
"0.730759",
"0.7301833",
"0.72881377",
"0.72088015",
"0.72088015",
"0.72088015",
"0.71704644",
"0.71178955",
"0.71011126",
"0.709518",
"0.7021141",
"0.7021141",
"0.6941328",
"0.6941328",
"0.693973",
"0.69339365",
"0.6882326... | 0.7146771 | 11 |
Set the geographic location of this user. | def MtGr(YKHO, Rci7):
YKHO._location = Rci7 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NE4R(YKHO, fOel, Hdan):\n YKHO.lat = fOel\n YKHO.lng = Hdan",
"def pBSi(YKHO, pBSi):\n YKHO._geo_location = pBSi",
"def QDqo(YKHO, Rci7):\n YKHO.loc = Rci7",
"def QDqo(YKHO, _UuI, fopC, yzQA):\n YKHO.elevation = yzQA\n YKHO.longitude, YKHO.latitude = (fopC, _UuI)\n YKHO.location = XU... | [
"0.70179206",
"0.67728543",
"0.6686128",
"0.6681716",
"0.65903926",
"0.6574886",
"0.6446588",
"0.6427239",
"0.64248794",
"0.6411043",
"0.63022274",
"0.62818545",
"0.6263374",
"0.61768615",
"0.61696965",
"0.6168837",
"0.61575574",
"0.6152426",
"0.6152426",
"0.6152426",
"0.6152... | 0.62929964 | 11 |
Get the friend count for this user. | def n7di(YKHO):
return YKHO._friends_count | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n1Iq(CBIr):\n return len(CBIr['friends'])",
"def n1Iq(CBIr):\n return len(CBIr['friends'])",
"def n1Iq(CBIr):\n uJjO = CBIr['id']\n V4PE = aSzr[uJjO]\n return len(V4PE)",
"def n1Iq(CBIr):\n return len(CBIr['friends'])",
"def DUZc(YKHO, xDpu=TlfK.ALL):\n return YKHO._iface.get_count... | [
"0.77989566",
"0.77989566",
"0.7643393",
"0.756506",
"0.72589666",
"0.7184269",
"0.70880634",
"0.7075223",
"0.698525",
"0.6929411",
"0.6925133",
"0.6909322",
"0.6767676",
"0.67372036",
"0.6710649",
"0.6695508",
"0.6628136",
"0.65888166",
"0.65609694",
"0.6556613",
"0.65150374... | 0.8244497 | 0 |
Get the number of status updates for this user. | def NKzR(YKHO):
return YKHO._statuses_count | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Jw_g(YKHO):\n return YKHO._num_updates",
"def Z2Rx(YKHO):\n return YKHO.pending_update_count",
"def BBOS(YKHO):\n return YKHO.count_updated",
"def XZmZ(YKHO) -> int:\n return x0hE.Client(YKHO.URI).post('KYC_getStatusCount')",
"def QdZT(YKHO):\n NArs = uRlK.urlencode([('user', YKHO.user),... | [
"0.7351694",
"0.6870198",
"0.68637925",
"0.6748206",
"0.669832",
"0.6539263",
"0.65296876",
"0.6529068",
"0.6460631",
"0.6426256",
"0.6397108",
"0.63080186",
"0.6298236",
"0.6218954",
"0.6182255",
"0.61816597",
"0.61556256",
"0.61203027",
"0.6114911",
"0.61103445",
"0.6104124... | 0.70059484 | 1 |
Get the setting of geo_enabled for this user. | def LHUo(YKHO):
return YKHO._geo_enabled | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pBSi(YKHO):\n return YKHO._geo_location",
"def YDCv(YKHO, OHSi):\n YKHO._geo_enabled = OHSi",
"def YbrJ(YKHO):\n UxQk = YKHO._get_geo_view()\n return UxQk",
"def TuoA(YKHO: object) -> _iHC:\n return YKHO.__geo",
"def cCDN(YKHO):\n return YKHO._projstr == 'LONG/LAT'",
"def cCDN(YKHO)... | [
"0.6193208",
"0.6134547",
"0.61160874",
"0.6072421",
"0.594696",
"0.594696",
"0.5911424",
"0.58461905",
"0.58316016",
"0.5797341",
"0.5785532",
"0.5785532",
"0.5729206",
"0.5709717",
"0.56880367",
"0.56850743",
"0.568229",
"0.5678921",
"0.5678921",
"0.5678921",
"0.5678921",
... | 0.8324613 | 0 |
Get the setting of created_at for this user. | def qak5(YKHO):
return YKHO._created_at | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def created_at(YKHO):\n nPrm = await YKHO.login()\n return nPrm['selectedProfile']['createdAt']",
"def aJ2e(YKHO):\n return YKHO._created_at",
"def aJ2e(YKHO):\n return YKHO._created_at",
"def aJ2e(YKHO):\n return YKHO._created_at",
"def aJ2e(YKHO):\n return YKHO._created_at",
"de... | [
"0.77346957",
"0.7690093",
"0.7690093",
"0.7690093",
"0.7690093",
"0.7690093",
"0.7690093",
"0.7690093",
"0.7690093",
"0.7690093",
"0.7690093",
"0.7690093",
"0.7690093",
"0.7690093",
"0.7690093",
"0.7690093",
"0.7690093",
"0.7690093",
"0.7690093",
"0.7690093",
"0.7690093",
... | 0.73417765 | 80 |
A string representation of this twitter.User instance. The return value is the same as the JSON string representation. | def zAg0(YKHO):
return YKHO.AsJsonString() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n return f'<User user_id={YKHO.user_id} first_name={YKHO.first_name} last_name={YKHO.last_name} email={YKHO.email} password={YKHO.password}>'",
"def wHJl(YKHO):\n return '<User information: user_id={} first_name={} last_name={} email={} password={}>'.format(YKHO.user_id, YKHO.first_name, YK... | [
"0.77041733",
"0.7643571",
"0.7599144",
"0.7570799",
"0.75509924",
"0.7538848",
"0.75274706",
"0.7514447",
"0.75050604",
"0.75050604",
"0.75050604",
"0.74922574",
"0.74684054",
"0.74612945",
"0.74513704",
"0.74471664",
"0.7442481",
"0.74228704",
"0.7409763",
"0.7406504",
"0.7... | 0.0 | -1 |
A JSON string representation of this twitter.User instance. | def DOHU(YKHO):
return qQXR.dumps(YKHO.AsDict(), sort_keys=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qQXR(YKHO):\n return qQXR.dumps({'id': YKHO.id, 'name': YKHO.username, 'email': YKHO.email, 'password': YKHO.password, 'isDriver': YKHO.isDriver})",
"def Napc(YKHO):\n return {'user_id': YKHO.user_id, 'username': YKHO.username, 'email': YKHO.email}",
"def Napc(YKHO):\n return {'name': YKHO.user_na... | [
"0.7905041",
"0.7893482",
"0.77384806",
"0.75872445",
"0.7540919",
"0.749679",
"0.7485609",
"0.74587446",
"0.7402465",
"0.7364793",
"0.7360239",
"0.73367083",
"0.73225904",
"0.7299212",
"0.72731906",
"0.727196",
"0.72712535",
"0.7269837",
"0.7268859",
"0.72676283",
"0.7265224... | 0.0 | -1 |
A dict representation of this twitter.User instance. The return value uses the same key names as the JSON representation. | def anFX(YKHO):
nPrm = {}
if YKHO.id:
nPrm['id'] = YKHO.id
if YKHO.name:
nPrm['name'] = YKHO.name
if YKHO.screen_name:
nPrm['screen_name'] = YKHO.screen_name
if YKHO.location:
nPrm['location'] = YKHO.location
if YKHO.description:
nPrm['description'] = YKHO... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MNRr(YKHO):\n VCCg = {'id': YKHO.identifier, 'full_name': YKHO.full_name, 'username': YKHO.username, 'email': YKHO.email, 'created_at': YKHO.created_at}\n return VCCg",
"def Napc(YKHO):\n return {'name': YKHO.user_name, 'email': YKHO.user_email, 'id': YKHO.id}",
"def Napc(YKHO):\n return {'user... | [
"0.8358101",
"0.8349657",
"0.82885855",
"0.8202079",
"0.8118885",
"0.8075504",
"0.7981024",
"0.79659903",
"0.7869754",
"0.78642064",
"0.7824511",
"0.77779514",
"0.7770479",
"0.77544063",
"0.7753561",
"0.77244735",
"0.7702134",
"0.7700098",
"0.7688572",
"0.7686932",
"0.7678616... | 0.0 | -1 |
extract Device info from the xml | def FiQf(hGN5):
NDqQ = QGpr.fromstring(hGN5)
aTKJ = NDqQ.nsmap
aTKJ['default'] = aTKJ[None]
u3jk = NDqQ.find('default:device', aTKJ)
Op6c = {'friendlyName': l0PZ(u3jk, aTKJ, 'friendlyName'), 'modelName': l0PZ(u3jk, aTKJ, 'modelName'), 'modelNumber': l0PZ(u3jk, aTKJ, 'modelNumber'), 'manufacturer': l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PpEm(YKHO):\n Aofo = YKHO.send_request('/api/device/information', '', '')\n if YKHO.parse_xml(Aofo):\n wN9s = YKHO.getText(YKHO.xml_response[0].getElementsByTagName('DeviceName')[0].childNodes)\n Hfh1 = YKHO.getText(YKHO.xml_response[0].getElementsByTagName('SerialNumber')[0].childNodes)\n ... | [
"0.7602639",
"0.67782164",
"0.66680056",
"0.6621655",
"0.6594897",
"0.6570566",
"0.65108764",
"0.64885837",
"0.64585257",
"0.64355093",
"0.6368871",
"0.6353894",
"0.6346883",
"0.63373506",
"0.63322484",
"0.6312265",
"0.63061494",
"0.62767345",
"0.62716526",
"0.6271552",
"0.62... | 0.0 | -1 |
Returns the given itf code as tuple of it's main part and check digit. | def TnT9(gkkU: int) -> AzJI[int, int]:
*vB6P, gV46 = BHGE(gkkU)
Wxnj = 0
for YRbF, exwG in enumerate(reversed(vB6P)):
Wxnj += exwG * 10 ** YRbF
return (Wxnj, gV46) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def u5Qy(gkkU: int) -> bool:\n Wxnj, eqtB = TnT9(gkkU)\n return jChZ(Wxnj) == eqtB",
"def iAJu() -> AzJI[str, int]:\n Wxnj = '\\n'.join((f'case{YRbF} = {RhGk}' for YRbF, (RhGk, aEqx) in enumerate(QuC9)))\n JRSX = len([aEqx for RhGk, aEqx in QuC9 if aEqx is not None])\n return (Wxnj, JRSX)",
"def... | [
"0.5805137",
"0.5772286",
"0.5729581",
"0.5702738",
"0.5623992",
"0.5623992",
"0.54610515",
"0.54134744",
"0.5393439",
"0.5385345",
"0.53849876",
"0.5327349",
"0.53103095",
"0.5284746",
"0.52724886",
"0.5254205",
"0.5244109",
"0.52384585",
"0.5236024",
"0.52061117",
"0.519472... | 0.7612197 | 0 |
Return gold labels as a list. | def tidl(YKHO):
return YKHO.gold_events | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T4t1(YKHO):\n return YKHO.labels",
"def Te1x(YKHO) -> list:\n return []",
"def Crrw():\n return list(uzmd)",
"def Te1x(YKHO):\n return []",
"def Te1x(YKHO):\n return []",
"def Crrw(YKHO) -> x1iM[str]:\n pass",
"def Te1x(YKHO):\n Crrw = []\n for UXqs in YKHO.instance.labels:\... | [
"0.8024919",
"0.7512072",
"0.73652637",
"0.73571116",
"0.73571116",
"0.7270462",
"0.72379744",
"0.7115747",
"0.7053883",
"0.70191157",
"0.6988609",
"0.6988609",
"0.69152373",
"0.68769526",
"0.6845731",
"0.681669",
"0.68125385",
"0.6811582",
"0.6800308",
"0.6791531",
"0.679092... | 0.0 | -1 |
Encode an integer to bytes. | def jw7B(i1fZ, u54L, wuLw, sbx9, BWXx):
if sbx9 and BWXx == 0:
return b''
if (i1fZ and 128 > BWXx >= -128 or (not i1fZ and BWXx < 256)) and wuLw:
u54L = 1
return Gv0t.to_bytes(BWXx, u54L, 'big', signed=i1fZ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Q66e(YRbF: int) -> bytearray:\n return YRbF.to_bytes(uvAw, M6EL)",
"def KA36(BWXx: int) -> bytes:\n return bytes(str(BWXx), 'utf-8')",
"def baW7(YKHO, kAne, Fb9w):\n return kAne.to_bytes(Fb9w, byteorder='big')",
"def KA36(EfNi, abwh='big'):\n return EfNi.to_bytes(max(1, pqtO(EfNi.bit_length()... | [
"0.8486857",
"0.7965832",
"0.75754637",
"0.7401901",
"0.73744315",
"0.73447526",
"0.7343153",
"0.7328649",
"0.73075205",
"0.7294454",
"0.7293963",
"0.7238046",
"0.7210634",
"0.7191424",
"0.71142805",
"0.7105544",
"0.70900154",
"0.70900154",
"0.70691735",
"0.70604897",
"0.7022... | 0.7081432 | 18 |
Method to get and print the list of unique categories a creat a result list 1 travle the list 2 get the category 3 if the category is not in a result list, push it | def OA2J():
LeZt = []
for ZfUD in nPrm:
ACia = ZfUD['category']
if ACia not in LeZt:
LeZt.append(ACia)
print(LeZt) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _BO_():\n IEKB = []\n yXyL = []\n XRgd = []\n AG34 = []\n dPsy = []\n Ott2 = []\n izF1 = []\n anr9 = []\n for d6pt, Ghho in enumerate(mi_m):\n if Ghho == 'hockey':\n IEKB.append(MGN_[d6pt])\n elif Ghho == 'movies':\n yXyL.append(MGN_[d6pt])\n ... | [
"0.6607377",
"0.6509888",
"0.6424001",
"0.6417399",
"0.6412158",
"0.6399719",
"0.63761437",
"0.63322556",
"0.6287051",
"0.62675804",
"0.6190364",
"0.6179363",
"0.60414296",
"0.601315",
"0.60060984",
"0.59806055",
"0.59558135",
"0.59366",
"0.5910374",
"0.58901876",
"0.58876383... | 0.7065954 | 0 |
For the entire graph, compute the subpixel offsets using patternmatching and add the result as an attribute to each edge of the graph. | def eBzY(YKHO, WQD6=[], gwAu=0.8, KLh8=16, pXew=19, hIS5=53, aQmi=1.0, iRUZ=1.0, vftQ=False):
hHld = YKHO.matches
YKHO.subpixel_offsets = rLdf.DataFrame(0, index=hHld.index, columns=['x_offset', 'y_offset', 'correlation', 's_idx', 'd_idx'])
if WQD6:
hHld, ZHfW = YKHO._clean(WQD6)
if vftQ is True... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GRxT(YKHO):\n o8NP = YKHO.labelled_img\n ilaT = YKHO.n_superpixels\n M1C2 = oyIN.roll(o8NP, [1, 0])\n M1C2[0, :] = o8NP[0, :]\n M1C2 = M1C2.flatten()\n sb_b = oyIN.roll(o8NP, [-1, 0])\n sb_b[-1, :] = o8NP[-1, :]\n sb_b = sb_b.flatten()\n LFlW = oyIN.roll(o8NP, [0, 1])\n LFlW[:, 0]... | [
"0.5735423",
"0.55424094",
"0.5535039",
"0.53181714",
"0.5302194",
"0.52828026",
"0.525584",
"0.5227468",
"0.52252156",
"0.51669604",
"0.510551",
"0.5093819",
"0.5091213",
"0.50805575",
"0.50745904",
"0.50383645",
"0.50353503",
"0.5028878",
"0.5023792",
"0.50017333",
"0.49946... | 0.53879476 | 3 |
Compute the ratio $area_{convexhull} / area_{imageoverlap}$. Returns | def uhuX(YKHO, WQD6=[]):
if YKHO.homography is None:
raise AttributeError('A homography has not been computed. Unable to determine image overlap.')
hHld = YKHO.matches
if WQD6:
hHld, bGrB = YKHO._clean(WQD6)
j_H9 = hHld['destination_idx'].values
BR8K = YKHO.destination.keypoints.iloc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nzH1(YKHO):\n MKlR = YKHO.hull\n if not oyIN.alltrue(MKlR[0] == MKlR[-1]):\n MKlR = oyIN.vstack((MKlR, MKlR[0]))\n KCHu = MKlR[:-1, 0] * MKlR[1:, 1] - MKlR[1:, 0] * MKlR[:-1, 1]\n return KCHu.sum() / 2.0",
"def TdEd(xUwc):\n mQYJ = us1T(xUwc)\n return LBWB.area(mQYJ) / LBWB.area(LBWB... | [
"0.7656744",
"0.71915245",
"0.7098582",
"0.6845667",
"0.67914736",
"0.6690252",
"0.6684049",
"0.6675491",
"0.6643979",
"0.6630308",
"0.6527318",
"0.6525764",
"0.6518716",
"0.6513956",
"0.65096074",
"0.6508275",
"0.6507522",
"0.64997",
"0.6493908",
"0.64782614",
"0.6473184",
... | 0.65876085 | 10 |
Sets the completed_on of this PipelineStepAllOf. | def Fa5I(YKHO, Fa5I):
YKHO._completed_on = Fa5I | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g9mP(YKHO, g9mP):\n YKHO._completed = g9mP",
"def g9mP(YKHO, g9mP):\n YKHO._completed = g9mP",
"def g9mP(YKHO, g9mP: bool):\n YKHO._completed = g9mP",
"def g9mP(YKHO):\n YKHO.completed_at = qcWV.utcnow()\n YKHO.status = yEil.completed",
"def fD8_(YKHO):\n YKHO.completed = EeAB()\n ... | [
"0.69823486",
"0.69823486",
"0.6918354",
"0.6545584",
"0.64446306",
"0.6395997",
"0.6371473",
"0.6371473",
"0.6306141",
"0.62502366",
"0.61871237",
"0.60724795",
"0.60261446",
"0.60095465",
"0.60095465",
"0.60095465",
"0.59732693",
"0.59313756",
"0.59313756",
"0.58722353",
"0... | 0.7651693 | 0 |
Sets the started_on of this PipelineStepAllOf. | def g6JE(YKHO, g6JE):
YKHO._started_on = g6JE | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ye8G(YKHO, Ye8G):\n YKHO._start_on = Ye8G",
"def Ye8G(YKHO, Ye8G):\n YKHO._start_on = Ye8G",
"def KAOn(YKHO, KAOn):\n YKHO._started = KAOn",
"def KAOn(YKHO, KAOn):\n YKHO._started = KAOn",
"def PiT5(YKHO, PiT5):\n YKHO._started_at = PiT5",
"def PiT5(YKHO, PiT5):\n YKHO._started_at =... | [
"0.66023636",
"0.66023636",
"0.64829826",
"0.64829826",
"0.59657866",
"0.59657866",
"0.59657866",
"0.59657866",
"0.59657866",
"0.5664585",
"0.5624267",
"0.5605386",
"0.5597976",
"0.5504336",
"0.54965293",
"0.54798365",
"0.54176784",
"0.53821003",
"0.53756475",
"0.5369932",
"0... | 0.72341937 | 0 |
Returns the string representation of the model | def gTzM(YKHO):
return CgYo.pformat(YKHO.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return YKHO.text",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\... | [
"0.86418265",
"0.85103965",
"0.7853324",
"0.77442306",
"0.7712258",
"0.76979405",
"0.765959",
"0.7637644",
"0.76218504",
"0.7607561",
"0.7606604",
"0.7606604",
"0.7606604",
"0.75990754",
"0.7585653",
"0.758149",
"0.7570811",
"0.7567585",
"0.75392604",
"0.75392604",
"0.7527967... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.8392633",
"0.8354901",
"0.82950056",
"0.8132309",
"0.81149805",
"0.8099986",
"0.809911",
"0.8097883",
"0.8097883",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8066694",
"0.80594814",
"0.805757",
... | 0.0 | -1 |
Take an array of shape (n, height, width) or (n, height, width , 3) and visualize each (height, width) thing in a grid of size approx. sqrt(n) by sqrt(n) | def bMp6(oI5r, nPrm, type):
nPrm = (nPrm - nPrm.min()) / (nPrm.max() - nPrm.min())
exwG = int(oyIN.ceil(oyIN.sqrt(nPrm.shape[0])))
dvgN = ((0, exwG ** 2 - nPrm.shape[0]), (0, 1), (0, 1)) + ((0, 0),) * (nPrm.ndim - 3)
nPrm = oyIN.pad(nPrm, dvgN, mode='constant', constant_values=1)
nPrm = nPrm.reshape... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wsM1(exwG, nPrm, a1PO, vC9B, yzQ0):\n assert oyIN.shape(nPrm)[1] == len(a1PO)\n for YRbF in range(len(a1PO)):\n if a1PO[YRbF] == exwG:\n QrM1.figure()\n QrM1.imshow(oyIN.reshape(nPrm[:, YRbF], (vC9B, yzQ0)))\n QrM1.title('t= %d, i = %d' % (a1PO[YRbF], YRbF))",
"d... | [
"0.67647994",
"0.65392685",
"0.646202",
"0.643858",
"0.643858",
"0.643858",
"0.64300287",
"0.6402409",
"0.64002866",
"0.63573205",
"0.6319981",
"0.6234232",
"0.6171998",
"0.6168728",
"0.6162474",
"0.61524624",
"0.6133212",
"0.6127137",
"0.6122956",
"0.6105142",
"0.60876876",
... | 0.0 | -1 |
Set up the mysensors platform for covers. | async def async_setup_platform(ajET, GPtr, QEEk, tR5e=None):
L3zE.setup_mysensors_platform(ajET, Sugg, tR5e, sAkZ, async_add_entities=QEEk) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AbqV(ajET, GPtr, deL4, tR5e=None):\n deL4([uJTP(ajET, GPtr)])",
"def AbqV(ajET, GPtr, deL4, tR5e=None):\n U4Ya = GPtr.get(BiEj)\n oB5g = GPtr.get(kGpn)\n YfpN = []\n for XtFw in oB5g:\n YfpN.append(ePCY(U4Ya, XtFw['school'], XtFw, ajET))\n deL4(YfpN, True)",
"def AbqV(ajET: HomeAss... | [
"0.658925",
"0.64888024",
"0.64750004",
"0.6383139",
"0.6365058",
"0.634075",
"0.63241297",
"0.6310232",
"0.6302304",
"0.6296211",
"0.6244884",
"0.622971",
"0.6227641",
"0.6216809",
"0.6201706",
"0.6201624",
"0.6187878",
"0.6180274",
"0.61769885",
"0.6176147",
"0.6175045",
... | 0.6540897 | 1 |
Return True if cover is closed. | def SEEh(YKHO):
trRF = YKHO.gateway.const.SetReq
if trRF.V_DIMMER in YKHO._values:
return YKHO._values.get(trRF.V_DIMMER) == 0
return YKHO._values.get(trRF.V_LIGHT) == iKVK | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SEEh(YKHO) -> bool:\n return YKHO.get_cover_state() == ovfH.CLOSED",
"def SEEh(YKHO):\n return YKHO.current_cover_position <= 0",
"def SEEh(YKHO):\n if YKHO.current_cover_position is None:\n return None\n if YKHO.current_cover_position > 0:\n return False\n return True",
"def... | [
"0.8616386",
"0.84980077",
"0.83917546",
"0.82759196",
"0.81010723",
"0.80393034",
"0.76759243",
"0.76003736",
"0.7441859",
"0.74409276",
"0.7415746",
"0.7268983",
"0.7265506",
"0.71773607",
"0.71669465",
"0.7110673",
"0.71055144",
"0.7080812",
"0.70460534",
"0.703075",
"0.70... | 0.0 | -1 |
Binary form of focal loss. FL(p_t) = alpha (1 p_t)gamma log(p_t) where p = sigmoid(x), p_t = p or 1 p depending on if the label is 1 or 0, respectively. | def wrzg(KMvS=2.0, Cwt5=0.25):
def tWbS(Y8eF, aMgO):
"""
:param y_true: A tensor of the same shape as `y_pred`
:param y_pred: A tensor resulting from a sigmoid
:return: Output tensor.
"""
Y8eF = ZylS.cast(Y8eF, ZylS.float32)
_hZ2 = nMvt.epsilon()
aMg... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UYCc(Crrw, KeL5, Cwt5, KMvS):\n UoqH = vuvg.binary_cross_entropy_with_logits(input=KeL5, target=Crrw, reduction='none')\n if KMvS == 0.0:\n hGOF = 1.0\n else:\n hGOF = ht2j.exp(-KMvS * Crrw * KeL5 - KMvS * ht2j.log(1 + ht2j.exp(-1.0 * KeL5)))\n N77f = hGOF * UoqH\n CDqf = Cwt5 * N7... | [
"0.8036702",
"0.7950859",
"0.79070985",
"0.7565158",
"0.75503224",
"0.7546777",
"0.75437725",
"0.75406545",
"0.74626637",
"0.73718417",
"0.72746074",
"0.72374856",
"0.7230973",
"0.720934",
"0.7187314",
"0.71849626",
"0.71729255",
"0.7153448",
"0.71445584",
"0.7112228",
"0.708... | 0.7174868 | 16 |
r"""Compute focal loss for predictions. | def PMKY(Yane, zvoY, _mSQ=None, Cwt5=0.25, KMvS=2):
D2H6 = ZylS.nn.sigmoid(Yane)
VNqG = _WqI.zeros_like(D2H6, dtype=D2H6.dtype)
FdWJ = _WqI.where(zvoY > VNqG, zvoY - D2H6, VNqG)
umU7 = _WqI.where(zvoY > VNqG, VNqG, D2H6)
OVUb = -Cwt5 * FdWJ ** KMvS * ZylS.log(ZylS.clip_by_value(D2H6, 1e-08, 1.0)) - ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jIYe(Y8eF, aMgO):\n ZylS.debugging.check_numerics(aMgO, 'ytrue in focal')\n ZylS.debugging.check_numerics(Y8eF, 'ytrue in focal')\n Crrw = Y8eF[:, :, :-1]\n XFF7 = Y8eF[:, :, -1]\n EYDd = aMgO\n _0VL = ZylS.compat.v1.where(ZylS.not_equal(XFF7, -1))\n Crrw = ZylS.gather_nd(Crrw, _0VL)\n ... | [
"0.7949579",
"0.79374814",
"0.79359215",
"0.79333866",
"0.79333866",
"0.7801037",
"0.7766647",
"0.77334535",
"0.7731676",
"0.7602497",
"0.75661397",
"0.7535222",
"0.7512803",
"0.74640775",
"0.7399277",
"0.7338121",
"0.72873217",
"0.7252959",
"0.7229826",
"0.72276205",
"0.7077... | 0.6580112 | 46 |
Takes a list of strings, returns a list of lat,long tuples | def Mcvp(YKHO, nvWN):
jNOo = []
for C6id in nvWN:
hksT = YKHO.geolocator.geocode(C6id)
SjLr = (hksT.latitude, hksT.longitude)
print(C6id, SjLr)
jNOo.append(SjLr)
return jNOo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W0Eb(kcnO):\n yv6U = []\n TuoA = G5Ag()\n for YRbF in kcnO:\n try:\n hksT = TuoA.geocode(YRbF)\n fZEQ = [hksT.latitude, hksT.longitude]\n yv6U.append(fZEQ)\n except:\n pass\n return yv6U",
"def W0Eb(nPrm):\n yv6U = []\n for zFiD in n... | [
"0.7666172",
"0.7558105",
"0.74607897",
"0.7335745",
"0.73292285",
"0.7195357",
"0.7058465",
"0.69977653",
"0.69186115",
"0.6880956",
"0.6793295",
"0.67561424",
"0.6750298",
"0.66912556",
"0.66581565",
"0.66552436",
"0.6647191",
"0.6630202",
"0.66192067",
"0.66171396",
"0.660... | 0.59361833 | 82 |
Get the URI of a photo coming from Medusa. | def dA1Z(C7_O):
return 'photo/' + C7_O.strip().lower().replace('.jpg', '') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T8F2(RYGS):\n return RYGS + '/location'",
"def TRiq(YKHO, KAOR):\n QePW = YKHO.context.get('request')\n HgP7 = KAOR.image_file.url\n return QePW.build_absolute_uri(HgP7)",
"def RYGS(YKHO) -> str:\n return YKHO._values.get('image_uri')",
"def iV4L(_FWE):\n RYGS = _FWE\n return RYGS",
... | [
"0.7388452",
"0.717122",
"0.7164323",
"0.7026173",
"0.70113665",
"0.7007695",
"0.6939641",
"0.68560404",
"0.68253654",
"0.6821878",
"0.6785195",
"0.6726095",
"0.671477",
"0.66708046",
"0.66519976",
"0.665142",
"0.6614218",
"0.66019547",
"0.65938455",
"0.65930617",
"0.65700245... | 0.7051286 | 3 |
The URI of the location where a photo was taken. | def T8F2(RYGS):
return RYGS + '/location' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TRiq(YKHO, KAOR):\n QePW = YKHO.context.get('request')\n HgP7 = KAOR.image_file.url\n return QePW.build_absolute_uri(HgP7)",
"def j8eK(YKHO):\n if YKHO.hasurl():\n return YKHO.url()\n elif YKHO.hasfilename():\n return YKHO.filename()\n else:\n raise ValueError('No URI d... | [
"0.7178927",
"0.68237495",
"0.68237495",
"0.681255",
"0.6744847",
"0.6743339",
"0.6629073",
"0.6620886",
"0.65552837",
"0.65089005",
"0.65039253",
"0.6452506",
"0.64483786",
"0.6443",
"0.64363915",
"0.6411196",
"0.6409289",
"0.6399282",
"0.6398382",
"0.6389499",
"0.6386361",
... | 0.7003675 | 1 |
Sets the learning rate to the initial LR decayed by 10 every 30 epochs | def e_63(K0do, tspZ):
for Lwm5 in K0do.param_groups:
Lwm5['lr'] = tspZ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e_63(K0do, qtWj):\n nIX4 = nIX4 * 0.1 ** ((qtWj - 117) // 30)",
"def e_63(K0do, qtWj, qIxc):\n tspZ = qIxc.lr * 0.1 ** (qtWj // 30)\n K0do.state_dict()['param_groups'][-1]['lr'] = tspZ",
"def e_63(ma4o, K0do, qtWj, ctbl):\n tspZ = ma4o * 0.1 ** (qtWj // int(epAf.ceil(30.0 / ctbl)))\n for Lwm... | [
"0.7991837",
"0.7940576",
"0.78895533",
"0.78278863",
"0.7822731",
"0.78170556",
"0.7810941",
"0.78027624",
"0.77914375",
"0.7788607",
"0.7782131",
"0.7765793",
"0.77645",
"0.77609223",
"0.7749379",
"0.7739108",
"0.7731853",
"0.77242327",
"0.77121335",
"0.7708826",
"0.7704794... | 0.0 | -1 |
Generates the characters from `c1` to `c2`, exclusive. | def KbDL(dg7v, iYf1):
for Z9rn in range(ord(dg7v), ord(iYf1)):
yield chr(Z9rn) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KbDL(dg7v, iYf1):\n for Z9rn in range(ord(dg7v), ord(iYf1) + 1):\n yield chr(Z9rn)",
"def KbDL(dg7v, iYf1):\n for Z9rn in Ni9Y(ord(dg7v), ord(iYf1) + 1):\n yield chr(Z9rn)",
"def KbDL(dg7v, iYf1):\n for Z9rn in Ni9Y(ord(dg7v), ord(iYf1) + 1):\n yield chr(Z9rn)",
"def KbDL(dg... | [
"0.80240095",
"0.80230707",
"0.80230707",
"0.80230707",
"0.80230707",
"0.80017257",
"0.80017257",
"0.80017257",
"0.80017257",
"0.80017257",
"0.7998687",
"0.7107758",
"0.64828825",
"0.6113666",
"0.5994296",
"0.59398836",
"0.58159226",
"0.58063006",
"0.5767609",
"0.5758993",
"0... | 0.79161185 | 11 |
Get all column names. | def XUX0(vvSS):
return [iVRZ.key for iVRZ in vvSS.__table__.columns] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Txl5(YKHO):\n return YKHO.implementation.col_names",
"def iDDg(YKHO):\n return YKHO.columns",
"def Txl5(YKHO):\n return YKHO._data.columns()",
"def iQng(YKHO):\n if YKHO._columns is None:\n YKHO._FillDataBucket()\n return YKHO._columns",
"def Txl5(YKHO):\n return YKHO._column_n... | [
"0.82983255",
"0.8197376",
"0.8184723",
"0.81726915",
"0.8172273",
"0.8169388",
"0.8150504",
"0.8134898",
"0.8111558",
"0.81099147",
"0.80902946",
"0.80829084",
"0.80738366",
"0.80658674",
"0.8064242",
"0.79784155",
"0.79482",
"0.79136366",
"0.7908891",
"0.7905866",
"0.788936... | 0.704904 | 79 |
Test a variety of bad requests, make sure that we get some sort of error | def DKYF(htiv, NBX3):
YPtW = ['', [], tuple()]
if NBX3 == 'clear':
for tO9_ in YPtW:
U5bT = htiv.send(tO9_, timeout=5, tries=1)
assert U5bT == 'payload and load must be a dict'
else:
for tO9_ in YPtW:
with trZe.raises(NTfD.exceptions.AuthenticationError):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yCvN():\n eiwY()\n SVUK()",
"def wvD4(bD7m):\n Z_fq = 0\n for YRbF in range(10):\n b7IC = tuKI.choice(fodo)\n pmON = '/'.join([tuKI.choice(hRXf) for bGrB in range(tuKI.randint(1, 3))])\n BWZt = TDhU(bD7m, pmON)\n geh0 = G4JS.get(BWZt, allow_redirects=False)\n if... | [
"0.7907392",
"0.7751991",
"0.76953155",
"0.75999284",
"0.74785024",
"0.7401467",
"0.73733664",
"0.73338944",
"0.72675264",
"0.72434616",
"0.7210932",
"0.7203484",
"0.7125398",
"0.7098823",
"0.70381653",
"0.7036914",
"0.7028535",
"0.70214385",
"0.7010033",
"0.7001961",
"0.6980... | 0.0 | -1 |
Pass input X through this HydraNet's shared layers. | def Sj1m(YKHO, EcVT):
aSXy = [EcVT]
for gEmA in YKHO.shared_layers:
bGrB, bGrB, YJTb = gEmA.apply(aSXy[-1])
aSXy.append(YJTb)
AAmM = aSXy[-1]
return AAmM | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVH6(YKHO, WKvO):\n WKvO, bGrB = YKHO.net(WKvO)\n return YKHO.outputlayer(WKvO)",
"def KVH6(YKHO, WKvO):\n WKvO, bGrB = YKHO.net(WKvO)\n return YKHO.outputlayer(WKvO)",
"def KVH6(YKHO, WKvO):\n oubr = WKvO\n for gEmA in YKHO.layers:\n oubr = gEmA.forward(oubr)\n return oubr",
... | [
"0.6847451",
"0.6847451",
"0.6761854",
"0.67488414",
"0.6729781",
"0.6729781",
"0.66876984",
"0.66112083",
"0.6571243",
"0.65518504",
"0.65119267",
"0.649506",
"0.64256823",
"0.63973254",
"0.6359354",
"0.6356936",
"0.6355726",
"0.63428086",
"0.63305867",
"0.6330124",
"0.63180... | 0.68321925 | 2 |
Load a clone of some previously trained model. | def fdoO(knSv=None, xlLU=None, zUFa=None, rosz=None):
assert not knSv is None
VIsj = open(knSv)
ckV_ = rIin.load(VIsj)
if not rosz is None:
for G1Hx in rosz:
ckV_[G1Hx] = rosz[G1Hx]
avG4 = rIin.load(VIsj)
j1S5 = {'shared': [], 'output': []}
for Z9ju in ['shared', 'output'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DQCz(YKHO):\n GlXl = YKHO._model.to_json()\n ZylS.keras.backend.clear_session()\n YKHO._model = ZylS.keras.models.model_from_json(GlXl)\n YKHO._load_weights_from_state_dict()",
"def O5RJ(YKHO):\n pmON = YKHO._get_model_path()\n with open(pmON, 'rb') as eHNT:\n C3ST = t2lc.load(eHNT)\... | [
"0.79603267",
"0.7434846",
"0.7315329",
"0.7236442",
"0.71731645",
"0.7152981",
"0.71207416",
"0.71051276",
"0.7097884",
"0.7079385",
"0.70764506",
"0.70764506",
"0.70764506",
"0.70647955",
"0.7048798",
"0.70295036",
"0.698956",
"0.6968812",
"0.6968812",
"0.6968812",
"0.69688... | 0.0 | -1 |
Load a clone of some previously trained model. | def V8GL(BJY9, xlLU=None, zUFa=None, rosz=None):
ckV_ = BJY9['params']
if not rosz is None:
for G1Hx in rosz:
ckV_[G1Hx] = rosz[G1Hx]
avG4 = BJY9['numpy_param_dicts']
j1S5 = {'shared': [], 'output': []}
for Z9ju in ['shared', 'output']:
for ytA_ in avG4[Z9ju]:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DQCz(YKHO):\n GlXl = YKHO._model.to_json()\n ZylS.keras.backend.clear_session()\n YKHO._model = ZylS.keras.models.model_from_json(GlXl)\n YKHO._load_weights_from_state_dict()",
"def O5RJ(YKHO):\n pmON = YKHO._get_model_path()\n with open(pmON, 'rb') as eHNT:\n C3ST = t2lc.load(eHNT)\... | [
"0.79603267",
"0.7434846",
"0.7315329",
"0.7236442",
"0.71731645",
"0.7152981",
"0.71207416",
"0.71051276",
"0.7097884",
"0.7079385",
"0.70764506",
"0.70764506",
"0.70764506",
"0.70647955",
"0.7048798",
"0.70295036",
"0.698956",
"0.6968812",
"0.6968812",
"0.6968812",
"0.69688... | 0.0 | -1 |
Set up dataloaders for training/val/test | def _DIw(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FMnA(YKHO, GPtr):\n Pa1c = KgqZ(GPtr, 'train', YKHO.model_type)\n o7Up = KgqZ(GPtr, 'val', YKHO.model_type)\n Blhr = KgqZ(GPtr, 'test', YKHO.model_type)\n return (Pa1c, o7Up, Blhr)",
"def YSfv(YKHO):\n _Fei = sHyf\n geJW = jeFo([_J6p(), NBqJ((_Fei.mean,), (_Fei.std,))])\n nyaT = {'root':... | [
"0.75910467",
"0.75553066",
"0.7482179",
"0.73861927",
"0.7313747",
"0.72104245",
"0.72006315",
"0.7193646",
"0.7191021",
"0.7186935",
"0.71351576",
"0.7096495",
"0.709404",
"0.7065827",
"0.7051573",
"0.703425",
"0.7027195",
"0.702688",
"0.7021306",
"0.70142573",
"0.69915485"... | 0.0 | -1 |
Either load pretrained from imagenet, or load our saved weights from our own training. | def FIMM(YKHO, lNai=(299, 299, 3), _mSQ=None):
YKHO.weights = _mSQ
FRUf = X6a0(lNai)
rvDU = dn_8(input_tensor=FRUf, weights='imagenet', include_top=True)
YKHO.model = wOed(inputs=rvDU.input, outputs=rvDU.get_layer('avg_pool').output) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y4QU(YKHO):\n pass",
"def OJVN(YKHO):\n xA7f = None\n try:\n xA7f = ht2j.load(YKHO.pretrained, map_location=ht2j.device(YKHO.device))\n except:\n print('No pretrained model exists for current architecture!')\n return\n print('Loading pretrained weights...')\n for mWFP, ... | [
"0.7429614",
"0.7395898",
"0.7261446",
"0.71630406",
"0.7030523",
"0.70240444",
"0.7019472",
"0.70017034",
"0.6963014",
"0.6953681",
"0.69399434",
"0.69294256",
"0.6867607",
"0.6838307",
"0.68154454",
"0.6814412",
"0.680557",
"0.67838424",
"0.6762",
"0.6760364",
"0.6741693",
... | 0.0 | -1 |
Takes in a local xml path and returns a full path. if is absolute, do nothing if is not absolute, load xml that is shipped by the package | def RPFJ(pjeI):
return pjeI if pjeI.startswith('/') else Hy7s.path.join(aBwy.models.assets_root, pjeI) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RPFJ(pjeI, IhMI=None):\n if Hy7s.path.isfile(pjeI):\n Zg0d = pjeI\n else:\n if IhMI is None:\n IhMI = FFvQ\n else:\n pass\n Zg0d = Hy7s.path.abspath(Hy7s.path.join(IhMI, pjeI))\n return Zg0d",
"def Vp4i() -> GkAb:\n return GkAb('rads.xml')",
"de... | [
"0.73142046",
"0.723432",
"0.69548506",
"0.6706382",
"0.63311577",
"0.6233645",
"0.6176483",
"0.61401457",
"0.6089671",
"0.6066174",
"0.6064756",
"0.6055988",
"0.6037755",
"0.59989786",
"0.5993617",
"0.5984916",
"0.59668314",
"0.596019",
"0.5883507",
"0.5874138",
"0.58703357"... | 0.6948984 | 3 |
Filters an image in Fourier space. The kernel here is already in Fourier space. Use scipy.signal.fftconvolve() for convolving two real space images. | def P79G(LNo8, WZcn):
assert len(LNo8) == len(WZcn) and len(LNo8[0]) == len(WZcn[0])
LNo8 = MRlR.fft2(LNo8)
LNo8 = MRlR.fftshift(LNo8)
LNo8 *= WZcn
LNo8 = MRlR.ifftshift(LNo8)
LNo8 = MRlR.ifft2(LNo8)
return LNo8 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Iwgw(LNo8, Ga6V, mcUg):\n Ga6V, mcUg = (oyIN.asarray(Ga6V), oyIN.asarray(mcUg))\n LNo8 = Zxt2.signal.convolve(LNo8, Ga6V[:, None], mode='same')\n return Zxt2.signal.convolve(LNo8, mcUg[None, :], mode='same')",
"def KL2G(LNo8, WZcn, mzkS=True):\n raise NotImplementedError",
"def e4fp(VXjJ, WZcn)... | [
"0.7271603",
"0.72655016",
"0.7218788",
"0.6979242",
"0.6972985",
"0.69701326",
"0.69305277",
"0.6882782",
"0.6860467",
"0.6771908",
"0.6762122",
"0.67535084",
"0.67090404",
"0.6609869",
"0.65154725",
"0.6501292",
"0.6481284",
"0.6480704",
"0.64779425",
"0.64257807",
"0.64239... | 0.7088224 | 3 |
Calculate normalised rms error between exact and reconstructed arrays of arbitrary (but equal) dimensions | def ZudB(LsaM, UUcO, W8mS=False, mWFP=None):
assert oyIN.shape(LsaM) == oyIN.shape(UUcO)
wjRY = 0
CkYf = 0
EECF = oyIN.prod(oyIN.shape(LsaM), dtype=int)
LsaM = LsaM.reshape(EECF)
UUcO = UUcO.reshape(EECF)
for YRbF in range(EECF):
wjRY += (LsaM[YRbF] - UUcO[YRbF]) * (LsaM[YRbF] - UUcO... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _8nW(hkxX, TkHw):\n return oyIN.sqrt(((oyIN.array(hkxX) - TkHw) ** 2).mean())",
"def kPhr(UAju):\n lTiu, u54L, IFSb = UAju.shape\n UAju = UAju.reshape((-1, IFSb))\n myVW = oyIN.sum(UAju * UAju, axis=1)\n return oyIN.sqrt(oyIN.mean(myVW))",
"def b7VC(hkxX, TkHw):\n return oyIN.sqrt(oyIN.su... | [
"0.67734987",
"0.67286366",
"0.6705839",
"0.6466893",
"0.6396158",
"0.63338697",
"0.6311326",
"0.62894034",
"0.6263542",
"0.62542343",
"0.62138665",
"0.6202849",
"0.6189139",
"0.61788756",
"0.6167513",
"0.61569154",
"0.61281675",
"0.6119933",
"0.61109424",
"0.60960644",
"0.60... | 0.7018346 | 0 |
The tag of the disk `PriorModel` the `LightProfile` class given to the `disk_prior_model`. | def AGGc(YKHO) -> str:
if YKHO.disk_prior_model is None:
return ''
TZ9E = Fv2L.instance['notation']['prior_model_tags']['light'][YKHO.disk_prior_model.name]
return f'__disk_{TZ9E}' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AGGc(YKHO) -> str:\n if YKHO.disk_prior_model is None:\n return ''\n TZ9E = Fv2L.instance['notation']['prior_model_tags']['mass'][YKHO.disk_prior_model.name]\n return f'__disk_{TZ9E}'",
"def h_Qz(YKHO) -> str:\n return f'{Fv2L.instance['notation']['prior_model_tags']['mass'][YKHO.smbh_prio... | [
"0.83206",
"0.7649678",
"0.7639814",
"0.75811154",
"0.72345513",
"0.7204262",
"0.709288",
"0.6898245",
"0.6274365",
"0.57702374",
"0.5760382",
"0.5584721",
"0.55787796",
"0.55689573",
"0.55671865",
"0.55292255",
"0.5452127",
"0.5430704",
"0.5425943",
"0.5424695",
"0.5394654",... | 0.8695129 | 0 |
The name of the mass component of a `mass` pipeline which preceeds the `Setup` tag contained within square brackets. For the default configuration files this tag appears as `mass[tag]`. Returns str The component name of the mass pipeline. | def maxk(YKHO) -> str:
return Fv2L.instance['notation']['setup_tags']['names']['mass'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def maxk(YKHO) -> str:\n return Fv2L.instance['notation']['setup_tags']['names']['smbh']",
"def maxk(YKHO) -> str:\n return YKHO._component_name",
"def maxk(YKHO) -> str:\n return Fv2L.instance['notation']['setup_tags']['names']['hyper']",
"def TZ9E(YKHO) -> str:\n U_aw = Fv2L.instance['notation'... | [
"0.7042207",
"0.64195067",
"0.6416724",
"0.6331079",
"0.6248416",
"0.6209123",
"0.60704964",
"0.6051265",
"0.60451007",
"0.5973866",
"0.58884877",
"0.58884877",
"0.58813393",
"0.58476585",
"0.58229786",
"0.57613415",
"0.5750058",
"0.572095",
"0.5715368",
"0.5711183",
"0.57044... | 0.8438056 | 0 |
Parse query params Helper method to help parsing any query paramenters that may be provided by the UI | def p2Rt(YKHO):
WqSW = None
QKly = None
NArs = YKHO.request.GET
if 'colour' in NArs:
WqSW = qRGN.COLOURING[int(NArs['colour'])][0]
if 'chill_filtered' in NArs:
QKly = qRGN.CHILL_FILTERED[int(NArs['chill_filtered'])][0]
j7TD = NArs.get('name', None)
_QMj = NArs.get('proof', No... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def p2Rt(YKHO, QePW, _7h5=False):\n _NyU = QePW.data.get('template', QePW.data.get('t', ''))\n jYXo = QePW.data.get('params', QePW.data.get('p', {}))\n if isinstance(_NyU, list):\n _NyU = _NyU[0]\n if isinstance(_NyU, fnT7):\n _NyU = YKHO.from_file(_NyU)\n if isinstance(jYXo, fnT7):\n ... | [
"0.7531005",
"0.70437413",
"0.69056153",
"0.6891424",
"0.6871369",
"0.68597955",
"0.68550175",
"0.6821794",
"0.6808932",
"0.6739862",
"0.6737793",
"0.6727129",
"0.67087156",
"0.67033297",
"0.6693716",
"0.6684148",
"0.666751",
"0.6660115",
"0.66260594",
"0.66252244",
"0.661812... | 0.8037419 | 0 |
Performs database connection using database settings from settings.py. Returns sqlalchemy engine instance | def WyYT():
return y2U9(moDH) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WyYT():\n return y2U9(rOmR(**GPtr.DATABASE))",
"def WyYT():\n return y2U9(KIPK().get('CONNECTION_STRING'))",
"def WyYT():\n return y2U9(KIPK().get('CONNECTION_STRING'))",
"def WyYT():\n return y2U9(KIPK().get('CONNECTION_STRING'))",
"def WyYT():\n return y2U9(KIPK().get('DB_CONNECTION_ST... | [
"0.82956547",
"0.8231434",
"0.8231434",
"0.8231434",
"0.82268506",
"0.8215186",
"0.8215186",
"0.8215186",
"0.81917554",
"0.8176266",
"0.80810624",
"0.80810624",
"0.80810624",
"0.80810624",
"0.80810624",
"0.80810624",
"0.80810624",
"0.80810624",
"0.80810624",
"0.80810624",
"0.... | 0.8233084 | 1 |
This is the contact site where you can find how to contact us. | def RyYT():
global username
return rPXJ('contact', username=NtEF) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RyYT():\n return TvZl('contact_us.html', title='CONP | Contact Us', user=c5ow)",
"def Mxk0():\n return TvZl('contact.html', title='Contact Us!', year=qcWV.now().year, message='You can visit us on these platforms:')",
"def RyYT(QePW):\n return SGJU('contact.html', {}, context_instance=K1Ja(QePW))",... | [
"0.79512525",
"0.7665697",
"0.75664335",
"0.74555886",
"0.740151",
"0.7346616",
"0.7323663",
"0.73064387",
"0.7284348",
"0.725466",
"0.725466",
"0.725466",
"0.725466",
"0.725466",
"0.725466",
"0.725466",
"0.725466",
"0.725466",
"0.725466",
"0.725466",
"0.725466",
"0.725466"... | 0.7029498 | 36 |
Deep update a dictionary. | def DmV4(pan_: Dict, JZXy: Dict) -> None:
for H5ew, BWXx in JZXy.items():
if isinstance(BWXx, g760.Mapping):
hIR7 = pan_.get(H5ew, {})
if not isinstance(hIR7, g760.Mapping):
hIR7 = {}
DmV4(hIR7, BWXx)
pan_[H5ew] = hIR7
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ph7y(mUif, sUFK):\n for H5ew, wEf2 in sUFK.items():\n if isinstance(wEf2, dict):\n mUif[H5ew] = ph7y(mUif.get(H5ew, {}), wEf2)\n else:\n mUif[H5ew] = wEf2\n return mUif",
"def DmV4(Csk6, QdZT):\n for G1Hx, Ty9i in QdZT.items():\n if isinstance(Ty9i, dict):\... | [
"0.8403764",
"0.82246476",
"0.82125384",
"0.81990224",
"0.8123646",
"0.8096027",
"0.8004507",
"0.7945436",
"0.79454297",
"0.78134435",
"0.7785541",
"0.77688855",
"0.7763117",
"0.7761349",
"0.7760029",
"0.77091235",
"0.77012354",
"0.7673712",
"0.76699877",
"0.76235104",
"0.761... | 0.7659913 | 19 |
Create and Save an User with email and password | def xWi2(YKHO, D3lj, jTXt, qMrd, **wdCM):
wzkt = rIAI.now()
if not D3lj:
raise ValueError('The given email must be set')
D3lj = YKHO.normalize_email(D3lj)
ksfB = wdCM.pop('is_active', False)
CBIr = YKHO.model(email=D3lj, is_active=ksfB, is_superuser=qMrd, last_login=wzkt, **wdCM)
CBIr.se... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xWi2(YKHO, D3lj, jTXt, **wdCM):\n if not D3lj:\n raise ValueError('The email must be set')\n D3lj = YKHO.normalize_email(D3lj)\n CBIr = YKHO.model(email=D3lj, **wdCM)\n CBIr.set_password(jTXt)\n CBIr.save()",
"def xWi2(YKHO, D3lj, jTXt, **wdCM):\n if not D3lj:\n raise ValueErr... | [
"0.8532306",
"0.8318656",
"0.8298941",
"0.8274331",
"0.82614356",
"0.8258347",
"0.8255797",
"0.82410604",
"0.82238746",
"0.8213006",
"0.8213006",
"0.8213006",
"0.81872636",
"0.81865126",
"0.8172332",
"0.8171847",
"0.8171807",
"0.8170877",
"0.8144823",
"0.81442803",
"0.8142773... | 0.0 | -1 |
Create and save an User with email and password | def lYUQ(YKHO, D3lj, jTXt=None, **wdCM):
return YKHO._create_user(D3lj, jTXt, False, **wdCM) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xWi2(YKHO, D3lj, jTXt, **wdCM):\n if not D3lj:\n raise ValueError('The email must be set')\n D3lj = YKHO.normalize_email(D3lj)\n CBIr = YKHO.model(email=D3lj, **wdCM)\n CBIr.set_password(jTXt)\n CBIr.save()",
"def xWi2(YKHO, D3lj, jTXt, **wdCM):\n if not D3lj:\n raise ValueErr... | [
"0.86267275",
"0.8433679",
"0.84113616",
"0.8398151",
"0.8387719",
"0.8383931",
"0.8378801",
"0.83707",
"0.83574116",
"0.8344468",
"0.8344468",
"0.8344468",
"0.8336288",
"0.8306688",
"0.83020264",
"0.830098",
"0.82971925",
"0.82726645",
"0.8269384",
"0.8267313",
"0.82670915",... | 0.0 | -1 |
Create and save an User with the given email and password. | def Zp54(YKHO, D3lj, jTXt, **wdCM):
return YKHO._create_user(D3lj, jTXt, True, True, is_active=True, **wdCM) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xWi2(YKHO, D3lj, jTXt, **wdCM):\n if not D3lj:\n raise ValueError('The email must be set')\n D3lj = YKHO.normalize_email(D3lj)\n CBIr = YKHO.model(email=D3lj, **wdCM)\n CBIr.set_password(jTXt)\n CBIr.save()",
"def xWi2(YKHO, D3lj, jTXt, **wdCM):\n D3lj = YKHO.normalize_email(D3lj)\n ... | [
"0.8772533",
"0.8546526",
"0.85434645",
"0.85362047",
"0.85283434",
"0.852594",
"0.8519136",
"0.8509288",
"0.8504772",
"0.8504772",
"0.8504772",
"0.85010046",
"0.8497654",
"0.8497654",
"0.8494774",
"0.8493645",
"0.8491785",
"0.84914625",
"0.8491006",
"0.84906626",
"0.84903705... | 0.0 | -1 |
Returns the JWT token in case of success, returns the error response in case of login failed. | def UQZm(YKHO, QePW, D3lj=None, jTXt=None, CBIr=None, **wdCM):
if CBIr:
CBIr.backend = 'django.contrib.auth.backends.ModelBackend'
else:
if not D3lj:
return oGir(status=jGRS.HTTP_400_BAD_REQUEST, data='Email is mandatory.')
CBIr = NLCy(email=D3lj, password=jTXt)
if CBIr i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iwDu():\n nPrm = QePW.get_json()\n BaHi = nPrm.get('username', None)\n D3lj = nPrm.get('email', None)\n DXni = nPrm.get('secret', None)\n qutR = False\n uJjO = None\n if BaHi is None and D3lj is None:\n return (pz3A({'message': 'User name or email both can not be empty'}), 400)\n ... | [
"0.72503227",
"0.721987",
"0.71971625",
"0.69405514",
"0.692079",
"0.6833661",
"0.6817125",
"0.67974466",
"0.6781256",
"0.67802894",
"0.6761732",
"0.67590797",
"0.67367893",
"0.67287225",
"0.6717983",
"0.67140985",
"0.67098105",
"0.6693895",
"0.66691166",
"0.666711",
"0.66656... | 0.0 | -1 |
Generator to yield chunks from cursor | def HATz(N1p7, ztRo):
yOAJ = []
for YRbF, rdlD in enumerate(N1p7):
if YRbF % ztRo == 0 and YRbF > 0:
yield yOAJ
del yOAJ[:]
yOAJ.append(rdlD)
yield yOAJ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AyNP(YKHO):\n dQgj = 0\n while True:\n yOAJ = YKHO._queryset[dQgj:dQgj + YKHO._chunk_size]\n if len(yOAJ) == 0:\n return\n yield yOAJ\n if len(yOAJ) < YKHO._chunk_size:\n return",
"def xMl4(YKHO, Pe9W, qIxc=None):\n with YKHO.connection as g7aC:\n ... | [
"0.7382024",
"0.7229908",
"0.7174458",
"0.7135022",
"0.71080065",
"0.7047105",
"0.704501",
"0.70112395",
"0.6972374",
"0.6912897",
"0.6885215",
"0.6876812",
"0.68472266",
"0.684686",
"0.684431",
"0.683904",
"0.68264824",
"0.67949903",
"0.67512083",
"0.6734059",
"0.6720115",
... | 0.75698185 | 0 |
Transpose a matrix M | def Ck9Z(E3D9):
return [[E3D9[r845][YRbF] for r845 in range(len(E3D9))] for YRbF in range(len(E3D9[0]))] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l7uB(r8hN):\n return aLMY(r8hN.cols, r8hN.rows).mapi(lambda bGrB, Mkmy, Z9rn: r8hN.data[Z9rn][Mkmy])",
"def l7uB(E3D9):\n tpio = E3D9.size\n hlel = I7o1([[0 for YRbF in range(0, tpio[0])] for vexM in range(0, tpio[1])])\n for rdlD in range(0, tpio[0]):\n for fvDH in range(0, tpio[1]):\n ... | [
"0.8521129",
"0.8426598",
"0.83045465",
"0.81571627",
"0.79905987",
"0.7952635",
"0.783884",
"0.7673206",
"0.755447",
"0.7438898",
"0.7433677",
"0.7413428",
"0.74092054",
"0.7347547",
"0.734537",
"0.7301046",
"0.72967964",
"0.72673994",
"0.7266949",
"0.7260395",
"0.7244916",
... | 0.8731366 | 0 |
Compute a matrix inverse using a pivot algorithm | def q36N(E3D9):
exwG = len(E3D9)
Z9rn = [[0.0 for bGrB in range(2 * exwG)] for bGrB in range(exwG)]
for YRbF in range(exwG):
for r845 in range(exwG):
Z9rn[YRbF][r845] = E3D9[r845][YRbF]
Z9rn[YRbF][r845 + exwG] = 0.0
Z9rn[YRbF][YRbF + exwG] = 1.0
for YRbF in range(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def awIc(r8hN):\n k0lF = Zxt2.eye((3, 3))\n k0lF[:2, :2] = r8hN[:2, :2].T\n k0lF[0:2, 2] = -1 * Zxt2.dot(k0lF[:2, :2], r8hN[:2, 2])\n return k0lF",
"def GOZd(jzdc):\n return oyIN.swapaxes(qMnV(jzdc), -1, -2)",
"def CX33(EcVT):\n EcVT = _qLf(EcVT)\n usx6 = len(EcVT)\n WfCS = len(EcVT[0])... | [
"0.68703395",
"0.678008",
"0.6770408",
"0.67172205",
"0.6700497",
"0.667122",
"0.6666886",
"0.6648618",
"0.6634774",
"0.66125387",
"0.66121614",
"0.6597076",
"0.65894413",
"0.6560294",
"0.6555291",
"0.6549936",
"0.6512188",
"0.6507786",
"0.65054154",
"0.6493718",
"0.6481041",... | 0.7849269 | 0 |
Computes the difference between the reference element mass operator evaluated at point xi=1.0 and the element stiffness matrix. | def yOba(PCK1, qEhY, ywwl):
upem, bGrB = rboj.baseFunc1d(1.0, qEhY, ywwl)
dlax = [[0 for bGrB in range(ywwl)] for bGrB in range(ywwl)]
for G1Hx in range(0, ywwl):
for vC9B in range(0, ywwl):
dlax[G1Hx][vC9B] = upem[G1Hx] * upem[vC9B]
return [[dlax[YRbF][r845] - PCK1[YRbF][r845] for r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yk4i(YKHO):\n return YKHO.mobility * YKHO.k_B * YKHO.T / YKHO.q",
"def yk4i(YKHO):\n return YKHO.mobility * YKHO.k_B * YKHO.T / YKHO.q",
"def yk4i(YKHO):\n YKHO.m[:] = 0\n YKHO.coef = 1j * YKHO.coef * YKHO.om.T\n return YKHO",
"def Tnk7(Ziit, MDzo):\n IYWQ = oyIN.tile(me3M.xi, GPOG)\n ... | [
"0.61408955",
"0.61408955",
"0.58240676",
"0.58174485",
"0.5761089",
"0.5714528",
"0.56994885",
"0.56898594",
"0.56858677",
"0.56820697",
"0.56541854",
"0.5649172",
"0.562888",
"0.5616115",
"0.56074125",
"0.56058",
"0.5486012",
"0.5484374",
"0.54776424",
"0.54650176",
"0.5464... | 0.0 | -1 |
Return temperatures expressed in Celsius for each physical CPU | def eHHr(ZczI=False):
ACia = lambda nUeQ: open(nUeQ, 'r').read().strip()
P8oC = '/sys/class/hwmon/'
Uqbu = sorted(Hy7s.listdir(P8oC))
assert Uqbu, '%r is empty' % P8oC
U5bT = []
for x8mZ in Uqbu:
Mp3A = Hy7s.path.join(P8oC, x8mZ)
for VGCm in range(1, BlIN + 1):
try:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W4pI():\n m6Me = PHIk['file.read']('/sys/class/thermal/thermal_zone0/temp')\n return {'value': float(m6Me) / 1000, 'unit': 'C'}",
"def LJii():\n Aofo = Hy7s.popen('vcgencmd measure_temp').readline()\n return float(Aofo.replace('temp=', '').replace(\"'C\\n\", ''))",
"def QAGi(YKHO):\n YKHO._l... | [
"0.79230076",
"0.7635112",
"0.7497568",
"0.74599713",
"0.73103225",
"0.7242353",
"0.7236982",
"0.7219365",
"0.71761554",
"0.7119697",
"0.7119697",
"0.709853",
"0.69948584",
"0.6968738",
"0.69569826",
"0.690983",
"0.68156767",
"0.67627597",
"0.67442626",
"0.6726751",
"0.672237... | 0.7534515 | 2 |
Sets up argparse and collects arguements. | def rwTO():
wvEv = j1Jz.ArgumentParser(description='Genetic algorithm for de novo discovery of exclusively mutated pathways.')
wvEv.add_argument('--k', type=int, action='store', default=3, help='solution size to search for')
wvEv.add_argument('--eval-only', action='store', default=None, help='only evaluate ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZDvn(YKHO, wvEv):\n for qIxc, B2fa in YKHO._arguments:\n wvEv.add_argument(*qIxc, **B2fa)",
"def ZDvn():\n wvEv = j1Jz.ArgumentParser()\n wvEv.add_argument('-d', '--dir', required=True, help='Full path to the project directory.', action=EqIj, dest='project_directory')\n wvEv.add_argument('... | [
"0.7453943",
"0.73588693",
"0.73105466",
"0.730437",
"0.71847624",
"0.7128198",
"0.70829374",
"0.7076327",
"0.70471483",
"0.7009595",
"0.6988706",
"0.6965427",
"0.6961111",
"0.69571537",
"0.6946385",
"0.6936816",
"0.6932781",
"0.6902308",
"0.6868876",
"0.68566144",
"0.6851847... | 0.0 | -1 |
Build string of space separated gene names from an individual. | def Bk82(H3sD, DM04):
mWFP = ''
for or8S in DM04:
mWFP += H3sD[or8S] + ' '
return mWFP | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wom0(iAph, RMMK):\n if RMMK is None:\n return iAph\n else:\n return iAph + '*' + RMMK",
"def qFlU(YKHO, FWWz):\n rkNA = FWWz.sysName\n lpha = ZbWC.findall(YKHO.probeNameFormatter, rkNA)\n y02X = ' '.join(lpha)\n y02X = y02X.replace('_', ' ')\n return (rkNA, y02X)",
"def t... | [
"0.66351366",
"0.64349693",
"0.62659496",
"0.62080115",
"0.6150669",
"0.6083431",
"0.6074233",
"0.60296834",
"0.6020772",
"0.60106236",
"0.6005475",
"0.59844875",
"0.59689975",
"0.5959679",
"0.59557754",
"0.59310496",
"0.5889084",
"0.58798003",
"0.5863501",
"0.58618593",
"0.5... | 0.79061615 | 0 |
Creates a [size, num_classes] torch FloatTensor where one_hot[i, vec[i]] = fill | def LQDo(he6J, jTqs, LGJQ=1000):
Dry_ = he6J.new(he6J.size(0), jTqs).float().fill_(-LGJQ)
k5Sn = he6J.new(he6J.size(0)).long()
ht2j.arange(0, he6J.size(0), out=k5Sn)
Dry_.view(-1)[he6J + jTqs * k5Sn] = LGJQ
return Dry_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VDds(input, jTqs, begE='cuda'):\n if len(input.shape) < 4:\n input = input.unsqueeze(0).unsqueeze(0)\n ROpF = oyIN.array(input.shape)\n ROpF[1] = jTqs\n ROpF = tuple(ROpF)\n Aofo = ht2j.zeros(ROpF)\n Aofo = Aofo.scatter_(1, input.long(), 1)\n Aofo = Aofo.squeeze(0).cpu().numpy()\n ... | [
"0.7699159",
"0.76837254",
"0.76265365",
"0.7623307",
"0.76159745",
"0.76159745",
"0.76109976",
"0.76055855",
"0.7598776",
"0.7591927",
"0.7459011",
"0.74419886",
"0.74123675",
"0.73567295",
"0.7354505",
"0.7351489",
"0.7322052",
"0.7322052",
"0.7322052",
"0.7321665",
"0.7290... | 0.85986096 | 0 |
Computes the precision for the specified values of k | def vjyh(hlel, pan_, hz5a=(1,)):
Gq8e = max(hz5a)
Ep8u = pan_.size(0)
bGrB, nvEb = hlel.topk(Gq8e, 1, True, True)
nvEb = nvEb.t()
gXXc = nvEb.eq(pan_.view(1, -1).expand_as(nvEb))
Ylbp = []
for G1Hx in hz5a:
R2Dg = gXXc[:G1Hx].view(-1).float().sum(0)
Ylbp.append(R2Dg.mul_(100.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhd_(u5Ef, G1Hx):\n return len(u5Ef) / G1Hx",
"def sEak(Mkmy, G1Hx):\n assert G1Hx >= 1\n Mkmy = oyIN.asarray(Mkmy)[:G1Hx]\n return oyIN.mean(Mkmy)",
"def sEak(YKHO, G1Hx):\n fdMZ = YKHO.pred_rankings.rdd.map(lambda SjLr: (SjLr[2], SjLr[1]))\n Wbxz = rRQi(fdMZ)\n return Wbxz.precisionA... | [
"0.8003211",
"0.79748034",
"0.79735845",
"0.7941222",
"0.78642285",
"0.7803938",
"0.7707779",
"0.7621563",
"0.7593218",
"0.75612706",
"0.752028",
"0.7430132",
"0.74122673",
"0.7375894",
"0.7374447",
"0.7321427",
"0.7254542",
"0.7236769",
"0.72279894",
"0.7204469",
"0.7137302"... | 0.0 | -1 |
Returns np.array([(a,b) for a in range(x) for b in range(x) if a != b]) efficiently | def nHRI(WKvO):
H0q3 = 1 - oyIN.diag(oyIN.ones(WKvO, dtype=oyIN.int32))
jpc5 = oyIN.column_stack(oyIN.where(H0q3))
return jpc5 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jPvL(WKvO):\n ywwl = len(WKvO)\n return oyIN.array([WKvO[YRbF] - WKvO[r845] for YRbF in range(ywwl) for r845 in range(ywwl) if YRbF != r845])",
"def IoyM(WKvO, LVAh, epBp, exwG):\n return sorted([[YRbF, r845, G1Hx] for YRbF in range(WKvO + 1) for r845 in range(LVAh + 1) for G1Hx in range(epBp + 1) i... | [
"0.7063567",
"0.62932116",
"0.58708423",
"0.5804033",
"0.58019894",
"0.5775767",
"0.5754249",
"0.57048136",
"0.5646164",
"0.5645882",
"0.5619674",
"0.56029344",
"0.56012434",
"0.5597048",
"0.55811286",
"0.5571747",
"0.55608666",
"0.55504775",
"0.55381966",
"0.55269957",
"0.55... | 0.6308506 | 1 |
r"""Clips gradient norm of an iterable of parameters. The norm is computed over all gradients together, as if they were concatenated into a single vector. Gradients are modified inplace. | def tv6i(P2ha, wTln, vJPk=False, PJWX=False):
wTln = float(wTln)
GRKF = 0
zJ3u = {}
TX2n = {}
for exwG, XP5J in P2ha:
if XP5J.grad is not None:
yQLB = XP5J.grad.data.norm(2)
GRKF += yQLB ** 2
zJ3u[exwG] = yQLB
TX2n[exwG] = XP5J.size()
GRKF ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def afIt(YKHO, JHDS):\n for Zxma in JHDS:\n if Zxma is not None:\n U78l.utils.clip_grad_norm_(Zxma.parameters(), YKHO.max_grad_norm)",
"def md2F(CLRx, GKIM):\n NfqM, kc1W = zip(*CLRx)\n idA6, bGrB = ZylS.clip_by_global_norm(NfqM, GKIM)\n return list(zip(idA6, kc1W))",
"def PPAc(vt... | [
"0.6718743",
"0.62690926",
"0.61887527",
"0.61831254",
"0.6158661",
"0.6045344",
"0.60448617",
"0.60349166",
"0.6021315",
"0.599253",
"0.595522",
"0.59550697",
"0.59317815",
"0.5922133",
"0.5897583",
"0.5896577",
"0.5886568",
"0.5885025",
"0.5800405",
"0.5786411",
"0.5786411"... | 0.5642608 | 25 |
Returns a list of paths. Each path in the list should be a onenode extension of the input path, where an extension is defined as a path formed by adding a neighbor node (of the final node in the path) to the path. Returned paths should not have loops, i.e. should not visit the same node twice. The returned paths should... | def CBZq(pNZh, pmON):
Fst3 = []
next = pNZh.get_neighbors(pmON[-1])
for Q6kx in next:
e35S = []
for LihS in pmON:
e35S.append(LihS)
e35S.append(Q6kx)
if not PDeP(e35S):
Fst3.append(e35S)
return sorted(Fst3, key=lambda Q6kx: Q6kx[-1]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CBZq(pNZh, pmON):\n avhY = pNZh.get_neighbors(pmON[-1])\n ErxX = []\n for exwG in avhY:\n if pmON.count(exwG) > 0:\n avhY.remove(exwG)\n sorted(avhY, key=str.lower)\n if avhY != []:\n for tgA3 in avhY:\n ism5 = pmON + [tgA3]\n ErxX.append(ism5)\n ... | [
"0.66481894",
"0.6616996",
"0.6616295",
"0.656639",
"0.65572834",
"0.6441828",
"0.6433524",
"0.6414069",
"0.63631314",
"0.6358333",
"0.63569933",
"0.6355799",
"0.63500637",
"0.6324702",
"0.6323861",
"0.63181853",
"0.6310624",
"0.6276432",
"0.6260727",
"0.6253563",
"0.6245387"... | 0.7006761 | 0 |
Returns True if this graph's heuristic is admissible; else False. A heuristic is admissible if it is either always exactly correct or overly optimistic; it never overestimates the cost to the goal. | def Iw_Z(pNZh, whV7):
for Q6kx in pNZh.nodes:
if pNZh.get_heuristic_value(Q6kx, whV7) > j5Ue(pNZh, c0vC(pNZh, Q6kx, whV7)):
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Iw_Z(pNZh, whV7):\n ymPF = True\n for Q6kx in pNZh.nodes:\n if pNZh.get_heuristic_value(Q6kx, whV7) > j5Ue(pNZh, M9ee(*raUJ)(pNZh, Q6kx, whV7)):\n ymPF = False\n return ymPF\n raise NotImplementedError",
"def Iw_Z(YKHO, GERS):\n return True",
"def Iw_Z(YKHO, GERS):\n _mS... | [
"0.7044342",
"0.68969464",
"0.6710313",
"0.65289295",
"0.63198566",
"0.62143064",
"0.60859275",
"0.5925597",
"0.5823541",
"0.5815057",
"0.58084846",
"0.57954097",
"0.5792815",
"0.5780271",
"0.577666",
"0.5770175",
"0.5756484",
"0.5709983",
"0.56860715",
"0.56585866",
"0.56405... | 0.7134507 | 0 |
Generate test client instance for Flask server. | def udfG():
return LUif().test_client() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def x0hE() -> QRbk:\n P4t4.config['TESTING'] = True\n return P4t4.test_client()",
"def udfG() -> QRbk:\n return D4WS.test_client()",
"def x0hE():\n return P4t4.test_client()",
"def x0hE(P4t4: Flask) -> QRbk:\n return P4t4.test_client()",
"def x0hE(P4t4: Flask):\n return P4t4.test_client()... | [
"0.85040337",
"0.8388418",
"0.8342842",
"0.8300949",
"0.8243894",
"0.8158873",
"0.8116785",
"0.80354285",
"0.80354285",
"0.8009176",
"0.7975018",
"0.7961829",
"0.7961829",
"0.7961829",
"0.7961829",
"0.7961829",
"0.7961829",
"0.7961829",
"0.7961829",
"0.7961829",
"0.7961829",
... | 0.8274904 | 4 |
Returns True if the cache is stale. | def Fc2i(YKHO, wyyA, vHj7=None):
if HEWO._IsCacheMalformed(wyyA):
S0MI.debug('Encountered malformed or empty cache: %s', wyyA)
return True
if wyyA['current_version'] != YKHO._current_version:
return True
vHj7 = ITS7.time() if vHj7 is None else vHj7
if wyyA['last_check'] + YKHO._c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ezz0(YKHO) -> bool:\n return YKHO.date_expires.timestamp() < ITS7.time()",
"def ezz0(YKHO):\n return YKHO.expires.timestamp() < ITS7.time()",
"def yOmI(YKHO):\n return YKHO._stale",
"def ezz0(YKHO, Eorv, pmON):\n return True",
"def ezz0(YKHO):\n if YKHO.staleness_interval:\n wzkt ... | [
"0.82860243",
"0.8284473",
"0.79193705",
"0.7881084",
"0.78231394",
"0.765742",
"0.7625016",
"0.7596408",
"0.75614476",
"0.7485703",
"0.74542457",
"0.7425759",
"0.7420733",
"0.7333681",
"0.73150957",
"0.7288677",
"0.7283171",
"0.72658056",
"0.72658056",
"0.72635496",
"0.72010... | 0.81551975 | 2 |
Converts a version string into a tuple of its components. For example, '1.2.0' > (1, 2, 0). | def czvs(IexU):
try:
return tuple([int(YRbF) for YRbF in IexU.split('.')])
except ValueError as e:
raise ValueError('Could not parse version string %s: %s' % (IexU, tTpl)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KO4g(DpZH):\n return tuple(map(int, DpZH.split('.')))",
"def kelO(IexU):\n return tuple(map(int, IexU.split('.')))",
"def mqdF(DpZH):\n return tuple(DpZH.split('.'))",
"def Mjaw(DpZH):\n return tuple((int(XP5J) for XP5J in DpZH.split('.')))",
"def BvuR(IexU: str) -> AzJI[str, str, str]:\n ... | [
"0.8905706",
"0.86808044",
"0.85196936",
"0.8421872",
"0.8293907",
"0.8284374",
"0.8253174",
"0.82515746",
"0.8236179",
"0.8203371",
"0.82007205",
"0.8184979",
"0.8184232",
"0.8181689",
"0.80982155",
"0.8041725",
"0.7931487",
"0.79233646",
"0.78907055",
"0.7764399",
"0.776047... | 0.83120525 | 4 |
T.__new__(S, ...) > a new object with type S, a subtype of T | def fwuD(o4sw, *SPTI):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fwuD(YKHO, o4sw):\n pass",
"def fwuD(YKHO, o4sw):\n pass",
"def fwuD(YKHO, o4sw):\n pass",
"def fwuD(YKHO, o4sw):\n pass",
"def fwuD(YKHO, o4sw):\n pass",
"def fwuD(YKHO, o4sw):\n pass",
"def fwuD(YKHO, o4sw):\n pass",
"def fwuD(YKHO, o4sw):\n pass",
"def fwuD(YKHO, o4sw... | [
"0.74188435",
"0.74188435",
"0.74188435",
"0.74188435",
"0.74188435",
"0.74188435",
"0.74188435",
"0.74188435",
"0.74188435",
"0.74188435",
"0.74188435",
"0.74188435",
"0.74188435",
"0.74188435",
"0.74188435",
"0.74188435",
"0.74188435",
"0.74188435",
"0.74188435",
"0.74188435"... | 0.725923 | 34 |
T.__new__(S, ...) > a new object with type S, a subtype of T | def fwuD(o4sw, *SPTI):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fwuD(YKHO, o4sw):\n pass",
"def fwuD(YKHO, o4sw):\n pass",
"def fwuD(YKHO, o4sw):\n pass",
"def fwuD(YKHO, o4sw):\n pass",
"def fwuD(YKHO, o4sw):\n pass",
"def fwuD(YKHO, o4sw):\n pass",
"def fwuD(YKHO, o4sw):\n pass",
"def fwuD(YKHO, o4sw):\n pass",
"def fwuD(YKHO, o4sw... | [
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"0.7418107",
"... | 0.7259038 | 35 |
Returns the Home page with the latest message. | def d6pt():
fsbt = yEHD[-1] if len(yEHD) else None
return TvZl('home.html', latest=fsbt) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NMoC(YKHO):\n fsbt = FYrf.LatropMessage.get_all().fetch(5)\n G9jH.info('Latest: %r', fsbt)\n QpfX = {'latest': fsbt}\n QpfX.update(GPtr.config)\n return YKHO.render_response('home.html', **QpfX)",
"def vja_(YKHO) -> str:\n return qe4Y.get(YKHO, 'home_page')",
"def vja_(YKHO) -> str:\n ... | [
"0.7664357",
"0.6962442",
"0.6962442",
"0.6773115",
"0.673718",
"0.67117155",
"0.66586465",
"0.66465557",
"0.66361535",
"0.66320276",
"0.6628703",
"0.6602219",
"0.65800464",
"0.65185857",
"0.64967877",
"0.64427066",
"0.6426461",
"0.6418239",
"0.6415911",
"0.6383696",
"0.63648... | 0.81879187 | 0 |
Return a custom 404 error. | def m7kB(tTpl):
return ('<h1>404</h1><p>The resource could not be found.</p><p>{e}</p>', 404) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o3cf(P1dF):\n return '404'",
"def mZnU():\n return oGir(RA4y, '<h1>404 Error : Some crap went down, so just <a href=\"/\">HEAD HOME</a>.</h1>', [])",
"def eJkH(XObx):\n return dict(err=XObx)",
"def o3cf(P1dF):\n return G3KB('Not Found', 404)",
"def RQdI(P1dF):\n return 'Sorry, Nothing at... | [
"0.8263737",
"0.79933435",
"0.79192984",
"0.78825426",
"0.7845269",
"0.78424567",
"0.7818006",
"0.7818006",
"0.7818006",
"0.7816168",
"0.78139937",
"0.78001934",
"0.77720594",
"0.77618265",
"0.7702134",
"0.76248384",
"0.7620647",
"0.76148254",
"0.75642604",
"0.75578934",
"0.7... | 0.7328981 | 53 |
Return a custom 500 error. | def e_kA(tTpl):
return ('Sorry, unexpected error: {}'.format(tTpl), 500) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C89g(tTpl):\n return (TvZl('500.html'), 500)",
"def e_kA(tTpl):\n return ('Sorry, unexpected error: {}'.format(tTpl), 500)",
"def r1yd(tTpl):\n return (TvZl('500.html'), 500)",
"def e_kA(tTpl):\n return ('Sorry, unexpected error: {}'.format(tTpl), 500)",
"def r1yd(XObx):\n return (TvZl('... | [
"0.77419347",
"0.77353114",
"0.7727835",
"0.76502776",
"0.76437634",
"0.7625618",
"0.7604917",
"0.7602182",
"0.7597321",
"0.75885934",
"0.7562816",
"0.7562463",
"0.75489175",
"0.75489175",
"0.75374174",
"0.75283426",
"0.75283426",
"0.74986404",
"0.74597794",
"0.7424432",
"0.7... | 0.7710948 | 4 |
Both model fixtures should be listed with the JWT claim. | def ieUh(x0hE, cuiw, C3ST, s2mk):
geh0 = x0hE.get('/models', headers={'Authorization': f'Bearer {s2mk['read']}'})
assert geh0.status_code == 200
assert len(geh0.json) == 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rlPG(YKHO):\n CBIr = Rqdq.UserFactory()\n BPNU = Rqdq.OrganizationFactory()\n Rqdq.OrganizationAccessFactory(user=CBIr, organization=BPNU, role=YzoW)\n K7Va = Rqdq.PlaylistFactory(organization=BPNU)\n yAn2 = Rqdq.VideoFactory(playlist=K7Va, title='First video')\n NlaF = Rqdq.PlaylistFactory(o... | [
"0.5629746",
"0.5610393",
"0.5603942",
"0.5583475",
"0.5532775",
"0.55074555",
"0.54852176",
"0.54813313",
"0.5464489",
"0.5445377",
"0.5421979",
"0.54202795",
"0.54026884",
"0.5398674",
"0.53941804",
"0.53839195",
"0.5383898",
"0.5369599",
"0.53458613",
"0.53440386",
"0.5338... | 0.5223299 | 43 |
POST resource should require JWT. | def Fwf0(x0hE, cuiw, C3ST, MOhd):
geh0 = x0hE.post('/models', json={'name': 'foo', 'organism_id': 1, 'project_id': 1, 'model_serialized': MOhd, 'default_biomass_reaction': 'BIOMASS_Ecoli_core_w_GAM', 'preferred_map_id': 1, 'ec_model': False})
assert geh0.status_code == 401 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SPmS(YKHO):\n pB3N = BfDw.jwt_payload_handler(YKHO.user)\n eOtH = BfDw.jwt_encode_handler(pB3N)\n Jpbe = 'JWT {0}'.format(eOtH)\n geh0 = YKHO.csrf_client.post('/jwt/', {'example': 'example'}, HTTP_AUTHORIZATION=Jpbe, format='json')\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_200_OK)",
"def ... | [
"0.75595677",
"0.7325166",
"0.7325166",
"0.7137615",
"0.70343095",
"0.6923208",
"0.6916867",
"0.6916867",
"0.68631023",
"0.6858062",
"0.680262",
"0.6773916",
"0.6768348",
"0.67525977",
"0.6730443",
"0.6713576",
"0.67121494",
"0.66554844",
"0.6644521",
"0.6625741",
"0.65635043... | 0.0 | -1 |
DELETE resource should require JWT. | def T51w(x0hE, cuiw, C3ST):
geh0 = x0hE.delete('/models/1')
assert geh0.status_code == 401 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PTpj(YKHO, QePW, *qIxc, **B2fa):\n eOtH = QePW.data['token']\n nPrm = DvJO.decode(eOtH, 'secret', algorithms=['HS256'])\n return LyOY(nPrm)",
"def nZxR(YKHO):\n geh0 = YKHO.app.delete('/api/v1/products/2', content_type='application/json', headers={'x-access-token': 'token_is_wrong'})\n YKHO.as... | [
"0.76556766",
"0.7150972",
"0.71283185",
"0.71046907",
"0.70706564",
"0.70500654",
"0.7031807",
"0.7017599",
"0.7011133",
"0.69210637",
"0.68894374",
"0.68656725",
"0.6848503",
"0.68277293",
"0.6822056",
"0.6814729",
"0.6812172",
"0.6808478",
"0.6804321",
"0.6799329",
"0.6793... | 0.70050997 | 9 |