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 |
|---|---|---|---|---|---|---|
Decorator to check if user owns post | def dFSR(m2Zb):
def h3Xc(YKHO, m8z6):
"""Wrapper for the function"""
if m8z6.user.key().id() == YKHO.user.key().id():
return m2Zb(YKHO, m8z6)
else:
return YKHO.error(404)
return h3Xc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Iw6c(YKHO):\n m8z6 = YKHO.get_object()\n return YKHO.request.user == m8z6.author",
"def Iw6c(YKHO):\n m8z6 = YKHO.get_object()\n return YKHO.request.user == m8z6.author",
"def Iw6c(YKHO):\n c5ow = YKHO.request.user\n fDxN = YKHO.get_object().post_related_user\n if c5ow == fDxN:\n ... | [
"0.7223784",
"0.7223784",
"0.7148713",
"0.7148713",
"0.70771813",
"0.70771813",
"0.6945695",
"0.66726965",
"0.6588906",
"0.6485853",
"0.64779055",
"0.64573944",
"0.6439542",
"0.6410739",
"0.6348668",
"0.6341077",
"0.63235086",
"0.6307992",
"0.6301318",
"0.6294907",
"0.6287864... | 0.77085966 | 0 |
Decorator to check if user owns comment | def b3KW(m2Zb):
def h3Xc(YKHO, G9zw, Ii1o):
"""Wrapper for the function"""
if G9zw.user.key().id() == YKHO.user.key().id():
return m2Zb(YKHO, G9zw, Ii1o)
else:
return YKHO.error(404)
return h3Xc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cRjp(YKHO, aM_I):\n Py_j = YKHO.request.user.userprofile\n if not aM_I.user_is_owner(Py_j):\n raise wPvU",
"def cRjp(YKHO, aM_I):\n Py_j = YKHO.request.user.userprofile\n if not aM_I.user_is_owner(Py_j):\n raise wPvU",
"def b3KW(YKHO, CBIr=None, YPpA=None, pQGt=None):\n try:\n ... | [
"0.73646694",
"0.73646694",
"0.6913359",
"0.66932577",
"0.664441",
"0.6480596",
"0.6404211",
"0.63674057",
"0.63111323",
"0.62784475",
"0.625575",
"0.6244019",
"0.62221825",
"0.62103623",
"0.6190012",
"0.61588526",
"0.61406004",
"0.6100504",
"0.6100504",
"0.6037124",
"0.60367... | 0.77995235 | 0 |
Creates a reminder. Your message will be sent in the channel you are in or in the channel provided. You can only have up to 4 reminders at a time. | async def reminder(YKHO, QpfX, WbTE: Duration, YwkQ: typing.Optional[TextChannelMention], *, Ol8d: commands.clean_content(fix_channel_mentions=True)=''):
if YKHO.has_max_reminders(QpfX.guild.id, QpfX.author.id):
await QpfX.send(f'Reminder not set. You can only have {xwfv.MAX_REMINDERS} reminders at a time.'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def make(YKHO, OaeV: Context, *, Ge5_: str):\n WXJa = Ge5_.split('\"', 1)\n if len(WXJa) == 2 and WXJa[1].endswith('\"'):\n WXJa[1] = WXJa[1][:-1]\n GQJo = H0pF.Calendar()\n ZyN3 = GQJo.parse(WXJa[0], OaeV.message.created_at)\n if ZyN3[1] == 0:\n ZyN3 = GQJo.parse('1 day', OaeV.m... | [
"0.6848614",
"0.68266094",
"0.6814424",
"0.66923743",
"0.66572803",
"0.6626557",
"0.6520165",
"0.65073717",
"0.62827945",
"0.62630475",
"0.6223809",
"0.620911",
"0.6197881",
"0.61858845",
"0.6098084",
"0.6033613",
"0.5983317",
"0.5983043",
"0.59452504",
"0.5942005",
"0.591252... | 0.7584345 | 0 |
Adds the Reminder cog to the bot. | def eCGt(JyK9):
JyK9.add_cog(xwfv(JyK9)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eCGt(JyK9: Bot) -> None:\n JyK9.add_cog(nzm3(JyK9))\n RKD7.info('Cog loaded: reminder')",
"def xf77(OaeV, aC0m, Ol8d):\n if aC0m.lower() == 'me' and aC0m not in OaeV.client.channels[OaeV.target]['users']:\n aC0m = OaeV.origin\n nzm3.create(who=aC0m, who_n=OaeV.client.normalize(aC0m), chann... | [
"0.706518",
"0.677375",
"0.6171771",
"0.6090866",
"0.596303",
"0.59545445",
"0.59329313",
"0.58834714",
"0.5828033",
"0.5817321",
"0.5707132",
"0.5701824",
"0.56679",
"0.56234366",
"0.5582116",
"0.5571043",
"0.55709493",
"0.5568375",
"0.55669284",
"0.5558968",
"0.555312",
"... | 0.73107207 | 0 |
Handles all responses with the exception of 401s. This is necessary so that we can authenticate responses if requested | def ujh0(YKHO, geh0: Response):
RKD7.debug(f'handle_mutual_auth(): Handling {geh0.status_code}')
if YKHO.mutual_authentication == uIz6:
RKD7.debug(f'handle_mutual_auth(): Mutual auth disabled, ignoring')
return
I_l_ = geh0.status_code >= 400
if Vmbd(geh0) is not None:
RKD7.debug(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bc40(YKHO, Mkmy, **B2fa):\n ...",
"def bc40(YKHO, geh0, BQDi=None):\n if geh0.status_code == 401:\n okkR = geh0.headers.get('www-authenticate', '')\n if 'digest' not in okkR.lower():\n return\n QePW = geh0.request\n if not QePW.headers.get('authorization'):\n ... | [
"0.8105723",
"0.7833832",
"0.74298453",
"0.74100053",
"0.734001",
"0.734001",
"0.734001",
"0.734001",
"0.734001",
"0.734001",
"0.7332688",
"0.7251796",
"0.7197988",
"0.7079088",
"0.69660157",
"0.69660157",
"0.6881883",
"0.6848566",
"0.68185055",
"0.6792398",
"0.6783168",
"0... | 0.0 | -1 |
Bucket name of the raw IO | def l7rj(YKHO):
if hasattr(YKHO.raw_io, 'bucket_name'):
return YKHO.raw_io.bucket_name
raise AttributeError('%s:// does not support bucket_name attribute' % YKHO.scheme) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mWFP(YKHO):\n return YKHO._bucket['name']",
"def l7rj(YKHO) -> str:\n return qe4Y.get(YKHO, 'bucket_name')",
"def l7rj(YKHO) -> str:\n return qe4Y.get(YKHO, 'bucket_name')",
"def l7rj(YKHO) -> str:\n return qe4Y.get(YKHO, 'bucket_name')",
"def h47C():\n return cuHu",
"def WE7e(YKHO) ->... | [
"0.6976395",
"0.6945027",
"0.6945027",
"0.6945027",
"0.69378674",
"0.69101423",
"0.69101423",
"0.69101423",
"0.69101423",
"0.69101423",
"0.69101423",
"0.69101423",
"0.68962514",
"0.68962514",
"0.68962514",
"0.68962514",
"0.68962514",
"0.68962514",
"0.68962514",
"0.68962514",
... | 0.7526862 | 0 |
Determine if the file is gz compressed. | def Jfe2(YKHO):
if YKHO.closed:
with YKHO.open('rb') as eHNT:
Fg_i = eHNT.read(2)
else:
vgXP = YKHO.tell()
YKHO.seek(0)
Fg_i = YKHO.read(2)
YKHO.seek(vgXP)
Fg_i = MRxC.hexlify(Fg_i)
bo34.debug('File begins with: %s' % Fg_i)
return Fg_i == b'1f8b' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i4c8(qaEx):\n e2GX = False\n if twTI.from_file(qaEx).startswith('gzip compressed data'):\n e2GX = True\n return e2GX\n else:\n return e2GX",
"def x2nr(VqRE):\n r8hN = ZbWC.search('.*(.gz)\\\\d*$', str(VqRE))\n return True if r8hN else False",
"def e2GX(mWFP):\n return... | [
"0.82195896",
"0.8175475",
"0.8031256",
"0.78385335",
"0.7780963",
"0.7774023",
"0.7695378",
"0.7641693",
"0.7587354",
"0.7584155",
"0.75621355",
"0.75426525",
"0.7503684",
"0.7338405",
"0.72950864",
"0.7288726",
"0.7254072",
"0.71887666",
"0.718578",
"0.71520966",
"0.7130499... | 0.81273735 | 2 |
Display a HTML page with a list of States objects | def ex4g(id=None):
wspz = S8SU.all(wHLO).values()
if id is not None:
dDSX = 0
for p34B in wspz:
if id == p34B.id:
break
dDSX += 1
if dDSX >= len(wspz):
id = 'Not found'
return TvZl('9-states.html', list_states=wspz, id_state=id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KXmb():\n wspz = S8SU.all('State').values()\n return TvZl('7-states_list.html', states=wspz)",
"def KXmb():\n wspz = []\n riiE = S8SU.all('State')\n for H5ew, wEf2 in riiE.items():\n wspz.append(wEf2)\n return TvZl('7-states_list.html', states=wspz)",
"def R5I5():\n return TvZl(... | [
"0.80463266",
"0.80021167",
"0.78274584",
"0.7754575",
"0.7680066",
"0.76733387",
"0.76728255",
"0.7670401",
"0.7641594",
"0.76049286",
"0.75929093",
"0.75905216",
"0.7589849",
"0.7583688",
"0.75765276",
"0.75396967",
"0.7530448",
"0.7488584",
"0.74859947",
"0.7417414",
"0.72... | 0.57377756 | 85 |
Method to remove the current SQLAlchemy Session | def GTYX(NCls):
S8SU.close() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yi3Z(YKHO):\n YKHO.__orm.remove_session()",
"def KyVt(AJ5d):\n S8SU.close()",
"def jQoW() -> None:\n if FEJ9.in_flask_request():\n Oa1e.session.remove()\n elif cuiw.session:\n cuiw.session.remove()\n cuiw.session = None\n else:\n print('No DB session found to clea... | [
"0.88212335",
"0.8003815",
"0.7773525",
"0.7740719",
"0.7709932",
"0.76698864",
"0.7659106",
"0.7659106",
"0.7659106",
"0.7659106",
"0.7659106",
"0.7659106",
"0.7659106",
"0.7555954",
"0.7555954",
"0.7518181",
"0.7464382",
"0.74444574",
"0.7374936",
"0.73438644",
"0.7340598",... | 0.0 | -1 |
Render the client homepage. | def x0hE(QePW):
if QePW.method == 'POST':
L03z = IFDO(QePW.POST)
if L03z.is_valid():
mWFP = L03z.cleaned_data['name']
fA3L = L03z.cleaned_data['requirements']
wUfe = L03z.cleaned_data['keywords']
JBZA = L03z.cleaned_data['description']
aVYC... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C_QL():\n return TvZl('homepage.html')",
"def C_QL():\n return TvZl('home.html')",
"def C_QL():\n return TvZl('homepage.html')",
"def C_QL():\n return TvZl('homepage.html')",
"def kZiy():\n return TvZl('homepage.html')",
"def C_QL():\n return TvZl('index.html')",
"def C_QL():\n ... | [
"0.8721848",
"0.86325604",
"0.8586898",
"0.85557276",
"0.8555416",
"0.85044986",
"0.8457709",
"0.845471",
"0.845471",
"0.8423579",
"0.8402534",
"0.83994186",
"0.83946073",
"0.83946073",
"0.83780634",
"0.8359255",
"0.8349674",
"0.8331819",
"0.8331819",
"0.8331819",
"0.8331819"... | 0.0 | -1 |
Render the page where instructors can go to make a new section or edit existing ones. | def Ki0Q(QePW):
if QePW.method == 'POST':
L03z = TpDE(QePW.POST)
if L03z.is_valid():
mWFP = L03z.cleaned_data['name']
sNAB = GYI8(name=mWFP)
sNAB.save()
return lpa_(QePW.user.profile.user_type)
L03z = TpDE()
UOrz = GYI8.objects.all()
QpfX =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z_5v():\n return TvZl('instructor.html')",
"def juEr():\n return TvZl('instructor_register.html')",
"def FnxF():\n return TvZl('student_register.html')",
"def Z_5v(QePW):\n bRd0 = LuKW.objects.filter(recipient__id=QePW.user.id)\n BeD_ = CIhX.objects.filter(instructors__id=QePW.user.id)\n ... | [
"0.7469933",
"0.6838998",
"0.67075956",
"0.65645444",
"0.6555765",
"0.64888966",
"0.6366249",
"0.6366249",
"0.62825555",
"0.6270768",
"0.62236625",
"0.62222505",
"0.62137246",
"0.6186685",
"0.6162207",
"0.6130489",
"0.6096926",
"0.6090649",
"0.604526",
"0.6029211",
"0.6019731... | 0.63236743 | 8 |
Perform initialization of the subproblem. Presently, this just restores the continuous variables to the original model values. | def NYjA(C3ST, b3uf):
for SRYB, GJB6 in zip(C3ST.GDPopt_utils.variable_list, b3uf.initial_var_values):
if not SRYB.fixed and SRYB.is_continuous():
if GJB6 is not None:
if SRYB.has_lb() and GJB6 < SRYB.lb:
GJB6 = SRYB.lb
if SRYB.has_ub() and GJB... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Gv23(YKHO):\n if YKHO._tsim is None:\n raise gL2b('Tried to initialize the model without simulating it first')\n ZQRQ = list(YKHO._contset)\n YLya = YKHO._diffvars + YKHO._simalgvars\n for or8S, Ty9i in enumerate(YLya):\n for dsqg, YRbF in enumerate(Ty9i._args):\n if type(Y... | [
"0.71268344",
"0.6628353",
"0.64232093",
"0.64102256",
"0.6343215",
"0.6320725",
"0.62632567",
"0.62547904",
"0.6253273",
"0.6249115",
"0.6215976",
"0.6210623",
"0.6201603",
"0.618081",
"0.6179997",
"0.61482835",
"0.6131031",
"0.6115761",
"0.6108924",
"0.6084169",
"0.60818774... | 0.72874117 | 0 |
Rearrange image NDArray shape to 'NCHW' or 'NHWC' which is valid for MXNet model input. | def gEht(Uw2I, l5J1='NCHW'):
if l5J1 == 'NCHW':
Uw2I = RsfQ.nd.transpose(Uw2I, (2, 0, 1))
hlel = RsfQ.nd.expand_dims(Uw2I, axis=0)
return hlel | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gEht(Uw2I, l5J1='NHWC'):\n assert l5J1 in 'NCHW' or l5J1 in 'NHWC', \"dim_order must be 'NCHW' or 'NHWC'.\"\n if l5J1 == 'NCHW':\n Uw2I = oyIN.transpose(Uw2I, (2, 0, 1))\n hlel = oyIN.expand_dims(Uw2I, axis=0)\n return hlel",
"def VqWm(VXjJ):\n return oyIN.moveaxis(VXjJ, 3, 1)",
"def ... | [
"0.7004409",
"0.6780705",
"0.6690376",
"0.6687826",
"0.66169816",
"0.6526011",
"0.6491643",
"0.6490652",
"0.64881676",
"0.6465852",
"0.64339495",
"0.63722104",
"0.635442",
"0.63540107",
"0.63301253",
"0.6317082",
"0.62956417",
"0.62477535",
"0.62457305",
"0.6245656",
"0.62265... | 0.7029293 | 0 |
Normalize src with mean and std. | def VYlc(zZcM, JBMS, M1Jx=None):
zZcM = zZcM.astype(oyIN.float32)
return VXjJ.color_normalize(zZcM, JBMS, M1Jx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NkkI(VXjJ, JBMS, M1Jx):\n return (VXjJ - JBMS) / M1Jx",
"def VYlc(zZcM, JBMS, M1Jx=None):\n if JBMS is not None:\n zZcM -= JBMS\n if M1Jx is not None:\n zZcM /= M1Jx\n return zZcM",
"def Q7gV(WbAn, eQSh):\n return (WbAn - JBMS) / (M1Jx + 1e-07)",
"def jnV4(VXjJ, B9EC, NdnM):\... | [
"0.7991311",
"0.7805576",
"0.77142817",
"0.7702343",
"0.7609717",
"0.75793713",
"0.7553975",
"0.7508262",
"0.746628",
"0.7459612",
"0.74326545",
"0.7420785",
"0.73771983",
"0.7249801",
"0.72029865",
"0.71608615",
"0.7157074",
"0.7140392",
"0.71212053",
"0.7115899",
"0.7108482... | 0.7418462 | 12 |
Convert the query results to a Dictionary using date as the key and prcp as the value | def OScg():
d173 = cuiw.query(Ny6I.date, Ny6I.prcp).filter(Ny6I.date >= d1Ma, Ny6I.date <= e6PS).order_by(Ny6I.date).all()
Gl_B = {AIu6.date: AIu6.prcp for AIu6 in d173}
return pz3A(Gl_B) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aCqS(YKHO):\n Csk6 = {}\n for JRYC, NZA8, WyFx, Lg1t, sOCm in YKHO.get_queryset().values_list('date', 'team1', 'team2', 'team1_result', 'team2_result'):\n H5ew = (NZA8, JRYC)\n Csk6[H5ew] = Lg1t\n gfpw = (WyFx, JRYC)\n Csk6[gfpw] = sOCm\n return Csk6",
"def OScg():\n \... | [
"0.74242234",
"0.71075606",
"0.7059132",
"0.690357",
"0.6828756",
"0.6710609",
"0.6676176",
"0.664206",
"0.6638132",
"0.6579318",
"0.6556973",
"0.65347236",
"0.6502287",
"0.6496483",
"0.64560854",
"0.6433766",
"0.6405104",
"0.63967806",
"0.6374047",
"0.6346232",
"0.63411653",... | 0.664246 | 7 |
Return a JSON list of the minimum temperature, the average temperature, and the max temperature for a given start or startend range. | def ovGo(yKcO, Os4s=None):
if Os4s == None:
Os4s = e6PS
JRnq = [Ny6I.station, njvh.name, JfyU.min(Ny6I.tobs), JfyU.max(Ny6I.tobs), JfyU.avg(Ny6I.tobs)]
h3qM = cuiw.query(*JRnq).filter(Ny6I.station == njvh.station).filter(Ny6I.date >= yKcO).group_by(Ny6I.station).all()
return pz3A(h3qM) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EiMG(yKcO, Os4s):\n dixj = cuiw.query(JfyU.min(Ny6I.tobs), JfyU.avg(Ny6I.tobs), JfyU.max(Ny6I.tobs)).filter(Ny6I.date >= yKcO).filter(Ny6I.date <= Os4s).all()\n EiMG = list(oyIN.ravel(dixj))\n return pz3A({'TMIN': EiMG[0], 'TAVG': EiMG[1], 'TMAX': EiMG[2]})",
"def Gjz4(yKcO, Os4s):\n dixj = syUx(... | [
"0.81238014",
"0.7936294",
"0.78305084",
"0.78276724",
"0.7778334",
"0.7753503",
"0.77208436",
"0.77205163",
"0.77172315",
"0.7693521",
"0.76440376",
"0.75631994",
"0.7534119",
"0.7514019",
"0.7367214",
"0.73634756",
"0.73443687",
"0.7333203",
"0.73140275",
"0.7235613",
"0.71... | 0.735616 | 16 |
Calculate and return Root Mean Squared Error (RMSE) | def iAxY(LVAh, amiz):
return ((LVAh - amiz) ** 2).mean() ** 0.5 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YNWb(cgmM, bdkc):\n P1dF = cgmM - bdkc.round()\n BKL_ = oyIN.sum(P1dF ** 2)\n SDab = oyIN.mean(BKL_)\n DF3U = epAf.sqrt(SDab)\n return DF3U",
"def XJS3(YKHO):\n IDgZ = oyIN.array([32, 212, 100, 98.6, 150, -15])\n jrTT = oyIN.array([35, 216, 90, 88.6, 153, -12])\n ddhc = BfDw.rmse(IDgZ... | [
"0.8151876",
"0.7988395",
"0.7849669",
"0.779532",
"0.77911305",
"0.7791093",
"0.77510965",
"0.7731341",
"0.7708987",
"0.7687374",
"0.7670803",
"0.76489407",
"0.76406235",
"0.7630037",
"0.76236475",
"0.7607639",
"0.75866085",
"0.7580134",
"0.75784546",
"0.7520311",
"0.7517721... | 0.7106462 | 66 |
Length of neuron collection. | def szAg(YKHO):
return len(YKHO.neurons) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def szAg(YKHO):\n return YKHO.nnodes",
"def szAg(YKHO) -> int:\n return len(YKHO.__nodes)",
"def zNig(YKHO):\n return len(YKHO.nodes)",
"def zNig(YKHO) -> int:\n return len(YKHO.nodes)",
"def szAg(YKHO):\n return len(YKHO.nodes)",
"def szAg(YKHO):\n return len(YKHO.nodes)",
"def szAg(... | [
"0.8072392",
"0.7901166",
"0.78696424",
"0.7867294",
"0.78259164",
"0.78191996",
"0.78154916",
"0.7792065",
"0.7750615",
"0.7729498",
"0.77163",
"0.77163",
"0.77163",
"0.7708613",
"0.7699932",
"0.7699932",
"0.76736647",
"0.7649087",
"0.7649087",
"0.7617251",
"0.7617251",
"0... | 0.8224006 | 0 |
Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix inorder arguments and keyword arguments. | def FIMM(YKHO, *qIxc, **c_sp):
if qIxc or c_sp:
super(tZPg, YKHO).__init__(*qIxc, **c_sp)
if YKHO.header is None:
YKHO.header = kKAJ.msg.Header()
if YKHO.method is None:
YKHO.method = ''
if YKHO.database_location is None:
YKHO.database_location = '... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, Ol8d=None):\n if Ol8d is not None:\n YKHO.message = Ol8d",
"def FIMM(YKHO, Ol8d=None):\n YKHO.message = Ol8d",
"def FIMM(YKHO, Ol8d=None):\n YKHO.message = Ol8d",
"def FIMM(YKHO, Ol8d=None):\n super().__init__()\n YKHO.message = Ol8d",
"def FIMM(YKHO, *qIxc, **c_sp):\n ... | [
"0.8167091",
"0.7721305",
"0.7721305",
"0.7653387",
"0.75735575",
"0.7544938",
"0.7486126",
"0.74712706",
"0.7458634",
"0.7447028",
"0.74456894",
"0.74340963",
"0.741523",
"0.7408652",
"0.73922",
"0.7376216",
"0.7364397",
"0.73264366",
"0.7325022",
"0.7325022",
"0.7325022",
... | 0.7140235 | 42 |
Get command line arguments. | def YvUC(E0cB):
xAU6 = UH90.utils.Struct()
if '-help' in E0cB:
print(__doc__)
exit()
qIxc = UH90.options.get_options(E0cB)
try:
xAU6.input = qIxc['args'][0]
xAU6.output = qIxc['args'][1]
except:
print(__doc__)
exit(1)
if '-deg_u' in qIxc:
x... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jgwn(YKHO):\n return YKHO.argv",
"def rwTO():\n wvEv = xuJu()\n qIxc = wvEv.parse_args()\n return qIxc",
"def rwTO(YKHO) -> x1iM[str]:\n return YKHO.m_argv",
"def BV7_():\n qIxc = {}\n for YRbF in range(len(HwRy.argv)):\n if HwRy.argv[YRbF].startswith('-') and YRbF + 1 < len(H... | [
"0.7827504",
"0.7640074",
"0.7618912",
"0.7500902",
"0.74771947",
"0.7470321",
"0.7415679",
"0.7387806",
"0.7387475",
"0.73485184",
"0.7346325",
"0.72762036",
"0.7224838",
"0.7219835",
"0.72037756",
"0.72028315",
"0.71800506",
"0.71605283",
"0.71504253",
"0.7145368",
"0.71202... | 0.0 | -1 |
Compute the intersection point between line defined by the normal, and bounding box. | def XMlP(u8R3, LTIa, cviu, R9Va=False, CqeB=False):
X46A = 0 * u8R3
YRbF = 0
for RMvl, mM0K in zip(u8R3, LTIa):
TNF5 = cviu[2][0]
HWOi = cviu[2][1]
if RMvl[1] > 0:
a1PO = (HWOi - mM0K[1]) / RMvl[1]
nJ9F = mM0K[0] + RMvl[0] * a1PO
if nJ9F <= TNF5 an... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hs1B(YKHO, zFiD):\n F4_u = zFiD.a\n O_Up = zFiD.dir()\n ciZM = O_Up.dot(YKHO.normal)\n if ciZM == 0:\n return None\n Csk6 = (YKHO.point - F4_u).dot(YKHO.normal) / ciZM\n if Csk6 < 0 or Csk6 > zFiD.length():\n return None\n return F4_u + O_Up * Csk6",
"def OuYx(YKHO, zFiD):\... | [
"0.7365049",
"0.71803516",
"0.7139319",
"0.6712498",
"0.66625845",
"0.6605419",
"0.65962845",
"0.65766776",
"0.6557922",
"0.65080893",
"0.6415448",
"0.63848674",
"0.6382092",
"0.6348362",
"0.6340381",
"0.6333936",
"0.6307171",
"0.62671435",
"0.6226402",
"0.62024754",
"0.61999... | 0.0 | -1 |
Parser that converts a FASTA to a dictionary of Parents, with sequence symbols as keys. | def Kcru(RAZV: TextIO, gZgb: Optional[Alphabet]=_LyC.NT_EXTENDED_GAPPED) -> cuzp[str, Z3mN]:
ACnF = {}
for ETu_ in Rg82.parse(RAZV, format='fasta'):
ACnF[ETu_.id] = q_m6(str(ETu_.seq), alphabet=gZgb, seq_id=ETu_.id)
return ACnF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jZQ6(URrF):\n Qza3 = {}\n with open(URrF, 'r') as eHNT:\n for zFiD in eHNT:\n zFiD = zFiD.rstrip()\n if zFiD.startswith('>'):\n tu8r = zFiD\n Qza3[tu8r] = []\n else:\n Qza3[tu8r].append(zFiD)\n return Qza3",
"def Ko... | [
"0.71060354",
"0.6861237",
"0.67836857",
"0.67617387",
"0.6693796",
"0.66609025",
"0.665969",
"0.6639002",
"0.6598136",
"0.6560701",
"0.6500912",
"0.6498227",
"0.6486517",
"0.64838237",
"0.64300853",
"0.6417679",
"0.640774",
"0.64011437",
"0.6359576",
"0.63335496",
"0.6272334... | 0.7794319 | 0 |
Retrieves the property value for localized content. This content is set by the locale code. | def JKC6(YKHO, T2c8, fYWe, BWXx, qrlW, IMvR=None):
bD7m = qjKC('/api/commerce/catalog/admin/products/{productCode}/Properties/{attributeFQN}/values/{value}/LocalizedContent/{localeCode}?responseFields={responseFields}', 'GET', rL8q.TenantPod, False)
bD7m.formatUrl('attributeFQN', fYWe)
bD7m.formatUrl('local... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BgR0(YKHO, T2c8, fYWe, BWXx):\n bD7m = qjKC('/api/commerce/catalog/admin/products/{productCode}/Properties/{attributeFQN}/values/{value}/LocalizedContent', 'GET', rL8q.TenantPod, False)\n bD7m.formatUrl('attributeFQN', fYWe)\n bD7m.formatUrl('productCode', T2c8)\n bD7m.formatUrl('value', BWXx)\n ... | [
"0.64810914",
"0.63145506",
"0.6256472",
"0.6195527",
"0.61863405",
"0.61788917",
"0.61708283",
"0.6164325",
"0.615956",
"0.6119476",
"0.6090159",
"0.6072093",
"0.60674804",
"0.60674804",
"0.6038829",
"0.6038829",
"0.6038829",
"0.6038829",
"0.6038829",
"0.6038829",
"0.6038829... | 0.6573154 | 0 |
Update information for an existing model instance. Please note that serverside data validation should happen in the model's init method somewhere. This method should capture instances of ModelError and return a Collection containing the appropriate error information. | def QdZT(YKHO, C3ST, nPrm, *qIxc, **B2fa):
raise NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QdZT(YKHO, KAOR, vGfb):\n raise dZis(KAOR, vGfb)",
"def QdZT(YKHO, KAOR, vGfb):\n pass",
"def uHqW(YKHO):\n raise NotImplementedError()",
"def QdZT(YKHO, KAOR, vGfb):\n try:\n Odpe = vGfb.pop('get_data_collection_methods')\n YKHO._save_dataset_datacollectionmethods(Odpe, KAOR)\n... | [
"0.64264625",
"0.63595444",
"0.63331527",
"0.6213036",
"0.61785865",
"0.60990036",
"0.6098516",
"0.6097767",
"0.6072625",
"0.60567266",
"0.59532845",
"0.5916615",
"0.5907038",
"0.5793147",
"0.5767782",
"0.5762366",
"0.5762366",
"0.5756976",
"0.5754367",
"0.5741472",
"0.571688... | 0.58994156 | 13 |
Model Constructor All models should implement this method. This method should raise a ModelError or a subclass of it when data supplied is invalid. Models should have an 'endpoint' property that can be set on init | def FIMM(YKHO, nPrm, *qIxc, **B2fa):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YZe9(YKHO):\n raise NotImplementedError()\n pass",
"def YZe9(YKHO):\n raise NotImplementedError()",
"def FIMM(YKHO, **B2fa):\n KcDH.__init__(YKHO, **B2fa)",
"def FIMM(YKHO, *qIxc, **B2fa):\n FYrf.Model.__init__(YKHO, *qIxc, **B2fa)\n YKHO.collection = 'paints'\n YKHO.mdb = P4t4.confi... | [
"0.7025603",
"0.69857",
"0.68025076",
"0.6801207",
"0.67751795",
"0.670822",
"0.668515",
"0.6660342",
"0.66274774",
"0.6613708",
"0.6601186",
"0.6601186",
"0.6601186",
"0.6563181",
"0.64900243",
"0.64776564",
"0.6468728",
"0.6438269",
"0.6423035",
"0.6413449",
"0.6380454",
... | 0.0 | -1 |
Return instance of DaskWrangler. | def seoq(zNig=None, Aofo=None, N5MO=0):
class DummyWrangler(blO6):
def SZFh(YKHO, jQ3Z):
if zNig is not None:
kzAT = rLdf.DataFrame(MD9L(zNig))
rsEw = I1iR.from_pandas(kzAT)
elif Aofo is not None:
rsEw = Aofo
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OWQD(YKHO):\n import OWQD\n return OWQD",
"def w_Lj():\n\n def seoq(zNig=None, Aofo=None, N5MO=0):\n \"\"\"Return instance of DaskWrangler.\n\n Parameters\n ----------\n size: float\n Memory size in MiB to allocate during transform step.\n result: Dask D... | [
"0.684897",
"0.620161",
"0.54909533",
"0.53794736",
"0.53642446",
"0.5350857",
"0.53454745",
"0.53251904",
"0.5323435",
"0.53082925",
"0.53065246",
"0.5302889",
"0.5257837",
"0.52489763",
"0.524446",
"0.5235057",
"0.5207339",
"0.51924837",
"0.516173",
"0.5143727",
"0.5130295"... | 0.5505656 | 2 |
A function to interpret the prior distributions from an Excel c&p job. Returns a dictionary indexed by parameter name and a pointer to a scipy.stats function that provides a logpdf method ;). It also returns a list that can be used to map from vector to dictionary. | def VI9f(yOAJ, DrvZ=None, kCYX=None):
POZ9 = {}
WdDP = []
IS17 = {}
AZQs = {}
if GkAb(yOAJ).exists():
with GkAb(yOAJ).open('r') as ytgA:
Y3p9 = ytgA.readlines()
else:
Y3p9 = yOAJ.split('\n')
for zFiD in Y3p9:
if not zFiD.strip().startswith('#'):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N6R_(YKHO, SGPK):\n FZPD = 0.0\n for H5ew, BWXx in SGPK.iteritems():\n HAax = H5ew.split('_')[1]\n if HAax == 'radius':\n FZPD += eQSh.distributions.uniform.logpdf(BWXx, 0.5, 2.5)\n elif HAax == 'scalingFactor':\n FZPD += eQSh.distributions.uniform.logpdf(BWXx, ... | [
"0.66947025",
"0.62896764",
"0.6048486",
"0.6042515",
"0.6004676",
"0.5967192",
"0.59651107",
"0.59447074",
"0.58624893",
"0.5860605",
"0.5848613",
"0.5825981",
"0.5816963",
"0.57386327",
"0.5725457",
"0.56625235",
"0.5656098",
"0.564938",
"0.56206954",
"0.56081843",
"0.55827... | 0.5601164 | 20 |
Merge the contents of dict_2 to dict_1. | def llfz(tMxp: Dict[Text, Any], LxWn: Dict[Text, Any]):
for H5ew, wEf2 in LxWn.items():
if H5ew in tMxp:
raise KeyError(f'Duplicate key: {H5ew} found in both dictionaries: {tMxp} {LxWn}.')
tMxp[H5ew] = wEf2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yQxF(WbPA, S69B):\n lXgg = WbPA.copy()\n lXgg.update(S69B)\n return lXgg",
"def roQF(WbPA, S69B):\n epBp = WbPA.copy()\n epBp.update(S69B)\n return epBp",
"def HSmM(tMxp, LxWn):\n return LxWn.update(tMxp)",
"def dYgY(YKHO, tMxp, LxWn):\n tMxp.update(LxWn)\n return tMxp",
"def... | [
"0.84996635",
"0.83522004",
"0.8083122",
"0.8056561",
"0.79539686",
"0.7944759",
"0.7898719",
"0.7845546",
"0.77724016",
"0.7746537",
"0.77452964",
"0.7742555",
"0.77142894",
"0.77119523",
"0.769971",
"0.7683903",
"0.7676851",
"0.7674762",
"0.76444775",
"0.7624693",
"0.761345... | 0.0 | -1 |
Return a human readable representation of the model instance. | def zAg0(YKHO):
return 'Beer: {}'.format(YKHO.name) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return YKHO.human_format()",
"def zAg0(YKHO):\n return YKHO.get_short_representation()",
"def wHJl(YKHO: BaseModel) -> str:\n sgKs = [f'{H5ew}={repr(BWXx)}' for H5ew, BWXx in YKHO.to_d... | [
"0.79135984",
"0.78678936",
"0.7781844",
"0.7657029",
"0.7606324",
"0.75974923",
"0.75643814",
"0.755032",
"0.75105006",
"0.7454013",
"0.7431607",
"0.74219894",
"0.735807",
"0.73349696",
"0.732425",
"0.732425",
"0.732425",
"0.732425",
"0.732425",
"0.732425",
"0.732425",
"0.... | 0.0 | -1 |
Return a human readable representation of the model instance. | def zAg0(YKHO):
return 'Snack: {}'.format(YKHO.name) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return YKHO.human_format()",
"def zAg0(YKHO):\n return YKHO.get_short_representation()",
"def wHJl(YKHO: BaseModel) -> str:\n sgKs = [f'{H5ew}={repr(BWXx)}' for H5ew, BWXx in YKHO.to_d... | [
"0.7913435",
"0.7867543",
"0.7781073",
"0.7656772",
"0.7606172",
"0.7597312",
"0.7564931",
"0.7550362",
"0.75101286",
"0.7454313",
"0.74322736",
"0.7422165",
"0.73582166",
"0.73346543",
"0.73246557",
"0.73246557",
"0.73246557",
"0.73246557",
"0.73246557",
"0.73246557",
"0.732... | 0.0 | -1 |
Gets the max bank capacity from a user | def D9eM(uJjO: int):
ioYZ = h_xz(db=mI2x['DATABASE']['currencyDB'], table='global_balance_max_bank', table_values='(user_id int, max_bank int)', exe=f'SELECT max_bank FROM global_balance_max_bank WHERE user_id = {uJjO}')
if ioYZ:
return ioYZ
else:
RmiO(uJjO)
return [(500,)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RmiO(uJjO: int):\n a_Od(db=mI2x['DATABASE']['currencyDB'], table='global_balance_max_bank', table_values='(user_id int, max_bank int)', parameters=(uJjO, 500), questions='(?, ?)')",
"def QzRo(YKHO):\n if YKHO.SelectedCard.BankName != 'NBE':\n return 2000\n elif YKHO.SelectedCard.accountType =... | [
"0.6727321",
"0.6649984",
"0.6638997",
"0.6576017",
"0.6573036",
"0.6573036",
"0.6573036",
"0.65638095",
"0.65510035",
"0.65084666",
"0.6508407",
"0.6498352",
"0.648511",
"0.64768225",
"0.64768225",
"0.64749104",
"0.64549434",
"0.64443696",
"0.6441389",
"0.62921995",
"0.62874... | 0.7772974 | 0 |
Clear the history of the agent and resets the module and learner. | def SiRx(YKHO):
Co1X.reset(YKHO)
YKHO.module.reset()
if YKHO.learning:
YKHO.learner.reset() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SiRx(YKHO):\n raise NotImplementedError('Agent must implement reset method.')",
"def SiRx(YKHO):\n YKHO.reset_agent_position()\n YKHO.reset_environment()",
"def SiRx(YKHO):\n YKHO._history = []",
"def SiRx(YKHO):\n YKHO.history = [YKHO.start_state()]\n YKHO.visit_counts = []\n YKHO.q... | [
"0.7546032",
"0.74489164",
"0.7434158",
"0.74338436",
"0.740037",
"0.740037",
"0.740037",
"0.740037",
"0.7380591",
"0.73777515",
"0.73177016",
"0.7244121",
"0.7190654",
"0.71634686",
"0.71289986",
"0.71167165",
"0.7098103",
"0.70639294",
"0.70624304",
"0.70624304",
"0.7033633... | 0.81984484 | 0 |
Create and return a simple curve using given parameters. | def pl7_(YKHO, xlFH, ZSUn, N0B_, oixM, Mx_q, hpL0, *qIxc):
LanN = ccKF.curve(name=xlFH, point=N0B_, degree=ZSUn, knot=oixM, periodic=Mx_q)
YKHO.addControlInfo(LanN, dpGuide=hpL0)
YKHO.ctrls.renameShape([LanN])
return LanN | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AdZ9(*qIxc, **B2fa):\n pass",
"def fVnP(*qIxc, **B2fa):\n pass",
"def yna0(WKvO, LVAh, mWFP='Curve', IznC='', VoLU='', IICq='', leAC='', Wgp8=''):\n if len(WKvO) != len(LVAh):\n print(f\"Curve {mWFP} doesn't have the same length: len(x)={len(WKvO)} and len(y)={len(LVAh)} \")\n mWFP +... | [
"0.7429044",
"0.70765203",
"0.68647414",
"0.67762095",
"0.6764053",
"0.67164326",
"0.67014503",
"0.6536179",
"0.6435608",
"0.64268553",
"0.6419099",
"0.6407329",
"0.6394752",
"0.6370923",
"0.63682854",
"0.63537633",
"0.6319624",
"0.6271516",
"0.6230392",
"0.62277377",
"0.6169... | 0.6045206 | 27 |
Creates an instance of this model from a dictionary | def rQfz(Emd4, cmPJ):
if cmPJ is None:
return None
BZ2A = cmPJ.get('featureName')
nZZn = cmPJ.get('overusedGiB')
yloK = cmPJ.get('overusedVm')
return Emd4(BZ2A, nZZn, yloK) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rQfz(Emd4, cmPJ):\n if cmPJ == None:\n return None\n else:\n mWFP = cmPJ.get('name')\n l8cJ = cmPJ.get('generic_id')\n Gsi3 = cmPJ.get('therauptic_uses')\n PALZ = cmPJ.get('search_score')\n return Emd4(mWFP, l8cJ, Gsi3, PALZ)",
"def rQfz(Emd4, cmPJ):\n if cm... | [
"0.83720714",
"0.83362204",
"0.82162297",
"0.8168461",
"0.8168461",
"0.81481326",
"0.8052129",
"0.80303043",
"0.801412",
"0.7979297",
"0.792218",
"0.7919035",
"0.7918213",
"0.7913218",
"0.7906526",
"0.7897704",
"0.788651",
"0.7876737",
"0.7854689",
"0.7854689",
"0.78535086",
... | 0.7900627 | 15 |
Get the list of all words (excluding words that only exist as synonyms). | def vwCE(QePW):
V22M = KLCG.objects.prefetch_related('synonyms').filter(full_word=True)
return jnRN({'words': [{'word': GIN8.word, 'synonyms': list(GIN8.synonyms.values('id', 'word')), 'id': GIN8.id} for GIN8 in V22M]}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def l2NP(YKHO):\n PVn9 = []\n if YKHO.synonyms:\n PVn9 = [KCHu.synonym for KCHu in YKHO.synonyms.all()]\n return PVn9",
"def ZKLx(GIN8):\n PVn9 = set()\n for H9lX in WnSJ.synsets(GIN8):\n for vC9B in H9lX.lemmas():\n if '_' not in vC9B.name():\n PVn9.add(vC9... | [
"0.77557755",
"0.7589043",
"0.7548715",
"0.75463074",
"0.75003827",
"0.74776775",
"0.7442265",
"0.7411126",
"0.7350899",
"0.73345166",
"0.7326071",
"0.73126435",
"0.7292914",
"0.72436136",
"0.72038734",
"0.7202095",
"0.71966803",
"0.7166767",
"0.7126969",
"0.71055114",
"0.708... | 0.0 | -1 |
If is not set, sets it based on the project data. | def s8No(YKHO, hnFq):
hksT = hnFq.get('location')
if not hksT:
hksT = Hy7s.path.join(YKHO.project().get('location'), YKHO.name())
hnFq = hnFq.add_raw(['<location>' + hksT])
return hnFq | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UX6H(YKHO, bNKA):\n if bNKA is None and YKHO.project is None:\n return None\n elif bNKA is None:\n return YKHO.project\n else:\n return bNKA",
"def gcbE(YKHO):\n VdGn = YKHO.getCurrentProjectName()\n if YKHO._project is None or YKHO._project.name != VdGn or (VdGn != '' or ... | [
"0.72966677",
"0.72224915",
"0.7103112",
"0.71028197",
"0.7098052",
"0.70656425",
"0.7014422",
"0.6976876",
"0.6966424",
"0.6934606",
"0.68717116",
"0.67661333",
"0.6760956",
"0.6712682",
"0.66828036",
"0.66817266",
"0.6653328",
"0.6585876",
"0.65611404",
"0.6536227",
"0.6526... | 0.0 | -1 |
Initialises a deque of Nodes of length self.max_size | def grYf(YKHO):
return oyIN.zeros(YKHO.max_size) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, E0wO):\n YKHO.buffer = MUE7(maxlen=E0wO)",
"def FIMM(YKHO):\n YKHO.nodes = MUE7()",
"def FIMM(YKHO):\n YKHO.nodes = [None] * g5js.DEFAULT_CAPACITY\n YKHO.front = 0\n YKHO.size = 0",
"def FIMM(YKHO, yjza):\n YKHO.buffer = MUE7(maxlen=yjza)",
"def FIMM(YKHO, zNig):\n YKHO.... | [
"0.7629108",
"0.75716853",
"0.75623435",
"0.73435354",
"0.732043",
"0.71156967",
"0.706755",
"0.70506287",
"0.7039773",
"0.70265055",
"0.7003684",
"0.69598943",
"0.6923597",
"0.6850297",
"0.68221444",
"0.6792463",
"0.67891043",
"0.6752737",
"0.673884",
"0.67360723",
"0.666973... | 0.0 | -1 |
Updates the deque by overwriting the oldest experience with the experience provided | def ZViA(YKHO, f16j, QTBn, XeOP, vOGg, rxHc, _ins):
YKHO.deques_td_errors[YKHO.deque_index_to_overwrite_next] = f16j
YKHO.add_element_to_deque(f16j, (QTBn, XeOP, vOGg, rxHc, _ins)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _jXH(YKHO, GsKL):\n if YKHO.position >= YKHO.capacity:\n YKHO.position = 0\n if len(YKHO.memory) < YKHO.capacity:\n YKHO.memory.append(None)\n YKHO.memory[YKHO.position] = GsKL\n YKHO.position += 1",
"def H2v5(YKHO, GsKL):\n if len(YKHO.buffer) + 1 >= YKHO.buffer_size:\n Y... | [
"0.6718529",
"0.67122483",
"0.66724503",
"0.640462",
"0.6391311",
"0.6386132",
"0.6312368",
"0.6305391",
"0.6305391",
"0.6291261",
"0.62809855",
"0.62366843",
"0.62141156",
"0.61974776",
"0.61877227",
"0.60587686",
"0.59673786",
"0.5847246",
"0.5840087",
"0.58232886",
"0.5808... | 0.0 | -1 |
Swaps two position of two heap elements and then updates the heap_index stored in the two nodes. We have to override this method from Max_Heap so that it also updates the heap_index variables | def DEfK(YKHO, oZf4, YBiN):
YKHO.heap[oZf4], YKHO.heap[YBiN] = (YKHO.heap[YBiN], YKHO.heap[oZf4])
YKHO.heap[oZf4].heap_index = oZf4
YKHO.heap[YBiN].heap_index = YBiN | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zh_p(YKHO, mMd7, d1Z_):\n ycBG = YKHO.heap_array[mMd7]\n YKHO.heap_array[mMd7] = YKHO.heap_array[d1Z_]\n YKHO.heap_array[d1Z_] = ycBG",
"def zh_p(YKHO, HBhx, yAS6):\n QCSZ = YKHO._heap[HBhx]\n YKHO._heap[HBhx] = YKHO._heap[yAS6]\n YKHO._heap[yAS6] = QCSZ",
"def b3SJ(YKHO, YRbF, r845):\n ... | [
"0.7757118",
"0.7513468",
"0.71523046",
"0.7069936",
"0.6954361",
"0.68324655",
"0.6758187",
"0.67084783",
"0.66786784",
"0.6617332",
"0.65892315",
"0.6557065",
"0.6529053",
"0.65145385",
"0.6486499",
"0.64331925",
"0.63816965",
"0.6373366",
"0.63533664",
"0.63308966",
"0.630... | 0.8096979 | 0 |
Randomly samples a batch from experiences giving a higher likelihood to experiences with a higher td error. It then | def mvm2(YKHO, **B2fa):
YKHO.sample_counter += 1
YKHO._update_beta()
wfZK, bGSJ = YKHO.pick_experiences_based_on_proportional_td_error()
wspz, xASv, vwlo, BKVD, nQSc = YKHO.separate_out_data_types(wfZK)
YKHO.deque_sample_indexes_to_update_td_error_for = bGSJ
jYUZ = YKHO.calculate_importance_samp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mvm2(YKHO, Ep8u):\n wfZK = tuKI.sample(YKHO.memory, k=Ep8u)\n wspz = ht2j.from_numpy(oyIN.vstack([tTpl.state for tTpl in wfZK if tTpl is not None])).float().to(YKHO.device)\n xASv = ht2j.from_numpy(oyIN.vstack([tTpl.action for tTpl in wfZK if tTpl is not None])).float().to(YKHO.device)\n vwlo = ht2... | [
"0.69660217",
"0.6926733",
"0.6876619",
"0.67998",
"0.6797072",
"0.6711466",
"0.66276336",
"0.6603992",
"0.65920293",
"0.65345967",
"0.6522228",
"0.6517487",
"0.65161216",
"0.65128946",
"0.6504005",
"0.65037817",
"0.6486476",
"0.64673644",
"0.64673644",
"0.64673644",
"0.64656... | 0.65410155 | 9 |
returns the class used for this value broker | def mBOY(YKHO):
return YKHO.__clazz | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZvYj(YKHO):\n return YKHO._class",
"def PWg9(YKHO):\n return YKHO.__class",
"def ZvYj(YKHO):\n return YKHO.__class__",
"def ZvYj(YKHO):\n return YKHO.__class__",
"def XUrR(YKHO):\n return YKHO._get_class(YKHO.receiver)",
"def PWg9(YKHO) -> str:\n return YKHO.__class",
"def Pwv8(YK... | [
"0.76464796",
"0.759018",
"0.7426082",
"0.7426082",
"0.72897583",
"0.72458285",
"0.72185814",
"0.7127397",
"0.7123767",
"0.70810044",
"0.7006521",
"0.697189",
"0.69641346",
"0.69641346",
"0.69171387",
"0.68987054",
"0.6863721",
"0.6856419",
"0.6824648",
"0.6801277",
"0.677841... | 0.66951513 | 35 |
Returns auth token retrived from request header. | def AAND():
MkeE = WsL5.request.headers.get('Authorization')
rxBR = ''
if MkeE:
rxBR = MkeE.split(' ')[1]
return rxBR | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bIrX(QePW):\n Jpbe = QePW.META.get('HTTP_AUTHORIZATION', None)\n SQ3m = Jpbe.split()\n eOtH = SQ3m[1]\n return eOtH",
"def bIrX(QePW):\n Jpbe = QePW.META.get('HTTP_AUTHORIZATION', None)\n SQ3m = Jpbe.split()\n eOtH = SQ3m[1]\n return eOtH",
"def bIrX():\n if 'Authorization' not i... | [
"0.8734394",
"0.8734394",
"0.8658537",
"0.8608413",
"0.8515901",
"0.85034955",
"0.8475738",
"0.84632266",
"0.8414311",
"0.8414311",
"0.8414311",
"0.83350605",
"0.83106285",
"0.81824875",
"0.8146596",
"0.81244755",
"0.81218714",
"0.81052536",
"0.8052863",
"0.79666597",
"0.7935... | 0.84598 | 8 |
Decorator for instance methods on Database that need a sqlalchemy session. This wrapping function creates a new session with the Database's engine and passes it to the instance method to use. Everything is inside a trycatch statement, so if something goes wrong, this prints a nice error string and fails gracefully. In ... | def DsKe(WmM4=lambda: None, jSYO=False):
def GDMi(JfyU):
def pOv4(NCls, *qIxc, **B2fa):
cuiw = NCls.get_session()
try:
Aofo = JfyU(NCls, cuiw, *qIxc, **B2fa)
if jSYO:
cuiw.commit()
except Exception:
if ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ouvA(JfyU):\n\n @zaGL(JfyU)\n def h3Xc(*qIxc, **B2fa):\n if 'session' not in B2fa:\n cuiw = DMju()\n B2fa['session'] = cuiw\n try:\n Aofo = JfyU(*qIxc, **B2fa)\n cuiw.commit()\n return Aofo\n except Exception:... | [
"0.6914032",
"0.67928654",
"0.6652055",
"0.64610994",
"0.63013256",
"0.6248395",
"0.6203104",
"0.61962736",
"0.61019355",
"0.60964066",
"0.60867614",
"0.595874",
"0.59573656",
"0.5955386",
"0.59425867",
"0.5907181",
"0.5892366",
"0.5839845",
"0.5780611",
"0.57752085",
"0.5758... | 0.74087125 | 0 |
A list of categorical variables along with the fixed values which define the hyperpartition. Each element is a ('name', HyperParameter) tuple. | def t2bL(YKHO):
return PG_7(YKHO.categoricals64) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LNw9(YKHO, euK9, uwaB, ulY8, ejh2):\n if not ulY8:\n return [vt8O(euK9, uwaB, ejh2)]\n SQ3m = []\n ACia = ulY8.pop(0)\n for wEf2 in YKHO.parameters[ACia].range:\n gLy0 = euK9 + [(ACia, wEf2)]\n _xql = uwaB[:]\n UR__ = ulY8[:]\n Avmp = ejh2[:]\n if ACia in Y... | [
"0.6532476",
"0.5814416",
"0.58136076",
"0.5787664",
"0.5476367",
"0.54711366",
"0.5416616",
"0.5410641",
"0.5392158",
"0.53698343",
"0.52658165",
"0.5254915",
"0.5216555",
"0.5206881",
"0.52060205",
"0.520429",
"0.5204065",
"0.5198313",
"0.51908547",
"0.5189585",
"0.5179015"... | 0.0 | -1 |
Get a specific classifier. | def hBhl(YKHO, cuiw, XiV6):
return cuiw.query(YKHO.Hyperpartition).get(XiV6) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UCa5():\n return haER()[_rcs]",
"def UCa5(av29=None):\n pass",
"def UCa5(YKHO, cuiw, cvdj):\n return cuiw.query(YKHO.Classifier).get(cvdj)",
"def UCa5(YKHO, cvdj):\n NArs = {'version': YKHO.version}\n return YKHO.request(method='GET', url='/v3/classifiers/{0}'.format(cvdj), params=NArs, ac... | [
"0.8312579",
"0.78095776",
"0.7791461",
"0.7636862",
"0.75988734",
"0.7590302",
"0.7590302",
"0.7590302",
"0.7590302",
"0.7590302",
"0.7590302",
"0.7590302",
"0.7590302",
"0.7590302",
"0.7543536",
"0.7251644",
"0.71979505",
"0.71605855",
"0.71199995",
"0.7114084",
"0.71042365... | 0.0 | -1 |
Get a specific classifier. | def UCa5(YKHO, cuiw, cvdj):
return cuiw.query(YKHO.Classifier).get(cvdj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UCa5():\n return haER()[_rcs]",
"def UCa5(av29=None):\n pass",
"def UCa5(YKHO, cvdj):\n NArs = {'version': YKHO.version}\n return YKHO.request(method='GET', url='/v3/classifiers/{0}'.format(cvdj), params=NArs, accept_json=True)",
"def UCa5(mWFP, _fuv, PJWX):\n LCet = '.'.join(['sklearn'] +... | [
"0.8312579",
"0.78095776",
"0.7636862",
"0.75988734",
"0.7590302",
"0.7590302",
"0.7590302",
"0.7590302",
"0.7590302",
"0.7590302",
"0.7590302",
"0.7590302",
"0.7590302",
"0.7543536",
"0.7251644",
"0.71979505",
"0.71605855",
"0.71199995",
"0.7114084",
"0.71042365",
"0.7058424... | 0.7791461 | 2 |
Check whether gridding is done for the entire datarun. | def jNSE(YKHO, cuiw, Uagf):
YfWD = cuiw.query(YKHO.Hyperpartition).filter(YKHO.Hyperpartition.datarun_id == Uagf).all()
J1ea = True
for OEXQ in YfWD:
if OEXQ.status == jOFC.INCOMPLETE:
J1ea = False
return J1ea | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oCPJ(YKHO) -> bool:\n return not any((any((VmPb.is_empty for VmPb in rdlD)) for rdlD in YKHO.__grid))",
"def MFNm(YKHO):\n return all(('___' not in rdlD for rdlD in YKHO.board))",
"def Ceq0(YKHO):\n iVRZ = YKHO.cells\n for dQgj, YEnM in enumerate(iVRZ):\n M1C2 = dQgj + 1\n if M1C2... | [
"0.6217553",
"0.5718224",
"0.5717048",
"0.5698743",
"0.56290746",
"0.5534394",
"0.5524671",
"0.55031085",
"0.5496098",
"0.5466758",
"0.5456406",
"0.54480994",
"0.54394984",
"0.54263246",
"0.5421591",
"0.5407669",
"0.5401894",
"0.5401849",
"0.53738254",
"0.5352665",
"0.5350773... | 0.7504342 | 0 |
Get the number of classifiers that have errored using a specified hyperpartition. | def mwfH(YKHO, cuiw, XiV6):
DFHl = cuiw.query(YKHO.Classifier).filter(nWJV(YKHO.Classifier.hyperpartition_id == XiV6, YKHO.Classifier.status == S48F.ERRORED)).all()
return len(DFHl) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qAkm(YKHO):\n return sum((UHFx > YKHO._max_per_instance_failures for UHFx in YKHO._failures_by_instance.values()))",
"def iKmY(YKHO):\n return YKHO._fail_counter",
"def NzpM(YKHO):\n return YKHO._num_failed",
"def f8MS(YKHO):\n return YKHO.num_failing_tests",
"def nfnw(PjQx, w75t):\n yk4... | [
"0.63611275",
"0.61911416",
"0.6143933",
"0.6119391",
"0.5973874",
"0.5941383",
"0.58482635",
"0.58482635",
"0.5848241",
"0.5831735",
"0.5818558",
"0.58052087",
"0.57923937",
"0.5761074",
"0.5699856",
"0.5696987",
"0.56726146",
"0.5666624",
"0.56614655",
"0.5660643",
"0.56446... | 0.8262587 | 0 |
Get the maximum value of a numeric column by name, or None. | def jPrF(YKHO, cuiw, Uagf, z9ET):
Aofo = cuiw.query(JfyU.max(getattr(YKHO.Classifier, z9ET))).filter(YKHO.Classifier.datarun_id == Uagf).one()[0]
if Aofo:
return float(Aofo)
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qfB5(YKHO, tyNF, iVRZ, iPqd=''):\n return int(YKHO.get_column_with_func_cond(tyNF, iVRZ, 'MAX', iPqd))",
"def qfB5(YKHO, tyNF, iVRZ, iPqd=''):\n return int(YKHO.get_column_with_func_cond(tyNF, iVRZ, 'MAX', iPqd))",
"def zvAe(YKHO, qqbS):\n return YKHO.df[qqbS].max()",
"def bY8H(YKHO, GTA_, iVRZ,... | [
"0.72133",
"0.72133",
"0.7178834",
"0.6871391",
"0.68346804",
"0.6706847",
"0.6662124",
"0.6636429",
"0.658609",
"0.6583058",
"0.6552771",
"0.6495259",
"0.6431231",
"0.63611853",
"0.6330025",
"0.632996",
"0.62914866",
"0.6230689",
"0.6213826",
"0.6196061",
"0.6195306",
"0.6... | 0.0 | -1 |
Returns all the labels used to classify mails | def Umo8(YKHO) -> x1iM[str]:
dixj = YKHO.service.users().labels().list(userId='me').execute()
return list(dixj.get('labels', [])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Te1x(YKHO):\n return ['toxic', 'severe_toxic', 'obscene', 'threat', 'insult', 'identity_hate']",
"def Te1x(YKHO) -> list:\n return []",
"def Te1x(YKHO):\n return []",
"def Te1x(YKHO):\n return []",
"def Te1x(YKHO):\n pass",
"def Te1x(YKHO):\n pass",
"def Te1x(YKHO):\n Crrw = {}... | [
"0.7255895",
"0.7230438",
"0.7193576",
"0.7193576",
"0.71838576",
"0.71838576",
"0.7077458",
"0.70149887",
"0.6991899",
"0.6989939",
"0.6987239",
"0.6987239",
"0.6980168",
"0.69627684",
"0.69551075",
"0.6950211",
"0.69401115",
"0.6936599",
"0.6915559",
"0.69146204",
"0.690224... | 0.0 | -1 |
Handles password reset tokens When a token is created, an email needs to be sent to the user | def QcQe(vC92, KAOR, Wne8, *qIxc, **B2fa):
QpfX = {'current_user': Wne8.user, 'username': Wne8.user.username, 'email': Wne8.user.email, 'reset_password_url': '{}?token={}'.format(gxEw('password_reset:reset-password-request'), Wne8.key)}
print('sending email')
U4ZT = 'Sign In to Sales Discovery Platform'
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QcQe(vC92, KAOR, Wne8, *qIxc, **B2fa):\n QpfX = {'current_user': Wne8.user, 'username': Wne8.user.username, 'email': Wne8.user.email, 'reset_password_url': '{}?token={}'.format(gxEw('api-auth:password_reset:reset-password-request'), Wne8.key), 'token': Wne8.key}\n try:\n geh0 = d7e_('reset_passwor... | [
"0.81950283",
"0.81334376",
"0.8112022",
"0.80741954",
"0.80347055",
"0.8020222",
"0.7955087",
"0.7553434",
"0.7354387",
"0.7243814",
"0.7233957",
"0.7221556",
"0.7138631",
"0.71189386",
"0.70866287",
"0.70846534",
"0.7054282",
"0.7031943",
"0.6959371",
"0.6950877",
"0.694312... | 0.8223141 | 0 |
The user that created the inventory. | def tC0c(YKHO):
bD7m = YKHO._data.get('related', {}).get('created_by')
return YKHO._tower._get_object_by_url('User', bD7m) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CBIr(YKHO):\n return YKHO.data.user",
"def CBIr(YKHO):\n return YKHO._user",
"def CBIr(YKHO):\n return YKHO.request_obj.user",
"def CBIr(YKHO):\n return YKHO._user",
"def CBIr(YKHO):\n return YKHO._user",
"def CBIr(YKHO):\n return YKHO._user",
"def CBIr(YKHO):\n return YKHO._us... | [
"0.7465386",
"0.73761666",
"0.73706377",
"0.73560834",
"0.73560834",
"0.73560834",
"0.73560834",
"0.73560834",
"0.73560834",
"0.73560834",
"0.73560834",
"0.73560834",
"0.73560834",
"0.73560834",
"0.732118",
"0.72702146",
"0.7244134",
"0.7226362",
"0.7226362",
"0.72215295",
"0... | 0.0 | -1 |
The name of the inventory. | def mWFP(YKHO):
return YKHO._data.get('name') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mWFP(YKHO):\n return YKHO._inventory_group.get_name()",
"def mWFP(YKHO):\n return YKHO._inventory_host.get_name()",
"def mWFP(YKHO):\n return YKHO._volume.get('name')",
"def mWFP(YKHO):\n return YKHO._item.name",
"def zDRZ(YKHO):\n return YKHO._item_name",
"def zDRZ(YKHO):\n return ... | [
"0.8136664",
"0.8104588",
"0.7170036",
"0.71657217",
"0.71514535",
"0.71514535",
"0.70239955",
"0.68722415",
"0.6837744",
"0.6813521",
"0.6715117",
"0.66846454",
"0.66846454",
"0.66846454",
"0.66846454",
"0.66846454",
"0.66846454",
"0.66846454",
"0.66846454",
"0.66846454",
"0... | 0.0 | -1 |
The description of the inventory. | def JBZA(YKHO):
return YKHO._data.get('description') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n o6kd = ''\n for H5ew, JDTf in YKHO.inventory.items():\n o6kd += f'{H5ew}: {JDTf.description}\\n'\n return o6kd.strip()",
"def tFvq(YKHO):\n YKHO.msg({'inventory': YKHO.return_inventory()})",
"def P6Q9(YKHO):\n print(YKHO.__item_dict)",
"def USfi(YKHO):\n DumB = ''\n... | [
"0.751049",
"0.74910253",
"0.7484424",
"0.7472991",
"0.7154098",
"0.71169484",
"0.7116339",
"0.7105386",
"0.709293",
"0.709293",
"0.709293",
"0.709293",
"0.709293",
"0.709293",
"0.709293",
"0.709293",
"0.709293",
"0.709293",
"0.709293",
"0.709293",
"0.709293",
"0.709293",
... | 0.0 | -1 |
The total number of hosts in the inventory. | def VBYa(YKHO):
return YKHO._data.get('total_hosts') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zxwu(YKHO):\n if HwRy.version_info[0] < 3:\n return YKHO.network_object.numhosts\n else:\n return 2 ** (32 - YKHO.network_object.prefixlen)",
"def zxwu(YKHO):\n if HwRy.version_info[0] < 3:\n return YKHO.network_object.numhosts\n else:\n return 2 ** (128 - YKHO.network... | [
"0.7620867",
"0.76035166",
"0.75597984",
"0.7261652",
"0.7173176",
"0.7078875",
"0.692517",
"0.692517",
"0.6816806",
"0.6661286",
"0.6634385",
"0.6624688",
"0.6614181",
"0.6589266",
"0.6555178",
"0.6534876",
"0.650122",
"0.6456185",
"0.64123327",
"0.6387437",
"0.63742423",
... | 0.8438975 | 0 |
The number of hosts with active failures. | def GVwZ(YKHO):
return YKHO._data.get('hosts_with_active_failures') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kuAK():\n uSbu = f1Cb.available_bits()\n kuAK = 2 ** uSbu - 2\n return kuAK",
"def fUkl(YKHO):\n return len(YKHO.__fetch_times)",
"def VBYa(YKHO):\n return YKHO._data.get('total_hosts')",
"def VBYa(YKHO):\n return YKHO._data.get('total_hosts')",
"def aHbR(YKHO):\n return len(YKHO.d... | [
"0.7491538",
"0.7456386",
"0.73585117",
"0.73585117",
"0.71618277",
"0.7128503",
"0.711885",
"0.70571566",
"0.6996031",
"0.69093233",
"0.68901974",
"0.6875559",
"0.68573445",
"0.6846771",
"0.679975",
"0.67823964",
"0.6757876",
"0.670374",
"0.660666",
"0.659774",
"0.65558124",... | 0.8537433 | 0 |
The groups of the inventory. | def moMn(YKHO):
return YKHO._tower.groups.filter({'inventory': YKHO.id}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def moMn(YKHO):\n if not YKHO._inventory_groups:\n YKHO._inventory_groups = YKHO._inventory_host.get_groups() + [YKHO._root_group]\n YKHO._inventory_groups = XN37.sort_groups(YKHO._inventory_groups)\n return [XeII(Oa1e, YKHO._root_group) for Oa1e in YKHO._inventory_groups]",
"def moMn(YKHO):\... | [
"0.8621509",
"0.7896805",
"0.7896805",
"0.78760463",
"0.7866432",
"0.7866432",
"0.7866432",
"0.7866432",
"0.7866432",
"0.7866432",
"0.7866432",
"0.7866432",
"0.786203",
"0.7815598",
"0.7758665",
"0.7751479",
"0.77275383",
"0.7634986",
"0.759058",
"0.7587374",
"0.7547653",
"... | 0.85948306 | 1 |
Get the sum of the relevant transactions | def h4aS(YKHO, PVP3):
wjRY = 0
for KQvW in PVP3:
wjRY += KQvW.amount
return wjRY | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bfZj(QePW, QWsF):\n sum = IzJG.objects.filter(T8ck(parents__id=QWsF) | T8ck(id=QWsF)).annotate(kbH2('id')).aggregate(zphJ('amount'))\n return oGir({'sum': sum['amount__sum']})",
"def gl8n(gQVK):\n from Acquire.Accounting import Balance as oHgT\n from Acquire.Accounting import TransactionInfo as p... | [
"0.7623455",
"0.7432247",
"0.7370049",
"0.7327801",
"0.7290245",
"0.7163269",
"0.7158247",
"0.7069614",
"0.7045064",
"0.70130014",
"0.69715375",
"0.69640815",
"0.69499683",
"0.6918151",
"0.691586",
"0.6860193",
"0.68426955",
"0.68261206",
"0.67986536",
"0.67909735",
"0.677798... | 0.71821797 | 5 |
Returns first non empty property of given object. | def hETp(object, C9U5):
C9U5 = C9U5.split(',')
for property in C9U5:
xC3W = getattr(object, property, '')
if xC3W:
return xC3W
return '' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cntZ(YEnM):\n return next(iter(YEnM))",
"def amy9(YEnM, mWFP):\n if mWFP not in YEnM:\n return ''\n else:\n return YEnM[mWFP]",
"def jxrn(YEnM, QWcs):\n return getattr(YEnM, QWcs) if YEnM != None and hasattr(YEnM, QWcs) else None",
"def mFEL(YKHO, mWFP):\n for QWcs in YKHO.pr... | [
"0.6719161",
"0.6717715",
"0.6599257",
"0.62458426",
"0.62311846",
"0.62240607",
"0.6129788",
"0.598343",
"0.5979496",
"0.5950097",
"0.5858838",
"0.5818972",
"0.5749648",
"0.57494706",
"0.57260925",
"0.56863123",
"0.56599015",
"0.565671",
"0.5648225",
"0.56399673",
"0.5637743... | 0.66301954 | 2 |
Returns JSON string of a list of dictionaries | def IZ3T(F986):
if F986 is None or len(F986) == 0:
return '[]'
return qQXR.dumps(F986) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def afIm(B74l):\n rgHr = qQXR.dumps(B74l, indent=2)\n return rgHr",
"def IZ3T(F986):\n import json\n if not F986:\n return '[]'\n return json.dumps(F986)",
"def IZ3T(F986):\n if F986 is None:\n F986 = []\n return qQXR.dumps(F986)",
"def IZ3T(F986):\n if not F986:\n ... | [
"0.845526",
"0.7900319",
"0.78785187",
"0.7828077",
"0.7781214",
"0.77788514",
"0.77788514",
"0.77760834",
"0.7757829",
"0.77413946",
"0.77413946",
"0.77218187",
"0.7718945",
"0.7709119",
"0.76870924",
"0.76869786",
"0.76798844",
"0.7674002",
"0.7674002",
"0.7674002",
"0.7674... | 0.76689136 | 24 |
Load JSON dict from path. Params | def tyeH(Emd4, pmON: str):
with open(pmON) as eHNT:
YEnM = qQXR.load(eHNT)
if not isinstance(YEnM, dict):
raise ValueError(f'Expected JSON file to contain a dict, got {YEnM!r}')
return Emd4(pmON, Hy7s.path.dirname(pmON), YEnM) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def onCp(pmON) -> dict:\n with open('{}/{}'.format(pmON, 'params.json')) as CF9_:\n return qQXR.load(CF9_)",
"def IkbX(pmON):\n try:\n with open(pmON, 'r') as apum:\n nPrm = qQXR.load(apum)\n except (IOError, ValueError):\n nPrm = {'items': {}, 'loc': {}}\n return nPrm... | [
"0.7816451",
"0.77841276",
"0.7477855",
"0.7407322",
"0.74004716",
"0.72797334",
"0.72613925",
"0.72109205",
"0.71896684",
"0.7153256",
"0.71394706",
"0.7119712",
"0.71029043",
"0.70929897",
"0.70929897",
"0.7087812",
"0.708724",
"0.70716614",
"0.7055408",
"0.7050896",
"0.704... | 0.67330873 | 47 |
Combs recursively through a list/dictionary and finds any nonjson \ compatible elements and converts them. E.g. complex ndarray's are \ converted to lists of strings. Assume that all such elements are \ stored in dictionaries! | def hw_s(gr4l):
if gr4l is None:
return gr4l
ZVgY = []
for W7ci, mCWi in enumerate(gr4l):
if isinstance(gr4l, list):
Rst0 = W7ci
else:
Rst0 = mCWi
if isinstance(gr4l[Rst0], (list, dict)):
hw_s(gr4l[Rst0])
elif isinstance(gr4l[Rst0],... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qsfD(YKHO, kGys):\n nzUn = type(kGys)\n if nzUn is dict or nzUn is VSuX:\n for H5ew in kGys:\n BWXx = kGys[H5ew]\n fX1C = type(BWXx)\n if H5ew.endswith('path') and (fX1C is str or fX1C is QMSQ):\n kGys[H5ew] = YKHO.convert_path(kGys[H5ew])\n ... | [
"0.615055",
"0.6022018",
"0.59353244",
"0.5929061",
"0.5903751",
"0.59028196",
"0.58952916",
"0.58745664",
"0.5857695",
"0.58429635",
"0.58286065",
"0.5807713",
"0.5793185",
"0.579026",
"0.57405347",
"0.57388127",
"0.5700218",
"0.5691005",
"0.56827766",
"0.5681845",
"0.568097... | 0.5685377 | 18 |
Convert a UUID to a valid Heroku app name. | def kvcN(id):
return 'dlgr-' + id[0:8] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i79m(B7c0):\n return B7c0.lstrip('/').replace('/', '-')",
"def i79m(mWFP):\n return '_'.join(mWFP.lstrip('/').split('_')[:-1])",
"def rcMq(_B_W):\n A753 = WR89.urlsafe_b64encode(_B_W.bytes)\n A753 = A753.rstrip(b'=\\n').replace(b'/', b'_')\n A753 = A753.decode('utf-8')\n wk5E.logger.info(... | [
"0.7121443",
"0.63777906",
"0.62655973",
"0.6159318",
"0.6104835",
"0.60486627",
"0.59915984",
"0.59867764",
"0.59718806",
"0.5969887",
"0.5885552",
"0.5866999",
"0.5866999",
"0.5866999",
"0.58459884",
"0.5784855",
"0.5773723",
"0.5767926",
"0.5755912",
"0.57351387",
"0.57246... | 0.6770794 | 1 |
Test the Sign up page is rendered with the NewUserForm form (GET) | def froZ(YKHO, x0hE):
geh0 = x0hE.get(gxEw('register'))
assert 'main/register.html' in (a1PO.name for a1PO in geh0.templates)
assert geh0.status_code == 200
assert isinstance(geh0.context['form'], oj2l) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def D2jl(YKHO):\n RCxf = gxEw('signup')\n geh0 = YKHO.client.get(RCxf, follow=True)\n YKHO.assertEqual(geh0.status_code, YKHO.RESPONSE_OK)\n YKHO.assertEqual(str(oj2l()), str(geh0.context['form']))",
"def TMgz(YKHO):\n geh0 = YKHO.client.get(gxEw('userena_signup'))\n YKHO.assertEqual(geh0.statu... | [
"0.8580441",
"0.8535405",
"0.8388281",
"0.833191",
"0.81276506",
"0.8069652",
"0.78450906",
"0.7821745",
"0.7763338",
"0.7743554",
"0.77156025",
"0.7698343",
"0.7587496",
"0.7580001",
"0.75503194",
"0.7538251",
"0.752226",
"0.7505277",
"0.74887896",
"0.7485769",
"0.7480476",
... | 0.8286804 | 4 |
Tests that authenticate and login functions are not called Tests it renders the same login.html page | def bZiW(YKHO, Ehsq, x0hE, i8TJ):
q2Z4 = {'username': 'unknown_user', 'password': 'unknown_pass'}
F8ry = FM6F(return_value=i8TJ)
Ehsq.setattr('django.contrib.auth.authenticate', F8ry)
CzAu = FM6F()
Ehsq.setattr('main.views.login', CzAu)
geh0 = x0hE.post(gxEw('login'), data=q2Z4)
F8ry.assert_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mXL_(YKHO):\n geh0 = YKHO.client.get('/testing-login/')\n YKHO.assert_200(geh0)\n YKHO.assert_template_used('testing-login.html')",
"def NMu1(YKHO):\n geh0 = YKHO.client.get(gxEw('login'))\n YKHO.assertEquals(geh0.status_code, 200)\n YKHO.assertTemplateUsed(geh0, 'auth_form.html')",
"def ... | [
"0.818825",
"0.8015909",
"0.8003515",
"0.79585505",
"0.795848",
"0.78915",
"0.7838953",
"0.78389233",
"0.7796271",
"0.77961814",
"0.7789633",
"0.7763363",
"0.7746353",
"0.7746353",
"0.77393556",
"0.77349895",
"0.7660482",
"0.7653859",
"0.7638198",
"0.7612361",
"0.7596985",
... | 0.0 | -1 |
Tests that authenticate and login functions are called Tests the redirection to the home page | def WEUG(YKHO, Ehsq, x0hE, QroF, i8TJ):
CzAu = FM6F()
Ehsq.setattr('main.views.login', CzAu)
U_nI = FM6F(return_value=i8TJ)
Ehsq.setattr(oj2l, 'save', U_nI)
geh0 = x0hE.post(gxEw('register'), data=QroF)
U_nI.assert_called()
CzAu.assert_called()
assert len(geh0.templates) == 0
assert ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XnRh(YKHO):\n YKHO.client.login(username='test2', password='a')\n geh0 = YKHO.client.get(YKHO.home_url)\n YKHO.assertTemplateUsed(geh0, 'staff_home.html')",
"def zE3p(YKHO):\n YKHO._test_authentication_redirect()",
"def IUFy(YKHO):\n YKHO.client.login(username='test3', password='a')\n geh... | [
"0.8315969",
"0.82752943",
"0.8139075",
"0.8086086",
"0.8065163",
"0.8020443",
"0.8009573",
"0.7997519",
"0.7995563",
"0.79953486",
"0.79940325",
"0.79940325",
"0.79533416",
"0.7935238",
"0.7888712",
"0.78860533",
"0.78667665",
"0.7859926",
"0.7839458",
"0.7822371",
"0.782237... | 0.0 | -1 |
Tests that authenticate and login functions are not called Tests the rendering of the same register.html page | def MiWG(YKHO, Ehsq, x0hE, i8TJ):
sCJe = {'username': '', 'email': 'invalid_email', 'password1': 'invalidpass', 'password2': 'invalidpass_not_matching'}
CzAu = FM6F()
Ehsq.setattr('main.views.login', CzAu)
U_nI = FM6F(return_value=i8TJ)
Ehsq.setattr(oj2l, 'save', U_nI)
geh0 = x0hE.post(gxEw('reg... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WURa(YKHO):\n geh0 = YKHO.client.get(nKyW('auth.register'))\n YKHO.assert200(geh0)",
"def DWk6(YKHO):\n YKHO.client\n geh0 = YKHO.client.get('/accounts/login/')\n YKHO.assertEqual(geh0.template_name[0], 'registration/login.html')",
"def WwTP(YKHO):\n E_qD = YKHO.driver\n E_qD.get('http... | [
"0.78614646",
"0.77987564",
"0.77967954",
"0.76764673",
"0.76391953",
"0.7609948",
"0.7607907",
"0.7510844",
"0.75029945",
"0.7486445",
"0.7482351",
"0.7450284",
"0.74426764",
"0.73952866",
"0.7393128",
"0.73857117",
"0.7382435",
"0.7377159",
"0.7372001",
"0.73707306",
"0.736... | 0.0 | -1 |
Tests that authenticate and login functions are not called Tests the rendering of the same register.html page | def Psih(YKHO, Ehsq, x0hE, i8TJ, VNY_):
xIA7 = {'username': VNY_.get('username'), 'email': 'mydummy@mail.com', 'password1': 'dummypass', 'password2': 'dummypass'}
CzAu = FM6F()
Ehsq.setattr('main.views.login', CzAu)
U_nI = FM6F(return_value=i8TJ)
Ehsq.setattr(oj2l, 'save', U_nI)
geh0 = x0hE.post... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WURa(YKHO):\n geh0 = YKHO.client.get(nKyW('auth.register'))\n YKHO.assert200(geh0)",
"def DWk6(YKHO):\n YKHO.client\n geh0 = YKHO.client.get('/accounts/login/')\n YKHO.assertEqual(geh0.template_name[0], 'registration/login.html')",
"def WwTP(YKHO):\n E_qD = YKHO.driver\n E_qD.get('http... | [
"0.78621584",
"0.7798998",
"0.7796243",
"0.7675943",
"0.76393527",
"0.76110786",
"0.76072043",
"0.7511661",
"0.75025415",
"0.7485534",
"0.7482407",
"0.7451014",
"0.7442114",
"0.739394",
"0.739248",
"0.73870075",
"0.738235",
"0.7377079",
"0.7372647",
"0.7369805",
"0.7368096",
... | 0.0 | -1 |
Check if single word string contains 'tachycardic' | def E0Ut(KCHu):
Ijsy = fxOO(KCHu)
O_Up = DR4Z(Ijsy, 'tachycardic')
return O_Up <= 2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tzLN(Npgh: str) -> bool:\n return True",
"def uhoe(GIN8, vIwR):\n for sZqf in vIwR:\n if (sZqf in GIN8) == False:\n return False\n return True",
"def AgnZ(str, TgwQ=ZbWC.compile('[^a-zA-Z0-9.=;_]').search):\n return bool(TgwQ(str))",
"def NEYl(vIwR):\n if vIwR != 'RT' and... | [
"0.6879984",
"0.6798384",
"0.6713463",
"0.66732913",
"0.66572833",
"0.6610441",
"0.6578942",
"0.6578415",
"0.6562864",
"0.6536621",
"0.651982",
"0.6507813",
"0.6498332",
"0.6458437",
"0.6441181",
"0.6438115",
"0.6428582",
"0.6421437",
"0.63925695",
"0.6391851",
"0.63888526",
... | 0.75310504 | 0 |
Compute the dew point temperature for the current Temperature and Humidity measured pair | def CofN(YKHO):
ycBG = YKHO.temperature()
mSEH = YKHO.humidity()
MKlR = (epAf.log(mSEH, 10) - 2) / 0.4343 + 17.62 * ycBG / (243.12 + ycBG)
hm80 = 243.12 * MKlR / (17.62 - MKlR)
return hm80 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qecI(YKHO) -> AzJI[float, float, float]:\n a1PO, MKlR = YKHO.temperature_humidity()\n return (a1PO, MKlR, YKHO.dewpoint(temperature=a1PO, humidity=MKlR))",
"def T2NC(YKHO, ovGo=None, dU0H=None) -> float:\n if ovGo is None and dU0H is None:\n ovGo, dU0H = YKHO.temperature_humidity()\n elif ... | [
"0.7993436",
"0.77247673",
"0.74467367",
"0.72710687",
"0.7198392",
"0.7189951",
"0.71520716",
"0.7045068",
"0.70197755",
"0.7004252",
"0.69904804",
"0.6985983",
"0.697948",
"0.697436",
"0.69660586",
"0.6925163",
"0.6890575",
"0.6862822",
"0.6857036",
"0.6831858",
"0.6824832"... | 0.7497206 | 2 |
Returns the relative humidity compensated for the current ambient temperature | def ohNp(YKHO, JRoO, hm80=None):
if hm80 is None:
hm80 = YKHO.dew_point()
MKlR = 17.62 * hm80 / (243.12 + hm80)
yRDu = epAf.pow(10, (MKlR - 17.62 * JRoO / (243.12 + JRoO)) * 0.4343 + 2)
return max(0.0, min(100.0, yRDu)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def phmJ(YKHO) -> float:\n YKHO.measurement(I0Hj)\n YKHO._measurement = 0\n ITS7.sleep(0.016)\n return YKHO._data() * 125.0 / 65536.0 - 6.0",
"def dU0H(YKHO) -> float:\n YKHO._perform_reading()\n BmBh = (YKHO._t_fine * 5 + 128) / 256\n CIn9 = YKHO._adc_hum - YKHO._humidity_calibration[0] * 1... | [
"0.7941374",
"0.7809783",
"0.7621725",
"0.7551206",
"0.75251067",
"0.75251067",
"0.74767494",
"0.7473214",
"0.7416849",
"0.73961496",
"0.7368925",
"0.7316958",
"0.7272502",
"0.72396547",
"0.71979976",
"0.71977925",
"0.71861136",
"0.71381336",
"0.7129546",
"0.7115203",
"0.7093... | 0.7121987 | 19 |
Get the path to the repository | def a_7F() -> oAb3.Path:
lFdQ = oAb3.Path(xAKo).parent.absolute()
assert lFdQ.exists(), lFdQ
assert lFdQ.is_dir()
dMng = lFdQ.parent.absolute()
assert dMng.exists(), dMng
assert dMng.is_dir()
return dMng | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n3vd(YKHO) -> str:\n return YKHO.__get_path__('repos')",
"def CtHB() -> GkAb:\n return GkAb('.').absolute()",
"def a_7F():\n return c7yn.get_config()['repo_path']",
"def cl4h(YKHO, F3jJ):\n return Hy7s.path.join(OSdB, F3jJ.id)",
"def pmON(YKHO):\n return YKHO.settings.repositories_folder... | [
"0.8552355",
"0.83614326",
"0.8258741",
"0.82191944",
"0.81605554",
"0.8093349",
"0.7984997",
"0.7963172",
"0.7913461",
"0.78957176",
"0.783293",
"0.772753",
"0.76224303",
"0.76199615",
"0.760152",
"0.7584348",
"0.7581035",
"0.7485417",
"0.7472081",
"0.7437002",
"0.74187696",... | 0.76350844 | 12 |
Return a JSON list of the minimum temperature, the average temperature, and the max temperature for a given start date | def wEtp(yKcO):
dixj = cuiw.query(JfyU.min(Ny6I.tobs), JfyU.avg(Ny6I.tobs), JfyU.max(Ny6I.tobs)).filter(Ny6I.date >= yKcO).all()
qBJZ = {}
qBJZ['MIN'] = dixj[0][0]
qBJZ['AVG'] = dixj[0][1]
qBJZ['MAX'] = dixj[0][2]
print('Server received request using start date')
return pz3A(qBJZ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def syUx(kepv):\n cuiw = DMju(eHpk)\n dixj = cuiw.query(JfyU.min(Ny6I.tobs), JfyU.avg(Ny6I.tobs), JfyU.max(Ny6I.tobs)).filter(Ny6I.date >= kepv).all()\n cuiw.close()\n syUx = []\n for min, qqgr, max in dixj:\n Nws4 = {}\n Nws4['Min'] = min\n Nws4['Avg'] = qqgr\n Nws4['Max... | [
"0.829148",
"0.8031626",
"0.79392374",
"0.7865665",
"0.7823149",
"0.7786096",
"0.77849686",
"0.7766823",
"0.7752754",
"0.7749965",
"0.7746346",
"0.77414274",
"0.7737545",
"0.76957643",
"0.7691618",
"0.76610017",
"0.76382935",
"0.7636521",
"0.76093817",
"0.7571409",
"0.7565604... | 0.71969014 | 44 |
Return a JSON list of the minimum temperature, the average temperature, and the max temperature for a given start date | def wCvU(yKcO=None, Os4s=None):
dixj = cuiw.query(JfyU.min(Ny6I.tobs), JfyU.avg(Ny6I.tobs), JfyU.max(Ny6I.tobs)).filter(Ny6I.date >= yKcO).filter(Ny6I.date <= Os4s).all()
qBJZ = {}
qBJZ['MIN'] = dixj[0][0]
qBJZ['AVG'] = dixj[0][1]
qBJZ['MAX'] = dixj[0][2]
print('Server received request using sta... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def syUx(kepv):\n cuiw = DMju(eHpk)\n dixj = cuiw.query(JfyU.min(Ny6I.tobs), JfyU.avg(Ny6I.tobs), JfyU.max(Ny6I.tobs)).filter(Ny6I.date >= kepv).all()\n cuiw.close()\n syUx = []\n for min, qqgr, max in dixj:\n Nws4 = {}\n Nws4['Min'] = min\n Nws4['Avg'] = qqgr\n Nws4['Max... | [
"0.8291432",
"0.8032043",
"0.79392636",
"0.78663075",
"0.7824059",
"0.77862996",
"0.77856785",
"0.7767578",
"0.77533954",
"0.77508307",
"0.77467364",
"0.77420205",
"0.7737938",
"0.7695471",
"0.76923347",
"0.7660867",
"0.76391226",
"0.7636797",
"0.7609969",
"0.7572618",
"0.756... | 0.6931556 | 61 |
return an acceptable cache directory. | def Hz4f(YKHO):
pmON = q20K
if not Hy7s.path.exists(pmON):
Hy7s.makedirs(pmON)
return pmON | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I7Lz(YKHO) -> GkAb:\n return GkAb(YKHO.directory)",
"def wsLY(YKHO):\n Csk6 = YKHO.get('cache.dir')\n if Hy7s.path.exists(Csk6):\n if Hy7s.path.isdir(Csk6):\n return Csk6\n else:\n raise RuntimeError('unable to create cache dir {} due to existing file of same name... | [
"0.7950668",
"0.78294",
"0.7620864",
"0.7568104",
"0.74995565",
"0.7465883",
"0.7407991",
"0.74076015",
"0.73896843",
"0.73458433",
"0.7329774",
"0.7272224",
"0.72651273",
"0.71846676",
"0.7149228",
"0.7096246",
"0.7092532",
"0.7064949",
"0.6984187",
"0.6929041",
"0.6929041",... | 0.7452594 | 6 |
Q Q values state x action > value epsilon for exploration state current state | def TGHe(T8ck, _hZ2, QTBn):
if oyIN.random.random() <= _hZ2:
return oyIN.random.randint(T8ck.shape[-1])
else:
return oyIN.argmax(T8ck[QTBn]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def U89Q(YKHO, QTBn, XeOP):\n return YKHO.R[QTBn][XeOP] + BR4e * oyIN.dot(YKHO.T[QTBn][XeOP], oyIN.max(YKHO.Q, axis=1)) + YKHO.exploration_bonus(QTBn, XeOP)",
"def U89Q(YKHO, QTBn, XeOP):\n if oyIN.sum(YKHO.n[QTBn][XeOP]) > 0:\n hdUd = YKHO.epsilon_r(QTBn, XeOP)\n GVil = YKHO.R[QTBn][XeOP] + ... | [
"0.76829195",
"0.7299353",
"0.726137",
"0.71608007",
"0.71263766",
"0.71235824",
"0.71235573",
"0.7115936",
"0.7076087",
"0.70517933",
"0.70347923",
"0.7028325",
"0.7001909",
"0.700074",
"0.69939446",
"0.6989272",
"0.6986593",
"0.6983543",
"0.695302",
"0.6947806",
"0.69097793... | 0.0 | -1 |
Inverts a dictionary from A > B into one from B > [A] | def ZdUT(fK8P):
U5bT = oRi_(list)
for G1Hx, Ty9i in fK8P.items():
U5bT[Ty9i].append(G1Hx)
return U5bT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Iy9h(J8oL):\n iFo5 = {}\n for G1Hx, Ty9i in J8oL.iteritems():\n for RJv6 in Ty9i:\n iFo5[RJv6] = G1Hx\n return iFo5",
"def wxFj(lWPh):\n exwG = {}\n for H5ew, BWXx in lWPh.items():\n exwG.setdefault(BWXx, [])\n exwG[BWXx].append(H5ew)\n return exwG",
"def Q... | [
"0.7100019",
"0.6770193",
"0.67478454",
"0.6713859",
"0.6709708",
"0.6696139",
"0.6687396",
"0.6629077",
"0.6604833",
"0.65601826",
"0.65374243",
"0.65231323",
"0.6520336",
"0.64689785",
"0.64675564",
"0.64380544",
"0.6434398",
"0.6427047",
"0.64220995",
"0.63952214",
"0.6387... | 0.0 | -1 |
This default evaluation function just returns the score of the state. The score is the same one displayed in the Pacman GUI. This evaluation function is meant for use with adversarial search agents (not reflex agents). | def fHT3(rfNN):
return rfNN.getScore() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fHT3(Ov5A):\n return Ov5A.getScore()",
"def fHT3(Ov5A):\n return Ov5A.getScore()",
"def fHT3(Ov5A):\n return Ov5A.getScore()",
"def b7La(YKHO, QTBn):\n iBIi, oyg0, YPaw = QTBn\n return phK_(oyg0, iBIi)",
"def fHT3(rfNN):\n return rfNN.getScore()",
"def fHT3(rfNN: GameState):\n re... | [
"0.8074846",
"0.8053871",
"0.8053871",
"0.7937305",
"0.7677696",
"0.766143",
"0.76433444",
"0.7634357",
"0.755391",
"0.755391",
"0.755391",
"0.755391",
"0.755391",
"0.755391",
"0.755391",
"0.755391",
"0.755391",
"0.755391",
"0.755391",
"0.755391",
"0.755391",
"0.755391",
... | 0.75938106 | 11 |
Stop the tool instance. | def n0V6(YKHO, o_gm, vYBr=None, Kmn1=frozenset({0})):
vT5L = YKHO.instances[o_gm]['service_manager']
vT5L.stop(timeout=vYBr, expected_rcs=Kmn1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JCyR(YKHO):\n YKHO.send_command('stop')",
"def JCyR(YKHO):\n YKHO.logger.debug('Stop method called')\n YKHO.scheduler_remove('RRDtool')\n YKHO.alive = False",
"def JCyR(YKHO):\n YKHO._run = False\n YKHO._log.info('{0} stopped'.format(YKHO))",
"def JCyR(YKHO):\n YKHO.soft_stop()",
"... | [
"0.7562062",
"0.75270236",
"0.75031465",
"0.74856174",
"0.7480345",
"0.7468503",
"0.74288684",
"0.74123764",
"0.74123764",
"0.74030036",
"0.7400365",
"0.7373582",
"0.7326136",
"0.7326136",
"0.7326136",
"0.73237133",
"0.73237133",
"0.7323056",
"0.7320658",
"0.73163295",
"0.729... | 0.0 | -1 |
Returns Spark session of EMR cluster If no session exists a new Spark session is built, else existing Spark session is returned. | def Yu9h():
ujem = lBG2.builder.config('spark.jars.packages', 'org.apache.hadoop:hadoop-aws:2.7.0').getOrCreate()
return ujem | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F8fu(eAID=True, PJWX=False):\n Sa_m = XYQe(appName='cms-cpu-efficiency')\n return lBG2.builder.config(conf=Sa_m._conf).getOrCreate()",
"def KfiN():\n return lBG2.builder.config(conf=Mwml()).getOrCreate()",
"def FWXP(YzxL):\n ujem = lBG2.builder.config(YzxL).getOrCreate()\n return ujem",
"d... | [
"0.7292731",
"0.7185335",
"0.7159191",
"0.70707375",
"0.6610018",
"0.6579199",
"0.65249974",
"0.64930016",
"0.6492443",
"0.64696145",
"0.64696145",
"0.64489585",
"0.64321226",
"0.640799",
"0.63469744",
"0.63465023",
"0.63245934",
"0.6324541",
"0.63192284",
"0.6310174",
"0.628... | 0.6289497 | 23 |
Parser for NOT expression Concats keyword and word_expression_term() Uses Lazy() to avoid infinite recursion | def P_rF():
return peBr('NOT') + nyZ4(fdQo) ^ (lambda U5Jc: gdr5(U5Jc[1])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EOp2(YKHO, VN2L):\n r8hN = YKHO.input\n try:\n for WKvO in YKHO._eval(VN2L):\n if WKvO is pvip:\n yield WKvO\n except _OuM:\n YKHO.input = r8hN\n yield (True, YKHO.input.nullError())\n else:\n raise YKHO.err(YKHO.input.nullError())",
"def fdQo... | [
"0.647579",
"0.6410729",
"0.60537857",
"0.600233",
"0.5914813",
"0.58291703",
"0.56391764",
"0.55832297",
"0.55208325",
"0.5460747",
"0.5409898",
"0.53887826",
"0.53837883",
"0.537348",
"0.5368977",
"0.5342714",
"0.53422755",
"0.5325248",
"0.53194535",
"0.5262617",
"0.5235422... | 0.77618873 | 0 |
Returns a sparse matrix (of size verts x verts) where each nonzero element indicates a neighborhood relation. For example, if there is a nonzero element in position (15,12), that means vertex 15 is connected by an edge to vertex 12. | def xtqh(EXJa, r2_p):
HZU1 = H4yH.csc_matrix((len(EXJa), len(EXJa)))
for YRbF in range(3):
dMTH = r2_p[:, YRbF]
EcDW = r2_p[:, (YRbF + 1) % 3]
nPrm = oyIN.ones(len(dMTH))
twK4 = oyIN.vstack((rdlD(dMTH.ravel()), rdlD(EcDW.ravel())))
t2_1 = H4yH.csc_matrix((nPrm, twK4), sha... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NRUd(YKHO):\n rdlD = []\n fvDH = []\n nPrm = []\n Enzc = YKHO.id2i\n for YRbF, abTv in list(YKHO.neighbor_offsets.items()):\n dxhl = YKHO.cardinalities[YRbF]\n rdlD.extend([Enzc[YRbF]] * dxhl)\n fvDH.extend(abTv)\n nPrm.extend(YKHO.weights[YRbF])\n rdlD = oyIN.arra... | [
"0.7222145",
"0.7096165",
"0.67279375",
"0.66387683",
"0.6578918",
"0.6552758",
"0.6552156",
"0.6550641",
"0.6545533",
"0.6543581",
"0.6424293",
"0.6423576",
"0.64146537",
"0.64104646",
"0.6406353",
"0.63790506",
"0.63598067",
"0.63525915",
"0.6310564",
"0.63024354",
"0.62552... | 0.0 | -1 |
Returns an Ex2 array of adjacencies between vertices, where each element in the array is a vertex index. Each edge is included only once. If output of get_faces_per_edge is provided, this is used to avoid call to get_vert_connectivity() | def cgyW(EXJa, r2_p):
dIT4 = H4yH.coo_matrix(xtqh(EXJa, r2_p))
Aofo = oyIN.hstack((fvDH(dIT4.row), fvDH(dIT4.col)))
Aofo = Aofo[Aofo[:, 0] < Aofo[:, 1]]
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LBLb(YKHO):\n dos2 = len(YKHO.edges)\n QrKP = [HMCV.iv for HMCV in YKHO.joints]\n QrKP.extend([cfQG.iv for cfQG in YKHO.endpoints])\n eQUr = oyIN.zeros((dos2, 2), dtype=oyIN.int)\n for YRbF in range(dos2):\n eQUr[YRbF, :] = oyIN.array([QrKP.index(YKHO.edges[YRbF].source.iv), QrKP.index(YK... | [
"0.65585685",
"0.64372575",
"0.63073295",
"0.62599766",
"0.6160074",
"0.6128686",
"0.61255664",
"0.6114978",
"0.61132103",
"0.60962546",
"0.6054847",
"0.6014356",
"0.5987802",
"0.59414536",
"0.5932055",
"0.59198594",
"0.59127414",
"0.59036916",
"0.58889484",
"0.5870433",
"0.5... | 0.59644544 | 13 |
Determine if bee dies, return False. Else if bee lives, increase age and return True | def Riv0(YKHO, ng0v, CHNM, rg4j, ApHK):
YKHO.age += 1
TPDn = 0.0014 + ApHK
if TPDn * YKHO.age > oyIN.random.rand():
ng0v.total_death += 1
return False
else:
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rbkh(YKHO):\n if not YKHO.alive and YKHO.aliveNeighbors in YKHO.alive_rule:\n YKHO.alive = True\n YKHO.age = 1\n return\n if YKHO.alive and YKHO.aliveNeighbors in YKHO.death_rule:\n YKHO.alive = False\n YKHO.age = 0\n return\n YKHO.age += 1",
"def ARYH(YKHO)... | [
"0.72236466",
"0.71523225",
"0.6921499",
"0.6754023",
"0.66591126",
"0.66527945",
"0.6564619",
"0.64576244",
"0.64308405",
"0.6415417",
"0.6414252",
"0.6361751",
"0.6351172",
"0.63244605",
"0.6293658",
"0.62839276",
"0.6277689",
"0.62720704",
"0.6271537",
"0.6255881",
"0.6240... | 0.73357123 | 0 |
Strip extensions from a filename, like Q_StripExtension(). | def MXbr(Ux0P: str) -> str:
try:
OLdt = Ux0P.rindex('.')
except ValueError:
return Ux0P
if '/' in Ux0P[OLdt:]:
return Ux0P
return Ux0P[:OLdt] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GK2E(gIsw: str) -> str:\n return gIsw.split('.')[0]",
"def u93D(Ux0P):\n KCHu = Ux0P\n finE = KCHu[:KCHu.find('.')]\n return finE",
"def u93D(Ux0P):\n mWFP = Ux0P[:Ux0P.find('.')]\n return mWFP",
"def MXbr(FYKK):\n return Hy7s.path.splitext(FYKK)[0]",
"def u93D(Ux0P):\n return U... | [
"0.7971045",
"0.78705317",
"0.7848233",
"0.77695525",
"0.7681644",
"0.76195055",
"0.7580112",
"0.75796616",
"0.74173933",
"0.74027866",
"0.728104",
"0.7194475",
"0.719092",
"0.7162276",
"0.71509403",
"0.7135078",
"0.7110545",
"0.70137715",
"0.69874376",
"0.69335234",
"0.68894... | 0.7386379 | 10 |
return a dictionary of channel base class info | def zrXj(YKHO, uPxI):
for P8oC in dpjI(uPxI, YKHO.encoding_classes):
yield dict(classname=P8oC.replace('Def', ''), base=uPxI.wrapped_definitions()[P8oC.lower()], root='channel_wrappers') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FcNz(YKHO):\n return dict(YKHO._channels)",
"def RHeG(YKHO):\n return YKHO.__CHANNEL_MAP",
"def DBWQ(YKHO):\n U34r = {'Title': YKHO.long_name, 'Thumb': YKHO.icon_path, 'action': YKHO.default_action, 'remote_url': None, 'channel': YKHO.short_name, 'use_rtmp': 0}\n return U34r",
"def zofR(YKHO)... | [
"0.66571736",
"0.6493004",
"0.6341116",
"0.62559915",
"0.6237392",
"0.6203376",
"0.6165512",
"0.6164204",
"0.61620325",
"0.6097555",
"0.60613537",
"0.602142",
"0.60193527",
"0.60060793",
"0.6000232",
"0.59662753",
"0.595991",
"0.59573984",
"0.59185845",
"0.5849675",
"0.584735... | 0.67191255 | 0 |
test a normal user registration with no abnormalities | def zvim(YKHO):
LZ_C = YKHO.client.post('/api/users', YKHO.user_1, format='json')
YKHO.assertEqual(LZ_C.status_code, jGRS.HTTP_201_CREATED)
YKHO.assertIn('username', LZ_C.data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IUpI(YKHO):\n pass",
"def xPQW():\n Esbi = Jpbe.auth_register('valid_email@email.com', 'pa55w0rd', 'Kate', 'Young')\n Ge4L = SGll(Esbi['token'], Esbi['u_id'])\n assert Ge4L.get('user').get('email') == 'valid_email@email.com'\n assert Ge4L.get('user').get('name_first') == 'Kate'\n assert Ge4... | [
"0.7969958",
"0.7784581",
"0.7719647",
"0.76585156",
"0.7644847",
"0.76351386",
"0.76296395",
"0.75952756",
"0.7594379",
"0.75834185",
"0.75516933",
"0.75417745",
"0.75364614",
"0.74767",
"0.7474219",
"0.74660444",
"0.7454491",
"0.7450061",
"0.7443621",
"0.7443274",
"0.744176... | 0.7899167 | 1 |
test that a user cannot register twice in the app | def a2i2(YKHO):
YKHO.client.post('/api/users', YKHO.user_1, format='json')
Ylbp = YKHO.client.post('/api/users', YKHO.user_1, format='json')
YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_400_BAD_REQUEST)
YKHO.assertEqual(qQXR.loads(Ylbp.content), {'errors': {'email': ['user with this email already exists... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KHfF(YKHO):\n geh0 = YKHO.client.post(gxEw('authentication:registration'), OetC, format='json')\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_201_CREATED)\n geh0 = YKHO.client.post(gxEw('authentication:registration'), OetC, format='json')\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_400_BAD_REQU... | [
"0.80355555",
"0.73451513",
"0.7307727",
"0.7289033",
"0.7249866",
"0.7172496",
"0.71166337",
"0.7087621",
"0.70806074",
"0.7057167",
"0.7009859",
"0.70090634",
"0.69993156",
"0.69990826",
"0.69445956",
"0.6941722",
"0.69053113",
"0.6879786",
"0.68654346",
"0.68332416",
"0.68... | 0.6611459 | 58 |
this tests a user signing up with an existent email | def QWvK(YKHO):
YKHO.client.post('/api/users', YKHO.user_1, format='json')
Ylbp = YKHO.client.post('/api/users', YKHO.duplicate_user1email, format='json')
YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_400_BAD_REQUEST)
YKHO.assertEqual(qQXR.loads(Ylbp.content), {'errors': {'email': ['user with this email ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Pkdu(YKHO):\n YKHO.assertEqual(FYrf.FAILURE, YKHO.users.sign_up('userI', 'myPassword', 'myPassword', ''))",
"def ZoJo(YKHO):\n YKHO.assertEqual(FYrf.FAILURE, YKHO.users.sign_up('userJ', 'myPassword', 'myPassword', None))",
"def uXbo(YKHO):\n XKMW = 'auth.login'\n YKHO.make_user(pwd=True, confir... | [
"0.8102052",
"0.8082266",
"0.8042979",
"0.8024683",
"0.80169374",
"0.79998857",
"0.79906946",
"0.7983556",
"0.7934877",
"0.792982",
"0.78749555",
"0.7874334",
"0.7865251",
"0.78571534",
"0.78547716",
"0.7835137",
"0.7815933",
"0.7812885",
"0.7811242",
"0.78054595",
"0.7791659... | 0.77056706 | 30 |
this tests a user signing up with an existent username | def kRDO(YKHO):
YKHO.client.post('/api/users', YKHO.user_1, format='json')
Ylbp = YKHO.client.post('/api/users', YKHO.duplicate_user1username, format='json')
YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_400_BAD_REQUEST)
YKHO.assertEqual(qQXR.loads(Ylbp.content), {'errors': {'username': ['user with this ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b6F2(YKHO):\n YKHO.assertEqual(FYrf.FAILURE, YKHO.users.sign_up('', 'myPassword', 'myPassword', 'userA@gmail.com'))",
"def pvTm(YKHO):\n LOzg = {'username': 'test2', 'password': 'testing1234', 'password-confirmation': 'testing1234'}\n YKHO.client.post(gxEw('signup'), LOzg)\n geh0 = YKHO.client.po... | [
"0.82807887",
"0.8258411",
"0.82015884",
"0.81424856",
"0.79484594",
"0.7924609",
"0.7907699",
"0.7901698",
"0.7873955",
"0.7865137",
"0.78461826",
"0.7755303",
"0.7755196",
"0.7718111",
"0.7717494",
"0.7708948",
"0.7708163",
"0.7699635",
"0.76927364",
"0.76549655",
"0.765480... | 0.77244025 | 13 |
test a normal user registration with no email | def y4U0(YKHO):
LZ_C = YKHO.client.post('/api/users', YKHO.missing_email, format='json')
YKHO.assertEqual(LZ_C.status_code, jGRS.HTTP_400_BAD_REQUEST)
YKHO.assertEqual(qQXR.loads(LZ_C.content), {'errors': {'email': ['This field is required.']}}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eXT6(YKHO):\n YKHO.user_dict.pop('email', None)\n geh0 = Z9rn.post('/author/registration/', YKHO.user_dict)\n YKHO.assertEquals(geh0.status_code, 400, 'User should not be created')",
"def sYud(YKHO):\n geh0 = YKHO._run_api_v2_user_register(YKHO.user_data)\n gtbI = _J2v.objects.get(user__userna... | [
"0.8347957",
"0.82550746",
"0.81387824",
"0.81225145",
"0.81223375",
"0.8005941",
"0.797674",
"0.79705137",
"0.79392856",
"0.79251546",
"0.79109174",
"0.78927135",
"0.78883815",
"0.7856518",
"0.77857107",
"0.77820903",
"0.77796483",
"0.77472556",
"0.7735932",
"0.7645377",
"0.... | 0.74259514 | 65 |
test a normal user registration with no username | def _l3u(YKHO):
LZ_C = YKHO.client.post('/api/users', YKHO.missing_username, format='json')
YKHO.assertEqual(LZ_C.status_code, jGRS.HTTP_400_BAD_REQUEST)
YKHO.assertEqual(qQXR.loads(LZ_C.content), {'errors': {'username': ['This field is required.']}}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qY2a(YKHO):\n YKHO.user_dict.pop('username', None)\n geh0 = Z9rn.post('/author/registration/', YKHO.user_dict)\n YKHO.assertEquals(geh0.status_code, 400, 'User should not be created')",
"def uf5J(YKHO):\n YKHO.assertEqual(FYrf.FAILURE, YKHO.users.sign_up(None, 'myPassword', 'myPassword', 'userA@g... | [
"0.82318",
"0.79719484",
"0.791398",
"0.7909583",
"0.7887187",
"0.7877111",
"0.7790307",
"0.77398133",
"0.7728764",
"0.7715797",
"0.7680553",
"0.7675841",
"0.76597625",
"0.76537985",
"0.76259017",
"0.76169086",
"0.7585009",
"0.7583655",
"0.7582942",
"0.7580409",
"0.7569887",
... | 0.7360009 | 41 |
test user registering into the app with a short password | def HitK(YKHO):
LZ_C = YKHO.client.post('/api/users', YKHO.short_password, format='json')
YKHO.assertEqual(LZ_C.status_code, jGRS.HTTP_400_BAD_REQUEST)
YKHO.assertEqual(qQXR.loads(LZ_C.content), {'errors': {'password': ['Ensure this field has at least 8 characters.']}}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rJUa(YKHO):\n Aofo = YKHO.account_object.Register('hanah', 'hanah@gmail.com', 'hey', 'hey')\n YKHO.assertEqual(Aofo, 'Password Either Too Short Or Empty')",
"def jcTe(YKHO):\n CBIr = qQXR.dumps({'name': 'Patrick', 'email': 'pato@gmail.com', 'password': 'pato'})\n geh0 = YKHO.client.post('/auth/re... | [
"0.83849186",
"0.83740187",
"0.82938933",
"0.8293562",
"0.81534356",
"0.81275564",
"0.7991688",
"0.79316676",
"0.789616",
"0.78446496",
"0.7838975",
"0.78022176",
"0.7796527",
"0.776674",
"0.77383536",
"0.7736786",
"0.77161855",
"0.7711739",
"0.7708844",
"0.76975656",
"0.7695... | 0.81491125 | 5 |
test user registering into the app with an invalid password | def deZh(YKHO):
LZ_C = YKHO.client.post('/api/users', YKHO.invalid_password, format='json')
YKHO.assertEqual(LZ_C.status_code, jGRS.HTTP_400_BAD_REQUEST)
YKHO.assertEqual(qQXR.loads(LZ_C.content), {'errors': {'password': ['Ensure this field only has alphanumerics.']}}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e9Tf(YKHO):\n YKHO.assertEqual(FYrf.SUCCESS, YKHO.users.sign_up('userO', 'password', 'password', 'userO@gmail.com'))\n YKHO.assertEqual(FYrf.FAILURE, YKHO.users.login('userO', 'passw0rd'))",
"def mqKx(YKHO):\n YKHO.test_user1.update({'password': 'password#1'})\n geh0 = YKHO.common_test.response_r... | [
"0.8377125",
"0.83401906",
"0.829561",
"0.8207244",
"0.8200266",
"0.8144625",
"0.8142016",
"0.8138786",
"0.8104373",
"0.8065314",
"0.8065005",
"0.80326134",
"0.80188996",
"0.8011907",
"0.8010145",
"0.8002148",
"0.79662216",
"0.7963768",
"0.7945398",
"0.79428357",
"0.7940098",... | 0.80172545 | 13 |
Returns UserRequestArgs from a command's Run method "args" parameter. | def CdNM(qIxc):
return jBqg(cache_control=getattr(qIxc, 'cache_control', None), content_disposition=getattr(qIxc, 'content_disposition', None), content_encoding=getattr(qIxc, 'content_encoding', None), content_language=getattr(qIxc, 'content_language', None), content_type=getattr(qIxc, 'content_type', None), custom... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rwTO(YKHO, qIxc):\n return YKHO.parser.parse_args(qIxc)",
"def Cnr0(YKHO):\n return YKHO.cmd_args",
"def Cnr0(YKHO):\n return YKHO.cmd_args",
"def qIxc(YKHO):\n return YKHO._attributes.get('args', None)",
"def rwTO(YKHO):\n return YKHO.args",
"def dfWf(YKHO):\n return YKHO._cmd_args... | [
"0.70482063",
"0.6701725",
"0.6701725",
"0.664279",
"0.64870906",
"0.6471807",
"0.64200515",
"0.63361233",
"0.6295625",
"0.62943935",
"0.6260006",
"0.62394345",
"0.62391543",
"0.62377614",
"0.6217856",
"0.62067",
"0.62021",
"0.61972874",
"0.6195264",
"0.6195264",
"0.6195264",... | 0.80588627 | 0 |
Reads the RawFCDFile and creates a list of Id's with a belonging List of Data tuples. | def lcAH(OZ6Z, sg14=False):
Wma2 = {}
WUO8 = open(OZ6Z, 'r')
WUO8.seek(30)
for zFiD in WUO8:
V22M = zFiD.split('\t')
if sg14:
V22M[0] = JOq9(V22M[0])
if V22M[0] in Wma2:
Wma2[V22M[0]].append((nc94(V22M[1]), V22M[3], V22M[2], V22M[5][:-1]))
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ItV6(pmON, Ux0P='fid'):\n with open(Hy7s.path.join(pmON, Ux0P), 'rb') as eHNT:\n FPDw = eHNT.read(aExd)\n WBPg = MZ6z(T8w7, FPDw)\n ZMJr = WBPg[0]\n si8v = WBPg[1]\n Xkrd = WBPg[2]\n KTjG = WBPg[3]\n gCVc = WBPg[4]\n fqXy = WBPg[5]\n eFc3 = WBPg... | [
"0.6532402",
"0.6002694",
"0.59733236",
"0.5954577",
"0.5926398",
"0.5887599",
"0.5871411",
"0.5855591",
"0.58284837",
"0.5821674",
"0.5788188",
"0.57766414",
"0.5774434",
"0.57127345",
"0.5684609",
"0.56826437",
"0.56558096",
"0.56534404",
"0.5651924",
"0.5639568",
"0.562032... | 0.57938504 | 10 |
Reset the state of the optimizer. Optional, but useful for optimizers with momentum, e.g., SGD with momentum, Adam, etc. | def SiRx(YKHO) -> None:
YKHO.iters = 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SiRx(YKHO):\n oyIN.random.seed(0)\n IcYu = {'kappa': 2}\n\n def rV9r(NArs):\n nJ9F = oyIN.array([NArs[0], NArs[1], NArs[2], NArs[3], NArs[4]])\n return sum(100.0 * (nJ9F[1:] - nJ9F[:-1] ** 2.0) ** 2.0 + (1 - nJ9F[:-1]) ** 2.0)\n Ldwr = [(-2.0, 2.0), (-2.0, 2.0), (-2.0, 2.0), (-2.0, 2.... | [
"0.7753219",
"0.77210146",
"0.75592166",
"0.7436572",
"0.729006",
"0.72645295",
"0.72624815",
"0.7202799",
"0.71253544",
"0.7121103",
"0.70897096",
"0.7080926",
"0.70576257",
"0.703815",
"0.70271885",
"0.70271885",
"0.70271885",
"0.70271885",
"0.6893788",
"0.6852992",
"0.6814... | 0.0 | -1 |
Reset the state of the optimizer, including the running average of gradient and that of its square. | def SiRx(YKHO) -> None:
super().reset()
YKHO.m.fill(0)
YKHO.v.fill(0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YP7j(YKHO):\n YKHO.optimizer.zero_grad()",
"def YP7j(YKHO):\n YKHO.opt_G.zero_grad()\n YKHO.opt_G.zero_grad()",
"def YP7j(YKHO):\n YKHO.g_optimizer.zero_grad()\n YKHO.d_optimizer.zero_grad()",
"def YP7j(YKHO):\n YKHO.g_optimizer.zero_grad()\n YKHO.d_optimizer.zero_grad()",
"def YP7... | [
"0.77089065",
"0.7587373",
"0.7572727",
"0.7572727",
"0.7572727",
"0.7572727",
"0.756922",
"0.7510861",
"0.73474354",
"0.7211234",
"0.7186851",
"0.71829295",
"0.71325964",
"0.71213627",
"0.70861626",
"0.7062827",
"0.7058895",
"0.70549035",
"0.70549035",
"0.70549035",
"0.70547... | 0.0 | -1 |
Returns a list of all the groups the entity is part of. | def ubVI(YKHO, LEXu):
assert isinstance(LEXu, zqFG.Entity)
geeb = []
for H5ew, BWXx in YKHO.entitiesByGroup.items():
if LEXu.id in BWXx:
geeb.append(H5ew)
return geeb | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MvIi():\n return u8YN()",
"def Bk0s(YKHO):\n return list(YKHO._groups)",
"def CKib(YKHO):\n return YKHO.session.query(xU0C.Group).all()",
"def Xmem(YKHO):\n return map(YKHO.__getPUS().getGroupById, YKHO.__getPUS().getGroupNames())",
"def moMn(YKHO):\n return YKHO._get_list_field('groups'... | [
"0.8521523",
"0.83319587",
"0.8264044",
"0.8119364",
"0.8086948",
"0.8041096",
"0.8028475",
"0.8026271",
"0.802465",
"0.7997425",
"0.7967653",
"0.7930275",
"0.7927795",
"0.7927795",
"0.7923434",
"0.78967416",
"0.78967416",
"0.78967416",
"0.78967416",
"0.78967416",
"0.78967416... | 0.8159579 | 3 |
Ensures superuser is created and can login | def HyqS(YKHO):
nPrm = {'email': 'joe@somewhere.org', 'password': 'longandhardpass'}
CBIr = C3ST.objects.create_superuser(**nPrm)
YKHO.assertTrue(CBIr.has_usable_password())
YKHO.assertLogin(nPrm['email'], nPrm['password']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MgmU(YKHO) -> None:\n Q5YQ = mv1M.objects.create_superuser(email='test@gmail.com', username='test', employee_id='DT1001', password='wsxwsx@123')\n YKHO.assertTrue(Q5YQ.is_admin)\n YKHO.assertTrue(Q5YQ.is_superuser)\n YKHO.assertTrue(Q5YQ.is_active)\n YKHO.assertTrue(Q5YQ.is_staff)",
"def rCAj(... | [
"0.79658735",
"0.7842728",
"0.783117",
"0.7800221",
"0.77901375",
"0.7787956",
"0.77587193",
"0.77421343",
"0.77380306",
"0.7735607",
"0.7722283",
"0.7706163",
"0.77060163",
"0.7698917",
"0.76698184",
"0.7643415",
"0.7640023",
"0.7636536",
"0.7603143",
"0.7598484",
"0.7563678... | 0.7299498 | 53 |