content
stringlengths 7
1.05M
| fixed_cases
stringlengths 1
1.28M
|
|---|---|
def sum_multidimensional_list_v1(lst):
sum_nums = 0
for row in range(len(lst)):
for col in range(len(lst[row])):
sum_nums += lst[row][col]
return sum_nums
def sum_multidimensional_list_v2(lst):
sum_nums = 0
for row in lst:
for col in row:
sum_nums += col
return sum_nums
|
def sum_multidimensional_list_v1(lst):
sum_nums = 0
for row in range(len(lst)):
for col in range(len(lst[row])):
sum_nums += lst[row][col]
return sum_nums
def sum_multidimensional_list_v2(lst):
sum_nums = 0
for row in lst:
for col in row:
sum_nums += col
return sum_nums
|
__version_info__ = ('3', '5', '1')
__version__ = '.'.join(__version_info__)
class TwilioException(Exception):
pass
class TwilioRestException(TwilioException):
def __init__(self, status, uri, msg="", code=None):
self.uri = uri
self.status = status
self.msg = msg
self.code = code
def __str__(self):
return "HTTP ERROR %s: %s \n %s" % (self.status, self.msg, self.uri)
|
__version_info__ = ('3', '5', '1')
__version__ = '.'.join(__version_info__)
class Twilioexception(Exception):
pass
class Twiliorestexception(TwilioException):
def __init__(self, status, uri, msg='', code=None):
self.uri = uri
self.status = status
self.msg = msg
self.code = code
def __str__(self):
return 'HTTP ERROR %s: %s \n %s' % (self.status, self.msg, self.uri)
|
"""
URL: https://codeforces.com/problemset/problem/112/A
Author: Safiul Kabir [safiulanik at gmail.com]
"""
s1 = input().lower()
s2 = input().lower()
if s1 == s2:
print(0)
elif s1 < s2:
print(-1)
else:
print(1)
|
"""
URL: https://codeforces.com/problemset/problem/112/A
Author: Safiul Kabir [safiulanik at gmail.com]
"""
s1 = input().lower()
s2 = input().lower()
if s1 == s2:
print(0)
elif s1 < s2:
print(-1)
else:
print(1)
|
###exercicio 50
s = 0
for c in range (0, 6):
n = int(input('Digite um numero: '))
if n%2 == 0:
s += n
print ('{}'.format(s))
print ('Fim!!!')
|
s = 0
for c in range(0, 6):
n = int(input('Digite um numero: '))
if n % 2 == 0:
s += n
print('{}'.format(s))
print('Fim!!!')
|
total = 0
for number in range(1, 10 + 1):
print(number)
total = total + number
print(total)
|
total = 0
for number in range(1, 10 + 1):
print(number)
total = total + number
print(total)
|
#Using the range function we create a list of numbers from 0 to 99 https://docs.python.org/2/library/functions.html#range
#Each number in the list is FizzBuzz tested
#If the number is a multiple of 3 and a multiple of 5 - print "FizzBuzz"
#If the number is only a multiple of 3 - print "Fizz"
#If the number is only a multiple of 5 - print "Buzz"
#If the number is not a multiple of 3 or 5 - print the number
for i in range (100):
if i % 3 == 0 and i % 5 == 0:
print("FizzBuzz")
elif i % 3 == 0:
print("Fizz")
elif i % 5 == 0:
print("Buzz")
else:
print(i)
|
for i in range(100):
if i % 3 == 0 and i % 5 == 0:
print('FizzBuzz')
elif i % 3 == 0:
print('Fizz')
elif i % 5 == 0:
print('Buzz')
else:
print(i)
|
class Foo:
[mix_Case, var2] = range(2)
def bar():
'''
>>> class Foo():
... mix_Case = 0
'''
pass
|
class Foo:
[mix__case, var2] = range(2)
def bar():
"""
>>> class Foo():
... mix_Case = 0
"""
pass
|
""" TEMPORARY FIX """
def pause(*args):
print("TRYING TO PAUSE")
def stop(*args):
print("TRYING TO STOP")
|
""" TEMPORARY FIX """
def pause(*args):
print('TRYING TO PAUSE')
def stop(*args):
print('TRYING TO STOP')
|
def print_to_file(file, cases):
print(len(cases), file=file)
for arr in cases:
print(len(arr), file=file)
print(*arr, file=file)
|
def print_to_file(file, cases):
print(len(cases), file=file)
for arr in cases:
print(len(arr), file=file)
print(*arr, file=file)
|
FEATURES = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[-122.3141965, 47.6598870],
[-122.3132940, 47.6598762],
],
},
"properties": {},
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[-122.3144401, 47.6598872],
[-122.3141965, 47.6598870],
],
},
"properties": {},
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[-122.3141965, 47.6598870],
[-122.3142026, 47.6597293],
],
},
"properties": {},
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[-122.3141795, 47.6605333],
[-122.3141965, 47.6598870],
],
},
"properties": {},
},
],
}
|
features = {'type': 'FeatureCollection', 'features': [{'type': 'Feature', 'geometry': {'type': 'LineString', 'coordinates': [[-122.3141965, 47.659887], [-122.313294, 47.6598762]]}, 'properties': {}}, {'type': 'Feature', 'geometry': {'type': 'LineString', 'coordinates': [[-122.3144401, 47.6598872], [-122.3141965, 47.659887]]}, 'properties': {}}, {'type': 'Feature', 'geometry': {'type': 'LineString', 'coordinates': [[-122.3141965, 47.659887], [-122.3142026, 47.6597293]]}, 'properties': {}}, {'type': 'Feature', 'geometry': {'type': 'LineString', 'coordinates': [[-122.3141795, 47.6605333], [-122.3141965, 47.659887]]}, 'properties': {}}]}
|
#
# Nidan
#
# (C) 2017 Michele <o-zone@zerozone.it> Pinassi
class Config: pass
|
class Config:
pass
|
class CyclicDependencyError(ValueError):
pass
def topological_sort_as_sets(dependency_graph):
"""
Variation of Kahn's algorithm (1962) that returns sets.
Take a dependency graph as a dictionary of node => dependencies.
Yield sets of items in topological order, where the first set contains
all nodes without dependencies, and each following set contains all
nodes that may depend on the nodes only in the previously yielded sets.
"""
todo = dependency_graph.copy()
while todo:
current = {node for node, deps in todo.items() if not deps}
if not current:
raise CyclicDependencyError('Cyclic dependency in graph: {}'.format(
', '.join(repr(x) for x in todo.items())))
yield current
# remove current from todo's nodes & dependencies
todo = {node: (dependencies - current) for node, dependencies in
todo.items() if node not in current}
def stable_topological_sort(nodes, dependency_graph):
result = []
for layer in topological_sort_as_sets(dependency_graph):
for node in nodes:
if node in layer:
result.append(node)
return result
|
class Cyclicdependencyerror(ValueError):
pass
def topological_sort_as_sets(dependency_graph):
"""
Variation of Kahn's algorithm (1962) that returns sets.
Take a dependency graph as a dictionary of node => dependencies.
Yield sets of items in topological order, where the first set contains
all nodes without dependencies, and each following set contains all
nodes that may depend on the nodes only in the previously yielded sets.
"""
todo = dependency_graph.copy()
while todo:
current = {node for (node, deps) in todo.items() if not deps}
if not current:
raise cyclic_dependency_error('Cyclic dependency in graph: {}'.format(', '.join((repr(x) for x in todo.items()))))
yield current
todo = {node: dependencies - current for (node, dependencies) in todo.items() if node not in current}
def stable_topological_sort(nodes, dependency_graph):
result = []
for layer in topological_sort_as_sets(dependency_graph):
for node in nodes:
if node in layer:
result.append(node)
return result
|
# Given a binary matrix A, we want to flip the image horizontally, then invert
# it, and return the resulting image.
# To flip an image horizontally means that each row of the image is reversed.
# For example, flipping [1, 1, 0] horizontally results in [0, 1, 1].
# To invert an image means that each 0 is replaced by 1, and each 1 is replaced
# by 0. For example, inverting [0, 1, 1] results in [1, 0, 0].
class Solution:
def flipAndInvertImage(self, A):
"""
:type A: List[List[int]]
:rtype: List[List[int]]
"""
return [[1 - v for v in row[::-1]] for row in A]
|
class Solution:
def flip_and_invert_image(self, A):
"""
:type A: List[List[int]]
:rtype: List[List[int]]
"""
return [[1 - v for v in row[::-1]] for row in A]
|
'''
This problem was asked by Google.
Given two singly linked lists that intersect at some point, find the intersecting node. The lists are non-cyclical.
For example, given A = 3 -> 7 -> 8 -> 10 and B = 99 -> 1 -> 8 -> 10, return the node with value 8.
In this example, assume nodes with the same value are the exact same node objects.
Do this in O(M + N) time (where M and N are the lengths of the lists) and constant space.
'''
"""
Assuming some thing like this
list1 = 1->2->3->7->8->10
list2 = 99->1->8->10
so visualizing:
1
2
3
7
99->1->8->10
"""
class LinkedList:
def __init__(self, data, next=None):
self.data = data
self.next = next
def print_list(list):
if list is None:
return
print(list.data)
print_list(list.next)
def find_intersection(list1, list2):# O(M*K)
pointerL2 = list2
while pointerL2:
pointerL1 = list1
while pointerL1:
if pointerL1 == pointerL2: # found intersection
return pointerL1.data
pointerL1 = pointerL1.next
pointerL2 = pointerL2.next
def find_intersection_2(list1, list2):# O(M+K)
# idea store pointer values to a dictionary
# return when match found
dict_visited = {} # dict of visited nodes
pointer = list1
while pointer:
dict_visited[id(pointer)] = None # just add the key no need to store a value
pointer = pointer.next
pointer = list2
while pointer:
if id(pointer) in dict_visited:
return ('intersection point at: {}'.format(pointer.data))
pointer = pointer.next
return 'No Intersection'
if __name__ == '__main__':
common_tail = LinkedList(8, next=LinkedList(10))
l1 = LinkedList(1, next=LinkedList(2,next=LinkedList(3, next=LinkedList(7, next=common_tail))))
l2 = LinkedList(99, next=LinkedList(1, next=common_tail))
# print_list(l1)
# print('\n')
# print_list(l2)
# print('\n')
print(find_intersection_2(l1,l2))
|
"""
This problem was asked by Google.
Given two singly linked lists that intersect at some point, find the intersecting node. The lists are non-cyclical.
For example, given A = 3 -> 7 -> 8 -> 10 and B = 99 -> 1 -> 8 -> 10, return the node with value 8.
In this example, assume nodes with the same value are the exact same node objects.
Do this in O(M + N) time (where M and N are the lengths of the lists) and constant space.
"""
'\nAssuming some thing like this\nlist1 = 1->2->3->7->8->10\nlist2 = 99->1->8->10\n\nso visualizing:\n 1 \n 2 \n 3\n 7\n99->1->8->10\n\n'
class Linkedlist:
def __init__(self, data, next=None):
self.data = data
self.next = next
def print_list(list):
if list is None:
return
print(list.data)
print_list(list.next)
def find_intersection(list1, list2):
pointer_l2 = list2
while pointerL2:
pointer_l1 = list1
while pointerL1:
if pointerL1 == pointerL2:
return pointerL1.data
pointer_l1 = pointerL1.next
pointer_l2 = pointerL2.next
def find_intersection_2(list1, list2):
dict_visited = {}
pointer = list1
while pointer:
dict_visited[id(pointer)] = None
pointer = pointer.next
pointer = list2
while pointer:
if id(pointer) in dict_visited:
return 'intersection point at: {}'.format(pointer.data)
pointer = pointer.next
return 'No Intersection'
if __name__ == '__main__':
common_tail = linked_list(8, next=linked_list(10))
l1 = linked_list(1, next=linked_list(2, next=linked_list(3, next=linked_list(7, next=common_tail))))
l2 = linked_list(99, next=linked_list(1, next=common_tail))
print(find_intersection_2(l1, l2))
|
def lazyproperty(fn):
attr_name = '__' + fn.__name__
@property
def _lazyprop(self):
if not hasattr(self, attr_name):
setattr(self, attr_name, fn(self))
return getattr(self, attr_name)
return _lazyprop
|
def lazyproperty(fn):
attr_name = '__' + fn.__name__
@property
def _lazyprop(self):
if not hasattr(self, attr_name):
setattr(self, attr_name, fn(self))
return getattr(self, attr_name)
return _lazyprop
|
stud = {
'Madhan':24,
'Raj':30,
'Narayanan':29
}
for s1 in stud.keys():
print(s1)
phone_numbers = {"John Smith": "+37682929928", "Marry Simpons": "+423998200919"}
for key,value in phone_numbers.items():
print("{} has phone number {}".format(key,value))
names = {
'Girija':53,
'Subramanian':62,
'Narayanan':29,
'Gopal':65,
'Vijayam':65
}
for n1 in names.keys():
print(n1)
for n2 in names.values():
print(n2)
|
stud = {'Madhan': 24, 'Raj': 30, 'Narayanan': 29}
for s1 in stud.keys():
print(s1)
phone_numbers = {'John Smith': '+37682929928', 'Marry Simpons': '+423998200919'}
for (key, value) in phone_numbers.items():
print('{} has phone number {}'.format(key, value))
names = {'Girija': 53, 'Subramanian': 62, 'Narayanan': 29, 'Gopal': 65, 'Vijayam': 65}
for n1 in names.keys():
print(n1)
for n2 in names.values():
print(n2)
|
"""load gtest third party"""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
def repo():
http_archive(
name = "com_google_googletest",
sha256 = "353571c2440176ded91c2de6d6cd88ddd41401d14692ec1f99e35d013feda55a",
urls = ["https://github.com/google/googletest/archive/refs/tags/release-1.11.0.zip"],
strip_prefix = "googletest-release-1.11.0",
)
|
"""load gtest third party"""
load('@bazel_tools//tools/build_defs/repo:http.bzl', 'http_archive')
def repo():
http_archive(name='com_google_googletest', sha256='353571c2440176ded91c2de6d6cd88ddd41401d14692ec1f99e35d013feda55a', urls=['https://github.com/google/googletest/archive/refs/tags/release-1.11.0.zip'], strip_prefix='googletest-release-1.11.0')
|
# -*- coding: utf-8 -*-
latest_posts = db(Posts).select(orderby=~Posts.created_on, limitby=(0,5))
most_liked = db(Posts).select(orderby=~Posts.likes, limitby=(0,5))
all_categories = db(Categories).select(limitby=(0,5))
|
latest_posts = db(Posts).select(orderby=~Posts.created_on, limitby=(0, 5))
most_liked = db(Posts).select(orderby=~Posts.likes, limitby=(0, 5))
all_categories = db(Categories).select(limitby=(0, 5))
|
spam = ['cat', 'bat', 'rat', 'elephant']
print(spam[2])
spam2 = [['fish', 'shark'], 'bat', 'rat', 'elephant']
print(spam2[0])
print(spam2[0][1])
spam[2:4] = ['CAT', 'MOOSE', 'BEAR']
print(spam)
del spam[2]
print(spam)
print('MOOSE' in spam)
# Iterate over lists by item or index
for item in spam:
print(item)
for i in range(0, len(spam)):
print(spam[i])
print(len(spam))
cat = ['fat', 'orange', 'loud']
size, color, disposition = cat
print(size)
print(color)
print(disposition)
# swap variables
a = 'AAA'
b = 'BBB'
a, b = b, a
print(a)
print(b)
|
spam = ['cat', 'bat', 'rat', 'elephant']
print(spam[2])
spam2 = [['fish', 'shark'], 'bat', 'rat', 'elephant']
print(spam2[0])
print(spam2[0][1])
spam[2:4] = ['CAT', 'MOOSE', 'BEAR']
print(spam)
del spam[2]
print(spam)
print('MOOSE' in spam)
for item in spam:
print(item)
for i in range(0, len(spam)):
print(spam[i])
print(len(spam))
cat = ['fat', 'orange', 'loud']
(size, color, disposition) = cat
print(size)
print(color)
print(disposition)
a = 'AAA'
b = 'BBB'
(a, b) = (b, a)
print(a)
print(b)
|
class Node():
def __init__(self, value):
self.value = value
self.left = None
self.right = None
class BinaryTree():
def __init__(self, root):
self.root = Node(root)
def print_tree(self, traversal_type):
if traversal_type == "preorder":
return self.preorder_print(self.root, "")
elif traversal_type == "inorder":
return self.inorder_print(self.root, "")
elif traversal_type == "postorder":
return self.postorder_print(self.root, "")
else:
return f"traversal type is not supported"
def preorder_print(self, start, traversal):
""" Root -> Left -> Right """
if start:
traversal+=(str(start.value)+"-")
traversal = self.preorder_print(start.left, traversal)
traversal = self.preorder_print(start.right, traversal)
return traversal
def inorder_print(self, start, traversal):
"""Left -> Root -> Right """
if start:
traversal = self.inorder_print(start.left, traversal)
traversal += (str(start.value) + "-")
traversal = self.inorder_print(start.right, traversal)
return traversal
def postorder_print(self, start, traversal):
""" Left -> Right -> Root """
if start:
traversal = self.inorder_print(start.left, traversal)
traversal = self.inorder_print(start.right, traversal)
traversal += (str(start.value) + "-")
return traversal
tree = BinaryTree(1)
tree.root.left = Node(2)
tree.root.right = Node(3)
tree.root.left.left = Node(4)
tree.root.left.right = Node(5)
tree.root.right.left = Node(6)
tree.root.right.right = Node(7)
tree.root.right.right.right = Node(8)
print(tree.print_tree("preorder"))
print(tree.print_tree("inorder"))
print(tree.print_tree("postorder"))
|
class Node:
def __init__(self, value):
self.value = value
self.left = None
self.right = None
class Binarytree:
def __init__(self, root):
self.root = node(root)
def print_tree(self, traversal_type):
if traversal_type == 'preorder':
return self.preorder_print(self.root, '')
elif traversal_type == 'inorder':
return self.inorder_print(self.root, '')
elif traversal_type == 'postorder':
return self.postorder_print(self.root, '')
else:
return f'traversal type is not supported'
def preorder_print(self, start, traversal):
""" Root -> Left -> Right """
if start:
traversal += str(start.value) + '-'
traversal = self.preorder_print(start.left, traversal)
traversal = self.preorder_print(start.right, traversal)
return traversal
def inorder_print(self, start, traversal):
"""Left -> Root -> Right """
if start:
traversal = self.inorder_print(start.left, traversal)
traversal += str(start.value) + '-'
traversal = self.inorder_print(start.right, traversal)
return traversal
def postorder_print(self, start, traversal):
""" Left -> Right -> Root """
if start:
traversal = self.inorder_print(start.left, traversal)
traversal = self.inorder_print(start.right, traversal)
traversal += str(start.value) + '-'
return traversal
tree = binary_tree(1)
tree.root.left = node(2)
tree.root.right = node(3)
tree.root.left.left = node(4)
tree.root.left.right = node(5)
tree.root.right.left = node(6)
tree.root.right.right = node(7)
tree.root.right.right.right = node(8)
print(tree.print_tree('preorder'))
print(tree.print_tree('inorder'))
print(tree.print_tree('postorder'))
|
def pattern(n):
if n==0:
return ""
res=[]
for i in range(n-1):
res.append(" "*(n-1)+str((i+1)%10))
temp="".join(str(i%10) for i in range(1, n))
res.append(temp+str(n%10)+temp[::-1])
for i in range(n-1, 0, -1):
res.append(" "*(n-1)+str(i%10))
return "\n".join(res)+"\n"
|
def pattern(n):
if n == 0:
return ''
res = []
for i in range(n - 1):
res.append(' ' * (n - 1) + str((i + 1) % 10))
temp = ''.join((str(i % 10) for i in range(1, n)))
res.append(temp + str(n % 10) + temp[::-1])
for i in range(n - 1, 0, -1):
res.append(' ' * (n - 1) + str(i % 10))
return '\n'.join(res) + '\n'
|
# ------------------------------
# 63. Unique Paths II
#
# Description:
# Follow up for "Unique Paths":
#
# Now consider if some obstacles are added to the grids. How many unique paths would there be?
# An obstacle and empty space is marked as 1 and 0 respectively in the grid.
# For example,
# There is one obstacle in the middle of a 3x3 grid as illustrated below.
# [
# [0,0,0],
# [0,1,0],
# [0,0,0]
# ]
# The total number of unique paths is 2.
#
# Version: 1.0
# 01/16/18 by Jianfa
# ------------------------------
class Solution(object):
def uniquePathsWithObstacles(self, obstacleGrid):
"""
:type obstacleGrid: List[List[int]]
:rtype: int
"""
if not obstacleGrid or not obstacleGrid[0] or obstacleGrid[0][0] == 1:
return 0
for m in range(len(obstacleGrid)):
for n in range(len(obstacleGrid[0])):
if obstacleGrid[m][n] == 1:
obstacleGrid[m][n] = -1
obstacleGrid[0][0] = 1
for m in range(len(obstacleGrid)):
for n in range(len(obstacleGrid[0])):
if m == 0 and n > 0:
if obstacleGrid[m][n-1] == -1:
obstacleGrid[m][n] = 0
elif obstacleGrid[m][n] == -1:
obstacleGrid[m][n] = 0
else:
obstacleGrid[m][n] = obstacleGrid[m][n-1]
elif n == 0 and m > 0:
if obstacleGrid[m-1][n] == -1:
obstacleGrid[m][n] = 0
elif obstacleGrid[m][n] == -1:
obstacleGrid[m][n] = 0
else:
obstacleGrid[m][n] = obstacleGrid[m-1][n]
elif m != 0 and n != 0:
if obstacleGrid[m][n] == -1:
obstacleGrid[m][n] = 0
else:
obstacleGrid[m][n] = obstacleGrid[m-1][n] + obstacleGrid[m][n-1]
return obstacleGrid[m][n]
# Used for testing
if __name__ == "__main__":
test = Solution()
# ------------------------------
# Summary:
# Think about some edge situation.
# If the start point is 1, then return 0.
# Turn the grid to a state grid at first. When a unit is 1, then I change it to -1, which
# represents an obstacle state. Then start to counting. When meeting an obstacle, count 0.
# Calculate dynamically.
|
class Solution(object):
def unique_paths_with_obstacles(self, obstacleGrid):
"""
:type obstacleGrid: List[List[int]]
:rtype: int
"""
if not obstacleGrid or not obstacleGrid[0] or obstacleGrid[0][0] == 1:
return 0
for m in range(len(obstacleGrid)):
for n in range(len(obstacleGrid[0])):
if obstacleGrid[m][n] == 1:
obstacleGrid[m][n] = -1
obstacleGrid[0][0] = 1
for m in range(len(obstacleGrid)):
for n in range(len(obstacleGrid[0])):
if m == 0 and n > 0:
if obstacleGrid[m][n - 1] == -1:
obstacleGrid[m][n] = 0
elif obstacleGrid[m][n] == -1:
obstacleGrid[m][n] = 0
else:
obstacleGrid[m][n] = obstacleGrid[m][n - 1]
elif n == 0 and m > 0:
if obstacleGrid[m - 1][n] == -1:
obstacleGrid[m][n] = 0
elif obstacleGrid[m][n] == -1:
obstacleGrid[m][n] = 0
else:
obstacleGrid[m][n] = obstacleGrid[m - 1][n]
elif m != 0 and n != 0:
if obstacleGrid[m][n] == -1:
obstacleGrid[m][n] = 0
else:
obstacleGrid[m][n] = obstacleGrid[m - 1][n] + obstacleGrid[m][n - 1]
return obstacleGrid[m][n]
if __name__ == '__main__':
test = solution()
|
class Config:
gateId = 0
route = ""
port = "COM3"
def __init__(self, gateId, route):
self.gateId=gateId
self.route=route
|
class Config:
gate_id = 0
route = ''
port = 'COM3'
def __init__(self, gateId, route):
self.gateId = gateId
self.route = route
|
# linked list class
# class for "node" or in common terms "element"
class Node:
def __init__(self, data=None, next=None):
self.data = data
self.next = next
class LinkedList:
def __init__(self):
self.head = None # points to the head of the linked list
def insert_at_begining(self, data):
# node with value of "data" and next element will be the head
# we add the element to the beginning and set the "Next" argument to the previous head
# this puts the current data to the beginning of the list.
node = Node(data, self.head)
# we then set the current node as the head.
self.head = node
def insert_at_end(self, data):
# if linked list is empty set the current data to the head.
if self.head is None:
self.head = Node(data, None)
return
# iterate through the entire linked list
# once we hit an itr that is None we know we're at the end
# we then set that node to the current data then set the next element to None
itr = self.head
while itr.next:
itr = itr.next
itr.next = Node(data, None)
# insert a list of values as a linked list
def insert_values(self, data_list):
self.head = None
for data in data_list:
self.insert_at_end(data)
def get_length(self):
count = 0
itr = self.head
while itr:
count += 1
itr = itr.next
return count
def remove_at(self, index):
# if the index is less then 0 or greater than the count, its invalid
if index < 0 or index >= self.get_length():
raise Exception('not valid index')
# if index is 0 then just point the head to the next element.
# python handles garbage
if index==0:
self.head = self.head.next
# keep count of where we are
count = 0
# start at the head
itr = self.head
# iter through linked list
while itr:
# if we reach the index BEFORE the index to drop move that index to the next.next
# skipping the one we want to drop python garbage will clean.
if count == index - 1:
itr.next = itr.next.next
break
# if not n-1 count + 1 move to next.
itr = itr.next
count += 1
def insert_at(self, index, data):
if index < 0 or index >= self.get_length():
raise Exception('invalid index')
if index == 0:
self.insert_at_begining(data)
count = 0
itr = self.head
while itr:
if count == index - 1:
node = Node(data,itr.next)
itr.next = node
break
itr = itr.next
count += 1
def insert_after_value(self, data_after, data_to_insert):
# look for a value then insert after that value
# use insert value?
if self.head is None:
return
if self.head.data==data_after:
self.head.next = Node(data_to_insert,self.head.next)
return
itr = self.head
while itr:
if itr.data == data_after:
itr.next = Node(data_to_insert, itr.next)
break
itr = itr.next
def remove_by_value(self, data_to_remove):
if self.head is None:
return
if self.head.data == data_to_remove:
self.head = self.head.next
return
itr = self.head
while itr.next:
if itr.next.data == data_to_remove:
itr.next = itr.next.next
break
itr = itr.next
# following links and print
def print(self):
# if the list is empty print nothing
if self.head is None:
print("list is empty")
return
# while itr is anything other than None, print it, else quit.
itr = self.head
linked_list = ''
while itr:
linked_list += str(itr.data) + ' --> '
itr = itr.next
print(linked_list)
if __name__ == '__main__':
ll = LinkedList()
ll.insert_values(["banana","mango","grapes","orange"])
ll.print()
ll.insert_after_value("mango","apple") # insert apple after mango
ll.print()
ll.remove_by_value("orange") # remove orange from linked list
ll.print()
ll.remove_by_value("figs")
ll.print()
ll.remove_by_value("banana")
ll.remove_by_value("mango")
ll.remove_by_value("apple")
ll.remove_by_value("grapes")
ll.print()
|
class Node:
def __init__(self, data=None, next=None):
self.data = data
self.next = next
class Linkedlist:
def __init__(self):
self.head = None
def insert_at_begining(self, data):
node = node(data, self.head)
self.head = node
def insert_at_end(self, data):
if self.head is None:
self.head = node(data, None)
return
itr = self.head
while itr.next:
itr = itr.next
itr.next = node(data, None)
def insert_values(self, data_list):
self.head = None
for data in data_list:
self.insert_at_end(data)
def get_length(self):
count = 0
itr = self.head
while itr:
count += 1
itr = itr.next
return count
def remove_at(self, index):
if index < 0 or index >= self.get_length():
raise exception('not valid index')
if index == 0:
self.head = self.head.next
count = 0
itr = self.head
while itr:
if count == index - 1:
itr.next = itr.next.next
break
itr = itr.next
count += 1
def insert_at(self, index, data):
if index < 0 or index >= self.get_length():
raise exception('invalid index')
if index == 0:
self.insert_at_begining(data)
count = 0
itr = self.head
while itr:
if count == index - 1:
node = node(data, itr.next)
itr.next = node
break
itr = itr.next
count += 1
def insert_after_value(self, data_after, data_to_insert):
if self.head is None:
return
if self.head.data == data_after:
self.head.next = node(data_to_insert, self.head.next)
return
itr = self.head
while itr:
if itr.data == data_after:
itr.next = node(data_to_insert, itr.next)
break
itr = itr.next
def remove_by_value(self, data_to_remove):
if self.head is None:
return
if self.head.data == data_to_remove:
self.head = self.head.next
return
itr = self.head
while itr.next:
if itr.next.data == data_to_remove:
itr.next = itr.next.next
break
itr = itr.next
def print(self):
if self.head is None:
print('list is empty')
return
itr = self.head
linked_list = ''
while itr:
linked_list += str(itr.data) + ' --> '
itr = itr.next
print(linked_list)
if __name__ == '__main__':
ll = linked_list()
ll.insert_values(['banana', 'mango', 'grapes', 'orange'])
ll.print()
ll.insert_after_value('mango', 'apple')
ll.print()
ll.remove_by_value('orange')
ll.print()
ll.remove_by_value('figs')
ll.print()
ll.remove_by_value('banana')
ll.remove_by_value('mango')
ll.remove_by_value('apple')
ll.remove_by_value('grapes')
ll.print()
|
"""
https://www.youtube.com/watch?v=UflHuQj6MVA&list=RDCMUCnxhETjJtTPs37hOZ7vQ88g&index=2
https://www.geeksforgeeks.org/longest-palindrome-substring-set-1/
"""
def longest_palindromic_substring(s):
n = len(s)
table = [[0 for x in range(n)] for y in range(n)]
# all strings of length 1 are palindrome
start = 0
max_len = 1
for i in range(n):
table[i][i] = 1
for i in range(n-1):
if s[i] == s[i+1]:
table[i][i+1] = 1
start = i
max_len = 2
for k in range(3, n):
for i in range(n - k + 1):
j = i + k - 1
if table[i+1][j-1] and s[i] == s[j]:
table[i][j] = 1
if k > max_len:
max_len = k
start = i
print(s[start:start+max_len])
return max_len
longest_palindromic_substring("aaaabbaa")
|
"""
https://www.youtube.com/watch?v=UflHuQj6MVA&list=RDCMUCnxhETjJtTPs37hOZ7vQ88g&index=2
https://www.geeksforgeeks.org/longest-palindrome-substring-set-1/
"""
def longest_palindromic_substring(s):
n = len(s)
table = [[0 for x in range(n)] for y in range(n)]
start = 0
max_len = 1
for i in range(n):
table[i][i] = 1
for i in range(n - 1):
if s[i] == s[i + 1]:
table[i][i + 1] = 1
start = i
max_len = 2
for k in range(3, n):
for i in range(n - k + 1):
j = i + k - 1
if table[i + 1][j - 1] and s[i] == s[j]:
table[i][j] = 1
if k > max_len:
max_len = k
start = i
print(s[start:start + max_len])
return max_len
longest_palindromic_substring('aaaabbaa')
|
n = int(input())
matrix = [list(map(int, input().split(" "))) for _ in range(n)]
total = 0
for i in range(n):
value = matrix[i][i]
total += value
print(total)
|
n = int(input())
matrix = [list(map(int, input().split(' '))) for _ in range(n)]
total = 0
for i in range(n):
value = matrix[i][i]
total += value
print(total)
|
PROBLEM_PID_MAX_LENGTH = 32
PROBLEM_TITLE_MAX_LENGTH = 128
PROBLEM_SECTION_MAX_LENGTH = 4096
PROBLEM_SAMPLE_MAX_LENGTH = 1024
|
problem_pid_max_length = 32
problem_title_max_length = 128
problem_section_max_length = 4096
problem_sample_max_length = 1024
|
__author__ = 'shukkkur'
'''
https://codeforces.com/problemset/problem/200/B
'''
n = int(input())
props = list(map(int, input().split()))
total = sum([p/100 for p in props])
print((total/n)*100)
|
__author__ = 'shukkkur'
'\nhttps://codeforces.com/problemset/problem/200/B\n'
n = int(input())
props = list(map(int, input().split()))
total = sum([p / 100 for p in props])
print(total / n * 100)
|
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def isPalindrome(self, head: ListNode) -> bool:
prev = None
curr = head
length = 0
while curr:
curr = curr.next
length += 1
half = length // 2
curr = head
for _ in range(half):
next = curr.next
curr.next = prev
prev, curr = curr, next
left = prev
right = curr if length % 2 == 0 else curr.next
while left and right:
if left.val != right.val:
return False
left, right = left.next, right.next
return True
|
class Solution:
def is_palindrome(self, head: ListNode) -> bool:
prev = None
curr = head
length = 0
while curr:
curr = curr.next
length += 1
half = length // 2
curr = head
for _ in range(half):
next = curr.next
curr.next = prev
(prev, curr) = (curr, next)
left = prev
right = curr if length % 2 == 0 else curr.next
while left and right:
if left.val != right.val:
return False
(left, right) = (left.next, right.next)
return True
|
#!/usr/bin/env python3
"""
Initializaiton
+--------------------------------------------------------------------------+
| Copyright 2019 St. Jude Children's Research Hospital |
| |
| Licensed under a modified version of the Apache License, Version 2.0 |
| (the "License") for academic research use only; you may not use this |
| file except in compliance with the License. To inquire about commercial |
| use, please contact the St. Jude Office of Technology Licensing at |
| scott.elmer@stjude.org. |
| |
| 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. |
+--------------------------------------------------------------------------+
"""
__version__ = "0.1.0"
|
"""
Initializaiton
+--------------------------------------------------------------------------+
| Copyright 2019 St. Jude Children's Research Hospital |
| |
| Licensed under a modified version of the Apache License, Version 2.0 |
| (the "License") for academic research use only; you may not use this |
| file except in compliance with the License. To inquire about commercial |
| use, please contact the St. Jude Office of Technology Licensing at |
| scott.elmer@stjude.org. |
| |
| 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. |
+--------------------------------------------------------------------------+
"""
__version__ = '0.1.0'
|
# Learn python - Full Course for Beginners [Tutorial]
# https://www.youtube.com/watch?v=rfscVS0vtbw
# freeCodeCamp.org
# Course developed by Mike Dane.
# Exercise: While Loop
# Date: 30 Aug 2021
# A while loop is a structure that allows code to be executed multiple times until condition is false
# a loop condition , loop guard, keep loop if true
# while loop a powerful structure
i = 1
while i <= 10:
print(i)
i += 1 # i = i + 1 python shorthand i +- 1
print("Done with loop")
# Guessing Game - without limits
secret_word = "giraffe"
guess = ""
while guess != secret_word:
guess = input("Enter guess: ")
print("You win!")
# Guessing Game - introduce guess limits
secret_word = "giraffe"
guess = ""
guess_count = 0
guess_limit = 3
out_of_guesses = False
while guess != secret_word and not(out_of_guesses):
if guess_count < guess_limit:
guess = input("Enter guess: ")
guess_count += 1
else:
out_of_guesses = True
if out_of_guesses:
print("Out of Guesses, You Lose!")
else:
print("You win! Well Done!")
# Guessing Game - I was playing with shaping the code differently
secret_word = "giraffe"
guess = ""
guess_count = 0
guess_limit = 4
while guess != secret_word and guess_count < guess_limit:
guess = input("Enter guess: ")
guess_count += 1
if guess_count < guess_limit:
print("Out of Guesses, You Lose!")
else:
print("You win! It took you " + str(guess_count) + " guesses. Well Done!")
|
i = 1
while i <= 10:
print(i)
i += 1
print('Done with loop')
secret_word = 'giraffe'
guess = ''
while guess != secret_word:
guess = input('Enter guess: ')
print('You win!')
secret_word = 'giraffe'
guess = ''
guess_count = 0
guess_limit = 3
out_of_guesses = False
while guess != secret_word and (not out_of_guesses):
if guess_count < guess_limit:
guess = input('Enter guess: ')
guess_count += 1
else:
out_of_guesses = True
if out_of_guesses:
print('Out of Guesses, You Lose!')
else:
print('You win! Well Done!')
secret_word = 'giraffe'
guess = ''
guess_count = 0
guess_limit = 4
while guess != secret_word and guess_count < guess_limit:
guess = input('Enter guess: ')
guess_count += 1
if guess_count < guess_limit:
print('Out of Guesses, You Lose!')
else:
print('You win! It took you ' + str(guess_count) + ' guesses. Well Done!')
|
# for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
# self.right = right
# self.right = right
# self.right = right
# self.right = right
# self.right = right
# self.right = right
class Solution:
def deleteNode(self, root: Optional[TreeNode], key: int) -> Optional[TreeNode]:
if not root:
return None
left = root.left
right = root.right
if root.val == key:
if right is None:
root = left
return root
if left is None:
root = right
return root
left_r = left
while left_r.right:
left_r = left_r.right
left_r.right = right
root = left
return root
if root.val > key:
root.left = self.deleteNode(root.left, key)
else:
root.right = self.deleteNode(root.right, key)
return root
|
class Solution:
def delete_node(self, root: Optional[TreeNode], key: int) -> Optional[TreeNode]:
if not root:
return None
left = root.left
right = root.right
if root.val == key:
if right is None:
root = left
return root
if left is None:
root = right
return root
left_r = left
while left_r.right:
left_r = left_r.right
left_r.right = right
root = left
return root
if root.val > key:
root.left = self.deleteNode(root.left, key)
else:
root.right = self.deleteNode(root.right, key)
return root
|
def process(status):
status_info = {}
status_info['name'] = status.pos.name
status_info['target'] = status.target
return status_info
|
def process(status):
status_info = {}
status_info['name'] = status.pos.name
status_info['target'] = status.target
return status_info
|
__author__ = 'Ahmed Hani Ibrahim'
class TextEncoder(object):
@classmethod
def encode(cls, categories):
categories_matrix = [[0 for i in range(0, len(categories))] for j in range(0, len(categories))]
true_index = 0
for i in range(0, len(categories)):
categories[i][true_index] = categories[i]
true_index += 1
return categories_matrix
|
__author__ = 'Ahmed Hani Ibrahim'
class Textencoder(object):
@classmethod
def encode(cls, categories):
categories_matrix = [[0 for i in range(0, len(categories))] for j in range(0, len(categories))]
true_index = 0
for i in range(0, len(categories)):
categories[i][true_index] = categories[i]
true_index += 1
return categories_matrix
|
TRAIN_CONTAINERS = [
'plate',
'cube_concave',
'table_top',
'bowl_small',
'tray',
'open_box',
'cube',
'torus',
]
TEST_CONTAINERS = [
'pan_tefal',
'marble_cube',
'basket',
'checkerboard_table',
]
CONTAINER_CONFIGS = {
'plate': {
'container_position_low': (.50, 0.22, -.30),
'container_position_high': (.70, 0.26, -.30),
'container_position_default': (.50, 0.22, -.30),
'container_orientation': (0, 0, 0.707107, 0.707107),
'container_scale': 0.46,
'container_position_z': -0.37,
'place_success_height_threshold': -0.32,
'place_success_radius_threshold': 0.04,
'min_distance_from_object': 0.11,
},
'cube_concave': {
'container_name': 'cube_concave',
'container_position_low': (.50, 0.22, -.30),
'container_position_high': (.70, 0.26, -.30),
'container_position_default': (.50, 0.22, -.30),
'container_orientation': (0, 0, 0.707107, 0.707107),
'container_scale': 0.06,
'container_position_z': -0.35,
'place_success_height_threshold': -0.23,
'place_success_radius_threshold': 0.04,
'min_distance_from_object': 0.11,
},
'table_top': {
'container_position_low': (.50, 0.22, -.30),
'container_position_high': (.70, 0.26, -.30),
'container_position_default': (.50, 0.22, -.30),
'container_orientation': (0, 0, 0.707107, 0.707107),
'container_scale': 0.13,
'container_position_z': -0.37,
'place_success_height_threshold': -0.32,
'place_success_radius_threshold': 0.05,
'min_distance_from_object': 0.11,
},
'bowl_small': {
'container_position_low': (.5, 0.26, -.30),
'container_position_high': (.7, 0.26, -.30),
'container_position_default': (.50, 0.26, -.30),
'container_position_z': -0.35,
'place_success_height_threshold': -0.32,
'place_success_radius_threshold': 0.04,
'container_orientation': (0, 0, 0.707107, 0.707107),
'container_scale': 0.07,
'min_distance_from_object': 0.11,
},
'tray': {
'container_position_low': (.5, 0.25, -.30),
'container_position_high': (.7, 0.25, -.30),
'container_position_default': (.5, 0.25, -.30),
'container_orientation': (0, 0, 0.707107, 0.707107),
'container_scale': 0.18,
'container_position_z': -0.37,
'place_success_height_threshold': -0.32,
'place_success_radius_threshold': 0.04,
'min_distance_from_object': 0.11,
},
'open_box': {
'container_position_low': (.5, 0.23, -.30),
'container_position_high': (.7, 0.23, -.30),
'container_position_default': (.5, 0.23, -.30),
'container_orientation': (0, 0, 0.707107, 0.707107),
'container_scale': 0.1,
'container_position_z': -0.35,
'place_success_height_threshold': -0.32,
'place_success_radius_threshold': 0.04,
'min_distance_from_object': 0.11,
},
'pan_tefal': {
'container_position_low': (.50, 0.22, -.30),
'container_position_high': (.70, 0.24, -.30),
'container_position_default': (.65, 0.23, -.30),
'container_orientation': (0, 0, 0.707107, 0.707107),
'container_scale': 0.4,
'container_position_z': -0.37,
'place_success_height_threshold': -0.32,
'place_success_radius_threshold': 0.04,
'min_distance_from_object': 0.1,
},
'husky': {
'container_position_low': (.50, 0.22, -.30),
'container_position_high': (.70, 0.26, -.30),
'container_position_default': (.50, 0.22, -.30),
'container_orientation': (0, 0, 0.707107, 0.707107),
'container_scale': 0.13,
'container_position_z': -0.35,
'place_success_height_threshold': -0.23,
'place_success_radius_threshold': 0.04,
'min_distance_from_object': 0.10,
},
'marble_cube': {
'container_position_low': (.50, 0.22, -.30),
'container_position_high': (.70, 0.26, -.30),
'container_position_default': (.60, 0.24, -.30),
'container_orientation': (0, 0, 0.707107, 0.707107),
'container_scale': 0.07,
'container_position_z': -0.35,
'place_success_height_threshold': -0.23,
'place_success_radius_threshold': 0.04,
'min_distance_from_object': 0.10,
},
'basket': {
'container_name': 'basket',
'container_position_low': (.50, 0.22, -.30),
'container_position_high': (.70, 0.26, -.30),
'container_position_default': (.55, 0.22, -.30),
'container_orientation': (0, 0, 0.707107, 0.707107),
'container_scale': 1.68,
'container_position_z': -0.37,
'place_success_height_threshold': -0.28,
'place_success_radius_threshold': 0.04,
'min_distance_from_object': 0.11,
},
'checkerboard_table': {
'container_name': 'checkerboard_table',
'container_position_low': (.50, 0.22, -.30),
'container_position_high': (.70, 0.26, -.30),
'container_position_default': (.50, 0.22, -.30),
'container_orientation': (0, 0, 0.707107, 0.707107),
'container_scale': 0.08,
'container_position_z': -0.37,
'place_success_height_threshold': -0.23,
'place_success_radius_threshold': 0.05,
'min_distance_from_object': 0.11,
},
'torus': {
'container_position_low': (.50, 0.22, -.30),
'container_position_high': (.70, 0.26, -.30),
'container_position_default': (.50, 0.22, -.30),
'container_orientation': (1, 1, 1, 1),
'container_scale': 0.15,
'container_position_z': -0.37,
'place_success_height_threshold': -0.32,
'place_success_radius_threshold': 0.04,
'min_distance_from_object': 0.1,
},
'cube': {
'container_position_low': (.5, 0.22, -.30),
'container_position_high': (.7, 0.24, -.30),
'container_position_default': (.5, 0.22, -.30),
'container_orientation': (0, 0, 0.707107, 0.707107),
'container_scale': 0.05,
'container_position_z': -0.35,
'place_success_radius_threshold': 0.03,
'place_success_height_threshold': -0.23,
'min_distance_from_object': 0.1,
}
}
TRAIN_OBJECTS = [
'conic_cup',
'ball',
'sack_vase',
'fountain_vase',
'shed',
'circular_table',
'hex_deep_bowl',
'smushed_dumbbell',
'square_prism_bin',
'narrow_tray',
# New objects:
'colunnade_top',
'stalagcite_chunk',
'bongo_drum_bowl',
'pacifier_vase',
'beehive_funnel',
'crooked_lid_trash_can',
'double_l_faucet',
'toilet_bowl',
'pepsi_bottle',
'two_handled_vase',
'tongue_chair',
'oil_tanker',
'thick_wood_chair',
'modern_canoe',
'pear_ringed_vase',
'short_handle_cup',
'curved_handle_cup',
'bullet_vase',
'glass_half_gallon',
'flat_bottom_sack_vase',
'teepee',
'trapezoidal_bin',
'vintage_canoe',
'bathtub',
'flowery_half_donut',
't_cup',
'cookie_circular_lidless_tin',
'box_sofa',
'baseball_cap',
'two_layered_lampshade',
]
GRASP_TRAIN_OBJECTS = [
'conic_cup',
'fountain_vase',
'circular_table',
'hex_deep_bowl',
'smushed_dumbbell',
'square_prism_bin',
'narrow_tray',
'colunnade_top',
'stalagcite_chunk',
'bongo_drum_bowl',
'pacifier_vase',
'beehive_funnel',
'crooked_lid_trash_can',
'toilet_bowl',
'pepsi_bottle',
'tongue_chair',
'modern_canoe',
'pear_ringed_vase',
'short_handle_cup',
'bullet_vase',
'glass_half_gallon',
'flat_bottom_sack_vase',
'trapezoidal_bin',
'vintage_canoe',
'bathtub',
'flowery_half_donut',
't_cup',
'cookie_circular_lidless_tin',
'box_sofa',
'two_layered_lampshade',
'conic_bin',
'jar',
'bunsen_burner',
'long_vase',
'ringed_cup_oversized_base',
'aero_cylinder',
]
PICK_PLACE_TRAIN_OBJECTS = [
'conic_cup',
'fountain_vase',
'circular_table',
'hex_deep_bowl',
'smushed_dumbbell',
'square_prism_bin',
'narrow_tray',
'colunnade_top',
'stalagcite_chunk',
'bongo_drum_bowl',
'pacifier_vase',
'beehive_funnel',
'crooked_lid_trash_can',
'toilet_bowl',
'pepsi_bottle',
'tongue_chair',
'modern_canoe',
'pear_ringed_vase',
'short_handle_cup',
'bullet_vase',
'glass_half_gallon',
'flat_bottom_sack_vase',
'trapezoidal_bin',
'vintage_canoe',
'bathtub',
'flowery_half_donut',
't_cup',
'cookie_circular_lidless_tin',
'box_sofa',
'two_layered_lampshade',
'conic_bin',
'jar',
'aero_cylinder',
]
OBJECT_SCALINGS = {
'conic_cup': 0.6,
'ball': 1.0,
'sack_vase': 0.6,
'fountain_vase': 0.4,
'shed': 0.6,
'circular_table': 0.4,
'hex_deep_bowl': 0.4,
'smushed_dumbbell': 0.6,
'square_prism_bin': 0.7,
'narrow_tray': 0.35,
# New objects:
'colunnade_top': 0.5,
'stalagcite_chunk': 0.6,
'bongo_drum_bowl': 0.5,
'pacifier_vase': 0.5,
'beehive_funnel': 0.6,
'crooked_lid_trash_can': 0.5,
'double_l_faucet': 0.6,
'toilet_bowl': 0.4,
'pepsi_bottle': 0.65,
'two_handled_vase': 0.45,
'tongue_chair': 0.5,
'oil_tanker': 1.0,
'thick_wood_chair': 0.4,
'modern_canoe': 0.9,
'pear_ringed_vase': 0.65,
'short_handle_cup': 0.5,
'curved_handle_cup': 0.5,
'bullet_vase': 0.6,
'glass_half_gallon': 0.6,
'flat_bottom_sack_vase': 0.5,
'teepee': 0.7,
'trapezoidal_bin': 0.4,
'vintage_canoe': 1.0,
'bathtub': 0.4,
'flowery_half_donut': 0.5,
't_cup': 0.5,
'cookie_circular_lidless_tin': 0.5,
'box_sofa': 0.4,
'baseball_cap': 0.5,
'two_layered_lampshade': 0.6,
'conic_bin': 0.4,
'jar': 0.8,
'gatorade': 0.7,
'bunsen_burner': 0.6,
'long_vase': 0.5,
# New objects:
'ringed_cup_oversized_base': 0.5,
'square_rod_embellishment': 0.6,
'elliptical_capsule': 0.6,
'aero_cylinder': 0.5,
'grill_trash_can': 0.5,
}
TEST_OBJECTS = [
'conic_bin',
'jar',
'gatorade',
'bunsen_burner',
'long_vase',
# New objects:
'ringed_cup_oversized_base',
'square_rod_embellishment',
'elliptical_capsule',
'aero_cylinder',
'grill_trash_can',
]
GRASP_TEST_OBJECTS = [
'square_rod_embellishment',
'grill_trash_can',
'shed',
'sack_vase',
'two_handled_vase',
'thick_wood_chair',
'curved_handle_cup',
'baseball_cap',
'elliptical_capsule',
]
PICK_PLACE_TEST_OBJECTS = [
'square_rod_embellishment',
'grill_trash_can',
'shed',
'sack_vase',
'two_handled_vase',
'thick_wood_chair',
'curved_handle_cup',
'baseball_cap',
'elliptical_capsule',
]
OBJECT_ORIENTATIONS = {
'conic_cup': (0, 0, 1, 0),
'ball': (0, 0, 1, 0),
'sack_vase': (0, 0.707, 0.707, 0),
'fountain_vase': (0, 0, 1, 0),
'shed': (0, 0, 1, 0),
'circular_table': (0, 0, 1, 0),
'hex_deep_bowl': (0, 0, 1, 0),
'smushed_dumbbell': (0, 0, 1, 0),
'square_prism_bin': (0, 0, 1, 0),
'narrow_tray': (0, 0, 1, 0),
# New objects:
'colunnade_top': (0, 0, 1, 0),
'stalagcite_chunk': (0, 0, 1, 0),
'bongo_drum_bowl': (0, 0.707, 0.707, 0),
'pacifier_vase': (0, 0, 1, 1),
'beehive_funnel': (0, 0, 1, 0),
'crooked_lid_trash_can': (0, 0, 1, 0),
'double_l_faucet': (0, 0.707, 0, 0.707),
'toilet_bowl': (0, 0, 1, 0),
'pepsi_bottle': (0, 0, 1, 0),
'two_handled_vase': (0, 0, 1, 0),
'tongue_chair': (0, 0, 1, 0),
'oil_tanker': (0, 0, 0, 0),
'thick_wood_chair': (0, 0, 1, 0),
'modern_canoe': (0, 0.707, 0.707, 0),
'pear_ringed_vase': (0, 0, 1, 0),
'short_handle_cup': (0, 0, 1, 0),
'curved_handle_cup': (0, 0.707, 0.707, 0),
'bullet_vase': (0, 0, 1, 0),
'glass_half_gallon': (0, 0, 1, 0),
'flat_bottom_sack_vase': (0, 0, 1, 0),
'teepee': (0, 0, 1, 0),
'trapezoidal_bin': (0, 0, 1, 0),
'vintage_canoe': (0, 0.707, 0.707, 0),
'bathtub': (0, 0, 1, 0),
'flowery_half_donut': (0, 0.707, 0.707, 0),
't_cup': (0, 0.707, 0.707, 0),
'cookie_circular_lidless_tin': (0, 0, 1, 0),
'box_sofa': (0, 0, 1, 0),
'baseball_cap': (0, -0.707, 0.707, 0),
'two_layered_lampshade': (0, 0.707, 0.707, 0),
'conic_bin': (0, 0.707, 0.707, 0),
'jar': (0, 0.707, 0, 0.707),
'gatorade': (0, 0, 1, 0),
'bunsen_burner': (0, 0, 1, 0),
'long_vase': (0, 0, 1, 0),
# New objects:
'ringed_cup_oversized_base': (0, 0.707, 0.707, 0),
'square_rod_embellishment': (0, 0, 1, 0),
'elliptical_capsule': (0.5, 0.5, 0.5, 0.5),
'aero_cylinder': (0, 0, 1, 0),
'grill_trash_can': (0, 0.707, 0.707, 0),
}
GRASP_OFFSETS = {
'bunsen_burner': (0, 0.01, 0.0),
'double_l_faucet': (0.01, 0.0, 0.0),
'pear_ringed_vase': (0.0, 0.01, 0.0),
'teepee': (0.0, 0.04, 0.0),
'long_vase': (0.0, 0.03, 0.0),
'ball': (0, 0, 0.0)
}
|
train_containers = ['plate', 'cube_concave', 'table_top', 'bowl_small', 'tray', 'open_box', 'cube', 'torus']
test_containers = ['pan_tefal', 'marble_cube', 'basket', 'checkerboard_table']
container_configs = {'plate': {'container_position_low': (0.5, 0.22, -0.3), 'container_position_high': (0.7, 0.26, -0.3), 'container_position_default': (0.5, 0.22, -0.3), 'container_orientation': (0, 0, 0.707107, 0.707107), 'container_scale': 0.46, 'container_position_z': -0.37, 'place_success_height_threshold': -0.32, 'place_success_radius_threshold': 0.04, 'min_distance_from_object': 0.11}, 'cube_concave': {'container_name': 'cube_concave', 'container_position_low': (0.5, 0.22, -0.3), 'container_position_high': (0.7, 0.26, -0.3), 'container_position_default': (0.5, 0.22, -0.3), 'container_orientation': (0, 0, 0.707107, 0.707107), 'container_scale': 0.06, 'container_position_z': -0.35, 'place_success_height_threshold': -0.23, 'place_success_radius_threshold': 0.04, 'min_distance_from_object': 0.11}, 'table_top': {'container_position_low': (0.5, 0.22, -0.3), 'container_position_high': (0.7, 0.26, -0.3), 'container_position_default': (0.5, 0.22, -0.3), 'container_orientation': (0, 0, 0.707107, 0.707107), 'container_scale': 0.13, 'container_position_z': -0.37, 'place_success_height_threshold': -0.32, 'place_success_radius_threshold': 0.05, 'min_distance_from_object': 0.11}, 'bowl_small': {'container_position_low': (0.5, 0.26, -0.3), 'container_position_high': (0.7, 0.26, -0.3), 'container_position_default': (0.5, 0.26, -0.3), 'container_position_z': -0.35, 'place_success_height_threshold': -0.32, 'place_success_radius_threshold': 0.04, 'container_orientation': (0, 0, 0.707107, 0.707107), 'container_scale': 0.07, 'min_distance_from_object': 0.11}, 'tray': {'container_position_low': (0.5, 0.25, -0.3), 'container_position_high': (0.7, 0.25, -0.3), 'container_position_default': (0.5, 0.25, -0.3), 'container_orientation': (0, 0, 0.707107, 0.707107), 'container_scale': 0.18, 'container_position_z': -0.37, 'place_success_height_threshold': -0.32, 'place_success_radius_threshold': 0.04, 'min_distance_from_object': 0.11}, 'open_box': {'container_position_low': (0.5, 0.23, -0.3), 'container_position_high': (0.7, 0.23, -0.3), 'container_position_default': (0.5, 0.23, -0.3), 'container_orientation': (0, 0, 0.707107, 0.707107), 'container_scale': 0.1, 'container_position_z': -0.35, 'place_success_height_threshold': -0.32, 'place_success_radius_threshold': 0.04, 'min_distance_from_object': 0.11}, 'pan_tefal': {'container_position_low': (0.5, 0.22, -0.3), 'container_position_high': (0.7, 0.24, -0.3), 'container_position_default': (0.65, 0.23, -0.3), 'container_orientation': (0, 0, 0.707107, 0.707107), 'container_scale': 0.4, 'container_position_z': -0.37, 'place_success_height_threshold': -0.32, 'place_success_radius_threshold': 0.04, 'min_distance_from_object': 0.1}, 'husky': {'container_position_low': (0.5, 0.22, -0.3), 'container_position_high': (0.7, 0.26, -0.3), 'container_position_default': (0.5, 0.22, -0.3), 'container_orientation': (0, 0, 0.707107, 0.707107), 'container_scale': 0.13, 'container_position_z': -0.35, 'place_success_height_threshold': -0.23, 'place_success_radius_threshold': 0.04, 'min_distance_from_object': 0.1}, 'marble_cube': {'container_position_low': (0.5, 0.22, -0.3), 'container_position_high': (0.7, 0.26, -0.3), 'container_position_default': (0.6, 0.24, -0.3), 'container_orientation': (0, 0, 0.707107, 0.707107), 'container_scale': 0.07, 'container_position_z': -0.35, 'place_success_height_threshold': -0.23, 'place_success_radius_threshold': 0.04, 'min_distance_from_object': 0.1}, 'basket': {'container_name': 'basket', 'container_position_low': (0.5, 0.22, -0.3), 'container_position_high': (0.7, 0.26, -0.3), 'container_position_default': (0.55, 0.22, -0.3), 'container_orientation': (0, 0, 0.707107, 0.707107), 'container_scale': 1.68, 'container_position_z': -0.37, 'place_success_height_threshold': -0.28, 'place_success_radius_threshold': 0.04, 'min_distance_from_object': 0.11}, 'checkerboard_table': {'container_name': 'checkerboard_table', 'container_position_low': (0.5, 0.22, -0.3), 'container_position_high': (0.7, 0.26, -0.3), 'container_position_default': (0.5, 0.22, -0.3), 'container_orientation': (0, 0, 0.707107, 0.707107), 'container_scale': 0.08, 'container_position_z': -0.37, 'place_success_height_threshold': -0.23, 'place_success_radius_threshold': 0.05, 'min_distance_from_object': 0.11}, 'torus': {'container_position_low': (0.5, 0.22, -0.3), 'container_position_high': (0.7, 0.26, -0.3), 'container_position_default': (0.5, 0.22, -0.3), 'container_orientation': (1, 1, 1, 1), 'container_scale': 0.15, 'container_position_z': -0.37, 'place_success_height_threshold': -0.32, 'place_success_radius_threshold': 0.04, 'min_distance_from_object': 0.1}, 'cube': {'container_position_low': (0.5, 0.22, -0.3), 'container_position_high': (0.7, 0.24, -0.3), 'container_position_default': (0.5, 0.22, -0.3), 'container_orientation': (0, 0, 0.707107, 0.707107), 'container_scale': 0.05, 'container_position_z': -0.35, 'place_success_radius_threshold': 0.03, 'place_success_height_threshold': -0.23, 'min_distance_from_object': 0.1}}
train_objects = ['conic_cup', 'ball', 'sack_vase', 'fountain_vase', 'shed', 'circular_table', 'hex_deep_bowl', 'smushed_dumbbell', 'square_prism_bin', 'narrow_tray', 'colunnade_top', 'stalagcite_chunk', 'bongo_drum_bowl', 'pacifier_vase', 'beehive_funnel', 'crooked_lid_trash_can', 'double_l_faucet', 'toilet_bowl', 'pepsi_bottle', 'two_handled_vase', 'tongue_chair', 'oil_tanker', 'thick_wood_chair', 'modern_canoe', 'pear_ringed_vase', 'short_handle_cup', 'curved_handle_cup', 'bullet_vase', 'glass_half_gallon', 'flat_bottom_sack_vase', 'teepee', 'trapezoidal_bin', 'vintage_canoe', 'bathtub', 'flowery_half_donut', 't_cup', 'cookie_circular_lidless_tin', 'box_sofa', 'baseball_cap', 'two_layered_lampshade']
grasp_train_objects = ['conic_cup', 'fountain_vase', 'circular_table', 'hex_deep_bowl', 'smushed_dumbbell', 'square_prism_bin', 'narrow_tray', 'colunnade_top', 'stalagcite_chunk', 'bongo_drum_bowl', 'pacifier_vase', 'beehive_funnel', 'crooked_lid_trash_can', 'toilet_bowl', 'pepsi_bottle', 'tongue_chair', 'modern_canoe', 'pear_ringed_vase', 'short_handle_cup', 'bullet_vase', 'glass_half_gallon', 'flat_bottom_sack_vase', 'trapezoidal_bin', 'vintage_canoe', 'bathtub', 'flowery_half_donut', 't_cup', 'cookie_circular_lidless_tin', 'box_sofa', 'two_layered_lampshade', 'conic_bin', 'jar', 'bunsen_burner', 'long_vase', 'ringed_cup_oversized_base', 'aero_cylinder']
pick_place_train_objects = ['conic_cup', 'fountain_vase', 'circular_table', 'hex_deep_bowl', 'smushed_dumbbell', 'square_prism_bin', 'narrow_tray', 'colunnade_top', 'stalagcite_chunk', 'bongo_drum_bowl', 'pacifier_vase', 'beehive_funnel', 'crooked_lid_trash_can', 'toilet_bowl', 'pepsi_bottle', 'tongue_chair', 'modern_canoe', 'pear_ringed_vase', 'short_handle_cup', 'bullet_vase', 'glass_half_gallon', 'flat_bottom_sack_vase', 'trapezoidal_bin', 'vintage_canoe', 'bathtub', 'flowery_half_donut', 't_cup', 'cookie_circular_lidless_tin', 'box_sofa', 'two_layered_lampshade', 'conic_bin', 'jar', 'aero_cylinder']
object_scalings = {'conic_cup': 0.6, 'ball': 1.0, 'sack_vase': 0.6, 'fountain_vase': 0.4, 'shed': 0.6, 'circular_table': 0.4, 'hex_deep_bowl': 0.4, 'smushed_dumbbell': 0.6, 'square_prism_bin': 0.7, 'narrow_tray': 0.35, 'colunnade_top': 0.5, 'stalagcite_chunk': 0.6, 'bongo_drum_bowl': 0.5, 'pacifier_vase': 0.5, 'beehive_funnel': 0.6, 'crooked_lid_trash_can': 0.5, 'double_l_faucet': 0.6, 'toilet_bowl': 0.4, 'pepsi_bottle': 0.65, 'two_handled_vase': 0.45, 'tongue_chair': 0.5, 'oil_tanker': 1.0, 'thick_wood_chair': 0.4, 'modern_canoe': 0.9, 'pear_ringed_vase': 0.65, 'short_handle_cup': 0.5, 'curved_handle_cup': 0.5, 'bullet_vase': 0.6, 'glass_half_gallon': 0.6, 'flat_bottom_sack_vase': 0.5, 'teepee': 0.7, 'trapezoidal_bin': 0.4, 'vintage_canoe': 1.0, 'bathtub': 0.4, 'flowery_half_donut': 0.5, 't_cup': 0.5, 'cookie_circular_lidless_tin': 0.5, 'box_sofa': 0.4, 'baseball_cap': 0.5, 'two_layered_lampshade': 0.6, 'conic_bin': 0.4, 'jar': 0.8, 'gatorade': 0.7, 'bunsen_burner': 0.6, 'long_vase': 0.5, 'ringed_cup_oversized_base': 0.5, 'square_rod_embellishment': 0.6, 'elliptical_capsule': 0.6, 'aero_cylinder': 0.5, 'grill_trash_can': 0.5}
test_objects = ['conic_bin', 'jar', 'gatorade', 'bunsen_burner', 'long_vase', 'ringed_cup_oversized_base', 'square_rod_embellishment', 'elliptical_capsule', 'aero_cylinder', 'grill_trash_can']
grasp_test_objects = ['square_rod_embellishment', 'grill_trash_can', 'shed', 'sack_vase', 'two_handled_vase', 'thick_wood_chair', 'curved_handle_cup', 'baseball_cap', 'elliptical_capsule']
pick_place_test_objects = ['square_rod_embellishment', 'grill_trash_can', 'shed', 'sack_vase', 'two_handled_vase', 'thick_wood_chair', 'curved_handle_cup', 'baseball_cap', 'elliptical_capsule']
object_orientations = {'conic_cup': (0, 0, 1, 0), 'ball': (0, 0, 1, 0), 'sack_vase': (0, 0.707, 0.707, 0), 'fountain_vase': (0, 0, 1, 0), 'shed': (0, 0, 1, 0), 'circular_table': (0, 0, 1, 0), 'hex_deep_bowl': (0, 0, 1, 0), 'smushed_dumbbell': (0, 0, 1, 0), 'square_prism_bin': (0, 0, 1, 0), 'narrow_tray': (0, 0, 1, 0), 'colunnade_top': (0, 0, 1, 0), 'stalagcite_chunk': (0, 0, 1, 0), 'bongo_drum_bowl': (0, 0.707, 0.707, 0), 'pacifier_vase': (0, 0, 1, 1), 'beehive_funnel': (0, 0, 1, 0), 'crooked_lid_trash_can': (0, 0, 1, 0), 'double_l_faucet': (0, 0.707, 0, 0.707), 'toilet_bowl': (0, 0, 1, 0), 'pepsi_bottle': (0, 0, 1, 0), 'two_handled_vase': (0, 0, 1, 0), 'tongue_chair': (0, 0, 1, 0), 'oil_tanker': (0, 0, 0, 0), 'thick_wood_chair': (0, 0, 1, 0), 'modern_canoe': (0, 0.707, 0.707, 0), 'pear_ringed_vase': (0, 0, 1, 0), 'short_handle_cup': (0, 0, 1, 0), 'curved_handle_cup': (0, 0.707, 0.707, 0), 'bullet_vase': (0, 0, 1, 0), 'glass_half_gallon': (0, 0, 1, 0), 'flat_bottom_sack_vase': (0, 0, 1, 0), 'teepee': (0, 0, 1, 0), 'trapezoidal_bin': (0, 0, 1, 0), 'vintage_canoe': (0, 0.707, 0.707, 0), 'bathtub': (0, 0, 1, 0), 'flowery_half_donut': (0, 0.707, 0.707, 0), 't_cup': (0, 0.707, 0.707, 0), 'cookie_circular_lidless_tin': (0, 0, 1, 0), 'box_sofa': (0, 0, 1, 0), 'baseball_cap': (0, -0.707, 0.707, 0), 'two_layered_lampshade': (0, 0.707, 0.707, 0), 'conic_bin': (0, 0.707, 0.707, 0), 'jar': (0, 0.707, 0, 0.707), 'gatorade': (0, 0, 1, 0), 'bunsen_burner': (0, 0, 1, 0), 'long_vase': (0, 0, 1, 0), 'ringed_cup_oversized_base': (0, 0.707, 0.707, 0), 'square_rod_embellishment': (0, 0, 1, 0), 'elliptical_capsule': (0.5, 0.5, 0.5, 0.5), 'aero_cylinder': (0, 0, 1, 0), 'grill_trash_can': (0, 0.707, 0.707, 0)}
grasp_offsets = {'bunsen_burner': (0, 0.01, 0.0), 'double_l_faucet': (0.01, 0.0, 0.0), 'pear_ringed_vase': (0.0, 0.01, 0.0), 'teepee': (0.0, 0.04, 0.0), 'long_vase': (0.0, 0.03, 0.0), 'ball': (0, 0, 0.0)}
|
# -*- coding: utf-8 -*-
class Solution:
def maxProfit(self, prices):
minimum_price = float('inf')
maximum_profit = 0
for price in prices:
if price < minimum_price:
minimum_price = price
if price - minimum_price > maximum_profit:
maximum_profit = price - minimum_price
return maximum_profit
if __name__ == '__main__':
solution = Solution()
assert 5 == solution.maxProfit([7, 1, 5, 3, 6, 4])
assert 0 == solution.maxProfit([7, 6, 4, 3, 1])
|
class Solution:
def max_profit(self, prices):
minimum_price = float('inf')
maximum_profit = 0
for price in prices:
if price < minimum_price:
minimum_price = price
if price - minimum_price > maximum_profit:
maximum_profit = price - minimum_price
return maximum_profit
if __name__ == '__main__':
solution = solution()
assert 5 == solution.maxProfit([7, 1, 5, 3, 6, 4])
assert 0 == solution.maxProfit([7, 6, 4, 3, 1])
|
# Program : Find the number of vowels in the string.
# Input : string = "Nature"
# Output : 3
# Explanation : The string "Nature" has 3 vowels in it, ie, 'a', 'u' and 'e'.
# Language : Python3
# O(n) time | O(1) space
def length_of_string(number):
# Initialize the vowel list.
vowels = ["a", "e", "i", "o", "u"]
# Intialize the count as zero.
count = 0
# Do for each character in the string.
for ch in string:
# If the current character is in the vowel list, then increment the count by 1.
if ch in vowels:
count = count + 1
# Return the count.
return count
# Main function.
if __name__ == '__main__':
# Declare the string.
string = "Nature"
# Find the count of vowels in the string and store the result in the answer variable.
answer = length_of_string(string)
# Print the answer.
print(answer)
|
def length_of_string(number):
vowels = ['a', 'e', 'i', 'o', 'u']
count = 0
for ch in string:
if ch in vowels:
count = count + 1
return count
if __name__ == '__main__':
string = 'Nature'
answer = length_of_string(string)
print(answer)
|
def reverse_integer(n):
reversed = 0
remainder = 0
while n > 0:
remainder = n % 10
reversed = reversed * 10 + remainder
n = n // 10
return reversed
if __name__ == "__main__":
print(reverse_integer(12345))
|
def reverse_integer(n):
reversed = 0
remainder = 0
while n > 0:
remainder = n % 10
reversed = reversed * 10 + remainder
n = n // 10
return reversed
if __name__ == '__main__':
print(reverse_integer(12345))
|
class Student:
def __init__(self, name, age, grade):
self.name = name
self.age = age
self.grade = grade # between 0 - 100
def get_grade(self):
return self.grade
class Course:
def __init__(self, name, max_students):
self.name = name
self.max_students = max_students
self.students = []
def add_student(self, student):
if len(self.students) < self.max_students:
self.students.append(student)
return True
return False
def get_average_grade(self):
value = 0
for student in self.students:
value += student.get_grade()
return value / len(self.students)
s1 = Student('Tim', 19, 95)
s2 = Student('Bill', 19, 75)
s3 = Student('Jill', 19, 65)
course = Course('Science', 2)
course.add_student(s1)
course.add_student(s2)
print(course.add_student(s3))
print(course.get_average_grade())
|
class Student:
def __init__(self, name, age, grade):
self.name = name
self.age = age
self.grade = grade
def get_grade(self):
return self.grade
class Course:
def __init__(self, name, max_students):
self.name = name
self.max_students = max_students
self.students = []
def add_student(self, student):
if len(self.students) < self.max_students:
self.students.append(student)
return True
return False
def get_average_grade(self):
value = 0
for student in self.students:
value += student.get_grade()
return value / len(self.students)
s1 = student('Tim', 19, 95)
s2 = student('Bill', 19, 75)
s3 = student('Jill', 19, 65)
course = course('Science', 2)
course.add_student(s1)
course.add_student(s2)
print(course.add_student(s3))
print(course.get_average_grade())
|
class IRobotCreateError(Exception):
def __init__(self, errorCode = 0, errorMsg = ""):
self.errorCode = errorCode
self.errorMsg = errorMsg
# self.super()
class ErrorCode():
SerialPortNotFound = 1
SerialConnectionTimeout = 2
ConfigFileError = 3
ConfigFileCorrupted = 4
ValueOutOfRange = 5
|
class Irobotcreateerror(Exception):
def __init__(self, errorCode=0, errorMsg=''):
self.errorCode = errorCode
self.errorMsg = errorMsg
class Errorcode:
serial_port_not_found = 1
serial_connection_timeout = 2
config_file_error = 3
config_file_corrupted = 4
value_out_of_range = 5
|
t=0.0
dt=0.05
cx=0
cy=0
r=180
rs=[(x+2)*1.1 for x in range(500)]
dr=-1
wiperon=True
sopa=255
wopa=40
sc=[255,255,255]
wc=[0,0,0]
fpd=10
def setup():
global cx,cy
size(1280,720)
background(0)
stroke(sc[0],sc[1],sc[2],sopa)
cx=width/2
cy=height/2
def wipe():
fill(wc[0],wc[1],wc[2],wopa)
rect(0,0,width,height)
def iter(n):
global t,dt,r,dr
for i in range(n):
for idx,ri in enumerate(rs):
coeff=log(ri)
sopa=constrain(128+100*sin(0.10*t),10,255)
stroke(sc[0],sc[1],sc[2],sopa)
x=cx+ri*cos(coeff*t)
y=cy-ri*sin(coeff*t)
point(x,y)
t+=dt
if wiperon:
wipe()
def draw():
iter(fpd)
def keyPressed():
global wiperon,sopa,sc
if key=='q':
print('exiting...')
exit()
elif key=='b':
sc=[0,0,0,sopa]
elif key=='w':
sc=[255,255,255,sopa]
elif key=='.':
wiperon=not wiperon
elif key=='o':
sopa=128 if sopa==16 else 16
stroke(sc[0],sc[1],sc[2],sopa)
def mouseClicked():
global fpd
fpd=constrain(mouseX,1,60)
|
t = 0.0
dt = 0.05
cx = 0
cy = 0
r = 180
rs = [(x + 2) * 1.1 for x in range(500)]
dr = -1
wiperon = True
sopa = 255
wopa = 40
sc = [255, 255, 255]
wc = [0, 0, 0]
fpd = 10
def setup():
global cx, cy
size(1280, 720)
background(0)
stroke(sc[0], sc[1], sc[2], sopa)
cx = width / 2
cy = height / 2
def wipe():
fill(wc[0], wc[1], wc[2], wopa)
rect(0, 0, width, height)
def iter(n):
global t, dt, r, dr
for i in range(n):
for (idx, ri) in enumerate(rs):
coeff = log(ri)
sopa = constrain(128 + 100 * sin(0.1 * t), 10, 255)
stroke(sc[0], sc[1], sc[2], sopa)
x = cx + ri * cos(coeff * t)
y = cy - ri * sin(coeff * t)
point(x, y)
t += dt
if wiperon:
wipe()
def draw():
iter(fpd)
def key_pressed():
global wiperon, sopa, sc
if key == 'q':
print('exiting...')
exit()
elif key == 'b':
sc = [0, 0, 0, sopa]
elif key == 'w':
sc = [255, 255, 255, sopa]
elif key == '.':
wiperon = not wiperon
elif key == 'o':
sopa = 128 if sopa == 16 else 16
stroke(sc[0], sc[1], sc[2], sopa)
def mouse_clicked():
global fpd
fpd = constrain(mouseX, 1, 60)
|
"""Column Mapping base class."""
class ColumnMapSolver:
"""Base Solver for the data lineage problem of column dependency."""
def fit(self, list_of_databases):
"""Fit this solver.
Args:
list_of_databases (list):
List of tuples containing ``MetaData`` instnces and table dictinaries,
which contain table names as input and ``pandas.DataFrames`` as values.
"""
pass
def solve(self, tables, foreign_keys, target_table, target_field):
"""Find the fields which contributed to the target_field the most.
The output is a dictionary containing the fields that contributed the
most to the given target field as keys, specified as a tuple containing
both table name and field name, and the score obtained as values.
Args:
tables (dict):
Dict containing table names as input and ``pandas.DataFrames``
as values.
foreign_keys (list):
List of foreign key specifications.
target_table (str):
Name of the table that contains the target field.
target_field (str):
Name of the target field.
Returns:
dict:
Dictionary of field specification tuples and scores.
"""
raise NotImplementedError()
|
"""Column Mapping base class."""
class Columnmapsolver:
"""Base Solver for the data lineage problem of column dependency."""
def fit(self, list_of_databases):
"""Fit this solver.
Args:
list_of_databases (list):
List of tuples containing ``MetaData`` instnces and table dictinaries,
which contain table names as input and ``pandas.DataFrames`` as values.
"""
pass
def solve(self, tables, foreign_keys, target_table, target_field):
"""Find the fields which contributed to the target_field the most.
The output is a dictionary containing the fields that contributed the
most to the given target field as keys, specified as a tuple containing
both table name and field name, and the score obtained as values.
Args:
tables (dict):
Dict containing table names as input and ``pandas.DataFrames``
as values.
foreign_keys (list):
List of foreign key specifications.
target_table (str):
Name of the table that contains the target field.
target_field (str):
Name of the target field.
Returns:
dict:
Dictionary of field specification tuples and scores.
"""
raise not_implemented_error()
|
with open('multiplos4.txt', 'w') as multiplos:
pares = open('pares.txt')
for l in pares.readlines():
num = l.replace('\n', '')
if int(num) % 4 == 0:
multiplos.write(f'{num}\n')
|
with open('multiplos4.txt', 'w') as multiplos:
pares = open('pares.txt')
for l in pares.readlines():
num = l.replace('\n', '')
if int(num) % 4 == 0:
multiplos.write(f'{num}\n')
|
class BaseSecretEngine:
def __init__(self, config_d):
self.name = config_d['secret_engine_name']
self.default = config_d.get("default", False)
def encrypt(self, data, **context):
raise NotImplementedError
def decrypt(self, data, **context):
raise NotImplementedError
|
class Basesecretengine:
def __init__(self, config_d):
self.name = config_d['secret_engine_name']
self.default = config_d.get('default', False)
def encrypt(self, data, **context):
raise NotImplementedError
def decrypt(self, data, **context):
raise NotImplementedError
|
n,k,*x=map(int,open(0).read().split())
def distance(l,r):
return min(
abs(l)+abs(r-l),
abs(r)+abs(r-l))
a=[]
for i in range(n-k+1):
a.append(distance(x[i],x[i+k-1]))
print(min(a))
|
(n, k, *x) = map(int, open(0).read().split())
def distance(l, r):
return min(abs(l) + abs(r - l), abs(r) + abs(r - l))
a = []
for i in range(n - k + 1):
a.append(distance(x[i], x[i + k - 1]))
print(min(a))
|
"""
Script testing 14.4.1 control from OWASP ASVS 4.0:
'Verify that every HTTP response contains a Content-Type header. Also
specify a safe character set (e.g., UTF-8, ISO-8859-1) if the content types are
text/*, /+xml and application/xml. Content must match with the provided
Content-Type header.'
The script will raise an alert if:
1. There is no Content-Type header in the HTTP response
2. The content types are text/*, /+xml and application/xml but safe character sets: UTF-8, ISO-8859-1 are not used
"""
#return true if:
#xml is in the header but utf-8 and utf-16 are not
#text is in the header but utf-8, utf-16 and iso-8859-1 are not
def useSafeCharacters(header):
not_utf8 = "utf-8" not in header
not_utf16 = "utf-16" not in header
not_iso88591 = "iso-8859-1" not in header
text = "text/" in header
xml = "xml" in header
if xml and (not_utf8 and not_utf16):
return True
elif text and ((not_utf8 and not_utf16) and not_iso88591):
return True
return False
def scan(ps, msg, src):
#find "Content-Type" header
header = str(msg.getResponseHeader().getHeader("Content-Type"))
#alert parameters
alertRisk= 1
alertConfidence = 2
alertTitle = "14.4.1 Verify that every HTTP response contains a Content-Type header."
alertDescription = "The Content-Type representation header is used to indicate the original media type of the resource (before any content encoding is applied for sending)."
url = msg.getRequestHeader().getURI().toString()
alertParam = ""
alertAttack = ""
alertInfo = "https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html"
solutions = ["Add 'Content-Type' header in HTTP response.", "Specify a safe character set (UTF-8, UTF-16) if the content types are /+xml or application/xml and (UTF-8, UTF-16, ISO-8859-1) if the content type is text/*"]
alertSolution = ""
alertEvidence = "Content-Type: " + header
cweID = 173
wascID = 0
#if there is no header, change alert solution
if (header == "None"):
alertSolution = solutions[0]
#if header needs to use safe character sets, change alert solution
elif (useSafeCharacters(header.lower())):
alertSolution = solutions[1]
#if alert solution has changed, raise alert
if (alertSolution != ""):
ps.raiseAlert(alertRisk, alertConfidence, alertTitle, alertDescription,
url, alertParam, alertAttack, alertInfo, alertSolution, alertEvidence, cweID, wascID, msg);
|
"""
Script testing 14.4.1 control from OWASP ASVS 4.0:
'Verify that every HTTP response contains a Content-Type header. Also
specify a safe character set (e.g., UTF-8, ISO-8859-1) if the content types are
text/*, /+xml and application/xml. Content must match with the provided
Content-Type header.'
The script will raise an alert if:
1. There is no Content-Type header in the HTTP response
2. The content types are text/*, /+xml and application/xml but safe character sets: UTF-8, ISO-8859-1 are not used
"""
def use_safe_characters(header):
not_utf8 = 'utf-8' not in header
not_utf16 = 'utf-16' not in header
not_iso88591 = 'iso-8859-1' not in header
text = 'text/' in header
xml = 'xml' in header
if xml and (not_utf8 and not_utf16):
return True
elif text and ((not_utf8 and not_utf16) and not_iso88591):
return True
return False
def scan(ps, msg, src):
header = str(msg.getResponseHeader().getHeader('Content-Type'))
alert_risk = 1
alert_confidence = 2
alert_title = '14.4.1 Verify that every HTTP response contains a Content-Type header.'
alert_description = 'The Content-Type representation header is used to indicate the original media type of the resource (before any content encoding is applied for sending).'
url = msg.getRequestHeader().getURI().toString()
alert_param = ''
alert_attack = ''
alert_info = 'https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html'
solutions = ["Add 'Content-Type' header in HTTP response.", 'Specify a safe character set (UTF-8, UTF-16) if the content types are /+xml or application/xml and (UTF-8, UTF-16, ISO-8859-1) if the content type is text/*']
alert_solution = ''
alert_evidence = 'Content-Type: ' + header
cwe_id = 173
wasc_id = 0
if header == 'None':
alert_solution = solutions[0]
elif use_safe_characters(header.lower()):
alert_solution = solutions[1]
if alertSolution != '':
ps.raiseAlert(alertRisk, alertConfidence, alertTitle, alertDescription, url, alertParam, alertAttack, alertInfo, alertSolution, alertEvidence, cweID, wascID, msg)
|
# plot a KDE for each attribute
def plot_single_kde(data, attr):
data[[attr]].plot.kde(figsize=(4,2), legend=None)
ax = plt.gca()
ax.set_xlim([data[attr].min(), data[attr].max()])
ax.set_xlabel(attr, fontsize=14)
ax.set_ylabel('Density', fontsize=14)
for attr in data.columns:
plot_single_kde(data, attr)
|
def plot_single_kde(data, attr):
data[[attr]].plot.kde(figsize=(4, 2), legend=None)
ax = plt.gca()
ax.set_xlim([data[attr].min(), data[attr].max()])
ax.set_xlabel(attr, fontsize=14)
ax.set_ylabel('Density', fontsize=14)
for attr in data.columns:
plot_single_kde(data, attr)
|
# Solution
# O(n) time / O(n) space
def sunsetViews(buildings, direction):
buildingsWithSunsetViews = []
startIdx = 0 if direction == "WEST" else len(buildings) - 1
step = 1 if direction == "WEST" else - 1
idx = startIdx
runningMaxHeight = 0
while idx >= 0 and idx < len(buildings):
buildingHeight = buildings[idx]
if buildingHeight > runningMaxHeight:
buildingsWithSunsetViews.append(idx)
runningMaxHeight = max(runningMaxHeight, buildingHeight)
idx += step
if direction == "EAST":
return buildingsWithSunsetViews[::-1]
return buildingsWithSunsetViews
# Solution
# O(n) time / O(n) space
def sunsetViews(buildings, direction):
candidateBuildings = []
startIdx = 0 if direction == "EAST" else len(buildings) - 1
step = 1 if direction == "EAST" else -1
idx = startIdx
while idx >= 0 and idx < len(buildings):
buildingHeight = buildings[idx]
while len(candidateBuildings) > 0 and buildings[candidateBuildings[-1]] <= buildingHeight:
candidateBuildings.pop()
candidateBuildings.append(idx)
idx += step
if direction == "WEST":
return candidateBuildings[::-1]
return candidateBuildings
|
def sunset_views(buildings, direction):
buildings_with_sunset_views = []
start_idx = 0 if direction == 'WEST' else len(buildings) - 1
step = 1 if direction == 'WEST' else -1
idx = startIdx
running_max_height = 0
while idx >= 0 and idx < len(buildings):
building_height = buildings[idx]
if buildingHeight > runningMaxHeight:
buildingsWithSunsetViews.append(idx)
running_max_height = max(runningMaxHeight, buildingHeight)
idx += step
if direction == 'EAST':
return buildingsWithSunsetViews[::-1]
return buildingsWithSunsetViews
def sunset_views(buildings, direction):
candidate_buildings = []
start_idx = 0 if direction == 'EAST' else len(buildings) - 1
step = 1 if direction == 'EAST' else -1
idx = startIdx
while idx >= 0 and idx < len(buildings):
building_height = buildings[idx]
while len(candidateBuildings) > 0 and buildings[candidateBuildings[-1]] <= buildingHeight:
candidateBuildings.pop()
candidateBuildings.append(idx)
idx += step
if direction == 'WEST':
return candidateBuildings[::-1]
return candidateBuildings
|
N=int(input())
M,K=list(map(int,input().split()))
L = list(map(int,input().split()))
L.sort(reverse = True)
S = M*K
for i,j in enumerate(L):
S -= j
if S<=0:
print(i+1)
break
else:
print("STRESS")
|
n = int(input())
(m, k) = list(map(int, input().split()))
l = list(map(int, input().split()))
L.sort(reverse=True)
s = M * K
for (i, j) in enumerate(L):
s -= j
if S <= 0:
print(i + 1)
break
else:
print('STRESS')
|
#!/usr/bin/env python3
while True:
n = int(input("Please enter an Integer: "))
if n < 0:
continue #there will retrun while running
elif n == 0:
break
print("Square is ", n ** 2)
print("Goodbye")
|
while True:
n = int(input('Please enter an Integer: '))
if n < 0:
continue
elif n == 0:
break
print('Square is ', n ** 2)
print('Goodbye')
|
class Bucket():
'''Utility class for Manber-Myers algorithm.'''
def __init__(self,prefix,stringT):
self.prefix = prefix # one or more letters
self.stringT = stringT # needed for shortcut sort
self.suffixes = [] # array of int
def __str__(self):
viz = ""
viz = viz + str(self.prefix)
viz = viz + " "
viz = viz + str(self.suffixes)
return (viz)
def get_prefix(self):
return self.prefix
def add_suffix(self,index):
self.suffixes.append(index)
def get_suffixes(self):
return self.suffixes
def sort_suffixes_shortcut(self):
self.suffixes.sort(key=self.get_suffix_string)
def get_suffix_string(self,i):
offset = i - 1
suffix_string = self.stringT[offset:]
return suffix_string
|
class Bucket:
"""Utility class for Manber-Myers algorithm."""
def __init__(self, prefix, stringT):
self.prefix = prefix
self.stringT = stringT
self.suffixes = []
def __str__(self):
viz = ''
viz = viz + str(self.prefix)
viz = viz + ' '
viz = viz + str(self.suffixes)
return viz
def get_prefix(self):
return self.prefix
def add_suffix(self, index):
self.suffixes.append(index)
def get_suffixes(self):
return self.suffixes
def sort_suffixes_shortcut(self):
self.suffixes.sort(key=self.get_suffix_string)
def get_suffix_string(self, i):
offset = i - 1
suffix_string = self.stringT[offset:]
return suffix_string
|
# -*- coding: utf-8 -*-
"""
idfy_rest_client.models.status
This file was automatically generated for Idfy by APIMATIC v2.0 ( https://apimatic.io )
"""
class Status(object):
"""Implementation of the 'Status' enum.
TODO: type enum description here.
Attributes:
UNKNOWN: TODO: type description here.
SUCCESS: TODO: type description here.
ERROR: TODO: type description here.
USERABORTED: TODO: type description here.
INVALIDATED: TODO: type description here.
TIMEOUT: TODO: type description here.
CREATED: TODO: type description here.
"""
UNKNOWN = 'UNKNOWN'
SUCCESS = 'SUCCESS'
ERROR = 'ERROR'
USERABORTED = 'USERABORTED'
INVALIDATED = 'INVALIDATED'
TIMEOUT = 'TIMEOUT'
CREATED = 'CREATED'
|
"""
idfy_rest_client.models.status
This file was automatically generated for Idfy by APIMATIC v2.0 ( https://apimatic.io )
"""
class Status(object):
"""Implementation of the 'Status' enum.
TODO: type enum description here.
Attributes:
UNKNOWN: TODO: type description here.
SUCCESS: TODO: type description here.
ERROR: TODO: type description here.
USERABORTED: TODO: type description here.
INVALIDATED: TODO: type description here.
TIMEOUT: TODO: type description here.
CREATED: TODO: type description here.
"""
unknown = 'UNKNOWN'
success = 'SUCCESS'
error = 'ERROR'
useraborted = 'USERABORTED'
invalidated = 'INVALIDATED'
timeout = 'TIMEOUT'
created = 'CREATED'
|
arr = [9, 5, 1, 4, 0, 7]
def quick_sort_v1(arr, l, r):
if l >= r:
return
x = l
y = r
base = arr[l]
while x <= y:
while x <= y and arr[y] > base:
y = y - 1
while x <= y and arr[y] < base:
x = x + 1
if x <= y:
arr[y], arr[x] = arr[x], arr[y]
x = x + 1
y = y + 1
quick_sort_v1(arr, l, y)
quick_sort_v1(arr, x, r)
quick_sort_v1(arr, 0, 5)
|
arr = [9, 5, 1, 4, 0, 7]
def quick_sort_v1(arr, l, r):
if l >= r:
return
x = l
y = r
base = arr[l]
while x <= y:
while x <= y and arr[y] > base:
y = y - 1
while x <= y and arr[y] < base:
x = x + 1
if x <= y:
(arr[y], arr[x]) = (arr[x], arr[y])
x = x + 1
y = y + 1
quick_sort_v1(arr, l, y)
quick_sort_v1(arr, x, r)
quick_sort_v1(arr, 0, 5)
|
# -*- python -*-
load("@drake//tools/skylark:drake_py.bzl", "py_test_isolated")
def install_lint(
existing_rules = None):
"""Within the current package, checks that any install rules are
depended-on by Drake's master //:install rule.
"""
if existing_rules == None:
existing_rules = native.existing_rules().values()
package_name = "//" + native.package_name() # e.g., "//systems/framework"
# For each rule tagged as "install", find a dependency chain from
# //:install that reaches it. When there is no such chain, it is likely
# that the developer forgot to list their package in the install.
query_results = []
for one_rule in existing_rules:
tags = one_rule.get("tags")
if "install" not in tags:
continue
if "nolint" in tags:
continue
rule_name = one_rule["name"]
rule_label = "{}:{}".format(package_name, rule_name)
if rule_label == "//:install":
# Don't lint a self-loop.
continue
genquery_name = "install_lint_genquery_{}".format(rule_name)
native.genquery(
name = genquery_name,
expression = "somepath(//:install, {})".format(rule_label),
scope = [
"//:install",
rule_label,
],
testonly = 1,
tags = ["lint"],
visibility = ["//visibility:private"],
)
query_results.append(genquery_name)
# Report all of the install_lint results.
if query_results:
args = []
data = []
for label in query_results:
args.append("--genquery_output=$(location {})".format(label))
data.append(label)
py_test_isolated(
name = "install_lint",
size = "small",
srcs = ["@drake//tools/lint:install_lint_reporter.py"],
main = "@drake//tools/lint:install_lint_reporter.py",
args = args,
data = data,
tags = ["lint", "install_lint"],
)
|
load('@drake//tools/skylark:drake_py.bzl', 'py_test_isolated')
def install_lint(existing_rules=None):
"""Within the current package, checks that any install rules are
depended-on by Drake's master //:install rule.
"""
if existing_rules == None:
existing_rules = native.existing_rules().values()
package_name = '//' + native.package_name()
query_results = []
for one_rule in existing_rules:
tags = one_rule.get('tags')
if 'install' not in tags:
continue
if 'nolint' in tags:
continue
rule_name = one_rule['name']
rule_label = '{}:{}'.format(package_name, rule_name)
if rule_label == '//:install':
continue
genquery_name = 'install_lint_genquery_{}'.format(rule_name)
native.genquery(name=genquery_name, expression='somepath(//:install, {})'.format(rule_label), scope=['//:install', rule_label], testonly=1, tags=['lint'], visibility=['//visibility:private'])
query_results.append(genquery_name)
if query_results:
args = []
data = []
for label in query_results:
args.append('--genquery_output=$(location {})'.format(label))
data.append(label)
py_test_isolated(name='install_lint', size='small', srcs=['@drake//tools/lint:install_lint_reporter.py'], main='@drake//tools/lint:install_lint_reporter.py', args=args, data=data, tags=['lint', 'install_lint'])
|
schema = [
{
"attributes": {
"L": [
{
"M": {
"attr_name": {
"S": "wave_name"
},
"attr_type": {
"S": "wave"
}
}
},
{
"M": {
"attr_name": {
"S": "wave_status"
},
"attr_type": {
"S": "wave"
}
}
},
{
"M": {
"attr_name": {
"S": "wave_start_time"
},
"attr_type": {
"S": "wave"
}
}
},
{
"M": {
"attr_name": {
"S": "wave_end_time"
},
"attr_type": {
"S": "wave"
}
}
},
{
"M": {
"attr_name": {
"S": "app_name"
},
"attr_type": {
"S": "app"
}
}
},
{
"M": {
"attr_name": {
"S": "wave_id"
},
"attr_type": {
"S": "app"
}
}
},
{
"M": {
"attr_name": {
"S": "cloudendure_projectname"
},
"attr_type": {
"S": "app"
}
}
},
{
"M": {
"attr_name": {
"S": "aws_accountid"
},
"attr_type": {
"S": "app"
}
}
},
{
"M": {
"attr_name": {
"S": "aws_region"
},
"attr_type": {
"S": "app"
}
}
},
{
"M": {
"attr_name": {
"S": "app_id"
},
"attr_type": {
"S": "server"
},
"read_only": {
"BOOL": True
}
}
},
{
"M": {
"attr_name": {
"S": "server_fqdn"
},
"attr_type": {
"S": "server"
}
}
},
{
"M": {
"attr_name": {
"S": "server_os_family"
},
"attr_type": {
"S": "server"
}
}
},
{
"M": {
"attr_name": {
"S": "server_os_version"
},
"attr_type": {
"S": "server"
}
}
},
{
"M": {
"attr_name": {
"S": "server_tier"
},
"attr_type": {
"S": "server"
}
}
},
{
"M": {
"attr_name": {
"S": "server_environment"
},
"attr_type": {
"S": "server"
}
}
},
{
"M": {
"attr_name": {
"S": "instanceType"
},
"attr_type": {
"S": "server"
}
}
},
{
"M": {
"attr_name": {
"S": "iamRole"
},
"attr_type": {
"S": "server"
}
}
},
{
"M": {
"attr_name": {
"S": "private_ip"
},
"attr_type": {
"S": "server"
}
}
},
{
"M": {
"attr_name": {
"S": "tenancy"
},
"attr_type": {
"S": "server"
}
}
},
{
"M": {
"attr_name": {
"S": "subnet_IDs_test"
},
"attr_type": {
"S": "server"
}
}
},
{
"M": {
"attr_name": {
"S": "securitygroup_IDs_test"
},
"attr_type": {
"S": "server"
}
}
},
{
"M": {
"attr_name": {
"S": "subnet_IDs"
},
"attr_type": {
"S": "server"
}
}
},
{
"M": {
"attr_name": {
"S": "securitygroup_IDs"
},
"attr_type": {
"S": "server"
}
}
},
{
"M": {
"attr_name": {
"S": "tags"
},
"attr_type": {
"S": "server"
}
}
}
]
},
"stage_id": {
"S": "1"
},
"stage_name": {
"S": "Pre-migration"
}
},
{
"attributes": {
"L": [
{
"M": {
"attr_name": {
"S": "wave_id"
},
"attr_type": {
"S": "app"
},
"read_only": {
"BOOL": True
}
}
},
{
"M": {
"attr_name": {
"S": "cloudendure_projectname"
},
"attr_type": {
"S": "app"
},
"read_only": {
"BOOL": True
}
}
},
{
"M": {
"attr_name": {
"S": "aws_accountid"
},
"attr_type": {
"S": "app"
},
"read_only": {
"BOOL": True
}
}
},
{
"M": {
"attr_name": {
"S": "migration_status"
},
"attr_type": {
"S": "server"
},
"read_only": {
"BOOL": True
}
}
},
{
"M": {
"attr_name": {
"S": "replication_status"
},
"attr_type": {
"S": "server"
},
"read_only": {
"BOOL": True
}
}
}
]
},
"stage_id": {
"S": "2"
},
"stage_name": {
"S": "Build"
}
},
{
"attributes": {
"L": [
{
"M": {
"attr_name": {
"S": "wave_id"
},
"attr_type": {
"S": "app"
},
"read_only": {
"BOOL": True
}
}
},
{
"M": {
"attr_name": {
"S": "cloudendure_projectname"
},
"attr_type": {
"S": "app"
},
"read_only": {
"BOOL": True
}
}
},
{
"M": {
"attr_name": {
"S": "aws_accountid"
},
"attr_type": {
"S": "app"
},
"read_only": {
"BOOL": True
}
}
},
{
"M": {
"attr_name": {
"S": "migration_status"
},
"attr_type": {
"S": "server"
},
"read_only": {
"BOOL": True
}
}
},
{
"M": {
"attr_name": {
"S": "replication_status"
},
"attr_type": {
"S": "server"
},
"read_only": {
"BOOL": True
}
}
}
]
},
"stage_id": {
"S": "3"
},
"stage_name": {
"S": "Validate"
}
},
{
"attributes": {
"L": [
{
"M": {
"attr_name": {
"S": "wave_id"
},
"attr_type": {
"S": "app"
},
"read_only": {
"BOOL": True
}
}
},
{
"M": {
"attr_name": {
"S": "cloudendure_projectname"
},
"attr_type": {
"S": "app"
},
"read_only": {
"BOOL": True
}
}
},
{
"M": {
"attr_name": {
"S": "aws_accountid"
},
"attr_type": {
"S": "app"
},
"read_only": {
"BOOL": True
}
}
},
{
"M": {
"attr_name": {
"S": "replication_status"
},
"attr_type": {
"S": "server"
},
"read_only": {
"BOOL": True
}
}
},
{
"M": {
"attr_name": {
"S": "migration_status"
},
"attr_type": {
"S": "server"
},
"read_only": {
"BOOL": True
}
}
}
]
},
"stage_id": {
"S": "4"
},
"stage_name": {
"S": "Boot up testing"
}
},
{
"attributes": {
"L": [
{
"M": {
"attr_name": {
"S": "wave_id"
},
"attr_type": {
"S": "app"
},
"read_only": {
"BOOL": True
}
}
},
{
"M": {
"attr_name": {
"S": "cloudendure_projectname"
},
"attr_type": {
"S": "app"
},
"read_only": {
"BOOL": True
}
}
},
{
"M": {
"attr_name": {
"S": "aws_accountid"
},
"attr_type": {
"S": "app"
},
"read_only": {
"BOOL": True
}
}
},
{
"M": {
"attr_name": {
"S": "migration_status"
},
"attr_type": {
"S": "server"
}
}
},
{
"M": {
"attr_name": {
"S": "replication_status"
},
"attr_type": {
"S": "server"
}
}
}
]
},
"stage_id": {
"S": "5"
},
"stage_name": {
"S": "Cutover"
}
}
]
|
schema = [{'attributes': {'L': [{'M': {'attr_name': {'S': 'wave_name'}, 'attr_type': {'S': 'wave'}}}, {'M': {'attr_name': {'S': 'wave_status'}, 'attr_type': {'S': 'wave'}}}, {'M': {'attr_name': {'S': 'wave_start_time'}, 'attr_type': {'S': 'wave'}}}, {'M': {'attr_name': {'S': 'wave_end_time'}, 'attr_type': {'S': 'wave'}}}, {'M': {'attr_name': {'S': 'app_name'}, 'attr_type': {'S': 'app'}}}, {'M': {'attr_name': {'S': 'wave_id'}, 'attr_type': {'S': 'app'}}}, {'M': {'attr_name': {'S': 'cloudendure_projectname'}, 'attr_type': {'S': 'app'}}}, {'M': {'attr_name': {'S': 'aws_accountid'}, 'attr_type': {'S': 'app'}}}, {'M': {'attr_name': {'S': 'aws_region'}, 'attr_type': {'S': 'app'}}}, {'M': {'attr_name': {'S': 'app_id'}, 'attr_type': {'S': 'server'}, 'read_only': {'BOOL': True}}}, {'M': {'attr_name': {'S': 'server_fqdn'}, 'attr_type': {'S': 'server'}}}, {'M': {'attr_name': {'S': 'server_os_family'}, 'attr_type': {'S': 'server'}}}, {'M': {'attr_name': {'S': 'server_os_version'}, 'attr_type': {'S': 'server'}}}, {'M': {'attr_name': {'S': 'server_tier'}, 'attr_type': {'S': 'server'}}}, {'M': {'attr_name': {'S': 'server_environment'}, 'attr_type': {'S': 'server'}}}, {'M': {'attr_name': {'S': 'instanceType'}, 'attr_type': {'S': 'server'}}}, {'M': {'attr_name': {'S': 'iamRole'}, 'attr_type': {'S': 'server'}}}, {'M': {'attr_name': {'S': 'private_ip'}, 'attr_type': {'S': 'server'}}}, {'M': {'attr_name': {'S': 'tenancy'}, 'attr_type': {'S': 'server'}}}, {'M': {'attr_name': {'S': 'subnet_IDs_test'}, 'attr_type': {'S': 'server'}}}, {'M': {'attr_name': {'S': 'securitygroup_IDs_test'}, 'attr_type': {'S': 'server'}}}, {'M': {'attr_name': {'S': 'subnet_IDs'}, 'attr_type': {'S': 'server'}}}, {'M': {'attr_name': {'S': 'securitygroup_IDs'}, 'attr_type': {'S': 'server'}}}, {'M': {'attr_name': {'S': 'tags'}, 'attr_type': {'S': 'server'}}}]}, 'stage_id': {'S': '1'}, 'stage_name': {'S': 'Pre-migration'}}, {'attributes': {'L': [{'M': {'attr_name': {'S': 'wave_id'}, 'attr_type': {'S': 'app'}, 'read_only': {'BOOL': True}}}, {'M': {'attr_name': {'S': 'cloudendure_projectname'}, 'attr_type': {'S': 'app'}, 'read_only': {'BOOL': True}}}, {'M': {'attr_name': {'S': 'aws_accountid'}, 'attr_type': {'S': 'app'}, 'read_only': {'BOOL': True}}}, {'M': {'attr_name': {'S': 'migration_status'}, 'attr_type': {'S': 'server'}, 'read_only': {'BOOL': True}}}, {'M': {'attr_name': {'S': 'replication_status'}, 'attr_type': {'S': 'server'}, 'read_only': {'BOOL': True}}}]}, 'stage_id': {'S': '2'}, 'stage_name': {'S': 'Build'}}, {'attributes': {'L': [{'M': {'attr_name': {'S': 'wave_id'}, 'attr_type': {'S': 'app'}, 'read_only': {'BOOL': True}}}, {'M': {'attr_name': {'S': 'cloudendure_projectname'}, 'attr_type': {'S': 'app'}, 'read_only': {'BOOL': True}}}, {'M': {'attr_name': {'S': 'aws_accountid'}, 'attr_type': {'S': 'app'}, 'read_only': {'BOOL': True}}}, {'M': {'attr_name': {'S': 'migration_status'}, 'attr_type': {'S': 'server'}, 'read_only': {'BOOL': True}}}, {'M': {'attr_name': {'S': 'replication_status'}, 'attr_type': {'S': 'server'}, 'read_only': {'BOOL': True}}}]}, 'stage_id': {'S': '3'}, 'stage_name': {'S': 'Validate'}}, {'attributes': {'L': [{'M': {'attr_name': {'S': 'wave_id'}, 'attr_type': {'S': 'app'}, 'read_only': {'BOOL': True}}}, {'M': {'attr_name': {'S': 'cloudendure_projectname'}, 'attr_type': {'S': 'app'}, 'read_only': {'BOOL': True}}}, {'M': {'attr_name': {'S': 'aws_accountid'}, 'attr_type': {'S': 'app'}, 'read_only': {'BOOL': True}}}, {'M': {'attr_name': {'S': 'replication_status'}, 'attr_type': {'S': 'server'}, 'read_only': {'BOOL': True}}}, {'M': {'attr_name': {'S': 'migration_status'}, 'attr_type': {'S': 'server'}, 'read_only': {'BOOL': True}}}]}, 'stage_id': {'S': '4'}, 'stage_name': {'S': 'Boot up testing'}}, {'attributes': {'L': [{'M': {'attr_name': {'S': 'wave_id'}, 'attr_type': {'S': 'app'}, 'read_only': {'BOOL': True}}}, {'M': {'attr_name': {'S': 'cloudendure_projectname'}, 'attr_type': {'S': 'app'}, 'read_only': {'BOOL': True}}}, {'M': {'attr_name': {'S': 'aws_accountid'}, 'attr_type': {'S': 'app'}, 'read_only': {'BOOL': True}}}, {'M': {'attr_name': {'S': 'migration_status'}, 'attr_type': {'S': 'server'}}}, {'M': {'attr_name': {'S': 'replication_status'}, 'attr_type': {'S': 'server'}}}]}, 'stage_id': {'S': '5'}, 'stage_name': {'S': 'Cutover'}}]
|
print ("Enter a value" )
a = int (input())
print ("Enter b value" )
b = int (input())
print ("value of a is",a)
print ("value of b is",b)
print ("value of a+b value is", a+b)
print ("value of a-b value is", a-b)
print ("value of a*b value is", a*b)
print ("value of a/b value is", a/b)
|
print('Enter a value')
a = int(input())
print('Enter b value')
b = int(input())
print('value of a is', a)
print('value of b is', b)
print('value of a+b value is', a + b)
print('value of a-b value is', a - b)
print('value of a*b value is', a * b)
print('value of a/b value is', a / b)
|
i = 0
while (i < 50):
print(i)
i = i + 1
|
i = 0
while i < 50:
print(i)
i = i + 1
|
for i in range(int(input())):
n,base=input().split()
base=str(base)
aux=0
print("Case %d:"%(i+1))
if base=="bin":
aux=int(n, 2)
print("%d dec"%aux)
aux=hex(aux).replace('0x','')
print("%s hex"%aux)
elif base=="dec":
n=int(n)
aux=hex(n).replace('0x','')
print("%s hex"%aux)
aux=bin(n).replace('0b','')
print("%s bin"%aux)
elif base=="hex":
aux=int(n, 16)
print("%d dec"%aux)
aux=bin(aux).replace('0b','')
print("%s bin"%aux)
print()
|
for i in range(int(input())):
(n, base) = input().split()
base = str(base)
aux = 0
print('Case %d:' % (i + 1))
if base == 'bin':
aux = int(n, 2)
print('%d dec' % aux)
aux = hex(aux).replace('0x', '')
print('%s hex' % aux)
elif base == 'dec':
n = int(n)
aux = hex(n).replace('0x', '')
print('%s hex' % aux)
aux = bin(n).replace('0b', '')
print('%s bin' % aux)
elif base == 'hex':
aux = int(n, 16)
print('%d dec' % aux)
aux = bin(aux).replace('0b', '')
print('%s bin' % aux)
print()
|
DATABASES = {
'postgresql_db': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'quickdb',
'USER': 'sonarsource',
'PASSWORD': '1234', # Noncompliant
'HOST': 'localhost',
'PORT': '5432'
}
}
|
databases = {'postgresql_db': {'ENGINE': 'django.db.backends.postgresql', 'NAME': 'quickdb', 'USER': 'sonarsource', 'PASSWORD': '1234', 'HOST': 'localhost', 'PORT': '5432'}}
|
class Solution:
def partition(self, s: str) -> List[List[str]]:
def is_palindrome(s:str):
if s == s[::-1]:
return True
else:
return False
path = []
res = []
size = len(s)
def backtracking(s, start):
nonlocal path, res, size
if start > size - 1 and path:
res.append(path[:])
return
for i in range(start, size):
if is_palindrome(s[start:i+1]):
path.append(s[start:i+1])
backtracking(s, i+1)
path.pop()
backtracking(s, 0)
if size == 0:
return []
else:
return res
|
class Solution:
def partition(self, s: str) -> List[List[str]]:
def is_palindrome(s: str):
if s == s[::-1]:
return True
else:
return False
path = []
res = []
size = len(s)
def backtracking(s, start):
nonlocal path, res, size
if start > size - 1 and path:
res.append(path[:])
return
for i in range(start, size):
if is_palindrome(s[start:i + 1]):
path.append(s[start:i + 1])
backtracking(s, i + 1)
path.pop()
backtracking(s, 0)
if size == 0:
return []
else:
return res
|
# O(n) time and space where n is number of chars
def get_longest_unique_substring(s):
start_index = 0
end_index = 0
answer = 0
char_to_position = {}
for i,let in enumerate(s):
if let not in char_to_position:
char_to_position[let] = i
elif char_to_position[let] >= start_index:
start_index = char_to_position[let] + 1
char_to_position[let] = i
else:
char_to_position[let] = i
end_index += 1
if end_index - start_index > answer:
answer = end_index - start_index
return answer
|
def get_longest_unique_substring(s):
start_index = 0
end_index = 0
answer = 0
char_to_position = {}
for (i, let) in enumerate(s):
if let not in char_to_position:
char_to_position[let] = i
elif char_to_position[let] >= start_index:
start_index = char_to_position[let] + 1
char_to_position[let] = i
else:
char_to_position[let] = i
end_index += 1
if end_index - start_index > answer:
answer = end_index - start_index
return answer
|
#How to reverse a number
num = int(input("Enter the number : "))
rev_num = 0
while(num>0):
#logic
rem = num%10
rev_num= (rev_num*10)+rem
num = num//10
print("Result : ",rev_num)
|
num = int(input('Enter the number : '))
rev_num = 0
while num > 0:
rem = num % 10
rev_num = rev_num * 10 + rem
num = num // 10
print('Result : ', rev_num)
|
def colored(string, color):
"""
Returns the given string wrapped with a ANSI escape code that gives it color when printed to a terminal.
Args:
string: String to be colored.
color: Chosen color for the string. Can be 'r' for red, 'g' for green, 'y' for yellow, 'b' for blue, 'p' for
pink, 't' for teal, or 'gray' for gray.
Returns:
"""
colors = {'r': 31, 'g': 32, 'y': 33, 'b': 34, 'p': 35, 't': 36, 'gray': 37}
return f'\x1b[{colors[color]}m{string}\x1b[0m'
# Example usage
if __name__ == '__main__':
print(f"{colored('This', 't')} {colored('is', 'y')} {colored('RED', 'r')}.")
|
def colored(string, color):
"""
Returns the given string wrapped with a ANSI escape code that gives it color when printed to a terminal.
Args:
string: String to be colored.
color: Chosen color for the string. Can be 'r' for red, 'g' for green, 'y' for yellow, 'b' for blue, 'p' for
pink, 't' for teal, or 'gray' for gray.
Returns:
"""
colors = {'r': 31, 'g': 32, 'y': 33, 'b': 34, 'p': 35, 't': 36, 'gray': 37}
return f'\x1b[{colors[color]}m{string}\x1b[0m'
if __name__ == '__main__':
print(f"{colored('This', 't')} {colored('is', 'y')} {colored('RED', 'r')}.")
|
load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library")
load(":databinding_aar.bzl", "databinding_aar")
load(":databinding_classinfo.bzl", "direct_class_infos")
load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library")
load(":databinding_r_deps.bzl", "extract_r_txt_deps")
load(":databinding_stubs.bzl", "databinding_stubs")
# TODO(arun) Replace with configurable maven targets
_DATABINDING_DEPS = [
"@maven//:androidx_databinding_databinding_adapters",
"@maven//:androidx_databinding_databinding_common",
"@maven//:androidx_databinding_databinding_runtime",
"@maven//:androidx_annotation_annotation",
]
_zipper = "@bazel_tools//tools/zip:zipper"
def _filter_deps(deps):
"""Filters known dependency labels that are not needed for databinding compilation
"""
results = []
for dep in deps:
# TODO This ideally should be filtered via rules and checking for plugin providers
if dep != "//:dagger":
results.append(dep)
return results
def kt_db_android_library(
name,
srcs = [],
custom_package = None,
manifest = None,
resource_files = [],
assets = None,
assets_dir = None,
deps = [],
plugins = [],
visibility = None,
tags = []):
"""Configures rules for compiling android module that uses Databinding and Kotlin.
The macro ensures that Kotlin code referenced in any XMLs are compiled first using kt_jvm_library
and then uses android_library's enable_data_binding to generate required Databinding classes.
This helps in breaking circular dependency when we have android_library (databinding enabled) -> kt_jvm_library.
In that case, Databinding classes can't be generated until resources are processed and that
happens only in android_library target. So compiling Koltin classes becomes dependent on
android_library and android_library depends on kt_jvm_library since it needs class files to
process class references in XML. This macro alleviates this problem by processing resources
without `aapt` via a custom compiler and generates stub classes like
R.java, BR.java and *Binding.java.
Then Kotlin code can be safely compiled without errors. In the final stage, the stub classes
are replaced with actual classes by android_library target.
It also supports @BindingAdapters written in Kotlin.
Args:
name: The name of the target.
srcs: Kotlin and Java classes for the target.
custom_package: Custom package for the target. Forwards to 'kt_|android_library'.
manifest: The AndroidManifest.xml file for android library.
assets: Assets for android_library rule
assets_dir: Assets dir for android_library rule
resource_files: The resource files for the target.
deps: The dependencies for the whole target.
plugins: Kotlin compiler plugins for internal Kotlin target
visibility: Visibility of the target.
tags: Tags for both Kotlin and Android resources target.
"""
# Create R.java and stub classes for classes that Android databinding and AAPT would produce
# so that we can compile Kotlin classes first without errors
databinding_stubs_target = name + "-stubs"
databinding_stubs(
name = databinding_stubs_target,
custom_package = custom_package,
resource_files = resource_files,
tags = tags,
deps = deps + _DATABINDING_DEPS,
)
binding_classes_sources = databinding_stubs_target + "_binding.srcjar"
r_classes_sources = databinding_stubs_target + "_r.srcjar"
r_classes = "r-classes"
# R classes are not meant to be packaged into the binary, so export it as java_library but don't
# link it.
native.java_library(
name = r_classes,
srcs = [r_classes_sources],
neverlink = 1, # Use the R classes only for compiling and not at runtime.
)
# Create an intermediate target for compiling all Kotlin classes used in Databinding
kotlin_target = name + "-kotlin"
kotlin_targets = []
# List for holding binding adapter sources
binding_adapter_sources = []
if len(srcs) > 0:
# Compile all Kotlin classes first with the stubs generated earlier. The stubs are provided
# as srcjar in binding_classes_sources. This would allow use to compile Kotlin classes successfully
# since stubs will allow compilation to proceed without errors related to missing binding classes.
#
# Additionally, run our custom annotation processor "binding-adapter-bridge" that would generate
# .java files for Kotlin @BindingAdapter.
kt_jvm_library(
name = kotlin_target,
srcs = srcs + [binding_classes_sources],
plugins = plugins,
deps = deps + _DATABINDING_DEPS + [r_classes] + [
"@grab_bazel_common//tools/binding-adapter-bridge:binding-adapter-bridge",
"@grab_bazel_common//tools/android:android_sdk",
],
tags = tags,
)
kotlin_targets.append(kotlin_target)
# The Kotlin target would run binding-adapter annotation processor and package the Java proxy
# classes as a jar file, BUT android_library does not run data binding annotation processor
# if classes are present inside jar i.e deps. To overcome this, we repackage sources jar into
# .srcjar so that we can feed it to android_library's `srcs` to force data binding processor
# to run.
# Additionally we clean up all extra files that might be present in the sources.jar. The
# jar should purely contain *_Binding_Adapter_Stub.java files.
#
# This step can be probably be avoided when https://github.com/bazelbuild/bazel/issues/11745
# is fixed.
binding_adapters_source = name + "-binding-adapters"
native.genrule(
name = binding_adapters_source,
srcs = [":" + kotlin_target + "-sources.jar"],
outs = [kotlin_target + "_kt-sources.srcjar"],
tools = [_zipper],
cmd = """
TEMP="adapter-sources"
mkdir -p $$TEMP
unzip -q -o $< -d $$TEMP/
find $$TEMP/. -type f ! -name '*_Binding_Adapter_Stub.java' -delete
touch $$TEMP/empty.txt # Package empty file to ensure jar file is always generated
find $$TEMP/. -type f -exec $(location {zipper}) c $(OUTS) {{}} +
rm -rf $$TEMP
""".format(zipper = _zipper),
)
binding_adapter_sources.append(binding_adapters_source)
# Data binding target responsible for generating Databinding related classes.
# By the time this is compiled:
# * Kotlin/Java classes are already available via deps. So resources processing is safe.
# * Kotlin @BindingAdapters are converted to Java via our annotation processor
# * Our stub classes will be replaced by android_library's actual generated code.
native.android_library(
name = name,
srcs = binding_adapter_sources,
custom_package = custom_package,
enable_data_binding = True,
resource_files = resource_files,
assets = assets,
assets_dir = assets_dir,
visibility = visibility,
manifest = manifest,
tags = tags,
deps = kotlin_targets + _filter_deps(deps) + _DATABINDING_DEPS,
# Export the Kotlin target so that other databinding modules that depend on this module
# can use classes defined in this module in their databinding generated classes.
#
# This is required since kt_android_library hides _kt target behind an android_library rule,
# hence _kt target only appears are transitive dep instead of direct during databinding
# generation in module A.
# Graph: +------+
# | kt |
# +------+
# ^
# +--------+ +--------+
# | A +--->+ B |
# +--------+ +--------+
# A's databinding generated code can depend on B's kotlin code.
# See: https://blog.bazel.build/2017/06/28/sjd-unused_deps.html
# Can be also overcome by --strict_java_deps=warn
exports = kotlin_targets,
)
# Package aar correctly for Gradle builds.
# Disabled for now.
# databinding_aar(
# name = name + "-databinding",
# android_library = name,
# kotlin_jar = kotlin_target + "_kt.jar",
# )
|
load('@io_bazel_rules_kotlin//kotlin:kotlin.bzl', 'kt_android_library')
load(':databinding_aar.bzl', 'databinding_aar')
load(':databinding_classinfo.bzl', 'direct_class_infos')
load('@io_bazel_rules_kotlin//kotlin:jvm.bzl', 'kt_jvm_library')
load(':databinding_r_deps.bzl', 'extract_r_txt_deps')
load(':databinding_stubs.bzl', 'databinding_stubs')
_databinding_deps = ['@maven//:androidx_databinding_databinding_adapters', '@maven//:androidx_databinding_databinding_common', '@maven//:androidx_databinding_databinding_runtime', '@maven//:androidx_annotation_annotation']
_zipper = '@bazel_tools//tools/zip:zipper'
def _filter_deps(deps):
"""Filters known dependency labels that are not needed for databinding compilation
"""
results = []
for dep in deps:
if dep != '//:dagger':
results.append(dep)
return results
def kt_db_android_library(name, srcs=[], custom_package=None, manifest=None, resource_files=[], assets=None, assets_dir=None, deps=[], plugins=[], visibility=None, tags=[]):
"""Configures rules for compiling android module that uses Databinding and Kotlin.
The macro ensures that Kotlin code referenced in any XMLs are compiled first using kt_jvm_library
and then uses android_library's enable_data_binding to generate required Databinding classes.
This helps in breaking circular dependency when we have android_library (databinding enabled) -> kt_jvm_library.
In that case, Databinding classes can't be generated until resources are processed and that
happens only in android_library target. So compiling Koltin classes becomes dependent on
android_library and android_library depends on kt_jvm_library since it needs class files to
process class references in XML. This macro alleviates this problem by processing resources
without `aapt` via a custom compiler and generates stub classes like
R.java, BR.java and *Binding.java.
Then Kotlin code can be safely compiled without errors. In the final stage, the stub classes
are replaced with actual classes by android_library target.
It also supports @BindingAdapters written in Kotlin.
Args:
name: The name of the target.
srcs: Kotlin and Java classes for the target.
custom_package: Custom package for the target. Forwards to 'kt_|android_library'.
manifest: The AndroidManifest.xml file for android library.
assets: Assets for android_library rule
assets_dir: Assets dir for android_library rule
resource_files: The resource files for the target.
deps: The dependencies for the whole target.
plugins: Kotlin compiler plugins for internal Kotlin target
visibility: Visibility of the target.
tags: Tags for both Kotlin and Android resources target.
"""
databinding_stubs_target = name + '-stubs'
databinding_stubs(name=databinding_stubs_target, custom_package=custom_package, resource_files=resource_files, tags=tags, deps=deps + _DATABINDING_DEPS)
binding_classes_sources = databinding_stubs_target + '_binding.srcjar'
r_classes_sources = databinding_stubs_target + '_r.srcjar'
r_classes = 'r-classes'
native.java_library(name=r_classes, srcs=[r_classes_sources], neverlink=1)
kotlin_target = name + '-kotlin'
kotlin_targets = []
binding_adapter_sources = []
if len(srcs) > 0:
kt_jvm_library(name=kotlin_target, srcs=srcs + [binding_classes_sources], plugins=plugins, deps=deps + _DATABINDING_DEPS + [r_classes] + ['@grab_bazel_common//tools/binding-adapter-bridge:binding-adapter-bridge', '@grab_bazel_common//tools/android:android_sdk'], tags=tags)
kotlin_targets.append(kotlin_target)
binding_adapters_source = name + '-binding-adapters'
native.genrule(name=binding_adapters_source, srcs=[':' + kotlin_target + '-sources.jar'], outs=[kotlin_target + '_kt-sources.srcjar'], tools=[_zipper], cmd='\n TEMP="adapter-sources"\n mkdir -p $$TEMP\n unzip -q -o $< -d $$TEMP/\n find $$TEMP/. -type f ! -name \'*_Binding_Adapter_Stub.java\' -delete\n touch $$TEMP/empty.txt # Package empty file to ensure jar file is always generated\n find $$TEMP/. -type f -exec $(location {zipper}) c $(OUTS) {{}} +\n rm -rf $$TEMP\n '.format(zipper=_zipper))
binding_adapter_sources.append(binding_adapters_source)
native.android_library(name=name, srcs=binding_adapter_sources, custom_package=custom_package, enable_data_binding=True, resource_files=resource_files, assets=assets, assets_dir=assets_dir, visibility=visibility, manifest=manifest, tags=tags, deps=kotlin_targets + _filter_deps(deps) + _DATABINDING_DEPS, exports=kotlin_targets)
|
expected_output = {
"program": {
"auto_ip_ring": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1156",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"bfd": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1158",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"bgp": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v4-routing",
"jid": "1051",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
},
"test": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "Group_10_bgp2",
"jid": "1052",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
},
"test1": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "Group_5_bgp3",
"jid": "1053",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
},
"test2": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "Group_5_bgp4",
"jid": "1054",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
},
}
},
"bgp_epe": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v4-routing",
"jid": "1159",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"bpm": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v4-routing",
"jid": "1066",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"bundlemgr_distrib": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1157",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"domain_services": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1160",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"es_acl_mgr": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1169",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"eth_gl_cfg": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1151",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ethernet_stats_controller_edm": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1161",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ftp_fs": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1162",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"icpe_satmgr": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1163",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"igmp": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "mcast-routing",
"jid": "1208",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"intf_mgbl": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1143",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ipv4_connected": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v4-routing",
"jid": "1152",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ipv4_local": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v4-routing",
"jid": "1153",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ipv4_mfwd_ma": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "mcast-routing",
"jid": "1204",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ipv4_mpa": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1149",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ipv4_rib": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v4-routing",
"jid": "1146",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ipv4_rump": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v4-routing",
"jid": "1167",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ipv4_static": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v4-routing",
"jid": "1043",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ipv6_connected": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v6-routing",
"jid": "1154",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ipv6_local": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v6-routing",
"jid": "1155",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ipv6_mfwd_ma": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "mcast-routing",
"jid": "1205",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ipv6_mpa": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1150",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ipv6_rib": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v6-routing",
"jid": "1147",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ipv6_rump": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v6-routing",
"jid": "1168",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"l2tp_mgr": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v4-routing",
"jid": "1176",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"l2vpn_mgr": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v4-routing",
"jid": "1175",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"mld": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "mcast-routing",
"jid": "1209",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"mpls_ldp": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v4-routing",
"jid": "1199",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"mpls_static": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v4-routing",
"jid": "1142",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"mrib": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "mcast-routing",
"jid": "1206",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"mrib6": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "mcast-routing",
"jid": "1207",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"netconf": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1189",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"nfmgr": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1145",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ospf": {
"instance": {
"1": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v4-routing",
"jid": "1018",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ospf_uv": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v4-routing",
"jid": "1114",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"pbr_ma": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1171",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"pim": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "mcast-routing",
"jid": "1210",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"pim6": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "mcast-routing",
"jid": "1211",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"policy_repository": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v4-routing",
"jid": "1148",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"python_process_manager": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1164",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"qos_ma": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1172",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"rcp_fs": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1165",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"rt_check_mgr": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "v4-routing",
"jid": "1170",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"schema_server": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1177",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"snmppingd": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1195",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"spa_cfg_hlpr": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1130",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ssh_conf_verifier": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1183",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"ssh_server": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1184",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"statsd_manager_g": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "netmgmt",
"jid": "1144",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"telemetry_encoder": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1194",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"tty_verifyd": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1166",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"vservice_mgr": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1173",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"wanphy_proc": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1178",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
"xtc_agent": {
"instance": {
"default": {
"active": "0/RSP1/CPU0",
"active_state": "RUNNING",
"group": "central-services",
"jid": "1174",
"standby": "0/RSP0/CPU0",
"standby_state": "RUNNING",
}
}
},
}
}
|
expected_output = {'program': {'auto_ip_ring': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1156', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'bfd': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1158', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'bgp': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1051', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}, 'test': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'Group_10_bgp2', 'jid': '1052', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}, 'test1': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'Group_5_bgp3', 'jid': '1053', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}, 'test2': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'Group_5_bgp4', 'jid': '1054', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'bgp_epe': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1159', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'bpm': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1066', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'bundlemgr_distrib': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1157', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'domain_services': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1160', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'es_acl_mgr': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1169', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'eth_gl_cfg': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1151', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ethernet_stats_controller_edm': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1161', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ftp_fs': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1162', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'icpe_satmgr': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1163', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'igmp': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'mcast-routing', 'jid': '1208', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'intf_mgbl': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1143', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ipv4_connected': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1152', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ipv4_local': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1153', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ipv4_mfwd_ma': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'mcast-routing', 'jid': '1204', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ipv4_mpa': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1149', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ipv4_rib': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1146', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ipv4_rump': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1167', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ipv4_static': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1043', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ipv6_connected': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v6-routing', 'jid': '1154', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ipv6_local': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v6-routing', 'jid': '1155', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ipv6_mfwd_ma': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'mcast-routing', 'jid': '1205', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ipv6_mpa': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1150', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ipv6_rib': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v6-routing', 'jid': '1147', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ipv6_rump': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v6-routing', 'jid': '1168', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'l2tp_mgr': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1176', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'l2vpn_mgr': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1175', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'mld': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'mcast-routing', 'jid': '1209', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'mpls_ldp': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1199', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'mpls_static': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1142', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'mrib': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'mcast-routing', 'jid': '1206', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'mrib6': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'mcast-routing', 'jid': '1207', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'netconf': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1189', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'nfmgr': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1145', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ospf': {'instance': {'1': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1018', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ospf_uv': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1114', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'pbr_ma': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1171', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'pim': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'mcast-routing', 'jid': '1210', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'pim6': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'mcast-routing', 'jid': '1211', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'policy_repository': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1148', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'python_process_manager': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1164', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'qos_ma': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1172', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'rcp_fs': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1165', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'rt_check_mgr': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1170', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'schema_server': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1177', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'snmppingd': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1195', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'spa_cfg_hlpr': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1130', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ssh_conf_verifier': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1183', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'ssh_server': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1184', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'statsd_manager_g': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'netmgmt', 'jid': '1144', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'telemetry_encoder': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1194', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'tty_verifyd': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1166', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'vservice_mgr': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1173', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'wanphy_proc': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1178', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}, 'xtc_agent': {'instance': {'default': {'active': '0/RSP1/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1174', 'standby': '0/RSP0/CPU0', 'standby_state': 'RUNNING'}}}}}
|
def get_formatted_name(first, middle, last):
"""Generate a neatly formatted full name"""
full_name=f"{first} {middle} {last}"
return full_name.title()
"""this version works for people with middle name but breaks for people with only first and last names"""
|
def get_formatted_name(first, middle, last):
"""Generate a neatly formatted full name"""
full_name = f'{first} {middle} {last}'
return full_name.title()
'this version works for people with middle name but breaks for people with only first and last names'
|
name = input("Please enter your first name: ")
age = int(input("How old are you, {0}? ".format(name)))
print(age)
# if age >= 18:
# print("You are old enough to vote")
# print("Please put an X in the box")
# else:
# print("Please come back in {0} years".format(18-age))
if age < 18:
print("Please come back in {0} years".format(18-age))
elif age == 900:
print("Sorry, Yoda you die in Return of the Jedi")
else:
print("You are old enough to vote")
print("Please put an X in the box")
|
name = input('Please enter your first name: ')
age = int(input('How old are you, {0}? '.format(name)))
print(age)
if age < 18:
print('Please come back in {0} years'.format(18 - age))
elif age == 900:
print('Sorry, Yoda you die in Return of the Jedi')
else:
print('You are old enough to vote')
print('Please put an X in the box')
|
states_of_america = ["Delware","Pennsylvanai","Mary land","Texas","New Jersey"]
print(states_of_america[0]) # Be careful for index out of range error
print(states_of_america[-1])
states_of_america.append("Hawaii")
print(states_of_america)
states_of_america.extend(["Rakshith","Dheer"])
print(states_of_america)
# You do not need to remember for all functions you can use documentation for that
# If you remember everything you do not have space for important stuff
# You should spend time in working out
|
states_of_america = ['Delware', 'Pennsylvanai', 'Mary land', 'Texas', 'New Jersey']
print(states_of_america[0])
print(states_of_america[-1])
states_of_america.append('Hawaii')
print(states_of_america)
states_of_america.extend(['Rakshith', 'Dheer'])
print(states_of_america)
|
#declaring and formatting multiples variables as integer.
num01 = int(input('Type the first number: '))
num02 = int(input('Type the second number: '))
s = num01 + num02
#showing to user the sum of numbers.
print('The sum of {} and {} is: {}' .format(num01, num02, s))
|
num01 = int(input('Type the first number: '))
num02 = int(input('Type the second number: '))
s = num01 + num02
print('The sum of {} and {} is: {}'.format(num01, num02, s))
|
# Write a Python program to find whether a given number (accept from the user) is even or odd,
# prints True if its even and False if its odd.
n = int(input("Enter a number: "))
print(n % 2 == 0)
|
n = int(input('Enter a number: '))
print(n % 2 == 0)
|
#!/usr/bin/env python
#pylint: skip-file
# This source code is licensed under the Apache license found in the
# LICENSE file in the root directory of this project.
class PathResponse(object):
def __init__(self):
"""
Attributes:
swaggerTypes (dict): The key is attribute name and the value is attribute type.
attributeMap (dict): The key is attribute name and the value is json key in definition.
"""
self.swaggerTypes = {
'detailedStatus': 'DetailedStatus',
'networkElements': 'list[NetworkElement]',
'networkElementsInfo': 'list[NetworkElementInfo]',
'properties': 'list[str]',
'lastUpdate': 'str',
'request': 'FlowAnalysis'
}
self.attributeMap = {
'detailedStatus': 'detailedStatus',
'networkElements': 'networkElements',
'networkElementsInfo': 'networkElementsInfo',
'properties': 'properties',
'lastUpdate': 'lastUpdate',
'request': 'request'
}
#Detailed Status of the calculation of Path Trace with its inclusions
self.detailedStatus = None # DetailedStatus
self.networkElements = None # list[NetworkElement]
#Nodes travesed along a path, including source and destination
self.networkElementsInfo = None # list[NetworkElementInfo]
#Properties for path trace
self.properties = None # list[str]
#Last updated time
self.lastUpdate = None # str
#Describes the source and destination for a path trace
self.request = None # FlowAnalysis
|
class Pathresponse(object):
def __init__(self):
"""
Attributes:
swaggerTypes (dict): The key is attribute name and the value is attribute type.
attributeMap (dict): The key is attribute name and the value is json key in definition.
"""
self.swaggerTypes = {'detailedStatus': 'DetailedStatus', 'networkElements': 'list[NetworkElement]', 'networkElementsInfo': 'list[NetworkElementInfo]', 'properties': 'list[str]', 'lastUpdate': 'str', 'request': 'FlowAnalysis'}
self.attributeMap = {'detailedStatus': 'detailedStatus', 'networkElements': 'networkElements', 'networkElementsInfo': 'networkElementsInfo', 'properties': 'properties', 'lastUpdate': 'lastUpdate', 'request': 'request'}
self.detailedStatus = None
self.networkElements = None
self.networkElementsInfo = None
self.properties = None
self.lastUpdate = None
self.request = None
|
sm.setSpeakerID(1012100)
sm.sendNext("Hello, #h #. I've heard plenty about you from Mai. You are interested in becoming a Bowman, right? My name is Athena Pierce, Bowman Job Instructor. Nice to meet you!")
sm.sendSay("How much do you know about Bowmen? We use bows or crossbows to attack enemies at long range, mainly. We're a bit slower than others, but our arrows never miss their mark!")
if sm.sendAskAccept("If you really wish to become a Bowman, I will bring you to the #bBowman Instructional School in Henesys#k using my power as the Job Instructor, #rif you are interested in other jobs, however, I will help you find your true path#k. Now, would you like to become a Bowman?"):
sm.warp(100000201)
sm.startQuest(parentID)
else:
choice = sm.sendNext("So, you have chosen another path. That is your decision, of course. Which path will you now choose?\r\n\r\n#b#L0#Warrior#l\r\n#L1#Magician#l\r\n#L2#Thief#l\r\n#L3#Pirate#l")
if choice == 0:
sm.sendNext("You seek the powerful strength of a Warrior, do you? Then I'll send you to #bDances with Balrog#k.")
sm.createQuestWithQRValue(1406, "1")
sm.warp(102000003)
elif choice == 1:
sm.sendNext("You seek the powerful strength of a Magician, do you? Then I'll send you to #bGrendel the really Old#k.")
sm.createQuestWithQRValue(1406, "2")
sm.warp(101000003)
elif choice == 2:
sm.sendNext("You seek the powerful strength of a Thief, do you? Then I'll send you to #bthe Dark Lord#k.")
sm.createQuestWithQRValue(1406, "4")
sm.warp(103000003)
elif choice == 3:
sm.sendNext("You seek the powerful strength of a Pirate, do you? Then I'll send you to #bKyrin#k.")
sm.createQuestWithQRValue(1406, "5")
sm.warp(120000101)
sm.chatScript("Please CC.")
|
sm.setSpeakerID(1012100)
sm.sendNext("Hello, #h #. I've heard plenty about you from Mai. You are interested in becoming a Bowman, right? My name is Athena Pierce, Bowman Job Instructor. Nice to meet you!")
sm.sendSay("How much do you know about Bowmen? We use bows or crossbows to attack enemies at long range, mainly. We're a bit slower than others, but our arrows never miss their mark!")
if sm.sendAskAccept('If you really wish to become a Bowman, I will bring you to the #bBowman Instructional School in Henesys#k using my power as the Job Instructor, #rif you are interested in other jobs, however, I will help you find your true path#k. Now, would you like to become a Bowman?'):
sm.warp(100000201)
sm.startQuest(parentID)
else:
choice = sm.sendNext('So, you have chosen another path. That is your decision, of course. Which path will you now choose?\r\n\r\n#b#L0#Warrior#l\r\n#L1#Magician#l\r\n#L2#Thief#l\r\n#L3#Pirate#l')
if choice == 0:
sm.sendNext("You seek the powerful strength of a Warrior, do you? Then I'll send you to #bDances with Balrog#k.")
sm.createQuestWithQRValue(1406, '1')
sm.warp(102000003)
elif choice == 1:
sm.sendNext("You seek the powerful strength of a Magician, do you? Then I'll send you to #bGrendel the really Old#k.")
sm.createQuestWithQRValue(1406, '2')
sm.warp(101000003)
elif choice == 2:
sm.sendNext("You seek the powerful strength of a Thief, do you? Then I'll send you to #bthe Dark Lord#k.")
sm.createQuestWithQRValue(1406, '4')
sm.warp(103000003)
elif choice == 3:
sm.sendNext("You seek the powerful strength of a Pirate, do you? Then I'll send you to #bKyrin#k.")
sm.createQuestWithQRValue(1406, '5')
sm.warp(120000101)
sm.chatScript('Please CC.')
|
# Author: Senuri Fernando
a = int(input()) # take user input
b = int(input()) # take user input
print(a+b) # addition
print(a-b) # subtraction
print(a*b) # multiplication
|
a = int(input())
b = int(input())
print(a + b)
print(a - b)
print(a * b)
|
n, x, xpmin = [int(e) for e in input().split()]
for i in range(n):
xp, q = [int(e) for e in input().split()]
if xp >= xpmin:
print(xp + x, q + 1)
else:
print(xp, q)
|
(n, x, xpmin) = [int(e) for e in input().split()]
for i in range(n):
(xp, q) = [int(e) for e in input().split()]
if xp >= xpmin:
print(xp + x, q + 1)
else:
print(xp, q)
|
"""
https://leetcode.com/problems/thousand-separator/
Given an integer n, add a dot (".") as the thousands separator and return it in string format.
Example 1:
Input: n = 987
Output: "987"
Example 2:
Input: n = 1234
Output: "1.234"
Example 3:
Input: n = 123456789
Output: "123.456.789"
Example 4:
Input: n = 0
Output: "0"
Constraints:
0 <= n < 2^31
"""
# time complexity: O(logn), space complexity: O(logn) where n is the input n as an integer.
class Solution:
def thousandSeparator(self, n: int) -> str:
num = str(n)
result = []
while len(num) > 3:
result.append(num[-3:])
num = num[:-3]
if len(num) > 0:
result.append(num)
return '.'.join(result[::-1])
|
"""
https://leetcode.com/problems/thousand-separator/
Given an integer n, add a dot (".") as the thousands separator and return it in string format.
Example 1:
Input: n = 987
Output: "987"
Example 2:
Input: n = 1234
Output: "1.234"
Example 3:
Input: n = 123456789
Output: "123.456.789"
Example 4:
Input: n = 0
Output: "0"
Constraints:
0 <= n < 2^31
"""
class Solution:
def thousand_separator(self, n: int) -> str:
num = str(n)
result = []
while len(num) > 3:
result.append(num[-3:])
num = num[:-3]
if len(num) > 0:
result.append(num)
return '.'.join(result[::-1])
|
class Invalid:
def __init__(self):
self.equivalence_class = "INVALID"
def __str__(self):
return self.equivalence_class
|
class Invalid:
def __init__(self):
self.equivalence_class = 'INVALID'
def __str__(self):
return self.equivalence_class
|
# Copyright 2019-2021 Wingify Software Pvt. Ltd.
#
# 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.
""" Various settings_file for testings
Notes:
Abbreviations: T = percentTraffic
W = weight split
AB = VISUAL_AB
FT = FEATURE_TEST
FR = FEATURE_ROLLOUT
IFEF = isFeatureEnabled is False
WS = With Segments
WW = With Whitelisting
Campaigns key of each campaign is same as setttings_file name.
"""
SETTINGS_FILES = {
"EMPTY_SETTINGS_FILE": {},
"AB_T_50_W_50_50": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [{"identifier": "CUSTOM", "id": 213, "type": "CUSTOM_GOAL"}],
"variations": [
{"id": 1, "name": "Control", "changes": {}, "weight": 50},
{"id": 2, "name": "Variation-1", "changes": {}, "weight": 50},
],
"id": 230,
"name": "Campaign-230",
"percentTraffic": 50,
"key": "AB_T_50_W_50_50",
"status": "RUNNING",
"type": "VISUAL_AB",
}
],
"accountId": 88888888,
"version": 1,
},
"AB_T_100_W_50_50": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [
{"identifier": "abcd", "id": 1, "type": "REVENUE_TRACKING"},
{"identifier": "CUSTOM", "id": 214, "type": "CUSTOM_GOAL"},
],
"variations": [
{"id": 1, "name": "Control", "changes": {}, "weight": 50},
{"id": 2, "name": "Variation-1", "changes": {}, "weight": 50},
],
"id": 231,
"name": "Campaign-231",
"percentTraffic": 100,
"key": "AB_T_100_W_50_50",
"status": "RUNNING",
"type": "VISUAL_AB",
}
],
"accountId": 88888888,
"version": 1,
},
"AB_T_100_W_20_80": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [{"identifier": "CUSTOM", "id": 215, "type": "CUSTOM_GOAL"}],
"variations": [
{"id": 1, "name": "Control", "changes": {}, "weight": 20},
{"id": 2, "name": "Variation-1", "changes": {}, "weight": 80},
],
"id": 232,
"name": "Campaign-232",
"percentTraffic": 100,
"key": "AB_T_100_W_20_80",
"status": "RUNNING",
"type": "VISUAL_AB",
}
],
"accountId": 88888888,
"version": 1,
},
"AB_T_20_W_10_90": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [{"identifier": "CUSTOM", "id": 216, "type": "CUSTOM_GOAL"}],
"variations": [
{"id": 1, "name": "Control", "changes": {}, "weight": 10},
{"id": 2, "name": "Variation-1", "changes": {}, "weight": 90},
],
"id": 233,
"name": "Campaign-233",
"percentTraffic": 20,
"key": "AB_T_20_W_10_90",
"status": "RUNNING",
"type": "VISUAL_AB",
}
],
"accountId": 88888888,
"version": 1,
},
"AB_T_100_W_0_100": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [{"identifier": "CUSTOM", "id": 217, "type": "CUSTOM_GOAL"}],
"variations": [
{"id": 1, "name": "Control", "changes": {}, "weight": 0},
{"id": 2, "name": "Variation-1", "changes": {}, "weight": 100},
],
"id": 234,
"name": "Campaign-234",
"percentTraffic": 100,
"key": "AB_T_100_W_0_100",
"status": "RUNNING",
"type": "VISUAL_AB",
}
],
"accountId": 88888888,
"version": 1,
},
"AB_T_100_W_33_33_33": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [{"identifier": "CUSTOM", "id": 218, "type": "CUSTOM_GOAL"}],
"variations": [
{"id": 1, "name": "Control", "changes": {}, "weight": 33.3333},
{"id": 2, "name": "Variation-1", "changes": {}, "weight": 33.3333},
{"id": 3, "name": "Variation-2", "changes": {}, "weight": 33.3333},
],
"id": 235,
"name": "Campaign-235",
"percentTraffic": 100,
"key": "AB_T_100_W_33_33_33",
"status": "RUNNING",
"type": "VISUAL_AB",
}
],
"accountId": 88888888,
"version": 1,
},
"DUMMY_SETTINGS_FILE": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [{"identifier": "GOAL_NEW", "id": 203, "type": "CUSTOM_GOAL"}],
"variations": [
{"id": "1", "name": "Control", "weight": 40},
{"id": "2", "name": "Variation-1", "weight": 60},
],
"id": 22,
"name": "Campaign-22",
"percentTraffic": 50,
"key": "DUMMY_SETTINGS_FILE",
"status": "RUNNING",
"type": "VISUAL_AB",
}
],
"accountId": 88888888,
"version": 1,
},
"FR_T_0_W_100": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [{"identifier": "CUSTOM", "id": 213, "type": "CUSTOM_GOAL"}],
"variations": [{"id": "1", "name": "Control", "weight": 100}],
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "this_is_a_string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 123},
{"id": 3, "key": "FLOAT_VARIABLE", "type": "double", "value": 123.456},
{"id": 4, "key": "BOOLEAN_VARIABLE", "type": "boolean", "value": True},
{
"id": 5,
"key": "JSON_VARIABLE",
"type": "json",
"value": {
"data_string": "this_is_a_string",
"data_integer": "123",
"data_boolean": True,
"data_double": 123.456,
"data_json": {"json": "json"},
},
},
],
"id": 29,
"name": "Campaign-29",
"percentTraffic": 0,
"key": "FR_T_0_W_100",
"status": "RUNNING",
"type": "FEATURE_ROLLOUT",
}
],
"accountId": 123456,
"version": 2,
},
"FR_T_25_W_100": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [],
"variations": [{"id": "1", "name": "Control", "weight": 100}],
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "this_is_a_string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 123},
{"id": 3, "key": "FLOAT_VARIABLE", "type": "double", "value": 123.456},
{"id": 4, "key": "BOOLEAN_VARIABLE", "type": "boolean", "value": True},
{
"id": 5,
"key": "JSON_VARIABLE",
"type": "json",
"value": {
"data_string": "this_is_a_string",
"data_integer": "123",
"data_boolean": True,
"data_double": 123.456,
"data_json": {"json": "json"},
},
},
],
"id": 29,
"name": "Campaign-29",
"percentTraffic": 25,
"key": "FR_T_25_W_100",
"status": "RUNNING",
"type": "FEATURE_ROLLOUT",
}
],
"accountId": 123456,
"version": 2,
},
"FR_T_50_W_100": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [],
"variations": [{"id": "1", "name": "Control", "weight": 100}],
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "this_is_a_string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 123},
{"id": 3, "key": "FLOAT_VARIABLE", "type": "double", "value": 123.456},
{"id": 4, "key": "BOOLEAN_VARIABLE", "type": "boolean", "value": True},
{
"id": 5,
"key": "JSON_VARIABLE",
"type": "json",
"value": {
"data_string": "this_is_a_string",
"data_integer": "123",
"data_boolean": True,
"data_double": 123.456,
"data_json": {"json": "json"},
},
},
],
"id": 29,
"name": "Campaign-29",
"percentTraffic": 50,
"key": "FR_T_50_W_100",
"status": "RUNNING",
"type": "FEATURE_ROLLOUT",
}
],
"accountId": 123456,
"version": 2,
},
"FR_T_75_W_100": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [],
"variations": [{"id": "1", "name": "Control", "weight": 100}],
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "this_is_a_string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 123},
{"id": 3, "key": "FLOAT_VARIABLE", "type": "double", "value": 123.456},
{"id": 4, "key": "BOOLEAN_VARIABLE", "type": "boolean", "value": True},
{
"id": 5,
"key": "JSON_VARIABLE",
"type": "json",
"value": {
"data_string": "this_is_a_string",
"data_integer": "123",
"data_boolean": True,
"data_double": 123.456,
"data_json": {"json": "json"},
},
},
],
"id": 29,
"name": "Campaign-29",
"percentTraffic": 75,
"key": "FR_T_75_W_100",
"status": "RUNNING",
"type": "FEATURE_ROLLOUT",
}
],
"accountId": 123456,
"version": 2,
},
"FR_T_100_W_100": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [],
"variations": [{"id": "1", "name": "Control", "weight": 100}],
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "this_is_a_string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 123},
{"id": 3, "key": "FLOAT_VARIABLE", "type": "double", "value": 123.456},
{"id": 4, "key": "BOOLEAN_VARIABLE", "type": "boolean", "value": True},
{
"id": 5,
"key": "JSON_VARIABLE",
"type": "json",
"value": {
"data_string": "this_is_a_string",
"data_integer": "123",
"data_boolean": True,
"data_double": 123.456,
"data_json": {"json": "json"},
},
},
],
"id": 29,
"name": "Campaign-29",
"percentTraffic": 100,
"key": "FR_T_100_W_100",
"status": "RUNNING",
"type": "FEATURE_ROLLOUT",
}
],
"accountId": 123456,
"version": 2,
},
"FR_T_100_WW": {
"sdkKey": "someuniquestuff1234567",
"groups": {},
"campaignGroups": {},
"campaigns": [
{
"goals": [],
"variations": [
{
"id": "1",
"name": "Control",
"weight": 100,
"segments": {"or": [{"custom_variable": {"safari": "true"}}]},
}
],
"variables": [{"id": 2, "key": "BOOLEAN_VARIABLE", "type": "boolean", "value": True}],
"id": 29,
"percentTraffic": 100,
"isForcedVariationEnabled": True,
"key": "FR_T_100_WW",
"name": "Campaign-24",
"status": "RUNNING",
"type": "FEATURE_ROLLOUT",
"segments": {},
}
],
"accountId": 123456,
"version": 2,
},
"FR_WRONG_VARIABLE_TYPE": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [],
"variations": [{"id": "1", "name": "Control", "weight": 100}],
"variables": [
# STRING:
{"id": 1, "key": "STRING_TO_INTEGER", "type": "integer", "value": "123"},
{"id": 2, "key": "STRING_TO_FLOAT", "type": "double", "value": "123.456"},
# STRING_TO_BOOLEAN NOT POSSIBLE
# BOLLEAN:
{"id": 3, "key": "BOOLEAN_TO_STRING", "type": "string", "value": True},
# BOOLEAN TO INT, DOUBLE NOT POSSIBLE
# INTEGER:
{"id": 4, "key": "INTEGER_TO_STRING", "type": "string", "value": 24},
{"id": 5, "key": "INTEGER_TO_FLOAT", "type": "double", "value": 24},
# INTEGER TO BOOLEAN NOT POSSIBLE
# FLOAT:
{"id": 6, "key": "FLOAT_TO_STRING", "type": "string", "value": 24.24},
{"id": 7, "key": "FLOAT_TO_INTEGER", "type": "integer", "value": 24.0},
# FLOAT TO BOOLEAN NOT POSSIBLE
# JSON:
{"id": 8, "key": "JSON_STRING_TO_JSON", "type": "json", "value": '{"json": "json"}'},
# JSON TO BOOLEAN, INT, DOUBLE NOT POSSIBLE
# WRONG CASES
{"id": 9, "key": "WRONG_BOOLEAN", "type": "boolean", "value": "True"},
{"id": 10, "key": "WRONG_JSON_1", "type": "json", "value": True},
{"id": 11, "key": "WRONG_JSON_2", "type": "json", "value": "this_is_a_string"},
{"id": 12, "key": "WRONG_JSON_3", "type": "json", "value": 123},
{"id": 13, "key": "WRONG_JSON_4", "type": "json", "value": 123.234},
],
"id": 29,
"name": "Campaign-29",
"percentTraffic": 100,
"key": "FR_WRONG_VARIABLE_TYPE",
"status": "RUNNING",
"type": "FEATURE_ROLLOUT",
}
],
"accountId": 123456,
"version": 2,
},
"FT_T_0_W_10_20_30_40": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [{"identifier": "FEATURE_TEST_GOAL", "id": 203, "type": "CUSTOM_GOAL"}],
"variations": [
{
"id": "1",
"name": "Control",
"weight": 10,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Control string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 123},
],
"isFeatureEnabled": False,
},
{
"id": "2",
"name": "Variation-1",
"weight": 20,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-1 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 456},
],
"isFeatureEnabled": True,
},
{
"id": "3",
"name": "Variation-2",
"weight": 30,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-2 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 789},
],
"isFeatureEnabled": True,
},
{
"id": "4",
"name": "Variation-3",
"weight": 40,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-3 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 100},
],
"isFeatureEnabled": True,
},
],
"id": 22,
"name": "Campaign-22",
"percentTraffic": 0,
"key": "FT_T_0_W_10_20_30_40",
"status": "RUNNING",
"type": "FEATURE_TEST",
}
],
"accountId": 123456,
"version": 2,
},
"FT_T_25_W_10_20_30_40": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [{"identifier": "FEATURE_TEST_GOAL", "id": 203, "type": "CUSTOM_GOAL"}],
"variations": [
{
"id": "1",
"name": "Control",
"weight": 10,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Control string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 123},
],
"isFeatureEnabled": False,
},
{
"id": "2",
"name": "Variation-1",
"weight": 20,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-1 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 456},
],
"isFeatureEnabled": True,
},
{
"id": "3",
"name": "Variation-2",
"weight": 30,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-2 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 789},
],
"isFeatureEnabled": True,
},
{
"id": "4",
"name": "Variation-3",
"weight": 40,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-3 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 100},
],
"isFeatureEnabled": True,
},
],
"id": 22,
"name": "Campaign-22",
"percentTraffic": 25,
"key": "FT_T_25_W_10_20_30_40",
"status": "RUNNING",
"type": "FEATURE_TEST",
}
],
"accountId": 123456,
"version": 2,
},
"FT_T_50_W_10_20_30_40": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [{"identifier": "FEATURE_TEST_GOAL", "id": 203, "type": "CUSTOM_GOAL"}],
"variations": [
{
"id": "1",
"name": "Control",
"weight": 10,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Control string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 123},
],
"isFeatureEnabled": False,
},
{
"id": "2",
"name": "Variation-1",
"weight": 20,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-1 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 456},
],
"isFeatureEnabled": True,
},
{
"id": "3",
"name": "Variation-2",
"weight": 30,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-2 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 789},
],
"isFeatureEnabled": True,
},
{
"id": "4",
"name": "Variation-3",
"weight": 40,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-3 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 100},
],
"isFeatureEnabled": True,
},
],
"id": 22,
"name": "Campaign-22",
"percentTraffic": 50,
"key": "FT_T_50_W_10_20_30_40",
"status": "RUNNING",
"type": "FEATURE_TEST",
}
],
"accountId": 123456,
"version": 2,
},
"FT_T_75_W_10_20_30_40": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [{"identifier": "FEATURE_TEST_GOAL", "id": 203, "type": "CUSTOM_GOAL"}],
"variations": [
{
"id": "1",
"name": "Control",
"weight": 10,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Control string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 123},
],
"isFeatureEnabled": False,
},
{
"id": "2",
"name": "Variation-1",
"weight": 20,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-1 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 456},
],
"isFeatureEnabled": True,
},
{
"id": "3",
"name": "Variation-2",
"weight": 30,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-2 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 789},
],
"isFeatureEnabled": True,
},
{
"id": "4",
"name": "Variation-3",
"weight": 40,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-3 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 100},
],
"isFeatureEnabled": True,
},
],
"id": 22,
"name": "Campaign-22",
"percentTraffic": 75,
"key": "FT_T_75_W_10_20_30_40",
"status": "RUNNING",
"type": "FEATURE_TEST",
}
],
"accountId": 123456,
"version": 2,
},
"FT_T_100_W_10_20_30_40": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [{"identifier": "FEATURE_TEST_GOAL", "id": 203, "type": "CUSTOM_GOAL"}],
"variations": [
{
"id": "1",
"name": "Control",
"weight": 10,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Control string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 123},
],
"isFeatureEnabled": False,
},
{
"id": "2",
"name": "Variation-1",
"weight": 20,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-1 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 456},
],
"isFeatureEnabled": True,
},
{
"id": "3",
"name": "Variation-2",
"weight": 30,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-2 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 789},
],
"isFeatureEnabled": True,
},
{
"id": "4",
"name": "Variation-3",
"weight": 40,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-3 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 100},
],
"isFeatureEnabled": True,
},
],
"id": 22,
"name": "Campaign-22",
"percentTraffic": 100,
"key": "FT_T_100_W_10_20_30_40",
"status": "RUNNING",
"type": "FEATURE_TEST",
}
],
"accountId": 123456,
"version": 2,
},
"FT_T_100_W_10_20_30_40_IFEF": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [{"identifier": "FEATURE_TEST_GOAL", "id": 203, "type": "CUSTOM_GOAL"}],
"variations": [
{
"id": "1",
"name": "Control",
"weight": 10,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Control string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 123},
],
"isFeatureEnabled": False,
},
{
"id": "2",
"name": "Variation-1",
"weight": 20,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-1 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 456},
],
"isFeatureEnabled": False,
},
{
"id": "3",
"name": "Variation-2",
"weight": 30,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-2 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 789},
],
"isFeatureEnabled": True,
},
{
"id": "4",
"name": "Variation-3",
"weight": 40,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-3 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 100},
],
"isFeatureEnabled": False,
},
],
"id": 22,
"name": "Campaign-22",
"percentTraffic": 100,
"key": "FT_T_100_W_10_20_30_40_IFEF",
"status": "RUNNING",
"type": "FEATURE_TEST",
}
],
"accountId": 123456,
"version": 2,
},
"NEW_SETTINGS_FILE": {
"campaigns": [
{
"goals": [],
"variations": [{"id": "1", "name": "Control", "weight": 100}],
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "d1"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 123},
],
"id": 29,
"name": "Campaign-29",
"percentTraffic": 50,
"key": "FEATURE_ROLLOUT_KEY",
"status": "RUNNING",
"type": "FEATURE_ROLLOUT",
},
{
"goals": [{"identifier": "FEATURE_TEST_GOAL", "id": 203, "type": "CUSTOM_GOAL"}],
"variations": [
{
"id": "1",
"name": "Control",
"weight": 50,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "d2"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 321},
],
"isFeatureEnabled": False,
},
{
"id": "2",
"name": "Variation-1",
"weight": 50,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "d1"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 123},
],
"isFeatureEnabled": True,
},
],
"id": 22,
"name": "Campaign-22",
"percentTraffic": 50,
"key": "FEATURE_TEST",
"status": "RUNNING",
"type": "FEATURE_TEST",
},
{
"goals": [{"identifier": "CUSTOM_RECOMMENDATION_AB_GOAL", "id": 203, "type": "CUSTOM_GOAL"}],
"variations": [
{"id": "1", "name": "Control", "weight": 40},
{"id": "2", "name": "Variation-1", "weight": 60},
],
"id": 22,
"name": "Campaign-22",
"percentTraffic": 90,
"key": "NEW_RECOMMENDATION_AB_CAMPAIGN",
"status": "RUNNING",
"type": "VISUAL_AB",
},
],
"accountId": 123456,
"version": 2,
},
"T_75_W_10_TIMES_10": {
"campaigns": [
{
"goals": [{"identifier": "CUSTOM", "id": 231, "type": "CUSTOM_GOAL"}],
"variations": [
{"id": 1, "name": "Control", "changes": {}, "weight": 10},
{"id": 2, "name": "Variation-1", "changes": {}, "weight": 10},
{"id": 3, "name": "Variation-2", "changes": {}, "weight": 10},
{"id": 4, "name": "Variation-3", "changes": {}, "weight": 10},
{"id": 5, "name": "Variation-4", "changes": {}, "weight": 10},
{"id": 6, "name": "Variation-5", "changes": {}, "weight": 10},
{"id": 7, "name": "Variation-6", "changes": {}, "weight": 10},
{"id": 8, "name": "Variation-7", "changes": {}, "weight": 10},
{"id": 9, "name": "Variation-8", "changes": {}, "weight": 10},
{"id": 10, "name": "Variation-9", "changes": {}, "weight": 10},
],
"id": 260,
"name": "Campaign-260",
"percentTraffic": 75,
"key": "T_75_W_10_TIMES_10",
"status": "RUNNING",
"type": "VISUAL_AB",
}
],
"accountId": 123456,
"version": 2,
},
"T_100_W_50_50_WS": {
"sdkKey": "some_unique_key",
"campaigns": [
{
"percentTraffic": 100,
"goals": [{"identifier": "ddd", "id": 453, "type": "CUSTOM_GOAL"}],
"variations": [
{"id": 1, "name": "Control", "changes": {}, "weight": 50},
{"id": 2, "name": "Variation-1", "changes": {}, "weight": 50},
],
"id": 174,
"name": "Campaign-174",
"segments": {
"and": [
{"or": [{"custom_variable": {"a": "wildcard(*123*)"}}]},
{"or": [{"custom_variable": {"hello": "regex(world)"}}]},
]
},
"key": "T_100_W_50_50_WS",
"status": "RUNNING",
"type": "VISUAL_AB",
}
],
"accountId": 88888888,
"version": 1,
},
"T_50_W_50_50_WS": {
"sdkKey": "some_unique_key",
"campaigns": [
{
"percentTraffic": 50,
"goals": [{"identifier": "ddd", "id": 453, "type": "CUSTOM_GOAL"}],
"variations": [
{"id": 1, "name": "Control", "changes": {}, "weight": 50},
{"id": 2, "name": "Variation-1", "changes": {}, "weight": 50},
],
"id": 174,
"name": "Campaign-174",
"segments": {
"and": [
{"or": [{"custom_variable": {"a": "wildcard(*123*)"}}]},
{"or": [{"custom_variable": {"hello": "regex(world)"}}]},
]
},
"key": "T_50_W_50_50_WS",
"status": "RUNNING",
"type": "VISUAL_AB",
}
],
"accountId": 88888888,
"version": 1,
},
"FT_T_75_W_10_20_30_40_WS": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [{"identifier": "FEATURE_TEST_GOAL", "id": 203, "type": "CUSTOM_GOAL"}],
"variations": [
{
"id": "1",
"name": "Control",
"weight": 10,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Control string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 123},
],
"isFeatureEnabled": False,
},
{
"id": "2",
"name": "Variation-1",
"weight": 20,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-1 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 456},
],
"isFeatureEnabled": True,
},
{
"id": "3",
"name": "Variation-2",
"weight": 30,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-2 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 789},
],
"isFeatureEnabled": True,
},
{
"id": "4",
"name": "Variation-3",
"weight": 40,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "Variation-3 string"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 100},
],
"isFeatureEnabled": True,
},
],
"id": 22,
"name": "Campaign-22",
"percentTraffic": 75,
"key": "FT_T_75_W_10_20_30_40_WS",
"status": "RUNNING",
"type": "FEATURE_TEST",
"segments": {
"and": [
{"or": [{"custom_variable": {"a": "wildcard(*123*)"}}]},
{"or": [{"custom_variable": {"hello": "regex(world)"}}]},
]
},
}
],
"accountId": 123456,
"version": 2,
},
"T_100_W_33_33_33_WS_WW": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [{"identifier": "CUSTOM", "id": 218, "type": "CUSTOM_GOAL"}],
"variations": [
{
"id": 1,
"name": "Control",
"changes": {},
"weight": 33.3333,
"segments": {"or": [{"custom_variable": {"safari": "true"}}]},
},
{
"id": 2,
"name": "Variation-1",
"changes": {},
"weight": 33.3333,
"segments": {"or": [{"custom_variable": {"browser": "wildcard(chrome*)"}}]},
},
{
"id": 3,
"name": "Variation-2",
"changes": {},
"weight": 33.3333,
"segments": {"or": [{"custom_variable": {"chrome": "false"}}]},
},
],
"id": 235,
"name": "Campaign-235",
"percentTraffic": 100,
"key": "T_100_W_33_33_33_WS_WW",
"status": "RUNNING",
"type": "VISUAL_AB",
"isForcedVariationEnabled": True,
"segments": {
"and": [
{"or": [{"custom_variable": {"contains_vwo": "wildcard(*vwo*)"}}]},
{
"and": [
{
"and": [
{
"or": [
{
"and": [
{
"or": [
{
"and": [
{
"or": [
{
"custom_variable": {
"regex_for_all_letters": "regex(^[A-z]+$)"
}
}
]
},
{
"or": [
{
"custom_variable": {
"regex_for_capital_letters": "regex(^[A-Z]+$)"
}
}
]
},
]
},
{
"or": [
{
"custom_variable": {
"regex_for_small_letters": "regex(^[a-z]+$)"
}
}
]
},
]
},
{
"or": [
{
"custom_variable": {
"regex_for_no_zeros": "regex(^[1-9]+$)"
}
}
]
},
]
},
{"or": [{"custom_variable": {"regex_for_zeros": "regex(^[0]+$)"}}]},
]
},
{"or": [{"custom_variable": {"regex_real_number": "regex(^\\d+(\\.\\d+)?)"}}]},
]
},
{
"or": [
{"or": [{"custom_variable": {"this_is_regex": "regex(this\\s+is\\s+text)"}}]},
{
"and": [
{
"and": [
{
"or": [
{
"custom_variable": {
"starts_with": "wildcard(starts_with_variable*)"
}
}
]
},
{
"or": [
{
"custom_variable": {
"contains": "wildcard(*contains_variable*)"
}
}
]
},
]
},
{
"or": [
{
"not": {
"or": [
{
"custom_variable": {
"is_not_equal_to": "is_not_equal_to_variable"
}
}
]
}
},
{
"or": [
{
"custom_variable": {
"is_equal_to": "equal_to_variable"
}
}
]
},
]
},
]
},
]
},
]
},
]
},
}
],
"accountId": 88888888,
"version": 1,
},
"FT_100_W_33_33_33_WS_WW": {
"sdkKey": "someuniquestuff1234567",
"campaigns": [
{
"goals": [{"identifier": "CUSTOM", "id": 218, "type": "CUSTOM_GOAL"}],
"variations": [
{
"id": 1,
"name": "Control",
"changes": {},
"weight": 33.3333,
"segments": {"or": [{"custom_variable": {"safari": "true"}}]},
"isFeatureEnabled": False,
"variables": [
{"id": 1, "key": "STRING_VARIABLE", "type": "string", "value": "CONTROL_STRING_VARIABLE"},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 0},
{"id": 3, "key": "FLOAT_VARIABLE", "type": "double", "value": 0.0},
{
"id": 4,
"key": "JSON_VARIABLE",
"type": "json",
"value": {"data": "CONTROL_JSON_VARIABLE"},
},
],
},
{
"id": 2,
"name": "Variation-1",
"changes": {},
"weight": 33.3333,
"segments": {"or": [{"custom_variable": {"browser": "wildcard(chrome*)"}}]},
"isFeatureEnabled": True,
"variables": [
{
"id": 1,
"key": "STRING_VARIABLE",
"type": "string",
"value": "VARIATION-1_STRING_VARIABLE",
},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 1},
{"id": 3, "key": "FLOAT_VARIABLE", "type": "double", "value": 1.1},
{
"id": 4,
"key": "JSON_VARIABLE",
"type": "json",
"value": {"data": "VARIATION-1_JSON_VARIABLE"},
},
],
},
{
"id": 3,
"name": "Variation-2",
"changes": {},
"weight": 33.3333,
"segments": {"or": [{"custom_variable": {"chrome": "false"}}]},
"isFeatureEnabled": False,
"variables": [
{
"id": 1,
"key": "STRING_VARIABLE",
"type": "string",
"value": "VARIATION-2_STRING_VARIABLE",
},
{"id": 2, "key": "INTEGER_VARIABLE", "type": "integer", "value": 2},
{"id": 3, "key": "FLOAT_VARIABLE", "type": "double", "value": 2.2},
{
"id": 4,
"key": "JSON_VARIABLE",
"type": "json",
"value": {"data": "VARIATION-2_JSON_VARIABLE"},
},
],
},
],
"id": 235,
"name": "Campaign-235",
"percentTraffic": 100,
"key": "FT_100_W_33_33_33_WS_WW",
"status": "RUNNING",
"type": "FEATURE_TEST",
"isForcedVariationEnabled": True,
"segments": {
"and": [
{"or": [{"custom_variable": {"contains_vwo": "wildcard(*vwo*)"}}]},
{
"and": [
{
"and": [
{
"or": [
{
"and": [
{
"or": [
{
"and": [
{
"or": [
{
"custom_variable": {
"regex_for_all_letters": "regex(^[A-z]+$)"
}
}
]
},
{
"or": [
{
"custom_variable": {
"regex_for_capital_letters": "regex(^[A-Z]+$)"
}
}
]
},
]
},
{
"or": [
{
"custom_variable": {
"regex_for_small_letters": "regex(^[a-z]+$)"
}
}
]
},
]
},
{
"or": [
{
"custom_variable": {
"regex_for_no_zeros": "regex(^[1-9]+$)"
}
}
]
},
]
},
{"or": [{"custom_variable": {"regex_for_zeros": "regex(^[0]+$)"}}]},
]
},
{"or": [{"custom_variable": {"regex_real_number": "regex(^\\d+(\\.\\d+)?)"}}]},
]
},
{
"or": [
{"or": [{"custom_variable": {"this_is_regex": "regex(this\\s+is\\s+text)"}}]},
{
"and": [
{
"and": [
{
"or": [
{
"custom_variable": {
"starts_with": "wildcard(starts_with_variable*)"
}
}
]
},
{
"or": [
{
"custom_variable": {
"contains": "wildcard(*contains_variable*)"
}
}
]
},
]
},
{
"or": [
{
"not": {
"or": [
{
"custom_variable": {
"is_not_equal_to": "is_not_equal_to_variable"
}
}
]
}
},
{
"or": [
{
"custom_variable": {
"is_equal_to": "equal_to_variable"
}
}
]
},
]
},
]
},
]
},
]
},
]
},
}
],
"accountId": 88888888,
"version": 1,
},
"GLOBAL_TRACK_SETTINGS_FILE": {
"accountId": 88888888,
"campaigns": [
{
"goals": [
{"id": 1, "identifier": "track1", "type": "CUSTOM_GOAL"},
{"id": 2, "identifier": "track2", "type": "CUSTOM_GOAL"},
{"id": 3, "identifier": "track3", "type": "REVENUE_TRACKING"},
{"id": 4, "identifier": "track4", "type": "REVENUE_TRACKING"},
],
"id": 1,
"name": "Campaign-1",
"isForcedVariationEnabled": False,
"key": "global_test_1",
"percentTraffic": 100,
"segments": {},
"status": "RUNNING",
"type": "VISUAL_AB",
"variations": [
{"changes": {}, "id": 1, "name": "Control", "weight": 33.3333},
{"changes": {}, "id": 2, "name": "Variation-1", "weight": 33.3333},
{"changes": {}, "id": 3, "name": "Variation-2", "weight": 33.3333},
],
},
{
"goals": [
{"id": 1, "identifier": "track1", "type": "CUSTOM_GOAL"},
{"id": 3, "identifier": "track3", "type": "CUSTOM_GOAL"},
{"id": 2, "identifier": "track2", "type": "REVENUE_TRACKING"},
{"id": 4, "identifier": "track4", "type": "REVENUE_TRACKING"},
],
"id": 2,
"name": "Campaign-2",
"isForcedVariationEnabled": False,
"key": "feature_test_1",
"percentTraffic": 100,
"segments": {},
"status": "RUNNING",
"type": "FEATURE_TEST",
"variations": [
{
"changes": {},
"id": 1,
"isFeatureEnabled": False,
"name": "Control",
"variables": [{"id": 1, "key": "string_1", "type": "string", "value": "default"}],
"weight": 50,
},
{
"changes": {},
"id": 2,
"isFeatureEnabled": True,
"name": "Variation-1",
"variables": [{"id": 1, "key": "string_1", "type": "string", "value": "default"}],
"weight": 50,
},
],
},
],
"sdkKey": "someuniquestuff1234567",
"version": 1,
},
}
|
""" Various settings_file for testings
Notes:
Abbreviations: T = percentTraffic
W = weight split
AB = VISUAL_AB
FT = FEATURE_TEST
FR = FEATURE_ROLLOUT
IFEF = isFeatureEnabled is False
WS = With Segments
WW = With Whitelisting
Campaigns key of each campaign is same as setttings_file name.
"""
settings_files = {'EMPTY_SETTINGS_FILE': {}, 'AB_T_50_W_50_50': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [{'identifier': 'CUSTOM', 'id': 213, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': 1, 'name': 'Control', 'changes': {}, 'weight': 50}, {'id': 2, 'name': 'Variation-1', 'changes': {}, 'weight': 50}], 'id': 230, 'name': 'Campaign-230', 'percentTraffic': 50, 'key': 'AB_T_50_W_50_50', 'status': 'RUNNING', 'type': 'VISUAL_AB'}], 'accountId': 88888888, 'version': 1}, 'AB_T_100_W_50_50': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [{'identifier': 'abcd', 'id': 1, 'type': 'REVENUE_TRACKING'}, {'identifier': 'CUSTOM', 'id': 214, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': 1, 'name': 'Control', 'changes': {}, 'weight': 50}, {'id': 2, 'name': 'Variation-1', 'changes': {}, 'weight': 50}], 'id': 231, 'name': 'Campaign-231', 'percentTraffic': 100, 'key': 'AB_T_100_W_50_50', 'status': 'RUNNING', 'type': 'VISUAL_AB'}], 'accountId': 88888888, 'version': 1}, 'AB_T_100_W_20_80': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [{'identifier': 'CUSTOM', 'id': 215, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': 1, 'name': 'Control', 'changes': {}, 'weight': 20}, {'id': 2, 'name': 'Variation-1', 'changes': {}, 'weight': 80}], 'id': 232, 'name': 'Campaign-232', 'percentTraffic': 100, 'key': 'AB_T_100_W_20_80', 'status': 'RUNNING', 'type': 'VISUAL_AB'}], 'accountId': 88888888, 'version': 1}, 'AB_T_20_W_10_90': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [{'identifier': 'CUSTOM', 'id': 216, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': 1, 'name': 'Control', 'changes': {}, 'weight': 10}, {'id': 2, 'name': 'Variation-1', 'changes': {}, 'weight': 90}], 'id': 233, 'name': 'Campaign-233', 'percentTraffic': 20, 'key': 'AB_T_20_W_10_90', 'status': 'RUNNING', 'type': 'VISUAL_AB'}], 'accountId': 88888888, 'version': 1}, 'AB_T_100_W_0_100': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [{'identifier': 'CUSTOM', 'id': 217, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': 1, 'name': 'Control', 'changes': {}, 'weight': 0}, {'id': 2, 'name': 'Variation-1', 'changes': {}, 'weight': 100}], 'id': 234, 'name': 'Campaign-234', 'percentTraffic': 100, 'key': 'AB_T_100_W_0_100', 'status': 'RUNNING', 'type': 'VISUAL_AB'}], 'accountId': 88888888, 'version': 1}, 'AB_T_100_W_33_33_33': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [{'identifier': 'CUSTOM', 'id': 218, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': 1, 'name': 'Control', 'changes': {}, 'weight': 33.3333}, {'id': 2, 'name': 'Variation-1', 'changes': {}, 'weight': 33.3333}, {'id': 3, 'name': 'Variation-2', 'changes': {}, 'weight': 33.3333}], 'id': 235, 'name': 'Campaign-235', 'percentTraffic': 100, 'key': 'AB_T_100_W_33_33_33', 'status': 'RUNNING', 'type': 'VISUAL_AB'}], 'accountId': 88888888, 'version': 1}, 'DUMMY_SETTINGS_FILE': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [{'identifier': 'GOAL_NEW', 'id': 203, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': '1', 'name': 'Control', 'weight': 40}, {'id': '2', 'name': 'Variation-1', 'weight': 60}], 'id': 22, 'name': 'Campaign-22', 'percentTraffic': 50, 'key': 'DUMMY_SETTINGS_FILE', 'status': 'RUNNING', 'type': 'VISUAL_AB'}], 'accountId': 88888888, 'version': 1}, 'FR_T_0_W_100': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [{'identifier': 'CUSTOM', 'id': 213, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': '1', 'name': 'Control', 'weight': 100}], 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'this_is_a_string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 123}, {'id': 3, 'key': 'FLOAT_VARIABLE', 'type': 'double', 'value': 123.456}, {'id': 4, 'key': 'BOOLEAN_VARIABLE', 'type': 'boolean', 'value': True}, {'id': 5, 'key': 'JSON_VARIABLE', 'type': 'json', 'value': {'data_string': 'this_is_a_string', 'data_integer': '123', 'data_boolean': True, 'data_double': 123.456, 'data_json': {'json': 'json'}}}], 'id': 29, 'name': 'Campaign-29', 'percentTraffic': 0, 'key': 'FR_T_0_W_100', 'status': 'RUNNING', 'type': 'FEATURE_ROLLOUT'}], 'accountId': 123456, 'version': 2}, 'FR_T_25_W_100': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [], 'variations': [{'id': '1', 'name': 'Control', 'weight': 100}], 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'this_is_a_string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 123}, {'id': 3, 'key': 'FLOAT_VARIABLE', 'type': 'double', 'value': 123.456}, {'id': 4, 'key': 'BOOLEAN_VARIABLE', 'type': 'boolean', 'value': True}, {'id': 5, 'key': 'JSON_VARIABLE', 'type': 'json', 'value': {'data_string': 'this_is_a_string', 'data_integer': '123', 'data_boolean': True, 'data_double': 123.456, 'data_json': {'json': 'json'}}}], 'id': 29, 'name': 'Campaign-29', 'percentTraffic': 25, 'key': 'FR_T_25_W_100', 'status': 'RUNNING', 'type': 'FEATURE_ROLLOUT'}], 'accountId': 123456, 'version': 2}, 'FR_T_50_W_100': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [], 'variations': [{'id': '1', 'name': 'Control', 'weight': 100}], 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'this_is_a_string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 123}, {'id': 3, 'key': 'FLOAT_VARIABLE', 'type': 'double', 'value': 123.456}, {'id': 4, 'key': 'BOOLEAN_VARIABLE', 'type': 'boolean', 'value': True}, {'id': 5, 'key': 'JSON_VARIABLE', 'type': 'json', 'value': {'data_string': 'this_is_a_string', 'data_integer': '123', 'data_boolean': True, 'data_double': 123.456, 'data_json': {'json': 'json'}}}], 'id': 29, 'name': 'Campaign-29', 'percentTraffic': 50, 'key': 'FR_T_50_W_100', 'status': 'RUNNING', 'type': 'FEATURE_ROLLOUT'}], 'accountId': 123456, 'version': 2}, 'FR_T_75_W_100': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [], 'variations': [{'id': '1', 'name': 'Control', 'weight': 100}], 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'this_is_a_string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 123}, {'id': 3, 'key': 'FLOAT_VARIABLE', 'type': 'double', 'value': 123.456}, {'id': 4, 'key': 'BOOLEAN_VARIABLE', 'type': 'boolean', 'value': True}, {'id': 5, 'key': 'JSON_VARIABLE', 'type': 'json', 'value': {'data_string': 'this_is_a_string', 'data_integer': '123', 'data_boolean': True, 'data_double': 123.456, 'data_json': {'json': 'json'}}}], 'id': 29, 'name': 'Campaign-29', 'percentTraffic': 75, 'key': 'FR_T_75_W_100', 'status': 'RUNNING', 'type': 'FEATURE_ROLLOUT'}], 'accountId': 123456, 'version': 2}, 'FR_T_100_W_100': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [], 'variations': [{'id': '1', 'name': 'Control', 'weight': 100}], 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'this_is_a_string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 123}, {'id': 3, 'key': 'FLOAT_VARIABLE', 'type': 'double', 'value': 123.456}, {'id': 4, 'key': 'BOOLEAN_VARIABLE', 'type': 'boolean', 'value': True}, {'id': 5, 'key': 'JSON_VARIABLE', 'type': 'json', 'value': {'data_string': 'this_is_a_string', 'data_integer': '123', 'data_boolean': True, 'data_double': 123.456, 'data_json': {'json': 'json'}}}], 'id': 29, 'name': 'Campaign-29', 'percentTraffic': 100, 'key': 'FR_T_100_W_100', 'status': 'RUNNING', 'type': 'FEATURE_ROLLOUT'}], 'accountId': 123456, 'version': 2}, 'FR_T_100_WW': {'sdkKey': 'someuniquestuff1234567', 'groups': {}, 'campaignGroups': {}, 'campaigns': [{'goals': [], 'variations': [{'id': '1', 'name': 'Control', 'weight': 100, 'segments': {'or': [{'custom_variable': {'safari': 'true'}}]}}], 'variables': [{'id': 2, 'key': 'BOOLEAN_VARIABLE', 'type': 'boolean', 'value': True}], 'id': 29, 'percentTraffic': 100, 'isForcedVariationEnabled': True, 'key': 'FR_T_100_WW', 'name': 'Campaign-24', 'status': 'RUNNING', 'type': 'FEATURE_ROLLOUT', 'segments': {}}], 'accountId': 123456, 'version': 2}, 'FR_WRONG_VARIABLE_TYPE': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [], 'variations': [{'id': '1', 'name': 'Control', 'weight': 100}], 'variables': [{'id': 1, 'key': 'STRING_TO_INTEGER', 'type': 'integer', 'value': '123'}, {'id': 2, 'key': 'STRING_TO_FLOAT', 'type': 'double', 'value': '123.456'}, {'id': 3, 'key': 'BOOLEAN_TO_STRING', 'type': 'string', 'value': True}, {'id': 4, 'key': 'INTEGER_TO_STRING', 'type': 'string', 'value': 24}, {'id': 5, 'key': 'INTEGER_TO_FLOAT', 'type': 'double', 'value': 24}, {'id': 6, 'key': 'FLOAT_TO_STRING', 'type': 'string', 'value': 24.24}, {'id': 7, 'key': 'FLOAT_TO_INTEGER', 'type': 'integer', 'value': 24.0}, {'id': 8, 'key': 'JSON_STRING_TO_JSON', 'type': 'json', 'value': '{"json": "json"}'}, {'id': 9, 'key': 'WRONG_BOOLEAN', 'type': 'boolean', 'value': 'True'}, {'id': 10, 'key': 'WRONG_JSON_1', 'type': 'json', 'value': True}, {'id': 11, 'key': 'WRONG_JSON_2', 'type': 'json', 'value': 'this_is_a_string'}, {'id': 12, 'key': 'WRONG_JSON_3', 'type': 'json', 'value': 123}, {'id': 13, 'key': 'WRONG_JSON_4', 'type': 'json', 'value': 123.234}], 'id': 29, 'name': 'Campaign-29', 'percentTraffic': 100, 'key': 'FR_WRONG_VARIABLE_TYPE', 'status': 'RUNNING', 'type': 'FEATURE_ROLLOUT'}], 'accountId': 123456, 'version': 2}, 'FT_T_0_W_10_20_30_40': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [{'identifier': 'FEATURE_TEST_GOAL', 'id': 203, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': '1', 'name': 'Control', 'weight': 10, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Control string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 123}], 'isFeatureEnabled': False}, {'id': '2', 'name': 'Variation-1', 'weight': 20, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-1 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 456}], 'isFeatureEnabled': True}, {'id': '3', 'name': 'Variation-2', 'weight': 30, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-2 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 789}], 'isFeatureEnabled': True}, {'id': '4', 'name': 'Variation-3', 'weight': 40, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-3 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 100}], 'isFeatureEnabled': True}], 'id': 22, 'name': 'Campaign-22', 'percentTraffic': 0, 'key': 'FT_T_0_W_10_20_30_40', 'status': 'RUNNING', 'type': 'FEATURE_TEST'}], 'accountId': 123456, 'version': 2}, 'FT_T_25_W_10_20_30_40': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [{'identifier': 'FEATURE_TEST_GOAL', 'id': 203, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': '1', 'name': 'Control', 'weight': 10, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Control string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 123}], 'isFeatureEnabled': False}, {'id': '2', 'name': 'Variation-1', 'weight': 20, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-1 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 456}], 'isFeatureEnabled': True}, {'id': '3', 'name': 'Variation-2', 'weight': 30, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-2 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 789}], 'isFeatureEnabled': True}, {'id': '4', 'name': 'Variation-3', 'weight': 40, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-3 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 100}], 'isFeatureEnabled': True}], 'id': 22, 'name': 'Campaign-22', 'percentTraffic': 25, 'key': 'FT_T_25_W_10_20_30_40', 'status': 'RUNNING', 'type': 'FEATURE_TEST'}], 'accountId': 123456, 'version': 2}, 'FT_T_50_W_10_20_30_40': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [{'identifier': 'FEATURE_TEST_GOAL', 'id': 203, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': '1', 'name': 'Control', 'weight': 10, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Control string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 123}], 'isFeatureEnabled': False}, {'id': '2', 'name': 'Variation-1', 'weight': 20, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-1 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 456}], 'isFeatureEnabled': True}, {'id': '3', 'name': 'Variation-2', 'weight': 30, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-2 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 789}], 'isFeatureEnabled': True}, {'id': '4', 'name': 'Variation-3', 'weight': 40, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-3 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 100}], 'isFeatureEnabled': True}], 'id': 22, 'name': 'Campaign-22', 'percentTraffic': 50, 'key': 'FT_T_50_W_10_20_30_40', 'status': 'RUNNING', 'type': 'FEATURE_TEST'}], 'accountId': 123456, 'version': 2}, 'FT_T_75_W_10_20_30_40': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [{'identifier': 'FEATURE_TEST_GOAL', 'id': 203, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': '1', 'name': 'Control', 'weight': 10, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Control string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 123}], 'isFeatureEnabled': False}, {'id': '2', 'name': 'Variation-1', 'weight': 20, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-1 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 456}], 'isFeatureEnabled': True}, {'id': '3', 'name': 'Variation-2', 'weight': 30, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-2 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 789}], 'isFeatureEnabled': True}, {'id': '4', 'name': 'Variation-3', 'weight': 40, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-3 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 100}], 'isFeatureEnabled': True}], 'id': 22, 'name': 'Campaign-22', 'percentTraffic': 75, 'key': 'FT_T_75_W_10_20_30_40', 'status': 'RUNNING', 'type': 'FEATURE_TEST'}], 'accountId': 123456, 'version': 2}, 'FT_T_100_W_10_20_30_40': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [{'identifier': 'FEATURE_TEST_GOAL', 'id': 203, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': '1', 'name': 'Control', 'weight': 10, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Control string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 123}], 'isFeatureEnabled': False}, {'id': '2', 'name': 'Variation-1', 'weight': 20, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-1 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 456}], 'isFeatureEnabled': True}, {'id': '3', 'name': 'Variation-2', 'weight': 30, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-2 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 789}], 'isFeatureEnabled': True}, {'id': '4', 'name': 'Variation-3', 'weight': 40, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-3 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 100}], 'isFeatureEnabled': True}], 'id': 22, 'name': 'Campaign-22', 'percentTraffic': 100, 'key': 'FT_T_100_W_10_20_30_40', 'status': 'RUNNING', 'type': 'FEATURE_TEST'}], 'accountId': 123456, 'version': 2}, 'FT_T_100_W_10_20_30_40_IFEF': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [{'identifier': 'FEATURE_TEST_GOAL', 'id': 203, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': '1', 'name': 'Control', 'weight': 10, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Control string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 123}], 'isFeatureEnabled': False}, {'id': '2', 'name': 'Variation-1', 'weight': 20, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-1 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 456}], 'isFeatureEnabled': False}, {'id': '3', 'name': 'Variation-2', 'weight': 30, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-2 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 789}], 'isFeatureEnabled': True}, {'id': '4', 'name': 'Variation-3', 'weight': 40, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-3 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 100}], 'isFeatureEnabled': False}], 'id': 22, 'name': 'Campaign-22', 'percentTraffic': 100, 'key': 'FT_T_100_W_10_20_30_40_IFEF', 'status': 'RUNNING', 'type': 'FEATURE_TEST'}], 'accountId': 123456, 'version': 2}, 'NEW_SETTINGS_FILE': {'campaigns': [{'goals': [], 'variations': [{'id': '1', 'name': 'Control', 'weight': 100}], 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'd1'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 123}], 'id': 29, 'name': 'Campaign-29', 'percentTraffic': 50, 'key': 'FEATURE_ROLLOUT_KEY', 'status': 'RUNNING', 'type': 'FEATURE_ROLLOUT'}, {'goals': [{'identifier': 'FEATURE_TEST_GOAL', 'id': 203, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': '1', 'name': 'Control', 'weight': 50, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'd2'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 321}], 'isFeatureEnabled': False}, {'id': '2', 'name': 'Variation-1', 'weight': 50, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'd1'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 123}], 'isFeatureEnabled': True}], 'id': 22, 'name': 'Campaign-22', 'percentTraffic': 50, 'key': 'FEATURE_TEST', 'status': 'RUNNING', 'type': 'FEATURE_TEST'}, {'goals': [{'identifier': 'CUSTOM_RECOMMENDATION_AB_GOAL', 'id': 203, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': '1', 'name': 'Control', 'weight': 40}, {'id': '2', 'name': 'Variation-1', 'weight': 60}], 'id': 22, 'name': 'Campaign-22', 'percentTraffic': 90, 'key': 'NEW_RECOMMENDATION_AB_CAMPAIGN', 'status': 'RUNNING', 'type': 'VISUAL_AB'}], 'accountId': 123456, 'version': 2}, 'T_75_W_10_TIMES_10': {'campaigns': [{'goals': [{'identifier': 'CUSTOM', 'id': 231, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': 1, 'name': 'Control', 'changes': {}, 'weight': 10}, {'id': 2, 'name': 'Variation-1', 'changes': {}, 'weight': 10}, {'id': 3, 'name': 'Variation-2', 'changes': {}, 'weight': 10}, {'id': 4, 'name': 'Variation-3', 'changes': {}, 'weight': 10}, {'id': 5, 'name': 'Variation-4', 'changes': {}, 'weight': 10}, {'id': 6, 'name': 'Variation-5', 'changes': {}, 'weight': 10}, {'id': 7, 'name': 'Variation-6', 'changes': {}, 'weight': 10}, {'id': 8, 'name': 'Variation-7', 'changes': {}, 'weight': 10}, {'id': 9, 'name': 'Variation-8', 'changes': {}, 'weight': 10}, {'id': 10, 'name': 'Variation-9', 'changes': {}, 'weight': 10}], 'id': 260, 'name': 'Campaign-260', 'percentTraffic': 75, 'key': 'T_75_W_10_TIMES_10', 'status': 'RUNNING', 'type': 'VISUAL_AB'}], 'accountId': 123456, 'version': 2}, 'T_100_W_50_50_WS': {'sdkKey': 'some_unique_key', 'campaigns': [{'percentTraffic': 100, 'goals': [{'identifier': 'ddd', 'id': 453, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': 1, 'name': 'Control', 'changes': {}, 'weight': 50}, {'id': 2, 'name': 'Variation-1', 'changes': {}, 'weight': 50}], 'id': 174, 'name': 'Campaign-174', 'segments': {'and': [{'or': [{'custom_variable': {'a': 'wildcard(*123*)'}}]}, {'or': [{'custom_variable': {'hello': 'regex(world)'}}]}]}, 'key': 'T_100_W_50_50_WS', 'status': 'RUNNING', 'type': 'VISUAL_AB'}], 'accountId': 88888888, 'version': 1}, 'T_50_W_50_50_WS': {'sdkKey': 'some_unique_key', 'campaigns': [{'percentTraffic': 50, 'goals': [{'identifier': 'ddd', 'id': 453, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': 1, 'name': 'Control', 'changes': {}, 'weight': 50}, {'id': 2, 'name': 'Variation-1', 'changes': {}, 'weight': 50}], 'id': 174, 'name': 'Campaign-174', 'segments': {'and': [{'or': [{'custom_variable': {'a': 'wildcard(*123*)'}}]}, {'or': [{'custom_variable': {'hello': 'regex(world)'}}]}]}, 'key': 'T_50_W_50_50_WS', 'status': 'RUNNING', 'type': 'VISUAL_AB'}], 'accountId': 88888888, 'version': 1}, 'FT_T_75_W_10_20_30_40_WS': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [{'identifier': 'FEATURE_TEST_GOAL', 'id': 203, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': '1', 'name': 'Control', 'weight': 10, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Control string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 123}], 'isFeatureEnabled': False}, {'id': '2', 'name': 'Variation-1', 'weight': 20, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-1 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 456}], 'isFeatureEnabled': True}, {'id': '3', 'name': 'Variation-2', 'weight': 30, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-2 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 789}], 'isFeatureEnabled': True}, {'id': '4', 'name': 'Variation-3', 'weight': 40, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'Variation-3 string'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 100}], 'isFeatureEnabled': True}], 'id': 22, 'name': 'Campaign-22', 'percentTraffic': 75, 'key': 'FT_T_75_W_10_20_30_40_WS', 'status': 'RUNNING', 'type': 'FEATURE_TEST', 'segments': {'and': [{'or': [{'custom_variable': {'a': 'wildcard(*123*)'}}]}, {'or': [{'custom_variable': {'hello': 'regex(world)'}}]}]}}], 'accountId': 123456, 'version': 2}, 'T_100_W_33_33_33_WS_WW': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [{'identifier': 'CUSTOM', 'id': 218, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': 1, 'name': 'Control', 'changes': {}, 'weight': 33.3333, 'segments': {'or': [{'custom_variable': {'safari': 'true'}}]}}, {'id': 2, 'name': 'Variation-1', 'changes': {}, 'weight': 33.3333, 'segments': {'or': [{'custom_variable': {'browser': 'wildcard(chrome*)'}}]}}, {'id': 3, 'name': 'Variation-2', 'changes': {}, 'weight': 33.3333, 'segments': {'or': [{'custom_variable': {'chrome': 'false'}}]}}], 'id': 235, 'name': 'Campaign-235', 'percentTraffic': 100, 'key': 'T_100_W_33_33_33_WS_WW', 'status': 'RUNNING', 'type': 'VISUAL_AB', 'isForcedVariationEnabled': True, 'segments': {'and': [{'or': [{'custom_variable': {'contains_vwo': 'wildcard(*vwo*)'}}]}, {'and': [{'and': [{'or': [{'and': [{'or': [{'and': [{'or': [{'custom_variable': {'regex_for_all_letters': 'regex(^[A-z]+$)'}}]}, {'or': [{'custom_variable': {'regex_for_capital_letters': 'regex(^[A-Z]+$)'}}]}]}, {'or': [{'custom_variable': {'regex_for_small_letters': 'regex(^[a-z]+$)'}}]}]}, {'or': [{'custom_variable': {'regex_for_no_zeros': 'regex(^[1-9]+$)'}}]}]}, {'or': [{'custom_variable': {'regex_for_zeros': 'regex(^[0]+$)'}}]}]}, {'or': [{'custom_variable': {'regex_real_number': 'regex(^\\d+(\\.\\d+)?)'}}]}]}, {'or': [{'or': [{'custom_variable': {'this_is_regex': 'regex(this\\s+is\\s+text)'}}]}, {'and': [{'and': [{'or': [{'custom_variable': {'starts_with': 'wildcard(starts_with_variable*)'}}]}, {'or': [{'custom_variable': {'contains': 'wildcard(*contains_variable*)'}}]}]}, {'or': [{'not': {'or': [{'custom_variable': {'is_not_equal_to': 'is_not_equal_to_variable'}}]}}, {'or': [{'custom_variable': {'is_equal_to': 'equal_to_variable'}}]}]}]}]}]}]}}], 'accountId': 88888888, 'version': 1}, 'FT_100_W_33_33_33_WS_WW': {'sdkKey': 'someuniquestuff1234567', 'campaigns': [{'goals': [{'identifier': 'CUSTOM', 'id': 218, 'type': 'CUSTOM_GOAL'}], 'variations': [{'id': 1, 'name': 'Control', 'changes': {}, 'weight': 33.3333, 'segments': {'or': [{'custom_variable': {'safari': 'true'}}]}, 'isFeatureEnabled': False, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'CONTROL_STRING_VARIABLE'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 0}, {'id': 3, 'key': 'FLOAT_VARIABLE', 'type': 'double', 'value': 0.0}, {'id': 4, 'key': 'JSON_VARIABLE', 'type': 'json', 'value': {'data': 'CONTROL_JSON_VARIABLE'}}]}, {'id': 2, 'name': 'Variation-1', 'changes': {}, 'weight': 33.3333, 'segments': {'or': [{'custom_variable': {'browser': 'wildcard(chrome*)'}}]}, 'isFeatureEnabled': True, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'VARIATION-1_STRING_VARIABLE'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 1}, {'id': 3, 'key': 'FLOAT_VARIABLE', 'type': 'double', 'value': 1.1}, {'id': 4, 'key': 'JSON_VARIABLE', 'type': 'json', 'value': {'data': 'VARIATION-1_JSON_VARIABLE'}}]}, {'id': 3, 'name': 'Variation-2', 'changes': {}, 'weight': 33.3333, 'segments': {'or': [{'custom_variable': {'chrome': 'false'}}]}, 'isFeatureEnabled': False, 'variables': [{'id': 1, 'key': 'STRING_VARIABLE', 'type': 'string', 'value': 'VARIATION-2_STRING_VARIABLE'}, {'id': 2, 'key': 'INTEGER_VARIABLE', 'type': 'integer', 'value': 2}, {'id': 3, 'key': 'FLOAT_VARIABLE', 'type': 'double', 'value': 2.2}, {'id': 4, 'key': 'JSON_VARIABLE', 'type': 'json', 'value': {'data': 'VARIATION-2_JSON_VARIABLE'}}]}], 'id': 235, 'name': 'Campaign-235', 'percentTraffic': 100, 'key': 'FT_100_W_33_33_33_WS_WW', 'status': 'RUNNING', 'type': 'FEATURE_TEST', 'isForcedVariationEnabled': True, 'segments': {'and': [{'or': [{'custom_variable': {'contains_vwo': 'wildcard(*vwo*)'}}]}, {'and': [{'and': [{'or': [{'and': [{'or': [{'and': [{'or': [{'custom_variable': {'regex_for_all_letters': 'regex(^[A-z]+$)'}}]}, {'or': [{'custom_variable': {'regex_for_capital_letters': 'regex(^[A-Z]+$)'}}]}]}, {'or': [{'custom_variable': {'regex_for_small_letters': 'regex(^[a-z]+$)'}}]}]}, {'or': [{'custom_variable': {'regex_for_no_zeros': 'regex(^[1-9]+$)'}}]}]}, {'or': [{'custom_variable': {'regex_for_zeros': 'regex(^[0]+$)'}}]}]}, {'or': [{'custom_variable': {'regex_real_number': 'regex(^\\d+(\\.\\d+)?)'}}]}]}, {'or': [{'or': [{'custom_variable': {'this_is_regex': 'regex(this\\s+is\\s+text)'}}]}, {'and': [{'and': [{'or': [{'custom_variable': {'starts_with': 'wildcard(starts_with_variable*)'}}]}, {'or': [{'custom_variable': {'contains': 'wildcard(*contains_variable*)'}}]}]}, {'or': [{'not': {'or': [{'custom_variable': {'is_not_equal_to': 'is_not_equal_to_variable'}}]}}, {'or': [{'custom_variable': {'is_equal_to': 'equal_to_variable'}}]}]}]}]}]}]}}], 'accountId': 88888888, 'version': 1}, 'GLOBAL_TRACK_SETTINGS_FILE': {'accountId': 88888888, 'campaigns': [{'goals': [{'id': 1, 'identifier': 'track1', 'type': 'CUSTOM_GOAL'}, {'id': 2, 'identifier': 'track2', 'type': 'CUSTOM_GOAL'}, {'id': 3, 'identifier': 'track3', 'type': 'REVENUE_TRACKING'}, {'id': 4, 'identifier': 'track4', 'type': 'REVENUE_TRACKING'}], 'id': 1, 'name': 'Campaign-1', 'isForcedVariationEnabled': False, 'key': 'global_test_1', 'percentTraffic': 100, 'segments': {}, 'status': 'RUNNING', 'type': 'VISUAL_AB', 'variations': [{'changes': {}, 'id': 1, 'name': 'Control', 'weight': 33.3333}, {'changes': {}, 'id': 2, 'name': 'Variation-1', 'weight': 33.3333}, {'changes': {}, 'id': 3, 'name': 'Variation-2', 'weight': 33.3333}]}, {'goals': [{'id': 1, 'identifier': 'track1', 'type': 'CUSTOM_GOAL'}, {'id': 3, 'identifier': 'track3', 'type': 'CUSTOM_GOAL'}, {'id': 2, 'identifier': 'track2', 'type': 'REVENUE_TRACKING'}, {'id': 4, 'identifier': 'track4', 'type': 'REVENUE_TRACKING'}], 'id': 2, 'name': 'Campaign-2', 'isForcedVariationEnabled': False, 'key': 'feature_test_1', 'percentTraffic': 100, 'segments': {}, 'status': 'RUNNING', 'type': 'FEATURE_TEST', 'variations': [{'changes': {}, 'id': 1, 'isFeatureEnabled': False, 'name': 'Control', 'variables': [{'id': 1, 'key': 'string_1', 'type': 'string', 'value': 'default'}], 'weight': 50}, {'changes': {}, 'id': 2, 'isFeatureEnabled': True, 'name': 'Variation-1', 'variables': [{'id': 1, 'key': 'string_1', 'type': 'string', 'value': 'default'}], 'weight': 50}]}], 'sdkKey': 'someuniquestuff1234567', 'version': 1}}
|
class Solution:
"""
@param n: an integer
@return: if n is a power of three
"""
def isPowerOfThree(self, n):
# Write your code here
if n == 0:
return False
while n > 1:
if n % 3 != 0:
return False
n = n / 3
return True
|
class Solution:
"""
@param n: an integer
@return: if n is a power of three
"""
def is_power_of_three(self, n):
if n == 0:
return False
while n > 1:
if n % 3 != 0:
return False
n = n / 3
return True
|
abstract_user = {
"id": "",
"name": "",
"email": "",
"avatar": "",
"raw": "",
"provider": "",
}
|
abstract_user = {'id': '', 'name': '', 'email': '', 'avatar': '', 'raw': '', 'provider': ''}
|
# Read lines of text from STDIN.
def Beriflapp():
while True:
# Reading the input from the user
i = input("What is the value of 2+8 = ")
# Only exits when meets the condition
if i == '10':
break
print("The value", i, "is the wrong answer. Try again")
print("The value", i, "is the right answer")
while True:
# Reading the input from the user
i = input("What is the value of 4+1 = ")
# Only exits when meets the condition
if i == '5':
break
print("The value", i, "is the wrong answer. Try again")
print("The value", i, "is the right answer")
Beriflapp()
|
def beriflapp():
while True:
i = input('What is the value of 2+8 = ')
if i == '10':
break
print('The value', i, 'is the wrong answer. Try again')
print('The value', i, 'is the right answer')
while True:
i = input('What is the value of 4+1 = ')
if i == '5':
break
print('The value', i, 'is the wrong answer. Try again')
print('The value', i, 'is the right answer')
beriflapp()
|
# -*- coding: utf-8 -*-
'''
Manage grains on the minion
===========================
This state allows for grains to be set.
Grains set or altered this way are stored in the 'grains'
file on the minions, by default at: /etc/salt/grains
Note: This does NOT override any grains set in the minion file.
'''
def present(name, value):
'''
Ensure that a grain is set
name
The grain name
value
The value to set on the grain
If the grain with the given name exists, its value is updated to the new value.
If the grain does not yet exist, a new grain is set to the given value.
.. code-block:: yaml
cheese:
grains.present:
- value: edam
'''
ret = {'name': name,
'changes': {},
'result': True,
'comment': ''}
if isinstance(value, dict):
ret['result'] = False
ret['comment'] = 'Grain value cannot be dict'
return ret
if __grains__.get(name) == value:
ret['comment'] = 'Grain is already set'
return ret
if __opts__['test']:
ret['result'] = None
if name not in __grains__:
ret['comment'] = 'Grain {0} is set to be added'.format(name)
ret['changes'] = {'new': name}
else:
ret['comment'] = 'Grain {0} is set to be changed'.format(name)
ret['changes'] = {'new': name}
return ret
grain = __salt__['grains.setval'](name, value)
if grain != {name: value}:
ret['result'] = False
ret['comment'] = 'Failed to set grain {0}'.format(name)
return ret
ret['result'] = True
ret['changes'] = grain
ret['comment'] = 'Set grain {0} to {1}'.format(name, value)
return ret
def list_present(name, value):
'''
.. versionadded:: 2014.1.0
Ensure the value is present in the list type grain.
name
The grain name.
value
The value is present in the list type grain.
The grain should be `list type <http://docs.python.org/2/tutorial/datastructures.html#data-structures>`_
.. code-block:: yaml
roles:
grains.list_present:
- value: web
For multiple grains, the syntax looks like:
.. code-block:: yaml
roles:
grains.list_present:
- value:
- web
- dev
'''
ret = {'name': name,
'changes': {},
'result': True,
'comment': ''}
grain = __grains__.get(name)
if grain:
# check whether grain is a list
if not isinstance(grain, list):
ret['result'] = False
ret['comment'] = 'Grain {0} is not a valid list'.format(name)
return ret
if isinstance(value, list):
if set(value).issubset(set(__grains__.get(name))):
ret['comment'] = 'Value {1} is already in grain {0}'.format(name, value)
return ret
else:
if value in grain:
ret['comment'] = 'Value {1} is already in grain {0}'.format(name, value)
return ret
if __opts__['test']:
ret['result'] = None
ret['comment'] = 'Value {1} is set to be appended to grain {0}'.format(name, value)
ret['changes'] = {'new': grain}
return ret
if __opts__['test']:
ret['result'] = None
ret['comment'] = 'Grain {0} is set to be added'.format(name)
ret['changes'] = {'new': grain}
return ret
new_grains = __salt__['grains.append'](name, value)
if isinstance(value, list):
if not set(value).issubset(set(__grains__.get(name))):
ret['result'] = False
ret['comment'] = 'Failed append value {1} to grain {0}'.format(name, value)
return ret
else:
if value not in __grains__.get(name):
ret['result'] = False
ret['comment'] = 'Failed append value {1} to grain {0}'.format(name, value)
return ret
ret['comment'] = 'Append value {1} to grain {0}'.format(name, value)
ret['changes'] = {'new': new_grains}
return ret
def list_absent(name, value):
'''
Delete a value from a grain formed as a list.
.. versionadded:: 2014.1.0
name
The grain name.
value
The value to delete from the grain list.
The grain should be `list type <http://docs.python.org/2/tutorial/datastructures.html#data-structures>`_
.. code-block:: yaml
roles:
grains.list_absent:
- value: db
For multiple grains, the syntax looks like:
.. code-block:: yaml
roles:
grains.list_absent:
- value:
- web
- dev
'''
ret = {'name': name,
'changes': {},
'result': True,
'comment': ''}
comments = []
grain = __grains__.get(name)
if grain:
if isinstance(grain, list):
if not isinstance(value, list):
value = [value]
for val in value:
if val not in grain:
comments.append('Value {1} is absent from '
'grain {0}'.format(name, val))
elif __opts__['test']:
ret['result'] = None
comments.append('Value {1} in grain {0} is set '
'to be deleted'.format(name, val))
if 'deleted' not in ret['changes'].keys():
ret['changes'] = {'deleted': []}
ret['changes']['deleted'].append(val)
elif val in grain:
__salt__['grains.remove'](name, val)
comments.append('Value {1} was deleted from '
'grain {0}'.format(name, val))
if 'deleted' not in ret['changes'].keys():
ret['changes'] = {'deleted': []}
ret['changes']['deleted'].append(val)
ret['comment'] = '\n'.join(comments)
return ret
else:
ret['result'] = False
ret['comment'] = 'Grain {0} is not a valid list'\
.format(name)
else:
ret['comment'] = 'Grain {0} does not exist'.format(name)
return ret
def absent(name, destructive=False):
'''
.. versionadded:: 2014.7.0
Delete a grain from the grains config file
name
The grain name
:param destructive: If destructive is True, delete the entire grain. If
destructive is False, set the grain's value to None. Defaults to False.
.. code-block:: yaml
grain_name:
grains.absent
'''
ret = {'name': name,
'changes': {},
'result': True,
'comment': ''}
if name in __grains__:
if __opts__['test']:
ret['result'] = None
if destructive is True:
ret['comment'] = 'Grain {0} is set to be deleted'\
.format(name)
ret['changes'] = {'deleted': name}
else:
ret['comment'] = 'Value for grain {0} is set to be ' \
'deleted (None)'.format(name)
ret['changes'] = {'grain': name, 'value': None}
return ret
__salt__['grains.delval'](name, destructive)
if destructive is True:
ret['comment'] = 'Grain {0} was deleted'.format(name)
ret['changes'] = {'deleted': name}
else:
ret['comment'] = 'Value for grain {0} was set to {1}'\
.format(name, None)
ret['changes'] = {'grain': name, 'value': None}
else:
ret['comment'] = 'Grain {0} does not exist'.format(name)
return ret
def append(name, value, convert=False):
'''
.. versionadded:: 2014.7.0
Append a value to a list in the grains config file
name
The grain name
value
The value to append
:param convert: If convert is True, convert non-list contents into a list.
If convert is False and the grain contains non-list contents, an error
is given. Defaults to False.
.. code-block:: yaml
grain_name:
grains.append:
- value: to_be_appended
'''
ret = {'name': name,
'changes': {},
'result': True,
'comment': ''}
grain = __grains__.get(name)
if grain:
if isinstance(grain, list):
if value in grain:
ret['comment'] = 'Value {1} is already in the list ' \
'for grain {0}'.format(name, value)
return ret
if __opts__['test']:
ret['result'] = None
ret['comment'] = 'Value {1} in grain {0} is set to ' \
'be added'.format(name, value)
ret['changes'] = {'added': value}
return ret
__salt__['grains.append'](name, value)
ret['comment'] = 'Value {1} was added to grain {0}'\
.format(name, value)
ret['changes'] = {'added': value}
else:
if convert is True:
if __opts__['test']:
ret['result'] = None
ret['comment'] = 'Grain {0} is set to be converted ' \
'to list and value {1} will be ' \
'added'.format(name, value)
ret['changes'] = {'added': value}
return ret
grain = [grain]
grain.append(value)
__salt__['grains.setval'](name, grain)
ret['comment'] = 'Value {1} was added to grain {0}'\
.format(name, value)
ret['changes'] = {'added': value}
else:
ret['result'] = False
ret['comment'] = 'Grain {0} is not a valid list'\
.format(name)
else:
ret['result'] = False
ret['comment'] = 'Grain {0} does not exist'.format(name)
return ret
|
"""
Manage grains on the minion
===========================
This state allows for grains to be set.
Grains set or altered this way are stored in the 'grains'
file on the minions, by default at: /etc/salt/grains
Note: This does NOT override any grains set in the minion file.
"""
def present(name, value):
"""
Ensure that a grain is set
name
The grain name
value
The value to set on the grain
If the grain with the given name exists, its value is updated to the new value.
If the grain does not yet exist, a new grain is set to the given value.
.. code-block:: yaml
cheese:
grains.present:
- value: edam
"""
ret = {'name': name, 'changes': {}, 'result': True, 'comment': ''}
if isinstance(value, dict):
ret['result'] = False
ret['comment'] = 'Grain value cannot be dict'
return ret
if __grains__.get(name) == value:
ret['comment'] = 'Grain is already set'
return ret
if __opts__['test']:
ret['result'] = None
if name not in __grains__:
ret['comment'] = 'Grain {0} is set to be added'.format(name)
ret['changes'] = {'new': name}
else:
ret['comment'] = 'Grain {0} is set to be changed'.format(name)
ret['changes'] = {'new': name}
return ret
grain = __salt__['grains.setval'](name, value)
if grain != {name: value}:
ret['result'] = False
ret['comment'] = 'Failed to set grain {0}'.format(name)
return ret
ret['result'] = True
ret['changes'] = grain
ret['comment'] = 'Set grain {0} to {1}'.format(name, value)
return ret
def list_present(name, value):
"""
.. versionadded:: 2014.1.0
Ensure the value is present in the list type grain.
name
The grain name.
value
The value is present in the list type grain.
The grain should be `list type <http://docs.python.org/2/tutorial/datastructures.html#data-structures>`_
.. code-block:: yaml
roles:
grains.list_present:
- value: web
For multiple grains, the syntax looks like:
.. code-block:: yaml
roles:
grains.list_present:
- value:
- web
- dev
"""
ret = {'name': name, 'changes': {}, 'result': True, 'comment': ''}
grain = __grains__.get(name)
if grain:
if not isinstance(grain, list):
ret['result'] = False
ret['comment'] = 'Grain {0} is not a valid list'.format(name)
return ret
if isinstance(value, list):
if set(value).issubset(set(__grains__.get(name))):
ret['comment'] = 'Value {1} is already in grain {0}'.format(name, value)
return ret
elif value in grain:
ret['comment'] = 'Value {1} is already in grain {0}'.format(name, value)
return ret
if __opts__['test']:
ret['result'] = None
ret['comment'] = 'Value {1} is set to be appended to grain {0}'.format(name, value)
ret['changes'] = {'new': grain}
return ret
if __opts__['test']:
ret['result'] = None
ret['comment'] = 'Grain {0} is set to be added'.format(name)
ret['changes'] = {'new': grain}
return ret
new_grains = __salt__['grains.append'](name, value)
if isinstance(value, list):
if not set(value).issubset(set(__grains__.get(name))):
ret['result'] = False
ret['comment'] = 'Failed append value {1} to grain {0}'.format(name, value)
return ret
elif value not in __grains__.get(name):
ret['result'] = False
ret['comment'] = 'Failed append value {1} to grain {0}'.format(name, value)
return ret
ret['comment'] = 'Append value {1} to grain {0}'.format(name, value)
ret['changes'] = {'new': new_grains}
return ret
def list_absent(name, value):
"""
Delete a value from a grain formed as a list.
.. versionadded:: 2014.1.0
name
The grain name.
value
The value to delete from the grain list.
The grain should be `list type <http://docs.python.org/2/tutorial/datastructures.html#data-structures>`_
.. code-block:: yaml
roles:
grains.list_absent:
- value: db
For multiple grains, the syntax looks like:
.. code-block:: yaml
roles:
grains.list_absent:
- value:
- web
- dev
"""
ret = {'name': name, 'changes': {}, 'result': True, 'comment': ''}
comments = []
grain = __grains__.get(name)
if grain:
if isinstance(grain, list):
if not isinstance(value, list):
value = [value]
for val in value:
if val not in grain:
comments.append('Value {1} is absent from grain {0}'.format(name, val))
elif __opts__['test']:
ret['result'] = None
comments.append('Value {1} in grain {0} is set to be deleted'.format(name, val))
if 'deleted' not in ret['changes'].keys():
ret['changes'] = {'deleted': []}
ret['changes']['deleted'].append(val)
elif val in grain:
__salt__['grains.remove'](name, val)
comments.append('Value {1} was deleted from grain {0}'.format(name, val))
if 'deleted' not in ret['changes'].keys():
ret['changes'] = {'deleted': []}
ret['changes']['deleted'].append(val)
ret['comment'] = '\n'.join(comments)
return ret
else:
ret['result'] = False
ret['comment'] = 'Grain {0} is not a valid list'.format(name)
else:
ret['comment'] = 'Grain {0} does not exist'.format(name)
return ret
def absent(name, destructive=False):
"""
.. versionadded:: 2014.7.0
Delete a grain from the grains config file
name
The grain name
:param destructive: If destructive is True, delete the entire grain. If
destructive is False, set the grain's value to None. Defaults to False.
.. code-block:: yaml
grain_name:
grains.absent
"""
ret = {'name': name, 'changes': {}, 'result': True, 'comment': ''}
if name in __grains__:
if __opts__['test']:
ret['result'] = None
if destructive is True:
ret['comment'] = 'Grain {0} is set to be deleted'.format(name)
ret['changes'] = {'deleted': name}
else:
ret['comment'] = 'Value for grain {0} is set to be deleted (None)'.format(name)
ret['changes'] = {'grain': name, 'value': None}
return ret
__salt__['grains.delval'](name, destructive)
if destructive is True:
ret['comment'] = 'Grain {0} was deleted'.format(name)
ret['changes'] = {'deleted': name}
else:
ret['comment'] = 'Value for grain {0} was set to {1}'.format(name, None)
ret['changes'] = {'grain': name, 'value': None}
else:
ret['comment'] = 'Grain {0} does not exist'.format(name)
return ret
def append(name, value, convert=False):
"""
.. versionadded:: 2014.7.0
Append a value to a list in the grains config file
name
The grain name
value
The value to append
:param convert: If convert is True, convert non-list contents into a list.
If convert is False and the grain contains non-list contents, an error
is given. Defaults to False.
.. code-block:: yaml
grain_name:
grains.append:
- value: to_be_appended
"""
ret = {'name': name, 'changes': {}, 'result': True, 'comment': ''}
grain = __grains__.get(name)
if grain:
if isinstance(grain, list):
if value in grain:
ret['comment'] = 'Value {1} is already in the list for grain {0}'.format(name, value)
return ret
if __opts__['test']:
ret['result'] = None
ret['comment'] = 'Value {1} in grain {0} is set to be added'.format(name, value)
ret['changes'] = {'added': value}
return ret
__salt__['grains.append'](name, value)
ret['comment'] = 'Value {1} was added to grain {0}'.format(name, value)
ret['changes'] = {'added': value}
elif convert is True:
if __opts__['test']:
ret['result'] = None
ret['comment'] = 'Grain {0} is set to be converted to list and value {1} will be added'.format(name, value)
ret['changes'] = {'added': value}
return ret
grain = [grain]
grain.append(value)
__salt__['grains.setval'](name, grain)
ret['comment'] = 'Value {1} was added to grain {0}'.format(name, value)
ret['changes'] = {'added': value}
else:
ret['result'] = False
ret['comment'] = 'Grain {0} is not a valid list'.format(name)
else:
ret['result'] = False
ret['comment'] = 'Grain {0} does not exist'.format(name)
return ret
|
"""
Multiples of 3 and 5
====================
If we list all the natural numbers below 10 that are multiples of
3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
https://projecteuler.net/problem=1
"""
print(sum([n for n in range(1, 1000) if n % 3 == 0 or n % 5 == 0]))
|
"""
Multiples of 3 and 5
====================
If we list all the natural numbers below 10 that are multiples of
3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
https://projecteuler.net/problem=1
"""
print(sum([n for n in range(1, 1000) if n % 3 == 0 or n % 5 == 0]))
|
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file 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.
class Environment(object):
def __init__(self, version_label=None, status=None, app_name=None,
health=None, id=None, date_updated=None,
platform=None, description=None,
name=None, date_created=None, tier=None,
cname=None, option_settings=None, is_abortable=False,
environment_links=None, environment_arn=None):
self.version_label = version_label
self.status = status
self.app_name = app_name
self.health = health
self.id = id
self.date_updated = date_updated
self.platform = platform
self.description = description
self.name = name
self.date_created = date_created
self.tier = tier
self.cname = cname
self.option_settings = option_settings
self.is_abortable = is_abortable
self.environment_links = environment_links
self.environment_arn = environment_arn
def __str__(self):
return self.name
|
class Environment(object):
def __init__(self, version_label=None, status=None, app_name=None, health=None, id=None, date_updated=None, platform=None, description=None, name=None, date_created=None, tier=None, cname=None, option_settings=None, is_abortable=False, environment_links=None, environment_arn=None):
self.version_label = version_label
self.status = status
self.app_name = app_name
self.health = health
self.id = id
self.date_updated = date_updated
self.platform = platform
self.description = description
self.name = name
self.date_created = date_created
self.tier = tier
self.cname = cname
self.option_settings = option_settings
self.is_abortable = is_abortable
self.environment_links = environment_links
self.environment_arn = environment_arn
def __str__(self):
return self.name
|
'''
Basic Binary Tree in Array Representation
Referred from:
www.javatpoint.com/program-to-implement-binary-tree-using-the-linked-list
'''
class Node:
def __init__(self, key):
self.value = key
self.left = None
self.right = None
class BinaryTree:
def __init__(self):
self.root = None
def insert_node(self, data):
new_node = Node(data)
# Check whether tree is empty
if(self.root == None):
self.root = new_node
return;
else:
queue = []
# Add root to the queue
queue.append(self.root)
while(True):
node = queue.pop(0)
# If node has both left and right child, add both the child to queue
if(node.left != None and node.right != None):
queue.append(node.left)
queue.append(node.right)
else:
# If node has no left child, make new_node as left child
if(node.left == None):
node.left = new_node
queue.append(node.left)
else:
# If node has left child but no right child, make new_node as right child
node.right = new_node
queue.append(node.right)
break
# Inorder traversal
# Left -> Root -> right
# Root is IN between left and right that why it is called INorder
def inorder_traversal(self, root):
if(root):
self.inorder_traversal(root.left)
print(root.value, end=' => ')
self.inorder_traversal(root.right)
# Preorder traversal
# Root -> Left -> right
# Root comes before left and right that why it is called PREorder
def preorder_traversal(self, root):
if(root):
print(root.value, end=' => ')
self.preorder_traversal(root.left)
self.preorder_traversal(root.right)
# Preorder traversal
# Left -> right -> Root
# Root comes after left and right that why it is called POSTorder
def postorder_traversal(self, root):
if(root):
self.postorder_traversal(root.left)
self.postorder_traversal(root.right)
print(root.value, end=' => ')
# Creating object
BT = BinaryTree()
# Inserting_node
BT.insert_node('A')
BT.insert_node('B')
BT.insert_node('C')
BT.insert_node('D')
BT.insert_node('E')
#====Inorder traversal====#
print("InOrder Traversal")
BT.inorder_traversal(BT.root)
#====Preorder traversal====#
print("\nPreOrder Traversal")
BT.preorder_traversal(BT.root)
#====Postorder traversal====#
print("\nPostOrder Traversal")
BT.postorder_traversal(BT.root)
print()
|
"""
Basic Binary Tree in Array Representation
Referred from:
www.javatpoint.com/program-to-implement-binary-tree-using-the-linked-list
"""
class Node:
def __init__(self, key):
self.value = key
self.left = None
self.right = None
class Binarytree:
def __init__(self):
self.root = None
def insert_node(self, data):
new_node = node(data)
if self.root == None:
self.root = new_node
return
else:
queue = []
queue.append(self.root)
while True:
node = queue.pop(0)
if node.left != None and node.right != None:
queue.append(node.left)
queue.append(node.right)
else:
if node.left == None:
node.left = new_node
queue.append(node.left)
else:
node.right = new_node
queue.append(node.right)
break
def inorder_traversal(self, root):
if root:
self.inorder_traversal(root.left)
print(root.value, end=' => ')
self.inorder_traversal(root.right)
def preorder_traversal(self, root):
if root:
print(root.value, end=' => ')
self.preorder_traversal(root.left)
self.preorder_traversal(root.right)
def postorder_traversal(self, root):
if root:
self.postorder_traversal(root.left)
self.postorder_traversal(root.right)
print(root.value, end=' => ')
bt = binary_tree()
BT.insert_node('A')
BT.insert_node('B')
BT.insert_node('C')
BT.insert_node('D')
BT.insert_node('E')
print('InOrder Traversal')
BT.inorder_traversal(BT.root)
print('\nPreOrder Traversal')
BT.preorder_traversal(BT.root)
print('\nPostOrder Traversal')
BT.postorder_traversal(BT.root)
print()
|
people = [
{
'name': 'Lucas',
'age': 27,
'gender': 'Male',
},
{
'name': 'Miguel',
'age': 4,
'gender': 'Male',
},
{
'name': 'Adriana',
'age': 27,
'gender': 'Female',
},
]
for person in people:
for field, data in person.items():
print(f"{field.title()}: {data}")
print("{:=^20}".format(''))
|
people = [{'name': 'Lucas', 'age': 27, 'gender': 'Male'}, {'name': 'Miguel', 'age': 4, 'gender': 'Male'}, {'name': 'Adriana', 'age': 27, 'gender': 'Female'}]
for person in people:
for (field, data) in person.items():
print(f'{field.title()}: {data}')
print('{:=^20}'.format(''))
|
class Solution:
def noOfWays(self, M, N, X):
# code here
if X > M * N:
return 0
ways = [[0 for _ in range(M * N + 1)] for _ in range(N + 1)]
for i in range(1, M + 1):
ways[1][i] = 1
for i in range(2, N + 1):
for j in range(1, X + 1):
for k in range(1, M + 1):
if j - k <= 0:
continue
ways[i][j] += ways[i - 1][j - k]
return ways[N][X]
|
class Solution:
def no_of_ways(self, M, N, X):
if X > M * N:
return 0
ways = [[0 for _ in range(M * N + 1)] for _ in range(N + 1)]
for i in range(1, M + 1):
ways[1][i] = 1
for i in range(2, N + 1):
for j in range(1, X + 1):
for k in range(1, M + 1):
if j - k <= 0:
continue
ways[i][j] += ways[i - 1][j - k]
return ways[N][X]
|
a_1 = -6
b_1 = -6
a = -5
b = -5
m = 255
n = 255
m_add_1 = 100000
n_add_1 = 100000
if __name__ == '__main__':
print(a_1 is b_1)
print(a is b)
print(m is n)
print(m_add_1 is n_add_1)
|
a_1 = -6
b_1 = -6
a = -5
b = -5
m = 255
n = 255
m_add_1 = 100000
n_add_1 = 100000
if __name__ == '__main__':
print(a_1 is b_1)
print(a is b)
print(m is n)
print(m_add_1 is n_add_1)
|
def hex_to_int(hex):
assert hex.startswith('0x')
hex = hex[2:]
total = 0
for h in hex:
total *= 16
total += '0123456789abcdef'.index(h)
return total
def byte_to_uint(byte):
total = 0
for c in byte:
total *= 2
if c == '1':
total += 1
return total
def byte_to_int(byte):
total = 0
for c in byte:
total *= 2
if c == '1':
total += 1
return total if byte[0] == '0' else total - 2**8
def word_to_int(word):
total = 0
for c in word:
total *= 2
if c == '1':
total += 1
return total if word[0] == '0' else total - 2**16
def dword_to_int(dword):
total = 0
for c in dword:
total *= 2
if c == '1':
total += 1
return total if dword[0] == '0' else total - 2**32
def word_to_uint(word):
total = 0
for c in word:
total *= 2
if c == '1':
total += 1
return total
def dword_to_uint(dword):
total = 0
for c in dword:
total *= 2
if c == '1':
total += 1
return total
def int_to_byte(x):
if x < 0:
x += 2**8
res = ''
for i in range(8):
if x % 2 == 1:
res = '1' + res
else:
res = '0' + res
x = x // 2
return res
def int_to_word(x):
if x < 0:
x += 2**16
res = ''
for i in range(16):
if x % 2 == 1:
res = '1' + res
else:
res = '0' + res
x = x // 2
return res
def uint_to_word(x):
res = ''
for i in range(16):
if x % 2 == 1:
res = '1' + res
else:
res = '0' + res
x = x // 2
return res
def uint_to_dword(x):
res = ''
for i in range(32):
if x % 2 == 1:
res = '1' + res
else:
res = '0' + res
x = x // 2
return res[:16], res[16:]
def int_to_dword(x):
if x < 0:
x += 2**32
res = ''
for i in range(32):
if x % 2 == 1:
res = '1' + res
else:
res = '0' + res
x = x // 2
return res[:16], res[16:]
def uint_to_byte(x):
res = ''
for i in range(8):
if x % 2 == 1:
res = '1' + res
else:
res = '0' + res
x = x // 2
return res
def split_on_spaces(s):
parts = s.replace('\t', ' ').split(' ')
parts = [p.strip() for p in parts if p.strip()]
return parts
def condense_spaces(s):
return ' '.join(split_on_spaces(s))
def pad_to_length(s, l):
assert l >= len(s)
return s + ' ' * (l - len(s))
|
def hex_to_int(hex):
assert hex.startswith('0x')
hex = hex[2:]
total = 0
for h in hex:
total *= 16
total += '0123456789abcdef'.index(h)
return total
def byte_to_uint(byte):
total = 0
for c in byte:
total *= 2
if c == '1':
total += 1
return total
def byte_to_int(byte):
total = 0
for c in byte:
total *= 2
if c == '1':
total += 1
return total if byte[0] == '0' else total - 2 ** 8
def word_to_int(word):
total = 0
for c in word:
total *= 2
if c == '1':
total += 1
return total if word[0] == '0' else total - 2 ** 16
def dword_to_int(dword):
total = 0
for c in dword:
total *= 2
if c == '1':
total += 1
return total if dword[0] == '0' else total - 2 ** 32
def word_to_uint(word):
total = 0
for c in word:
total *= 2
if c == '1':
total += 1
return total
def dword_to_uint(dword):
total = 0
for c in dword:
total *= 2
if c == '1':
total += 1
return total
def int_to_byte(x):
if x < 0:
x += 2 ** 8
res = ''
for i in range(8):
if x % 2 == 1:
res = '1' + res
else:
res = '0' + res
x = x // 2
return res
def int_to_word(x):
if x < 0:
x += 2 ** 16
res = ''
for i in range(16):
if x % 2 == 1:
res = '1' + res
else:
res = '0' + res
x = x // 2
return res
def uint_to_word(x):
res = ''
for i in range(16):
if x % 2 == 1:
res = '1' + res
else:
res = '0' + res
x = x // 2
return res
def uint_to_dword(x):
res = ''
for i in range(32):
if x % 2 == 1:
res = '1' + res
else:
res = '0' + res
x = x // 2
return (res[:16], res[16:])
def int_to_dword(x):
if x < 0:
x += 2 ** 32
res = ''
for i in range(32):
if x % 2 == 1:
res = '1' + res
else:
res = '0' + res
x = x // 2
return (res[:16], res[16:])
def uint_to_byte(x):
res = ''
for i in range(8):
if x % 2 == 1:
res = '1' + res
else:
res = '0' + res
x = x // 2
return res
def split_on_spaces(s):
parts = s.replace('\t', ' ').split(' ')
parts = [p.strip() for p in parts if p.strip()]
return parts
def condense_spaces(s):
return ' '.join(split_on_spaces(s))
def pad_to_length(s, l):
assert l >= len(s)
return s + ' ' * (l - len(s))
|
#stores the current state of the register machine for the interpreter
class RMState:
def __init__(self, REGS):
self.b = 1
self.acc = 0
self.REGS = REGS
self.ended = False
|
class Rmstate:
def __init__(self, REGS):
self.b = 1
self.acc = 0
self.REGS = REGS
self.ended = False
|
class Tower:
__slots__ = 'rings', 'capacity'
def __init__(self, cap: int):
self.rings = list()
self.capacity = cap
def add(self, ring_size:int):
if len(self.rings) >= self.capacity:
raise IndexError('Tower already at max capacity')
if (len(self.rings) > 0) and (ring_size >= self.rings[-1]):
raise ValueError("Trying to add ring of size %d on top of ring of size %d" % (ring_size, self.rings[-1]))
self.rings.append(ring_size)
def pop(self) -> int:
if len(self.rings) <= 0:
raise IndexError('Tower empty')
return self.rings.pop()
def get(self, depth: int) -> int:
return self.rings[-1 * (depth + 1)]
def print_towers(towers: list, size=None):
if size is None:
size = towers[0].capacity
# Pad tower lists with zeros
tower_list = list()
for tower in towers:
tl = list(tower.rings)
while len(tl) < size:
tl.append(0)
tower_list.append(tl)
for row in range(size):
for tower in tower_list:
ring_size = tower[size - row - 1]
whitespace = padding(size - ring_size + 1)
ring_space = padding(ring_size, '-')
print(whitespace + ring_space + '|' + ring_space + whitespace, end=' ')
print()
for idx in range(len(tower_list)):
base = padding((size + 1), character='=')
print("%s%d%s" % (base, idx + 1, base), end=' ')
print("\n")
def padding(width: int, character=' ') -> str:
pad = ''
for i in range(width):
pad += character
return pad
def move_tower(towers: list, size: int, src: int, dest: int):
if size == 1:
towers[dest].add(towers[src].pop())
print("\nTower %d -> Tower %d" % (src + 1, dest + 1))
print_towers(towers)
else:
# Determine temp peg
all_pegs = list(range(3))
all_pegs.remove(src)
all_pegs.remove(dest)
temp_peg = all_pegs[0]
# Move top tower (size n-1) to temp peg
move_tower(towers, size-1, src, temp_peg)
# Move bottom ring to destination peg
move_tower(towers, 1, src, dest)
# Move rest of tower to destination peg
move_tower(towers, size-1, temp_peg, dest)
def main():
size = int(input("Input tower size... "))
towers = list()
for i in range(3):
towers.append(Tower(size))
for ring in range(size, 0, -1):
towers[0].add(ring)
print("\nInitial configuration")
print_towers(towers)
move_tower(towers, size, 0, 1)
if __name__ == '__main__':
main()
|
class Tower:
__slots__ = ('rings', 'capacity')
def __init__(self, cap: int):
self.rings = list()
self.capacity = cap
def add(self, ring_size: int):
if len(self.rings) >= self.capacity:
raise index_error('Tower already at max capacity')
if len(self.rings) > 0 and ring_size >= self.rings[-1]:
raise value_error('Trying to add ring of size %d on top of ring of size %d' % (ring_size, self.rings[-1]))
self.rings.append(ring_size)
def pop(self) -> int:
if len(self.rings) <= 0:
raise index_error('Tower empty')
return self.rings.pop()
def get(self, depth: int) -> int:
return self.rings[-1 * (depth + 1)]
def print_towers(towers: list, size=None):
if size is None:
size = towers[0].capacity
tower_list = list()
for tower in towers:
tl = list(tower.rings)
while len(tl) < size:
tl.append(0)
tower_list.append(tl)
for row in range(size):
for tower in tower_list:
ring_size = tower[size - row - 1]
whitespace = padding(size - ring_size + 1)
ring_space = padding(ring_size, '-')
print(whitespace + ring_space + '|' + ring_space + whitespace, end=' ')
print()
for idx in range(len(tower_list)):
base = padding(size + 1, character='=')
print('%s%d%s' % (base, idx + 1, base), end=' ')
print('\n')
def padding(width: int, character=' ') -> str:
pad = ''
for i in range(width):
pad += character
return pad
def move_tower(towers: list, size: int, src: int, dest: int):
if size == 1:
towers[dest].add(towers[src].pop())
print('\nTower %d -> Tower %d' % (src + 1, dest + 1))
print_towers(towers)
else:
all_pegs = list(range(3))
all_pegs.remove(src)
all_pegs.remove(dest)
temp_peg = all_pegs[0]
move_tower(towers, size - 1, src, temp_peg)
move_tower(towers, 1, src, dest)
move_tower(towers, size - 1, temp_peg, dest)
def main():
size = int(input('Input tower size... '))
towers = list()
for i in range(3):
towers.append(tower(size))
for ring in range(size, 0, -1):
towers[0].add(ring)
print('\nInitial configuration')
print_towers(towers)
move_tower(towers, size, 0, 1)
if __name__ == '__main__':
main()
|
{
'targets' : [
{
'target_name' : 'test',
'type' : 'executable',
'sources' : [
'<!@(find *.cc)',
'<!@(find *.h)'
],
'include_dirs' : [
],
'libraries' : [
],
'conditions' : [
['OS=="mac"', {
'xcode_settings': {
'ARCHS': '$(ARCHS_STANDARD_64_BIT)'
},
'link_settings': {
'libraries': [
],
},
}]
]
}
]
}
|
{'targets': [{'target_name': 'test', 'type': 'executable', 'sources': ['<!@(find *.cc)', '<!@(find *.h)'], 'include_dirs': [], 'libraries': [], 'conditions': [['OS=="mac"', {'xcode_settings': {'ARCHS': '$(ARCHS_STANDARD_64_BIT)'}, 'link_settings': {'libraries': []}}]]}]}
|
class ShorteningErrorException(Exception):
def __init__(self, message=None):
super().__init__(f'There was an error on trying to short the url: '
f'{message}')
class ExpandingErrorException(Exception):
def __init__(self, message=None):
super().__init__(f'There was an error on trying to expand the url: '
f'{message}')
class BadAPIResponseException(Exception):
def __init__(self, message):
super().__init__(f'Error on API Response: {message}')
class BadURLException(Exception):
def __init__(self, message):
super().__init__(f'URL is not valid: {message}')
|
class Shorteningerrorexception(Exception):
def __init__(self, message=None):
super().__init__(f'There was an error on trying to short the url: {message}')
class Expandingerrorexception(Exception):
def __init__(self, message=None):
super().__init__(f'There was an error on trying to expand the url: {message}')
class Badapiresponseexception(Exception):
def __init__(self, message):
super().__init__(f'Error on API Response: {message}')
class Badurlexception(Exception):
def __init__(self, message):
super().__init__(f'URL is not valid: {message}')
|
#
# PySNMP MIB module CISCO-VISM-CAS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-VISM-CAS-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:02:02 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint")
voice, = mibBuilder.importSymbols("BASIS-MIB", "voice")
ciscoWan, = mibBuilder.importSymbols("CISCOWAN-SMI", "ciscoWan")
ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup")
Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, Integer32, Unsigned32, iso, IpAddress, Bits, Gauge32, MibIdentifier, NotificationType, ModuleIdentity, TimeTicks, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "Integer32", "Unsigned32", "iso", "IpAddress", "Bits", "Gauge32", "MibIdentifier", "NotificationType", "ModuleIdentity", "TimeTicks", "Counter64")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
ciscoVismCasMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 351, 150, 88))
ciscoVismCasMIB.setRevisions(('2003-07-16 00:00',))
if mibBuilder.loadTexts: ciscoVismCasMIB.setLastUpdated('200307160000Z')
if mibBuilder.loadTexts: ciscoVismCasMIB.setOrganization('Cisco Systems, Inc.')
vismCasGrp = MibIdentifier((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8))
vismCasVariantTable = MibTable((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1), )
if mibBuilder.loadTexts: vismCasVariantTable.setStatus('current')
vismCasVariantEntry = MibTableRow((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1), ).setIndexNames((0, "CISCO-VISM-CAS-MIB", "vismCasVariantName"))
if mibBuilder.loadTexts: vismCasVariantEntry.setStatus('current')
vismCasVariantName = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismCasVariantName.setStatus('current')
vismCasFileName = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(2, 64))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismCasFileName.setStatus('current')
vismCasTRinging = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(10, 600)).clone(180)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismCasTRinging.setStatus('deprecated')
vismCasDigitMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("mf", 1), ("dtmf", 2))).clone('dtmf')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismCasDigitMethod.setStatus('current')
vismCasInterdigitTpart = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(10, 10000)).clone(16)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismCasInterdigitTpart.setStatus('current')
vismCasInterdigitTcrit = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 10000)).clone(4)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismCasInterdigitTcrit.setStatus('current')
vismCasInterdigitTMF = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10)).clone(1)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismCasInterdigitTMF.setStatus('current')
vismCasVariantState = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("notConfigured", 1), ("configInProgress", 2), ("configured", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismCasVariantState.setStatus('current')
vismCasRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 4, 6))).clone(namedValues=NamedValues(("active", 1), ("createAndGo", 4), ("destroy", 6)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismCasRowStatus.setStatus('current')
vismCasCountryCode = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 2)).clone('US')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismCasCountryCode.setStatus('deprecated')
vismCasVariantSource = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unspecified", 1), ("internal", 2), ("external", 3))).clone('unspecified')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismCasVariantSource.setStatus('current')
vismCasXgcpVariantTable = MibTable((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 2), )
if mibBuilder.loadTexts: vismCasXgcpVariantTable.setStatus('current')
vismCasXgcpVariantEntry = MibTableRow((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 2, 1), ).setIndexNames((0, "CISCO-VISM-CAS-MIB", "vismCasXgcpVariantName"))
if mibBuilder.loadTexts: vismCasXgcpVariantEntry.setStatus('current')
vismCasXgcpVariantName = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 2, 1, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismCasXgcpVariantName.setStatus('current')
vismCasXgcpFileName = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 2, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: vismCasXgcpFileName.setStatus('current')
vismCasXgcpMaxReXmitTime = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(10, 10000)).clone(500)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismCasXgcpMaxReXmitTime.setStatus('current')
vismCasXgcpInitialReXmitTime = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 2, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(10, 10000)).clone(100)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismCasXgcpInitialReXmitTime.setStatus('current')
vismCasXgcpMaxRetries = MibTableColumn((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 10)).clone(4)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: vismCasXgcpMaxRetries.setStatus('current')
ciscoVismCasMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 351, 150, 88, 2))
ciscoVismCasMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 351, 150, 88, 2, 1))
ciscoVismCasMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 351, 150, 88, 2, 2))
ciscoVismCasCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 351, 150, 88, 2, 2, 1)).setObjects(("CISCO-VISM-CAS-MIB", "ciscoVismCasVariantGroup"), ("CISCO-VISM-CAS-MIB", "ciscoVismCasXgcpVariantGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoVismCasCompliance = ciscoVismCasCompliance.setStatus('current')
ciscoVismCasVariantGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 351, 150, 88, 2, 1, 1)).setObjects(("CISCO-VISM-CAS-MIB", "vismCasVariantName"), ("CISCO-VISM-CAS-MIB", "vismCasFileName"), ("CISCO-VISM-CAS-MIB", "vismCasDigitMethod"), ("CISCO-VISM-CAS-MIB", "vismCasInterdigitTpart"), ("CISCO-VISM-CAS-MIB", "vismCasInterdigitTcrit"), ("CISCO-VISM-CAS-MIB", "vismCasInterdigitTMF"), ("CISCO-VISM-CAS-MIB", "vismCasVariantState"), ("CISCO-VISM-CAS-MIB", "vismCasRowStatus"), ("CISCO-VISM-CAS-MIB", "vismCasVariantSource"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoVismCasVariantGroup = ciscoVismCasVariantGroup.setStatus('current')
ciscoVismCasXgcpVariantGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 351, 150, 88, 2, 1, 2)).setObjects(("CISCO-VISM-CAS-MIB", "vismCasXgcpVariantName"), ("CISCO-VISM-CAS-MIB", "vismCasXgcpFileName"), ("CISCO-VISM-CAS-MIB", "vismCasXgcpMaxReXmitTime"), ("CISCO-VISM-CAS-MIB", "vismCasXgcpInitialReXmitTime"), ("CISCO-VISM-CAS-MIB", "vismCasXgcpMaxRetries"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoVismCasXgcpVariantGroup = ciscoVismCasXgcpVariantGroup.setStatus('current')
cvcVariantDeprecatedGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 351, 150, 88, 2, 1, 3)).setObjects(("CISCO-VISM-CAS-MIB", "vismCasTRinging"), ("CISCO-VISM-CAS-MIB", "vismCasCountryCode"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cvcVariantDeprecatedGroup = cvcVariantDeprecatedGroup.setStatus('deprecated')
mibBuilder.exportSymbols("CISCO-VISM-CAS-MIB", vismCasXgcpMaxRetries=vismCasXgcpMaxRetries, ciscoVismCasMIBConformance=ciscoVismCasMIBConformance, vismCasVariantSource=vismCasVariantSource, ciscoVismCasCompliance=ciscoVismCasCompliance, vismCasGrp=vismCasGrp, vismCasXgcpVariantName=vismCasXgcpVariantName, vismCasXgcpVariantTable=vismCasXgcpVariantTable, vismCasDigitMethod=vismCasDigitMethod, vismCasInterdigitTcrit=vismCasInterdigitTcrit, vismCasVariantState=vismCasVariantState, ciscoVismCasMIBCompliances=ciscoVismCasMIBCompliances, vismCasXgcpFileName=vismCasXgcpFileName, vismCasTRinging=vismCasTRinging, vismCasCountryCode=vismCasCountryCode, vismCasVariantName=vismCasVariantName, vismCasFileName=vismCasFileName, vismCasXgcpMaxReXmitTime=vismCasXgcpMaxReXmitTime, vismCasInterdigitTMF=vismCasInterdigitTMF, ciscoVismCasXgcpVariantGroup=ciscoVismCasXgcpVariantGroup, vismCasVariantTable=vismCasVariantTable, vismCasXgcpInitialReXmitTime=vismCasXgcpInitialReXmitTime, vismCasVariantEntry=vismCasVariantEntry, ciscoVismCasMIBGroups=ciscoVismCasMIBGroups, ciscoVismCasVariantGroup=ciscoVismCasVariantGroup, vismCasRowStatus=vismCasRowStatus, vismCasInterdigitTpart=vismCasInterdigitTpart, ciscoVismCasMIB=ciscoVismCasMIB, cvcVariantDeprecatedGroup=cvcVariantDeprecatedGroup, vismCasXgcpVariantEntry=vismCasXgcpVariantEntry, PYSNMP_MODULE_ID=ciscoVismCasMIB)
|
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, single_value_constraint, value_size_constraint, constraints_union, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint')
(voice,) = mibBuilder.importSymbols('BASIS-MIB', 'voice')
(cisco_wan,) = mibBuilder.importSymbols('CISCOWAN-SMI', 'ciscoWan')
(module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup')
(counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity, integer32, unsigned32, iso, ip_address, bits, gauge32, mib_identifier, notification_type, module_identity, time_ticks, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity', 'Integer32', 'Unsigned32', 'iso', 'IpAddress', 'Bits', 'Gauge32', 'MibIdentifier', 'NotificationType', 'ModuleIdentity', 'TimeTicks', 'Counter64')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
cisco_vism_cas_mib = module_identity((1, 3, 6, 1, 4, 1, 351, 150, 88))
ciscoVismCasMIB.setRevisions(('2003-07-16 00:00',))
if mibBuilder.loadTexts:
ciscoVismCasMIB.setLastUpdated('200307160000Z')
if mibBuilder.loadTexts:
ciscoVismCasMIB.setOrganization('Cisco Systems, Inc.')
vism_cas_grp = mib_identifier((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8))
vism_cas_variant_table = mib_table((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1))
if mibBuilder.loadTexts:
vismCasVariantTable.setStatus('current')
vism_cas_variant_entry = mib_table_row((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1)).setIndexNames((0, 'CISCO-VISM-CAS-MIB', 'vismCasVariantName'))
if mibBuilder.loadTexts:
vismCasVariantEntry.setStatus('current')
vism_cas_variant_name = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismCasVariantName.setStatus('current')
vism_cas_file_name = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(2, 64))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismCasFileName.setStatus('current')
vism_cas_t_ringing = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(10, 600)).clone(180)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismCasTRinging.setStatus('deprecated')
vism_cas_digit_method = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('mf', 1), ('dtmf', 2))).clone('dtmf')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismCasDigitMethod.setStatus('current')
vism_cas_interdigit_tpart = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(10, 10000)).clone(16)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismCasInterdigitTpart.setStatus('current')
vism_cas_interdigit_tcrit = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 10000)).clone(4)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismCasInterdigitTcrit.setStatus('current')
vism_cas_interdigit_tmf = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(1, 10)).clone(1)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismCasInterdigitTMF.setStatus('current')
vism_cas_variant_state = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('notConfigured', 1), ('configInProgress', 2), ('configured', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismCasVariantState.setStatus('current')
vism_cas_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 4, 6))).clone(namedValues=named_values(('active', 1), ('createAndGo', 4), ('destroy', 6)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismCasRowStatus.setStatus('current')
vism_cas_country_code = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 10), display_string().subtype(subtypeSpec=value_size_constraint(0, 2)).clone('US')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismCasCountryCode.setStatus('deprecated')
vism_cas_variant_source = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('unspecified', 1), ('internal', 2), ('external', 3))).clone('unspecified')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismCasVariantSource.setStatus('current')
vism_cas_xgcp_variant_table = mib_table((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 2))
if mibBuilder.loadTexts:
vismCasXgcpVariantTable.setStatus('current')
vism_cas_xgcp_variant_entry = mib_table_row((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 2, 1)).setIndexNames((0, 'CISCO-VISM-CAS-MIB', 'vismCasXgcpVariantName'))
if mibBuilder.loadTexts:
vismCasXgcpVariantEntry.setStatus('current')
vism_cas_xgcp_variant_name = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 2, 1, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismCasXgcpVariantName.setStatus('current')
vism_cas_xgcp_file_name = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 2, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
vismCasXgcpFileName.setStatus('current')
vism_cas_xgcp_max_re_xmit_time = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(10, 10000)).clone(500)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismCasXgcpMaxReXmitTime.setStatus('current')
vism_cas_xgcp_initial_re_xmit_time = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 2, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(10, 10000)).clone(100)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismCasXgcpInitialReXmitTime.setStatus('current')
vism_cas_xgcp_max_retries = mib_table_column((1, 3, 6, 1, 4, 1, 351, 110, 5, 5, 8, 2, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 10)).clone(4)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
vismCasXgcpMaxRetries.setStatus('current')
cisco_vism_cas_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 351, 150, 88, 2))
cisco_vism_cas_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 351, 150, 88, 2, 1))
cisco_vism_cas_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 351, 150, 88, 2, 2))
cisco_vism_cas_compliance = module_compliance((1, 3, 6, 1, 4, 1, 351, 150, 88, 2, 2, 1)).setObjects(('CISCO-VISM-CAS-MIB', 'ciscoVismCasVariantGroup'), ('CISCO-VISM-CAS-MIB', 'ciscoVismCasXgcpVariantGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_vism_cas_compliance = ciscoVismCasCompliance.setStatus('current')
cisco_vism_cas_variant_group = object_group((1, 3, 6, 1, 4, 1, 351, 150, 88, 2, 1, 1)).setObjects(('CISCO-VISM-CAS-MIB', 'vismCasVariantName'), ('CISCO-VISM-CAS-MIB', 'vismCasFileName'), ('CISCO-VISM-CAS-MIB', 'vismCasDigitMethod'), ('CISCO-VISM-CAS-MIB', 'vismCasInterdigitTpart'), ('CISCO-VISM-CAS-MIB', 'vismCasInterdigitTcrit'), ('CISCO-VISM-CAS-MIB', 'vismCasInterdigitTMF'), ('CISCO-VISM-CAS-MIB', 'vismCasVariantState'), ('CISCO-VISM-CAS-MIB', 'vismCasRowStatus'), ('CISCO-VISM-CAS-MIB', 'vismCasVariantSource'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_vism_cas_variant_group = ciscoVismCasVariantGroup.setStatus('current')
cisco_vism_cas_xgcp_variant_group = object_group((1, 3, 6, 1, 4, 1, 351, 150, 88, 2, 1, 2)).setObjects(('CISCO-VISM-CAS-MIB', 'vismCasXgcpVariantName'), ('CISCO-VISM-CAS-MIB', 'vismCasXgcpFileName'), ('CISCO-VISM-CAS-MIB', 'vismCasXgcpMaxReXmitTime'), ('CISCO-VISM-CAS-MIB', 'vismCasXgcpInitialReXmitTime'), ('CISCO-VISM-CAS-MIB', 'vismCasXgcpMaxRetries'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_vism_cas_xgcp_variant_group = ciscoVismCasXgcpVariantGroup.setStatus('current')
cvc_variant_deprecated_group = object_group((1, 3, 6, 1, 4, 1, 351, 150, 88, 2, 1, 3)).setObjects(('CISCO-VISM-CAS-MIB', 'vismCasTRinging'), ('CISCO-VISM-CAS-MIB', 'vismCasCountryCode'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cvc_variant_deprecated_group = cvcVariantDeprecatedGroup.setStatus('deprecated')
mibBuilder.exportSymbols('CISCO-VISM-CAS-MIB', vismCasXgcpMaxRetries=vismCasXgcpMaxRetries, ciscoVismCasMIBConformance=ciscoVismCasMIBConformance, vismCasVariantSource=vismCasVariantSource, ciscoVismCasCompliance=ciscoVismCasCompliance, vismCasGrp=vismCasGrp, vismCasXgcpVariantName=vismCasXgcpVariantName, vismCasXgcpVariantTable=vismCasXgcpVariantTable, vismCasDigitMethod=vismCasDigitMethod, vismCasInterdigitTcrit=vismCasInterdigitTcrit, vismCasVariantState=vismCasVariantState, ciscoVismCasMIBCompliances=ciscoVismCasMIBCompliances, vismCasXgcpFileName=vismCasXgcpFileName, vismCasTRinging=vismCasTRinging, vismCasCountryCode=vismCasCountryCode, vismCasVariantName=vismCasVariantName, vismCasFileName=vismCasFileName, vismCasXgcpMaxReXmitTime=vismCasXgcpMaxReXmitTime, vismCasInterdigitTMF=vismCasInterdigitTMF, ciscoVismCasXgcpVariantGroup=ciscoVismCasXgcpVariantGroup, vismCasVariantTable=vismCasVariantTable, vismCasXgcpInitialReXmitTime=vismCasXgcpInitialReXmitTime, vismCasVariantEntry=vismCasVariantEntry, ciscoVismCasMIBGroups=ciscoVismCasMIBGroups, ciscoVismCasVariantGroup=ciscoVismCasVariantGroup, vismCasRowStatus=vismCasRowStatus, vismCasInterdigitTpart=vismCasInterdigitTpart, ciscoVismCasMIB=ciscoVismCasMIB, cvcVariantDeprecatedGroup=cvcVariantDeprecatedGroup, vismCasXgcpVariantEntry=vismCasXgcpVariantEntry, PYSNMP_MODULE_ID=ciscoVismCasMIB)
|
#
# PySNMP MIB module CISCO-WIRELESS-P2P-BPI-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-WIRELESS-P2P-BPI-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:05:17 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection")
ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup")
ModuleIdentity, TimeTicks, NotificationType, MibIdentifier, Unsigned32, ObjectIdentity, IpAddress, Counter32, Bits, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, Gauge32, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "TimeTicks", "NotificationType", "MibIdentifier", "Unsigned32", "ObjectIdentity", "IpAddress", "Counter32", "Bits", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "Gauge32", "Counter64")
TruthValue, TimeInterval, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "TimeInterval", "DisplayString", "TextualConvention")
ciscoWirelessP2pBpiMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 135))
if mibBuilder.loadTexts: ciscoWirelessP2pBpiMIB.setLastUpdated('9905181200Z')
if mibBuilder.loadTexts: ciscoWirelessP2pBpiMIB.setOrganization('Cisco Systems Inc.')
cwrBpiMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 135, 1))
cwrBpiRsObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1))
cwrBpiRsBaseTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1), )
if mibBuilder.loadTexts: cwrBpiRsBaseTable.setStatus('current')
cwrBpiRsBaseEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: cwrBpiRsBaseEntry.setStatus('current')
cwrBpiRsPrivacyEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwrBpiRsPrivacyEnable.setStatus('current')
cwrBpiRsPublicKey = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 126))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsPublicKey.setStatus('current')
cwrBpiRsAuthState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("start", 1), ("authWait", 2), ("authorized", 3), ("reauthWait", 4), ("authRejectWait", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsAuthState.setStatus('current')
cwrBpiRsAuthKeySequenceNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsAuthKeySequenceNumber.setStatus('current')
cwrBpiRsAuthExpires = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 5), TimeInterval()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsAuthExpires.setStatus('current')
cwrBpiRsAuthReset = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 6), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwrBpiRsAuthReset.setStatus('current')
cwrBpiRsAuthGraceTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1800))).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwrBpiRsAuthGraceTime.setStatus('current')
cwrBpiRsTEKGraceTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1800))).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwrBpiRsTEKGraceTime.setStatus('current')
cwrBpiRsAuthWaitTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(2, 30))).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwrBpiRsAuthWaitTimeout.setStatus('current')
cwrBpiRsReauthWaitTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(2, 30))).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwrBpiRsReauthWaitTimeout.setStatus('current')
cwrBpiRsOpWaitTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10))).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwrBpiRsOpWaitTimeout.setStatus('current')
cwrBpiRsRekeyWaitTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10))).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwrBpiRsRekeyWaitTimeout.setStatus('current')
cwrBpiRsAuthRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsAuthRequests.setStatus('current')
cwrBpiRsAuthReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsAuthReplies.setStatus('current')
cwrBpiRsAuthInvalids = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsAuthInvalids.setStatus('current')
cwrBpiRsAuthInvalidErrorCode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("noInformation", 0), ("unauthorizedSlave", 1), ("undefined", 2), ("unsolicited", 3), ("invalidKeySequence", 4), ("keyRequestAuthenticationFailure", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsAuthInvalidErrorCode.setStatus('current')
cwrBpiRsAuthInvalidErrorString = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 17), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsAuthInvalidErrorString.setStatus('current')
cwrBpiRsTEKTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2), )
if mibBuilder.loadTexts: cwrBpiRsTEKTable.setStatus('current')
cwrBpiRsTEKEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: cwrBpiRsTEKEntry.setStatus('current')
cwrBpiRsTEKEncryptionNegotiated = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 1), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsTEKEncryptionNegotiated.setStatus('current')
cwrBpiRsTEKState = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("start", 1), ("opWait", 2), ("opReauthWait", 3), ("operational", 4), ("rekeyWait", 5), ("rekeyReauthWait", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsTEKState.setStatus('current')
cwrBpiRsTEKExpiresOld = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 3), TimeInterval()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsTEKExpiresOld.setStatus('current')
cwrBpiRsTEKExpiresNew = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 4), TimeInterval()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsTEKExpiresNew.setStatus('current')
cwrBpiRsTEKKeyRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsTEKKeyRequests.setStatus('current')
cwrBpiRsTEKKeyReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsTEKKeyReplies.setStatus('current')
cwrBpiRsTEKInvalids = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsTEKInvalids.setStatus('current')
cwrBpiRsTEKAuthPends = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsTEKAuthPends.setStatus('current')
cwrBpiRsTEKInvalidErrorCode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("noInformation", 0), ("unauthorizedSlave", 1), ("undefined", 2), ("unsolicited", 3), ("invalidKeySequence", 4), ("keyRequestAuthenticationFailure", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsTEKInvalidErrorCode.setStatus('current')
cwrBpiRsTEKInvalidErrorString = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 10), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRsTEKInvalidErrorString.setStatus('current')
cwrBpiRmObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2))
cwrBpiRmAuthTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1), )
if mibBuilder.loadTexts: cwrBpiRmAuthTable.setStatus('current')
cwrBpiRmAuthEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: cwrBpiRmAuthEntry.setStatus('current')
cwrBpiRmAuthPrivacyEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwrBpiRmAuthPrivacyEnable.setStatus('current')
cwrBpiRmAuthRsPublicKey = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 126))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRmAuthRsPublicKey.setStatus('current')
cwrBpiRmAuthRsKeySequenceNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRmAuthRsKeySequenceNumber.setStatus('current')
cwrBpiRmAuthRsExpires = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 4), TimeInterval()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRmAuthRsExpires.setStatus('current')
cwrBpiRmAuthRsLifetime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 6048000))).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwrBpiRmAuthRsLifetime.setStatus('current')
cwrBpiRmAuthRsReset = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 6), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwrBpiRmAuthRsReset.setStatus('current')
cwrBpiRmAuthRsRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRmAuthRsRequests.setStatus('current')
cwrBpiRmAuthRsReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRmAuthRsReplies.setStatus('current')
cwrBpiRmAuthRsInvalids = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRmAuthRsInvalids.setStatus('current')
cwrBpiRmAuthInvalidErrorCode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("noInformation", 0), ("unauthorizedSlave", 1), ("undefined", 2), ("unsolicited", 3), ("invalidKeySequence", 4), ("keyRequestAuthenticationFailure", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRmAuthInvalidErrorCode.setStatus('current')
cwrBpiRmAuthInvalidErrorString = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 11), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRmAuthInvalidErrorString.setStatus('current')
cwrBpiRmTEKTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2), )
if mibBuilder.loadTexts: cwrBpiRmTEKTable.setStatus('current')
cwrBpiRmTEKEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: cwrBpiRmTEKEntry.setStatus('current')
cwrBpiRmTEKEncryptionNegotiated = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 1), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRmTEKEncryptionNegotiated.setStatus('current')
cwrBpiRmTEKLifetime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 604800))).setUnits('seconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwrBpiRmTEKLifetime.setStatus('current')
cwrBpiRmTEKExpiresOld = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 3), TimeInterval()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRmTEKExpiresOld.setStatus('current')
cwrBpiRmTEKExpiresNew = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 4), TimeInterval()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRmTEKExpiresNew.setStatus('current')
cwrBpiRmTEKReset = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 5), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwrBpiRmTEKReset.setStatus('current')
cwrBpiRmKeyRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRmKeyRequests.setStatus('current')
cwrBpiRmKeyReplies = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRmKeyReplies.setStatus('current')
cwrBpiRmTEKInvalids = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRmTEKInvalids.setStatus('current')
cwrBpiRmTEKInvalidErrorCode = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("noInformation", 0), ("unauthorizedSlave", 1), ("undefined", 2), ("unsolicited", 3), ("invalidKeySequence", 4), ("keyRequestAuthenticationFailure", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRmTEKInvalidErrorCode.setStatus('current')
cwrBpiRmTEKInvalidErrorString = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 10), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwrBpiRmTEKInvalidErrorString.setStatus('current')
cwrBpiNotification = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 135, 2))
cwrBpiConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 135, 3))
cwrBpiCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 135, 3, 1))
cwrBpiGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 135, 3, 2))
cwrBpiBasicCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 135, 3, 1, 1)).setObjects(("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsGroup"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cwrBpiBasicCompliance = cwrBpiBasicCompliance.setStatus('current')
cwrBpiRsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 135, 3, 2, 1)).setObjects(("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsPrivacyEnable"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsPublicKey"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsAuthState"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsAuthKeySequenceNumber"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsAuthExpires"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsAuthReset"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsAuthGraceTime"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsTEKGraceTime"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsAuthWaitTimeout"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsReauthWaitTimeout"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsOpWaitTimeout"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsRekeyWaitTimeout"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsAuthRequests"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsAuthReplies"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsAuthInvalids"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsAuthInvalidErrorCode"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsAuthInvalidErrorString"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsTEKEncryptionNegotiated"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsTEKState"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsTEKExpiresOld"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsTEKExpiresNew"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsTEKKeyRequests"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsTEKKeyReplies"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsTEKInvalids"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsTEKAuthPends"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsTEKInvalidErrorCode"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRsTEKInvalidErrorString"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cwrBpiRsGroup = cwrBpiRsGroup.setStatus('current')
cwrBpiRmGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 135, 3, 2, 2)).setObjects(("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmAuthPrivacyEnable"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmAuthRsPublicKey"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmAuthRsKeySequenceNumber"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmAuthRsExpires"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmAuthRsLifetime"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmAuthRsReset"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmAuthRsRequests"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmAuthRsReplies"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmAuthRsInvalids"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmAuthInvalidErrorCode"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmAuthInvalidErrorString"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmTEKEncryptionNegotiated"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmTEKLifetime"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmTEKExpiresOld"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmTEKExpiresNew"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmTEKReset"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmKeyRequests"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmKeyReplies"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmTEKInvalids"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmTEKInvalidErrorCode"), ("CISCO-WIRELESS-P2P-BPI-MIB", "cwrBpiRmTEKInvalidErrorString"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cwrBpiRmGroup = cwrBpiRmGroup.setStatus('current')
mibBuilder.exportSymbols("CISCO-WIRELESS-P2P-BPI-MIB", cwrBpiRsOpWaitTimeout=cwrBpiRsOpWaitTimeout, cwrBpiRsTEKInvalidErrorCode=cwrBpiRsTEKInvalidErrorCode, cwrBpiRmTEKInvalids=cwrBpiRmTEKInvalids, cwrBpiRmAuthPrivacyEnable=cwrBpiRmAuthPrivacyEnable, cwrBpiGroups=cwrBpiGroups, cwrBpiConformance=cwrBpiConformance, cwrBpiRmTEKLifetime=cwrBpiRmTEKLifetime, cwrBpiRmAuthRsExpires=cwrBpiRmAuthRsExpires, cwrBpiRmAuthRsLifetime=cwrBpiRmAuthRsLifetime, cwrBpiRmTEKEntry=cwrBpiRmTEKEntry, cwrBpiRsTEKGraceTime=cwrBpiRsTEKGraceTime, cwrBpiRmAuthRsReplies=cwrBpiRmAuthRsReplies, cwrBpiRsTEKInvalidErrorString=cwrBpiRsTEKInvalidErrorString, cwrBpiRmTEKExpiresNew=cwrBpiRmTEKExpiresNew, PYSNMP_MODULE_ID=ciscoWirelessP2pBpiMIB, cwrBpiRmObjects=cwrBpiRmObjects, cwrBpiRmAuthTable=cwrBpiRmAuthTable, cwrBpiRmAuthEntry=cwrBpiRmAuthEntry, cwrBpiRsReauthWaitTimeout=cwrBpiRsReauthWaitTimeout, cwrBpiRsAuthReset=cwrBpiRsAuthReset, cwrBpiRsAuthInvalidErrorCode=cwrBpiRsAuthInvalidErrorCode, cwrBpiRsAuthWaitTimeout=cwrBpiRsAuthWaitTimeout, cwrBpiRmAuthRsRequests=cwrBpiRmAuthRsRequests, cwrBpiRsTEKTable=cwrBpiRsTEKTable, cwrBpiRmTEKTable=cwrBpiRmTEKTable, cwrBpiRsTEKExpiresOld=cwrBpiRsTEKExpiresOld, cwrBpiRsObjects=cwrBpiRsObjects, cwrBpiRsAuthInvalids=cwrBpiRsAuthInvalids, cwrBpiRsTEKExpiresNew=cwrBpiRsTEKExpiresNew, cwrBpiRsTEKKeyReplies=cwrBpiRsTEKKeyReplies, cwrBpiRsTEKEntry=cwrBpiRsTEKEntry, cwrBpiRsAuthRequests=cwrBpiRsAuthRequests, cwrBpiRsRekeyWaitTimeout=cwrBpiRsRekeyWaitTimeout, cwrBpiRsTEKState=cwrBpiRsTEKState, cwrBpiRsAuthExpires=cwrBpiRsAuthExpires, cwrBpiRmAuthRsPublicKey=cwrBpiRmAuthRsPublicKey, cwrBpiRmAuthRsReset=cwrBpiRmAuthRsReset, cwrBpiRsTEKAuthPends=cwrBpiRsTEKAuthPends, cwrBpiRsBaseTable=cwrBpiRsBaseTable, cwrBpiRsTEKInvalids=cwrBpiRsTEKInvalids, cwrBpiRmKeyReplies=cwrBpiRmKeyReplies, cwrBpiMIBObjects=cwrBpiMIBObjects, cwrBpiRsAuthKeySequenceNumber=cwrBpiRsAuthKeySequenceNumber, cwrBpiRmTEKInvalidErrorCode=cwrBpiRmTEKInvalidErrorCode, cwrBpiRsAuthState=cwrBpiRsAuthState, cwrBpiRsAuthInvalidErrorString=cwrBpiRsAuthInvalidErrorString, cwrBpiRsAuthReplies=cwrBpiRsAuthReplies, cwrBpiRmAuthRsInvalids=cwrBpiRmAuthRsInvalids, cwrBpiRmTEKReset=cwrBpiRmTEKReset, cwrBpiRsPublicKey=cwrBpiRsPublicKey, cwrBpiRmTEKInvalidErrorString=cwrBpiRmTEKInvalidErrorString, cwrBpiRsTEKKeyRequests=cwrBpiRsTEKKeyRequests, cwrBpiRmAuthInvalidErrorCode=cwrBpiRmAuthInvalidErrorCode, cwrBpiRmKeyRequests=cwrBpiRmKeyRequests, cwrBpiRsGroup=cwrBpiRsGroup, cwrBpiRsAuthGraceTime=cwrBpiRsAuthGraceTime, cwrBpiRmTEKExpiresOld=cwrBpiRmTEKExpiresOld, cwrBpiRsBaseEntry=cwrBpiRsBaseEntry, cwrBpiRmGroup=cwrBpiRmGroup, cwrBpiBasicCompliance=cwrBpiBasicCompliance, cwrBpiRsPrivacyEnable=cwrBpiRsPrivacyEnable, ciscoWirelessP2pBpiMIB=ciscoWirelessP2pBpiMIB, cwrBpiRsTEKEncryptionNegotiated=cwrBpiRsTEKEncryptionNegotiated, cwrBpiRmAuthRsKeySequenceNumber=cwrBpiRmAuthRsKeySequenceNumber, cwrBpiNotification=cwrBpiNotification, cwrBpiRmAuthInvalidErrorString=cwrBpiRmAuthInvalidErrorString, cwrBpiCompliances=cwrBpiCompliances, cwrBpiRmTEKEncryptionNegotiated=cwrBpiRmTEKEncryptionNegotiated)
|
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, value_size_constraint, value_range_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection')
(cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt')
(if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex')
(module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup')
(module_identity, time_ticks, notification_type, mib_identifier, unsigned32, object_identity, ip_address, counter32, bits, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, gauge32, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'ModuleIdentity', 'TimeTicks', 'NotificationType', 'MibIdentifier', 'Unsigned32', 'ObjectIdentity', 'IpAddress', 'Counter32', 'Bits', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'Gauge32', 'Counter64')
(truth_value, time_interval, display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'TimeInterval', 'DisplayString', 'TextualConvention')
cisco_wireless_p2p_bpi_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 135))
if mibBuilder.loadTexts:
ciscoWirelessP2pBpiMIB.setLastUpdated('9905181200Z')
if mibBuilder.loadTexts:
ciscoWirelessP2pBpiMIB.setOrganization('Cisco Systems Inc.')
cwr_bpi_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 135, 1))
cwr_bpi_rs_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1))
cwr_bpi_rs_base_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1))
if mibBuilder.loadTexts:
cwrBpiRsBaseTable.setStatus('current')
cwr_bpi_rs_base_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
cwrBpiRsBaseEntry.setStatus('current')
cwr_bpi_rs_privacy_enable = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 1), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwrBpiRsPrivacyEnable.setStatus('current')
cwr_bpi_rs_public_key = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(0, 126))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsPublicKey.setStatus('current')
cwr_bpi_rs_auth_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('start', 1), ('authWait', 2), ('authorized', 3), ('reauthWait', 4), ('authRejectWait', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsAuthState.setStatus('current')
cwr_bpi_rs_auth_key_sequence_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsAuthKeySequenceNumber.setStatus('current')
cwr_bpi_rs_auth_expires = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 5), time_interval()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsAuthExpires.setStatus('current')
cwr_bpi_rs_auth_reset = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 6), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwrBpiRsAuthReset.setStatus('current')
cwr_bpi_rs_auth_grace_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(1, 1800))).setUnits('seconds').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwrBpiRsAuthGraceTime.setStatus('current')
cwr_bpi_rs_tek_grace_time = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(1, 1800))).setUnits('seconds').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwrBpiRsTEKGraceTime.setStatus('current')
cwr_bpi_rs_auth_wait_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(2, 30))).setUnits('seconds').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwrBpiRsAuthWaitTimeout.setStatus('current')
cwr_bpi_rs_reauth_wait_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(2, 30))).setUnits('seconds').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwrBpiRsReauthWaitTimeout.setStatus('current')
cwr_bpi_rs_op_wait_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(1, 10))).setUnits('seconds').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwrBpiRsOpWaitTimeout.setStatus('current')
cwr_bpi_rs_rekey_wait_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(1, 10))).setUnits('seconds').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwrBpiRsRekeyWaitTimeout.setStatus('current')
cwr_bpi_rs_auth_requests = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsAuthRequests.setStatus('current')
cwr_bpi_rs_auth_replies = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsAuthReplies.setStatus('current')
cwr_bpi_rs_auth_invalids = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 15), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsAuthInvalids.setStatus('current')
cwr_bpi_rs_auth_invalid_error_code = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))).clone(namedValues=named_values(('noInformation', 0), ('unauthorizedSlave', 1), ('undefined', 2), ('unsolicited', 3), ('invalidKeySequence', 4), ('keyRequestAuthenticationFailure', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsAuthInvalidErrorCode.setStatus('current')
cwr_bpi_rs_auth_invalid_error_string = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 1, 1, 17), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsAuthInvalidErrorString.setStatus('current')
cwr_bpi_rs_tek_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2))
if mibBuilder.loadTexts:
cwrBpiRsTEKTable.setStatus('current')
cwr_bpi_rs_tek_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
cwrBpiRsTEKEntry.setStatus('current')
cwr_bpi_rs_tek_encryption_negotiated = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 1), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsTEKEncryptionNegotiated.setStatus('current')
cwr_bpi_rs_tek_state = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('start', 1), ('opWait', 2), ('opReauthWait', 3), ('operational', 4), ('rekeyWait', 5), ('rekeyReauthWait', 6)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsTEKState.setStatus('current')
cwr_bpi_rs_tek_expires_old = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 3), time_interval()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsTEKExpiresOld.setStatus('current')
cwr_bpi_rs_tek_expires_new = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 4), time_interval()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsTEKExpiresNew.setStatus('current')
cwr_bpi_rs_tek_key_requests = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsTEKKeyRequests.setStatus('current')
cwr_bpi_rs_tek_key_replies = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsTEKKeyReplies.setStatus('current')
cwr_bpi_rs_tek_invalids = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsTEKInvalids.setStatus('current')
cwr_bpi_rs_tek_auth_pends = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsTEKAuthPends.setStatus('current')
cwr_bpi_rs_tek_invalid_error_code = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))).clone(namedValues=named_values(('noInformation', 0), ('unauthorizedSlave', 1), ('undefined', 2), ('unsolicited', 3), ('invalidKeySequence', 4), ('keyRequestAuthenticationFailure', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsTEKInvalidErrorCode.setStatus('current')
cwr_bpi_rs_tek_invalid_error_string = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 1, 2, 1, 10), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRsTEKInvalidErrorString.setStatus('current')
cwr_bpi_rm_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2))
cwr_bpi_rm_auth_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1))
if mibBuilder.loadTexts:
cwrBpiRmAuthTable.setStatus('current')
cwr_bpi_rm_auth_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
cwrBpiRmAuthEntry.setStatus('current')
cwr_bpi_rm_auth_privacy_enable = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 1), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwrBpiRmAuthPrivacyEnable.setStatus('current')
cwr_bpi_rm_auth_rs_public_key = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 2), octet_string().subtype(subtypeSpec=value_size_constraint(0, 126))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRmAuthRsPublicKey.setStatus('current')
cwr_bpi_rm_auth_rs_key_sequence_number = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 15))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRmAuthRsKeySequenceNumber.setStatus('current')
cwr_bpi_rm_auth_rs_expires = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 4), time_interval()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRmAuthRsExpires.setStatus('current')
cwr_bpi_rm_auth_rs_lifetime = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 6048000))).setUnits('seconds').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwrBpiRmAuthRsLifetime.setStatus('current')
cwr_bpi_rm_auth_rs_reset = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 6), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwrBpiRmAuthRsReset.setStatus('current')
cwr_bpi_rm_auth_rs_requests = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRmAuthRsRequests.setStatus('current')
cwr_bpi_rm_auth_rs_replies = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRmAuthRsReplies.setStatus('current')
cwr_bpi_rm_auth_rs_invalids = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRmAuthRsInvalids.setStatus('current')
cwr_bpi_rm_auth_invalid_error_code = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))).clone(namedValues=named_values(('noInformation', 0), ('unauthorizedSlave', 1), ('undefined', 2), ('unsolicited', 3), ('invalidKeySequence', 4), ('keyRequestAuthenticationFailure', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRmAuthInvalidErrorCode.setStatus('current')
cwr_bpi_rm_auth_invalid_error_string = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 1, 1, 11), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRmAuthInvalidErrorString.setStatus('current')
cwr_bpi_rm_tek_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2))
if mibBuilder.loadTexts:
cwrBpiRmTEKTable.setStatus('current')
cwr_bpi_rm_tek_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
cwrBpiRmTEKEntry.setStatus('current')
cwr_bpi_rm_tek_encryption_negotiated = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 1), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRmTEKEncryptionNegotiated.setStatus('current')
cwr_bpi_rm_tek_lifetime = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 604800))).setUnits('seconds').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwrBpiRmTEKLifetime.setStatus('current')
cwr_bpi_rm_tek_expires_old = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 3), time_interval()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRmTEKExpiresOld.setStatus('current')
cwr_bpi_rm_tek_expires_new = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 4), time_interval()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRmTEKExpiresNew.setStatus('current')
cwr_bpi_rm_tek_reset = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 5), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwrBpiRmTEKReset.setStatus('current')
cwr_bpi_rm_key_requests = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRmKeyRequests.setStatus('current')
cwr_bpi_rm_key_replies = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRmKeyReplies.setStatus('current')
cwr_bpi_rm_tek_invalids = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRmTEKInvalids.setStatus('current')
cwr_bpi_rm_tek_invalid_error_code = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))).clone(namedValues=named_values(('noInformation', 0), ('unauthorizedSlave', 1), ('undefined', 2), ('unsolicited', 3), ('invalidKeySequence', 4), ('keyRequestAuthenticationFailure', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRmTEKInvalidErrorCode.setStatus('current')
cwr_bpi_rm_tek_invalid_error_string = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 135, 1, 2, 2, 1, 10), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwrBpiRmTEKInvalidErrorString.setStatus('current')
cwr_bpi_notification = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 135, 2))
cwr_bpi_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 135, 3))
cwr_bpi_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 135, 3, 1))
cwr_bpi_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 135, 3, 2))
cwr_bpi_basic_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 135, 3, 1, 1)).setObjects(('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsGroup'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cwr_bpi_basic_compliance = cwrBpiBasicCompliance.setStatus('current')
cwr_bpi_rs_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 135, 3, 2, 1)).setObjects(('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsPrivacyEnable'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsPublicKey'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsAuthState'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsAuthKeySequenceNumber'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsAuthExpires'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsAuthReset'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsAuthGraceTime'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsTEKGraceTime'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsAuthWaitTimeout'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsReauthWaitTimeout'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsOpWaitTimeout'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsRekeyWaitTimeout'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsAuthRequests'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsAuthReplies'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsAuthInvalids'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsAuthInvalidErrorCode'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsAuthInvalidErrorString'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsTEKEncryptionNegotiated'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsTEKState'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsTEKExpiresOld'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsTEKExpiresNew'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsTEKKeyRequests'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsTEKKeyReplies'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsTEKInvalids'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsTEKAuthPends'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsTEKInvalidErrorCode'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRsTEKInvalidErrorString'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cwr_bpi_rs_group = cwrBpiRsGroup.setStatus('current')
cwr_bpi_rm_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 135, 3, 2, 2)).setObjects(('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmAuthPrivacyEnable'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmAuthRsPublicKey'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmAuthRsKeySequenceNumber'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmAuthRsExpires'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmAuthRsLifetime'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmAuthRsReset'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmAuthRsRequests'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmAuthRsReplies'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmAuthRsInvalids'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmAuthInvalidErrorCode'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmAuthInvalidErrorString'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmTEKEncryptionNegotiated'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmTEKLifetime'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmTEKExpiresOld'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmTEKExpiresNew'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmTEKReset'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmKeyRequests'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmKeyReplies'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmTEKInvalids'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmTEKInvalidErrorCode'), ('CISCO-WIRELESS-P2P-BPI-MIB', 'cwrBpiRmTEKInvalidErrorString'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cwr_bpi_rm_group = cwrBpiRmGroup.setStatus('current')
mibBuilder.exportSymbols('CISCO-WIRELESS-P2P-BPI-MIB', cwrBpiRsOpWaitTimeout=cwrBpiRsOpWaitTimeout, cwrBpiRsTEKInvalidErrorCode=cwrBpiRsTEKInvalidErrorCode, cwrBpiRmTEKInvalids=cwrBpiRmTEKInvalids, cwrBpiRmAuthPrivacyEnable=cwrBpiRmAuthPrivacyEnable, cwrBpiGroups=cwrBpiGroups, cwrBpiConformance=cwrBpiConformance, cwrBpiRmTEKLifetime=cwrBpiRmTEKLifetime, cwrBpiRmAuthRsExpires=cwrBpiRmAuthRsExpires, cwrBpiRmAuthRsLifetime=cwrBpiRmAuthRsLifetime, cwrBpiRmTEKEntry=cwrBpiRmTEKEntry, cwrBpiRsTEKGraceTime=cwrBpiRsTEKGraceTime, cwrBpiRmAuthRsReplies=cwrBpiRmAuthRsReplies, cwrBpiRsTEKInvalidErrorString=cwrBpiRsTEKInvalidErrorString, cwrBpiRmTEKExpiresNew=cwrBpiRmTEKExpiresNew, PYSNMP_MODULE_ID=ciscoWirelessP2pBpiMIB, cwrBpiRmObjects=cwrBpiRmObjects, cwrBpiRmAuthTable=cwrBpiRmAuthTable, cwrBpiRmAuthEntry=cwrBpiRmAuthEntry, cwrBpiRsReauthWaitTimeout=cwrBpiRsReauthWaitTimeout, cwrBpiRsAuthReset=cwrBpiRsAuthReset, cwrBpiRsAuthInvalidErrorCode=cwrBpiRsAuthInvalidErrorCode, cwrBpiRsAuthWaitTimeout=cwrBpiRsAuthWaitTimeout, cwrBpiRmAuthRsRequests=cwrBpiRmAuthRsRequests, cwrBpiRsTEKTable=cwrBpiRsTEKTable, cwrBpiRmTEKTable=cwrBpiRmTEKTable, cwrBpiRsTEKExpiresOld=cwrBpiRsTEKExpiresOld, cwrBpiRsObjects=cwrBpiRsObjects, cwrBpiRsAuthInvalids=cwrBpiRsAuthInvalids, cwrBpiRsTEKExpiresNew=cwrBpiRsTEKExpiresNew, cwrBpiRsTEKKeyReplies=cwrBpiRsTEKKeyReplies, cwrBpiRsTEKEntry=cwrBpiRsTEKEntry, cwrBpiRsAuthRequests=cwrBpiRsAuthRequests, cwrBpiRsRekeyWaitTimeout=cwrBpiRsRekeyWaitTimeout, cwrBpiRsTEKState=cwrBpiRsTEKState, cwrBpiRsAuthExpires=cwrBpiRsAuthExpires, cwrBpiRmAuthRsPublicKey=cwrBpiRmAuthRsPublicKey, cwrBpiRmAuthRsReset=cwrBpiRmAuthRsReset, cwrBpiRsTEKAuthPends=cwrBpiRsTEKAuthPends, cwrBpiRsBaseTable=cwrBpiRsBaseTable, cwrBpiRsTEKInvalids=cwrBpiRsTEKInvalids, cwrBpiRmKeyReplies=cwrBpiRmKeyReplies, cwrBpiMIBObjects=cwrBpiMIBObjects, cwrBpiRsAuthKeySequenceNumber=cwrBpiRsAuthKeySequenceNumber, cwrBpiRmTEKInvalidErrorCode=cwrBpiRmTEKInvalidErrorCode, cwrBpiRsAuthState=cwrBpiRsAuthState, cwrBpiRsAuthInvalidErrorString=cwrBpiRsAuthInvalidErrorString, cwrBpiRsAuthReplies=cwrBpiRsAuthReplies, cwrBpiRmAuthRsInvalids=cwrBpiRmAuthRsInvalids, cwrBpiRmTEKReset=cwrBpiRmTEKReset, cwrBpiRsPublicKey=cwrBpiRsPublicKey, cwrBpiRmTEKInvalidErrorString=cwrBpiRmTEKInvalidErrorString, cwrBpiRsTEKKeyRequests=cwrBpiRsTEKKeyRequests, cwrBpiRmAuthInvalidErrorCode=cwrBpiRmAuthInvalidErrorCode, cwrBpiRmKeyRequests=cwrBpiRmKeyRequests, cwrBpiRsGroup=cwrBpiRsGroup, cwrBpiRsAuthGraceTime=cwrBpiRsAuthGraceTime, cwrBpiRmTEKExpiresOld=cwrBpiRmTEKExpiresOld, cwrBpiRsBaseEntry=cwrBpiRsBaseEntry, cwrBpiRmGroup=cwrBpiRmGroup, cwrBpiBasicCompliance=cwrBpiBasicCompliance, cwrBpiRsPrivacyEnable=cwrBpiRsPrivacyEnable, ciscoWirelessP2pBpiMIB=ciscoWirelessP2pBpiMIB, cwrBpiRsTEKEncryptionNegotiated=cwrBpiRsTEKEncryptionNegotiated, cwrBpiRmAuthRsKeySequenceNumber=cwrBpiRmAuthRsKeySequenceNumber, cwrBpiNotification=cwrBpiNotification, cwrBpiRmAuthInvalidErrorString=cwrBpiRmAuthInvalidErrorString, cwrBpiCompliances=cwrBpiCompliances, cwrBpiRmTEKEncryptionNegotiated=cwrBpiRmTEKEncryptionNegotiated)
|
class AverageMeter(object):
"""Computes and stores the average and current value"""
def __init__(self, name, fmt=":f"):
self.name = name
self.fmt = fmt
self.val = 0
self.avg = 0
self.sum = 0
self.count = 0
def update(self, val, n=1):
self.val = val
self.sum += val * n
self.count += n
self.avg = self.sum / self.count
def __str__(self):
fmtstr = "{name} {val" + self.fmt + "} ({avg" + self.fmt + "})"
return fmtstr.format(**self.__dict__)
|
class Averagemeter(object):
"""Computes and stores the average and current value"""
def __init__(self, name, fmt=':f'):
self.name = name
self.fmt = fmt
self.val = 0
self.avg = 0
self.sum = 0
self.count = 0
def update(self, val, n=1):
self.val = val
self.sum += val * n
self.count += n
self.avg = self.sum / self.count
def __str__(self):
fmtstr = '{name} {val' + self.fmt + '} ({avg' + self.fmt + '})'
return fmtstr.format(**self.__dict__)
|
class Solution:
def maximum69Number (self, num: int) -> int:
n = 1000
m = num
#// as it is mentioned constraint as num < 10^4
while m:
if((m//n) == 6):
num += n*3
break
m = m%n
n = n/10
return int(num)
|
class Solution:
def maximum69_number(self, num: int) -> int:
n = 1000
m = num
while m:
if m // n == 6:
num += n * 3
break
m = m % n
n = n / 10
return int(num)
|
class Solution:
def maxDotProduct(self, nums1: List[int], nums2: List[int]) -> int:
# how to fill the table
n1 = len(nums1)
n2 = len(nums2)
dp = [[-math.inf] * (n2 + 1) for _ in range(n1 + 1)]
for i in range(n1 - 1, -1, -1):
for j in range(n2 - 1, -1, -1):
dp[i][j] = max(nums1[i] * nums2[j] + max(0, dp[i + 1][j + 1]), max(dp[i + 1][j], dp[i][j + 1]))
return dp[0][0]
|
class Solution:
def max_dot_product(self, nums1: List[int], nums2: List[int]) -> int:
n1 = len(nums1)
n2 = len(nums2)
dp = [[-math.inf] * (n2 + 1) for _ in range(n1 + 1)]
for i in range(n1 - 1, -1, -1):
for j in range(n2 - 1, -1, -1):
dp[i][j] = max(nums1[i] * nums2[j] + max(0, dp[i + 1][j + 1]), max(dp[i + 1][j], dp[i][j + 1]))
return dp[0][0]
|
#
# PySNMP MIB module ADTRAN-IF-PERF-HISTORY-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ADTRAN-IF-PERF-HISTORY-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:14:54 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)
#
adGenAOSConformance, adGenAOSCommon = mibBuilder.importSymbols("ADTRAN-AOS", "adGenAOSConformance", "adGenAOSCommon")
adIdentity, = mibBuilder.importSymbols("ADTRAN-MIB", "adIdentity")
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ConstraintsIntersection")
HCPerfTotalCount, HCPerfValidIntervals, HCPerfInvalidIntervals, HCPerfCurrentCount, HCPerfIntervalCount, HCPerfTimeElapsed = mibBuilder.importSymbols("HC-PerfHist-TC-MIB", "HCPerfTotalCount", "HCPerfValidIntervals", "HCPerfInvalidIntervals", "HCPerfCurrentCount", "HCPerfIntervalCount", "HCPerfTimeElapsed")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance")
Integer32, ObjectIdentity, IpAddress, Bits, ModuleIdentity, Gauge32, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, iso, TimeTicks, Unsigned32, Counter64, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "ObjectIdentity", "IpAddress", "Bits", "ModuleIdentity", "Gauge32", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "iso", "TimeTicks", "Unsigned32", "Counter64", "NotificationType")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
adGenAosIfPerfHistoryMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 664, 6, 10000, 53, 1, 7))
adGenAosIfPerfHistoryMib.setRevisions(('2013-08-23 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: adGenAosIfPerfHistoryMib.setRevisionsDescriptions(('Initial version',))
if mibBuilder.loadTexts: adGenAosIfPerfHistoryMib.setLastUpdated('201308230000Z')
if mibBuilder.loadTexts: adGenAosIfPerfHistoryMib.setOrganization('ADTRAN Inc.')
if mibBuilder.loadTexts: adGenAosIfPerfHistoryMib.setContactInfo('Info: www.adtran.com Postal: ADTRAN, Inc. 901 Explorer Blvd. Huntsville, AL 35806 Tel: +1 888 423-8726 E-mail: support@adtran.com')
if mibBuilder.loadTexts: adGenAosIfPerfHistoryMib.setDescription('This MIB module defines high capacity performance statistics for interfaces within an AOS product. Copyright (C) ADTRAN, Inc. (2013).')
adGenAosIfPerfHistory = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7))
adIfPhCurTable = MibTable((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1), )
if mibBuilder.loadTexts: adIfPhCurTable.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurTable.setDescription('This table contains current performance history information that has been recorded since the last 15 minute interval ended and from when the last 1 day interval ended. This table is indexed by by ifIndex which SHOULD be maintained in a persistent manner.')
adIfPhCurEntry = MibTableRow((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: adIfPhCurEntry.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurEntry.setDescription("This specifies the information contained in one entry of the adIfPerfHistoryCurTable. It is indexed by an interface's IfIndex.")
adIfPhCurTimeElapsed15Min = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 1), HCPerfTimeElapsed()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurTimeElapsed15Min.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurTimeElapsed15Min.setDescription('Total elapsed seconds in the current 15 minute interval.')
adIfPhCurValidIntervals15Min = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 2), HCPerfValidIntervals()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurValidIntervals15Min.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurValidIntervals15Min.setDescription('Number of valid 15 minute intervals over the last 24 hours.')
adIfPhCurInvalidIntervals15Min = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 3), HCPerfInvalidIntervals()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurInvalidIntervals15Min.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurInvalidIntervals15Min.setDescription('Number of invalid 15 minute intervals over the last 24 hours.')
adIfPhCurInOctets15Min = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 4), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurInOctets15Min.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurInOctets15Min.setDescription('Count of octets received in the current 15 minute interval.')
adIfPhCurInUcastPkts15Min = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 5), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurInUcastPkts15Min.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurInUcastPkts15Min.setDescription('Count of unicast packets received in the current 15 minute interval.')
adIfPhCurInMcastPkts15Min = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 6), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurInMcastPkts15Min.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurInMcastPkts15Min.setDescription('Count of multicast packets received in the current 15 minute interval.')
adIfPhCurInBcastPkts15Min = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 7), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurInBcastPkts15Min.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurInBcastPkts15Min.setDescription('Count of broadcast packets received in the current 15 minute interval.')
adIfPhCurInDiscards15Min = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 8), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurInDiscards15Min.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurInDiscards15Min.setDescription('Count of inbound packets discarded in the current 15 minute interval.')
adIfPhCurInErrors15Min = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 9), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurInErrors15Min.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurInErrors15Min.setDescription('Count of inbound packets containing errors in the current 15 minute interval.')
adIfPhCurInUnknownProtos15Min = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 10), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurInUnknownProtos15Min.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurInUnknownProtos15Min.setDescription('Count of inbound packets with an unknown or unsupported protocol in the current 15 minute interval.')
adIfPhCurOutOctets15Min = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 11), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurOutOctets15Min.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurOutOctets15Min.setDescription('Count of octets transmitted in the current 15 minute interval.')
adIfPhCurOutUcastPkts15Min = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 12), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurOutUcastPkts15Min.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurOutUcastPkts15Min.setDescription('Count of transmitted unicast packets in the current 15 minute interval.')
adIfPhCurOutMcastPkts15Min = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 13), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurOutMcastPkts15Min.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurOutMcastPkts15Min.setDescription('Count of transmitted multicast packets in the current 15 minute interval.')
adIfPhCurOutBcastPkts15Min = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 14), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurOutBcastPkts15Min.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurOutBcastPkts15Min.setDescription('Count of transmitted broadcast packets in the current 15 minute interval.')
adIfPhCurOutDiscards15Min = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 15), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurOutDiscards15Min.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurOutDiscards15Min.setDescription('Count of discarded outbound packets in the current 15 minute interval.')
adIfPhCurOutErrors15Min = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 16), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurOutErrors15Min.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurOutErrors15Min.setDescription('Count of outbound packets that could not be transmitted due to error in the current 15 minute interval.')
adIfPhCurTimeElapsed1Day = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 17), HCPerfTimeElapsed()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurTimeElapsed1Day.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurTimeElapsed1Day.setDescription('Total elapsed seconds in the current 1 day interval.')
adIfPhCurValidIntervals1Day = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 18), HCPerfValidIntervals()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurValidIntervals1Day.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurValidIntervals1Day.setDescription('Number of valid 1 day intervals available.')
adIfPhCurInvalidIntervals1Day = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 19), HCPerfInvalidIntervals()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurInvalidIntervals1Day.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurInvalidIntervals1Day.setDescription('Number of invalid 1 day intervals available.')
adIfPhCurInOctets1Day = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 20), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurInOctets1Day.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurInOctets1Day.setDescription('Count of octets received in the current 1 day interval.')
adIfPhCurInUcastPkts1Day = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 21), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurInUcastPkts1Day.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurInUcastPkts1Day.setDescription('Count of unicast packets received in the current 1 day interval.')
adIfPhCurInMcastPkts1Day = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 22), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurInMcastPkts1Day.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurInMcastPkts1Day.setDescription('Count of multicast packets received in the current 1 day interval.')
adIfPhCurInBcastPkts1Day = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 23), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurInBcastPkts1Day.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurInBcastPkts1Day.setDescription('Count of broadcast packets received in the current 1 day interval.')
adIfPhCurInDiscards1Day = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 24), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurInDiscards1Day.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurInDiscards1Day.setDescription('Count of inbound packets discarded in the current 1 day interval.')
adIfPhCurInErrors1Day = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 25), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurInErrors1Day.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurInErrors1Day.setDescription('Count of inbound packets containing errors in the current 1 day interval.')
adIfPhCurInUnknownProtos1Day = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 26), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurInUnknownProtos1Day.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurInUnknownProtos1Day.setDescription('Count of inbound packets with an unknown or unsupported protocol in the current 1 day interval.')
adIfPhCurOutOctets1Day = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 27), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurOutOctets1Day.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurOutOctets1Day.setDescription('Count of octets transmitted in the current 1 day interval.')
adIfPhCurOutUcastPkts1Day = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 28), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurOutUcastPkts1Day.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurOutUcastPkts1Day.setDescription('Count of transmitted unicast packets in the current 1 day interval.')
adIfPhCurOutMcastPkts1Day = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 29), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurOutMcastPkts1Day.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurOutMcastPkts1Day.setDescription('Count of transmitted multicast packets in the current 1 day interval.')
adIfPhCurOutBcastPkts1Day = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 30), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurOutBcastPkts1Day.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurOutBcastPkts1Day.setDescription('Count of transmitted broadcast packets in the current 1 day interval.')
adIfPhCurOutDiscards1Day = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 31), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurOutDiscards1Day.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurOutDiscards1Day.setDescription('Count of discarded outbound packets in the current 1 day interval.')
adIfPhCurOutErrors1Day = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 32), HCPerfCurrentCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPhCurOutErrors1Day.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurOutErrors1Day.setDescription('Count of outbound packets that could not be transmitted due to error in the current 1 day interval.')
adIfPh15MinIntervalTable = MibTable((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2), )
if mibBuilder.loadTexts: adIfPh15MinIntervalTable.setStatus('current')
if mibBuilder.loadTexts: adIfPh15MinIntervalTable.setDescription('This table contains performance history information for each valid 15 minute interval. This table is indexed by by ifIndex and the interval number.')
adIfPh15MinIntervalEntry = MibTableRow((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh15MinIntervalNumber"))
if mibBuilder.loadTexts: adIfPh15MinIntervalEntry.setStatus('current')
if mibBuilder.loadTexts: adIfPh15MinIntervalEntry.setDescription('An entry in the adIfPh15MinIntervalTable.')
adIfPh15MinIntervalNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 96)))
if mibBuilder.loadTexts: adIfPh15MinIntervalNumber.setStatus('current')
if mibBuilder.loadTexts: adIfPh15MinIntervalNumber.setDescription('Performance history interval number. Interval 1 is the most recent previous interval; interval 96 is 24 hours ago. Intervals 2..96 are optional.')
adIfPh15MinInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 2), HCPerfIntervalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh15MinInOctets.setStatus('current')
if mibBuilder.loadTexts: adIfPh15MinInOctets.setDescription('Count of octets received in the 15 minute interval.')
adIfPh15MinInUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 3), HCPerfIntervalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh15MinInUcastPkts.setStatus('current')
if mibBuilder.loadTexts: adIfPh15MinInUcastPkts.setDescription('Count of unicast packets received in the 15 minute interval.')
adIfPh15MinInMcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 4), HCPerfIntervalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh15MinInMcastPkts.setStatus('current')
if mibBuilder.loadTexts: adIfPh15MinInMcastPkts.setDescription('Count of multicast packets received in the 15 minute interval.')
adIfPh15MinInBcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 5), HCPerfIntervalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh15MinInBcastPkts.setStatus('current')
if mibBuilder.loadTexts: adIfPh15MinInBcastPkts.setDescription('Count of broadcast packets received in the 15 minute interval.')
adIfPh15MinInDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 6), HCPerfIntervalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh15MinInDiscards.setStatus('current')
if mibBuilder.loadTexts: adIfPh15MinInDiscards.setDescription('Count of inbound packets discarded in the 15 minute interval.')
adIfPh15MinInErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 7), HCPerfIntervalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh15MinInErrors.setStatus('current')
if mibBuilder.loadTexts: adIfPh15MinInErrors.setDescription('Count of inbound packets containing errors in the 15 minute interval.')
adIfPh15MinInUnknownProtos = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 8), HCPerfIntervalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh15MinInUnknownProtos.setStatus('current')
if mibBuilder.loadTexts: adIfPh15MinInUnknownProtos.setDescription('Count of inbound packets with an unknown or unsupported protocol in the 15 minute interval.')
adIfPh15MinOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 9), HCPerfIntervalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh15MinOutOctets.setStatus('current')
if mibBuilder.loadTexts: adIfPh15MinOutOctets.setDescription('Count of octets transmitted in the 15 minute interval.')
adIfPh15MinOutUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 10), HCPerfIntervalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh15MinOutUcastPkts.setStatus('current')
if mibBuilder.loadTexts: adIfPh15MinOutUcastPkts.setDescription('Count of transmitted unicast packets in the 15 minute interval.')
adIfPh15MinOutMcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 11), HCPerfIntervalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh15MinOutMcastPkts.setStatus('current')
if mibBuilder.loadTexts: adIfPh15MinOutMcastPkts.setDescription('Count of transmitted multicast packets in the 15 minute interval.')
adIfPh15MinOutBcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 12), HCPerfIntervalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh15MinOutBcastPkts.setStatus('current')
if mibBuilder.loadTexts: adIfPh15MinOutBcastPkts.setDescription('Count of transmitted broadcast packets in the 15 minute interval.')
adIfPh15MinOutDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 13), HCPerfIntervalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh15MinOutDiscards.setStatus('current')
if mibBuilder.loadTexts: adIfPh15MinOutDiscards.setDescription('Count of discarded outbound packets in the 15 minute interval.')
adIfPh15MinOutErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 14), HCPerfIntervalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh15MinOutErrors.setStatus('current')
if mibBuilder.loadTexts: adIfPh15MinOutErrors.setDescription('Count of outbound packets that could not be transmitted due to error in the 15 minute interval.')
adIfPh1DayIntervalTable = MibTable((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3), )
if mibBuilder.loadTexts: adIfPh1DayIntervalTable.setStatus('current')
if mibBuilder.loadTexts: adIfPh1DayIntervalTable.setDescription('This table contains performance history information for each valid 1 day interval. This table is indexed by by ifIndex and the interval number.')
adIfPh1DayIntervalEntry = MibTableRow((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh1DayIntervalNumber"))
if mibBuilder.loadTexts: adIfPh1DayIntervalEntry.setStatus('current')
if mibBuilder.loadTexts: adIfPh1DayIntervalEntry.setDescription('An entry in the adIfPh1DayIntervalTable.')
adIfPh1DayIntervalNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 30)))
if mibBuilder.loadTexts: adIfPh1DayIntervalNumber.setStatus('current')
if mibBuilder.loadTexts: adIfPh1DayIntervalNumber.setDescription('Performance history interval number. Interval 1 is the most recent previous day; interval 7 is 7 days ago. Intervals 2..30 are optional.')
adIfPh1DayInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 2), HCPerfTotalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh1DayInOctets.setStatus('current')
if mibBuilder.loadTexts: adIfPh1DayInOctets.setDescription('Count of octets received in the 1 day interval.')
adIfPh1DayInUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 3), HCPerfTotalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh1DayInUcastPkts.setStatus('current')
if mibBuilder.loadTexts: adIfPh1DayInUcastPkts.setDescription('Count of unicast packets received in the 1 day interval.')
adIfPh1DayInMcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 4), HCPerfTotalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh1DayInMcastPkts.setStatus('current')
if mibBuilder.loadTexts: adIfPh1DayInMcastPkts.setDescription('Count of multicast packets received in the 1 day interval.')
adIfPh1DayInBcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 5), HCPerfTotalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh1DayInBcastPkts.setStatus('current')
if mibBuilder.loadTexts: adIfPh1DayInBcastPkts.setDescription('Count of broadcast packets received in the 1 day interval.')
adIfPh1DayInDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 6), HCPerfTotalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh1DayInDiscards.setStatus('current')
if mibBuilder.loadTexts: adIfPh1DayInDiscards.setDescription('Count of inbound packets discarded in the 1 day interval.')
adIfPh1DayInErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 7), HCPerfTotalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh1DayInErrors.setStatus('current')
if mibBuilder.loadTexts: adIfPh1DayInErrors.setDescription('Count of inbound packets containing errors in the 1 day interval.')
adIfPh1DayInUnknownProtos = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 8), HCPerfTotalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh1DayInUnknownProtos.setStatus('current')
if mibBuilder.loadTexts: adIfPh1DayInUnknownProtos.setDescription('Count of inbound packets with an unknown or unsupported protocol in the 1 day interval.')
adIfPh1DayOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 9), HCPerfTotalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh1DayOutOctets.setStatus('current')
if mibBuilder.loadTexts: adIfPh1DayOutOctets.setDescription('Count of octets transmitted in the 1 day interval.')
adIfPh1DayOutUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 10), HCPerfTotalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh1DayOutUcastPkts.setStatus('current')
if mibBuilder.loadTexts: adIfPh1DayOutUcastPkts.setDescription('Count of transmitted unicast packets in the 1 day interval.')
adIfPh1DayOutMcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 11), HCPerfTotalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh1DayOutMcastPkts.setStatus('current')
if mibBuilder.loadTexts: adIfPh1DayOutMcastPkts.setDescription('Count of transmitted multicast packets in the 1 day interval.')
adIfPh1DayOutBcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 12), HCPerfTotalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh1DayOutBcastPkts.setStatus('current')
if mibBuilder.loadTexts: adIfPh1DayOutBcastPkts.setDescription('Count of transmitted broadcast packets in the 1 day interval.')
adIfPh1DayOutDiscards = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 13), HCPerfTotalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh1DayOutDiscards.setStatus('current')
if mibBuilder.loadTexts: adIfPh1DayOutDiscards.setDescription('Count of discarded outbound packets in the 1 day interval.')
adIfPh1DayOutErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 14), HCPerfTotalCount()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adIfPh1DayOutErrors.setStatus('current')
if mibBuilder.loadTexts: adIfPh1DayOutErrors.setDescription('Count of outbound packets that could not be transmitted due to error in the 1 day interval.')
adGenAosIfPerfHistoryConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 16))
adGenAosIfPerfHistoryGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 16, 1))
adGenAosIfPerfHistoryCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 16, 2))
adGenAosIfPerfHistoryCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 16, 2, 1)).setObjects(("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurGroup"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh15MinIntervalGroup"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh1DayIntervalGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
adGenAosIfPerfHistoryCompliance = adGenAosIfPerfHistoryCompliance.setStatus('current')
if mibBuilder.loadTexts: adGenAosIfPerfHistoryCompliance.setDescription('The compliance statement for SNMPv2 entities which implement interface performance history.')
adIfPhCurGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 16, 1, 1)).setObjects(("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurTimeElapsed15Min"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurValidIntervals15Min"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurInvalidIntervals15Min"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurInOctets15Min"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurInUcastPkts15Min"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurInMcastPkts15Min"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurInBcastPkts15Min"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurInDiscards15Min"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurInErrors15Min"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurInUnknownProtos15Min"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurOutOctets15Min"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurOutUcastPkts15Min"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurOutMcastPkts15Min"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurOutBcastPkts15Min"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurOutDiscards15Min"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurOutErrors15Min"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurTimeElapsed1Day"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurValidIntervals1Day"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurInvalidIntervals1Day"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurInOctets1Day"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurInUcastPkts1Day"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurInMcastPkts1Day"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurInBcastPkts1Day"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurInDiscards1Day"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurInErrors1Day"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurInUnknownProtos1Day"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurOutOctets1Day"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurOutUcastPkts1Day"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurOutMcastPkts1Day"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurOutBcastPkts1Day"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurOutDiscards1Day"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPhCurOutErrors1Day"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
adIfPhCurGroup = adIfPhCurGroup.setStatus('current')
if mibBuilder.loadTexts: adIfPhCurGroup.setDescription('The Current Group.')
adIfPh15MinIntervalGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 16, 1, 2)).setObjects(("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh15MinInOctets"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh15MinInUcastPkts"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh15MinInMcastPkts"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh15MinInBcastPkts"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh15MinInDiscards"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh15MinInErrors"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh15MinInUnknownProtos"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh15MinOutOctets"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh15MinOutUcastPkts"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh15MinOutMcastPkts"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh15MinOutBcastPkts"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh15MinOutDiscards"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh15MinOutErrors"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
adIfPh15MinIntervalGroup = adIfPh15MinIntervalGroup.setStatus('current')
if mibBuilder.loadTexts: adIfPh15MinIntervalGroup.setDescription('The 15 minute interval group.')
adIfPh1DayIntervalGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 16, 1, 3)).setObjects(("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh1DayInOctets"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh1DayInUcastPkts"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh1DayInMcastPkts"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh1DayInBcastPkts"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh1DayInDiscards"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh1DayInErrors"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh1DayInUnknownProtos"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh1DayOutOctets"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh1DayOutUcastPkts"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh1DayOutMcastPkts"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh1DayOutBcastPkts"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh1DayOutDiscards"), ("ADTRAN-IF-PERF-HISTORY-MIB", "adIfPh1DayOutErrors"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
adIfPh1DayIntervalGroup = adIfPh1DayIntervalGroup.setStatus('current')
if mibBuilder.loadTexts: adIfPh1DayIntervalGroup.setDescription('The 1 day interval group.')
mibBuilder.exportSymbols("ADTRAN-IF-PERF-HISTORY-MIB", adIfPh15MinInBcastPkts=adIfPh15MinInBcastPkts, adIfPhCurInvalidIntervals1Day=adIfPhCurInvalidIntervals1Day, adIfPh15MinIntervalNumber=adIfPh15MinIntervalNumber, adIfPh15MinIntervalTable=adIfPh15MinIntervalTable, adIfPhCurOutMcastPkts15Min=adIfPhCurOutMcastPkts15Min, adIfPhCurOutDiscards15Min=adIfPhCurOutDiscards15Min, adIfPhCurOutUcastPkts15Min=adIfPhCurOutUcastPkts15Min, adIfPh1DayInDiscards=adIfPh1DayInDiscards, adGenAosIfPerfHistory=adGenAosIfPerfHistory, adIfPh1DayInErrors=adIfPh1DayInErrors, adIfPhCurInUcastPkts1Day=adIfPhCurInUcastPkts1Day, adIfPhCurInMcastPkts15Min=adIfPhCurInMcastPkts15Min, adIfPhCurInUnknownProtos1Day=adIfPhCurInUnknownProtos1Day, adIfPh15MinInUcastPkts=adIfPh15MinInUcastPkts, adIfPh1DayIntervalNumber=adIfPh1DayIntervalNumber, adIfPh15MinInMcastPkts=adIfPh15MinInMcastPkts, adIfPhCurOutOctets1Day=adIfPhCurOutOctets1Day, adIfPhCurInUcastPkts15Min=adIfPhCurInUcastPkts15Min, adIfPhCurInUnknownProtos15Min=adIfPhCurInUnknownProtos15Min, adIfPh1DayInBcastPkts=adIfPh1DayInBcastPkts, adIfPhCurInBcastPkts15Min=adIfPhCurInBcastPkts15Min, adIfPhCurInErrors15Min=adIfPhCurInErrors15Min, adIfPhCurOutOctets15Min=adIfPhCurOutOctets15Min, adIfPhCurOutMcastPkts1Day=adIfPhCurOutMcastPkts1Day, adIfPhCurInvalidIntervals15Min=adIfPhCurInvalidIntervals15Min, adIfPh15MinIntervalEntry=adIfPh15MinIntervalEntry, adIfPhCurOutDiscards1Day=adIfPhCurOutDiscards1Day, adIfPh15MinInUnknownProtos=adIfPh15MinInUnknownProtos, adIfPhCurInDiscards15Min=adIfPhCurInDiscards15Min, adIfPh1DayIntervalEntry=adIfPh1DayIntervalEntry, adIfPhCurInErrors1Day=adIfPhCurInErrors1Day, adIfPhCurInDiscards1Day=adIfPhCurInDiscards1Day, adIfPh15MinInOctets=adIfPh15MinInOctets, adIfPhCurOutBcastPkts15Min=adIfPhCurOutBcastPkts15Min, adIfPh15MinInDiscards=adIfPh15MinInDiscards, adIfPhCurOutErrors15Min=adIfPhCurOutErrors15Min, adIfPhCurValidIntervals15Min=adIfPhCurValidIntervals15Min, adIfPh1DayOutBcastPkts=adIfPh1DayOutBcastPkts, adGenAosIfPerfHistoryCompliance=adGenAosIfPerfHistoryCompliance, adIfPh15MinOutOctets=adIfPh15MinOutOctets, adGenAosIfPerfHistoryConformance=adGenAosIfPerfHistoryConformance, adIfPh1DayIntervalTable=adIfPh1DayIntervalTable, adIfPh15MinIntervalGroup=adIfPh15MinIntervalGroup, adIfPh15MinOutUcastPkts=adIfPh15MinOutUcastPkts, adIfPh1DayInMcastPkts=adIfPh1DayInMcastPkts, adIfPhCurTable=adIfPhCurTable, adIfPh1DayInUcastPkts=adIfPh1DayInUcastPkts, adGenAosIfPerfHistoryMib=adGenAosIfPerfHistoryMib, adIfPhCurTimeElapsed15Min=adIfPhCurTimeElapsed15Min, adIfPhCurValidIntervals1Day=adIfPhCurValidIntervals1Day, adIfPhCurInBcastPkts1Day=adIfPhCurInBcastPkts1Day, adIfPh15MinOutDiscards=adIfPh15MinOutDiscards, PYSNMP_MODULE_ID=adGenAosIfPerfHistoryMib, adIfPhCurEntry=adIfPhCurEntry, adIfPh1DayOutOctets=adIfPh1DayOutOctets, adIfPh1DayOutErrors=adIfPh1DayOutErrors, adIfPh1DayOutUcastPkts=adIfPh1DayOutUcastPkts, adIfPhCurInOctets15Min=adIfPhCurInOctets15Min, adIfPh1DayInOctets=adIfPh1DayInOctets, adIfPh1DayInUnknownProtos=adIfPh1DayInUnknownProtos, adIfPhCurOutUcastPkts1Day=adIfPhCurOutUcastPkts1Day, adIfPh1DayOutMcastPkts=adIfPh1DayOutMcastPkts, adGenAosIfPerfHistoryCompliances=adGenAosIfPerfHistoryCompliances, adIfPhCurInMcastPkts1Day=adIfPhCurInMcastPkts1Day, adGenAosIfPerfHistoryGroups=adGenAosIfPerfHistoryGroups, adIfPhCurGroup=adIfPhCurGroup, adIfPhCurOutBcastPkts1Day=adIfPhCurOutBcastPkts1Day, adIfPh15MinOutMcastPkts=adIfPh15MinOutMcastPkts, adIfPhCurTimeElapsed1Day=adIfPhCurTimeElapsed1Day, adIfPh1DayOutDiscards=adIfPh1DayOutDiscards, adIfPh1DayIntervalGroup=adIfPh1DayIntervalGroup, adIfPhCurOutErrors1Day=adIfPhCurOutErrors1Day, adIfPh15MinOutBcastPkts=adIfPh15MinOutBcastPkts, adIfPh15MinOutErrors=adIfPh15MinOutErrors, adIfPh15MinInErrors=adIfPh15MinInErrors, adIfPhCurInOctets1Day=adIfPhCurInOctets1Day)
|
(ad_gen_aos_conformance, ad_gen_aos_common) = mibBuilder.importSymbols('ADTRAN-AOS', 'adGenAOSConformance', 'adGenAOSCommon')
(ad_identity,) = mibBuilder.importSymbols('ADTRAN-MIB', 'adIdentity')
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, value_range_constraint, value_size_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection')
(hc_perf_total_count, hc_perf_valid_intervals, hc_perf_invalid_intervals, hc_perf_current_count, hc_perf_interval_count, hc_perf_time_elapsed) = mibBuilder.importSymbols('HC-PerfHist-TC-MIB', 'HCPerfTotalCount', 'HCPerfValidIntervals', 'HCPerfInvalidIntervals', 'HCPerfCurrentCount', 'HCPerfIntervalCount', 'HCPerfTimeElapsed')
(if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex')
(notification_group, object_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ObjectGroup', 'ModuleCompliance')
(integer32, object_identity, ip_address, bits, module_identity, gauge32, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, iso, time_ticks, unsigned32, counter64, notification_type) = mibBuilder.importSymbols('SNMPv2-SMI', 'Integer32', 'ObjectIdentity', 'IpAddress', 'Bits', 'ModuleIdentity', 'Gauge32', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'iso', 'TimeTicks', 'Unsigned32', 'Counter64', 'NotificationType')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
ad_gen_aos_if_perf_history_mib = module_identity((1, 3, 6, 1, 4, 1, 664, 6, 10000, 53, 1, 7))
adGenAosIfPerfHistoryMib.setRevisions(('2013-08-23 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
adGenAosIfPerfHistoryMib.setRevisionsDescriptions(('Initial version',))
if mibBuilder.loadTexts:
adGenAosIfPerfHistoryMib.setLastUpdated('201308230000Z')
if mibBuilder.loadTexts:
adGenAosIfPerfHistoryMib.setOrganization('ADTRAN Inc.')
if mibBuilder.loadTexts:
adGenAosIfPerfHistoryMib.setContactInfo('Info: www.adtran.com Postal: ADTRAN, Inc. 901 Explorer Blvd. Huntsville, AL 35806 Tel: +1 888 423-8726 E-mail: support@adtran.com')
if mibBuilder.loadTexts:
adGenAosIfPerfHistoryMib.setDescription('This MIB module defines high capacity performance statistics for interfaces within an AOS product. Copyright (C) ADTRAN, Inc. (2013).')
ad_gen_aos_if_perf_history = mib_identifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7))
ad_if_ph_cur_table = mib_table((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1))
if mibBuilder.loadTexts:
adIfPhCurTable.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurTable.setDescription('This table contains current performance history information that has been recorded since the last 15 minute interval ended and from when the last 1 day interval ended. This table is indexed by by ifIndex which SHOULD be maintained in a persistent manner.')
ad_if_ph_cur_entry = mib_table_row((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
adIfPhCurEntry.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurEntry.setDescription("This specifies the information contained in one entry of the adIfPerfHistoryCurTable. It is indexed by an interface's IfIndex.")
ad_if_ph_cur_time_elapsed15_min = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 1), hc_perf_time_elapsed()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurTimeElapsed15Min.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurTimeElapsed15Min.setDescription('Total elapsed seconds in the current 15 minute interval.')
ad_if_ph_cur_valid_intervals15_min = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 2), hc_perf_valid_intervals()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurValidIntervals15Min.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurValidIntervals15Min.setDescription('Number of valid 15 minute intervals over the last 24 hours.')
ad_if_ph_cur_invalid_intervals15_min = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 3), hc_perf_invalid_intervals()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurInvalidIntervals15Min.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurInvalidIntervals15Min.setDescription('Number of invalid 15 minute intervals over the last 24 hours.')
ad_if_ph_cur_in_octets15_min = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 4), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurInOctets15Min.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurInOctets15Min.setDescription('Count of octets received in the current 15 minute interval.')
ad_if_ph_cur_in_ucast_pkts15_min = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 5), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurInUcastPkts15Min.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurInUcastPkts15Min.setDescription('Count of unicast packets received in the current 15 minute interval.')
ad_if_ph_cur_in_mcast_pkts15_min = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 6), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurInMcastPkts15Min.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurInMcastPkts15Min.setDescription('Count of multicast packets received in the current 15 minute interval.')
ad_if_ph_cur_in_bcast_pkts15_min = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 7), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurInBcastPkts15Min.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurInBcastPkts15Min.setDescription('Count of broadcast packets received in the current 15 minute interval.')
ad_if_ph_cur_in_discards15_min = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 8), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurInDiscards15Min.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurInDiscards15Min.setDescription('Count of inbound packets discarded in the current 15 minute interval.')
ad_if_ph_cur_in_errors15_min = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 9), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurInErrors15Min.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurInErrors15Min.setDescription('Count of inbound packets containing errors in the current 15 minute interval.')
ad_if_ph_cur_in_unknown_protos15_min = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 10), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurInUnknownProtos15Min.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurInUnknownProtos15Min.setDescription('Count of inbound packets with an unknown or unsupported protocol in the current 15 minute interval.')
ad_if_ph_cur_out_octets15_min = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 11), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurOutOctets15Min.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurOutOctets15Min.setDescription('Count of octets transmitted in the current 15 minute interval.')
ad_if_ph_cur_out_ucast_pkts15_min = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 12), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurOutUcastPkts15Min.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurOutUcastPkts15Min.setDescription('Count of transmitted unicast packets in the current 15 minute interval.')
ad_if_ph_cur_out_mcast_pkts15_min = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 13), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurOutMcastPkts15Min.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurOutMcastPkts15Min.setDescription('Count of transmitted multicast packets in the current 15 minute interval.')
ad_if_ph_cur_out_bcast_pkts15_min = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 14), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurOutBcastPkts15Min.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurOutBcastPkts15Min.setDescription('Count of transmitted broadcast packets in the current 15 minute interval.')
ad_if_ph_cur_out_discards15_min = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 15), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurOutDiscards15Min.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurOutDiscards15Min.setDescription('Count of discarded outbound packets in the current 15 minute interval.')
ad_if_ph_cur_out_errors15_min = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 16), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurOutErrors15Min.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurOutErrors15Min.setDescription('Count of outbound packets that could not be transmitted due to error in the current 15 minute interval.')
ad_if_ph_cur_time_elapsed1_day = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 17), hc_perf_time_elapsed()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurTimeElapsed1Day.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurTimeElapsed1Day.setDescription('Total elapsed seconds in the current 1 day interval.')
ad_if_ph_cur_valid_intervals1_day = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 18), hc_perf_valid_intervals()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurValidIntervals1Day.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurValidIntervals1Day.setDescription('Number of valid 1 day intervals available.')
ad_if_ph_cur_invalid_intervals1_day = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 19), hc_perf_invalid_intervals()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurInvalidIntervals1Day.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurInvalidIntervals1Day.setDescription('Number of invalid 1 day intervals available.')
ad_if_ph_cur_in_octets1_day = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 20), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurInOctets1Day.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurInOctets1Day.setDescription('Count of octets received in the current 1 day interval.')
ad_if_ph_cur_in_ucast_pkts1_day = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 21), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurInUcastPkts1Day.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurInUcastPkts1Day.setDescription('Count of unicast packets received in the current 1 day interval.')
ad_if_ph_cur_in_mcast_pkts1_day = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 22), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurInMcastPkts1Day.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurInMcastPkts1Day.setDescription('Count of multicast packets received in the current 1 day interval.')
ad_if_ph_cur_in_bcast_pkts1_day = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 23), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurInBcastPkts1Day.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurInBcastPkts1Day.setDescription('Count of broadcast packets received in the current 1 day interval.')
ad_if_ph_cur_in_discards1_day = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 24), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurInDiscards1Day.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurInDiscards1Day.setDescription('Count of inbound packets discarded in the current 1 day interval.')
ad_if_ph_cur_in_errors1_day = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 25), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurInErrors1Day.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurInErrors1Day.setDescription('Count of inbound packets containing errors in the current 1 day interval.')
ad_if_ph_cur_in_unknown_protos1_day = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 26), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurInUnknownProtos1Day.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurInUnknownProtos1Day.setDescription('Count of inbound packets with an unknown or unsupported protocol in the current 1 day interval.')
ad_if_ph_cur_out_octets1_day = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 27), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurOutOctets1Day.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurOutOctets1Day.setDescription('Count of octets transmitted in the current 1 day interval.')
ad_if_ph_cur_out_ucast_pkts1_day = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 28), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurOutUcastPkts1Day.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurOutUcastPkts1Day.setDescription('Count of transmitted unicast packets in the current 1 day interval.')
ad_if_ph_cur_out_mcast_pkts1_day = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 29), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurOutMcastPkts1Day.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurOutMcastPkts1Day.setDescription('Count of transmitted multicast packets in the current 1 day interval.')
ad_if_ph_cur_out_bcast_pkts1_day = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 30), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurOutBcastPkts1Day.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurOutBcastPkts1Day.setDescription('Count of transmitted broadcast packets in the current 1 day interval.')
ad_if_ph_cur_out_discards1_day = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 31), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurOutDiscards1Day.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurOutDiscards1Day.setDescription('Count of discarded outbound packets in the current 1 day interval.')
ad_if_ph_cur_out_errors1_day = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 1, 1, 32), hc_perf_current_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPhCurOutErrors1Day.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurOutErrors1Day.setDescription('Count of outbound packets that could not be transmitted due to error in the current 1 day interval.')
ad_if_ph15_min_interval_table = mib_table((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2))
if mibBuilder.loadTexts:
adIfPh15MinIntervalTable.setStatus('current')
if mibBuilder.loadTexts:
adIfPh15MinIntervalTable.setDescription('This table contains performance history information for each valid 15 minute interval. This table is indexed by by ifIndex and the interval number.')
ad_if_ph15_min_interval_entry = mib_table_row((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh15MinIntervalNumber'))
if mibBuilder.loadTexts:
adIfPh15MinIntervalEntry.setStatus('current')
if mibBuilder.loadTexts:
adIfPh15MinIntervalEntry.setDescription('An entry in the adIfPh15MinIntervalTable.')
ad_if_ph15_min_interval_number = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 96)))
if mibBuilder.loadTexts:
adIfPh15MinIntervalNumber.setStatus('current')
if mibBuilder.loadTexts:
adIfPh15MinIntervalNumber.setDescription('Performance history interval number. Interval 1 is the most recent previous interval; interval 96 is 24 hours ago. Intervals 2..96 are optional.')
ad_if_ph15_min_in_octets = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 2), hc_perf_interval_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh15MinInOctets.setStatus('current')
if mibBuilder.loadTexts:
adIfPh15MinInOctets.setDescription('Count of octets received in the 15 minute interval.')
ad_if_ph15_min_in_ucast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 3), hc_perf_interval_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh15MinInUcastPkts.setStatus('current')
if mibBuilder.loadTexts:
adIfPh15MinInUcastPkts.setDescription('Count of unicast packets received in the 15 minute interval.')
ad_if_ph15_min_in_mcast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 4), hc_perf_interval_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh15MinInMcastPkts.setStatus('current')
if mibBuilder.loadTexts:
adIfPh15MinInMcastPkts.setDescription('Count of multicast packets received in the 15 minute interval.')
ad_if_ph15_min_in_bcast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 5), hc_perf_interval_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh15MinInBcastPkts.setStatus('current')
if mibBuilder.loadTexts:
adIfPh15MinInBcastPkts.setDescription('Count of broadcast packets received in the 15 minute interval.')
ad_if_ph15_min_in_discards = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 6), hc_perf_interval_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh15MinInDiscards.setStatus('current')
if mibBuilder.loadTexts:
adIfPh15MinInDiscards.setDescription('Count of inbound packets discarded in the 15 minute interval.')
ad_if_ph15_min_in_errors = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 7), hc_perf_interval_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh15MinInErrors.setStatus('current')
if mibBuilder.loadTexts:
adIfPh15MinInErrors.setDescription('Count of inbound packets containing errors in the 15 minute interval.')
ad_if_ph15_min_in_unknown_protos = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 8), hc_perf_interval_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh15MinInUnknownProtos.setStatus('current')
if mibBuilder.loadTexts:
adIfPh15MinInUnknownProtos.setDescription('Count of inbound packets with an unknown or unsupported protocol in the 15 minute interval.')
ad_if_ph15_min_out_octets = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 9), hc_perf_interval_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh15MinOutOctets.setStatus('current')
if mibBuilder.loadTexts:
adIfPh15MinOutOctets.setDescription('Count of octets transmitted in the 15 minute interval.')
ad_if_ph15_min_out_ucast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 10), hc_perf_interval_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh15MinOutUcastPkts.setStatus('current')
if mibBuilder.loadTexts:
adIfPh15MinOutUcastPkts.setDescription('Count of transmitted unicast packets in the 15 minute interval.')
ad_if_ph15_min_out_mcast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 11), hc_perf_interval_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh15MinOutMcastPkts.setStatus('current')
if mibBuilder.loadTexts:
adIfPh15MinOutMcastPkts.setDescription('Count of transmitted multicast packets in the 15 minute interval.')
ad_if_ph15_min_out_bcast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 12), hc_perf_interval_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh15MinOutBcastPkts.setStatus('current')
if mibBuilder.loadTexts:
adIfPh15MinOutBcastPkts.setDescription('Count of transmitted broadcast packets in the 15 minute interval.')
ad_if_ph15_min_out_discards = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 13), hc_perf_interval_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh15MinOutDiscards.setStatus('current')
if mibBuilder.loadTexts:
adIfPh15MinOutDiscards.setDescription('Count of discarded outbound packets in the 15 minute interval.')
ad_if_ph15_min_out_errors = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 2, 1, 14), hc_perf_interval_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh15MinOutErrors.setStatus('current')
if mibBuilder.loadTexts:
adIfPh15MinOutErrors.setDescription('Count of outbound packets that could not be transmitted due to error in the 15 minute interval.')
ad_if_ph1_day_interval_table = mib_table((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3))
if mibBuilder.loadTexts:
adIfPh1DayIntervalTable.setStatus('current')
if mibBuilder.loadTexts:
adIfPh1DayIntervalTable.setDescription('This table contains performance history information for each valid 1 day interval. This table is indexed by by ifIndex and the interval number.')
ad_if_ph1_day_interval_entry = mib_table_row((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh1DayIntervalNumber'))
if mibBuilder.loadTexts:
adIfPh1DayIntervalEntry.setStatus('current')
if mibBuilder.loadTexts:
adIfPh1DayIntervalEntry.setDescription('An entry in the adIfPh1DayIntervalTable.')
ad_if_ph1_day_interval_number = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 30)))
if mibBuilder.loadTexts:
adIfPh1DayIntervalNumber.setStatus('current')
if mibBuilder.loadTexts:
adIfPh1DayIntervalNumber.setDescription('Performance history interval number. Interval 1 is the most recent previous day; interval 7 is 7 days ago. Intervals 2..30 are optional.')
ad_if_ph1_day_in_octets = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 2), hc_perf_total_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh1DayInOctets.setStatus('current')
if mibBuilder.loadTexts:
adIfPh1DayInOctets.setDescription('Count of octets received in the 1 day interval.')
ad_if_ph1_day_in_ucast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 3), hc_perf_total_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh1DayInUcastPkts.setStatus('current')
if mibBuilder.loadTexts:
adIfPh1DayInUcastPkts.setDescription('Count of unicast packets received in the 1 day interval.')
ad_if_ph1_day_in_mcast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 4), hc_perf_total_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh1DayInMcastPkts.setStatus('current')
if mibBuilder.loadTexts:
adIfPh1DayInMcastPkts.setDescription('Count of multicast packets received in the 1 day interval.')
ad_if_ph1_day_in_bcast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 5), hc_perf_total_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh1DayInBcastPkts.setStatus('current')
if mibBuilder.loadTexts:
adIfPh1DayInBcastPkts.setDescription('Count of broadcast packets received in the 1 day interval.')
ad_if_ph1_day_in_discards = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 6), hc_perf_total_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh1DayInDiscards.setStatus('current')
if mibBuilder.loadTexts:
adIfPh1DayInDiscards.setDescription('Count of inbound packets discarded in the 1 day interval.')
ad_if_ph1_day_in_errors = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 7), hc_perf_total_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh1DayInErrors.setStatus('current')
if mibBuilder.loadTexts:
adIfPh1DayInErrors.setDescription('Count of inbound packets containing errors in the 1 day interval.')
ad_if_ph1_day_in_unknown_protos = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 8), hc_perf_total_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh1DayInUnknownProtos.setStatus('current')
if mibBuilder.loadTexts:
adIfPh1DayInUnknownProtos.setDescription('Count of inbound packets with an unknown or unsupported protocol in the 1 day interval.')
ad_if_ph1_day_out_octets = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 9), hc_perf_total_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh1DayOutOctets.setStatus('current')
if mibBuilder.loadTexts:
adIfPh1DayOutOctets.setDescription('Count of octets transmitted in the 1 day interval.')
ad_if_ph1_day_out_ucast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 10), hc_perf_total_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh1DayOutUcastPkts.setStatus('current')
if mibBuilder.loadTexts:
adIfPh1DayOutUcastPkts.setDescription('Count of transmitted unicast packets in the 1 day interval.')
ad_if_ph1_day_out_mcast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 11), hc_perf_total_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh1DayOutMcastPkts.setStatus('current')
if mibBuilder.loadTexts:
adIfPh1DayOutMcastPkts.setDescription('Count of transmitted multicast packets in the 1 day interval.')
ad_if_ph1_day_out_bcast_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 12), hc_perf_total_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh1DayOutBcastPkts.setStatus('current')
if mibBuilder.loadTexts:
adIfPh1DayOutBcastPkts.setDescription('Count of transmitted broadcast packets in the 1 day interval.')
ad_if_ph1_day_out_discards = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 13), hc_perf_total_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh1DayOutDiscards.setStatus('current')
if mibBuilder.loadTexts:
adIfPh1DayOutDiscards.setDescription('Count of discarded outbound packets in the 1 day interval.')
ad_if_ph1_day_out_errors = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 1, 7, 3, 1, 14), hc_perf_total_count()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adIfPh1DayOutErrors.setStatus('current')
if mibBuilder.loadTexts:
adIfPh1DayOutErrors.setDescription('Count of outbound packets that could not be transmitted due to error in the 1 day interval.')
ad_gen_aos_if_perf_history_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 16))
ad_gen_aos_if_perf_history_groups = mib_identifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 16, 1))
ad_gen_aos_if_perf_history_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 16, 2))
ad_gen_aos_if_perf_history_compliance = module_compliance((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 16, 2, 1)).setObjects(('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurGroup'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh15MinIntervalGroup'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh1DayIntervalGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ad_gen_aos_if_perf_history_compliance = adGenAosIfPerfHistoryCompliance.setStatus('current')
if mibBuilder.loadTexts:
adGenAosIfPerfHistoryCompliance.setDescription('The compliance statement for SNMPv2 entities which implement interface performance history.')
ad_if_ph_cur_group = object_group((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 16, 1, 1)).setObjects(('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurTimeElapsed15Min'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurValidIntervals15Min'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurInvalidIntervals15Min'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurInOctets15Min'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurInUcastPkts15Min'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurInMcastPkts15Min'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurInBcastPkts15Min'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurInDiscards15Min'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurInErrors15Min'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurInUnknownProtos15Min'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurOutOctets15Min'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurOutUcastPkts15Min'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurOutMcastPkts15Min'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurOutBcastPkts15Min'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurOutDiscards15Min'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurOutErrors15Min'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurTimeElapsed1Day'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurValidIntervals1Day'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurInvalidIntervals1Day'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurInOctets1Day'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurInUcastPkts1Day'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurInMcastPkts1Day'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurInBcastPkts1Day'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurInDiscards1Day'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurInErrors1Day'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurInUnknownProtos1Day'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurOutOctets1Day'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurOutUcastPkts1Day'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurOutMcastPkts1Day'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurOutBcastPkts1Day'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurOutDiscards1Day'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPhCurOutErrors1Day'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ad_if_ph_cur_group = adIfPhCurGroup.setStatus('current')
if mibBuilder.loadTexts:
adIfPhCurGroup.setDescription('The Current Group.')
ad_if_ph15_min_interval_group = object_group((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 16, 1, 2)).setObjects(('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh15MinInOctets'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh15MinInUcastPkts'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh15MinInMcastPkts'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh15MinInBcastPkts'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh15MinInDiscards'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh15MinInErrors'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh15MinInUnknownProtos'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh15MinOutOctets'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh15MinOutUcastPkts'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh15MinOutMcastPkts'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh15MinOutBcastPkts'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh15MinOutDiscards'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh15MinOutErrors'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ad_if_ph15_min_interval_group = adIfPh15MinIntervalGroup.setStatus('current')
if mibBuilder.loadTexts:
adIfPh15MinIntervalGroup.setDescription('The 15 minute interval group.')
ad_if_ph1_day_interval_group = object_group((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 16, 1, 3)).setObjects(('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh1DayInOctets'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh1DayInUcastPkts'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh1DayInMcastPkts'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh1DayInBcastPkts'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh1DayInDiscards'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh1DayInErrors'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh1DayInUnknownProtos'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh1DayOutOctets'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh1DayOutUcastPkts'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh1DayOutMcastPkts'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh1DayOutBcastPkts'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh1DayOutDiscards'), ('ADTRAN-IF-PERF-HISTORY-MIB', 'adIfPh1DayOutErrors'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ad_if_ph1_day_interval_group = adIfPh1DayIntervalGroup.setStatus('current')
if mibBuilder.loadTexts:
adIfPh1DayIntervalGroup.setDescription('The 1 day interval group.')
mibBuilder.exportSymbols('ADTRAN-IF-PERF-HISTORY-MIB', adIfPh15MinInBcastPkts=adIfPh15MinInBcastPkts, adIfPhCurInvalidIntervals1Day=adIfPhCurInvalidIntervals1Day, adIfPh15MinIntervalNumber=adIfPh15MinIntervalNumber, adIfPh15MinIntervalTable=adIfPh15MinIntervalTable, adIfPhCurOutMcastPkts15Min=adIfPhCurOutMcastPkts15Min, adIfPhCurOutDiscards15Min=adIfPhCurOutDiscards15Min, adIfPhCurOutUcastPkts15Min=adIfPhCurOutUcastPkts15Min, adIfPh1DayInDiscards=adIfPh1DayInDiscards, adGenAosIfPerfHistory=adGenAosIfPerfHistory, adIfPh1DayInErrors=adIfPh1DayInErrors, adIfPhCurInUcastPkts1Day=adIfPhCurInUcastPkts1Day, adIfPhCurInMcastPkts15Min=adIfPhCurInMcastPkts15Min, adIfPhCurInUnknownProtos1Day=adIfPhCurInUnknownProtos1Day, adIfPh15MinInUcastPkts=adIfPh15MinInUcastPkts, adIfPh1DayIntervalNumber=adIfPh1DayIntervalNumber, adIfPh15MinInMcastPkts=adIfPh15MinInMcastPkts, adIfPhCurOutOctets1Day=adIfPhCurOutOctets1Day, adIfPhCurInUcastPkts15Min=adIfPhCurInUcastPkts15Min, adIfPhCurInUnknownProtos15Min=adIfPhCurInUnknownProtos15Min, adIfPh1DayInBcastPkts=adIfPh1DayInBcastPkts, adIfPhCurInBcastPkts15Min=adIfPhCurInBcastPkts15Min, adIfPhCurInErrors15Min=adIfPhCurInErrors15Min, adIfPhCurOutOctets15Min=adIfPhCurOutOctets15Min, adIfPhCurOutMcastPkts1Day=adIfPhCurOutMcastPkts1Day, adIfPhCurInvalidIntervals15Min=adIfPhCurInvalidIntervals15Min, adIfPh15MinIntervalEntry=adIfPh15MinIntervalEntry, adIfPhCurOutDiscards1Day=adIfPhCurOutDiscards1Day, adIfPh15MinInUnknownProtos=adIfPh15MinInUnknownProtos, adIfPhCurInDiscards15Min=adIfPhCurInDiscards15Min, adIfPh1DayIntervalEntry=adIfPh1DayIntervalEntry, adIfPhCurInErrors1Day=adIfPhCurInErrors1Day, adIfPhCurInDiscards1Day=adIfPhCurInDiscards1Day, adIfPh15MinInOctets=adIfPh15MinInOctets, adIfPhCurOutBcastPkts15Min=adIfPhCurOutBcastPkts15Min, adIfPh15MinInDiscards=adIfPh15MinInDiscards, adIfPhCurOutErrors15Min=adIfPhCurOutErrors15Min, adIfPhCurValidIntervals15Min=adIfPhCurValidIntervals15Min, adIfPh1DayOutBcastPkts=adIfPh1DayOutBcastPkts, adGenAosIfPerfHistoryCompliance=adGenAosIfPerfHistoryCompliance, adIfPh15MinOutOctets=adIfPh15MinOutOctets, adGenAosIfPerfHistoryConformance=adGenAosIfPerfHistoryConformance, adIfPh1DayIntervalTable=adIfPh1DayIntervalTable, adIfPh15MinIntervalGroup=adIfPh15MinIntervalGroup, adIfPh15MinOutUcastPkts=adIfPh15MinOutUcastPkts, adIfPh1DayInMcastPkts=adIfPh1DayInMcastPkts, adIfPhCurTable=adIfPhCurTable, adIfPh1DayInUcastPkts=adIfPh1DayInUcastPkts, adGenAosIfPerfHistoryMib=adGenAosIfPerfHistoryMib, adIfPhCurTimeElapsed15Min=adIfPhCurTimeElapsed15Min, adIfPhCurValidIntervals1Day=adIfPhCurValidIntervals1Day, adIfPhCurInBcastPkts1Day=adIfPhCurInBcastPkts1Day, adIfPh15MinOutDiscards=adIfPh15MinOutDiscards, PYSNMP_MODULE_ID=adGenAosIfPerfHistoryMib, adIfPhCurEntry=adIfPhCurEntry, adIfPh1DayOutOctets=adIfPh1DayOutOctets, adIfPh1DayOutErrors=adIfPh1DayOutErrors, adIfPh1DayOutUcastPkts=adIfPh1DayOutUcastPkts, adIfPhCurInOctets15Min=adIfPhCurInOctets15Min, adIfPh1DayInOctets=adIfPh1DayInOctets, adIfPh1DayInUnknownProtos=adIfPh1DayInUnknownProtos, adIfPhCurOutUcastPkts1Day=adIfPhCurOutUcastPkts1Day, adIfPh1DayOutMcastPkts=adIfPh1DayOutMcastPkts, adGenAosIfPerfHistoryCompliances=adGenAosIfPerfHistoryCompliances, adIfPhCurInMcastPkts1Day=adIfPhCurInMcastPkts1Day, adGenAosIfPerfHistoryGroups=adGenAosIfPerfHistoryGroups, adIfPhCurGroup=adIfPhCurGroup, adIfPhCurOutBcastPkts1Day=adIfPhCurOutBcastPkts1Day, adIfPh15MinOutMcastPkts=adIfPh15MinOutMcastPkts, adIfPhCurTimeElapsed1Day=adIfPhCurTimeElapsed1Day, adIfPh1DayOutDiscards=adIfPh1DayOutDiscards, adIfPh1DayIntervalGroup=adIfPh1DayIntervalGroup, adIfPhCurOutErrors1Day=adIfPhCurOutErrors1Day, adIfPh15MinOutBcastPkts=adIfPh15MinOutBcastPkts, adIfPh15MinOutErrors=adIfPh15MinOutErrors, adIfPh15MinInErrors=adIfPh15MinInErrors, adIfPhCurInOctets1Day=adIfPhCurInOctets1Day)
|
# coding=utf-8
# Database
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
DATABASES = {
"default": {
'ENGINE': 'django.db.backends.mysql',
'HOST': 'mysql',
'PORT': 3306,
'USER': 'root',
'PASSWORD': 'root',
'NAME': 'cloudsky_backend'
},
}
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://redis:6379",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"PASSWORD": ''
}
}
}
|
databases = {'default': {'ENGINE': 'django.db.backends.mysql', 'HOST': 'mysql', 'PORT': 3306, 'USER': 'root', 'PASSWORD': 'root', 'NAME': 'cloudsky_backend'}}
caches = {'default': {'BACKEND': 'django_redis.cache.RedisCache', 'LOCATION': 'redis://redis:6379', 'OPTIONS': {'CLIENT_CLASS': 'django_redis.client.DefaultClient', 'PASSWORD': ''}}}
|
while True:
try:
s = input()
# s = 'haha'
print(s)
except :
# print(e)
break
|
while True:
try:
s = input()
print(s)
except:
break
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.