content
stringlengths 7
1.05M
|
|---|
dff = data
df_sk = dff.loc[(dff['scenario']=='ND_NO_SKAVICA')|(dff['scenario']=='ND_SKAVICA')]
df_sk['scenario'].replace({"ND_NO_SKAVICA":"No Skavica", "ND_SKAVICA":"With Skavica"}, inplace=True)
df_sk1 = df_sk.loc[(df_sk['country']=='Albania')&(df_sk['tech']!='AL-Import')]
df_sk1 = df_sk1.groupby(['country','tech','year','scenario']).mean().reset_index()
df_sk2 = df_sk.loc[(df_sk['country']=='Albania')&(df_sk['tech']=='AL-Import')]
df_sk2 = df_sk2.groupby(['country','tech','year','scenario']).mean().reset_index()
df_sk3 = df_sk2.loc[(df_sk2['year']>=2025)&(df_sk2['year']<=2050)]
graph_title='Impact of new Skavica dam on annual elec.imports in AL'
fig3a = px.bar(df_sk3, x='year', y='value', color='scenario', facet_col='tech', facet_col_wrap=2, barmode='group',
labels={"value": "GWh", "tech":"HPP"}, title=graph_title,
category_orders={"scenario": ["No Skavica", "With Skavica"]},
facet_col_spacing=0.05, facet_row_spacing=0.05)
fig3a.for_each_annotation(lambda a: a.update(text=a.text.split("=")[-1]))
fig3a.update_yaxes(range=[1500, 4000]) #setting the y-axis scale to ensure good readability
#You can change the image extension to *.png if you want or keep it as pdf (for high resolution)
#output_folder = os.path.join('Results_graphics')
#os.makedirs(output_folder, exist_ok = True)
#pio.write_image(fig, 'Results_graphics/{}.pdf'.format(graph_title))
#fig.show()
|
"""
Module: 'functools' on LEGO EV3 v1.0.0
"""
# MCU: sysname=ev3, nodename=ev3, release=('v1.0.0',), version=('0.0.0',), machine=ev3
# Stubber: 1.3.2
def partial():
pass
def reduce():
pass
def update_wrapper():
pass
def wraps():
pass
|
#If the bill was $150.00, split between 5 people, with 12% tip.
#Each person should pay (150.00 / 5) * 1.12 = 33.6
#Format the result to 2 decimal places = 33.60
#Tip: There are 2 ways to round a number. You might have to do some Googling to solve this.💪
#HINT 1: https://www.google.com/search?q=how+to+round+number+to+2+decimal+places+python&oq=how+to+round+number+to+2+decimal
#HINT 2: https://www.kite.com/python/answers/how-to-limit-a-float-to-two-decimal-places-in-python
print("Welcome to the Tip Calculator \n")
bill = input("What was the total bill? $")
percent = input("What percentage would you like to give? 10, 12, or 15? ")
split = input("How many people to split the bill? ")
total_bill = float(bill) + float(bill) * (float(percent) / 100)
final_pp_bill = total_bill / int(split)
print("$"+str(round(final_pp_bill, 2)))
|
# ASL ALPHABET, j,Z OMITTED
language = {
'letter_a' : [
"http://science.opposingviews.com/DM-Resize/photos.demandstudios.com/getty/article/81/210/78033946.jpg?w=600&h=600&keep_ratio=1",
"http://www.lifeprint.com/asl101/signjpegs/a/a.jpg",
"http://thumbs.dreamstime.com/x/letter-sign-language-587184.jpg",
"http://i.imgur.com/ei3jaNZ.jpg",
'http://imgur.com/dEzAAdf.jpg',
'http://imgur.com/Cq98daW.jpg',
"http://i.imgur.com/idEI6pF.jpg",
"http://i.imgur.com/AmaKsIu.jpg",
'http://i.imgur.com/pcRSprF.jpg'
],
'letter_b' : [
"https://s3.amazonaws.com/bankstreet_web/media/filer_public/filer_public/2013/03/04/asl_b.jpg",
"http://www.wpclipart.com/sign_language/American_ABC_Photos/sign_language_photo_B.png",
"http://thumbs.dreamstime.com/z/letter-b-sign-language-587210.jpg",
"http://images2.pics4learning.com/catalog/b/b.jpg",
"http://www.lifeprint.com/asl101/signjpegs/b/b1.jpg",
"http://i.imgur.com/pU4pXE8.jpg",
'http://imgur.com/qbbPAW6.jpg',
'http://imgur.com/XBQ9nXx.jpg',
'http://imgur.com/lqvt8f0.jpg',
'http://i.imgur.com/Dw6FEFS.jpg',
'http://i.imgur.com/F9s68Ks.jpg',
'http://i.imgur.com/AwhYJjn.jpg',
'http://i.imgur.com/cmkzC7d.jpg',
'http://i.imgur.com/tiey392.jpg'
],
'letter_c' : [
"http://images2.pics4learning.com/catalog/c/c.jpg",
"http://www.wpclipart.com/sign_language/American_ABC_Photos/sign_language_photo_C.png",
'http://i233.photobucket.com/albums/ee159/lintpicker/30801_9184.jpg',
'http://imgur.com/d3YIDeM.jpg',
'http://www.lifeprint.com/asl101/signjpegs/c/c.jpg',
'http://imgur.com/ZKY6quh.jpg',
'http://imgur.com/5oaD2DA.jpg',
'http://i.imgur.com/Iin7dhC.jpg',
'http://i.imgur.com/4yHKhIg.jpg',
'http://i.imgur.com/98WqyNm.jpg',
'http://i.imgur.com/5vMj1xa.jpg'
],
'letter_d' : [
"http://www.lifeprint.com/asl101/signjpegs/d/d.jpg",
"http://images2.pics4learning.com/catalog/d/thumbs/d_thumb.jpg",
'http://users.manchester.edu/Student/SMCarmichael/MyWebpage/MPj03857270000[1]1.jpg',
'http://imgur.com/N8WTUo8.jpg',
'http://imgur.com/U1DTGet.jpg',
'http://i.imgur.com/P6tw9wt.jpg',
'http://i.imgur.com/Ci4c5Dz.jpg',
'http://i.imgur.com/Hbpg93V.jpg'
],
'letter_e' : [
"http://www.lifeprint.com/asl101/signjpegs/e/e.jpg",
'http://images2.pics4learning.com/catalog/e/thumbs/e_thumb.jpg',
'http://www.wtsd.tn.org/kylah_webpage/MPj03857280000%5B1%5D.jpg',
'http://imgur.com/xtKJdhs.jpg',
'http://imgur.com/I8SsKfZ.jpg',
'http://i.imgur.com/vlTE1A2.jpg',
'http://i.imgur.com/vQwuSpI.jpg',
'http://i.imgur.com/bmHkR4g.jpg',
'http://i.imgur.com/N1RjYaJ.jpg',
'http://i.imgur.com/UhYgnPZ.jpg'
],
'letter_f' : [
'http://www.lifeprint.com/asl101/signjpegs/f/f.jpg',
'https://www.signingsavvy.com/images/words/alphabet/2/f1.jpg',
'http://images2.pics4learning.com/catalog/f/thumbs/f_thumb.jpg',
'http://imgur.com/18mJQcx.jpg',
'http://i.imgur.com/G6C4q8D.jpg',
'http://i.imgur.com/dA5SGV9.jpg',
'http://i.imgur.com/g5xoIpn.jpg',
'http://i.imgur.com/kkFqone.jpg',
'http://i.imgur.com/tu93sTL.jpg',
'http://i.imgur.com/tu93sTL.jpg'
],
'letter_g' : [
'http://www.lifeprint.com/asl101/signjpegs/g/g1.jpg',
'http://www.lifeprint.com/asl101/signjpegs/g/g2.jpg',
'http://images2.pics4learning.com/catalog/g/thumbs/g_thumb.jpg',
'http://imgur.com/wog08bz.jpg',
'http://i.imgur.com/xsPrfCk.jpg',
'http://i.imgur.com/RQJEDNa.jpg',
'http://i.imgur.com/9NfbVpb.jpg',
'http://i.imgur.com/5fofc5J.jpg',
'http://i.imgur.com/VB1Zb3l.jpg'
],
'letter_h' : [
'http://www.lifeprint.com/asl101/signjpegs/h/h1.jpg',
'http://www.lifeprint.com/asl101/signjpegs/h/h2.jpg',
'http://www.lifeprint.com/asl101/signjpegs/h/h3.jpg',
'http://images2.pics4learning.com/catalog/h/h.jpg',
'http://imgur.com/CWStAMd.jpg',
'http://imgur.com/LCOuoqr.jpg',
'http://i.imgur.com/O28D9QU.jpg',
'http://i.imgur.com/5M3X0RP.jpg',
'http://i.imgur.com/cWbi2Ul.jpg',
'http://i.imgur.com/719dcYC.jpg',
'http://i.imgur.com/BsqRJGS.jpg'
],
'letter_i' : [
'http://www.lifeprint.com/asl101/signjpegs/j/i1.jpg',
'http://images2.pics4learning.com/catalog/i/i.jpg',
'http://imgur.com/TbSpe7K.jpg',
'http://i.imgur.com/jeDqEJd.jpg',
'http://i.imgur.com/yRydMLJ.jpg',
'http://i.imgur.com/RlBX7Cw.jpg',
'http://i.imgur.com/lTM5vRg.jpg',
'http://i.imgur.com/Nc3DR34.jpg',
'http://i.imgur.com/s7DeARK.jpg',
'http://i.imgur.com/U4Xf04c.jpg',
'http://i.imgur.com/AWFRgh1.jpg'
],
'letter_k' : [
"http://www.lifeprint.com/asl101/signjpegs/k/k.jpg",
"http://www.lifeprint.com/asl101/signjpegs/k/k1.jpg",
"http://www.lifeprint.com/asl101/signjpegs/k/k2.jpg",
'http://images2.pics4learning.com/catalog/k/k.jpg',
'http://imgur.com/oth4JHl.jpg',
'http://imgur.com/RX9GheD.jpg'
],
'letter_l' : [
'http://www.lifeprint.com/asl101/signjpegs/l/l.jpg',
'http://images2.pics4learning.com/catalog/l/l.jpg',
'http://imgur.com/3Wrr83R.jpg',
'http://i.imgur.com/Kk00yJi.jpg',
'http://i.imgur.com/Y3PfW5E.jpg'
'http://i.imgur.com/c4VbfM7.jpg',
'http://i.imgur.com/VgEXOrD.jpg',
'http://i.imgur.com/QK3otVV.jpg',
'http://i.imgur.com/tqy78Tw.jpg',
'http://i.imgur.com/HFcYyWC.jpg',
'http://vignette1.wikia.nocookie.net/glee/images/5/53/L_to_Loser.jpg/revision/latest?cb=20100919121543',
'http://i.imgur.com/Sy3MQh5.jpg'
],
'letter_m' : [
'http://www.lifeprint.com/asl101/signjpegs/m/m1.jpg',
'http://www.lifeprint.com/asl101/signjpegs/m/m2.jpg',
'http://images2.pics4learning.com/catalog/m/m.jpg',
'http://i.imgur.com/wJ14Xsp.jpg',
'http://i.imgur.com/cH4Ctwz.jpg',
'http://i.imgur.com/eLcC1Hy.jpg',
'http://i.imgur.com/BH3bj3e.jpg',
'http://i.imgur.com/sf3ylPt.jpg',
'http://i.imgur.com/A6CEht0.jpg'
],
'letter_n' : [
'http://www.lifeprint.com/asl101/signjpegs/n/n1.jpg',
'http://www.lifeprint.com/asl101/signjpegs/n/n2.jpg',
'http://images2.pics4learning.com/catalog/n/n.jpg',
'http://i.imgur.com/pqa8Zyw.jpg',
'http://i.imgur.com/JY0JKp4.jpg',
'http://i.imgur.com/CaOevfe.jpg',
'http://i.imgur.com/zAMaTo6.jpg',
'http://i.imgur.com/phLgLZx.jpg',
'http://i.imgur.com/8YXDFcx.jpg',
'http://i.imgur.com/LB8gklq.jpg'
],
'letter_o':[
'http://www.lifeprint.com/asl101/signjpegs/o/o1.jpg',
'http://www.lifeprint.com/asl101/signjpegs/o/o2.jpg',
'http://www.lifeprint.com/asl101/signjpegs/o/o3.jpg',
'http://images2.pics4learning.com/catalog/o/o.jpg',
'http://imgur.com/85LJSka.jpg',
'http://i.imgur.com/y6ArfBV.jpg',
'http://i.imgur.com/1SED8NN.jpg',
'http://i.imgur.com/do3X45q.jpg',
'http://i.imgur.com/kNEYY1M.jpg',
'http://i.imgur.com/7GGzriv.jpg',
'http://i.imgur.com/8IrR5L9.jpg',
'http://i.imgur.com/CJ4tKYs.jpg'
],
'letter_p': [
'http://www.lifeprint.com/asl101/signjpegs/p/p1.jpg',
'http://www.lifeprint.com/asl101/signjpegs/p/p2.jpg',
'http://www.lifeprint.com/asl101/signjpegs/p/p3.jpg',
'http://images2.pics4learning.com/catalog/p/p.jpg',
'http://i.imgur.com/tkDcZMe.jpg',
'http://i.imgur.com/egNs3cW.jpg',
'http://i.imgur.com/pJ4o3yH.jpg',
'http://i.imgur.com/y3KfSeG.jpg',
'http://i.imgur.com/krug936.jpg',
'http://i.imgur.com/jo63UDp.jpg',
'http://i.imgur.com/ZyiAxwd.jpg'
],
'letter_q': [
'http://www.lifeprint.com/asl101/signjpegs/q/q1.jpg',
'http://www.lifeprint.com/asl101/signjpegs/q/q2.jpg',
'http://images2.pics4learning.com/catalog/q/q.jpg',
'http://imgur.com/jidKKYK.jpg',
'http://i.imgur.com/3eG0iPQ.jpg',
'http://i.imgur.com/RJlOzHO.jpg',
'http://i.imgur.com/kT5qkFL.jpg',
'http://i.imgur.com/La5ytRV.jpg',
'http://i.imgur.com/vM81Zk2.jpg',
'http://i.imgur.com/eKGg70h.jpg',
'http://i.imgur.com/FLEGaaq.jpg',
'http://i.imgur.com/ZV7qQHK.jpg',
'http://i.imgur.com/W6gWT8a.jpg'
],
'letter_r' : [
'http://www.lifeprint.com/asl101/signjpegs/r/r.jpg',
'http://images2.pics4learning.com/catalog/r/thumbs/r_thumb.jpg',
'http://i.imgur.com/9wwRZDc.jpg',
'http://i.imgur.com/xfGtPRf.jpg',
'http://i.imgur.com/uDojFj2.jpg',
'http://i.imgur.com/T7kJULr.jpg',
'http://i.imgur.com/MIZWPZI.jpg',
'http://i.imgur.com/F4MkT8m.jpg',
'http://i.imgur.com/N6Gx7vl.jpg'
],
'letter_s': [
"http://www.lifeprint.com/asl101/signjpegs/s/s.jpg",
'http://images2.pics4learning.com/catalog/s/thumbs/s_thumb.jpg',
'http://i.imgur.com/rmf5jgR.jpg',
'http://i.imgur.com/P3Zq5Dd.jpg',
'http://i.imgur.com/xClBmxV.jpg',
'http://i.imgur.com/hQjYMPn.jpg',
'http://i.imgur.com/2mX9w8T.jpg',
'http://i.imgur.com/Fa70wX8.jpg'
],
'letter_t' : [
'http://www.lifeprint.com/asl101/signjpegs/t/t.jpg',
'http://images2.pics4learning.com/catalog/t/thumbs/t_thumb.jpg',
'http://imgur.com/cirlKJB.jpg',
'http://i.imgur.com/nnDEPLf.jpg',
'http://i.imgur.com/HLxur9q.jpg',
'http://i.imgur.com/bljZk3l.jpg',
'http://i.imgur.com/9GUDD82.jpg',
'http://i.imgur.com/KLL2zzt.jpg',
'http://i.imgur.com/vSvZ15A.jpg',
'http://i.imgur.com/jmKPaJz.jpg'
],
'letter_u': [
'http://www.lifeprint.com/asl101/signjpegs/u/u.jpg',
'http://images2.pics4learning.com/catalog/u/thumbs/u_thumb.jpg',
'http://imgur.com/wgP9cZw.jpg',
'http://i.imgur.com/u9YwhBP.jpg',
'http://i.imgur.com/zUyMaWD.jpg',
'http://i.imgur.com/39rVd1f.jpg',
'http://i.imgur.com/W1SiHte.jpg',
'http://i.imgur.com/zqJ7ziC.jpg',
'http://i.imgur.com/FT9gSS2.jpg',
'http://i.imgur.com/oXrvDE5.jpg',
'http://i.imgur.com/5WOntzk.jpg'
],
'letter_v' : [
'http://www.lifeprint.com/asl101/signjpegs/v/v.jpg',
'http://images2.pics4learning.com/catalog/v/thumbs/v_thumb.jpg',
'http://imgur.com/nXyOWzj.jpg',
'http://i.imgur.com/69NrFjG.jpg',
'http://i.imgur.com/GPyiPNv.jpg',
'http://i.imgur.com/OkHpWff.jpg',
'http://i.imgur.com/NX2G7JW.jpg',
'http://i.imgur.com/Su0ByBz.jpg',
'http://i.imgur.com/rnO7sVH.jpg',
'http://i.imgur.com/YAtArlj.jpg',
'http://i.imgur.com/xDwSHGg.jpg',
'http://i.imgur.com/skhHAqq.jpg'
],
'letter_w' : [
'http://www.lifeprint.com/asl101/signjpegs/w/w.jpg',
'http://images2.pics4learning.com/catalog/w/thumbs/w_thumb.jpg',
'http://i.imgur.com/ep9SPS6.jpg',
'http://i.imgur.com/kyhQ5D4.jpg',
'http://i.imgur.com/mHGWgy4.jpg',
'http://i.imgur.com/BQVK36B.jpg',
'http://i.imgur.com/2lPUvlM.jpg',
'http://i.imgur.com/Zs5QqU8.jpg',
'http://i.imgur.com/WfTMaDV.jpg',
'http://i.imgur.com/5pMmYeR.jpg'
],
'letter_x': [
'http://www.lifeprint.com/asl101/signjpegs/x/x1.jpg',
'http://www.lifeprint.com/asl101/signjpegs/x/x2.jpg',
'http://images2.pics4learning.com/catalog/x/thumbs/x_thumb.jpg',
'http://i.imgur.com/BzGhtvx.jpg',
'http://i.imgur.com/M8oXvMg.jpg',
'http://i.imgur.com/EAGSTO5.jpg',
'http://i.imgur.com/jANf5IK.jpg',
'http://i.imgur.com/BfsrKmH.jpg',
'http://i.imgur.com/KjPCC57.jpg'
],
'letter_y' : [
'http://www.lifeprint.com/asl101/signjpegs/y/y.jpg',
'http://images2.pics4learning.com/catalog/y/thumbs/y_thumb.jpg',
'http://i.imgur.com/lFCvuYs.jpg',
'http://i.imgur.com/cqsOgCx.jpg',
'http://i.imgur.com/BagarbG.jpg',
'http://i.imgur.com/LVhlWhQ.jpg',
'http://i.imgur.com/uKSmVuv.jpg',
'http://i.imgur.com/QYrdAW3.jpg',
'http://i.imgur.com/5RrMIez.jpg',
'http://i.imgur.com/6nhuW9v.jpg',
'http://i.imgur.com/h1AumoX.jpg',
'http://i.imgur.com/v74QoHw.jpg'
],
'applause' : [ "http://www.churchleaders.com/wp-content/uploads/files/article_images/clap_or_not_937398406.jpg",
"http://i.imgur.com/GxvFP6h.jpg",
"http://i.imgur.com/LgXOHBL.jpg",
"http://i.imgur.com/JKmWCEn.jpg",
"http://i.imgur.com/iJkf0st.jpg",
"http://i.imgur.com/Dx1EULd.jpg",
"https://image.freepik.com/free-photo/cook--cosmetics--clapping--hand_3256176.jpg"
]
}
|
#!/usr/bin/python3
'''Day 5 of the 2017 advent of code'''
def process_commands(cmds, program_counter):
"""helper for part 2"""
jmp_offset = cmds[program_counter]
if jmp_offset > 2:
cmds[program_counter] -= 1
else:
cmds[program_counter] += 1
return jmp_offset + program_counter
def part_one(rows):
"""Return the answer to part one of this day"""
cmds = [int(cmd) for cmd in rows]
count = 0
prg_counter = 0
while True:
try:
offset = cmds[prg_counter]
cmds[prg_counter] += 1
prg_counter = prg_counter + offset
count += 1
except IndexError:
break
return count
def part_two(rows):
"""Return the answer to part two of this day"""
cmds = [int(cmd) for cmd in rows]
count = 0
next_counter = 0
while True:
try:
next_counter = process_commands(cmds, next_counter)
count += 1
except IndexError:
break
return count
if __name__ == "__main__":
with open('input', 'r') as file:
ROWS = file.readlines()
print("Part 1: {}".format(part_one(ROWS)))
print("Part 2: {}".format(part_two(ROWS)))
|
def get_access_by_username (cursor, username) :
try :
sql_statement = 'SELECT username,password,active FROM access WHERE username = %s'
cursor.execute(sql_statement,(username,))
data = cursor.fetchone()
except Exception as ex:
print('[ERROR] get_access_by_username : ' + ex.__str__())
return None
if data is None : return None
return {
'username': data[0],
'password': data[1],
'active': data[2]
}
|
"""
cmd.do('create ${1:t4l}, ${2:1lw9};')
"""
cmd.do('create t4l, 1lw9;')
# Description: Duplicate object.
# Source: placeHolder
|
def misspelled(words):
misspelled_words = []
for keys, values in words.items():
if ''.join(values) != keys:
misspelled_words.append(keys)
return misspelled_words
|
# 我的,无法全通过
class Solution:
def licenseKeyFormatting(self, S, K):
"""
:type S: str
:type K: int
:rtype: str
"""
lists = []
s = ''
for ele in S:
if ele.isalnum():
lists.append(ele.upper())
for _ in lists:
count = K
while(count > 0):
s += lists.pop()
count -= 1
if count == 0:
s += '-'
if s[-1] == '-':
s = s[:len(s)-1]
return s[::-1]
# 找到的答案
class Solution:
def licenseKeyFormatting(self, S, K):
"""
:type S: str
:type K: int
:rtype: str
"""
formatted = []
key = S.replace('-', '').upper()
i = len(key) - K
while(i>=0):
formatted.append(key[i:i+K])
i -= K
if i != -K:
formatted.append(key[:i+K])
return '-'.join(formatted[::-1])
# 同等级
class Solution:
def licenseKeyFormatting(self, S, K):
"""
:type S: str
:type K: int
:rtype: str
"""
a_s = ''.join(S.upper().split('-'))
length = len(a_s)
r = []
first = length % K if length %K != 0 else K
r.append(a_s[:first])
for i in range(first, length, K):
r.append(a_s[i:i+K])
return '-'.join(r)
# 依次快
class Solution:
def licenseKeyFormatting(self, S, K):
"""
:type S: str
:type K: int
:rtype: str
"""
S=S.replace('-','').upper()
if len(S)%K:
S='#'*(K-len(S)%K)+S
return '-'.join(S[x:x+K] for x in range(0,len(S),K)).replace('#','')
class Solution:
def licenseKeyFormatting(self, S, K):
"""
:type S: str
:type K: int
:rtype: str
"""
a_s = ''.join(S.upper().split('-'))
length = len(a_s)
r = []
first = length % K if length %K != 0 else K
r.append(a_s[:first])
for i in range(first, length, K):
r.append(a_s[i:i+K])
return '-'.join(r)
|
#!/usr/bin/python
class VideoData(object):
percent_confidence_limit = 25
def __init__(self):
# Standard Data
self._video_id = None
self._title = None
self._description = None
self._published = None
# Metrics
self._date_start = None
self._date_end = None
self._views = None
self._monetizedPlaybacks = None
self._estimatedRevenue = None
self._estimatedMinutesWatched = None
self._percent = None
self._percent_confidence = None
@property
def id(self):
return self._video_id
@id.setter
def id(self, value):
self._video_id = value
@property
def title(self):
return self._title
@title.setter
def title(self, value):
self._title = value
@property
def description(self):
return self._description
@description.setter
def description(self, value):
self._descrioption = value
@property
def published(self):
return self._published
@published.setter
def published(self, value):
self._published = value
@property
def date_start(self):
return self._date_start
@date_start.setter
def date_start(self, value):
self._date_start = value
@property
def date_end(self):
return self._date_end
@date_end.setter
def date_end(self, value):
self._date_end = value
@property
def views(self):
return self._views
@views.setter
def views(self, value):
self._views = value
@property
def monetizedPlaybacks(self):
return self._monetizedPlaybacks
@monetizedPlaybacks.setter
def monetizedPlaybacks(self, value):
self._monetizedPlaybacks = value
@property
def estimatedRevenue(self):
return self._estimatedRevenue
@estimatedRevenue.setter
def estimatedRevenue(self, value):
self._estimatedRevenue = value
@property
def estimatedMinutesWatched(self):
return self._estimatedMinutesWatched
@estimatedMinutesWatched.setter
def estimatedMinutesWatched(self, value):
self._estimatedMinutesWatched = value
@property
def percent(self):
if self._percent is None and self.views > 0:
self._percent = self._monetizedPlaybacks / self._views
self._percent_confidence = self._views / \
self.percent_confidence_limit
else:
self._percent = 0
self._percent_confidence = 0
return self._percent
@percent.setter
def percent(self, value):
return self._percent
@property
def percent_confidence(self):
return self._percent_confidence
|
menu_kb = {
# "DefaultHeight": True,
# "CustomDefaultHeight": 70,
# "BgColor": "#4d79ff",
"Type": "keyboard",
# "InputFieldState": "minimized",
"Buttons": [
{
"Columns": 3,
"Rows": 1,
"BgColor": "#e6f5ff",
# "BgLoop": True,
"ActionType": "reply",
"ActionBody": "my_parcels",
"ReplyType": "message",
"TextSize": "large",
"Text": "Мої відправлення",
},
{
"Columns": 3,
"Rows": 1,
"BgColor": "#e6f5ff",
# "BgLoop": True,
"ActionType": "reply",
"ActionBody": "poshtomat_search",
"ReplyType": "message",
"TextSize": "large",
"Text": "Пошук поштоматів"
},
{
"Columns": 3,
"Rows": 1,
"BgColor": "#e6f5ff",
# "BgLoop": True,
"ActionType": "reply",
"ActionBody": "door_open",
"ReplyType": "message",
"TextSize": "large",
"Text": "Відкрити комірку"
},
{
"Columns": 3,
"Rows": 1,
"BgColor": "#e6f5ff",
"ActionType": "reply",
"ActionBody": "create_parcel",
"TextSize": "large",
"ReplyType": "message",
"Text": "Нове відправлення"
},
{
"Columns": 3,
"Rows": 1,
"BgColor": "#e6f5ff",
"ActionType": "reply",
"ActionBody": "parcel_tracking",
"TextSize": "large",
"ReplyType": "message",
"Text": "Відстежити відправлення"
},
{
"Columns": 3,
"Rows": 1,
"BgColor": "#e6f5ff",
"ActionType": "reply",
"ActionBody": "help",
"TextSize": "large",
"ReplyType": "message",
"Text": "Підтримка"
}
]
}
|
'''
Description: exercise: your age
Version: 1.0.0.20210113
Author: Arvin Zhao
Date: 2021-01-13 09:44:34
Last Editors: Arvin Zhao
LastEditTime: 2021-01-13 10:27:55
'''
def check_age(age: int) -> None:
'''
Check an age and print what he/she can do regarding the age.
Parameters
----------
age : his/her age for checking what he/she can do
'''
if age >= 18:
print('You can vote.')
elif age == 17:
print('You can learn how to drive.')
elif age == 16:
print('You can buy a lottery ticket.')
else:
print('You can go Trick-or-Treating.')
if __name__ == '__main__':
while True:
age = input('Enter your age: ')
if age.isdigit():
check_age(int(age))
break
else:
print('Error! Invalid input!')
|
# Ler um número e mostrar seu fatorial
# Solução usando WHILE e FOR
n = int(input('Digite um número, que vou mostrar seu fatorial: '))
r = n - 1 # contador
nf = n
# calcular
while r >= 1:
nf = nf * r
r = r - 1
# for f in range(r, 1, -1):
# nf = nf * f
print('{}! = {}'.format(n, nf))
|
nome = str(input('Digite o seu nome completo: '))
nomelista = nome.split()
print('O nome em maiúscula: {}'.format(nome.upper()))
print('O nome em minúscula: {}'.format(nome.lower()))
print('O total de letras são {} letras'.format(len(nome.replace(' ', ''))))
print('O primeiro nome tem {} letras'.format(len(nomelista[0])))
|
"""Top-level package for pycoview."""
__author__ = """John Gilling"""
__email__ = 'suddensleep@gmail.com'
__version__ = '0.1.0'
|
#!/usr/bin/env python3
DOCTL = "/usr/local/bin/doctl"
PK_FILE = "/home/ndjuric/.ssh/id_rsa.pub"
SWARM_DIR = TAG = "swarm"
OVERLAY_NETWORK = "swarmnet"
DOCKER_REGISTRY = {
'master': 'private.docker.registry.example.com:5000/master',
'worker': 'private.docker.registry.example.com:5000/worker'
}
NFS_SERVER = '10.135.69.119'
''' CALL_MAP is a list enumerating methods from the Cloud class the are allowed to be directly executed. '''
CALL_MAP = [
'build',
'deploy',
'destroy',
'add_worker',
'add_manager',
'ssh_manager',
'logs_master',
'remove_worker',
'remove_manager',
'get_master_container_id'
]
SCRIPT_CREATE = "#!/bin/bash\n"
SCRIPT_CREATE += "apt-get install -y nfs-common\n"
SCRIPT_CREATE += "mkdir /nfs\n"
SCRIPT_CREATE += "mount {0}:/nfs /nfs\n".format(NFS_SERVER)
SCRIPT_CREATE += "ufw allow 2377/tcp\n"
SCRIPT_CREATE += "export "
SCRIPT_CREATE += "PUBLIC_IPV4=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address)\n"
SCRIPT_CREATE += "docker swarm init --advertise-addr \"${PUBLIC_IPV4}:2377\"\n"
SCRIPT_CREATE += "docker network create --driver overlay {0}\n".format(OVERLAY_NETWORK)
SCRIPT_CREATE += "docker service create "
SCRIPT_CREATE += "--network swarmnet "
SCRIPT_CREATE += "--name master "
SCRIPT_CREATE += "--mount type=bind,source=/nfs,target=/nfs {0} \n".format(DOCKER_REGISTRY['master'])
SCRIPT_CREATE += "docker service create --network swarmnet --name worker {0}\n".format(DOCKER_REGISTRY['worker'])
SCRIPT_CREATE += "docker service scale worker=5\n"
SCRIPT_JOIN = "#!/bin/bash\n"
SCRIPT_JOIN += "apt-get install -y nfs-common\n"
SCRIPT_JOIN += "mkdir /nfs\n"
SCRIPT_JOIN += "mount {0}:/nfs /nfs\n".format(NFS_SERVER)
SCRIPT_JOIN += "ufw allow 2377/tcp\n"
SCRIPT_JOIN += "export "
SCRIPT_JOIN += "PUBLIC_IPV4=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address)\n"
SCRIPT_JOIN += "docker swarm join --advertise-addr \"${{PUBLIC_IPV4}}:2377\" --token \"{0}\" \"{1}:2377\"\n"
|
# Filename: BotGlobals.py
# Author: mfwass
# Date: January 8th, 2017
#
# The Legend of Pirates Online Software
# Copyright (c) The Legend of Pirates Online. All rights reserved.
#
# All use of this software is subject to the terms of the revised BSD
# license. You should have received a copy of this license along
# with this source code in a file named "LICENSE."
"""
The BotGlobals class will serve as a central location
of all global values in the TLOPO Discord Bot project.
"""
APP_DESCRIPTION_UPSTREAM = "Discord bot by TLOPO. <3 https://github.com/TheLegendofPiratesOnline/discord-bot"
APP_DESCRIPTION_FORK = "Dynasty of Persia fork. https://github.com/jamebus/discord-bot"
APP_DESCRIPTION = "%s\n%s" % (APP_DESCRIPTION_UPSTREAM, APP_DESCRIPTION_FORK)
LOCAL_SETTINGS_FILENAME = 'local_settings.json'
SETTINGS_FILENAME = 'settings.json'
# API Docs: https://tlopo.com/docs/
API_URLS = {
'news_feed':'https://api.tlopo.com/news/feed/',
'news_notification':'https://api.tlopo.com/news/notification',
'shards':'https://api.tlopo.com/shards',
'system_status':'https://api.tlopo.com/system/status'
}
BOT_TASKS = {
'task_shards': {
'time': 25.0,
'api_url': API_URLS.get('shards')
},
'task_system_status': {
'time': 25.0,
'api_url': API_URLS.get('system_status')
},
'task_news_feed': {
'time': 25.0,
'api_url': API_URLS.get('news_feed')
},
'task_news_notification': {
'time': 25.0,
'api_url': API_URLS.get('news_notification')
}
}
BASE_CHANNEL_TO_NAME = {
'401000000': 'Abassa',
'402000000': 'Andaba',
'403000000': 'Bequermo',
'404000000': 'Cortos',
'405000000': 'Exuma',
'406000000': 'Fragilles',
'407000000': 'Juntos',
'408000000': 'Kokojillo',
'409000000': 'Levanta',
'410000000': 'Nocivo',
'411000000': 'Sabada',
'412000000': 'Valor'
}
STATUS_ALIVE_SRV = 1
STATUS_MESSAGE_SRV = 2
STATUS_UPDATE_SRV = 4
STATUS_ERROR_SRV = 8
STATUS_FATAL_SRV = 16
STATUS_UNKNOWN_SRV = 32
SRV_CODE_TO_STATUS = {
STATUS_ALIVE_SRV: "STATUS_ALIVE",
STATUS_MESSAGE_SRV: "STATUS_MESSAGE",
STATUS_UPDATE_SRV: "STATUS_UPDATE",
STATUS_ERROR_SRV: "STATUS_ERROR",
STATUS_FATAL_SRV: "STATUS_FATAL",
STATUS_UNKNOWN_SRV: "STATUS_UNKNOWN"
}
STATUS_ALIVE_GLOB = 1
STATUS_MESSAGE_GLOB = 2
STATUS_UPDATE_GLOB = 3
STATUS_ERROR_GLOB = 4
STATUS_FATAL_GLOB = 5
STATUS_UNKNOWN_GLOB = 6
GLOB_CODE_TO_STATUS = {
STATUS_ALIVE_GLOB: "STATUS_ALIVE",
STATUS_MESSAGE_GLOB: "STATUS_MESSAGE",
STATUS_UPDATE_GLOB: "STATUS_UPDATE",
STATUS_ERROR_GLOB: "STATUS_ERROR",
STATUS_FATAL_GLOB: "STATUS_FATAL",
STATUS_UNKNOWN_GLOB: "STATUS_UNKNOWN"
}
|
"""Escrevam um programa para aprovar o empréstimo bancário para a compra de uma casa. O programa
vai perguntar o valor da casa, o salário do comprador e em quantos anos ele vai pagar.
Calucule o valor da prestação mensal, sabendo que ela não pode excerder 30% do
salário ou então o emprétismo será negado"""
|
x = int(input('Enter a number: '))
index = 0
for i in range(1, int(x/2) +1):
if x % i == 0:
print(i)
index += 1
print(x)
print(f'There were {index + 1} divisors')
|
# CALCULATING THE WORK ON AN OBJECT, GIVEN THE FORCE AND DISPLACEMENT OF THE OBJECT.
# creating a function to calculate the work.
def calc_work (force, displacement):
# arithmetic calculation to determine the work on an object.
work = force * displacement
work = round(work, 2)
# returning the value of work to print as output.
return work
# code to receive input regarding the values for force and displacement.
force = int(input("Enter the amount of force in Newtons please:"))
displacement = int(input("Enter the amount of displacement in meters please:"))
# code to print the final output which indicates the work on the object in joules.
print("The work on the object is:", calc_work(force, displacement),"J")
|
class DiseaseError(Exception):
"Base class for disease module exceptions."
pass
class ParserError(DiseaseError): pass
|
"""038 - ESCREVA UM PROGRAMA QUE LEIA DOIS NÚMEROS INTEIROS E COMPARE-OS:
MOSTRANDO NA TELA UMA MENSAGEM:
- O PRIMEIRO VALOR É MAIOR
- O SEGUNDO VALOR É MAIOR
- NÃO EXISTE VALOR MAIOR, OS DOIS SÃO IGUAIS"""
print('*' * 10, ' DESAFIO 038 ', '*' * 10)
n1 = int(input('Informe o primeiro número: '))
n2 = int(input('Informe o segundo número : '))
if n1 > n2:
print('O primeiro número informado {} é o maior.'.format(n1))
elif n2 > n1:
print('O segundo número informado {} é o maior.'.format(n2))
else:
print('Não existe número maior, ambos são iguais.')
|
""" Stored values specific to a single test execution. """
test_file = None
browser = None
browser_definition = None
browsers = {}
data = None
secrets = None
description = None
settings = None
test_dirname = None
test_path = None
project_name = None
project_path = None
testdir = None
execution_reportdir = None
testfile_reportdir = None
logger = None
tags = []
environment = None
# values below correspond to the current running test function
test_name = None
steps = []
errors = []
test_reportdir = None
timers = {}
|
class SaveCurrentUser():
def save_model(self, request, obj, form, change):
obj.current_user = request.user
super().save_model(request, obj, form, change)
class SaveCurrentUserAdmin():
def save_model(self, request, obj, form, change):
obj.current_user = request.user
super().save_model(request, obj, form, change)
readonly_fields = [
'creator',
'created',
'modifier',
'modified'
]
|
LANGUAGE_SETTING = {
'ru':
{'start_urls':
'https://ru.wikipedia.org/w/index.php?title=%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:%D0%92%D1%81%D0%B5_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D1%8B',
'allowed_domains': 'ru.wikipedia.org',
'next_page_words': "Следующая страница"
},
'en':
{'start_urls': 'https://en.wikipedia.org/wiki/Special:AllPages',
'allowed_domains': 'en.wikipedia.org',
'next_page_words': "Next page"
}
}
|
# CSV related
ROW_MOST_RECENT_DAY = 1 # First row with data (i.e row 2)
ROW_FIRST_COMPLETE_DAY = 3 # First row with valid data for the 7-day total (i.e row 4)
COL_AREA_CODE = 0
COL_AREA_NAME = 1
COL_AREA_TYPE = 2
COL_DATE = 3
COL_TOTAL_DEATHS = 4
COL_HOSPITAL_CASES = 5
COL_NEW_CASES = 6
|
# Time: O(n)
# Space: O(h)
class Solution(object):
def widthOfBinaryTree(self, root):
"""
:type root: TreeNode
:rtype: int
"""
def dfs(node, i, depth, leftmosts):
if not node:
return 0
if depth >= len(leftmosts):
leftmosts.append(i)
return max(i-leftmosts[depth]+1, \
dfs(node.left, i*2, depth+1, leftmosts), \
dfs(node.right, i*2+1, depth+1, leftmosts))
leftmosts = []
return dfs(root, 1, 0, leftmosts)
|
class House:
"""All houses have rooms, a type of roof, and may have a porch."""
def __init__(self):
self.__rooms = list()
self.__roof = None
self.__porch = False
def add_room(self, room):
self.__rooms.append(room)
def set_roof(self, roof):
self.__roof = roof
def set_porch(self, porch):
self.__porch = porch
def __str__(self):
return 'rooms: ' + str(self.__rooms) + '\nroof: ' + self.__roof + '\nporch: ' + str(self.__porch)
|
'''
A peak element is an element that is greater than its neighbors.
Given an input array nums, where nums[i] ≠ nums[i+1], find a peak element and return its index.
The array may contain multiple peaks, in that case return the index to any one of the peaks is fine.
You may imagine that nums[-1] = nums[n] = -∞.
Example 1:
Input: nums = [1,2,3,1]
Output: 2
Explanation: 3 is a peak element and your function should return the index number 2.
'''
class Solution(object):
def findPeakElement(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
left, right = 0, len(nums)-1
while left < right:
mid = (left + right) /2
if nums[mid] > nums[mid+1]:
right = mid
else:
left = mid + 1
return left
class Solution(object):
def findPeakElement(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
left = [False]*len(nums)
right = [False]*len(nums)
left[0], right[len(nums)-1] = True, True
for index in range(1, len(nums)):
if nums[index] > nums[index-1]:
left[index] = True
for index in range(len(nums)-2, -1, -1):
if nums[index] > nums[index+1]:
right[index] = True
for index in range(len(left)):
if left[index] and right[index]:
return index
return -1
|
DEFAULT_AUTOPILOT_CONFIG = {
'region_name': 'YOUR_REGION',
's3_bucket': 'YOUR_S3_BUCKET',
'role_arn': 'YOUR_ROLE_ARN',
}
|
#
t = int(input("T:"))
list = []
for i in range(0,t):
k = input("A B :")
list.append(k)
print(list)
for z in range(0,len(list)):
q = str(list[z])
m = q.split(" ")
print(int(m[0])+int(m[1]))
|
'''
a + b + c = 1000.
a2+b2=C2
求 abc的积
'''
const=1000
def main():
a=1
b=1
c=1000-a-b
while(not pTrigle(a,b,c)):
b+=1
a=abc(b)
c = const - a - b
if(c<0):
break
print("a:%s b:%s c:%s"%(a,b,c))
print("result: %s"%(a*b*c))
def abc(b):
'''根据公式求出a和 b的关系'''
if (2 * const - 2 * b)==0 :
return b
a = int((const ** 2 - 2 * const * b) / (2 * const - 2 * b))
return a
def pTrigle(a,b,c):
'''判断是否符合勾股定理'''
if a**2+b**2==c**2:
return True
return False
main()
|
class BianPlugin():
def ready(self):
return True
def run(self,core,*params):
if len(params) != 4:
raise Exception("missing params:"+str(params))
init = "from halo_bian.bian.exceptions import BianException\n\nfrom halo_bian.bian.bian import ActionTerms\n\nfrom botocore.exceptions import ClientError\n\n"
imports = params[0]
if init not in imports:
imports = imports + init
base_lib= params[1]
base_class_name= params[2]
name= params[3]
line3 = ""
if name.endswith('Activation'):
imports = imports + "from " + base_lib + " import " + 'Activation'+base_class_name + "\n\n"
line3 = "class " + name + "Mixin(Activation" + base_class_name + "):" + \
"\n\tpass"
elif name.endswith('Configuration'):
imports = imports + "from " + base_lib + " import " + 'Configuration' + base_class_name + "\n\n"
line3 = "class " + name + "Mixin(Configuration" + base_class_name + "):" + \
"\n\tpass"
elif name.endswith('Feedback'):
imports = imports + "from " + base_lib + " import " + 'Feedback' + base_class_name + "\n\n"
line3 = "class " + name + "Mixin(Feedback" + base_class_name + "):" + \
"\n\tpass"
elif name.endswith('Initiation'):
line3 = "class " + name + "Mixin(" + base_class_name + "):" + \
"\n\tbian_action = ActionTerms.INITIATE"
elif name.endswith('Update'):
line3 = "class " + name + "Mixin(" + base_class_name + "):" + \
"\n\tbian_action = ActionTerms.UPDATE"
elif name.endswith('Control'):
line3 = "class " + name + "Mixin(" + base_class_name + "):" + \
"\n\tbian_action = ActionTerms.CONTROL"
elif name.endswith('Exchange'):
line3 = "class " + name + "Mixin(" + base_class_name + "):" + \
"\n\tbian_action = ActionTerms.EXCHANGE"
elif name.endswith('Execution'):
line3 = "class " + name + "Mixin(" + base_class_name + "):" + \
"\n\tbian_action = ActionTerms.EXECUTE"
elif name.endswith('Requisition'):
line3 = "class " + name + "Mixin(" + base_class_name + "):" + \
"\n\tbian_action = ActionTerms.REQUEST"
else:
line3 = "class " + name + "Mixin(" + base_class_name + "):" + \
"\n\tbian_action = ActionTerms.RETRIEVE"
return {"mixin":{"imports":imports,"code":line3}}
|
V,E=map(int,input().split())
edges=[set() for i in range(V)]
for i in range(E):
a,b=map(int,input().split())
edges[a-1].add(b-1)
edges[b-1].add(a-1)
for i in range(V):
print(len({n for v in edges[i] for n in edges[v] if not n in edges[i] and n!=i}))
|
'''
Copyright (C) 2021 Sovrasov V. - All Rights Reserved
* You may use, distribute and modify this code under the
* terms of the MIT license.
* You should have received a copy of the MIT license with
* this file. If not visit https://opensource.org/licenses/MIT
'''
def flops_to_string(flops, units='GMac', precision=2):
if units is None:
if flops // 10**9 > 0:
return str(round(flops / 10.**9, precision)) + ' GMac'
elif flops // 10**6 > 0:
return str(round(flops / 10.**6, precision)) + ' MMac'
elif flops // 10**3 > 0:
return str(round(flops / 10.**3, precision)) + ' KMac'
else:
return str(flops) + ' Mac'
else:
if units == 'GMac':
return str(round(flops / 10.**9, precision)) + ' ' + units
elif units == 'MMac':
return str(round(flops / 10.**6, precision)) + ' ' + units
elif units == 'KMac':
return str(round(flops / 10.**3, precision)) + ' ' + units
else:
return str(flops) + ' Mac'
def params_to_string(params_num, units=None, precision=2):
if units is None:
if params_num // 10 ** 6 > 0:
return str(round(params_num / 10 ** 6, 2)) + ' M'
elif params_num // 10 ** 3:
return str(round(params_num / 10 ** 3, 2)) + ' k'
else:
return str(params_num)
else:
if units == 'M':
return str(round(params_num / 10.**6, precision)) + ' ' + units
elif units == 'K':
return str(round(params_num / 10.**3, precision)) + ' ' + units
else:
return str(params_num)
|
a=[12,9,1,3]
a1=[12,9,1,3]
s=[]
z=0
c=0
#expected a=[1,3,12,9]
for i in range(len(a)):
q=0
while(a1[i]>0):
z=a1[i]%10
q=q+z
a1[i]=a1[i]//10
s.append(q)
print(a)
s.sort()
print(s)
|
# host and port for client and tracker
HOST = '192.168.43.92'
PORT = 9992
# redis key prefixes
TRANSACTION_QUEUE_KEY = 'transactions.queue'
BLOCK_KEY_PREFIX = 'chain.block.'
PREV_HASH_KEY = 'prev_hash'
SEND_TRANSACTIONS_QUEUE_KEY = 'send.transactions.queue'
TRANSACTIONS_SIGNATURE = 'transactions.signature.'
# number of transactions in a block
TRANSACTIONS_IN_BLOCK = 1
GAMER_BAWA = 1024
|
# -*- coding: utf-8 -*-
description = 'Monitoring for DNS setup'
group = 'basic'
tango_base = 'tango://localhost:10000/test/'
devices = dict(
dns_main_voltages = device('nicos_mlz.emc.devices.janitza_online.VectorInput',
description = 'Voltage monitoring',
tangodevice = tango_base + 'janitza_dns/voltages',
),
dns_main_currents = device('nicos_mlz.emc.devices.janitza_online.VectorInput',
description = 'Current monitoring',
tangodevice = tango_base + 'janitza_dns/currents',
),
dns_main_thd = device('nicos_mlz.emc.devices.janitza_online.VectorInput',
description = 'Total harmonic distortion monitoring',
tangodevice = tango_base + 'janitza_dns/thd',
),
dns_online = device('nicos_mlz.emc.devices.janitza_online.OnlineMonitor',
description = 'Combination of all monitoring devices',
voltages = 'dns_main_voltages',
currents = 'dns_main_currents',
thd = 'dns_main_thd',
),
)
|
# -*- coding: utf-8 -*-
"""
Created on 2019/8/27
@author: LoyeLee
"""
# 容错最大的有色判断
MAX_RGB_VALUE = 20
# 噪点大小
MAX_NOISY_COUNT = 25
# RGBA白色定义
WHITE_COLOR = (255, 255, 255, 255)
# RGBA黑色定义
BLACK_COLOR = (0, 0, 0, 255)
def print_char_pic(width, height, s_data):
"""
画出字符图, 空格为白色, 点为黑色
"""
_pic_str = ''
for y in range(0, height):
for x in range(0, width):
_point = s_data[y * width + x]
if _point == WHITE_COLOR:
_pic_str += ' '
else:
_pic_str += '*'
_pic_str += '\n'
print(_pic_str)
def gen_white_black_points(image):
"""
根据点阵颜色强制转换黑白点
"""
data = image.getdata()
new_data = []
for item in data:
if item[0] > MAX_RGB_VALUE and item[1] > MAX_RGB_VALUE and item[2] > MAX_RGB_VALUE:
new_data.append(WHITE_COLOR)
else:
new_data.append(BLACK_COLOR)
return new_data
def reduce_noisy(width, height, points):
"""
横向扫描, 获取最大边界大小. 除去小于最大噪点大小的面积.
"""
# 标记位置, 初始化都是0, 未遍历过
flag_list = []
for i in range(width * height):
flag_list.append(0)
# 遍历
for index, value in enumerate(points):
_y = index // width
_x = index - _y * width
# print _x, _y
if flag_list[index] == 0 and value == BLACK_COLOR:
flag_list[index] = 1
_tmp_list = [index]
recursion_scan_black_point(_x, _y, width, height, _tmp_list, flag_list, points)
if len(_tmp_list) <= MAX_NOISY_COUNT:
for x in _tmp_list:
points[x] = WHITE_COLOR
else:
flag_list[index] = 1
def recursion_scan_black_point(x, y, width, height, tmp_list, flag_list, points):
# 左上
if 0 <= (x - 1) < width and 0 <= (y - 1) < height:
_x = x - 1
_y = y - 1
_inner_recursion(_x, _y, width, height, tmp_list, flag_list, points)
# 上
if 0 <= (y - 1) < height:
_x = x
_y = y - 1
_inner_recursion(_x, _y, width, height, tmp_list, flag_list, points)
# 右上
if 0 <= (x + 1) < width and 0 <= (y - 1) < height:
_x = x + 1
_y = y - 1
_inner_recursion(_x, _y, width, height, tmp_list, flag_list, points)
# 左
if 0 <= (x - 1) < width:
_x = x - 1
_y = y
_inner_recursion(_x, _y, width, height, tmp_list, flag_list, points)
# 右
if 0 <= (x + 1) < width:
_x = x + 1
_y = y
_inner_recursion(_x, _y, width, height, tmp_list, flag_list, points)
# 左下
if 0 <= (x - 1) < width and 0 <= (y + 1) < height:
_x = x - 1
_y = y + 1
_inner_recursion(_x, _y, width, height, tmp_list, flag_list, points)
# 下
if 0 <= (y + 1) < height:
_x = x
_y = y + 1
_inner_recursion(_x, _y, width, height, tmp_list, flag_list, points)
# 右下
if 0 <= (x + 1) < width and 0 <= (y + 1) < height:
_x = x + 1
_y = y + 1
_inner_recursion(_x, _y, width, height, tmp_list, flag_list, points)
def _inner_recursion(new_x, new_y, width, height, tmp_list, flag_list, points):
_index = new_x + width * new_y
if flag_list[_index] == 0 and points[_index] == BLACK_COLOR:
tmp_list.append(_index)
flag_list[_index] = 1
recursion_scan_black_point(new_x, new_y, width, height, tmp_list, flag_list, points)
else:
flag_list[_index] = 1
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@Author: Nasy
@Date: Dec 31. 2016
@email: sy_n@me.com
@file: optlib/tools/color_print.py
@license: MIT
An Excited Python Script
"""
RESET_COLOR = "\033[0m"
COLOR_CODES = {
"blue": "\033[1;34m", # blue
"green": "\033[1;32m", # green
"yellow": "\033[1;33m", # yellow
"red": "\033[1;31m", # red
"b_red": "\033[1;41m", # background red
}
|
#
# PySNMP MIB module HPN-ICF-DHCPSNOOP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPN-ICF-DHCPSNOOP-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:25:32 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection", "ValueSizeConstraint")
hpnicfdot1qVlanIndex, = mibBuilder.importSymbols("HPN-ICF-LswVLAN-MIB", "hpnicfdot1qVlanIndex")
hpnicfCommon, = mibBuilder.importSymbols("HPN-ICF-OID-MIB", "hpnicfCommon")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
InetAddressType, InetAddress = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressType", "InetAddress")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
MibIdentifier, TimeTicks, NotificationType, Counter64, Bits, ModuleIdentity, ObjectIdentity, IpAddress, Gauge32, Unsigned32, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "TimeTicks", "NotificationType", "Counter64", "Bits", "ModuleIdentity", "ObjectIdentity", "IpAddress", "Gauge32", "Unsigned32", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "Integer32")
TextualConvention, DisplayString, MacAddress, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "MacAddress", "TruthValue")
hpnicfDhcpSnoop = ModuleIdentity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36))
if mibBuilder.loadTexts: hpnicfDhcpSnoop.setLastUpdated('200501140000Z')
if mibBuilder.loadTexts: hpnicfDhcpSnoop.setOrganization('')
hpnicfDhcpSnoopMibObject = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 1))
hpnicfDhcpSnoopEnable = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2))).clone('disable')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfDhcpSnoopEnable.setStatus('current')
hpnicfDhcpSnoopTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 1, 2), )
if mibBuilder.loadTexts: hpnicfDhcpSnoopTable.setStatus('current')
hpnicfDhcpSnoopEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 1, 2, 1), ).setIndexNames((0, "HPN-ICF-DHCPSNOOP-MIB", "hpnicfDhcpSnoopClientIpAddressType"), (0, "HPN-ICF-DHCPSNOOP-MIB", "hpnicfDhcpSnoopClientIpAddress"))
if mibBuilder.loadTexts: hpnicfDhcpSnoopEntry.setStatus('current')
hpnicfDhcpSnoopClientIpAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 1, 2, 1, 1), InetAddressType().clone('ipv4'))
if mibBuilder.loadTexts: hpnicfDhcpSnoopClientIpAddressType.setStatus('current')
hpnicfDhcpSnoopClientIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 1, 2, 1, 2), InetAddress())
if mibBuilder.loadTexts: hpnicfDhcpSnoopClientIpAddress.setStatus('current')
hpnicfDhcpSnoopClientMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 1, 2, 1, 3), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfDhcpSnoopClientMacAddress.setStatus('current')
hpnicfDhcpSnoopClientProperty = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("static", 1), ("dynamic", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfDhcpSnoopClientProperty.setStatus('current')
hpnicfDhcpSnoopClientUnitNum = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 1, 2, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfDhcpSnoopClientUnitNum.setStatus('current')
hpnicfDhcpSnoopTrustTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 1, 3), )
if mibBuilder.loadTexts: hpnicfDhcpSnoopTrustTable.setStatus('current')
hpnicfDhcpSnoopTrustEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 1, 3, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: hpnicfDhcpSnoopTrustEntry.setStatus('current')
hpnicfDhcpSnoopTrustStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 1, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("untrusted", 0), ("trusted", 1))).clone('untrusted')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfDhcpSnoopTrustStatus.setStatus('current')
hpnicfDhcpSnoopVlanTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 1, 4), )
if mibBuilder.loadTexts: hpnicfDhcpSnoopVlanTable.setStatus('current')
hpnicfDhcpSnoopVlanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 1, 4, 1), ).setIndexNames((0, "HPN-ICF-DHCPSNOOP-MIB", "hpnicfDhcpSnoopVlanIndex"))
if mibBuilder.loadTexts: hpnicfDhcpSnoopVlanEntry.setStatus('current')
hpnicfDhcpSnoopVlanIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 1, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647)))
if mibBuilder.loadTexts: hpnicfDhcpSnoopVlanIndex.setStatus('current')
hpnicfDhcpSnoopVlanEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 1, 4, 1, 2), TruthValue().clone('false')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfDhcpSnoopVlanEnable.setStatus('current')
hpnicfDhcpSnoopTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 2))
hpnicfDhcpSnoopTrapsPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 2, 0))
hpnicfDhcpSnoopTrapsObject = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 2, 1))
hpnicfDhcpSnoopSpoofServerMac = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 2, 1, 1), MacAddress()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: hpnicfDhcpSnoopSpoofServerMac.setStatus('current')
hpnicfDhcpSnoopSpoofServerIP = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 2, 1, 2), IpAddress()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: hpnicfDhcpSnoopSpoofServerIP.setStatus('current')
hpnicfDhcpSnoopBindingIP = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 2, 1, 3), IpAddress()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: hpnicfDhcpSnoopBindingIP.setStatus('current')
hpnicfDhcpSnoopBindingMac = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 2, 1, 4), MacAddress()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: hpnicfDhcpSnoopBindingMac.setStatus('current')
hpnicfDhcpSnoopSpoofServerDetected = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 2, 0, 1)).setObjects(("IF-MIB", "ifIndex"), ("HPN-ICF-LswVLAN-MIB", "hpnicfdot1qVlanIndex"), ("HPN-ICF-DHCPSNOOP-MIB", "hpnicfDhcpSnoopSpoofServerMac"), ("HPN-ICF-DHCPSNOOP-MIB", "hpnicfDhcpSnoopSpoofServerIP"))
if mibBuilder.loadTexts: hpnicfDhcpSnoopSpoofServerDetected.setStatus('current')
hpnicfDhcpSnoopNewBinding = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 36, 2, 0, 2)).setObjects(("HPN-ICF-DHCPSNOOP-MIB", "hpnicfDhcpSnoopBindingIP"), ("HPN-ICF-DHCPSNOOP-MIB", "hpnicfDhcpSnoopBindingMac"))
if mibBuilder.loadTexts: hpnicfDhcpSnoopNewBinding.setStatus('current')
mibBuilder.exportSymbols("HPN-ICF-DHCPSNOOP-MIB", hpnicfDhcpSnoopTraps=hpnicfDhcpSnoopTraps, hpnicfDhcpSnoopClientMacAddress=hpnicfDhcpSnoopClientMacAddress, hpnicfDhcpSnoopBindingIP=hpnicfDhcpSnoopBindingIP, hpnicfDhcpSnoopVlanEntry=hpnicfDhcpSnoopVlanEntry, hpnicfDhcpSnoopTable=hpnicfDhcpSnoopTable, hpnicfDhcpSnoopClientUnitNum=hpnicfDhcpSnoopClientUnitNum, hpnicfDhcpSnoopEnable=hpnicfDhcpSnoopEnable, hpnicfDhcpSnoopTrapsObject=hpnicfDhcpSnoopTrapsObject, hpnicfDhcpSnoopSpoofServerIP=hpnicfDhcpSnoopSpoofServerIP, hpnicfDhcpSnoopVlanIndex=hpnicfDhcpSnoopVlanIndex, hpnicfDhcpSnoopBindingMac=hpnicfDhcpSnoopBindingMac, PYSNMP_MODULE_ID=hpnicfDhcpSnoop, hpnicfDhcpSnoopTrustStatus=hpnicfDhcpSnoopTrustStatus, hpnicfDhcpSnoop=hpnicfDhcpSnoop, hpnicfDhcpSnoopMibObject=hpnicfDhcpSnoopMibObject, hpnicfDhcpSnoopTrustTable=hpnicfDhcpSnoopTrustTable, hpnicfDhcpSnoopVlanTable=hpnicfDhcpSnoopVlanTable, hpnicfDhcpSnoopClientIpAddressType=hpnicfDhcpSnoopClientIpAddressType, hpnicfDhcpSnoopClientProperty=hpnicfDhcpSnoopClientProperty, hpnicfDhcpSnoopSpoofServerDetected=hpnicfDhcpSnoopSpoofServerDetected, hpnicfDhcpSnoopClientIpAddress=hpnicfDhcpSnoopClientIpAddress, hpnicfDhcpSnoopNewBinding=hpnicfDhcpSnoopNewBinding, hpnicfDhcpSnoopVlanEnable=hpnicfDhcpSnoopVlanEnable, hpnicfDhcpSnoopTrustEntry=hpnicfDhcpSnoopTrustEntry, hpnicfDhcpSnoopEntry=hpnicfDhcpSnoopEntry, hpnicfDhcpSnoopTrapsPrefix=hpnicfDhcpSnoopTrapsPrefix, hpnicfDhcpSnoopSpoofServerMac=hpnicfDhcpSnoopSpoofServerMac)
|
class InvalidEmailException(Exception):
pass
def send_email(email, subject, content):
if not "@" in email:
raise InvalidEmailException("email does not contain '@'")
try:
send_email("xyz", "t11", "t22")
except InvalidEmailException:
print("Ungültige Email")
finally:
print("always executed, cleaning up...")
|
## HTML lists ##
CHECKBOX_TOGGLES = [
"accelerometer",
"gps",
"calls",
"texts",
"wifi",
"bluetooth",
"power_state",
"proximity",
"gyro",
"magnetometer",
"devicemotion",
"ambient_audio",
"reachability",
"allow_upload_over_cellular_data",
"use_anonymized_hashing",
"use_gps_fuzzing",
"call_clinician_button_enabled",
"call_research_assistant_button_enabled"
]
TIMER_VALUES = [
"accelerometer_off_duration_seconds",
"accelerometer_on_duration_seconds",
"bluetooth_on_duration_seconds",
"bluetooth_total_duration_seconds",
"bluetooth_global_offset_seconds",
"check_for_new_surveys_frequency_seconds",
"create_new_data_files_frequency_seconds",
"gps_off_duration_seconds",
"gps_on_duration_seconds",
"seconds_before_auto_logout",
"upload_data_files_frequency_seconds",
"voice_recording_max_time_length_seconds",
"wifi_log_frequency_seconds",
"gyro_off_duration_seconds",
"gyro_on_duration_seconds",
"magnetometer_off_duration_seconds",
"magnetometer_on_duration_seconds",
"devicemotion_off_duration_seconds",
"devicemotion_on_duration_seconds"
]
|
# Comments allow for programers to write reminders or create a better understanding of the code and program
city_name = "St. Potatosburg"
# The amount of people living in the city of St. Potatosburg:
city_pop = 340000
|
# Script to generate translation and rotation specializations of placed volumes,
rotation = [0x1B1, 0x18E, 0x076, 0x16A, 0x155, 0x0AD, 0x0DC, 0x0E3, 0x11B,
0x0A1, 0x10A, 0x046, 0x062, 0x054, 0x111, 0x200]
translation = ["translation::kGeneric", "translation::kIdentity"]
header_string = """\
/// @file TransformationSpecializations.icc
/// @author Script generated.
#ifndef VECGEOM_NO_SPECIALIZATION
"""
specialization_string = """\
if (trans_code == {:s} && rot_code == {:#05x}) {{
return VolumeType::template Create<{:s}, {:#05x}>(
logical_volume, transformation,
#ifdef VECCORE_CUDA
id, copy_no, child_id,
#endif
placement);
}}
"""
generic_string = """\
#endif // No specialization
return VolumeType::template Create<translation::kGeneric, rotation::kGeneric>(
logical_volume, transformation,
#ifdef VECCORE_CUDA
id, copy_no, child_id,
#endif
placement);\
"""
output_file = open("../VecGeom/management/TransformationSpecializations.icc", "w")
output_file.write(header_string)
for r in rotation:
for t in translation:
output_file.write(specialization_string.format(t, r, t, r))
output_file.write(generic_string)
output_file.close()
|
class Solution:
def dropNegatives(self, A):
j = 0
newlist = []
for i in range(len(A)):
if A[i] > 0:
newlist.append(A[i])
return newlist
def firstMissingPositive(self, nums: List[int]) -> int:
A = self.dropNegatives(nums)
if len(A)==0:
return 1
if len(A)==1:
return 1 if A[0] >= 2 else 2
else:
n = len(A)
for i in range(n):
item = abs(A[i])
if item <= n:
A[item-1] = -1 * abs(A[item-1])
res = len(A) + 1
for i in range(n):
if A[i] > 0:
return i+1
return res
|
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# author: bigfoolliu
"""
- getattr函数获取实例的属性
- __getattr__,当调用的属性或者方法不存在的时候,该方法会被调用
"""
class A(object):
def __init__(self, name):
self.name = name
def default_func(self):
print("default func")
def __getattr__(self, attr):
return self.default_func
if __name__ == "__main__":
a = A("jim")
print(getattr(a, "name"))
a.f1() # 该方法不存在,调用默认方法
|
def group_weekly(df, date_col):
weekly = df.copy()
weekly['week'] = weekly[date_col].dt.isocalendar().week
weekly['year'] = weekly[date_col].dt.isocalendar().year
weekly['year_week'] = weekly['year'].astype(str) + "-" + weekly['week'].astype(str)
weekly = weekly.groupby('year_week').sum()
weekly.drop(['week', 'year'], axis=1, inplace=True)
weekly.reset_index(inplace=True)
return weekly
|
# coding:utf-8
workers = 4
threads = 4
bind = '0.0.0.0:5000'
worker_class = 'eventlet' # 'gevent'
worker_connections = 2000
pidfile = 'gunicorn.pid'
accesslog = './logs/gunicorn_acess.log'
errorlog = './logs/gunicorn_error.log'
loglevel = 'info'
reload = True
|
seed_csv = """
id,name,some_date
1,Easton,1981-05-20T06:46:51
2,Lillian,1978-09-03T18:10:33
3,Jeremiah,1982-03-11T03:59:51
4,Nolan,1976-05-06T20:21:35
""".lstrip()
model_sql = """
select * from {{ ref('seed') }}
"""
profile_yml = """
version: 2
models:
- name: materialization
columns:
- name: id
tests:
- unique
- not_null
- name: name
tests:
- not_null
"""
|
# -*- coding: utf-8 -*-
"""
1954. Minimum Garden Perimeter to Collect Enough Apples
https://leetcode.com/problems/minimum-garden-perimeter-to-collect-enough-apples/
Example 1:
Input: neededApples = 1
Output: 8
Explanation: A square plot of side length 1 does not contain any apples.
However, a square plot of side length 2 has 12 apples inside (as depicted in the image above).
The perimeter is 2 * 4 = 8.
Example 2:
Input: neededApples = 13
Output: 16
Example 3:
Input: neededApples = 1000000000
Output: 5040
"""
class Solution:
def minimumPerimeter(self, neededApples: int) -> int:
"""
TC: O(neededApples^(1/3)) / SC: O(1)
"""
i = 1
summedApples = 0
while True:
currentApples = 12 * i * i
summedApples += currentApples
if summedApples >= neededApples:
return i * 2 * 4
i += 1
|
donate_msg = """{name} is an open source project, created with the intention
of sharing a simple and easy-to-use application for the care of
information integrity, through the use of hash table files.
If you like {name}, feel free to make a donation if you think so.
Any kind of support will be immensely grateful."""
|
# -*- coding: utf-8 -*-
# * ********************************************************************* *
# * Copyright (C) 2018 by xmz *
# * ********************************************************************* *
__author__ = "Marcin Zelek (marcin.zelek@gmail.com)"
__copyright__ = "Copyright (C) xmz. All Rights Reserved."
###############################################################################
# Class #
###############################################################################
class JscSection:
"""
The JSC section data container.
"""
SECTION_GLUE = "."
GLOBAL_SECTION_NAME = "__GLOBAL__"
def __init__(self, name=GLOBAL_SECTION_NAME):
self.__section = []
self.__section.append(name)
def __append(self, name):
self.__section.append('"' + str(name) + '"')
@property
def data(self):
return self.__section
def go_up(self, name):
"""
Move level up for current section
Parameters
----------
name : string
Section name
"""
if len(self.__section) == 1 and JscSection.GLOBAL_SECTION_NAME in self.__section:
self.__section = []
self.__append(name)
def go_down(self):
"""
Move level down for current section
"""
if len(self.__section) == 1:
self.__section = []
self.__section.append(JscSection.GLOBAL_SECTION_NAME)
else:
del self.__section[-1]
def str(self):
"""
Get JSC data section as string
Returns
-------
string
JSC data section as string.
"""
if len(self.__section) == 1 and JscSection.GLOBAL_SECTION_NAME in self.__section:
section_name = None
else:
section_name = JscSection.SECTION_GLUE.join(self.__section)
return section_name
###############################################################################
# End of file #
###############################################################################
|
# The below function calculates the BMI or Body Mass Index of a person
# Created by Agamdeep Singh / CodeWithAgam
# Youtube: CodeWithAgam
# Github: CodeWithAgam
# Instagram: @agamdeep_21, @coderagam001
# Twitter: @CoderAgam001
# Linkdin: Agamdeep Singh
def calculate_BMI():
# Get the inputs from the user
height = float(input("Enter your height in M: "))
weight = float(input("Enter your weight in KG: "))
# Calculate the BMI or Body Mass Index
# The formula is, weight(kg) / height^2(m^2)
BMI = int(weight / height**2)
# Check for the conditions and tell which category their BMI is.
if BMI < 18.5:
print(f"Your BMI is {BMI}, you are underweight!")
elif BMI < 25:
print(f"Your BMI is {BMI}, you have a normal weight!")
elif BMI < 30:
print(f"Your BMI is {BMI}, you are slightly overweight!")
elif BMI < 35:
print(f"Your BMI is {BMI}, you are obese!")
else:
print(f"Your BMI is {BMI}, you are clinically obese!")
print("Calculate the BMI or Body Mass Index")
calculate_BMI()
|
{
"includes": [
"common.gypi",
],
"targets": [
{
"target_name": "colony-lua",
"product_name": "colony-lua",
"type": "static_library",
"defines": [
'LUA_USELONGLONG',
],
"sources": [
'<(colony_lua_path)/src/lapi.c',
'<(colony_lua_path)/src/lauxlib.c',
'<(colony_lua_path)/src/lbaselib.c',
'<(colony_lua_path)/src/lcode.c',
'<(colony_lua_path)/src/ldblib.c',
'<(colony_lua_path)/src/ldebug.c',
'<(colony_lua_path)/src/ldo.c',
'<(colony_lua_path)/src/ldump.c',
'<(colony_lua_path)/src/lfunc.c',
'<(colony_lua_path)/src/lgc.c',
'<(colony_lua_path)/src/linit.c',
'<(colony_lua_path)/src/liolib.c',
'<(colony_lua_path)/src/llex.c',
'<(colony_lua_path)/src/lmathlib.c',
'<(colony_lua_path)/src/lmem.c',
'<(colony_lua_path)/src/loadlib.c',
'<(colony_lua_path)/src/lobject.c',
'<(colony_lua_path)/src/lopcodes.c',
'<(colony_lua_path)/src/loslib.c',
'<(colony_lua_path)/src/lparser.c',
'<(colony_lua_path)/src/lstate.c',
'<(colony_lua_path)/src/lstring.c',
'<(colony_lua_path)/src/lstrlib.c',
'<(colony_lua_path)/src/ltable.c',
'<(colony_lua_path)/src/ltablib.c',
'<(colony_lua_path)/src/ltm.c',
'<(colony_lua_path)/src/lundump.c',
'<(colony_lua_path)/src/lvm.c',
'<(colony_lua_path)/src/lzio.c',
'<(colony_lua_path)/src/print.c',
'<(lua_bitop_path)/bit.c'
],
# Lua uses tmpname and has empty bodies and doesn't use some vars
'cflags': [
'-Wno-deprecated-declarations',
'-Wno-empty-body',
'-Wno-unused-but-set-variable',
'-Wno-unused-value',
'-Wno-unused-variable',
'-Wno-unknown-warning-option',
],
'xcode_settings': {
'OTHER_CFLAGS': [
'-Wno-deprecated-declarations',
'-Wno-empty-body',
'-Wno-unused-but-set-variable',
'-Wno-unused-value',
'-Wno-unknown-warning-option',
],
},
"include_dirs": [
"<(colony_lua_path)/src",
"<(lua_bitop_path)/",
],
'direct_dependent_settings': {
'defines': [
'COLONY_LUA',
'LUA_USELONGLONG',
],
'include_dirs': [
"<(colony_lua_path)/src",
],
'link_settings': {
'libraries': [
'-lm'
]
}
}
},
{
"target_name": "colony-luajit",
"product_name": "colony-luajit",
"type": "static_library",
'sources': [
# generated by the action below
'<(INTERMEDIATE_DIR)/libluajit.o',
],
'actions': [
{
'action_name': 'luajit-build',
'inputs': [
'<(colony_luajit_path)/Makefile',
],
'outputs': [
'<(INTERMEDIATE_DIR)/libluajit.o',
],
'action': ['<(tools_path)/luajit-build.sh', '<(OS)', '<@(_outputs)'],
},
],
'direct_dependent_settings': {
'defines': [
'COLONY_LUA',
],
'include_dirs': [
"<(colony_luajit_path)/src",
],
'link_settings': {
'libraries': [
'-lm'
]
}
}
},
{
'target_name': 'dir_builtin',
'type': 'none',
'sources': [
'<(SHARED_INTERMEDIATE_DIR)/<(_target_name).c'
],
'actions': [
{
'action_name': '<(_target_name)_compile',
'inputs': [
'<(node_libs_path)/_stream_duplex.js',
'<(node_libs_path)/_stream_passthrough.js',
'<(node_libs_path)/_stream_readable.js',
'<(node_libs_path)/_stream_transform.js',
'<(node_libs_path)/_stream_writable.js',
'<(runtime_path)/colony/modules/_structured_clone.js',
'<(node_libs_path)/assert.js',
'<(runtime_path)/colony/modules/buffer.js',
'<(runtime_path)/colony/modules/child_process.js',
'<(runtime_path)/colony/modules/console.js',
'<(runtime_path)/colony/modules/crypto.js',
'<(runtime_path)/colony/modules/dgram.js',
'<(runtime_path)/colony/modules/domain.js',
'<(runtime_path)/colony/modules/dns.js',
'<(node_libs_path)/events.js',
'<(runtime_path)/colony/modules/fs.js',
'<(runtime_path)/colony/modules/http.js',
'<(runtime_path)/colony/modules/https.js',
'<(runtime_path)/colony/modules/net.js',
'<(runtime_path)/colony/modules/os.js',
'<(node_libs_path)/path.js',
'<(node_libs_path)/punycode.js',
'<(node_libs_path)/querystring.js',
'<(runtime_path)/colony/modules/repl.js',
'<(node_libs_path)/stream.js',
'<(node_libs_path)/string_decoder.js',
'<(runtime_path)/colony/modules/tls.js',
'<(runtime_path)/colony/modules/tty.js',
'<(node_libs_path)/url.js',
'<(runtime_path)/colony/modules/util.js',
'<(runtime_path)/colony/modules/zlib.js',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/<(_target_name).c',
],
'action': [ '<(tools_path)/compile_folder.sh', '<(SHARED_INTERMEDIATE_DIR)/<(_target_name).c', '<(_target_name)', '<(enable_luajit)', '<@(_inputs)' ],
},
]
},
{
'target_name': 'dir_runtime_lib',
'type': 'none',
'sources': [
'<(SHARED_INTERMEDIATE_DIR)/<(_target_name).c'
],
'actions': [
{
'action_name': '<(_target_name)_compile',
'inputs': [
'<(runtime_path)/colony/lua/cli.lua',
'<(runtime_path)/colony/lua/colony-init.lua',
'<(runtime_path)/colony/lua/colony-js.lua',
'<(runtime_path)/colony/lua/colony-node.lua',
'<(runtime_path)/colony/lua/colony.lua',
'<(runtime_path)/colony/lua/preload.lua',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/<(_target_name).c',
],
'action': [ '<(tools_path)/compile_folder.sh', '<(SHARED_INTERMEDIATE_DIR)/<(_target_name).c', '<(_target_name)', '<(enable_luajit)', '<@(_inputs)' ],
},
]
},
{
"target_name": "libcolony",
"product_name": "libcolony",
"type": "static_library",
'cflags': [ '-Wall', '-Wextra', '-Werror' ],
'defines': [
'COLONY_COMPILER_PATH=<(compiler_path)',
'COLONY_NODE_VERSION=<(node_version)',
'__TESSEL_RUNTIME_SEMVER__=<!(node -p \"require(\\\"../package.json\\\").version")',
],
"sources": [
'<(runtime_path)/tm_event.c',
'<(runtime_path)/tm_timer.c',
'<(runtime_path)/colony/lua_hsregex.c',
'<(runtime_path)/colony/lua_tm.c',
'<(runtime_path)/colony/lua_rapidjson.c',
'<(runtime_path)/colony/colony.c',
'<(runtime_path)/colony/colony_init.c',
'<(runtime_path)/colony/colony_runtime.c',
'<(runtime_path)/colony/lua_http_parser.c',
'<(SHARED_INTERMEDIATE_DIR)/dir_builtin.c',
'<(SHARED_INTERMEDIATE_DIR)/dir_runtime_lib.c',
],
"include_dirs": [
'<(runtime_path)/',
'<(runtime_path)/colony/',
"<(colony_lua_path)/src",
],
"dependencies": [
'dir_builtin',
'dir_runtime_lib',
'libtm.gyp:hsregex',
'libtm.gyp:fortuna',
'libtm.gyp:dlmalloc',
'libtm.gyp:libtm',
'libtm.gyp:approxidate',
'libtm.gyp:http_parser',
],
"direct_dependent_settings": {
"include_dirs": [
'<(runtime_path)/colony/'
]
},
'conditions': [
['enable_luajit!=1', {
"dependencies": [
'colony-lua',
]
}],
['enable_luajit==1', {
"dependencies": [
'colony-luajit',
]
}],
['OS=="linux"', {
"link_settings": {
"libraries": [ "-ldl" ],
},
}],
['OS!="arm"', {
"sources": [
'<(runtime_path)/posix/tm_uptime.c',
'<(runtime_path)/posix/tm_timestamp.c',
],
}],
['enable_ssl==1', {
'dependencies': [
"libtm.gyp:axtls",
"libtm.gyp:tm-ssl",
],
}],
['enable_net==1', {
'sources': [
'<(runtime_path)/colony/lua_cares.c',
],
'dependencies': [
'libtm.gyp:c-ares',
],
}],
],
}
]
}
|
awnser = 5
print('Enter a number between 1 and 10')
for i in range(0, 4):
guess = int(input(f'You have {4-i} guesses left: '))
if guess == 5 or guess == 10:
print('You guessed correct!')
break
else:
print(f'The guess of {guess} was not correct')
if guess > awnser:
print('Your guess was too large')
elif 4-i == 1:
print('Youre out of chances :(')
break
else:
print('Your guess was too small')
|
"""
0606. Construct String from Binary Tree
You need to construct a string consists of parenthesis and integers from a binary tree with the preorder traversing way.
The null node needs to be represented by empty parenthesis pair "()". And you need to omit all the empty parenthesis pairs that don't affect the one-to-one mapping relationship between the string and the original binary tree.
Example 1:
Input: Binary tree: [1,2,3,4]
1
/ \
2 3
/
4
Output: "1(2(4))(3)"
Explanation: Originallay it needs to be "1(2(4)())(3()())",
but you need to omit all the unnecessary empty parenthesis pairs.
And it will be "1(2(4))(3)".
Example 2:
Input: Binary tree: [1,2,3,null,4]
1
/ \
2 3
\
4
Output: "1(2()(4))(3)"
Explanation: Almost the same as the first example,
except we can't omit the first parenthesis pair to break the one-to-one mapping relationship between the input and the output.
"""
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def tree2str(self, t: TreeNode):
if not t: return ''
left = '(' + self.tree2str(t.left) + ')' if (t.left or t.right) else ''
right = '(' + self.tree2str(t.right) + ')' if t.right else ''
return str(t.val) + left + right
|
class WrongInputDataType(Exception):
def __init__(self, message="Input data must be a pandas.Series."):
self.message = message
super().__init__(self.message)
class NotFittedError(Exception):
def __init__(self, message="Please call fit() before detect().", tip=""):
self.message = " ".join([message, tip])
super().__init__(self.message)
class NoRangeDefinedError(NotFittedError):
def __init__(self, message="Or specify min/max range when instantiating detector object."):
super().__init__(message)
class InvalidArgument(Exception):
def __init__(self, argument_name, requirement):
self.message = f"{argument_name} must be {requirement}."
super().__init__(self.message)
class NotInteger(InvalidArgument):
def __init__(self, argument_name):
super().__init__(argument_name, "an integer")
class NonUniqueTimeStamps(Exception):
def __init__(self, message="Found multiple values at the same time stamp."):
self.message = message
super().__init__(self.message)
|
alpha = "abcdefghijklmnopqrstuvwxyz"
key = "xznlwebgjhqdyvtkfuompciasr"
message = input("enter the message : ")
cipher = ""
for i in message:
cipher+=key[alpha.index(i)]
print(cipher)
|
def keep(sequence, predicate):
pass
def discard(sequence, predicate):
pass
|
class Solution(object):
"""
A happy number is a number defined by the following process: Starting with any positive integer,
replace the number by the sum of the squares of its digits, and repeat the process until the number equals 1
(where it will stay), or it loops endlessly in a cycle which does not include 1.
Those numbers for which this process ends in 1 are happy numbers.
"""
def is_happy(self, n):
"""
:type n: int
:rtype: bool
"""
check_list = set()
while n != 1:
n = sum([int(e) ** 2 for e in str(n)])
if n in check_list:
return False
else:
check_list.add(n)
else:
return True
s = Solution()
print(s.is_happy(19))
|
# coding: utf-8
# create by tongshiwei on 2018/4/27
class Solution:
def subsetsWithDup(self, nums):
"""
:type nums: List[int]
:rtype: List[List[int]]
"""
num_rec = {}
for n in nums:
if n not in num_rec:
num_rec[n] = 0
num_rec[n] += 1
num_times = list(num_rec.items())
end = len(num_times)
def get_res(final_res, res, pointer):
if pointer == end:
final_res += [res]
return
val, times = num_times[pointer]
for i in range(1, times + 1):
get_res(final_res, res + [val] * i, pointer + 1)
get_res(final_res, res, pointer + 1)
final_res = []
get_res(final_res, [], 0)
return final_res
if __name__ == '__main__':
s = Solution()
print(s.subsetsWithDup([1, 2, 2]))
|
n1=int(input('Digite a idade da primeira pessoa:'))
n2=int(input('Digite a idade da segunda pessoa:'))
n3=int(input('Digite a idade da terceira pessoa:'))
#Maior ou igual a 100
#menor que 100
soma = n1+ n2+ n3
if soma > 100 or soma == 100:
print('Maior ou igual a 100')
else:
print('Menor que 100')
|
class Solution:
"""
@param grid: a 2D array
@return: the maximum area of an island in the given 2D array
"""
def maxAreaOfIsland(self, grid):
# Write your code here
maxArea = 0
m = len(grid)
n = len(grid[0])
def dfs(r, c):
if grid[r][c] == 0:
return 0
total = 1
grid[r][c] = 0
for nr, nc in ((r-1, c), (r+1, c), (r, c-1), (r, c+1)):
if 0 <= nr < m and 0 <= nc < n:
total += dfs(nr, nc)
return total
for i, row in enumerate(grid):
for j, val in enumerate(row):
if val == 1:
maxArea = max(maxArea, dfs(i, j))
return maxArea
|
print ("Angka Pertama : ")
a = int(input())
print ("Angka Kedua : ")
b = int (input())
print (hasil = a * b)
|
# Stop words
STOP_WORDS = set(
"""
ke gareng ga selekanyo tlhwatlhwa yo mongwe se
sengwe fa go le jalo gongwe ba na mo tikologong
jaaka kwa morago nna gonne ka sa pele nako teng
tlase fela ntle magareng tsona feta bobedi kgabaganya
moo gape kgatlhanong botlhe tsotlhe bokana e esi
setseng mororo dinako golo kgolo nnye wena gago
o ntse ntle tla goreng gangwe mang yotlhe gore
eo yona tseraganyo eng ne sentle re rona thata
godimo fitlha pedi masomamabedi lesomepedi mmogo
tharo tseo boraro tseno yone jaanong bobona bona
lesome tsaya tsamaiso nngwe masomethataro thataro
tsa mmatota tota sale thoko supa dira tshwanetse di mmalwa masisi
bonala e tshwanang bogolo tsenya tsweetswee karolo
sepe tlhalosa dirwa robedi robongwe lesomenngwe gaisa
tlhano lesometlhano botlalo lekgolo
""".split()
)
|
class Solution:
def canConstruct(self, ransomNote, magazine):
"""
:type ransomNote: str
:type magazine: str
:rtype: bool
"""
ransomNote = list(ransomNote)
magazine = list(magazine)
r_len = len(ransomNote)
m_len = len(magazine)
if r_len > m_len:
return False
if r_len == 0:
return True
i = 0
k = 0
while i < r_len and k < m_len:
if ransomNote[i] == magazine[k]:
magazine.pop(k)
m_len -= 1
k = 0
i += 1
else:
k += 1
return i == r_len
if __name__ == '__main__':
solution = Solution()
print(solution.canConstruct("a", "b"))
print(solution.canConstruct("aa", "ab"))
print(solution.canConstruct("aa", "aa"))
print(solution.canConstruct("bjaajgea", \
"affhiiicabhbdchbidghccijjbfjfhjeddgggbajhidhjchiedhdibgeaecffbbbefiabjdhggihccec"))
else:
pass
|
'''
UFCG
PROGRAMAÇÃO 1
JOSE ARTHUR NEVES DE BRITO - 119210204
Lei Estadual
'''
idade = int(input("Idade? "))
if(idade < 12):
print('criança (meia entrada)')
elif(idade >= 65):
print('idoso (meia entrada)')
else:
estudante = input('Estudante? ')
if(estudante == 's'):
rp = input('Rede Pública? ')
if(rp == 's'):
print('estudante da rede pública (isento)')
else:
print('estudante (meia entrada)')
else:
print('adulto (inteira)')
|
'''
LC1413: Minimum Value to Get Positive Step by Step Sum
Given an array of integers nums, you start
with an initial positive value startValue.
In each iteration, you calculate the step by
step sum of startValue plus elements in nums (from left to right).
Return the minimum positive value of startValue
such that the step by step sum is never less than 1.
Example 1:
Input: nums = [-3,2,-3,4,2]
Output: 5
Explanation: If you choose startValue = 4,
in the third iteration your step by step sum is less than 1.
Example 2:
Input: nums = [1,2]
Output: 1
Explanation: Minimum start value should be positive.
Example 3:
Input: nums = [1,-2,-3]
Output: 5
Process1:
Simulate starting at 0, and let's say
the minimum value you attain during the
process is m. If say, m = -4, then you
should choose the starting value start = 5,
because it would just shift all the intermediate
values up by 5. While if m = 100, then we just
choose the minimum possible starting value start = 1.
In general, the answer is max(1, 1 - m).'''
class Solution(object):
def minStartValue(self, nums):
prefix = [0]
for x in nums:
prefix.append(prefix[-1] + x)
return max(1, 1 - min(prefix))
|
def solve_part_one(puzzle: list) -> int:
turn = 1
numbers = []
while turn <= 2020:
if turn <= len(puzzle):
numbers.append(puzzle[turn - 1])
turn += 1
continue
# We finished the initial list. Look at the last number
last_num = numbers[-1]
if last_num in numbers[:len(numbers) - 1]:
previous_turn = find_index(numbers[:len(numbers) - 1], last_num)
numbers.append(turn - 1 - previous_turn)
else:
numbers.append(0)
turn += 1
return numbers[-1]
def find_index(numbers: list, number_to_find: int) -> int:
index = 0
for pos in range(0, len(numbers)):
if number_to_find == numbers[pos]:
index = pos
return index + 1
def solve_part_two(puzzle: list) -> int:
turn = 1
numbers = []
mem_helper = {}
while turn <= 30000000:
if turn <= len(puzzle):
numbers.append(puzzle[turn - 1])
if turn < len(puzzle):
mem_helper[puzzle[turn - 1]] = turn
turn += 1
continue
# We finished the initial list. Look at the last number
last_num = numbers[-1]
if last_num in mem_helper:
numbers.append(turn - 1 - mem_helper[last_num])
mem_helper[last_num] = turn - 1
else:
numbers.append(0)
mem_helper[last_num] = turn - 1
turn += 1
return numbers[-1]
if __name__ == '__main__':
puzzle_input = [15, 12, 0, 14, 3, 1]
solve_part_one(puzzle_input)
solve_part_two(puzzle_input)
|
#
# PySNMP MIB module BNET-ATM-ATOM-AUG-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BNET-ATM-ATOM-AUG-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:40:04 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion")
atmVclVci, atmVclVpi = mibBuilder.importSymbols("ATM-MIB", "atmVclVci", "atmVclVpi")
atmSoftPVccLeafReference, = mibBuilder.importSymbols("ATM-SOFT-PVC-MIB", "atmSoftPVccLeafReference")
AtmAddr, = mibBuilder.importSymbols("ATM-TC-MIB", "AtmAddr")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
s5AtmTop, = mibBuilder.importSymbols("S5-ROOT-MIB", "s5AtmTop")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Integer32, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, NotificationType, Counter32, ModuleIdentity, MibIdentifier, ObjectIdentity, IpAddress, Gauge32, Unsigned32, TimeTicks, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "NotificationType", "Counter32", "ModuleIdentity", "MibIdentifier", "ObjectIdentity", "IpAddress", "Gauge32", "Unsigned32", "TimeTicks", "Counter64")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
bnetAtmAug = MibIdentifier((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 3))
bnetAtmDeviceAtmAddr = MibScalar((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 3, 1), AtmAddr()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bnetAtmDeviceAtmAddr.setStatus('mandatory')
if mibBuilder.loadTexts: bnetAtmDeviceAtmAddr.setDescription('The ATM address which applies for this particular device. Where multiple addresses apply, include only primary one.')
bnetAtmLearnAddrs = MibScalar((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 3, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("learnAddrs", 2), ("forgetAddrs", 3))).clone('learnAddrs')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: bnetAtmLearnAddrs.setStatus('mandatory')
if mibBuilder.loadTexts: bnetAtmLearnAddrs.setDescription('When set to learnAddrs, atmAddrVcl and atmVclAddrBind tables will keep track of ATM Addresses.')
atmfAddressClientTable = MibTable((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 3, 3), )
if mibBuilder.loadTexts: atmfAddressClientTable.setStatus('mandatory')
if mibBuilder.loadTexts: atmfAddressClientTable.setDescription('Provides additional detail about each ATM client.')
atmfAddressClientEntry = MibTableRow((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 3, 3, 1), ).setIndexNames((0, "BNET-ATM-ATOM-AUG-MIB", "atmfAddressPort"), (0, "BNET-ATM-ATOM-AUG-MIB", "atmfAddressAtmAddress"))
if mibBuilder.loadTexts: atmfAddressClientEntry.setStatus('mandatory')
if mibBuilder.loadTexts: atmfAddressClientEntry.setDescription('An entry with information about an ATM client.')
atmfAddressPort = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 3, 3, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: atmfAddressPort.setStatus('mandatory')
if mibBuilder.loadTexts: atmfAddressPort.setDescription(' Uni Port ')
atmfAddressAtmAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 3, 3, 1, 2), AtmAddr()).setMaxAccess("readonly")
if mibBuilder.loadTexts: atmfAddressAtmAddress.setStatus('mandatory')
if mibBuilder.loadTexts: atmfAddressAtmAddress.setDescription('ATM Address')
atmfAddressClientType = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 3, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=NamedValues(("other", 1), ("cnTurbo", 2), ("cnCircuitSaver", 3), ("laneTurbo", 4), ("laneCircuitSaver", 5), ("external", 6), ("les", 7), ("bus", 8), ("les-bus", 9), ("lecs", 10), ("spvc", 11))).clone('external')).setMaxAccess("readonly")
if mibBuilder.loadTexts: atmfAddressClientType.setStatus('mandatory')
if mibBuilder.loadTexts: atmfAddressClientType.setDescription('Indicates the type of client.')
atmfAddressClientCallCount = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 3, 3, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: atmfAddressClientCallCount.setStatus('mandatory')
if mibBuilder.loadTexts: atmfAddressClientCallCount.setDescription('Indicates number of calls currently up, which involve this particular client address.')
bnetAtmSoftPVccExtnTable = MibTable((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 3, 4), )
if mibBuilder.loadTexts: bnetAtmSoftPVccExtnTable.setStatus('mandatory')
if mibBuilder.loadTexts: bnetAtmSoftPVccExtnTable.setDescription('The table used to maintain Soft Permanent Virtual Channel Connection (Soft PVCCs) circuit ids. The Soft PVCC table is applicable only to switches.')
bnetAtmSoftPVccExtnEntry = MibTableRow((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 3, 4, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "ATM-MIB", "atmVclVpi"), (0, "ATM-MIB", "atmVclVci"), (0, "ATM-SOFT-PVC-MIB", "atmSoftPVccLeafReference"))
if mibBuilder.loadTexts: bnetAtmSoftPVccExtnEntry.setStatus('mandatory')
if mibBuilder.loadTexts: bnetAtmSoftPVccExtnEntry.setDescription('Each entry in this table represents the circuit id of a Soft Permanent Virtual Channel Connection (Soft PVCC).')
bnetAtmSoftPVccCircuitId = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 1, 6, 14, 3, 4, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bnetAtmSoftPVccCircuitId.setStatus('mandatory')
if mibBuilder.loadTexts: bnetAtmSoftPVccCircuitId.setDescription('This is the circuit id for a Soft PVCC.')
mibBuilder.exportSymbols("BNET-ATM-ATOM-AUG-MIB", atmfAddressClientType=atmfAddressClientType, bnetAtmSoftPVccCircuitId=bnetAtmSoftPVccCircuitId, bnetAtmDeviceAtmAddr=bnetAtmDeviceAtmAddr, bnetAtmSoftPVccExtnEntry=bnetAtmSoftPVccExtnEntry, bnetAtmAug=bnetAtmAug, bnetAtmSoftPVccExtnTable=bnetAtmSoftPVccExtnTable, atmfAddressClientTable=atmfAddressClientTable, atmfAddressPort=atmfAddressPort, atmfAddressClientCallCount=atmfAddressClientCallCount, atmfAddressAtmAddress=atmfAddressAtmAddress, bnetAtmLearnAddrs=bnetAtmLearnAddrs, atmfAddressClientEntry=atmfAddressClientEntry)
|
UP_KEY = 16777235
DOWN_KEY = 16777237
TAB_KEY = 16777217
|
#author Kollen Gruizenga
#function to return all words in list L who start with letter "let"
def beginWith(L, let):
result = []
for x in L:
if (x[0] == let):
result += [x]
return result
|
#!/usr/bin/env python3
"""
Check if a given number is a prime number
"""
def prime_checker(number):
if number <= 1:
return False
for i in range(2, number - 1):
if number % i == 0: # not reminder, is not a prime
return False
return True
n = int(input("Check this number: "))
result = prime_checker(number=n)
print(result)
|
CAMPAIGN_INCIDENT_CONTEXT = {
"EmailCampaign": {
"firstIncidentDate": "2021-11-21T14:00:07.425185+00:00",
"incidents": [
{
"emailfrom": "examplesupport@example2.com",
"emailfromdomain": "example.com",
"id": "1",
"name": "Verify your example account 798",
"occurred": "2021-11-21T14:00:07.119800133Z",
"recipients": [
"victim-test6@demistodev.onmicrosoft.com"
],
"recipientsdomain": [
"onmicrosoft.com"
],
"severity": 0,
"similarity": 1,
"status": 1
},
{
"emailfrom": "examplesupport@example2.com",
"emailfromdomain": "example2.com",
"id": "2",
"name": "Verify your example account 798",
"occurred": "2021-11-21T14:59:01.690685509Z",
"recipients": [
"victim-test1@demistodev.onmicrosoft.com"
],
"recipientsdomain": [
"onmicrosoft.com"
],
"severity": 0,
"similarity": 0.9999999999999999,
"status": 1
},
{
"emailfrom": "examplesupport@example2.com",
"emailfromdomain": "example.com",
"id": "3",
"name": "Verify your example account 798",
"occurred": "2021-11-21T15:00:07.425185504Z",
"recipients": [
"victim-test7@demistodev.onmicrosoft.com"
],
"recipientsdomain": [
"onmicrosoft.com"
],
"severity": 3,
"similarity": 1,
"status": 1
}
],
"indicators": [
{
"id": "1263",
"value": "http://www.example.com"
}
],
"involvedIncidentsCount": 3,
"isCampaignFound": True
},
"ExistingCampaignID": [
"809"
]
}
NEW_INCIDENT_CONTEXT = {
"EmailCampaign": {
"firstIncidentDate": "2021-11-21T14:00:07.425185+00:00",
"incidents": [
{
"emailfrom": "examplesupport@example2.com",
"emailfromdomain": "example.com",
"id": "5",
"name": "Verify your example account 798",
"occurred": "2021-11-21T15:01:07.119800133Z",
"recipients": [
"victim-test6@demistodev.onmicrosoft.com"
],
"recipientsdomain": [
"onmicrosoft.com"
],
"severity": 0,
"similarity": 1,
"status": 1
},
{
"emailfrom": "examplesupport@example2.com",
"emailfromdomain": "example.com",
"id": "1",
"name": "Verify your example account 798",
"occurred": "2021-11-21T14:00:07.119800133Z",
"recipients": [
"victim-test6@demistodev.onmicrosoft.com"
],
"recipientsdomain": [
"onmicrosoft.com"
],
"severity": 0,
"similarity": 0.99,
"status": 1
},
{
"emailfrom": "examplesupport@example2.com",
"emailfromdomain": "example2.com",
"id": "2",
"name": "Verify your example account 798",
"occurred": "2021-11-21T14:59:01.690685509Z",
"recipients": [
"victim-test1@demistodev.onmicrosoft.com"
],
"recipientsdomain": [
"onmicrosoft.com"
],
"severity": 0,
"similarity": 0.98,
"status": 1
},
{
"emailfrom": "examplesupport@example2.com",
"emailfromdomain": "example.com",
"id": "3",
"name": "Verify your example account 798",
"occurred": "2021-11-21T15:00:07.425185504Z",
"recipients": [
"victim-test7@demistodev.onmicrosoft.com"
],
"recipientsdomain": [
"onmicrosoft.com"
],
"severity": 3,
"similarity": 0.85,
"status": 1
}
],
"indicators": [
{
"id": "1263",
"value": "http://www.example.com"
}
],
"involvedIncidentsCount": 4,
"isCampaignFound": True
},
"ExistingCampaignID": [
"809"
]
}
NEW_INCIDENT_2_CONTEXT = {
"EmailCampaign": {
"firstIncidentDate": "2021-11-21T14:00:07.425185+00:00",
"incidents": [
{
"emailfrom": "examplesupport@example2.com",
"emailfromdomain": "example.com",
"id": "4",
"name": "Verify your example account 798",
"occurred": "2021-11-21T16:00:00.119800133Z",
"recipients": [
"victim-test6@demistodev.onmicrosoft.com"
],
"recipientsdomain": [
"onmicrosoft.com"
],
"severity": 0,
"similarity": 1,
"status": 1
},
{
"emailfrom": "examplesupport@example2.com",
"emailfromdomain": "example.com",
"id": "1",
"name": "Verify your example account 798",
"occurred": "2021-11-21T14:00:07.119800133Z",
"recipients": [
"victim-test6@demistodev.onmicrosoft.com"
],
"recipientsdomain": [
"onmicrosoft.com"
],
"severity": 0,
"similarity": 0.98,
"status": 1
},
{
"emailfrom": "examplesupport@example2.com",
"emailfromdomain": "example2.com",
"id": "2",
"name": "Verify your example account 798",
"occurred": "2021-11-21T14:59:01.690685509Z",
"recipients": [
"victim-test1@demistodev.onmicrosoft.com"
],
"recipientsdomain": [
"onmicrosoft.com"
],
"severity": 0,
"similarity": 0.97,
"status": 1
},
{
"emailfrom": "examplesupport@example2.com",
"emailfromdomain": "example.com",
"id": "3",
"name": "Verify your example account 798",
"occurred": "2021-11-21T15:00:07.425185504Z",
"recipients": [
"victim-test7@demistodev.onmicrosoft.com"
],
"recipientsdomain": [
"onmicrosoft.com"
],
"severity": 3,
"similarity": 0.86,
"status": 1
}
],
"indicators": [
{
"id": "1263",
"value": "http://www.example.com"
}
],
"involvedIncidentsCount": 4,
"isCampaignFound": True
},
"ExistingCampaignID": [
"809"
]
}
OLD_INCIDENT_CONTEXT = {
"EmailCampaign": {
"firstIncidentDate": "2021-11-21T14:00:07.425185+00:00",
"incidents": [
{
"emailfrom": "examplesupport@example2.com",
"emailfromdomain": "example.com",
"id": "1",
"name": "Verify your example account 798",
"occurred": "2021-11-21T14:00:07.119800133Z",
"recipients": [
"victim-test6@demistodev.onmicrosoft.com"
],
"recipientsdomain": [
"onmicrosoft.com"
],
"severity": 0,
"similarity": 1,
"status": 1
},
{
"emailfrom": "examplesupport@example2.com",
"emailfromdomain": "example2.com",
"id": "2",
"name": "Verify your example account 798",
"occurred": "2021-11-21T14:59:01.690685509Z",
"recipients": [
"victim-test1@demistodev.onmicrosoft.com"
],
"recipientsdomain": [
"onmicrosoft.com"
],
"severity": 0,
"similarity": 0.9999999999999999,
"status": 1
},
{
"emailfrom": "examplesupport@example2.com",
"emailfromdomain": "example.com",
"id": "3",
"name": "Verify your example account 798",
"occurred": "2021-11-21T15:00:07.425185504Z",
"recipients": [
"victim-test7@demistodev.onmicrosoft.com"
],
"recipientsdomain": [
"onmicrosoft.com"
],
"severity": 3,
"similarity": 1,
"status": 1
}
],
"indicators": [
{
"id": "1263",
"value": "http://www.example.com"
}
],
"involvedIncidentsCount": 3,
"isCampaignFound": True
},
"ExistingCampaignID": [
"809"
]
}
NEW_EMPTY_CAMPAIGN = {}
INCIDENTS_BY_ID = {'0': CAMPAIGN_INCIDENT_CONTEXT, '1': NEW_EMPTY_CAMPAIGN, '3': OLD_INCIDENT_CONTEXT,
'4': NEW_INCIDENT_2_CONTEXT, '5': NEW_INCIDENT_CONTEXT}
|
# Use a variable to represent a person’s name, and print
# a message to that person. Your message should be simple, such as, “Hello Eric,
# would you like to learn some Python today?”
name = "Kuljot"
print(f"Hello {name}, would you like to learn some Python today?")
|
'''
Class to represent plant care.
'''
class Plant_Care:
'''
General representation of abstract plant care.
'''
def __init__(self,
times_monthly=2,
plant_type='Cacti',
soil_moisutre='Arid'):
self.times_monthly = times_monthly
self.plant_type = plant_type
self.soil_moisture = soil_moisutre
def print_times_monthly(self):
'''
Print how many times you should water monthly.
'''
print('water {} times monthly'.format(self.times_monthly))
def what_soil(self):
'''
Print what type of soil you have
'''
print('The soil type is {}'.format(self.soil_moisture))
|
# Defaults
ansi_colors = """
RESTORE=$(echo -en '\033[0m')
RED=$(echo -en '\033[00;31m')
GREEN=$(echo -en '\033[00;32m')
YELLOW=$(echo -en '\033[00;33m')
BLUE=$(echo -en '\033[00;34m')
MAGENTA=$(echo -en '\033[00;35m')
PURPLE=$(echo -en '\033[00;35m')
CYAN=$(echo -en '\033[00;36m')
LIGHTGRAY=$(echo -en '\033[00;37m')
"""
logging_format = "[%(asctime)s] {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s"
def reindent(s, numSpaces):
"""Remove leading spaces from string see: Python Cookbook by David Ascher, Alex Martelli"""
s = s.split('\n')
s = [(numSpaces * ' ') + line.lstrip() for line in s]
s = '\n'.join(s)
return s
class Struct:
def __init__(self, **entries):
self.__dict__.update(entries)
def get(self, _key):
return self.__dict__.get(_key)
|
"""
https://projecteuler.net/problem=4
Largest palindrome product
Problem 4
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
Find the largest palindrome made from the product of two 3-digit numbers.
"""
def main():
min_factor = 100
max_factor = 999
upper_limit = 999 * 999
length = len(str(upper_limit))
max_index = int(length/2) - 1
# is_even_limit_length = length % 2 == 0
preffix = int(str(upper_limit)[:max_index+1])
original_preffix_lenght = len(str(preffix))
result = None
factor1 = None
factor2 = None
keep_trying = True
while(keep_trying):
if (len(str(preffix)) < original_preffix_lenght):
raise ValueError('Not implemented')
text = f'{str(preffix)}{str(preffix)[::-1]}'
number = int(text)
if number > upper_limit:
preffix -= 1
continue
for component in range(999, 99, -1):
if number % component != 0:
continue
quotient = int(number/component)
if len(str(quotient)) == len(str(component)):
keep_trying = False
result = number
factor1 = component
factor2 = quotient
break
preffix -= 1
print(f'{result=};{factor1=};{factor2=}')
if __name__ == "__main__":
main()
|
#
# PySNMP MIB module NTWS-AP-CONFIG-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NTWS-AP-CONFIG-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:25:33 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueRangeConstraint")
NtwsChannelNum, NtwsApFingerprint, NtwsApSerialNum, NtwsApRadioIndex, NtwsApPowerMode, NtwsApLedMode, NtwsPowerLevel, NtwsRadioMode, NtwsRadioAntennaLocation, NtwsRadioType, NtwsRadioChannelWidth, NtwsApBias, NtwsApNum, NtwsApAttachType = mibBuilder.importSymbols("NTWS-AP-TC", "NtwsChannelNum", "NtwsApFingerprint", "NtwsApSerialNum", "NtwsApRadioIndex", "NtwsApPowerMode", "NtwsApLedMode", "NtwsPowerLevel", "NtwsRadioMode", "NtwsRadioAntennaLocation", "NtwsRadioType", "NtwsRadioChannelWidth", "NtwsApBias", "NtwsApNum", "NtwsApAttachType")
NtwsPhysPortNumberOrZero, = mibBuilder.importSymbols("NTWS-BASIC-TC", "NtwsPhysPortNumberOrZero")
ntwsMibs, = mibBuilder.importSymbols("NTWS-ROOT-MIB", "ntwsMibs")
NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance")
MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, Counter64, ObjectIdentity, Gauge32, Unsigned32, NotificationType, Counter32, Integer32, MibIdentifier, TimeTicks, Bits, ModuleIdentity, iso = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "Counter64", "ObjectIdentity", "Gauge32", "Unsigned32", "NotificationType", "Counter32", "Integer32", "MibIdentifier", "TimeTicks", "Bits", "ModuleIdentity", "iso")
RowStatus, TruthValue, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "TruthValue", "DisplayString", "TextualConvention")
ntwsApConfigMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14))
ntwsApConfigMib.setRevisions(('2009-11-19 01:08',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ntwsApConfigMib.setRevisionsDescriptions(('v1.0.8: Initial version',))
if mibBuilder.loadTexts: ntwsApConfigMib.setLastUpdated('200911190108Z')
if mibBuilder.loadTexts: ntwsApConfigMib.setOrganization('Nortel Networks')
if mibBuilder.loadTexts: ntwsApConfigMib.setContactInfo('www.nortelnetworks.com')
if mibBuilder.loadTexts: ntwsApConfigMib.setDescription("AP Configuration objects for Nortel Networks wireless switches. AP = Access Point; AC = Access Controller (wireless switch), the device that runs a SNMP Agent implementing this MIB. Copyright 2009 Nortel Networks. All rights reserved. This Nortel Networks SNMP Management Information Base Specification (Specification) embodies Nortel Networks' confidential and proprietary intellectual property. This Specification is supplied 'AS IS' and Nortel Networks makes no warranty, either express or implied, as to the use, operation, condition, or performance of the Specification.")
class NtwsApTemplateName(TextualConvention, OctetString):
description = 'AP Template Name, consists of printable ASCII characters between 0x21 (!), and 0x7d (}) with no leading, embedded, or trailing space. Cannot be a zero length string.'
status = 'current'
displayHint = '255a'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(1, 32)
class NtwsRadioProfileName(TextualConvention, OctetString):
description = 'Radio Profile Name, consists of printable ASCII characters between 0x21 (!), and 0x7d (}) with no leading, embedded, or trailing space. Cannot be a zero length string.'
status = 'current'
displayHint = '255a'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(1, 16)
class NtwsServiceProfileName(TextualConvention, OctetString):
description = 'Service Profile Name, consists of printable ASCII characters between 0x21 (!), and 0x7d (}) with no leading, embedded, or trailing space. Cannot be a zero length string.'
status = 'current'
displayHint = '255a'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(1, 32)
class NtwsSnoopFilterName(TextualConvention, OctetString):
description = 'Snoop Filter Name, consists of printable ASCII characters between 0x21 (!), and 0x7d (}) with no leading, embedded, or trailing space. Cannot be a zero length string.'
status = 'current'
displayHint = '255a'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(1, 15)
class NtwsServiceProfileSsidType(TextualConvention, Integer32):
description = 'Enumeration of Service Types provided on a service profile.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("clear", 1), ("crypto", 2))
class NtwsServiceProfile11nMode(TextualConvention, Integer32):
description = 'Enumeration of 802.11n modes for a service profile.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("enable", 1), ("disable", 2), ("required", 3))
class NtwsServiceProfile11nFrameAggregationType(TextualConvention, Integer32):
description = 'Enumeration of 802.11n frame aggregation types for a service profile.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))
namedValues = NamedValues(("msdu", 1), ("mpdu", 2), ("all", 3), ("disable", 4))
class NtwsServiceProfile11nMsduMaxLength(TextualConvention, Integer32):
description = 'Enumeration of 802.11n A-MSDU maximum lengths for a service profile.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("msdu-4k", 1), ("msdu-8k", 2))
class NtwsServiceProfile11nMpduMaxLength(TextualConvention, Integer32):
description = 'Enumeration of 802.11n A-MPDU maximum lengths for a service profile.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))
namedValues = NamedValues(("mpdu-8k", 1), ("mpdu-16k", 2), ("mpdu-32k", 3), ("mpdu-64k", 4))
class NtwsServiceProfileAuthFallthruType(TextualConvention, Integer32):
description = 'Enumeration of Authentication Fallthrough types for a service profile.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))
namedValues = NamedValues(("none", 1), ("web-auth", 2), ("web-aaa-portal", 3), ("last-resort", 4))
class NtwsServiceProfileCacMode(TextualConvention, Integer32):
description = 'Enumeration of Call Admission Control types for a service profile.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("none", 1), ("session", 2), ("vendor", 3))
class NtwsRadioProfileCountermeasuresMode(TextualConvention, Integer32):
description = 'Enumeration of the Countermeasure modes for a radio profile.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))
namedValues = NamedValues(("none", 1), ("all", 2), ("rogue", 3), ("configured", 4))
class NtwsRadioProfileRFScanChannelScope(TextualConvention, Integer32):
description = 'Enumeration of RF scanning channel scopes for a radio profile.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("operating", 1), ("regulatory", 2), ("all", 3))
class NtwsRadioProfileAutoTuneChannelRange(TextualConvention, Integer32):
description = 'Enumeration of Auto-Tune channel ranges for a radio profile.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("all-bands", 1), ("lower-bands", 2))
class NtwsRadioProfileRFScanMode(TextualConvention, Integer32):
description = 'Enumeration of RF scanning modes for a radio profile.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("active", 1), ("passive", 2))
ntwsApConfigMibObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1))
ntwsApConfApConfigTable = MibTable((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2), )
if mibBuilder.loadTexts: ntwsApConfApConfigTable.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigTable.setDescription('A table describing all the APs currently configured on this AC.')
ntwsApConfApConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1), ).setIndexNames((0, "NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigApNum"))
if mibBuilder.loadTexts: ntwsApConfApConfigEntry.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigEntry.setDescription('Configuration for a particular AP that could be attached to the AC.')
ntwsApConfApConfigApNum = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 1), NtwsApNum())
if mibBuilder.loadTexts: ntwsApConfApConfigApNum.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigApNum.setDescription('The Number of this AP (administratively assigned).')
ntwsApConfApConfigApAttachType = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 2), NtwsApAttachType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApConfigApAttachType.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigApAttachType.setDescription('How this AP is attached to the AC (directly or via L2/L3 network).')
ntwsApConfApConfigPhysPortNum = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 3), NtwsPhysPortNumberOrZero()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApConfigPhysPortNum.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigPhysPortNum.setDescription('Identifies the physical port used to attach this AP. Only valid for directly attached APs, otherwise will be zero.')
ntwsApConfApConfigApSerialNum = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 4), NtwsApSerialNum()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApConfigApSerialNum.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigApSerialNum.setDescription('The Serial Number used to identify this AP. Only valid for network attached APs, otherwise will be a zero length string.')
ntwsApConfApConfigApModelName = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 24))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApConfigApModelName.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigApModelName.setDescription('The Model name of this AP.')
ntwsApConfApConfigFingerprint = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 6), NtwsApFingerprint()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApConfigFingerprint.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigFingerprint.setDescription('The RSA key fingerprint configured on this AP (binary value: it is the MD5 hash of the public key of the RSA key pair). For directly attached APs the fingerprint is a zero length string.')
ntwsApConfApConfigBias = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 7), NtwsApBias()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApConfigBias.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigBias.setDescription('Bias (high/low/sticky).')
ntwsApConfApConfigApTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 8), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApConfigApTimeout.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigApTimeout.setDescription('The communication timeout for this AP, in seconds.')
ntwsApConfApConfigApName = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApConfigApName.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigApName.setDescription('The configured Name for this AP.')
ntwsApConfApConfigContact = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApConfigContact.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigContact.setDescription('The Contact information for this AP.')
ntwsApConfApConfigLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApConfigLocation.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigLocation.setDescription('The Location information for this AP.')
ntwsApConfApConfigBlinkEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 12), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApConfigBlinkEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigBlinkEnabled.setDescription('Indicates whether the LED blink mode is enabled on this AP.')
ntwsApConfApConfigForceImageDownloadEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 13), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApConfigForceImageDownloadEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigForceImageDownloadEnabled.setDescription('Indicates whether this AP is forced to always download an image from the AC upon boot.')
ntwsApConfApConfigFirmwareUpgradeEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 14), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApConfigFirmwareUpgradeEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigFirmwareUpgradeEnabled.setDescription('Indicates whether automatic boot firmware upgrade is enabled on this AP.')
ntwsApConfApConfigLocalSwitchingEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 15), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApConfigLocalSwitchingEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigLocalSwitchingEnabled.setDescription('Indicates whether local switching is enabled on this AP.')
ntwsApConfApConfigPowerMode = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 16), NtwsApPowerMode()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApConfigPowerMode.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigPowerMode.setDescription('The mode in which this AP is supplying power to its radios.')
ntwsApConfApConfigLedMode = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 17), NtwsApLedMode()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApConfigLedMode.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigLedMode.setDescription('LED Mode (auto/static/off).')
ntwsApConfApConfigDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 2, 1, 18), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 256))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApConfigDescription.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigDescription.setDescription('The configured Description for this AP.')
ntwsApConfRadioConfigTable = MibTable((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 3), )
if mibBuilder.loadTexts: ntwsApConfRadioConfigTable.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioConfigTable.setDescription('A table describing the radios on all the APs currently configured on this AC.')
ntwsApConfRadioConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 3, 1), ).setIndexNames((0, "NTWS-AP-CONFIG-MIB", "ntwsApConfRadioConfigApNum"), (0, "NTWS-AP-CONFIG-MIB", "ntwsApConfRadioConfigRadioIndex"))
if mibBuilder.loadTexts: ntwsApConfRadioConfigEntry.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioConfigEntry.setDescription('Configuration for a particular Radio on a particular AP that could be attached to the AC.')
ntwsApConfRadioConfigApNum = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 3, 1, 1), NtwsApNum())
if mibBuilder.loadTexts: ntwsApConfRadioConfigApNum.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioConfigApNum.setDescription('The Number of the AP (administratively assigned).')
ntwsApConfRadioConfigRadioIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 3, 1, 2), NtwsApRadioIndex())
if mibBuilder.loadTexts: ntwsApConfRadioConfigRadioIndex.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioConfigRadioIndex.setDescription('The number of this Radio on the AP.')
ntwsApConfRadioConfigRadioType = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 3, 1, 3), NtwsRadioType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioConfigRadioType.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioConfigRadioType.setDescription('The configured Type of this radio (typeA, typeB, typeG, typeNA, typeNG)')
ntwsApConfRadioConfigRadioMode = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 3, 1, 4), NtwsRadioMode()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioConfigRadioMode.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioConfigRadioMode.setDescription('The configured Mode of this radio (enabled/disabled/sentry)')
ntwsApConfRadioConfigRadioProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 3, 1, 5), NtwsRadioProfileName()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioConfigRadioProfileName.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioConfigRadioProfileName.setDescription('Identifies the Radio Profile to be applied to this radio')
ntwsApConfRadioConfigChannel = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 3, 1, 6), NtwsChannelNum()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioConfigChannel.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioConfigChannel.setDescription('The configured Channel Number of this radio.')
ntwsApConfRadioConfigTxPower = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 3, 1, 7), NtwsPowerLevel()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioConfigTxPower.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioConfigTxPower.setDescription('The configured Tx Power level of this radio.')
ntwsApConfRadioConfigAutoTuneMaxTxPower = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 3, 1, 8), NtwsPowerLevel()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioConfigAutoTuneMaxTxPower.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioConfigAutoTuneMaxTxPower.setDescription('The Maximum Tx Power that Auto Tune is allowed to set for this radio.')
ntwsApConfRadioConfigAntennaType = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 3, 1, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioConfigAntennaType.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioConfigAntennaType.setDescription('The configured Antenna Type for this radio.')
ntwsApConfRadioConfigAntennaLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 3, 1, 10), NtwsRadioAntennaLocation()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioConfigAntennaLocation.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioConfigAntennaLocation.setDescription('The configured Antenna Location for this radio.')
ntwsApConfRadioConfigLoadBalancingEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 3, 1, 11), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioConfigLoadBalancingEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioConfigLoadBalancingEnabled.setDescription('Indicates whether RF Load Balancing is enabled on this radio.')
ntwsApConfRadioConfigLoadBalancingGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 3, 1, 12), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioConfigLoadBalancingGroup.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioConfigLoadBalancingGroup.setDescription('Indicates the RF Load Balancing group that this radio is assigned to.')
ntwsApConfRadioConfigLoadRebalancingEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 3, 1, 13), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioConfigLoadRebalancingEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioConfigLoadRebalancingEnabled.setDescription('Indicates whether RF Load Rebalancing is enabled for this radio.')
ntwsApConfApTemplateConfigTable = MibTable((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 4), )
if mibBuilder.loadTexts: ntwsApConfApTemplateConfigTable.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemplateConfigTable.setDescription('A table describing all the AP Templates currently configured on this AC.')
ntwsApConfApTemplateConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 4, 1), ).setIndexNames((0, "NTWS-AP-CONFIG-MIB", "ntwsApConfApTemplConfApTemplateName"))
if mibBuilder.loadTexts: ntwsApConfApTemplateConfigEntry.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemplateConfigEntry.setDescription('Template configuration for APs that could be attached to the AC.')
ntwsApConfApTemplConfApTemplateName = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 4, 1, 1), NtwsApTemplateName())
if mibBuilder.loadTexts: ntwsApConfApTemplConfApTemplateName.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemplConfApTemplateName.setDescription('AP Template Name.')
ntwsApConfApTemplConfApTemplateEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 4, 1, 2), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApTemplConfApTemplateEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemplConfApTemplateEnabled.setDescription('Indicates whether this AP Template is Enabled (can be used for bringing up APs).')
ntwsApConfApTemplConfBias = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 4, 1, 3), NtwsApBias()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApTemplConfBias.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemplConfBias.setDescription('Bias (high/low/sticky).')
ntwsApConfApTemplConfApTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 4, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApTemplConfApTimeout.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemplConfApTimeout.setDescription('The communication timeout for this AP Template, in seconds.')
ntwsApConfApTemplConfBlinkEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 4, 1, 5), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApTemplConfBlinkEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemplConfBlinkEnabled.setDescription('Indicates whether the LED blink mode is enabled on this AP Template.')
ntwsApConfApTemplConfForceImageDownloadEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 4, 1, 6), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApTemplConfForceImageDownloadEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemplConfForceImageDownloadEnabled.setDescription('Indicates whether this AP is forced to always download an image from the AC upon boot.')
ntwsApConfApTemplConfFirmwareUpgradeEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 4, 1, 7), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApTemplConfFirmwareUpgradeEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemplConfFirmwareUpgradeEnabled.setDescription('Indicates whether automatic boot firmware upgrade is enabled on this AP Template.')
ntwsApConfApTemplConfLocalSwitchingEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 4, 1, 8), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApTemplConfLocalSwitchingEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemplConfLocalSwitchingEnabled.setDescription('Indicates whether local switching is enabled on this AP Template.')
ntwsApConfApTemplConfPowerMode = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 4, 1, 9), NtwsApPowerMode()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApTemplConfPowerMode.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemplConfPowerMode.setDescription('The mode in which an AP using this Template will be supplying power to its radios.')
ntwsApConfApTemplConfLedMode = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 4, 1, 10), NtwsApLedMode()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApTemplConfLedMode.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemplConfLedMode.setDescription('The LED Mode (auto/static/off) for an AP using this Template.')
ntwsApConfApTemplateRadioConfigTable = MibTable((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 5), )
if mibBuilder.loadTexts: ntwsApConfApTemplateRadioConfigTable.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemplateRadioConfigTable.setDescription('A table describing the radios for all the AP Templates currently configured on this AC.')
ntwsApConfApTemplateRadioConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 5, 1), ).setIndexNames((0, "NTWS-AP-CONFIG-MIB", "ntwsApConfApTemRadioConfApTemplateName"), (0, "NTWS-AP-CONFIG-MIB", "ntwsApConfApTemRadioConfRadioIndex"))
if mibBuilder.loadTexts: ntwsApConfApTemplateRadioConfigEntry.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemplateRadioConfigEntry.setDescription('Template configuration for a particular Radio index on an AP Template configured on this AC.')
ntwsApConfApTemRadioConfApTemplateName = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 5, 1, 1), NtwsApTemplateName())
if mibBuilder.loadTexts: ntwsApConfApTemRadioConfApTemplateName.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemRadioConfApTemplateName.setDescription('AP Template Name.')
ntwsApConfApTemRadioConfRadioIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 5, 1, 2), NtwsApRadioIndex())
if mibBuilder.loadTexts: ntwsApConfApTemRadioConfRadioIndex.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemRadioConfRadioIndex.setDescription('The number of this Radio on the AP Template.')
ntwsApConfApTemRadioConfRadioMode = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 5, 1, 3), NtwsRadioMode()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApTemRadioConfRadioMode.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemRadioConfRadioMode.setDescription('The configured mode of a radio using this Template (enabled/disabled/sentry)')
ntwsApConfApTemRadioConfRadioProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 5, 1, 4), NtwsRadioProfileName()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApTemRadioConfRadioProfileName.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemRadioConfRadioProfileName.setDescription('Identifies the Radio Profile to be applied to a radio using this Template')
ntwsApConfApTemRadioConfAutoTuneMaxTxPower = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 5, 1, 5), NtwsPowerLevel()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApTemRadioConfAutoTuneMaxTxPower.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemRadioConfAutoTuneMaxTxPower.setDescription('The Maximum Tx Power that Auto Tune will be allowed to set for a radio using this Template.')
ntwsApConfApTemRadioConfLoadBalancingEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 5, 1, 6), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApTemRadioConfLoadBalancingEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemRadioConfLoadBalancingEnabled.setDescription('Indicates whether RF Load Balancing will be enabled on a radio using this Template.')
ntwsApConfApTemRadioConfLoadBalancingGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 5, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApTemRadioConfLoadBalancingGroup.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemRadioConfLoadBalancingGroup.setDescription('Indicates the RF Load Balancing group that a radio using this Template will be assigned to.')
ntwsApConfApTemRadioConfLoadRebalancingEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 5, 1, 8), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfApTemRadioConfLoadRebalancingEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemRadioConfLoadRebalancingEnabled.setDescription('Indicates whether RF Load Rebalancing will be enabled for a radio using this Template.')
ntwsApConfRadioProfileTable = MibTable((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6), )
if mibBuilder.loadTexts: ntwsApConfRadioProfileTable.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfileTable.setDescription('A table describing the Radio Profiles currently configured on this AC.')
ntwsApConfRadioProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1), ).setIndexNames((0, "NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfRadioProfileName"))
if mibBuilder.loadTexts: ntwsApConfRadioProfileEntry.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfileEntry.setDescription('Configuration for a particular Radio Profile.')
ntwsApConfRadioProfRadioProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 1), NtwsRadioProfileName())
if mibBuilder.loadTexts: ntwsApConfRadioProfRadioProfileName.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfRadioProfileName.setDescription('Name of this radio profile.')
ntwsApConfRadioProfBeaconInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfBeaconInterval.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfBeaconInterval.setDescription('Beacon Interval, time in thousandths of a second, for this radio profile.')
ntwsApConfRadioProfDtimInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfDtimInterval.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfDtimInterval.setDescription('The number of times after every beacon that each AP radio in a radio profile sends a delivery traffic indication map (DTIM), for the AP radios using this radio profile.')
ntwsApConfRadioProfChannelWidth11na = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 4), NtwsRadioChannelWidth()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfChannelWidth11na.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfChannelWidth11na.setDescription('802.11n Channel Width for the AP radios using this radio profile.')
ntwsApConfRadioProfMaxTxLifetime = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 5), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfMaxTxLifetime.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfMaxTxLifetime.setDescription('The maximum transmit threshold for the AP radios using this radio profile.')
ntwsApConfRadioProfMaxRxLifetime = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 6), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfMaxRxLifetime.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfMaxRxLifetime.setDescription('The maximum receive threshold for the AP radios using this radio profile.')
ntwsApConfRadioProfRtsThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 7), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfRtsThreshold.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfRtsThreshold.setDescription('The RTS threshold for the AP radios using this radio profile.')
ntwsApConfRadioProfFragThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 8), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfFragThreshold.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfFragThreshold.setDescription('The fragmentation threshold for the AP radios using this radio profile.')
ntwsApConfRadioProfLongXmitPreambleEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 9), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfLongXmitPreambleEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfLongXmitPreambleEnabled.setDescription('Indicates whether an 802.11b/g AP radio using this radio profile transmits Long Preamble.')
ntwsApConfRadioProfCountermeasuresMode = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 10), NtwsRadioProfileCountermeasuresMode()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfCountermeasuresMode.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfCountermeasuresMode.setDescription('Countermeasures Mode for the AP radios using this radio profile.')
ntwsApConfRadioProfRFScanMode = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 11), NtwsRadioProfileRFScanMode()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfRFScanMode.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfRFScanMode.setDescription('RF Scanning Mode for the AP radios using this radio profile.')
ntwsApConfRadioProfRFScanChannelScope = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 12), NtwsRadioProfileRFScanChannelScope()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfRFScanChannelScope.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfRFScanChannelScope.setDescription('RF scanning Channel Scope for the AP radios using this radio profile.')
ntwsApConfRadioProfRFScanCTSEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 13), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfRFScanCTSEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfRFScanCTSEnabled.setDescription('Indicates whether the AP radios using this radio profile send CTS To Self packet before going off channel.')
ntwsApConfRadioProfAutoTune11aChannelRange = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 14), NtwsRadioProfileAutoTuneChannelRange()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfAutoTune11aChannelRange.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfAutoTune11aChannelRange.setDescription('The allowable 802.11a Channel Range used by Auto-Tune for the AP radios using this radio profile.')
ntwsApConfRadioProfAutoTuneIgnoreClientsEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 15), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfAutoTuneIgnoreClientsEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfAutoTuneIgnoreClientsEnabled.setDescription('Indicates whether the AP radios using this radio profile Ignore Client connections in Auto-Tune channel selections.')
ntwsApConfRadioProfAutoTuneChannelEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 16), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfAutoTuneChannelEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfAutoTuneChannelEnabled.setDescription('Indicates whether Channel Auto-Tuning is enabled for the AP radios using this radio profile.')
ntwsApConfRadioProfAutoTuneChannelHolddownInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 17), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfAutoTuneChannelHolddownInterval.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfAutoTuneChannelHolddownInterval.setDescription('Minimum Interval (in seconds) between Channel changes due to Auto-Tuning, for the AP radios using this radio profile.')
ntwsApConfRadioProfAutoTuneChannelChangeInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 18), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfAutoTuneChannelChangeInterval.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfAutoTuneChannelChangeInterval.setDescription('The interval (in seconds) at which RF Auto-Tuning decides whether to Change the Channel for the AP radios using this radio profile.')
ntwsApConfRadioProfAutoTunePowerEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 19), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfAutoTunePowerEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfAutoTunePowerEnabled.setDescription('Indicates whether Power Auto-Tuning is enabled for the AP radios using this radio profile.')
ntwsApConfRadioProfAutoTunePowerRampInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 20), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfAutoTunePowerRampInterval.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfAutoTunePowerRampInterval.setDescription('Minimum Interval (in seconds) between Power changes due to Auto-Tuning, for the AP radios using this radio profile.')
ntwsApConfRadioProfAutoTunePowerChangeInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 21), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfAutoTunePowerChangeInterval.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfAutoTunePowerChangeInterval.setDescription('The interval (in seconds) at which RF Auto-Tuning decides whether to Change the Power for the AP radios using this radio profile.')
ntwsApConfRadioProfFairQueuingEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 22), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfFairQueuingEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfFairQueuingEnabled.setDescription('Indicates whether weighted Fair Queuing is enabled for this radio profile.')
ntwsApConfRadioProfCacBackgroundACMandatory = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 23), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfCacBackgroundACMandatory.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfCacBackgroundACMandatory.setDescription('Indicates whether Admission Control for Background traffic is Mandatory for the AP radios using this radio profile.')
ntwsApConfRadioProfCacBackgroundMaxUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 24), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfCacBackgroundMaxUtilization.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfCacBackgroundMaxUtilization.setDescription('Maximum admission control limit for Background traffic, for the AP radios using this radio profile.')
ntwsApConfRadioProfCacBackgroundPolicingEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 25), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfCacBackgroundPolicingEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfCacBackgroundPolicingEnabled.setDescription('Indicates that admission control Policing for Background traffic is enabled, for the AP radios using this radio profile.')
ntwsApConfRadioProfCacBestEffortACMandatory = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 26), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfCacBestEffortACMandatory.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfCacBestEffortACMandatory.setDescription('Indicates that Admission Control for Best Effort traffic is Mandatory for the AP radios using this radio profile.')
ntwsApConfRadioProfCacBestEffortMaxUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 27), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfCacBestEffortMaxUtilization.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfCacBestEffortMaxUtilization.setDescription('Maximum admission control limit for Best Effort traffic, for the AP radios using this radio profile.')
ntwsApConfRadioProfCacBestEffortPolicingEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 28), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfCacBestEffortPolicingEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfCacBestEffortPolicingEnabled.setDescription('Indicates that admission control Policing for Best Effort traffic is enabled, for the AP radios using this radio profile.')
ntwsApConfRadioProfCacVideoACMandatory = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 29), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfCacVideoACMandatory.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfCacVideoACMandatory.setDescription('Indicates that Admission Control for Video traffic is Mandatory for the AP radios using this radio profile.')
ntwsApConfRadioProfCacVideoMaxUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 30), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfCacVideoMaxUtilization.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfCacVideoMaxUtilization.setDescription('Maximum admission control limit for Video traffic, for the AP radios using this radio profile.')
ntwsApConfRadioProfCacVideoPolicingEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 31), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfCacVideoPolicingEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfCacVideoPolicingEnabled.setDescription('Indicates that admission control Policing for Video traffic is enabled, for the AP radios using this radio profile.')
ntwsApConfRadioProfCacVoiceACMandatory = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 32), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfCacVoiceACMandatory.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfCacVoiceACMandatory.setDescription('Indicates that Admission Control for Voice traffic is Mandatory for the AP radios using this radio profile.')
ntwsApConfRadioProfCacVoiceMaxUtilization = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 33), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfCacVoiceMaxUtilization.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfCacVoiceMaxUtilization.setDescription('Maximum admission control limit for Voice traffic, for the AP radios using this radio profile.')
ntwsApConfRadioProfCacVoicePolicingEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 34), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfCacVoicePolicingEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfCacVoicePolicingEnabled.setDescription('Indicates that admission control Policing for Voice traffic is enabled, for the AP radios using this radio profile.')
ntwsApConfRadioProfRfidTagEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 35), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfRfidTagEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfRfidTagEnabled.setDescription('Indicates whether an AP radio using this radio profile is enabled to function as location receivers in an AeroScout Visibility System.')
ntwsApConfRadioProfWmmPowerSaveEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 36), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfWmmPowerSaveEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfWmmPowerSaveEnabled.setDescription('Indicates whether the AP radios using this radio profile enable power save mode on WMM clients.')
ntwsApConfRadioProfRateEnforcementEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 37), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfRateEnforcementEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfRateEnforcementEnabled.setDescription('Indicates whether data rates are enforced for the AP radios using this radio profile, which means that a connecting client must transmit at one of the mandatory or standard rates in order to associate with the AP.')
ntwsApConfRadioProfDfsChannelsEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 6, 1, 38), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfRadioProfDfsChannelsEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfDfsChannelsEnabled.setDescription('Indicates that the AP radios using this radio profile use DFS channels to meet regulatory requirements.')
ntwsApConfRadioProfServiceProfileTable = MibTable((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 7), )
if mibBuilder.loadTexts: ntwsApConfRadioProfServiceProfileTable.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfServiceProfileTable.setDescription('A table describing the currently configured connections between Radio Profiles and Service Profiles.')
ntwsApConfRadioProfServiceProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 7, 1), ).setIndexNames((0, "NTWS-AP-CONFIG-MIB", "ntwsApConfRpServpRadioProfileName"), (0, "NTWS-AP-CONFIG-MIB", "ntwsApConfRpServpServiceProfileName"))
if mibBuilder.loadTexts: ntwsApConfRadioProfServiceProfileEntry.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfServiceProfileEntry.setDescription('Connection between a Radio Profile and a Service Profile, currently configured on the AC.')
ntwsApConfRpServpRadioProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 7, 1, 1), NtwsRadioProfileName())
if mibBuilder.loadTexts: ntwsApConfRpServpRadioProfileName.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRpServpRadioProfileName.setDescription('Name of this Radio Profile.')
ntwsApConfRpServpServiceProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 7, 1, 2), NtwsServiceProfileName())
if mibBuilder.loadTexts: ntwsApConfRpServpServiceProfileName.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRpServpServiceProfileName.setDescription('Name of a Service Profile connected to this Radio Profile.')
ntwsApConfRpServpRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 7, 1, 3), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: ntwsApConfRpServpRowStatus.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRpServpRowStatus.setDescription("This object is used to create a new row or delete an existing row in this table. To create a row, set this object to 'createAndGo'. To delete a row, set this object to 'destroy'. Only these two values 'createAndGo' and 'destroy' will be accepted.")
ntwsApConfRadioProfSnoopFilterTable = MibTable((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 8), )
if mibBuilder.loadTexts: ntwsApConfRadioProfSnoopFilterTable.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfSnoopFilterTable.setDescription('A table describing the currently configured connections between Radio Profiles and Snoop Filters.')
ntwsApConfRadioProfSnoopFilterEntry = MibTableRow((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 8, 1), ).setIndexNames((0, "NTWS-AP-CONFIG-MIB", "ntwsApConfRpSnoopfRadioProfileName"), (0, "NTWS-AP-CONFIG-MIB", "ntwsApConfRpSnoopfSnoopFilterName"))
if mibBuilder.loadTexts: ntwsApConfRadioProfSnoopFilterEntry.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfSnoopFilterEntry.setDescription('Connection between a Radio Profile and a Snoop Filter, currently configured on the AC.')
ntwsApConfRpSnoopfRadioProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 8, 1, 1), NtwsRadioProfileName())
if mibBuilder.loadTexts: ntwsApConfRpSnoopfRadioProfileName.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRpSnoopfRadioProfileName.setDescription('Name of this Radio Profile.')
ntwsApConfRpSnoopfSnoopFilterName = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 8, 1, 2), NtwsSnoopFilterName())
if mibBuilder.loadTexts: ntwsApConfRpSnoopfSnoopFilterName.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRpSnoopfSnoopFilterName.setDescription('Name of a Snoop Filter connected to this Radio Profile.')
ntwsApConfRpSnoopfRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 8, 1, 3), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: ntwsApConfRpSnoopfRowStatus.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRpSnoopfRowStatus.setDescription("This object is used to create a new row or delete an existing row in this table. To create a row, set this object to 'createAndGo'. To delete a row, set this object to 'destroy'. Only these two values 'createAndGo' and 'destroy' will be accepted.")
ntwsApConfServiceProfileTable = MibTable((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9), )
if mibBuilder.loadTexts: ntwsApConfServiceProfileTable.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServiceProfileTable.setDescription('A table describing the Service Profiles currently configured on this AC.')
ntwsApConfServiceProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1), ).setIndexNames((0, "NTWS-AP-CONFIG-MIB", "ntwsApConfServProfServiceProfileName"))
if mibBuilder.loadTexts: ntwsApConfServiceProfileEntry.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServiceProfileEntry.setDescription('Configuration for a particular Service Profile.')
ntwsApConfServProfServiceProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 1), NtwsServiceProfileName())
if mibBuilder.loadTexts: ntwsApConfServProfServiceProfileName.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfServiceProfileName.setDescription('Name of this service profile')
ntwsApConfServProfSsidType = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 2), NtwsServiceProfileSsidType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfSsidType.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfSsidType.setDescription('The type of this service profile (clear/crypto).')
ntwsApConfServProfBeaconEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 3), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfBeaconEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfBeaconEnabled.setDescription('Indicates whether beacons are enabled for this service profile.')
ntwsApConfServProf11naMode = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 4), NtwsServiceProfile11nMode()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProf11naMode.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProf11naMode.setDescription('Indicates the 802.11n (na) mode for this service profile.')
ntwsApConfServProf11ngMode = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 5), NtwsServiceProfile11nMode()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProf11ngMode.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProf11ngMode.setDescription('Indicates the 802.11n (ng) mode for this service profile.')
ntwsApConfServProf11nShortGuardIntervalEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 6), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProf11nShortGuardIntervalEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProf11nShortGuardIntervalEnabled.setDescription('Indicates whether short guard interval is enabled for this service profile.')
ntwsApConfServProf11nFrameAggregation = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 7), NtwsServiceProfile11nFrameAggregationType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProf11nFrameAggregation.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProf11nFrameAggregation.setDescription('Indicates the Frame Aggregation mode for this service profile.')
ntwsApConfServProf11nMsduMaxLength = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 8), NtwsServiceProfile11nMsduMaxLength()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProf11nMsduMaxLength.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProf11nMsduMaxLength.setDescription('The maximum MSDU length for this service profile.')
ntwsApConfServProf11nMpduMaxLength = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 9), NtwsServiceProfile11nMpduMaxLength()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProf11nMpduMaxLength.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProf11nMpduMaxLength.setDescription('The maximum MPDU length for this service profile.')
ntwsApConfServProfAuthFallthru = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 10), NtwsServiceProfileAuthFallthruType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfAuthFallthru.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfAuthFallthru.setDescription('The authentication type to be attempted for users who do not match a 802.1X or MAC authentication rule, for this service profile.')
ntwsApConfServProfWebAAAForm = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfWebAAAForm.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfWebAAAForm.setDescription('The custom login page that loads for WebAAA users, for this service profile.')
ntwsApConfServProfSharedKeyAuthEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 12), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfSharedKeyAuthEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfSharedKeyAuthEnabled.setDescription('Indicates whether shared-key authentication is enabled for this service profile.')
ntwsApConfServProfWpaIeEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 13), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfWpaIeEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfWpaIeEnabled.setDescription('Indicates whether WPA IE beaconing is enabled for this service profile.')
ntwsApConfServProfWpaIeCipherTkipEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 14), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfWpaIeCipherTkipEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfWpaIeCipherTkipEnabled.setDescription('Indicates whether TKIP cipher is advertised in WPA IE, for this service profile.')
ntwsApConfServProfWpaIeCipherCcmpEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 15), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfWpaIeCipherCcmpEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfWpaIeCipherCcmpEnabled.setDescription('Indicates whether CCMP cipher is advertised in WPA IE, for this service profile.')
ntwsApConfServProfWpaIeCipherWep40Enabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 16), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfWpaIeCipherWep40Enabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfWpaIeCipherWep40Enabled.setDescription('Indicates whether WEP-40 cipher is advertised in WPA IE, for this service profile.')
ntwsApConfServProfWpaIeCipherWep104Enabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 17), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfWpaIeCipherWep104Enabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfWpaIeCipherWep104Enabled.setDescription('Indicates whether WEP-104 cipher is advertised in WPA IE, for this service profile.')
ntwsApConfServProfWpaIeAuthDot1xEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 18), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfWpaIeAuthDot1xEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfWpaIeAuthDot1xEnabled.setDescription('Indicates whether 802.1X authentication is advertised in WPA IE, for this service profile.')
ntwsApConfServProfWpaIeAuthPskEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 19), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfWpaIeAuthPskEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfWpaIeAuthPskEnabled.setDescription('Indicates whether Pre-Shared Key authentication is advertised in WPA IE, for this service profile.')
ntwsApConfServProfRsnIeEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 20), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfRsnIeEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfRsnIeEnabled.setDescription('Indicates whether RSN IE beaconing is enabled for this service profile.')
ntwsApConfServProfRsnIeCipherTkipEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 21), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfRsnIeCipherTkipEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfRsnIeCipherTkipEnabled.setDescription('Indicates whether TKIP cipher is advertised in RSN IE, for this service profile.')
ntwsApConfServProfRsnIeCipherCcmpEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 22), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfRsnIeCipherCcmpEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfRsnIeCipherCcmpEnabled.setDescription('Indicates whether CCMP cipher is advertised in RSN IE, for this service profile.')
ntwsApConfServProfRsnIeCipherWep40Enabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 23), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfRsnIeCipherWep40Enabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfRsnIeCipherWep40Enabled.setDescription('Indicates whether WEP-40 cipher is advertised in RSN IE, for this service profile.')
ntwsApConfServProfRsnIeCipherWep104Enabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 24), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfRsnIeCipherWep104Enabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfRsnIeCipherWep104Enabled.setDescription('Indicates whether WEP-104 cipher is advertised in RSN IE, for this service profile.')
ntwsApConfServProfRsnIeAuthDot1xEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 25), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfRsnIeAuthDot1xEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfRsnIeAuthDot1xEnabled.setDescription('Indicates whether 802.1X authentication is advertised in RSN IE, for this service profile.')
ntwsApConfServProfRsnIeAuthPskEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 26), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfRsnIeAuthPskEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfRsnIeAuthPskEnabled.setDescription('Indicates whether Pre-Shared Key authentication is advertised in RSN IE, for this service profile.')
ntwsApConfServProfTkipMicCountermeasuresTime = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 27), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfTkipMicCountermeasuresTime.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfTkipMicCountermeasuresTime.setDescription('Indicates the TKIP MIC countermeasures time in milliseconds for this service profile. This is the length of time that AP radios use countermeasures if two Message Integrity Code (MIC) failures occur within 60 seconds.')
ntwsApConfServProfMaxBandwidthKbps = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 28), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfMaxBandwidthKbps.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfMaxBandwidthKbps.setDescription('The bandwidth limit for this service profile, in Kbits/second. A value of zero means unlimited.')
ntwsApConfServProfCacMode = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 29), NtwsServiceProfileCacMode()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfCacMode.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfCacMode.setDescription('The Call Admission Control (CAC) mode, for this service profile.')
ntwsApConfServProfCacSessCount = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 30), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfCacSessCount.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfCacSessCount.setDescription('The maximum number of active sessions a radio can have when session-based CAC is enabled, for this service profile.')
ntwsApConfServProfUserIdleTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 31), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfUserIdleTimeout.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfUserIdleTimeout.setDescription('The number of seconds MSS has a session available for a client not sending data and is not responding to keepalives (idle-client probes). If the timer expires, the client session is changed to the Dissociated state, for this service profile.')
ntwsApConfServProfIdleClientProbingEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 32), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfIdleClientProbingEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfIdleClientProbingEnabled.setDescription('Indicates whether the AC radio sends a unicast null-data frame to each client every 10 seconds, for this service profile.')
ntwsApConfServProfShortRetryCount = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 33), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfShortRetryCount.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfShortRetryCount.setDescription('The number of times a radio can send a short unicast frame without receiving an acknowledgment, for this service profile.')
ntwsApConfServProfLongRetryCount = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 34), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfLongRetryCount.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfLongRetryCount.setDescription('The number of times a radio can send a long unicast frame without receiving an acknowledgment, for this service profile.')
ntwsApConfServProfProxyArpEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 35), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfProxyArpEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfProxyArpEnabled.setDescription('Indicates whether proxy ARP is enabled for this service profile.')
ntwsApConfServProfDhcpRestrictEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 36), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfDhcpRestrictEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfDhcpRestrictEnabled.setDescription('Indicates whether only DHCP traffic is allowed until a newly associated client has been authenticated and authorized, for this service profile.')
ntwsApConfServProfNoBroadcastEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 37), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfNoBroadcastEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfNoBroadcastEnabled.setDescription('Indicates whether broadcast ARP and DHCP packets are converted to unicast for this service profile.')
ntwsApConfServProfSygateOnDemandEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 38), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfSygateOnDemandEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfSygateOnDemandEnabled.setDescription('Indicates whether Sygate On-Demand Manager (SODA Manager) is enabled for this service profile.')
ntwsApConfServProfEnforceChecksEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 39), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfEnforceChecksEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfEnforceChecksEnabled.setDescription('Indicates whether Enforcement of the SODA security checks is enabled for this service profile.')
ntwsApConfServProfSodaRemediationAcl = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 40), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfSodaRemediationAcl.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfSodaRemediationAcl.setDescription('Remediation page ACL to apply to the client when the failure page is loaded, for this service profile.')
ntwsApConfServProfSodaSuccessPage = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 41), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfSodaSuccessPage.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfSodaSuccessPage.setDescription('Success page that is displayed on the client when a client successfully runs the checks performed by the SODA agent, for this service profile.')
ntwsApConfServProfSodaFailurePage = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 42), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfSodaFailurePage.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfSodaFailurePage.setDescription('Failure page that is displayed on the client when the SODA agent checks fail, for this service profile.')
ntwsApConfServProfSodaLogoutPage = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 43), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfSodaLogoutPage.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfSodaLogoutPage.setDescription('The page to load when a client closes the SODA virtual desktop and logs out of the network, for this service profile.')
ntwsApConfServProfSodaAgentDirectory = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 44), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfSodaAgentDirectory.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfSodaAgentDirectory.setDescription('Specifies a different directory for the SODA agent files used for this service profile.')
ntwsApConfServProfWebPortalSessionTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 45), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfWebPortalSessionTimeout.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfWebPortalSessionTimeout.setDescription('Time interval, in seconds, for which a Web Portal WebAAA session remains in the Deassociated state before being terminated automatically, for this service profile.')
ntwsApConfServProfWebPortalAcl = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 46), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfWebPortalAcl.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfWebPortalAcl.setDescription('Name of ACL used for filtering traffic for Web Portal users during authentication, for this service profile.')
ntwsApConfServProfWebPortalLogoutEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 47), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfWebPortalLogoutEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfWebPortalLogoutEnabled.setDescription('Indicates whether the Web Portal logout functionality is enabled for this service profile.')
ntwsApConfServProfWebPortalLogoutUrl = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 48), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfWebPortalLogoutUrl.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfWebPortalLogoutUrl.setDescription('Indicates the Web Portal Logout URL for this service profile.')
ntwsApConfServProfKeepInitialVlanEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 49), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfKeepInitialVlanEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfKeepInitialVlanEnabled.setDescription('Indicates whether, after roaming, the user keeps the VLAN assigned from the first connection, for this service profile.')
ntwsApConfServProfMeshModeEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 50), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfMeshModeEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfMeshModeEnabled.setDescription('Indicates whether wireless mesh between APs is enabled for this service profile.')
ntwsApConfServProfBridgingEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 51), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfBridgingEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfBridgingEnabled.setDescription('Indicates whether wireless bridging of traffic between APs is enabled for this service profile.')
ntwsApConfServProfLoadBalanceExemptEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 9, 1, 52), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfServProfLoadBalanceExemptEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServProfLoadBalanceExemptEnabled.setDescription('Indicates whether this service profile is exempted from load balancing.')
ntwsApConfSnoopFilterTable = MibTable((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 10), )
if mibBuilder.loadTexts: ntwsApConfSnoopFilterTable.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfSnoopFilterTable.setDescription('A table describing the Snoop Filters currently configured on this AC.')
ntwsApConfSnoopFilterEntry = MibTableRow((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 10, 1), ).setIndexNames((0, "NTWS-AP-CONFIG-MIB", "ntwsApConfSnoopFilterName"))
if mibBuilder.loadTexts: ntwsApConfSnoopFilterEntry.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfSnoopFilterEntry.setDescription('Configuration for a particular Snoop Filter.')
ntwsApConfSnoopFilterName = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 10, 1, 1), NtwsSnoopFilterName())
if mibBuilder.loadTexts: ntwsApConfSnoopFilterName.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfSnoopFilterName.setDescription('Name of this snoop filter.')
ntwsApConfSnoopFilterEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 1, 10, 1, 2), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ntwsApConfSnoopFilterEnabled.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfSnoopFilterEnabled.setDescription('Indicates whether this snoop filter is enabled.')
ntwsApConfigConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 2))
ntwsApConfigCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 2, 1))
ntwsApConfigGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 2, 2))
ntwsApConfigCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 2, 1, 1)).setObjects(("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigTableGroup"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioConfigTableGroup"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApTemplateConfigTableGroup"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApTemplateRadioConfigTableGroup"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfileTableGroup"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfServiceProfileTableGroup"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfSnoopFilterTableGroup"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServiceProfileTableGroup"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfSnoopFilterTableGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ntwsApConfigCompliance = ntwsApConfigCompliance.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfigCompliance.setDescription('The compliance statement for devices that implement AP Config MIB.')
ntwsApConfApConfigTableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 2, 2, 1)).setObjects(("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigApAttachType"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigPhysPortNum"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigApSerialNum"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigApModelName"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigFingerprint"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigBias"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigApTimeout"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigApName"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigContact"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigLocation"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigBlinkEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigForceImageDownloadEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigFirmwareUpgradeEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigLocalSwitchingEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigPowerMode"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigLedMode"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApConfigDescription"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ntwsApConfApConfigTableGroup = ntwsApConfApConfigTableGroup.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApConfigTableGroup.setDescription('Group of columnar objects implemented to provide AP Configuration info in releases 7.1 and greater.')
ntwsApConfRadioConfigTableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 2, 2, 2)).setObjects(("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioConfigRadioType"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioConfigRadioMode"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioConfigRadioProfileName"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioConfigChannel"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioConfigTxPower"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioConfigAutoTuneMaxTxPower"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioConfigAntennaType"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioConfigAntennaLocation"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioConfigLoadBalancingEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioConfigLoadBalancingGroup"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioConfigLoadRebalancingEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ntwsApConfRadioConfigTableGroup = ntwsApConfRadioConfigTableGroup.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioConfigTableGroup.setDescription('Group of columnar objects implemented to provide Radio Configuration info in releases 7.1 and greater.')
ntwsApConfApTemplateConfigTableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 2, 2, 3)).setObjects(("NTWS-AP-CONFIG-MIB", "ntwsApConfApTemplConfApTemplateEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApTemplConfBias"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApTemplConfApTimeout"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApTemplConfBlinkEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApTemplConfForceImageDownloadEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApTemplConfFirmwareUpgradeEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApTemplConfLocalSwitchingEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApTemplConfPowerMode"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApTemplConfLedMode"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ntwsApConfApTemplateConfigTableGroup = ntwsApConfApTemplateConfigTableGroup.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemplateConfigTableGroup.setDescription('Group of columnar objects implemented to provide AP Configuration Template info in releases 7.1 and greater.')
ntwsApConfApTemplateRadioConfigTableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 2, 2, 4)).setObjects(("NTWS-AP-CONFIG-MIB", "ntwsApConfApTemRadioConfRadioMode"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApTemRadioConfRadioProfileName"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApTemRadioConfAutoTuneMaxTxPower"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApTemRadioConfLoadBalancingEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApTemRadioConfLoadBalancingGroup"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfApTemRadioConfLoadRebalancingEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ntwsApConfApTemplateRadioConfigTableGroup = ntwsApConfApTemplateRadioConfigTableGroup.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfApTemplateRadioConfigTableGroup.setDescription('Group of columnar objects implemented to provide Radio Configuration Template info in releases 7.1 and greater.')
ntwsApConfRadioProfileTableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 2, 2, 5)).setObjects(("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfBeaconInterval"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfDtimInterval"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfChannelWidth11na"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfMaxTxLifetime"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfMaxRxLifetime"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfRtsThreshold"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfFragThreshold"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfLongXmitPreambleEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfCountermeasuresMode"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfRFScanMode"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfRFScanChannelScope"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfRFScanCTSEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfAutoTune11aChannelRange"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfAutoTuneIgnoreClientsEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfAutoTuneChannelEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfAutoTuneChannelHolddownInterval"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfAutoTuneChannelChangeInterval"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfAutoTunePowerEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfAutoTunePowerRampInterval"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfAutoTunePowerChangeInterval"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfFairQueuingEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfCacBackgroundACMandatory"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfCacBackgroundMaxUtilization"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfCacBackgroundPolicingEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfCacBestEffortACMandatory"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfCacBestEffortMaxUtilization"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfCacBestEffortPolicingEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfCacVideoACMandatory"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfCacVideoMaxUtilization"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfCacVideoPolicingEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfCacVoiceACMandatory"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfCacVoiceMaxUtilization"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfCacVoicePolicingEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfRfidTagEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfWmmPowerSaveEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfRateEnforcementEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfRadioProfDfsChannelsEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ntwsApConfRadioProfileTableGroup = ntwsApConfRadioProfileTableGroup.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfileTableGroup.setDescription('Group of columnar objects implemented to provide Radio Profile configuration info in releases 7.1 and greater.')
ntwsApConfRadioProfServiceProfileTableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 2, 2, 6)).setObjects(("NTWS-AP-CONFIG-MIB", "ntwsApConfRpServpRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ntwsApConfRadioProfServiceProfileTableGroup = ntwsApConfRadioProfServiceProfileTableGroup.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfServiceProfileTableGroup.setDescription('Group of columnar objects implemented to provide Service Profiles associated to each Radio Profile in releases 7.1 and greater.')
ntwsApConfRadioProfSnoopFilterTableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 2, 2, 7)).setObjects(("NTWS-AP-CONFIG-MIB", "ntwsApConfRpSnoopfRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ntwsApConfRadioProfSnoopFilterTableGroup = ntwsApConfRadioProfSnoopFilterTableGroup.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfRadioProfSnoopFilterTableGroup.setDescription('Group of columnar objects implemented to provide Snoop Filters associated to each Radio Profile in releases 7.1 and greater.')
ntwsApConfServiceProfileTableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 2, 2, 8)).setObjects(("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfSsidType"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfBeaconEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProf11naMode"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProf11ngMode"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProf11nShortGuardIntervalEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProf11nFrameAggregation"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProf11nMsduMaxLength"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProf11nMpduMaxLength"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfAuthFallthru"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfWebAAAForm"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfSharedKeyAuthEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfWpaIeEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfWpaIeCipherTkipEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfWpaIeCipherCcmpEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfWpaIeCipherWep40Enabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfWpaIeCipherWep104Enabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfWpaIeAuthDot1xEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfWpaIeAuthPskEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfRsnIeEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfRsnIeCipherTkipEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfRsnIeCipherCcmpEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfRsnIeCipherWep40Enabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfRsnIeCipherWep104Enabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfRsnIeAuthDot1xEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfRsnIeAuthPskEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfTkipMicCountermeasuresTime"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfMaxBandwidthKbps"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfCacMode"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfCacSessCount"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfUserIdleTimeout"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfIdleClientProbingEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfShortRetryCount"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfLongRetryCount"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfProxyArpEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfDhcpRestrictEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfNoBroadcastEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfSygateOnDemandEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfEnforceChecksEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfSodaRemediationAcl"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfSodaSuccessPage"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfSodaFailurePage"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfSodaLogoutPage"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfSodaAgentDirectory"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfWebPortalSessionTimeout"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfWebPortalAcl"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfWebPortalLogoutEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfWebPortalLogoutUrl"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfKeepInitialVlanEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfMeshModeEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfBridgingEnabled"), ("NTWS-AP-CONFIG-MIB", "ntwsApConfServProfLoadBalanceExemptEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ntwsApConfServiceProfileTableGroup = ntwsApConfServiceProfileTableGroup.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfServiceProfileTableGroup.setDescription('Group of columnar objects implemented to provide Service Profile configuration info in releases 7.1 and greater.')
ntwsApConfSnoopFilterTableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 45, 6, 1, 4, 14, 2, 2, 9)).setObjects(("NTWS-AP-CONFIG-MIB", "ntwsApConfSnoopFilterEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ntwsApConfSnoopFilterTableGroup = ntwsApConfSnoopFilterTableGroup.setStatus('current')
if mibBuilder.loadTexts: ntwsApConfSnoopFilterTableGroup.setDescription('Group of columnar objects implemented to provide Snoop Filter configuration info in releases 7.1 and greater.')
mibBuilder.exportSymbols("NTWS-AP-CONFIG-MIB", ntwsApConfServProfWebPortalLogoutEnabled=ntwsApConfServProfWebPortalLogoutEnabled, ntwsApConfApConfigApSerialNum=ntwsApConfApConfigApSerialNum, ntwsApConfRadioConfigApNum=ntwsApConfRadioConfigApNum, NtwsRadioProfileRFScanChannelScope=NtwsRadioProfileRFScanChannelScope, ntwsApConfRadioProfRFScanMode=ntwsApConfRadioProfRFScanMode, NtwsRadioProfileRFScanMode=NtwsRadioProfileRFScanMode, ntwsApConfApTemplConfLocalSwitchingEnabled=ntwsApConfApTemplConfLocalSwitchingEnabled, ntwsApConfigCompliances=ntwsApConfigCompliances, ntwsApConfApConfigPhysPortNum=ntwsApConfApConfigPhysPortNum, ntwsApConfRadioConfigRadioMode=ntwsApConfRadioConfigRadioMode, ntwsApConfServProfEnforceChecksEnabled=ntwsApConfServProfEnforceChecksEnabled, ntwsApConfApTemplConfApTemplateName=ntwsApConfApTemplConfApTemplateName, ntwsApConfRadioProfSnoopFilterTableGroup=ntwsApConfRadioProfSnoopFilterTableGroup, ntwsApConfApConfigLedMode=ntwsApConfApConfigLedMode, ntwsApConfRadioConfigLoadBalancingGroup=ntwsApConfRadioConfigLoadBalancingGroup, ntwsApConfApTemRadioConfRadioIndex=ntwsApConfApTemRadioConfRadioIndex, ntwsApConfRadioProfLongXmitPreambleEnabled=ntwsApConfRadioProfLongXmitPreambleEnabled, ntwsApConfServProfWebPortalLogoutUrl=ntwsApConfServProfWebPortalLogoutUrl, ntwsApConfApTemRadioConfLoadBalancingEnabled=ntwsApConfApTemRadioConfLoadBalancingEnabled, ntwsApConfServProf11naMode=ntwsApConfServProf11naMode, ntwsApConfRpServpRowStatus=ntwsApConfRpServpRowStatus, ntwsApConfRadioProfAutoTunePowerEnabled=ntwsApConfRadioProfAutoTunePowerEnabled, ntwsApConfRadioConfigRadioIndex=ntwsApConfRadioConfigRadioIndex, ntwsApConfRadioProfRFScanCTSEnabled=ntwsApConfRadioProfRFScanCTSEnabled, ntwsApConfApTemplateConfigTableGroup=ntwsApConfApTemplateConfigTableGroup, NtwsRadioProfileAutoTuneChannelRange=NtwsRadioProfileAutoTuneChannelRange, NtwsApTemplateName=NtwsApTemplateName, ntwsApConfRadioProfAutoTuneChannelEnabled=ntwsApConfRadioProfAutoTuneChannelEnabled, ntwsApConfigMib=ntwsApConfigMib, ntwsApConfApTemplateConfigEntry=ntwsApConfApTemplateConfigEntry, ntwsApConfRadioConfigTable=ntwsApConfRadioConfigTable, ntwsApConfRadioProfCacBestEffortACMandatory=ntwsApConfRadioProfCacBestEffortACMandatory, ntwsApConfigConformance=ntwsApConfigConformance, ntwsApConfSnoopFilterTableGroup=ntwsApConfSnoopFilterTableGroup, ntwsApConfRadioProfCountermeasuresMode=ntwsApConfRadioProfCountermeasuresMode, ntwsApConfRadioProfAutoTune11aChannelRange=ntwsApConfRadioProfAutoTune11aChannelRange, ntwsApConfServProfWpaIeEnabled=ntwsApConfServProfWpaIeEnabled, ntwsApConfRadioProfServiceProfileTableGroup=ntwsApConfRadioProfServiceProfileTableGroup, ntwsApConfRadioConfigAntennaLocation=ntwsApConfRadioConfigAntennaLocation, ntwsApConfRadioProfCacVoiceMaxUtilization=ntwsApConfRadioProfCacVoiceMaxUtilization, ntwsApConfApTemplConfBlinkEnabled=ntwsApConfApTemplConfBlinkEnabled, ntwsApConfApTemplConfForceImageDownloadEnabled=ntwsApConfApTemplConfForceImageDownloadEnabled, NtwsServiceProfile11nMode=NtwsServiceProfile11nMode, ntwsApConfServProfSodaLogoutPage=ntwsApConfServProfSodaLogoutPage, ntwsApConfRadioProfCacVideoMaxUtilization=ntwsApConfRadioProfCacVideoMaxUtilization, ntwsApConfServProfRsnIeCipherTkipEnabled=ntwsApConfServProfRsnIeCipherTkipEnabled, ntwsApConfServProfMaxBandwidthKbps=ntwsApConfServProfMaxBandwidthKbps, NtwsServiceProfile11nFrameAggregationType=NtwsServiceProfile11nFrameAggregationType, ntwsApConfRadioProfAutoTunePowerRampInterval=ntwsApConfRadioProfAutoTunePowerRampInterval, ntwsApConfServProfWpaIeCipherWep40Enabled=ntwsApConfServProfWpaIeCipherWep40Enabled, ntwsApConfRadioConfigTableGroup=ntwsApConfRadioConfigTableGroup, ntwsApConfRadioProfRFScanChannelScope=ntwsApConfRadioProfRFScanChannelScope, NtwsRadioProfileName=NtwsRadioProfileName, ntwsApConfServProf11nFrameAggregation=ntwsApConfServProf11nFrameAggregation, ntwsApConfServProfBridgingEnabled=ntwsApConfServProfBridgingEnabled, ntwsApConfRadioProfCacBestEffortPolicingEnabled=ntwsApConfRadioProfCacBestEffortPolicingEnabled, ntwsApConfRadioProfAutoTunePowerChangeInterval=ntwsApConfRadioProfAutoTunePowerChangeInterval, ntwsApConfRadioProfBeaconInterval=ntwsApConfRadioProfBeaconInterval, ntwsApConfRadioProfServiceProfileEntry=ntwsApConfRadioProfServiceProfileEntry, ntwsApConfServProfRsnIeCipherCcmpEnabled=ntwsApConfServProfRsnIeCipherCcmpEnabled, ntwsApConfServProfWebAAAForm=ntwsApConfServProfWebAAAForm, ntwsApConfApConfigTable=ntwsApConfApConfigTable, ntwsApConfApConfigApModelName=ntwsApConfApConfigApModelName, ntwsApConfRadioConfigEntry=ntwsApConfRadioConfigEntry, ntwsApConfServProfKeepInitialVlanEnabled=ntwsApConfServProfKeepInitialVlanEnabled, ntwsApConfServProfWpaIeCipherTkipEnabled=ntwsApConfServProfWpaIeCipherTkipEnabled, ntwsApConfApTemplConfApTimeout=ntwsApConfApTemplConfApTimeout, ntwsApConfServProfProxyArpEnabled=ntwsApConfServProfProxyArpEnabled, ntwsApConfServProfUserIdleTimeout=ntwsApConfServProfUserIdleTimeout, ntwsApConfApTemplateRadioConfigTableGroup=ntwsApConfApTemplateRadioConfigTableGroup, ntwsApConfServProf11ngMode=ntwsApConfServProf11ngMode, ntwsApConfServProfSygateOnDemandEnabled=ntwsApConfServProfSygateOnDemandEnabled, ntwsApConfigCompliance=ntwsApConfigCompliance, ntwsApConfRadioProfCacBestEffortMaxUtilization=ntwsApConfRadioProfCacBestEffortMaxUtilization, ntwsApConfRadioProfCacBackgroundPolicingEnabled=ntwsApConfRadioProfCacBackgroundPolicingEnabled, ntwsApConfServProf11nMsduMaxLength=ntwsApConfServProf11nMsduMaxLength, ntwsApConfServProfWebPortalSessionTimeout=ntwsApConfServProfWebPortalSessionTimeout, ntwsApConfServProfWpaIeCipherCcmpEnabled=ntwsApConfServProfWpaIeCipherCcmpEnabled, ntwsApConfApConfigApName=ntwsApConfApConfigApName, ntwsApConfServProfRsnIeCipherWep40Enabled=ntwsApConfServProfRsnIeCipherWep40Enabled, ntwsApConfServProfIdleClientProbingEnabled=ntwsApConfServProfIdleClientProbingEnabled, ntwsApConfApTemplateRadioConfigEntry=ntwsApConfApTemplateRadioConfigEntry, ntwsApConfSnoopFilterEntry=ntwsApConfSnoopFilterEntry, ntwsApConfServProfRsnIeEnabled=ntwsApConfServProfRsnIeEnabled, NtwsServiceProfile11nMpduMaxLength=NtwsServiceProfile11nMpduMaxLength, ntwsApConfRadioProfFairQueuingEnabled=ntwsApConfRadioProfFairQueuingEnabled, ntwsApConfServProfLoadBalanceExemptEnabled=ntwsApConfServProfLoadBalanceExemptEnabled, ntwsApConfServProf11nShortGuardIntervalEnabled=ntwsApConfServProf11nShortGuardIntervalEnabled, ntwsApConfApConfigLocation=ntwsApConfApConfigLocation, ntwsApConfRadioProfChannelWidth11na=ntwsApConfRadioProfChannelWidth11na, ntwsApConfRadioProfCacBackgroundACMandatory=ntwsApConfRadioProfCacBackgroundACMandatory, ntwsApConfRpSnoopfRadioProfileName=ntwsApConfRpSnoopfRadioProfileName, ntwsApConfApConfigForceImageDownloadEnabled=ntwsApConfApConfigForceImageDownloadEnabled, ntwsApConfRadioProfRfidTagEnabled=ntwsApConfRadioProfRfidTagEnabled, ntwsApConfRpServpServiceProfileName=ntwsApConfRpServpServiceProfileName, ntwsApConfServProfSharedKeyAuthEnabled=ntwsApConfServProfSharedKeyAuthEnabled, ntwsApConfRadioProfCacVoiceACMandatory=ntwsApConfRadioProfCacVoiceACMandatory, ntwsApConfApConfigLocalSwitchingEnabled=ntwsApConfApConfigLocalSwitchingEnabled, ntwsApConfApConfigBias=ntwsApConfApConfigBias, ntwsApConfServProfWpaIeAuthPskEnabled=ntwsApConfServProfWpaIeAuthPskEnabled, ntwsApConfRpSnoopfSnoopFilterName=ntwsApConfRpSnoopfSnoopFilterName, ntwsApConfApConfigFirmwareUpgradeEnabled=ntwsApConfApConfigFirmwareUpgradeEnabled, ntwsApConfRadioConfigRadioProfileName=ntwsApConfRadioConfigRadioProfileName, ntwsApConfServProfSodaSuccessPage=ntwsApConfServProfSodaSuccessPage, ntwsApConfServProf11nMpduMaxLength=ntwsApConfServProf11nMpduMaxLength, ntwsApConfServProfCacMode=ntwsApConfServProfCacMode, ntwsApConfApTemplConfLedMode=ntwsApConfApTemplConfLedMode, ntwsApConfRadioProfCacVideoPolicingEnabled=ntwsApConfRadioProfCacVideoPolicingEnabled, ntwsApConfRpServpRadioProfileName=ntwsApConfRpServpRadioProfileName, NtwsServiceProfileName=NtwsServiceProfileName, ntwsApConfRadioProfMaxTxLifetime=ntwsApConfRadioProfMaxTxLifetime, ntwsApConfServiceProfileTable=ntwsApConfServiceProfileTable, ntwsApConfServProfAuthFallthru=ntwsApConfServProfAuthFallthru, ntwsApConfServProfServiceProfileName=ntwsApConfServProfServiceProfileName, ntwsApConfServiceProfileEntry=ntwsApConfServiceProfileEntry, ntwsApConfApTemplConfBias=ntwsApConfApTemplConfBias, ntwsApConfServProfSsidType=ntwsApConfServProfSsidType, ntwsApConfServProfTkipMicCountermeasuresTime=ntwsApConfServProfTkipMicCountermeasuresTime, NtwsServiceProfile11nMsduMaxLength=NtwsServiceProfile11nMsduMaxLength, ntwsApConfApConfigTableGroup=ntwsApConfApConfigTableGroup, ntwsApConfRadioProfDtimInterval=ntwsApConfRadioProfDtimInterval, ntwsApConfApConfigBlinkEnabled=ntwsApConfApConfigBlinkEnabled, ntwsApConfRadioProfileTable=ntwsApConfRadioProfileTable, ntwsApConfServProfRsnIeCipherWep104Enabled=ntwsApConfServProfRsnIeCipherWep104Enabled, ntwsApConfApConfigDescription=ntwsApConfApConfigDescription, ntwsApConfApTemRadioConfLoadBalancingGroup=ntwsApConfApTemRadioConfLoadBalancingGroup, ntwsApConfRadioProfFragThreshold=ntwsApConfRadioProfFragThreshold, ntwsApConfRadioProfServiceProfileTable=ntwsApConfRadioProfServiceProfileTable, ntwsApConfRadioProfDfsChannelsEnabled=ntwsApConfRadioProfDfsChannelsEnabled, NtwsServiceProfileCacMode=NtwsServiceProfileCacMode, ntwsApConfRpSnoopfRowStatus=ntwsApConfRpSnoopfRowStatus, ntwsApConfServProfSodaFailurePage=ntwsApConfServProfSodaFailurePage, ntwsApConfSnoopFilterTable=ntwsApConfSnoopFilterTable, ntwsApConfRadioConfigChannel=ntwsApConfRadioConfigChannel, ntwsApConfApTemRadioConfRadioMode=ntwsApConfApTemRadioConfRadioMode, ntwsApConfigGroups=ntwsApConfigGroups, ntwsApConfApConfigApTimeout=ntwsApConfApConfigApTimeout, ntwsApConfApConfigContact=ntwsApConfApConfigContact, ntwsApConfRadioProfRadioProfileName=ntwsApConfRadioProfRadioProfileName, ntwsApConfServProfRsnIeAuthDot1xEnabled=ntwsApConfServProfRsnIeAuthDot1xEnabled, ntwsApConfApTemRadioConfAutoTuneMaxTxPower=ntwsApConfApTemRadioConfAutoTuneMaxTxPower, ntwsApConfServProfDhcpRestrictEnabled=ntwsApConfServProfDhcpRestrictEnabled, ntwsApConfigMibObjects=ntwsApConfigMibObjects, PYSNMP_MODULE_ID=ntwsApConfigMib, ntwsApConfApTemRadioConfLoadRebalancingEnabled=ntwsApConfApTemRadioConfLoadRebalancingEnabled, ntwsApConfRadioProfMaxRxLifetime=ntwsApConfRadioProfMaxRxLifetime, ntwsApConfSnoopFilterEnabled=ntwsApConfSnoopFilterEnabled, ntwsApConfServiceProfileTableGroup=ntwsApConfServiceProfileTableGroup, ntwsApConfRadioProfCacVideoACMandatory=ntwsApConfRadioProfCacVideoACMandatory, NtwsServiceProfileSsidType=NtwsServiceProfileSsidType, ntwsApConfServProfMeshModeEnabled=ntwsApConfServProfMeshModeEnabled, ntwsApConfApTemplConfFirmwareUpgradeEnabled=ntwsApConfApTemplConfFirmwareUpgradeEnabled, ntwsApConfRadioProfAutoTuneChannelHolddownInterval=ntwsApConfRadioProfAutoTuneChannelHolddownInterval, ntwsApConfRadioProfCacVoicePolicingEnabled=ntwsApConfRadioProfCacVoicePolicingEnabled, ntwsApConfRadioProfileEntry=ntwsApConfRadioProfileEntry, ntwsApConfRadioConfigAntennaType=ntwsApConfRadioConfigAntennaType, ntwsApConfApConfigFingerprint=ntwsApConfApConfigFingerprint, ntwsApConfServProfWpaIeCipherWep104Enabled=ntwsApConfServProfWpaIeCipherWep104Enabled, ntwsApConfServProfCacSessCount=ntwsApConfServProfCacSessCount, ntwsApConfApConfigEntry=ntwsApConfApConfigEntry, ntwsApConfRadioConfigLoadRebalancingEnabled=ntwsApConfRadioConfigLoadRebalancingEnabled, ntwsApConfApTemplConfPowerMode=ntwsApConfApTemplConfPowerMode, NtwsRadioProfileCountermeasuresMode=NtwsRadioProfileCountermeasuresMode, ntwsApConfRadioConfigTxPower=ntwsApConfRadioConfigTxPower, ntwsApConfServProfSodaRemediationAcl=ntwsApConfServProfSodaRemediationAcl, ntwsApConfServProfWpaIeAuthDot1xEnabled=ntwsApConfServProfWpaIeAuthDot1xEnabled, ntwsApConfApConfigApAttachType=ntwsApConfApConfigApAttachType, ntwsApConfApTemplateRadioConfigTable=ntwsApConfApTemplateRadioConfigTable, NtwsSnoopFilterName=NtwsSnoopFilterName, ntwsApConfServProfLongRetryCount=ntwsApConfServProfLongRetryCount, ntwsApConfServProfWebPortalAcl=ntwsApConfServProfWebPortalAcl, ntwsApConfRadioProfSnoopFilterEntry=ntwsApConfRadioProfSnoopFilterEntry, ntwsApConfRadioProfRateEnforcementEnabled=ntwsApConfRadioProfRateEnforcementEnabled, NtwsServiceProfileAuthFallthruType=NtwsServiceProfileAuthFallthruType, ntwsApConfRadioProfCacBackgroundMaxUtilization=ntwsApConfRadioProfCacBackgroundMaxUtilization, ntwsApConfRadioProfAutoTuneChannelChangeInterval=ntwsApConfRadioProfAutoTuneChannelChangeInterval, ntwsApConfRadioConfigLoadBalancingEnabled=ntwsApConfRadioConfigLoadBalancingEnabled, ntwsApConfRadioConfigAutoTuneMaxTxPower=ntwsApConfRadioConfigAutoTuneMaxTxPower, ntwsApConfSnoopFilterName=ntwsApConfSnoopFilterName, ntwsApConfApTemplConfApTemplateEnabled=ntwsApConfApTemplConfApTemplateEnabled, ntwsApConfApTemplateConfigTable=ntwsApConfApTemplateConfigTable, ntwsApConfApTemRadioConfRadioProfileName=ntwsApConfApTemRadioConfRadioProfileName, ntwsApConfRadioConfigRadioType=ntwsApConfRadioConfigRadioType, ntwsApConfRadioProfWmmPowerSaveEnabled=ntwsApConfRadioProfWmmPowerSaveEnabled, ntwsApConfServProfShortRetryCount=ntwsApConfServProfShortRetryCount, ntwsApConfServProfRsnIeAuthPskEnabled=ntwsApConfServProfRsnIeAuthPskEnabled, ntwsApConfServProfSodaAgentDirectory=ntwsApConfServProfSodaAgentDirectory, ntwsApConfRadioProfSnoopFilterTable=ntwsApConfRadioProfSnoopFilterTable, ntwsApConfRadioProfileTableGroup=ntwsApConfRadioProfileTableGroup, ntwsApConfRadioProfRtsThreshold=ntwsApConfRadioProfRtsThreshold, ntwsApConfApConfigApNum=ntwsApConfApConfigApNum, ntwsApConfApTemRadioConfApTemplateName=ntwsApConfApTemRadioConfApTemplateName, ntwsApConfServProfBeaconEnabled=ntwsApConfServProfBeaconEnabled, ntwsApConfApConfigPowerMode=ntwsApConfApConfigPowerMode, ntwsApConfRadioProfAutoTuneIgnoreClientsEnabled=ntwsApConfRadioProfAutoTuneIgnoreClientsEnabled, ntwsApConfServProfNoBroadcastEnabled=ntwsApConfServProfNoBroadcastEnabled)
|
class CarTablePage(Page):
add_car_form = AddCarForm()
car_table = CarTable()
def add_car(self, car: Car):
self.add_car_form.add_car(car)
def remove_car(self, car: Car):
self.car_table.remove_car(car)
@property
def cars(self) -> List[Car]:
return self.car_table.cars
|
r_0_0=[[0,1,2,3,4],[15,16,17,18,5],[14,23,34,19,6],[13,22,21,20,7],[12,11,10,9, 8]]
r_4_0=[[4,5,6,7,8],[ 3,18,19,20,9],[2,17,24,21,10],[1,16,23,22,11],[0,15,14,13,12]]
def index(s,pos):
def espelho_linhas(lst):
"""
Pega numa chave e inverte cada linha, mantendo a sua ordem na chave
"""
res=[]
for linha in lst:
linha_res= linha[::-1]
res+= [linha_res]
return res
def espelho_colunas(lst):
"""
Pega numa chave e inverte a ordem das linhas na chave
"""
res=[]
for linha in lst:
res= [linha]+res
return res
def linha_pos(p):
"""
-Seletor da componente 'linha' do tipo abstrato posicao
Input:
-p: um elemento do tipo posicao
Output:
-Valor numerico entre 0 e 4 correspondente ao componente 'linha' de <p>
Funcoes externas ao Python usadas: --
"""
return p[0]
def coluna_pos(p):
"""
-Seletor da componente 'coluna' do tipo abstrato posicao
Input:
-p: um elemento do tipo posicao
Output:
-Valor numerico entre 0 e 4 correspondente ao componente 'coluna' de <p>
Funcoes externas ao Python usadas: --
"""
return p[1]
if s=='r':
if coluna_pos(pos)==0:
if linha_pos(pos)== 0:
#'r', (0,0)
chave=r_0_0
else:
#'r', (4,0)
chave=r_4_0
else:
if linha_pos(pos)==4:
#'r', (4,4)
chave=espelho_linhas(espelho_colunas(r_0_0))
else:
#'r', (4,0)
chave=espelho_linhas(espelho_colunas(r_4_0))
elif s=='c':
if coluna_pos(pos)==4:
if linha_pos(pos)==0:
#'c', (0,4)
chave= espelho_linhas(r_0_0)
else:
#'c', (4,4)
chave= espelho_linhas(r_4_0)
else:
if linha_pos(pos)==4:
#'c',(4,0)
chave= espelho_colunas(r_0_0)
else:
#'c',(0,0)
chave= espelho_colunas(r_4_0)
return chave
|
#
# PySNMP MIB module UBNT-AirMAX-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/UBNT-AirMAX-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:28:21 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection, ValueRangeConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueRangeConstraint", "ValueSizeConstraint")
ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup")
Counter32, Gauge32, ModuleIdentity, Counter64, ObjectIdentity, IpAddress, Bits, NotificationType, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, MibIdentifier, iso, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "Gauge32", "ModuleIdentity", "Counter64", "ObjectIdentity", "IpAddress", "Bits", "NotificationType", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "MibIdentifier", "iso", "Unsigned32")
MacAddress, TextualConvention, DisplayString, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "MacAddress", "TextualConvention", "DisplayString", "TruthValue")
ubntMIB, ubntAirosGroups = mibBuilder.importSymbols("UBNT-MIB", "ubntMIB", "ubntAirosGroups")
ubntAirMAX = ModuleIdentity((1, 3, 6, 1, 4, 1, 41112, 1, 4))
ubntAirMAX.setRevisions(('2015-09-17 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ubntAirMAX.setRevisionsDescriptions(('ubntAirMAX revision',))
if mibBuilder.loadTexts: ubntAirMAX.setLastUpdated('201509170000Z')
if mibBuilder.loadTexts: ubntAirMAX.setOrganization('Ubiquiti Networks, Inc.')
if mibBuilder.loadTexts: ubntAirMAX.setContactInfo('support@ubnt.com')
if mibBuilder.loadTexts: ubntAirMAX.setDescription('The AirMAX MIB module for Ubiquiti Networks, Inc. entities')
ubntRadioTable = MibTable((1, 3, 6, 1, 4, 1, 41112, 1, 4, 1), )
if mibBuilder.loadTexts: ubntRadioTable.setStatus('current')
if mibBuilder.loadTexts: ubntRadioTable.setDescription('Radio status & statistics')
ubntRadioEntry = MibTableRow((1, 3, 6, 1, 4, 1, 41112, 1, 4, 1, 1), ).setIndexNames((0, "UBNT-AirMAX-MIB", "ubntRadioIndex"))
if mibBuilder.loadTexts: ubntRadioEntry.setStatus('current')
if mibBuilder.loadTexts: ubntRadioEntry.setDescription('An entry in the ubntRadioTable')
ubntRadioIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255)))
if mibBuilder.loadTexts: ubntRadioIndex.setStatus('current')
if mibBuilder.loadTexts: ubntRadioIndex.setDescription('Index for the ubntRadioTable')
ubntRadioMode = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("sta", 1), ("ap", 2), ("aprepeater", 3), ("apwds", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntRadioMode.setStatus('current')
if mibBuilder.loadTexts: ubntRadioMode.setDescription('Radio mode')
ubntRadioCCode = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 1, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntRadioCCode.setStatus('current')
if mibBuilder.loadTexts: ubntRadioCCode.setDescription('Country code')
ubntRadioFreq = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntRadioFreq.setStatus('current')
if mibBuilder.loadTexts: ubntRadioFreq.setDescription('Operating frequency')
ubntRadioDfsEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 1, 1, 5), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntRadioDfsEnabled.setStatus('current')
if mibBuilder.loadTexts: ubntRadioDfsEnabled.setDescription('DFS status')
ubntRadioTxPower = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntRadioTxPower.setStatus('current')
if mibBuilder.loadTexts: ubntRadioTxPower.setDescription('Transmit power')
ubntRadioDistance = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntRadioDistance.setStatus('current')
if mibBuilder.loadTexts: ubntRadioDistance.setDescription('Distance')
ubntRadioChainmask = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntRadioChainmask.setStatus('current')
if mibBuilder.loadTexts: ubntRadioChainmask.setDescription('Chainmask')
ubntRadioAntenna = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 1, 1, 9), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntRadioAntenna.setStatus('current')
if mibBuilder.loadTexts: ubntRadioAntenna.setDescription('Antenna')
ubntRadioRssiTable = MibTable((1, 3, 6, 1, 4, 1, 41112, 1, 4, 2), )
if mibBuilder.loadTexts: ubntRadioRssiTable.setStatus('current')
if mibBuilder.loadTexts: ubntRadioRssiTable.setDescription('Radio RSSI per chain')
ubntRadioRssiEntry = MibTableRow((1, 3, 6, 1, 4, 1, 41112, 1, 4, 2, 1), ).setIndexNames((0, "UBNT-AirMAX-MIB", "ubntRadioIndex"), (0, "UBNT-AirMAX-MIB", "ubntRadioRssiIndex"))
if mibBuilder.loadTexts: ubntRadioRssiEntry.setStatus('current')
if mibBuilder.loadTexts: ubntRadioRssiEntry.setDescription('An entry in the ubntRadioRssiTable')
ubntRadioRssiIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255)))
if mibBuilder.loadTexts: ubntRadioRssiIndex.setStatus('current')
if mibBuilder.loadTexts: ubntRadioRssiIndex.setDescription('Index for the ubntRadioRssiTable')
ubntRadioRssi = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 2, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntRadioRssi.setStatus('current')
if mibBuilder.loadTexts: ubntRadioRssi.setDescription('Data frames rssi per chain')
ubntRadioRssiMgmt = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 2, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntRadioRssiMgmt.setStatus('current')
if mibBuilder.loadTexts: ubntRadioRssiMgmt.setDescription('Management frames rssi per chain')
ubntRadioRssiExt = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 2, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntRadioRssiExt.setStatus('current')
if mibBuilder.loadTexts: ubntRadioRssiExt.setDescription('Extension channel rssi per chain')
ubntAirMaxTable = MibTable((1, 3, 6, 1, 4, 1, 41112, 1, 4, 6), )
if mibBuilder.loadTexts: ubntAirMaxTable.setStatus('current')
if mibBuilder.loadTexts: ubntAirMaxTable.setDescription('airMAX protocol statistics')
ubntAirMaxEntry = MibTableRow((1, 3, 6, 1, 4, 1, 41112, 1, 4, 6, 1), ).setIndexNames((0, "UBNT-AirMAX-MIB", "ubntAirMaxIfIndex"))
if mibBuilder.loadTexts: ubntAirMaxEntry.setStatus('current')
if mibBuilder.loadTexts: ubntAirMaxEntry.setDescription('An entry in the ubntAirMaxTable')
ubntAirMaxIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255)))
if mibBuilder.loadTexts: ubntAirMaxIfIndex.setStatus('current')
if mibBuilder.loadTexts: ubntAirMaxIfIndex.setDescription('Index for the ubntAirMaxTable')
ubntAirMaxEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 6, 1, 2), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntAirMaxEnabled.setStatus('current')
if mibBuilder.loadTexts: ubntAirMaxEnabled.setDescription('airMAX status - on/off')
ubntAirMaxQuality = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 6, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntAirMaxQuality.setStatus('current')
if mibBuilder.loadTexts: ubntAirMaxQuality.setDescription('airMAX quality - percentage')
ubntAirMaxCapacity = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 6, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntAirMaxCapacity.setStatus('current')
if mibBuilder.loadTexts: ubntAirMaxCapacity.setDescription('airMAX capacity - percentage')
ubntAirMaxPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 6, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("high", 0), ("medium", 1), ("low", 2), ("none", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntAirMaxPriority.setStatus('current')
if mibBuilder.loadTexts: ubntAirMaxPriority.setDescription('airMAX priority - none/high/low/medium')
ubntAirMaxNoAck = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 6, 1, 6), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntAirMaxNoAck.setStatus('current')
if mibBuilder.loadTexts: ubntAirMaxNoAck.setDescription('airMAX NoACK mode - on/off')
ubntAirSyncTable = MibTable((1, 3, 6, 1, 4, 1, 41112, 1, 4, 3), )
if mibBuilder.loadTexts: ubntAirSyncTable.setStatus('current')
if mibBuilder.loadTexts: ubntAirSyncTable.setDescription('airSync protocol statistics')
ubntAirSyncEntry = MibTableRow((1, 3, 6, 1, 4, 1, 41112, 1, 4, 3, 1), ).setIndexNames((0, "UBNT-AirMAX-MIB", "ubntAirSyncIfIndex"))
if mibBuilder.loadTexts: ubntAirSyncEntry.setStatus('current')
if mibBuilder.loadTexts: ubntAirSyncEntry.setDescription('An entry in the ubntAirSyncTable')
ubntAirSyncIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255)))
if mibBuilder.loadTexts: ubntAirSyncIfIndex.setStatus('current')
if mibBuilder.loadTexts: ubntAirSyncIfIndex.setDescription('Index for the ubntAirSyncTable')
ubntAirSyncMode = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("disabled", 0), ("master", 1), ("slave", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntAirSyncMode.setStatus('current')
if mibBuilder.loadTexts: ubntAirSyncMode.setDescription('airSync mode - master/slave')
ubntAirSyncCount = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 3, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntAirSyncCount.setStatus('current')
if mibBuilder.loadTexts: ubntAirSyncCount.setDescription('airSync client count')
ubntAirSyncDownUtil = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 3, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntAirSyncDownUtil.setStatus('current')
if mibBuilder.loadTexts: ubntAirSyncDownUtil.setDescription('airSync down utilization')
ubntAirSyncUpUtil = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 3, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntAirSyncUpUtil.setStatus('current')
if mibBuilder.loadTexts: ubntAirSyncUpUtil.setDescription('airSync up utilization')
ubntAirSelTable = MibTable((1, 3, 6, 1, 4, 1, 41112, 1, 4, 4), )
if mibBuilder.loadTexts: ubntAirSelTable.setStatus('current')
if mibBuilder.loadTexts: ubntAirSelTable.setDescription('airSelect protocol statistics')
ubntAirSelEntry = MibTableRow((1, 3, 6, 1, 4, 1, 41112, 1, 4, 4, 1), ).setIndexNames((0, "UBNT-AirMAX-MIB", "ubntAirSelIfIndex"))
if mibBuilder.loadTexts: ubntAirSelEntry.setStatus('current')
if mibBuilder.loadTexts: ubntAirSelEntry.setDescription('An entry in the ubntAirSelTable')
ubntAirSelIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255)))
if mibBuilder.loadTexts: ubntAirSelIfIndex.setStatus('current')
if mibBuilder.loadTexts: ubntAirSelIfIndex.setDescription('Index for the ubntAirSelTable')
ubntAirSelEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 4, 1, 2), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntAirSelEnabled.setStatus('current')
if mibBuilder.loadTexts: ubntAirSelEnabled.setDescription('airSelect status - on/off')
ubntAirSelInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 4, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntAirSelInterval.setStatus('current')
if mibBuilder.loadTexts: ubntAirSelInterval.setDescription('airSelect hop interval (miliseconds)')
ubntWlStatTable = MibTable((1, 3, 6, 1, 4, 1, 41112, 1, 4, 5), )
if mibBuilder.loadTexts: ubntWlStatTable.setStatus('current')
if mibBuilder.loadTexts: ubntWlStatTable.setDescription('Wireless statistics')
ubntWlStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 41112, 1, 4, 5, 1), ).setIndexNames((0, "UBNT-AirMAX-MIB", "ubntWlStatIndex"))
if mibBuilder.loadTexts: ubntWlStatEntry.setStatus('current')
if mibBuilder.loadTexts: ubntWlStatEntry.setDescription('An entry in the ubntWlStatTable')
ubntWlStatIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255)))
if mibBuilder.loadTexts: ubntWlStatIndex.setStatus('current')
if mibBuilder.loadTexts: ubntWlStatIndex.setDescription('Index for the ubntWlStatTable')
ubntWlStatSsid = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 5, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntWlStatSsid.setStatus('current')
if mibBuilder.loadTexts: ubntWlStatSsid.setDescription('SSID')
ubntWlStatHideSsid = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 5, 1, 3), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntWlStatHideSsid.setStatus('current')
if mibBuilder.loadTexts: ubntWlStatHideSsid.setDescription('Hide SSID - on/off')
ubntWlStatApMac = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 5, 1, 4), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntWlStatApMac.setStatus('current')
if mibBuilder.loadTexts: ubntWlStatApMac.setDescription('AP MAC address')
ubntWlStatSignal = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 5, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntWlStatSignal.setStatus('current')
if mibBuilder.loadTexts: ubntWlStatSignal.setDescription('Signal strength, dBm')
ubntWlStatRssi = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 5, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntWlStatRssi.setStatus('current')
if mibBuilder.loadTexts: ubntWlStatRssi.setDescription('RSSI, dBm')
ubntWlStatCcq = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 5, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntWlStatCcq.setStatus('current')
if mibBuilder.loadTexts: ubntWlStatCcq.setDescription('CCQ in %')
ubntWlStatNoiseFloor = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 5, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntWlStatNoiseFloor.setStatus('current')
if mibBuilder.loadTexts: ubntWlStatNoiseFloor.setDescription('Noise floor')
ubntWlStatTxRate = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 5, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntWlStatTxRate.setStatus('current')
if mibBuilder.loadTexts: ubntWlStatTxRate.setDescription('TX rate')
ubntWlStatRxRate = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 5, 1, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntWlStatRxRate.setStatus('current')
if mibBuilder.loadTexts: ubntWlStatRxRate.setDescription('RX rate')
ubntWlStatSecurity = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 5, 1, 11), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntWlStatSecurity.setStatus('current')
if mibBuilder.loadTexts: ubntWlStatSecurity.setDescription('Wireless security mode')
ubntWlStatWdsEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 5, 1, 12), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntWlStatWdsEnabled.setStatus('current')
if mibBuilder.loadTexts: ubntWlStatWdsEnabled.setDescription('WDS - on/off')
ubntWlStatApRepeater = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 5, 1, 13), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntWlStatApRepeater.setStatus('current')
if mibBuilder.loadTexts: ubntWlStatApRepeater.setDescription('AP repeater - on/off')
ubntWlStatChanWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 5, 1, 14), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntWlStatChanWidth.setStatus('current')
if mibBuilder.loadTexts: ubntWlStatChanWidth.setDescription('Channel Width')
ubntWlStatStaCount = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 5, 1, 15), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntWlStatStaCount.setStatus('current')
if mibBuilder.loadTexts: ubntWlStatStaCount.setDescription('Station count')
ubntStaTable = MibTable((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7), )
if mibBuilder.loadTexts: ubntStaTable.setStatus('current')
if mibBuilder.loadTexts: ubntStaTable.setDescription('Station list')
ubntStaEntry = MibTableRow((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1), ).setIndexNames((0, "UBNT-AirMAX-MIB", "ubntWlStatIndex"), (0, "UBNT-AirMAX-MIB", "ubntStaMac"))
if mibBuilder.loadTexts: ubntStaEntry.setStatus('current')
if mibBuilder.loadTexts: ubntStaEntry.setDescription('An entry in the ubntStaEntry')
ubntStaMac = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 1), MacAddress())
if mibBuilder.loadTexts: ubntStaMac.setStatus('current')
if mibBuilder.loadTexts: ubntStaMac.setDescription('Station MAC address')
ubntStaName = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaName.setStatus('current')
if mibBuilder.loadTexts: ubntStaName.setDescription('Station name')
ubntStaSignal = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaSignal.setStatus('current')
if mibBuilder.loadTexts: ubntStaSignal.setDescription('Signal strength, dBm')
ubntStaNoiseFloor = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaNoiseFloor.setStatus('current')
if mibBuilder.loadTexts: ubntStaNoiseFloor.setDescription('Noise floor')
ubntStaDistance = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaDistance.setStatus('current')
if mibBuilder.loadTexts: ubntStaDistance.setDescription('Distance')
ubntStaCcq = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaCcq.setStatus('current')
if mibBuilder.loadTexts: ubntStaCcq.setDescription('CCQ in %')
ubntStaAmp = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaAmp.setStatus('current')
if mibBuilder.loadTexts: ubntStaAmp.setDescription('airMAX priority')
ubntStaAmq = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaAmq.setStatus('current')
if mibBuilder.loadTexts: ubntStaAmq.setDescription('airMAX quality')
ubntStaAmc = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaAmc.setStatus('current')
if mibBuilder.loadTexts: ubntStaAmc.setDescription('airMAX capacity')
ubntStaLastIp = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 10), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaLastIp.setStatus('current')
if mibBuilder.loadTexts: ubntStaLastIp.setDescription('Last known IP address')
ubntStaTxRate = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaTxRate.setStatus('current')
if mibBuilder.loadTexts: ubntStaTxRate.setDescription('TX rate')
ubntStaRxRate = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaRxRate.setStatus('current')
if mibBuilder.loadTexts: ubntStaRxRate.setDescription('RX rate')
ubntStaTxBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 13), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaTxBytes.setStatus('current')
if mibBuilder.loadTexts: ubntStaTxBytes.setDescription('TX bytes')
ubntStaRxBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 14), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaRxBytes.setStatus('current')
if mibBuilder.loadTexts: ubntStaRxBytes.setDescription('TX rate')
ubntStaConnTime = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 15), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaConnTime.setStatus('current')
if mibBuilder.loadTexts: ubntStaConnTime.setDescription('Connection Time in seconds')
ubntStaLocalCINR = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 16), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaLocalCINR.setStatus('current')
if mibBuilder.loadTexts: ubntStaLocalCINR.setDescription('Local CINR')
ubntStaTxCapacity = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 17), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaTxCapacity.setStatus('current')
if mibBuilder.loadTexts: ubntStaTxCapacity.setDescription('Uplink Capacity in Kbps')
ubntStaRxCapacity = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 18), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaRxCapacity.setStatus('current')
if mibBuilder.loadTexts: ubntStaRxCapacity.setDescription('Downlink Capacity in Kbps')
ubntStaTxAirtime = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 19), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaTxAirtime.setStatus('current')
if mibBuilder.loadTexts: ubntStaTxAirtime.setDescription('Uplink Airtime in % multiplied by 10')
ubntStaRxAirtime = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 20), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaRxAirtime.setStatus('current')
if mibBuilder.loadTexts: ubntStaRxAirtime.setDescription('Downlink Airtime in % multiplied by 10')
ubntStaTxLatency = MibTableColumn((1, 3, 6, 1, 4, 1, 41112, 1, 4, 7, 1, 21), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ubntStaTxLatency.setStatus('current')
if mibBuilder.loadTexts: ubntStaTxLatency.setDescription('Uplink Latency in milliseconds')
ubntAirMAXStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 41112, 1, 2, 2, 1)).setObjects(("UBNT-AirMAX-MIB", "ubntStaName"), ("UBNT-AirMAX-MIB", "ubntStaSignal"), ("UBNT-AirMAX-MIB", "ubntStaNoiseFloor"), ("UBNT-AirMAX-MIB", "ubntStaDistance"), ("UBNT-AirMAX-MIB", "ubntStaCcq"), ("UBNT-AirMAX-MIB", "ubntStaAmp"), ("UBNT-AirMAX-MIB", "ubntStaAmq"), ("UBNT-AirMAX-MIB", "ubntStaAmc"), ("UBNT-AirMAX-MIB", "ubntStaLastIp"), ("UBNT-AirMAX-MIB", "ubntStaTxRate"), ("UBNT-AirMAX-MIB", "ubntStaRxRate"), ("UBNT-AirMAX-MIB", "ubntStaTxBytes"), ("UBNT-AirMAX-MIB", "ubntStaRxBytes"), ("UBNT-AirMAX-MIB", "ubntStaConnTime"), ("UBNT-AirMAX-MIB", "ubntStaLocalCINR"), ("UBNT-AirMAX-MIB", "ubntStaTxCapacity"), ("UBNT-AirMAX-MIB", "ubntStaRxCapacity"), ("UBNT-AirMAX-MIB", "ubntStaTxAirtime"), ("UBNT-AirMAX-MIB", "ubntStaRxAirtime"), ("UBNT-AirMAX-MIB", "ubntStaTxLatency"), ("UBNT-AirMAX-MIB", "ubntRadioMode"), ("UBNT-AirMAX-MIB", "ubntRadioCCode"), ("UBNT-AirMAX-MIB", "ubntRadioFreq"), ("UBNT-AirMAX-MIB", "ubntRadioDfsEnabled"), ("UBNT-AirMAX-MIB", "ubntRadioTxPower"), ("UBNT-AirMAX-MIB", "ubntRadioDistance"), ("UBNT-AirMAX-MIB", "ubntRadioChainmask"), ("UBNT-AirMAX-MIB", "ubntRadioAntenna"), ("UBNT-AirMAX-MIB", "ubntRadioRssi"), ("UBNT-AirMAX-MIB", "ubntRadioRssiMgmt"), ("UBNT-AirMAX-MIB", "ubntRadioRssiExt"), ("UBNT-AirMAX-MIB", "ubntAirMaxEnabled"), ("UBNT-AirMAX-MIB", "ubntAirMaxQuality"), ("UBNT-AirMAX-MIB", "ubntAirMaxCapacity"), ("UBNT-AirMAX-MIB", "ubntAirMaxPriority"), ("UBNT-AirMAX-MIB", "ubntAirMaxNoAck"), ("UBNT-AirMAX-MIB", "ubntAirSyncMode"), ("UBNT-AirMAX-MIB", "ubntAirSyncCount"), ("UBNT-AirMAX-MIB", "ubntAirSyncDownUtil"), ("UBNT-AirMAX-MIB", "ubntAirSyncUpUtil"), ("UBNT-AirMAX-MIB", "ubntAirSelEnabled"), ("UBNT-AirMAX-MIB", "ubntAirSelInterval"), ("UBNT-AirMAX-MIB", "ubntWlStatSsid"), ("UBNT-AirMAX-MIB", "ubntWlStatHideSsid"), ("UBNT-AirMAX-MIB", "ubntWlStatApMac"), ("UBNT-AirMAX-MIB", "ubntWlStatSignal"), ("UBNT-AirMAX-MIB", "ubntWlStatRssi"), ("UBNT-AirMAX-MIB", "ubntWlStatCcq"), ("UBNT-AirMAX-MIB", "ubntWlStatNoiseFloor"), ("UBNT-AirMAX-MIB", "ubntWlStatTxRate"), ("UBNT-AirMAX-MIB", "ubntWlStatRxRate"), ("UBNT-AirMAX-MIB", "ubntWlStatSecurity"), ("UBNT-AirMAX-MIB", "ubntWlStatWdsEnabled"), ("UBNT-AirMAX-MIB", "ubntWlStatApRepeater"), ("UBNT-AirMAX-MIB", "ubntWlStatChanWidth"), ("UBNT-AirMAX-MIB", "ubntWlStatStaCount"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ubntAirMAXStatusGroup = ubntAirMAXStatusGroup.setStatus('current')
if mibBuilder.loadTexts: ubntAirMAXStatusGroup.setDescription('Status and statistics for AirMax monitoring')
ubntAirMAXStatusCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 41112, 1, 2, 2, 2)).setObjects(("UBNT-AirMAX-MIB", "ubntAirMAXStatusGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ubntAirMAXStatusCompliance = ubntAirMAXStatusCompliance.setStatus('current')
if mibBuilder.loadTexts: ubntAirMAXStatusCompliance.setDescription('The compliance statement for Ubiquiti AirMax entities.')
mibBuilder.exportSymbols("UBNT-AirMAX-MIB", ubntStaRxBytes=ubntStaRxBytes, ubntWlStatIndex=ubntWlStatIndex, ubntWlStatNoiseFloor=ubntWlStatNoiseFloor, ubntStaName=ubntStaName, ubntStaTxLatency=ubntStaTxLatency, ubntAirMAX=ubntAirMAX, ubntStaAmp=ubntStaAmp, ubntWlStatStaCount=ubntWlStatStaCount, ubntRadioChainmask=ubntRadioChainmask, ubntAirSyncDownUtil=ubntAirSyncDownUtil, ubntRadioTxPower=ubntRadioTxPower, ubntWlStatSecurity=ubntWlStatSecurity, ubntStaDistance=ubntStaDistance, ubntStaNoiseFloor=ubntStaNoiseFloor, ubntWlStatTxRate=ubntWlStatTxRate, ubntStaRxCapacity=ubntStaRxCapacity, ubntWlStatHideSsid=ubntWlStatHideSsid, ubntRadioRssiMgmt=ubntRadioRssiMgmt, ubntAirSyncIfIndex=ubntAirSyncIfIndex, ubntRadioEntry=ubntRadioEntry, ubntStaEntry=ubntStaEntry, ubntAirSyncUpUtil=ubntAirSyncUpUtil, ubntStaRxAirtime=ubntStaRxAirtime, ubntAirSelEntry=ubntAirSelEntry, ubntRadioRssiExt=ubntRadioRssiExt, ubntWlStatRssi=ubntWlStatRssi, ubntRadioTable=ubntRadioTable, ubntRadioAntenna=ubntRadioAntenna, ubntStaTxCapacity=ubntStaTxCapacity, ubntRadioFreq=ubntRadioFreq, ubntWlStatEntry=ubntWlStatEntry, ubntStaTxRate=ubntStaTxRate, ubntAirMaxNoAck=ubntAirMaxNoAck, ubntStaSignal=ubntStaSignal, ubntAirSelInterval=ubntAirSelInterval, ubntWlStatRxRate=ubntWlStatRxRate, ubntRadioRssi=ubntRadioRssi, ubntAirMaxEnabled=ubntAirMaxEnabled, ubntWlStatApRepeater=ubntWlStatApRepeater, ubntWlStatChanWidth=ubntWlStatChanWidth, ubntRadioIndex=ubntRadioIndex, ubntAirSyncCount=ubntAirSyncCount, ubntAirMaxQuality=ubntAirMaxQuality, ubntAirMaxTable=ubntAirMaxTable, ubntStaTxBytes=ubntStaTxBytes, ubntRadioCCode=ubntRadioCCode, ubntAirMaxCapacity=ubntAirMaxCapacity, ubntRadioDistance=ubntRadioDistance, ubntStaConnTime=ubntStaConnTime, ubntAirMaxIfIndex=ubntAirMaxIfIndex, ubntStaAmq=ubntStaAmq, ubntAirSyncMode=ubntAirSyncMode, ubntRadioRssiTable=ubntRadioRssiTable, ubntStaLocalCINR=ubntStaLocalCINR, ubntWlStatWdsEnabled=ubntWlStatWdsEnabled, ubntStaAmc=ubntStaAmc, ubntRadioMode=ubntRadioMode, ubntWlStatTable=ubntWlStatTable, ubntAirSyncEntry=ubntAirSyncEntry, ubntWlStatCcq=ubntWlStatCcq, PYSNMP_MODULE_ID=ubntAirMAX, ubntAirMAXStatusGroup=ubntAirMAXStatusGroup, ubntWlStatSignal=ubntWlStatSignal, ubntAirMaxEntry=ubntAirMaxEntry, ubntStaMac=ubntStaMac, ubntAirSyncTable=ubntAirSyncTable, ubntWlStatSsid=ubntWlStatSsid, ubntWlStatApMac=ubntWlStatApMac, ubntStaRxRate=ubntStaRxRate, ubntRadioRssiEntry=ubntRadioRssiEntry, ubntAirSelIfIndex=ubntAirSelIfIndex, ubntRadioDfsEnabled=ubntRadioDfsEnabled, ubntRadioRssiIndex=ubntRadioRssiIndex, ubntAirSelTable=ubntAirSelTable, ubntStaLastIp=ubntStaLastIp, ubntAirMaxPriority=ubntAirMaxPriority, ubntStaTxAirtime=ubntStaTxAirtime, ubntAirSelEnabled=ubntAirSelEnabled, ubntAirMAXStatusCompliance=ubntAirMAXStatusCompliance, ubntStaCcq=ubntStaCcq, ubntStaTable=ubntStaTable)
|
# https://leetcode.com/explore/interview/card/top-interview-questions-easy/102/math/745/
# https://leetcode.com/problems/power-of-three/description/
# Power of Three
#
# Given an integer, write a function to determine if it is a power of three.
# ie, 45 % 3 is 0, but 45 is not power of 3
# so it is not simply "n % 3 == 0" haha
class Solution:
def isPowerOfThree(self, n):
"""
:type n: int
:rtype: bool
"""
return self.check1_divide(n)
# option1: loop iteration: keep divide by 3 until 1
def check1_divide(self, n):
if n < 1:
return False
while n % 3 == 0:
n //= 3
return n == 1
# option2: convert to base 3, and ensure it is like 10000...
# option3, log(n)/log(3) should be integer, tricky to implement
# option4: integer limitation
def check4_int_limit(self, n):
# 1162261467 = pow(3, 19), or 3^19, the highest n power of n for 32bit int
return n > 0 and 1162261467 % n == 0
|
def handle_annotations(annotations):
new_global = {}
new_local = {}
if 'global' in annotations:
for key in annotations['global']:
key_new = key.replace('__EQUALS__', '=')
new_global[key_new] = annotations['global'][key]
if 'local' in annotations:
for key in annotations['local']:
key_new = key.replace('__EQUALS__', '=')
new_local[key_new] = annotations['local'][key]
return {'global': new_global, 'local': new_local}
|
range_von, range_bis = 357253,892943
lösung = 0
for password in range(range_von, range_bis):
text = str(password)
double = False
for x in range(5):
if text[x] == text[x+1]:
double = True
increasing = True
for x in range(5):
if text[x] > text[x+1]:
increasing = False
if double and increasing: lösung += 1
print(lösung)
|
# Nó para alocação de uma Fila
class Node:
def __init__(self, data):
self.data = data
self.next = None
# Classe que define uma Fila
class Queue:
def __init__(self):
self.first = None
self.last = None
self._size = 0
# inserir na fila
def push(self, elem):
"""Insere um elemento na fila"""
node = Node(elem)
if self.last is None:
self.last = node
else:
self.last.next = node
self.last = node
if self.first is None:
self.first = node
self._size = self._size + 1
# remover da fila
def pop(self):
"""Remove o elemento do topo da pilha"""
if self._size > 0:
elem = self.first.data
self.first = self.first.next
# faltou tratar este caso no vídeo #
if self.first is None:
self.last = None
####################################
self._size = self._size - 1
return elem
raise IndexError("The queue is empty")
# observar o primeiro da fila
def peek(self):
"""Retorna o topo sem remover"""
if self._size > 0:
elem = self.first.data
return elem
raise IndexError("The queue is empty")
def __len__(self):
"""Retorna o tamanho da lista"""
return self._size
def __repr__(self):
if self._size > 0:
r = ""
pointer = self.first
while(pointer):
r = r + str(pointer.data) + " "
pointer = pointer.next
return r
return "Empty Queue"
def __str__(self):
return self.__repr__()
|
# Fields
NAME = 'name'
NUMBER = 'number'
SET = 'set'
TYPE = 'type'
IS_INSTANT = 'is-instant'
MEDICINE = 'medicine'
PLUS_DIG = 'plus-dig'
PLUS_HUNT = 'plus-hunt'
PLUS_FIGHT = 'plus-fight'
ABILITY = 'ability'
TEXT = 'text'
# Set values
BASE = 'base'
HQ_EXP = 'hq'
RECON_EXP = 'recon'
# Type values
JUNKYARD = 'junkyard'
CONTESTED_RESOURCE = 'contested-resource'
# Ability values
RECON = 'recon'
class Items:
ALL_ITEMS = [
{
NAME: 'Junk',
SET: BASE,
NUMBER: 7,
TYPE: JUNKYARD
},
{
NAME: 'Pills',
SET: BASE,
NUMBER: 9,
TYPE: JUNKYARD,
MEDICINE: 1
},
{
NAME: 'Medkit',
SET: BASE,
NUMBER: 6,
TYPE: JUNKYARD,
MEDICINE: 2
},
{
NAME: 'Net',
SET: BASE,
NUMBER: 4,
TYPE: JUNKYARD,
PLUS_HUNT: 2,
PLUS_FIGHT: 1
},
{
NAME: 'Pickaxe',
SET: BASE,
NUMBER: 4,
TYPE: JUNKYARD,
PLUS_DIG: 1,
PLUS_FIGHT: 2
},
{
NAME: 'Multitool',
SET: BASE,
NUMBER: 4,
TYPE: JUNKYARD,
PLUS_DIG: 1,
PLUS_HUNT: 1,
PLUS_FIGHT: 1
},
{
NAME: 'Shovel',
SET: BASE,
NUMBER: 6,
TYPE: JUNKYARD,
PLUS_DIG: 1,
PLUS_FIGHT: 1
},
{
NAME: 'Spear',
SET: BASE,
NUMBER: 6,
TYPE: JUNKYARD,
PLUS_HUNT: 1,
PLUS_FIGHT: 2
},
{
NAME: 'Grenade',
SET: BASE,
NUMBER: 2,
TYPE: CONTESTED_RESOURCE,
PLUS_FIGHT: 3
},
{
NAME: 'Wolf Pack',
SET: BASE,
NUMBER: 2,
TYPE: CONTESTED_RESOURCE,
PLUS_HUNT: 3,
PLUS_FIGHT: 2
},
{
NAME: 'Rifle',
SET: HQ_EXP,
NUMBER: 4,
TYPE: JUNKYARD,
PLUS_HUNT: 2,
PLUS_FIGHT: 2
},
{
NAME: 'Toolkit',
SET: HQ_EXP,
NUMBER: 4,
TYPE: JUNKYARD,
PLUS_DIG: 2,
TEXT: 'Increases a tribe member\'s build by +2 cards.'
},
{
NAME: 'Map',
SET: RECON_EXP,
NUMBER: 4,
TYPE: JUNKYARD,
IS_INSTANT: True,
TEXT: 'Return 1 tribe member to your hand after performing a non-skirmish action.'
},
{
NAME: 'Binoculars',
SET: RECON_EXP,
NUMBER: 4,
TYPE: JUNKYARD,
IS_INSTANT: True,
ABILITY: RECON,
TEXT: 'May peek at the top card from all piles in play, OR, recon +2'
},
{
NAME: 'Cargo Sled',
SET: RECON_EXP,
NUMBER: 2,
TYPE: CONTESTED_RESOURCE,
PLUS_DIG: 2,
PLUS_HUNT: 2,
TEXT: 'When digging in the Junkyard, you may keep 1 additional tool or medicine.'
},
{
NAME: 'Tear Gas',
SET: RECON_EXP,
NUMBER: 2,
TYPE: CONTESTED_RESOURCE,
IS_INSTANT: True,
TEXT: 'Select 1 opponent tribe member and reduce its fight (or bonus to fight) to 0.'
}
]
|
class LocationFailureException(Exception):
pass
class BadLatitudeException(Exception):
pass
class BadLongitudeException(Exception):
pass
class BadAltitudeException(Exception):
pass
class BadNumberException(Exception):
pass
class GetPassesException(Exception):
pass
class AstronautFailureException(Exception):
pass
|
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def constructMaximumBinaryTree(self, nums: List[int]) -> TreeNode:
def maxTree(nums):
idx=nums.index(max(nums))
node = TreeNode(nums[idx])
if len(nums[idx+1:])>0:
node.right = maxTree(nums[idx+1:])
if len(nums[:idx])>0:
node.left = maxTree(nums[:idx])
return node
return maxTree(nums)
|
# 가장 큰 수
def solution(numbers):
str_numbers = list(map(str, numbers))
str_numbers.sort(key=lambda x: x * 3, reverse=True)
return str(int("".join(str_numbers)))
print(solution([6, 10, 2]))
|
# -*- coding: utf-8 -*-
N = int(input())
A = list(map(int, input().split()))
pre = [0]*len(A)
pre[0] = A[0]
aft = [0]*len(A)
aft[-1] = A[-1]
for pos, it in enumerate(A[1:], 1):
pre[pos] = pre[pos-1]+it
for pos in range(len(A)-2, -1, -1):
aft[pos] = aft[pos+1]+A[pos]
ans = 0;
print(pre)
print(aft)
for pos in range(len(A)-1):
if(pos == 0):
ans = max(ans, 0+(A[pos]^A[pos+1])+aft[pos+2])
elif(pos == len(A)-2):
ans = max(ans, pre[pos-1]+(A[pos]^A[pos+1])+0)
else:
ans = max(ans, pre[pos-1]+(A[pos]^A[pos+1])+aft[pos+2])
print(ans)
print(ans)
|
def group(it, n):
it = iter(it)
block = []
for elem in it:
block.append(elem)
if len(block) == n:
yield block
block = []
if block:
yield block
|
"""
Copyright 2014 VoterChat
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
### FLASK CONFIG ###
DEBUG = True
SECRET_KEY = "development key"
### FLASK CONFIG ###
### REDIS CONFIG ###
REDIS_HOST = "localhost"
REDIS_PORT = 6379
REDIS_DB = 0
### REDIS CONFIG ###
|
class CriteriaBuilder():
'''Defines the CriteriaBuilder class'''
__and = None
__where = None
__or = None
__criteria = None
__cmd = None
__sql = None
@property
def AND( self ):
if self.__and is not None:
return self.__and
@property
def WHERE( self ):
if self.__where is not None:
return self.__where
@property
def command( self ):
if self.__cmd is not None:
return str( self.__sql[ self.__cmd ] )
@command.setter
def command( self, cmd ):
if cmd is not None and cmd in self.__sql:
self.__cmd = str( self.__sql[ cmd ] )
def create( self, pairs ):
''' builds criteria from dictionary of name value pairs'''
if isinstance( pairs, dict ):
self.__criteria = pairs
def __init__( self, cmd = 'SELECT' ):
self.__and = ' AND '
self.__where = ' WHERE '
self.__cmd = str( cmd )
self.__sql = [ 'SELECT', 'INSERT', 'UPDATE',
'DELETE', 'CREATE', 'ALTER',
'DROP', 'DETACH' ]
|
description = 'testing qmesydaq'
group = 'optional'
excludes = []
sysconfig = dict(
datasinks = ['LiveViewSink'],
)
tango_base = 'tango://localhost:10000/test/qmesydaq/'
devices = dict(
# RAWFileSaver = device('nicos.devices.datasinks.RawImageSink',
# description = 'Saves image data in RAW format',
# filenametemplate = [
# '%(proposal)s_%(pointcounter)06d.raw',
# '%(proposal)s_%(scancounter)s_'
# '%(pointcounter)s_%(pointnumber)s.raw'],
# subdir = 'QMesyDAQ2',
# lowlevel = True,
# ),
LiveViewSink = device('nicos.devices.datasinks.LiveViewSink',
description = 'Sends image data to LiveViewWidget',
),
qm_ctr0 = device('nicos.devices.entangle.CounterChannel',
description = 'QMesyDAQ Counter0',
tangodevice = tango_base + 'counter0',
type = 'counter',
lowlevel = True,
),
qm_ctr1 = device('nicos.devices.entangle.CounterChannel',
description = 'QMesyDAQ Counter1',
tangodevice = tango_base + 'counter1',
type = 'counter',
lowlevel = True,
),
qm_ctr2 = device('nicos.devices.entangle.CounterChannel',
description = 'QMesyDAQ Counter2',
tangodevice = tango_base + 'counter2',
type = 'monitor',
lowlevel = True,
),
qm_ctr3 = device('nicos.devices.entangle.CounterChannel',
description = 'QMesyDAQ Counter3',
tangodevice = tango_base + 'counter3',
type = 'monitor',
lowlevel = True,
),
qm_ev = device('nicos.devices.entangle.CounterChannel',
description = 'QMesyDAQ Events channel',
tangodevice = tango_base + 'events',
type = 'counter',
lowlevel = True,
),
qm_timer = device('nicos.devices.entangle.TimerChannel',
description = 'QMesyDAQ Timer',
tangodevice = tango_base + 'timer',
),
mesytec = device('nicos.devices.generic.Detector',
description = 'QMesyDAQ Image type Detector',
timers = ['qm_timer'],
counters = [
'qm_ev',
# 'qm_ctr0', 'qm_ctr2'
],
monitors = [
#'qm_ctr1', 'qm_ctr3'
],
others = [],
),
)
startupcode = '''
SetDetectors(mesytec)
'''
|
NUMBER = (1 << 15)
OPERATOR = (1 << 16)
FUNCTION = (1 << 17)
OTHER = (1 << 18)
OPERATOR_PRIORITY_1 = (1 << 10)
OPERATOR_PRIORITY_2 = (1 << 11) # Multiplication & Division
OPERATOR_PRIORITY_3 = (1 << 12) # Implicit Multiplication (0.5/2x, a/b(c))
OPERATOR_PRIORITY_4 = (1 << 13) # Root & Exponent
STUndefined = 0
STNumber = NUMBER | 1
STFactor = NUMBER | 2 # 2x, 3y
STAddition = OPERATOR | OPERATOR_PRIORITY_1 | 2
STSubtraction = OPERATOR | OPERATOR_PRIORITY_1 | 3
STMultiplication = OPERATOR | OPERATOR_PRIORITY_2 | 4
STDivision = OPERATOR | OPERATOR_PRIORITY_2 | 5
STExponent = OPERATOR | OPERATOR_PRIORITY_4 | 6
STRoot = OPERATOR | OPERATOR_PRIORITY_4 | 7
STOpenParenthesis = OTHER | 1
STCloseParenthesis = OTHER | 2
class Symbol:
def __init__(self, data: list, symbol_type: int, index: int, length: int):
# All data of the symbol (e.g. : [] : operator, [value] : digit, [value, unknowns] for unknowns factor
self.data = data
self.type = symbol_type
self.index_in_equation = index
self.length_in_equation = length
|
# test for function notation
def helloworld(txt:dict(type=str,help='input text')):
print(txt)
if __name__ == '__main__' :
helloworld('hawken')
print(helloworld.__annotations__)
|
# 核心思路
# 题目保证了每个单词之间只会有一个空格分隔,所以只需要简单的
# 按照空格切分即可得到每个token
# 然后对每个token reverse之后再拼接在一起
# 内建功能丰富的语言对这题比较简单
class Solution(object):
def reverseWords(self, s):
"""
:type s: str
:rtype: str
"""
tokens = s.split()
for i in range(len(tokens)):
tokens[i] = tokens[i][::-1]
return ' '.join(tokens)
|
class Solution(object):
def shortestDistance(self, words, word1, word2):
"""
:type words: List[str]
:type word1: str
:type word2: str
:rtype: int
"""
d = {}
d[word1] = -1
d[word2] = -1
minDist = 0x7fffffff
for i,word in enumerate(words):
if word == word1:
d[word1] = i
if d[word2] != -1:
minDist = min(minDist, i - d[word2])
elif word == word2:
d[word2] = i
if d[word1] != -1:
minDist = min(minDist, i - d[word1])
return minDist
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.