content stringlengths 7 1.05M |
|---|
##!FAIL: UnsupportedNodeError[Return]@5:4
def f(x):
""" int -> NoneType """
return
|
#Defining a hash function
"""def get_hash(key):
h=0
for char in key:
h += ord(char)
return h%100
print(get_hash("hirwa"))
"""
#Creating a hash Table class
class Hashtable:
def __init__(self):
self.MAX=100
self.arr=[None for i in range(self.MAX)]
def get_hash(self,key):
h=0
for char in key:
h += ord(char)
return h % self.MAX
#Adding Key values to the Hashtable
def __setitem__(self,key,val):
h = self.get_hash(key)
self.arr[h]=val
#Function to get the hash table
def __getitem__(self,key):
h=self.get_hash(key)
return self.arr[h]
#Deleting Item from a hashtable
def __delitem__(self,key):
h=self.get_hash(key)
self.arr[h] =None
test=Hashtable()
test["march 6"]=130
test["coding"]=263
test["march 17"]=102
print(test["march 6"])
print(test["march 6"])
|
# Name, Variables, Functions
def print_two(*args):
arg1, arg2 = args
print(f"arg1: {arg1}, arg2: {arg2}")
print(f"Type1: {type(arg1)}. Type2: {type(arg2)}")
def print_take_2(one, two):
print(f"Value1: {one}, Value2: {two}")
def print_take_1(one):
print(f"Value: {one}")
def print_none():
print("I got nothing")
print_two(12, 'abcd')
print_take_2("Donald", 'Trump')
print_take_1("Hello")
print_none() |
COL_WITH_NAN_SIGNIFICATION = ["BsmtQual", "BsmtCond", "BsmtExposure",
"BsmtFinType1", "BsmtFinType2", "GarageType",
"GarageFinish", "GarageQual", "GarageCond",
"PoolQC", "Fence", "MiscFeature", "Alley"]
CONTINUOUS_COL = ["LotFrontage", "LotArea", "MasVnrArea", "BsmtFinSF1", "BsmtFinSF2", "BsmtUnfSF", "TotalBsmtSF",
"1stFlrSF", "2ndFlrSF", "LowQualFinSF", "GrLivArea", "BsmtFullBath", "BsmtHalfBath", "FullBath",
"HalfBath", "GarageYrBlt", "GarageArea", "WoodDeckSF", "OpenPorchSF", "EnclosedPorch", "3SsnPorch",
"ScreenPorch", "PoolArea", "MiscVal", "YrSold"]
DISCRETE_COL = ["OverallQual", "OverallCond", "YearBuilt", "YearRemodAdd", "BedroomAbvGr", "TotRmsAbvGrd", "Fireplaces",
"GarageCars", "KitchenAbvGr"]
CAT_COL = ["MSSubClass", "MSZoning", "Street", "Alley", "LotShape", "LandContour", "Utilities", "LotConfig",
"LandSlope", "Neighborhood", "Condition1", "Condition2", "BldgType", "HouseStyle", "RoofStyle",
"RoofMatl", "Exterior1st", "Exterior2nd", "MasVnrType", "Foundation",
"BsmtExposure", "BsmtFinType1", "BsmtFinType2", "Heating",
"CentralAir", "Electrical", "Functional", "GarageType", "PavedDrive", "Fence", "MiscFeature",
"MoSold", "SaleType", "SaleCondition"]
QUALITY_COL = ["FireplaceQu", "ExterQual", "GarageQual", "GarageCond", "PoolQC", "BsmtQual", "BsmtCond", "HeatingQC",
"KitchenQual", "ExterCond"]
FINISH_COL = ["GarageFinish"]
QUALITY_ORDINAL_MAPPING = {'NO': 0,
'Po': 1,
'Fa': 2,
'TA': 3,
'Gd': 4,
'Ex': 5,
'MISSING': 0}
ORIGINAL_FEATURE_COLS = ['Id',
'MSSubClass',
'MSZoning',
'LotFrontage',
'LotArea',
'Street',
'Alley',
'LotShape',
'LandContour',
'Utilities',
'LotConfig',
'LandSlope',
'Neighborhood',
'Condition1',
'Condition2',
'BldgType',
'HouseStyle',
'OverallQual',
'OverallCond',
'YearBuilt',
'YearRemodAdd',
'RoofStyle',
'RoofMatl',
'Exterior1st',
'Exterior2nd',
'MasVnrType',
'MasVnrArea',
'ExterQual',
'ExterCond',
'Foundation',
'BsmtQual',
'BsmtCond',
'BsmtExposure',
'BsmtFinType1',
'BsmtFinSF1',
'BsmtFinType2',
'BsmtFinSF2',
'BsmtUnfSF',
'TotalBsmtSF',
'Heating',
'HeatingQC',
'CentralAir',
'Electrical',
'1stFlrSF',
'2ndFlrSF',
'LowQualFinSF',
'GrLivArea',
'BsmtFullBath',
'BsmtHalfBath',
'FullBath',
'HalfBath',
'BedroomAbvGr',
'KitchenAbvGr',
'KitchenQual',
'TotRmsAbvGrd',
'Functional',
'Fireplaces',
'FireplaceQu',
'GarageType',
'GarageYrBlt',
'GarageFinish',
'GarageCars',
'GarageArea',
'GarageQual',
'GarageCond',
'PavedDrive',
'WoodDeckSF',
'OpenPorchSF',
'EnclosedPorch',
'3SsnPorch',
'ScreenPorch',
'PoolArea',
'PoolQC',
'Fence',
'MiscFeature',
'MiscVal',
'MoSold',
'YrSold',
'SaleType',
'SaleCondition'] |
num = int(input("Digite um valor: "))
ant = num - 1
sus = num + 1
print(f"Analisando o valor {num}, o seu antecessor é {num - 1} e o sucessor é {num + 1}.")
|
lista_telefonica = {}
def lista(nome):
if nome in lista_telefonica:
print(f'Nome: {nome.title()} - Número: {lista_telefonica[nome]}')
else:
pergunta = str(input('Não existe esse nome na lista, quer gravar? '))
if pergunta == 'sim':
numero = input('Digite o número de telefone: ').strip()
lista_telefonica[nome] = numero
print('Contato salvo com sucesso!')
while True:
print('[SAIR] TERMINAR\n[LISTA] MOSTRA TODOS OS CONTATOS')
entrada = str(input('Digite um nome: ')).strip()
if entrada == 'sair':
break
elif entrada == 'lista':
for chave, valor in lista_telefonica.items():
print(f'Nome: {chave.title()} Número: {valor}')
break
lista(entrada)
|
def dec2bin(x):
cache = []
res = ''
while x:
num = x % 2
x = x // 2
cache.append(num)
while cache:
res += str(cache.pop())
return res
print(dec2bin(10),bin(10))
|
_config = {}
def Get(key):
global _config
return _config[key]
def Set(key, value):
global _config
_config[key] = value
|
n1 = float(input('Escreva um valor em metros:'))
cm = n1 * 100
mm = n1 * 1000
print(f'o valor em centimetro é: {cm} e o valor em milímetros é: {mm}')
print(f'o valor em metros é:{n1}')
|
class Case:
def __init__(self, number: str, status: str, title: str, body: str):
self.number = number
self.status = status
self.title = title
self.body = body
|
def update_transition_matrix(self, opponent_move):
global POSSIBLE_MOVES
if len(self.moves) <= len(LAST_POSSIBLE_MOVES[0]):
return None
for i in range(len(self.transition_sum_matrix[self.last_moves])):
self.transition_sum_matrix[self.last_moves][i] *= self.decay
self.transition_sum_matrix[self.last_moves][POSSIBLE_MOVES.index(opponent_move)] += 1
transition_matrix_row = deepcopy(self.transition_sum_matrix[self.last_moves])
row_sum = sum(transition_matrix_row)
transition_matrix_row[:] = [count/row_sum for count in transition_matrix_row]
self.transition_matrix[self.last_moves] = transition_matrix_row
|
class Vertex:
def __init__(self, name):
self.name = name
class Graph:
vertices = {}
edges = []
edge_indices = {}
def add_vertex(self, vertex):
if isinstance(vertex, Vertex) and vertex.name not in self.vertices:
self.vertices[vertex.name] = vertex
for row in self.edges:
row.append(0)
self.edges.append([0] * (len(self.edges)+1))
self.edge_indices[vertex.name] = len(self.edge_indices)
return True
else:
return False
def add_edge(self, u, v, weight=1):
if u in self.vertices and v in self.vertices:
self.edges[self.edge_indices[u]][self.edge_indices[v]] = weight
self.edges[self.edge_indices[v]][self.edge_indices[u]] = weight
return True
else:
return False
def print_graph(self):
for v, i in sorted(self.edge_indices.items()):
print(v + ' ', end='')
for j in range(len(self.edges)):
print(self.edges[i][j], end='')
print(' ')
if __name__ == '__main__':
graph = Graph()
a = Vertex('A')
graph.add_vertex(a)
graph.add_vertex(Vertex('B'))
for i in range(ord('A'), ord('L')):
graph.add_vertex(Vertex(chr(i)))
edges = ['AB', 'AE', 'BF', 'CG', 'DE', 'EH', 'FB', 'FK', 'GA', 'GB', 'HI', 'JK', 'KA']
for edge in edges:
graph.add_edge(edge[:1], edge[1:])
graph.print_graph()
|
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def sortList(self, head: ListNode) -> ListNode:
if not head:
return
if head.next == None:
return head
def find_mid(head):
if not head:
return None
slow, fast = head, head
while fast.next and fast.next.next:
slow = slow.next
fast = fast.next.next
right_head = slow.next
slow.next = None
return right_head
def merge(a,b):
dummy = ListNode(0)
curt = dummy
while a and b:
if a.val < b.val:
curt.next = a
a = a.next
else:
curt.next = b
b = b.next
curt = curt.next
if a == None:
curt.next = b
if b == None:
curt.next = a
return dummy.next
mid = find_mid(head)
l = self.sortList(head)
r = self.sortList(mid)
return merge(l,r) |
def parse(input_file):
with open(input_file, 'r') as f:
return f.read().split('\n\n')
def clean_input(answers):
return [a.replace('\n', '') for a in answers]
def get_uniques(answers):
return [set(a) for a in answers]
def get_unique_count(answers):
return [len(a) for a in answers]
def get_agreeing(answers):
agreeing_total = 0
for answer in answers:
n = answer.count('\n') + 1
count = {}
for entry in answer.replace('\n', ''):
try:
count[entry] += 1
except KeyError:
count[entry] = 1
agreeing = [letter for letter, number in count.items() if number == n]
agreeing_total += len(agreeing)
return agreeing_total
answers = parse('input_06.txt')
print(get_agreeing(answers)) |
fib_num= lambda n:fib_num(n-1)+fib_num(n-2) if n>2 else 1
print(fib_num(6))
def test1_fib_num():
assert (fib_num(6)==8)
def test2_fib_num():
assert (fib_num(5)==5)
def test3_fib_num():
n = 10
assert (fib_num(2*n)==fib_num(n+1)**2 - fib_num(n-1)**2)
|
# cohort.migrations
# Cohort app database migrations.
#
# Author: Benjamin Bengfort <benjamin@bengfort.com>
# Created: Thu Dec 26 15:06:39 2019 -0600
#
# Copyright (C) 2019 Georgetown University
# For license information, see LICENSE.txt
#
# ID: __init__.py [] benjamin@bengfort.com $
"""
Cohort app database migrations.
"""
##########################################################################
## Imports
##########################################################################
|
# Given a non-empty array of integers, every element appears twice except for one. Find that single one.
# Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
# Input: [2,2,1]
# Output: 1
# Input: [4,1,2,1,2]
# Output: 4
# Input: [1,1,4,4,6,6,7]
# Output: 7 Space: O(n) O(n/2) => O(n)
class Solution:
def findSingularElement(self, integers):
uniqueness_set = set()
for i in range(len(integers)):
if integers[i] in uniqueness_set:
uniqueness_set.remove(integers[i])
else:
uniqueness_set.add(integers[i])
return uniqueness_set.pop()
def findSingularElement2(self, integers):
singular_element = 0
for i in range(len(integers)):
singular_element = singular_element ^ integers[i]
return singular_element
# 2∗(a+b+c)−(a+a+b+b+c)=c (for the math solution)
#class Solution(object):
# def singleNumber(self, nums):
# """
# :type nums: List[int]
# :rtype: int
# """
# return 2 * sum(set(nums)) - sum(nums)
soln = Solution()
print(soln.findSingularElement([2,2,1]))
print(soln.findSingularElement([4,1,2,1,2]))
print(soln.findSingularElement2([2,2,1]))
print(soln.findSingularElement2([4,1,2,1,2]))
print(soln.findSingularElement2([1,1,4,4,6,6,7])) |
people = ['Jonas', 'Julio', 'Mike', 'Mez']
ages = [25, 30, 31, 39]
for person, age in zip(people, ages):
print(person, age)
|
def main() -> None:
n = int(input())
s = [list(map(lambda x: int(x) - 1, input())) for _ in range(n)]
time = [[-1] * 10 for _ in range(n)]
for i in range(n):
for j in range(10):
time[i][s[i][j]] = j
mn = 1 << 60
for d in range(10):
count = [0] * 10
mx = 0
for i in range(n):
t = time[i][d]
count[t] += 1
t += 10 * (count[t] - 1)
mx = max(mx, t)
mn = min(mn, mx)
print(mn)
if __name__ == "__main__":
main()
|
#!/usr/bin/env python
"""
Created by howie.hu at 2021-04-08.
Description:字符级CNN分类模型实现
论文地址:https://arxiv.org/pdf/1509.01626.pdf
Changelog: all notable changes to this file will be documented
"""
|
# encoding: utf-8
print("I will now count my chickens:")
print("Hens", 25 + 30 / 6)
print("Roosters", 100 - 25 * 3 % 4)
print("Now I will count the eggs:")
print(3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6)
print("Is it true that 3 + 2 < 5 - 7?")
print(3 + 2 < 5 - 7)
print("What is 3 + 2?", 3 + 2)
print("What is 5 - 7?", 5 - 7)
print("Oh, that's why it's False.")
print("How about some more.")
print("Is it greater?", 5 > -2)
print("Is it greater or equal?", 5 >= -2)
print("Is it less or equal?", 5 <= -2)
# I will now count my chickens:
# Hens 30.0
# Roosters 97
# Now I will count the eggs:
# 6.75
# Is it true that 3 + 2 < 5 - 7?
# False
# What is 3 + 2? 5
# What is 5 - 7? -2
# Oh, that's why it's False.
# How about some more.
# Is it greater? True
# Is it greater or equal? True
# Is it less or equal? False
|
'''
1) Create a Clusterfile
2) Add metadata to created Clusterfile
3) Create a bunch of Datasets
- Add them to created Clusterfile
'''
|
class EurecomDataset(Dataset):
def __init__(self,domain,variation,training_dir=None,transform=None):
self.transform = transform
self.training_dir = training_dir
# For each variant keep a list
self.thermal_illu = []
self.thermal_exp = []
self.thermal_pose = []
self.thermal_occ = []
self.visible_illu = []
self.visible_exp = []
self.visible_pose = []
self.visible_occ = []
# Get all subject directories
subjects = [subject for subject in os.listdir(training_dir)]
self.num_classes = len(subjects)
for sub in subjects:
sub_p = os.path.join(training_dir,sub)
visible_pth = os.path.join(sub_p,"VIS")
thermal_pth = os.path.join(sub_p,"TH")
self.visible_illu.extend([ (os.path.join(visible_pth,x),int(x[4:7])-1) for x in os.listdir(visible_pth) if "_L" in x ])
self.visible_exp.extend([ (os.path.join(visible_pth,x) ,int(x[4:7])-1) for x in os.listdir(visible_pth) if "_N" in x or "_E" in x ])
self.visible_pose.extend([ (os.path.join(visible_pth,x),int(x[4:7])-1) for x in os.listdir(visible_pth) if "_P" in x ])
self.visible_occ.extend([ (os.path.join(visible_pth,x) ,int(x[4:7])-1) for x in os.listdir(visible_pth) if "_O" in x ])
self.thermal_illu.extend([ (os.path.join(thermal_pth,x),int(x[3:6])-1) for x in os.listdir(thermal_pth) if "_L" in x ])
self.thermal_exp.extend([ (os.path.join(thermal_pth,x) ,int(x[3:6])-1) for x in os.listdir(thermal_pth) if "_N" in x or "_E" in x ])
self.thermal_pose.extend([ (os.path.join(thermal_pth,x),int(x[3:6])-1) for x in os.listdir(thermal_pth) if "_P" in x ])
self.thermal_occ.extend([ (os.path.join(thermal_pth,x) ,int(x[3:6])-1) for x in os.listdir(thermal_pth) if "_O" in x ])
# Set dataset to intented domain
if domain == "thermal":
if variation == "illu":
self.dataset = self.thermal_illu
elif variation == "exp":
self.dataset = self.thermal_exp
elif variation == "pose":
self.dataset = self.thermal_pose
else:
self.dataset = self.thermal_occ
else:
if variation == "illu":
self.dataset = self.visible_illu
elif variation == "exp":
self.dataset = self.visible_exp
elif variation == "pose":
self.dataset = self.visible_pose
else:
self.dataset = self.visible_occ
self.count = len(self.dataset)
def __getitem__(self, index):
image,label = self.dataset[index]
img_a = Image.open(image).convert('RGB')
if self.transform is not None:
img_a = self.transform(img_a)
# return image and label
return img_a,label
def __len__(self):
return self.count |
#!/usr/bin/env python3
# ex31: Making Decisions
print("You enter a dark room with two doors. Do you go through door #1 or door #2?")
door = input("> ")
if door == "1":
print("There's a giant bear here eating a cheese cake. What do you do?")
print("1. Take the cake.")
print("2. Scream at the bear.")
bear = input("> ")
if bear == "1":
print("The bear eats your face off. Good job!")
elif bear == "2":
print("The bear eats your legs off. Good job!")
else:
print("Well, doing %s is probably better. Bear runs away." % bear)
elif door == "2":
print("You stare into the endless abyss at Cthulhu's retina.")
print("1. Blueberries.")
print("2. Yellow jacket clothespins.")
print("3. Understanding revolvers yelling melodies.")
insanity = input("> ")
if insanity == "1" or insanity == "2":
print("Your body survives powered by a mind of jello. Good job!")
else:
print("The insanity rots you ")
elif door == "3":
print("You are asked to select one pill from two and take it. One is red, and the other is blue.")
print("1. take the red one.")
print("2. take the blue one.")
pill = input("> ")
if pill == "1":
print("You wake up and found this is just a ridiculous dream. Good job!")
elif pill == "2":
print("It's poisonous and you died.")
else:
print("The man got mad and killed you.")
else:
print("You wake up and found this is just a ridiculous dream.")
print("However you feel a great pity haven't entered any room and found out what it will happens!") |
"""This problem was asked by Facebook.
Suppose you are given two lists of n points, one list p1, p2, ..., pn on the
line y = 0 and the other list q1, q2, ..., qn on the line y = 1.
Imagine a set of n line segments connecting each point pi to qi.
Write an algorithm to determine how many pairs of the line segments intersect.
""" |
class item:
def __init__(self, name, cap, dur, flav, text, cal):
self.name = name
self.cap = cap
self.dur = dur
self.fla = flav
self.tex = text
self.cal = cal
return
it = [item('Frosting', 4, -2, 0, 0, 5),
item('Candy', 0, 5, -1, 0, 8),
item('Butterscotch', -1, 0, 5, 0, 6),
item('Sugar', 0, 0, -2, 2, 1)]
cap = dur = flav = text = total = 0
for i in range(100, -1, -1):
for j in range(0, 101 - i):
for k in range(0, 101-i-j):
for l in range(100-i-j-k, 101-i-j-k):
cap = it[0].cap * i + it[1].cap * j + it[2].cap * k + it[3].cap * l
dur = it[0].dur * i + it[1].dur * j + it[2].dur * k + it[3].dur * l
fla = it[0].fla * i + it[1].fla * j + it[2].fla * k + it[3].fla * l
tex = it[0].tex * i + it[1].tex * j + it[2].tex * k + it[3].tex * l
cal = it[0].cal * i + it[1].cal * j + it[2].cal * k + it[3].cal * l
if cap < 0 or dur < 0 or fla < 0 or tex < 0:
cap = dur = fla = tex = 0
temp = cap * dur * fla * tex
if temp > total and cal == 500:
print(i, j, k, l, '=', i+j+k+l)
print(cap, dur, fla, tex)
total = temp
print(total)
# print(i, j, k, l, sep = ' | ')
# input()
print(total)
|
t = int(input())
for _ in range(t):
n = int(input())
s = input()
s = list(s)
index = 0
while index < n - 1:
s[index], s[index + 1] = s[index + 1], s[index]
index += 2
for i in range(n):
s[i] = chr(ord('z') - (ord(s[i]) - ord('a')))
print("".join(s))
|
# -*- coding: utf-8 -*-
"""
sub_analysis_proxy.py generated by WhatsOpt.
"""
|
"""
James Haywood, Unit 4.01
This unit was pretty good, especially the logic lab. That was fun, if a
bit OCD-inducing with the wire layout (you know what I mean.) Assignment 3
seemed almost too easy though, so I'd make that tougher.
"""
|
# -*- coding: utf-8 -*-
# Author: Jiajun Ren <jiajunren0522@gmail.com>
electron = "e"
electrons = "es"
phonon = "ph"
class EphTable(tuple):
@classmethod
def all_phonon(cls, site_num):
return cls([phonon] * site_num)
@classmethod
def from_mol_list(cls, mol_list, scheme):
eph_list = []
if scheme < 4:
for mol in mol_list:
eph_list.append(electron)
for ph in mol.dmrg_phs:
eph_list.extend([phonon] * ph.nqboson)
elif scheme == 4:
for imol, mol in enumerate(mol_list):
if imol == len(mol_list) // 2:
eph_list.append(electrons)
eph_list.extend([phonon] * mol.n_dmrg_phs)
for ph in mol.dmrg_phs:
assert ph.is_simple
else:
raise ValueError(f"scheme:{scheme} has no ephtable")
return cls(eph_list)
def is_electron(self, idx):
# an electron site
return self[idx] == electron
def is_electrons(self, idx):
# a site with all electron DOFs, used in scheme 4
return self[idx] == electrons
def is_phonon(self, idx):
# a phonon site
return self[idx] == phonon
def __str__(self):
return "[" + ", ".join(self) + "]"
|
sentence = 'This awesome spaghetti is awesome'
better_sentence = sentence.replace('awesome', 'fabulous')
print(better_sentence)
date = '12/01/2035'
print(date.replace('/', '-'))
|
# if you have a list = [], or a string = '', it will evaluate as a False value
our_list = []
our_string = ''
if our_list:
print('This list has something in it.')
if our_string:
print('This string is not empty.')
teams = ['knicks', 'kings', 'heat', 'pacers', 'celtics', 'pelicans']
for team in teams:
if team.startswith('k'):
print('The ' + team.title() + ' could win the NBA championship this year.')
if team == 'knicks':
print('I know they will win!')
else:
print('They probably will not win though...')
elif team.startswith('p'):
print('The ' + team.title() + ' will probably make the playoffs.')
if team == 'pacers':
print('They need Reggie Miller back though.')
else:
print('The ' + team.title() + ' stands no chance this year.') |
class Node:
def __init__(self, key, value):
self.key = key
self.val = value
self.next = self.pre = None
self.pre = None
class LRUCache:
def remove(self, node):
node.pre.next, node.next.pre = node.next, node.pre
self.dic.pop(node.key)
def add(self, node):
node.pre = self.tail.pre
node.next = self.tail
self.tail.pre.next = self.tail.pre = node
self.dic[node.key] = node
def __init__(self, capacity):
self.dic = {}
self.n = capacity
self.head = self.tail = Node(0, 0)
self.head.next = self.tail
self.tail.pre = self.head
def get(self, key):
if key in self.dic:
node = self.dic[key]
self.remove(node)
self.add(node)
return node.val
return -1
def put(self, key, value):
if key in self.dic:
self.remove(self.dic[key])
node = Node(key, value)
self.add(node)
if len(self.dic) > self.n:
self.remove(self.head.next) |
TOKENIZE_TEXT_INPUT_SCHEMA = {
"type": "object",
"properties": {
"text": {"type": "string"},
},
"required": ["text"],
"additionalProperties": False
}
TOKENIZE_TEXT_OUTPUT_SCHEMA = {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
|
class Solution:
def convertToTitle(self, n: int) -> str:
return self.solution1(n)
def solution1(self, n: int) -> str:
ans = []
while n > 0:
n, r = divmod(n-1, 26)
ans.append(chr(r + ord('A')))
return ''.join(ans[::-1])
# time limit exceeded
def solution2(self, n: int) -> str:
if n == 0: return ''
p = (n-1) // 26
ans = []
for _ in range(p):
if not ans:
ans.append('A')
else:
i = len(ans)-1
while ans[i] == 'Z':
ans[i] = 'A'
i -= 1
if i < 0:
ans.append('A')
else:
ans[i] = chr(ord(ans[i]) + 1)
if n > p * 26:
ans.append(chr(ord('A') + n - p * 26 - 1))
return ''.join(ans)
if __name__ == '__main__':
for n in range(52, 80):
ret = Solution().convertToTitle(n)
print(n, ret)
|
# You are given a set of positive numbers and a target sum ‘S’.
# Each number should be assigned either a ‘+’ or ‘-’ sign.
# We need to find the total ways to assign symbols to make the sum of the numbers equal to the target ‘S’.
# Example:
# Input: {1, 1, 2, 3}, S=1
# Output: 3
# Explanation: The given set has '3' ways to make a sum of '1': {+1-1-2+3} & {-1+1-2+3} & {+1+1+2-3}
# top-down dp
# O(N * S) space: O(N * S)
def target_sum(nums, s):
total_sum = sum(nums)
if total_sum < s or (s + total_sum) % 2 != 0:
return 0
target_sum = (s + total_sum) // 2
dp = [[-1 for _ in range(target_sum + 1)] for _ in range(len(nums))]
return target_sum_recursive(dp, nums, target_sum, 0)
def target_sum_recursive(dp, nums, s, current_index):
if s == 0:
return 1
if current_index >= len(nums):
return 0
if dp[current_index][s] == -1:
sum1 = 0
if s >= nums[current_index]:
sum1 = target_sum_recursive(dp, nums, s - nums[current_index], current_index + 1)
sum2 = target_sum_recursive(dp, nums, s, current_index + 1)
dp[current_index][s] = sum1 + sum2
return dp[current_index][s]
print(target_sum([1, 1, 2, 3], 1))
print(target_sum([1, 2, 7, 1], 9))
# bottom-up
# O(N * S) space: O(N * S)
def target_sum_2(nums, s):
total_sum = sum(nums)
if total_sum < s or (s + total_sum) % 2 != 0:
return 0
target_sum = (s + total_sum) // 2
dp = [[0 for _ in range(target_sum + 1)] for _ in range(len(nums))]
for i in range(len(nums)):
dp[i][0] = 1
for j in range(1, target_sum + 1):
dp[0][j] = 1 if nums[0] == j else 0
for i in range(1, len(nums)):
for j in range(1, target_sum + 1):
dp[i][j] = dp[i - 1][j]
if j >= nums[i]:
dp[i][j] += dp[i - 1][j - nums[i]]
return dp[len(nums) - 1][target_sum]
print(target_sum_2([1, 1, 2, 3], 1))
print(target_sum_2([1, 2, 7, 1], 9))
# bottom-up optimize space complexity
# O(N * S) space: O(S)
def target_sum_3(nums, s):
total_sum = sum(nums)
if total_sum < s or (s + total_sum) % 2 != 0:
return 0
target_sum = (s + total_sum) // 2
dp = [0 for _ in range(target_sum + 1)]
dp[0] = 1
for j in range(1, target_sum + 1):
dp[j] = 1 if nums[0] == j else 0
for i in range(1, len(nums)):
for j in range(target_sum, -1, -1):
if j >= nums[i]:
dp[j] += dp[j - nums[i]]
return dp[target_sum]
print(target_sum_3([1, 1, 2, 3], 1))
print(target_sum_3([1, 2, 7, 1], 9))
|
"""Prediction of Optimal Price based on Listing Properties"""
def get_optimal_pricing(**listing):
''' Just return 100 for now - will call out to a proper predictive model later'''
print(listing)
price = listing.get('price', 0)
price = price+10 if price else 100
return price |
def print_separator():
#print('--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------')
print('')
def print_components_menu(generate, download, convert, clean, windows):
print_separator()
print_separator()
print(' * Active components')
print(' -> Generator: ', generate)
print(' -> Downloader: ', download)
print(' -> Converter: ', convert)
print(' -> Cleaner: ', clean)
print(' ')
print(' * Windows OS: ', windows)
def print_generator_menu(n_of_points):
print_separator()
print_separator()
print(' * Generator settings')
print(' -> Number of generated points: ', n_of_points)
print(' ')
print(' * Generator execution')
def print_downloader_menu(downloads_folder_path, download_path, sen2_images_base_path, sen1_images_base_path, start_date, end_date, date_names, n_images, s2_selectors, s1_selectors, n_of_scene, patch_size):
print_separator()
print_separator()
print(' * Downloader settings')
print(' -> Download folder path: ', downloads_folder_path)
print(' -> Download path: ', download_path)
print(' -> Sentinel-2 folder path: ', sen2_images_base_path)
print(' -> Sentinel-1 folder path: ', sen1_images_base_path)
print(' -> Start date: ', start_date)
print(' -> End date: ', end_date)
print(' -> Date names: ', date_names)
print(' -> Number of images per date: ', n_images)
print(' -> Sentinel-2 bands: ', s2_selectors)
print(' -> Sentinel-1 bands: ', s1_selectors)
print(' -> Number of scene: ', n_of_scene)
print(' -> Patch size (km): ', patch_size)
print(' ')
print(' * Downloader execution')
def print_converter_menu(s2_path, s1_path, s2_selectors, s1_selectors, patch_size_in_pixel):
print_separator()
print_separator()
print(' * Converter settings')
print(' -> Sentinel-2 folder path: ', s2_path)
print(' -> Sentinel-1 folder path: ', s1_path)
print(' -> Sentinel-2 bands: ', s2_selectors)
print(' -> Sentinel-1 bands: ', s1_selectors)
print(' -> Patch size (pixel): ', patch_size_in_pixel,patch_size_in_pixel)
print(' ')
print(' * Converter execution')
def print_cleaner_menu(s2_path, s1_path):
print_separator()
print_separator()
print(' * Cleaner settings')
print(' -> Sentinel-2 folder path: ', s2_path)
print(' -> Sentinel-1 folder path: ', s1_path)
print(' ')
print(' * Cleaner execution') |
def validate_morph(morph):
if not "key" in morph:
print(" - key is missing")
return False
if not "type" in morph:
print(" - type is missing")
return False
if not "origin" in morph:
print(" - origin is missing")
return False
morph_type = morph["type"]
# TODO - pull these requirements into per-language data
# TODO - make countability a property, not a tag
if morph_type == "noun":
if morph["origin"] == "latin":
if not "link" in morph or not "declension" in morph:
print(" - noun must have 'link' and 'declension'")
return False
elif not ("tags" in morph and ("count" in morph["tags"] or "mass" in morph["tags"] or "singleton" in morph["tags"])):
print(" - noun must have tag 'count', 'mass', or 'singleton'")
return False
elif morph["declension"] not in [0, 1, 2, 3, 4, 5]:
print(" - invalid declension '" + str(morph["declension"]) + "'")
return False
elif morph["origin"] == "greek":
if not "link" in morph:
print(" - noun must have 'link'")
return False
elif not ("tags" in morph and ("count" in morph["tags"] or "mass" in morph["tags"] or "singleton" in morph["tags"])):
print(" - noun must have tag 'count', 'mass', or 'singleton'")
return False
elif morph_type == "adj":
if morph["origin"] == "latin":
if not "link" in morph or not "declension" in morph:
print(" - adjective must have 'link' and 'declension'")
return False
elif morph["declension"] not in [0, 12, 3]:
print(" - invalid declension '" + str(morph["declension"]) + "'")
return False
elif morph["origin"] == "greek":
if not "link" in morph:
print(" - adjective must have 'link'")
return False
elif morph_type == "verb":
if morph["origin"] == "latin":
if not ("link-present" in morph and "link-perfect" in morph and "final" in morph and "conjugation" in morph):
print(" - verbs require 'link-present', 'link-perfect', 'final', and 'conjugation'")
return False
if morph["conjugation"] not in [0, 1, 2, 3, 4]:
print(" - invalid conjugation '" + str(morph["conjugation"]) + "'")
return False
elif morph_type == "derive":
if not ("from" in morph and "to" in morph):
print(" - derive morphs must have 'from' and 'to'")
return False
return True
|
num = int(raw_input("Enter a number: "))
fact=1;
for i in range(num ,1,-1):
fact *= i
print(fact)
|
CMD_GROUP_CONFIG = {
"auth": "Command group for generating authorization tokens",
"sys": "Command group for Mix API system scope",
"ns": "Command group for Mix namespace",
'project': "Command group for Mix API project scope",
'channel': "Command group for Mix API (project) channel scope",
'job': "Command group for Mix API job scope",
"asr": "Command group for Mix API ASR scope",
'nlu': "Command group for Mix API NLU scope",
'intent': 'Command group for Mix API (NLU) intent scope',
"concept": "Command group for Mix NLU concept scope",
"sample": "Command group for Mix NLU sample scope",
'dlg': "Command group for Mix API Dialog scope",
# "model": "Command group for Mix API actions on deployed models",
'config': 'Command group for Mix API actions on applications and deployment',
# "example": "Command group example for development and contribution",
"run": "Command group for running MixCli in various ways",
'grpc': 'Command group for gRPC tooling API usage',
"util": "Command group for various utility uses"
}
"""
Config for MixCli command groups
"""
|
n=int(input());r=0;k=2
n*=2
while n>=k:
r+=k*(n//k-n//(2*k))
k*=2
print(r)
|
# -*- coding: utf-8 -*-
"""Pystapler: application server framework for Python.
This framework is inspired by Kohsuke Kawaguchi's Stapler framework for Java
(stapler.kohsuke.org), but obviously adapted to Python. It implements WSGI
support using the popular Werkzeug utility library.
See the README.md file for more information.
Example Usage:
from pystapler import pystapler
class Root(pystapler.StaplerRoot):
assets = pystapler.static_root('assets')
env = pystapler.JinjaEnvironment('templates')
def __init__(self):
self.guestbook = []
@pystapler.traversable('_')
def underscore(self):
return MutationActions(self)
@pystapler.default
@pystapler.template(env, 'home.html')
def home(self):
return {'guestbook': self.guestbook}
class MutationActions(object):
def __init__(self, root):
self.__root = root
@pystapler.post
def add_guest(self, guest_name):
root.guestbook.append(guest_name)
return pystapler.redirect_to(root)
if __name__ == '__main__':
pystapler.main(Root)
You can launch this application using:
uwsgi --socket 0.0.0.0:8080 --wsgi-file example.py --callable Root
Or, for development:
python example.py --port 8080 --debug
Copyright 2017 Daniel Pryden <daniel@pryden.net>; All rights reserved.
See the LICENSE file for licensing details.
"""
|
JINJA_FUNCTIONS = []
def add_jinja_global(arg=None):
def decorator(func):
JINJA_FUNCTIONS.append(func)
return func
if callable(arg):
return decorator(arg) # return 'wrapper'
else:
return decorator # ... or 'decorator'
|
'''
Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below.
American keyboard
Example 1:
Input: ["Hello", "Alaska", "Dad", "Peace"]
Output: ["Alaska", "Dad"]
'''
class Solution(object):
def findWords(self, words):
"""
:type words: List[str]
:rtype: List[str]
"""
str_in_row = {}
str_in_row[0] = 'qwertyuiop'
str_in_row[1] = 'asdfghjkl'
str_in_row[2] = 'zxcvbnm'
char_to_row = {}
for row in str_in_row:
for c in str_in_row[row]:
char_to_row[c] = row
char_to_row[c.upper()] = row
res = []
for word in words:
box = set()
for c in word:
box.add(char_to_row[c])
if len(box) < 2:
res.append(word)
return res
|
ALL_EVENTS = """
query (
$studyId: String,
$fileId: String,
$versionId: String,
$createdAt_Gt: DateTime,
$createdAt_Lt: DateTime,
$username: String,
$eventType: String,
) {
allEvents(
studyKfId: $studyId,
fileKfId: $fileId,
versionKfId: $versionId,
createdAfter: $createdAt_Gt,
createdBefore: $createdAt_Lt,
username: $username,
eventType: $eventType,
) {
edges {
node {
id
eventType
description
createdAt
user {
username
picture
}
file {
kfId
name
}
version {
kfId
}
study {
kfId
}
}
}
}
}
"""
ALL_USERS = """
{
allUsers {
edges {
node {
id
username
slackNotify
slackMemberId
studySubscriptions {
edges {
node {
kfId
name
}
}
}
}
}
}
}
"""
|
"""
Given an array S of n integers, are there elements a, b, c in S
such that a + b + c = 0?
Find all unique triplets in the array which gives the sum of zero.
Note: The solution set must not contain duplicate triplets.
For example, given array S = [-1, 0, 1, 2, -1, -4],
A solution set is:
[
[-1, 0, 1],
[-1, -1, 2]
]
"""
def three_sum(nums:"List[int]")->"List[int]":
res = []
nums.sort()
for i in range(len(nums)-2):
if i > 0 and nums[i] == nums[i-1]:
continue
l, r = i+1, len(nums)-1
while l < r:
s = nums[i] + nums[l] + nums[r]
if s > 0:
r -= 1
elif s < 0:
l += 1
else:
# found three sum
res.append((nums[i], nums[l], nums[r]))
# remove duplicates
while l < r and nums[l] == nums[l+1]:
l+=1
while l < r and nums[r] == nums[r-1]:
r -= 1
l += 1
r -= 1
return res
if __name__ == "__main__":
x = [-1,0,1,2,-1,-4]
print(three_sum(x))
|
class Solution:
def minPathSum(self, grid):
'''
the first row each column equal the sum of itself with the previous colmuns.
The same applied for the first column, the first column of each row equals the sume of itself with the previous ones in.
'''
rows, cols = len(grid), len(grid[0])
for row in range(rows):
for col in range(cols):
if row == 0 and col == 0:
continue
elif row == 0:
grid[0][col] += grid[0][col - 1]
elif col == 0:
grid[row][0] += grid[row - 1][0]
else:
grid[row][col] += min(grid[row - 1][col], grid[row][col - 1])
return grid[-1][-1]
|
# Modified from: https://github.com/junit-team/junit5-samples/tree/master/junit5-jupiter-starter-bazel
load("@rules_jvm_external//:defs.bzl", "DEFAULT_REPOSITORY_NAME")
load("@rules_jvm_external//:specs.bzl", "maven")
load("//tools:maven_utils.bzl", "format_maven_jar_dep_name", "format_maven_jar_name")
"""External dependencies & java_junit5_test rule"""
JUNIT_JUPITER_GROUP_ID = "org.junit.jupiter"
JUNIT_JUPITER_ARTIFACT_ID_LIST = [
"junit-jupiter-api",
"junit-jupiter-engine",
"junit-jupiter-params",
]
JUNIT_PLATFORM_GROUP_ID = "org.junit.platform"
JUNIT_PLATFORM_ARTIFACT_ID_LIST = [
"junit-platform-commons",
"junit-platform-console",
"junit-platform-engine",
"junit-platform-launcher",
"junit-platform-suite-api",
]
JUNIT_EXTRA_DEPENDENCIES = [
("org.apiguardian", "apiguardian-api", "1.0.0"),
("org.opentest4j", "opentest4j", "1.1.1"),
]
def junit_jupiter_java_artifacts(version = "5.5.1"):
"""Dependencies for JUnit Jupiter"""
artifacts = []
for artifact_id in JUNIT_JUPITER_ARTIFACT_ID_LIST:
artifacts.append(
maven.artifact(
group = JUNIT_JUPITER_GROUP_ID,
artifact = artifact_id,
version = version,
),
)
for [group_id, artifact_id, version] in JUNIT_EXTRA_DEPENDENCIES:
artifacts.append(
maven.artifact(
group = group_id,
artifact = artifact_id,
version = version,
),
)
return artifacts
def junit_platform_java_artifacts(version = "1.5.1"):
"""Dependencies for JUnit Platform"""
return [
maven.artifact(
group = JUNIT_PLATFORM_GROUP_ID,
artifact = artifact_id,
version = version,
)
for artifact_id in JUNIT_PLATFORM_ARTIFACT_ID_LIST
]
def java_junit5_test(
name,
srcs,
test_package,
repository = DEFAULT_REPOSITORY_NAME,
resources = [],
tags = [],
exclude_tags = [],
deps = [],
runtime_deps = [],
size = None,
**kwargs):
FILTER_KWARGS = [
"main_class",
"use_testrunner",
"args",
]
for arg in FILTER_KWARGS:
if arg in kwargs.keys():
kwargs.pop(arg)
junit_console_args = _get_tag_flags(tags, exclude_tags)
if test_package:
junit_console_args += ["--select-package", test_package]
else:
fail("must specify 'test_package'")
native.java_test(
name = name,
srcs = srcs,
size = size,
resources = resources,
use_testrunner = False,
main_class = "org.junit.platform.console.ConsoleLauncher",
args = junit_console_args,
deps = deps + [
format_maven_jar_dep_name(JUNIT_JUPITER_GROUP_ID, artifact_id, repository = repository)
for artifact_id in JUNIT_JUPITER_ARTIFACT_ID_LIST
] + [
format_maven_jar_dep_name(JUNIT_PLATFORM_GROUP_ID, "junit-platform-suite-api", repository = repository),
] + [
format_maven_jar_dep_name(t[0], t[1], repository = repository)
for t in JUNIT_EXTRA_DEPENDENCIES
],
runtime_deps = runtime_deps + [
format_maven_jar_dep_name(JUNIT_PLATFORM_GROUP_ID, artifact_id, repository = repository)
for artifact_id in JUNIT_PLATFORM_ARTIFACT_ID_LIST
],
**kwargs
)
def _get_tag_flags(tags, exclude_tags):
"""
tags: List
exclude_tags: List
"""
return ["-t %s" % tag for tag in tags] + ["-T %s" % tag for tag in exclude_tags]
|
class Morton(object):
def __init__(self, dimensions=2, bits=32):
assert dimensions > 0, 'dimensions should be greater than zero'
assert bits > 0, 'bits should be greater than zero'
def flp2(x):
'''Greatest power of 2 less than or equal to x, branch-free.'''
x |= x >> 1
x |= x >> 2
x |= x >> 4
x |= x >> 8
x |= x >> 16
x |= x >> 32
x -= x >> 1
return x
shift = flp2(dimensions * (bits - 1))
masks = []
lshifts = []
max_value = (1 << (shift*bits))-1
while shift > 0:
mask = 0
shifted = 0
for bit in range(bits):
distance = (dimensions * bit) - bit
shifted |= shift & distance
mask |= 1 << bit << (((shift - 1) ^ max_value) & distance)
if shifted != 0:
masks.append(mask)
lshifts.append(shift)
shift >>= 1
self.dimensions = dimensions
self.bits = bits
self.lshifts = [0] + lshifts
self.rshifts = lshifts + [0]
self.masks = [(1 << bits) - 1] + masks
self._size = self.bits * self.dimensions
def __repr__(self):
return '<Morton dimensions={}, bits={}>'.format(
self.dimensions, self.bits)
def split(self, value):
# type: (int) -> int
masks = self.masks
lshifts = self.lshifts
for o in range(len(masks)):
value = (value | (value << lshifts[o])) & masks[o]
return value
def compact(self, code):
# type: (int) -> int
masks = self.masks
rshifts = self.rshifts
for o in range(len(masks)-1, -1, -1):
code = (code | (code >> rshifts[o])) & masks[o]
return code
def shift_sign(self, value):
# type: (int) -> int
assert not(value >= (1<<(self.bits-1)) or value <= -(1<<(self.bits-1))), (value, self.bits)
if value < 0:
value = -value
value |= 1 << (self.bits - 1)
return value
def unshift_sign(self, value):
# type: (int) -> int
sign = value & (1 << (self.bits - 1))
value &= (1 << (self.bits - 1)) - 1
if sign != 0:
value = -value
return value
def pack(self, *args):
# type: (List[int]) -> int
assert len(args) <= self.dimensions
assert all([(v < (1 << self.bits)) and (v >= 0) for v in args])
code = 0
for i in range(self.dimensions):
code |= self.split(args[i]) << i
return code
def unpack(self, code):
# type: (int) -> List[int]
values = []
for i in range(self.dimensions):
values.append(self.compact(code >> i))
return values
def spack(self, *args):
# type: (List[int]) -> int
code = self.pack(*map(self.shift_sign, args))
# convert from unsigned to signed
return code if code < ((1 << self._size - 1) - 1) else code - (1 << self._size)
def sunpack(self, code):
# type: (int) -> List[int]
values = self.unpack(code)
return list(map(self.unshift_sign, values))
def __eq__(self, other):
return (
self.dimensions == other.dimensions and
self.bits == other.bits
)
|
config = {
'http': {
'400': '400 Bad Request',
'401': '401 Unauthorized',
'500': '500 Internal Server Error',
'503': '503 Service Unavailable',
},
}
|
loss_window = vis.line(
Y=torch.zeros((1),device=device),
X=torch.zeros((1),device=device),
opts=dict(xlabel='epoch',ylabel='Loss',title='training loss',legend=['Loss']))
vis.line(X=torch.ones((1,1),device=device)*epoch,Y=torch.Tensor([epoch_loss],device=device).unsqueeze(0),win=loss_window,update='append')
|
### PRIMITIVE
class fixed2:
def __init__(self, xu = 0.0, yv = 0.0):
self.two = [xu, yv]
def __copy__(self):
return fixed2(*self.two[:])
def __str__(self):
return str(self.two)
@property
def x(self):
return self.two[0]
@x.setter
def x(self, value):
self.two[0] = value
@property
def u(self):
return self.two[0]
@u.setter
def u(self, value):
self.two[0] = value
@property
def y(self):
return self.two[1]
@y.setter
def y(self, value):
self.two[1] = value
@property
def v(self):
return self.two[1]
@v.setter
def v(self, value):
self.two[1] = value
@property
def xy(self):
return self.two[:]
@xy.setter
def xy(self, value):
self.two[:] = value[:]
@property
def uv(self):
return self.two[:]
@uv.setter
def uv(self, value):
self.two[:] = value[:]
class fixed4:
def __init__(self, xr = 0.0, yg = 0.0, zb = 0.0, wa = 0.0):
self.four = [xr, yg, zb, wa]
def __copy__(self):
return fixed4(*self.four[:])
def __str__(self):
return str(self.four)
@property
def x(self):
return self.four[0]
@x.setter
def x(self, value):
self.four[0] = value
@property
def r(self):
return self.four[0]
@r.setter
def r(self, value):
self.four[0] = value
@property
def y(self):
return self.four[1]
@y.setter
def y(self, value):
self.four[1] = value
@property
def g(self):
return self.four[1]
@g.setter
def g(self, value):
self.four[1] = value
@property
def z(self):
return self.four[2]
@z.setter
def z(self, value):
self.four[2] = value
@property
def b(self):
return self.four[2]
@b.setter
def b(self, value):
self.four[2] = value
@property
def w(self):
return self.four[3]
@w.setter
def w(self, value):
self.four[3] = value
@property
def a(self):
return self.four[3]
@a.setter
def a(self, value):
self.four[3] = value
@property
def rgb(self):
return self.four[:3]
@rgb.setter
def rgb(self, value):
self.four[:3] = value[:3]
@property
def xyz(self):
return self.four[:3]
@xyz.setter
def xyz(self, value):
self.four[:3] = value[:3]
@property
def rgba(self):
return self.four[:]
@rgba.setter
def rgba(self, value):
self.four[:] = value[:]
@property
def xyzw(self):
return self.four[:]
@xyzw.setter
def xyzw(self, value):
self.four[:] = value[:]
class shaderdata:
def copy(self):
newobj = self.__class__()
for obj in dir(self):
try:
oldprop = getattr(self, obj)
newprop = oldprop.__class__()
if (hasattr(oldprop, "__copy__")):
newprop = oldprop.__copy__()
setattr(newobj, obj, newprop)
except Exception as error:
#print(error) #Suppress non-writeable props error
pass
return newobj |
def test_get_work_serie(work_object_serie):
details = work_object_serie.get_details()
assert isinstance(details, dict)
assert len(details) == 19
def test_rating_work_serie(work_object_serie):
main_rating = work_object_serie.get_main_rating()
assert isinstance(main_rating, str)
assert main_rating == "7.8"
def test_rating_details_work_serie(work_object_serie):
rating_details = work_object_serie.get_rating_details()
assert isinstance(rating_details, dict)
assert len(rating_details) == 10
def test_title_work_serie(work_object_serie):
title = work_object_serie.get_title()
assert title == "The Handmaid's Tale : La Servante écarlate"
def test_year_work_serie(work_object_serie):
year = work_object_serie.get_year()
assert year == "2017"
def test_cover_url_work_serie(work_object_serie):
cover_url = work_object_serie.get_cover_url()
assert isinstance(cover_url, str)
assert (
cover_url
== "https://media.senscritique.com/media/000016972804/160/The_Handmaid_s_Tale_La_Servante_ecarlate.jpg"
)
def test_complementary_infos_work_serie(work_object_serie):
complementary_infos = work_object_serie.get_complementary_infos()
assert isinstance(complementary_infos, dict)
def test_review_count_work_serie(work_object_serie):
review_count = work_object_serie.get_review_count()
assert isinstance(review_count, str)
def test_vote_count_work_serie(work_object_serie):
vote_count = work_object_serie.get_vote_count()
assert isinstance(vote_count, str)
def test_favorite_count_work_serie(work_object_serie):
favorite_count = work_object_serie.get_favorite_count()
assert isinstance(favorite_count, str)
def test_wishlist_count_work_serie(work_object_serie):
wishlist_count = work_object_serie.get_wishlist_count()
assert isinstance(wishlist_count, str)
def test_in_progress_count_work_serie(work_object_serie):
in_progress_count = work_object_serie.get_in_progress_count()
assert isinstance(in_progress_count, str)
|
def common_function():
print('This is coming from the common function')
return 'Hello Common'
|
def acos(): pass
def acosh(): pass
def asin(): pass
def asinh(): pass
def atan(): pass
def atanh(): pass
def cos(): pass
def cosh(): pass
def exp(): pass
def isinf(): pass
def isnan(): pass
def log(): pass
def log10(): pass
def phase(): pass
def polar(): pass
def rect(): pass
def sin(): pass
def sinh(): pass
def sqrt(): pass
def tan(): pass
def tanh(): pass
e = 2.718281828459045
pi = 3.141592653589793
|
def sumOfTwo(a, b, v):
# result = {True for x in a for y in b if x + y == v}
# print(type(result))
# print(result)
# return True if True in result else False
for i in a:
for j in b:
if i + j == v:
return True
return False
a = [0, 1, 2, 3]
b = [10, 20, 39, 40]
v = 42
print(sumOfTwo(a, b, v)) |
class PrefixUnaryExpressionSyntax(object):
def __init__(self, kind, operator_token, operand):
self.kind = kind
self.operator_token = operator_token
self.operand = operand
def __str__(self):
return f"{self.operator_token}{self.operand}"
|
'''
Escreva um programa que leia um valor inteiro N. Este N é a quantidade de linhas de saída que serão apresentadas na execução do programa.
Entrada
O arquivo de entrada contém um número inteiro positivo N.
Saída
Imprima a saída conforme o exemplo fornecido.
'''
N = int(input())
cont = 1
for i in range(N):
print(cont, cont+1, cont+2, 'PUM', sep = ' ')
cont += 4 |
#
# PySNMP MIB module CISCO-PAE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-PAE-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:09:18 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, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint")
CnnEouPostureTokenString, CnnEouPostureToken = mibBuilder.importSymbols("CISCO-NAC-TC-MIB", "CnnEouPostureTokenString", "CnnEouPostureToken")
CpgPolicyNameOrEmpty, = mibBuilder.importSymbols("CISCO-POLICY-GROUP-MIB", "CpgPolicyNameOrEmpty")
ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt")
CiscoURLString, = mibBuilder.importSymbols("CISCO-TC", "CiscoURLString")
VlanIndex, = mibBuilder.importSymbols("CISCO-VTP-MIB", "VlanIndex")
dot1xAuthConfigEntry, dot1xPaePortNumber, dot1xPaePortEntry, PaeControlledPortStatus, dot1xAuthPaeState = mibBuilder.importSymbols("IEEE8021-PAE-MIB", "dot1xAuthConfigEntry", "dot1xPaePortNumber", "dot1xPaePortEntry", "PaeControlledPortStatus", "dot1xAuthPaeState")
InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex")
InetAddressType, InetAddress = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressType", "InetAddress")
SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString")
ObjectGroup, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup")
IpAddress, Unsigned32, iso, Integer32, Counter64, NotificationType, Bits, TimeTicks, MibIdentifier, ModuleIdentity, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "Unsigned32", "iso", "Integer32", "Counter64", "NotificationType", "Bits", "TimeTicks", "MibIdentifier", "ModuleIdentity", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "ObjectIdentity")
RowStatus, DisplayString, TextualConvention, TruthValue, MacAddress = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "DisplayString", "TextualConvention", "TruthValue", "MacAddress")
ciscoPaeMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 220))
ciscoPaeMIB.setRevisions(('2009-12-10 00:00', '2008-07-07 00:00', '2008-04-09 00:00', '2007-04-25 00:00', '2007-04-16 00:00', '2007-01-27 00:00', '2005-09-22 00:00', '2004-04-23 00:00', '2004-04-01 00:00', '2003-04-08 00:00', '2002-10-16 00:00', '2001-05-24 10:16',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ciscoPaeMIB.setRevisionsDescriptions(('Added cpaeSuppPortProfileGroup, and cpaeSuppHostInfoGroup.', 'Added TEXTUAL-CONVENTION CpaeAuthState. Added enumerated value other(4) to cpaePortMode. Added cpaeHostSessionIdGroup, cpaeGuestVlanNotifEnableGroup, cpaeGuestVlanNotifGroup, cpaeAuthFailVlanNotifEnableGrp, cpaeAuthFailVlanNotifGroup, cpaeHostAuthInfoGroup, cpaePortCapabilitiesConfigGroup, cpaeDot1xSuppToGuestVlanGroup. Deprecated cpaePortAuthFailVlanGroup, replaced by cpaePortAuthFailVlanConfigGroup and cpaePortAuthFailUserInfoGroup. Deprecated cpaeCompliance8, replaced by cpaeCompliance9.', "Added cpaeMabAuditInfoGroup, cpaeHostUrlRedirectGroup, cpaeMabPortIpDevTrackConfGroup, cpaePortIpDevTrackConfGroup, cpaeWebAuthIpDevTrackingGroup, cpaeWebAuthUnAuthTimeoutGroup, cpaeGlobalAuthFailVlanGroup, cpaeGlobalSecViolationGroup, cpaeCriticalEapolConfigGroup. Deprecated cpaeMacAuthBypassGroup and replace it by cpaeMacAuthBypassPortEnableGroup, and cpaeMacAuthBypassGroup4; Deprecated cpaeAuthConfigGroup and replace it by cpaeAuthIabConfigGroup, cpaeAuthConfigGroup3 and cpaeAuthConfigGroup4. Modified cpaeMacAuthBypassPortAuthState to add 'ipAwaiting' and 'policyConfig' enum values.", 'Added cpaeMacAuthBypassGroup3, and cpaeHostPostureTokenGroup.', 'Add cpaeHostInfoGroup3.', "Added 'aaaFail' state to cpaeMacAuthBypassPortAuthState and cpaeWebAuthHostState. Added cpaePortAuthFailVlanGroup2, cpaeWebAuthAaaFailGroup, cpaeMacAuthBypassGroup2, cpaePortEapolTestGroup, cpaeHostInfoGroup2, cpaeAuthConfigGroup2, cpaeCriticalRecoveryDelayGroup, cpaeMacAuthBypassCriticalGroup, and cpaeWebAuthCriticalGroup. Obsoleted cpaeHostInfoPostureToken object.", 'Added cpaeGuestVlanGroup3, cpaePortAuthFailVlanGroup, cpaePortOperVlanGroup, cpaeNoGuestVlanNotifEnableGrp, cpaeNoAuthFailVlanNotifEnableGrp, cpaeNoGuestVlanNotifGroup, cpaeNoAuthFailVlanNotifGroup, cpaeMacAuthBypassGroup, cpaeWebAuthGroup, cpaeAuthConfigGroup and cpaeHostInfoGroup. Deprecated cpaeInGuestVlan, cpaeGuestVlanGroup2.', 'Modified the DESCRIPTION clauses of cpaeGuestVlanNumber and cpaeGuestVlanId.', 'Added cpaeUserGroupGroup and cpaeRadiusConfigGroup.', 'Added cpaeGuestVlanGroup2 and cpaeShutdownTimeoutGroup. Deprecated cpaeGuestVlanGroup.', 'Added cpaePortEntryGroup and cpaeGuestVlanGroup. Deprecated cpaeMultipleHostGroup.', 'Initial version of this MIB module.',))
if mibBuilder.loadTexts: ciscoPaeMIB.setLastUpdated('200912100000Z')
if mibBuilder.loadTexts: ciscoPaeMIB.setOrganization('Cisco System, Inc.')
if mibBuilder.loadTexts: ciscoPaeMIB.setContactInfo('Cisco Systems Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-ibns@cisco.com, cs-lan-switch-snmp@cisco.com')
if mibBuilder.loadTexts: ciscoPaeMIB.setDescription('Cisco Port Access Entity (PAE) module for managing IEEE Std 802.1x. This MIB provides Port Access Entity information that are either excluded by IEEE8021-PAE-MIB or specific to Cisco products.')
cpaeMIBNotification = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 220, 0))
cpaeMIBObject = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 220, 1))
cpaeMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 220, 2))
class ReAuthPeriodSource(TextualConvention, Integer32):
description = 'Source of the reAuthPeriod constant, used by the 802.1x Reauthentication Timer state machine. local : local configured reauthentication period specified by the object dot1xAuthReAuthPeriod will be used. server: the reauthentication period will be received from the Authentication server. auto : source of reauthentication period will be decided by the system.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("local", 1), ("server", 2), ("auto", 3))
class CpaeAuthState(TextualConvention, Integer32):
description = "The Authenticator PAE state machine value. other :None of the following states. initialize :The PAE state machine is being initialized. disconnected :An explicit logoff request is received from the Supplicant, or the number of permissible reauthentication attempts has been exceeded. connecting :Attempting to establish a communication with a Supplicant. authenticating:A Supplicant is being authenticated. authenticated :The Authenticator has successfully authenticated the Supplicant. aborting :The authentication process is prematurely aborted due to receipt of a reauthentication request, or an EAPOL-Start frame, or an EAPOL-Logoff frame, or an authTimeout. held :The state machine ignores and discards all EAPOL packets, so as to discourage brute force attacks. This state is entered from the 'authenticating' state following an authentication failure. At the expiration of the quietWhile timer, the state machine transitions to the 'connecting' state. forceAuth :The port is set to Authorized, and a canned EAP Success packet is sent to the Supplicant. forceUnauth :The port is set to Unauthorized, and a canned EAP Failure packet is sent to the Supplicant. If EAP-Start messages are received from the Supplicant, the state is re-entered and further EAP Failure messages are sent. guestVlan :The port has been moved to a configured Guest VLAN. authFailVlan :The port has been moved to a configured Authentication Failed VLAN. criticalAuth :The port has been authorized by Critical Authentication because RADIUS server is not reachable, or does not response. ipAwaiting :The port is waiting for an IP address from DHCP server. policyConfig :This state is entered from 'ipAwaiting' state if an IP address is received and the corresponding policies are being installed. authFinished :The port is set to Authorized by MAC Authentication Bypass feature. restart :The PAE state machine has been restarted. authFallback :Fallback mechanism is applied to the authentication process. authCResult :Authentication completed and the validity of the authorization features is checked. authZSuccess :Authorization policies based on the authentication result are applied. If the policies are applied successfully then the port is authorized otherwise unauthorized."
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20))
namedValues = NamedValues(("other", 1), ("initialize", 2), ("disconnected", 3), ("connecting", 4), ("authenticating", 5), ("authenticated", 6), ("aborting", 7), ("held", 8), ("forceAuth", 9), ("forceUnauth", 10), ("guestVlan", 11), ("authFailVlan", 12), ("criticalAuth", 13), ("ipAwaiting", 14), ("policyConfig", 15), ("authFinished", 16), ("restart", 17), ("authFallback", 18), ("authCResult", 19), ("authZSuccess", 20))
cpaePortTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 1), )
if mibBuilder.loadTexts: cpaePortTable.setReference('802.1X-2001 9.6.1, 802.1X-2004 9.6.1')
if mibBuilder.loadTexts: cpaePortTable.setStatus('current')
if mibBuilder.loadTexts: cpaePortTable.setDescription('A table of system level information for each port supported by the Port Access Entity. An entry appears in this table for each PAE port of this system. This table contains additional objects for the dot1xPaePortTable.')
cpaePortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 1, 1), )
dot1xPaePortEntry.registerAugmentions(("CISCO-PAE-MIB", "cpaePortEntry"))
cpaePortEntry.setIndexNames(*dot1xPaePortEntry.getIndexNames())
if mibBuilder.loadTexts: cpaePortEntry.setStatus('current')
if mibBuilder.loadTexts: cpaePortEntry.setDescription('An entry containing additional management information applicable to a particular PAE port.')
cpaeMultipleHost = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 1, 1, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeMultipleHost.setStatus('deprecated')
if mibBuilder.loadTexts: cpaeMultipleHost.setDescription('Specifies whether the port allows multiple-host connection or not.')
cpaePortMode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("singleHost", 1), ("multiHost", 2), ("multiAuth", 3), ("other", 4)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaePortMode.setStatus('current')
if mibBuilder.loadTexts: cpaePortMode.setDescription('Specifies the current mode of dot1x operation on the port. singleHost(1): port allows one host to connect and authenticate. multiHost(2) : port allows multiple hosts to connect. Once a host is authenticated, all remaining hosts are also authorized. multiAuth(3) : port allows multiple hosts to connect and each host is authenticated. other(4) : none of the above. This is a read-only value which can not be used in set operation. If the port security feature is enabled on the interface, the configuration of the port security (such as the number of the hosts allowed, the security violation action, etc) will apply to the interface.')
cpaeGuestVlanNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 1, 1, 3), VlanIndex()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeGuestVlanNumber.setStatus('current')
if mibBuilder.loadTexts: cpaeGuestVlanNumber.setDescription("Specifies the Guest Vlan of the interface. An interface with cpaePortMode value of 'singleHost' will be moved to its Guest Vlan if the supplicant on the interface is not capable of IEEE-802.1x authentication. A value of zero for this object indicates no Guest Vlan configured for the interface.")
cpaeInGuestVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 1, 1, 4), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeInGuestVlan.setStatus('deprecated')
if mibBuilder.loadTexts: cpaeInGuestVlan.setDescription('Indicates whether the interface is in its Guest Vlan or not. The object is deprecated in favor of newly added object cpaePortOperVlanType.')
cpaeShutdownTimeoutEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 1, 1, 5), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeShutdownTimeoutEnabled.setStatus('current')
if mibBuilder.loadTexts: cpaeShutdownTimeoutEnabled.setDescription('Specifies whether shutdown timeout feature is enabled on the interface.')
cpaePortAuthFailVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 1, 1, 6), VlanIndex()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaePortAuthFailVlan.setStatus('current')
if mibBuilder.loadTexts: cpaePortAuthFailVlan.setDescription('Specifies the Auth-Fail (Authentication Fail) Vlan of the port. A port is moved to Auth-Fail Vlan if the supplicant which support IEEE-802.1x authentication is unsuccessfully authenticated. A value of zero for this object indicates no Auth-Fail Vlan configured for the port.')
cpaePortOperVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 1, 1, 7), VlanIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaePortOperVlan.setStatus('current')
if mibBuilder.loadTexts: cpaePortOperVlan.setDescription('The VlanIndex of the Vlan which is assigned to this port via IEEE-802.1x and related methods of authentication supported by the system. A value of zero for this object indicates that no Vlan is assigned to this port via IEEE-802.1x authentication.')
cpaePortOperVlanType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("other", 1), ("none", 2), ("guest", 3), ("authFail", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaePortOperVlanType.setStatus('current')
if mibBuilder.loadTexts: cpaePortOperVlanType.setDescription("The type of the Vlan which is assigned to this port via IEEE-802.1x and related methods of authentication supported by the system. A value of 'other' for this object indicates type of Vlan assigned to this port; via IEEE-802.1x authentication; is other than the ones specified by listed enumerations for this object. A value of 'none' for this object indicates that there is no Vlan assigned to this port via IEEE-802.1x authentication. For such a case, corresponding value of cpaePortOperVlan object will be zero. A value of 'guest' for this object indicates that Vlan assigned to this port; via IEEE-802.1x authentication; is of type Guest Vlan and specified by the object cpaeGuestVlanNumber for this entry. A value of 'authFail' for this object indicates that Vlan assigned to this port; via IEEE-802.1x authentication; is of type Auth-Fail Vlan and specified by the object cpaePortAuthFailVlan for this entry.")
cpaeAuthFailVlanMaxAttempts = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 1, 1, 9), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeAuthFailVlanMaxAttempts.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthFailVlanMaxAttempts.setDescription('Specifies the maximum number of authentication attempts should be made before the port is moved into the Auth-Fail Vlan.')
cpaePortCapabilitiesEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 1, 1, 10), Bits().clone(namedValues=NamedValues(("authenticator", 0), ("supplicant", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaePortCapabilitiesEnabled.setReference('802.1X-2001 9.6.1, PAE Capabilities, 802.1X-2004 9.6.1, PAE Capabilities')
if mibBuilder.loadTexts: cpaePortCapabilitiesEnabled.setStatus('current')
if mibBuilder.loadTexts: cpaePortCapabilitiesEnabled.setDescription('Specifies the type of PAE functionality of the port which are enabled. authenticator: PAE Authenticator functions are enabled. supplicant : PAE Supplicant functions are enabled. Only those supported PAE functions which are listed in the corresponding instance of dot1xPaePortCapabilities can be enabled.')
cpaeGuestVlanId = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 2), VlanIndex()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeGuestVlanId.setStatus('deprecated')
if mibBuilder.loadTexts: cpaeGuestVlanId.setDescription("Specifies the Guest Vlan of the system. An interface with cpaePortMode value of 'singleHost' will be moved to Guest Vlan if the supplicant on the interface is not IEEE-802.1x capable. A value of zero indicates no Guest Vlan configured in the system. If the platform supports per-port guest Vlan ID configuration, this object is not instantiated.")
cpaeShutdownTimeout = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeShutdownTimeout.setStatus('current')
if mibBuilder.loadTexts: cpaeShutdownTimeout.setDescription("Specifies the shutdown timeout interval to enable the interface automatically in case it is shutdown due to security violation. If the value of this object is 0, the interfaces shutdown due to the security violation will not be enabled automatically. The value of this object is applicable to the interface only when cpaeShutdownTimeoutEnabled is 'true', and port security feature is disabled on the interface.")
cpaeRadiusAccountingEnabled = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 4), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeRadiusAccountingEnabled.setStatus('current')
if mibBuilder.loadTexts: cpaeRadiusAccountingEnabled.setDescription('Specifies if RADIUS accounting is enabled for 802.1x on this devices.')
cpaeUserGroupTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 5), )
if mibBuilder.loadTexts: cpaeUserGroupTable.setStatus('current')
if mibBuilder.loadTexts: cpaeUserGroupTable.setDescription('A table of Group Manager and authenticated users information on the device.')
cpaeUserGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 5, 1), ).setIndexNames((0, "CISCO-PAE-MIB", "cpaeUserGroupName"), (0, "CISCO-PAE-MIB", "cpaeUserGroupUserIndex"))
if mibBuilder.loadTexts: cpaeUserGroupEntry.setStatus('current')
if mibBuilder.loadTexts: cpaeUserGroupEntry.setDescription('Information about an 802.1x authenticated user on the devices.')
cpaeUserGroupName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 5, 1, 1), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1, 100)))
if mibBuilder.loadTexts: cpaeUserGroupName.setStatus('current')
if mibBuilder.loadTexts: cpaeUserGroupName.setDescription('Specifies the name of the group that the user belongs to.')
cpaeUserGroupUserIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 5, 1, 2), Unsigned32())
if mibBuilder.loadTexts: cpaeUserGroupUserIndex.setStatus('current')
if mibBuilder.loadTexts: cpaeUserGroupUserIndex.setDescription('The index of an user within a group.')
cpaeUserGroupUserName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 5, 1, 3), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeUserGroupUserName.setStatus('current')
if mibBuilder.loadTexts: cpaeUserGroupUserName.setDescription('Specifies the name of the user authenticated on a port of the device.')
cpaeUserGroupUserAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 5, 1, 4), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeUserGroupUserAddrType.setStatus('current')
if mibBuilder.loadTexts: cpaeUserGroupUserAddrType.setDescription('Specifies the type of address used to determine the address of the user.')
cpaeUserGroupUserAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 5, 1, 5), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeUserGroupUserAddr.setStatus('current')
if mibBuilder.loadTexts: cpaeUserGroupUserAddr.setDescription('Specifies the address of the host that the user logging from.')
cpaeUserGroupUserInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 5, 1, 6), InterfaceIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeUserGroupUserInterface.setStatus('current')
if mibBuilder.loadTexts: cpaeUserGroupUserInterface.setDescription('Specifies the interface index that the user is authenticated on.')
cpaeUserGroupUserVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 5, 1, 7), VlanIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeUserGroupUserVlan.setStatus('current')
if mibBuilder.loadTexts: cpaeUserGroupUserVlan.setDescription('Specifies the vlan that the user belongs to.')
cpaeAuthFailUserTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 6), )
if mibBuilder.loadTexts: cpaeAuthFailUserTable.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthFailUserTable.setDescription('A table to list user information for each port on the system supported by the Port Access Entity and assigned to Auth-Fail Vlan.')
cpaeAuthFailUserEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 6, 1), ).setIndexNames((0, "IEEE8021-PAE-MIB", "dot1xPaePortNumber"))
if mibBuilder.loadTexts: cpaeAuthFailUserEntry.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthFailUserEntry.setDescription("An entry appears in this table for each PAE port on the system which is assigned to Vlan of type 'authFail' via IEEE-802.1x authentication.")
cpaeAuthFailUserName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 6, 1, 1), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeAuthFailUserName.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthFailUserName.setDescription('Indicates the name of the user who failed IEEE-802.1x authentication and hence now assigned to Auth-Fail Vlan. The Auth-Fail Vlan to which the user belongs is determined by the value of object cpaePortAuthFailVlan for this port.')
cpaeNotificationControl = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 7))
cpaeNoGuestVlanNotifEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 7, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeNoGuestVlanNotifEnable.setStatus('current')
if mibBuilder.loadTexts: cpaeNoGuestVlanNotifEnable.setDescription("This object specifies whether the system produces the cpaeNoGuestVlanNotif. A 'false' value will prevent cpaeNoGuestVlanNotif from being generated by this system.")
cpaeNoAuthFailVlanNotifEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 7, 2), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeNoAuthFailVlanNotifEnable.setStatus('current')
if mibBuilder.loadTexts: cpaeNoAuthFailVlanNotifEnable.setDescription("This object specifies whether the system produces the cpaeNoAuthFailVlanNotif. A 'false' value will prevent cpaeNoAuthFailVlanNotif from being generated by this system.")
cpaeGuestVlanNotifEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 7, 3), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeGuestVlanNotifEnable.setStatus('current')
if mibBuilder.loadTexts: cpaeGuestVlanNotifEnable.setDescription("This object specifies whether the system produces the cpaeGuestVlanNotif. A 'false' value will prevent cpaeGuestVlanNotif from being generated by this system.")
cpaeAuthFailVlanNotifEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 7, 4), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeAuthFailVlanNotifEnable.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthFailVlanNotifEnable.setDescription("This object specifies whether the system produces the cpaeAuthFailVlanNotif. A 'false' value will prevent cpaeAuthFailVlanNotif from being generated by this system.")
cpaeMacAuthBypass = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8))
cpaeMacAuthBypassReAuthTimeout = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 1), Unsigned32()).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeMacAuthBypassReAuthTimeout.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassReAuthTimeout.setDescription('Specifies the waiting time before reauthentication is triggered on all MAC Auth-bypass authenticated ports.')
cpaeMacAuthBypassReAuthEnabled = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 2), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeMacAuthBypassReAuthEnabled.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassReAuthEnabled.setDescription("The reauthentication control for all MAC Auth-bypass ports. Setting this object to 'true' causes every MAC Auth-Bypass authenticated port to reauthenticate the device connecting to the port, after every period of time specified by the object cpaeMacAuthBypassReAuthTimeout. Setting this object to 'false' will disable the MAC Auth-Bypass global reauthentication.")
cpaeMacAuthBypassViolation = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("restrict", 1), ("shutdown", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeMacAuthBypassViolation.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassViolation.setDescription('Specifies the action upon reception of a security violation event. restrict(1): Packets from MAC address of the device causing security violation will be dropped. shutdown(2): The port that causes security violation will be shutdown.')
cpaeMacAuthBypassShutdownTimeout = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 4), Unsigned32()).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeMacAuthBypassShutdownTimeout.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassShutdownTimeout.setDescription('Specifies time before a port is auto-enabled after being shutdown due to a MAC Auth-bypass security violation.')
cpaeMacAuthBypassAuthFailTimeout = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 5), Unsigned32()).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeMacAuthBypassAuthFailTimeout.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassAuthFailTimeout.setDescription('Specifies the time a MAC Auth-bypass unauthenticated port waits before trying the authentication process again.')
cpaeMacAuthBypassPortTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 6), )
if mibBuilder.loadTexts: cpaeMacAuthBypassPortTable.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassPortTable.setDescription('A table of MAC Authentication Bypass (MAC Auth-Bypass) configuration and information for ports in the device.')
cpaeMacAuthBypassPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 6, 1), ).setIndexNames((0, "IEEE8021-PAE-MIB", "dot1xPaePortNumber"))
if mibBuilder.loadTexts: cpaeMacAuthBypassPortEntry.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassPortEntry.setDescription('An entry containing management information for MAC Auth-Bypass feature on a port.')
cpaeMacAuthBypassPortEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 6, 1, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeMacAuthBypassPortEnabled.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassPortEnabled.setDescription('Specifies whether MAC Auth-Bypass is enabled on the port.')
cpaeMacAuthBypassPortInitialize = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 6, 1, 2), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeMacAuthBypassPortInitialize.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassPortInitialize.setDescription("The initialization control for this port. Setting this object to 'true' causes the MAC Auth-bypass state machine to be initialized on the port. Setting this object to 'false' has no effect. This object always returns 'false' when it is read.")
cpaeMacAuthBypassPortReAuth = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 6, 1, 3), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeMacAuthBypassPortReAuth.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassPortReAuth.setDescription("The reauthentication control for this port. Setting this object to 'true' causes the MAC address of the device connecting to the port to be reauthenticated. Setting this object to 'false' has no effect. This object always returns 'false' when it is read.")
cpaeMacAuthBypassPortMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 6, 1, 4), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeMacAuthBypassPortMacAddress.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassPortMacAddress.setDescription('Indicates the MAC address of the device connecting to the port.')
cpaeMacAuthBypassPortAuthState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 6, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("other", 1), ("waiting", 2), ("authenticating", 3), ("authenticated", 4), ("fail", 5), ("finished", 6), ("aaaFail", 7), ("ipAwaiting", 8), ("policyConfig", 9)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeMacAuthBypassPortAuthState.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassPortAuthState.setDescription("Indicates the current state of the MAC Auth-Bypass state machine. other(1) : An unknown state. waiting(2) : Waiting to receive the MAC address that needs to be authenticated. authenticating(3): In authentication process. authenticated(4) : MAC address of the device connecting to the port is authenticated. fail(5) : MAC Auth-bypass authentication failed. Port waits for a period of time before moving to the 'waiting' state, if there is no other authentication features available in the system. finished(6) : MAC Auth-bypass authentication failed. Port is authenticated by another authentication feature. aaaFail(7) : AAA server is not reachable after sending the authentication request or after the expiration of re-authentication timeout, with IAB (Inaccessible Authentication Bypass) enabled on the port. ipAwaiting(8) : Corresponding QoS/Security ACLs and other Vendor Specific Attributes are being configured on the port, after which IP address will be obtained via DHCP snooping or ARP inspection. policyConfig(9) : Policy Groups or downloaded ACLs are being configured on the port.")
cpaeMacAuthBypassPortTermAction = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 6, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("other", 1), ("init", 2), ("reauth", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeMacAuthBypassPortTermAction.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassPortTermAction.setDescription('Indicates the termination action received from RADIUS server that will be applied on the port when the current session timeout expired. other : none of the following. init : current session will be terminated and a new authentication process will be initiated. reauth: reauthentication will be applied without terminating the current session.')
cpaeMacAuthBypassSessionTimeLeft = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 6, 1, 7), Unsigned32()).setUnits('seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeMacAuthBypassSessionTimeLeft.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassSessionTimeLeft.setDescription('Indicates the leftover time of the current MAC Auth-Bypass session on this port.')
cpaeMacAuthBypassPortAuthMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 6, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("radius", 1), ("eap", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeMacAuthBypassPortAuthMethod.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassPortAuthMethod.setDescription('Specifies the authentication method used by MAC Authentication Bypass. radius(1) : communication with authentication server is performed via RADIUS messages. eap(2) : communication with authentication server is performed via EAP messages.')
cpaeMacAuthBypassPortSessionId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 6, 1, 9), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeMacAuthBypassPortSessionId.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassPortSessionId.setDescription("Indicates the session ID of the MAC Auth-Bypass Audit session on the port. A zero length string will be returned for this object if value of the corresponding instance of cpaeMacAuthBypassPortEnabled is 'false'.")
cpaeMacAuthBypassPortUrlRedirect = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 6, 1, 10), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeMacAuthBypassPortUrlRedirect.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassPortUrlRedirect.setDescription("Indicates the URL of an Audit server, provided by AAA server, to which a MAC auth-Bypass host will be redirected to when an Audit session starts off. A zero-length string indicates that the audit process will be performed via port scan instead, or value of the corresponding instance of cpaeMacAuthBypassPortEnabled is 'false'.")
cpaeMacAuthBypassPortPostureTok = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 6, 1, 11), CnnEouPostureTokenString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeMacAuthBypassPortPostureTok.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassPortPostureTok.setDescription("Indicates the Posture Token assigned to the MAC Auth-Bypass host connected to this port. A zero length string will be returned for this object if value of the corresponding instance of cpaeMacAuthBypassPortEnabled is 'false'.")
cpaeMacAuthBypassAcctEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 7), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeMacAuthBypassAcctEnable.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassAcctEnable.setDescription('Specifies if accounting is enabled for Mac Authentication Bypass feature on this device.')
cpaeMabCriticalRecoveryDelay = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 8), Unsigned32()).setUnits('milli-seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeMabCriticalRecoveryDelay.setStatus('current')
if mibBuilder.loadTexts: cpaeMabCriticalRecoveryDelay.setDescription('This object specifies the critical recovery delay time for Mac Authentication Bypass in the system. A value of zero indicates that critical recovery delay for MAC Authentication Bypass is disabled.')
cpaeMabPortIpDevTrackConfTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 9), )
if mibBuilder.loadTexts: cpaeMabPortIpDevTrackConfTable.setStatus('current')
if mibBuilder.loadTexts: cpaeMabPortIpDevTrackConfTable.setDescription('A table of IP Device Tracking configuration for MAC Auth-Bypass interfaces in the system.')
cpaeMabPortIpDevTrackConfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 9, 1), ).setIndexNames((0, "IEEE8021-PAE-MIB", "dot1xPaePortNumber"))
if mibBuilder.loadTexts: cpaeMabPortIpDevTrackConfEntry.setStatus('current')
if mibBuilder.loadTexts: cpaeMabPortIpDevTrackConfEntry.setDescription('An entry of MAC Auth-Bypass configuration for IP Device Tracking on an MAC Auth-Bypass capable interface.')
cpaeMabPortIpDevTrackEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 8, 9, 1, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeMabPortIpDevTrackEnabled.setStatus('current')
if mibBuilder.loadTexts: cpaeMabPortIpDevTrackEnabled.setDescription('Specifies whether IP Device Tracking is enabled or not on this port for the corresponding MAC Auth-bypass authenticated host.')
cpaeWebAuth = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9))
cpaeWebAuthEnabled = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeWebAuthEnabled.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthEnabled.setDescription('Specifies whether Web Proxy Authentication is enabled in the system.')
cpaeWebAuthSessionPeriod = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 2), Unsigned32()).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeWebAuthSessionPeriod.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthSessionPeriod.setDescription('Specifies the Web Proxy Authentication session period for the system. Session period is the time after which an Web Proxy Authenticated session is terminated.')
cpaeWebAuthLoginPage = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 3), CiscoURLString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeWebAuthLoginPage.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthLoginPage.setDescription('Specifies the customized login page for Web Proxy Authentication, in the format of an URL. A customized login page is required to support the same input fields as the default login page for users to input credentials. If this object contains a zero length string, the default login page will be used.')
cpaeWebAuthLoginFailedPage = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 4), CiscoURLString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeWebAuthLoginFailedPage.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthLoginFailedPage.setDescription('Specifies the customized login-failed page for Web Proxy Authentication, in the format of an URL. Login-failed page is sent back to the client upon an authentication failure. A login-failed page requires to have all the input fields of the login page, in addition to the authentication failure information. If this object contains a zero length string, the default login-failed page will be used.')
cpaeWebAuthQuietPeriod = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 5), Unsigned32()).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeWebAuthQuietPeriod.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthQuietPeriod.setDescription("Specifies the time a Web Proxy Authentication state machine will be held in 'blackListed' state after maximum authentication attempts.")
cpaeWebAuthMaxRetries = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 6), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeWebAuthMaxRetries.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthMaxRetries.setDescription('Specifies the maximum number of unsuccessful login attempts a user is allowed to make.')
cpaeWebAuthPortTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 7), )
if mibBuilder.loadTexts: cpaeWebAuthPortTable.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthPortTable.setDescription('A table of Web Proxy Authentication configuration and information for the feature capable ports in the device.')
cpaeWebAuthPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 7, 1), ).setIndexNames((0, "IEEE8021-PAE-MIB", "dot1xPaePortNumber"))
if mibBuilder.loadTexts: cpaeWebAuthPortEntry.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthPortEntry.setDescription('An entry containing management information for Web Proxy Authentication feature on a port.')
cpaeWebAuthPortEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 7, 1, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeWebAuthPortEnabled.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthPortEnabled.setDescription('Specifies whether Web Proxy Authentication is enabled on the port.')
cpaeWebAuthPortInitialize = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 7, 1, 2), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeWebAuthPortInitialize.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthPortInitialize.setDescription("The initialization control for this port. Setting this object to 'true' causes Web Proxy Authentication state machine to be initialized for all the hosts connecting to the port. Setting this object to 'false' has no effect. This object always returns 'false' when it is read.")
cpaeWebAuthPortAaaFailPolicy = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 7, 1, 3), CpgPolicyNameOrEmpty()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeWebAuthPortAaaFailPolicy.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthPortAaaFailPolicy.setDescription("Specifies the policy name to be applied on the port when the corresponding cpaeWebAuthHostState is 'aaaFail'. The specified policy name must either be an existing entry in cpgPolicyTable defined in CISCO-POLICY-GROUP-MIB, or an empty string which indicates that there will be no policy name applied on the port when the corresponding cpaeWebAuthHostState is 'aaaFail'.")
cpaeWebAuthPortIpDevTrackEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 7, 1, 4), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeWebAuthPortIpDevTrackEnabled.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthPortIpDevTrackEnabled.setDescription('Specifies whether IP Device Tracking is enabled or not on this port for the corresponding Web Proxy authenticated host.')
cpaeWebAuthHostTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 8), )
if mibBuilder.loadTexts: cpaeWebAuthHostTable.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthHostTable.setDescription('A table of Web Proxy Authentication information for hosts currently managed by the feature. An entry is added to the table when a host is detected and Web Proxy Authentication state machine is initiated for the host.')
cpaeWebAuthHostEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 8, 1), ).setIndexNames((0, "IEEE8021-PAE-MIB", "dot1xPaePortNumber"), (0, "CISCO-PAE-MIB", "cpaeWebAuthHostAddrType"), (0, "CISCO-PAE-MIB", "cpaeWebAuthHostAddress"))
if mibBuilder.loadTexts: cpaeWebAuthHostEntry.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthHostEntry.setDescription('An entry containing management information for Web Proxy Authentication feature on a host.')
cpaeWebAuthHostAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 8, 1, 1), InetAddressType())
if mibBuilder.loadTexts: cpaeWebAuthHostAddrType.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthHostAddrType.setDescription('Indicates the Internet address type for the host.')
cpaeWebAuthHostAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 8, 1, 2), InetAddress().subtype(subtypeSpec=ValueSizeConstraint(0, 64)))
if mibBuilder.loadTexts: cpaeWebAuthHostAddress.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthHostAddress.setDescription('Indicates the Internet address for the host. The type of this address is determined by the value of cpaeWebAuthHostAddrType.')
cpaeWebAuthAaaSessionPeriod = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 8, 1, 3), Unsigned32()).setUnits('seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeWebAuthAaaSessionPeriod.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthAaaSessionPeriod.setDescription('Indicates the session period for a Web Proxy Authenticated session on this host, supplied by the AAA server. If value of this object is none zero, it will take precedence over the period specified by cpaeWebAuthPortSessionPeriod.')
cpaeWebAuthHostSessionTimeLeft = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 8, 1, 4), Unsigned32()).setUnits('seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeWebAuthHostSessionTimeLeft.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthHostSessionTimeLeft.setDescription('Indicates the leftover time of the current Web Proxy Authenticated session for this host.')
cpaeWebAuthHostState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 8, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("initialize", 1), ("connecting", 2), ("authenticating", 3), ("authenticated", 4), ("authFailed", 5), ("parseError", 6), ("sessionTimeout", 7), ("blackListed", 8), ("aaaFail", 9)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeWebAuthHostState.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthHostState.setDescription("Indicates the current state of the Web Proxy Authentication state machine. initialize : Initial state of the Web Proxy Authentication state machine. connecting : Login page is sent to the client, waiting for response from the client. authenticating: Credentials are extracted from client's response and authenticating with the AAA server. authenticated : Web Proxy Authentication succeeded. Session timer is started, policies are applied, and success page is sent back to client. authFailed : Web Proxy Authentication failed. Login page is resent with authentication failure information embedded, if retry count has not exceeded the maximum number of retry attempts. Otherwise, move to 'blackListed' state. parseError : Failed to extract user's credentials from the client's response. sessionTimeout: Session timer expired, user's policies are removed, state machine will moves to 'initialize' state after that. blackListed : Web Proxy Authentication retry count has exceeded the maximum number of retry attempts. Only setting the state machine to 'initialize' will take it out of this state. aaaFail : AAA server is not reachable after sending the authentication request, or after host has been in 'blackListed' state for the period of time specified by cpaeWebAuthQuietPeriod, with IAB (Inaccessible Authentication Bypass) enabled on the corresponding port connected to the host.")
cpaeWebAuthHostInitialize = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 8, 1, 6), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeWebAuthHostInitialize.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthHostInitialize.setDescription("The initialization control for this host. Setting this object to 'true' causes Web Proxy Authentication state machine to be initialized for the host. Setting this object to 'false' has no effect. This object always returns 'false' when it is read.")
cpaeWebAuthCriticalRecoveryDelay = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 9), Unsigned32()).setUnits('milli-seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeWebAuthCriticalRecoveryDelay.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthCriticalRecoveryDelay.setDescription('This object specifies the critical recovery delay time for Web Proxy Authentication in the system. A value of zero indicates that critical recovery delay for Web Proxy Authentication is disabled.')
cpaeWebAuthUnAuthStateTimeout = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 9, 10), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setUnits('minutes').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeWebAuthUnAuthStateTimeout.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthUnAuthStateTimeout.setDescription("The authentication timeout period for Web Proxy Authentication. Once a host enters 'initialize' state as indicated by its corresponding cpaeWebAuthHostState, such host will be removed if it can not be authenticated within the timeout period.")
cpaeAuthConfigTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 10), )
if mibBuilder.loadTexts: cpaeAuthConfigTable.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthConfigTable.setDescription('A table containing the configuration objects for the Authenticator PAE associated with each port. An entry appears in this table for each PAE port that may authenticate access to itself. This table contain additional objects for the dot1xAuthConfigTable.')
cpaeAuthConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 10, 1), )
dot1xAuthConfigEntry.registerAugmentions(("CISCO-PAE-MIB", "cpaeAuthConfigEntry"))
cpaeAuthConfigEntry.setIndexNames(*dot1xAuthConfigEntry.getIndexNames())
if mibBuilder.loadTexts: cpaeAuthConfigEntry.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthConfigEntry.setDescription('An entry containing additional management information applicable to a particular Authenticator PAE.')
cpaeAuthReAuthPeriodSrcAdmin = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 10, 1, 1), ReAuthPeriodSource()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeAuthReAuthPeriodSrcAdmin.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthReAuthPeriodSrcAdmin.setDescription('Specifies the source of the reAuthPeriod constant to be used by the Reauthentication Timer state machine.')
cpaeAuthReAuthPeriodSrcOper = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 10, 1, 2), ReAuthPeriodSource()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeAuthReAuthPeriodSrcOper.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthReAuthPeriodSrcOper.setDescription('Indicates the source of the reAuthPeriod constant currently in use by the Reauthentication Timer state machine.')
cpaeAuthReAuthPeriodOper = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 10, 1, 3), Unsigned32()).setUnits('seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeAuthReAuthPeriodOper.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthReAuthPeriodOper.setDescription('Indicates the operational reauthentication period for this port.')
cpaeAuthTimeToNextReAuth = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 10, 1, 4), Unsigned32()).setUnits('seconds').setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeAuthTimeToNextReAuth.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthTimeToNextReAuth.setDescription('Indicates the leftover time of the current session for this port.')
cpaeAuthReAuthAction = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 10, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("terminate", 1), ("reAuth", 2), ("noReAuth", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeAuthReAuthAction.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthReAuthAction.setDescription("Indicates the reauthentication action for this port. terminate: Session will be terminated, with the corresponding Authenticator PAE state machine transits to 'disconnected'. reAuth : The port will be reauthenticated. noReAuth : The port will not be reauthenticated.")
cpaeAuthReAuthMax = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 10, 1, 6), Unsigned32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeAuthReAuthMax.setReference('IEEE Std 802.1X-2004, 8.2.4.1.2, reAuthMax')
if mibBuilder.loadTexts: cpaeAuthReAuthMax.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthReAuthMax.setDescription('This object specifies the number of reauthentication attempts that are permitted before the port becomes unauthorized. The value of this object is used as the reAuthMax constant by the Authenticator PAE state machine.')
cpaeAuthIabEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 10, 1, 7), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeAuthIabEnabled.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthIabEnabled.setDescription("Specifies whether the PAE port is declared as Inaccessible Authentication Bypass (IAB). IAB ports will be granted network access via the administrative configured VLAN if it failed to connect to the Authentication server. The only way to bring an IAB port back to the Backend Authentication state machine is through setting dot1xPaePortInitialize in the corresponding entry in dot1xPaePortTable to 'true'. 802.1x reauthentication will be temporary disabled on an authenticated IAB port if the connection to the Authentication server is broken, and enable again when the connection is resumed.")
cpaeAuthPaeState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 10, 1, 8), CpaeAuthState()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeAuthPaeState.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthPaeState.setDescription('Indicates the current value of the Authenticator PAE state machine on the port.')
cpaeHostInfoTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 11), )
if mibBuilder.loadTexts: cpaeHostInfoTable.setStatus('current')
if mibBuilder.loadTexts: cpaeHostInfoTable.setDescription('A table containing 802.1x authentication information for hosts connecting to PAE ports in the system.')
cpaeHostInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 11, 1), ).setIndexNames((0, "IEEE8021-PAE-MIB", "dot1xPaePortNumber"), (0, "CISCO-PAE-MIB", "cpaeHostInfoHostIndex"))
if mibBuilder.loadTexts: cpaeHostInfoEntry.setStatus('current')
if mibBuilder.loadTexts: cpaeHostInfoEntry.setDescription('An entry appears in the table for each 802.1x capable host connecting to an PAE port, providing its authentication information.')
cpaeHostInfoHostIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 11, 1, 1), Unsigned32())
if mibBuilder.loadTexts: cpaeHostInfoHostIndex.setStatus('current')
if mibBuilder.loadTexts: cpaeHostInfoHostIndex.setDescription('An arbitrary index assigned by the agent to identify the host.')
cpaeHostInfoMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 11, 1, 2), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeHostInfoMacAddress.setStatus('current')
if mibBuilder.loadTexts: cpaeHostInfoMacAddress.setDescription('Indicates the Mac Address of the host.')
cpaeHostInfoPostureToken = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 11, 1, 3), CnnEouPostureToken()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeHostInfoPostureToken.setStatus('obsolete')
if mibBuilder.loadTexts: cpaeHostInfoPostureToken.setDescription('Indicates the posture token assigned to the host. This object has been obsoleted and replaced by cpaeHostPostureTokenStr.')
cpaeHostInfoUserName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 11, 1, 4), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeHostInfoUserName.setStatus('current')
if mibBuilder.loadTexts: cpaeHostInfoUserName.setDescription('Indicates the name of the authenticated user on the host.')
cpaeHostInfoAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 11, 1, 5), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeHostInfoAddrType.setStatus('current')
if mibBuilder.loadTexts: cpaeHostInfoAddrType.setDescription('Indicates the type of Internet address of the host.')
cpaeHostInfoAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 11, 1, 6), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeHostInfoAddr.setStatus('current')
if mibBuilder.loadTexts: cpaeHostInfoAddr.setDescription('Indicates the Internet address of the host. The type of this address is determined by the value of cpaeHostInfoAddrType object.')
cpaeHostPostureTokenStr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 11, 1, 7), CnnEouPostureTokenString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeHostPostureTokenStr.setStatus('current')
if mibBuilder.loadTexts: cpaeHostPostureTokenStr.setDescription('Indicates the posture token assigned to the host.')
cpaeHostUrlRedirection = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 11, 1, 8), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeHostUrlRedirection.setStatus('current')
if mibBuilder.loadTexts: cpaeHostUrlRedirection.setDescription('Indicates the URL-redirection assigned for this host by AAA server.')
cpaeHostAuthPaeState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 11, 1, 9), CpaeAuthState()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeHostAuthPaeState.setReference('802.1X-2001 9.4.1, Authenticator PAE state, 802.1X-2004 9.4.1, Authenticator PAE state')
if mibBuilder.loadTexts: cpaeHostAuthPaeState.setStatus('current')
if mibBuilder.loadTexts: cpaeHostAuthPaeState.setDescription('Indicates the current value of the Authenticator PAE state machine for the host.')
cpaeHostBackendState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 11, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("request", 1), ("response", 2), ("success", 3), ("fail", 4), ("timeout", 5), ("idle", 6), ("initialize", 7), ("ignore", 8)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeHostBackendState.setReference('802.1X-2001 9.4.1, Backend Authentication state, 802.1X-2004 9.4.1, Backend Authentication state.')
if mibBuilder.loadTexts: cpaeHostBackendState.setStatus('current')
if mibBuilder.loadTexts: cpaeHostBackendState.setDescription('Indicates the current state of the Backend Authentication state machine of the host.')
cpaeHostSessionId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 11, 1, 11), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeHostSessionId.setStatus('current')
if mibBuilder.loadTexts: cpaeHostSessionId.setDescription('A unique identifier of the 802.1x session.')
cpaePortEapolTestLimits = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 12), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaePortEapolTestLimits.setStatus('current')
if mibBuilder.loadTexts: cpaePortEapolTestLimits.setDescription('Indicates the maximum number of entries allowed in cpaePortEapolTestTable.')
cpaePortEapolTestTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 13), )
if mibBuilder.loadTexts: cpaePortEapolTestTable.setStatus('current')
if mibBuilder.loadTexts: cpaePortEapolTestTable.setDescription('A table for testing EAPOL (Extensible Authentication Protocol Over LAN) capable information of hosts connecting to PAE ports in the device.')
cpaePortEapolTestEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 13, 1), ).setIndexNames((0, "IEEE8021-PAE-MIB", "dot1xPaePortNumber"))
if mibBuilder.loadTexts: cpaePortEapolTestEntry.setStatus('current')
if mibBuilder.loadTexts: cpaePortEapolTestEntry.setDescription('An entry containing EAPOL capable information for hosts connecting to a PAE port.')
cpaePortEapolTestResult = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 13, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("inProgress", 1), ("notCapable", 2), ("capable", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaePortEapolTestResult.setStatus('current')
if mibBuilder.loadTexts: cpaePortEapolTestResult.setDescription('Indicates the test result of whether there is EAPOL supporting host connecting to the port. inProgress: the test is in progress. notCapable: there is no EAPOL supporting host connecting to the port. capable : there is EAPOL supporting host connecting to the port.')
cpaePortEapolTestStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 13, 1, 2), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cpaePortEapolTestStatus.setStatus('current')
if mibBuilder.loadTexts: cpaePortEapolTestStatus.setDescription("This object is used to manage the creation, and deletion of rows in the table. An entry can be created by setting the instance value of this object to 'createAndGo', and deleted by setting the instance value of this object to 'destroy'.")
cpaeCriticalConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 14))
cpaeCriticalEapolEnabled = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 14, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeCriticalEapolEnabled.setStatus('current')
if mibBuilder.loadTexts: cpaeCriticalEapolEnabled.setDescription('Specifies if the device will send an EAPOL-Success message on successful Critical Authentication for a supplicant.')
cpaeCriticalRecoveryDelay = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 14, 2), Unsigned32()).setUnits('milli-seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeCriticalRecoveryDelay.setStatus('current')
if mibBuilder.loadTexts: cpaeCriticalRecoveryDelay.setDescription('This object specifies the critical recovery delay time for 802.1x in the system. A value of zero indicates that Critical Authentication recovery delay for 802.1x is disabled.')
cpaePortIpDevTrackConfigTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 15), )
if mibBuilder.loadTexts: cpaePortIpDevTrackConfigTable.setStatus('current')
if mibBuilder.loadTexts: cpaePortIpDevTrackConfigTable.setDescription('A table of IP Device Tracking configuration for PAE ports in the system.')
cpaePortIpDevTrackConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 15, 1), ).setIndexNames((0, "IEEE8021-PAE-MIB", "dot1xPaePortNumber"))
if mibBuilder.loadTexts: cpaePortIpDevTrackConfigEntry.setStatus('current')
if mibBuilder.loadTexts: cpaePortIpDevTrackConfigEntry.setDescription('An entry of IP Device Tracking configuration on a PAE port.')
cpaePortIpDevTrackEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 15, 1, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaePortIpDevTrackEnabled.setStatus('current')
if mibBuilder.loadTexts: cpaePortIpDevTrackEnabled.setDescription('Specifies if IP Device Tracking is enabled on this port for the corresponding 802.1x authenticated host.')
cpaeGlobalAuthFailMaxAttempts = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 16), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeGlobalAuthFailMaxAttempts.setStatus('current')
if mibBuilder.loadTexts: cpaeGlobalAuthFailMaxAttempts.setDescription('A global configuration to specify the maximum number of authentication attempts that should be made before a port is moved into its Auth-Fail VLAN.')
cpaeGlobalSecViolationAction = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("restrict", 1), ("shutdown", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeGlobalSecViolationAction.setStatus('current')
if mibBuilder.loadTexts: cpaeGlobalSecViolationAction.setDescription('A global configuration to specify the action that will be applied to a PAE port upon reception of a security violation event. restrict: Packets from MAC address of the device causing security violation will be dropped. shutdown: The port that causes security violation will be shutdown.')
cpaeDot1xSuppToGuestVlanAllowed = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 18), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeDot1xSuppToGuestVlanAllowed.setStatus('current')
if mibBuilder.loadTexts: cpaeDot1xSuppToGuestVlanAllowed.setDescription('Specifies whether ports associated with 802.1x supplicants are allowed to move to Guest Vlan when they stop responding to EAPOL inquiries.')
cpaeSupplicantObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 19))
cpaeSuppPortTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 19, 1), )
if mibBuilder.loadTexts: cpaeSuppPortTable.setStatus('current')
if mibBuilder.loadTexts: cpaeSuppPortTable.setDescription('A list of objects providing information and configuration for the Supplicant PAE associated with each port. This table provides additional objects for the dot1xSuppConfigTable.')
cpaeSuppPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 19, 1, 1), ).setIndexNames((0, "IEEE8021-PAE-MIB", "dot1xPaePortNumber"))
if mibBuilder.loadTexts: cpaeSuppPortEntry.setStatus('current')
if mibBuilder.loadTexts: cpaeSuppPortEntry.setDescription('An entry containing supplicant configuration information for a particular PAE port.')
cpaeSuppPortCredentialProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 19, 1, 1, 1), SnmpAdminString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeSuppPortCredentialProfileName.setStatus('current')
if mibBuilder.loadTexts: cpaeSuppPortCredentialProfileName.setDescription('Specifies the credentials profile of the Supplicant PAE. A zero length string for this object indicates that the Supplicant PAE does not have credential profile.')
cpaeSuppPortEapProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 19, 1, 1, 2), SnmpAdminString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cpaeSuppPortEapProfileName.setStatus('current')
if mibBuilder.loadTexts: cpaeSuppPortEapProfileName.setDescription('Specifies the EAP profile of the Supplicant PAE. A zero length string for this object indicates that the Supplicant PAE does not have EAP profile.')
cpaeSuppHostInfoTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 19, 2), )
if mibBuilder.loadTexts: cpaeSuppHostInfoTable.setStatus('current')
if mibBuilder.loadTexts: cpaeSuppHostInfoTable.setDescription('A list of dot1x supplicants in the system.')
cpaeSuppHostInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 19, 2, 1), ).setIndexNames((0, "IEEE8021-PAE-MIB", "dot1xPaePortNumber"), (0, "CISCO-PAE-MIB", "cpaeSuppHostInfoSuppIndex"))
if mibBuilder.loadTexts: cpaeSuppHostInfoEntry.setStatus('current')
if mibBuilder.loadTexts: cpaeSuppHostInfoEntry.setDescription('An entry containing dot1x supplicant information for a supplicant on a particular PAE port in the system.')
cpaeSuppHostInfoSuppIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 19, 2, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: cpaeSuppHostInfoSuppIndex.setStatus('current')
if mibBuilder.loadTexts: cpaeSuppHostInfoSuppIndex.setDescription('An arbitrary index assigned by the agent to identify the supplicant.')
cpaeSuppHostAuthMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 19, 2, 1, 2), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeSuppHostAuthMacAddress.setStatus('current')
if mibBuilder.loadTexts: cpaeSuppHostAuthMacAddress.setDescription('Indicates the MAC address of the authenticator, which authenticates the supplicant.')
cpaeSuppHostPaeState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 19, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=NamedValues(("disconnected", 1), ("logoff", 2), ("connecting", 3), ("authenticating", 4), ("authenticated", 5), ("acquired", 6), ("held", 7), ("restart", 8), ("sForceAuth", 9), ("sForceUnauth", 10)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeSuppHostPaeState.setReference('802.1X-2004 9.5.1, Supplicant PAE State')
if mibBuilder.loadTexts: cpaeSuppHostPaeState.setStatus('current')
if mibBuilder.loadTexts: cpaeSuppHostPaeState.setDescription('Indicates the current state of the Supplicant PAE State machine.')
cpaeSuppHostBackendState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 19, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("initialize", 1), ("idle", 2), ("request", 3), ("response", 4), ("receive", 5), ("fail", 6), ("success", 7), ("timeout", 8)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeSuppHostBackendState.setReference('802.1X-2004 9.5.1, Backend Supplicant state')
if mibBuilder.loadTexts: cpaeSuppHostBackendState.setStatus('current')
if mibBuilder.loadTexts: cpaeSuppHostBackendState.setDescription('Indicates the current state of the Supplicant Backend state machine.')
cpaeSuppHostStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 220, 1, 19, 2, 1, 5), PaeControlledPortStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cpaeSuppHostStatus.setReference('802.1X-2004 9.5.1, SuppControlledPortStatus')
if mibBuilder.loadTexts: cpaeSuppHostStatus.setStatus('current')
if mibBuilder.loadTexts: cpaeSuppHostStatus.setDescription('Indicates the status of the supplicant.')
cpaeNoGuestVlanNotif = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 220, 0, 1)).setObjects(("IEEE8021-PAE-MIB", "dot1xAuthPaeState"))
if mibBuilder.loadTexts: cpaeNoGuestVlanNotif.setStatus('current')
if mibBuilder.loadTexts: cpaeNoGuestVlanNotif.setDescription("A cpaeNoGuestVlanNotif is sent if a non-802.1x supplicant is detected on a PAE port for which the value of corresponding instance of dot1xAuthAuthControlledPortControl is 'auto' and the value of corresponding instance of cpaeGuestVlanNumber is zero.")
cpaeNoAuthFailVlanNotif = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 220, 0, 2)).setObjects(("IEEE8021-PAE-MIB", "dot1xAuthPaeState"))
if mibBuilder.loadTexts: cpaeNoAuthFailVlanNotif.setStatus('current')
if mibBuilder.loadTexts: cpaeNoAuthFailVlanNotif.setDescription("A cpaeNoAuthFailVlanNotif is sent if a 802.1x supplicant fails to authenticate on a PAE port for which the value of corresponding instance of dot1xAuthAuthControlledPortControl is 'auto' and the value of corresponding instance of cpaePortAuthFailVlan is zero.")
cpaeGuestVlanNotif = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 220, 0, 3)).setObjects(("CISCO-PAE-MIB", "cpaeGuestVlanNumber"), ("IEEE8021-PAE-MIB", "dot1xAuthPaeState"))
if mibBuilder.loadTexts: cpaeGuestVlanNotif.setStatus('current')
if mibBuilder.loadTexts: cpaeGuestVlanNotif.setDescription("A cpaeGuestVlanNotif is sent if value of the instance of cpaeGuestVlanNotifEnable is set to 'true', and a PAE port is being moved to the VLAN specified by value of the corresponding instance of cpaeGuestVlanNumber.")
cpaeAuthFailVlanNotif = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 220, 0, 4)).setObjects(("CISCO-PAE-MIB", "cpaePortAuthFailVlan"), ("IEEE8021-PAE-MIB", "dot1xAuthPaeState"))
if mibBuilder.loadTexts: cpaeAuthFailVlanNotif.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthFailVlanNotif.setDescription("A cpaeAuthFailVlanNotif is sent if value of the instance of cpaeAuthFailVlanNotifEnable is set to 'true', and a PAE port is being moved to the VLAN specified by value of the corresponding instance of cpaePortAuthFailVlan.")
cpaeMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 1))
cpaeMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2))
cpaeCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 1, 1)).setObjects(("CISCO-PAE-MIB", "cpaeMultipleHostGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeCompliance = cpaeCompliance.setStatus('deprecated')
if mibBuilder.loadTexts: cpaeCompliance.setDescription('The compliance statement for devices that implement the CISCO-PAE-MIB.')
cpaeCompliance2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 1, 2)).setObjects(("CISCO-PAE-MIB", "cpaePortEntryGroup"), ("CISCO-PAE-MIB", "cpaeGuestVlanGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeCompliance2 = cpaeCompliance2.setStatus('deprecated')
if mibBuilder.loadTexts: cpaeCompliance2.setDescription('The compliance statement for devices that implement the CISCO-PAE-MIB.')
cpaeCompliance3 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 1, 3)).setObjects(("CISCO-PAE-MIB", "cpaePortEntryGroup"), ("CISCO-PAE-MIB", "cpaeGuestVlanGroup2"), ("CISCO-PAE-MIB", "cpaeShutdownTimeoutGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeCompliance3 = cpaeCompliance3.setStatus('deprecated')
if mibBuilder.loadTexts: cpaeCompliance3.setDescription('The compliance statement for devices that implement the CISCO-PAE-MIB.')
cpaeCompliance4 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 1, 4)).setObjects(("CISCO-PAE-MIB", "cpaePortEntryGroup"), ("CISCO-PAE-MIB", "cpaeGuestVlanGroup2"), ("CISCO-PAE-MIB", "cpaeShutdownTimeoutGroup"), ("CISCO-PAE-MIB", "cpaeRadiusConfigGroup"), ("CISCO-PAE-MIB", "cpaeUserGroupGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeCompliance4 = cpaeCompliance4.setStatus('deprecated')
if mibBuilder.loadTexts: cpaeCompliance4.setDescription('The compliance statement for devices that implement the CISCO-PAE-MIB.')
cpaeCompliance5 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 1, 5)).setObjects(("CISCO-PAE-MIB", "cpaePortEntryGroup"), ("CISCO-PAE-MIB", "cpaeGuestVlanGroup3"), ("CISCO-PAE-MIB", "cpaeShutdownTimeoutGroup"), ("CISCO-PAE-MIB", "cpaeRadiusConfigGroup"), ("CISCO-PAE-MIB", "cpaeUserGroupGroup"), ("CISCO-PAE-MIB", "cpaePortOperVlanGroup"), ("CISCO-PAE-MIB", "cpaePortAuthFailVlanGroup"), ("CISCO-PAE-MIB", "cpaeNoGuestVlanNotifEnableGrp"), ("CISCO-PAE-MIB", "cpaeNoAuthFailVlanNotifEnableGrp"), ("CISCO-PAE-MIB", "cpaeNoGuestVlanNotifGroup"), ("CISCO-PAE-MIB", "cpaeNoAuthFailVlanNotifGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassGroup"), ("CISCO-PAE-MIB", "cpaeWebAuthGroup"), ("CISCO-PAE-MIB", "cpaeAuthConfigGroup"), ("CISCO-PAE-MIB", "cpaeHostInfoGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeCompliance5 = cpaeCompliance5.setStatus('obsolete')
if mibBuilder.loadTexts: cpaeCompliance5.setDescription('The compliance statement for devices that implement the CISCO-PAE-MIB.')
cpaeCompliance6 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 1, 6)).setObjects(("CISCO-PAE-MIB", "cpaePortEntryGroup"), ("CISCO-PAE-MIB", "cpaeGuestVlanGroup3"), ("CISCO-PAE-MIB", "cpaeShutdownTimeoutGroup"), ("CISCO-PAE-MIB", "cpaeRadiusConfigGroup"), ("CISCO-PAE-MIB", "cpaeUserGroupGroup"), ("CISCO-PAE-MIB", "cpaePortOperVlanGroup"), ("CISCO-PAE-MIB", "cpaePortAuthFailVlanGroup"), ("CISCO-PAE-MIB", "cpaeNoGuestVlanNotifEnableGrp"), ("CISCO-PAE-MIB", "cpaeNoAuthFailVlanNotifEnableGrp"), ("CISCO-PAE-MIB", "cpaeNoGuestVlanNotifGroup"), ("CISCO-PAE-MIB", "cpaeNoAuthFailVlanNotifGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassGroup2"), ("CISCO-PAE-MIB", "cpaeWebAuthGroup"), ("CISCO-PAE-MIB", "cpaeWebAuthAaaFailGroup"), ("CISCO-PAE-MIB", "cpaeHostInfoGroup2"), ("CISCO-PAE-MIB", "cpaePortEapolTestGroup"), ("CISCO-PAE-MIB", "cpaePortAuthFailVlanGroup2"), ("CISCO-PAE-MIB", "cpaeAuthConfigGroup"), ("CISCO-PAE-MIB", "cpaeAuthConfigGroup2"), ("CISCO-PAE-MIB", "cpaeCriticalRecoveryDelayGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassCriticalGroup"), ("CISCO-PAE-MIB", "cpaeWebAuthCriticalGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeCompliance6 = cpaeCompliance6.setStatus('deprecated')
if mibBuilder.loadTexts: cpaeCompliance6.setDescription('The compliance statement for devices that implement the CISCO-PAE-MIB.')
cpaeCompliance7 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 1, 7)).setObjects(("CISCO-PAE-MIB", "cpaePortEntryGroup"), ("CISCO-PAE-MIB", "cpaeGuestVlanGroup3"), ("CISCO-PAE-MIB", "cpaeShutdownTimeoutGroup"), ("CISCO-PAE-MIB", "cpaeRadiusConfigGroup"), ("CISCO-PAE-MIB", "cpaeUserGroupGroup"), ("CISCO-PAE-MIB", "cpaePortOperVlanGroup"), ("CISCO-PAE-MIB", "cpaePortAuthFailVlanGroup"), ("CISCO-PAE-MIB", "cpaeNoGuestVlanNotifEnableGrp"), ("CISCO-PAE-MIB", "cpaeNoAuthFailVlanNotifEnableGrp"), ("CISCO-PAE-MIB", "cpaeNoGuestVlanNotifGroup"), ("CISCO-PAE-MIB", "cpaeNoAuthFailVlanNotifGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassGroup2"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassGroup3"), ("CISCO-PAE-MIB", "cpaeWebAuthGroup"), ("CISCO-PAE-MIB", "cpaeWebAuthAaaFailGroup"), ("CISCO-PAE-MIB", "cpaeHostInfoGroup2"), ("CISCO-PAE-MIB", "cpaeHostInfoGroup3"), ("CISCO-PAE-MIB", "cpaePortEapolTestGroup"), ("CISCO-PAE-MIB", "cpaePortAuthFailVlanGroup2"), ("CISCO-PAE-MIB", "cpaeAuthConfigGroup"), ("CISCO-PAE-MIB", "cpaeAuthConfigGroup2"), ("CISCO-PAE-MIB", "cpaeCriticalRecoveryDelayGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassCriticalGroup"), ("CISCO-PAE-MIB", "cpaeWebAuthCriticalGroup"), ("CISCO-PAE-MIB", "cpaeHostPostureTokenGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeCompliance7 = cpaeCompliance7.setStatus('deprecated')
if mibBuilder.loadTexts: cpaeCompliance7.setDescription('The compliance statement for devices that implement the CISCO-PAE-MIB.')
cpaeCompliance8 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 1, 8)).setObjects(("CISCO-PAE-MIB", "cpaePortEntryGroup"), ("CISCO-PAE-MIB", "cpaeGuestVlanGroup3"), ("CISCO-PAE-MIB", "cpaeShutdownTimeoutGroup"), ("CISCO-PAE-MIB", "cpaeRadiusConfigGroup"), ("CISCO-PAE-MIB", "cpaeUserGroupGroup"), ("CISCO-PAE-MIB", "cpaePortOperVlanGroup"), ("CISCO-PAE-MIB", "cpaePortAuthFailVlanGroup"), ("CISCO-PAE-MIB", "cpaeNoGuestVlanNotifEnableGrp"), ("CISCO-PAE-MIB", "cpaeNoAuthFailVlanNotifEnableGrp"), ("CISCO-PAE-MIB", "cpaeNoGuestVlanNotifGroup"), ("CISCO-PAE-MIB", "cpaeNoAuthFailVlanNotifGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassGroup2"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassGroup3"), ("CISCO-PAE-MIB", "cpaeWebAuthGroup"), ("CISCO-PAE-MIB", "cpaeWebAuthAaaFailGroup"), ("CISCO-PAE-MIB", "cpaeHostInfoGroup2"), ("CISCO-PAE-MIB", "cpaeHostInfoGroup3"), ("CISCO-PAE-MIB", "cpaePortEapolTestGroup"), ("CISCO-PAE-MIB", "cpaePortAuthFailVlanGroup2"), ("CISCO-PAE-MIB", "cpaeAuthConfigGroup2"), ("CISCO-PAE-MIB", "cpaeCriticalRecoveryDelayGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassCriticalGroup"), ("CISCO-PAE-MIB", "cpaeWebAuthCriticalGroup"), ("CISCO-PAE-MIB", "cpaeHostPostureTokenGroup"), ("CISCO-PAE-MIB", "cpaeMabAuditInfoGroup"), ("CISCO-PAE-MIB", "cpaeMabPortIpDevTrackConfGroup"), ("CISCO-PAE-MIB", "cpaePortIpDevTrackConfGroup"), ("CISCO-PAE-MIB", "cpaeHostUrlRedirectGroup"), ("CISCO-PAE-MIB", "cpaeWebAuthIpDevTrackingGroup"), ("CISCO-PAE-MIB", "cpaeWebAuthUnAuthTimeoutGroup"), ("CISCO-PAE-MIB", "cpaeGlobalAuthFailVlanGroup"), ("CISCO-PAE-MIB", "cpaeGlobalSecViolationGroup"), ("CISCO-PAE-MIB", "cpaeCriticalEapolConfigGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassPortEnableGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassGroup4"), ("CISCO-PAE-MIB", "cpaeAuthIabConfigGroup"), ("CISCO-PAE-MIB", "cpaeAuthConfigGroup3"), ("CISCO-PAE-MIB", "cpaeAuthConfigGroup4"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeCompliance8 = cpaeCompliance8.setStatus('deprecated')
if mibBuilder.loadTexts: cpaeCompliance8.setDescription('The compliance statement for devices that implement the CISCO-PAE-MIB.')
cpaeCompliance9 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 1, 9)).setObjects(("CISCO-PAE-MIB", "cpaePortEntryGroup"), ("CISCO-PAE-MIB", "cpaeGuestVlanGroup3"), ("CISCO-PAE-MIB", "cpaeShutdownTimeoutGroup"), ("CISCO-PAE-MIB", "cpaeRadiusConfigGroup"), ("CISCO-PAE-MIB", "cpaeUserGroupGroup"), ("CISCO-PAE-MIB", "cpaePortOperVlanGroup"), ("CISCO-PAE-MIB", "cpaePortAuthFailVlanGroup"), ("CISCO-PAE-MIB", "cpaeNoGuestVlanNotifEnableGrp"), ("CISCO-PAE-MIB", "cpaeNoAuthFailVlanNotifEnableGrp"), ("CISCO-PAE-MIB", "cpaeNoGuestVlanNotifGroup"), ("CISCO-PAE-MIB", "cpaeNoAuthFailVlanNotifGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassGroup2"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassGroup3"), ("CISCO-PAE-MIB", "cpaeWebAuthGroup"), ("CISCO-PAE-MIB", "cpaeWebAuthAaaFailGroup"), ("CISCO-PAE-MIB", "cpaeHostInfoGroup2"), ("CISCO-PAE-MIB", "cpaeHostInfoGroup3"), ("CISCO-PAE-MIB", "cpaePortEapolTestGroup"), ("CISCO-PAE-MIB", "cpaePortAuthFailVlanGroup2"), ("CISCO-PAE-MIB", "cpaeAuthConfigGroup2"), ("CISCO-PAE-MIB", "cpaeCriticalRecoveryDelayGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassCriticalGroup"), ("CISCO-PAE-MIB", "cpaeWebAuthCriticalGroup"), ("CISCO-PAE-MIB", "cpaeHostPostureTokenGroup"), ("CISCO-PAE-MIB", "cpaeMabAuditInfoGroup"), ("CISCO-PAE-MIB", "cpaeMabPortIpDevTrackConfGroup"), ("CISCO-PAE-MIB", "cpaePortIpDevTrackConfGroup"), ("CISCO-PAE-MIB", "cpaeHostUrlRedirectGroup"), ("CISCO-PAE-MIB", "cpaeWebAuthIpDevTrackingGroup"), ("CISCO-PAE-MIB", "cpaeWebAuthUnAuthTimeoutGroup"), ("CISCO-PAE-MIB", "cpaeGlobalAuthFailVlanGroup"), ("CISCO-PAE-MIB", "cpaeGlobalSecViolationGroup"), ("CISCO-PAE-MIB", "cpaeCriticalEapolConfigGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassPortEnableGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassGroup4"), ("CISCO-PAE-MIB", "cpaeAuthIabConfigGroup"), ("CISCO-PAE-MIB", "cpaeAuthConfigGroup3"), ("CISCO-PAE-MIB", "cpaeAuthConfigGroup4"), ("CISCO-PAE-MIB", "cpaeHostSessionIdGroup"), ("CISCO-PAE-MIB", "cpaeHostAuthInfoGroup"), ("CISCO-PAE-MIB", "cpaePortCapabilitiesConfigGroup"), ("CISCO-PAE-MIB", "cpaeDot1xSuppToGuestVlanGroup"), ("CISCO-PAE-MIB", "cpaeGuestVlanNotifEnableGroup"), ("CISCO-PAE-MIB", "cpaeGuestVlanNotifGroup"), ("CISCO-PAE-MIB", "cpaeAuthFailVlanNotifEnableGrp"), ("CISCO-PAE-MIB", "cpaeAuthFailVlanNotifGroup"), ("CISCO-PAE-MIB", "cpaePortAuthFailVlanConfigGroup"), ("CISCO-PAE-MIB", "cpaePortAuthFailUserInfoGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeCompliance9 = cpaeCompliance9.setStatus('deprecated')
if mibBuilder.loadTexts: cpaeCompliance9.setDescription('The compliance statement for devices that implement the CISCO-PAE-MIB.')
cpaeCompliance10 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 1, 10)).setObjects(("CISCO-PAE-MIB", "cpaePortEntryGroup"), ("CISCO-PAE-MIB", "cpaeGuestVlanGroup3"), ("CISCO-PAE-MIB", "cpaeShutdownTimeoutGroup"), ("CISCO-PAE-MIB", "cpaeRadiusConfigGroup"), ("CISCO-PAE-MIB", "cpaeUserGroupGroup"), ("CISCO-PAE-MIB", "cpaePortOperVlanGroup"), ("CISCO-PAE-MIB", "cpaeNoGuestVlanNotifEnableGrp"), ("CISCO-PAE-MIB", "cpaeNoAuthFailVlanNotifEnableGrp"), ("CISCO-PAE-MIB", "cpaeNoGuestVlanNotifGroup"), ("CISCO-PAE-MIB", "cpaeNoAuthFailVlanNotifGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassGroup2"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassGroup3"), ("CISCO-PAE-MIB", "cpaeWebAuthGroup"), ("CISCO-PAE-MIB", "cpaeWebAuthAaaFailGroup"), ("CISCO-PAE-MIB", "cpaeHostInfoGroup2"), ("CISCO-PAE-MIB", "cpaeHostInfoGroup3"), ("CISCO-PAE-MIB", "cpaePortEapolTestGroup"), ("CISCO-PAE-MIB", "cpaePortAuthFailVlanGroup2"), ("CISCO-PAE-MIB", "cpaeAuthConfigGroup2"), ("CISCO-PAE-MIB", "cpaeCriticalRecoveryDelayGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassCriticalGroup"), ("CISCO-PAE-MIB", "cpaeWebAuthCriticalGroup"), ("CISCO-PAE-MIB", "cpaeHostPostureTokenGroup"), ("CISCO-PAE-MIB", "cpaeMabAuditInfoGroup"), ("CISCO-PAE-MIB", "cpaeMabPortIpDevTrackConfGroup"), ("CISCO-PAE-MIB", "cpaePortIpDevTrackConfGroup"), ("CISCO-PAE-MIB", "cpaeHostUrlRedirectGroup"), ("CISCO-PAE-MIB", "cpaeWebAuthIpDevTrackingGroup"), ("CISCO-PAE-MIB", "cpaeWebAuthUnAuthTimeoutGroup"), ("CISCO-PAE-MIB", "cpaeGlobalAuthFailVlanGroup"), ("CISCO-PAE-MIB", "cpaeGlobalSecViolationGroup"), ("CISCO-PAE-MIB", "cpaeCriticalEapolConfigGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassPortEnableGroup"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassGroup4"), ("CISCO-PAE-MIB", "cpaeAuthIabConfigGroup"), ("CISCO-PAE-MIB", "cpaeAuthConfigGroup3"), ("CISCO-PAE-MIB", "cpaeAuthConfigGroup4"), ("CISCO-PAE-MIB", "cpaeHostSessionIdGroup"), ("CISCO-PAE-MIB", "cpaeHostAuthInfoGroup"), ("CISCO-PAE-MIB", "cpaePortCapabilitiesConfigGroup"), ("CISCO-PAE-MIB", "cpaeDot1xSuppToGuestVlanGroup"), ("CISCO-PAE-MIB", "cpaeGuestVlanNotifEnableGroup"), ("CISCO-PAE-MIB", "cpaeGuestVlanNotifGroup"), ("CISCO-PAE-MIB", "cpaeAuthFailVlanNotifEnableGrp"), ("CISCO-PAE-MIB", "cpaeAuthFailVlanNotifGroup"), ("CISCO-PAE-MIB", "cpaePortAuthFailVlanConfigGroup"), ("CISCO-PAE-MIB", "cpaePortAuthFailUserInfoGroup"), ("CISCO-PAE-MIB", "cpaeSuppPortProfileGroup"), ("CISCO-PAE-MIB", "cpaeSuppHostInfoGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeCompliance10 = cpaeCompliance10.setStatus('current')
if mibBuilder.loadTexts: cpaeCompliance10.setDescription('The compliance statement for devices that implement the CISCO-PAE-MIB.')
cpaeMultipleHostGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 1)).setObjects(("CISCO-PAE-MIB", "cpaeMultipleHost"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeMultipleHostGroup = cpaeMultipleHostGroup.setStatus('deprecated')
if mibBuilder.loadTexts: cpaeMultipleHostGroup.setDescription('A collection of objects that provide the multiple host configuration information for a PAE port. These are additional to the IEEE Std 802.1x PAE MIB.')
cpaePortEntryGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 2)).setObjects(("CISCO-PAE-MIB", "cpaePortMode"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaePortEntryGroup = cpaePortEntryGroup.setStatus('current')
if mibBuilder.loadTexts: cpaePortEntryGroup.setDescription('A collection of objects that provides the port-mode configuration for a PAE port.')
cpaeGuestVlanGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 3)).setObjects(("CISCO-PAE-MIB", "cpaeGuestVlanId"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeGuestVlanGroup = cpaeGuestVlanGroup.setStatus('deprecated')
if mibBuilder.loadTexts: cpaeGuestVlanGroup.setDescription('A collection of objects that provides the Guest Vlan configuration information for the system.')
cpaeGuestVlanGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 4)).setObjects(("CISCO-PAE-MIB", "cpaeGuestVlanNumber"), ("CISCO-PAE-MIB", "cpaeInGuestVlan"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeGuestVlanGroup2 = cpaeGuestVlanGroup2.setStatus('deprecated')
if mibBuilder.loadTexts: cpaeGuestVlanGroup2.setDescription('A collection of objects that provides the per-interface Guest Vlan configuration information for the system.')
cpaeShutdownTimeoutGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 5)).setObjects(("CISCO-PAE-MIB", "cpaeShutdownTimeout"), ("CISCO-PAE-MIB", "cpaeShutdownTimeoutEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeShutdownTimeoutGroup = cpaeShutdownTimeoutGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeShutdownTimeoutGroup.setDescription('A collection of objects that provides the dot1x shutdown timeout configuration information for the system.')
cpaeRadiusConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 6)).setObjects(("CISCO-PAE-MIB", "cpaeRadiusAccountingEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeRadiusConfigGroup = cpaeRadiusConfigGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeRadiusConfigGroup.setDescription('A collection of objects that provides the RADIUS configuration information for the system.')
cpaeUserGroupGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 7)).setObjects(("CISCO-PAE-MIB", "cpaeUserGroupUserName"), ("CISCO-PAE-MIB", "cpaeUserGroupUserAddrType"), ("CISCO-PAE-MIB", "cpaeUserGroupUserAddr"), ("CISCO-PAE-MIB", "cpaeUserGroupUserInterface"), ("CISCO-PAE-MIB", "cpaeUserGroupUserVlan"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeUserGroupGroup = cpaeUserGroupGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeUserGroupGroup.setDescription('A collection of objects that provides the group manager information of authenticated users in the system.')
cpaeGuestVlanGroup3 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 8)).setObjects(("CISCO-PAE-MIB", "cpaeGuestVlanNumber"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeGuestVlanGroup3 = cpaeGuestVlanGroup3.setStatus('current')
if mibBuilder.loadTexts: cpaeGuestVlanGroup3.setDescription('A collection of objects that provides the per-interface Guest Vlan configuration information for the system.')
cpaePortOperVlanGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 9)).setObjects(("CISCO-PAE-MIB", "cpaePortOperVlan"), ("CISCO-PAE-MIB", "cpaePortOperVlanType"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaePortOperVlanGroup = cpaePortOperVlanGroup.setStatus('current')
if mibBuilder.loadTexts: cpaePortOperVlanGroup.setDescription('A collection of object(s) that provides the information about Operational Vlan for each PAE port.')
cpaePortAuthFailVlanGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 10)).setObjects(("CISCO-PAE-MIB", "cpaePortAuthFailVlan"), ("CISCO-PAE-MIB", "cpaeAuthFailUserName"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaePortAuthFailVlanGroup = cpaePortAuthFailVlanGroup.setStatus('deprecated')
if mibBuilder.loadTexts: cpaePortAuthFailVlanGroup.setDescription('A collection of object(s) that provides the Auth-Fail (Authentication Fail) Vlan configuration and Auth-Fail user information for the system.')
cpaeNoGuestVlanNotifEnableGrp = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 11)).setObjects(("CISCO-PAE-MIB", "cpaeNoGuestVlanNotifEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeNoGuestVlanNotifEnableGrp = cpaeNoGuestVlanNotifEnableGrp.setStatus('current')
if mibBuilder.loadTexts: cpaeNoGuestVlanNotifEnableGrp.setDescription('A collection of object(s) that provides control over Guest Vlan related notification(s).')
cpaeNoAuthFailVlanNotifEnableGrp = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 12)).setObjects(("CISCO-PAE-MIB", "cpaeNoAuthFailVlanNotifEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeNoAuthFailVlanNotifEnableGrp = cpaeNoAuthFailVlanNotifEnableGrp.setStatus('current')
if mibBuilder.loadTexts: cpaeNoAuthFailVlanNotifEnableGrp.setDescription('A collection of object(s) that provides control over Auth-Fail related notification(s).')
cpaeNoGuestVlanNotifGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 13)).setObjects(("CISCO-PAE-MIB", "cpaeNoGuestVlanNotif"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeNoGuestVlanNotifGroup = cpaeNoGuestVlanNotifGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeNoGuestVlanNotifGroup.setDescription('A collection of notification(s) providing the information for unconfigured Guest Vlan.')
cpaeNoAuthFailVlanNotifGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 14)).setObjects(("CISCO-PAE-MIB", "cpaeNoAuthFailVlanNotif"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeNoAuthFailVlanNotifGroup = cpaeNoAuthFailVlanNotifGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeNoAuthFailVlanNotifGroup.setDescription('A collection of notifications providing the information for unconfigured Auth-Fail Vlan.')
cpaeMacAuthBypassGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 15)).setObjects(("CISCO-PAE-MIB", "cpaeMacAuthBypassReAuthTimeout"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassReAuthEnabled"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassViolation"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassShutdownTimeout"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassAuthFailTimeout"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassPortEnabled"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassPortInitialize"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassPortReAuth"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassPortMacAddress"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassPortAuthState"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassAcctEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeMacAuthBypassGroup = cpaeMacAuthBypassGroup.setStatus('deprecated')
if mibBuilder.loadTexts: cpaeMacAuthBypassGroup.setDescription('A collection of object(s) that provides the MAC Auth-Bypass configuration and information for the system.')
cpaeWebAuthGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 16)).setObjects(("CISCO-PAE-MIB", "cpaeWebAuthEnabled"), ("CISCO-PAE-MIB", "cpaeWebAuthSessionPeriod"), ("CISCO-PAE-MIB", "cpaeWebAuthLoginPage"), ("CISCO-PAE-MIB", "cpaeWebAuthLoginFailedPage"), ("CISCO-PAE-MIB", "cpaeWebAuthQuietPeriod"), ("CISCO-PAE-MIB", "cpaeWebAuthMaxRetries"), ("CISCO-PAE-MIB", "cpaeWebAuthPortEnabled"), ("CISCO-PAE-MIB", "cpaeWebAuthPortInitialize"), ("CISCO-PAE-MIB", "cpaeWebAuthAaaSessionPeriod"), ("CISCO-PAE-MIB", "cpaeWebAuthHostSessionTimeLeft"), ("CISCO-PAE-MIB", "cpaeWebAuthHostState"), ("CISCO-PAE-MIB", "cpaeWebAuthHostInitialize"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeWebAuthGroup = cpaeWebAuthGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthGroup.setDescription('A collection of object(s) that provides the Web Proxy Authentication configuration and information for the system.')
cpaeAuthConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 17)).setObjects(("CISCO-PAE-MIB", "cpaeAuthReAuthPeriodSrcAdmin"), ("CISCO-PAE-MIB", "cpaeAuthReAuthPeriodSrcOper"), ("CISCO-PAE-MIB", "cpaeAuthReAuthPeriodOper"), ("CISCO-PAE-MIB", "cpaeAuthTimeToNextReAuth"), ("CISCO-PAE-MIB", "cpaeAuthReAuthAction"), ("CISCO-PAE-MIB", "cpaeAuthReAuthMax"), ("CISCO-PAE-MIB", "cpaeAuthIabEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeAuthConfigGroup = cpaeAuthConfigGroup.setStatus('deprecated')
if mibBuilder.loadTexts: cpaeAuthConfigGroup.setDescription('A collection of object(s) that provides additional configuration information about an Authenticator PAE.')
cpaeHostInfoGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 18)).setObjects(("CISCO-PAE-MIB", "cpaeHostInfoMacAddress"), ("CISCO-PAE-MIB", "cpaeHostInfoPostureToken"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeHostInfoGroup = cpaeHostInfoGroup.setStatus('obsolete')
if mibBuilder.loadTexts: cpaeHostInfoGroup.setDescription('A collection of object(s) that provides information about an host connecting to a PAE port.')
cpaeWebAuthAaaFailGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 19)).setObjects(("CISCO-PAE-MIB", "cpaeWebAuthPortAaaFailPolicy"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeWebAuthAaaFailGroup = cpaeWebAuthAaaFailGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthAaaFailGroup.setDescription('A collection of object(s) that provides Inaccessible Authentication Bypass configuration and information for Web Proxy Authentication in the system.')
cpaeMacAuthBypassGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 20)).setObjects(("CISCO-PAE-MIB", "cpaeMacAuthBypassPortTermAction"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassSessionTimeLeft"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeMacAuthBypassGroup2 = cpaeMacAuthBypassGroup2.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassGroup2.setDescription('A collection of object(s) that provides additional information of MAC Auth-bypass feature in the system.')
cpaePortEapolTestGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 21)).setObjects(("CISCO-PAE-MIB", "cpaePortEapolTestLimits"), ("CISCO-PAE-MIB", "cpaePortEapolTestResult"), ("CISCO-PAE-MIB", "cpaePortEapolTestStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaePortEapolTestGroup = cpaePortEapolTestGroup.setStatus('current')
if mibBuilder.loadTexts: cpaePortEapolTestGroup.setDescription('A collection of object(s) that provides information about if connecting hosts are EAPOL capable.')
cpaeHostInfoGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 22)).setObjects(("CISCO-PAE-MIB", "cpaeHostInfoMacAddress"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeHostInfoGroup2 = cpaeHostInfoGroup2.setStatus('current')
if mibBuilder.loadTexts: cpaeHostInfoGroup2.setDescription('A collection of object(s) that provides information about an host connecting to a PAE port.')
cpaeMacAuthBypassGroup3 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 23)).setObjects(("CISCO-PAE-MIB", "cpaeMacAuthBypassPortAuthMethod"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeMacAuthBypassGroup3 = cpaeMacAuthBypassGroup3.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassGroup3.setDescription('A collection of object(s) that provides configuration for authentication method for MAC Auth-bypass feature in the system.')
cpaePortAuthFailVlanGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 24)).setObjects(("CISCO-PAE-MIB", "cpaeAuthFailVlanMaxAttempts"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaePortAuthFailVlanGroup2 = cpaePortAuthFailVlanGroup2.setStatus('current')
if mibBuilder.loadTexts: cpaePortAuthFailVlanGroup2.setDescription('A collection of object(s) that provides configuration for maximum authentication attempts for Auth-Fail Vlan feature in the system.')
cpaeAuthConfigGroup2 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 25)).setObjects(("CISCO-PAE-MIB", "cpaeAuthPaeState"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeAuthConfigGroup2 = cpaeAuthConfigGroup2.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthConfigGroup2.setDescription('A collection of object(s) that provides additional states in the PAE state machine.')
cpaeCriticalRecoveryDelayGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 26)).setObjects(("CISCO-PAE-MIB", "cpaeCriticalRecoveryDelay"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeCriticalRecoveryDelayGroup = cpaeCriticalRecoveryDelayGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeCriticalRecoveryDelayGroup.setDescription('A collection of object(s) that provides recovery delay configuration for 802.1x Critical Authentication in the system.')
cpaeAuthConfigGroup3 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 27)).setObjects(("CISCO-PAE-MIB", "cpaeAuthReAuthPeriodSrcAdmin"), ("CISCO-PAE-MIB", "cpaeAuthReAuthPeriodSrcOper"), ("CISCO-PAE-MIB", "cpaeAuthReAuthPeriodOper"), ("CISCO-PAE-MIB", "cpaeAuthTimeToNextReAuth"), ("CISCO-PAE-MIB", "cpaeAuthReAuthAction"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeAuthConfigGroup3 = cpaeAuthConfigGroup3.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthConfigGroup3.setDescription('A collection of object(s) that provides configuration and information related to re-authentication of 802.1x ports in the system.')
cpaeAuthConfigGroup4 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 28)).setObjects(("CISCO-PAE-MIB", "cpaeAuthReAuthMax"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeAuthConfigGroup4 = cpaeAuthConfigGroup4.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthConfigGroup4.setDescription('A collection of object(s) that provides configuration of maximum reauthentication attempts of 802.1x ports in the system.')
cpaeAuthIabConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 29)).setObjects(("CISCO-PAE-MIB", "cpaeAuthIabEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeAuthIabConfigGroup = cpaeAuthIabConfigGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthIabConfigGroup.setDescription('A collection of object(s) to enable/disable IAB feature on capable interface for the system.')
cpaeGlobalAuthFailVlanGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 30)).setObjects(("CISCO-PAE-MIB", "cpaeGlobalAuthFailMaxAttempts"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeGlobalAuthFailVlanGroup = cpaeGlobalAuthFailVlanGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeGlobalAuthFailVlanGroup.setDescription('A collection of object(s) that provides global configuration and information about maximum authentication attempts for Auth-Fail Vlan feature in the system.')
cpaeMacAuthBypassCriticalGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 31)).setObjects(("CISCO-PAE-MIB", "cpaeMabCriticalRecoveryDelay"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeMacAuthBypassCriticalGroup = cpaeMacAuthBypassCriticalGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassCriticalGroup.setDescription('A collection of object(s) that provides control over critical configuration for Mac Authentication Bypass.')
cpaeWebAuthCriticalGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 32)).setObjects(("CISCO-PAE-MIB", "cpaeWebAuthCriticalRecoveryDelay"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeWebAuthCriticalGroup = cpaeWebAuthCriticalGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthCriticalGroup.setDescription('A collection of object(s) that provides control over critical configuration for Web Proxy Authentication.')
cpaeCriticalEapolConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 33)).setObjects(("CISCO-PAE-MIB", "cpaeCriticalEapolEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeCriticalEapolConfigGroup = cpaeCriticalEapolConfigGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeCriticalEapolConfigGroup.setDescription('A collection of object(s) that provides EAPOL configuration for 802.1x Critical Authentication in the system.')
cpaeHostPostureTokenGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 34)).setObjects(("CISCO-PAE-MIB", "cpaeHostPostureTokenStr"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeHostPostureTokenGroup = cpaeHostPostureTokenGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeHostPostureTokenGroup.setDescription('A collection of object(s) that provides information about Posture Token of an host connecting to a PAE port.')
cpaeMabAuditInfoGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 35)).setObjects(("CISCO-PAE-MIB", "cpaeMacAuthBypassPortSessionId"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassPortUrlRedirect"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassPortPostureTok"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeMabAuditInfoGroup = cpaeMabAuditInfoGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeMabAuditInfoGroup.setDescription('A collection of object(s) that provides information about MAC Auth-Bypass Audit sessions.')
cpaeMabPortIpDevTrackConfGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 36)).setObjects(("CISCO-PAE-MIB", "cpaeMabPortIpDevTrackEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeMabPortIpDevTrackConfGroup = cpaeMabPortIpDevTrackConfGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeMabPortIpDevTrackConfGroup.setDescription('A collection of object(s) that provides configuration and information about MAC Auth-Bypass IP Device Tracking feature.')
cpaePortIpDevTrackConfGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 37)).setObjects(("CISCO-PAE-MIB", "cpaePortIpDevTrackEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaePortIpDevTrackConfGroup = cpaePortIpDevTrackConfGroup.setStatus('current')
if mibBuilder.loadTexts: cpaePortIpDevTrackConfGroup.setDescription('A collection of object(s) that provides configuration and information about 802.1x IP Device Tracking feature.')
cpaeHostUrlRedirectGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 38)).setObjects(("CISCO-PAE-MIB", "cpaeHostUrlRedirection"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeHostUrlRedirectGroup = cpaeHostUrlRedirectGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeHostUrlRedirectGroup.setDescription('A collection of object(s) that provides information about URL-redirection of 802.1x authenticated hosts.')
cpaeWebAuthIpDevTrackingGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 39)).setObjects(("CISCO-PAE-MIB", "cpaeWebAuthPortIpDevTrackEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeWebAuthIpDevTrackingGroup = cpaeWebAuthIpDevTrackingGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthIpDevTrackingGroup.setDescription('A collection of object(s) that provides configuration and information about Web Proxy Authentication IP Device Tracking feature.')
cpaeWebAuthUnAuthTimeoutGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 40)).setObjects(("CISCO-PAE-MIB", "cpaeWebAuthUnAuthStateTimeout"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeWebAuthUnAuthTimeoutGroup = cpaeWebAuthUnAuthTimeoutGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeWebAuthUnAuthTimeoutGroup.setDescription('A collection of object(s) that provides configuration and information about Init State Timeout of Web Proxy Authentication.')
cpaeHostInfoGroup3 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 41)).setObjects(("CISCO-PAE-MIB", "cpaeHostInfoUserName"), ("CISCO-PAE-MIB", "cpaeHostInfoAddrType"), ("CISCO-PAE-MIB", "cpaeHostInfoAddr"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeHostInfoGroup3 = cpaeHostInfoGroup3.setStatus('current')
if mibBuilder.loadTexts: cpaeHostInfoGroup3.setDescription('A collection of object(s) that provides user and the address information for 802.1x authenticated host.')
cpaeGlobalSecViolationGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 42)).setObjects(("CISCO-PAE-MIB", "cpaeGlobalSecViolationAction"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeGlobalSecViolationGroup = cpaeGlobalSecViolationGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeGlobalSecViolationGroup.setDescription('A collection of object(s) that provides global configuration and information about security violation action on PAE ports in the system.')
cpaeMacAuthBypassPortEnableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 43)).setObjects(("CISCO-PAE-MIB", "cpaeMacAuthBypassPortEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeMacAuthBypassPortEnableGroup = cpaeMacAuthBypassPortEnableGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassPortEnableGroup.setDescription('A collection of object(s) to enable/disable Mac Auth-Bypass on capable interfaces for the system.')
cpaeMacAuthBypassGroup4 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 44)).setObjects(("CISCO-PAE-MIB", "cpaeMacAuthBypassReAuthEnabled"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassReAuthTimeout"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassViolation"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassShutdownTimeout"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassAuthFailTimeout"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassPortInitialize"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassPortReAuth"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassPortMacAddress"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassPortAuthState"), ("CISCO-PAE-MIB", "cpaeMacAuthBypassAcctEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeMacAuthBypassGroup4 = cpaeMacAuthBypassGroup4.setStatus('current')
if mibBuilder.loadTexts: cpaeMacAuthBypassGroup4.setDescription('A collection of object(s) that provides the MAC Auth-Bypass configuration and information for the system.')
cpaeHostSessionIdGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 45)).setObjects(("CISCO-PAE-MIB", "cpaeHostSessionId"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeHostSessionIdGroup = cpaeHostSessionIdGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeHostSessionIdGroup.setDescription('A collection of object(s) that provides session identification information for 802.1x hosts in the system.')
cpaeHostAuthInfoGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 46)).setObjects(("CISCO-PAE-MIB", "cpaeHostAuthPaeState"), ("CISCO-PAE-MIB", "cpaeHostBackendState"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeHostAuthInfoGroup = cpaeHostAuthInfoGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeHostAuthInfoGroup.setDescription('A collection of object(s) that provides state machines and authentication information for 802.1x authenticated hosts in the system.')
cpaePortCapabilitiesConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 47)).setObjects(("CISCO-PAE-MIB", "cpaePortCapabilitiesEnabled"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaePortCapabilitiesConfigGroup = cpaePortCapabilitiesConfigGroup.setStatus('current')
if mibBuilder.loadTexts: cpaePortCapabilitiesConfigGroup.setDescription('A collection of object(s) that provides configuration and information about PAE functionalities of ports in the systems.')
cpaeDot1xSuppToGuestVlanGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 48)).setObjects(("CISCO-PAE-MIB", "cpaeDot1xSuppToGuestVlanAllowed"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeDot1xSuppToGuestVlanGroup = cpaeDot1xSuppToGuestVlanGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeDot1xSuppToGuestVlanGroup.setDescription('A collection of object(s) that provides configuration that allows moving ports with 802.1x supplicants to Guest Vlan.')
cpaeGuestVlanNotifEnableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 49)).setObjects(("CISCO-PAE-MIB", "cpaeGuestVlanNotifEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeGuestVlanNotifEnableGroup = cpaeGuestVlanNotifEnableGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeGuestVlanNotifEnableGroup.setDescription('A collection of object(s) that provides control over Guest Vlan related notification(s).')
cpaeGuestVlanNotifGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 50)).setObjects(("CISCO-PAE-MIB", "cpaeGuestVlanNotif"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeGuestVlanNotifGroup = cpaeGuestVlanNotifGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeGuestVlanNotifGroup.setDescription('A collection of notifications providing information for Guest Vlan.')
cpaeAuthFailVlanNotifEnableGrp = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 51)).setObjects(("CISCO-PAE-MIB", "cpaeAuthFailVlanNotifEnable"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeAuthFailVlanNotifEnableGrp = cpaeAuthFailVlanNotifEnableGrp.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthFailVlanNotifEnableGrp.setDescription('A collection of object(s) that provides control over Auth-Fail Vlan related notification(s).')
cpaeAuthFailVlanNotifGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 52)).setObjects(("CISCO-PAE-MIB", "cpaeAuthFailVlanNotif"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeAuthFailVlanNotifGroup = cpaeAuthFailVlanNotifGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeAuthFailVlanNotifGroup.setDescription('A collection of notifications providing information for Auth-Fail Vlan.')
cpaePortAuthFailVlanConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 53)).setObjects(("CISCO-PAE-MIB", "cpaePortAuthFailVlan"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaePortAuthFailVlanConfigGroup = cpaePortAuthFailVlanConfigGroup.setStatus('current')
if mibBuilder.loadTexts: cpaePortAuthFailVlanConfigGroup.setDescription('A collection of object(s) that provides the Auth-Fail (Authentication Fail) Vlan configuration for the system.')
cpaePortAuthFailUserInfoGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 54)).setObjects(("CISCO-PAE-MIB", "cpaeAuthFailUserName"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaePortAuthFailUserInfoGroup = cpaePortAuthFailUserInfoGroup.setStatus('current')
if mibBuilder.loadTexts: cpaePortAuthFailUserInfoGroup.setDescription('A collection of object(s) that provides the Auth-Fail user information for the system.')
cpaeSuppPortProfileGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 55)).setObjects(("CISCO-PAE-MIB", "cpaeSuppPortCredentialProfileName"), ("CISCO-PAE-MIB", "cpaeSuppPortEapProfileName"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeSuppPortProfileGroup = cpaeSuppPortProfileGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeSuppPortProfileGroup.setDescription('A collection of object(s) that provides Credential and EAP profiles configuration for a Supplicant PAE.')
cpaeSuppHostInfoGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 220, 2, 2, 56)).setObjects(("CISCO-PAE-MIB", "cpaeSuppHostAuthMacAddress"), ("CISCO-PAE-MIB", "cpaeSuppHostPaeState"), ("CISCO-PAE-MIB", "cpaeSuppHostBackendState"), ("CISCO-PAE-MIB", "cpaeSuppHostStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cpaeSuppHostInfoGroup = cpaeSuppHostInfoGroup.setStatus('current')
if mibBuilder.loadTexts: cpaeSuppHostInfoGroup.setDescription('A collection of object(s) that provides information about supplicants in the system.')
mibBuilder.exportSymbols("CISCO-PAE-MIB", cpaeWebAuthAaaFailGroup=cpaeWebAuthAaaFailGroup, cpaeMacAuthBypassPortAuthMethod=cpaeMacAuthBypassPortAuthMethod, cpaeWebAuth=cpaeWebAuth, cpaeHostSessionId=cpaeHostSessionId, cpaePortCapabilitiesConfigGroup=cpaePortCapabilitiesConfigGroup, cpaeMultipleHostGroup=cpaeMultipleHostGroup, cpaeUserGroupGroup=cpaeUserGroupGroup, cpaePortOperVlan=cpaePortOperVlan, cpaeWebAuthLoginFailedPage=cpaeWebAuthLoginFailedPage, cpaePortEapolTestTable=cpaePortEapolTestTable, cpaeAuthFailVlanNotif=cpaeAuthFailVlanNotif, cpaeWebAuthQuietPeriod=cpaeWebAuthQuietPeriod, PYSNMP_MODULE_ID=ciscoPaeMIB, cpaeAuthConfigEntry=cpaeAuthConfigEntry, cpaeWebAuthHostState=cpaeWebAuthHostState, cpaeUserGroupName=cpaeUserGroupName, cpaeGuestVlanNotifEnableGroup=cpaeGuestVlanNotifEnableGroup, cpaeAuthConfigGroup2=cpaeAuthConfigGroup2, cpaeMacAuthBypassPortEnabled=cpaeMacAuthBypassPortEnabled, cpaeGlobalSecViolationAction=cpaeGlobalSecViolationAction, cpaeWebAuthLoginPage=cpaeWebAuthLoginPage, cpaeMacAuthBypassPortMacAddress=cpaeMacAuthBypassPortMacAddress, cpaeHostUrlRedirectGroup=cpaeHostUrlRedirectGroup, cpaeSuppPortTable=cpaeSuppPortTable, cpaeAuthFailVlanNotifGroup=cpaeAuthFailVlanNotifGroup, cpaeUserGroupUserVlan=cpaeUserGroupUserVlan, cpaeAuthFailVlanNotifEnable=cpaeAuthFailVlanNotifEnable, cpaePortAuthFailVlan=cpaePortAuthFailVlan, cpaeSuppHostBackendState=cpaeSuppHostBackendState, cpaeCompliance10=cpaeCompliance10, cpaePortOperVlanGroup=cpaePortOperVlanGroup, cpaeGlobalSecViolationGroup=cpaeGlobalSecViolationGroup, cpaeHostInfoPostureToken=cpaeHostInfoPostureToken, cpaeSuppHostPaeState=cpaeSuppHostPaeState, cpaePortEapolTestLimits=cpaePortEapolTestLimits, cpaeUserGroupUserIndex=cpaeUserGroupUserIndex, cpaeWebAuthSessionPeriod=cpaeWebAuthSessionPeriod, cpaePortAuthFailUserInfoGroup=cpaePortAuthFailUserInfoGroup, cpaeAuthIabEnabled=cpaeAuthIabEnabled, cpaeUserGroupUserInterface=cpaeUserGroupUserInterface, cpaeCompliance4=cpaeCompliance4, cpaeUserGroupUserName=cpaeUserGroupUserName, cpaeHostInfoGroup3=cpaeHostInfoGroup3, cpaeNoAuthFailVlanNotifEnable=cpaeNoAuthFailVlanNotifEnable, CpaeAuthState=CpaeAuthState, cpaeCriticalEapolEnabled=cpaeCriticalEapolEnabled, cpaeMacAuthBypassPortSessionId=cpaeMacAuthBypassPortSessionId, cpaeMacAuthBypass=cpaeMacAuthBypass, cpaeSuppPortProfileGroup=cpaeSuppPortProfileGroup, cpaePortAuthFailVlanGroup=cpaePortAuthFailVlanGroup, cpaeCompliance5=cpaeCompliance5, cpaeMIBNotification=cpaeMIBNotification, cpaeMacAuthBypassPortTable=cpaeMacAuthBypassPortTable, cpaeHostInfoGroup=cpaeHostInfoGroup, cpaeMacAuthBypassAcctEnable=cpaeMacAuthBypassAcctEnable, cpaeMacAuthBypassCriticalGroup=cpaeMacAuthBypassCriticalGroup, cpaeRadiusAccountingEnabled=cpaeRadiusAccountingEnabled, cpaePortIpDevTrackConfigEntry=cpaePortIpDevTrackConfigEntry, cpaeUserGroupUserAddr=cpaeUserGroupUserAddr, cpaeMacAuthBypassAuthFailTimeout=cpaeMacAuthBypassAuthFailTimeout, cpaeMabPortIpDevTrackEnabled=cpaeMabPortIpDevTrackEnabled, cpaeAuthConfigTable=cpaeAuthConfigTable, cpaeHostAuthPaeState=cpaeHostAuthPaeState, cpaeSupplicantObjects=cpaeSupplicantObjects, ciscoPaeMIB=ciscoPaeMIB, cpaeCompliance9=cpaeCompliance9, cpaeCompliance7=cpaeCompliance7, cpaeWebAuthPortTable=cpaeWebAuthPortTable, cpaeShutdownTimeoutEnabled=cpaeShutdownTimeoutEnabled, cpaeWebAuthCriticalRecoveryDelay=cpaeWebAuthCriticalRecoveryDelay, cpaeAuthReAuthAction=cpaeAuthReAuthAction, cpaeGuestVlanNotifGroup=cpaeGuestVlanNotifGroup, cpaeMacAuthBypassPortEnableGroup=cpaeMacAuthBypassPortEnableGroup, cpaeUserGroupEntry=cpaeUserGroupEntry, cpaeWebAuthHostTable=cpaeWebAuthHostTable, cpaeAuthFailUserTable=cpaeAuthFailUserTable, cpaeMacAuthBypassReAuthTimeout=cpaeMacAuthBypassReAuthTimeout, cpaeHostInfoUserName=cpaeHostInfoUserName, cpaeMacAuthBypassPortEntry=cpaeMacAuthBypassPortEntry, cpaeGuestVlanNotifEnable=cpaeGuestVlanNotifEnable, cpaeMacAuthBypassPortTermAction=cpaeMacAuthBypassPortTermAction, cpaeGuestVlanGroup3=cpaeGuestVlanGroup3, cpaeGlobalAuthFailVlanGroup=cpaeGlobalAuthFailVlanGroup, cpaeMacAuthBypassGroup3=cpaeMacAuthBypassGroup3, cpaeMacAuthBypassReAuthEnabled=cpaeMacAuthBypassReAuthEnabled, cpaeAuthIabConfigGroup=cpaeAuthIabConfigGroup, cpaeSuppPortEntry=cpaeSuppPortEntry, cpaeWebAuthIpDevTrackingGroup=cpaeWebAuthIpDevTrackingGroup, cpaeHostInfoEntry=cpaeHostInfoEntry, cpaeSuppHostStatus=cpaeSuppHostStatus, cpaePortEapolTestGroup=cpaePortEapolTestGroup, cpaeSuppHostInfoEntry=cpaeSuppHostInfoEntry, ReAuthPeriodSource=ReAuthPeriodSource, cpaeCompliance=cpaeCompliance, cpaeInGuestVlan=cpaeInGuestVlan, cpaeSuppHostInfoSuppIndex=cpaeSuppHostInfoSuppIndex, cpaeMacAuthBypassShutdownTimeout=cpaeMacAuthBypassShutdownTimeout, cpaeMacAuthBypassGroup4=cpaeMacAuthBypassGroup4, cpaePortOperVlanType=cpaePortOperVlanType, cpaeMacAuthBypassPortReAuth=cpaeMacAuthBypassPortReAuth, cpaeWebAuthEnabled=cpaeWebAuthEnabled, cpaeUserGroupTable=cpaeUserGroupTable, cpaeWebAuthHostAddrType=cpaeWebAuthHostAddrType, cpaePortIpDevTrackEnabled=cpaePortIpDevTrackEnabled, cpaeNoGuestVlanNotif=cpaeNoGuestVlanNotif, cpaeAuthConfigGroup3=cpaeAuthConfigGroup3, cpaePortMode=cpaePortMode, cpaeNoGuestVlanNotifEnable=cpaeNoGuestVlanNotifEnable, cpaeMabPortIpDevTrackConfGroup=cpaeMabPortIpDevTrackConfGroup, cpaeMIBCompliances=cpaeMIBCompliances, cpaeWebAuthPortIpDevTrackEnabled=cpaeWebAuthPortIpDevTrackEnabled, cpaeMacAuthBypassSessionTimeLeft=cpaeMacAuthBypassSessionTimeLeft, cpaeAuthTimeToNextReAuth=cpaeAuthTimeToNextReAuth, cpaeWebAuthGroup=cpaeWebAuthGroup, cpaeMIBGroups=cpaeMIBGroups, cpaeWebAuthHostEntry=cpaeWebAuthHostEntry, cpaeDot1xSuppToGuestVlanAllowed=cpaeDot1xSuppToGuestVlanAllowed, cpaeWebAuthPortAaaFailPolicy=cpaeWebAuthPortAaaFailPolicy, cpaeNoGuestVlanNotifEnableGrp=cpaeNoGuestVlanNotifEnableGrp, cpaeWebAuthHostInitialize=cpaeWebAuthHostInitialize, cpaeHostInfoMacAddress=cpaeHostInfoMacAddress, cpaeMabCriticalRecoveryDelay=cpaeMabCriticalRecoveryDelay, cpaePortCapabilitiesEnabled=cpaePortCapabilitiesEnabled, cpaeCriticalRecoveryDelayGroup=cpaeCriticalRecoveryDelayGroup, cpaeAuthReAuthPeriodSrcOper=cpaeAuthReAuthPeriodSrcOper, cpaeShutdownTimeoutGroup=cpaeShutdownTimeoutGroup, cpaeHostUrlRedirection=cpaeHostUrlRedirection, cpaeSuppHostAuthMacAddress=cpaeSuppHostAuthMacAddress, cpaeMIBObject=cpaeMIBObject, cpaePortAuthFailVlanConfigGroup=cpaePortAuthFailVlanConfigGroup, cpaeSuppPortEapProfileName=cpaeSuppPortEapProfileName, cpaePortTable=cpaePortTable, cpaeWebAuthHostAddress=cpaeWebAuthHostAddress, cpaeGuestVlanNotif=cpaeGuestVlanNotif, cpaeCompliance8=cpaeCompliance8, cpaePortEapolTestStatus=cpaePortEapolTestStatus, cpaeRadiusConfigGroup=cpaeRadiusConfigGroup, cpaeWebAuthCriticalGroup=cpaeWebAuthCriticalGroup, cpaeMacAuthBypassPortInitialize=cpaeMacAuthBypassPortInitialize, cpaeHostSessionIdGroup=cpaeHostSessionIdGroup, cpaeNoAuthFailVlanNotifEnableGrp=cpaeNoAuthFailVlanNotifEnableGrp, cpaeMacAuthBypassViolation=cpaeMacAuthBypassViolation, cpaePortIpDevTrackConfGroup=cpaePortIpDevTrackConfGroup, cpaeNoAuthFailVlanNotifGroup=cpaeNoAuthFailVlanNotifGroup, cpaeHostInfoHostIndex=cpaeHostInfoHostIndex, cpaeHostPostureTokenStr=cpaeHostPostureTokenStr, cpaeCompliance2=cpaeCompliance2, cpaeWebAuthPortEntry=cpaeWebAuthPortEntry, cpaeUserGroupUserAddrType=cpaeUserGroupUserAddrType, cpaePortIpDevTrackConfigTable=cpaePortIpDevTrackConfigTable, cpaeCompliance6=cpaeCompliance6, cpaeMabPortIpDevTrackConfTable=cpaeMabPortIpDevTrackConfTable, cpaeHostInfoAddr=cpaeHostInfoAddr, cpaeSuppHostInfoTable=cpaeSuppHostInfoTable, cpaeGuestVlanNumber=cpaeGuestVlanNumber, cpaeAuthFailVlanNotifEnableGrp=cpaeAuthFailVlanNotifEnableGrp, cpaeAuthReAuthMax=cpaeAuthReAuthMax, cpaeWebAuthHostSessionTimeLeft=cpaeWebAuthHostSessionTimeLeft, cpaeAuthConfigGroup=cpaeAuthConfigGroup, cpaeMacAuthBypassPortUrlRedirect=cpaeMacAuthBypassPortUrlRedirect, cpaeWebAuthMaxRetries=cpaeWebAuthMaxRetries, cpaeAuthPaeState=cpaeAuthPaeState, cpaeDot1xSuppToGuestVlanGroup=cpaeDot1xSuppToGuestVlanGroup, cpaeAuthConfigGroup4=cpaeAuthConfigGroup4, cpaeHostInfoAddrType=cpaeHostInfoAddrType, cpaeCriticalEapolConfigGroup=cpaeCriticalEapolConfigGroup, cpaeGuestVlanGroup2=cpaeGuestVlanGroup2, cpaeMultipleHost=cpaeMultipleHost, cpaePortAuthFailVlanGroup2=cpaePortAuthFailVlanGroup2, cpaeAuthFailUserName=cpaeAuthFailUserName, cpaeMabPortIpDevTrackConfEntry=cpaeMabPortIpDevTrackConfEntry, cpaeWebAuthAaaSessionPeriod=cpaeWebAuthAaaSessionPeriod, cpaeAuthReAuthPeriodSrcAdmin=cpaeAuthReAuthPeriodSrcAdmin, cpaeHostInfoGroup2=cpaeHostInfoGroup2, cpaeMacAuthBypassGroup=cpaeMacAuthBypassGroup, cpaeMIBConformance=cpaeMIBConformance, cpaeCompliance3=cpaeCompliance3, cpaeNoGuestVlanNotifGroup=cpaeNoGuestVlanNotifGroup, cpaeMacAuthBypassPortAuthState=cpaeMacAuthBypassPortAuthState, cpaeAuthReAuthPeriodOper=cpaeAuthReAuthPeriodOper, cpaePortEapolTestResult=cpaePortEapolTestResult, cpaeHostPostureTokenGroup=cpaeHostPostureTokenGroup, cpaePortEntry=cpaePortEntry, cpaeNoAuthFailVlanNotif=cpaeNoAuthFailVlanNotif, cpaeWebAuthPortEnabled=cpaeWebAuthPortEnabled, cpaeGuestVlanId=cpaeGuestVlanId, cpaeHostBackendState=cpaeHostBackendState, cpaeSuppPortCredentialProfileName=cpaeSuppPortCredentialProfileName, cpaeShutdownTimeout=cpaeShutdownTimeout, cpaeCriticalRecoveryDelay=cpaeCriticalRecoveryDelay, cpaeHostInfoTable=cpaeHostInfoTable, cpaeHostAuthInfoGroup=cpaeHostAuthInfoGroup, cpaeMacAuthBypassPortPostureTok=cpaeMacAuthBypassPortPostureTok, cpaeNotificationControl=cpaeNotificationControl, cpaeMabAuditInfoGroup=cpaeMabAuditInfoGroup, cpaeAuthFailVlanMaxAttempts=cpaeAuthFailVlanMaxAttempts, cpaeSuppHostInfoGroup=cpaeSuppHostInfoGroup, cpaeMacAuthBypassGroup2=cpaeMacAuthBypassGroup2, cpaeWebAuthPortInitialize=cpaeWebAuthPortInitialize, cpaePortEntryGroup=cpaePortEntryGroup, cpaeWebAuthUnAuthTimeoutGroup=cpaeWebAuthUnAuthTimeoutGroup, cpaeWebAuthUnAuthStateTimeout=cpaeWebAuthUnAuthStateTimeout, cpaeAuthFailUserEntry=cpaeAuthFailUserEntry, cpaeCriticalConfig=cpaeCriticalConfig, cpaeGlobalAuthFailMaxAttempts=cpaeGlobalAuthFailMaxAttempts, cpaePortEapolTestEntry=cpaePortEapolTestEntry, cpaeGuestVlanGroup=cpaeGuestVlanGroup)
|
arr = list(map(int, input().split()))
flag=True
for i in range(len(arr)):
if arr[i]!=arr[len(arr)-1-i]:
flag=False
break
if flag:
print('symmetric')
else:
print('not symmetric') |
def selectionSort(lst):
for selectedLocation in range(len(lst)-1,0,-1):
maxPosition=0
for currentindex in range(1,selectedLocation+1): #since range(0,4) is exclusive to 4
if lst[currentindex]>lst[maxPosition]:
maxPosition = currentindex
lst[selectedLocation], lst[maxPosition] = lst[maxPosition],lst[selectedLocation] ##swapping a,b = b,a swaps a to b and b to a
##implementation
lst = []
print ("input array size")
i = int(input())
for a in range(0,i):
ele= int(input(print("Enter element {0} ".format(a+1))))
lst.append(ele)
selectionSort(lst)
print(lst)
|
def get_coupons(self):
return self.handle_response(
self.request("/coupons"),
"coupons"
)
def create_coupon(self, **kwargs):
return self.handle_response(
self.request("/coupons", "POST", kwargs),
"uniqid"
)
def get_coupon(self, uniqid):
return self.handle_response(
self.request(f"/coupons/{uniqid}"),
"coupon"
)
def update_coupon(self, uniqid, **kwargs):
return self.handle_response(
self.request(f"/coupons/{uniqid}", "PUT", kwargs)
)
def delete_coupon(self, uniqid):
return self.handle_response(
self.request(f"/coupons/{uniqid}", "DELETE")
)
|
def main() -> None:
if __name__ == "__main__":
champernownes_constant = ''.join(str(x) for x in range(1, 1_000_000 + 1))
ans = int(champernownes_constant[1 - 1])
ans *= int(champernownes_constant[10 - 1])
ans *= int(champernownes_constant[100 - 1])
ans *= int(champernownes_constant[1_000 - 1])
ans *= int(champernownes_constant[10_000 - 1])
ans *= int(champernownes_constant[100_000 - 1])
ans *= int(champernownes_constant[1_000_000 - 1])
print(ans)
if __name__ == '__main__':
main()
|
def remove_every_other(lst):
"""Return a new list of other item.
>>> lst = [1, 2, 3, 4, 5]
>>> remove_every_other(lst)
[1, 3, 5]
This should return a list, not mutate the original:
>>> lst
[1, 2, 3, 4, 5]
"""
return lst[::2]
lst = [1, 2, 3, 4, 5]
print(F"remove_every_other.py: remove_every_other(lst) = [1, 3, 5] = {remove_every_other(lst)}")
print(F"remove_every_other.py: lst = [1, 2, 3, 4, 5] = {lst}")
|
# coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# 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.
INTENT_DICT = {
"book": 0,
"change": 1,
"cancel": 2,
0: "book",
1: "change",
2: "cancel",
}
STATUS_DICT = {
"book": 0,
"no_flight": 1,
"no_reservation": 2,
"cancel": 3,
0: "book",
1: "no_flight",
2: "no_reservation",
3: "cancel",
}
def intent_to_status(flight, res, intent):
"""
return status, flight
"""
if intent == 0:
if flight == 0:
return 1, 0
else:
return 0, flight
if intent == 1:
if not res:
return 2, 0
else:
if flight == 0:
return 1, 0
else:
return 0, flight
if intent == 2:
if not res:
return 2, 0
else:
return 3, 0
|
nome = str(input('Digite o seu nome completo: ')).title().strip()
print('Muito prazer em te conhecer, {}!!'.format(nome))
separa = nome.split()
print('Seu primeiro nome é: {}'.format(separa[0]))
print('Seu último nome é: {}'.format(separa[len(separa)-1]))
|
"""
PASSENGERS
"""
numPassengers = 3168
passenger_arriving = (
(3, 6, 9, 6, 1, 0, 8, 5, 3, 4, 5, 0), # 0
(4, 10, 5, 4, 2, 0, 4, 5, 6, 5, 3, 0), # 1
(4, 6, 6, 4, 2, 0, 6, 12, 3, 6, 1, 0), # 2
(3, 6, 9, 1, 2, 0, 2, 10, 1, 5, 0, 0), # 3
(5, 6, 8, 6, 3, 0, 2, 7, 9, 4, 1, 0), # 4
(4, 5, 6, 2, 2, 0, 4, 8, 3, 4, 2, 0), # 5
(6, 5, 5, 5, 2, 0, 7, 11, 8, 9, 3, 0), # 6
(3, 8, 9, 5, 3, 0, 9, 5, 6, 3, 3, 0), # 7
(4, 10, 5, 3, 3, 0, 10, 10, 2, 3, 3, 0), # 8
(6, 8, 7, 2, 1, 0, 10, 9, 1, 10, 1, 0), # 9
(7, 6, 3, 6, 1, 0, 8, 12, 7, 5, 2, 0), # 10
(3, 8, 7, 4, 4, 0, 5, 9, 12, 5, 3, 0), # 11
(1, 12, 7, 3, 1, 0, 8, 12, 3, 2, 1, 0), # 12
(8, 8, 8, 9, 2, 0, 10, 9, 6, 4, 2, 0), # 13
(5, 7, 7, 2, 2, 0, 8, 7, 5, 4, 1, 0), # 14
(2, 9, 9, 7, 1, 0, 4, 9, 7, 6, 4, 0), # 15
(4, 9, 6, 7, 1, 0, 8, 11, 6, 8, 4, 0), # 16
(4, 11, 4, 6, 0, 0, 7, 9, 5, 3, 2, 0), # 17
(4, 6, 8, 4, 3, 0, 8, 12, 4, 8, 3, 0), # 18
(3, 7, 4, 3, 4, 0, 2, 8, 5, 4, 1, 0), # 19
(4, 9, 7, 1, 3, 0, 12, 12, 3, 7, 2, 0), # 20
(4, 10, 8, 8, 1, 0, 6, 9, 3, 1, 6, 0), # 21
(1, 7, 6, 5, 4, 0, 7, 12, 4, 3, 4, 0), # 22
(6, 9, 9, 3, 1, 0, 3, 14, 6, 2, 2, 0), # 23
(1, 8, 3, 3, 6, 0, 7, 5, 5, 8, 2, 0), # 24
(5, 10, 9, 5, 3, 0, 5, 8, 2, 2, 0, 0), # 25
(3, 9, 8, 3, 1, 0, 12, 9, 2, 6, 1, 0), # 26
(4, 8, 4, 4, 4, 0, 4, 9, 4, 3, 3, 0), # 27
(2, 10, 7, 2, 2, 0, 5, 9, 1, 3, 2, 0), # 28
(3, 17, 13, 4, 2, 0, 8, 7, 2, 7, 3, 0), # 29
(4, 7, 9, 5, 4, 0, 10, 7, 5, 2, 1, 0), # 30
(5, 10, 7, 4, 4, 0, 11, 5, 6, 5, 2, 0), # 31
(5, 13, 8, 8, 2, 0, 8, 9, 9, 2, 3, 0), # 32
(3, 12, 7, 6, 1, 0, 5, 7, 6, 6, 2, 0), # 33
(2, 8, 11, 5, 1, 0, 11, 7, 7, 6, 2, 0), # 34
(1, 9, 8, 4, 2, 0, 9, 5, 4, 4, 3, 0), # 35
(7, 9, 5, 5, 1, 0, 5, 8, 2, 7, 3, 0), # 36
(3, 9, 6, 2, 1, 0, 5, 11, 3, 6, 0, 0), # 37
(4, 10, 8, 8, 0, 0, 4, 13, 4, 5, 3, 0), # 38
(3, 6, 12, 2, 1, 0, 3, 7, 9, 4, 2, 0), # 39
(5, 9, 5, 4, 4, 0, 9, 1, 1, 3, 3, 0), # 40
(5, 15, 4, 4, 2, 0, 8, 9, 5, 8, 0, 0), # 41
(4, 9, 5, 2, 4, 0, 9, 5, 10, 7, 4, 0), # 42
(6, 13, 7, 6, 0, 0, 5, 6, 5, 3, 4, 0), # 43
(4, 6, 7, 5, 1, 0, 6, 9, 11, 3, 5, 0), # 44
(2, 5, 7, 4, 1, 0, 6, 6, 4, 4, 0, 0), # 45
(4, 8, 5, 7, 1, 0, 8, 9, 6, 5, 3, 0), # 46
(8, 11, 8, 3, 3, 0, 4, 8, 6, 4, 2, 0), # 47
(2, 9, 2, 5, 1, 0, 9, 12, 6, 4, 5, 0), # 48
(5, 11, 5, 4, 1, 0, 5, 7, 3, 3, 1, 0), # 49
(6, 6, 3, 12, 2, 0, 5, 4, 4, 4, 0, 0), # 50
(4, 9, 7, 6, 3, 0, 8, 9, 5, 6, 2, 0), # 51
(7, 6, 7, 2, 4, 0, 8, 19, 7, 2, 7, 0), # 52
(1, 9, 5, 7, 0, 0, 10, 12, 2, 5, 2, 0), # 53
(2, 11, 10, 7, 3, 0, 3, 7, 3, 2, 2, 0), # 54
(3, 8, 7, 2, 4, 0, 6, 6, 5, 6, 5, 0), # 55
(6, 11, 10, 0, 3, 0, 9, 9, 7, 4, 2, 0), # 56
(5, 13, 7, 4, 1, 0, 5, 10, 6, 3, 2, 0), # 57
(3, 10, 13, 4, 1, 0, 6, 4, 8, 4, 5, 0), # 58
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 59
)
station_arriving_intensity = (
(3.7095121817383676, 9.515044981060607, 11.19193043059126, 8.87078804347826, 10.000240384615385, 6.659510869565219), # 0
(3.7443308140669203, 9.620858238197952, 11.252381752534994, 8.920190141908213, 10.075193108974359, 6.657240994867151), # 1
(3.7787518681104277, 9.725101964085297, 11.31139817195087, 8.968504830917876, 10.148564102564103, 6.654901690821256), # 2
(3.8127461259877085, 9.827663671875001, 11.368936576156813, 9.01569089673913, 10.22028605769231, 6.652493274456523), # 3
(3.8462843698175795, 9.928430874719417, 11.424953852470724, 9.061707125603865, 10.290291666666668, 6.6500160628019325), # 4
(3.879337381718857, 10.027291085770905, 11.479406888210512, 9.106512303743962, 10.358513621794872, 6.647470372886473), # 5
(3.9118759438103607, 10.12413181818182, 11.53225257069409, 9.150065217391306, 10.424884615384617, 6.644856521739131), # 6
(3.943870838210907, 10.218840585104518, 11.58344778723936, 9.19232465277778, 10.489337339743592, 6.64217482638889), # 7
(3.975292847039314, 10.311304899691358, 11.632949425164242, 9.233249396135266, 10.551804487179488, 6.639425603864735), # 8
(4.006112752414399, 10.401412275094698, 11.680714371786634, 9.272798233695653, 10.61221875, 6.636609171195653), # 9
(4.03630133645498, 10.489050224466892, 11.72669951442445, 9.310929951690824, 10.670512820512823, 6.633725845410628), # 10
(4.065829381279876, 10.5741062609603, 11.7708617403956, 9.347603336352659, 10.726619391025642, 6.630775943538648), # 11
(4.094667669007903, 10.656467897727273, 11.813157937017996, 9.382777173913043, 10.780471153846154, 6.627759782608695), # 12
(4.122786981757876, 10.736022647920176, 11.85354499160954, 9.416410250603866, 10.832000801282053, 6.624677679649759), # 13
(4.15015810164862, 10.81265802469136, 11.891979791488144, 9.448461352657004, 10.881141025641025, 6.621529951690821), # 14
(4.1767518107989465, 10.886261541193182, 11.928419223971721, 9.478889266304348, 10.92782451923077, 6.618316915760871), # 15
(4.202538891327675, 10.956720710578002, 11.96282017637818, 9.507652777777778, 10.971983974358976, 6.61503888888889), # 16
(4.227490125353625, 11.023923045998176, 11.995139536025421, 9.53471067330918, 11.013552083333336, 6.611696188103866), # 17
(4.25157629499561, 11.087756060606061, 12.025334190231364, 9.560021739130436, 11.052461538461543, 6.608289130434783), # 18
(4.274768182372451, 11.148107267554012, 12.053361026313912, 9.58354476147343, 11.088645032051284, 6.604818032910629), # 19
(4.297036569602966, 11.204864179994388, 12.079176931590974, 9.60523852657005, 11.122035256410259, 6.601283212560387), # 20
(4.318352238805971, 11.257914311079544, 12.102738793380466, 9.625061820652174, 11.152564903846153, 6.597684986413044), # 21
(4.338685972100283, 11.307145173961842, 12.124003499000287, 9.642973429951692, 11.180166666666667, 6.5940236714975855), # 22
(4.358008551604722, 11.352444281793632, 12.142927935768354, 9.658932140700484, 11.204773237179488, 6.590299584842997), # 23
(4.3762907594381035, 11.393699147727272, 12.159468991002571, 9.672896739130437, 11.226317307692307, 6.586513043478261), # 24
(4.393503377719247, 11.430797284915124, 12.173583552020853, 9.684826011473431, 11.244731570512819, 6.582664364432368), # 25
(4.409617188566969, 11.46362620650954, 12.185228506141103, 9.694678743961353, 11.259948717948719, 6.5787538647343), # 26
(4.424602974100088, 11.492073425662877, 12.194360740681233, 9.702413722826089, 11.271901442307694, 6.574781861413045), # 27
(4.438431516437421, 11.516026455527497, 12.200937142959157, 9.707989734299519, 11.280522435897437, 6.570748671497586), # 28
(4.4510735976977855, 11.535372809255753, 12.204914600292774, 9.711365564613528, 11.285744391025641, 6.566654612016909), # 29
(4.4625, 11.55, 12.20625, 9.7125, 11.287500000000001, 6.562500000000001), # 30
(4.47319183983376, 11.56215031960227, 12.205248928140096, 9.712295118464054, 11.286861125886526, 6.556726763701484), # 31
(4.4836528452685425, 11.574140056818184, 12.202274033816424, 9.711684477124184, 11.28495815602837, 6.547834661835751), # 32
(4.493887715792838, 11.585967720170455, 12.197367798913046, 9.710674080882354, 11.281811569148937, 6.535910757121439), # 33
(4.503901150895141, 11.597631818181819, 12.19057270531401, 9.709269934640524, 11.277441843971632, 6.521042112277196), # 34
(4.513697850063939, 11.609130859374998, 12.181931234903383, 9.707478043300654, 11.27186945921986, 6.503315790021656), # 35
(4.523282512787724, 11.62046335227273, 12.171485869565219, 9.705304411764708, 11.265114893617023, 6.482818853073463), # 36
(4.532659838554988, 11.631627805397729, 12.159279091183576, 9.70275504493464, 11.257198625886524, 6.4596383641512585), # 37
(4.5418345268542195, 11.642622727272729, 12.145353381642513, 9.699835947712419, 11.248141134751775, 6.433861385973679), # 38
(4.5508112771739135, 11.653446626420456, 12.129751222826087, 9.696553125000001, 11.23796289893617, 6.40557498125937), # 39
(4.559594789002558, 11.664098011363638, 12.11251509661836, 9.692912581699348, 11.22668439716312, 6.37486621272697), # 40
(4.568189761828645, 11.674575390625, 12.093687484903382, 9.68892032271242, 11.214326108156028, 6.34182214309512), # 41
(4.576600895140665, 11.684877272727276, 12.07331086956522, 9.684582352941177, 11.2009085106383, 6.3065298350824595), # 42
(4.584832888427111, 11.69500216619318, 12.051427732487923, 9.679904677287583, 11.186452083333334, 6.26907635140763), # 43
(4.592890441176471, 11.704948579545455, 12.028080555555556, 9.674893300653595, 11.17097730496454, 6.229548754789272), # 44
(4.600778252877237, 11.714715021306818, 12.003311820652177, 9.669554227941177, 11.15450465425532, 6.188034107946028), # 45
(4.6085010230179035, 11.724300000000003, 11.97716400966184, 9.663893464052288, 11.137054609929079, 6.144619473596536), # 46
(4.616063451086957, 11.733702024147728, 11.9496796044686, 9.65791701388889, 11.118647650709221, 6.099391914459438), # 47
(4.623470236572891, 11.742919602272728, 11.920901086956523, 9.651630882352942, 11.099304255319149, 6.052438493253375), # 48
(4.630726078964194, 11.751951242897727, 11.890870939009663, 9.645041074346407, 11.079044902482272, 6.003846272696985), # 49
(4.6378356777493615, 11.760795454545454, 11.85963164251208, 9.638153594771243, 11.057890070921987, 5.953702315508913), # 50
(4.6448037324168805, 11.769450745738636, 11.827225679347826, 9.630974448529413, 11.035860239361703, 5.902093684407797), # 51
(4.651634942455243, 11.777915625, 11.793695531400965, 9.623509640522876, 11.012975886524824, 5.849107442112278), # 52
(4.658334007352941, 11.786188600852274, 11.759083680555555, 9.615765175653596, 10.989257491134753, 5.794830651340996), # 53
(4.6649056265984665, 11.79426818181818, 11.723432608695653, 9.60774705882353, 10.964725531914894, 5.739350374812594), # 54
(4.671354499680307, 11.802152876420456, 11.686784797705313, 9.599461294934642, 10.939400487588653, 5.682753675245711), # 55
(4.677685326086957, 11.809841193181818, 11.649182729468599, 9.59091388888889, 10.913302836879433, 5.625127615358988), # 56
(4.683902805306906, 11.817331640625003, 11.610668885869565, 9.582110845588236, 10.886453058510638, 5.566559257871065), # 57
(4.690011636828645, 11.824622727272727, 11.57128574879227, 9.573058169934642, 10.858871631205675, 5.507135665500583), # 58
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 59
)
passenger_arriving_acc = (
(3, 6, 9, 6, 1, 0, 8, 5, 3, 4, 5, 0), # 0
(7, 16, 14, 10, 3, 0, 12, 10, 9, 9, 8, 0), # 1
(11, 22, 20, 14, 5, 0, 18, 22, 12, 15, 9, 0), # 2
(14, 28, 29, 15, 7, 0, 20, 32, 13, 20, 9, 0), # 3
(19, 34, 37, 21, 10, 0, 22, 39, 22, 24, 10, 0), # 4
(23, 39, 43, 23, 12, 0, 26, 47, 25, 28, 12, 0), # 5
(29, 44, 48, 28, 14, 0, 33, 58, 33, 37, 15, 0), # 6
(32, 52, 57, 33, 17, 0, 42, 63, 39, 40, 18, 0), # 7
(36, 62, 62, 36, 20, 0, 52, 73, 41, 43, 21, 0), # 8
(42, 70, 69, 38, 21, 0, 62, 82, 42, 53, 22, 0), # 9
(49, 76, 72, 44, 22, 0, 70, 94, 49, 58, 24, 0), # 10
(52, 84, 79, 48, 26, 0, 75, 103, 61, 63, 27, 0), # 11
(53, 96, 86, 51, 27, 0, 83, 115, 64, 65, 28, 0), # 12
(61, 104, 94, 60, 29, 0, 93, 124, 70, 69, 30, 0), # 13
(66, 111, 101, 62, 31, 0, 101, 131, 75, 73, 31, 0), # 14
(68, 120, 110, 69, 32, 0, 105, 140, 82, 79, 35, 0), # 15
(72, 129, 116, 76, 33, 0, 113, 151, 88, 87, 39, 0), # 16
(76, 140, 120, 82, 33, 0, 120, 160, 93, 90, 41, 0), # 17
(80, 146, 128, 86, 36, 0, 128, 172, 97, 98, 44, 0), # 18
(83, 153, 132, 89, 40, 0, 130, 180, 102, 102, 45, 0), # 19
(87, 162, 139, 90, 43, 0, 142, 192, 105, 109, 47, 0), # 20
(91, 172, 147, 98, 44, 0, 148, 201, 108, 110, 53, 0), # 21
(92, 179, 153, 103, 48, 0, 155, 213, 112, 113, 57, 0), # 22
(98, 188, 162, 106, 49, 0, 158, 227, 118, 115, 59, 0), # 23
(99, 196, 165, 109, 55, 0, 165, 232, 123, 123, 61, 0), # 24
(104, 206, 174, 114, 58, 0, 170, 240, 125, 125, 61, 0), # 25
(107, 215, 182, 117, 59, 0, 182, 249, 127, 131, 62, 0), # 26
(111, 223, 186, 121, 63, 0, 186, 258, 131, 134, 65, 0), # 27
(113, 233, 193, 123, 65, 0, 191, 267, 132, 137, 67, 0), # 28
(116, 250, 206, 127, 67, 0, 199, 274, 134, 144, 70, 0), # 29
(120, 257, 215, 132, 71, 0, 209, 281, 139, 146, 71, 0), # 30
(125, 267, 222, 136, 75, 0, 220, 286, 145, 151, 73, 0), # 31
(130, 280, 230, 144, 77, 0, 228, 295, 154, 153, 76, 0), # 32
(133, 292, 237, 150, 78, 0, 233, 302, 160, 159, 78, 0), # 33
(135, 300, 248, 155, 79, 0, 244, 309, 167, 165, 80, 0), # 34
(136, 309, 256, 159, 81, 0, 253, 314, 171, 169, 83, 0), # 35
(143, 318, 261, 164, 82, 0, 258, 322, 173, 176, 86, 0), # 36
(146, 327, 267, 166, 83, 0, 263, 333, 176, 182, 86, 0), # 37
(150, 337, 275, 174, 83, 0, 267, 346, 180, 187, 89, 0), # 38
(153, 343, 287, 176, 84, 0, 270, 353, 189, 191, 91, 0), # 39
(158, 352, 292, 180, 88, 0, 279, 354, 190, 194, 94, 0), # 40
(163, 367, 296, 184, 90, 0, 287, 363, 195, 202, 94, 0), # 41
(167, 376, 301, 186, 94, 0, 296, 368, 205, 209, 98, 0), # 42
(173, 389, 308, 192, 94, 0, 301, 374, 210, 212, 102, 0), # 43
(177, 395, 315, 197, 95, 0, 307, 383, 221, 215, 107, 0), # 44
(179, 400, 322, 201, 96, 0, 313, 389, 225, 219, 107, 0), # 45
(183, 408, 327, 208, 97, 0, 321, 398, 231, 224, 110, 0), # 46
(191, 419, 335, 211, 100, 0, 325, 406, 237, 228, 112, 0), # 47
(193, 428, 337, 216, 101, 0, 334, 418, 243, 232, 117, 0), # 48
(198, 439, 342, 220, 102, 0, 339, 425, 246, 235, 118, 0), # 49
(204, 445, 345, 232, 104, 0, 344, 429, 250, 239, 118, 0), # 50
(208, 454, 352, 238, 107, 0, 352, 438, 255, 245, 120, 0), # 51
(215, 460, 359, 240, 111, 0, 360, 457, 262, 247, 127, 0), # 52
(216, 469, 364, 247, 111, 0, 370, 469, 264, 252, 129, 0), # 53
(218, 480, 374, 254, 114, 0, 373, 476, 267, 254, 131, 0), # 54
(221, 488, 381, 256, 118, 0, 379, 482, 272, 260, 136, 0), # 55
(227, 499, 391, 256, 121, 0, 388, 491, 279, 264, 138, 0), # 56
(232, 512, 398, 260, 122, 0, 393, 501, 285, 267, 140, 0), # 57
(235, 522, 411, 264, 123, 0, 399, 505, 293, 271, 145, 0), # 58
(235, 522, 411, 264, 123, 0, 399, 505, 293, 271, 145, 0), # 59
)
passenger_arriving_rate = (
(3.7095121817383676, 7.612035984848484, 6.715158258354756, 3.5483152173913037, 2.000048076923077, 0.0, 6.659510869565219, 8.000192307692307, 5.322472826086956, 4.476772172236504, 1.903008996212121, 0.0), # 0
(3.7443308140669203, 7.696686590558361, 6.751429051520996, 3.5680760567632848, 2.0150386217948717, 0.0, 6.657240994867151, 8.060154487179487, 5.352114085144928, 4.500952701013997, 1.9241716476395903, 0.0), # 1
(3.7787518681104277, 7.780081571268237, 6.786838903170522, 3.58740193236715, 2.0297128205128203, 0.0, 6.654901690821256, 8.118851282051281, 5.381102898550726, 4.524559268780347, 1.9450203928170593, 0.0), # 2
(3.8127461259877085, 7.8621309375, 6.821361945694087, 3.6062763586956517, 2.044057211538462, 0.0, 6.652493274456523, 8.176228846153847, 5.409414538043478, 4.547574630462725, 1.965532734375, 0.0), # 3
(3.8462843698175795, 7.942744699775533, 6.854972311482434, 3.624682850241546, 2.0580583333333333, 0.0, 6.6500160628019325, 8.232233333333333, 5.437024275362319, 4.569981540988289, 1.9856861749438832, 0.0), # 4
(3.879337381718857, 8.021832868616723, 6.887644132926307, 3.6426049214975844, 2.0717027243589743, 0.0, 6.647470372886473, 8.286810897435897, 5.463907382246377, 4.591762755284204, 2.005458217154181, 0.0), # 5
(3.9118759438103607, 8.099305454545455, 6.919351542416455, 3.660026086956522, 2.084976923076923, 0.0, 6.644856521739131, 8.339907692307692, 5.490039130434783, 4.612901028277636, 2.0248263636363637, 0.0), # 6
(3.943870838210907, 8.175072468083613, 6.950068672343615, 3.6769298611111116, 2.0978674679487184, 0.0, 6.64217482638889, 8.391469871794873, 5.515394791666668, 4.633379114895743, 2.043768117020903, 0.0), # 7
(3.975292847039314, 8.249043919753085, 6.979769655098544, 3.693299758454106, 2.1103608974358976, 0.0, 6.639425603864735, 8.44144358974359, 5.5399496376811594, 4.653179770065696, 2.062260979938271, 0.0), # 8
(4.006112752414399, 8.321129820075758, 7.00842862307198, 3.709119293478261, 2.12244375, 0.0, 6.636609171195653, 8.489775, 5.563678940217391, 4.672285748714653, 2.0802824550189394, 0.0), # 9
(4.03630133645498, 8.391240179573513, 7.03601970865467, 3.724371980676329, 2.134102564102564, 0.0, 6.633725845410628, 8.536410256410257, 5.586557971014494, 4.690679805769779, 2.0978100448933783, 0.0), # 10
(4.065829381279876, 8.459285008768239, 7.06251704423736, 3.739041334541063, 2.145323878205128, 0.0, 6.630775943538648, 8.581295512820512, 5.608562001811595, 4.70834469615824, 2.1148212521920597, 0.0), # 11
(4.094667669007903, 8.525174318181818, 7.087894762210797, 3.7531108695652167, 2.156094230769231, 0.0, 6.627759782608695, 8.624376923076923, 5.6296663043478254, 4.725263174807198, 2.1312935795454546, 0.0), # 12
(4.122786981757876, 8.58881811833614, 7.112126994965724, 3.766564100241546, 2.1664001602564102, 0.0, 6.624677679649759, 8.665600641025641, 5.649846150362319, 4.741417996643816, 2.147204529584035, 0.0), # 13
(4.15015810164862, 8.650126419753088, 7.135187874892886, 3.779384541062801, 2.1762282051282047, 0.0, 6.621529951690821, 8.704912820512819, 5.669076811594202, 4.756791916595257, 2.162531604938272, 0.0), # 14
(4.1767518107989465, 8.709009232954545, 7.157051534383032, 3.7915557065217387, 2.1855649038461538, 0.0, 6.618316915760871, 8.742259615384615, 5.6873335597826085, 4.771367689588688, 2.177252308238636, 0.0), # 15
(4.202538891327675, 8.7653765684624, 7.177692105826908, 3.803061111111111, 2.194396794871795, 0.0, 6.61503888888889, 8.77758717948718, 5.7045916666666665, 4.785128070551272, 2.1913441421156, 0.0), # 16
(4.227490125353625, 8.81913843679854, 7.197083721615253, 3.8138842693236716, 2.202710416666667, 0.0, 6.611696188103866, 8.810841666666668, 5.720826403985508, 4.798055814410168, 2.204784609199635, 0.0), # 17
(4.25157629499561, 8.870204848484848, 7.215200514138818, 3.824008695652174, 2.2104923076923084, 0.0, 6.608289130434783, 8.841969230769234, 5.736013043478262, 4.810133676092545, 2.217551212121212, 0.0), # 18
(4.274768182372451, 8.918485814043208, 7.232016615788346, 3.8334179045893717, 2.2177290064102566, 0.0, 6.604818032910629, 8.870916025641026, 5.750126856884058, 4.8213444105255645, 2.229621453510802, 0.0), # 19
(4.297036569602966, 8.96389134399551, 7.247506158954584, 3.8420954106280196, 2.2244070512820517, 0.0, 6.601283212560387, 8.897628205128207, 5.76314311594203, 4.831670772636389, 2.2409728359988774, 0.0), # 20
(4.318352238805971, 9.006331448863634, 7.261643276028279, 3.8500247282608693, 2.2305129807692303, 0.0, 6.597684986413044, 8.922051923076921, 5.775037092391305, 4.841095517352186, 2.2515828622159084, 0.0), # 21
(4.338685972100283, 9.045716139169473, 7.274402099400172, 3.8571893719806765, 2.2360333333333333, 0.0, 6.5940236714975855, 8.944133333333333, 5.785784057971015, 4.849601399600115, 2.2614290347923682, 0.0), # 22
(4.358008551604722, 9.081955425434906, 7.285756761461012, 3.8635728562801934, 2.2409546474358972, 0.0, 6.590299584842997, 8.963818589743589, 5.79535928442029, 4.857171174307341, 2.2704888563587264, 0.0), # 23
(4.3762907594381035, 9.114959318181818, 7.295681394601543, 3.869158695652174, 2.2452634615384612, 0.0, 6.586513043478261, 8.981053846153845, 5.803738043478262, 4.863787596401028, 2.2787398295454544, 0.0), # 24
(4.393503377719247, 9.1446378279321, 7.304150131212511, 3.8739304045893723, 2.2489463141025636, 0.0, 6.582664364432368, 8.995785256410255, 5.810895606884059, 4.869433420808341, 2.286159456983025, 0.0), # 25
(4.409617188566969, 9.17090096520763, 7.311137103684661, 3.8778714975845405, 2.2519897435897436, 0.0, 6.5787538647343, 9.007958974358974, 5.816807246376811, 4.874091402456441, 2.2927252413019077, 0.0), # 26
(4.424602974100088, 9.193658740530301, 7.31661644440874, 3.880965489130435, 2.2543802884615385, 0.0, 6.574781861413045, 9.017521153846154, 5.821448233695653, 4.877744296272493, 2.2984146851325753, 0.0), # 27
(4.438431516437421, 9.212821164421996, 7.320562285775494, 3.8831958937198072, 2.256104487179487, 0.0, 6.570748671497586, 9.024417948717948, 5.824793840579711, 4.8803748571836625, 2.303205291105499, 0.0), # 28
(4.4510735976977855, 9.228298247404602, 7.322948760175664, 3.884546225845411, 2.257148878205128, 0.0, 6.566654612016909, 9.028595512820512, 5.826819338768117, 4.881965840117109, 2.3070745618511506, 0.0), # 29
(4.4625, 9.24, 7.32375, 3.885, 2.2575000000000003, 0.0, 6.562500000000001, 9.030000000000001, 5.8275, 4.8825, 2.31, 0.0), # 30
(4.47319183983376, 9.249720255681815, 7.323149356884057, 3.884918047385621, 2.257372225177305, 0.0, 6.556726763701484, 9.02948890070922, 5.827377071078432, 4.882099571256038, 2.312430063920454, 0.0), # 31
(4.4836528452685425, 9.259312045454546, 7.3213644202898545, 3.884673790849673, 2.2569916312056737, 0.0, 6.547834661835751, 9.027966524822695, 5.82701068627451, 4.880909613526569, 2.3148280113636366, 0.0), # 32
(4.493887715792838, 9.268774176136363, 7.3184206793478275, 3.8842696323529413, 2.2563623138297872, 0.0, 6.535910757121439, 9.025449255319149, 5.826404448529412, 4.878947119565218, 2.3171935440340907, 0.0), # 33
(4.503901150895141, 9.278105454545454, 7.314343623188405, 3.8837079738562093, 2.2554883687943263, 0.0, 6.521042112277196, 9.021953475177305, 5.825561960784314, 4.876229082125604, 2.3195263636363634, 0.0), # 34
(4.513697850063939, 9.287304687499997, 7.3091587409420296, 3.882991217320261, 2.2543738918439717, 0.0, 6.503315790021656, 9.017495567375887, 5.824486825980392, 4.872772493961353, 2.3218261718749993, 0.0), # 35
(4.523282512787724, 9.296370681818182, 7.302891521739131, 3.8821217647058828, 2.253022978723404, 0.0, 6.482818853073463, 9.012091914893617, 5.823182647058824, 4.868594347826087, 2.3240926704545455, 0.0), # 36
(4.532659838554988, 9.305302244318183, 7.295567454710145, 3.881102017973856, 2.2514397251773044, 0.0, 6.4596383641512585, 9.005758900709218, 5.821653026960784, 4.86371163647343, 2.3263255610795457, 0.0), # 37
(4.5418345268542195, 9.314098181818181, 7.287212028985508, 3.8799343790849674, 2.249628226950355, 0.0, 6.433861385973679, 8.99851290780142, 5.819901568627452, 4.858141352657005, 2.3285245454545453, 0.0), # 38
(4.5508112771739135, 9.322757301136363, 7.277850733695652, 3.87862125, 2.247592579787234, 0.0, 6.40557498125937, 8.990370319148935, 5.817931875, 4.8519004891304345, 2.330689325284091, 0.0), # 39
(4.559594789002558, 9.33127840909091, 7.267509057971015, 3.8771650326797387, 2.245336879432624, 0.0, 6.37486621272697, 8.981347517730496, 5.815747549019608, 4.845006038647344, 2.3328196022727274, 0.0), # 40
(4.568189761828645, 9.3396603125, 7.256212490942029, 3.8755681290849675, 2.2428652216312055, 0.0, 6.34182214309512, 8.971460886524822, 5.813352193627452, 4.837474993961353, 2.334915078125, 0.0), # 41
(4.576600895140665, 9.34790181818182, 7.2439865217391315, 3.8738329411764707, 2.2401817021276598, 0.0, 6.3065298350824595, 8.960726808510639, 5.810749411764706, 4.829324347826088, 2.336975454545455, 0.0), # 42
(4.584832888427111, 9.356001732954544, 7.230856639492753, 3.8719618709150327, 2.2372904166666667, 0.0, 6.26907635140763, 8.949161666666667, 5.80794280637255, 4.820571092995169, 2.339000433238636, 0.0), # 43
(4.592890441176471, 9.363958863636363, 7.216848333333333, 3.8699573202614377, 2.2341954609929076, 0.0, 6.229548754789272, 8.93678184397163, 5.804935980392157, 4.811232222222222, 2.3409897159090907, 0.0), # 44
(4.600778252877237, 9.371772017045453, 7.201987092391306, 3.8678216911764705, 2.230900930851064, 0.0, 6.188034107946028, 8.923603723404256, 5.801732536764706, 4.80132472826087, 2.3429430042613633, 0.0), # 45
(4.6085010230179035, 9.379440000000002, 7.186298405797103, 3.8655573856209147, 2.2274109219858156, 0.0, 6.144619473596536, 8.909643687943262, 5.798336078431372, 4.790865603864735, 2.3448600000000006, 0.0), # 46
(4.616063451086957, 9.386961619318182, 7.16980776268116, 3.8631668055555552, 2.223729530141844, 0.0, 6.099391914459438, 8.894918120567375, 5.794750208333333, 4.77987184178744, 2.3467404048295455, 0.0), # 47
(4.623470236572891, 9.394335681818182, 7.152540652173913, 3.8606523529411763, 2.21986085106383, 0.0, 6.052438493253375, 8.87944340425532, 5.790978529411765, 4.7683604347826085, 2.3485839204545456, 0.0), # 48
(4.630726078964194, 9.401560994318181, 7.134522563405797, 3.8580164297385626, 2.2158089804964543, 0.0, 6.003846272696985, 8.863235921985817, 5.787024644607844, 4.7563483756038645, 2.3503902485795454, 0.0), # 49
(4.6378356777493615, 9.408636363636361, 7.115778985507247, 3.8552614379084966, 2.211578014184397, 0.0, 5.953702315508913, 8.846312056737588, 5.782892156862745, 4.743852657004831, 2.3521590909090904, 0.0), # 50
(4.6448037324168805, 9.415560596590907, 7.096335407608696, 3.852389779411765, 2.2071720478723407, 0.0, 5.902093684407797, 8.828688191489363, 5.778584669117648, 4.73089027173913, 2.353890149147727, 0.0), # 51
(4.651634942455243, 9.4223325, 7.0762173188405795, 3.84940385620915, 2.2025951773049646, 0.0, 5.849107442112278, 8.810380709219858, 5.774105784313726, 4.717478212560386, 2.355583125, 0.0), # 52
(4.658334007352941, 9.428950880681818, 7.055450208333333, 3.8463060702614382, 2.1978514982269504, 0.0, 5.794830651340996, 8.791405992907801, 5.769459105392158, 4.703633472222222, 2.3572377201704544, 0.0), # 53
(4.6649056265984665, 9.435414545454544, 7.034059565217391, 3.843098823529412, 2.192945106382979, 0.0, 5.739350374812594, 8.771780425531915, 5.764648235294119, 4.689373043478261, 2.358853636363636, 0.0), # 54
(4.671354499680307, 9.441722301136364, 7.012070878623187, 3.8397845179738566, 2.1878800975177306, 0.0, 5.682753675245711, 8.751520390070922, 5.759676776960785, 4.674713919082125, 2.360430575284091, 0.0), # 55
(4.677685326086957, 9.447872954545453, 6.989509637681159, 3.8363655555555556, 2.1826605673758865, 0.0, 5.625127615358988, 8.730642269503546, 5.754548333333334, 4.65967309178744, 2.361968238636363, 0.0), # 56
(4.683902805306906, 9.453865312500001, 6.966401331521738, 3.832844338235294, 2.1772906117021273, 0.0, 5.566559257871065, 8.70916244680851, 5.749266507352941, 4.644267554347826, 2.3634663281250003, 0.0), # 57
(4.690011636828645, 9.459698181818181, 6.942771449275362, 3.8292232679738563, 2.1717743262411346, 0.0, 5.507135665500583, 8.687097304964539, 5.743834901960785, 4.628514299516908, 2.3649245454545453, 0.0), # 58
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), # 59
)
passenger_allighting_rate = (
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 0
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 1
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 2
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 3
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 4
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 5
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 6
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 7
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 8
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 9
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 10
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 11
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 12
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 13
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 14
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 15
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 16
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 17
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 18
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 19
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 20
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 21
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 22
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 23
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 24
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 25
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 26
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 27
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 28
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 29
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 30
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 31
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 32
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 33
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 34
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 35
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 36
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 37
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 38
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 39
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 40
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 41
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 42
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 43
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 44
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 45
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 46
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 47
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 48
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 49
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 50
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 51
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 52
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 53
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 54
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 55
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 56
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 57
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 58
(0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1, 0, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 0.16666666666666666, 1), # 59
)
"""
parameters for reproducibiliy. More information: https://numpy.org/doc/stable/reference/random/parallel.html
"""
#initial entropy
entropy = 258194110137029475889902652135037600173
#index for seed sequence child
child_seed_index = (
1, # 0
56, # 1
)
|
ies = []
ies.append({ "ie_type" : "Node ID", "ie_value" : "Node ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the unique identifier of the sending Node."})
ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : "This IE shall indicate the acceptance or the rejection of the corresponding request message."})
msg_list[key]["ies"] = ies
|
# coding: utf-8
# # Variable Types - Boolean
# In the last lesson we learnt how to index and slice strings. We also learnt how to use some common string functions such as the <code>len()</code> function.
#
# In this lesson, we'll learn about Boolean values. Boolean values evaluate to either True or False and are commonly used for comparisons of equality and inequality, as well as controlling the flow of a program.
# ## Boolean Values
# Boolean values evaluate to True or False. You can see how Jupyter highlights these keywords:
# In[1]:
boolTrue = True
boolFalse = False
# Integers, floats and strings can be evaluated to a boolean value by using the <code>bool()</code> function.
#
# All non-zero numbers evaluate to <code>True</code> whilst 0 evaluates to <code>False</code>:
# In[2]:
bool(0)
# In[3]:
bool(0.00000000001)
# In[4]:
bool(10)
# All non-empty strings evaluate to <code>True</code>, whilst an empty string evaluates to <code>False</code>:
# In[5]:
bool("hi")
# In[6]:
bool(' ')
# In[7]:
bool('')
# ## And, Or and Not
#
# You can also create more complex boolean expressions by using <code>and</code>, <code>or</code> and <code>not</code> to compare multiple expressions.
#
# <code>and</code> only returns <code>True</code> if all the boolean expressions evaluate to <code>True</code>:
# In[8]:
print(True and True)
# In[9]:
print(True and False)
# In[10]:
print(True and True and True and True and False)
# <code>or</code> returns <code>True</code> if at least one expression evalutes to <code>True</code>:
# In[11]:
print(True or False)
# In[12]:
print(False or False)
# In[13]:
print(False or False or False or False or True)
# <code>not</code> inverts the boolean expression; <code>True</code> becomes <code>False</code> and vice versa:
# In[14]:
print(not True)
# In[15]:
print(not False)
# In[16]:
print(not(True and True))
# You can use brackets to create complex expressions. What do you think this evaluates to?
# In[17]:
print(not (True or False) and not(False and True))
# ## Logical comparisons
#
# We've just seen the basics of boolean values, however comparing <code>True</code> and <code>False</code> isn't particularly useful. The power of boolean values lies in how we can use them to compare values.
#
# In Python, we can test for equality by using the <code>==</code> symbol; this test for equality returns a boolean value:
# In[18]:
5 == 5
# In[19]:
5 == 10
# We can also test for inequality using <code>!=</code>; this also returns a boolean value:
# In[20]:
1 != 2
# In[21]:
1 != 1
# <code>==</code> and <code>!=</code> both work on strings:
# In[22]:
'hi' == 'hi'
# In[23]:
'hi' != 'ho'
# We can test if a number is greater than another number using <code>></code>:
# In[24]:
5 > 4
# In[25]:
5 > 10
# We can test if a number is greater than or equal to another number by using <code>>=</code>
# In[26]:
5 >= 4
# In[27]:
5 >= 5
# In[28]:
5 >= 6
# We can also test if a number is less than another number by using <code><</code>:
# In[29]:
5 < 4
# In[30]:
10 < 100
# An we can test if a number is less than or equal to another number by using <code><=</code>:
# In[31]:
5 <= 7
# In[32]:
5 <= 5
# In[33]:
5 <= 4
# We can also do these comparisons on strings. Python compares the first two items in the string and if they differ, this determines the outcome of the comparison. If they're the same, the next two items are compared:
# In[34]:
'a' < 'b'
# In[35]:
'hi' < 'ho'
# In[36]:
'z' < 'x'
# ### Combining comparisons with And, Or and Not
# We now know how to create complex comparisons of strings and numbers. For the following examples, try to figure out what the answer will be before you run the cell.
# In[37]:
1 != 3 and 2 == 5
# In[38]:
"test" != "testing" and 5 == 5
# In[39]:
"one" == 1
# In[40]:
not (True and False)
# In[41]:
not (4 == 4 and 0 != 10)
# ### What have we learnt this lesson?
# In this class we've learnt about Boolean values and how to use them for comparisons of equality and inequality, as well as how to make complex comparisons. We also briefly touched upon using Boolean values to control the flow of a program. We'll return to this in a later lesson.
# If you have any questions, please ask in the comments section or email <a href="mailto:me@richard-muir.com">me@richard-muir.com</a>
|
RAW_PATH = "./data/raw/"
INTERIM_PATH = "./data/interim/"
REFINED_PATH = "./data/refined/"
EXTERNAL_PATH = "./data/external/"
SUBMIT_PATH = "./data/submission/"
MODELS_PATH = "./data/models/"
CAL_DTYPES = {
"event_name_1": "category",
"event_name_2": "category",
"event_type_1": "category",
"event_type_2": "category",
"weekday": "category",
"wm_yr_wk": "int16",
"wday": "int16",
"month": "int16",
"year": "int16",
"snap_CA": "float32",
"snap_TX": "float32",
"snap_WI": "float32",
}
PRICE_DTYPES = {
"store_id": "category",
"item_id": "category",
"wm_yr_wk": "int16",
"sell_price": "float32",
}
## features
cat_feats = ['item_id',
'dept_id',
'store_id',
'cat_id',
'state_id'] + \
["event_name_1",
"event_name_2",
"event_type_1",
"event_type_2"]
useless_cols = ["id",
"date",
"sales",
"d",
"wm_yr_wk",
"weekday",
"rate"
]
|
# model settings
norm_cfg = dict(type='SyncBN', requires_grad=True)
model = dict(
type='CascadeEncoderDecoder',
num_stages=2,
pretrained='open-mmlab://resnet50_v1c',
backbone=dict(
type='ResNetV1c',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
dilations=(1, 1, 2, 4),
strides=(1, 2, 1, 1),
norm_cfg=norm_cfg,
norm_eval=False,
style='pytorch',
contract_dilation=True),
decode_head=[
dict(
type='FCNHead',
in_channels=1024,
in_index=2,
channels=256,
num_convs=1,
concat_input=False,
dropout_ratio=0.1,
num_classes=3,
norm_cfg=norm_cfg,
align_corners=False,
loss_decode=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
dict(
type='OCRHead',
in_channels=2048,
in_index=3,
channels=512,
ocr_channels=256,
dropout_ratio=0.1,
num_classes=3,
norm_cfg=norm_cfg,
align_corners=False,
loss_decode=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0))
],
# model training and testing settings
train_cfg=dict(),
test_cfg=dict(mode='whole'))
|
# HEADER: graph-level graphviz/dot attributes, including
# - default node style (e.g. rounded boxes, ovals, etc)
# - default edge style
HEADER = """
digraph{
rankdir=LR
//ranksep=0.3
node[shape=box
style="rounded,filled"
fillcolor="#FFFFCC"
fontname=helvetica fontsize=12]
edge[fontname=courier fontsize=10]
"""
# BLOCK: how to render block (=actor) nodes; e.g. 3D boxes
BLOCK = 'shape=box3d fontname=courier fillcolor="#CCFFCC"'
# Styles for in- and out-edges
INEDGE = 'style=dashed label=in'
OUTEDGE = 'label=out'
# All good things must end sometime ..
TRAILER = "}"
|
{
'variables': {
'chromium_code': 1,
'pdf_engine%': 0, # 0 PDFium
},
'target_defaults': {
'cflags': [
'-fPIC',
],
},
'targets': [
{
'target_name': 'pdf',
'type': 'loadable_module',
'msvs_guid': '647863C0-C7A3-469A-B1ED-AD7283C34BED',
'dependencies': [
'../base/base.gyp:base',
'../net/net.gyp:net',
'../ppapi/ppapi.gyp:ppapi_cpp',
'../third_party/pdfium/pdfium.gyp:pdfium',
],
'xcode_settings': {
'INFOPLIST_FILE': 'Info.plist',
},
'mac_framework_dirs': [
'$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
],
'ldflags': [ '-L<(PRODUCT_DIR)',],
'sources': [
'button.h',
'button.cc',
'chunk_stream.h',
'chunk_stream.cc',
'control.h',
'control.cc',
'document_loader.h',
'document_loader.cc',
'draw_utils.cc',
'draw_utils.h',
'fading_control.cc',
'fading_control.h',
'fading_controls.cc',
'fading_controls.h',
'instance.cc',
'instance.h',
'number_image_generator.cc',
'number_image_generator.h',
'out_of_process_instance.cc',
'out_of_process_instance.h',
'page_indicator.cc',
'page_indicator.h',
'paint_aggregator.cc',
'paint_aggregator.h',
'paint_manager.cc',
'paint_manager.h',
'pdf.cc',
'pdf.h',
'pdf.rc',
'progress_control.cc',
'progress_control.h',
'pdf_engine.h',
'preview_mode_client.cc',
'preview_mode_client.h',
'resource.h',
'resource_consts.h',
'thumbnail_control.cc',
'thumbnail_control.h',
'../chrome/browser/chrome_page_zoom_constants.cc',
'../content/common/page_zoom.cc',
],
'conditions': [
['pdf_engine==0', {
'sources': [
'pdfium/pdfium_assert_matching_enums.cc',
'pdfium/pdfium_engine.cc',
'pdfium/pdfium_engine.h',
'pdfium/pdfium_mem_buffer_file_read.cc',
'pdfium/pdfium_mem_buffer_file_read.h',
'pdfium/pdfium_mem_buffer_file_write.cc',
'pdfium/pdfium_mem_buffer_file_write.h',
'pdfium/pdfium_page.cc',
'pdfium/pdfium_page.h',
'pdfium/pdfium_range.cc',
'pdfium/pdfium_range.h',
],
}],
['OS!="win"', {
'sources!': [
'pdf.rc',
],
}],
['OS=="mac"', {
'mac_bundle': 1,
'product_name': 'PDF',
'product_extension': 'plugin',
# Strip the shipping binary of symbols so "Foxit" doesn't appear in
# the binary. Symbols are stored in a separate .dSYM.
'variables': {
'mac_real_dsym': 1,
},
'sources+': [
'Info.plist'
],
}],
['OS=="win"', {
'defines': [
'COMPILE_CONTENT_STATICALLY',
],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
}],
['OS=="linux"', {
'configurations': {
'Release_Base': {
#'cflags': [ '-fno-weak',], # get rid of symbols that strip doesn't remove.
# Don't do this for now since official builder will take care of it. That
# way symbols can still be uploaded to the crash server.
#'ldflags': [ '-s',], # strip local symbols from binary.
},
},
}],
],
},
],
'conditions': [
# CrOS has a separate step to do this.
['OS=="linux" and chromeos==0',
{ 'targets': [
{
'target_name': 'pdf_linux_symbols',
'type': 'none',
'conditions': [
['linux_dump_symbols==1', {
'actions': [
{
'action_name': 'dump_symbols',
'inputs': [
'<(DEPTH)/build/linux/dump_app_syms',
'<(PRODUCT_DIR)/dump_syms',
'<(PRODUCT_DIR)/libpdf.so',
],
'outputs': [
'<(PRODUCT_DIR)/libpdf.so.breakpad.<(target_arch)',
],
'action': ['<(DEPTH)/build/linux/dump_app_syms',
'<(PRODUCT_DIR)/dump_syms',
'<(linux_strip_binary)',
'<(PRODUCT_DIR)/libpdf.so',
'<@(_outputs)'],
'message': 'Dumping breakpad symbols to <(_outputs)',
'process_outputs_as_sources': 1,
},
],
'dependencies': [
'pdf',
'../breakpad/breakpad.gyp:dump_syms',
],
}],
],
},
],
},], # OS=="linux" and chromeos==0
['OS=="win" and fastbuild==0 and target_arch=="ia32" and syzyasan==1', {
'variables': {
'dest_dir': '<(PRODUCT_DIR)/syzygy',
},
'targets': [
{
'target_name': 'pdf_syzyasan',
'type': 'none',
'sources' : [],
'dependencies': [
'pdf',
],
# Instrument PDFium with SyzyAsan.
'actions': [
{
'action_name': 'Instrument PDFium with SyzyAsan',
'inputs': [
'<(PRODUCT_DIR)/pdf.dll',
],
'outputs': [
'<(dest_dir)/pdf.dll',
'<(dest_dir)/pdf.dll.pdb',
],
'action': [
'python',
'<(DEPTH)/chrome/tools/build/win/syzygy/instrument.py',
'--mode', 'asan',
'--input_executable', '<(PRODUCT_DIR)/pdf.dll',
'--input_symbol', '<(PRODUCT_DIR)/pdf.dll.pdb',
'--destination_dir', '<(dest_dir)',
],
},
],
},
],
}], # OS=="win" and fastbuild==0 and target_arch=="ia32" and syzyasan==1
],
}
|
"""
Basic Heapsort program.
"""
def heapify(arr, n, i):
"""
Heapifies subtree rooted at index i
n - size of the heap
"""
largest = i
l = 2 * i + 1
r = 2 * i + 2
# see if left child of root exists and is
# greater than root
if l < n and arr[largest] < arr[l]:
largest = l
# see if right child of root exists and is
# greater than root
if r < n and arr[largest] < arr[r]:
largest = r
# change root, if needed
if largest != i:
arr[i], arr[largest] = arr[largest], arr[i]
# heapift the root
heapify(arr, n, largest)
def heap_sort(arr):
n = len(arr)
# build a maxheap
for i in range(n // 2 -1, -1, -1):
heapify(arr, n, i)
# extract the elements one by one
for i in range(n - 1, 0, -1):
arr[i], arr[0] = arr[0], arr[i]
heapify(arr, i, 0)
return arr |
initials = [
"b",
"c",
"ch",
"d",
"f",
"g",
"h",
"j",
"k",
"l",
"m",
"n",
"p",
"q",
"r",
"s",
"sh",
"t",
"w",
"x",
"y",
"z",
"zh",
]
finals = [
"a1",
"a2",
"a3",
"a4",
"a5",
"ai1",
"ai2",
"ai3",
"ai4",
"ai5",
"an1",
"an2",
"an3",
"an4",
"an5",
"ang1",
"ang2",
"ang3",
"ang4",
"ang5",
"ao1",
"ao2",
"ao3",
"ao4",
"ao5",
"e1",
"e2",
"e3",
"e4",
"e5",
"ei1",
"ei2",
"ei3",
"ei4",
"ei5",
"en1",
"en2",
"en3",
"en4",
"en5",
"eng1",
"eng2",
"eng3",
"eng4",
"eng5",
"er1",
"er2",
"er3",
"er4",
"er5",
"i1",
"i2",
"i3",
"i4",
"i5",
"ia1",
"ia2",
"ia3",
"ia4",
"ia5",
"ian1",
"ian2",
"ian3",
"ian4",
"ian5",
"iang1",
"iang2",
"iang3",
"iang4",
"iang5",
"iao1",
"iao2",
"iao3",
"iao4",
"iao5",
"ie1",
"ie2",
"ie3",
"ie4",
"ie5",
"ii1",
"ii2",
"ii3",
"ii4",
"ii5",
"iii1",
"iii2",
"iii3",
"iii4",
"iii5",
"in1",
"in2",
"in3",
"in4",
"in5",
"ing1",
"ing2",
"ing3",
"ing4",
"ing5",
"iong1",
"iong2",
"iong3",
"iong4",
"iong5",
"iou1",
"iou2",
"iou3",
"iou4",
"iou5",
"o1",
"o2",
"o3",
"o4",
"o5",
"ong1",
"ong2",
"ong3",
"ong4",
"ong5",
"ou1",
"ou2",
"ou3",
"ou4",
"ou5",
"u1",
"u2",
"u3",
"u4",
"u5",
"ua1",
"ua2",
"ua3",
"ua4",
"ua5",
"uai1",
"uai2",
"uai3",
"uai4",
"uai5",
"uan1",
"uan2",
"uan3",
"uan4",
"uan5",
"uang1",
"uang2",
"uang3",
"uang4",
"uang5",
"uei1",
"uei2",
"uei3",
"uei4",
"uei5",
"uen1",
"uen2",
"uen3",
"uen4",
"uen5",
"uo1",
"uo2",
"uo3",
"uo4",
"uo5",
"v1",
"v2",
"v3",
"v4",
"v5",
"van1",
"van2",
"van3",
"van4",
"van5",
"ve1",
"ve2",
"ve3",
"ve4",
"ve5",
"vn1",
"vn2",
"vn3",
"vn4",
"vn5",
]
valid_symbols = initials + finals + ["rr"] |
## -*- encoding: utf-8 -*-
"""
This file (./numbertheory_doctest.sage) was *autogenerated* from ./numbertheory.tex,
with sagetex.sty version 2011/05/27 v2.3.1.
It contains the contents of all the sageexample environments from this file.
You should be able to doctest this file with:
sage -t ./numbertheory_doctest.sage
It is always safe to delete this file; it is not used in typesetting your
document.
Sage example in ./numbertheory.tex, line 107::
sage: a = IntegerModRing(15)(3); b = IntegerModRing(17)(3); a, b
(3, 3)
sage: a == b
False
Sage example in ./numbertheory.tex, line 135::
sage: R = a.parent(); R
Ring of integers modulo 15
sage: R.characteristic()
15
Sage example in ./numbertheory.tex, line 157::
sage: a + a, a - 17, a * a + 1, a^3
(6, 1, 10, 12)
Sage example in ./numbertheory.tex, line 199::
sage: z = a.lift(); y = ZZ(a); y, type(y), y == z
(3, <... 'sage.rings.integer.Integer'>, True)
Sage example in ./numbertheory.tex, line 228::
sage: [Mod(x,15).additive_order() for x in range(0,15)]
[1, 15, 15, 5, 15, 3, 5, 15, 15, 5, 3, 15, 5, 15, 15]
Sage example in ./numbertheory.tex, line 261::
sage: [[x, Mod(x,15).multiplicative_order()]
....: for x in range(1,15) if gcd(x,15) == 1]
[[1, 1], [2, 4], [4, 2], [7, 4], [8, 4], [11, 2], [13, 4], [14, 2]]
Sage example in ./numbertheory.tex, line 276::
sage: p = 10^20 + 39; mod(2,p).multiplicative_order()
50000000000000000019
sage: mod(3,p).multiplicative_order()
100000000000000000038
Sage example in ./numbertheory.tex, line 367::
sage: R = GF(17); [1/R(x) for x in range(1,17)]
[1, 9, 6, 13, 7, 3, 5, 15, 2, 12, 14, 10, 4, 11, 8, 16]
Sage example in ./numbertheory.tex, line 403::
sage: R = GF(9,name='x'); R
Finite Field in x of size 3^2
Sage example in ./numbertheory.tex, line 409::
sage: R.polynomial()
x^2 + 2*x + 2
Sage example in ./numbertheory.tex, line 423::
sage: Set([r for r in R])
{0, 1, 2, x, x + 1, x + 2, 2*x, 2*x + 1, 2*x + 2}
Sage example in ./numbertheory.tex, line 429::
sage: Q.<x> = PolynomialRing(GF(3))
sage: R2 = GF(9, name='x', modulus=x^2+1); R2
Finite Field in x of size 3^2
Sage example in ./numbertheory.tex, line 463::
sage: p = R(x+1); R2(p)
Traceback (most recent call last):
...
TypeError: unable to coerce from a finite field other than the prime subfield
Sage example in ./numbertheory.tex, line 548::
sage: rational_reconstruction(411,1000)
-13/17
sage: rational_reconstruction(409,1000)
Traceback (most recent call last):
...
ArithmeticError: rational reconstruction of 409 (mod 1000) does not exist
Sage example in ./numbertheory.tex, line 571::
sage: def harmonic(n):
....: return add([1/x for x in range(1,n+1)])
Sage example in ./numbertheory.tex, line 593::
sage: def harmonic_mod(n,m):
....: return add([1/x % m for x in range(1,n+1)])
sage: def harmonic2(n):
....: q = lcm(range(1,n+1))
....: pmax = RR(q*(log(n)+1))
....: m = ZZ(2*pmax^2)
....: m = integer_ceil(m / q) * q + 1
....: a = harmonic_mod(n,m)
....: return rational_reconstruction(a,m)
Sage example in ./numbertheory.tex, line 707::
sage: a = 2; b = 3; m = 5; n = 7; lambda0 = (b-a)/m % n; a + lambda0 * m
17
sage: crt(2,3,5,7)
17
Sage example in ./numbertheory.tex, line 726::
sage: def harmonic3(n):
....: q = lcm(range(1,n+1))
....: pmax = RR(q*(log(n)+1))
....: B = ZZ(2*pmax^2)
....: a = 0; m = 1; p = 2^63
....: while m < B:
....: p = next_prime(p)
....: b = harmonic_mod(n,p)
....: a = crt(a,b,m,p)
....: m = m*p
....: return rational_reconstruction(a,m)
sage: harmonic(100) == harmonic3(100)
True
Sage example in ./numbertheory.tex, line 755::
sage: crt(15,1,30,4)
45
sage: crt(15,2,30,4)
Traceback (most recent call last):
...
ValueError: no solution to crt problem since gcd(30,4) does not divide 15-2
Sage example in ./numbertheory.tex, line 1008::
sage: [560 % (x-1) for x in [3,11,17]]
[0, 0, 0]
Sage example in ./numbertheory.tex, line 1226::
sage: p = 10^10+19; a = mod(17,p); a.log(2)
6954104378
sage: mod(2,p)^6954104378
17
"""
|
class Translation(object):
START_TEXT = "**Bu bot isim değiştirme ve video dönüştürme botudur.\nDosyanın adını değiştirmek için bir medya göndermeniz yeterli\nDaha fazla ayrıntı için /help komutunu kullanın **"
######################
HELP_USER = """**>>Dosya veya Video gönderin\n>>istenen seçeneği seçin\n>>Dosyanın işlenmesini bekleyin**"""
DOWNLOAD_MSG = "**İndiriliyor **⏬"
DOWNLOAD_FAIL_MSG = "**Dosya İndirilemedi**❎"
UPLOAD_MSG = "**Yükleniyor** ⏫"
UPLOAD_FAIL_MSG = "**Dosya Yüklenemedi**❎"
UPLOAD_DONE_MSG = "**Başarıyla Yüklendi 💡"
|
class Programa:
def __init__(self, nome, ano):
self._nome = nome.title()
self.ano = ano
self._likes = 0
@property
def likes(self):
return self.__likes
def dar_like(self):
self._likes += 1
@property
def nome(self):
return self._nome
@nome.setter
def nome(self, novo_nome):
self._nome = novo_nome.title()
class Filme(Programa):
def __init__(self, nome, ano, duracao):
super().__init__(nome, ano)
self.duracao = duracao
class Serie(Programa):
def __init__(self, nome, ano, temporadas):
super(Serie, self).__init__(nome, ano)
self.temporadas = temporadas
|
# -*- coding: utf-8 -*-
def main():
s = input()
n = len(s)
ans = 0
for i in range(1, n + 1):
cur = s[i - 1]
if cur == 'U':
upper = 1
else:
upper = 2
ans += (n - i) * upper
if cur == 'U':
lower = 2
else:
lower = 1
ans += (i - 1) * lower
print(ans)
if __name__ == '__main__':
main()
|
'''
Given an absolute path for a file (Unix-style), simplify it. Or in other words, convert it to the canonical path.
In a UNIX-style file system, a period . refers to the current directory. Furthermore, a double period .. moves the directory up a level.
Note that the returned canonical path must always begin with a slash /, and there must be only a single slash / between two directory names. The last directory name (if it exists) must not end with a trailing /. Also, the canonical path must be the shortest string representing the absolute path.
Example 1:
Input: "/home/"
Output: "/home"
Explanation: Note that there is no trailing slash after the last directory name.
Example 2:
Input: "/../"
Output: "/"
Explanation: Going one level up from the root directory is a no-op, as the root level is the highest level you can go.
Example 3:
Input: "/home//foo/"
Output: "/home/foo"
Explanation: In the canonical path, multiple consecutive slashes are replaced by a single one.
Example 4:
Input: "/a/./b/../../c/"
Output: "/c"
Example 5:
Input: "/a/../../b/../c//.//"
Output: "/c"
Example 6:
Input: "/a//b////c/d//././/.."
Output: "/a/b/c"
'''
class Solution:
def simplifyPath(self, path: str) -> str:
path = path.split('/')
output = []
for idx, x in enumerate(path):
if x == '..':
output = output[:-1]
elif x == '.' or x == '':
continue
else:
output.append(x)
return '/' + '/'.join(output)
|
#import In.entity
class Thodar(In.entity.Entity):
'''Thodar Entity class.
'''
entity_type = ''
entity_id = 0
#def __init__(self, data = None, items = None, **args):
#super().__init__(data, items, **args)
@IN.register('Thodar', type = 'Entitier')
class ThodarEntitier(In.entity.EntityEntitier):
'''Base Thodar Entitier'''
# Thodar needs entity insert/update/delete hooks
invoke_entity_hook = True
# load all is very heavy
entity_load_all = False
@IN.register('Thodar', type = 'Model')
class ThodarModel(In.entity.EntityModel):
'''Thodar Model'''
@IN.register('Thodar', type = 'Themer')
class ThodarThemer(In.entity.EntityThemer):
'''Thodar themer'''
@IN.hook
def entity_model():
return {
'Thodar' : { # entity name
'table' : { # table
'name' : 'thodar',
'columns' : { # table columns / entity attributes
'id' : {},
'type' : {},
'created' : {},
'status' : {},
'nabar_id' : {},
'entity_type' : {},
'entity_id' : {},
'parent_entity_type' : {},
'parent_entity_id' : {},
'weight' : {},
'level' : {},
},
'keys' : {
'primary' : 'id',
},
},
},
}
|
""" Unification in SymPy
See sympy.unify.core docstring for algorithmic details
See http://matthewrocklin.com/blog/work/2012/11/01/Unification/ for discussion
"""
# from .usympy import unify, rebuild
# from .rewrite import rewriterule
|
# -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2020 all rights reserved
#
# class declaration
class Element:
"""
The base class for all HTML elements
"""
# public data
tag = None # the element tag, i.e. "div", "p", "table"
attributes = None # a dictionary that maps element attributes to their values
# document traversal
def identify(self, inspector, **kwds):
"""
The second half of double dispatch to the inspector's handler for this object
"""
# enforce the subclass obligation
raise NotImplementedError("class {.__name__} must implement 'identify'".format(type(self)))
# meta-methods
def __init__(self, tag, **kwds):
# record the tag
self.tag = tag
# and the attributes
self.attributes = dict(kwds)
# all done
return
# end of file
|
# Given an array of meeting time intervals consisting of start and end times
# [[s1,e1],[s2,e2],...] (si < ei), determine if a person could attend all meetings.
#
# Example 1:
#
# Input: [[0,30],[5,10],[15,20]]
# Output: false
# Example 2:
#
# Input: [[7,10],[2,4]]
# Output: true
class Solution:
def canAttendMeetings(self, intervals):
intervals.sort(key=lambda x: [x[0]])
for i in range(len(intervals) - 1):
if intervals[i][1] > intervals[i + 1][0]:
return False
return True
|
# Copyright 2015 The Bazel Authors. All rights reserved.
#
# 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.
# Implementation of compare_ids_fail_test rule
def _impl(ctx):
test_code = """ '
load("//:compare_ids_test.bzl", "compare_ids_test")
compare_ids_test(
name = "test_for_failure",
id = {id},
images = {tars},
)
'
""".format(
id = repr(ctx.attr.id),
# When linked, the tars will be placed into the base folder, and renamed 0.tar, 1.tar, ... etc
tars = repr([str(i) + ".tar" for i in range(len(ctx.attr.images))]),
)
tar_files = []
for tar in ctx.attr.images:
tar_files += tar.files.to_list()
tars_string = ""
for tar_file in tar_files:
tars_string += tar_file.short_path + " "
runfiles = ctx.runfiles(files = tar_files + [
ctx.file._compare_ids_test_bzl,
ctx.file._compare_ids_test,
ctx.file._extract_image_id,
ctx.file._BUILD,
])
# Produces string of form (Necessary because of spaces): " 'reg exp 1' 'reg exp 2'"
reg_exps = ""
if len(ctx.attr.reg_exps) > 0:
reg_exps = "'" + "' '".join(ctx.attr.reg_exps) + "'"
ctx.actions.expand_template(
template = ctx.file._executable_template,
output = ctx.outputs.executable,
substitutions = {
"{tars}": tars_string,
"{test_code}": test_code,
"{bzl_path}": ctx.file._compare_ids_test_bzl.short_path,
"{test_bin_path}": ctx.file._compare_ids_test.short_path,
"{extractor_path}": ctx.file._extract_image_id.short_path,
"{name}": ctx.attr.name,
"{reg_exps}": reg_exps,
"{BUILD_path}": ctx.file._BUILD.short_path,
},
is_executable = True,
)
return [DefaultInfo(runfiles = runfiles)]
"""
Test to test correctness of failure cases of the compare_ids_test.
Args:
images: List of Labels which refer to the docker image tarballs (from docker save)
id: (optional) the id we want the images in the tarballs to have
reg_exps: (optional) a list of regular expressions that must match the output text
of the bazel call. (Ex [".*Executed .* fail.*"] makes sure the given test failed
as opposed to failing to build)
This test passes only if the compare_ids_test it generates fails
Each tarball must contain exactly one image.
Examples of use:
compare_ids_fail_test(
name = "test1",
images = ["image.tar", "image_with_diff_id.tar"],
)
compare_ids_fail_test(
name = "test2",
images = ["image.tar"],
id = "<my_wrong_image_sha256>",
)
"""
compare_ids_fail_test = rule(
attrs = {
"images": attr.label_list(
mandatory = True,
allow_files = True,
),
"id": attr.string(
mandatory = False,
default = "",
),
"reg_exps": attr.string_list(
mandatory = False,
default = [],
),
"_executable_template": attr.label(
allow_single_file = True,
default = "compare_ids_fail_test.sh.tpl",
),
"_compare_ids_test_bzl": attr.label(
allow_single_file = True,
default = "//contrib:compare_ids_test.bzl",
),
"_compare_ids_test": attr.label(
allow_single_file = True,
default = "//contrib:compare_ids_test.py",
),
"_extract_image_id": attr.label(
allow_single_file = True,
default = "//contrib:extract_image_id.py",
),
"_BUILD": attr.label(
allow_single_file = True,
default = "//contrib:BUILD",
),
},
test = True,
implementation = _impl,
)
|
class _Object(object):
def __init__(self, name):
self.name = name
def __str__(self):
return self.name
def __repr__(self):
return "'%s'" % self.name
STRING = 'Hello world!'
INTEGER = 42
FLOAT = -1.2
BOOLEAN = True
NONE_VALUE = None
ESCAPES = 'one \\ two \\\\ ${non_existing}'
NO_VALUE = ''
LIST = ['Hello', 'world', '!']
LIST_WITH_NON_STRINGS = [42, -1.2, True, None]
LIST_WITH_ESCAPES = ['one \\', 'two \\\\', 'three \\\\\\', '${non_existing}']
OBJECT = _Object('dude')
LIST__ONE_ITEM = ['Hello again?']
LIST__LIST_2 = ['Hello', 'again', '?']
LIST__LIST_WITH_ESCAPES_2 = LIST_WITH_ESCAPES[:]
LIST__EMPTY_LIST = []
LIST__OBJECTS = [STRING, INTEGER, LIST, OBJECT]
lowercase = 'Variable name in lower case'
LIST__lowercase_list = [lowercase]
Und_er__scores_____ = 'Variable name with under scores'
LIST________UN__der__SCO__r_e_s__liST__ = [Und_er__scores_____]
PRIORITIES_1 = PRIORITIES_2 = PRIORITIES_3 = PRIORITIES_4 = PRIORITIES_4B \
= 'Variable File'
|
#!/usr/bin/python3
# iterators.py by Bill Weinman [http://bw.org/]
# This is an exercise file from Python 3 Essential Training on lynda.com
# Copyright 2010 The BearHeart Group, LLC
def main():
fh = open('lines.txt')
for line in fh.readlines():
print(line)
if __name__ == "__main__": main()
|
def adder(num1, num2):
return num1 + num2
def main():
print(adder(5, 3))
main()
|
def _create(src, out):
"""Creates a `struct` specifying a source file and an output file that should be used to update it.
Args:
src: A `File` designating a file in the workspace.
out: A `File` designating a file in the output directory.
Returns:
A `struct`.
"""
return struct(
src = src,
out = out,
)
update_srcs = struct(
create = _create,
)
|
class RateLimitExceeded(Exception):
def __init__(self, key: str, retry_after: float):
self.key = key
self.retry_after = retry_after
super().__init__()
|
#DEFINE ALL THE FORMS HERE AS JSON
#DEFINITIONS ARE LOADED AS DIJIT WIDGETS
#VARIABLES LISTED HERE AS DICTIONARY NEEDS TO BE IMPORTED BACK INTO MODELS.PY WHEN FORMS ARE DEFINED
TASK_DETAIL_FORM_CONSTANTS = {
'name':{
'max_length': 30,
"data-dojo-type": "dijit.form.ValidationTextBox",
"data-dojo-props": r"'required' :true ,'regExp':'[a-zA-Z\'-. ]+','invalidMessage':'Invalid Character' "
},
'description':{
'max_length': 1000,
"data-dojo-type": "dijit.form.TextBox",
"data-dojo-props": r"'required' : true ,'regExp':'[a-zA-Z\'-. ]+','invalidMessage' : 'Invalid Character'"
},
'deadline':{
'max_length': 30,
"data-dojo-type": "dijit.form.DateBox",
"data-dojo-props": r"'required' : true ,'regExp':'[a-zA-Z\'-. ]+','invalidMessage' : 'Invalid Character'"
},
'priority':{
'max_length': 30,
"data-dojo-type": "dijit.form.Select",
"data-dojo-props": r"'required' : true ,'regExp':'[\\w]+','invalidMessage' : 'Invalid Character'"
},
'status':{
'max_length': 30,
"data-dojo-type": "dijit.form.Select",
"data-dojo-props": r"'required' : true ,'regExp':'\\d{1,3}','invalidMessage' : 'Invalid Charected chosen!'"
},
'assigned_to':{
'max_length': 30,
"data-dojo-type": "dijit.form.Select",
"data-dojo-props": r"'required' : true ,'regExp':'[\\w]+','invalidMessage' : ''"
}
}
|
print('Digite M se for homem')
print('Digite F se for mulher')
sexo = str(input('Você é de qual sexo: '))
while sexo != 'M' and sexo != 'F':
sexo = str(input('Você digitou errado, digite novamente: '))
print('Está certo')
|
def standard_deviation(x):
n = len(x)
mean = sum(x) / n
ssq = sum((x_i-mean)**2 for x_i in x)
stdev = (ssq/n)**0.5
return(stdev)
|
m = int(input())
for i in range(0,m):
n = int(input())
bandera = True
for i in range(0,n):
temp = input()
for j in range(0,n):
if i==int(n/2):
if j==int(n/2):
if temp[j]!='#':
bandera=False
break
else:
if temp[j]!='+':
bandera=False
break
else:
if j == i or n-i-1 == j:
if temp[j] != '#':
bandera = False
break
elif j==int(n/2):
if temp[j] != '+':
bandera=False
break
elif temp[j] != '0':
bandera = False
break
if bandera:
print("Bandera britanica")
else:
print("Ni idea")
|
#This exercise is Part 2 of 4 of the Tic Tac Toe exercise series. The other exercises are: Part 1, Part 3, and Part 4.
#
#As you may have guessed, we are trying to build up to a full tic-tac-toe board. However, this is significantly more
# than half an hour of coding, so we’re doing it in pieces.
#
#Today, we will simply focus on checking whether someone has WON a game of Tic Tac Toe, not worrying about how the
# moves were made.
#
#If a game of Tic Tac Toe is represented as a list of lists, like so:
#
#game = [[1, 2, 0],
# [2, 1, 0],
# [2, 1, 1]]
#
#where a 0 means an empty square, a 1 means that player 1 put their token in that space, and a 2 means that player 2
# put their token in that space.
#
#Your task this week: given a 3 by 3 list of lists that represents a Tic Tac Toe game board, tell me whether anyone has
# won, and tell me which player won, if any. A Tic Tac Toe win is 3 in a row - either in a row, a column, or a diagonal.
# Don’t worry about the case where TWO people have won - assume that in every board there will only be one winner.
def checkIfWin(board):
for i in range(0,len(board)):
if board[i][0] == board[i][1] and board[i][1] == board [i][2]:
return board[i][0]
elif board[0][i] == board[1][i] and board[1][i] == board [2][i]:
return board[i][0]
if board[0][0] == board[1][1] and board[1][1] == board [2][2]:
return board[0][0]
elif board[0][2] == board[1][1] and board[1][1] == board [2][0]:
return board[0][2]
else:
return 0
if __name__ == "__main__":
game = [[1, 2, 0],[2, 1, 0],[2, 1, 1]]
print(checkIfWin(game)) |
# Use the file name mbox-short.txt as the file name
fname = input("Enter file name: ")
fh = open(fname)
avg = 0.0;
count = 0;
for line in fh:
if not line.startswith("X-DSPAM-Confidence:") : continue
pos = line.find(':');
substring = line[pos+1:];
snum = substring.strip();
num = float(snum);
avg += num;
count = count + 1;
favg = avg/count;
print("Average spam confidence:" , favg)
|
def factorial(num: int) -> int:
product = 1
for mult in range(1, num + 1):
product *= mult
return product
algorithm = factorial
name = 'for loop'
|
n = int(input())
for i in range(1, n+1, 2):
for j in range(i):
print("*", end="")
for j in range(n+n-i-i):
print(" ", end="")
for j in range(i):
print("*", end="")
print()
for i in range(n-2, 0, -2):
for j in range(i):
print("*", end="")
for j in range(n+n-i-i):
print(" ", end="")
for j in range(i):
print("*", end="")
print() |
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def __lt__(self, other):
return self.x < other.x
def __str__(self):
return "(" + str(self.x) + "," + str(self.y) + ")"
def test():
points = [Point(2, 1), Point(1, 1)]
points.sort()
for p in points:
print(p)
test()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.