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 |
|---|---|---|---|---|---|---|
Any slice along dim that are all paddings get NaN's. This is consistent with the behavior of torch.nn.functional.softmax. | def yt4n(jD_w, iArr: torch.Tensor, ZHfW: torch.Tensor=None, tpio: int=-1):
cxuH = iArr.masked_fill(~ZHfW.to(dtype=ht2j.bool), -1e+32) if ZHfW is not None else iArr
hkxX = jD_w(cxuH, dim=tpio)
if ZHfW is not None:
Tkea = ~ht2j.sum(ZHfW, dim=tpio, keepdim=True).bool()
hkxX = hkxX.masked_fill(T... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dvgN(jzdc, tpio):\n return oyIN.pad(jzdc, (0, tpio - len(jzdc)), 'constant', constant_values=0)",
"def Mi3O(tm40):\n lHmx, wzH_ = (len(tm40), max(tm40))\n ZHfW = ht2j.zeros(lHmx, 1, wzH_)\n for YRbF, vC9B in enumerate(tm40):\n ZHfW[YRbF, :, :vC9B] = 1\n ZHfW = ZHfW > 0\n return ZHfW"... | [
"0.6107781",
"0.59069073",
"0.5836757",
"0.5821989",
"0.5801986",
"0.57980037",
"0.5790158",
"0.5785852",
"0.5747389",
"0.5689081",
"0.56709427",
"0.5653924",
"0.56453276",
"0.5637119",
"0.5615174",
"0.5608277",
"0.5575804",
"0.55475116",
"0.5547329",
"0.55186284",
"0.5495482... | 0.0 | -1 |
Load data into dimension tables on Redshift | def dR6I(DpUl, w2B8):
for xDcj in EMh0:
try:
DpUl.execute(xDcj)
w2B8.commit()
except Exception as e:
print(tTpl) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ENT3(szGG, _TKD, PPeD, rqgx, tyNF, Fbds='', GQW7=False, vkiN='', G34s=True, *qIxc, **B2fa):\n aUfT = wb8W(f'{szGG}.{_TKD}', **B2fa)\n voqh = u51J(task_id=f'Load_{tyNF}_dim_table', dag=aUfT, table=tyNF, redshift_conn_id=PPeD, aws_credentials_id=rqgx, sql_create=Fbds, drop_first=GQW7, sql_insert=vkiN, trun... | [
"0.6840421",
"0.6615215",
"0.61756873",
"0.6146566",
"0.59563226",
"0.58539027",
"0.5831086",
"0.5789012",
"0.5746865",
"0.56846136",
"0.5658749",
"0.5623414",
"0.56126744",
"0.5603778",
"0.55968577",
"0.5589508",
"0.5563197",
"0.55597264",
"0.55570364",
"0.5553531",
"0.55248... | 0.0 | -1 |
Load weights and masks. | def uyMl(YKHO, uqvc: str, lAJ0=True) -> None:
fgdn = ht2j.load(uqvc, map_location=YKHO.device)
vRNf.initialize_params(YKHO.model, fgdn['state_dict'], with_mask=lAJ0)
bo34.info(f'Loaded the model from {uqvc}') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H_1o(YKHO):\n YKHO.npz_weights = oyIN.load(YKHO._weight_file)\n YKHO._load_byte_embedding()\n YKHO._load_cnn_weights()\n YKHO._load_highway()\n YKHO._load_projection()",
"def tCsY(YKHO, gHPA, OFk2):\n A6pH = gHPA + 'p_{}.ckpt'\n S0Lx = gHPA + 'D_{}.ckpt'\n MWwb = gHPA + 'U_{}.ckpt'\n ... | [
"0.7961758",
"0.7166298",
"0.70300215",
"0.70300215",
"0.69845223",
"0.69528276",
"0.69500786",
"0.6939333",
"0.68869025",
"0.68713963",
"0.6855805",
"0.68260014",
"0.6793269",
"0.6779611",
"0.67392933",
"0.6722277",
"0.6705517",
"0.66891134",
"0.66755396",
"0.6670835",
"0.66... | 0.57325125 | 94 |
Load weights and masks. | def IkbX(YKHO, uqvc: str, lAJ0=True) -> None:
fgdn = ht2j.load(uqvc, map_location=YKHO.device)
vRNf.initialize_params(YKHO.model, fgdn['state_dict'], with_mask=lAJ0)
vRNf.initialize_params(YKHO.optimizer, fgdn['optimizer'], with_mask=False)
YKHO.best_acc = fgdn['test_acc']
bo34.info(f'Loaded paramet... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H_1o(YKHO):\n YKHO.npz_weights = oyIN.load(YKHO._weight_file)\n YKHO._load_byte_embedding()\n YKHO._load_cnn_weights()\n YKHO._load_highway()\n YKHO._load_projection()",
"def tCsY(YKHO, gHPA, OFk2):\n A6pH = gHPA + 'p_{}.ckpt'\n S0Lx = gHPA + 'D_{}.ckpt'\n MWwb = gHPA + 'U_{}.ckpt'\n ... | [
"0.7961758",
"0.7166298",
"0.70300215",
"0.70300215",
"0.69845223",
"0.69528276",
"0.69500786",
"0.6939333",
"0.68869025",
"0.68713963",
"0.6855805",
"0.68260014",
"0.6793269",
"0.6779611",
"0.67392933",
"0.6722277",
"0.6705517",
"0.66891134",
"0.66755396",
"0.6670835",
"0.66... | 0.0 | -1 |
Return list of values for given fields. | def jqfw(YKHO, V_D6):
if isinstance(V_D6, str):
return YKHO.get_field_or_id(V_D6)
if isinstance(V_D6, list):
return [YKHO.get_field_or_id(Jyyj) for Jyyj in V_D6]
raise TypeError(f'`fields` should be of one of types: `None`, `str` or `list`. got: {type(V_D6)}') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TSF4(YKHO, *V_D6):\n Aofo = []\n for Jyyj in V_D6:\n if isinstance(Jyyj, (str, exCv)):\n Aofo.append(YKHO.get_value(Jyyj))\n elif isinstance(Jyyj, (tuple, list)):\n Aofo.append(YKHO.get_values(*Jyyj))\n else:\n Aofo.append(None)\n return Aofo",
"... | [
"0.8723149",
"0.7426816",
"0.7031264",
"0.69835556",
"0.6836851",
"0.67784333",
"0.66391236",
"0.66389525",
"0.6635673",
"0.65960205",
"0.65839875",
"0.6575771",
"0.65732145",
"0.65510637",
"0.6550201",
"0.6492002",
"0.64426064",
"0.64378166",
"0.643667",
"0.6398097",
"0.6303... | 0.74277955 | 1 |
Return copy of dict data. | def MNRr(YKHO):
return dict(YKHO.__data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FzJk(YKHO):\n Csk6 = dict()\n Csk6.update(YKHO.items())\n return Csk6",
"def jth9(YKHO):\n return WY2F(dict.copy(YKHO))",
"def jth9(YKHO):\n return YKHO.from_dict(YKHO.to_dict(True))",
"def oK4F(YKHO, cmPJ):\n return cmPJ.copy()",
"def jth9(YKHO):\n BdN0 = AwUt()\n for H5ew, BWX... | [
"0.79844546",
"0.7816612",
"0.7783952",
"0.75684714",
"0.7526634",
"0.73915166",
"0.7367053",
"0.72636545",
"0.7176331",
"0.7172961",
"0.7127571",
"0.7091412",
"0.7032571",
"0.6966958",
"0.6859877",
"0.68366426",
"0.6811056",
"0.68078583",
"0.678716",
"0.67858106",
"0.6744708... | 0.0 | -1 |
Make an axis as Open3d LineSet. | def JsNR(mn2O=None, hLRM=None, NXpY=1.0):
if hLRM is None:
hLRM = oyIN.zeros(3)
if mn2O is None:
mn2O = oyIN.array([0, 0, 1], dtype=oyIN.float)
mn2O = mn2O * NXpY
LU6M = hLRM + mn2O
LTIa = oyIN.stack([hLRM, LU6M], axis=0)
zFiD = oyIN.array([[0, 1]], dtype=oyIN.long)
jDK_ = Ph... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FEap(YKHO, *qIxc):\n return nxZz.ShapeUpgrade_ConvertCurve3dToBezier_SetLineMode(YKHO, *qIxc)",
"def lORC(YKHO, *qIxc):\n return nxZz.ShapeUpgrade_ShapeConvertToBezier_Set3dLineConversion(YKHO, *qIxc)",
"def O_lX(js4S=True, *qIxc):\n jDK_ = ccKF.radioButtonGrp(uSz2['lineAxisRBG'], q=True, sl=True)... | [
"0.6121122",
"0.5922313",
"0.5715896",
"0.5589312",
"0.55739",
"0.5564336",
"0.5550376",
"0.55465806",
"0.5542209",
"0.5491709",
"0.54822916",
"0.5352685",
"0.535085",
"0.53244257",
"0.53082526",
"0.52949154",
"0.5284981",
"0.5282798",
"0.52684623",
"0.52638584",
"0.5261142",... | 0.62776756 | 0 |
Sets current environment (and initializes episode) | def bGVm(YKHO, sEAN):
YKHO.env = sEAN
YKHO.sim_env = jth9.deepcopy(YKHO.env)
YKHO.sim_env.reset_at_episode_end = False
YKHO.init_episode() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n5Kk(YKHO):\n YKHO.last_sensation = YKHO.env()\n YKHO.next_action = YKHO.agent(YKHO.last_sensation)",
"def zIVT(YKHO):\n _1tc.setAntialias(fwLS.MMultisample, 1)\n aazL = DWkG.loadModel('Content/falcon/falcon.bam')\n aazL.setScale(30)\n aazL.setPos(0, 0, 28.5)\n aazL.reparentTo(_1tc)",
... | [
"0.6493258",
"0.6491669",
"0.64316636",
"0.64199936",
"0.64152956",
"0.64152956",
"0.6382024",
"0.6382024",
"0.6382024",
"0.6240911",
"0.6228559",
"0.6207403",
"0.6182203",
"0.61762697",
"0.61270976",
"0.6124821",
"0.60715103",
"0.60715103",
"0.6064561",
"0.6035142",
"0.60247... | 0.7375576 | 0 |
Creates an instance of this model from a dictionary | def rQfz(Emd4, cmPJ):
if cmPJ is None:
return None
Of0F = None
if cmPJ.get('hosts') != None:
Of0F = list()
for g8x2 in cmPJ.get('hosts'):
Of0F.append(qRGs.models.host_entry.HostEntry.from_dictionary(g8x2))
return Emd4(Of0F) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rQfz(Emd4, cmPJ):\n if cmPJ is None:\n return None\n id = cmPJ.get('id')\n mWFP = cmPJ.get('name')\n tDvy = cmPJ.get('type')\n fFb7 = cmPJ.get('usageBytes')\n return Emd4(id, mWFP, tDvy, fFb7)",
"def eLpg(Emd4, cmPJ):\n return Emd4(**cmPJ)",
"def eLpg(Emd4, cmPJ):\n return Em... | [
"0.83190626",
"0.81680465",
"0.81680465",
"0.81198996",
"0.80894077",
"0.7979489",
"0.79510856",
"0.7923969",
"0.78998214",
"0.7894075",
"0.788929",
"0.7883757",
"0.7883385",
"0.7877541",
"0.78598565",
"0.78387827",
"0.7804587",
"0.7804587",
"0.7804587",
"0.7804587",
"0.78045... | 0.0 | -1 |
Check that a future recurring ride is built from the RecurringRideFactory. | def uRgJ(YKHO) -> None:
KWCF: dict = q0Mq.build(future_recurring_ride=True)
QXr7: str = KWCF['ride']['pickup']['timestamp']
assert _c1T.isoformat(_c1T.today() + fCoM(days=1)) in QXr7 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZIOu(YKHO) -> None:\n jsVd: dict = q0Mq.build(same_day_future_recurring_ride=True)\n assert _c1T.isoformat(_c1T.today() + fCoM(hours=3)) in jsVd['ride']['pickup']['timestamp']",
"def lIB2(YKHO, zVa7: fixture) -> None:\n fBlC = q0Mq.create(service=zVa7, future_recurring_ride=True)\n QXr7: str = fB... | [
"0.7456613",
"0.73427016",
"0.7275607",
"0.6940479",
"0.6881276",
"0.66944987",
"0.6414177",
"0.6359864",
"0.62482643",
"0.5836848",
"0.57694674",
"0.57608503",
"0.57221305",
"0.56549877",
"0.56404084",
"0.55933625",
"0.55550027",
"0.55436283",
"0.5365987",
"0.535568",
"0.529... | 0.7680453 | 0 |
Check that a ride with note is built from the RecurringRideFactory. | def cBVZ(YKHO) -> None:
TOIx: dict = q0Mq.build(ride_with_note=True)
assert TOIx['ride']['note'] is not None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oHek(YKHO) -> None:\n fBlC: dict = q0Mq.build()\n assert fBlC['ride'] is not None",
"def ebWo(YKHO) -> None:\n gjcA: dict = q0Mq.build()\n rvpf: dict = q0Mq.build()\n assert gjcA != rvpf",
"def P1HU(YKHO, zVa7: fixture) -> None:\n fBlC: dict = q0Mq.create(service=zVa7, ride_with_note=True... | [
"0.72921115",
"0.70708066",
"0.7069345",
"0.6884601",
"0.68277663",
"0.6664638",
"0.6464132",
"0.63748646",
"0.62851715",
"0.6284203",
"0.59420234",
"0.55068743",
"0.5476783",
"0.54169554",
"0.5285549",
"0.5192731",
"0.51549476",
"0.51543796",
"0.5150797",
"0.51382023",
"0.51... | 0.7517945 | 0 |
Check that a new RecurringRide is returned from the RideFactory build method. | def ebWo(YKHO) -> None:
gjcA: dict = q0Mq.build()
rvpf: dict = q0Mq.build()
assert gjcA != rvpf | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oHek(YKHO) -> None:\n fBlC: dict = q0Mq.build()\n assert fBlC['ride'] is not None",
"def XLUC(YKHO) -> None:\n gjcA: dict = q0Mq.build()\n rvpf: dict = q0Mq.build()\n assert gjcA['ride'] != rvpf['ride']",
"def IkXi(YKHO) -> None:\n fBlC: dict = q0Mq.build()\n assert fBlC['rides'] is no... | [
"0.76770884",
"0.750304",
"0.6990865",
"0.69740254",
"0.692608",
"0.67045677",
"0.63399756",
"0.6338585",
"0.59933513",
"0.57535136",
"0.567084",
"0.5505825",
"0.550326",
"0.54477274",
"0.53295237",
"0.5258997",
"0.523484",
"0.5193835",
"0.51036257",
"0.5063497",
"0.5025257",... | 0.7743962 | 0 |
Check that a new ride object is returned from the RideFactory build method. | def XLUC(YKHO) -> None:
gjcA: dict = q0Mq.build()
rvpf: dict = q0Mq.build()
assert gjcA['ride'] != rvpf['ride'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oHek(YKHO) -> None:\n fBlC: dict = q0Mq.build()\n assert fBlC['ride'] is not None",
"def ebWo(YKHO) -> None:\n gjcA: dict = q0Mq.build()\n rvpf: dict = q0Mq.build()\n assert gjcA != rvpf",
"def hVnM(YKHO) -> None:\n fBlC: dict = q0Mq.build()\n assert fBlC is not None",
"def IkXi(YKHO... | [
"0.77962303",
"0.7479432",
"0.6826083",
"0.6815011",
"0.6433893",
"0.6046089",
"0.60266894",
"0.5990073",
"0.58527935",
"0.5688818",
"0.55321676",
"0.5413793",
"0.53909314",
"0.53860873",
"0.5330898",
"0.5317841",
"0.5294483",
"0.5282539",
"0.5264896",
"0.5264896",
"0.5263967... | 0.77697796 | 1 |
Check that a future recurring ride is created from the RecurringRideFactory. | def lIB2(YKHO, zVa7: fixture) -> None:
fBlC = q0Mq.create(service=zVa7, future_recurring_ride=True)
QXr7: str = fBlC['ride']['pickup']['timestamp']
assert _c1T.isoformat(_c1T.today() + fCoM(days=1)) in QXr7 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uRgJ(YKHO) -> None:\n KWCF: dict = q0Mq.build(future_recurring_ride=True)\n QXr7: str = KWCF['ride']['pickup']['timestamp']\n assert _c1T.isoformat(_c1T.today() + fCoM(days=1)) in QXr7",
"def ZIOu(YKHO) -> None:\n jsVd: dict = q0Mq.build(same_day_future_recurring_ride=True)\n assert _c1T.isofo... | [
"0.7426905",
"0.733312",
"0.7245862",
"0.6984218",
"0.64994544",
"0.6389633",
"0.5931136",
"0.59171605",
"0.5901186",
"0.5856912",
"0.5809988",
"0.57689464",
"0.57332313",
"0.57285935",
"0.5694355",
"0.5642183",
"0.56345916",
"0.5617561",
"0.55897343",
"0.557134",
"0.5540266"... | 0.7556249 | 0 |
Check that a ride with note is created from the RecurringRideFactory. | def P1HU(YKHO, zVa7: fixture) -> None:
fBlC: dict = q0Mq.create(service=zVa7, ride_with_note=True)
assert fBlC['ride']['note'] is not None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cBVZ(YKHO) -> None:\n TOIx: dict = q0Mq.build(ride_with_note=True)\n assert TOIx['ride']['note'] is not None",
"def oHek(YKHO) -> None:\n fBlC: dict = q0Mq.build()\n assert fBlC['ride'] is not None",
"def ebWo(YKHO) -> None:\n gjcA: dict = q0Mq.build()\n rvpf: dict = q0Mq.build()\n ass... | [
"0.7108772",
"0.68941957",
"0.68113863",
"0.6592972",
"0.6592731",
"0.6445494",
"0.6359918",
"0.62323457",
"0.61794555",
"0.607684",
"0.5889995",
"0.5687784",
"0.5497407",
"0.5468263",
"0.54404134",
"0.5431983",
"0.5396597",
"0.5373425",
"0.53728896",
"0.53616935",
"0.5357806... | 0.7213159 | 0 |
Check that a same day future recurring ride is created from the RecurringRideFactory. | def oBs4(YKHO, zVa7: fixture) -> None:
fBlC: dict = q0Mq.create(service=zVa7, same_day_future_recurring_ride=True)
QXr7: str = fBlC['ride']['pickup']['timestamp']
assert _c1T.isoformat(_c1T.today() + fCoM(hours=3)) in QXr7 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZIOu(YKHO) -> None:\n jsVd: dict = q0Mq.build(same_day_future_recurring_ride=True)\n assert _c1T.isoformat(_c1T.today() + fCoM(hours=3)) in jsVd['ride']['pickup']['timestamp']",
"def lIB2(YKHO, zVa7: fixture) -> None:\n fBlC = q0Mq.create(service=zVa7, future_recurring_ride=True)\n QXr7: str = fB... | [
"0.8056913",
"0.77959085",
"0.7594824",
"0.6843804",
"0.6228385",
"0.617112",
"0.6157976",
"0.60910773",
"0.60662645",
"0.60192704",
"0.601434",
"0.5998579",
"0.598041",
"0.59690124",
"0.59445214",
"0.5927137",
"0.59185636",
"0.59126633",
"0.5909948",
"0.5836224",
"0.5821111"... | 0.8012396 | 1 |
returns True, if type represents C++ integral or floating point type, False otherwise | def PEha(type):
return wUYH(type) or RTAK(type) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wUYH(type):\n eaNW = rb16(ZdIm.char_t()) + rb16(ZdIm.unsigned_char_t()) + rb16(ZdIm.signed_char_t()) + rb16(ZdIm.wchar_t()) + rb16(ZdIm.short_int_t()) + rb16(ZdIm.short_unsigned_int_t()) + rb16(ZdIm.bool_t()) + rb16(ZdIm.int_t()) + rb16(ZdIm.unsigned_int_t()) + rb16(ZdIm.long_int_t()) + rb16(ZdIm.long_unsig... | [
"0.6631692",
"0.6588647",
"0.6586306",
"0.64957446",
"0.6374232",
"0.63691604",
"0.6334088",
"0.63270116",
"0.6276062",
"0.62758094",
"0.62695205",
"0.6262216",
"0.61434585",
"0.6131299",
"0.6084664",
"0.60317874",
"0.6029375",
"0.6017151",
"0.6004724",
"0.59942067",
"0.59933... | 0.6380168 | 4 |
returns True, if type represents C++ reference type, False otherwise | def m338(type):
ThyU = Nl70(type)
return isinstance(ThyU, ZdIm.reference_t) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wPOP(type):\n fAGM = rxEN.is_const(type) or (hasattr(type, 'base') and rxEN.is_const(type.base))\n epCp = rxEN.is_reference(type) or (hasattr(type, 'base') and rxEN.is_reference(type.base))\n return epCp and fAGM",
"def m338(YKHO):\n return Fv2L.lib.clang_isReference(YKHO)",
"def CK20(BWXx):\n ... | [
"0.72547483",
"0.6942767",
"0.6629437",
"0.6546131",
"0.64801556",
"0.64221776",
"0.62602913",
"0.6254145",
"0.6230019",
"0.61748505",
"0.6156219",
"0.6098374",
"0.6092407",
"0.60902387",
"0.60100204",
"0.6001219",
"0.59770197",
"0.596749",
"0.59079665",
"0.58903676",
"0.5883... | 0.8142678 | 0 |
returns True, if type represents C++ const type, False otherwise | def fAGM(type):
ThyU = Nl70(type)
return isinstance(ThyU, ZdIm.const_t) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wPOP(type):\n fAGM = rxEN.is_const(type) or (hasattr(type, 'base') and rxEN.is_const(type.base))\n epCp = rxEN.is_reference(type) or (hasattr(type, 'base') and rxEN.is_reference(type.base))\n return epCp and fAGM",
"def XwZ1(YKHO):\n return Fv2L.lib.clang_isConstQualifiedType(YKHO)",
"def T6k3(... | [
"0.6958227",
"0.6910033",
"0.65865797",
"0.6290368",
"0.6227741",
"0.60773766",
"0.60537726",
"0.6050793",
"0.6018981",
"0.60043234",
"0.59523064",
"0.588276",
"0.5840154",
"0.5823267",
"0.5811727",
"0.5699804",
"0.5659577",
"0.56406635",
"0.56158596",
"0.5543699",
"0.5525821... | 0.80221224 | 0 |
returns True, if type1 and type2 are same types | def cMLt(uGHt, Fvlg):
_fHV = TQdx(uGHt)
Luf1 = TQdx(Fvlg)
return _fHV == Luf1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ILiT(a0GJ, TLv5):\n return isinstance(a0GJ, type(TLv5))",
"def l_QA(YKHO, Elif):\n return True",
"def VC9h(YKHO, wNuL, Mlb1):\n if YKHO.f_supports(wNuL) != YKHO.f_supports(Mlb1):\n return False\n if not YKHO.f_supports(wNuL) and (not YKHO.f_supports(Mlb1)):\n raise TypeError('I do... | [
"0.8232314",
"0.7990644",
"0.77117264",
"0.7667614",
"0.75037205",
"0.74987614",
"0.74972105",
"0.73906344",
"0.7282398",
"0.7219325",
"0.6998093",
"0.6970877",
"0.6940486",
"0.69266087",
"0.68406993",
"0.6822092",
"0.6814113",
"0.6782477",
"0.6775843",
"0.6721488",
"0.669458... | 0.83862215 | 0 |
returns True, if type represents C++ fundamental type | def dSOv(type):
return l_16(type, ZdIm.fundamental_t, (ZdIm.const_t, ZdIm.volatile_t)) or l_16(type, ZdIm.fundamental_t, (ZdIm.volatile_t, ZdIm.const_t)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lRnX(YKHO, i8q0):\n if i8q0 in [YKHO.c_char_p, YKHO.c_void_p, YKHO.CString]:\n return False\n return i8q0 in YKHO.__basic_types",
"def g9YX(YKHO, i8q0):\n if not hasattr(i8q0, '_type_'):\n return i8q0 in [int, Swre, float, bool]\n return YKHO.is_basic_ctype(i8q0)",
"def RTAK(type)... | [
"0.7030364",
"0.66599476",
"0.6046835",
"0.5938325",
"0.5906367",
"0.5809609",
"0.5791076",
"0.57610685",
"0.5754151",
"0.5729177",
"0.5705968",
"0.5655816",
"0.56143767",
"0.5609009",
"0.5598526",
"0.5592075",
"0.5587478",
"0.5582749",
"0.5565113",
"0.55348295",
"0.5534587",... | 0.76821107 | 0 |
returns True if type represents a C++ union | def AD5J(kN9s):
if not LJf3(kN9s):
return False
K93d = HbaL.get_declaration(kN9s)
return K93d.class_type == Qgmf.CLASS_TYPES.UNION | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aOHe(kmUU: Type) -> bool:\n return Wkq0(kmUU) is uLKX",
"def t2Cd(YKHO, i8q0):\n if i8q0 == YKHO.c_longdouble:\n return False\n if YKHO.is_cstring_type(i8q0):\n return False\n return issubclass(i8q0, YKHO.get_real_ctypes_member('Union'))",
"def ByBQ(HRJ_):\n if HRJ_ is uLKX:\n ... | [
"0.80529803",
"0.79514694",
"0.76344645",
"0.75142926",
"0.74388856",
"0.7316637",
"0.7015306",
"0.6959607",
"0.695248",
"0.69521606",
"0.67257667",
"0.5995503",
"0.59941846",
"0.58286303",
"0.57918674",
"0.57349396",
"0.5732569",
"0.571059",
"0.57092524",
"0.57077",
"0.57077... | 0.8039434 | 1 |
returns True, if class has public assign operator, False otherwise | def KT1I(vOsx):
vOsx = HbaL.get_declaration(vOsx)
uUHa = vOsx.mem_opers(lambda z1Rg: z1Rg.symbol == '=' and z1Rg.access_type == 'public', recursive=False, allow_empty=True)
return bool(uUHa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def t3Zo(YKHO, cM24: Type) -> bool:\n raise NotImplementedError()",
"def kJXq(type):\n return PRKl(type, '==')",
"def RnCy(YKHO):\n return YKHO.var.initializer is not None",
"def PRKl(kN9s, uxdh):\n kN9s = Nl70(kN9s)\n kN9s = OTgc(kN9s)\n kN9s = TQdx(kN9s)\n assert isinstance(kN9s, Qgmf.... | [
"0.6159163",
"0.61377376",
"0.6065221",
"0.5974117",
"0.5791719",
"0.57146794",
"0.567876",
"0.56639594",
"0.5640697",
"0.5609316",
"0.5609316",
"0.55776316",
"0.5557651",
"0.5530487",
"0.54604375",
"0.54604375",
"0.53952974",
"0.5370379",
"0.5364252",
"0.5336572",
"0.5336572... | 0.71238023 | 0 |
returns True, if class has public operator==, otherwise False | def kJXq(type):
return PRKl(type, '==') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, *qIxc):\n pass",
"def xa14(YKHO, *qIxc):\n pass",
"def xa14(YKHO, *qIxc):\n pass",
"def xa14(YKHO, *qIxc):\n pass",
"def xa14(YKHO, *qIxc):\n pass",
"def xa14(YKHO, *qIxc):\n pass",
"def xa14(YKHO, *qIxc):\n pass",
"def xa14(YKHO, *qIxc):\n pass",
"def xa14(YK... | [
"0.72278476",
"0.72278476",
"0.72278476",
"0.72278476",
"0.72278476",
"0.72278476",
"0.72278476",
"0.72278476",
"0.72278476",
"0.72278476",
"0.72278476",
"0.72278476",
"0.72278476",
"0.72278476",
"0.72278476",
"0.72278476",
"0.72278476",
"0.72278476",
"0.72278476",
"0.72278476"... | 0.77270144 | 0 |
returns True, if class has public operator<, otherwise False | def y0el(type):
return PRKl(type, '<') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JWbp(YKHO, Elif: t.Any) -> bool:\n return YKHO._op_bool('__lt__', Elif)",
"def JWbp(YKHO, Elif):\n return True",
"def JWbp(YKHO, Elif):\n return True",
"def JWbp(YKHO, Elif):\n return YKHO._obj_func() < Elif._obj_func()",
"def JWbp(YKHO, Elif):\n return YKHO.__cmp__(Elif) < 0",
"def JW... | [
"0.75423485",
"0.7450696",
"0.7450696",
"0.7238786",
"0.70503134",
"0.6956891",
"0.6956891",
"0.6936417",
"0.69186276",
"0.690914",
"0.68925947",
"0.6876835",
"0.68632543",
"0.68559986",
"0.6852951",
"0.67471904",
"0.67216414",
"0.67096484",
"0.6693922",
"0.6681374",
"0.66667... | 0.7840395 | 0 |
Sets the learning rate to the initial LR decayed by 10 every 30 epochs | def e_63(K0do, qtWj, qIxc):
tspZ = qIxc.lr * 0.1 ** (qtWj // 30)
for Lwm5 in K0do.param_groups:
Lwm5['lr'] = tspZ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e_63(DJmW, K0do, qtWj, exwG=100):\n DJmW = DJmW * 0.1 ** (qtWj // exwG)\n print('learning rate : ', DJmW)\n for Lwm5 in K0do.param_groups:\n Lwm5['lr'] = DJmW",
"def e_63(ouZy, K0do, qtWj, dLlC):\n tspZ = ouZy * 0.3 ** (qtWj // 5)\n if qtWj == dLlC:\n tspZ = tspZ * 0.3\n for L... | [
"0.79135466",
"0.7906959",
"0.78501177",
"0.77753556",
"0.7734022",
"0.77317274",
"0.7722737",
"0.7719314",
"0.7709071",
"0.7693548",
"0.76741743",
"0.766576",
"0.766576",
"0.766576",
"0.7655009",
"0.76420027",
"0.7639289",
"0.76378644",
"0.7626088",
"0.7624756",
"0.76212347"... | 0.77221584 | 7 |
Computes the accuracy over the k top predictions for the specified values of k | def vjyh(hlel, pan_, hz5a=(1,)):
with ht2j.no_grad():
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].r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z7qO(LVAh, aMgO, G1Hx=2):\n nvEb = []\n for YRbF in range(len(LVAh)):\n if LVAh[YRbF] in aMgO[YRbF][:G1Hx]:\n nvEb.append(1)\n else:\n nvEb.append(0)\n return sum(nvEb) / len(nvEb)",
"def vjyh(aMgO, ibJh, hz5a=(1,)):\n Gq8e = max(hz5a)\n Ep8u = ibJh.size(0)\... | [
"0.8331214",
"0.8284662",
"0.82381004",
"0.8229767",
"0.82202226",
"0.81864446",
"0.81847763",
"0.8175173",
"0.8171541",
"0.81699467",
"0.81664646",
"0.81645083",
"0.81637454",
"0.81622064",
"0.81622064",
"0.81622064",
"0.81622064",
"0.81622064",
"0.81622064",
"0.81622064",
"... | 0.78591996 | 77 |
Wrapper for ray casting that moves the ray into object space | def npsS(YEnM, SppC):
WdvT = SppC.inverted()
GUVj = WdvT * TEJX
YowC = WdvT * ZsX0
Bh0m = YowC - GUVj
nyyK, Rci7, mhAC, Huyu = YEnM.ray_cast(GUVj, Bh0m)
if nyyK:
return (Rci7, mhAC, Huyu)
else:
return (None, None, None) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def npsS(YEnM, SppC):\n WdvT = SppC.inverted()\n GUVj = WdvT * TEJX\n YowC = WdvT * ZsX0\n Bh0m = YowC - GUVj\n nyyK, Rci7, mhAC, Huyu = YEnM.ray_cast(GUVj, Bh0m)\n if nyyK:\n return (Rci7, mhAC, Huyu)\n else:\n return (None, None, None)",
"def Z_bW(YKHO, QpfX, tvqc):\n m19O... | [
"0.71598464",
"0.7108806",
"0.7093949",
"0.6975007",
"0.62521666",
"0.61117506",
"0.60194856",
"0.59293383",
"0.5882952",
"0.5871332",
"0.5810898",
"0.58108354",
"0.576089",
"0.5749889",
"0.5703415",
"0.56720555",
"0.560589",
"0.5594175",
"0.5577506",
"0.55460733",
"0.5533887... | 0.700609 | 3 |
Wrapper for ray casting that moves the ray into object space | def npsS(YEnM, SppC):
WdvT = SppC.inverted()
GUVj = WdvT * TEJX
YowC = WdvT * ZsX0
Bh0m = YowC - GUVj
nyyK, Rci7, mhAC, Huyu = YEnM.ray_cast(GUVj, Bh0m)
if nyyK:
return (Rci7, mhAC, Huyu, ZsX0)
else:
return (None, None, None, ZsX0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def npsS(YEnM, SppC):\n WdvT = SppC.inverted()\n GUVj = WdvT * TEJX\n YowC = WdvT * ZsX0\n Bh0m = YowC - GUVj\n nyyK, Rci7, mhAC, Huyu = YEnM.ray_cast(GUVj, Bh0m)\n if nyyK:\n return (Rci7, mhAC, Huyu)\n else:\n return (None, None, None)",
"def Z_bW(YKHO, QpfX, tvqc):\n m19O... | [
"0.7159447",
"0.7108588",
"0.70054984",
"0.69744205",
"0.6251917",
"0.6112991",
"0.6019621",
"0.5928927",
"0.5882911",
"0.58706033",
"0.58095115",
"0.5809462",
"0.5759563",
"0.5748744",
"0.5703533",
"0.56732535",
"0.56046677",
"0.5592776",
"0.55776376",
"0.55461746",
"0.55331... | 0.7093163 | 2 |
Gets the id of this DownloadableDataSampleInterface. Sample(or link) id | def id(YKHO) -> int:
return YKHO._id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tQ5a(YKHO):\n return YKHO.getDbRecord().getColumnValue(ZkEL)",
"def id(YKHO):\n return YKHO.get_data('id')",
"def id(YKHO):\n return YKHO.data.id",
"def B85K(YKHO) -> rLdf.Series:\n return YKHO.meta.get('sample_id')",
"def id(YKHO):\n return str(YKHO.get_data('id'))",
"def id(YKHO):\n ... | [
"0.7211298",
"0.70066905",
"0.69921154",
"0.69172263",
"0.68228966",
"0.67824453",
"0.6753421",
"0.66502434",
"0.6642416",
"0.6635184",
"0.6635184",
"0.6635184",
"0.6635184",
"0.6630262",
"0.662553",
"0.66248924",
"0.6591769",
"0.6585858",
"0.6585858",
"0.6585858",
"0.6572214... | 0.6558124 | 34 |
Sets the id of this DownloadableDataSampleInterface. Sample(or link) id | def id(YKHO, id: int):
YKHO._id = id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V_9M(YKHO, id):\n YKHO.data['id'] = id",
"def V_9M(YKHO, id):\n YKHO.__id = id",
"def ekm0(YKHO, id):\n raise NotImplementedError('must be implemented in subclass')",
"def psjw(YKHO, id):\n YKHO.id = int(id)",
"def id(YKHO, _eu6):\n YKHO.metadata['id'] = _eu6",
"def id(YKHO, id):\n ... | [
"0.74035764",
"0.7258344",
"0.7247008",
"0.7173011",
"0.71543205",
"0.714274",
"0.714274",
"0.714274",
"0.714274",
"0.714274",
"0.71323144",
"0.7128423",
"0.7128423",
"0.7128423",
"0.7128423",
"0.7128423",
"0.7128423",
"0.7128423",
"0.7128423",
"0.7128423",
"0.7128423",
"0.... | 0.7038888 | 33 |
Gets the title of this DownloadableDataSampleInterface. Title | def leAC(YKHO) -> str:
return YKHO._title | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def leAC(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'title')",
"def _BjJ(YKHO):\n return YKHO._title",
"def leAC(YKHO) -> str:\n return qe4Y.get(YKHO, 'title')",
"def leAC(YKHO) -> str:\n return qe4Y.get(YKHO, 'title')",
"def leAC(YKHO) -> str:\n return qe4Y.get(YKHO, 'title')",
"d... | [
"0.79032",
"0.7849867",
"0.78181666",
"0.78181666",
"0.78181666",
"0.77949154",
"0.7772092",
"0.7772092",
"0.7772092",
"0.7772092",
"0.7772092",
"0.7772092",
"0.77552855",
"0.7740091",
"0.7740091",
"0.7740091",
"0.77367586",
"0.77336985",
"0.7720172",
"0.76942873",
"0.7678182... | 0.76773095 | 25 |
Sets the title of this DownloadableDataSampleInterface. Title | def leAC(YKHO, leAC: str):
if leAC is None:
raise ValueError('Invalid value for `title`, must not be `None`')
YKHO._title = leAC | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def h24y(YKHO, leAC):\n YKHO.title = leAC",
"def GYWE(YKHO, leAC):\n YKHO.__title = leAC",
"def GYWE(YKHO, leAC):\n YKHO.__title = leAC",
"def leAC(YKHO, leAC):\n YKHO._title = leAC",
"def leAC(YKHO, leAC):\n YKHO._title = leAC",
"def leAC(YKHO, leAC):\n YKHO._title = leAC",
"def leAC... | [
"0.80639064",
"0.8056699",
"0.8056699",
"0.8052254",
"0.8052254",
"0.8052254",
"0.8052254",
"0.8052254",
"0.8052254",
"0.8052254",
"0.8052254",
"0.8052254",
"0.8052254",
"0.8052254",
"0.8052254",
"0.8052254",
"0.8052254",
"0.8038005",
"0.802649",
"0.80196995",
"0.8005869",
... | 0.7591208 | 35 |
Gets the sample_type of this DownloadableDataSampleInterface. | def tUCW(YKHO) -> str:
return YKHO._sample_type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def type(YKHO) -> TlLn:\n return YKHO._type",
"def FRul(YKHO):\n return YKHO._type",
"def FRul(YKHO):\n return YKHO._type",
"def FRul(YKHO):\n return YKHO._TYPE",
"def YwLH(YKHO):\n return YKHO.type_",
"def FRul(YKHO):\n return YKHO._stype",
"def FRul(YKHO):\n return YKHO.type",
... | [
"0.6375784",
"0.63182354",
"0.63182354",
"0.62555885",
"0.62287116",
"0.62264156",
"0.6217507",
"0.6217507",
"0.62034005",
"0.61728305",
"0.6171515",
"0.6161314",
"0.6122495",
"0.6087958",
"0.60686564",
"0.6066251",
"0.60631776",
"0.6058182",
"0.6058182",
"0.6058182",
"0.6058... | 0.7003912 | 0 |
Sets the sample_type of this DownloadableDataSampleInterface. | def tUCW(YKHO, tUCW: str):
if tUCW is None:
raise ValueError('Invalid value for `sample_type`, must not be `None`')
YKHO._sample_type = tUCW | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tUCW(YKHO, tUCW):\n Pe9W = 'UPDATE barcodes.sample\\n SET sample_type = %s\\n WHERE sample_id = %s'\n with TlDD.sql.TRN:\n TlDD.sql.TRN.add(Pe9W, [tUCW, YKHO.id])",
"def oq00(YKHO, type):\n YKHO.__data_set_type__ = type",
"def TG_K(YKHO, type):\n YKHO._typ... | [
"0.6727752",
"0.62468135",
"0.6178982",
"0.6153391",
"0.6153391",
"0.5903703",
"0.5824452",
"0.5806498",
"0.5806498",
"0.5806498",
"0.5779497",
"0.5779497",
"0.5779497",
"0.5779497",
"0.5779497",
"0.5779497",
"0.5779497",
"0.5779497",
"0.5779497",
"0.5779497",
"0.5779497",
... | 0.7641073 | 0 |
Gets the sample_file of this DownloadableDataSampleInterface. relative file path | def XYOh(YKHO) -> str:
return YKHO._sample_file | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F28p(YKHO):\n return YKHO._file_path",
"def qaEx(YKHO):\n return YKHO.lib.file_path",
"def pmON(YKHO):\n return YKHO._data_file",
"def qaEx(YKHO):\n return YKHO._obs_file()",
"def SJOK(YKHO):\n return YKHO.dir + YKHO.file_name + YKHO.extension",
"def pmON(YKHO):\n return YKHO.file_p... | [
"0.7221411",
"0.70626414",
"0.7056722",
"0.68962747",
"0.680585",
"0.6804241",
"0.6771714",
"0.673996",
"0.672983",
"0.66897184",
"0.66225195",
"0.6608245",
"0.65686506",
"0.65686506",
"0.6558293",
"0.65196383",
"0.6476549",
"0.6433655",
"0.6422759",
"0.64183885",
"0.6414791"... | 0.7584514 | 0 |
Gets the sample_file_content of this DownloadableDataSampleInterface. | def t3WC(YKHO) -> XXYd:
return YKHO._sample_file_content | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W86P(YKHO):\n KCHu = kJm3.StringIO()\n KCHu.write(YKHO.get_header())\n KCHu.write(YKHO.get_content())\n return KCHu.getvalue()",
"def Sffg(YKHO):\n return YKHO.file.read()",
"def t3WC(YKHO, t3WC: DownloadableDataFileContentInterface):\n YKHO._sample_file_content = t3WC",
"def hObn(YKHO)... | [
"0.68037874",
"0.66366905",
"0.66286397",
"0.6613036",
"0.64783525",
"0.6361968",
"0.6254303",
"0.6192874",
"0.61926347",
"0.61247975",
"0.6120483",
"0.6088796",
"0.60769576",
"0.6052164",
"0.60362566",
"0.60362566",
"0.60362566",
"0.60178477",
"0.60162324",
"0.59985334",
"0.... | 0.8653033 | 0 |
Gets the sample_url of this DownloadableDataSampleInterface. file URL | def Jcle(YKHO) -> str:
return YKHO._sample_url | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hKhs(YKHO):\n try:\n return YKHO._file.url\n except AttributeError:\n raise NotImplementedError('Underlying file does not have a URL.')",
"def hKhs(YKHO):\n return YKHO.get_file(uri_type=tRPw, no_copy=True)",
"def bD7m(YKHO):\n if not YKHO.fid:\n raise Bx6I.NotCreatedError(... | [
"0.7632803",
"0.7380087",
"0.69870204",
"0.69837725",
"0.69777703",
"0.69118893",
"0.6859784",
"0.68208104",
"0.681425",
"0.681425",
"0.67761064",
"0.6763739",
"0.67304885",
"0.665028",
"0.65707445",
"0.65652823",
"0.65235984",
"0.649572",
"0.6494899",
"0.6490884",
"0.6458094... | 0.7540534 | 1 |
Sets the sample_url of this DownloadableDataSampleInterface. file URL | def Jcle(YKHO, Jcle: str):
YKHO._sample_url = Jcle | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def U2Rp(YKHO, bD7m):\n YKHO.data['url'] = bD7m",
"def e8mv(YKHO, e8mv):\n YKHO._input_file_url = e8mv",
"def U2Rp(YKHO, bD7m):\n if bD7m is not None:\n YKHO.url = bD7m",
"def U2Rp(YKHO, bD7m):\n YKHO.url = bD7m",
"def Jcle(YKHO) -> str:\n return YKHO._sample_url",
"def bD7m(YKHO, b... | [
"0.66698116",
"0.65751445",
"0.65353626",
"0.6518724",
"0.64884794",
"0.6353621",
"0.6298433",
"0.62912536",
"0.6224944",
"0.6224944",
"0.6224944",
"0.6189533",
"0.6189533",
"0.6189533",
"0.6189533",
"0.6189533",
"0.6189533",
"0.6189533",
"0.61572945",
"0.6151396",
"0.6108914... | 0.76989466 | 0 |
Checks if the coin age exceeds the age from the condition | def HIRw(XEri: ConditionWithArgs, LgZ4: CoinRecord, AVQN: uint32) -> h8nf[liDL]:
try:
fnXm = bbKw(XEri.vars[0])
u1vG = fnXm + LgZ4.confirmed_block_index
except ValueError:
return liDL.INVALID_CONDITION
if AVQN < u1vG:
return liDL.ASSERT_HEIGHT_RELATIVE_FAILED
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lZDM(YKHO):\n return YKHO.get_age() >= G5wc",
"async def age_prompt_validator(RZjF: PromptValidatorContext) -> bool:\n return RZjF.recognized.succeeded and 0 < RZjF.recognized.value < 150",
"def lZDM(YKHO):\n ZJe_ = 2021 - YKHO.year\n if ZJe_ >= 50:\n return True\n else:\n retu... | [
"0.71658814",
"0.6958408",
"0.6913825",
"0.6733932",
"0.6672007",
"0.66271484",
"0.6581271",
"0.65602267",
"0.65021706",
"0.64722687",
"0.64722687",
"0.642189",
"0.63391894",
"0.630778",
"0.61229753",
"0.6122615",
"0.6079695",
"0.6036498",
"0.6008758",
"0.6005665",
"0.5960272... | 0.0 | -1 |
Check if the current time in seconds exceeds the time specified by condition | def tptQ(XEri: ConditionWithArgs, E3oo: uint64) -> h8nf[liDL]:
try:
q0kk = bbKw(XEri.vars[0])
except ValueError:
return liDL.INVALID_CONDITION
if E3oo is None:
E3oo = oevr(int(ITS7.time()))
if E3oo < q0kk:
return liDL.ASSERT_SECONDS_ABSOLUTE_FAILED
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qj_V():\n WXkz = ra5c()\n C61p = abs((WXkz['local'] - WXkz['target']).total_seconds())\n return C61p < lb9x",
"def Zloe(YKHO, jg5q):\n if ITS7.time() - YKHO.start_time >= jg5q:\n return True\n return False",
"def DOuq(YKHO, nEj9):\n return YKHO.to_seconds() > nEj9.to_seconds()",
... | [
"0.7562202",
"0.71025753",
"0.6916898",
"0.6874118",
"0.6869155",
"0.68624634",
"0.67953074",
"0.6778832",
"0.67521226",
"0.6740149",
"0.67286193",
"0.67286193",
"0.6676113",
"0.6667953",
"0.6666035",
"0.6665621",
"0.6635951",
"0.65261716",
"0.65129775",
"0.64674014",
"0.6449... | 0.647807 | 19 |
Check if the current time in seconds exceeds the time specified by condition | def dgYF(XEri: ConditionWithArgs, LgZ4: CoinRecord, E3oo: uint64) -> h8nf[liDL]:
try:
q0kk = bbKw(XEri.vars[0])
except ValueError:
return liDL.INVALID_CONDITION
if E3oo is None:
E3oo = oevr(int(ITS7.time()))
if E3oo < q0kk + LgZ4.timestamp:
return liDL.ASSERT_SECONDS_RELA... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qj_V():\n WXkz = ra5c()\n C61p = abs((WXkz['local'] - WXkz['target']).total_seconds())\n return C61p < lb9x",
"def Zloe(YKHO, jg5q):\n if ITS7.time() - YKHO.start_time >= jg5q:\n return True\n return False",
"def DOuq(YKHO, nEj9):\n return YKHO.to_seconds() > nEj9.to_seconds()",
... | [
"0.7560055",
"0.70983523",
"0.69155896",
"0.68737674",
"0.6867066",
"0.686113",
"0.679441",
"0.67775565",
"0.67518276",
"0.6739354",
"0.67290646",
"0.67290646",
"0.66760504",
"0.66663533",
"0.6665307",
"0.666515",
"0.66334695",
"0.6525863",
"0.6511511",
"0.6478202",
"0.646489... | 0.6199085 | 34 |
Checks if coin's puzzlehash matches the puzzlehash from the condition | def REkX(XEri: ConditionWithArgs, LgZ4: CoinRecord) -> h8nf[liDL]:
if LgZ4.coin.puzzle_hash != XEri.vars[0]:
return liDL.ASSERT_MY_PUZZLEHASH_FAILED
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a5HD(Kh6j: str, hash: str, kl7q: str=sLMT) -> bool:\n global challenge\n Wpga = HBct.sha512(str(Kh6j + a8QB() + kl7q).encode('utf-8')).hexdigest()\n print(Wpga)\n yzq9 = ''.join((tuKI.SystemRandom().choice(C1SZ) for bGrB in range(42)))\n return hash == Wpga",
"def _idp(YKHO, XkN1, c8ok):\n ... | [
"0.6387728",
"0.63675094",
"0.63513815",
"0.62906873",
"0.6281194",
"0.6229039",
"0.6060662",
"0.6060424",
"0.5956857",
"0.58501714",
"0.5839406",
"0.5818684",
"0.57849085",
"0.57588345",
"0.57562876",
"0.5737729",
"0.5726918",
"0.57232445",
"0.57202446",
"0.56678194",
"0.566... | 0.7178541 | 0 |
return true if the element is tagged with this tag_name. | def Q0rM(YKHO, hLhr, U6D_):
return hLhr in YKHO.tag2elements.keys() and U6D_ in YKHO.tag2elements[hLhr] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xc3U(YKHO, hLhr: str) -> bool:\n return hasattr(YKHO, hLhr)",
"def NU_e(YKHO, TZ9E):\n return TZ9E in YKHO.tags",
"def NU_e(YKHO, TZ9E):\n return TZ9E in YKHO.tags",
"def Q0rM(YKHO, o_gm, hLhr):\n DgUE = YKHO.get_tag_for_instance(o_gm, hLhr)\n if DgUE is not None and DgUE == 'true':\n ... | [
"0.7885216",
"0.7811932",
"0.7811932",
"0.7800693",
"0.7607107",
"0.7334519",
"0.72071403",
"0.70080936",
"0.6851873",
"0.6838376",
"0.6777755",
"0.6719842",
"0.67196035",
"0.6685162",
"0.6685069",
"0.66277754",
"0.6587601",
"0.6573966",
"0.65495265",
"0.65388155",
"0.651897"... | 0.8433415 | 0 |
Get the user first name and last name from the information we have in the record. | def Sve3(YKHO, AIu6):
YbpV, EZxl = YKHO.clean_user_names(AIu6)
if YbpV is None and EZxl is None:
YbpV, EZxl = YKHO.extract_name_from_email(AIu6)
return (YbpV, EZxl) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DxOI(AIu6):\n if 'first_name' in AIu6 and 'last_name' in AIu6:\n YbpV = AIu6['first_name'].replace('-', '').replace('_', '').replace('[', '').replace(']', '').replace(' ', '').lower()\n EZxl = AIu6['last_name'].replace('-', '').replace('_', '').replace('[', '').replace(']', '').replace(' ', ''... | [
"0.75281817",
"0.74878085",
"0.7447014",
"0.7406673",
"0.7402745",
"0.7394262",
"0.7337658",
"0.72492516",
"0.72129667",
"0.72013754",
"0.7197006",
"0.71755356",
"0.71623415",
"0.7162276",
"0.7159904",
"0.71576285",
"0.71522796",
"0.7132452",
"0.7116366",
"0.70820224",
"0.705... | 0.83301103 | 0 |
This function presents how to create the json file. This json file should have a specific template in our case. | def oD7C(YKHO, Io23):
if isinstance(Io23, tuple):
Io23 = {'__class__': 'tuple', '__value__': list(Io23)}
else:
raise TypeError(repr(Io23) + ' is not JSON serializable')
return Io23 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o6vr(VzyU):\n xtX7 = 'data/'\n Ux0P = qcWV.now().strftime('%d-%m-%Y') + '-moisture-read.json'\n VqRE = xtX7 + Ux0P\n try:\n Hy7s.mkdir(xtX7)\n except OSError:\n pass\n if GkAb(VqRE).exists():\n pass\n else:\n try:\n eHNT = open(VqRE, 'a')\n ... | [
"0.71226233",
"0.68502873",
"0.67792517",
"0.6747514",
"0.6703053",
"0.66543293",
"0.6540852",
"0.65318674",
"0.6516783",
"0.64526427",
"0.6401962",
"0.63873285",
"0.6270197",
"0.6264846",
"0.62082565",
"0.6202838",
"0.6202838",
"0.61921763",
"0.61898893",
"0.6178573",
"0.613... | 0.0 | -1 |
Sample an action from the logits generated by the policy network. | def pOv4(YKHO, KeL5):
return ZylS.squeeze(ZylS.random.categorical(KeL5, 1), axis=-1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def su1c(YKHO, W061, oJto):\n raise NotImplementedError",
"def su1c(YKHO, W061):\n pass",
"def su1c(YKHO):\n raise NotImplementedError",
"def vGb6(YKHO, _aEm):\n KeL5, i65w = _aEm\n Qabx = oyIN.exp(KeL5) / oyIN.sum(oyIN.exp(KeL5), axis=-1, keepdims=True)\n return oyIN.array([oyIN.random.cho... | [
"0.72112405",
"0.71781105",
"0.697705",
"0.69668126",
"0.6901296",
"0.685864",
"0.6787162",
"0.67868304",
"0.67384255",
"0.66717106",
"0.6663651",
"0.66570956",
"0.6621281",
"0.6614722",
"0.6603717",
"0.65745276",
"0.64987457",
"0.6456226",
"0.64557815",
"0.64438295",
"0.6434... | 0.0 | -1 |
The starting X coordinates at a particular level | def nJ9F(YKHO, ABDL):
B1Wx = YKHO.resolution(ABDL)
return oyIN.arange(0, (YKHO.x_extent + B1Wx - 1) // B1Wx, 64) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vAgg(YKHO):\n return YKHO.position.x",
"def nIKw(YKHO):\n return YKHO.posX",
"def o4D3(YKHO, ABDL):\n B1Wx = YKHO.resolution(ABDL)\n o4D3 = YKHO.x0(ABDL) + 64\n o4D3[-1] = (YKHO.x_extent + B1Wx - 1) // B1Wx\n return o4D3",
"def ZuM2(YKHO, ABDL):\n B1Wx = YKHO.resolution(ABDL)\n re... | [
"0.6999703",
"0.6996245",
"0.6980217",
"0.69114256",
"0.68604106",
"0.6843933",
"0.6824889",
"0.6809815",
"0.675921",
"0.67421",
"0.67335",
"0.6709175",
"0.6688985",
"0.66655886",
"0.6661438",
"0.6661438",
"0.6646134",
"0.6631138",
"0.6502996",
"0.6501843",
"0.64950234",
"0... | 0.7193848 | 0 |
The starting Y coordinates at a particular level | def nxyw(YKHO, ABDL):
B1Wx = YKHO.resolution(ABDL)
return oyIN.arange(0, (YKHO.y_extent + B1Wx - 1) // B1Wx, 64) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def si3g(YKHO, ABDL):\n B1Wx = YKHO.resolution(ABDL)\n si3g = YKHO.y0(ABDL) + 64\n si3g[-1] = (YKHO.y_extent + B1Wx - 1) // B1Wx\n return si3g",
"def bDS1(YKHO):\n return YKHO.position[1]",
"def Tdk1(YKHO):\n return YKHO.dy * YKHO.ny - YKHO.oy",
"def eV2A(YKHO, ABDL):\n B1Wx = YKHO.resol... | [
"0.7052544",
"0.6906553",
"0.6877149",
"0.67688185",
"0.67623544",
"0.6604809",
"0.65925467",
"0.6569983",
"0.65501165",
"0.6543653",
"0.64941573",
"0.64924115",
"0.6491091",
"0.64834034",
"0.6463733",
"0.64487743",
"0.639934",
"0.63954216",
"0.6389561",
"0.6378861",
"0.63788... | 0.71204114 | 0 |
The ending Y coordinates at a particular level | def si3g(YKHO, ABDL):
B1Wx = YKHO.resolution(ABDL)
si3g = YKHO.y0(ABDL) + 64
si3g[-1] = (YKHO.y_extent + B1Wx - 1) // B1Wx
return si3g | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eV2A(YKHO, ABDL):\n B1Wx = YKHO.resolution(ABDL)\n return (YKHO.y_extent // B1Wx + 63) // 64",
"def nxyw(YKHO, ABDL):\n B1Wx = YKHO.resolution(ABDL)\n return oyIN.arange(0, (YKHO.y_extent + B1Wx - 1) // B1Wx, 64)",
"def yDCK(YKHO):\n return YKHO.coords[1]",
"def LVAh(YKHO):\n return YKH... | [
"0.7667739",
"0.7018228",
"0.6923539",
"0.6920812",
"0.69157594",
"0.6860041",
"0.6811079",
"0.6717444",
"0.6709046",
"0.6703756",
"0.6678104",
"0.6665206",
"0.66042924",
"0.6573715",
"0.6571491",
"0.6524065",
"0.65123487",
"0.64857894",
"0.64807516",
"0.6474685",
"0.6460209"... | 0.6812981 | 6 |
Return a dict with current stroke, fill and font state. | def ja6o(g_NO):
return {'stroke.color': g_NO.stroke.color, 'stroke.alpha': g_NO.stroke.alpha, 'stroke.line_width': g_NO.stroke.line_width, 'stroke.line_cap': g_NO.stroke.line_cap, 'stroke.line_join': g_NO.stroke.line_join, 'stroke.miter_limit': g_NO.stroke.miter_limit, 'stroke.line_dash': g_NO.stroke.line_dash, 'fi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def J5Cw(YKHO, gigf, vCtL):\n tqKV = {}\n qUin = gigf.get_forced_alpha()\n if gigf.get_hatch() is not None:\n tqKV['fill'] = 'url(#%s)' % YKHO._get_hatch(gigf, vCtL)\n if vCtL is not None and len(vCtL) == 4 and (vCtL[3] != 1.0) and (not qUin):\n tqKV['fill-opacity'] = XXxf(vCtL[3]... | [
"0.6404495",
"0.58136624",
"0.56519884",
"0.55915356",
"0.5516411",
"0.5510207",
"0.546083",
"0.54357326",
"0.542887",
"0.54155576",
"0.54126924",
"0.5401923",
"0.5394472",
"0.5393469",
"0.5369328",
"0.53623194",
"0.53563344",
"0.5321655",
"0.5306464",
"0.52977645",
"0.529123... | 0.7944336 | 0 |
This is the only place where to_numpy() relies on to_pandas(). It does so because pandas is good with the parquet and dtypes. | def WTDd(id: int, ZLJ_: list=None, gGnb: list=None):
ZLJ_ = YYDj(ZLJ_)
gGnb = YYDj(gGnb)
jQ3Z = fnT7.Tabular.to_pandas(id=id, columns=ZLJ_, samples=gGnb)
ezWE = jQ3Z.to_numpy()
return ezWE | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WTDd(YKHO, **B2fa):\n return ul7n.register(CwDs.DataFrame.to_numpy)(YKHO, **B2fa)",
"def WTDd(YKHO) -> oyIN.ndarray:\n Q28e(\"`to_numpy` loads all data into the driver's memory. It should only be used if the resulting NumPy ndarray is expected to be small.\")\n return YWvJ(oyIN.ndarray, YKHO._to_pan... | [
"0.7519041",
"0.6828039",
"0.6787758",
"0.66769284",
"0.66769284",
"0.631002",
"0.629958",
"0.6248261",
"0.6206761",
"0.6143321",
"0.6133862",
"0.608684",
"0.60692483",
"0.6056966",
"0.60505116",
"0.60505116",
"0.60505116",
"0.6030656",
"0.60119265",
"0.5998219",
"0.596397",
... | 0.5764011 | 36 |
Parquet naturally preserves pandas/numpy dtypes. fastparquet engine preserves timedelta dtype, alas it does not work with bytes! | def j78g(bOBl: object):
vxw0 = xDSY.BytesIO()
bOBl.to_parquet(vxw0, engine='pyarrow', compression='gzip', index=False)
vxw0 = vxw0.getvalue()
return vxw0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def P1IU(TBXe):\n TBXe = str(TBXe)\n jQ3Z = rLdf.DataFrame({'int': [1, 2, 3], 'float': [1.1, 2.2, 3.3], 'string': ['a', 'b', 'c'], 'datetime': rLdf.date_range('20130101', periods=3), 'category': rLdf.Series(['a', 'b', 'c'], dtype='category'), 'bool': [True, False, True]})\n jQ3Z = wPFE(jQ3Z, 10)\n jQ3Z... | [
"0.6559313",
"0.62552786",
"0.5994356",
"0.5918388",
"0.5896982",
"0.58349276",
"0.58282673",
"0.5764214",
"0.5762636",
"0.5751022",
"0.57334983",
"0.57322365",
"0.57030886",
"0.56707656",
"0.56155217",
"0.56097865",
"0.5606253",
"0.55490816",
"0.5547418",
"0.5480142",
"0.547... | 0.53675026 | 26 |
Create the dataset from either df or file. | def BHEi(a2Ed: object, yDqo: dict=None):
Csk6 = a2Ed
sB1G = str(type(Csk6))
if sB1G == "<class 'pandas.core.frame.DataFrame'>":
__n6 = x3i3.Tabular.from_pandas(dataframe=Csk6, dtype=yDqo)
elif sB1G == "<class 'str'>":
if '.csv' in Csk6:
ZOfh = 'csv'
elif '.tsv' in Csk... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PK3w(YKHO, jQ3Z, **B2fa):\n return jQ3Z",
"def _3yi(Sd0C):\n raise NotImplementedError",
"def oUGu(y7GR):\n zQKy = rYeY(y7GR)\n __n6 = zQKy.load_data()\n return __n6",
"def oUGu(y7GR):\n zQKy = rYeY(y7GR)\n __n6 = zQKy.load_data()\n return __n6",
"def ZCQP(S8SU, jQ3Z, afpo='xy',... | [
"0.7607132",
"0.71523976",
"0.67038745",
"0.66413754",
"0.6638536",
"0.6634561",
"0.6525281",
"0.6491794",
"0.6447092",
"0.64079976",
"0.6397729",
"0.6388853",
"0.63811934",
"0.638089",
"0.6367692",
"0.6314475",
"0.6291905",
"0.62874436",
"0.6283287",
"0.62817943",
"0.6276859... | 0.64169204 | 9 |
Function to check if the chain is a protein or a nucleic acid. | def TSw_(eNCK):
RR8p = eNCK.get_atoms()
zUcc = ''
e3Ww = []
for U6D_ in RR8p:
e3Ww.append(U6D_.get_name())
if 'CA' in e3Ww:
zUcc = 'protein'
else:
zUcc = 'nucleic_acid'
return zUcc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vkQL(YKHO):\n return True",
"def vkQL(YKHO):\n return False",
"def NgUA(nrkq):\n for NqIG in nrkq:\n if NqIG not in 'ACGTN':\n return False\n return True",
"def LjP7(YKHO):\n return True",
"def LjP7(YKHO):\n return False",
"def kzhU(ytkQ):\n WHRn = 'ATCG'\n P... | [
"0.70060664",
"0.6924548",
"0.67444307",
"0.6445812",
"0.6374522",
"0.6287852",
"0.60768706",
"0.5966777",
"0.596334",
"0.5868802",
"0.58141494",
"0.5791949",
"0.5751857",
"0.5735891",
"0.56966263",
"0.5599283",
"0.5598436",
"0.55966276",
"0.55887216",
"0.55754817",
"0.555542... | 0.6957291 | 1 |
Create a new instance of Payment. | def m8z6(YKHO, qIxc):
with nNXP.commit_or_abort(NCls.session, default_error_message='Failed to create a new Payment'):
rpdr = SSCD(**qIxc)
NCls.session.add(rpdr)
return rpdr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eLpg(**nPrm):\n pu1N = xiv5()\n geh0, bGrB = pu1N.post(iAwL.url(iAwL.PAYMENT_RESOURCE), nPrm)\n return JKCy.Payment(**geh0)",
"def BdJo(YKHO, nPrm, XSoh):\n n78Z = YKHO.__fetch_user_account(guid=nPrm.get('from_account'))\n n5MY = YKHO.__fetch_user_account(guid=nPrm.get('to_account'))\n Kqqa... | [
"0.758857",
"0.7019123",
"0.67243093",
"0.66414416",
"0.663829",
"0.6602848",
"0.6519209",
"0.6460364",
"0.63391745",
"0.6311164",
"0.6290242",
"0.6228037",
"0.6169697",
"0.6073626",
"0.59844005",
"0.59595215",
"0.59171563",
"0.5912023",
"0.59038657",
"0.58912116",
"0.5867552... | 0.7088595 | 1 |
Patch Payment details by ID. | def Po4F(YKHO, qIxc, rpdr):
with nNXP.commit_or_abort(NCls.session, default_error_message='Failed to update Payment details.'):
SGPK.PatchPaymentDetailsParameters.perform_patch(qIxc, obj=rpdr)
NCls.session.merge(rpdr)
return rpdr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lXo5(Emd4, nNXP, id, **nPrm):\n return nNXP.update_payment_gateway(id, **nPrm)",
"def CdVL(YKHO, q0JL, TBsA):\n return super().new_api_call_builder.request(bSFI().server('default').path('/v2/payments/{payment_id}').http_method(gJZr.PUT).template_param(XDS4().key('payment_id').value(q0JL).should_encode(... | [
"0.6707248",
"0.66860867",
"0.6220003",
"0.62071866",
"0.61642337",
"0.61028665",
"0.61028665",
"0.61028665",
"0.60585904",
"0.6038431",
"0.60195494",
"0.6015923",
"0.59859246",
"0.5957179",
"0.59421325",
"0.59367704",
"0.593086",
"0.59210515",
"0.5880024",
"0.5863566",
"0.57... | 0.71683985 | 0 |
Check whether the pixel coordinate of marker is in a valid range. | def sF0I(YKHO, GRE0: int, jR6k: int) -> bool:
if any((YRbF < GRE0 or YRbF > jR6k or oyIN.isnan(YRbF) for YRbF in YKHO.datapos)):
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zLz1(YKHO, WKvO, LVAh):\n return 0 <= WKvO < YKHO.cols and 0 <= LVAh < YKHO.lines",
"def ILnp(YKHO, WKvO, LVAh):\n return 0 <= WKvO < 8 and 0 <= LVAh < 8",
"def ufiu(YKHO, WKvO, LVAh):\n return WKvO >= 0 and WKvO < 8 and (LVAh >= 0) and (LVAh < 8)",
"def UzGa(YKHO) -> bool:\n ...",
"def Bf7... | [
"0.7689891",
"0.7528888",
"0.7285114",
"0.7263985",
"0.7215859",
"0.72029746",
"0.7099152",
"0.6864531",
"0.6820962",
"0.67709464",
"0.6679181",
"0.66635686",
"0.6662689",
"0.6616535",
"0.66059893",
"0.6597834",
"0.6594002",
"0.6588306",
"0.6584573",
"0.65811867",
"0.65394926... | 0.7415017 | 2 |
Property that is True if data can be colourmap normalised. | def kSJn(YKHO):
return oyIN.abs(oyIN.nansum(YKHO.data)) > 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l9rW(oxOY: 'Dataset') -> bool:\n return False",
"def WtxG(oxOY: 'Dataset') -> bool:\n return False",
"def d7Eb(YKHO) -> bool:\n return YKHO.image_shape[2] == 3",
"def E4ec(YKHO):\n return YKHO.r == YKHO.g == YKHO.b",
"def E4ec(YKHO):\n return YKHO.r == YKHO.g == YKHO.b",
"def FpdK(YKHO... | [
"0.65376264",
"0.653758",
"0.6286492",
"0.59674203",
"0.59674203",
"0.5822328",
"0.57541865",
"0.5704884",
"0.5701421",
"0.57007426",
"0.5666162",
"0.5616968",
"0.5615069",
"0.56148565",
"0.5548846",
"0.552823",
"0.55227816",
"0.5418004",
"0.54004663",
"0.5399651",
"0.5396256... | 0.6446703 | 2 |
Transform WCS to a frame centred on the image. | def sVt6(YKHO):
tw43, r_Vk = WsV4(YKHO.wcs)
MkEV = YKHO.wcs.wcs.ctype
d1bd = YKHO.wcs.wcs_world2pix(YKHO.ra, YKHO.dec, 1)
YKHO.wcs = hjm5(naxis=2)
YKHO.wcs.wcs.crpix = [d1bd[0], d1bd[1]]
YKHO.wcs.wcs.crval = [0, 0]
YKHO.wcs.wcs.cdelt = [-tw43, r_Vk]
YKHO.wcs.wcs.ctype = MkEV
if 'radi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _43O(f4IJ):\n KCHu = f4IJ.shape\n Kt_s = XC5k.getRotationMatrix2D((KCHu[1] / 2, KCHu[0] / 2), 0, 1.02)\n f4IJ = XC5k.warpAffine(f4IJ, Kt_s, (KCHu[1], KCHu[0]))\n return f4IJ",
"def lH2N(YKHO, zZcM):\n yzQ0, MKlR = jiw9(zZcM)\n WKvO = yzQ0 / 2\n LVAh = MKlR / 2\n return (WKvO, LVAh)",
... | [
"0.64261657",
"0.58739823",
"0.5801011",
"0.57116616",
"0.5693262",
"0.56858474",
"0.5612682",
"0.55887204",
"0.5571909",
"0.55364543",
"0.55344856",
"0.55134726",
"0.5496375",
"0.5457848",
"0.54260415",
"0.54260415",
"0.5367976",
"0.5363072",
"0.5356434",
"0.53177714",
"0.53... | 0.5527715 | 11 |
Display a group from the given group id. | def sSy_(QePW, Bnkd):
uOe2 = cQ68()
NIwE = uOe2.query({'gid': str(Bnkd)})
if len(NIwE) == 0:
LmpD('No available group under GID ' + str(Bnkd))
return igJ6(qQXR.dumps(NIwE)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GSyo(OaeV, hE03):\n return OaeV.gi.groups.show_group(hE03)",
"def kDsf(YKHO, hE03):\n return i9zE._get(YKHO, id=hE03)",
"def moMn(QePW, hE03=1):\n uOe2 = Iofl(SwCg, pk=hE03)\n moMn = SwCg.objects.order_by('name')\n ga5z = []\n for Oa1e in moMn:\n if Oa1e.id is not uOe2.id:\n ... | [
"0.84070766",
"0.7740285",
"0.710813",
"0.706569",
"0.70525783",
"0.69074094",
"0.68271923",
"0.6798981",
"0.6787939",
"0.6716215",
"0.6705907",
"0.67016923",
"0.66988087",
"0.66607374",
"0.6616495",
"0.6611702",
"0.6568064",
"0.6509636",
"0.64655566",
"0.6438668",
"0.6383196... | 0.6297019 | 27 |
Display a 404 page with a given message after any bad request. | def LmpD(Ol8d):
raise uhgT(Ol8d) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ni4Z(P1dF):\n return (TvZl('/error.html'), 404)",
"def m7kB(D4AW):\n return (TvZl('errors.html'), 404)",
"def m7kB(tTpl):\n return (TvZl('404.html'), 404)",
"def m7kB(tTpl):\n return (TvZl('404.html'), 404)",
"def m7kB(tTpl):\n return (TvZl('404.html'), 404)",
"def o3cf(tTpl):\n ret... | [
"0.8235648",
"0.81195563",
"0.8113618",
"0.8113618",
"0.8112197",
"0.81021154",
"0.8090558",
"0.80553967",
"0.8050602",
"0.8037045",
"0.80208427",
"0.79905635",
"0.7980727",
"0.79504347",
"0.7945613",
"0.7925859",
"0.79064953",
"0.7890391",
"0.7870355",
"0.78605354",
"0.78436... | 0.75103325 | 63 |
Check if the given two digit encoded message is a valid char. | def Mzx3(Wxnj: str) -> bool:
return 10 <= int(Wxnj) <= 26 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zabs(hcXw):\n if hcXw is None:\n return False\n if hcXw == '\\x00':\n return False\n return True",
"def Y7At(Ol8d):\n return all((ord(Z9rn) < 128 for Z9rn in Ol8d))",
"def iC0E(tO9_):\n for hcXw in tO9_:\n if hcXw not in vIwR.ascii_letters and hcXw not in vIwR.punctuatio... | [
"0.71109474",
"0.7062189",
"0.6548195",
"0.65020955",
"0.64892834",
"0.644029",
"0.6439921",
"0.64247704",
"0.6344382",
"0.63188714",
"0.62968117",
"0.62936205",
"0.62808067",
"0.6224203",
"0.62086666",
"0.6137437",
"0.61113614",
"0.6081801",
"0.60787374",
"0.60777146",
"0.60... | 0.73531914 | 0 |
Get a random element from the set. | def UIrZ(YKHO) -> int:
return tuKI.choice(tuple(YKHO.l)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UIrZ(YKHO):\n return YKHO.nums[tuKI.randint(0, len(YKHO.nums) - 1)]",
"def UIrZ(YKHO):\n exwG = len(YKHO.keys)\n while exwG > 0:\n d6pt = tuKI.randint(0, exwG - 1)\n Ufrw = YKHO.keys[d6pt]\n if Ufrw in YKHO.ds:\n return Ufrw\n else:\n YKHO.keys[d6pt]... | [
"0.77060276",
"0.738916",
"0.7296881",
"0.72187954",
"0.6871744",
"0.68453854",
"0.68330806",
"0.67740154",
"0.67226046",
"0.6703282",
"0.6665089",
"0.66356236",
"0.66217655",
"0.6612035",
"0.66000897",
"0.6567767",
"0.6477719",
"0.6462421",
"0.64428514",
"0.64162946",
"0.640... | 0.6122921 | 52 |
Get clifford operators, build based on symmetries and singlequbit X. | def LtTc(YKHO) -> x1iM[KnwZ]:
LtTc = [(FYCB(Rmr1) + FYCB(ryiR)) / oyIN.sqrt(2) for Rmr1, ryiR in zip(YKHO._symmetries, YKHO._sq_paulis)]
return LtTc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gfJa():\n YRbF = rmc3('i', below_fermi=True, cls=GaJO)\n jzdc = rmc3('a', above_fermi=True, cls=GaJO)\n HGKR = CpuS('t', (jzdc,), (YRbF,))\n d_Ba = GxF_(lRco(jzdc) * vuvg(YRbF))\n YRbF, r845 = rmc3('i,j', below_fermi=True, cls=GaJO)\n jzdc, Fg_i = rmc3('a,b', above_fermi=True, cls=GaJO)\n ... | [
"0.64887905",
"0.6393771",
"0.6334227",
"0.63176847",
"0.6156194",
"0.60782033",
"0.6074436",
"0.60564524",
"0.6018028",
"0.60011035",
"0.58997136",
"0.58405644",
"0.58351237",
"0.5812727",
"0.57892907",
"0.5787637",
"0.5758515",
"0.57326216",
"0.57319075",
"0.5700948",
"0.56... | 0.0 | -1 |
Finds Z2 Paulitype symmetries of an Operator. | def rM1O(Emd4, seET: PauliSumOp) -> 'Z2Symmetries':
ZRMp = []
gOeQ = []
rThY = []
Obvk = []
if seET.is_zero():
bo34.info('Operator is empty.')
return Emd4([], [], [], None)
for jkAA in seET:
Obvk.append(oyIN.concatenate((jkAA.primitive.paulis.x[0], jkAA.primitive.paulis.z... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LpCI(YKHO):\n DMkD = QWPH.from_list([('I', -1.0424710218959303), ('Z', -0.7879673588770277), ('X', -0.18128880821149604)])\n b7dp = fPRc.find_z2_symmetries(DMkD)\n YKHO.assertTrue(b7dp.is_empty())",
"def b7dp(YKHO) -> 'Z2Symmetries':\n return YKHO._z2_symmetries",
"def LRuN(seET):\n if isins... | [
"0.6892468",
"0.6586291",
"0.6491791",
"0.62042934",
"0.6083347",
"0.5920768",
"0.5814815",
"0.56970036",
"0.55275255",
"0.55129266",
"0.5485052",
"0.5474561",
"0.54484516",
"0.53852695",
"0.5349764",
"0.52995557",
"0.52523893",
"0.5237814",
"0.5208543",
"0.5200767",
"0.51892... | 0.76096714 | 0 |
Overload `==` operation to evaluate equality between Z2Symmetries. | def xa14(YKHO, Elif: object) -> bool:
if not isinstance(Elif, fPRc):
return False
return YKHO.symmetries == Elif.symmetries and YKHO.sq_paulis == Elif.sq_paulis and (YKHO.sq_list == Elif.sq_list) and (YKHO.tapering_values == Elif.tapering_values) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n if Elif is YKHO:\n return True\n if isinstance(Elif, gadJ):\n if Elif.parent() != YKHO.parent():\n return False\n else:\n return bool(Elif._express == YKHO._express)\n else:\n return bool(YKHO._express == Elif)",
"def xa14(YKHO, E... | [
"0.6431645",
"0.61523557",
"0.6150391",
"0.61166376",
"0.60961133",
"0.60693336",
"0.6035471",
"0.60161793",
"0.5984229",
"0.5927028",
"0.59111166",
"0.59111166",
"0.59050834",
"0.5896308",
"0.58933914",
"0.5891502",
"0.5887405",
"0.58856267",
"0.5828395",
"0.5822424",
"0.581... | 0.7667618 | 0 |
Create a sqlalchemy engine and session to interact with the database. | def aiy_(GPtr):
h8Lu = rOmR(**GPtr)
NCls = y2U9(h8Lu)
DMju = FJ3D(NCls)
wOed.metadata.create_all(NCls)
return (NCls, DMju) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z3CB(YKHO, eHpk):\n Nchc = FJ3D(bind=eHpk)\n cuiw = Nchc()\n return cuiw",
"def I0pn():\n print('Setting up session')\n eHpk = PE9B()\n i_Aq.metadata.bin = eHpk\n GhOX = FJ3D(bind=eHpk)\n cuiw = GhOX()\n return cuiw",
"def JawI(eHpk):\n P8oC = XkTK(eHpk)\n DMju = FJ3D(bind=... | [
"0.81359595",
"0.8040083",
"0.7979236",
"0.78089476",
"0.7701222",
"0.77003556",
"0.764165",
"0.7622947",
"0.7579027",
"0.755317",
"0.7521227",
"0.7505744",
"0.74904746",
"0.7463159",
"0.74597645",
"0.7455637",
"0.7415893",
"0.74005294",
"0.7356361",
"0.73400027",
"0.73347634... | 0.7439551 | 16 |
Check if a password is the same than the hashed password. | def EvfH(jTXt, kg40):
return B8ni.checkpw(c02A(jTXt), c02A(kg40)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nz9i(NTfD: bytes, USaV: bytes, jTXt: str) -> bool:\n return W7gX.compare_digest(USaV, HBct.pbkdf2_hmac('sha256', jTXt.encode(), NTfD, 100000))",
"def IaXs(NTfD: bytes, USaV: bytes, jTXt: str) -> bool:\n return W7gX.compare_digest(USaV, HBct.pbkdf2_hmac('sha256', jTXt.encode(), NTfD, 100000))",
"def A... | [
"0.8016892",
"0.7881232",
"0.78616977",
"0.7829685",
"0.7827264",
"0.7801725",
"0.77869296",
"0.77302456",
"0.7635051",
"0.76084554",
"0.7603575",
"0.75913775",
"0.75641733",
"0.7497149",
"0.7484627",
"0.7476307",
"0.74737895",
"0.7446123",
"0.7428713",
"0.7428713",
"0.741909... | 0.70709556 | 72 |
Calculates the position of the rectangular patch, relative to the event duration. | def R7PD(YKHO, Kplm, H5ew, d6pt, WbTE, S8vG):
M_DK = (float(H5ew[0]), YKHO.ax.get_ylim()[1])
if d6pt < len(Kplm) - 1:
H2v2 = Kplm[d6pt + 1][0] - Kplm[d6pt][0]
else:
H2v2 = WbTE - Kplm[d6pt][0]
TVTK = YKHO.ax.get_ylim()[1]
YylR = 270
try:
FBfN = YKHO.colourMap[H5ew[1]]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jCq6(YKHO):\n YKHO.rect.x = int(YKHO.view_pt.x_to_scr(YKHO.x) / YKHO.z)\n YKHO.rect.y = int(YKHO.view_pt.y_to_scr(YKHO.y) / YKHO.z)",
"def Qs8N(YKHO):\n Mkmy = YKHO.rect.x % 30\n if Mkmy != 0:\n if Mkmy <= 16:\n WKvO = YKHO.rect.x - Mkmy\n else:\n WKvO = YKHO.r... | [
"0.64458704",
"0.6313074",
"0.6254609",
"0.60468507",
"0.6017669",
"0.5855488",
"0.58349967",
"0.58349967",
"0.57846844",
"0.57711947",
"0.57698476",
"0.5750508",
"0.5731958",
"0.5722748",
"0.5657773",
"0.5657773",
"0.5604806",
"0.5583857",
"0.5514846",
"0.54797363",
"0.54797... | 0.5178504 | 54 |
Returns a colour map for key changes to ensure consistent patterns across CALMA plots. | def nPZm(YKHO):
try:
return {'C# minor': 'Grey', 'A major': 'Red', 'D minor': 'Green', 'Eb Purple': 'greenyellow', 'D major': 'Pink', 'G major': 'Orange', 'G minor': 'goldenrod', 'A minor': 'indianred', 'C minor': 'peachpuff', 'B minor': 'deepskyblue', 'Ab Major': 'firebrick', 'Eb / D# minor': 'orchid', 'Ab... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SRxb(YKHO):\n OrFa = oyIN.unique(YKHO.out_labels)\n YDzg = {}\n for bozA in OrFa:\n YDzg[bozA] = YKHO._random_color()\n return YDzg",
"def YI3L(YKHO):\n return Jw9H.ev_colormaps[YKHO.name]",
"def i5hM(Jw9H):\n sJOE = []\n for qfpW in Jw9H:\n sJOE.append([wEf2 / 255.0 for ... | [
"0.63322717",
"0.62229353",
"0.61901695",
"0.6187851",
"0.6162454",
"0.6134169",
"0.60871094",
"0.60867405",
"0.6079857",
"0.60154575",
"0.5999817",
"0.5987499",
"0.5973997",
"0.5958746",
"0.5956373",
"0.59459084",
"0.59447443",
"0.59309727",
"0.5908865",
"0.58996123",
"0.584... | 0.67521995 | 0 |
Returns the velocity of the peak channel for each pixel, and the pixel value. | def tEHq(nPrm, nJ9F=0.0, Jw7X=1.0, jDK_=0):
re6M = oyIN.argmax(nPrm, axis=jDK_)
rwK9 = oyIN.max(nPrm, axis=jDK_)
return (nJ9F + Jw7X * re6M, 0.5 * Jw7X, rwK9) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WVyq(YKHO):\n return oyIN.array([max(YKHO.waveform[Npgh]) for Npgh in range(YKHO.nchannels)])",
"def rkhf(YKHO):\n return oyIN.array([YKHO.wftime[Npgh][YKHO.waveform[Npgh].argmax()] for Npgh in range(YKHO.nchannels)])",
"def E5Se(YKHO):\n MaJh = (YKHO.image_red == 255) * (YKHO.image_green == 0) * ... | [
"0.6498354",
"0.63442695",
"0.6305139",
"0.6020289",
"0.59217495",
"0.58739406",
"0.5829068",
"0.58127123",
"0.5699084",
"0.56868404",
"0.5650007",
"0.5641548",
"0.5582975",
"0.55801904",
"0.5567978",
"0.5551847",
"0.5546675",
"0.5541983",
"0.55090886",
"0.5497814",
"0.548988... | 0.57913303 | 8 |
Renders the home page. | def kZiy():
return TvZl('index.html', title='Home Page', year=qcWV.now().year) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bVaH():\n return TvZl('index.html')",
"def kZiy():\n return TvZl('home_page.html')",
"def kZiy():\n return TvZl('home.html')",
"def kZiy():\n return TvZl('home.html')",
"def kZiy():\n return TvZl('home.html')",
"def kZiy():\n return TvZl('home.html')",
"def kZiy():\n return TvZ... | [
"0.85574406",
"0.853399",
"0.8351404",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.827363",
"... | 0.8061255 | 38 |
Computes sigmoid(x) for some activation x. | def m1Hg(WKvO):
return 1 / (1 + oyIN.exp(-WKvO)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d1fz(WKvO):\n return 1.0 / (1 + oyIN.exp(-WKvO))",
"def m1Hg(WKvO):\n return 1 / (1 + kLQb(-WKvO))",
"def m1Hg(WKvO):\n return 1 / (1 + kLQb(-WKvO))",
"def m1Hg(WKvO):\n return 1 / (1 + oyIN.exp(-WKvO))",
"def m1Hg(WKvO):\n return 1.0 / (1.0 + kLQb(-WKvO))",
"def m1Hg(WKvO):\n retur... | [
"0.9055437",
"0.8951119",
"0.8951119",
"0.8895742",
"0.88867384",
"0.8863933",
"0.8856317",
"0.88494825",
"0.8817724",
"0.8813557",
"0.88082683",
"0.88082683",
"0.87988925",
"0.8798874",
"0.87912995",
"0.87906015",
"0.878794",
"0.874856",
"0.87038004",
"0.8679779",
"0.867409"... | 0.8826303 | 11 |
Assert that the response has the given status code and parsed content | def FrbX(YKHO, geh0, DnVF, q0we):
assert geh0.status_code == DnVF
_3yW = qQXR.loads(geh0.content.decode('utf-8'))
assert _3yW == q0we | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FrbX(YKHO, geh0, DnVF, q0we):\n assert geh0.status_code == DnVF\n if q0we:\n assert geh0.content.decode('utf-8') == q0we",
"def FrbX(YKHO, geh0, DnVF, q0we):\n assert geh0.status_code == DnVF\n if q0we:\n assert str(geh0.content) == q0we",
"def aILn(YKHO, geh0, JBvl=None, hGN5=Non... | [
"0.80223584",
"0.79831654",
"0.7913485",
"0.7828235",
"0.7765568",
"0.76866055",
"0.76342833",
"0.75451547",
"0.74794745",
"0.7425999",
"0.7380393",
"0.73432505",
"0.7319662",
"0.72661155",
"0.72251016",
"0.7222837",
"0.7151803",
"0.7144004",
"0.7133448",
"0.70640194",
"0.703... | 0.8269274 | 0 |
Assert that the response has the given status code and content | def FrbX(YKHO, geh0, DnVF, q0we):
assert geh0.status_code == DnVF
if q0we:
assert geh0.content.decode('utf-8') == q0we | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FrbX(YKHO, geh0, DnVF, q0we):\n assert geh0.status_code == DnVF\n if q0we:\n assert str(geh0.content) == q0we",
"def aILn(YKHO, geh0, JBvl=None, hGN5=None):\n YKHO.assertIsInstance(geh0, igJ6)\n if JBvl is not None and geh0.status_code != JBvl:\n YKHO.fail('Expected status code of {... | [
"0.82645446",
"0.8243966",
"0.8210479",
"0.8058191",
"0.792817",
"0.791679",
"0.77907085",
"0.7712697",
"0.7665939",
"0.7612862",
"0.7587554",
"0.757176",
"0.75260836",
"0.748018",
"0.7466748",
"0.7355775",
"0.7244242",
"0.72410995",
"0.7178826",
"0.7160397",
"0.7143551",
"... | 0.8222443 | 2 |
Helper function for creating headers for the JWT authentication. | def hNxp(YKHO, CBIr):
eOtH = h6cC(CBIr)
MOPg = {'HTTP_AUTHORIZATION': 'JWT ' + eOtH}
return MOPg | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E_hp(YKHO):\n return {'Authorization': 'JWT {}'.format(YKHO.token)}",
"def PvHk(YKHO, **B2fa):\n return {'Authorization': 'Bearer {}'.format(YKHO.create_jwt(**B2fa))}",
"def E_hp(YKHO):\n MOPg = YKHO.headers\n if YKHO.jwt_secret:\n jvSB = int(ITS7.time())\n NArs = {'exp': jvSB + Y... | [
"0.7734756",
"0.76987463",
"0.7658371",
"0.7586913",
"0.7532777",
"0.7520249",
"0.7433449",
"0.73901826",
"0.7326667",
"0.72288257",
"0.72168773",
"0.71755236",
"0.71555465",
"0.71477264",
"0.7124218",
"0.7103212",
"0.7012003",
"0.6997966",
"0.69950837",
"0.69733036",
"0.6958... | 0.80058163 | 0 |
Assert that the response has the given status code and content | def FrbX(YKHO, geh0, DnVF, q0we):
assert geh0.status_code == DnVF
if q0we:
assert str(geh0.content) == q0we | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aILn(YKHO, geh0, JBvl=None, hGN5=None):\n YKHO.assertIsInstance(geh0, igJ6)\n if JBvl is not None and geh0.status_code != JBvl:\n YKHO.fail('Expected status code of {}, got {}. Content:\\n{}'.format(JBvl, geh0.status_code, geh0.content))\n if hGN5 is not None:\n YKHO.assertMultiLineEqual... | [
"0.8243966",
"0.8222443",
"0.8210479",
"0.8058191",
"0.792817",
"0.791679",
"0.77907085",
"0.7712697",
"0.7665939",
"0.7612862",
"0.7587554",
"0.757176",
"0.75260836",
"0.748018",
"0.7466748",
"0.7355775",
"0.7244242",
"0.72410995",
"0.7178826",
"0.7160397",
"0.7143551",
"0... | 0.82645446 | 0 |
Helper function for creating headers for the JWT authentication. | def hNxp(YKHO, CBIr):
eOtH = h6cC(CBIr)
MOPg = {'HTTP_AUTHORIZATION': 'JWT ' + eOtH}
return MOPg | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E_hp(YKHO):\n return {'Authorization': 'JWT {}'.format(YKHO.token)}",
"def PvHk(YKHO, **B2fa):\n return {'Authorization': 'Bearer {}'.format(YKHO.create_jwt(**B2fa))}",
"def E_hp(YKHO):\n MOPg = YKHO.headers\n if YKHO.jwt_secret:\n jvSB = int(ITS7.time())\n NArs = {'exp': jvSB + Y... | [
"0.7734756",
"0.76987463",
"0.7658371",
"0.7586913",
"0.7532777",
"0.7520249",
"0.7433449",
"0.73901826",
"0.7326667",
"0.72288257",
"0.72168773",
"0.71755236",
"0.71555465",
"0.71477264",
"0.7124218",
"0.7103212",
"0.7012003",
"0.6997966",
"0.69950837",
"0.69733036",
"0.6958... | 0.80058163 | 1 |
Tests discussion topic does not exist for the given topic id. | def hRuE(YKHO):
pqAP = 'courseware-topic-id'
YKHO.make_discussion_xblock(pqAP, 'test_category', 'test_target')
bD7m = f'{YKHO.url}?topic_id=invalid_topic_id'
geh0 = YKHO.client.get(bD7m)
YKHO.assert_response_correct(geh0, 404, {'developer_message': "Discussion not found for 'invalid_topic_id'."}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M4yZ(YKHO):\n Bjnn = BfDw.create_private_topic()\n BfDw.login(YKHO)\n BGqR = {'is_active': True}\n geh0 = YKHO.client.post(gxEw('spirit:topic:notification:create', kwargs={'topic_id': Bjnn.topic.pk}), BGqR)\n YKHO.assertEqual(geh0.status_code, 404)",
"def Vi0Z(QdZT: Update, QpfX: CallbackConte... | [
"0.6463931",
"0.63495606",
"0.6338876",
"0.6110078",
"0.60847676",
"0.5970361",
"0.59135574",
"0.58561516",
"0.58535457",
"0.58110976",
"0.5782986",
"0.57260275",
"0.56990814",
"0.56968343",
"0.56950593",
"0.56912136",
"0.5689643",
"0.5673871",
"0.56513",
"0.5645895",
"0.5614... | 0.814976 | 0 |
Tests discussion topic details against a requested topic id | def q2wt(YKHO):
_CXN = 'topic_id_1'
Fn34 = 'topic_id_2'
YKHO.make_discussion_xblock(_CXN, 'test_category_1', 'test_target_1')
YKHO.make_discussion_xblock(Fn34, 'test_category_2', 'test_target_2')
bD7m = f'{YKHO.url}?topic_id=topic_id_1,topic_id_2'
geh0 = YKHO.client.get(bD7m)
YKHO.assert_res... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xmIK(YKHO):\n bD7m = gxEw('post-detail', args=[YKHO.topic1.url_name, YKHO.post1.id])\n geh0 = YKHO.client.get(bD7m)\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_200_OK)\n nPrm = geh0.data\n YKHO.assertEqual(nPrm['id'], YKHO.post1.id)\n YKHO.assertEqual(nPrm['title'], YKHO.post1.title)",
"... | [
"0.7070069",
"0.67060006",
"0.66090375",
"0.6494381",
"0.64904827",
"0.64530283",
"0.6398895",
"0.63194615",
"0.628795",
"0.62767637",
"0.62225556",
"0.6186123",
"0.61689126",
"0.61286986",
"0.61005974",
"0.6080214",
"0.6029419",
"0.5990907",
"0.59878266",
"0.59845114",
"0.59... | 0.72078526 | 0 |
Tests thread has user profile image details if called in requested_fields | def PHGc(YKHO):
z1dU = NqOl.create(password=YKHO.password)
z1dU.profile.year_of_birth = 1970
z1dU.profile.save()
QPNX = [YKHO.create_source_thread(), YKHO.create_source_thread({'user_id': str(z1dU.id), 'username': z1dU.username})]
YKHO.register_get_user_response(YKHO.user, upvoted_ids=['test_thread'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PHGc(YKHO):\n YKHO.register_get_user_response(YKHO.user)\n Wd2w = bPfK({'id': YKHO.thread_id, 'course_id': str(YKHO.course.id), 'username': YKHO.user.username, 'user_id': str(YKHO.user.id)})\n YKHO.register_get_thread_response(Wd2w)\n YKHO.create_profile_image(YKHO.user, wxIH())\n geh0 = YKHO.cl... | [
"0.8350714",
"0.8009413",
"0.7845835",
"0.7689106",
"0.6404223",
"0.6321115",
"0.6115614",
"0.59864986",
"0.5790376",
"0.57836694",
"0.5743967",
"0.5681056",
"0.56474423",
"0.5644567",
"0.5641627",
"0.5600402",
"0.557616",
"0.55577576",
"0.55448985",
"0.5521472",
"0.5514169",... | 0.82767236 | 1 |
Tests all comments retrieved have user profile image details if called in requested_fields | def PHGc(YKHO):
UQ6n = [YKHO.create_source_comment()]
YKHO.register_get_thread_response({'id': YKHO.thread_id, 'course_id': str(YKHO.course.id), 'thread_type': 'discussion', 'children': UQ6n, 'resp_total': 100})
YKHO.register_get_user_response(YKHO.user, upvoted_ids=['test_comment'])
YKHO.create_profile... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PHGc(YKHO):\n YKHO.register_get_user_response(YKHO.user)\n JX5Y = YKHO.make_comment_data('test_child_comment', YKHO.comment_id, children=[])\n cgv_ = YKHO.make_comment_data(YKHO.comment_id, None, [JX5Y])\n Wd2w = bPfK({'id': YKHO.thread_id, 'course_id': str(YKHO.course.id), 'children': [cgv_]})\n ... | [
"0.8378507",
"0.786277",
"0.76741105",
"0.7170395",
"0.71419144",
"0.6993679",
"0.62927294",
"0.5908545",
"0.58488584",
"0.5830102",
"0.5702719",
"0.56787133",
"0.5664201",
"0.56540376",
"0.5638272",
"0.562767",
"0.55817664",
"0.5566697",
"0.5558393",
"0.5552993",
"0.5548348"... | 0.83859634 | 0 |
Tests thread has user profile image details if called in requested_fields | def PHGc(YKHO):
YKHO.register_get_user_response(YKHO.user)
Wd2w = bPfK({'id': YKHO.thread_id, 'course_id': str(YKHO.course.id), 'username': YKHO.user.username, 'user_id': str(YKHO.user.id)})
YKHO.register_get_thread_response(Wd2w)
YKHO.create_profile_image(YKHO.user, wxIH())
geh0 = YKHO.client.get(Y... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PHGc(YKHO):\n z1dU = NqOl.create(password=YKHO.password)\n z1dU.profile.year_of_birth = 1970\n z1dU.profile.save()\n QPNX = [YKHO.create_source_thread(), YKHO.create_source_thread({'user_id': str(z1dU.id), 'username': z1dU.username})]\n YKHO.register_get_user_response(YKHO.user, upvoted_ids=['te... | [
"0.82767236",
"0.8009413",
"0.7845835",
"0.7689106",
"0.6404223",
"0.6321115",
"0.6115614",
"0.59864986",
"0.5790376",
"0.57836694",
"0.5743967",
"0.5681056",
"0.56474423",
"0.5644567",
"0.5641627",
"0.5600402",
"0.557616",
"0.55577576",
"0.55448985",
"0.5521472",
"0.5514169"... | 0.8350714 | 0 |
Returns comment dict object as returned by comments service | def iy65(YKHO, pQGt, H7rZ=None, afYC=[]):
return Gs1W({'id': pQGt, 'parent_id': H7rZ, 'course_id': str(YKHO.course.id), 'thread_id': YKHO.thread_id, 'thread_type': 'discussion', 'username': YKHO.user.username, 'user_id': str(YKHO.user.id), 'created_at': '2015-06-03T00:00:00Z', 'updated_at': '2015-06-03T00:00:00Z', ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vr0y(YKHO, nPrm):\n hlel = {}\n hlel['id'] = int(nPrm['id'])\n hlel['author'] = nPrm['user_display_name']\n hlel['profile_url'] = nPrm['user_url']\n hlel['date'] = nPrm['comment_added_at']\n hlel['date_ago'] = GXpB.format(YKHO._parse_datetime(nPrm['comment_added_at']), qcWV.now(M7nw))\n hl... | [
"0.7624234",
"0.73207664",
"0.7291462",
"0.726618",
"0.71346116",
"0.7124576",
"0.7046029",
"0.6970595",
"0.6937162",
"0.687293",
"0.6854054",
"0.6828101",
"0.68238384",
"0.67981327",
"0.6777456",
"0.67468834",
"0.67468834",
"0.67468834",
"0.6743909",
"0.673812",
"0.67092174"... | 0.6570009 | 30 |
Tests all comments retrieved have user profile image details if called in requested_fields | def PHGc(YKHO):
YKHO.register_get_user_response(YKHO.user)
JX5Y = YKHO.make_comment_data('test_child_comment', YKHO.comment_id, children=[])
cgv_ = YKHO.make_comment_data(YKHO.comment_id, None, [JX5Y])
Wd2w = bPfK({'id': YKHO.thread_id, 'course_id': str(YKHO.course.id), 'children': [cgv_]})
YKHO.reg... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PHGc(YKHO):\n UQ6n = [YKHO.create_source_comment()]\n YKHO.register_get_thread_response({'id': YKHO.thread_id, 'course_id': str(YKHO.course.id), 'thread_type': 'discussion', 'children': UQ6n, 'resp_total': 100})\n YKHO.register_get_user_response(YKHO.user, upvoted_ids=['test_comment'])\n YKHO.creat... | [
"0.83859634",
"0.786277",
"0.76741105",
"0.7170395",
"0.71419144",
"0.6993679",
"0.62927294",
"0.5908545",
"0.58488584",
"0.5830102",
"0.5702719",
"0.56787133",
"0.5664201",
"0.56540376",
"0.5638272",
"0.562767",
"0.55817664",
"0.5566697",
"0.5558393",
"0.5552993",
"0.5548348... | 0.8378507 | 1 |
Test and verify that authentication is required for this endpoint. | def eGKf(YKHO, NKcE):
YKHO.client.logout()
geh0 = getattr(YKHO.client, NKcE)(YKHO.path)
assert geh0.status_code == 401 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nkKr(YKHO):\n Ylbp = YKHO.client.get(EmB0)\n YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_401_UNAUTHORIZED)",
"def nkKr(YKHO):\n Ylbp = YKHO.client.get(nyJA)\n YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_401_UNAUTHORIZED)",
"def nkKr(YKHO):\n Ylbp = YKHO.client.get(nyJA)\n YKHO.assertEqu... | [
"0.7950448",
"0.76868105",
"0.76661503",
"0.76661503",
"0.7642662",
"0.76391345",
"0.7570461",
"0.7530811",
"0.7526535",
"0.7511525",
"0.73548096",
"0.72665995",
"0.72506523",
"0.72483444",
"0.7175282",
"0.71737605",
"0.7169906",
"0.7169906",
"0.71577156",
"0.7152676",
"0.713... | 0.7206106 | 14 |
Test the response when this endpoint is passed a nonexistent course id. | def wT9K(YKHO):
YKHO._login_as_staff()
geh0 = YKHO.client.get(gxEw('discussion_course_settings', kwargs={'course_id': 'a/b/c'}))
assert geh0.status_code == 404 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wT9K(YKHO):\n YKHO._login_as_staff()\n pmON = YKHO.path(course_id='a/b/c')\n geh0 = YKHO.client.get(pmON)\n assert geh0.status_code == 404\n geh0 = YKHO.client.post(pmON)\n assert geh0.status_code == 404",
"def UZz5(x0hE):\n OeKN(client=x0hE, times=10)\n geh0 = x0hE.get('/api/1.0/cour... | [
"0.8322255",
"0.8022509",
"0.7757447",
"0.76497215",
"0.75796556",
"0.7559593",
"0.74963504",
"0.7455874",
"0.7155128",
"0.7124054",
"0.7032479",
"0.686246",
"0.6849403",
"0.6825156",
"0.67567396",
"0.67308384",
"0.6718114",
"0.67143536",
"0.6705622",
"0.66414255",
"0.6636364... | 0.796745 | 2 |
Test the response status code on sending a PATCH request with an empty body or missing fields. | def ykaW(YKHO):
YKHO._login_as_staff()
geh0 = YKHO.patch_request('')
assert geh0.status_code == 400
geh0 = YKHO.patch_request({})
assert geh0.status_code == 400 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g4Yd(YKHO):\n if not YKHO.url:\n return\n geh0 = YKHO.client.patch(YKHO.url, {}, format='json')\n YKHO.assertIn(geh0.status_code, [jGRS.HTTP_405_METHOD_NOT_ALLOWED, jGRS.HTTP_401_UNAUTHORIZED])",
"def fYra(YKHO):\n geh0 = YKHO.httpbin_4.test_requests_patch_method()\n YKHO.assertEqual(ge... | [
"0.7514054",
"0.7330896",
"0.6851677",
"0.6822737",
"0.6770208",
"0.67126334",
"0.66794896",
"0.6600391",
"0.65654063",
"0.65277135",
"0.65268874",
"0.6487522",
"0.64785326",
"0.6471589",
"0.6409385",
"0.6401854",
"0.6366732",
"0.6316152",
"0.6305031",
"0.6302076",
"0.6293325... | 0.7643463 | 0 |
Test the response status code on sending a PATCH request with parameters having incorrect types. | def sUlF(YKHO, TBsA):
YKHO._login_as_staff()
geh0 = YKHO.patch_request(TBsA)
assert geh0.status_code == 400 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g4Yd(YKHO):\n if not YKHO.url:\n return\n geh0 = YKHO.client.patch(YKHO.url, {}, format='json')\n YKHO.assertIn(geh0.status_code, [jGRS.HTTP_405_METHOD_NOT_ALLOWED, jGRS.HTTP_401_UNAUTHORIZED])",
"def fYra(YKHO):\n geh0 = YKHO.httpbin_4.test_requests_patch_method()\n YKHO.assertEqual(ge... | [
"0.71415395",
"0.71362484",
"0.7032255",
"0.69430655",
"0.6938978",
"0.6889845",
"0.6740354",
"0.6675492",
"0.66588426",
"0.65660495",
"0.6517692",
"0.6494218",
"0.6461693",
"0.6443991",
"0.643274",
"0.64230174",
"0.6376",
"0.6360994",
"0.6360465",
"0.6354983",
"0.63522065",
... | 0.6492817 | 12 |
Test whether the 'always_divide_inline_discussions' setting is updated. | def PqyJ(YKHO):
oA8c(YKHO.course, is_cohorted=True)
YKHO._login_as_staff()
O0Fa = YKHO._get_expected_response()
YKHO._assert_current_settings(O0Fa)
O0Fa['always_divide_inline_discussions'] = True
YKHO._assert_patched_settings({'always_divide_inline_discussions': True}, O0Fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rqVf(YKHO):\n oA8c(YKHO.course, is_cohorted=True)\n YKHO._login_as_staff()\n O0Fa = YKHO._get_expected_response()\n YKHO._assert_current_settings(O0Fa)\n wzkt = qcWV.now()\n KVMF.create(parent_location=YKHO.course.location, category='discussion', discussion_id='Topic_A', discussion_category='... | [
"0.65155196",
"0.5639965",
"0.56395197",
"0.5564846",
"0.5544021",
"0.5508103",
"0.5503728",
"0.5492476",
"0.54195917",
"0.5390445",
"0.5389848",
"0.53006417",
"0.52866846",
"0.52555525",
"0.5229147",
"0.52077377",
"0.5200304",
"0.5185702",
"0.518409",
"0.5166526",
"0.5159768... | 0.7850817 | 0 |
Test whether the 'divided_inline_discussions' setting is updated. | def rqVf(YKHO):
oA8c(YKHO.course, is_cohorted=True)
YKHO._login_as_staff()
O0Fa = YKHO._get_expected_response()
YKHO._assert_current_settings(O0Fa)
wzkt = qcWV.now()
KVMF.create(parent_location=YKHO.course.location, category='discussion', discussion_id='Topic_A', discussion_category='Chapter', d... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PqyJ(YKHO):\n oA8c(YKHO.course, is_cohorted=True)\n YKHO._login_as_staff()\n O0Fa = YKHO._get_expected_response()\n YKHO._assert_current_settings(O0Fa)\n O0Fa['always_divide_inline_discussions'] = True\n YKHO._assert_patched_settings({'always_divide_inline_discussions': True}, O0Fa)",
"def ... | [
"0.7398982",
"0.62203187",
"0.6201276",
"0.61978525",
"0.616984",
"0.6059117",
"0.5911428",
"0.5720757",
"0.5578674",
"0.555912",
"0.5522277",
"0.55078506",
"0.544886",
"0.5399877",
"0.53951263",
"0.5355195",
"0.5341761",
"0.5339367",
"0.5334819",
"0.53326404",
"0.530437",
... | 0.70513904 | 1 |
Test and verify that authentication is required for this endpoint. | def eGKf(YKHO, NKcE):
YKHO.client.logout()
geh0 = getattr(YKHO.client, NKcE)(YKHO.path())
assert geh0.status_code == 401 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nkKr(YKHO):\n Ylbp = YKHO.client.get(EmB0)\n YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_401_UNAUTHORIZED)",
"def nkKr(YKHO):\n Ylbp = YKHO.client.get(nyJA)\n YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_401_UNAUTHORIZED)",
"def nkKr(YKHO):\n Ylbp = YKHO.client.get(nyJA)\n YKHO.assertEqu... | [
"0.7950448",
"0.76868105",
"0.76661503",
"0.76661503",
"0.7642662",
"0.76391345",
"0.7570461",
"0.7530811",
"0.7526535",
"0.7511525",
"0.73548096",
"0.72665995",
"0.72483444",
"0.7206106",
"0.7175282",
"0.71737605",
"0.7169906",
"0.7169906",
"0.71577156",
"0.7152676",
"0.7137... | 0.72506523 | 12 |
Test the response when the endpoint URL contains a nonexistent course id. | def wT9K(YKHO):
YKHO._login_as_staff()
pmON = YKHO.path(course_id='a/b/c')
geh0 = YKHO.client.get(pmON)
assert geh0.status_code == 404
geh0 = YKHO.client.post(pmON)
assert geh0.status_code == 404 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wT9K(YKHO):\n YKHO._login_as_staff()\n geh0 = YKHO.client.get(gxEw('discussion_course_settings', kwargs={'course_id': 'a/b/c'}))\n assert geh0.status_code == 404",
"def UZz5(x0hE):\n OeKN(client=x0hE, times=10)\n geh0 = x0hE.get('/api/1.0/courses/20')\n geh0 = qQXR.loads(geh0.data)\n ass... | [
"0.8015396",
"0.7954541",
"0.77625984",
"0.76741165",
"0.7661086",
"0.75876415",
"0.75582665",
"0.74304533",
"0.7287139",
"0.727886",
"0.7076672",
"0.6984809",
"0.6852281",
"0.6805588",
"0.6771466",
"0.67493176",
"0.6741063",
"0.67005354",
"0.6689674",
"0.6653416",
"0.6641232... | 0.82176054 | 0 |
Test the response when the endpoint URL contains a nonexistent role. | def MO_x(YKHO):
YKHO._login_as_staff()
pmON = YKHO.path(role='A')
geh0 = YKHO.client.get(pmON)
assert geh0.status_code == 400
geh0 = YKHO.client.post(pmON)
assert geh0.status_code == 400 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oFL9(YKHO):\n geh0 = YKHO.client.get(YKHO.url, headers={'Authorization': YKHO.user_session_token})\n YKHO.assertEqual(geh0.status_code, 403)",
"def oFL9(YKHO):\n geh0 = YKHO.client.get(YKHO.url, headers={'Authorization': YKHO.user_session_token})\n YKHO.assertEqual(geh0.status_code, 403)",
"def... | [
"0.6680411",
"0.6680411",
"0.6680411",
"0.6630807",
"0.66241336",
"0.65975183",
"0.65004057",
"0.64912117",
"0.6464126",
"0.64608115",
"0.64225084",
"0.6398633",
"0.6396459",
"0.6396459",
"0.63877106",
"0.63877106",
"0.63877106",
"0.63877106",
"0.63733333",
"0.6356531",
"0.63... | 0.72400665 | 0 |
Test the response with a POST request without a body. | def Qco6(YKHO):
YKHO._login_as_staff()
geh0 = YKHO.client.post(YKHO.path())
assert geh0.status_code == 400 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sgWc(YKHO):\n YKHO.is_authenticated()\n geh0 = YKHO.post_without_body()\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_400_BAD_REQUEST)",
"def AWhd(YKHO):\n return YKHO.doRequest(YKHO.url, method='POST', body=YKHO.input)",
"def qxFC(wwuV):\n geh0 = wwuV.post('/predict')\n assert geh0.head... | [
"0.760882",
"0.7349504",
"0.72575694",
"0.7159831",
"0.7158061",
"0.7130226",
"0.7128347",
"0.71203625",
"0.7119646",
"0.71075845",
"0.7084577",
"0.7048706",
"0.69651973",
"0.6936803",
"0.69351226",
"0.68292725",
"0.67844677",
"0.67838746",
"0.6767015",
"0.6765974",
"0.675845... | 0.6979357 | 12 |
Gets the name of this Lecture. | def mWFP(YKHO) -> str:
return YKHO._name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mWFP(YKHO) -> str:\n return qe4Y.get(YKHO, 'name')",
"def mWFP(YKHO) -> str:\n return qe4Y.get(YKHO, 'name')",
"def mWFP(YKHO) -> str:\n return qe4Y.get(YKHO, 'name')",
"def mWFP(YKHO) -> str:\n return qe4Y.get(YKHO, 'name')",
"def mWFP(YKHO) -> str:\n return qe4Y.get(YKHO, 'name')",
"... | [
"0.68905884",
"0.68905884",
"0.68905884",
"0.68905884",
"0.68905884",
"0.68905884",
"0.68905884",
"0.68905884",
"0.68905884",
"0.68905884",
"0.68905884",
"0.68905884",
"0.68905884",
"0.68905884",
"0.68905884",
"0.68905884",
"0.68905884",
"0.68905884",
"0.68905884",
"0.68905884"... | 0.0 | -1 |
Sets the name of this Lecture. | def mWFP(YKHO, mWFP: str):
if mWFP is None:
raise ValueError('Invalid value for `name`, must not be `None`')
YKHO._name = mWFP | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP",
"def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP",
"def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP",
"def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP",
"def WZrJ(YKHO, mWFP):\n YKHO.name = mWFP",
"def WZrJ(YKHO, mWFP):\n YKHO._name = mWFP",
"def zPdd(YKHO, mWFP)... | [
"0.7256778",
"0.7256778",
"0.7256778",
"0.7256778",
"0.7256778",
"0.7219376",
"0.7174746",
"0.71650887",
"0.71171784",
"0.71171784",
"0.71074295",
"0.70908993",
"0.70908993",
"0.7088028",
"0.7085079",
"0.7079584",
"0.70190406",
"0.6983657",
"0.6983657",
"0.6971501",
"0.693708... | 0.0 | -1 |
Gets the start_time of this Lecture. | def SWox(YKHO) -> str:
return YKHO._start_time | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SWox(YKHO) -> str:\n return qe4Y.get(YKHO, 'start_time')",
"def SWox(YKHO) -> str:\n return qe4Y.get(YKHO, 'start_time')",
"def SWox(YKHO):\n return YKHO._start_time",
"def SWox(YKHO):\n return YKHO._start_time",
"def SWox(YKHO):\n return YKHO._start_time",
"def SWox(YKHO):\n return... | [
"0.7776385",
"0.7776385",
"0.7720497",
"0.7720497",
"0.7720497",
"0.7720497",
"0.7720497",
"0.7720497",
"0.7720497",
"0.7720497",
"0.7684102",
"0.76729786",
"0.764936",
"0.76383525",
"0.7582366",
"0.7562215",
"0.7558154",
"0.75506216",
"0.75506216",
"0.7548388",
"0.74300706",... | 0.7641603 | 13 |
Sets the start_time of this Lecture. | def SWox(YKHO, SWox: str):
if SWox is None:
raise ValueError('Invalid value for `start_time`, must not be `None`')
YKHO._start_time = SWox | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SWox(YKHO, SWox):\n YKHO._start_time = SWox",
"def SWox(YKHO, SWox):\n YKHO._start_time = SWox",
"def SWox(YKHO, SWox):\n YKHO._start_time = SWox",
"def SWox(YKHO, SWox):\n YKHO._start_time = SWox",
"def SWox(YKHO, SWox):\n YKHO._start_time = SWox",
"def SWox(YKHO, SWox):\n YKHO._st... | [
"0.78978467",
"0.78978467",
"0.78978467",
"0.78978467",
"0.78978467",
"0.7853389",
"0.7853389",
"0.73510754",
"0.71064264",
"0.69617724",
"0.67730093",
"0.67676353",
"0.67474306",
"0.67405975",
"0.6730982",
"0.66675365",
"0.64950955",
"0.64744717",
"0.6411847",
"0.6395347",
"... | 0.76731944 | 7 |