query stringlengths 10 3.6k | document stringlengths 19 61.4k | metadata dict | negatives listlengths 0 101 | negative_scores listlengths 0 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
Get default value for UpnpStateVariable, if defined. | def HyJ9(YKHO):
sB1G = YKHO._state_variable_info['type_info']['data_type_python']
HyJ9 = YKHO._state_variable_info['type_info'].get('default_value', None)
if HyJ9:
return sB1G(HyJ9)
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HyJ9(YKHO) -> h8nf[ImMB]:\n return qe4Y.get(YKHO, 'default_value')",
"def HyJ9(YKHO) -> h8nf[ImMB]:\n return qe4Y.get(YKHO, 'default_value')",
"def rcy9(YKHO):\n return YKHO._default_value",
"def HyJ9(YKHO) -> ImMB:\n WmM4 = getattr(YKHO, 'default', None)\n if WmM4 is None and hasattr(YKHO... | [
"0.70349103",
"0.70349103",
"0.7024685",
"0.6929632",
"0.68789697",
"0.68789697",
"0.68789697",
"0.6824516",
"0.6778297",
"0.6765375",
"0.6733523",
"0.66764456",
"0.665325",
"0.65997434",
"0.658099",
"0.6576169",
"0.65712047",
"0.656126",
"0.656126",
"0.6551363",
"0.65397835"... | 0.6830452 | 7 |
Get timestamp at which this UpnpStateVariable was updated. Return time in UTC. | def zB0d(YKHO) -> qcWV:
return YKHO._updated_at | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dKMA(YKHO):\n return YKHO.__time_of_update",
"def E3oo(YKHO):\n return YKHO._gps.timestamp_utc",
"def vUfD(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'state_update_time')",
"def Crq9(YKHO):\n return YKHO.__update_time",
"def nP7s(YKHO) -> str:\n return qe4Y.get(YKHO, 'update_time')",
... | [
"0.7847951",
"0.7697028",
"0.76773113",
"0.76166356",
"0.7614338",
"0.7614338",
"0.7614338",
"0.7614338",
"0.7614338",
"0.7614338",
"0.7614338",
"0.7614338",
"0.7614338",
"0.7614338",
"0.7556403",
"0.75389344",
"0.75389344",
"0.75389344",
"0.75389344",
"0.75389344",
"0.753893... | 0.0 | -1 |
This tests with a file that is not a proper template to make sure there is a rejection. | def sGES():
Gcz2 = [False, 'Hello lunch']
assert cOfU.process_madlibs_template(Gcz2) == [False, 'Hello lunch'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AoBz(RRlC):\n QpfX = of22()\n NqAa = PX3p(RRlC['bar'])\n with trZe.raises(kLht) as aTqo:\n NqAa.perform(QpfX)\n aTqo.match('File not found: .*')",
"def EXwq(YKHO):\n with trZe.raises(i15K):\n rOAL('manual_verifications', '--email-ids-file', 'invalid/email_id/file/path')",
"def ... | [
"0.69409615",
"0.6893782",
"0.6887011",
"0.68860304",
"0.6844773",
"0.6836779",
"0.6821713",
"0.6766001",
"0.674965",
"0.6727461",
"0.6706028",
"0.6705745",
"0.6662335",
"0.6655213",
"0.66458434",
"0.6642145",
"0.6638676",
"0.6606562",
"0.6605028",
"0.66044337",
"0.6590256",
... | 0.0 | -1 |
Verify if a user exists with the give email address and password | def ZtIz(D3lj, jTXt):
try:
LOzg = NCls.session.query(mv1M).filter(mv1M.email == D3lj).one_or_none()
if LOzg:
if LOzg.check_password(jTXt):
return (True, 'Successfully signed in')
else:
return (False, 'Invalid password')
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Gvth(D3lj, zN5h):\n FrKw = HBct.sha256(zN5h)\n ZB6a = FrKw.hexdigest()\n NCls = VuZx(read_only=False)\n DW23 = NCls.users\n vtfo = DW23.find({'email': D3lj, 'pwd': ZB6a})\n return vtfo.count() == 1",
"def K9qj():\n Mmvw = QePW.form.get('email')\n TgSW = QePW.form.get('password')\n ... | [
"0.8366631",
"0.81053966",
"0.8033513",
"0.801165",
"0.795201",
"0.79320323",
"0.7793211",
"0.7726589",
"0.7716416",
"0.762814",
"0.75810385",
"0.75755966",
"0.7562027",
"0.7542225",
"0.7532085",
"0.7527235",
"0.75043076",
"0.7503729",
"0.7457282",
"0.7453352",
"0.7447916",
... | 0.7856131 | 6 |
Compute the root mean squared error between predicted and actual | def YUpE(x400, UiBY):
yuj7 = x400.map(lambda oOs4: ((oOs4[0], oOs4[1]), oOs4[2]))
z75k = UiBY.map(lambda oOs4: ((oOs4[0], oOs4[1]), oOs4[2]))
lMDD = yuj7.join(z75k).filter(lambda xhFa: xhFa[1] is not None).map(lambda xhFa: (xhFa[0], (xhFa[1][0] - xhFa[1][1]) ** 2))
M9mP = lMDD.map(lambda K0Bv: K0Bv[1]).... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DF3U(Y8eF, aMgO):\n return oyIN.sqrt(oyIN.mean(oyIN.square(Y8eF - aMgO)))",
"def DF3U(Y8eF, aMgO):\n return oyIN.sqrt(oyIN.mean(oyIN.square(Y8eF - aMgO)))",
"def DF3U(Y8eF, aMgO):\n return oyIN.sqrt(SDab(Y8eF, aMgO))",
"def DF3U(Y8eF, aMgO):\n return oyIN.sqrt(SDab(Y8eF, aMgO))",
"def DF3U(... | [
"0.80609024",
"0.80609024",
"0.80354315",
"0.80219656",
"0.7955067",
"0.7944097",
"0.79339606",
"0.7778138",
"0.7642361",
"0.76169276",
"0.7597333",
"0.7554046",
"0.75318444",
"0.7516457",
"0.7516457",
"0.74946636",
"0.74946636",
"0.74637514",
"0.742681",
"0.7410331",
"0.7401... | 0.0 | -1 |
Creates JSON API specification error response payload | def F0WY(jGRS, leAC, aeup=None, JZXy=None, zh7b=None):
P1dF = {'status': jGRS, 'title': leAC}
if JZXy:
P1dF.update({'source': JZXy})
if aeup:
P1dF.update({'detail': aeup})
Twib = {'errors': [P1dF]}
if not zh7b:
Twib = qQXR.dumps({'message': Twib})
return Twib | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jxdG(nPrm):\n wLKY = {}\n wLKY['success'] = 'false'\n wLKY['data'] = {}\n wLKY['error'] = nPrm\n return qQXR.dumps(wLKY)",
"def jxdG(nPrm):\n wLKY = {}\n wLKY['success'] = 'false'\n wLKY['data'] = {}\n wLKY['error'] = nPrm\n return qQXR.dumps(wLKY)",
"def Xvu9(JBZA):\n retu... | [
"0.7075169",
"0.7075169",
"0.7045685",
"0.7011908",
"0.69539475",
"0.69110376",
"0.68859386",
"0.68448985",
"0.6808663",
"0.6801093",
"0.68004423",
"0.67777497",
"0.67375183",
"0.67096186",
"0.66095334",
"0.6523428",
"0.64934987",
"0.6479659",
"0.6478326",
"0.6471916",
"0.647... | 0.6584813 | 15 |
Personal interpretation on JSON API specification response for no records found. | def iSQ_():
mx38 = qQXR.dumps({'data': {'message': 'resources not found'}})
return ykEk(mx38) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wXo5(YKHO):\n YKHO._seed_data()\n geh0 = YKHO.app.get('/api/v1/response', headers={'Authorization': YKHO.user_data['token']}, query_string={'event_id': YKHO.event.id})\n nPrm = qQXR.loads(geh0.data)\n YKHO.assertEqual(geh0.status_code, 200)\n YKHO.assertFalse(nPrm)",
"def wjcU(ajET: HomeAssist... | [
"0.6760955",
"0.6576219",
"0.6520726",
"0.6427598",
"0.6337261",
"0.6327495",
"0.6244335",
"0.6241137",
"0.62340486",
"0.6221353",
"0.61890334",
"0.61282265",
"0.6119891",
"0.61153495",
"0.6100071",
"0.6097837",
"0.6096739",
"0.60692227",
"0.60623014",
"0.60587394",
"0.605424... | 0.5858732 | 47 |
Parses HTTP request header for Authorization API token. TODO Implement JSON web token authetication with SQLAlchemy User model. Add logic to this function to validate Authorization JSON Web Token. | def hZgg(FYKK):
@zaGL(FYKK)
def SzLu(*qIxc, **B2fa):
_P1Z = False
wvEv = s9u5.RequestParser()
wvEv.add_argument('Authorization', location='headers', default='')
zB81 = wvEv.parse_args()
if zB81['Authorization']:
eOtH = zB81['Authorization']
if eOt... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cRhd(YKHO, qv1X):\n MkeE = qv1X.get_header('Authorization')\n if not MkeE:\n raise tEve()\n SQ3m = MkeE.split()\n if SQ3m[0].lower() != YKHO.token_header_prefix.lower():\n raise tEve(description='Invalid Authorization Header: Must start with {0}'.format(YKHO.token_header_prefix), chal... | [
"0.78433204",
"0.7823898",
"0.7800548",
"0.7720665",
"0.75528234",
"0.7492518",
"0.7428138",
"0.73837227",
"0.7330882",
"0.7310604",
"0.72908145",
"0.72786003",
"0.7263792",
"0.7194103",
"0.7194103",
"0.7194103",
"0.71833843",
"0.71822447",
"0.7175536",
"0.7174365",
"0.716424... | 0.0 | -1 |
Resource that gives access to AWS SecretsManager. The underlying SecretsManager session is created by calling | def zESX(QpfX):
return zOWq(max_attempts=QpfX.resource_config['max_attempts'], region_name=QpfX.resource_config.get('region_name'), profile_name=QpfX.resource_config.get('profile_name')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bv2a(Emd4, qnCX: str, QDug: str='API_TOKEN'):\n fOcm = mLyd()\n bZPx = fOcm.get_secret_value(secret_name=qnCX)\n return Emd4(api_token=bZPx[QDug])",
"def N6pq(QpfX):\n XiDu = GfdN.bool_param(QpfX.resource_config['add_to_environment'], 'add_to_environment')\n MYN8 = GfdN.opt_str_param(QpfX.reso... | [
"0.75499344",
"0.7363778",
"0.7251918",
"0.69976807",
"0.6909085",
"0.68587434",
"0.68416756",
"0.66929567",
"0.66452545",
"0.66073185",
"0.65836835",
"0.654465",
"0.64894456",
"0.646995",
"0.64181477",
"0.6372708",
"0.6327881",
"0.63074034",
"0.6281673",
"0.6252113",
"0.6229... | 0.6885105 | 5 |
Returns the last encoding vector from the state. For example, this is the last hidden states of the last LSTM layer for a LSTMbased encoder. | def SFrp(QTBn):
if isinstance(QTBn, g760.Sequence):
QTBn = QTBn[-1]
if isinstance(QTBn, ZylS.nn.rnn_cell.LSTMStateTuple):
return QTBn.h
return QTBn | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ja6o(YKHO):\n return oyIN.expand_dims(YKHO._get_state(-1), axis=0)",
"def o_r0(YKHO) -> h8nf['outputs.OperatorStatusInitContainerStatusesLastState']:\n return qe4Y.get(YKHO, 'last_state')",
"def x8I_(YKHO, evpx):\n d6pt = ht2j.max(evpx, 0)[1][0]\n NRWt = YKHO.idx2state[d6pt]\n QTBn = oyIN.ze... | [
"0.6528798",
"0.6303575",
"0.6279187",
"0.62119716",
"0.61454463",
"0.61282057",
"0.6127005",
"0.6089321",
"0.60833836",
"0.60799474",
"0.60650975",
"0.5985282",
"0.5955283",
"0.59376174",
"0.59260666",
"0.59260297",
"0.59024596",
"0.58938515",
"0.58936405",
"0.5880547",
"0.5... | 0.761971 | 0 |
Returns the ID of the node. | def unpH(YKHO):
return YKHO._id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mLJR(YKHO):\n return YKHO.node_id",
"def id(YKHO):\n return YKHO._node_instance.id",
"def Lnes(YKHO):\n return YKHO.__node_id",
"def gUdT(YKHO):\n try:\n return YKHO._nodeid\n except Exception as e:\n raise tTpl",
"def gUdT(YKHO):\n try:\n return YKHO._nodeid\n ... | [
"0.8906309",
"0.8819276",
"0.8774044",
"0.87530226",
"0.87530226",
"0.87530226",
"0.87530226",
"0.8718472",
"0.87109494",
"0.87109494",
"0.87109494",
"0.87109494",
"0.87109494",
"0.8663359",
"0.85183686",
"0.84695363",
"0.8410491",
"0.8339522",
"0.8296731",
"0.82161534",
"0.8... | 0.7110694 | 89 |
Returns the distance to it parent. | def gfjy(YKHO):
return YKHO.distance(YKHO.parent) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zG70(YKHO):\n Ayfi = 0\n if YKHO.parent is None:\n return Ayfi\n zAcD = YKHO\n while True:\n zAcD = zAcD.parent\n if zAcD is None:\n return Ayfi\n Ayfi += 1",
"def s7yO(YKHO, XP5J):\n return (YKHO - XP5J).length()",
"def s7yO(YKHO, XP5J):\n return (Y... | [
"0.8497145",
"0.70661",
"0.70400715",
"0.7035147",
"0.70241237",
"0.70241237",
"0.70241237",
"0.69853824",
"0.6965152",
"0.6962224",
"0.6959336",
"0.6949894",
"0.69495124",
"0.68675417",
"0.68675417",
"0.68675417",
"0.68675417",
"0.68286073",
"0.6828219",
"0.6810498",
"0.6794... | 0.94085693 | 0 |
Return the dict with all nested keys flattened joined with '/'. | def I_DJ(Csk6: type_utils.TreeDict[T]) -> cuzp[str, Kt_s]:
JYNz = gLxh()
for G1Hx, Ty9i in Csk6.items():
if isinstance(Ty9i, dict):
for Xyq7, jlSq in I_DJ(Ty9i).items():
JYNz[f'{G1Hx}/{Xyq7}'] = jlSq
else:
JYNz[G1Hx] = Ty9i
return JYNz | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BtEf(cmPJ):\n nPrm = cmPJ.copy()\n for H5ew in list(nPrm):\n if '/' in H5ew:\n nPrm = RSKQ(xBlr.reduce(lambda Ty9i, G1Hx: {G1Hx: Ty9i}, (H5ew.split('/') + [nPrm.pop(H5ew)])[::-1]), nPrm)\n return nPrm",
"def nf_n(H5ew, y0cW=''):\n if type(H5ew) is dict:\n for BWXx in H5ew... | [
"0.74046034",
"0.68159705",
"0.67551464",
"0.6639188",
"0.66129965",
"0.6608961",
"0.6597646",
"0.6555404",
"0.6457703",
"0.6402065",
"0.6382307",
"0.63689756",
"0.63454515",
"0.6315355",
"0.6259651",
"0.6217069",
"0.61899",
"0.61833775",
"0.6165485",
"0.61648905",
"0.6155017... | 0.0 | -1 |
Pack a 1lvl dict into a nested dict with same structure as `nest_d`. | def sZcA(HcQQ, H0fk):
jCh9 = {}
for G1Hx, Ty9i in H0fk.items():
if isinstance(Ty9i, dict):
LVgQ = I_DJ(Ty9i)
DTba = {Xyq7: HcQQ.pop('{}/{}'.format(G1Hx, Xyq7)) for Xyq7, bGrB in LVgQ.items()}
jCh9[G1Hx] = sZcA(DTba, Ty9i)
else:
jCh9[G1Hx] = HcQQ.po... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def opVZ(Csk6, y0cW=None):\n Aofo = {}\n for G1Hx, Ty9i in Csk6.iteritems():\n if isinstance(Ty9i, dict):\n Aofo.update(opVZ(Ty9i, prefix=G1Hx))\n else:\n Aofo[G1Hx] = Ty9i\n if y0cW is not None:\n Aofo = {XMpf(y0cW) + XMpf(G1Hx): Ty9i for G1Hx, Ty9i in Aofo.iter... | [
"0.69660443",
"0.6901972",
"0.65007937",
"0.6437171",
"0.63328785",
"0.63301104",
"0.6312389",
"0.6279962",
"0.6240218",
"0.62159306",
"0.6183658",
"0.61785674",
"0.61700106",
"0.6169887",
"0.6111021",
"0.6108166",
"0.6097244",
"0.6094753",
"0.6088439",
"0.60721433",
"0.60695... | 0.75707895 | 0 |
Returns a decorator which prevents concurrent calls to functions. | def o0hA() -> YrBT[[OfAA], OfAA]:
stkY = T6FA.Lock()
def Gwn5(FYKK: Fn) -> OfAA:
@xBlr.wraps(FYKK)
def ZIBh(*qIxc, **B2fa):
with stkY:
return FYKK(*qIxc, **B2fa)
return ZIBh
return Gwn5 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IF2O(JfyU):\n\n def XIpm(YKHO, *qIxc, **B2fa):\n if YKHO.concurrent:\n with YKHO._rlock:\n return JfyU(YKHO, *qIxc, **B2fa)\n else:\n return JfyU(YKHO, *qIxc, **B2fa)\n XIpm.__name__ == JfyU.__name__\n return XIpm",
"def LQra(JfyU):\n\n @zaGL(Jfy... | [
"0.7920203",
"0.7371071",
"0.7263903",
"0.7224417",
"0.71323216",
"0.7107835",
"0.70739573",
"0.70162964",
"0.69766283",
"0.6965414",
"0.6960989",
"0.6937424",
"0.6931969",
"0.6833981",
"0.6815127",
"0.6800111",
"0.67233205",
"0.67216885",
"0.66797125",
"0.66755366",
"0.66688... | 0.74484473 | 1 |
Converts the CompletedMatch object to a dictionary representation. | def MNRr(YKHO):
K4ec = super(M5MT, YKHO).to_dict()
K4ec.update({'winner': YKHO.winner, 'loser': YKHO.loser, 'score': YKHO.score})
if YKHO.stats is not None:
Orfp = YKHO.stats[YKHO.winner].to_dict()
pErK = YKHO.stats[YKHO.loser].to_dict()
Orfp = {WKvO + '_winner': LVAh for WKvO, LVAh ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MNRr(YKHO):\n return {'name': YKHO.name, 'start_time': YKHO.start_time, 'end_time': YKHO.end_time, 'color': YKHO.color, 'description': YKHO.description, 'notes': YKHO.notes, 'location': YKHO.location, 'participants': YKHO.participants}",
"def MNRr(YKHO) -> cuzp:\n tbx9 = {}\n if hasattr(YKHO, 'match... | [
"0.62650084",
"0.6240304",
"0.6212753",
"0.6212753",
"0.6130784",
"0.6121702",
"0.6080676",
"0.60379654",
"0.60379654",
"0.59940326",
"0.59852386",
"0.5970105",
"0.5957692",
"0.59543157",
"0.59256977",
"0.59086716",
"0.5887642",
"0.5851785",
"0.5840887",
"0.5835789",
"0.58357... | 0.75248855 | 0 |
Returns True if either not a push instruction or the push is canonical. | def fnwC(BEuN):
khtY = BEuN.opcode.value
nPrm = BEuN.data
lbB4 = len(BEuN.data)
if khtY > mlhH:
return True
if khtY < R_5O and khtY > AQBV and (lbB4 == 1 and nPrm[0] <= 16):
return False
if khtY == R_5O and lbB4 < R_5O:
return False
if khtY == YAKD and lbB4 <= 255:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def r692(YKHO):\n if not YKHO.data:\n return True\n if len(YKHO.data) == 0:\n return YKHO.opcode == AQBV\n elif len(YKHO.data) == 1 and 1 <= AZAS(YKHO.data[0]) <= 16:\n return YKHO.opcode.number == JQa6.number + AZAS(YKHO.data[0]) - 1\n elif len(YKHO.data) == 1 and AZAS(YKHO.data[0... | [
"0.78225887",
"0.67543167",
"0.6521029",
"0.6488292",
"0.6485942",
"0.6410478",
"0.59963584",
"0.5960721",
"0.5935965",
"0.5901617",
"0.585662",
"0.58420455",
"0.5749941",
"0.5724024",
"0.56976527",
"0.56933206",
"0.565973",
"0.56372124",
"0.5632048",
"0.56320214",
"0.5608761... | 0.7553396 | 1 |
Creates a logger instance. | def lmAE(mWFP, Ux0P, format='%(asctime)s - %(levelname)s - %(message)s'):
ojRq = Hy7s.path.sep.join([Hy7s.path.realpath(qQXR.load(open('config.json', 'r'))['logdir']), Ux0P])
bo34 = G9jH.getLogger(mWFP)
bo34.setLevel(G9jH.INFO)
if not Hy7s.path.exists(Hy7s.path.dirname(ojRq)):
Hy7s.makedirs(Hy7s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eLpg():\n return Few0()",
"def MWLp(YKHO) -> G9jH.Logger:\n return G9jH.getLogger()",
"def lmAE() -> G9jH.Logger:\n pass",
"def lmAE():\n zeTD = eh9D()\n oPxp = '%s.log' % zeTD\n St8E = G9jH.Client()\n bo34 = St8E.logger(oPxp)\n return bo34",
"def lmAE():\n zeTD = eh9D()\n ... | [
"0.8379047",
"0.82492346",
"0.8195494",
"0.8185191",
"0.8185191",
"0.8100325",
"0.8066436",
"0.7921291",
"0.78348595",
"0.7795896",
"0.76485604",
"0.7630665",
"0.7599378",
"0.75976807",
"0.75529945",
"0.74848014",
"0.7455359",
"0.7448933",
"0.7413023",
"0.73403585",
"0.733812... | 0.6806687 | 99 |
Shortcut for returning 404's. | def wJtk(YKHO, MP2k, tO9_='404 File Not Found'):
MP2k('404 File Not Found', [('Content-Type', 'text/html')])
return str(tO9_) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o3cf(P1dF):\n return '404'",
"def o3cf():\n UAju = {'_resource': ['not found']}\n return P1dF(404, UAju)",
"def mZnU():\n return oGir(RA4y, '<h1>404 Error : Some crap went down, so just <a href=\"/\">HEAD HOME</a>.</h1>', [])",
"def RQdI(tTpl):\n return (TvZl('404.html', exception=tTpl), 4... | [
"0.7995536",
"0.793681",
"0.7863819",
"0.7835628",
"0.7775999",
"0.7766115",
"0.77445453",
"0.7733351",
"0.7733351",
"0.7733351",
"0.7728328",
"0.77270836",
"0.76479095",
"0.76194006",
"0.7617528",
"0.7612509",
"0.758834",
"0.7587258",
"0.75625473",
"0.7556308",
"0.75477046",... | 0.0 | -1 |
Creates a WSGI application for use. | def Nd3k():
return hPmM({'^/$': bqfg(), '/hosts.json$': w3kL(), '/envs.json$': cr5C(), '/host/(?P<host>[\\w\\.]*).json?$': LTk4(), '/static/(?P<filename>[\\w\\-\\.]*$)': vvrl()}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mJn7() -> L2w0:\n P4t4 = LUif()\n return P4t4",
"def oQiI():\n return dSPv.WSGIApplication([('^/logcollector/', rnZt)], debug=True)",
"def P4t4(*qIxc, **YSA3):\n Kgis()\n return zLeE(*qIxc, **YSA3)",
"def Byee():\n return dSPv.WSGIApplication([('.*', sTMn)], debug=True)",
"def LUif():... | [
"0.8396314",
"0.79809964",
"0.78735536",
"0.7867595",
"0.7855474",
"0.7805046",
"0.77437353",
"0.77364975",
"0.7647335",
"0.76156014",
"0.7600932",
"0.75778615",
"0.7565674",
"0.7550449",
"0.7546381",
"0.7536899",
"0.75333923",
"0.7499212",
"0.7493956",
"0.74808633",
"0.74705... | 0.0 | -1 |
Cumulative distribution function of Gaussian. | def BhHP(WKvO):
return 0.5 * (1.0 + tVah(WKvO * 2 ** (-0.5))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CWak(WKvO, caa_, yGTL, WTkW):\n return 0.5 * caa_ * zd5H((yGTL - WKvO) / (oyIN.sqrt(2) * WTkW))",
"def s_um(WKvO, yGTL=0, WTkW=1):\n return EVUa(float(WKvO - yGTL) / WTkW)",
"def BhHP(WKvO, JBMS, LwKx):\n NXpY = ht2j.diagonal(LwKx, dim1=-1, dim2=-2)\n epBp = (WKvO - JBMS) / (NXpY + 1e-06)\n ... | [
"0.7538338",
"0.74662554",
"0.72757703",
"0.71839976",
"0.7083035",
"0.70419735",
"0.70382154",
"0.7032855",
"0.7003055",
"0.69857943",
"0.69786006",
"0.6945942",
"0.69210726",
"0.68776584",
"0.68647295",
"0.68423057",
"0.6816213",
"0.6811648",
"0.68062276",
"0.67649895",
"0.... | 0.79432976 | 0 |
Remove any character from a keyword (commonly a database table's field name) that is not explicitly permitted by our whitelist. Importantly the dot character must be removed. | def gZ70(Emd4, peBr):
return Emd4.whitelist_regex.sub('', peBr) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hTu0(l5Ny: str, JhyK: bool=True) -> str:\n I1mm = ZbWC.findall('[^a-zA-Z0-9\\\\_]', l5Ny)\n if I1mm:\n l5Ny = ZbWC.sub('[^a-zA-Z0-9\\\\.\\\\_]', '_', l5Ny)\n if JhyK:\n l5Ny = l5Ny.replace('.', '', l5Ny.count('.'))\n else:\n l5Ny = l5Ny.replace('.', '', l5Ny.cou... | [
"0.66204274",
"0.64843524",
"0.64501506",
"0.64380324",
"0.64278305",
"0.6407261",
"0.6400917",
"0.63774145",
"0.6346931",
"0.6331777",
"0.6322846",
"0.6316731",
"0.63123596",
"0.6299364",
"0.62781715",
"0.6263174",
"0.6254126",
"0.6247505",
"0.6246391",
"0.62313354",
"0.6228... | 0.6915951 | 0 |
Preprocess step for tweet. 1. transform all text in lowercase 2. Tokenize by transforming string to list 3. Remove stopwords 4. Apply stemming, simplify word to root word. | def sKng(YKHO, NHn2):
NHn2 = NHn2.lower()
NHn2 = NHn2.translate(str.maketrans('', '', vIwR.punctuation))
NHn2 = NHn2.split()
NHn2 = [a1PO for a1PO in NHn2 if a1PO not in YKHO.STOPWORDS]
NHn2 = [YKHO.stemming.stem(a1PO) for a1PO in NHn2]
try:
if NHn2[-1][:4] == 'http':
NHn2 = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def biH0(KnbE):\n l5Ny = KnbE.lower()\n ieoI = dFss(KnbE)\n tyNF = str.maketrans('', '', vIwR.punctuation)\n N8W2 = [yzQ0.translate(tyNF) for yzQ0 in ieoI]\n aYBA = []\n for GIN8 in N8W2:\n if GIN8 not in hwHU:\n aYBA.append(GIN8)\n sfIf = []\n for GIN8 in aYBA:\n i... | [
"0.7747528",
"0.7600149",
"0.7589513",
"0.7587717",
"0.75212866",
"0.74987376",
"0.7466589",
"0.7439539",
"0.7382684",
"0.7377435",
"0.7357288",
"0.7265174",
"0.7258426",
"0.7252029",
"0.72450626",
"0.72214735",
"0.72141063",
"0.72012424",
"0.7179414",
"0.71426666",
"0.714205... | 0.0 | -1 |
Test case for client_address_partial_update | def uAUE(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jVKc(YKHO):\n pass",
"def jVKc(YKHO):\n pass",
"def xL7q(YKHO):\n pass",
"def mg39(YKHO):\n pass",
"def dUat(YKHO):\n pass",
"def uj29(YKHO):\n pass",
"def s90V(YKHO):\n pass",
"def mn3i(YKHO):\n pass",
"def mn3i(YKHO):\n pass",
"def uEpM(YKHO):\n ZrNc = YKHO._cr... | [
"0.84329945",
"0.84329945",
"0.77132475",
"0.7563341",
"0.7316675",
"0.7085517",
"0.6936163",
"0.6898697",
"0.6898697",
"0.6886568",
"0.68369037",
"0.67561495",
"0.66626024",
"0.657118",
"0.6558073",
"0.65236294",
"0.65236294",
"0.64472675",
"0.6424575",
"0.63925624",
"0.6392... | 0.95387965 | 0 |
return a string representation of the cell located at x,y. | def OjRs(YKHO, WKvO, LVAh):
Z9rn = YKHO.board.get_cell(WKvO, LVAh)
if Z9rn == 0:
return '.' if YKHO.__azmode else ' .'
elif YKHO.__azmode:
if Z9rn not in YKHO.__az:
KCHu = '?'
else:
KCHu = YKHO.__az[Z9rn]
elif Z9rn >= 1024:
KCHu = '%2dk' % (Z9rn /... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return 'Cell {},{}'.format(YKHO.row, YKHO.col)",
"def p83Y(YKHO, WKvO, LVAh):\n return ','.join([str(YRbF) for YRbF in [WKvO, LVAh]])",
"def zAg0(YKHO):\n return '<' + str(YKHO._x) + ', ' + str(YKHO._y) + '>'",
"def zAg0(YKHO):\n return str('(' + str(YKHO.x) + ',' + str(YKHO.y) ... | [
"0.75638527",
"0.7541922",
"0.7303193",
"0.7289678",
"0.72552896",
"0.72224647",
"0.7207075",
"0.71827024",
"0.7149926",
"0.7134906",
"0.7127742",
"0.71198934",
"0.70977575",
"0.70977575",
"0.7079046",
"0.70542103",
"0.70519936",
"0.69982916",
"0.699671",
"0.69876015",
"0.698... | 0.75600797 | 1 |
Return a list of strings corresponding to form questions that are included in the export. | def dkdO(jCLa):
C9U5 = set()
if jCLa:
from corehq.apps.export.models import FormExportInstance
g75F = FormExportInstance.get(jCLa)
for tyNF in g75F.tables:
for iVRZ in tyNF.columns:
if iVRZ.selected and iVRZ.item:
RVjQ = [exwG.name for exwG... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gFHi(YKHO):\n l5Ny = []\n for eZ_W in YKHO.input_files:\n with open(eZ_W) as eHNT:\n l5Ny += qQXR.load(eHNT)['questions']\n return l5Ny",
"def Ab75(YKHO):\n return []",
"def KaoT():\n gwU2 = Ebri.read().split('\\n')\n Mh_N = list(filter(None, gwU2))\n return Mh_N",
... | [
"0.669993",
"0.66300446",
"0.65753525",
"0.6329308",
"0.62785614",
"0.62443185",
"0.61911577",
"0.61686397",
"0.6044733",
"0.60229254",
"0.6021211",
"0.586743",
"0.5857979",
"0.5840382",
"0.58364147",
"0.58027005",
"0.5798746",
"0.579383",
"0.5791388",
"0.5767366",
"0.5749932... | 0.0 | -1 |
The offsets of each box inside the layer. Example >>> a, b, c, d, e = map(Ty, "abcde") >>> f, g = Box('f', a, b), Box('g', c, d) >>> assert Layer(e, f, e, g, e).boxes_and_offsets == [(f, 1), (g, 3)] | def yV_Y(YKHO) -> list[tuple[rh6a, int]]:
LFlW, FlUN, *J3uN = YKHO
oUSw, gQVb = ([FlUN], [len(LFlW)])
for cM24, FlUN in zip(J3uN[::2], J3uN[1::2]):
oUSw.append(FlUN)
gQVb.append(gQVb[-1] + len(oUSw[-1].dom) + len(cM24))
return list(zip(oUSw, gQVb)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FYvP(YKHO, FlUN, p3tS):\n M1Jx = _Fei.TRAIN.std_scaling\n VZDZ = p3tS[2] - p3tS[0]\n zxUc = p3tS[3] - p3tS[1]\n p3tS = [p3tS[0] + VZDZ / 2, p3tS[1] + zxUc / 2, VZDZ, zxUc]\n qbkV = (p3tS[0] - FlUN[0]) / FlUN[2] * M1Jx\n MIHL = (p3tS[1] - FlUN[1]) / FlUN[3] * M1Jx\n Nv3L = epAf.log(p3tS[2] ... | [
"0.67672366",
"0.66805524",
"0.6585293",
"0.64567095",
"0.6349781",
"0.63215864",
"0.6265864",
"0.6184208",
"0.6184208",
"0.61546826",
"0.6148598",
"0.6114002",
"0.6111618",
"0.60751706",
"0.6069628",
"0.6051167",
"0.6010554",
"0.6008947",
"0.6005416",
"0.5998546",
"0.5981268... | 0.76578355 | 0 |
Returns the normal form of a diagram. | def ACzY(YKHO, **NArs) -> EoEF:
wyyA = set()
for Bud7 in Hs6x.chain([YKHO], YKHO.normalize(**NArs)):
if Bud7 in wyyA:
AJ5d = NotImplementedError(yEHD.NOT_CONNECTED.format(YKHO))
AJ5d.last_step = Bud7
raise AJ5d
wyyA.add(Bud7)
return Bud7 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mhAC(YKHO):\n return YKHO._normal",
"def GOZd(YKHO):\n return q6US(tuple(YKHO._top_cycles), tuple(YKHO._bot_cycles))",
"def GOZd(YKHO):\n return UuCt([(a1PO, Fg_i) for Fg_i, a1PO in YKHO.cylinders()])",
"def orEe(YKHO):\n return YKHO.diagram()",
"def Y7f8(YKHO) -> aLMY:\n ...",
"def mh... | [
"0.656095",
"0.6265368",
"0.625824",
"0.6223065",
"0.6125757",
"0.611233",
"0.6110641",
"0.6043357",
"0.6028075",
"0.5975526",
"0.5930941",
"0.59267694",
"0.5902683",
"0.58898854",
"0.5810463",
"0.57169574",
"0.5713554",
"0.5693565",
"0.5685638",
"0.5678765",
"0.5672141",
"... | 0.54470193 | 39 |
Computes the precision for the specified values of k | def vjyh(hlel, pan_, wqJi, hz5a=(1,)):
Gq8e = max(hz5a)
bGrB, nvEb = hlel.topk(Gq8e, 1, True, True)
nvEb = nvEb.t()
if wqJi:
x6A0, Froq, EhIg = pan_
pan_ = ht2j.argmax(x6A0, dim=1)
D_Fg = ht2j.argmax(Froq, dim=1)
gXXc = EhIg * nvEb.eq(pan_.view(1, -1).expand_as(nvEb)).flo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhd_(u5Ef, G1Hx):\n return len(u5Ef) / G1Hx",
"def sEak(Mkmy, G1Hx):\n assert G1Hx >= 1\n Mkmy = oyIN.asarray(Mkmy)[:G1Hx]\n return oyIN.mean(Mkmy)",
"def sEak(YKHO, G1Hx):\n fdMZ = YKHO.pred_rankings.rdd.map(lambda SjLr: (SjLr[2], SjLr[1]))\n Wbxz = rRQi(fdMZ)\n return Wbxz.precisionA... | [
"0.8003109",
"0.797514",
"0.79735994",
"0.79411817",
"0.78640723",
"0.7803957",
"0.77072597",
"0.76212215",
"0.75934887",
"0.7561503",
"0.75209886",
"0.743037",
"0.74132675",
"0.73754424",
"0.73745584",
"0.7320635",
"0.7253765",
"0.7236923",
"0.72290605",
"0.7204713",
"0.7136... | 0.0 | -1 |
The probabilistic encoder which computes the mean of z drawn from the Gaussian distribution q(z|images). | def nrOS(YKHO, zhMh, LVAh, PO4e, CJGY=None, JPu3=True):
WL4f = Fz20.fully_connected(ZylS.concat(1, (zhMh, LVAh)), YKHO.hidden_dim, scope='enc2_fc', activation_fn=ZylS.nn.softplus, normalizer_fn=Fz20.batch_norm, reuse=CJGY, normalizer_params={'reuse': CJGY, 'is_training': JPu3, 'scale': True, 'updates_collections': ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dd6S(epBp, h4Ci=h4Ci, wt5X=wt5X, yGTL=yGTL):\n return 3 * h4Ci ** 2 * wt5X * (1 + epBp) ** 3 / (8 * oyIN.pi * yvY1 * yGTL * leB8)",
"def kLcZ(YKHO, input: Tensor) -> llWB:\n Aofo = YKHO.encoder(input)\n Aofo = ht2j.flatten(Aofo, start_dim=1)\n epBp = YKHO.fc_z(Aofo)\n return epBp",
"def bbYj... | [
"0.620064",
"0.6137631",
"0.5904936",
"0.5722408",
"0.57042664",
"0.5702101",
"0.5627665",
"0.5623761",
"0.5547162",
"0.5532215",
"0.55223686",
"0.54971117",
"0.54971117",
"0.54933155",
"0.54902846",
"0.54815453",
"0.547221",
"0.54285204",
"0.5425881",
"0.54234743",
"0.541630... | 0.0 | -1 |
Temp Min, Temp AVG, and Temp MAX for a given date. | def k6Be(kepv):
kepv = '2012-02-28'
B8Pe = cuiw.query(JfyU.min(Ny6I.tobs), JfyU.avg(Ny6I.tobs), JfyU.max(Ny6I.tobs)).filter(Ny6I.date >= kepv).all()
Cs4B = {WKvO for kepv, WKvO in B8Pe}
return pz3A(Cs4B) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def syUx(kepv, KhBf=GnQ4):\n return cuiw.query(JfyU.min(Ny6I.tobs), JfyU.avg(Ny6I.tobs), JfyU.max(Ny6I.tobs)).filter(Ny6I.date >= kepv).filter(Ny6I.date <= KhBf).all()",
"def syUx(kepv, KhBf):\n return cuiw.query(JfyU.min(Ny6I.tobs), JfyU.avg(Ny6I.tobs), JfyU.max(Ny6I.tobs)).filter(Ny6I.date >= kepv).filte... | [
"0.6947411",
"0.6945776",
"0.6945776",
"0.6911762",
"0.6903864",
"0.6903864",
"0.689403",
"0.689403",
"0.689403",
"0.689403",
"0.689403",
"0.689403",
"0.689403",
"0.6892932",
"0.6892932",
"0.6892932",
"0.68590873",
"0.6850262",
"0.68436533",
"0.68236625",
"0.67968655",
"0.6... | 0.0 | -1 |
Returns an iterator over all transformations that satisfy a given set of criteria. | def neBz(YKHO, *, JIS1: Optional[Collection[TransformationSchema]]=None, Nqlg: Optional[Collection[FileLine]]=None) -> bDy6[ZiVz]:
if JIS1 is None:
JIS1 = []
if Nqlg is None:
Nqlg = []
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xDcj(YKHO, KUnM=()):\n for GuyF in YKHO._approaches:\n FEMH = True\n for eHNT in KUnM:\n a6Wm = eHNT(GuyF)\n if a6Wm is False:\n FEMH = False\n if FEMH:\n yield GuyF",
"def sDji(iACu, KUnM):\n for uPnQ in iACu:\n UdjM = False\n... | [
"0.6318502",
"0.6100126",
"0.60947937",
"0.58977824",
"0.58116925",
"0.57687473",
"0.57617927",
"0.5594391",
"0.5537704",
"0.5518102",
"0.54757774",
"0.5435085",
"0.5432941",
"0.54277587",
"0.5421705",
"0.54102755",
"0.5382713",
"0.5377646",
"0.53651035",
"0.53620565",
"0.534... | 0.51477057 | 40 |
Cumulative distribution function for the standard normal distribution | def tU_7(WKvO):
return (1 + epAf.erf(WKvO / epAf.sqrt(2))) / 2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TLky(WKvO, yGTL=0, WTkW=1):\n return (1 + epAf.erf((WKvO - yGTL) / (epAf.sqrt(2) * WTkW))) / 2",
"def TLky(WKvO, yGTL=0, WTkW=1):\n d7pR = (WKvO - yGTL) / (WTkW * XTiz.sqrt(2))\n Ylbp = (1 + tVah(d7pR)) / 2\n return Ylbp",
"def TLky(P6bq, M1Jx, WKvO):\n fEVw = WKvO - P6bq\n NSRv = M1Jx * ... | [
"0.7716722",
"0.76302904",
"0.76216435",
"0.7532732",
"0.7497952",
"0.7344793",
"0.7267865",
"0.72458094",
"0.715184",
"0.71347916",
"0.71103394",
"0.710263",
"0.7089693",
"0.70697874",
"0.70233876",
"0.69168466",
"0.68725264",
"0.683956",
"0.683956",
"0.6797733",
"0.6796382"... | 0.7087533 | 13 |
Get the disabled status for a subscription. Gets whether or not Serial Console is disabled for a given subscription. | async def get_console_status(YKHO, WmM4: str, **B2fa: Any) -> uLKX[QVOl.SerialConsoleStatus, QVOl.GetSerialConsoleSubscriptionNotFound]:
KVtY = {401: lhwm, 404: llBy, 409: DKDz, 304: AVtL}
KVtY.update(B2fa.pop('error_map', {}) or {})
kkzV = B2fa.pop('headers', {}) or {}
Vlb9 = jxqF(B2fa.pop('params', {}... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lbi2(YKHO):\n return YKHO.device_disabled",
"def cNBO(YKHO):\n return YKHO.disabled",
"def lbi2(YKHO) -> qe4Y.Output[bool]:\n return qe4Y.get(YKHO, 'disabled')",
"def qhUu():\n return pNH0('NO')",
"def qhUu():\n return RheX('false')",
"def gv1u(YKHO):\n gv1u = YKHO.interface.is_disa... | [
"0.65362275",
"0.6507116",
"0.6408298",
"0.63023466",
"0.6285996",
"0.6265141",
"0.62566316",
"0.62566316",
"0.62566316",
"0.6251417",
"0.6251417",
"0.62487376",
"0.6232227",
"0.62193483",
"0.6195317",
"0.6166248",
"0.61552817",
"0.61552817",
"0.61168885",
"0.60628754",
"0.60... | 0.0 | -1 |
Convert a list of tokens to a list of ints using a lookup dictionary | def UnH3(YKHO, PuKl, ccBJ):
iLHl = []
for eOtH in PuKl:
d6pt = ccBJ[eOtH]
iLHl.append(d6pt)
return iLHl | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gIIX(s2mk: Iterable[str], CtWL: Dict[str, int]) -> x1iM[int]:\n return [CtWL.get(yzQ0, CtWL[Nq1b.UNK_SYMBOL]) for yzQ0 in s2mk]",
"def bpa4(YKHO, jWWN):\n return [YKHO.sym2idx.get(eOtH, YKHO.unk_idx) for eOtH in jWWN]",
"def txtC(YKHO, s2mk: Union[str, List[str]]) -> uLKX[int, x1iM[int]]:\n if isi... | [
"0.6776375",
"0.6751654",
"0.65020305",
"0.64728326",
"0.64673567",
"0.64541805",
"0.6396788",
"0.63911706",
"0.63592213",
"0.62318945",
"0.62318945",
"0.62274826",
"0.62218726",
"0.6219129",
"0.61831135",
"0.61755896",
"0.613287",
"0.61178875",
"0.6082223",
"0.6060297",
"0.6... | 0.76783717 | 0 |
Set optimizer's hyperparameter according to value_list, scheduled on epoch_list. | def M3cf(t23u, v9CE, WAjq='main', hGI9='__auto'):
if isinstance(t23u, list):
if len(t23u) != len(v9CE):
raise ValueError('epoch_list length {} and value_list length {} must be same!'.format(len(t23u), len(v9CE)))
else:
assert isinstance(t23u, float) or isinstance(t23u, int)
a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NC1y(t23u, v9CE, pan_, hGI9):\n if isinstance(t23u, list):\n if not isinstance(v9CE, list):\n assert isinstance(v9CE, float) or isinstance(v9CE, int)\n v9CE = [v9CE]\n if len(t23u) != len(v9CE):\n raise ValueError('epoch_list length {} and value_list length {} ... | [
"0.6447009",
"0.6314808",
"0.6314808",
"0.63031775",
"0.6301993",
"0.6293129",
"0.6293129",
"0.6268501",
"0.6213527",
"0.6190772",
"0.6157625",
"0.61221635",
"0.6117118",
"0.6111673",
"0.6098907",
"0.6090276",
"0.6063247",
"0.60578024",
"0.6040412",
"0.60284483",
"0.6028296",... | 0.7546054 | 0 |
Return a SQLAlchemy session. | def KfiN(kvdF=True, _Xcb=False):
global _ENGINE, _MAKER
if BlAi is None or xZ3k is None:
xZ3k = PWOV()
BlAi = ZZtq(xZ3k, kvdF, _Xcb)
cuiw = BlAi()
cuiw.query = KVlU.exception.wrap_db_error(cuiw.query)
cuiw.flush = KVlU.exception.wrap_db_error(cuiw.flush)
return cuiw | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KfiN(YKHO):\n DMju = fKRS(bind=YKHO.engine)\n return DMju()",
"def Dbxd(YKHO):\n cuiw = i48E.orm.sessionmaker(bind=YKHO.db_engine)\n faRV = cuiw()\n return faRV",
"def cuiw(YKHO) -> 'Session':\n from sqlalchemy.orm import Session\n return Session(YKHO._instance)",
"def KfiN():\n e... | [
"0.8806586",
"0.8465929",
"0.8465362",
"0.84646034",
"0.8435048",
"0.8414641",
"0.8400429",
"0.83672935",
"0.8284893",
"0.8284893",
"0.8252355",
"0.8222578",
"0.8181498",
"0.8170009",
"0.8162468",
"0.8122264",
"0.8033007",
"0.7984771",
"0.79740113",
"0.7957282",
"0.7943422",
... | 0.73505545 | 84 |
Return a SQLAlchemy sessionmaker using the given engine. | def ZZtq(eHpk, kvdF=True, _Xcb=False):
return i48E.orm.sessionmaker(bind=eHpk, autocommit=kvdF, expire_on_commit=_Xcb) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gte4(Emd4, eHpk):\n DMju = FJ3D(bind=eHpk)\n cuiw = DMju()\n return cuiw",
"def ZZtq(eHpk, kvdF=True, _Xcb=False):\n return i48E.orm.sessionmaker(bind=eHpk, class_=DMju, autocommit=kvdF, expire_on_commit=_Xcb, query_cls=_aLO)",
"def ZZtq(eHpk, kvdF=True, _Xcb=False):\n return i48E.orm.sessio... | [
"0.8042724",
"0.8006925",
"0.8006925",
"0.77924764",
"0.76757944",
"0.76757944",
"0.7623973",
"0.74602205",
"0.73864037",
"0.7312882",
"0.7303517",
"0.7268856",
"0.7265324",
"0.72063035",
"0.7189026",
"0.71827",
"0.7141616",
"0.7115279",
"0.7113877",
"0.70989406",
"0.7086707"... | 0.7981681 | 3 |
Get info regarding a single input asset. | def v0Aw(R6j4: hug.types.text, rJDA: hug.types.text, QePW, umXl=5):
if gBFe(rJDA) == True:
Ng_r(QePW, 'get_asset')
try:
mH0p = dv6U(R6j4, full=True)
except:
return {'valid_asset': False, 'valid_key': True, 'took': float(umXl)}
try:
uwwY = mH0p['bit... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def J5Dc(YKHO, IbHI: str) -> AOQ4:\n if IbHI not in YKHO.assets:\n raise Rdn6(f'{IbHI} is not valid')\n d6pt = YKHO.assets.index(IbHI)\n return AOQ4(url=YKHO.files[d6pt])",
"def Q52M():\n gfDP = ARmh('asset_info', QePW.args, ['type'])\n if not gfDP.get('success'):\n return gfDP.get('... | [
"0.74303204",
"0.7419024",
"0.6760976",
"0.6732142",
"0.6622393",
"0.65898216",
"0.653671",
"0.6513181",
"0.65111864",
"0.64433056",
"0.6420995",
"0.63753945",
"0.63254505",
"0.63204575",
"0.609694",
"0.6022546",
"0.6020262",
"0.59801286",
"0.5953822",
"0.59366584",
"0.589579... | 0.64853656 | 9 |
Bitshares current chain network! | def XHTY(rJDA: hug.types.text, QePW, umXl=5):
if gBFe(rJDA) == True:
Ng_r(QePW, 'get_network')
eNCK = pNHx()
xboH = eNCK.get_network()
return {'get_network': xboH, 'valid_key': True, 'took': float(umXl)}
else:
return {'valid_key': False, 'took': float(umXl)} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qGac(YKHO):\n return YKHO.__network",
"def pkHe(YKHO):\n if YKHO.network != None:\n return YKHO.network\n pB3N = {'secret': YKHO.secret}\n Mkmy = Zvjk.post(YKHO.getUrl('/api/v1/resources/network'), json=pB3N)\n YKHO.network = Mkmy.json()\n return YKHO.network",
"def eVVj(YKHO) -> s... | [
"0.66051096",
"0.65913534",
"0.62874806",
"0.62874806",
"0.62874806",
"0.62874806",
"0.62874806",
"0.62874806",
"0.62821406",
"0.62681496",
"0.6265552",
"0.62349313",
"0.6210686",
"0.6157755",
"0.61000574",
"0.6091669",
"0.6064199",
"0.60326165",
"0.59947836",
"0.59931105",
"... | 0.0 | -1 |
Renders the home page. | def kZiy(QePW):
import twilio.rest
return jnRN({'text': 'hi'}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kZiy():\n return TvZl('home.html')",
"def C_QL():\n return TvZl('home.html')",
"def kZiy():\n return TvZl('homepage.html')",
"def kZiy():\n return TvZl('home.html')",
"def kZiy():\n return TvZl('home.html')",
"def kZiy():\n return TvZl('pages/home.html')",
"def kZiy():\n leAC =... | [
"0.86085397",
"0.85661966",
"0.8562984",
"0.84564984",
"0.8353822",
"0.8353445",
"0.832796",
"0.83265287",
"0.83265287",
"0.8311966",
"0.83088946",
"0.83046836",
"0.8296962",
"0.82942903",
"0.82942903",
"0.82872546",
"0.8279762",
"0.8279762",
"0.8279762",
"0.8279762",
"0.8279... | 0.0 | -1 |
Renders the contact page. | def Mxk0(QePW):
assert isinstance(QePW, eu5F)
return _1tc(QePW, 'app/contact.html', context_instance=K1Ja(QePW, {'title': 'Contact', 'message': 'Your contact page.', 'year': qcWV.now().year})) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Mxk0():\n bo34.info('User visited the contact page.')\n return TvZl('contact.html')",
"def Mxk0():\n return TvZl('contact.html')",
"def Mxk0():\n return TvZl('contact.html')",
"def Mxk0():\n return TvZl('contact.html')",
"def Mxk0():\n return TvZl('contact.html')",
"def Mxk0():\n ... | [
"0.85942996",
"0.856412",
"0.856412",
"0.8553042",
"0.84771496",
"0.84180754",
"0.84098697",
"0.8347894",
"0.8342256",
"0.8328687",
"0.82468224",
"0.82289207",
"0.81830716",
"0.81830716",
"0.81830716",
"0.81830716",
"0.81830716",
"0.81830716",
"0.81830716",
"0.81830716",
"0.8... | 0.7771424 | 45 |
Returns dict of indexes for training set. | def c7ni(qzWu, K_if=10000):
uq_u = {}
for YRbF in range(K_if):
C9gx = tuKI.randint(0, qzWu)
while C9gx in uq_u:
C9gx = tuKI.randint(0, qzWu)
uq_u[C9gx] = None
return uq_u | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lLmy(YKHO):\n return YKHO._train_indices",
"def bS0K(YKHO) -> cuzp[str, tTFA]:\n return YKHO._indexes",
"def sGKF(YKHO):\n Pgby = oyIN.arange(0, YKHO._n_train)\n yU5a = oyIN.arange(YKHO._n_train, YKHO._n_samples)\n if YKHO.settings.shuffle_train:\n oyIN.random.shuffle(Pgby)\n if YK... | [
"0.77528423",
"0.73002416",
"0.7145277",
"0.695218",
"0.690648",
"0.684882",
"0.6828434",
"0.67956775",
"0.67937523",
"0.6757686",
"0.6748526",
"0.67446554",
"0.66891474",
"0.66886836",
"0.6687683",
"0.66753274",
"0.6670931",
"0.66677135",
"0.66615415",
"0.66602683",
"0.66071... | 0.0 | -1 |
Return a dict whose structure aligns to the GeoJSON format For more information about the ``__geo_interface__``, see | def m4pn(YKHO):
return YKHO.data | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c9Ge(FwMw: dict) -> dict:\n jNOo = t95U(FwMw['coordinates'], 'geojson')\n return {'type': FwMw['type'], 'coordinates': jNOo}",
"def Mk8n(YKHO) -> dict:\n TuoA = {'type': 'FeatureCollection', 'features': []}\n aTNe = YKHO.polygon\n for fvDH in aTNe.columns:\n mEdp = aTNe[fvDH].dtype.name... | [
"0.74888676",
"0.74228734",
"0.73437715",
"0.72595733",
"0.718903",
"0.716904",
"0.70189756",
"0.700656",
"0.6950271",
"0.6783079",
"0.6746335",
"0.6652255",
"0.66516024",
"0.66064966",
"0.6575245",
"0.6549351",
"0.6529703",
"0.6490904",
"0.6451033",
"0.6447575",
"0.6432029",... | 0.6344875 | 23 |
Return a dict whose structure aligns to the GeoJSON format For more information about the ``__geo_interface__``, see | def m4pn(YKHO):
return YKHO.geo_dataframe.__geo_interface__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c9Ge(FwMw: dict) -> dict:\n jNOo = t95U(FwMw['coordinates'], 'geojson')\n return {'type': FwMw['type'], 'coordinates': jNOo}",
"def Mk8n(YKHO) -> dict:\n TuoA = {'type': 'FeatureCollection', 'features': []}\n aTNe = YKHO.polygon\n for fvDH in aTNe.columns:\n mEdp = aTNe[fvDH].dtype.name... | [
"0.7487104",
"0.74242",
"0.7343544",
"0.7261053",
"0.71901834",
"0.716986",
"0.7016883",
"0.7007764",
"0.69514287",
"0.6783995",
"0.67466277",
"0.6652666",
"0.66523314",
"0.6607595",
"0.6576386",
"0.6550176",
"0.65295124",
"0.6491108",
"0.64488786",
"0.6447882",
"0.64309007",... | 0.0 | -1 |
Testing that all home named views returns HTTP 200 and the right template. | def r6eW(YKHO):
geh0 = YKHO.client.get(gxEw('home'))
YKHO.assertEqual(geh0.status_code, 200)
YKHO.assertTemplateUsed(geh0, 'food/home.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SzHg(YKHO):\n QePW = b9AL().get('/')\n tTee = lDWI.as_view(template_name='home.html')\n geh0 = tTee(QePW)\n YKHO.assertTrue(geh0.status_code == 200)",
"def yKPq(YKHO):\n geh0 = YKHO.client.get('/index/')\n YKHO.assertEqual(geh0.status_code, 200)\n YKHO.assertTemplateUsed(geh0, 'food/home... | [
"0.8331919",
"0.8227531",
"0.8175511",
"0.815678",
"0.80555",
"0.805365",
"0.803744",
"0.80280364",
"0.8013857",
"0.7984682",
"0.7982593",
"0.79812753",
"0.79452354",
"0.79347306",
"0.7921903",
"0.7812283",
"0.777808",
"0.7776083",
"0.77611715",
"0.7737873",
"0.7730226",
"0... | 0.8030687 | 7 |
Testing that typing '/' returns HTTP 200 and the right template. | def IBfw(YKHO):
geh0 = YKHO.client.get('/')
YKHO.assertEqual(geh0.status_code, 200)
YKHO.assertTemplateUsed(geh0, 'food/home.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hDnz(YKHO):\n geh0 = YKHO.app.get('/', content_type='html/text')\n YKHO.assertEqual(geh0.status_code, 302)",
"def a32l():\n assert '200 OK' == wk5E.test_client().get('/').status",
"def hDnz(YKHO):\n geh0 = YKHO.app.get('/', content_type='html/text')\n assert geh0.status_code == 200",
"def ... | [
"0.7729871",
"0.76408017",
"0.7637151",
"0.7547143",
"0.7472691",
"0.7457712",
"0.74404967",
"0.7434138",
"0.7431209",
"0.7401191",
"0.73978084",
"0.73978084",
"0.73978084",
"0.7397218",
"0.739273",
"0.738407",
"0.73829675",
"0.73826325",
"0.73612773",
"0.7355783",
"0.7355091... | 0.7167556 | 42 |
Testing that typing '/index/' returns HTTP 200 and the right template. | def yKPq(YKHO):
geh0 = YKHO.client.get('/index/')
YKHO.assertEqual(geh0.status_code, 200)
YKHO.assertTemplateUsed(geh0, 'food/home.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _5ua(YKHO):\n B2Dn = YKHO.client.get('/')\n YKHO.assertEqual(B2Dn.status_code, 200)\n YKHO.assertTemplateUsed(B2Dn, 'index.html')",
"def hDnz(YKHO):\n I78j = P4t4.test_client(YKHO)\n geh0 = I78j.get('/', content_type='html/text')\n YKHO.assertEqual(geh0.status_code, 200)\n print('test_in... | [
"0.85237145",
"0.85015935",
"0.8417535",
"0.8413871",
"0.8374631",
"0.8352153",
"0.83516353",
"0.83444077",
"0.83161527",
"0.8298979",
"0.82778627",
"0.8260705",
"0.82567817",
"0.81989694",
"0.8160226",
"0.81562674",
"0.814153",
"0.81086373",
"0.8107231",
"0.8099813",
"0.8092... | 0.7631395 | 48 |
Testing that typing '/home/' returns HTTP 200 and the right template. | def qqay(YKHO):
geh0 = YKHO.client.get('/home/')
YKHO.assertEqual(geh0.status_code, 200)
YKHO.assertTemplateUsed(geh0, 'food/home.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _adC(YKHO):\n YKHO.check_html('/', 'home.html', '200')",
"def nbwb(YKHO):\n geh0 = YKHO.client.get(YKHO.home_url)\n YKHO.assertEquals(geh0.status_code, 200)\n YKHO.assertTemplateUsed(geh0, 'home.html')",
"def GvGQ(YKHO):\n geh0 = YKHO.client.get('/')\n YKHO.assert200(geh0)\n YKHO.asser... | [
"0.85540456",
"0.8314718",
"0.82382894",
"0.82078725",
"0.81097674",
"0.8050615",
"0.79889476",
"0.7984347",
"0.798138",
"0.7944147",
"0.7935577",
"0.791534",
"0.7908283",
"0.79007494",
"0.786598",
"0.78603107",
"0.7849446",
"0.7840007",
"0.7830926",
"0.7818916",
"0.7802746",... | 0.7921078 | 11 |
Testing that typing '/imprint/' returns HTTP 200 and the right template. | def Skhd(YKHO):
geh0 = YKHO.client.get(gxEw('imprint'))
YKHO.assertEqual(geh0.status_code, 200)
YKHO.assertTemplateUsed(geh0, 'food/imprint.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Sr0j(QePW):\n return pb0k('imprint.html')",
"def Sr0j(QePW):\n return {'USE_IMPRINT': gCuF.USE_IMPRINT}",
"def t7CR(YKHO):\n _hkX = YKHO.get_response('ontask-api-doc')\n _hkX.render()\n YKHO.assertTrue(jGRS.is_success(_hkX.status_code))\n YKHO.assertIn('OnTask API', str(_hkX.content))",
... | [
"0.71898156",
"0.5983388",
"0.5961958",
"0.5901756",
"0.5889261",
"0.58550054",
"0.58237857",
"0.58134854",
"0.58121467",
"0.580385",
"0.580385",
"0.5780257",
"0.5778135",
"0.5728149",
"0.5717258",
"0.5694406",
"0.5685661",
"0.5685137",
"0.56535614",
"0.5642162",
"0.5639544",... | 0.8161284 | 0 |
Posting an invalid form from the Sign In page that must return HTTP 200 and stay in the same page with the right template. The user mustn't be registred into the database. | def Ixb3(YKHO):
geh0 = YKHO.client.post(gxEw('register'), {'username': 'blabla', 'email': 'blablaagain', 'password': 'moreblabla'})
YKHO.assertEqual(geh0.status_code, 200)
YKHO.assertTemplateUsed(geh0, 'food/account/register.html')
YKHO.assertFalse(mv1M.objects.filter(username=YKHO.username, email=YKHO.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Bak1(QePW):\n if QePW.method == 'POST':\n return vKnz('/healthnet/Login')\n return _1tc(QePW, 'healthnet/invalid_login.html')",
"def ee9W(YKHO, L03z):\n return YKHO.render_to_response(YKHO.get_context_data())",
"def ee9W(YKHO, L03z):\n BYM_ = mv1M.objects.filter(email=L03z.cleaned_data.g... | [
"0.731741",
"0.7064344",
"0.70041347",
"0.69654775",
"0.69316286",
"0.6889413",
"0.6878845",
"0.6878845",
"0.6878845",
"0.6878845",
"0.6878845",
"0.6878845",
"0.6878845",
"0.68671125",
"0.6825931",
"0.6783444",
"0.6783444",
"0.6756157",
"0.67309415",
"0.67300797",
"0.67018193... | 0.0 | -1 |
Posting an invalid form from the Sign In page that must return HTTP 200 and stay in the same page with the right template. | def eB4i(YKHO):
geh0 = YKHO.client.post(gxEw('signin'), {'username': 'blabla', 'password': 'moreblabla'})
YKHO.assertEqual(geh0.status_code, 200)
YKHO.assertTemplateUsed(geh0, 'food/account/signin.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Bak1(QePW):\n if QePW.method == 'POST':\n return vKnz('/healthnet/Login')\n return _1tc(QePW, 'healthnet/invalid_login.html')",
"def ee9W(YKHO, L03z):\n return YKHO.render_to_response(YKHO.get_context_data())",
"def ee9W(YKHO, L03z, yT3u):\n MxLp = YKHO.get_context_data(form=L03z, additi... | [
"0.7192418",
"0.70670426",
"0.7002663",
"0.69586504",
"0.69452095",
"0.69281125",
"0.690346",
"0.690346",
"0.690346",
"0.690346",
"0.690346",
"0.690346",
"0.690346",
"0.68373233",
"0.68373233",
"0.67473346",
"0.67466843",
"0.6726807",
"0.6724467",
"0.6685106",
"0.66736215",
... | 0.6601531 | 26 |
Accessing the foodcategories page while the user category choice is valid. This must return HTTP 200 and the right template. | def hh7M(YKHO):
YKHO.client.login(username=YKHO.username, password=YKHO.password)
geh0 = YKHO.client.get(gxEw('categories'), {'category': 'Pâtes à tartiner'})
YKHO.assertEqual(geh0.status_code, 200)
YKHO.assertTemplateUsed(geh0, 'food/foodcategories.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ghho():\n cuiw = GhOX()\n LeZt = cuiw.query(qZuN).order_by(MqDc(qZuN.name)).all()\n cuiw.close()\n if 'username' not in sGQh:\n return TvZl('publicmenucategories.html', categories=LeZt)\n else:\n return TvZl('menucategories.html', categories=LeZt)",
"def p1Zd(YKHO):\n geh0 = Y... | [
"0.64526546",
"0.63973683",
"0.6318444",
"0.62943894",
"0.6245777",
"0.62195414",
"0.6212312",
"0.61576605",
"0.6154116",
"0.6153329",
"0.615257",
"0.6147533",
"0.61338395",
"0.61112416",
"0.61081463",
"0.60992813",
"0.60521275",
"0.60519356",
"0.6045127",
"0.60429037",
"0.60... | 0.74664575 | 0 |
Posting a valid email (present into the database) from the Password Reset page that must send the confirmation email to the user and redirect to the Password Rest Done page. | def eTbz(YKHO):
geh0 = YKHO.client.post(gxEw('password_reset'), {'email': YKHO.email})
YKHO.assertRedirects(geh0, '/account/password_reset_done/')
YKHO.assertTemplateUsed(geh0, 'food/account/password_reset_email.html', 'food/account/password_reset_subject.txt')
YKHO.assertEqual(len(cpYK.outbox), 1)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VQhW():\n L03z = LpL3()\n if L03z.validate_on_submit():\n CBIr = mv1M.get(email=L03z.email.data)\n if CBIr:\n mf8u(CBIr)\n Dwep('Check your email for the instructions to reset your password')\n return vKnz(nKyW('auth.login'))\n else:\n Dwep... | [
"0.7638805",
"0.76282555",
"0.7544166",
"0.7523788",
"0.7443607",
"0.74359274",
"0.7431252",
"0.740318",
"0.7388038",
"0.736677",
"0.7345643",
"0.7337029",
"0.73115623",
"0.72805065",
"0.7253547",
"0.72443694",
"0.7231815",
"0.7223744",
"0.72208244",
"0.72041774",
"0.718183",... | 0.7139116 | 24 |
Posting an invalid email (not present into the database) from the Password Reset page that mustn't send the confirmation email to the user. | def Ifg8(YKHO):
geh0 = YKHO.client.post(gxEw('password_reset'), {'email': 'not_a_valid_email'})
YKHO.assertEqual(geh0.status_code, 200)
YKHO.assertTemplateUsed(geh0, 'food/account/password_reset.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def deqn(YKHO):\n geh0 = YKHO.client.post(gxEw('password-reset'), data={'email': 'different@example.com'})\n YKHO.assertEqual(302, geh0.status_code)\n YKHO.assertEqual(len(cpYK.outbox), 0)",
"def xqsM(YKHO):\n with YKHO.client as Z9rn:\n with cpYK.record_messages() as bybv:\n Z9rn.p... | [
"0.74728614",
"0.714756",
"0.71470433",
"0.7117676",
"0.7100604",
"0.7099543",
"0.7096892",
"0.7009996",
"0.700423",
"0.6980387",
"0.6979143",
"0.6955801",
"0.6889999",
"0.6888745",
"0.6887334",
"0.6864369",
"0.68609375",
"0.68541336",
"0.68538576",
"0.6851166",
"0.68500155",... | 0.75521475 | 0 |
Posting an invalid new password (invalid syntax or new password different from the one entered as a confirmation new password) from the Password Reset Confirm page that must render the same page and not update the password. | def Dw71(YKHO):
geh0 = YKHO.client.post(gxEw('password_reset'), {'email': YKHO.email})
eOtH = geh0.context[0]['token']
PObu = geh0.context[0]['uid']
geh0 = YKHO.client.get(gxEw('password_reset_confirm', kwargs={'token': eOtH, 'uidb64': PObu}))
geh0 = YKHO.client.post(geh0['Location'], {'new_password... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LW_m():\n P4t4.logger.debug('User password reset confirmation')\n zBBK = {'csrf_enabled': False}\n if QePW.method == 'GET':\n if QePW.values.get('login'):\n zBBK.update({'login': QePW.values.get('login')})\n if QePW.values.get('resetcode'):\n zBBK.update({'resetcode... | [
"0.76201814",
"0.7209887",
"0.7168972",
"0.7120091",
"0.7117066",
"0.7101205",
"0.70979494",
"0.70742464",
"0.7071688",
"0.70346797",
"0.7034405",
"0.69826615",
"0.6982484",
"0.69793886",
"0.6959274",
"0.6957928",
"0.6932505",
"0.6930871",
"0.6903262",
"0.6899968",
"0.689449"... | 0.7708471 | 0 |
Create a OspfInterface object given a response_data related to the OSPF Area ID object | def qN71(Emd4, cuiw, sdEl, Bv0m):
p4s7 = cuiw.api.get_keys(Bv0m, Emd4.resource_uri_name)
GxvM = p4s7[0]
return Emd4(cuiw, GxvM, sdEl) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qN71(Emd4, cuiw, b7xU, Bv0m):\n rQY2 = cuiw.api.get_keys(Bv0m, kIW8.resource_uri_name)\n atEq = rQY2[0]\n return kIW8(cuiw, atEq, b7xU)",
"def qN71(Emd4, cuiw, sdEl, Bv0m):\n p4s7 = cuiw.api.get_keys(Bv0m, Emd4.resource_uri_name)\n GxvM = p4s7[0]\n return Emd4(cuiw, GxvM, sdEl)",
"def eLp... | [
"0.730029",
"0.7046275",
"0.5957305",
"0.5545271",
"0.54944235",
"0.5474209",
"0.5415211",
"0.5187035",
"0.5136154",
"0.5110607",
"0.5069292",
"0.5023858",
"0.50202143",
"0.49755788",
"0.4946038",
"0.49014652",
"0.48997793",
"0.48937252",
"0.48802933",
"0.48385063",
"0.482820... | 0.7046049 | 2 |
Get the project of this generation. | def bNKA(YKHO) -> 'prjmod.Project':
return YKHO.release.project | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ITTn(YKHO):\n return YKHO.project",
"def bNKA(YKHO):\n return YKHO._project",
"def bNKA(YKHO):\n return YKHO._project",
"def bNKA(YKHO):\n return YKHO._project",
"def bNKA(YKHO):\n return YKHO._project",
"def YsXL(YKHO):\n return oPx1(YKHO.project_id)",
"def bNKA(YKHO):\n retur... | [
"0.84618485",
"0.8259442",
"0.8259442",
"0.8259442",
"0.8259442",
"0.8191932",
"0.81574553",
"0.813717",
"0.813717",
"0.81156266",
"0.8038193",
"0.80132",
"0.8007799",
"0.8005903",
"0.8005903",
"0.8005903",
"0.8005903",
"0.8005903",
"0.8005903",
"0.8005903",
"0.8005903",
"0... | 0.8400614 | 1 |
Return the first entry in `time_map` whose time range contains `time`. `time_map` should be a value returend by `time_map_for`. `time` should be an arrow. Return none if no such range exists. | def sUeZ(az_v, ITS7):
if len(az_v) == 0:
return None
Aofo = az_v[0][1]
for (yKcO, Os4s), BWXx in az_v:
if yKcO <= ITS7 and (Os4s is None or Os4s > ITS7):
Aofo = BWXx
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sxQS(URCJ, ITS7):\n try:\n it6R = None\n for YRbF in range(0, len(ITS7)):\n if URCJ <= ITS7[YRbF]:\n it6R = YRbF\n break\n return it6R\n except:\n print('Error finding time index, ensure time bound input as string %Y-%d-%m %H:%M:%S')",
... | [
"0.61280376",
"0.60600543",
"0.60369205",
"0.59861404",
"0.58641964",
"0.5836464",
"0.56983924",
"0.5693946",
"0.5625168",
"0.56127864",
"0.56064236",
"0.5602167",
"0.55482185",
"0.5536283",
"0.55163765",
"0.5488896",
"0.54867417",
"0.5482981",
"0.54640996",
"0.54579765",
"0.... | 0.8449184 | 0 |
Tests whether batch_norm_layers method works correctly | def b1lP():
fhcK = [['conv', 2, 4, 3, 'valid'], ['maxpool', 3, 4, 'valid'], ['linear', 5]]
Qf5f = KYEi(layers_info=fhcK, hidden_activations='relu', output_activation='relu', initialiser='xavier', batch_norm=False)
fhcK = [['conv', 2, 4, 3, 'valid'], ['maxpool', 3, 4, 'valid'], ['linear', 5]]
Qf5f = KYEi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lb4h(YKHO):\n with QpfX.eager_mode():\n Ep8u = 10\n ROaS = 5\n input = oyIN.random.rand(Ep8u, ROaS).astype(oyIN.float32)\n gEmA = fhcK.BatchNorm()\n Aofo = gEmA(input)\n assert Aofo.shape == (Ep8u, ROaS)\n assert len(gEmA.variables) == 4",
"def PznR():\n ... | [
"0.79440343",
"0.7525769",
"0.73636144",
"0.7243912",
"0.71971804",
"0.71961087",
"0.7073871",
"0.70667285",
"0.704643",
"0.70372796",
"0.7030532",
"0.69746006",
"0.69519454",
"0.6931186",
"0.6918349",
"0.6907208",
"0.6888202",
"0.68697613",
"0.68660825",
"0.68439287",
"0.683... | 0.8139342 | 0 |
Helper method that filters the alarms depending on alarm and event filters. > Filter dependinf on alarms related filters > load events details > Filter depending on event related filters Returns a AlarmsManager | def b_xr(YKHO, SNex, fHUa, Evnb=False):
SNex = EuF3(alist=[jzdc for jzdc in SNex if YKHO._alarm_match(jzdc)])
if not Evnb:
RKD7.info('Getting alarms infos... Please be patient.')
Lp5E = YKHO.perform(fLep.load_details, list(SNex), asynch=True, progress=True, workers=fHUa)
SNex = EuF3(alis... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mUVL(YKHO, Wp7L=None, Tsue=None, qoqK=None):\n return YKHO._retrieve_data(Wp7L, Tsue, qoqK, FYrf.Alarm)",
"def mUVL(YKHO, Wp7L=None, Tsue=None, qoqK=None):\n return YKHO._retrieve_data(Wp7L, Tsue, qoqK, FYrf.Alarm)",
"def k66M(YKHO):\n SNex = oZou.objects.filter(T8ck(user__in=[YKHO.request.user]) ... | [
"0.6449215",
"0.6449215",
"0.62968737",
"0.61054146",
"0.60514313",
"0.60411114",
"0.60103893",
"0.58144987",
"0.57351625",
"0.57206887",
"0.5691227",
"0.55908304",
"0.5584803",
"0.55795366",
"0.55477",
"0.55458385",
"0.5521151",
"0.5520905",
"0.5520905",
"0.55206555",
"0.549... | 0.7320952 | 0 |
Adding an attentional interface for model interpretability. | def p13W(YKHO):
print('==> Building the attentional interface:')
vPBo = YKHO.FLAGS
Ep8u = vPBo.batch_size
wjbX = vPBo.hidden_size
cAGH = vPBo.max_input_length
NTHD = ZylS.to_int32(oyIN.array(range(Ep8u)))
with ZylS.variable_scope('attention') as IgmK:
print('\t attention:')
o... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lZSa(YKHO, E04P: str=None, YCHw: List[int]=None, YYiC: bool=True, begE: torch.device=None):\n if YCHw:\n YCHw = list(YCHw)\n else:\n YCHw = YKHO.att_context_size\n if E04P is None:\n E04P = YKHO.self_attention_model\n if E04P == 'rel_pos_local_attn' and max(YCHw) <= 0:\n ... | [
"0.60573506",
"0.5854277",
"0.58524895",
"0.5851993",
"0.5834257",
"0.58210814",
"0.58161265",
"0.579887",
"0.5784791",
"0.5693141",
"0.5671398",
"0.56522197",
"0.5648175",
"0.5647009",
"0.5646177",
"0.5644208",
"0.5617273",
"0.5610883",
"0.5597077",
"0.5594036",
"0.5589717",... | 0.67020684 | 0 |
Applying a softmax on output of encoder. | def Ftq6(YKHO):
print('==> Building the decoder:')
with ZylS.variable_scope('softmax'):
print('\t Softmax:')
YKHO._logits = W5mC(args=YKHO._c, output_size=YKHO.FLAGS.num_classes, bias=True, bias_start=0.0, nonlinearity='relu', name='softmax_op')
YKHO._probabilities = ZylS.nn.softmax(logi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N93T(UnuI):\n return Zxt2.special.softmax(UnuI)",
"def N93T(YKHO):\n return ZylS.nn.softmax(YKHO.output)",
"def N93T(WKvO):\n return oyIN.exp(WKvO) / oyIN.sum(oyIN.exp(WKvO), axis=0)",
"def N93T(YKHO, input):\n yvT9 = []\n for VXjJ in oyIN.transpose(input):\n yvT9.append(oyIN.exp(VX... | [
"0.799914",
"0.79841536",
"0.7922655",
"0.7919538",
"0.7896416",
"0.78576815",
"0.78485805",
"0.7795053",
"0.7784192",
"0.7768338",
"0.77637136",
"0.77576405",
"0.77527195",
"0.7749281",
"0.77331257",
"0.7729498",
"0.7724309",
"0.7720938",
"0.7720095",
"0.7720095",
"0.7720095... | 0.0 | -1 |
Constructor initializes a message instance from the info_list list self._id = int(info_list[0]) self._user = info_list[1] self._creationdate = info_list[2] self._lastmodified = info_list[3] self._category = info_list[4] self._content = info_list[5] self._precededby = info_list[6] self._succeededby = info_list[7] self._... | def FIMM(YKHO, p52P):
YKHO._id = int(p52P[0])
YKHO._user = p52P[1]
YKHO._creationdate = p52P[2]
YKHO._lastmodified = p52P[3]
YKHO._category = p52P[4]
YKHO._content = p52P[5]
YKHO._precededby = p52P[6]
YKHO._succeededby = p52P[7]
YKHO._active = p52P[8] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, KREW, hGN5, inK4, LOJ7, LRlk):\n YKHO.id = int(KREW)\n YKHO.content = str(hGN5)\n YKHO.author_id = int(inK4)\n YKHO.channel_id = int(LOJ7)\n YKHO.guild_id = int(LRlk)\n YKHO.is_duplicate = False\n YKHO._creation_time = qcWV.datetime.now(qcWV.timezone.utc)",
"def FIMM(YKHO, yEH... | [
"0.6896034",
"0.6415743",
"0.640886",
"0.62446547",
"0.6225059",
"0.6216317",
"0.62070554",
"0.6194556",
"0.6192528",
"0.6175381",
"0.6143839",
"0.61316955",
"0.611265",
"0.6098142",
"0.6084794",
"0.60833126",
"0.60411423",
"0.6017745",
"0.59548885",
"0.5953174",
"0.59116936"... | 0.81029373 | 0 |
getId() returns the id of the message | def mLJR(YKHO):
return YKHO._id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def id(YKHO):\n return YKHO._message['id']",
"def id(YKHO):\n return YKHO._message['id']",
"def KREW(YKHO):\n pass",
"def ynMe(YKHO):\n return YKHO.messageid",
"def KREW(YKHO) -> int:\n assert YKHO.is_set('message_id'), 'message_id is not set'\n return YWvJ(int, YKHO.get('message_id'))",
... | [
"0.85892826",
"0.85892826",
"0.8357711",
"0.8238219",
"0.7872791",
"0.7863971",
"0.78256905",
"0.7553918",
"0.7527876",
"0.7475286",
"0.74511355",
"0.7436794",
"0.7436794",
"0.72136086",
"0.71752155",
"0.7146072",
"0.71050006",
"0.70725566",
"0.70724976",
"0.6993467",
"0.6993... | 0.6884263 | 40 |
returns the next empty square in the board | def V3VF(YKHO):
for YRbF in range(len(YKHO.board)):
for r845 in range(len(YKHO.board[0])):
if YKHO.board[YRbF][r845] == 0:
return (YRbF, r845)
return (-1, -1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jyZB(eZzF):\n for rdlD in range(9):\n for fvDH in range(9):\n if eZzF[rdlD][fvDH] == 0:\n return (rdlD, fvDH)",
"def W8jM(YKHO, QTBn):\n return QTBn.index(0)",
"def Qvfq(eZzF):\n for Mkmy in range(9):\n for Z9rn in range(9):\n if eZzF[Mkmy][Z9rn] ... | [
"0.7657247",
"0.7430342",
"0.7422928",
"0.7307567",
"0.72416884",
"0.70540684",
"0.70132345",
"0.6962803",
"0.6925517",
"0.69131446",
"0.6896838",
"0.68507534",
"0.6847271",
"0.68383",
"0.67892325",
"0.6782393",
"0.67627656",
"0.675565",
"0.67351997",
"0.6714051",
"0.6703253"... | 0.76298445 | 1 |
return true if the best number is inserted, false otherwise | def JPHp(YKHO, rdlD, iVRZ, XEri):
for YRbF in range(XEri + 1, 10):
YKHO.counter += 1
if YKHO.is_valid(rdlD, iVRZ, YRbF):
YKHO.board[rdlD][iVRZ] = YRbF
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rYpi(YKHO, p1kx):\n if p1kx <= YKHO.best_score:\n YKHO.best_score = p1kx\n return True\n else:\n return False",
"def iCj5(YKHO, p1kx: float) -> bool:\n if YKHO.low_is_good:\n return p1kx <= YKHO.best_score\n else:\n return p1kx >= YKHO.best_score",
"def MHMs(Y... | [
"0.6716428",
"0.6557563",
"0.6459672",
"0.640914",
"0.618412",
"0.6104807",
"0.60817146",
"0.60817146",
"0.60817146",
"0.60651815",
"0.6038211",
"0.5969529",
"0.58735627",
"0.5873485",
"0.5863332",
"0.58478993",
"0.5839581",
"0.5833252",
"0.58316714",
"0.58302903",
"0.5817852... | 0.0 | -1 |
Vectorized function to calculate the greatcircle distance between two points or between vectors of points, using haversine. | def r1qB(igSk, iT5T, TGuP, JSDM, m6kB=6371009):
upem = oyIN.deg2rad(igSk)
WMf6 = oyIN.deg2rad(TGuP)
HJJp = WMf6 - upem
snrU = oyIN.deg2rad(iT5T)
M5jx = oyIN.deg2rad(JSDM)
nGbY = M5jx - snrU
MKlR = oyIN.sin(HJJp / 2) ** 2 + oyIN.cos(upem) * oyIN.cos(WMf6) * oyIN.sin(nGbY / 2) ** 2
MKlR = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vQK9(WKvO, LVAh):\n TxAC = oyIN.radians(WKvO)\n KIiv = oyIN.radians(LVAh)\n Csk6 = KIiv - TxAC\n n_9K, H91H = Csk6.T\n ohwW = TxAC[:, 0]\n PVJf = KIiv[:, 0]\n jzdc = oyIN.sin(n_9K / 2.0) ** 2 + oyIN.cos(ohwW) * oyIN.cos(PVJf) * oyIN.sin(H91H / 2.0) ** 2\n Z9rn = 2 * oyIN.arcsin(oyIN.sqr... | [
"0.72260827",
"0.71875435",
"0.7125561",
"0.7096089",
"0.707054",
"0.70032865",
"0.6968269",
"0.6952732",
"0.69516146",
"0.6923953",
"0.69087297",
"0.6837395",
"0.6827786",
"0.68118346",
"0.6809229",
"0.68080306",
"0.68001235",
"0.6798933",
"0.6796134",
"0.6780209",
"0.675832... | 0.69880134 | 6 |
Creates and saves a User with given email, and password. | def lYUQ(YKHO, D3lj, jTXt=None, **wdCM):
if not D3lj:
raise ValueError('Users must have an email address')
CBIr = YKHO.model(email=YKHO.normalize_email(D3lj), **wdCM)
CBIr.set_password(jTXt)
CBIr.clean_fields()
CBIr.save(using=YKHO._db)
return CBIr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xWi2(YKHO, D3lj, jTXt, **wdCM):\n if not D3lj:\n raise ValueError('The email must be set')\n D3lj = YKHO.normalize_email(D3lj)\n CBIr = YKHO.model(email=D3lj, **wdCM)\n CBIr.set_password(jTXt)\n CBIr.save()",
"def lYUQ(YKHO, D3lj, jTXt, **wdCM):\n print('\\n\\nCREATING USER HERE')\n ... | [
"0.8730519",
"0.84636384",
"0.8440295",
"0.84375054",
"0.84268457",
"0.84179336",
"0.8411415",
"0.84105104",
"0.84073454",
"0.8392886",
"0.839268",
"0.83870435",
"0.83870435",
"0.83870435",
"0.8386568",
"0.83832175",
"0.83829993",
"0.83774775",
"0.83774775",
"0.8374857",
"0.8... | 0.0 | -1 |
Creates and saves a superuser with the given email, nickname and password | def Zp54(YKHO, D3lj, jTXt=None, **o2Aq):
CBIr = YKHO.create_user(D3lj, password=jTXt)
CBIr.is_staff = True
CBIr.is_superuser = True
CBIr.save(using=YKHO._db)
return CBIr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zp54(YKHO, D3lj, dP7V, jTXt):\n CBIr = YKHO.create_user(email=D3lj, nickname=dP7V, password=jTXt)\n CBIr.is_superuser = True\n CBIr.save()\n return CBIr",
"def Zp54(YKHO, D3lj, mWFP, dP7V, jTXt=None):\n CBIr = YKHO.create_user(D3lj, mWFP, dP7V, password=jTXt)\n CBIr.is_superuser = True\n ... | [
"0.82134044",
"0.8039727",
"0.79876417",
"0.7910915",
"0.78556466",
"0.7852834",
"0.78092915",
"0.7804964",
"0.77867293",
"0.77707905",
"0.77701694",
"0.7758754",
"0.7732107",
"0.7707686",
"0.7699689",
"0.76930594",
"0.7692316",
"0.7686576",
"0.7682237",
"0.76785165",
"0.7674... | 0.0 | -1 |
Generate a channel attached to this site. | def nKFu(YKHO, rRzo):
YwkQ = Xqgu.HTTPFactory.buildProtocol(YKHO, rRzo)
class MyRequest(VNUm):
ZGTD = staticmethod(YKHO.func)
YwkQ.requestFactory = e0Vk
YwkQ.site = YKHO
return YwkQ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def smRa(YKHO, **B2fa):\n return DIz8(YKHO.__bot.api(f'/guilds/{YKHO.id}/channels', 'POST', json=B2fa), YKHO.__bot)",
"async def create_channel(YKHO, WaB2):\n return await YKHO.guild_man.create_channel(YKHO, WaB2)",
"def w9EM(YKHO):\n return YKHO._channelfactory.new()",
"def O9Qc(p9bx):\n return ... | [
"0.6959676",
"0.6746858",
"0.66192585",
"0.6588044",
"0.6384902",
"0.63814986",
"0.6380637",
"0.6371103",
"0.6292213",
"0.62173647",
"0.6215584",
"0.62136906",
"0.61892205",
"0.6160958",
"0.61506826",
"0.61273104",
"0.61163944",
"0.60554296",
"0.6052546",
"0.6039083",
"0.6037... | 0.0 | -1 |
Returns the number of processes yet to be terminated. | def sDGT() -> int:
IQpm = [nVrR for nVrR in n6DK if nVrR.poll() is None]
n6DK.clear()
n6DK.extend(IQpm)
return len(kIay) + len(n6DK) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y9kr() -> int:\n return len(O0k5.pids())",
"def X9iF():\n nPrm = O0k5.process_iter()\n UHFx = sum((1 for nn5f in nPrm))\n return UHFx",
"def _KXx(YKHO):\n return len(YKHO.active_processes)",
"def lOjx(YKHO):\n HX9S = 0\n for XP5J in YKHO.__processes:\n if XP5J.is_alive():\n ... | [
"0.8255636",
"0.77685535",
"0.74010307",
"0.7371528",
"0.73017716",
"0.72218114",
"0.7189521",
"0.7162407",
"0.7040807",
"0.69511175",
"0.68489325",
"0.6811408",
"0.67852527",
"0.6762055",
"0.67155886",
"0.6695206",
"0.6613669",
"0.6606963",
"0.660539",
"0.6601625",
"0.659934... | 0.7957544 | 1 |
Method for loading a Keras model | def SP5P(YKHO, GRQx):
from pathlib import Path
if GRQx.endswith('.json'):
GRQx = GRQx + '.json'
DDri = Path(GRQx)
if DDri.is_file() == False:
print('Model not found')
else:
wM3v = open(GRQx, 'r')
jlS7 = wM3v.read()
wM3v.close()
Z_lw = oPz_(jlS7)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uyMl(pmON):\n return tMkk(pmON)",
"def wX8m(YKHO, mWFP):\n YKHO.model = bdPE.models.load_model(mWFP)",
"def O5RJ(YKHO):\n from keras.models import model_from_json\n with open(YKHO.model_file, 'r') as nUeQ:\n YKHO.model = model_from_json(nUeQ.read())\n YKHO.model.load_weights(YKHO.... | [
"0.8405567",
"0.82204264",
"0.8146327",
"0.8081073",
"0.7979532",
"0.79123366",
"0.7906671",
"0.7849847",
"0.7849111",
"0.7849111",
"0.78394616",
"0.78217",
"0.78082055",
"0.78063244",
"0.7801803",
"0.7801803",
"0.77875906",
"0.77809656",
"0.7775527",
"0.77523047",
"0.7744475... | 0.7786943 | 17 |
Create/Delete ranking like by checking if it exist. Also look if given ranking is disliked by current user. If it is, then delete this dislike | def m8z6(YKHO, QePW, *qIxc, **B2fa):
BCk_ = eHNT.get_ranking(B2fa['uuid'])
iSE4 = eHNT.get_like_if_exist(BCk_, QePW.user)
P8rW = eHNT.get_dislike_if_exist(BCk_, QePW.user)
if iSE4:
iSE4.delete()
return oGir({'STATUS': 'Ranking unliked'}, status=jGRS.HTTP_200_OK)
else:
if P8rW... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m8z6(YKHO, QePW, *qIxc, **B2fa):\n BCk_ = eHNT.get_ranking(B2fa['uuid'])\n iSE4 = eHNT.get_like_if_exist(BCk_, QePW.user)\n P8rW = eHNT.get_dislike_if_exist(BCk_, QePW.user)\n if P8rW:\n P8rW.delete()\n return oGir({'STATUS': 'Ranking dislike removed'}, status=jGRS.HTTP_200_OK)\n e... | [
"0.7911018",
"0.6635423",
"0.66330004",
"0.6630104",
"0.65995437",
"0.6580204",
"0.6452014",
"0.6409246",
"0.6394303",
"0.6358101",
"0.6356709",
"0.6340457",
"0.6311967",
"0.62217796",
"0.62084764",
"0.6179259",
"0.6162675",
"0.616248",
"0.6159849",
"0.614812",
"0.6144192",
... | 0.770009 | 1 |
Create/Delete ranking dislike by checking if it exist. Also look if given ranking is liked by current user. If it is, then delete this like | def m8z6(YKHO, QePW, *qIxc, **B2fa):
BCk_ = eHNT.get_ranking(B2fa['uuid'])
iSE4 = eHNT.get_like_if_exist(BCk_, QePW.user)
P8rW = eHNT.get_dislike_if_exist(BCk_, QePW.user)
if P8rW:
P8rW.delete()
return oGir({'STATUS': 'Ranking dislike removed'}, status=jGRS.HTTP_200_OK)
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m8z6(YKHO, QePW, *qIxc, **B2fa):\n BCk_ = eHNT.get_ranking(B2fa['uuid'])\n iSE4 = eHNT.get_like_if_exist(BCk_, QePW.user)\n P8rW = eHNT.get_dislike_if_exist(BCk_, QePW.user)\n if iSE4:\n iSE4.delete()\n return oGir({'STATUS': 'Ranking unliked'}, status=jGRS.HTTP_200_OK)\n else:\n ... | [
"0.75583315",
"0.67439705",
"0.66389704",
"0.6631326",
"0.6625018",
"0.6585293",
"0.65262693",
"0.6391564",
"0.6372665",
"0.6331022",
"0.63283485",
"0.6301901",
"0.6301795",
"0.6299415",
"0.62716496",
"0.62535655",
"0.62456596",
"0.6230477",
"0.62237406",
"0.61968046",
"0.619... | 0.7767191 | 0 |
Convert an integer list to string. | def Vn7Z(a1PO):
a1PO = oyIN.setdiff1d(a1PO, oyIN.array([2]))
ATUZ = ''.join(map(str, a1PO))
return None if len(ATUZ) == 0 else CQf_.index(ATUZ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def O3te(aqea):\n pass",
"def u5dL(IqQl):\n pwKa = ' '.join((str(YRbF) for YRbF in IqQl))\n return pwKa",
"def hrsK(yv6U: list[int]) -> str:\n return bytearray(yv6U).decode('utf-8')",
"def u5dL(PVOR):\n hnjo = [bytes([Z9rn]) for Z9rn in PVOR]\n return ''.join([Z9rn.decode() for Z9rn in hnjo... | [
"0.89995605",
"0.8465066",
"0.82654554",
"0.82154113",
"0.8102573",
"0.77958703",
"0.7629063",
"0.7609556",
"0.7472408",
"0.72896206",
"0.7285076",
"0.7211326",
"0.7179852",
"0.7129594",
"0.7125277",
"0.707933",
"0.6980794",
"0.6963402",
"0.69498414",
"0.6933189",
"0.68851906... | 0.0 | -1 |
Return biasadjusted data. Refer to the class documentation for the algorithm details. | def xrkC(YKHO, sg14: DataArray, *qIxc, **B2fa):
ygov = B2fa.pop('skip_input_checks', False)
if not ygov:
(sg14, *qIxc), bGrB = YKHO._harmonize_units(sg14, *qIxc, target=YKHO.train_units)
if 'group' in YKHO:
YKHO._check_inputs(sg14, *qIxc, group=YKHO.group)
sg14 = p2gS(sg14, Y... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sfCs(YKHO):\n qLCZ = oyIN.zeros((3, 1))\n edpk = oyIN.zeros((3, 1))\n for YRbF in range(Q_OZ):\n YAq3, eNZr, JRYC = YKHO.get_measurement()\n qLCZ = oyIN.add(qLCZ, YAq3)\n edpk = oyIN.add(edpk, eNZr)\n YKHO.acc_bias = oyIN.divide(qLCZ, Q_OZ)\n YKHO.gyr_bias = oyIN.divide(edpk... | [
"0.73132753",
"0.7042789",
"0.68339366",
"0.6758021",
"0.6758021",
"0.6679732",
"0.6598081",
"0.65581185",
"0.6513228",
"0.6472504",
"0.64571756",
"0.6435381",
"0.6321376",
"0.63167363",
"0.6289942",
"0.6286029",
"0.6178313",
"0.6161514",
"0.6158407",
"0.6156729",
"0.6146383"... | 0.0 | -1 |
r"""Return biasadjusted data. Refer to the class documentation for the algorithm details. | def xrkC(Emd4, bf9h: xr.DataArray, QzFq: xr.DataArray, sg14: xr.DataArray, **B2fa):
B2fa = Pnm4(Emd4._adjust, B2fa)
ygov = B2fa.pop('skip_input_checks', False)
if not ygov:
if 'group' in B2fa:
Emd4._check_inputs(bf9h, QzFq, sg14, group=B2fa['group'])
(bf9h, QzFq, sg14), bGrB = Em... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sfCs(YKHO):\n qLCZ = oyIN.zeros((3, 1))\n edpk = oyIN.zeros((3, 1))\n for YRbF in range(Q_OZ):\n YAq3, eNZr, JRYC = YKHO.get_measurement()\n qLCZ = oyIN.add(qLCZ, YAq3)\n edpk = oyIN.add(edpk, eNZr)\n YKHO.acc_bias = oyIN.divide(qLCZ, Q_OZ)\n YKHO.gyr_bias = oyIN.divide(edpk... | [
"0.7296235",
"0.70395327",
"0.67438996",
"0.6660267",
"0.66411674",
"0.66411674",
"0.6526236",
"0.6494224",
"0.64598465",
"0.64550596",
"0.63407093",
"0.6304487",
"0.62849104",
"0.62652427",
"0.6264528",
"0.6178166",
"0.61678785",
"0.615507",
"0.61409754",
"0.6139848",
"0.608... | 0.0 | -1 |
merge two dicts; create a list when multiple (different) values exist | def XxkH(jzdc, Fg_i):
myOL = set()
for bcbu, EKeu in jzdc.iteritems():
myOL.add('%s\\\\\\%s' % (bcbu, qQXR.dumps(EKeu)))
qkzY = set()
for CdMZ, ETK8 in Fg_i.iteritems():
qkzY.add('%s\\\\\\%s' % (CdMZ, qQXR.dumps(ETK8)))
t0nK = list(myOL.union(qkzY))
mb5F = {}
for UShr in t0nK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MbU_(WbPA, S69B):\n BdN0 = {}\n for G1Hx, Ty9i in WbPA.items() + S69B.items():\n if BdN0.has_key(G1Hx):\n if type(Ty9i) == type([]):\n BdN0[G1Hx].extend(Ty9i)\n else:\n BdN0[G1Hx].append(Ty9i)\n elif type(Ty9i) == type([]):\n Bd... | [
"0.747831",
"0.7320195",
"0.7176975",
"0.71756417",
"0.70927733",
"0.7072291",
"0.70632577",
"0.705998",
"0.70561546",
"0.7007153",
"0.6983172",
"0.6950843",
"0.68531865",
"0.6837808",
"0.68343014",
"0.6833681",
"0.6830994",
"0.68259114",
"0.68041945",
"0.6789075",
"0.6789075... | 0.63594675 | 89 |
Returns the number of states in the automaton. | def FJYB(YKHO):
return len(YKHO.states) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _omM(YKHO):\n return YKHO.states.shape[0]",
"def _omM(YKHO):\n return len(YKHO.rmatrix)",
"def ogIf(YKHO):\n return (YKHO.n_features + 1) ** 1",
"def ogIf(YKHO):\n return YKHO.n_features",
"def YJY3(YKHO):\n return YKHO.t_matrix.shape[0]",
"def XPaw(YKHO):\n YKHO.n_states = 1\n f... | [
"0.824957",
"0.81185734",
"0.8099005",
"0.79823136",
"0.7946546",
"0.7872734",
"0.78542453",
"0.7815391",
"0.76060224",
"0.7581793",
"0.7574884",
"0.75702775",
"0.7500967",
"0.74533254",
"0.74248576",
"0.7408679",
"0.7405803",
"0.7395314",
"0.7318936",
"0.728418",
"0.7212791"... | 0.8536939 | 0 |
Adds an edge to the set of edges. Note that the set of edges is (from_state) > list((condition, to_state)). If the states are not in the set of states, they are added. | def rz7z(YKHO, qmsz, mwFB, iPqd):
if qmsz not in YKHO.edges:
YKHO.add_state(qmsz)
if mwFB not in YKHO.edges:
YKHO.add_state(mwFB)
XEri = cay1(tuple(sorted(iPqd)))
YKHO.edges[qmsz].append((XEri, mwFB))
YKHO.distance_matrix = None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F1KG(YKHO, MxXY, cWFu, hQHm, jlSq, UXqs):\n assert MxXY in YKHO.states\n assert type(hQHm) is SnBA.IntType\n assert type(jlSq) is SnBA.IntType\n YKHO.states[MxXY].append((UXqs, hQHm, jlSq, cWFu))",
"def rz7z(YKHO, D70y):\n JYV8, mheE = D70y.nodes\n if JYV8 not in YKHO.edges:\n YKHO.e... | [
"0.6404618",
"0.63657343",
"0.62714213",
"0.6259746",
"0.6250486",
"0.6191917",
"0.61732984",
"0.616639",
"0.61343473",
"0.61172986",
"0.6106422",
"0.6054833",
"0.60085297",
"0.6000111",
"0.59970844",
"0.5983209",
"0.59791756",
"0.5971796",
"0.5969328",
"0.5947114",
"0.593946... | 0.81806123 | 0 |
Tells whether a given state is the accepting state. | def GpLM(YKHO, QTBn):
return QTBn == YKHO.accept_state | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HIj3(YKHO, qmsz, mwFB):\n return not YKHO.is_accept_state(qmsz) and YKHO.is_accept_state(mwFB)",
"def vlsw(YKHO):\n return YKHO.accept_state is not None",
"def OxZ5(YKHO, QTBn):\n return YKHO.is_accept_state(QTBn) or YKHO.is_reject_state(QTBn)",
"def isS2(YKHO, QTBn):\n return QTBn == YKHO.re... | [
"0.7301881",
"0.71658933",
"0.65224826",
"0.6519184",
"0.64814734",
"0.6418342",
"0.6414696",
"0.63513714",
"0.6281025",
"0.626459",
"0.62269115",
"0.62149465",
"0.6160319",
"0.6120538",
"0.6106759",
"0.6095155",
"0.60856605",
"0.6076974",
"0.60683364",
"0.6066527",
"0.606627... | 0.79446024 | 0 |
Returns true if the automaton contains an accepting state. | def vlsw(YKHO):
return YKHO.accept_state is not None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GpLM(YKHO, QTBn):\n return QTBn == YKHO.accept_state",
"def HIj3(YKHO, qmsz, mwFB):\n return not YKHO.is_accept_state(qmsz) and YKHO.is_accept_state(mwFB)",
"def E4Ij(psJg: DFA, Q6uT: Iterable) -> bool:\n QTBn = psJg.start()\n for o61b in Q6uT:\n QTBn = OZkM(psJg, QTBn, o61b)\n return... | [
"0.7311491",
"0.6777833",
"0.656361",
"0.6427425",
"0.6364269",
"0.6341563",
"0.6341563",
"0.62963456",
"0.6265531",
"0.61908454",
"0.6177116",
"0.61688495",
"0.6148614",
"0.6144206",
"0.6141769",
"0.613992",
"0.61260504",
"0.6103957",
"0.609922",
"0.60732967",
"0.6049577",
... | 0.7199865 | 1 |
Returns true if the automaton contains a rejecting state. | def G_UM(YKHO):
return YKHO.reject_state is not None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def isS2(YKHO, QTBn):\n return QTBn == YKHO.reject_state",
"def AaYO(YKHO, qmsz, mwFB):\n return not YKHO.is_reject_state(qmsz) and YKHO.is_reject_state(mwFB)",
"def _fdx(YKHO):\n return len(YKHO.in_states) == 0",
"def QTBn(YKHO):\n return bool(YKHO.state_true_count() != 0)",
"def q6zK(YKHO):\n... | [
"0.8045271",
"0.72863805",
"0.65914714",
"0.64298266",
"0.64030975",
"0.6345358",
"0.63414586",
"0.62737304",
"0.61304116",
"0.61304116",
"0.61304116",
"0.61304116",
"0.61304116",
"0.61304116",
"0.61304116",
"0.61160916",
"0.61160916",
"0.6114725",
"0.60787827",
"0.6077463",
... | 0.78866357 | 1 |
Returns True the 'from' state is not accepting and the 'to' state is an accepting state. | def HIj3(YKHO, qmsz, mwFB):
return not YKHO.is_accept_state(qmsz) and YKHO.is_accept_state(mwFB) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AaYO(YKHO, qmsz, mwFB):\n return not YKHO.is_reject_state(qmsz) and YKHO.is_reject_state(mwFB)",
"def qzhV(YKHO, qmsz, mwFB):\n return YKHO.is_accepting_transition(qmsz, mwFB) or YKHO.is_rejecting_transition(qmsz, mwFB)",
"def f_Gy(YKHO, qmsz, mwFB):\n if YKHO.state == qmsz:\n YKHO.state = ... | [
"0.7309576",
"0.7036202",
"0.6995781",
"0.62549186",
"0.6204071",
"0.61362827",
"0.61094517",
"0.6030471",
"0.59497523",
"0.59438765",
"0.5917026",
"0.5904898",
"0.58983004",
"0.5866231",
"0.58230186",
"0.5818796",
"0.58144295",
"0.5800707",
"0.57929415",
"0.57750636",
"0.574... | 0.82226044 | 0 |
Returns True the 'from' state is not rejecting and the 'to' state is a rejecting state. | def AaYO(YKHO, qmsz, mwFB):
return not YKHO.is_reject_state(qmsz) and YKHO.is_reject_state(mwFB) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HIj3(YKHO, qmsz, mwFB):\n return not YKHO.is_accept_state(qmsz) and YKHO.is_accept_state(mwFB)",
"def qzhV(YKHO, qmsz, mwFB):\n return YKHO.is_accepting_transition(qmsz, mwFB) or YKHO.is_rejecting_transition(qmsz, mwFB)",
"def isS2(YKHO, QTBn):\n return QTBn == YKHO.reject_state",
"def f_Gy(YKHO... | [
"0.7821122",
"0.6584396",
"0.65370786",
"0.6484841",
"0.62132657",
"0.6041458",
"0.59809875",
"0.597844",
"0.59665483",
"0.5915658",
"0.5898622",
"0.5873334",
"0.5858813",
"0.58330387",
"0.5819185",
"0.58026874",
"0.5802179",
"0.57999915",
"0.57772857",
"0.5677688",
"0.567160... | 0.8100296 | 0 |
Returns the number of outgoing edges that a given state has. | def onY1(YKHO, QTBn):
return len(YKHO.edges[QTBn]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def L1_y(YKHO):\n wjRY = sum(len((YKHO._outgoing[Ty9i] for Ty9i in YKHO._outgoing)))\n return wjRY if YKHO.is_directed() else wjRY // 2",
"def L1_y(YKHO):\n wjRY = sum((len(YKHO._outgoing[Ty9i]) for Ty9i in YKHO._outgoing))\n return wjRY if YKHO.is_directed else wjRY // 2",
"def rlIW(YKHO):\n re... | [
"0.7539909",
"0.7526066",
"0.7418681",
"0.71353704",
"0.7015815",
"0.69612414",
"0.69339055",
"0.69013214",
"0.6876837",
"0.684494",
"0.6841232",
"0.6835877",
"0.68304044",
"0.67694795",
"0.6742557",
"0.6739073",
"0.6739073",
"0.67364824",
"0.67364824",
"0.6695894",
"0.668336... | 0.9272497 | 0 |
This method gets the average pct of polling data for a candidate. | def f4xa(YKHO, HxxV, vELC, kepv, KhBf) -> float:
IyQq = 0
bJWj = YKHO.get_poli_points(HxxV, vELC, kepv, KhBf)
for YRbF in bJWj:
IyQq += float(YRbF)
return IyQq / len(bJWj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def K1nB(YKHO):\n wjRY = YKHO.poll.total_votes()\n if wjRY == 0:\n return 0\n return float(YKHO.votes) / float(wjRY) * 100.0",
"def K1nB(YKHO):\n wjRY = YKHO.poll.total_votes\n if wjRY == 0 or YKHO.votes == 0:\n return 0\n return int(float(YKHO.votes) / float(wjRY) * 100)",
"def... | [
"0.7235886",
"0.70672077",
"0.6836949",
"0.6740532",
"0.67196435",
"0.6701777",
"0.6688618",
"0.66512346",
"0.66512346",
"0.6459255",
"0.6451716",
"0.64434123",
"0.6438889",
"0.64145154",
"0.64145154",
"0.6358572",
"0.6344477",
"0.63341796",
"0.6308344",
"0.6296312",
"0.62863... | 0.0 | -1 |
Age gives the number of remaining iterations. | def DbxN(EmUK):
return tuKI.randint(180, 200) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def P3fz(YKHO):\n lrNJ = YKHO.age * 7\n print(YKHO.name + ' is ' + str(lrNJ) + ' years old in dog years.')",
"def ZJe_(YKHO) -> float:\n return ITS7.time() - YKHO.determination_time",
"def ZJe_(YKHO):\n print('In age method')\n return YKHO.__age",
"def ZJe_(YKHO):\n return ITS7.time() - YKH... | [
"0.7247382",
"0.7233371",
"0.7208188",
"0.7094123",
"0.70546454",
"0.70524436",
"0.7027528",
"0.7016993",
"0.69512624",
"0.6933075",
"0.69040036",
"0.6862275",
"0.6843305",
"0.68389183",
"0.67945635",
"0.6789183",
"0.6762596",
"0.67565596",
"0.6701942",
"0.6689301",
"0.668930... | 0.0 | -1 |
Constructor Creates a new Movie Object Inherits from Video | def FIMM(YKHO, leAC, u54L, vHqx, Ghho, QJ_N, Ef9S, RrWF):
f6W2.Video.__init__(YKHO, leAC, u54L, vHqx, Ghho)
YKHO.poster_link = QJ_N
YKHO.trailer_link = Ef9S
YKHO.rating = RrWF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, f6W2=None):\n YKHO.openapi_types = {'video': str}\n YKHO.attribute_map = {'video': 'video'}\n YKHO._video = f6W2",
"def FIMM(YKHO, xTXs, RUE3):\n YKHO.json_result = VRsD.get_movie_details(xTXs)\n f6W2.Video.__init__(YKHO, YKHO.json_result['original_title'], YKHO.json_result['overvie... | [
"0.729172",
"0.71084434",
"0.6873606",
"0.68148386",
"0.67274714",
"0.6717063",
"0.6646842",
"0.6631907",
"0.66192317",
"0.6614306",
"0.6571047",
"0.65679103",
"0.6543779",
"0.65247816",
"0.6514589",
"0.64834166",
"0.64805126",
"0.6473114",
"0.6469159",
"0.64683026",
"0.64583... | 0.74806666 | 0 |
writes_metrics. Writes the validation metrics (and the train loss) in a Tensorboard Writer. | def uKTE(WJI9, AaBm, qtWj):
for H5ew in AaBm:
if type(AaBm[H5ew]) == dict:
WJI9.add_scalars(H5ew, AaBm[H5ew], qtWj)
else:
WJI9.add_scalar(H5ew, AaBm[H5ew], qtWj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JKDK(YKHO):\n if YKHO._metrics is None:\n return\n with YKHO._summary_writer.as_default(), BJsk.soft_device_placement(), ZylS.summary.record_if(lambda: True):\n for r8hN in YKHO._metrics:\n TZ9E = r8hN.name\n try:\n ZylS.summary.scalar(name=Hy7s.path.joi... | [
"0.6983331",
"0.6900835",
"0.651933",
"0.64432955",
"0.64316064",
"0.63072115",
"0.62827003",
"0.6265139",
"0.6236744",
"0.621312",
"0.61266416",
"0.6113293",
"0.6095682",
"0.60462844",
"0.60234565",
"0.59868723",
"0.59588915",
"0.5940671",
"0.59077245",
"0.5898612",
"0.58940... | 0.62010247 | 10 |
Return best value of selected metric. | def BaD7(x0hE, AcYW, iXC1):
g_N2 = x0hE.get_metric_history(iXC1.info.run_id, AcYW)
uc7Q = min(g_N2, key=lambda WKvO: WKvO.value)
return uc7Q.value | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BaD7(YKHO, AcYW):\n try:\n if 'loss' in AcYW:\n return min(YKHO.aggregate[AcYW]['mean'])\n elif 'acc' in AcYW:\n return max(YKHO.aggregate[AcYW]['mean'])\n else:\n raise NotImplementedError\n except KeyError:\n raise KeyError('Metric {0:s} not ... | [
"0.8049018",
"0.78125054",
"0.76482767",
"0.7519111",
"0.75133425",
"0.73972416",
"0.7315988",
"0.70534784",
"0.69915485",
"0.69630706",
"0.6952119",
"0.69481087",
"0.68322206",
"0.68210304",
"0.6817657",
"0.67978925",
"0.6712464",
"0.6708425",
"0.66947484",
"0.6651819",
"0.6... | 0.77057105 | 2 |
Test that a model can be serialized to a dict. | def JbKq(NCls, C3ST, aEqx):
NCls.save(C3ST)
C3ST = NCls.query(C3ST.__class__).filter(aM69.identity_map_filter(C3ST)).options(RyuO.orm.eagerload('*')).first()
assert EJEL.is_match(C3ST.to_dict(), aEqx)
assert EJEL.is_match(dict(C3ST), aEqx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IqWH(YKHO):\n HPQU = YKHO._class\n Op6c = HPQU.to_dict()\n I1mm = True\n for H5ew, BWXx in HPQU.__dict__.items():\n if H5ew not in Op6c:\n I1mm = False\n YKHO.assertTrue(I1mm)",
"def SG3O(YKHO):\n YEnM = KcDH()\n KCHu = YEnM.to_dict()\n YKHO.assertEqual(type(KCHu), d... | [
"0.78014886",
"0.7617128",
"0.7582085",
"0.74406207",
"0.741173",
"0.7406639",
"0.73325974",
"0.7277994",
"0.7228473",
"0.71914965",
"0.7168751",
"0.7155167",
"0.71317506",
"0.7125235",
"0.7053709",
"0.7026738",
"0.6981545",
"0.695076",
"0.6937608",
"0.69284195",
"0.69069123"... | 0.7257993 | 8 |
Test that find can paginate results. | def vCKW(zVa7, tOQ_, USOo, B2Dn, d6pt):
U5bT = zVa7.find(per_page=USOo, page=B2Dn)
CksG = zVa7.query().all()
assert U5bT == CksG[d6pt] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VEV0(dixj, vgXP, qoqK, aEqx):\n assert nuiO(dixj, vgXP, qoqK) == aEqx",
"def JlEo(YKHO):\n for YSCM in YKHO.recipe_list({'metrics': ['pop2000'], 'dimensions': ['age'], 'pagination_page_size': 10}):\n YKHO.assertRecipeSQLContains(YSCM, 'LIMIT 10')\n YKHO.assertRecipeSQLContains(YSCM, 'OFFS... | [
"0.8180904",
"0.7154259",
"0.7134564",
"0.709556",
"0.7093694",
"0.7093694",
"0.7093694",
"0.7093694",
"0.7093694",
"0.7093694",
"0.7093694",
"0.7093694",
"0.7093694",
"0.7093694",
"0.7093694",
"0.7093694",
"0.7093694",
"0.7093694",
"0.7093694",
"0.7093694",
"0.7093694",
"0... | 0.7856325 | 1 |
Test that model.update() can update relationship data. | def eodh(NCls):
nPrm = {'name': Kp52(), 'c': {'name': Kp52()}}
C3ST = a9mD(nPrm)
NCls.save(C3ST)
Dokz = Kp52()
C3ST.update({'c': {'name': Dokz}})
NCls.save(C3ST)
assert C3ST.c.name == Dokz | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IsIF(YKHO):\n _yOu = YKHO.model.update(1, {'key': 'updated value'})\n YKHO.assertIsNotNone(_yOu)\n YKHO.assertEqual(YKHO.model.get(1)['key'], 'updated value')",
"def oZWf(YKHO):\n pass",
"def zUDI(YKHO):\n pass",
"def IsIF(YKHO):\n slgn = xejc()\n slgn.save()\n nPrm = {'rel': [YKH... | [
"0.780024",
"0.76765877",
"0.7378759",
"0.7331729",
"0.7308476",
"0.7305211",
"0.71630424",
"0.7105945",
"0.7099809",
"0.70988953",
"0.70916504",
"0.7080452",
"0.7080452",
"0.70167655",
"0.69902104",
"0.69590676",
"0.69526064",
"0.6909312",
"0.6891924",
"0.68568677",
"0.68211... | 0.8069029 | 0 |
Test that model.update() can set relationship to NULL with empty dict. | def lr19(NCls):
nPrm = {'name': Kp52(), 'c': {'name': Kp52()}}
C3ST = a9mD(nPrm)
NCls.save(C3ST)
C3ST.update({'c': {}})
NCls.save(C3ST)
assert C3ST.c is None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Fesj(YKHO):\n _yOu = YKHO.model.update(10, {'key': 'updated value'})\n YKHO.assertIsNone(_yOu)",
"def uxR9(YKHO):\n YKHO.car.update({})",
"def dt0T(YKHO):\n with Kh6j.manager:\n C3ST = mDi0()\n YKHO.session.add(C3ST)\n with Kh6j.manager:\n C3ST = YKHO.session.query(mDi0)... | [
"0.7289522",
"0.7229275",
"0.70965743",
"0.6929818",
"0.6790837",
"0.67869484",
"0.6722114",
"0.6693866",
"0.6675856",
"0.6664005",
"0.6646835",
"0.65630347",
"0.6529148",
"0.6474893",
"0.64310724",
"0.64092857",
"0.6406663",
"0.6320112",
"0.6306637",
"0.6276419",
"0.6276165"... | 0.86920404 | 0 |
Test service update all. | def Qz9O(NCls, zVa7, tOQ_):
FYrf = tOQ_[zVa7.model_class]
Dbmo = {'name': Kp52()}
for C3ST in FYrf:
C3ST.update(Dbmo)
zVa7.save(FYrf)
MCjY = NCls.query(zVa7.model_class).all()
assert len(FYrf) == len(MCjY)
assert set(FYrf) == set(MCjY)
for C3ST in MCjY:
for H5ew, BWXx in ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IsIF(YKHO):\n pass",
"def IsIF(YKHO):\n pass",
"def u7id(YKHO):\n YKHO._send_svc_reg()\n geh0 = YKHO._send_svc_reg()\n YKHO.assert200(geh0, 'Response body is : ' + geh0.data.decode('utf-8'))",
"def IsIF(YKHO, qIxc):\n pass",
"def puDb(tmtU, VoII):\n DHlI = UKwm(tmtU, VoII, test=Tru... | [
"0.76385444",
"0.76385444",
"0.7611012",
"0.75064725",
"0.71941954",
"0.7176082",
"0.7114161",
"0.7081063",
"0.7046656",
"0.69641626",
"0.6934812",
"0.68945414",
"0.6862197",
"0.68573755",
"0.68573755",
"0.68265384",
"0.6821755",
"0.6818545",
"0.68026716",
"0.6773872",
"0.675... | 0.6762205 | 20 |
Test that models can be modified using get/set item syntax. | def O6dz():
C3ST = a9mD()
C3ST['name'] = 'foo'
assert C3ST['name'] == 'foo' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def t4zr(YKHO):\n _yOu = YKHO.model.set(1, {'newkey': 'updated value'})\n YKHO.assertIsNotNone(_yOu)\n YKHO.assertEqual(YKHO.model.get(1)['newkey'], 'updated value')\n YKHO.assertNotIn('key', YKHO.model.get(1))",
"def IsIF(YKHO):\n _yOu = YKHO.model.update(1, {'key': 'updated value'})\n YKHO.as... | [
"0.78046334",
"0.7182023",
"0.6848442",
"0.6810606",
"0.672602",
"0.6684921",
"0.6641749",
"0.6586074",
"0.65510345",
"0.6476538",
"0.6450877",
"0.63698095",
"0.6361298",
"0.63205665",
"0.631168",
"0.6305674",
"0.6304607",
"0.6252159",
"0.6252083",
"0.6245145",
"0.62361705",
... | 0.82075214 | 0 |
Test that save with an invalid type raises an exception. | def dvfL(NCls):
with trZe.raises(TypeError):
NCls.save({}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _pNM(YKHO):\n with YKHO.assertRaises(zKVF):\n YKHO.provapi.save_element('Some cool invalid argument')",
"def n1rT(YKHO):\n MuPB = KcDH()\n with YKHO.assertRaises(TypeError) as jzdc:\n MuPB.save(69)\n YKHO.assertEqual(str(jzdc.exception), 'save() takes 1 positional' + ' argument but ... | [
"0.76522905",
"0.7393177",
"0.7227112",
"0.7221008",
"0.72150356",
"0.7195246",
"0.70590174",
"0.6920492",
"0.68130934",
"0.6806628",
"0.67721397",
"0.6759813",
"0.6722718",
"0.6713694",
"0.6699916",
"0.6689854",
"0.668638",
"0.66857356",
"0.6662556",
"0.66528445",
"0.6625451... | 0.8713693 | 0 |
Test that destroy with an invalid type raises an exception. | def Wk5h(NCls):
with trZe.raises(TypeError):
NCls.destroy({}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vgQW(YKHO):\n YKHO.assertRaises(AJ5d.VolumeTypeNotFound, Ev9e.destroy, YKHO.ctxt, 'sfsfsdfdfs')",
"def BWQE():\n trZe.raises(LzUK, Ethm.destroy, 'my-vm', 'function')",
"def KSXy(Eorv):\n with trZe.raises(ValueError):\n Eorv.delete(None)",
"def ML0H(YKHO):\n hpqK = YKHO._MENU + [YKHO._P... | [
"0.79932976",
"0.7106409",
"0.70767",
"0.6849493",
"0.68278396",
"0.68238014",
"0.68237895",
"0.6793036",
"0.67925924",
"0.6684326",
"0.66649014",
"0.6647956",
"0.66340035",
"0.6633926",
"0.6618133",
"0.6559996",
"0.65471286",
"0.65417874",
"0.6511722",
"0.651118",
"0.647594"... | 0.81218565 | 0 |