content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
class Solution:
def balancedStringSplit(self, s: str) -> int:
l=0
r=1
k=0
while r<len(s)+1:
print(s[l:r])
if s[l:r].count("L") == s[l:r].count("R"):
k=k+1
l=r
r=r+1
r=r+1
return k
| class Solution:
def balanced_string_split(self, s: str) -> int:
l = 0
r = 1
k = 0
while r < len(s) + 1:
print(s[l:r])
if s[l:r].count('L') == s[l:r].count('R'):
k = k + 1
l = r
r = r + 1
r = r + 1
return k |
class Solution:
def climbStairs(self, n: int) -> int:
dp = [0] * (n + 1)
dp[0] = 1
weights = [1, 2]
for i in range(n + 1):
for j in weights:
if i >= j:
dp[i] += dp[i-j]
return dp[n] | class Solution:
def climb_stairs(self, n: int) -> int:
dp = [0] * (n + 1)
dp[0] = 1
weights = [1, 2]
for i in range(n + 1):
for j in weights:
if i >= j:
dp[i] += dp[i - j]
return dp[n] |
class Solution:
def permuteUnique(self, nums: List[int]) -> List[List[int]]:
marked = [False] * len(nums)
ans = []
self.dfs(sorted(nums), marked, [], ans)
return ans
def dfs(self, nums, marked, path, ans):
if len(path) == len(nums):
ans.append(list(path))
return
for i in range(len(nums)):
if i > 0 and nums[i] == nums[i-1] and not marked[i-1]:
continue
if marked[i]:
continue
marked[i] = True
path.append(nums[i])
self.dfs(nums, marked, path, ans)
marked[i] = False
path.pop()
| class Solution:
def permute_unique(self, nums: List[int]) -> List[List[int]]:
marked = [False] * len(nums)
ans = []
self.dfs(sorted(nums), marked, [], ans)
return ans
def dfs(self, nums, marked, path, ans):
if len(path) == len(nums):
ans.append(list(path))
return
for i in range(len(nums)):
if i > 0 and nums[i] == nums[i - 1] and (not marked[i - 1]):
continue
if marked[i]:
continue
marked[i] = True
path.append(nums[i])
self.dfs(nums, marked, path, ans)
marked[i] = False
path.pop() |
def hasFront(arr,r,c,i,j):
if(i-1 >= 0):
return arr[i-1][j] == arr[i][j]
return False
def hasBack(arr,r,c,i,j):
if(i+1 < r):
return arr[i+1][j] == arr[i][j]
return False
def hasLR(arr,r,c,i,j):
if(j+1 < c):
if(arr[i][j+1] == arr[i][j]):
return True
if(j-1 >= 0):
if(arr[i][j-1] == arr[i][j]):
return True
return False
def hasDiagonal(arr,r,c,i,j):
if(i-1 >=0 and j-1 >=0):
if(arr[i-1][j-1] == arr[i][j]):
return True
if(i+1 < r and j+1 < c):
if(arr[i+1][j+1] == arr[i][j]):
return True
if(i-1 >=0 and j+1 < c):
if(arr[i-1][j+1] == arr[i][j]):
return True
if(i+1 < r and j-1 >= 0):
if(arr[i+1][j-1] == arr[i][j]):
return True
return False
r = int(input('Enter # of rows:'))
c = int(input('Enter # of columns:'))
print('-Enter the student arrangement-')
arr = []
for _ in range(r):
arr.append([e for e in input().split()])
result = []
for _ in range(r):
result.append([0.0 for i in range(c)])
for i in range(r):
for j in range(c):
if(hasFront(arr,r,c,i,j)):
result[i][j] += 0.3
if(hasBack(arr,r,c,i,j)):
result[i][j] += 0.2
if(hasLR(arr,r,c,i,j)):
result[i][j] += 0.2
if(hasDiagonal(arr,r,c,i,j)):
result[i][j] += 0.025
for e in result:
print(e) | def has_front(arr, r, c, i, j):
if i - 1 >= 0:
return arr[i - 1][j] == arr[i][j]
return False
def has_back(arr, r, c, i, j):
if i + 1 < r:
return arr[i + 1][j] == arr[i][j]
return False
def has_lr(arr, r, c, i, j):
if j + 1 < c:
if arr[i][j + 1] == arr[i][j]:
return True
if j - 1 >= 0:
if arr[i][j - 1] == arr[i][j]:
return True
return False
def has_diagonal(arr, r, c, i, j):
if i - 1 >= 0 and j - 1 >= 0:
if arr[i - 1][j - 1] == arr[i][j]:
return True
if i + 1 < r and j + 1 < c:
if arr[i + 1][j + 1] == arr[i][j]:
return True
if i - 1 >= 0 and j + 1 < c:
if arr[i - 1][j + 1] == arr[i][j]:
return True
if i + 1 < r and j - 1 >= 0:
if arr[i + 1][j - 1] == arr[i][j]:
return True
return False
r = int(input('Enter # of rows:'))
c = int(input('Enter # of columns:'))
print('-Enter the student arrangement-')
arr = []
for _ in range(r):
arr.append([e for e in input().split()])
result = []
for _ in range(r):
result.append([0.0 for i in range(c)])
for i in range(r):
for j in range(c):
if has_front(arr, r, c, i, j):
result[i][j] += 0.3
if has_back(arr, r, c, i, j):
result[i][j] += 0.2
if has_lr(arr, r, c, i, j):
result[i][j] += 0.2
if has_diagonal(arr, r, c, i, j):
result[i][j] += 0.025
for e in result:
print(e) |
__author__ = 'Xavier Bruhiere'
__copyright__ = 'Xavier Bruhiere'
__licence__ = 'Apache 2.0'
__version__ = '0.0.2'
| __author__ = 'Xavier Bruhiere'
__copyright__ = 'Xavier Bruhiere'
__licence__ = 'Apache 2.0'
__version__ = '0.0.2' |
class Sim:
def __init__(self, fish: list[int]):
self.fish = fish
def step(self):
fish = self.fish
for i in range(len(self.fish)):
if fish[i] == 0:
fish.append(8)
fish[i] = 7
fish[i] -= 1
if __name__ == "__main__":
with open("input.txt") as file:
raw_input_data = file.read()
with open("example.txt") as file:
raw_example_data = file.read()
# A variable used to choose which one of the two to use
# Example data is used to see if the code works
use_example_data = False
if use_example_data:
raw_data = raw_example_data
else:
raw_data = raw_input_data
data = [int(fish) for fish in raw_data.split(",")]
simulation = Sim(data)
for i in range(80):
simulation.step()
print("Total: {}".format(len(simulation.fish)))
| class Sim:
def __init__(self, fish: list[int]):
self.fish = fish
def step(self):
fish = self.fish
for i in range(len(self.fish)):
if fish[i] == 0:
fish.append(8)
fish[i] = 7
fish[i] -= 1
if __name__ == '__main__':
with open('input.txt') as file:
raw_input_data = file.read()
with open('example.txt') as file:
raw_example_data = file.read()
use_example_data = False
if use_example_data:
raw_data = raw_example_data
else:
raw_data = raw_input_data
data = [int(fish) for fish in raw_data.split(',')]
simulation = sim(data)
for i in range(80):
simulation.step()
print('Total: {}'.format(len(simulation.fish))) |
# Uses python3
def get_change_naive(m):
count = m // 10
m %= 10
count += m // 5
m %= 5
count += m // 1
return count
def get_change_greedy(m):
#write your code here
change, count = 0, 0
coins = [1, 5, 10]
index = len(coins) - 1
while change < m:
while (change <= m and (m - change) >= coins[index]):
change += coins[index]
count += 1
index -= 1
return count
if __name__ == '__main__':
m = int(input())
print(get_change_greedy(m))
| def get_change_naive(m):
count = m // 10
m %= 10
count += m // 5
m %= 5
count += m // 1
return count
def get_change_greedy(m):
(change, count) = (0, 0)
coins = [1, 5, 10]
index = len(coins) - 1
while change < m:
while change <= m and m - change >= coins[index]:
change += coins[index]
count += 1
index -= 1
return count
if __name__ == '__main__':
m = int(input())
print(get_change_greedy(m)) |
class Solution:
def rangeSumBST(self, root, L, R):
return self.inorder(root, 0, L, R)
def inorder(self,root, value, L, R):
if root:
value = self.inorder(root.left, value, L, R)
if root.val >= L and root.val <= R:
value += root.val
value = self.inorder(root.right, value, L, R)
return value | class Solution:
def range_sum_bst(self, root, L, R):
return self.inorder(root, 0, L, R)
def inorder(self, root, value, L, R):
if root:
value = self.inorder(root.left, value, L, R)
if root.val >= L and root.val <= R:
value += root.val
value = self.inorder(root.right, value, L, R)
return value |
# def make_multiple(n):
# def multiply(x):
# print(f'{x} * {n} is ', x * n)
# return multiply
# times_three = make_multiple(3)
# times_five = make_multiple(5)
# del make_multiple
# times_three(10) # == make_multiple(3)(10)
# print('Closure of make_multiple', make_multiple.__closure__)
# print('Closure of times_three', times_three.__closure__[0].cell_contents)
# print('Closure of times_five', times_five.__closure__)
# times_five(100)
# times_five(10)
# times_three(20)
def add_discount(promo=100):
print('In function that returns decorator')
def inner(func):
print('In decorator')
def discounted(user, money):
print('closure for: ', func.__name__)
return func(user, money * (promo / 100)) # return value is the return value of `func`
return discounted # return value is closure
return inner # return value is decorator
# decorator = add_discount(promo=20)
# print('after add_discount return value')
# pay_phone = decorator(pay_phone)
# @shano
@add_discount(promo=20)
def pay_phone(user, money):
print('phone', user, money)
# @add_discount()
# def pay_net(user, money):
# print('net', user, money)
print('Before pay_phone is called')
pay_phone('marto', 100)
# pay_net('marto', 100)
| def add_discount(promo=100):
print('In function that returns decorator')
def inner(func):
print('In decorator')
def discounted(user, money):
print('closure for: ', func.__name__)
return func(user, money * (promo / 100))
return discounted
return inner
@add_discount(promo=20)
def pay_phone(user, money):
print('phone', user, money)
print('Before pay_phone is called')
pay_phone('marto', 100) |
# Support code
class Node:
def __init__(self, val: int = 0, left: 'Node' = None, right: 'Node' = None, next: 'Node' = None):
self.val = val
self.left = left
self.right = right
self.next = next
# Problem code
def connect(root):
if not root:
return None
connect_helper(root.left, root.right)
return root
def connect_helper(node1, node2):
if not node1 or not node2:
return
node1.next = node2
connect_helper(node1.left, node1.right)
connect_helper(node1.right, node2.left)
connect_helper(node2.left, node2.right)
| class Node:
def __init__(self, val: int=0, left: 'Node'=None, right: 'Node'=None, next: 'Node'=None):
self.val = val
self.left = left
self.right = right
self.next = next
def connect(root):
if not root:
return None
connect_helper(root.left, root.right)
return root
def connect_helper(node1, node2):
if not node1 or not node2:
return
node1.next = node2
connect_helper(node1.left, node1.right)
connect_helper(node1.right, node2.left)
connect_helper(node2.left, node2.right) |
def parse():
with open('day09/input.txt') as f:
lines = f.readlines()
arr = []
for line in lines:
a = []
for c in line.strip():
a.append(int(c))
arr.append(a)
return arr
arr = parse()
h = len(arr)
w = len(arr[0])
def wave(xx: int, yy: int) -> int:
n = 0
q = [ [yy, xx] ]
while len(q) > 0:
y, x = q.pop(0)
if arr[y][x] == -1: continue
arr[y][x] = -1
n += 1
if x > 0 and arr[y][x-1] != 9 and arr[y][x-1] != -1:
q.append([y, x-1])
if y > 0 and arr[y-1][x] != 9 and arr[y-1][x] != -1:
q.append([y-1, x])
if x < w-1 and arr[y][x+1] != 9 and arr[y][x+1] != -1:
q.append([y, x+1])
if y < h-1 and arr[y+1][x] != 9 and arr[y+1][x] != -1:
q.append([y+1, x])
return n
basins = []
for y in range(h):
for x in range(w):
if arr[y][x] != -1 and arr[y][x] != 9:
size = wave(x, y)
basins.append(size)
basins = sorted(basins, reverse=True)
product = 1
for i in range(3):
product *= basins[i]
print(product) | def parse():
with open('day09/input.txt') as f:
lines = f.readlines()
arr = []
for line in lines:
a = []
for c in line.strip():
a.append(int(c))
arr.append(a)
return arr
arr = parse()
h = len(arr)
w = len(arr[0])
def wave(xx: int, yy: int) -> int:
n = 0
q = [[yy, xx]]
while len(q) > 0:
(y, x) = q.pop(0)
if arr[y][x] == -1:
continue
arr[y][x] = -1
n += 1
if x > 0 and arr[y][x - 1] != 9 and (arr[y][x - 1] != -1):
q.append([y, x - 1])
if y > 0 and arr[y - 1][x] != 9 and (arr[y - 1][x] != -1):
q.append([y - 1, x])
if x < w - 1 and arr[y][x + 1] != 9 and (arr[y][x + 1] != -1):
q.append([y, x + 1])
if y < h - 1 and arr[y + 1][x] != 9 and (arr[y + 1][x] != -1):
q.append([y + 1, x])
return n
basins = []
for y in range(h):
for x in range(w):
if arr[y][x] != -1 and arr[y][x] != 9:
size = wave(x, y)
basins.append(size)
basins = sorted(basins, reverse=True)
product = 1
for i in range(3):
product *= basins[i]
print(product) |
n = float(input('massa da substancia em gramas: '))
meiavida = n
tempo = 0
while meiavida >= 0.05:
meiavida *= 0.5
tempo +=50
print('para q a substancia de massa {}g atinja 0.05g , levou {:.0f}s'.format(n,tempo)) | n = float(input('massa da substancia em gramas: '))
meiavida = n
tempo = 0
while meiavida >= 0.05:
meiavida *= 0.5
tempo += 50
print('para q a substancia de massa {}g atinja 0.05g , levou {:.0f}s'.format(n, tempo)) |
#
# PySNMP MIB module Juniper-DISMAN-EVENT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-DISMAN-EVENT-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:51:24 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint")
mteTriggerEntry, = mibBuilder.importSymbols("DISMAN-EVENT-MIB", "mteTriggerEntry")
juniMibs, = mibBuilder.importSymbols("Juniper-MIBs", "juniMibs")
NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup")
Gauge32, Unsigned32, ModuleIdentity, iso, Counter32, TimeTicks, ObjectIdentity, Integer32, MibIdentifier, Counter64, IpAddress, Bits, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "Unsigned32", "ModuleIdentity", "iso", "Counter32", "TimeTicks", "ObjectIdentity", "Integer32", "MibIdentifier", "Counter64", "IpAddress", "Bits", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
juniDismanEventMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66))
juniDismanEventMIB.setRevisions(('2003-10-30 15:35',))
if mibBuilder.loadTexts: juniDismanEventMIB.setLastUpdated('200310301535Z')
if mibBuilder.loadTexts: juniDismanEventMIB.setOrganization('Juniper Networks, Inc.')
juniDismanEventMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 1))
juniMteTrigger = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 1, 1))
juniMteTriggerTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 1, 1, 1), )
if mibBuilder.loadTexts: juniMteTriggerTable.setStatus('current')
juniMteTriggerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 1, 1, 1, 1), )
mteTriggerEntry.registerAugmentions(("Juniper-DISMAN-EVENT-MIB", "juniMteTriggerEntry"))
juniMteTriggerEntry.setIndexNames(*mteTriggerEntry.getIndexNames())
if mibBuilder.loadTexts: juniMteTriggerEntry.setStatus('current')
juniMteTriggerContextNameLimit = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 1, 1, 1, 1, 2), Unsigned32()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniMteTriggerContextNameLimit.setStatus('current')
juniDismanEventMIBNotificationPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 2))
juniDismanEventMIBNotificationObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 2, 1))
juniMteExistenceTestResult = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("present", 0), ("absent", 1), ("changed", 2)))).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: juniMteExistenceTestResult.setStatus('current')
juniDismanEventConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 3))
juniDismanEventCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 3, 1))
juniDismanEventGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 3, 2))
juniDismanEventCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 3, 1, 1)).setObjects(("Juniper-DISMAN-EVENT-MIB", "juniMteTriggerTableGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniDismanEventCompliance = juniDismanEventCompliance.setStatus('current')
juniMteTriggerTableGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 3, 2, 1)).setObjects(("Juniper-DISMAN-EVENT-MIB", "juniMteTriggerContextNameLimit"), ("Juniper-DISMAN-EVENT-MIB", "juniMteExistenceTestResult"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniMteTriggerTableGroup = juniMteTriggerTableGroup.setStatus('current')
mibBuilder.exportSymbols("Juniper-DISMAN-EVENT-MIB", juniMteTriggerTable=juniMteTriggerTable, juniDismanEventMIBNotificationPrefix=juniDismanEventMIBNotificationPrefix, juniMteTrigger=juniMteTrigger, juniDismanEventGroups=juniDismanEventGroups, juniDismanEventCompliances=juniDismanEventCompliances, juniDismanEventCompliance=juniDismanEventCompliance, juniDismanEventMIBNotificationObjects=juniDismanEventMIBNotificationObjects, juniDismanEventConformance=juniDismanEventConformance, juniMteTriggerEntry=juniMteTriggerEntry, juniDismanEventMIB=juniDismanEventMIB, juniMteTriggerContextNameLimit=juniMteTriggerContextNameLimit, PYSNMP_MODULE_ID=juniDismanEventMIB, juniDismanEventMIBObjects=juniDismanEventMIBObjects, juniMteExistenceTestResult=juniMteExistenceTestResult, juniMteTriggerTableGroup=juniMteTriggerTableGroup)
| (object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_intersection, constraints_union, value_size_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueSizeConstraint', 'SingleValueConstraint')
(mte_trigger_entry,) = mibBuilder.importSymbols('DISMAN-EVENT-MIB', 'mteTriggerEntry')
(juni_mibs,) = mibBuilder.importSymbols('Juniper-MIBs', 'juniMibs')
(notification_group, module_compliance, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance', 'ObjectGroup')
(gauge32, unsigned32, module_identity, iso, counter32, time_ticks, object_identity, integer32, mib_identifier, counter64, ip_address, bits, mib_scalar, mib_table, mib_table_row, mib_table_column, notification_type) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'Unsigned32', 'ModuleIdentity', 'iso', 'Counter32', 'TimeTicks', 'ObjectIdentity', 'Integer32', 'MibIdentifier', 'Counter64', 'IpAddress', 'Bits', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'NotificationType')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
juni_disman_event_mib = module_identity((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66))
juniDismanEventMIB.setRevisions(('2003-10-30 15:35',))
if mibBuilder.loadTexts:
juniDismanEventMIB.setLastUpdated('200310301535Z')
if mibBuilder.loadTexts:
juniDismanEventMIB.setOrganization('Juniper Networks, Inc.')
juni_disman_event_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 1))
juni_mte_trigger = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 1, 1))
juni_mte_trigger_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 1, 1, 1))
if mibBuilder.loadTexts:
juniMteTriggerTable.setStatus('current')
juni_mte_trigger_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 1, 1, 1, 1))
mteTriggerEntry.registerAugmentions(('Juniper-DISMAN-EVENT-MIB', 'juniMteTriggerEntry'))
juniMteTriggerEntry.setIndexNames(*mteTriggerEntry.getIndexNames())
if mibBuilder.loadTexts:
juniMteTriggerEntry.setStatus('current')
juni_mte_trigger_context_name_limit = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 1, 1, 1, 1, 2), unsigned32()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniMteTriggerContextNameLimit.setStatus('current')
juni_disman_event_mib_notification_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 2))
juni_disman_event_mib_notification_objects = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 2, 1))
juni_mte_existence_test_result = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('present', 0), ('absent', 1), ('changed', 2)))).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
juniMteExistenceTestResult.setStatus('current')
juni_disman_event_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 3))
juni_disman_event_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 3, 1))
juni_disman_event_groups = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 3, 2))
juni_disman_event_compliance = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 3, 1, 1)).setObjects(('Juniper-DISMAN-EVENT-MIB', 'juniMteTriggerTableGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_disman_event_compliance = juniDismanEventCompliance.setStatus('current')
juni_mte_trigger_table_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 66, 3, 2, 1)).setObjects(('Juniper-DISMAN-EVENT-MIB', 'juniMteTriggerContextNameLimit'), ('Juniper-DISMAN-EVENT-MIB', 'juniMteExistenceTestResult'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_mte_trigger_table_group = juniMteTriggerTableGroup.setStatus('current')
mibBuilder.exportSymbols('Juniper-DISMAN-EVENT-MIB', juniMteTriggerTable=juniMteTriggerTable, juniDismanEventMIBNotificationPrefix=juniDismanEventMIBNotificationPrefix, juniMteTrigger=juniMteTrigger, juniDismanEventGroups=juniDismanEventGroups, juniDismanEventCompliances=juniDismanEventCompliances, juniDismanEventCompliance=juniDismanEventCompliance, juniDismanEventMIBNotificationObjects=juniDismanEventMIBNotificationObjects, juniDismanEventConformance=juniDismanEventConformance, juniMteTriggerEntry=juniMteTriggerEntry, juniDismanEventMIB=juniDismanEventMIB, juniMteTriggerContextNameLimit=juniMteTriggerContextNameLimit, PYSNMP_MODULE_ID=juniDismanEventMIB, juniDismanEventMIBObjects=juniDismanEventMIBObjects, juniMteExistenceTestResult=juniMteExistenceTestResult, juniMteTriggerTableGroup=juniMteTriggerTableGroup) |
class Tape(object):
blank_symbol = " "
def __init__(self,
tape_string=""):
self.__tape = dict((enumerate(tape_string)))
# last line is equivalent to the following three lines:
# self.__tape = {}
# for i in range(len(tape_string)):
# self.__tape[i] = input[i]
def __str__(self):
s = ""
min_used_index = min(self.__tape.keys())
max_used_index = max(self.__tape.keys())
for i in range(min_used_index, max_used_index):
s += self.__tape[i]
return s
def __getitem__(self, index):
if index in self.__tape:
return self.__tape[index]
else:
return Tape.blank_symbol
def __setitem__(self, pos, char):
self.__tape[pos] = char
class TuringMachine(object):
def __init__(self,
tape="",
blank_symbol=" ",
initial_state="",
final_states=None,
transition_function=None):
self.__tape = Tape(tape)
self.__head_position = 0
self.__blank_symbol = blank_symbol
self.__current_state = initial_state
if transition_function == None:
self.__transition_function = {}
else:
self.__transition_function = transition_function
if final_states == None:
self.__final_states = set()
else:
self.__final_states = set(final_states)
def get_tape(self):
return str(self.__tape)
def step(self):
char_under_head = self.__tape[self.__head_position]
x = (self.__current_state, char_under_head)
if x in self.__transition_function:
y = self.__transition_function[x]
self.__tape[self.__head_position] = y[1]
if y[2] == "R":
self.__head_position += 1
elif y[2] == "L":
self.__head_position -= 1
self.__current_state = y[0]
def final(self):
if self.__current_state in self.__final_states:
return True
else:
return False
| class Tape(object):
blank_symbol = ' '
def __init__(self, tape_string=''):
self.__tape = dict(enumerate(tape_string))
def __str__(self):
s = ''
min_used_index = min(self.__tape.keys())
max_used_index = max(self.__tape.keys())
for i in range(min_used_index, max_used_index):
s += self.__tape[i]
return s
def __getitem__(self, index):
if index in self.__tape:
return self.__tape[index]
else:
return Tape.blank_symbol
def __setitem__(self, pos, char):
self.__tape[pos] = char
class Turingmachine(object):
def __init__(self, tape='', blank_symbol=' ', initial_state='', final_states=None, transition_function=None):
self.__tape = tape(tape)
self.__head_position = 0
self.__blank_symbol = blank_symbol
self.__current_state = initial_state
if transition_function == None:
self.__transition_function = {}
else:
self.__transition_function = transition_function
if final_states == None:
self.__final_states = set()
else:
self.__final_states = set(final_states)
def get_tape(self):
return str(self.__tape)
def step(self):
char_under_head = self.__tape[self.__head_position]
x = (self.__current_state, char_under_head)
if x in self.__transition_function:
y = self.__transition_function[x]
self.__tape[self.__head_position] = y[1]
if y[2] == 'R':
self.__head_position += 1
elif y[2] == 'L':
self.__head_position -= 1
self.__current_state = y[0]
def final(self):
if self.__current_state in self.__final_states:
return True
else:
return False |
sunny = [
" \\ | / ",
" - O - ",
" / | \\ "
]
partial_clouds = [
" \\ /( ) ",
" - O( )",
" / ( ) ",
]
clouds = [
" ( )()_ ",
" ( ) ",
" ( )() "
]
night = [
" . * ",
" * . O ",
" . . * . "
]
drizzle = [
" ' ' '",
" ' ' ' ",
"' ' '"
]
rain = [
" ' '' ' ' ",
" '' ' ' ' ",
" ' ' '' ' "
]
thunderstorm = [
" ''_/ _/' ",
" ' / _/' '",
" /_/'' '' "
]
chaos = [
" c__ ''' '",
" ' '' c___",
" c__ ' 'c_"
]
snow = [
" * '* ' * ",
" '* ' * ' ",
" *' * ' * "
]
fog = [
" -- _ -- ",
" -__-- - ",
" - _--__ "
]
wind = [
" c__ -- _ ",
" -- _-c__ ",
" c --___c "
]
| sunny = [' \\ | / ', ' - O - ', ' / | \\ ']
partial_clouds = [' \\ /( ) ', ' - O( )', ' / ( ) ']
clouds = [' ( )()_ ', ' ( ) ', ' ( )() ']
night = [' . * ', ' * . O ', ' . . * . ']
drizzle = [" ' ' '", " ' ' ' ", "' ' '"]
rain = [" ' '' ' ' ", " '' ' ' ' ", " ' ' '' ' "]
thunderstorm = [" ''_/ _/' ", " ' / _/' '", " /_/'' '' "]
chaos = [" c__ ''' '", " ' '' c___", " c__ ' 'c_"]
snow = [" * '* ' * ", " '* ' * ' ", " *' * ' * "]
fog = [' -- _ -- ', ' -__-- - ', ' - _--__ ']
wind = [' c__ -- _ ', ' -- _-c__ ', ' c --___c '] |
# File type alias
FileType = str
# Constants
IMAGE: FileType = "IMAGE"
AUDIO: FileType = "AUDIO"
| file_type = str
image: FileType = 'IMAGE'
audio: FileType = 'AUDIO' |
a=10
b=5
print(a+b)
print("addition")
| a = 10
b = 5
print(a + b)
print('addition') |
# system functions for the effects of time on a player
def raise_hunger(db, messenger, object):
print('HUNGER for {0}'.format(object['entity']))
if object['hunger'] >= 9:
# player is going to die, so let's just skip the database
# TODO: don't do this, and let an event driven system pick up players who have gotten too hungry
username = object['entity']
db.set_component_for_entity('player_state', {'location': '0;0', 'hunger': 0}, username)
db.set_component_for_entity('inventory', {}, username)
return [
messenger.plain_text('You have died of hunger!', username),
messenger.plain_text('You have lost everything in your inventory!', username),
messenger.plain_text('You have been resurrected at The Origin!', username)
]
db.increment_property_of_component('player_state', object['entity'], 'hunger', 1)
if 2 <= object['hunger'] < 3:
return [messenger.plain_text('You begin to feel hungry', object['entity'])]
if 4 <= object['hunger'] < 5:
return [messenger.plain_text('You hunger is giving way to hangriness', object['entity'])]
if 6 <= object['hunger'] < 7:
return [messenger.plain_text('Your hunger hurts, making anything but eating mentally difficult', object['entity'])]
if 8 <= object['hunger'] < 9:
return [messenger.plain_text('You are about to die of hunger! Eat, NOW!', object['entity'])]
return []
| def raise_hunger(db, messenger, object):
print('HUNGER for {0}'.format(object['entity']))
if object['hunger'] >= 9:
username = object['entity']
db.set_component_for_entity('player_state', {'location': '0;0', 'hunger': 0}, username)
db.set_component_for_entity('inventory', {}, username)
return [messenger.plain_text('You have died of hunger!', username), messenger.plain_text('You have lost everything in your inventory!', username), messenger.plain_text('You have been resurrected at The Origin!', username)]
db.increment_property_of_component('player_state', object['entity'], 'hunger', 1)
if 2 <= object['hunger'] < 3:
return [messenger.plain_text('You begin to feel hungry', object['entity'])]
if 4 <= object['hunger'] < 5:
return [messenger.plain_text('You hunger is giving way to hangriness', object['entity'])]
if 6 <= object['hunger'] < 7:
return [messenger.plain_text('Your hunger hurts, making anything but eating mentally difficult', object['entity'])]
if 8 <= object['hunger'] < 9:
return [messenger.plain_text('You are about to die of hunger! Eat, NOW!', object['entity'])]
return [] |
DOMAIN = 'https://example.com'
# (route, [querie string keys])
# queries must be emtpy list if it has no query strings.
ROUTES = [
('/exercise', ['page', 'date']),
('/homework', ['date']),
]
# { query string key: [query string values ]}
QUERIES = {
'page': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
'date': ['2019-01-01', '2019-04-03', '2019-04-08', '2019-05-06']
}
| domain = 'https://example.com'
routes = [('/exercise', ['page', 'date']), ('/homework', ['date'])]
queries = {'page': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 'date': ['2019-01-01', '2019-04-03', '2019-04-08', '2019-05-06']} |
class Solution:
def validUtf8(self, data: List[int]) -> bool:
p = 0
while p < len(data):
b = self._get_binary(data[p])
one = 0
for c in b:
if c == '1':
one += 1
else:
break
if one == 0:
p += 1
continue
if p + one - 1 >= len(data) or one > 4 or one == 1:
return False
if not self._validate(data[p+1:p+one]):
return False
p += one
return True
def _validate(self, seq):
for s in seq:
b = self._get_binary(s)
if b[:2] != '10':
return False
return True
def _get_binary(self, num):
b = bin(num)[2:]
return '0' * (8 - len(b)) + b
| class Solution:
def valid_utf8(self, data: List[int]) -> bool:
p = 0
while p < len(data):
b = self._get_binary(data[p])
one = 0
for c in b:
if c == '1':
one += 1
else:
break
if one == 0:
p += 1
continue
if p + one - 1 >= len(data) or one > 4 or one == 1:
return False
if not self._validate(data[p + 1:p + one]):
return False
p += one
return True
def _validate(self, seq):
for s in seq:
b = self._get_binary(s)
if b[:2] != '10':
return False
return True
def _get_binary(self, num):
b = bin(num)[2:]
return '0' * (8 - len(b)) + b |
def largest_palindrome_product():
values = { "first": 0, "second": 0, "product": 0 }
for first in range(1000):
for second in range(1000):
product = first * second
product_string = str(product)
if product_string == product_string[::-1]:
if first + second > values["first"] + values["second"]:
values = { "first": first, "second": second, "product": product }
return values["product"]
print(largest_palindrome_product())
| def largest_palindrome_product():
values = {'first': 0, 'second': 0, 'product': 0}
for first in range(1000):
for second in range(1000):
product = first * second
product_string = str(product)
if product_string == product_string[::-1]:
if first + second > values['first'] + values['second']:
values = {'first': first, 'second': second, 'product': product}
return values['product']
print(largest_palindrome_product()) |
tmp = max(x, y)
x = min(x, y)
y = tmp
tmp = max(y, z)
y = min(y, z)
z = tmp
tmp = max(x, y)
x = min(x, y)
y = tmp
| tmp = max(x, y)
x = min(x, y)
y = tmp
tmp = max(y, z)
y = min(y, z)
z = tmp
tmp = max(x, y)
x = min(x, y)
y = tmp |
def fib(n, k, a=0, b=1):
if n == 0:
return 1
if n == 1:
return b
return fib(n - 1, k, b * k, a + b)
print(fib(31, 2))
| def fib(n, k, a=0, b=1):
if n == 0:
return 1
if n == 1:
return b
return fib(n - 1, k, b * k, a + b)
print(fib(31, 2)) |
#We need to calculate all multiples of 3 and 5 that are lesser than given number N
#My initial attempt wasnt great so i took help from this wonderful article https://medium.com/@TheZaki/project-euler-1-multiples-of-3-and-5-c24cb64071b0 :
N = 10
def sum(n, k):
d = n // k
return k * (d * (d+1)) // 2
def test(n):
return sum(n, 3) + sum(n, 5) - sum(n, 15)
print(test(N-1)) | n = 10
def sum(n, k):
d = n // k
return k * (d * (d + 1)) // 2
def test(n):
return sum(n, 3) + sum(n, 5) - sum(n, 15)
print(test(N - 1)) |
#
# PySNMP MIB module HPN-ICF-IPSEC-MONITOR-V2-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPN-ICF-IPSEC-MONITOR-V2-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:27:11 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, SingleValueConstraint, ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ValueSizeConstraint")
hpnicfCommon, = mibBuilder.importSymbols("HPN-ICF-OID-MIB", "hpnicfCommon")
InterfaceIndex, ifIndex = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex", "ifIndex")
InetAddressType, InetAddress = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressType", "InetAddress")
ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup")
TimeTicks, Gauge32, NotificationType, Unsigned32, MibIdentifier, ModuleIdentity, Bits, Counter64, Integer32, IpAddress, Counter32, iso, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "Gauge32", "NotificationType", "Unsigned32", "MibIdentifier", "ModuleIdentity", "Bits", "Counter64", "Integer32", "IpAddress", "Counter32", "iso", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn")
TextualConvention, DisplayString, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "TruthValue")
hpnicfIPsecMonitorV2 = ModuleIdentity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126))
hpnicfIPsecMonitorV2.setRevisions(('2012-06-27 00:00',))
if mibBuilder.loadTexts: hpnicfIPsecMonitorV2.setLastUpdated('201206270000Z')
if mibBuilder.loadTexts: hpnicfIPsecMonitorV2.setOrganization('')
class HpnicfIPsecDiffHellmanGrpV2(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 5, 14, 24, 2147483647))
namedValues = NamedValues(("none", 0), ("dhGroup1", 1), ("dhGroup2", 2), ("dhGroup5", 5), ("dhGroup14", 14), ("dhGroup24", 24), ("invalidGroup", 2147483647))
class HpnicfIPsecEncapModeV2(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 2147483647))
namedValues = NamedValues(("tunnel", 1), ("transport", 2), ("invalidMode", 2147483647))
class HpnicfIPsecEncryptAlgoV2(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 2147483647))
namedValues = NamedValues(("none", 0), ("desCbc", 1), ("ideaCbc", 2), ("blowfishCbc", 3), ("rc5R16B64Cbc", 4), ("tripleDesCbc", 5), ("castCbc", 6), ("aesCbc", 7), ("nsaCbc", 8), ("aesCbc128", 9), ("aesCbc192", 10), ("aesCbc256", 11), ("aesCtr", 12), ("aesCamelliaCbc", 13), ("rc4", 14), ("invalidAlg", 2147483647))
class HpnicfIPsecAuthAlgoV2(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 2147483647))
namedValues = NamedValues(("none", 0), ("md5", 1), ("sha1", 2), ("sha256", 3), ("sha384", 4), ("sha512", 5), ("invalidAlg", 2147483647))
class HpnicfIPsecSaProtocolV2(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 2, 3, 4))
namedValues = NamedValues(("reserved", 0), ("ah", 2), ("esp", 3), ("ipcomp", 4))
class HpnicfIPsecIDTypeV2(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))
namedValues = NamedValues(("reserved", 0), ("ipv4Addr", 1), ("fqdn", 2), ("userFqdn", 3), ("ipv4AddrSubnet", 4), ("ipv6Addr", 5), ("ipv6AddrSubnet", 6), ("ipv4AddrRange", 7), ("ipv6AddrRange", 8), ("derAsn1Dn", 9), ("derAsn1Gn", 10), ("keyId", 11))
class HpnicfIPsecTrafficTypeV2(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 4, 5, 6, 7, 8))
namedValues = NamedValues(("ipv4Addr", 1), ("ipv4AddrSubnet", 4), ("ipv6Addr", 5), ("ipv6AddrSubnet", 6), ("ipv4AddrRange", 7), ("ipv6AddrRange", 8))
class HpnicfIPsecNegoTypeV2(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 2147483647))
namedValues = NamedValues(("ike", 1), ("manual", 2), ("invalidType", 2147483647))
class HpnicfIPsecTunnelStateV2(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("active", 1), ("timeout", 2))
hpnicfIPsecObjectsV2 = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1))
hpnicfIPsecScalarObjectsV2 = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 1))
hpnicfIPsecMIBVersion = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 1, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecMIBVersion.setStatus('current')
hpnicfIPsecTunnelV2Table = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2), )
if mibBuilder.loadTexts: hpnicfIPsecTunnelV2Table.setStatus('current')
hpnicfIPsecTunnelV2Entry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1), ).setIndexNames((0, "HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIndexV2"))
if mibBuilder.loadTexts: hpnicfIPsecTunnelV2Entry.setStatus('current')
hpnicfIPsecTunIndexV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: hpnicfIPsecTunIndexV2.setStatus('current')
hpnicfIPsecTunIfIndexV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 2), InterfaceIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunIfIndexV2.setStatus('current')
hpnicfIPsecTunIKETunnelIndexV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunIKETunnelIndexV2.setStatus('current')
hpnicfIPsecTunIKETunLocalIDTypeV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 4), HpnicfIPsecIDTypeV2()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunIKETunLocalIDTypeV2.setStatus('current')
hpnicfIPsecTunIKETunLocalIDVal1V2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 5), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunIKETunLocalIDVal1V2.setStatus('current')
hpnicfIPsecTunIKETunLocalIDVal2V2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 6), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunIKETunLocalIDVal2V2.setStatus('current')
hpnicfIPsecTunIKETunRemoteIDTypeV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 7), HpnicfIPsecIDTypeV2()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunIKETunRemoteIDTypeV2.setStatus('current')
hpnicfIPsecTunIKETunRemoteIDVal1V2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunIKETunRemoteIDVal1V2.setStatus('current')
hpnicfIPsecTunIKETunRemoteIDVal2V2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 9), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunIKETunRemoteIDVal2V2.setStatus('current')
hpnicfIPsecTunLocalAddrTypeV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 10), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunLocalAddrTypeV2.setStatus('current')
hpnicfIPsecTunLocalAddrV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 11), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunLocalAddrV2.setStatus('current')
hpnicfIPsecTunRemoteAddrTypeV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 12), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunRemoteAddrTypeV2.setStatus('current')
hpnicfIPsecTunRemoteAddrV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 13), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunRemoteAddrV2.setStatus('current')
hpnicfIPsecTunKeyTypeV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 14), HpnicfIPsecNegoTypeV2()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunKeyTypeV2.setStatus('current')
hpnicfIPsecTunEncapModeV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 15), HpnicfIPsecEncapModeV2()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunEncapModeV2.setStatus('current')
hpnicfIPsecTunInitiatorV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 2147483647))).clone(namedValues=NamedValues(("local", 1), ("remote", 2), ("none", 2147483647)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunInitiatorV2.setStatus('current')
hpnicfIPsecTunLifeSizeV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 17), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunLifeSizeV2.setStatus('current')
hpnicfIPsecTunLifeTimeV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunLifeTimeV2.setStatus('current')
hpnicfIPsecTunRemainTimeV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunRemainTimeV2.setStatus('current')
hpnicfIPsecTunActiveTimeV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunActiveTimeV2.setStatus('current')
hpnicfIPsecTunRemainSizeV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 21), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunRemainSizeV2.setStatus('current')
hpnicfIPsecTunTotalRefreshesV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 22), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunTotalRefreshesV2.setStatus('current')
hpnicfIPsecTunCurrentSaInstancesV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 23), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunCurrentSaInstancesV2.setStatus('current')
hpnicfIPsecTunInSaEncryptAlgoV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 24), HpnicfIPsecEncryptAlgoV2()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunInSaEncryptAlgoV2.setStatus('current')
hpnicfIPsecTunInSaAhAuthAlgoV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 25), HpnicfIPsecAuthAlgoV2()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunInSaAhAuthAlgoV2.setStatus('current')
hpnicfIPsecTunInSaEspAuthAlgoV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 26), HpnicfIPsecAuthAlgoV2()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunInSaEspAuthAlgoV2.setStatus('current')
hpnicfIPsecTunDiffHellmanGrpV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 27), HpnicfIPsecDiffHellmanGrpV2()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunDiffHellmanGrpV2.setStatus('current')
hpnicfIPsecTunOutSaEncryptAlgoV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 28), HpnicfIPsecEncryptAlgoV2()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunOutSaEncryptAlgoV2.setStatus('current')
hpnicfIPsecTunOutSaAhAuthAlgoV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 29), HpnicfIPsecAuthAlgoV2()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunOutSaAhAuthAlgoV2.setStatus('current')
hpnicfIPsecTunOutSaEspAuthAlgoV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 30), HpnicfIPsecAuthAlgoV2()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunOutSaEspAuthAlgoV2.setStatus('current')
hpnicfIPsecTunPolicyNameV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 31), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunPolicyNameV2.setStatus('current')
hpnicfIPsecTunPolicyNumV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 32), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunPolicyNumV2.setStatus('current')
hpnicfIPsecTunStatusV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 33), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("initial", 1), ("ready", 2), ("rekeyed", 3), ("closed", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunStatusV2.setStatus('current')
hpnicfIPsecTunnelStatV2Table = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3), )
if mibBuilder.loadTexts: hpnicfIPsecTunnelStatV2Table.setStatus('current')
hpnicfIPsecTunnelStatV2Entry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1), ).setIndexNames((0, "HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIndexV2"))
if mibBuilder.loadTexts: hpnicfIPsecTunnelStatV2Entry.setStatus('current')
hpnicfIPsecTunInOctetsV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 1), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunInOctetsV2.setStatus('current')
hpnicfIPsecTunInDecompOctetsV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunInDecompOctetsV2.setStatus('current')
hpnicfIPsecTunInPktsV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunInPktsV2.setStatus('current')
hpnicfIPsecTunInDropPktsV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunInDropPktsV2.setStatus('current')
hpnicfIPsecTunInReplayDropPktsV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunInReplayDropPktsV2.setStatus('current')
hpnicfIPsecTunInAuthFailsV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 6), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunInAuthFailsV2.setStatus('current')
hpnicfIPsecTunInDecryptFailsV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 7), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunInDecryptFailsV2.setStatus('current')
hpnicfIPsecTunOutOctetsV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 8), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunOutOctetsV2.setStatus('current')
hpnicfIPsecTunOutUncompOctetsV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 9), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunOutUncompOctetsV2.setStatus('current')
hpnicfIPsecTunOutPktsV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 10), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunOutPktsV2.setStatus('current')
hpnicfIPsecTunOutDropPktsV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 11), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunOutDropPktsV2.setStatus('current')
hpnicfIPsecTunOutEncryptFailsV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 12), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunOutEncryptFailsV2.setStatus('current')
hpnicfIPsecTunNoMemoryDropPktsV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 13), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunNoMemoryDropPktsV2.setStatus('current')
hpnicfIPsecTunQueueFullDropPktsV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 14), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunQueueFullDropPktsV2.setStatus('current')
hpnicfIPsecTunInvalidLenDropPktsV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 15), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunInvalidLenDropPktsV2.setStatus('current')
hpnicfIPsecTunTooLongDropPktsV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 16), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunTooLongDropPktsV2.setStatus('current')
hpnicfIPsecTunInvalidSaDropPktsV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 17), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTunInvalidSaDropPktsV2.setStatus('current')
hpnicfIPsecSaV2Table = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4), )
if mibBuilder.loadTexts: hpnicfIPsecSaV2Table.setStatus('current')
hpnicfIPsecSaV2Entry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4, 1), ).setIndexNames((0, "HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIndexV2"), (0, "HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecSaIndexV2"))
if mibBuilder.loadTexts: hpnicfIPsecSaV2Entry.setStatus('current')
hpnicfIPsecSaIndexV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: hpnicfIPsecSaIndexV2.setStatus('current')
hpnicfIPsecSaDirectionV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("in", 1), ("out", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecSaDirectionV2.setStatus('current')
hpnicfIPsecSaSpiValueV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecSaSpiValueV2.setStatus('current')
hpnicfIPsecSaSecProtocolV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4, 1, 4), HpnicfIPsecSaProtocolV2()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecSaSecProtocolV2.setStatus('current')
hpnicfIPsecSaEncryptAlgoV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4, 1, 5), HpnicfIPsecEncryptAlgoV2()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecSaEncryptAlgoV2.setStatus('current')
hpnicfIPsecSaAuthAlgoV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4, 1, 6), HpnicfIPsecAuthAlgoV2()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecSaAuthAlgoV2.setStatus('current')
hpnicfIPsecSaStatusV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("active", 1), ("expiring", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecSaStatusV2.setStatus('current')
hpnicfIPsecTrafficV2Table = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5), )
if mibBuilder.loadTexts: hpnicfIPsecTrafficV2Table.setStatus('current')
hpnicfIPsecTrafficV2Entry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1), ).setIndexNames((0, "HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIndexV2"))
if mibBuilder.loadTexts: hpnicfIPsecTrafficV2Entry.setStatus('current')
hpnicfIPsecTrafficLocalTypeV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 1), HpnicfIPsecTrafficTypeV2()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficLocalTypeV2.setStatus('current')
hpnicfIPsecTrafficLocalAddr1TypeV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 2), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficLocalAddr1TypeV2.setStatus('current')
hpnicfIPsecTrafficLocalAddr1V2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 3), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficLocalAddr1V2.setStatus('current')
hpnicfIPsecTrafficLocalAddr2TypeV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 4), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficLocalAddr2TypeV2.setStatus('current')
hpnicfIPsecTrafficLocalAddr2V2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 5), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficLocalAddr2V2.setStatus('current')
hpnicfIPsecTrafficLocalProtocol1V2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficLocalProtocol1V2.setStatus('current')
hpnicfIPsecTrafficLocalProtocol2V2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficLocalProtocol2V2.setStatus('current')
hpnicfIPsecTrafficLocalPort1V2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficLocalPort1V2.setStatus('current')
hpnicfIPsecTrafficLocalPort2V2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficLocalPort2V2.setStatus('current')
hpnicfIPsecTrafficRemoteTypeV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 10), HpnicfIPsecTrafficTypeV2()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficRemoteTypeV2.setStatus('current')
hpnicfIPsecTrafficRemAddr1TypeV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 11), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficRemAddr1TypeV2.setStatus('current')
hpnicfIPsecTrafficRemAddr1V2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 12), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficRemAddr1V2.setStatus('current')
hpnicfIPsecTrafficRemAddr2TypeV2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 13), InetAddressType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficRemAddr2TypeV2.setStatus('current')
hpnicfIPsecTrafficRemAddr2V2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 14), InetAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficRemAddr2V2.setStatus('current')
hpnicfIPsecTrafficRemoPro1V2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficRemoPro1V2.setStatus('current')
hpnicfIPsecTrafficRemoPro2V2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficRemoPro2V2.setStatus('current')
hpnicfIPsecTrafficRemPort1V2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 17), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficRemPort1V2.setStatus('current')
hpnicfIPsecTrafficRemPort2V2 = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecTrafficRemPort2V2.setStatus('current')
hpnicfIPsecGlobalStatsV2 = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6))
hpnicfIPsecGlobalActiveTunnelsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 1), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalActiveTunnelsV2.setStatus('current')
hpnicfIPsecGlobalActiveSasV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 2), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalActiveSasV2.setStatus('current')
hpnicfIPsecGlobalInOctetsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalInOctetsV2.setStatus('current')
hpnicfIPsecGlobalInDecompOctetsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalInDecompOctetsV2.setStatus('current')
hpnicfIPsecGlobalInPktsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalInPktsV2.setStatus('current')
hpnicfIPsecGlobalInDropsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 6), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalInDropsV2.setStatus('current')
hpnicfIPsecGlobalInReplayDropsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 7), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalInReplayDropsV2.setStatus('current')
hpnicfIPsecGlobalInAuthFailsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 8), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalInAuthFailsV2.setStatus('current')
hpnicfIPsecGlobalInDecryptFailsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 9), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalInDecryptFailsV2.setStatus('current')
hpnicfIPsecGlobalOutOctetsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 10), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalOutOctetsV2.setStatus('current')
hpnicfIPsecGlobalOutUncompOctetsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 11), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalOutUncompOctetsV2.setStatus('current')
hpnicfIPsecGlobalOutPktsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 12), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalOutPktsV2.setStatus('current')
hpnicfIPsecGlobalOutDropsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 13), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalOutDropsV2.setStatus('current')
hpnicfIPsecGlobalOutEncryptFailsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 14), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalOutEncryptFailsV2.setStatus('current')
hpnicfIPsecGlobalNoMemoryDropsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 15), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalNoMemoryDropsV2.setStatus('current')
hpnicfIPsecGlobalNoFindSaDropsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 16), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalNoFindSaDropsV2.setStatus('current')
hpnicfIPsecGlobalQueueFullDropsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 17), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalQueueFullDropsV2.setStatus('current')
hpnicfIPsecGlobalInvalidLenDropsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 18), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalInvalidLenDropsV2.setStatus('current')
hpnicfIPsecGlobalTooLongDropsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 19), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalTooLongDropsV2.setStatus('current')
hpnicfIPsecGlobalInvalidSaDropsV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 20), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfIPsecGlobalInvalidSaDropsV2.setStatus('current')
hpnicfIPsecTrapObjectV2 = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 7))
hpnicfIPsecPolicyNameV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 7, 1), DisplayString()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: hpnicfIPsecPolicyNameV2.setStatus('current')
hpnicfIPsecPolicySeqNumV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 7, 2), Integer32()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: hpnicfIPsecPolicySeqNumV2.setStatus('current')
hpnicfIPsecPolicySizeV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 7, 3), Integer32()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: hpnicfIPsecPolicySizeV2.setStatus('current')
hpnicfIPsecTrapCntlV2 = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8))
hpnicfIPsecTrapGlobalCntlV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfIPsecTrapGlobalCntlV2.setStatus('current')
hpnicfIPsecTunnelStartTrapCntlV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 2), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfIPsecTunnelStartTrapCntlV2.setStatus('current')
hpnicfIPsecTunnelStopTrapCntlV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 3), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfIPsecTunnelStopTrapCntlV2.setStatus('current')
hpnicfIPsecNoSaTrapCntlV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 4), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfIPsecNoSaTrapCntlV2.setStatus('current')
hpnicfIPsecAuthFailureTrapCntlV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 5), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfIPsecAuthFailureTrapCntlV2.setStatus('current')
hpnicfIPsecEncryFailureTrapCntlV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 6), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfIPsecEncryFailureTrapCntlV2.setStatus('current')
hpnicfIPsecDecryFailureTrapCntlV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 7), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfIPsecDecryFailureTrapCntlV2.setStatus('current')
hpnicfIPsecInvalidSaTrapCntlV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 8), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfIPsecInvalidSaTrapCntlV2.setStatus('current')
hpnicfIPsecPolicyAddTrapCntlV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 9), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfIPsecPolicyAddTrapCntlV2.setStatus('current')
hpnicfIPsecPolicyDelTrapCntlV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 10), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfIPsecPolicyDelTrapCntlV2.setStatus('current')
hpnicfIPsecPolicyAttachTrapCntlV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 11), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfIPsecPolicyAttachTrapCntlV2.setStatus('current')
hpnicfIPsecPolicyDetachTrapCntlV2 = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 12), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfIPsecPolicyDetachTrapCntlV2.setStatus('current')
hpnicfIPsecTrapV2 = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9))
hpnicfIPsecNotificationsV2 = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0))
hpnicfIPsecTunnelStartV2 = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 1)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIndexV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLocalAddrTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLocalAddrV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemoteAddrTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemoteAddrV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLifeTimeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLifeSizeV2"))
if mibBuilder.loadTexts: hpnicfIPsecTunnelStartV2.setStatus('current')
hpnicfIPsecTunnelStopV2 = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 2)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIndexV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLocalAddrTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLocalAddrV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemoteAddrTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemoteAddrV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunActiveTimeV2"))
if mibBuilder.loadTexts: hpnicfIPsecTunnelStopV2.setStatus('current')
hpnicfIPsecNoSaFailureV2 = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 3)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIndexV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLocalAddrTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLocalAddrV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemoteAddrTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemoteAddrV2"))
if mibBuilder.loadTexts: hpnicfIPsecNoSaFailureV2.setStatus('current')
hpnicfIPsecAuthFailFailureV2 = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 4)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIndexV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLocalAddrTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLocalAddrV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemoteAddrTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemoteAddrV2"))
if mibBuilder.loadTexts: hpnicfIPsecAuthFailFailureV2.setStatus('current')
hpnicfIPsecEncryFailFailureV2 = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 5)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIndexV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLocalAddrTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLocalAddrV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemoteAddrTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemoteAddrV2"))
if mibBuilder.loadTexts: hpnicfIPsecEncryFailFailureV2.setStatus('current')
hpnicfIPsecDecryFailFailureV2 = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 6)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIndexV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLocalAddrTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLocalAddrV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemoteAddrTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemoteAddrV2"))
if mibBuilder.loadTexts: hpnicfIPsecDecryFailFailureV2.setStatus('current')
hpnicfIPsecInvalidSaFailureV2 = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 7)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIndexV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecSaIndexV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLocalAddrTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLocalAddrV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemoteAddrTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemoteAddrV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecSaSpiValueV2"))
if mibBuilder.loadTexts: hpnicfIPsecInvalidSaFailureV2.setStatus('current')
hpnicfIPsecPolicyAddV2 = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 8)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicyNameV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicySeqNumV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicySizeV2"))
if mibBuilder.loadTexts: hpnicfIPsecPolicyAddV2.setStatus('current')
hpnicfIPsecPolicyDelV2 = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 9)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicyNameV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicySeqNumV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicySizeV2"))
if mibBuilder.loadTexts: hpnicfIPsecPolicyDelV2.setStatus('current')
hpnicfIPsecPolicyAttachV2 = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 10)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicyNameV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicySizeV2"), ("IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: hpnicfIPsecPolicyAttachV2.setStatus('current')
hpnicfIPsecPolicyDetachV2 = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 11)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicyNameV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicySizeV2"), ("IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: hpnicfIPsecPolicyDetachV2.setStatus('current')
hpnicfIPsecConformanceV2 = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2))
hpnicfIPsecCompliancesV2 = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 1))
hpnicfIPsecGroupsV2 = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2))
hpnicfIPsecComplianceV2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 1, 1)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecScalarObjectsGroupV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunnelTableGroupV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunnelStatGroupV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecSaGroupV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficTableGroupV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalStatsGroupV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrapObjectGroupV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrapCntlGroupV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrapGroupV2"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicfIPsecComplianceV2 = hpnicfIPsecComplianceV2.setStatus('current')
hpnicfIPsecScalarObjectsGroupV2 = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 1)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecMIBVersion"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicfIPsecScalarObjectsGroupV2 = hpnicfIPsecScalarObjectsGroupV2.setStatus('current')
hpnicfIPsecTunnelTableGroupV2 = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 2)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIfIndexV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIKETunnelIndexV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIKETunLocalIDTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIKETunLocalIDVal1V2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIKETunLocalIDVal2V2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIKETunRemoteIDTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIKETunRemoteIDVal1V2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunIKETunRemoteIDVal2V2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLocalAddrTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLocalAddrV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemoteAddrTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemoteAddrV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunKeyTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunEncapModeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunInitiatorV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLifeSizeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunLifeTimeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemainTimeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunActiveTimeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunRemainSizeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunTotalRefreshesV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunCurrentSaInstancesV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunInSaEncryptAlgoV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunInSaAhAuthAlgoV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunInSaEspAuthAlgoV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunDiffHellmanGrpV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunOutSaEncryptAlgoV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunOutSaAhAuthAlgoV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunOutSaEspAuthAlgoV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunPolicyNameV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunPolicyNumV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunStatusV2"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicfIPsecTunnelTableGroupV2 = hpnicfIPsecTunnelTableGroupV2.setStatus('current')
hpnicfIPsecTunnelStatGroupV2 = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 3)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunInOctetsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunInDecompOctetsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunInPktsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunInDropPktsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunInReplayDropPktsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunInAuthFailsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunInDecryptFailsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunOutOctetsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunOutUncompOctetsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunOutPktsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunOutDropPktsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunOutEncryptFailsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunNoMemoryDropPktsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunQueueFullDropPktsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunInvalidLenDropPktsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunTooLongDropPktsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunInvalidSaDropPktsV2"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicfIPsecTunnelStatGroupV2 = hpnicfIPsecTunnelStatGroupV2.setStatus('current')
hpnicfIPsecSaGroupV2 = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 4)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecSaDirectionV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecSaSpiValueV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecSaSecProtocolV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecSaEncryptAlgoV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecSaAuthAlgoV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecSaStatusV2"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicfIPsecSaGroupV2 = hpnicfIPsecSaGroupV2.setStatus('current')
hpnicfIPsecTrafficTableGroupV2 = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 5)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficLocalTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficLocalAddr1TypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficLocalAddr1V2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficLocalAddr2TypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficLocalAddr2V2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficLocalProtocol1V2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficLocalProtocol2V2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficLocalPort1V2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficLocalPort2V2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficRemoteTypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficRemAddr1TypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficRemAddr1V2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficRemAddr2TypeV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficRemAddr2V2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficRemoPro1V2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficRemoPro2V2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficRemPort1V2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrafficRemPort2V2"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicfIPsecTrafficTableGroupV2 = hpnicfIPsecTrafficTableGroupV2.setStatus('current')
hpnicfIPsecGlobalStatsGroupV2 = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 6)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalActiveTunnelsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalActiveSasV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalInOctetsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalInDecompOctetsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalInPktsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalInDropsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalInReplayDropsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalInAuthFailsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalInDecryptFailsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalOutOctetsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalOutUncompOctetsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalOutPktsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalOutDropsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalOutEncryptFailsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalNoMemoryDropsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalNoFindSaDropsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalQueueFullDropsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalInvalidLenDropsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalTooLongDropsV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecGlobalInvalidSaDropsV2"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicfIPsecGlobalStatsGroupV2 = hpnicfIPsecGlobalStatsGroupV2.setStatus('current')
hpnicfIPsecTrapObjectGroupV2 = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 7)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicyNameV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicySeqNumV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicySizeV2"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicfIPsecTrapObjectGroupV2 = hpnicfIPsecTrapObjectGroupV2.setStatus('current')
hpnicfIPsecTrapCntlGroupV2 = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 8)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTrapGlobalCntlV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunnelStartTrapCntlV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunnelStopTrapCntlV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecNoSaTrapCntlV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecAuthFailureTrapCntlV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecEncryFailureTrapCntlV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecDecryFailureTrapCntlV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecInvalidSaTrapCntlV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicyAddTrapCntlV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicyDelTrapCntlV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicyAttachTrapCntlV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicyDetachTrapCntlV2"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicfIPsecTrapCntlGroupV2 = hpnicfIPsecTrapCntlGroupV2.setStatus('current')
hpnicfIPsecTrapGroupV2 = NotificationGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 9)).setObjects(("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunnelStartV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecTunnelStopV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecNoSaFailureV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecAuthFailFailureV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecEncryFailFailureV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecDecryFailFailureV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecInvalidSaFailureV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicyAddV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicyDelV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicyAttachV2"), ("HPN-ICF-IPSEC-MONITOR-V2-MIB", "hpnicfIPsecPolicyDetachV2"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicfIPsecTrapGroupV2 = hpnicfIPsecTrapGroupV2.setStatus('current')
mibBuilder.exportSymbols("HPN-ICF-IPSEC-MONITOR-V2-MIB", HpnicfIPsecSaProtocolV2=HpnicfIPsecSaProtocolV2, hpnicfIPsecTunInReplayDropPktsV2=hpnicfIPsecTunInReplayDropPktsV2, hpnicfIPsecTunnelStatV2Entry=hpnicfIPsecTunnelStatV2Entry, hpnicfIPsecTunTooLongDropPktsV2=hpnicfIPsecTunTooLongDropPktsV2, hpnicfIPsecTunnelTableGroupV2=hpnicfIPsecTunnelTableGroupV2, hpnicfIPsecTrafficRemoteTypeV2=hpnicfIPsecTrafficRemoteTypeV2, HpnicfIPsecAuthAlgoV2=HpnicfIPsecAuthAlgoV2, hpnicfIPsecTunOutPktsV2=hpnicfIPsecTunOutPktsV2, hpnicfIPsecNoSaFailureV2=hpnicfIPsecNoSaFailureV2, hpnicfIPsecEncryFailFailureV2=hpnicfIPsecEncryFailFailureV2, hpnicfIPsecTrafficLocalAddr2TypeV2=hpnicfIPsecTrafficLocalAddr2TypeV2, hpnicfIPsecSaDirectionV2=hpnicfIPsecSaDirectionV2, hpnicfIPsecTunTotalRefreshesV2=hpnicfIPsecTunTotalRefreshesV2, hpnicfIPsecTrafficLocalAddr2V2=hpnicfIPsecTrafficLocalAddr2V2, hpnicfIPsecPolicyAddV2=hpnicfIPsecPolicyAddV2, hpnicfIPsecSaAuthAlgoV2=hpnicfIPsecSaAuthAlgoV2, hpnicfIPsecGlobalOutPktsV2=hpnicfIPsecGlobalOutPktsV2, hpnicfIPsecTunNoMemoryDropPktsV2=hpnicfIPsecTunNoMemoryDropPktsV2, hpnicfIPsecTunLocalAddrTypeV2=hpnicfIPsecTunLocalAddrTypeV2, hpnicfIPsecDecryFailFailureV2=hpnicfIPsecDecryFailFailureV2, hpnicfIPsecSaGroupV2=hpnicfIPsecSaGroupV2, hpnicfIPsecTunOutUncompOctetsV2=hpnicfIPsecTunOutUncompOctetsV2, hpnicfIPsecTunInDecryptFailsV2=hpnicfIPsecTunInDecryptFailsV2, hpnicfIPsecTunInSaEspAuthAlgoV2=hpnicfIPsecTunInSaEspAuthAlgoV2, hpnicfIPsecGlobalInPktsV2=hpnicfIPsecGlobalInPktsV2, hpnicfIPsecGlobalOutEncryptFailsV2=hpnicfIPsecGlobalOutEncryptFailsV2, hpnicfIPsecGroupsV2=hpnicfIPsecGroupsV2, hpnicfIPsecPolicyNameV2=hpnicfIPsecPolicyNameV2, hpnicfIPsecTrafficRemAddr1TypeV2=hpnicfIPsecTrafficRemAddr1TypeV2, hpnicfIPsecTrafficRemPort1V2=hpnicfIPsecTrafficRemPort1V2, hpnicfIPsecMIBVersion=hpnicfIPsecMIBVersion, hpnicfIPsecTunIndexV2=hpnicfIPsecTunIndexV2, hpnicfIPsecTunnelStartV2=hpnicfIPsecTunnelStartV2, hpnicfIPsecGlobalInvalidSaDropsV2=hpnicfIPsecGlobalInvalidSaDropsV2, hpnicfIPsecTunRemainSizeV2=hpnicfIPsecTunRemainSizeV2, hpnicfIPsecTrafficRemAddr2TypeV2=hpnicfIPsecTrafficRemAddr2TypeV2, hpnicfIPsecTunInAuthFailsV2=hpnicfIPsecTunInAuthFailsV2, hpnicfIPsecGlobalTooLongDropsV2=hpnicfIPsecGlobalTooLongDropsV2, hpnicfIPsecInvalidSaTrapCntlV2=hpnicfIPsecInvalidSaTrapCntlV2, hpnicfIPsecTrafficRemPort2V2=hpnicfIPsecTrafficRemPort2V2, hpnicfIPsecGlobalInAuthFailsV2=hpnicfIPsecGlobalInAuthFailsV2, hpnicfIPsecTunOutDropPktsV2=hpnicfIPsecTunOutDropPktsV2, hpnicfIPsecPolicyAttachTrapCntlV2=hpnicfIPsecPolicyAttachTrapCntlV2, hpnicfIPsecTunDiffHellmanGrpV2=hpnicfIPsecTunDiffHellmanGrpV2, hpnicfIPsecTrafficLocalProtocol1V2=hpnicfIPsecTrafficLocalProtocol1V2, hpnicfIPsecTunnelV2Table=hpnicfIPsecTunnelV2Table, hpnicfIPsecTrapGroupV2=hpnicfIPsecTrapGroupV2, hpnicfIPsecTrafficRemAddr2V2=hpnicfIPsecTrafficRemAddr2V2, hpnicfIPsecTunQueueFullDropPktsV2=hpnicfIPsecTunQueueFullDropPktsV2, hpnicfIPsecTunKeyTypeV2=hpnicfIPsecTunKeyTypeV2, hpnicfIPsecTunInvalidSaDropPktsV2=hpnicfIPsecTunInvalidSaDropPktsV2, hpnicfIPsecGlobalOutUncompOctetsV2=hpnicfIPsecGlobalOutUncompOctetsV2, hpnicfIPsecTrafficTableGroupV2=hpnicfIPsecTrafficTableGroupV2, hpnicfIPsecTrafficRemoPro1V2=hpnicfIPsecTrafficRemoPro1V2, hpnicfIPsecTunPolicyNameV2=hpnicfIPsecTunPolicyNameV2, hpnicfIPsecTunInOctetsV2=hpnicfIPsecTunInOctetsV2, HpnicfIPsecDiffHellmanGrpV2=HpnicfIPsecDiffHellmanGrpV2, hpnicfIPsecSaIndexV2=hpnicfIPsecSaIndexV2, PYSNMP_MODULE_ID=hpnicfIPsecMonitorV2, hpnicfIPsecTunIfIndexV2=hpnicfIPsecTunIfIndexV2, hpnicfIPsecSaSecProtocolV2=hpnicfIPsecSaSecProtocolV2, hpnicfIPsecTunIKETunLocalIDVal1V2=hpnicfIPsecTunIKETunLocalIDVal1V2, hpnicfIPsecSaEncryptAlgoV2=hpnicfIPsecSaEncryptAlgoV2, hpnicfIPsecPolicySeqNumV2=hpnicfIPsecPolicySeqNumV2, hpnicfIPsecTunOutSaEncryptAlgoV2=hpnicfIPsecTunOutSaEncryptAlgoV2, hpnicfIPsecComplianceV2=hpnicfIPsecComplianceV2, hpnicfIPsecTunOutOctetsV2=hpnicfIPsecTunOutOctetsV2, hpnicfIPsecGlobalOutOctetsV2=hpnicfIPsecGlobalOutOctetsV2, hpnicfIPsecEncryFailureTrapCntlV2=hpnicfIPsecEncryFailureTrapCntlV2, hpnicfIPsecTunInDecompOctetsV2=hpnicfIPsecTunInDecompOctetsV2, hpnicfIPsecPolicyAttachV2=hpnicfIPsecPolicyAttachV2, hpnicfIPsecGlobalInOctetsV2=hpnicfIPsecGlobalInOctetsV2, hpnicfIPsecGlobalInReplayDropsV2=hpnicfIPsecGlobalInReplayDropsV2, hpnicfIPsecTunInSaEncryptAlgoV2=hpnicfIPsecTunInSaEncryptAlgoV2, hpnicfIPsecGlobalNoMemoryDropsV2=hpnicfIPsecGlobalNoMemoryDropsV2, hpnicfIPsecTrafficLocalAddr1V2=hpnicfIPsecTrafficLocalAddr1V2, hpnicfIPsecTrafficLocalAddr1TypeV2=hpnicfIPsecTrafficLocalAddr1TypeV2, hpnicfIPsecTunIKETunRemoteIDVal2V2=hpnicfIPsecTunIKETunRemoteIDVal2V2, hpnicfIPsecTunCurrentSaInstancesV2=hpnicfIPsecTunCurrentSaInstancesV2, hpnicfIPsecGlobalInDropsV2=hpnicfIPsecGlobalInDropsV2, hpnicfIPsecPolicyDelV2=hpnicfIPsecPolicyDelV2, hpnicfIPsecTrafficLocalPort1V2=hpnicfIPsecTrafficLocalPort1V2, hpnicfIPsecTunInvalidLenDropPktsV2=hpnicfIPsecTunInvalidLenDropPktsV2, hpnicfIPsecPolicyAddTrapCntlV2=hpnicfIPsecPolicyAddTrapCntlV2, hpnicfIPsecTrapV2=hpnicfIPsecTrapV2, hpnicfIPsecMonitorV2=hpnicfIPsecMonitorV2, hpnicfIPsecTrafficV2Table=hpnicfIPsecTrafficV2Table, hpnicfIPsecTunOutEncryptFailsV2=hpnicfIPsecTunOutEncryptFailsV2, hpnicfIPsecTrafficLocalTypeV2=hpnicfIPsecTrafficLocalTypeV2, hpnicfIPsecTrapObjectV2=hpnicfIPsecTrapObjectV2, hpnicfIPsecPolicyDetachV2=hpnicfIPsecPolicyDetachV2, hpnicfIPsecGlobalInvalidLenDropsV2=hpnicfIPsecGlobalInvalidLenDropsV2, hpnicfIPsecTunInSaAhAuthAlgoV2=hpnicfIPsecTunInSaAhAuthAlgoV2, hpnicfIPsecSaV2Table=hpnicfIPsecSaV2Table, hpnicfIPsecPolicySizeV2=hpnicfIPsecPolicySizeV2, hpnicfIPsecTunIKETunRemoteIDTypeV2=hpnicfIPsecTunIKETunRemoteIDTypeV2, hpnicfIPsecAuthFailureTrapCntlV2=hpnicfIPsecAuthFailureTrapCntlV2, hpnicfIPsecTunIKETunRemoteIDVal1V2=hpnicfIPsecTunIKETunRemoteIDVal1V2, hpnicfIPsecObjectsV2=hpnicfIPsecObjectsV2, hpnicfIPsecGlobalActiveSasV2=hpnicfIPsecGlobalActiveSasV2, hpnicfIPsecTunLifeSizeV2=hpnicfIPsecTunLifeSizeV2, hpnicfIPsecTrafficLocalProtocol2V2=hpnicfIPsecTrafficLocalProtocol2V2, hpnicfIPsecGlobalInDecompOctetsV2=hpnicfIPsecGlobalInDecompOctetsV2, hpnicfIPsecTrafficV2Entry=hpnicfIPsecTrafficV2Entry, HpnicfIPsecIDTypeV2=HpnicfIPsecIDTypeV2, hpnicfIPsecTunStatusV2=hpnicfIPsecTunStatusV2, hpnicfIPsecCompliancesV2=hpnicfIPsecCompliancesV2, HpnicfIPsecEncryptAlgoV2=HpnicfIPsecEncryptAlgoV2, hpnicfIPsecTrafficRemoPro2V2=hpnicfIPsecTrafficRemoPro2V2, hpnicfIPsecTrafficRemAddr1V2=hpnicfIPsecTrafficRemAddr1V2, hpnicfIPsecPolicyDelTrapCntlV2=hpnicfIPsecPolicyDelTrapCntlV2, hpnicfIPsecTunOutSaAhAuthAlgoV2=hpnicfIPsecTunOutSaAhAuthAlgoV2, hpnicfIPsecSaStatusV2=hpnicfIPsecSaStatusV2, hpnicfIPsecGlobalOutDropsV2=hpnicfIPsecGlobalOutDropsV2, hpnicfIPsecTunRemoteAddrTypeV2=hpnicfIPsecTunRemoteAddrTypeV2, hpnicfIPsecTrapObjectGroupV2=hpnicfIPsecTrapObjectGroupV2, hpnicfIPsecTunEncapModeV2=hpnicfIPsecTunEncapModeV2, hpnicfIPsecTunnelStatGroupV2=hpnicfIPsecTunnelStatGroupV2, hpnicfIPsecTunLifeTimeV2=hpnicfIPsecTunLifeTimeV2, hpnicfIPsecTunnelStopTrapCntlV2=hpnicfIPsecTunnelStopTrapCntlV2, hpnicfIPsecPolicyDetachTrapCntlV2=hpnicfIPsecPolicyDetachTrapCntlV2, hpnicfIPsecTunOutSaEspAuthAlgoV2=hpnicfIPsecTunOutSaEspAuthAlgoV2, HpnicfIPsecTrafficTypeV2=HpnicfIPsecTrafficTypeV2, hpnicfIPsecTunInitiatorV2=hpnicfIPsecTunInitiatorV2, hpnicfIPsecTunInPktsV2=hpnicfIPsecTunInPktsV2, hpnicfIPsecSaV2Entry=hpnicfIPsecSaV2Entry, hpnicfIPsecTunIKETunLocalIDVal2V2=hpnicfIPsecTunIKETunLocalIDVal2V2, hpnicfIPsecGlobalActiveTunnelsV2=hpnicfIPsecGlobalActiveTunnelsV2, hpnicfIPsecAuthFailFailureV2=hpnicfIPsecAuthFailFailureV2, hpnicfIPsecTunnelStatV2Table=hpnicfIPsecTunnelStatV2Table, hpnicfIPsecTunPolicyNumV2=hpnicfIPsecTunPolicyNumV2, hpnicfIPsecGlobalQueueFullDropsV2=hpnicfIPsecGlobalQueueFullDropsV2, HpnicfIPsecNegoTypeV2=HpnicfIPsecNegoTypeV2, hpnicfIPsecInvalidSaFailureV2=hpnicfIPsecInvalidSaFailureV2, hpnicfIPsecGlobalStatsGroupV2=hpnicfIPsecGlobalStatsGroupV2, hpnicfIPsecTunnelV2Entry=hpnicfIPsecTunnelV2Entry, hpnicfIPsecTunRemoteAddrV2=hpnicfIPsecTunRemoteAddrV2, HpnicfIPsecTunnelStateV2=HpnicfIPsecTunnelStateV2, hpnicfIPsecSaSpiValueV2=hpnicfIPsecSaSpiValueV2, hpnicfIPsecTunIKETunnelIndexV2=hpnicfIPsecTunIKETunnelIndexV2, hpnicfIPsecNoSaTrapCntlV2=hpnicfIPsecNoSaTrapCntlV2, hpnicfIPsecScalarObjectsGroupV2=hpnicfIPsecScalarObjectsGroupV2, hpnicfIPsecConformanceV2=hpnicfIPsecConformanceV2, hpnicfIPsecNotificationsV2=hpnicfIPsecNotificationsV2, HpnicfIPsecEncapModeV2=HpnicfIPsecEncapModeV2, hpnicfIPsecGlobalInDecryptFailsV2=hpnicfIPsecGlobalInDecryptFailsV2, hpnicfIPsecTrapCntlV2=hpnicfIPsecTrapCntlV2, hpnicfIPsecTunInDropPktsV2=hpnicfIPsecTunInDropPktsV2, hpnicfIPsecTunActiveTimeV2=hpnicfIPsecTunActiveTimeV2, hpnicfIPsecTrafficLocalPort2V2=hpnicfIPsecTrafficLocalPort2V2, hpnicfIPsecDecryFailureTrapCntlV2=hpnicfIPsecDecryFailureTrapCntlV2, hpnicfIPsecTrapGlobalCntlV2=hpnicfIPsecTrapGlobalCntlV2, hpnicfIPsecTunRemainTimeV2=hpnicfIPsecTunRemainTimeV2, hpnicfIPsecTrapCntlGroupV2=hpnicfIPsecTrapCntlGroupV2, hpnicfIPsecScalarObjectsV2=hpnicfIPsecScalarObjectsV2, hpnicfIPsecTunLocalAddrV2=hpnicfIPsecTunLocalAddrV2, hpnicfIPsecGlobalStatsV2=hpnicfIPsecGlobalStatsV2, hpnicfIPsecTunnelStartTrapCntlV2=hpnicfIPsecTunnelStartTrapCntlV2, hpnicfIPsecGlobalNoFindSaDropsV2=hpnicfIPsecGlobalNoFindSaDropsV2, hpnicfIPsecTunIKETunLocalIDTypeV2=hpnicfIPsecTunIKETunLocalIDTypeV2, hpnicfIPsecTunnelStopV2=hpnicfIPsecTunnelStopV2)
| (object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, single_value_constraint, constraints_union, value_range_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'SingleValueConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'ValueSizeConstraint')
(hpnicf_common,) = mibBuilder.importSymbols('HPN-ICF-OID-MIB', 'hpnicfCommon')
(interface_index, if_index) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex', 'ifIndex')
(inet_address_type, inet_address) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddressType', 'InetAddress')
(module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup')
(time_ticks, gauge32, notification_type, unsigned32, mib_identifier, module_identity, bits, counter64, integer32, ip_address, counter32, iso, object_identity, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'TimeTicks', 'Gauge32', 'NotificationType', 'Unsigned32', 'MibIdentifier', 'ModuleIdentity', 'Bits', 'Counter64', 'Integer32', 'IpAddress', 'Counter32', 'iso', 'ObjectIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn')
(textual_convention, display_string, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString', 'TruthValue')
hpnicf_i_psec_monitor_v2 = module_identity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126))
hpnicfIPsecMonitorV2.setRevisions(('2012-06-27 00:00',))
if mibBuilder.loadTexts:
hpnicfIPsecMonitorV2.setLastUpdated('201206270000Z')
if mibBuilder.loadTexts:
hpnicfIPsecMonitorV2.setOrganization('')
class Hpnicfipsecdiffhellmangrpv2(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 5, 14, 24, 2147483647))
named_values = named_values(('none', 0), ('dhGroup1', 1), ('dhGroup2', 2), ('dhGroup5', 5), ('dhGroup14', 14), ('dhGroup24', 24), ('invalidGroup', 2147483647))
class Hpnicfipsecencapmodev2(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 2147483647))
named_values = named_values(('tunnel', 1), ('transport', 2), ('invalidMode', 2147483647))
class Hpnicfipsecencryptalgov2(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 2147483647))
named_values = named_values(('none', 0), ('desCbc', 1), ('ideaCbc', 2), ('blowfishCbc', 3), ('rc5R16B64Cbc', 4), ('tripleDesCbc', 5), ('castCbc', 6), ('aesCbc', 7), ('nsaCbc', 8), ('aesCbc128', 9), ('aesCbc192', 10), ('aesCbc256', 11), ('aesCtr', 12), ('aesCamelliaCbc', 13), ('rc4', 14), ('invalidAlg', 2147483647))
class Hpnicfipsecauthalgov2(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 2147483647))
named_values = named_values(('none', 0), ('md5', 1), ('sha1', 2), ('sha256', 3), ('sha384', 4), ('sha512', 5), ('invalidAlg', 2147483647))
class Hpnicfipsecsaprotocolv2(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 2, 3, 4))
named_values = named_values(('reserved', 0), ('ah', 2), ('esp', 3), ('ipcomp', 4))
class Hpnicfipsecidtypev2(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))
named_values = named_values(('reserved', 0), ('ipv4Addr', 1), ('fqdn', 2), ('userFqdn', 3), ('ipv4AddrSubnet', 4), ('ipv6Addr', 5), ('ipv6AddrSubnet', 6), ('ipv4AddrRange', 7), ('ipv6AddrRange', 8), ('derAsn1Dn', 9), ('derAsn1Gn', 10), ('keyId', 11))
class Hpnicfipsectraffictypev2(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 4, 5, 6, 7, 8))
named_values = named_values(('ipv4Addr', 1), ('ipv4AddrSubnet', 4), ('ipv6Addr', 5), ('ipv6AddrSubnet', 6), ('ipv4AddrRange', 7), ('ipv6AddrRange', 8))
class Hpnicfipsecnegotypev2(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 2147483647))
named_values = named_values(('ike', 1), ('manual', 2), ('invalidType', 2147483647))
class Hpnicfipsectunnelstatev2(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('active', 1), ('timeout', 2))
hpnicf_i_psec_objects_v2 = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1))
hpnicf_i_psec_scalar_objects_v2 = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 1))
hpnicf_i_psec_mib_version = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 1, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecMIBVersion.setStatus('current')
hpnicf_i_psec_tunnel_v2_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2))
if mibBuilder.loadTexts:
hpnicfIPsecTunnelV2Table.setStatus('current')
hpnicf_i_psec_tunnel_v2_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1)).setIndexNames((0, 'HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIndexV2'))
if mibBuilder.loadTexts:
hpnicfIPsecTunnelV2Entry.setStatus('current')
hpnicf_i_psec_tun_index_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
hpnicfIPsecTunIndexV2.setStatus('current')
hpnicf_i_psec_tun_if_index_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 2), interface_index()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunIfIndexV2.setStatus('current')
hpnicf_i_psec_tun_ike_tunnel_index_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunIKETunnelIndexV2.setStatus('current')
hpnicf_i_psec_tun_ike_tun_local_id_type_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 4), hpnicf_i_psec_id_type_v2()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunIKETunLocalIDTypeV2.setStatus('current')
hpnicf_i_psec_tun_ike_tun_local_id_val1_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 5), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunIKETunLocalIDVal1V2.setStatus('current')
hpnicf_i_psec_tun_ike_tun_local_id_val2_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 6), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunIKETunLocalIDVal2V2.setStatus('current')
hpnicf_i_psec_tun_ike_tun_remote_id_type_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 7), hpnicf_i_psec_id_type_v2()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunIKETunRemoteIDTypeV2.setStatus('current')
hpnicf_i_psec_tun_ike_tun_remote_id_val1_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunIKETunRemoteIDVal1V2.setStatus('current')
hpnicf_i_psec_tun_ike_tun_remote_id_val2_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 9), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunIKETunRemoteIDVal2V2.setStatus('current')
hpnicf_i_psec_tun_local_addr_type_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 10), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunLocalAddrTypeV2.setStatus('current')
hpnicf_i_psec_tun_local_addr_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 11), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunLocalAddrV2.setStatus('current')
hpnicf_i_psec_tun_remote_addr_type_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 12), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunRemoteAddrTypeV2.setStatus('current')
hpnicf_i_psec_tun_remote_addr_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 13), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunRemoteAddrV2.setStatus('current')
hpnicf_i_psec_tun_key_type_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 14), hpnicf_i_psec_nego_type_v2()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunKeyTypeV2.setStatus('current')
hpnicf_i_psec_tun_encap_mode_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 15), hpnicf_i_psec_encap_mode_v2()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunEncapModeV2.setStatus('current')
hpnicf_i_psec_tun_initiator_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 2147483647))).clone(namedValues=named_values(('local', 1), ('remote', 2), ('none', 2147483647)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunInitiatorV2.setStatus('current')
hpnicf_i_psec_tun_life_size_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 17), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunLifeSizeV2.setStatus('current')
hpnicf_i_psec_tun_life_time_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 18), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunLifeTimeV2.setStatus('current')
hpnicf_i_psec_tun_remain_time_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 19), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunRemainTimeV2.setStatus('current')
hpnicf_i_psec_tun_active_time_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 20), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunActiveTimeV2.setStatus('current')
hpnicf_i_psec_tun_remain_size_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 21), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunRemainSizeV2.setStatus('current')
hpnicf_i_psec_tun_total_refreshes_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 22), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunTotalRefreshesV2.setStatus('current')
hpnicf_i_psec_tun_current_sa_instances_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 23), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunCurrentSaInstancesV2.setStatus('current')
hpnicf_i_psec_tun_in_sa_encrypt_algo_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 24), hpnicf_i_psec_encrypt_algo_v2()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunInSaEncryptAlgoV2.setStatus('current')
hpnicf_i_psec_tun_in_sa_ah_auth_algo_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 25), hpnicf_i_psec_auth_algo_v2()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunInSaAhAuthAlgoV2.setStatus('current')
hpnicf_i_psec_tun_in_sa_esp_auth_algo_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 26), hpnicf_i_psec_auth_algo_v2()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunInSaEspAuthAlgoV2.setStatus('current')
hpnicf_i_psec_tun_diff_hellman_grp_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 27), hpnicf_i_psec_diff_hellman_grp_v2()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunDiffHellmanGrpV2.setStatus('current')
hpnicf_i_psec_tun_out_sa_encrypt_algo_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 28), hpnicf_i_psec_encrypt_algo_v2()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunOutSaEncryptAlgoV2.setStatus('current')
hpnicf_i_psec_tun_out_sa_ah_auth_algo_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 29), hpnicf_i_psec_auth_algo_v2()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunOutSaAhAuthAlgoV2.setStatus('current')
hpnicf_i_psec_tun_out_sa_esp_auth_algo_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 30), hpnicf_i_psec_auth_algo_v2()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunOutSaEspAuthAlgoV2.setStatus('current')
hpnicf_i_psec_tun_policy_name_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 31), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunPolicyNameV2.setStatus('current')
hpnicf_i_psec_tun_policy_num_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 32), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunPolicyNumV2.setStatus('current')
hpnicf_i_psec_tun_status_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 2, 1, 33), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('initial', 1), ('ready', 2), ('rekeyed', 3), ('closed', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunStatusV2.setStatus('current')
hpnicf_i_psec_tunnel_stat_v2_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3))
if mibBuilder.loadTexts:
hpnicfIPsecTunnelStatV2Table.setStatus('current')
hpnicf_i_psec_tunnel_stat_v2_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1)).setIndexNames((0, 'HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIndexV2'))
if mibBuilder.loadTexts:
hpnicfIPsecTunnelStatV2Entry.setStatus('current')
hpnicf_i_psec_tun_in_octets_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 1), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunInOctetsV2.setStatus('current')
hpnicf_i_psec_tun_in_decomp_octets_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 2), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunInDecompOctetsV2.setStatus('current')
hpnicf_i_psec_tun_in_pkts_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunInPktsV2.setStatus('current')
hpnicf_i_psec_tun_in_drop_pkts_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunInDropPktsV2.setStatus('current')
hpnicf_i_psec_tun_in_replay_drop_pkts_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 5), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunInReplayDropPktsV2.setStatus('current')
hpnicf_i_psec_tun_in_auth_fails_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 6), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunInAuthFailsV2.setStatus('current')
hpnicf_i_psec_tun_in_decrypt_fails_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 7), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunInDecryptFailsV2.setStatus('current')
hpnicf_i_psec_tun_out_octets_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 8), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunOutOctetsV2.setStatus('current')
hpnicf_i_psec_tun_out_uncomp_octets_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 9), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunOutUncompOctetsV2.setStatus('current')
hpnicf_i_psec_tun_out_pkts_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 10), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunOutPktsV2.setStatus('current')
hpnicf_i_psec_tun_out_drop_pkts_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 11), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunOutDropPktsV2.setStatus('current')
hpnicf_i_psec_tun_out_encrypt_fails_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 12), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunOutEncryptFailsV2.setStatus('current')
hpnicf_i_psec_tun_no_memory_drop_pkts_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 13), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunNoMemoryDropPktsV2.setStatus('current')
hpnicf_i_psec_tun_queue_full_drop_pkts_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 14), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunQueueFullDropPktsV2.setStatus('current')
hpnicf_i_psec_tun_invalid_len_drop_pkts_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 15), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunInvalidLenDropPktsV2.setStatus('current')
hpnicf_i_psec_tun_too_long_drop_pkts_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 16), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunTooLongDropPktsV2.setStatus('current')
hpnicf_i_psec_tun_invalid_sa_drop_pkts_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 3, 1, 17), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTunInvalidSaDropPktsV2.setStatus('current')
hpnicf_i_psec_sa_v2_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4))
if mibBuilder.loadTexts:
hpnicfIPsecSaV2Table.setStatus('current')
hpnicf_i_psec_sa_v2_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4, 1)).setIndexNames((0, 'HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIndexV2'), (0, 'HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecSaIndexV2'))
if mibBuilder.loadTexts:
hpnicfIPsecSaV2Entry.setStatus('current')
hpnicf_i_psec_sa_index_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
hpnicfIPsecSaIndexV2.setStatus('current')
hpnicf_i_psec_sa_direction_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('in', 1), ('out', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecSaDirectionV2.setStatus('current')
hpnicf_i_psec_sa_spi_value_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecSaSpiValueV2.setStatus('current')
hpnicf_i_psec_sa_sec_protocol_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4, 1, 4), hpnicf_i_psec_sa_protocol_v2()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecSaSecProtocolV2.setStatus('current')
hpnicf_i_psec_sa_encrypt_algo_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4, 1, 5), hpnicf_i_psec_encrypt_algo_v2()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecSaEncryptAlgoV2.setStatus('current')
hpnicf_i_psec_sa_auth_algo_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4, 1, 6), hpnicf_i_psec_auth_algo_v2()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecSaAuthAlgoV2.setStatus('current')
hpnicf_i_psec_sa_status_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 4, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('active', 1), ('expiring', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecSaStatusV2.setStatus('current')
hpnicf_i_psec_traffic_v2_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5))
if mibBuilder.loadTexts:
hpnicfIPsecTrafficV2Table.setStatus('current')
hpnicf_i_psec_traffic_v2_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1)).setIndexNames((0, 'HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIndexV2'))
if mibBuilder.loadTexts:
hpnicfIPsecTrafficV2Entry.setStatus('current')
hpnicf_i_psec_traffic_local_type_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 1), hpnicf_i_psec_traffic_type_v2()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficLocalTypeV2.setStatus('current')
hpnicf_i_psec_traffic_local_addr1_type_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 2), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficLocalAddr1TypeV2.setStatus('current')
hpnicf_i_psec_traffic_local_addr1_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 3), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficLocalAddr1V2.setStatus('current')
hpnicf_i_psec_traffic_local_addr2_type_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 4), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficLocalAddr2TypeV2.setStatus('current')
hpnicf_i_psec_traffic_local_addr2_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 5), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficLocalAddr2V2.setStatus('current')
hpnicf_i_psec_traffic_local_protocol1_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficLocalProtocol1V2.setStatus('current')
hpnicf_i_psec_traffic_local_protocol2_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficLocalProtocol2V2.setStatus('current')
hpnicf_i_psec_traffic_local_port1_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficLocalPort1V2.setStatus('current')
hpnicf_i_psec_traffic_local_port2_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficLocalPort2V2.setStatus('current')
hpnicf_i_psec_traffic_remote_type_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 10), hpnicf_i_psec_traffic_type_v2()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficRemoteTypeV2.setStatus('current')
hpnicf_i_psec_traffic_rem_addr1_type_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 11), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficRemAddr1TypeV2.setStatus('current')
hpnicf_i_psec_traffic_rem_addr1_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 12), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficRemAddr1V2.setStatus('current')
hpnicf_i_psec_traffic_rem_addr2_type_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 13), inet_address_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficRemAddr2TypeV2.setStatus('current')
hpnicf_i_psec_traffic_rem_addr2_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 14), inet_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficRemAddr2V2.setStatus('current')
hpnicf_i_psec_traffic_remo_pro1_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficRemoPro1V2.setStatus('current')
hpnicf_i_psec_traffic_remo_pro2_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 16), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficRemoPro2V2.setStatus('current')
hpnicf_i_psec_traffic_rem_port1_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 17), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficRemPort1V2.setStatus('current')
hpnicf_i_psec_traffic_rem_port2_v2 = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 5, 1, 18), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecTrafficRemPort2V2.setStatus('current')
hpnicf_i_psec_global_stats_v2 = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6))
hpnicf_i_psec_global_active_tunnels_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 1), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalActiveTunnelsV2.setStatus('current')
hpnicf_i_psec_global_active_sas_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 2), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalActiveSasV2.setStatus('current')
hpnicf_i_psec_global_in_octets_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalInOctetsV2.setStatus('current')
hpnicf_i_psec_global_in_decomp_octets_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalInDecompOctetsV2.setStatus('current')
hpnicf_i_psec_global_in_pkts_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 5), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalInPktsV2.setStatus('current')
hpnicf_i_psec_global_in_drops_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 6), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalInDropsV2.setStatus('current')
hpnicf_i_psec_global_in_replay_drops_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 7), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalInReplayDropsV2.setStatus('current')
hpnicf_i_psec_global_in_auth_fails_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 8), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalInAuthFailsV2.setStatus('current')
hpnicf_i_psec_global_in_decrypt_fails_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 9), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalInDecryptFailsV2.setStatus('current')
hpnicf_i_psec_global_out_octets_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 10), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalOutOctetsV2.setStatus('current')
hpnicf_i_psec_global_out_uncomp_octets_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 11), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalOutUncompOctetsV2.setStatus('current')
hpnicf_i_psec_global_out_pkts_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 12), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalOutPktsV2.setStatus('current')
hpnicf_i_psec_global_out_drops_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 13), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalOutDropsV2.setStatus('current')
hpnicf_i_psec_global_out_encrypt_fails_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 14), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalOutEncryptFailsV2.setStatus('current')
hpnicf_i_psec_global_no_memory_drops_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 15), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalNoMemoryDropsV2.setStatus('current')
hpnicf_i_psec_global_no_find_sa_drops_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 16), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalNoFindSaDropsV2.setStatus('current')
hpnicf_i_psec_global_queue_full_drops_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 17), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalQueueFullDropsV2.setStatus('current')
hpnicf_i_psec_global_invalid_len_drops_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 18), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalInvalidLenDropsV2.setStatus('current')
hpnicf_i_psec_global_too_long_drops_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 19), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalTooLongDropsV2.setStatus('current')
hpnicf_i_psec_global_invalid_sa_drops_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 6, 20), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfIPsecGlobalInvalidSaDropsV2.setStatus('current')
hpnicf_i_psec_trap_object_v2 = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 7))
hpnicf_i_psec_policy_name_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 7, 1), display_string()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
hpnicfIPsecPolicyNameV2.setStatus('current')
hpnicf_i_psec_policy_seq_num_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 7, 2), integer32()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
hpnicfIPsecPolicySeqNumV2.setStatus('current')
hpnicf_i_psec_policy_size_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 7, 3), integer32()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
hpnicfIPsecPolicySizeV2.setStatus('current')
hpnicf_i_psec_trap_cntl_v2 = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8))
hpnicf_i_psec_trap_global_cntl_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 1), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfIPsecTrapGlobalCntlV2.setStatus('current')
hpnicf_i_psec_tunnel_start_trap_cntl_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 2), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfIPsecTunnelStartTrapCntlV2.setStatus('current')
hpnicf_i_psec_tunnel_stop_trap_cntl_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 3), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfIPsecTunnelStopTrapCntlV2.setStatus('current')
hpnicf_i_psec_no_sa_trap_cntl_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 4), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfIPsecNoSaTrapCntlV2.setStatus('current')
hpnicf_i_psec_auth_failure_trap_cntl_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 5), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfIPsecAuthFailureTrapCntlV2.setStatus('current')
hpnicf_i_psec_encry_failure_trap_cntl_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 6), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfIPsecEncryFailureTrapCntlV2.setStatus('current')
hpnicf_i_psec_decry_failure_trap_cntl_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 7), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfIPsecDecryFailureTrapCntlV2.setStatus('current')
hpnicf_i_psec_invalid_sa_trap_cntl_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 8), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfIPsecInvalidSaTrapCntlV2.setStatus('current')
hpnicf_i_psec_policy_add_trap_cntl_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 9), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfIPsecPolicyAddTrapCntlV2.setStatus('current')
hpnicf_i_psec_policy_del_trap_cntl_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 10), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfIPsecPolicyDelTrapCntlV2.setStatus('current')
hpnicf_i_psec_policy_attach_trap_cntl_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 11), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfIPsecPolicyAttachTrapCntlV2.setStatus('current')
hpnicf_i_psec_policy_detach_trap_cntl_v2 = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 8, 12), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfIPsecPolicyDetachTrapCntlV2.setStatus('current')
hpnicf_i_psec_trap_v2 = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9))
hpnicf_i_psec_notifications_v2 = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0))
hpnicf_i_psec_tunnel_start_v2 = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 1)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIndexV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLocalAddrTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLocalAddrV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemoteAddrTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemoteAddrV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLifeTimeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLifeSizeV2'))
if mibBuilder.loadTexts:
hpnicfIPsecTunnelStartV2.setStatus('current')
hpnicf_i_psec_tunnel_stop_v2 = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 2)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIndexV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLocalAddrTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLocalAddrV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemoteAddrTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemoteAddrV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunActiveTimeV2'))
if mibBuilder.loadTexts:
hpnicfIPsecTunnelStopV2.setStatus('current')
hpnicf_i_psec_no_sa_failure_v2 = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 3)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIndexV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLocalAddrTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLocalAddrV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemoteAddrTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemoteAddrV2'))
if mibBuilder.loadTexts:
hpnicfIPsecNoSaFailureV2.setStatus('current')
hpnicf_i_psec_auth_fail_failure_v2 = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 4)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIndexV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLocalAddrTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLocalAddrV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemoteAddrTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemoteAddrV2'))
if mibBuilder.loadTexts:
hpnicfIPsecAuthFailFailureV2.setStatus('current')
hpnicf_i_psec_encry_fail_failure_v2 = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 5)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIndexV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLocalAddrTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLocalAddrV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemoteAddrTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemoteAddrV2'))
if mibBuilder.loadTexts:
hpnicfIPsecEncryFailFailureV2.setStatus('current')
hpnicf_i_psec_decry_fail_failure_v2 = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 6)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIndexV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLocalAddrTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLocalAddrV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemoteAddrTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemoteAddrV2'))
if mibBuilder.loadTexts:
hpnicfIPsecDecryFailFailureV2.setStatus('current')
hpnicf_i_psec_invalid_sa_failure_v2 = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 7)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIndexV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecSaIndexV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLocalAddrTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLocalAddrV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemoteAddrTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemoteAddrV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecSaSpiValueV2'))
if mibBuilder.loadTexts:
hpnicfIPsecInvalidSaFailureV2.setStatus('current')
hpnicf_i_psec_policy_add_v2 = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 8)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicyNameV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicySeqNumV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicySizeV2'))
if mibBuilder.loadTexts:
hpnicfIPsecPolicyAddV2.setStatus('current')
hpnicf_i_psec_policy_del_v2 = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 9)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicyNameV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicySeqNumV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicySizeV2'))
if mibBuilder.loadTexts:
hpnicfIPsecPolicyDelV2.setStatus('current')
hpnicf_i_psec_policy_attach_v2 = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 10)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicyNameV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicySizeV2'), ('IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
hpnicfIPsecPolicyAttachV2.setStatus('current')
hpnicf_i_psec_policy_detach_v2 = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 1, 9, 0, 11)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicyNameV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicySizeV2'), ('IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
hpnicfIPsecPolicyDetachV2.setStatus('current')
hpnicf_i_psec_conformance_v2 = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2))
hpnicf_i_psec_compliances_v2 = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 1))
hpnicf_i_psec_groups_v2 = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2))
hpnicf_i_psec_compliance_v2 = module_compliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 1, 1)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecScalarObjectsGroupV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunnelTableGroupV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunnelStatGroupV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecSaGroupV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficTableGroupV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalStatsGroupV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrapObjectGroupV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrapCntlGroupV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrapGroupV2'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicf_i_psec_compliance_v2 = hpnicfIPsecComplianceV2.setStatus('current')
hpnicf_i_psec_scalar_objects_group_v2 = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 1)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecMIBVersion'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicf_i_psec_scalar_objects_group_v2 = hpnicfIPsecScalarObjectsGroupV2.setStatus('current')
hpnicf_i_psec_tunnel_table_group_v2 = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 2)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIfIndexV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIKETunnelIndexV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIKETunLocalIDTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIKETunLocalIDVal1V2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIKETunLocalIDVal2V2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIKETunRemoteIDTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIKETunRemoteIDVal1V2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunIKETunRemoteIDVal2V2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLocalAddrTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLocalAddrV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemoteAddrTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemoteAddrV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunKeyTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunEncapModeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunInitiatorV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLifeSizeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunLifeTimeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemainTimeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunActiveTimeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunRemainSizeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunTotalRefreshesV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunCurrentSaInstancesV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunInSaEncryptAlgoV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunInSaAhAuthAlgoV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunInSaEspAuthAlgoV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunDiffHellmanGrpV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunOutSaEncryptAlgoV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunOutSaAhAuthAlgoV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunOutSaEspAuthAlgoV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunPolicyNameV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunPolicyNumV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunStatusV2'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicf_i_psec_tunnel_table_group_v2 = hpnicfIPsecTunnelTableGroupV2.setStatus('current')
hpnicf_i_psec_tunnel_stat_group_v2 = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 3)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunInOctetsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunInDecompOctetsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunInPktsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunInDropPktsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunInReplayDropPktsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunInAuthFailsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunInDecryptFailsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunOutOctetsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunOutUncompOctetsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunOutPktsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunOutDropPktsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunOutEncryptFailsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunNoMemoryDropPktsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunQueueFullDropPktsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunInvalidLenDropPktsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunTooLongDropPktsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunInvalidSaDropPktsV2'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicf_i_psec_tunnel_stat_group_v2 = hpnicfIPsecTunnelStatGroupV2.setStatus('current')
hpnicf_i_psec_sa_group_v2 = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 4)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecSaDirectionV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecSaSpiValueV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecSaSecProtocolV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecSaEncryptAlgoV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecSaAuthAlgoV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecSaStatusV2'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicf_i_psec_sa_group_v2 = hpnicfIPsecSaGroupV2.setStatus('current')
hpnicf_i_psec_traffic_table_group_v2 = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 5)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficLocalTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficLocalAddr1TypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficLocalAddr1V2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficLocalAddr2TypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficLocalAddr2V2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficLocalProtocol1V2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficLocalProtocol2V2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficLocalPort1V2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficLocalPort2V2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficRemoteTypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficRemAddr1TypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficRemAddr1V2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficRemAddr2TypeV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficRemAddr2V2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficRemoPro1V2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficRemoPro2V2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficRemPort1V2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrafficRemPort2V2'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicf_i_psec_traffic_table_group_v2 = hpnicfIPsecTrafficTableGroupV2.setStatus('current')
hpnicf_i_psec_global_stats_group_v2 = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 6)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalActiveTunnelsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalActiveSasV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalInOctetsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalInDecompOctetsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalInPktsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalInDropsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalInReplayDropsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalInAuthFailsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalInDecryptFailsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalOutOctetsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalOutUncompOctetsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalOutPktsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalOutDropsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalOutEncryptFailsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalNoMemoryDropsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalNoFindSaDropsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalQueueFullDropsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalInvalidLenDropsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalTooLongDropsV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecGlobalInvalidSaDropsV2'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicf_i_psec_global_stats_group_v2 = hpnicfIPsecGlobalStatsGroupV2.setStatus('current')
hpnicf_i_psec_trap_object_group_v2 = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 7)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicyNameV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicySeqNumV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicySizeV2'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicf_i_psec_trap_object_group_v2 = hpnicfIPsecTrapObjectGroupV2.setStatus('current')
hpnicf_i_psec_trap_cntl_group_v2 = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 8)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTrapGlobalCntlV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunnelStartTrapCntlV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunnelStopTrapCntlV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecNoSaTrapCntlV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecAuthFailureTrapCntlV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecEncryFailureTrapCntlV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecDecryFailureTrapCntlV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecInvalidSaTrapCntlV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicyAddTrapCntlV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicyDelTrapCntlV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicyAttachTrapCntlV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicyDetachTrapCntlV2'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicf_i_psec_trap_cntl_group_v2 = hpnicfIPsecTrapCntlGroupV2.setStatus('current')
hpnicf_i_psec_trap_group_v2 = notification_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 126, 2, 2, 9)).setObjects(('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunnelStartV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecTunnelStopV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecNoSaFailureV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecAuthFailFailureV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecEncryFailFailureV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecDecryFailFailureV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecInvalidSaFailureV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicyAddV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicyDelV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicyAttachV2'), ('HPN-ICF-IPSEC-MONITOR-V2-MIB', 'hpnicfIPsecPolicyDetachV2'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpnicf_i_psec_trap_group_v2 = hpnicfIPsecTrapGroupV2.setStatus('current')
mibBuilder.exportSymbols('HPN-ICF-IPSEC-MONITOR-V2-MIB', HpnicfIPsecSaProtocolV2=HpnicfIPsecSaProtocolV2, hpnicfIPsecTunInReplayDropPktsV2=hpnicfIPsecTunInReplayDropPktsV2, hpnicfIPsecTunnelStatV2Entry=hpnicfIPsecTunnelStatV2Entry, hpnicfIPsecTunTooLongDropPktsV2=hpnicfIPsecTunTooLongDropPktsV2, hpnicfIPsecTunnelTableGroupV2=hpnicfIPsecTunnelTableGroupV2, hpnicfIPsecTrafficRemoteTypeV2=hpnicfIPsecTrafficRemoteTypeV2, HpnicfIPsecAuthAlgoV2=HpnicfIPsecAuthAlgoV2, hpnicfIPsecTunOutPktsV2=hpnicfIPsecTunOutPktsV2, hpnicfIPsecNoSaFailureV2=hpnicfIPsecNoSaFailureV2, hpnicfIPsecEncryFailFailureV2=hpnicfIPsecEncryFailFailureV2, hpnicfIPsecTrafficLocalAddr2TypeV2=hpnicfIPsecTrafficLocalAddr2TypeV2, hpnicfIPsecSaDirectionV2=hpnicfIPsecSaDirectionV2, hpnicfIPsecTunTotalRefreshesV2=hpnicfIPsecTunTotalRefreshesV2, hpnicfIPsecTrafficLocalAddr2V2=hpnicfIPsecTrafficLocalAddr2V2, hpnicfIPsecPolicyAddV2=hpnicfIPsecPolicyAddV2, hpnicfIPsecSaAuthAlgoV2=hpnicfIPsecSaAuthAlgoV2, hpnicfIPsecGlobalOutPktsV2=hpnicfIPsecGlobalOutPktsV2, hpnicfIPsecTunNoMemoryDropPktsV2=hpnicfIPsecTunNoMemoryDropPktsV2, hpnicfIPsecTunLocalAddrTypeV2=hpnicfIPsecTunLocalAddrTypeV2, hpnicfIPsecDecryFailFailureV2=hpnicfIPsecDecryFailFailureV2, hpnicfIPsecSaGroupV2=hpnicfIPsecSaGroupV2, hpnicfIPsecTunOutUncompOctetsV2=hpnicfIPsecTunOutUncompOctetsV2, hpnicfIPsecTunInDecryptFailsV2=hpnicfIPsecTunInDecryptFailsV2, hpnicfIPsecTunInSaEspAuthAlgoV2=hpnicfIPsecTunInSaEspAuthAlgoV2, hpnicfIPsecGlobalInPktsV2=hpnicfIPsecGlobalInPktsV2, hpnicfIPsecGlobalOutEncryptFailsV2=hpnicfIPsecGlobalOutEncryptFailsV2, hpnicfIPsecGroupsV2=hpnicfIPsecGroupsV2, hpnicfIPsecPolicyNameV2=hpnicfIPsecPolicyNameV2, hpnicfIPsecTrafficRemAddr1TypeV2=hpnicfIPsecTrafficRemAddr1TypeV2, hpnicfIPsecTrafficRemPort1V2=hpnicfIPsecTrafficRemPort1V2, hpnicfIPsecMIBVersion=hpnicfIPsecMIBVersion, hpnicfIPsecTunIndexV2=hpnicfIPsecTunIndexV2, hpnicfIPsecTunnelStartV2=hpnicfIPsecTunnelStartV2, hpnicfIPsecGlobalInvalidSaDropsV2=hpnicfIPsecGlobalInvalidSaDropsV2, hpnicfIPsecTunRemainSizeV2=hpnicfIPsecTunRemainSizeV2, hpnicfIPsecTrafficRemAddr2TypeV2=hpnicfIPsecTrafficRemAddr2TypeV2, hpnicfIPsecTunInAuthFailsV2=hpnicfIPsecTunInAuthFailsV2, hpnicfIPsecGlobalTooLongDropsV2=hpnicfIPsecGlobalTooLongDropsV2, hpnicfIPsecInvalidSaTrapCntlV2=hpnicfIPsecInvalidSaTrapCntlV2, hpnicfIPsecTrafficRemPort2V2=hpnicfIPsecTrafficRemPort2V2, hpnicfIPsecGlobalInAuthFailsV2=hpnicfIPsecGlobalInAuthFailsV2, hpnicfIPsecTunOutDropPktsV2=hpnicfIPsecTunOutDropPktsV2, hpnicfIPsecPolicyAttachTrapCntlV2=hpnicfIPsecPolicyAttachTrapCntlV2, hpnicfIPsecTunDiffHellmanGrpV2=hpnicfIPsecTunDiffHellmanGrpV2, hpnicfIPsecTrafficLocalProtocol1V2=hpnicfIPsecTrafficLocalProtocol1V2, hpnicfIPsecTunnelV2Table=hpnicfIPsecTunnelV2Table, hpnicfIPsecTrapGroupV2=hpnicfIPsecTrapGroupV2, hpnicfIPsecTrafficRemAddr2V2=hpnicfIPsecTrafficRemAddr2V2, hpnicfIPsecTunQueueFullDropPktsV2=hpnicfIPsecTunQueueFullDropPktsV2, hpnicfIPsecTunKeyTypeV2=hpnicfIPsecTunKeyTypeV2, hpnicfIPsecTunInvalidSaDropPktsV2=hpnicfIPsecTunInvalidSaDropPktsV2, hpnicfIPsecGlobalOutUncompOctetsV2=hpnicfIPsecGlobalOutUncompOctetsV2, hpnicfIPsecTrafficTableGroupV2=hpnicfIPsecTrafficTableGroupV2, hpnicfIPsecTrafficRemoPro1V2=hpnicfIPsecTrafficRemoPro1V2, hpnicfIPsecTunPolicyNameV2=hpnicfIPsecTunPolicyNameV2, hpnicfIPsecTunInOctetsV2=hpnicfIPsecTunInOctetsV2, HpnicfIPsecDiffHellmanGrpV2=HpnicfIPsecDiffHellmanGrpV2, hpnicfIPsecSaIndexV2=hpnicfIPsecSaIndexV2, PYSNMP_MODULE_ID=hpnicfIPsecMonitorV2, hpnicfIPsecTunIfIndexV2=hpnicfIPsecTunIfIndexV2, hpnicfIPsecSaSecProtocolV2=hpnicfIPsecSaSecProtocolV2, hpnicfIPsecTunIKETunLocalIDVal1V2=hpnicfIPsecTunIKETunLocalIDVal1V2, hpnicfIPsecSaEncryptAlgoV2=hpnicfIPsecSaEncryptAlgoV2, hpnicfIPsecPolicySeqNumV2=hpnicfIPsecPolicySeqNumV2, hpnicfIPsecTunOutSaEncryptAlgoV2=hpnicfIPsecTunOutSaEncryptAlgoV2, hpnicfIPsecComplianceV2=hpnicfIPsecComplianceV2, hpnicfIPsecTunOutOctetsV2=hpnicfIPsecTunOutOctetsV2, hpnicfIPsecGlobalOutOctetsV2=hpnicfIPsecGlobalOutOctetsV2, hpnicfIPsecEncryFailureTrapCntlV2=hpnicfIPsecEncryFailureTrapCntlV2, hpnicfIPsecTunInDecompOctetsV2=hpnicfIPsecTunInDecompOctetsV2, hpnicfIPsecPolicyAttachV2=hpnicfIPsecPolicyAttachV2, hpnicfIPsecGlobalInOctetsV2=hpnicfIPsecGlobalInOctetsV2, hpnicfIPsecGlobalInReplayDropsV2=hpnicfIPsecGlobalInReplayDropsV2, hpnicfIPsecTunInSaEncryptAlgoV2=hpnicfIPsecTunInSaEncryptAlgoV2, hpnicfIPsecGlobalNoMemoryDropsV2=hpnicfIPsecGlobalNoMemoryDropsV2, hpnicfIPsecTrafficLocalAddr1V2=hpnicfIPsecTrafficLocalAddr1V2, hpnicfIPsecTrafficLocalAddr1TypeV2=hpnicfIPsecTrafficLocalAddr1TypeV2, hpnicfIPsecTunIKETunRemoteIDVal2V2=hpnicfIPsecTunIKETunRemoteIDVal2V2, hpnicfIPsecTunCurrentSaInstancesV2=hpnicfIPsecTunCurrentSaInstancesV2, hpnicfIPsecGlobalInDropsV2=hpnicfIPsecGlobalInDropsV2, hpnicfIPsecPolicyDelV2=hpnicfIPsecPolicyDelV2, hpnicfIPsecTrafficLocalPort1V2=hpnicfIPsecTrafficLocalPort1V2, hpnicfIPsecTunInvalidLenDropPktsV2=hpnicfIPsecTunInvalidLenDropPktsV2, hpnicfIPsecPolicyAddTrapCntlV2=hpnicfIPsecPolicyAddTrapCntlV2, hpnicfIPsecTrapV2=hpnicfIPsecTrapV2, hpnicfIPsecMonitorV2=hpnicfIPsecMonitorV2, hpnicfIPsecTrafficV2Table=hpnicfIPsecTrafficV2Table, hpnicfIPsecTunOutEncryptFailsV2=hpnicfIPsecTunOutEncryptFailsV2, hpnicfIPsecTrafficLocalTypeV2=hpnicfIPsecTrafficLocalTypeV2, hpnicfIPsecTrapObjectV2=hpnicfIPsecTrapObjectV2, hpnicfIPsecPolicyDetachV2=hpnicfIPsecPolicyDetachV2, hpnicfIPsecGlobalInvalidLenDropsV2=hpnicfIPsecGlobalInvalidLenDropsV2, hpnicfIPsecTunInSaAhAuthAlgoV2=hpnicfIPsecTunInSaAhAuthAlgoV2, hpnicfIPsecSaV2Table=hpnicfIPsecSaV2Table, hpnicfIPsecPolicySizeV2=hpnicfIPsecPolicySizeV2, hpnicfIPsecTunIKETunRemoteIDTypeV2=hpnicfIPsecTunIKETunRemoteIDTypeV2, hpnicfIPsecAuthFailureTrapCntlV2=hpnicfIPsecAuthFailureTrapCntlV2, hpnicfIPsecTunIKETunRemoteIDVal1V2=hpnicfIPsecTunIKETunRemoteIDVal1V2, hpnicfIPsecObjectsV2=hpnicfIPsecObjectsV2, hpnicfIPsecGlobalActiveSasV2=hpnicfIPsecGlobalActiveSasV2, hpnicfIPsecTunLifeSizeV2=hpnicfIPsecTunLifeSizeV2, hpnicfIPsecTrafficLocalProtocol2V2=hpnicfIPsecTrafficLocalProtocol2V2, hpnicfIPsecGlobalInDecompOctetsV2=hpnicfIPsecGlobalInDecompOctetsV2, hpnicfIPsecTrafficV2Entry=hpnicfIPsecTrafficV2Entry, HpnicfIPsecIDTypeV2=HpnicfIPsecIDTypeV2, hpnicfIPsecTunStatusV2=hpnicfIPsecTunStatusV2, hpnicfIPsecCompliancesV2=hpnicfIPsecCompliancesV2, HpnicfIPsecEncryptAlgoV2=HpnicfIPsecEncryptAlgoV2, hpnicfIPsecTrafficRemoPro2V2=hpnicfIPsecTrafficRemoPro2V2, hpnicfIPsecTrafficRemAddr1V2=hpnicfIPsecTrafficRemAddr1V2, hpnicfIPsecPolicyDelTrapCntlV2=hpnicfIPsecPolicyDelTrapCntlV2, hpnicfIPsecTunOutSaAhAuthAlgoV2=hpnicfIPsecTunOutSaAhAuthAlgoV2, hpnicfIPsecSaStatusV2=hpnicfIPsecSaStatusV2, hpnicfIPsecGlobalOutDropsV2=hpnicfIPsecGlobalOutDropsV2, hpnicfIPsecTunRemoteAddrTypeV2=hpnicfIPsecTunRemoteAddrTypeV2, hpnicfIPsecTrapObjectGroupV2=hpnicfIPsecTrapObjectGroupV2, hpnicfIPsecTunEncapModeV2=hpnicfIPsecTunEncapModeV2, hpnicfIPsecTunnelStatGroupV2=hpnicfIPsecTunnelStatGroupV2, hpnicfIPsecTunLifeTimeV2=hpnicfIPsecTunLifeTimeV2, hpnicfIPsecTunnelStopTrapCntlV2=hpnicfIPsecTunnelStopTrapCntlV2, hpnicfIPsecPolicyDetachTrapCntlV2=hpnicfIPsecPolicyDetachTrapCntlV2, hpnicfIPsecTunOutSaEspAuthAlgoV2=hpnicfIPsecTunOutSaEspAuthAlgoV2, HpnicfIPsecTrafficTypeV2=HpnicfIPsecTrafficTypeV2, hpnicfIPsecTunInitiatorV2=hpnicfIPsecTunInitiatorV2, hpnicfIPsecTunInPktsV2=hpnicfIPsecTunInPktsV2, hpnicfIPsecSaV2Entry=hpnicfIPsecSaV2Entry, hpnicfIPsecTunIKETunLocalIDVal2V2=hpnicfIPsecTunIKETunLocalIDVal2V2, hpnicfIPsecGlobalActiveTunnelsV2=hpnicfIPsecGlobalActiveTunnelsV2, hpnicfIPsecAuthFailFailureV2=hpnicfIPsecAuthFailFailureV2, hpnicfIPsecTunnelStatV2Table=hpnicfIPsecTunnelStatV2Table, hpnicfIPsecTunPolicyNumV2=hpnicfIPsecTunPolicyNumV2, hpnicfIPsecGlobalQueueFullDropsV2=hpnicfIPsecGlobalQueueFullDropsV2, HpnicfIPsecNegoTypeV2=HpnicfIPsecNegoTypeV2, hpnicfIPsecInvalidSaFailureV2=hpnicfIPsecInvalidSaFailureV2, hpnicfIPsecGlobalStatsGroupV2=hpnicfIPsecGlobalStatsGroupV2, hpnicfIPsecTunnelV2Entry=hpnicfIPsecTunnelV2Entry, hpnicfIPsecTunRemoteAddrV2=hpnicfIPsecTunRemoteAddrV2, HpnicfIPsecTunnelStateV2=HpnicfIPsecTunnelStateV2, hpnicfIPsecSaSpiValueV2=hpnicfIPsecSaSpiValueV2, hpnicfIPsecTunIKETunnelIndexV2=hpnicfIPsecTunIKETunnelIndexV2, hpnicfIPsecNoSaTrapCntlV2=hpnicfIPsecNoSaTrapCntlV2, hpnicfIPsecScalarObjectsGroupV2=hpnicfIPsecScalarObjectsGroupV2, hpnicfIPsecConformanceV2=hpnicfIPsecConformanceV2, hpnicfIPsecNotificationsV2=hpnicfIPsecNotificationsV2, HpnicfIPsecEncapModeV2=HpnicfIPsecEncapModeV2, hpnicfIPsecGlobalInDecryptFailsV2=hpnicfIPsecGlobalInDecryptFailsV2, hpnicfIPsecTrapCntlV2=hpnicfIPsecTrapCntlV2, hpnicfIPsecTunInDropPktsV2=hpnicfIPsecTunInDropPktsV2, hpnicfIPsecTunActiveTimeV2=hpnicfIPsecTunActiveTimeV2, hpnicfIPsecTrafficLocalPort2V2=hpnicfIPsecTrafficLocalPort2V2, hpnicfIPsecDecryFailureTrapCntlV2=hpnicfIPsecDecryFailureTrapCntlV2, hpnicfIPsecTrapGlobalCntlV2=hpnicfIPsecTrapGlobalCntlV2, hpnicfIPsecTunRemainTimeV2=hpnicfIPsecTunRemainTimeV2, hpnicfIPsecTrapCntlGroupV2=hpnicfIPsecTrapCntlGroupV2, hpnicfIPsecScalarObjectsV2=hpnicfIPsecScalarObjectsV2, hpnicfIPsecTunLocalAddrV2=hpnicfIPsecTunLocalAddrV2, hpnicfIPsecGlobalStatsV2=hpnicfIPsecGlobalStatsV2, hpnicfIPsecTunnelStartTrapCntlV2=hpnicfIPsecTunnelStartTrapCntlV2, hpnicfIPsecGlobalNoFindSaDropsV2=hpnicfIPsecGlobalNoFindSaDropsV2, hpnicfIPsecTunIKETunLocalIDTypeV2=hpnicfIPsecTunIKETunLocalIDTypeV2, hpnicfIPsecTunnelStopV2=hpnicfIPsecTunnelStopV2) |
# You are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the following definition:
# struct Node {
# int val;
# Node *left;
# Node *right;
# Node *next;
# }
# Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL.
# Initially, all next pointers are set to NULL.
# NOTE: Leetcode asks for soln using O(1) space. Look at leetcode discussions for this soln.
class Node:
def __init__(self, val, left, right, next):
self.val = val
self.left = left
self.right = right
self.next = next
class Solution:
def connect(self, root: 'Node') -> 'Node':
if not root:
return None
cur = root
level, nextLevel = [cur], []
while level:
for i in range(0, len(level) - 1):
level[i].next = level[i + 1]
for node in level:
if node.left:
nextLevel.append(node.left)
if node.right:
nextLevel.append(node.right)
level = nextLevel
nextLevel = []
return root
| class Node:
def __init__(self, val, left, right, next):
self.val = val
self.left = left
self.right = right
self.next = next
class Solution:
def connect(self, root: 'Node') -> 'Node':
if not root:
return None
cur = root
(level, next_level) = ([cur], [])
while level:
for i in range(0, len(level) - 1):
level[i].next = level[i + 1]
for node in level:
if node.left:
nextLevel.append(node.left)
if node.right:
nextLevel.append(node.right)
level = nextLevel
next_level = []
return root |
while 1:
while 1:
while 1:
break
break
break
| while 1:
while 1:
while 1:
break
break
break |
class Edge:
def __init__(self, src, dest, cost, vertex1, vertex2, wasser_cost=0):
self.src = src
self.dest = dest
self.cost = cost
self.vertex1 = vertex1
self.vertex2 = vertex2
self.wasser_cost = wasser_cost
| class Edge:
def __init__(self, src, dest, cost, vertex1, vertex2, wasser_cost=0):
self.src = src
self.dest = dest
self.cost = cost
self.vertex1 = vertex1
self.vertex2 = vertex2
self.wasser_cost = wasser_cost |
# Alexis Cumpstone
# Created: 2019
#This program extracts the coded word from the given string and prints, on
#one line, the word in all uppercase, all lowercase and in reverse.
encoded = "absbpstokyhopwok"
#Extract every 4th character from the string to form the 4 letter word
decoded = encoded[3::4]
wordAllUpper = decoded.upper()
wordAllLower = decoded.lower()
wordReverse = decoded[::-1]
print(wordAllUpper, wordAllLower, wordReverse)
| encoded = 'absbpstokyhopwok'
decoded = encoded[3::4]
word_all_upper = decoded.upper()
word_all_lower = decoded.lower()
word_reverse = decoded[::-1]
print(wordAllUpper, wordAllLower, wordReverse) |
#!/usr/bin/python3
def no_c(my_string):
str = ""
for i in my_string[:]:
if i != 'c' and i != 'C':
str += i
return (str)
| def no_c(my_string):
str = ''
for i in my_string[:]:
if i != 'c' and i != 'C':
str += i
return str |
# Funktion: max
def list_max(my_list):
result = my_list[0]
for i in range(1, len(my_list)):
wert = my_list[i]
if wert > result:
result = wert
return result
# Liste
l1 = [-2, 1, -10]
l2 = [-20, 123, 22]
# Funktionsaufruf
l1_max = list_max(l1)
l2_max = list_max(l2)
| def list_max(my_list):
result = my_list[0]
for i in range(1, len(my_list)):
wert = my_list[i]
if wert > result:
result = wert
return result
l1 = [-2, 1, -10]
l2 = [-20, 123, 22]
l1_max = list_max(l1)
l2_max = list_max(l2) |
'''
+------+-------+----------------+
| Item | Price | Special offers |
+------+-------+----------------+
| A | 50 | 3A for 130 |
| B | 30 | 2B for 45 |
| C | 20 | |
| D | 15 | |
+------+-------+----------------+
'''
def get_skus():
return {
'A': {'price':50, 'offers': [{'amount': 3, 'price': 130}]},
'B': {'price':30, 'offers': [{'amount': 2, 'price': 45}]},
'C': {'price':20, 'offers': []},
'D': {'price':15, 'offers': []}
}
# noinspection PyUnusedLocal
# skus = unicode string
def checkout(basket):
skus = get_skus()
if list(set(basket) - set(skus.keys())):
return -1
total_price = 0
for (sku, options) in skus.iteritems():
amount = basket.count(sku)
for offer in options['offers']:
while offer['amount'] <= amount:
total_price += offer['price']
amount -= offer['amount']
total_price += amount * options['price']
return total_price
| """
+------+-------+----------------+
| Item | Price | Special offers |
+------+-------+----------------+
| A | 50 | 3A for 130 |
| B | 30 | 2B for 45 |
| C | 20 | |
| D | 15 | |
+------+-------+----------------+
"""
def get_skus():
return {'A': {'price': 50, 'offers': [{'amount': 3, 'price': 130}]}, 'B': {'price': 30, 'offers': [{'amount': 2, 'price': 45}]}, 'C': {'price': 20, 'offers': []}, 'D': {'price': 15, 'offers': []}}
def checkout(basket):
skus = get_skus()
if list(set(basket) - set(skus.keys())):
return -1
total_price = 0
for (sku, options) in skus.iteritems():
amount = basket.count(sku)
for offer in options['offers']:
while offer['amount'] <= amount:
total_price += offer['price']
amount -= offer['amount']
total_price += amount * options['price']
return total_price |
## @package fib
#
# @author cognocoder.
# Fibonacci glued between Python and C++.
## Fibonacci list.
# @param n specifies the size of the list.
# @returns Returns a Fibonacci list with n elements.
# @throws ValeuError for negative values of n.
# @see {@link #fib.ifib ifib}, {@link #fib.bfib bfib}.
def fib(n):
try:
return ifib(n)
except TypeError:
return ifib(int(n))
## Recursive Fibonacci list.
# @param n specifies the size of the list.
# @returns Returns a Fibonacci list with n elements.
# @throws ValeuError for negative values of n.
# @see {@link #fib.bfib bfib}.
def ifib(n):
arr = bfib(n)
if n < 3:
return arr
while len(arr) < n:
arr.append(arr[-2] + arr[-1])
return arr
## Base Fibonacci list.
# @param n specifies the size of the list.
# @return Returns a base Fibonacci list.
# @throws ValeuError for negative values of n.
def bfib(n):
if n < 0:
raise ValueError("n must be a positve integer")
arr = []
if n == 0:
return arr
arr.append(0)
if n == 1:
return arr
# Base list size limit reached
arr.append(1)
return arr
| def fib(n):
try:
return ifib(n)
except TypeError:
return ifib(int(n))
def ifib(n):
arr = bfib(n)
if n < 3:
return arr
while len(arr) < n:
arr.append(arr[-2] + arr[-1])
return arr
def bfib(n):
if n < 0:
raise value_error('n must be a positve integer')
arr = []
if n == 0:
return arr
arr.append(0)
if n == 1:
return arr
arr.append(1)
return arr |
class console:
def log(*args, **kwargs):
print(*args, **kwargs)
console.log("Hello World")
| class Console:
def log(*args, **kwargs):
print(*args, **kwargs)
console.log('Hello World') |
# Number of terms till which the sequence needs to be printed
n = int(input())
a, b = 1, 1
count = 0
# We need to first check if the number is prime or not
def ifprime(n):
if n> 1:
for i in range(2, n// 2 + 1):
if (n % i) == 0:
return False
else:
return True
else:
return False
if n == 1:
print("Fibonacci sequence upto", n, ":")
print(a)
else:
while count < n:
if not ifprime(n1) and a % 5 != 0:
print(a, end=' ')
else:
print(0, end=' ')
sums = a + b
a = b
b = sums
count += 1
| n = int(input())
(a, b) = (1, 1)
count = 0
def ifprime(n):
if n > 1:
for i in range(2, n // 2 + 1):
if n % i == 0:
return False
else:
return True
else:
return False
if n == 1:
print('Fibonacci sequence upto', n, ':')
print(a)
else:
while count < n:
if not ifprime(n1) and a % 5 != 0:
print(a, end=' ')
else:
print(0, end=' ')
sums = a + b
a = b
b = sums
count += 1 |
class A(object):
__doc__ = 16
print(A.__doc__)
# <ref> | class A(object):
__doc__ = 16
print(A.__doc__) |
class SemesterNotFoundException(Exception):
# Invalid semester or module does not take place during the specified semester
def __init__(self, semester, *args):
super().__init__(args)
self.semester = semester
def __str__(self):
return f'No valid modules found for semester {self.semester}'
class YearNotFoundException(Exception):
# Invalid year
def __init__(self, year, *args):
super().__init__(args)
self.year = year
def __str__(self):
return f'No valid modules found for academic year {self.year}'
class CalendarOutOfRangeError(Exception):
# data for the year not present in database
def __init__(self, *args):
super().__init__(args)
def __str__(self):
return 'Current date does not fall within any given date boundaries'
| class Semesternotfoundexception(Exception):
def __init__(self, semester, *args):
super().__init__(args)
self.semester = semester
def __str__(self):
return f'No valid modules found for semester {self.semester}'
class Yearnotfoundexception(Exception):
def __init__(self, year, *args):
super().__init__(args)
self.year = year
def __str__(self):
return f'No valid modules found for academic year {self.year}'
class Calendaroutofrangeerror(Exception):
def __init__(self, *args):
super().__init__(args)
def __str__(self):
return 'Current date does not fall within any given date boundaries' |
# Working with strings
print("Hello world!")
# Combine strings
language = "Python"
print("I learning " + language)
# Convert to string
age = 23
print("I'm " + str(age) + " old.") | print('Hello world!')
language = 'Python'
print('I learning ' + language)
age = 23
print("I'm " + str(age) + ' old.') |
class Vertex:
def __init__(self, node):
self.id = node
self.cons = {}
def add_con(self, con, weight):
self.cons[con] = weight
def get_cons(self):
return self.cons.keys()
def get_id(self):
return self.id
def get_weight(self, con):
return self.cons[con]
class Graph:
def __init__(self):
self.verticies = {}
def add_vertex(self, node):
self.verticies[node] = Vertex(node)
return self.verticies[node]
def add_edge(self, frm, to, weight):
if frm not in self.verticies:
self.add_edge(frm)
if to not in self.verticies:
self.add_edge(to)
self.verticies[frm].add_con(self.verticies[to], weight)
self.verticies[to].add_con(self.verticies[frm], weight)
def get_verticies(self):
return self.verticies.keys() | class Vertex:
def __init__(self, node):
self.id = node
self.cons = {}
def add_con(self, con, weight):
self.cons[con] = weight
def get_cons(self):
return self.cons.keys()
def get_id(self):
return self.id
def get_weight(self, con):
return self.cons[con]
class Graph:
def __init__(self):
self.verticies = {}
def add_vertex(self, node):
self.verticies[node] = vertex(node)
return self.verticies[node]
def add_edge(self, frm, to, weight):
if frm not in self.verticies:
self.add_edge(frm)
if to not in self.verticies:
self.add_edge(to)
self.verticies[frm].add_con(self.verticies[to], weight)
self.verticies[to].add_con(self.verticies[frm], weight)
def get_verticies(self):
return self.verticies.keys() |
def solve():
fib = [1, 2]
even = [2]
while sum(fib[-2:]) <= 4000000:
number = sum(fib[-2:])
if number % 2:
even.append(number)
fib.append(number)
return sum(even)
def main():
print(f"{solve()=}")
if __name__ == "__main__":
main()
| def solve():
fib = [1, 2]
even = [2]
while sum(fib[-2:]) <= 4000000:
number = sum(fib[-2:])
if number % 2:
even.append(number)
fib.append(number)
return sum(even)
def main():
print(f'solve()={solve()!r}')
if __name__ == '__main__':
main() |
n = int(input())
a = list(map(int, input().split()))
cnt = [0] * 1010
for num in a:
cnt[num] += 1
for i in range(1, 1000 + 1):
if cnt[i] > 1:
print('No')
quit()
print('Yes')
| n = int(input())
a = list(map(int, input().split()))
cnt = [0] * 1010
for num in a:
cnt[num] += 1
for i in range(1, 1000 + 1):
if cnt[i] > 1:
print('No')
quit()
print('Yes') |
class Solution(object):
def reverse(self, x):
res = 0
ax = abs(x)
while ax != 0:
pop = ax % 10
ax = int(ax/10)
res = res * 10 + pop
if (x < 0):
res *= -1
return res
b = -123 % -10
a = Solution().reverse(-123) | class Solution(object):
def reverse(self, x):
res = 0
ax = abs(x)
while ax != 0:
pop = ax % 10
ax = int(ax / 10)
res = res * 10 + pop
if x < 0:
res *= -1
return res
b = -123 % -10
a = solution().reverse(-123) |
def bs_decode(binary: str, key: str) -> int:
sum = 0
last_idx = 0
for i, s in enumerate(binary):
if s == '0':
continue
elif s == '1':
sum += int(key[last_idx: i + 1])
last_idx = i + 1
else:
assert False
sum += int(key[last_idx:])
return sum
def binary_search(binary: str, key: str) -> int:
if len(binary) == len(key) - 1:
return bs_decode(binary, key)
else:
return binary_search(binary + '0', key) + binary_search(binary + '1', key)
def main():
S = input()
print(binary_search('', S))
if __name__ == "__main__":
main()
| def bs_decode(binary: str, key: str) -> int:
sum = 0
last_idx = 0
for (i, s) in enumerate(binary):
if s == '0':
continue
elif s == '1':
sum += int(key[last_idx:i + 1])
last_idx = i + 1
else:
assert False
sum += int(key[last_idx:])
return sum
def binary_search(binary: str, key: str) -> int:
if len(binary) == len(key) - 1:
return bs_decode(binary, key)
else:
return binary_search(binary + '0', key) + binary_search(binary + '1', key)
def main():
s = input()
print(binary_search('', S))
if __name__ == '__main__':
main() |
class ElementPositionBound(
ElementPositioning,
):
pass
| class Elementpositionbound(ElementPositioning):
pass |
counter = 0
#we go through two for loops
#first is for power
for i in range(1,50):
#and second is for number
for j in range(1,50):
#we turn j**i into string
#and if lenght of that string is equal to i (power)
if len(str(j**i)) == i:
#then counter increases by 1
counter += 1
#we print counter
print(counter) | counter = 0
for i in range(1, 50):
for j in range(1, 50):
if len(str(j ** i)) == i:
counter += 1
print(counter) |
class UnknownDeviceError(Exception):
pass
class DenyError(Exception):
pass
class WrongP1P2Error(Exception):
pass
class WrongDataLengthError(Exception):
pass
class InsNotSupportedError(Exception):
pass
class ClaNotSupportedError(Exception):
pass
class WrongResponseLengthError(Exception):
pass
class DisplayAddressFailError(Exception):
pass
class DisplayAmountFailError(Exception):
pass
class WrongTxLengthError(Exception):
pass
class TxParsingFailError(Exception):
pass
class TxHashFail(Exception):
pass
class BadStateError(Exception):
pass
class SignatureFailError(Exception):
pass
class TxRejectSignError(Exception):
pass
class BIP44BadPurposeError(Exception):
pass
class BIP44BadCoinTypeError(Exception):
pass
class BIP44BadAccountNotHardenedError(Exception):
pass
class BIP44BadAccountError(Exception):
pass
class BIP44BadBadChangeError(Exception):
pass
class BIP44BadAddressError(Exception):
pass
class MagicParsingError(Exception):
pass
class DisplaySystemFeeFailError(Exception):
pass
class DisplayNetworkFeeFailError(Exception):
pass
class DisplayTotalFeeFailError(Exception):
pass
class DisplayTransferAmountError(Exception):
pass
class ConvertToAddressFailError(Exception):
pass
| class Unknowndeviceerror(Exception):
pass
class Denyerror(Exception):
pass
class Wrongp1P2Error(Exception):
pass
class Wrongdatalengtherror(Exception):
pass
class Insnotsupportederror(Exception):
pass
class Clanotsupportederror(Exception):
pass
class Wrongresponselengtherror(Exception):
pass
class Displayaddressfailerror(Exception):
pass
class Displayamountfailerror(Exception):
pass
class Wrongtxlengtherror(Exception):
pass
class Txparsingfailerror(Exception):
pass
class Txhashfail(Exception):
pass
class Badstateerror(Exception):
pass
class Signaturefailerror(Exception):
pass
class Txrejectsignerror(Exception):
pass
class Bip44Badpurposeerror(Exception):
pass
class Bip44Badcointypeerror(Exception):
pass
class Bip44Badaccountnothardenederror(Exception):
pass
class Bip44Badaccounterror(Exception):
pass
class Bip44Badbadchangeerror(Exception):
pass
class Bip44Badaddresserror(Exception):
pass
class Magicparsingerror(Exception):
pass
class Displaysystemfeefailerror(Exception):
pass
class Displaynetworkfeefailerror(Exception):
pass
class Displaytotalfeefailerror(Exception):
pass
class Displaytransferamounterror(Exception):
pass
class Converttoaddressfailerror(Exception):
pass |
class SubscriberOne:
def __init__(self, name):
self.name = name
def update(self, message):
print('{} got message "{}"'.format(self.name, message))
class SubscriberTwo:
def __init__(self, name):
self.name = name
def receive(self, message):
print('{} got message "{}"'.format(self.name, message))
class Publisher:
def __init__(self):
self.subscribers = dict()
def register(self, who, callback=None):
if callback == None:
callback = getattr(who, 'update')
self.subscribers[who] = callback
def unregister(self, who):
del self.subscribers[who]
def dispatch(self, message):
for subscriber, callback in self.subscribers.items():
callback(message)
| class Subscriberone:
def __init__(self, name):
self.name = name
def update(self, message):
print('{} got message "{}"'.format(self.name, message))
class Subscribertwo:
def __init__(self, name):
self.name = name
def receive(self, message):
print('{} got message "{}"'.format(self.name, message))
class Publisher:
def __init__(self):
self.subscribers = dict()
def register(self, who, callback=None):
if callback == None:
callback = getattr(who, 'update')
self.subscribers[who] = callback
def unregister(self, who):
del self.subscribers[who]
def dispatch(self, message):
for (subscriber, callback) in self.subscribers.items():
callback(message) |
_help = "ping local machine" # help is always optional
name = "ping" # name must be defined if loading command using CommandModule
def ping():
print("Pong!")
| _help = 'ping local machine'
name = 'ping'
def ping():
print('Pong!') |
#-*- coding:utf-8 -*-
class QuickFind(object):
def __init__(self,objnum):
self.id=[i for i in range(0,objnum)]
def union(self,p,q):
qid=self.id[q]
pid=self.id[p]
j=0
for v in self.id:
if pid==v:
self.id[j]=qid
j=j+1
def connected(self,q,p):
return self.id[q]==self.id[p]
class QuickUnion(object):
def __init__(self,objnum):
self.id=[i for i in range(0,objnum)]
def _root(self,obj):
i=obj
while i!=self.id[i]:
i=self.id[i]
return i
def union(self,p,q):
qroot=self._root(q)
proot=self._root(p)
self.id[proot]=qroot
def connected(self,q,p):
return self._root(q)==self._root(p)
class QuickUnionWithWeighted(object):
r'''
quick union with weighted tree
'''
def __init__(self,objnum):
self.id=[i for i in range(0,objnum)]
self.sz=[0 for i in range(0,objnum)]
def _root(self,obj):
i=obj
while i!=self.id[i]:
i=self.id[i]
return i
def union(self,p,q):
qroot=self._root(q)
proot=self._root(p)
if self.sz[q]>=self.sz[p]:
self.id[proot]=qroot
self.sz[qroot]=self.sz[qroot]+self.sz[proot]
else:
self.id[qroot]=proot
self.sz[proot]+=self.sz[qroot]
def connected(self,q,p):
return self._root(q)==self._root(p)
if __name__=='__main__':
#uf=QuickFind(10)
#uf=QuickUnion(20)
uf=QuickUnionWithWeighted(20)
uf.union(1,4)
uf.union(0,9)
print('1 connected 4',uf.connected(1,4))
print('0 connected 9',uf.connected(0,9))
print('4 connected 3',uf.connected(4,3))
print(uf.id)
print('union 4 to 3')
uf.union(4,3)
print(uf.id)
print('4 connected 3',uf.connected(4,3))
print('1 connected 3',uf.connected(3,1))
| class Quickfind(object):
def __init__(self, objnum):
self.id = [i for i in range(0, objnum)]
def union(self, p, q):
qid = self.id[q]
pid = self.id[p]
j = 0
for v in self.id:
if pid == v:
self.id[j] = qid
j = j + 1
def connected(self, q, p):
return self.id[q] == self.id[p]
class Quickunion(object):
def __init__(self, objnum):
self.id = [i for i in range(0, objnum)]
def _root(self, obj):
i = obj
while i != self.id[i]:
i = self.id[i]
return i
def union(self, p, q):
qroot = self._root(q)
proot = self._root(p)
self.id[proot] = qroot
def connected(self, q, p):
return self._root(q) == self._root(p)
class Quickunionwithweighted(object):
"""
quick union with weighted tree
"""
def __init__(self, objnum):
self.id = [i for i in range(0, objnum)]
self.sz = [0 for i in range(0, objnum)]
def _root(self, obj):
i = obj
while i != self.id[i]:
i = self.id[i]
return i
def union(self, p, q):
qroot = self._root(q)
proot = self._root(p)
if self.sz[q] >= self.sz[p]:
self.id[proot] = qroot
self.sz[qroot] = self.sz[qroot] + self.sz[proot]
else:
self.id[qroot] = proot
self.sz[proot] += self.sz[qroot]
def connected(self, q, p):
return self._root(q) == self._root(p)
if __name__ == '__main__':
uf = quick_union_with_weighted(20)
uf.union(1, 4)
uf.union(0, 9)
print('1 connected 4', uf.connected(1, 4))
print('0 connected 9', uf.connected(0, 9))
print('4 connected 3', uf.connected(4, 3))
print(uf.id)
print('union 4 to 3')
uf.union(4, 3)
print(uf.id)
print('4 connected 3', uf.connected(4, 3))
print('1 connected 3', uf.connected(3, 1)) |
# parsetab_astmatch.py
# This file is automatically generated. Do not edit.
_tabversion = '3.2'
_lr_method = 'LALR'
_lr_signature = b'\x87\xfc\xcf\xdfD\xa2\x85\x13Hp\xa3\xe5Xz\xbcp'
_lr_action_items = {'SPECIAL':([0,2,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,],[-13,3,-13,-13,-13,-9,-8,-7,3,-6,3,3,3,-12,-13,-2,3,]),'OR':([0,2,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,],[-13,4,-13,-13,-13,-9,-8,-7,4,-6,4,4,4,-12,-13,-2,4,]),'NOT':([0,2,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,],[-13,5,-13,-13,-13,-9,-8,-7,5,-6,5,5,5,-12,-13,-2,5,]),'CODE':([0,2,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,],[-13,9,-13,-13,-13,-9,-8,-7,9,-6,9,9,9,-12,-13,-2,9,]),'LBK':([0,2,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,],[-13,6,-13,-13,-13,-9,-8,-7,6,-6,6,6,6,-12,-13,-2,6,]),'WORD':([3,],[11,]),'COMMA':([4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,],[-13,-13,-5,-9,-8,-7,-6,-10,-11,17,-3,-12,-13,-2,-4,]),'$end':([0,1,2,4,5,7,8,9,11,12,13,16,18,],[-13,0,-1,-13,-13,-9,-8,-7,-6,-10,-11,-12,-2,]),'RBK':([4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,],[-13,-13,-5,-9,-8,-7,-6,-10,-11,18,-3,-12,-13,-2,-4,]),'STAR':([0,2,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,],[-13,-13,-13,-13,-13,-9,-8,-7,16,-6,-10,-11,-13,-12,-13,-2,-13,]),}
_lr_action = { }
for _k, _v in _lr_action_items.items():
for _x,_y in zip(_v[0],_v[1]):
if not _x in _lr_action: _lr_action[_x] = { }
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'ast_match':([0,],[1,]),'ast_special':([2,10,12,13,15,19,],[8,8,8,8,8,8,]),'ast_exprlist':([6,],[14,]),'ast_expr':([0,2,4,5,6,10,12,13,15,17,19,],[2,10,12,13,15,10,10,10,10,19,10,]),'ast_set':([2,10,12,13,15,19,],[7,7,7,7,7,7,]),}
_lr_goto = { }
for _k, _v in _lr_goto_items.items():
for _x,_y in zip(_v[0],_v[1]):
if not _x in _lr_goto: _lr_goto[_x] = { }
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [
("S' -> ast_match","S'",1,None,None,None),
('ast_match -> ast_expr','ast_match',1,'p_ast_match','c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py',46),
('ast_set -> LBK ast_exprlist RBK','ast_set',3,'p_ast_set','c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py',52),
('ast_exprlist -> ast_expr','ast_exprlist',1,'p_ast_exprlist','c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py',60),
('ast_exprlist -> ast_exprlist COMMA ast_expr','ast_exprlist',3,'p_ast_exprlist','c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py',61),
('ast_exprlist -> <empty>','ast_exprlist',0,'p_ast_exprlist','c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py',62),
('ast_special -> SPECIAL WORD','ast_special',2,'p_ast_noderef','c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py',76),
('ast_expr -> ast_expr CODE','ast_expr',2,'p_ast_expr','c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py',82),
('ast_expr -> ast_expr ast_special','ast_expr',2,'p_ast_expr','c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py',83),
('ast_expr -> ast_expr ast_set','ast_expr',2,'p_ast_expr','c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py',84),
('ast_expr -> ast_expr OR ast_expr','ast_expr',3,'p_ast_expr','c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py',85),
('ast_expr -> ast_expr NOT ast_expr','ast_expr',3,'p_ast_expr','c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py',86),
('ast_expr -> ast_expr ast_expr STAR','ast_expr',3,'p_ast_expr','c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py',87),
('ast_expr -> <empty>','ast_expr',0,'p_ast_expr','c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py',88),
]
| _tabversion = '3.2'
_lr_method = 'LALR'
_lr_signature = b'\x87\xfc\xcf\xdfD\xa2\x85\x13Hp\xa3\xe5Xz\xbcp'
_lr_action_items = {'SPECIAL': ([0, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19], [-13, 3, -13, -13, -13, -9, -8, -7, 3, -6, 3, 3, 3, -12, -13, -2, 3]), 'OR': ([0, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19], [-13, 4, -13, -13, -13, -9, -8, -7, 4, -6, 4, 4, 4, -12, -13, -2, 4]), 'NOT': ([0, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19], [-13, 5, -13, -13, -13, -9, -8, -7, 5, -6, 5, 5, 5, -12, -13, -2, 5]), 'CODE': ([0, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19], [-13, 9, -13, -13, -13, -9, -8, -7, 9, -6, 9, 9, 9, -12, -13, -2, 9]), 'LBK': ([0, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19], [-13, 6, -13, -13, -13, -9, -8, -7, 6, -6, 6, 6, 6, -12, -13, -2, 6]), 'WORD': ([3], [11]), 'COMMA': ([4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19], [-13, -13, -5, -9, -8, -7, -6, -10, -11, 17, -3, -12, -13, -2, -4]), '$end': ([0, 1, 2, 4, 5, 7, 8, 9, 11, 12, 13, 16, 18], [-13, 0, -1, -13, -13, -9, -8, -7, -6, -10, -11, -12, -2]), 'RBK': ([4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19], [-13, -13, -5, -9, -8, -7, -6, -10, -11, 18, -3, -12, -13, -2, -4]), 'STAR': ([0, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19], [-13, -13, -13, -13, -13, -9, -8, -7, 16, -6, -10, -11, -13, -12, -13, -2, -13])}
_lr_action = {}
for (_k, _v) in _lr_action_items.items():
for (_x, _y) in zip(_v[0], _v[1]):
if not _x in _lr_action:
_lr_action[_x] = {}
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'ast_match': ([0], [1]), 'ast_special': ([2, 10, 12, 13, 15, 19], [8, 8, 8, 8, 8, 8]), 'ast_exprlist': ([6], [14]), 'ast_expr': ([0, 2, 4, 5, 6, 10, 12, 13, 15, 17, 19], [2, 10, 12, 13, 15, 10, 10, 10, 10, 19, 10]), 'ast_set': ([2, 10, 12, 13, 15, 19], [7, 7, 7, 7, 7, 7])}
_lr_goto = {}
for (_k, _v) in _lr_goto_items.items():
for (_x, _y) in zip(_v[0], _v[1]):
if not _x in _lr_goto:
_lr_goto[_x] = {}
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [("S' -> ast_match", "S'", 1, None, None, None), ('ast_match -> ast_expr', 'ast_match', 1, 'p_ast_match', 'c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py', 46), ('ast_set -> LBK ast_exprlist RBK', 'ast_set', 3, 'p_ast_set', 'c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py', 52), ('ast_exprlist -> ast_expr', 'ast_exprlist', 1, 'p_ast_exprlist', 'c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py', 60), ('ast_exprlist -> ast_exprlist COMMA ast_expr', 'ast_exprlist', 3, 'p_ast_exprlist', 'c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py', 61), ('ast_exprlist -> <empty>', 'ast_exprlist', 0, 'p_ast_exprlist', 'c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py', 62), ('ast_special -> SPECIAL WORD', 'ast_special', 2, 'p_ast_noderef', 'c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py', 76), ('ast_expr -> ast_expr CODE', 'ast_expr', 2, 'p_ast_expr', 'c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py', 82), ('ast_expr -> ast_expr ast_special', 'ast_expr', 2, 'p_ast_expr', 'c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py', 83), ('ast_expr -> ast_expr ast_set', 'ast_expr', 2, 'p_ast_expr', 'c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py', 84), ('ast_expr -> ast_expr OR ast_expr', 'ast_expr', 3, 'p_ast_expr', 'c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py', 85), ('ast_expr -> ast_expr NOT ast_expr', 'ast_expr', 3, 'p_ast_expr', 'c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py', 86), ('ast_expr -> ast_expr ast_expr STAR', 'ast_expr', 3, 'p_ast_expr', 'c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py', 87), ('ast_expr -> <empty>', 'ast_expr', 0, 'p_ast_expr', 'c:\\dev\\fairmotion\\tools\\extjs_cc\\js_ast_match.py', 88)] |
def print_max(a, b):
if a > b:
print(a, 'is maximum')
elif a == b:
print(a, 'is equal to', b)
else:
print(b, 'is maximum')
# directly pass literal values
print_max(3, 4)
x = 5
y = 7
# pass variables as arguments
print_max(x, y) | def print_max(a, b):
if a > b:
print(a, 'is maximum')
elif a == b:
print(a, 'is equal to', b)
else:
print(b, 'is maximum')
print_max(3, 4)
x = 5
y = 7
print_max(x, y) |
tags = [
{
"name": "droplet_tag",
"resources": {
"count": 10,
"last_tagged_uri": "https://api.digitalocean.com/v2/droplets/246753544",
"droplets": {
"count": 7,
"last_tagged_uri": "https://api.digitalocean.com/v2/droplets/246753544",
},
"images": {"count": 0},
"volumes": {"count": 0},
"volume_snapshots": {"count": 0},
"databases": {"count": 0},
},
},
{
"name": "image_tag",
"resources": {
"count": 6,
"last_tagged_uri": "https://api.digitalocean.com/v2/droplets/246753544",
"droplets": {
"count": 3,
"last_tagged_uri": "https://api.digitalocean.com/v2/droplets/246753544",
},
"images": {"count": 0},
"volumes": {
"count": 1,
"last_tagged_uri": "https://api.digitalocean.com/v2/volumes/0e811232-4ea5-11ec-b6b7-246753544456",
},
"volume_snapshots": {"count": 0},
"databases": {"count": 0},
},
},
{
"name": "volume_tag",
"resources": {
"count": 0,
"droplets": {"count": 0},
"images": {"count": 0},
"volumes": {"count": 0},
"volume_snapshots": {"count": 0},
"databases": {"count": 0},
},
},
{
"name": "snapshot_tag",
"resources": {
"count": 0,
"droplets": {"count": 0},
"images": {"count": 0},
"volumes": {"count": 0},
"volume_snapshots": {"count": 0},
"databases": {"count": 0},
},
},
{
"name": "database_tag",
"resources": {
"count": 1,
"last_tagged_uri": "https://api.digitalocean.com/v2/load_balancers/ce34912e-07e3-4bde-97ca-246753544f3e",
"droplets": {"count": 0},
"images": {"count": 0},
"volumes": {"count": 0},
"volume_snapshots": {"count": 0},
"databases": {"count": 0},
},
},
{
"name": "firewall_tag",
"resources": {
"count": 1,
"last_tagged_uri": "https://api.digitalocean.com/v2/load_balancers/ce34912e-07e3-4bde-97ca-246753544f3e",
"droplets": {"count": 0},
"images": {"count": 0},
"volumes": {"count": 0},
"volume_snapshots": {"count": 0},
"databases": {"count": 0},
},
},
]
| tags = [{'name': 'droplet_tag', 'resources': {'count': 10, 'last_tagged_uri': 'https://api.digitalocean.com/v2/droplets/246753544', 'droplets': {'count': 7, 'last_tagged_uri': 'https://api.digitalocean.com/v2/droplets/246753544'}, 'images': {'count': 0}, 'volumes': {'count': 0}, 'volume_snapshots': {'count': 0}, 'databases': {'count': 0}}}, {'name': 'image_tag', 'resources': {'count': 6, 'last_tagged_uri': 'https://api.digitalocean.com/v2/droplets/246753544', 'droplets': {'count': 3, 'last_tagged_uri': 'https://api.digitalocean.com/v2/droplets/246753544'}, 'images': {'count': 0}, 'volumes': {'count': 1, 'last_tagged_uri': 'https://api.digitalocean.com/v2/volumes/0e811232-4ea5-11ec-b6b7-246753544456'}, 'volume_snapshots': {'count': 0}, 'databases': {'count': 0}}}, {'name': 'volume_tag', 'resources': {'count': 0, 'droplets': {'count': 0}, 'images': {'count': 0}, 'volumes': {'count': 0}, 'volume_snapshots': {'count': 0}, 'databases': {'count': 0}}}, {'name': 'snapshot_tag', 'resources': {'count': 0, 'droplets': {'count': 0}, 'images': {'count': 0}, 'volumes': {'count': 0}, 'volume_snapshots': {'count': 0}, 'databases': {'count': 0}}}, {'name': 'database_tag', 'resources': {'count': 1, 'last_tagged_uri': 'https://api.digitalocean.com/v2/load_balancers/ce34912e-07e3-4bde-97ca-246753544f3e', 'droplets': {'count': 0}, 'images': {'count': 0}, 'volumes': {'count': 0}, 'volume_snapshots': {'count': 0}, 'databases': {'count': 0}}}, {'name': 'firewall_tag', 'resources': {'count': 1, 'last_tagged_uri': 'https://api.digitalocean.com/v2/load_balancers/ce34912e-07e3-4bde-97ca-246753544f3e', 'droplets': {'count': 0}, 'images': {'count': 0}, 'volumes': {'count': 0}, 'volume_snapshots': {'count': 0}, 'databases': {'count': 0}}}] |
# local imports
# project imports
# external imports
def mine(attributes, data):
sums = {}
counts = {}
averages = {}
for attribute in attributes:
sums[attribute] = float(0)
counts[attribute] = 0
for entry in data:
for attribute in attributes:
if entry[attribute] is not None:
sums[attribute] += entry[attribute]
counts[attribute] += 1
for attribute in attributes:
averages[attribute] = sums[attribute] / counts[attribute] if counts[attribute] > 0 else None
return averages
| def mine(attributes, data):
sums = {}
counts = {}
averages = {}
for attribute in attributes:
sums[attribute] = float(0)
counts[attribute] = 0
for entry in data:
for attribute in attributes:
if entry[attribute] is not None:
sums[attribute] += entry[attribute]
counts[attribute] += 1
for attribute in attributes:
averages[attribute] = sums[attribute] / counts[attribute] if counts[attribute] > 0 else None
return averages |
del_items(0x800A1318)
SetType(0x800A1318, "char StrDate[12]")
del_items(0x800A1324)
SetType(0x800A1324, "char StrTime[9]")
del_items(0x800A1330)
SetType(0x800A1330, "char *Words[118]")
del_items(0x800A1508)
SetType(0x800A1508, "struct MONTH_DAYS MonDays[12]")
| del_items(2148143896)
set_type(2148143896, 'char StrDate[12]')
del_items(2148143908)
set_type(2148143908, 'char StrTime[9]')
del_items(2148143920)
set_type(2148143920, 'char *Words[118]')
del_items(2148144392)
set_type(2148144392, 'struct MONTH_DAYS MonDays[12]') |
def method (a, n):
p = 1
x = a
while n != 0:
if n % 2 == 1:
p *= x
n = n // 2
x *= x
return p
print(method(3, 5))
| def method(a, n):
p = 1
x = a
while n != 0:
if n % 2 == 1:
p *= x
n = n // 2
x *= x
return p
print(method(3, 5)) |
rcparams = {
"svg.fonttype": "none",
"pdf.fonttype": 42,
"savefig.transparent": True,
"figure.figsize": (4, 4),
"axes.titlesize": 15,
"axes.titleweight": 500,
"axes.titlepad": 8.0,
"axes.labelsize": 14,
"axes.labelweight": 500,
"axes.linewidth": 1.2,
"axes.labelpad": 6.0,
"font.size": 11,
"font.family": "sans-serif",
"font.sans-serif": [
"Helvetica",
"Computer Modern Sans Serif",
"DejaVU Sans",
],
"font.weight": 500,
"xtick.labelsize": 12,
"xtick.minor.size": 1.375,
"xtick.major.size": 2.75,
"xtick.major.pad": 2,
"xtick.minor.pad": 2,
"ytick.labelsize": 12,
"ytick.minor.size": 1.375,
"ytick.major.size": 2.75,
"ytick.major.pad": 2,
"ytick.minor.pad": 2,
"legend.fontsize": 12,
"legend.handlelength": 1.4,
"legend.numpoints": 1,
"legend.scatterpoints": 3,
"legend.frameon": False,
"lines.linewidth": 1.7,
}
| rcparams = {'svg.fonttype': 'none', 'pdf.fonttype': 42, 'savefig.transparent': True, 'figure.figsize': (4, 4), 'axes.titlesize': 15, 'axes.titleweight': 500, 'axes.titlepad': 8.0, 'axes.labelsize': 14, 'axes.labelweight': 500, 'axes.linewidth': 1.2, 'axes.labelpad': 6.0, 'font.size': 11, 'font.family': 'sans-serif', 'font.sans-serif': ['Helvetica', 'Computer Modern Sans Serif', 'DejaVU Sans'], 'font.weight': 500, 'xtick.labelsize': 12, 'xtick.minor.size': 1.375, 'xtick.major.size': 2.75, 'xtick.major.pad': 2, 'xtick.minor.pad': 2, 'ytick.labelsize': 12, 'ytick.minor.size': 1.375, 'ytick.major.size': 2.75, 'ytick.major.pad': 2, 'ytick.minor.pad': 2, 'legend.fontsize': 12, 'legend.handlelength': 1.4, 'legend.numpoints': 1, 'legend.scatterpoints': 3, 'legend.frameon': False, 'lines.linewidth': 1.7} |
def conta_alertas_acude(lista):
cont=0
for i in range(len(lista)):
if lista[i]<17:
if i== 0:
if abs(lista[i]-17)<10:
cont+=1
else:
if abs(lista[i]-lista[i-1])<10:
cont+=1
return cont
| def conta_alertas_acude(lista):
cont = 0
for i in range(len(lista)):
if lista[i] < 17:
if i == 0:
if abs(lista[i] - 17) < 10:
cont += 1
elif abs(lista[i] - lista[i - 1]) < 10:
cont += 1
return cont |
#
# Main function with the simple pattern check
#
def main():
# First, we need to let the user enter the string
print("String pattern check with python!")
print("Please enter a string to validate: ")
strInput = input()
if (not validateStringInput(strInput)):
print("Invalid string entered. Please enter a string longer than one character!")
exit(-1)
print("What pattern do you want to check, against? Use * for multiple joker characters and ? for single joker characters.")
strPattern = input()
if (not validatePattern(strPattern)):
print("Ambiguous pattern entered. If * is followed by ? or ? is followed by *, the pattern is ambiguous!")
exit(-1)
# Next, we validate the string and return the results.
print("Validating string '%s'..." % strInput)
isMatch = ValidateStringAgainstPattern(strInput, strPattern)
isMatchString = "MATCHES" if isMatch else "does NOT MATCH"
print("The string %s %s the pattern %s!" % (strInput, isMatchString, strPattern))
def validateStringInput(toValidate):
if (not isinstance(toValidate, str)):
return False
if (len(toValidate) <= 1):
return False
if (toValidate.isspace()):
return False
return True
def validatePattern(toValidate):
if (("*?" in toValidate) or ("?*" in toValidate)):
return False
return True
def ValidateStringAgainstPattern(str, strPattern):
# Validate, if the first character of both strings are equal or if the first character of
# the pattern is a single-character joker. If so, we have a match and can continue to the next item in both,
# String and Pattern if there are more characters to validate.
if ((str[0] == strPattern[0]) or (strPattern[0] == '?')):
strLen = len(str)
patternLen = len(strPattern)
if strLen > 1 and patternLen > 1:
return ValidateStringAgainstPattern(str[1:len(str)], strPattern[1:len(strPattern)])
elif strLen == 1 and patternLen == 1:
return True
else:
return False
elif (strPattern[0] == '*'):
# Joker sign for multiple characters - let's see if we find pattern matches after the Joker.
# If we cannot find any match after the joker, the string does not match.
while len(str) > 1:
# The last character in the pattern string is the *-joker, hence we're good.
if len(strPattern) <= 1:
return True
# If the last character is not the *-joker, then we need to see, if we can find any pattern match after the joker.
# If so, we're good and have a matching string, but if not, we don't. We try to find any possible match after the joker
# since the border from the joker to the next section after the joker is not easily determined (i.e. ACCCCB to match A*CB).
if ValidateStringAgainstPattern(str, strPattern[1:len(strPattern)]):
return True
else:
str = str[1:len(str)]
else:
return False
if __name__ == "__main__":
main() | def main():
print('String pattern check with python!')
print('Please enter a string to validate: ')
str_input = input()
if not validate_string_input(strInput):
print('Invalid string entered. Please enter a string longer than one character!')
exit(-1)
print('What pattern do you want to check, against? Use * for multiple joker characters and ? for single joker characters.')
str_pattern = input()
if not validate_pattern(strPattern):
print('Ambiguous pattern entered. If * is followed by ? or ? is followed by *, the pattern is ambiguous!')
exit(-1)
print("Validating string '%s'..." % strInput)
is_match = validate_string_against_pattern(strInput, strPattern)
is_match_string = 'MATCHES' if isMatch else 'does NOT MATCH'
print('The string %s %s the pattern %s!' % (strInput, isMatchString, strPattern))
def validate_string_input(toValidate):
if not isinstance(toValidate, str):
return False
if len(toValidate) <= 1:
return False
if toValidate.isspace():
return False
return True
def validate_pattern(toValidate):
if '*?' in toValidate or '?*' in toValidate:
return False
return True
def validate_string_against_pattern(str, strPattern):
if str[0] == strPattern[0] or strPattern[0] == '?':
str_len = len(str)
pattern_len = len(strPattern)
if strLen > 1 and patternLen > 1:
return validate_string_against_pattern(str[1:len(str)], strPattern[1:len(strPattern)])
elif strLen == 1 and patternLen == 1:
return True
else:
return False
elif strPattern[0] == '*':
while len(str) > 1:
if len(strPattern) <= 1:
return True
if validate_string_against_pattern(str, strPattern[1:len(strPattern)]):
return True
else:
str = str[1:len(str)]
else:
return False
if __name__ == '__main__':
main() |
class TenantsV2(object):
def on_get(self, req, resp):
client = req.env['sl_client']
account = client['Account'].getObject()
tenants = [
{
'enabled': True,
'description': None,
'name': str(account['id']),
'id': str(account['id']),
},
]
resp.body = {'tenants': tenants, 'tenant_links': []}
| class Tenantsv2(object):
def on_get(self, req, resp):
client = req.env['sl_client']
account = client['Account'].getObject()
tenants = [{'enabled': True, 'description': None, 'name': str(account['id']), 'id': str(account['id'])}]
resp.body = {'tenants': tenants, 'tenant_links': []} |
def eg():
print ("eggo")
eg()
| def eg():
print('eggo')
eg() |
def binary_search(arr, first, last, x):
res = -1;
if last >= first:
while first <= last:
half = (first + last) // 2
if arr[half] == x:
res = half
return res
elif x > arr[half]:
first = half + 1
else:
last = half - 1
return res
else:
return res
| def binary_search(arr, first, last, x):
res = -1
if last >= first:
while first <= last:
half = (first + last) // 2
if arr[half] == x:
res = half
return res
elif x > arr[half]:
first = half + 1
else:
last = half - 1
return res
else:
return res |
def trans(o,beg,end):
if end>=beg:
mid=beg+(end-beg)//2
if((mid==end or o[mid+1]==0)and(o[mid]==1)):
return mid+1
if o[mid]==1:
return trans(o,(mid+1),end)
return trans(o,beg,mid-1)
else:
return 0
o=[int(x) for x in input('Enter NUMS seprated by space: ').split()]
print('No. 1s=',trans(o,0,len(o)-1))
| def trans(o, beg, end):
if end >= beg:
mid = beg + (end - beg) // 2
if (mid == end or o[mid + 1] == 0) and o[mid] == 1:
return mid + 1
if o[mid] == 1:
return trans(o, mid + 1, end)
return trans(o, beg, mid - 1)
else:
return 0
o = [int(x) for x in input('Enter NUMS seprated by space: ').split()]
print('No. 1s=', trans(o, 0, len(o) - 1)) |
optGeneric_template = '''
nSteps {nSteps}
nStepsInfoInterval {nStepsInterval}
nStepsWriteInterval {nStepsWrite}
nStepsBackupInterval {nStepsBackupInterval}
outPutFilePath {outPutFilePath}
outPutFormat {outPutFormat}
boxSize {boxX} {boxY} {boxZ}
T {temperature}
h {steepestDecentScale}
nStepsSteepestDescent {nStepsSteepestDescent}
nStepsSteepestDescentProgressInterval {nStepsSteepestDescentProgressInterval}
maxObjectiveForce {maxObjectiveForce}
dt {timeStep}
frictionConstant {frictionConstant}
cutOffDst {cutOffDst}
VerletListDst {VerletListDst}
inputCoordPath {inputCoordFile}
inputTopologyPath {inputTopFile}'''
optGenericWithElec_template = optGeneric_template+'''
dielectricConstant {dielectricConstant}
debyeLength {debyeLength}
'''
optGenericWithSurface_template = optGenericWithElec_template+'''
epsilonSurf {epsilonSurf}
sigmaSurf {sigmaSurf}
surfacePosition {surfacePosition}
'''
optGenericClash_template = optGeneric_template+'''
lambda {lambd}
gamma {gamma}
'''
optGenericClashWithCompression_template = optGenericClash_template+'''
initialSphereRadius {initialSphereRadius}
minimalSphereRadius {minimalSphereRadius}
compressionVelocity {compressionVelocity}
'''
optAFM_template = optGenericWithSurface_template+'''
frictionConstantTip {frictionConstantTip}
initialTipSampleDst {initialTipSampleDst}
descentVelocity {descentVelocity}
minimalChipHeight {minimalChipHeight}
Mtip {Mtip}
Rtip {Rtip}
Kxytip {Kxytip}
Ktip {Ktip}
epsilonTip {epsilonTip}
sigmaTip {sigmaTip}
Atip {Atip}
Btip {Btip}
epsilonTipSurf {epsilonTipSurf}
sigmaTipSurf {sigmaTipSurf}
ATipSurf {ATipSurf}
BTipSurf {BTipSurf}
nStepsIndentMeasure {nStepsIndentMeasure}
outputIndentationMeasureFilePath {outputIndentationMeasureFilePath}
'''
optGenericUmbrella_template = optGenericWithElec_template+'''
umbrellaK {umbrellaK}
umbrellaInit {umbrellaInit}
umbrellaEnd {umbrellaEnd}
umbrellaWindowsNumber {umbrellaWindowsNumber}
umbrellaCopies {umbrellaCopies}
nStepsUmbrellaMeasure {nStepsUmbrellaMeasure}
outputUmbrellaMeasureFilePath {outputUmbrellaMeasureFilePath}
'''
def writeOptionsGeneric(path:str,
nSteps:int,
nStepsInterval:int,
nStepsWrite:int,
nStepsBackupInterval:int,
outPutFilePath:str,
outPutFormat:str,
boxX:float,boxY:float,boxZ:float,
temperature:float,
steepestDecentScale:float,
nStepsSteepestDescent:int,
nStepsSteepestDescentProgressInterval:int,
maxObjectiveForce:float,
timeStep:float,
frictionConstant:float,
cutOffDst:float,
VerletListDst:float,
dielectricConstant:float,
debyeLength:float,
inputCoordFile:str,
inputTopFile:str):
opt = optGenericWithElec_template.format(nSteps=nSteps,
nStepsInterval=nStepsInterval,
nStepsWrite=nStepsWrite,
nStepsBackupInterval=nStepsBackupInterval,
outPutFilePath=outPutFilePath,
outPutFormat=outPutFormat,
boxX=boxX,boxY=boxY,boxZ=boxZ,
temperature=temperature,
steepestDecentScale=steepestDecentScale,
nStepsSteepestDescent=nStepsSteepestDescent,
nStepsSteepestDescentProgressInterval=nStepsSteepestDescentProgressInterval,
maxObjectiveForce=maxObjectiveForce,
timeStep=timeStep,
frictionConstant=frictionConstant,
cutOffDst=cutOffDst,
VerletListDst=VerletListDst,
dielectricConstant=dielectricConstant,
debyeLength=debyeLength,
inputCoordFile=inputCoordFile,
inputTopFile=inputTopFile)
with open(path,"w") as f:
f.write(opt)
def writeOptionsGenericFromDict(path,optionsDict):
nSteps=optionsDict["nSteps"]
nStepsInterval=optionsDict["nStepsInterval"]
nStepsWrite=optionsDict["nStepsWrite"]
nStepsBackupInterval=optionsDict["nStepsBackupInterval"]
outPutFilePath=optionsDict["outPutFilePath"]
outPutFormat=optionsDict["outPutFormat"]
boxX=optionsDict["boxX"]
boxY=optionsDict["boxY"]
boxZ=optionsDict["boxZ"]
temperature=optionsDict["temperature"]
steepestDecentScale=optionsDict["steepestDecentScale"]
nStepsSteepestDescent=optionsDict["nStepsSteepestDescent"]
nStepsSteepestDescentProgressInterval=optionsDict["nStepsSteepestDescentProgressInterval"]
maxObjectiveForce=optionsDict["maxObjectiveForce"]
timeStep=optionsDict["timeStep"]
frictionConstant=optionsDict["frictionConstant"]
cutOffDst=optionsDict["cutOffDst"]
VerletListDst=optionsDict["VerletListDst"]
dielectricConstant=optionsDict["dielectricConstant"]
debyeLength=optionsDict["debyeLength"]
inputCoordFile=optionsDict["inputCoordFile"]
inputTopFile=optionsDict["inputTopFile"]
writeOptionsGeneric(path,
nSteps,
nStepsInterval,
nStepsWrite,
nStepsBackupInterval,
outPutFilePath,
outPutFormat,
boxX,boxY,boxZ,
temperature,
steepestDecentScale,
nStepsSteepestDescent,
nStepsSteepestDescentProgressInterval,
maxObjectiveForce,
timeStep,
frictionConstant,
cutOffDst,
VerletListDst,
dielectricConstant,
debyeLength,
inputCoordFile,
inputTopFile)
def writeOptionsGenericWithSurface(path:str,
nSteps:int,
nStepsInterval:int,
nStepsWrite:int,
nStepsBackupInterval:int,
outPutFilePath:str,
outPutFormat:str,
boxX:float,boxY:float,boxZ:float,
temperature:float,
steepestDecentScale:float,
nStepsSteepestDescent:int,
nStepsSteepestDescentProgressInterval:int,
maxObjectiveForce:float,
timeStep:float,
frictionConstant:float,
cutOffDst:float,
VerletListDst:float,
dielectricConstant:float,
debyeLength:float,
inputCoordFile:str,
inputTopFile:str,
epsilonSurf:float,
sigmaSurf:float,
surfacePosition:float):
opt = optGenericWithSurface_template.format(nSteps=nSteps,
nStepsInterval=nStepsInterval,
nStepsWrite=nStepsWrite,
nStepsBackupInterval=nStepsBackupInterval,
outPutFilePath=outPutFilePath,
outPutFormat=outPutFormat,
boxX=boxX,boxY=boxY,boxZ=boxZ,
temperature=temperature,
steepestDecentScale=steepestDecentScale,
nStepsSteepestDescent=nStepsSteepestDescent,
nStepsSteepestDescentProgressInterval=nStepsSteepestDescentProgressInterval,
maxObjectiveForce=maxObjectiveForce,
timeStep=timeStep,
frictionConstant=frictionConstant,
cutOffDst=cutOffDst,
VerletListDst=VerletListDst,
dielectricConstant=dielectricConstant,
debyeLength=debyeLength,
inputCoordFile=inputCoordFile,
inputTopFile=inputTopFile,
epsilonSurf=epsilonSurf,
sigmaSurf=sigmaSurf,
surfacePosition=surfacePosition)
with open(path,"w") as f:
f.write(opt)
def writeOptionsGenericWithSurfaceFromDict(path,optionsDict):
nSteps=optionsDict["nSteps"]
nStepsInterval=optionsDict["nStepsInterval"]
nStepsWrite=optionsDict["nStepsWrite"]
nStepsBackupInterval=optionsDict["nStepsBackupInterval"]
outPutFilePath=optionsDict["outPutFilePath"]
outPutFormat=optionsDict["outPutFormat"]
boxX=optionsDict["boxX"]
boxY=optionsDict["boxY"]
boxZ=optionsDict["boxZ"]
temperature=optionsDict["temperature"]
steepestDecentScale=optionsDict["steepestDecentScale"]
nStepsSteepestDescent=optionsDict["nStepsSteepestDescent"]
nStepsSteepestDescentProgressInterval=optionsDict["nStepsSteepestDescentProgressInterval"]
maxObjectiveForce=optionsDict["maxObjectiveForce"]
timeStep=optionsDict["timeStep"]
frictionConstant=optionsDict["frictionConstant"]
cutOffDst=optionsDict["cutOffDst"]
VerletListDst=optionsDict["VerletListDst"]
inputCoordFile=optionsDict["inputCoordFile"]
dielectricConstant=optionsDict["dielectricConstant"]
debyeLength=optionsDict["debyeLength"]
inputTopFile=optionsDict["inputTopFile"]
epsilonSurf=optionsDict["epsilonSurf"]
sigmaSurf=optionsDict["sigmaSurf"]
surfacePosition=optionsDict["surfacePosition"]
writeOptionsGenericWithSurface(path,
nSteps,
nStepsInterval,
nStepsWrite,
nStepsBackupInterval,
outPutFilePath,
outPutFormat,
boxX,boxY,boxZ,
temperature,
steepestDecentScale,
nStepsSteepestDescent,
nStepsSteepestDescentProgressInterval,
maxObjectiveForce,
timeStep,
frictionConstant,
cutOffDst,
VerletListDst,
dielectricConstant,
debyeLength,
inputCoordFile,
inputTopFile,
epsilonSurf,
sigmaSurf,
surfacePosition)
def writeOptionsGenericClash(path:str,
nSteps:int,
nStepsInterval:int,
nStepsWrite:int,
nStepsBackupInterval:int,
outPutFilePath:str,
outPutFormat:str,
boxX:float,boxY:float,boxZ:float,
temperature:float,
steepestDecentScale:float,
nStepsSteepestDescent:int,
nStepsSteepestDescentProgressInterval:int,
maxObjectiveForce:float,
timeStep:float,
frictionConstant:float,
cutOffDst:float,
VerletListDst:float,
inputCoordFile:str,
inputTopFile:str,
lambd:float,
gamma:float):
opt = optGenericClash_template.format(nSteps=nSteps,
nStepsInterval=nStepsInterval,
nStepsWrite=nStepsWrite,
nStepsBackupInterval=nStepsBackupInterval,
outPutFilePath=outPutFilePath,
outPutFormat=outPutFormat,
boxX=boxX,boxY=boxY,boxZ=boxZ,
temperature=temperature,
steepestDecentScale=steepestDecentScale,
nStepsSteepestDescent=nStepsSteepestDescent,
nStepsSteepestDescentProgressInterval=nStepsSteepestDescentProgressInterval,
maxObjectiveForce=maxObjectiveForce,
timeStep=timeStep,
frictionConstant=frictionConstant,
cutOffDst=cutOffDst,
VerletListDst=VerletListDst,
inputCoordFile=inputCoordFile,
inputTopFile=inputTopFile,
lambd=lambd,
gamma=gamma)
with open(path,"w") as f:
f.write(opt)
def writeOptionsGenericClashFromDict(path,optionsDict):
nSteps=optionsDict["nSteps"]
nStepsInterval=optionsDict["nStepsInterval"]
nStepsWrite=optionsDict["nStepsWrite"]
nStepsBackupInterval=optionsDict["nStepsBackupInterval"]
outPutFilePath=optionsDict["outPutFilePath"]
outPutFormat=optionsDict["outPutFormat"]
boxX=optionsDict["boxX"]
boxY=optionsDict["boxY"]
boxZ=optionsDict["boxZ"]
temperature=optionsDict["temperature"]
steepestDecentScale=optionsDict["steepestDecentScale"]
nStepsSteepestDescent=optionsDict["nStepsSteepestDescent"]
nStepsSteepestDescentProgressInterval=optionsDict["nStepsSteepestDescentProgressInterval"]
maxObjectiveForce=optionsDict["maxObjectiveForce"]
timeStep=optionsDict["timeStep"]
frictionConstant=optionsDict["frictionConstant"]
cutOffDst=optionsDict["cutOffDst"]
VerletListDst=optionsDict["VerletListDst"]
inputCoordFile=optionsDict["inputCoordFile"]
inputTopFile=optionsDict["inputTopFile"]
lambd=optionsDict["lambd"]
gamma=optionsDict["gamma"]
writeOptionsGenericClash(path,
nSteps,
nStepsInterval,
nStepsWrite,
nStepsBackupInterval,
outPutFilePath,
outPutFormat,
boxX,boxY,boxZ,
temperature,
steepestDecentScale,
nStepsSteepestDescent,
nStepsSteepestDescentProgressInterval,
maxObjectiveForce,
timeStep,
frictionConstant,
cutOffDst,
VerletListDst,
inputCoordFile,
inputTopFile,
lambd,
gamma)
def writeOptionsGenericClashWithCompression(path:str,
nSteps:int,
nStepsInterval:int,
nStepsWrite:int,
nStepsBackupInterval:int,
outPutFilePath:str,
outPutFormat:str,
boxX:float,boxY:float,boxZ:float,
temperature:float,
steepestDecentScale:float,
nStepsSteepestDescent:int,
nStepsSteepestDescentProgressInterval:int,
maxObjectiveForce:float,
timeStep:float,
frictionConstant:float,
cutOffDst:float,
VerletListDst:float,
inputCoordFile:str,
inputTopFile:str,
lambd:float,
gamma:float,
initialSphereRadius:float,
minimalSphereRadius:float,
compressionVelocity:float):
opt = optGenericClashWithCompression_template.format(nSteps=nSteps,
nStepsInterval=nStepsInterval,
nStepsWrite=nStepsWrite,
nStepsBackupInterval=nStepsBackupInterval,
outPutFilePath=outPutFilePath,
outPutFormat=outPutFormat,
boxX=boxX,boxY=boxY,boxZ=boxZ,
temperature=temperature,
steepestDecentScale=steepestDecentScale,
nStepsSteepestDescent=nStepsSteepestDescent,
nStepsSteepestDescentProgressInterval=nStepsSteepestDescentProgressInterval,
maxObjectiveForce=maxObjectiveForce,
timeStep=timeStep,
frictionConstant=frictionConstant,
cutOffDst=cutOffDst,
VerletListDst=VerletListDst,
inputCoordFile=inputCoordFile,
inputTopFile=inputTopFile,
lambd=lambd,
gamma=gamma,
initialSphereRadius=initialSphereRadius,
minimalSphereRadius=minimalSphereRadius,
compressionVelocity=compressionVelocity)
with open(path,"w") as f:
f.write(opt)
def writeOptionsGenericClashWithCompressionFromDict(path,optionsDict):
nSteps=optionsDict["nSteps"]
nStepsInterval=optionsDict["nStepsInterval"]
nStepsWrite=optionsDict["nStepsWrite"]
nStepsBackupInterval=optionsDict["nStepsBackupInterval"]
outPutFilePath=optionsDict["outPutFilePath"]
outPutFormat=optionsDict["outPutFormat"]
boxX=optionsDict["boxX"]
boxY=optionsDict["boxY"]
boxZ=optionsDict["boxZ"]
temperature=optionsDict["temperature"]
steepestDecentScale=optionsDict["steepestDecentScale"]
nStepsSteepestDescent=optionsDict["nStepsSteepestDescent"]
nStepsSteepestDescentProgressInterval=optionsDict["nStepsSteepestDescentProgressInterval"]
maxObjectiveForce=optionsDict["maxObjectiveForce"]
timeStep=optionsDict["timeStep"]
frictionConstant=optionsDict["frictionConstant"]
cutOffDst=optionsDict["cutOffDst"]
VerletListDst=optionsDict["VerletListDst"]
inputCoordFile=optionsDict["inputCoordFile"]
inputTopFile=optionsDict["inputTopFile"]
lambd=optionsDict["lambd"]
gamma=optionsDict["gamma"]
initialSphereRadius=optionsDict["initialSphereRadius"]
minimalSphereRadius=optionsDict["minimalSphereRadius"]
compressionVelocity=optionsDict["compressionVelocity"]
writeOptionsGenericClashWithCompression(path,
nSteps,
nStepsInterval,
nStepsWrite,
nStepsBackupInterval,
outPutFilePath,
outPutFormat,
boxX,boxY,boxZ,
temperature,
steepestDecentScale,
nStepsSteepestDescent,
nStepsSteepestDescentProgressInterval,
maxObjectiveForce,
timeStep,
frictionConstant,
cutOffDst,
VerletListDst,
inputCoordFile,
inputTopFile,
lambd,
gamma,
initialSphereRadius,
minimalSphereRadius,
compressionVelocity)
def writeOptionsAFM(path:str,
nSteps:int,
nStepsInterval:int,
nStepsWrite:int,
nStepsBackupInterval:int,
outPutFilePath:str,
outPutFormat:str,
boxX:float,boxY:float,boxZ:float,
temperature:float,
steepestDecentScale:float,
nStepsSteepestDescent:int,
nStepsSteepestDescentProgressInterval:int,
maxObjectiveForce:float,
timeStep:float,
frictionConstant:float,
frictionConstantTip:float,
cutOffDst:float,
VerletListDst:float,
dielectricConstant:float,
debyeLength:float,
inputCoordFile:str,
inputTopFile:str,
epsilonSurf:float,
sigmaSurf:float,
surfacePosition:float,
initialTipSampleDst:float,
descentVelocity:float,
minimalChipHeight:float,
Mtip:float,
Rtip:float,
Kxytip:float,
Ktip:float,
epsilonTip:float,
sigmaTip:float,
Atip:float,
Btip:float,
epsilonTipSurf:float,
sigmaTipSurf :float,
ATipSurf:float,
BTipSurf:float,
nStepsIndentMeasure:str,
outputIndentationMeasureFilePath:str):
opt = optAFM_template.format(nSteps=nSteps,
nStepsInterval=nStepsInterval,
nStepsWrite=nStepsWrite,
nStepsBackupInterval=nStepsBackupInterval,
outPutFilePath=outPutFilePath,
outPutFormat=outPutFormat,
boxX=boxX,boxY=boxY,boxZ=boxZ,
temperature=temperature,
steepestDecentScale=steepestDecentScale,
nStepsSteepestDescent=nStepsSteepestDescent,
nStepsSteepestDescentProgressInterval=nStepsSteepestDescentProgressInterval,
maxObjectiveForce=maxObjectiveForce,
timeStep=timeStep,
frictionConstant=frictionConstant,
frictionConstantTip=frictionConstantTip,
cutOffDst=cutOffDst,
VerletListDst=VerletListDst,
dielectricConstant=dielectricConstant,
debyeLength=debyeLength,
inputCoordFile=inputCoordFile,
inputTopFile=inputTopFile,
epsilonSurf=epsilonSurf,
sigmaSurf=sigmaSurf,
surfacePosition=surfacePosition,
initialTipSampleDst=initialTipSampleDst,
descentVelocity=descentVelocity,
minimalChipHeight=minimalChipHeight,
Mtip=Mtip,
Rtip=Rtip,
Kxytip=Kxytip,
Ktip=Ktip,
epsilonTip=epsilonTip,
sigmaTip=sigmaTip,
Atip=Atip,
Btip=Btip,
epsilonTipSurf=epsilonTipSurf,
sigmaTipSurf =sigmaTipSurf,
ATipSurf=ATipSurf,
BTipSurf=BTipSurf,
nStepsIndentMeasure=nStepsIndentMeasure,
outputIndentationMeasureFilePath=outputIndentationMeasureFilePath)
with open(path,"w") as f:
f.write(opt)
def writeOptionsAFMFromDict(path,optionsDict):
nSteps=optionsDict["nSteps"]
nStepsInterval=optionsDict["nStepsInterval"]
nStepsWrite=optionsDict["nStepsWrite"]
nStepsBackupInterval=optionsDict["nStepsBackupInterval"]
outPutFilePath=optionsDict["outPutFilePath"]
outPutFormat=optionsDict["outPutFormat"]
boxX=optionsDict["boxX"]
boxY=optionsDict["boxY"]
boxZ=optionsDict["boxZ"]
temperature=optionsDict["temperature"]
steepestDecentScale=optionsDict["steepestDecentScale"]
nStepsSteepestDescent=optionsDict["nStepsSteepestDescent"]
nStepsSteepestDescentProgressInterval=optionsDict["nStepsSteepestDescentProgressInterval"]
maxObjectiveForce=optionsDict["maxObjectiveForce"]
timeStep=optionsDict["timeStep"]
frictionConstant=optionsDict["frictionConstant"]
frictionConstantTip=optionsDict["frictionConstantTip"]
cutOffDst=optionsDict["cutOffDst"]
VerletListDst=optionsDict["VerletListDst"]
dielectricConstant=optionsDict["dielectricConstant"]
debyeLength=optionsDict["debyeLength"]
inputCoordFile=optionsDict["inputCoordFile"]
inputTopFile=optionsDict["inputTopFile"]
epsilonSurf=optionsDict["epsilonSurf"]
sigmaSurf=optionsDict["sigmaSurf"]
surfacePosition=optionsDict["surfacePosition"]
initialTipSampleDst=optionsDict["initialTipSampleDst"]
descentVelocity=optionsDict["descentVelocity"]
minimalChipHeight=optionsDict["minimalChipHeight"]
Mtip=optionsDict["Mtip"]
Rtip=optionsDict["Rtip"]
Kxytip=optionsDict["Kxytip"]
Ktip=optionsDict["Ktip"]
epsilonTip=optionsDict["epsilonTip"]
sigmaTip=optionsDict["sigmaTip"]
Atip=optionsDict["Atip"]
Btip=optionsDict["Btip"]
epsilonTipSurf=optionsDict["epsilonTipSurf"]
sigmaTipSurf =optionsDict["sigmaTipSurf"]
ATipSurf=optionsDict["ATipSurf"]
BTipSurf=optionsDict["BTipSurf"]
nStepsIndentMeasure=optionsDict["nStepsIndentMeasure"]
outputIndentationMeasureFilePath=optionsDict["outputIndentationMeasureFilePath"]
writeOptionsAFM(path,
nSteps,
nStepsInterval,
nStepsWrite,
nStepsBackupInterval,
outPutFilePath,
outPutFormat,
boxX,boxY,boxZ,
temperature,
steepestDecentScale,
nStepsSteepestDescent,
nStepsSteepestDescentProgressInterval,
maxObjectiveForce,
timeStep,
frictionConstant,
frictionConstantTip,
cutOffDst,
VerletListDst,
dielectricConstant,
debyeLength,
inputCoordFile,
inputTopFile,
epsilonSurf,
sigmaSurf,
surfacePosition,
initialTipSampleDst,
descentVelocity,
minimalChipHeight,
Mtip,
Rtip,
Kxytip,
Ktip,
epsilonTip,
sigmaTip,
Atip,
Btip,
epsilonTipSurf,
sigmaTipSurf,
ATipSurf,
BTipSurf,
nStepsIndentMeasure,
outputIndentationMeasureFilePath)
def writeOptionsGenericUmbrella(path:str,
nSteps:int,
nStepsInterval:int,
nStepsWrite:int,
nStepsBackupInterval:int,
outPutFilePath:str,
outPutFormat:str,
boxX:float,boxY:float,boxZ:float,
temperature:float,
steepestDecentScale:float,
nStepsSteepestDescent:int,
nStepsSteepestDescentProgressInterval:int,
maxObjectiveForce:float,
timeStep:float,
frictionConstant:float,
cutOffDst:float,
VerletListDst:float,
dielectricConstant:float,
debyeLength:float,
inputCoordFile:str,
inputTopFile:str,
umbrellaK:float,
umbrellaInit:float,
umbrellaEnd:float,
umbrellaWindowsNumber:int,
umbrellaCopies:int,
nStepsUmbrellaMeasure:int,
outputUmbrellaMeasureFilePath:str):
opt = optGenericUmbrella_template.format(nSteps=nSteps,
nStepsInterval=nStepsInterval,
nStepsWrite=nStepsWrite,
nStepsBackupInterval=nStepsBackupInterval,
outPutFilePath=outPutFilePath,
outPutFormat=outPutFormat,
boxX=boxX,boxY=boxY,boxZ=boxZ,
temperature=temperature,
steepestDecentScale=steepestDecentScale,
nStepsSteepestDescent=nStepsSteepestDescent,
nStepsSteepestDescentProgressInterval=nStepsSteepestDescentProgressInterval,
maxObjectiveForce=maxObjectiveForce,
timeStep=timeStep,
frictionConstant=frictionConstant,
cutOffDst=cutOffDst,
VerletListDst=VerletListDst,
dielectricConstant=dielectricConstant,
debyeLength=debyeLength,
inputCoordFile=inputCoordFile,
inputTopFile=inputTopFile,
umbrellaK=umbrellaK,
umbrellaInit=umbrellaInit,
umbrellaEnd=umbrellaEnd,
umbrellaWindowsNumber=umbrellaWindowsNumber,
umbrellaCopies=umbrellaCopies,
nStepsUmbrellaMeasure=nStepsUmbrellaMeasure,
outputUmbrellaMeasureFilePath=outputUmbrellaMeasureFilePath)
with open(path,"w") as f:
f.write(opt)
def writeOptionsGenericUmbrellaFromDict(path,optionsDict):
nSteps=optionsDict["nSteps"]
nStepsInterval=optionsDict["nStepsInterval"]
nStepsWrite=optionsDict["nStepsWrite"]
nStepsBackupInterval=optionsDict["nStepsBackupInterval"]
outPutFilePath=optionsDict["outPutFilePath"]
outPutFormat=optionsDict["outPutFormat"]
boxX=optionsDict["boxX"]
boxY=optionsDict["boxY"]
boxZ=optionsDict["boxZ"]
temperature=optionsDict["temperature"]
steepestDecentScale=optionsDict["steepestDecentScale"]
nStepsSteepestDescent=optionsDict["nStepsSteepestDescent"]
nStepsSteepestDescentProgressInterval=optionsDict["nStepsSteepestDescentProgressInterval"]
maxObjectiveForce=optionsDict["maxObjectiveForce"]
timeStep=optionsDict["timeStep"]
frictionConstant=optionsDict["frictionConstant"]
cutOffDst=optionsDict["cutOffDst"]
VerletListDst=optionsDict["VerletListDst"]
dielectricConstant=optionsDict["dielectricConstant"]
debyeLength=optionsDict["debyeLength"]
inputCoordFile=optionsDict["inputCoordFile"]
inputTopFile=optionsDict["inputTopFile"]
umbrellaK=optionsDict["umbrellaK"]
umbrellaInit=optionsDict["umbrellaInit"]
umbrellaEnd=optionsDict["umbrellaEnd"]
umbrellaWindowsNumber=optionsDict["umbrellaWindowsNumber"]
umbrellaCopies=optionsDict["umbrellaCopies"]
nStepsUmbrellaMeasure=optionsDict["nStepsUmbrellaMeasure"]
outputUmbrellaMeasureFilePath=optionsDict["outputUmbrellaMeasureFilePath"]
writeOptionsGenericUmbrella(path,
nSteps,
nStepsInterval,
nStepsWrite,
nStepsBackupInterval,
outPutFilePath,
outPutFormat,
boxX,boxY,boxZ,
temperature,
steepestDecentScale,
nStepsSteepestDescent,
nStepsSteepestDescentProgressInterval,
maxObjectiveForce,
timeStep,
frictionConstant,
cutOffDst,
VerletListDst,
dielectricConstant,
debyeLength,
inputCoordFile,
inputTopFile,
umbrellaK,
umbrellaInit,
umbrellaEnd,
umbrellaWindowsNumber,
umbrellaCopies,
nStepsUmbrellaMeasure,
outputUmbrellaMeasureFilePath)
################################################
#writeOptionsGeneric("optionsTestGeneric.dat",
# 1000,
# 1000,
# 1000,
# 1000,
# "kk",
# "asdf",
# 1.23,2.13,3.12,
# 1.0,
# 1.5,
# 55555,
# 4444,
# -1.0,
# 0.123456,
# 2.0,
# 100.0,
# 150.0,
# "asdf.coord",
# "asdf.top")
#
#writeOptionsGenericWithSurface("optionsTestGenericSurface.dat",
# 1000,
# 1000,
# 1000,
# 1000,
# "kk",
# "asdf",
# 1.23,2.13,3.12,
# 1.0,
# 1.5,
# 55555,
# 4444,
# -1.0,
# 0.123456,
# 2.0,
# 100.0,
# 150.0,
# "asdf.coord",
# "asdf.top",
# 1.0,
# 2.0,
# -300)
#
#writeOptionsGenericClash("optionsTestClash.dat",
# 1000,
# 1000,
# 1000,
# 1000,
# "kk",
# "asdf",
# 1.23,2.13,3.12,
# 1.0,
# 1.5,
# 55555,
# 4444,
# -1.0,
# 0.123456,
# 2.0,
# 100.0,
# 150.0,
# "asdf.coord",
# "asdf.top",
# 2.0,
# 4.0)
#
#writeOptionsGenericClashWithCompression("optionsTestClashWithCompression.dat",
# 1000,
# 1000,
# 1000,
# 1000,
# "kk",
# "asdf",
# 1.23,2.13,3.12,
# 1.0,
# 1.5,
# 55555,
# 4444,
# -1.0,
# 0.123456,
# 2.0,
# 100.0,
# 150.0,
# "asdf.coord",
# "asdf.top",
# 2.0,
# 4.0,
# 300,
# 400,
# 0.01001)
#
#writeOptionsAFM("optionsAFM.dat",
# 1000,
# 1000,
# 1000,
# 1000,
# "kk",
# "asdf",
# 1.23,2.13,3.12,
# 1.0,
# 1.5,
# 55555,
# 4444,
# -1.0,
# 0.123456,
# 2.0,
# 100.0,
# 150.0,
# "asdf.coord",
# "asdf.top",
# 1.0,
# 2.0,
# -300,
# 1.123,
# 0.001,
# 2.323,
# 1.02,
# 5.02,
# 5698,
# 456,
# 5897,
# 57,
# 142566,
# 146,
# 1486,
# 98765,
# 12453,
# 1289)
| opt_generic_template = '\nnSteps {nSteps}\nnStepsInfoInterval {nStepsInterval}\nnStepsWriteInterval {nStepsWrite}\nnStepsBackupInterval {nStepsBackupInterval}\n\noutPutFilePath {outPutFilePath}\noutPutFormat {outPutFormat}\n\nboxSize {boxX} {boxY} {boxZ}\nT {temperature}\n\nh {steepestDecentScale}\n\nnStepsSteepestDescent {nStepsSteepestDescent}\nnStepsSteepestDescentProgressInterval {nStepsSteepestDescentProgressInterval}\nmaxObjectiveForce {maxObjectiveForce}\n\ndt {timeStep}\nfrictionConstant {frictionConstant}\n\ncutOffDst {cutOffDst}\nVerletListDst {VerletListDst}\n \ninputCoordPath {inputCoordFile}\ninputTopologyPath {inputTopFile}'
opt_generic_with_elec_template = optGeneric_template + '\ndielectricConstant {dielectricConstant}\ndebyeLength {debyeLength}\n'
opt_generic_with_surface_template = optGenericWithElec_template + '\n\nepsilonSurf {epsilonSurf}\nsigmaSurf {sigmaSurf}\n\nsurfacePosition {surfacePosition}\n'
opt_generic_clash_template = optGeneric_template + '\n\nlambda {lambd}\ngamma {gamma}\n'
opt_generic_clash_with_compression_template = optGenericClash_template + '\n\ninitialSphereRadius {initialSphereRadius}\nminimalSphereRadius {minimalSphereRadius}\n\ncompressionVelocity {compressionVelocity}\n'
opt_afm_template = optGenericWithSurface_template + '\n\nfrictionConstantTip {frictionConstantTip}\n\ninitialTipSampleDst {initialTipSampleDst}\ndescentVelocity {descentVelocity}\n\nminimalChipHeight {minimalChipHeight}\n\nMtip {Mtip}\nRtip {Rtip}\nKxytip {Kxytip}\nKtip {Ktip}\n\nepsilonTip {epsilonTip}\nsigmaTip {sigmaTip}\n\nAtip {Atip}\nBtip {Btip}\n\nepsilonTipSurf {epsilonTipSurf}\nsigmaTipSurf {sigmaTipSurf}\n\nATipSurf {ATipSurf}\nBTipSurf {BTipSurf}\n\nnStepsIndentMeasure {nStepsIndentMeasure}\noutputIndentationMeasureFilePath {outputIndentationMeasureFilePath}\n'
opt_generic_umbrella_template = optGenericWithElec_template + '\n\numbrellaK {umbrellaK}\numbrellaInit {umbrellaInit}\numbrellaEnd {umbrellaEnd}\numbrellaWindowsNumber {umbrellaWindowsNumber}\numbrellaCopies {umbrellaCopies}\n\nnStepsUmbrellaMeasure {nStepsUmbrellaMeasure}\noutputUmbrellaMeasureFilePath {outputUmbrellaMeasureFilePath}\n'
def write_options_generic(path: str, nSteps: int, nStepsInterval: int, nStepsWrite: int, nStepsBackupInterval: int, outPutFilePath: str, outPutFormat: str, boxX: float, boxY: float, boxZ: float, temperature: float, steepestDecentScale: float, nStepsSteepestDescent: int, nStepsSteepestDescentProgressInterval: int, maxObjectiveForce: float, timeStep: float, frictionConstant: float, cutOffDst: float, VerletListDst: float, dielectricConstant: float, debyeLength: float, inputCoordFile: str, inputTopFile: str):
opt = optGenericWithElec_template.format(nSteps=nSteps, nStepsInterval=nStepsInterval, nStepsWrite=nStepsWrite, nStepsBackupInterval=nStepsBackupInterval, outPutFilePath=outPutFilePath, outPutFormat=outPutFormat, boxX=boxX, boxY=boxY, boxZ=boxZ, temperature=temperature, steepestDecentScale=steepestDecentScale, nStepsSteepestDescent=nStepsSteepestDescent, nStepsSteepestDescentProgressInterval=nStepsSteepestDescentProgressInterval, maxObjectiveForce=maxObjectiveForce, timeStep=timeStep, frictionConstant=frictionConstant, cutOffDst=cutOffDst, VerletListDst=VerletListDst, dielectricConstant=dielectricConstant, debyeLength=debyeLength, inputCoordFile=inputCoordFile, inputTopFile=inputTopFile)
with open(path, 'w') as f:
f.write(opt)
def write_options_generic_from_dict(path, optionsDict):
n_steps = optionsDict['nSteps']
n_steps_interval = optionsDict['nStepsInterval']
n_steps_write = optionsDict['nStepsWrite']
n_steps_backup_interval = optionsDict['nStepsBackupInterval']
out_put_file_path = optionsDict['outPutFilePath']
out_put_format = optionsDict['outPutFormat']
box_x = optionsDict['boxX']
box_y = optionsDict['boxY']
box_z = optionsDict['boxZ']
temperature = optionsDict['temperature']
steepest_decent_scale = optionsDict['steepestDecentScale']
n_steps_steepest_descent = optionsDict['nStepsSteepestDescent']
n_steps_steepest_descent_progress_interval = optionsDict['nStepsSteepestDescentProgressInterval']
max_objective_force = optionsDict['maxObjectiveForce']
time_step = optionsDict['timeStep']
friction_constant = optionsDict['frictionConstant']
cut_off_dst = optionsDict['cutOffDst']
verlet_list_dst = optionsDict['VerletListDst']
dielectric_constant = optionsDict['dielectricConstant']
debye_length = optionsDict['debyeLength']
input_coord_file = optionsDict['inputCoordFile']
input_top_file = optionsDict['inputTopFile']
write_options_generic(path, nSteps, nStepsInterval, nStepsWrite, nStepsBackupInterval, outPutFilePath, outPutFormat, boxX, boxY, boxZ, temperature, steepestDecentScale, nStepsSteepestDescent, nStepsSteepestDescentProgressInterval, maxObjectiveForce, timeStep, frictionConstant, cutOffDst, VerletListDst, dielectricConstant, debyeLength, inputCoordFile, inputTopFile)
def write_options_generic_with_surface(path: str, nSteps: int, nStepsInterval: int, nStepsWrite: int, nStepsBackupInterval: int, outPutFilePath: str, outPutFormat: str, boxX: float, boxY: float, boxZ: float, temperature: float, steepestDecentScale: float, nStepsSteepestDescent: int, nStepsSteepestDescentProgressInterval: int, maxObjectiveForce: float, timeStep: float, frictionConstant: float, cutOffDst: float, VerletListDst: float, dielectricConstant: float, debyeLength: float, inputCoordFile: str, inputTopFile: str, epsilonSurf: float, sigmaSurf: float, surfacePosition: float):
opt = optGenericWithSurface_template.format(nSteps=nSteps, nStepsInterval=nStepsInterval, nStepsWrite=nStepsWrite, nStepsBackupInterval=nStepsBackupInterval, outPutFilePath=outPutFilePath, outPutFormat=outPutFormat, boxX=boxX, boxY=boxY, boxZ=boxZ, temperature=temperature, steepestDecentScale=steepestDecentScale, nStepsSteepestDescent=nStepsSteepestDescent, nStepsSteepestDescentProgressInterval=nStepsSteepestDescentProgressInterval, maxObjectiveForce=maxObjectiveForce, timeStep=timeStep, frictionConstant=frictionConstant, cutOffDst=cutOffDst, VerletListDst=VerletListDst, dielectricConstant=dielectricConstant, debyeLength=debyeLength, inputCoordFile=inputCoordFile, inputTopFile=inputTopFile, epsilonSurf=epsilonSurf, sigmaSurf=sigmaSurf, surfacePosition=surfacePosition)
with open(path, 'w') as f:
f.write(opt)
def write_options_generic_with_surface_from_dict(path, optionsDict):
n_steps = optionsDict['nSteps']
n_steps_interval = optionsDict['nStepsInterval']
n_steps_write = optionsDict['nStepsWrite']
n_steps_backup_interval = optionsDict['nStepsBackupInterval']
out_put_file_path = optionsDict['outPutFilePath']
out_put_format = optionsDict['outPutFormat']
box_x = optionsDict['boxX']
box_y = optionsDict['boxY']
box_z = optionsDict['boxZ']
temperature = optionsDict['temperature']
steepest_decent_scale = optionsDict['steepestDecentScale']
n_steps_steepest_descent = optionsDict['nStepsSteepestDescent']
n_steps_steepest_descent_progress_interval = optionsDict['nStepsSteepestDescentProgressInterval']
max_objective_force = optionsDict['maxObjectiveForce']
time_step = optionsDict['timeStep']
friction_constant = optionsDict['frictionConstant']
cut_off_dst = optionsDict['cutOffDst']
verlet_list_dst = optionsDict['VerletListDst']
input_coord_file = optionsDict['inputCoordFile']
dielectric_constant = optionsDict['dielectricConstant']
debye_length = optionsDict['debyeLength']
input_top_file = optionsDict['inputTopFile']
epsilon_surf = optionsDict['epsilonSurf']
sigma_surf = optionsDict['sigmaSurf']
surface_position = optionsDict['surfacePosition']
write_options_generic_with_surface(path, nSteps, nStepsInterval, nStepsWrite, nStepsBackupInterval, outPutFilePath, outPutFormat, boxX, boxY, boxZ, temperature, steepestDecentScale, nStepsSteepestDescent, nStepsSteepestDescentProgressInterval, maxObjectiveForce, timeStep, frictionConstant, cutOffDst, VerletListDst, dielectricConstant, debyeLength, inputCoordFile, inputTopFile, epsilonSurf, sigmaSurf, surfacePosition)
def write_options_generic_clash(path: str, nSteps: int, nStepsInterval: int, nStepsWrite: int, nStepsBackupInterval: int, outPutFilePath: str, outPutFormat: str, boxX: float, boxY: float, boxZ: float, temperature: float, steepestDecentScale: float, nStepsSteepestDescent: int, nStepsSteepestDescentProgressInterval: int, maxObjectiveForce: float, timeStep: float, frictionConstant: float, cutOffDst: float, VerletListDst: float, inputCoordFile: str, inputTopFile: str, lambd: float, gamma: float):
opt = optGenericClash_template.format(nSteps=nSteps, nStepsInterval=nStepsInterval, nStepsWrite=nStepsWrite, nStepsBackupInterval=nStepsBackupInterval, outPutFilePath=outPutFilePath, outPutFormat=outPutFormat, boxX=boxX, boxY=boxY, boxZ=boxZ, temperature=temperature, steepestDecentScale=steepestDecentScale, nStepsSteepestDescent=nStepsSteepestDescent, nStepsSteepestDescentProgressInterval=nStepsSteepestDescentProgressInterval, maxObjectiveForce=maxObjectiveForce, timeStep=timeStep, frictionConstant=frictionConstant, cutOffDst=cutOffDst, VerletListDst=VerletListDst, inputCoordFile=inputCoordFile, inputTopFile=inputTopFile, lambd=lambd, gamma=gamma)
with open(path, 'w') as f:
f.write(opt)
def write_options_generic_clash_from_dict(path, optionsDict):
n_steps = optionsDict['nSteps']
n_steps_interval = optionsDict['nStepsInterval']
n_steps_write = optionsDict['nStepsWrite']
n_steps_backup_interval = optionsDict['nStepsBackupInterval']
out_put_file_path = optionsDict['outPutFilePath']
out_put_format = optionsDict['outPutFormat']
box_x = optionsDict['boxX']
box_y = optionsDict['boxY']
box_z = optionsDict['boxZ']
temperature = optionsDict['temperature']
steepest_decent_scale = optionsDict['steepestDecentScale']
n_steps_steepest_descent = optionsDict['nStepsSteepestDescent']
n_steps_steepest_descent_progress_interval = optionsDict['nStepsSteepestDescentProgressInterval']
max_objective_force = optionsDict['maxObjectiveForce']
time_step = optionsDict['timeStep']
friction_constant = optionsDict['frictionConstant']
cut_off_dst = optionsDict['cutOffDst']
verlet_list_dst = optionsDict['VerletListDst']
input_coord_file = optionsDict['inputCoordFile']
input_top_file = optionsDict['inputTopFile']
lambd = optionsDict['lambd']
gamma = optionsDict['gamma']
write_options_generic_clash(path, nSteps, nStepsInterval, nStepsWrite, nStepsBackupInterval, outPutFilePath, outPutFormat, boxX, boxY, boxZ, temperature, steepestDecentScale, nStepsSteepestDescent, nStepsSteepestDescentProgressInterval, maxObjectiveForce, timeStep, frictionConstant, cutOffDst, VerletListDst, inputCoordFile, inputTopFile, lambd, gamma)
def write_options_generic_clash_with_compression(path: str, nSteps: int, nStepsInterval: int, nStepsWrite: int, nStepsBackupInterval: int, outPutFilePath: str, outPutFormat: str, boxX: float, boxY: float, boxZ: float, temperature: float, steepestDecentScale: float, nStepsSteepestDescent: int, nStepsSteepestDescentProgressInterval: int, maxObjectiveForce: float, timeStep: float, frictionConstant: float, cutOffDst: float, VerletListDst: float, inputCoordFile: str, inputTopFile: str, lambd: float, gamma: float, initialSphereRadius: float, minimalSphereRadius: float, compressionVelocity: float):
opt = optGenericClashWithCompression_template.format(nSteps=nSteps, nStepsInterval=nStepsInterval, nStepsWrite=nStepsWrite, nStepsBackupInterval=nStepsBackupInterval, outPutFilePath=outPutFilePath, outPutFormat=outPutFormat, boxX=boxX, boxY=boxY, boxZ=boxZ, temperature=temperature, steepestDecentScale=steepestDecentScale, nStepsSteepestDescent=nStepsSteepestDescent, nStepsSteepestDescentProgressInterval=nStepsSteepestDescentProgressInterval, maxObjectiveForce=maxObjectiveForce, timeStep=timeStep, frictionConstant=frictionConstant, cutOffDst=cutOffDst, VerletListDst=VerletListDst, inputCoordFile=inputCoordFile, inputTopFile=inputTopFile, lambd=lambd, gamma=gamma, initialSphereRadius=initialSphereRadius, minimalSphereRadius=minimalSphereRadius, compressionVelocity=compressionVelocity)
with open(path, 'w') as f:
f.write(opt)
def write_options_generic_clash_with_compression_from_dict(path, optionsDict):
n_steps = optionsDict['nSteps']
n_steps_interval = optionsDict['nStepsInterval']
n_steps_write = optionsDict['nStepsWrite']
n_steps_backup_interval = optionsDict['nStepsBackupInterval']
out_put_file_path = optionsDict['outPutFilePath']
out_put_format = optionsDict['outPutFormat']
box_x = optionsDict['boxX']
box_y = optionsDict['boxY']
box_z = optionsDict['boxZ']
temperature = optionsDict['temperature']
steepest_decent_scale = optionsDict['steepestDecentScale']
n_steps_steepest_descent = optionsDict['nStepsSteepestDescent']
n_steps_steepest_descent_progress_interval = optionsDict['nStepsSteepestDescentProgressInterval']
max_objective_force = optionsDict['maxObjectiveForce']
time_step = optionsDict['timeStep']
friction_constant = optionsDict['frictionConstant']
cut_off_dst = optionsDict['cutOffDst']
verlet_list_dst = optionsDict['VerletListDst']
input_coord_file = optionsDict['inputCoordFile']
input_top_file = optionsDict['inputTopFile']
lambd = optionsDict['lambd']
gamma = optionsDict['gamma']
initial_sphere_radius = optionsDict['initialSphereRadius']
minimal_sphere_radius = optionsDict['minimalSphereRadius']
compression_velocity = optionsDict['compressionVelocity']
write_options_generic_clash_with_compression(path, nSteps, nStepsInterval, nStepsWrite, nStepsBackupInterval, outPutFilePath, outPutFormat, boxX, boxY, boxZ, temperature, steepestDecentScale, nStepsSteepestDescent, nStepsSteepestDescentProgressInterval, maxObjectiveForce, timeStep, frictionConstant, cutOffDst, VerletListDst, inputCoordFile, inputTopFile, lambd, gamma, initialSphereRadius, minimalSphereRadius, compressionVelocity)
def write_options_afm(path: str, nSteps: int, nStepsInterval: int, nStepsWrite: int, nStepsBackupInterval: int, outPutFilePath: str, outPutFormat: str, boxX: float, boxY: float, boxZ: float, temperature: float, steepestDecentScale: float, nStepsSteepestDescent: int, nStepsSteepestDescentProgressInterval: int, maxObjectiveForce: float, timeStep: float, frictionConstant: float, frictionConstantTip: float, cutOffDst: float, VerletListDst: float, dielectricConstant: float, debyeLength: float, inputCoordFile: str, inputTopFile: str, epsilonSurf: float, sigmaSurf: float, surfacePosition: float, initialTipSampleDst: float, descentVelocity: float, minimalChipHeight: float, Mtip: float, Rtip: float, Kxytip: float, Ktip: float, epsilonTip: float, sigmaTip: float, Atip: float, Btip: float, epsilonTipSurf: float, sigmaTipSurf: float, ATipSurf: float, BTipSurf: float, nStepsIndentMeasure: str, outputIndentationMeasureFilePath: str):
opt = optAFM_template.format(nSteps=nSteps, nStepsInterval=nStepsInterval, nStepsWrite=nStepsWrite, nStepsBackupInterval=nStepsBackupInterval, outPutFilePath=outPutFilePath, outPutFormat=outPutFormat, boxX=boxX, boxY=boxY, boxZ=boxZ, temperature=temperature, steepestDecentScale=steepestDecentScale, nStepsSteepestDescent=nStepsSteepestDescent, nStepsSteepestDescentProgressInterval=nStepsSteepestDescentProgressInterval, maxObjectiveForce=maxObjectiveForce, timeStep=timeStep, frictionConstant=frictionConstant, frictionConstantTip=frictionConstantTip, cutOffDst=cutOffDst, VerletListDst=VerletListDst, dielectricConstant=dielectricConstant, debyeLength=debyeLength, inputCoordFile=inputCoordFile, inputTopFile=inputTopFile, epsilonSurf=epsilonSurf, sigmaSurf=sigmaSurf, surfacePosition=surfacePosition, initialTipSampleDst=initialTipSampleDst, descentVelocity=descentVelocity, minimalChipHeight=minimalChipHeight, Mtip=Mtip, Rtip=Rtip, Kxytip=Kxytip, Ktip=Ktip, epsilonTip=epsilonTip, sigmaTip=sigmaTip, Atip=Atip, Btip=Btip, epsilonTipSurf=epsilonTipSurf, sigmaTipSurf=sigmaTipSurf, ATipSurf=ATipSurf, BTipSurf=BTipSurf, nStepsIndentMeasure=nStepsIndentMeasure, outputIndentationMeasureFilePath=outputIndentationMeasureFilePath)
with open(path, 'w') as f:
f.write(opt)
def write_options_afm_from_dict(path, optionsDict):
n_steps = optionsDict['nSteps']
n_steps_interval = optionsDict['nStepsInterval']
n_steps_write = optionsDict['nStepsWrite']
n_steps_backup_interval = optionsDict['nStepsBackupInterval']
out_put_file_path = optionsDict['outPutFilePath']
out_put_format = optionsDict['outPutFormat']
box_x = optionsDict['boxX']
box_y = optionsDict['boxY']
box_z = optionsDict['boxZ']
temperature = optionsDict['temperature']
steepest_decent_scale = optionsDict['steepestDecentScale']
n_steps_steepest_descent = optionsDict['nStepsSteepestDescent']
n_steps_steepest_descent_progress_interval = optionsDict['nStepsSteepestDescentProgressInterval']
max_objective_force = optionsDict['maxObjectiveForce']
time_step = optionsDict['timeStep']
friction_constant = optionsDict['frictionConstant']
friction_constant_tip = optionsDict['frictionConstantTip']
cut_off_dst = optionsDict['cutOffDst']
verlet_list_dst = optionsDict['VerletListDst']
dielectric_constant = optionsDict['dielectricConstant']
debye_length = optionsDict['debyeLength']
input_coord_file = optionsDict['inputCoordFile']
input_top_file = optionsDict['inputTopFile']
epsilon_surf = optionsDict['epsilonSurf']
sigma_surf = optionsDict['sigmaSurf']
surface_position = optionsDict['surfacePosition']
initial_tip_sample_dst = optionsDict['initialTipSampleDst']
descent_velocity = optionsDict['descentVelocity']
minimal_chip_height = optionsDict['minimalChipHeight']
mtip = optionsDict['Mtip']
rtip = optionsDict['Rtip']
kxytip = optionsDict['Kxytip']
ktip = optionsDict['Ktip']
epsilon_tip = optionsDict['epsilonTip']
sigma_tip = optionsDict['sigmaTip']
atip = optionsDict['Atip']
btip = optionsDict['Btip']
epsilon_tip_surf = optionsDict['epsilonTipSurf']
sigma_tip_surf = optionsDict['sigmaTipSurf']
a_tip_surf = optionsDict['ATipSurf']
b_tip_surf = optionsDict['BTipSurf']
n_steps_indent_measure = optionsDict['nStepsIndentMeasure']
output_indentation_measure_file_path = optionsDict['outputIndentationMeasureFilePath']
write_options_afm(path, nSteps, nStepsInterval, nStepsWrite, nStepsBackupInterval, outPutFilePath, outPutFormat, boxX, boxY, boxZ, temperature, steepestDecentScale, nStepsSteepestDescent, nStepsSteepestDescentProgressInterval, maxObjectiveForce, timeStep, frictionConstant, frictionConstantTip, cutOffDst, VerletListDst, dielectricConstant, debyeLength, inputCoordFile, inputTopFile, epsilonSurf, sigmaSurf, surfacePosition, initialTipSampleDst, descentVelocity, minimalChipHeight, Mtip, Rtip, Kxytip, Ktip, epsilonTip, sigmaTip, Atip, Btip, epsilonTipSurf, sigmaTipSurf, ATipSurf, BTipSurf, nStepsIndentMeasure, outputIndentationMeasureFilePath)
def write_options_generic_umbrella(path: str, nSteps: int, nStepsInterval: int, nStepsWrite: int, nStepsBackupInterval: int, outPutFilePath: str, outPutFormat: str, boxX: float, boxY: float, boxZ: float, temperature: float, steepestDecentScale: float, nStepsSteepestDescent: int, nStepsSteepestDescentProgressInterval: int, maxObjectiveForce: float, timeStep: float, frictionConstant: float, cutOffDst: float, VerletListDst: float, dielectricConstant: float, debyeLength: float, inputCoordFile: str, inputTopFile: str, umbrellaK: float, umbrellaInit: float, umbrellaEnd: float, umbrellaWindowsNumber: int, umbrellaCopies: int, nStepsUmbrellaMeasure: int, outputUmbrellaMeasureFilePath: str):
opt = optGenericUmbrella_template.format(nSteps=nSteps, nStepsInterval=nStepsInterval, nStepsWrite=nStepsWrite, nStepsBackupInterval=nStepsBackupInterval, outPutFilePath=outPutFilePath, outPutFormat=outPutFormat, boxX=boxX, boxY=boxY, boxZ=boxZ, temperature=temperature, steepestDecentScale=steepestDecentScale, nStepsSteepestDescent=nStepsSteepestDescent, nStepsSteepestDescentProgressInterval=nStepsSteepestDescentProgressInterval, maxObjectiveForce=maxObjectiveForce, timeStep=timeStep, frictionConstant=frictionConstant, cutOffDst=cutOffDst, VerletListDst=VerletListDst, dielectricConstant=dielectricConstant, debyeLength=debyeLength, inputCoordFile=inputCoordFile, inputTopFile=inputTopFile, umbrellaK=umbrellaK, umbrellaInit=umbrellaInit, umbrellaEnd=umbrellaEnd, umbrellaWindowsNumber=umbrellaWindowsNumber, umbrellaCopies=umbrellaCopies, nStepsUmbrellaMeasure=nStepsUmbrellaMeasure, outputUmbrellaMeasureFilePath=outputUmbrellaMeasureFilePath)
with open(path, 'w') as f:
f.write(opt)
def write_options_generic_umbrella_from_dict(path, optionsDict):
n_steps = optionsDict['nSteps']
n_steps_interval = optionsDict['nStepsInterval']
n_steps_write = optionsDict['nStepsWrite']
n_steps_backup_interval = optionsDict['nStepsBackupInterval']
out_put_file_path = optionsDict['outPutFilePath']
out_put_format = optionsDict['outPutFormat']
box_x = optionsDict['boxX']
box_y = optionsDict['boxY']
box_z = optionsDict['boxZ']
temperature = optionsDict['temperature']
steepest_decent_scale = optionsDict['steepestDecentScale']
n_steps_steepest_descent = optionsDict['nStepsSteepestDescent']
n_steps_steepest_descent_progress_interval = optionsDict['nStepsSteepestDescentProgressInterval']
max_objective_force = optionsDict['maxObjectiveForce']
time_step = optionsDict['timeStep']
friction_constant = optionsDict['frictionConstant']
cut_off_dst = optionsDict['cutOffDst']
verlet_list_dst = optionsDict['VerletListDst']
dielectric_constant = optionsDict['dielectricConstant']
debye_length = optionsDict['debyeLength']
input_coord_file = optionsDict['inputCoordFile']
input_top_file = optionsDict['inputTopFile']
umbrella_k = optionsDict['umbrellaK']
umbrella_init = optionsDict['umbrellaInit']
umbrella_end = optionsDict['umbrellaEnd']
umbrella_windows_number = optionsDict['umbrellaWindowsNumber']
umbrella_copies = optionsDict['umbrellaCopies']
n_steps_umbrella_measure = optionsDict['nStepsUmbrellaMeasure']
output_umbrella_measure_file_path = optionsDict['outputUmbrellaMeasureFilePath']
write_options_generic_umbrella(path, nSteps, nStepsInterval, nStepsWrite, nStepsBackupInterval, outPutFilePath, outPutFormat, boxX, boxY, boxZ, temperature, steepestDecentScale, nStepsSteepestDescent, nStepsSteepestDescentProgressInterval, maxObjectiveForce, timeStep, frictionConstant, cutOffDst, VerletListDst, dielectricConstant, debyeLength, inputCoordFile, inputTopFile, umbrellaK, umbrellaInit, umbrellaEnd, umbrellaWindowsNumber, umbrellaCopies, nStepsUmbrellaMeasure, outputUmbrellaMeasureFilePath) |
N = int(input())
A = list(map(int, input().split()))
t = len(set(A))
if (len(A) - t) % 2 == 0:
print(t)
else:
print(t - 1)
| n = int(input())
a = list(map(int, input().split()))
t = len(set(A))
if (len(A) - t) % 2 == 0:
print(t)
else:
print(t - 1) |
#Tugas Cycom 0001
#converter suhu fahrenheit
print ('selamat datang di converter fahrenheit')
print('pilih jenis suhu yang ingin diubah ke dalam fahrenheit ')
print('1.celcius')
print('2.reamur')
print('3.kelvin')
while True:
# Take input from the user
choice = input("Masukan pilihan (1/2/3):") # input user dari pilihan di atas
if choice == '1': # if user pick number 1. the program will start here
Celc = float(input('tentukan angka celcius :'))
CtoFahr = (9/5 * Celc) + 32 # rumus konversi suhu
print(CtoFahr, 'fahrenheit')
if choice == '2':
Ream = float(input('tentukan angka reamur : '))
ReamToFahr = (9/4 * Ream) + 32
print(ReamToFahr, 'fahrenheit')
if choice == '3':
Kelv = float(input('tentukan angka kelvin : '))
KelvToFahr = float(Kelv - 273.15) * 9/5 + 32
print(KelvToFahr, 'fahrenheit')
else:
break # break mean end so after u input the numbers and got number output the script will end
#notes for cycom members
#kalo mau copas silahkan tapi ganti variable nya jadi suhu lain dulu
| print('selamat datang di converter fahrenheit')
print('pilih jenis suhu yang ingin diubah ke dalam fahrenheit ')
print('1.celcius')
print('2.reamur')
print('3.kelvin')
while True:
choice = input('Masukan pilihan (1/2/3):')
if choice == '1':
celc = float(input('tentukan angka celcius :'))
cto_fahr = 9 / 5 * Celc + 32
print(CtoFahr, 'fahrenheit')
if choice == '2':
ream = float(input('tentukan angka reamur : '))
ream_to_fahr = 9 / 4 * Ream + 32
print(ReamToFahr, 'fahrenheit')
if choice == '3':
kelv = float(input('tentukan angka kelvin : '))
kelv_to_fahr = float(Kelv - 273.15) * 9 / 5 + 32
print(KelvToFahr, 'fahrenheit')
else:
break |
# coding: utf-8
# ... import symbolic tools
glt_function = load('pyccel.symbolic.gelato', 'glt_function', True, 3)
dx = load('pyccel.symbolic.gelato', 'dx', False, 1)
dy = load('pyccel.symbolic.gelato', 'dy', False, 1)
# ...
# ... weak formulation
laplace = lambda u,v: dx(u)*dx(v) + dy(u)*dy(v)
a = lambda x,y,u,v: laplace(u,v) + 0.1 * dx(u) * v
# ...
# ... computing the glt symbol and lambdify it
ga = glt_function(a, [4, 4], [2, 2])
g = lambdify(ga)
# ...
# glt symbol is supposed to be 'complex' in this example
# TODO fix it. for the moment the symbol is always 'double'
y = g(0.5, 0.5, 0.1, 0.3)
# ...
print(' a := ', a)
print(' glt symbol := ', ga)
print('')
print(' symbol (0.5, 0.5, 0.1, 0.3) = ', y)
| glt_function = load('pyccel.symbolic.gelato', 'glt_function', True, 3)
dx = load('pyccel.symbolic.gelato', 'dx', False, 1)
dy = load('pyccel.symbolic.gelato', 'dy', False, 1)
laplace = lambda u, v: dx(u) * dx(v) + dy(u) * dy(v)
a = lambda x, y, u, v: laplace(u, v) + 0.1 * dx(u) * v
ga = glt_function(a, [4, 4], [2, 2])
g = lambdify(ga)
y = g(0.5, 0.5, 0.1, 0.3)
print(' a := ', a)
print(' glt symbol := ', ga)
print('')
print(' symbol (0.5, 0.5, 0.1, 0.3) = ', y) |
AUTHOR_FEMALE = {
"Femina": [
"0009",
"0051",
"0054",
"0197",
"0220",
"0244",
"0294",
"0372",
"0509",
"1213",
"1355",
"1493",
"1572",
"1814",
"1828",
"2703",
"2766",
]
}
| author_female = {'Femina': ['0009', '0051', '0054', '0197', '0220', '0244', '0294', '0372', '0509', '1213', '1355', '1493', '1572', '1814', '1828', '2703', '2766']} |
# For reference - not used directly yet
def swap_key_values():
objs = cmds.ls(sl=True)
a = objs[0]
b = objs[1]
atx = cmds.getAttr(a + '.tx')
aty = cmds.getAttr(a + '.ty')
atz = cmds.getAttr(a + '.tz')
arx = cmds.getAttr(a + '.rx')
ary = cmds.getAttr(a + '.ry')
arz = cmds.getAttr(a + '.rz')
btx = cmds.getAttr(b + '.tx')
bty = cmds.getAttr(b + '.ty')
btz = cmds.getAttr(b + '.tz')
brx = cmds.getAttr(b + '.rx')
bry = cmds.getAttr(b + '.ry')
brz = cmds.getAttr(b + '.rz')
cmds.setAttr(a + '.tx',btx)
cmds.setAttr(a + '.ty',bty)
cmds.setAttr(a + '.tz',btz)
cmds.setAttr(a + '.rx',brx)
cmds.setAttr(a + '.ry',bry)
cmds.setAttr(a + '.rz',brz)
cmds.setAttr(b + '.tx',atx)
cmds.setAttr(b + '.ty',aty)
cmds.setAttr(b + '.tz',atz)
cmds.setAttr(b + '.rx',arx)
cmds.setAttr(b + '.ry',ary)
cmds.setAttr(b + '.rz',arz)
print("Done key values swap") | def swap_key_values():
objs = cmds.ls(sl=True)
a = objs[0]
b = objs[1]
atx = cmds.getAttr(a + '.tx')
aty = cmds.getAttr(a + '.ty')
atz = cmds.getAttr(a + '.tz')
arx = cmds.getAttr(a + '.rx')
ary = cmds.getAttr(a + '.ry')
arz = cmds.getAttr(a + '.rz')
btx = cmds.getAttr(b + '.tx')
bty = cmds.getAttr(b + '.ty')
btz = cmds.getAttr(b + '.tz')
brx = cmds.getAttr(b + '.rx')
bry = cmds.getAttr(b + '.ry')
brz = cmds.getAttr(b + '.rz')
cmds.setAttr(a + '.tx', btx)
cmds.setAttr(a + '.ty', bty)
cmds.setAttr(a + '.tz', btz)
cmds.setAttr(a + '.rx', brx)
cmds.setAttr(a + '.ry', bry)
cmds.setAttr(a + '.rz', brz)
cmds.setAttr(b + '.tx', atx)
cmds.setAttr(b + '.ty', aty)
cmds.setAttr(b + '.tz', atz)
cmds.setAttr(b + '.rx', arx)
cmds.setAttr(b + '.ry', ary)
cmds.setAttr(b + '.rz', arz)
print('Done key values swap') |
class CanvasPoint:
def __init__(self, z_index, color):
self.z_index = z_index
self.color = color
| class Canvaspoint:
def __init__(self, z_index, color):
self.z_index = z_index
self.color = color |
# Copyright 2020 Ian Rankin
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
# software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
# substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
# FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
## @package Edge.py
# Written Ian Rankin October 2019
#
# Rather a directed edge, but called an edge for short.
# Contains the basic implementation for an edge.
# Particular designed to be extendable to allow different information to be
# stored.
#from rdml_graph.core import Node
## Rather a directed edge, but called an edge for short.
# Contains the basic implementation for an edge.
# Particular designed to be extendable to allow different information to be
# stored.
class Edge(object):
## constructor
# Pass the parent and child nodes directly (not indcies)
# @param parent - the parent Node of the edge
# @param child - the child Node of the edge
# @param cost - [opt] the cost of the edge.
def __init__(self, parent, child, cost = 1.0):
# should be handed the parent node directly.
self.p = parent
self.c = child
# don't reference directly rather reference the getCost function.
self.cost = cost
## @var p
# the parent Node of the edge
## @var c
# The child Node of the edge.
## @var cost
# The cost of the Edge (use getCost function).
## get function for cost.
# This shoud be called rather than directly referencing
# in case the function is overloaded.
def getCost(self):
return self.cost
## checks if connecting id's are the same and cost is the same (could potentially)
# have two different edges to the same two nodes.
def __eq__(self, other):
#return isinstance(other, Edge) and self.c.id == other.c.id and self.p.id == other.p.id \
# and self.cost() == other.cost()
if isinstance(other, Edge):
return self.c == other.c and self.p == other.p and self.cost() == other.cost()
else:
return False
def __str__(self):
s = 'e('
if hasattr(self.p, 'id'):
s += 'p.id='+str(self.p.id)
else:
s += 'p='+str(self.p)
if hasattr(self.c, 'id'):
s += ',c.id='+str(self.c.id)
else:
s += ',c='+str(self.c)
s += ',cost='+str(self.cost)+')'
return s
| class Edge(object):
def __init__(self, parent, child, cost=1.0):
self.p = parent
self.c = child
self.cost = cost
def get_cost(self):
return self.cost
def __eq__(self, other):
if isinstance(other, Edge):
return self.c == other.c and self.p == other.p and (self.cost() == other.cost())
else:
return False
def __str__(self):
s = 'e('
if hasattr(self.p, 'id'):
s += 'p.id=' + str(self.p.id)
else:
s += 'p=' + str(self.p)
if hasattr(self.c, 'id'):
s += ',c.id=' + str(self.c.id)
else:
s += ',c=' + str(self.c)
s += ',cost=' + str(self.cost) + ')'
return s |
IMAGES_STORE = 'C:\\'
ITEM_PIPELINES = {'shoppon.spiders.planning.pipline.ImgPipeline': 1}
DOWNLOADER_MIDDLEWARES = {
'scrapy_splash.SplashCookiesMiddleware': 723,
'scrapy_splash.SplashMiddleware': 725,
'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware': 810,
}
SPLASH_URL = 'http://192.168.3.42:8050'
DUPEFILTER_CLASS = 'scrapy_splash.SplashAwareDupeFilter'
HTTPCACHE_STORAGE = 'scrapy_splash.SplashAwareFSCacheStorage'
| images_store = 'C:\\'
item_pipelines = {'shoppon.spiders.planning.pipline.ImgPipeline': 1}
downloader_middlewares = {'scrapy_splash.SplashCookiesMiddleware': 723, 'scrapy_splash.SplashMiddleware': 725, 'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware': 810}
splash_url = 'http://192.168.3.42:8050'
dupefilter_class = 'scrapy_splash.SplashAwareDupeFilter'
httpcache_storage = 'scrapy_splash.SplashAwareFSCacheStorage' |
class Solution:
def flipAndInvertImage(self, matrix: list[list[int]]) -> list[list[int]]:
if not matrix or len(matrix) == 0:
return matrix
for row in matrix:
start, end = 0, len(row) - 1
while start < end:
if row[start] == row[end]:
row[start], row[end] = 1 - row[start], 1 - row[end]
start += 1
end -= 1
if start == end:
row[start] = 1 - row[start]
return matrix
if __name__ == "__main__":
solution = Solution()
print(solution.flipAndInvertImage([[1,1,0],[1,0,1],[0,0,0]]))
print(solution.flipAndInvertImage([[1,1,0,0],[1,0,0,1],[0,1,1,1],[1,0,1,0]])) | class Solution:
def flip_and_invert_image(self, matrix: list[list[int]]) -> list[list[int]]:
if not matrix or len(matrix) == 0:
return matrix
for row in matrix:
(start, end) = (0, len(row) - 1)
while start < end:
if row[start] == row[end]:
(row[start], row[end]) = (1 - row[start], 1 - row[end])
start += 1
end -= 1
if start == end:
row[start] = 1 - row[start]
return matrix
if __name__ == '__main__':
solution = solution()
print(solution.flipAndInvertImage([[1, 1, 0], [1, 0, 1], [0, 0, 0]]))
print(solution.flipAndInvertImage([[1, 1, 0, 0], [1, 0, 0, 1], [0, 1, 1, 1], [1, 0, 1, 0]])) |
class Colour:
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
END = '\033[0m'
GRAY = '\033[90m'
RED = '\033[91m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
BLUE = '\033[94m'
PURPLE = '\033[95m'
CYAN = '\033[96m'
WHITE = '\033[97m'
DARKGRAY = '\033[30m'
DARKRED = '\033[31m'
DARKGREEN = '\033[32m'
DARKYELLOW = '\033[33m'
DARKBLUE = '\033[34m'
DARKPURPLE = '\033[35m'
DARKCYAN = '\033[36m'
DARKWHITE = '\033[37m'
FULLDARKGRAY = '\033[40m'
FULLDARKRED = '\033[41m'
FULLDARKGREEN = '\033[42m'
FULLDARKYELLOW = '\033[43m'
FULLDARKBLUE = '\033[44m'
FULLDARKPURPLE = '\033[45m'
FULLDARKCYAN = '\033[46m'
FULLDARKWHITE = '\033[47m'
FULLGRAY = '\033[100m'
FULLRED = '\033[101m'
FULLGREEN = '\033[102m'
FULLYELLOW = '\033[103m'
FULLBLUE = '\033[104m'
FULLPURPLE = '\033[105m'
FULLCYAN = '\033[106m'
FULLWHITE = '\033[107m'
def print(mesage,colour=''):
print(colour + mesage + Colour.END)
| class Colour:
bold = '\x1b[1m'
underline = '\x1b[4m'
end = '\x1b[0m'
gray = '\x1b[90m'
red = '\x1b[91m'
green = '\x1b[92m'
yellow = '\x1b[93m'
blue = '\x1b[94m'
purple = '\x1b[95m'
cyan = '\x1b[96m'
white = '\x1b[97m'
darkgray = '\x1b[30m'
darkred = '\x1b[31m'
darkgreen = '\x1b[32m'
darkyellow = '\x1b[33m'
darkblue = '\x1b[34m'
darkpurple = '\x1b[35m'
darkcyan = '\x1b[36m'
darkwhite = '\x1b[37m'
fulldarkgray = '\x1b[40m'
fulldarkred = '\x1b[41m'
fulldarkgreen = '\x1b[42m'
fulldarkyellow = '\x1b[43m'
fulldarkblue = '\x1b[44m'
fulldarkpurple = '\x1b[45m'
fulldarkcyan = '\x1b[46m'
fulldarkwhite = '\x1b[47m'
fullgray = '\x1b[100m'
fullred = '\x1b[101m'
fullgreen = '\x1b[102m'
fullyellow = '\x1b[103m'
fullblue = '\x1b[104m'
fullpurple = '\x1b[105m'
fullcyan = '\x1b[106m'
fullwhite = '\x1b[107m'
def print(mesage, colour=''):
print(colour + mesage + Colour.END) |
color_list = {
"black": (0,0,0),
"white": (255,255,255),
"gray": (103, 110, 122),
"sky_blue": (69, 224, 255),
"red": (255, 0, 0),
"green": (32, 212, 68),
"blue": (0, 0, 255),
"purple": (255, 0 ,255),
"tan": (235, 218, 108),
"orange": (200, 150, 0)
} | color_list = {'black': (0, 0, 0), 'white': (255, 255, 255), 'gray': (103, 110, 122), 'sky_blue': (69, 224, 255), 'red': (255, 0, 0), 'green': (32, 212, 68), 'blue': (0, 0, 255), 'purple': (255, 0, 255), 'tan': (235, 218, 108), 'orange': (200, 150, 0)} |
class CameraConfig:
def __init__(self, name, server_port, camera_num):
self.name = name
self.server_port = server_port
self.camera_num = camera_num
| class Cameraconfig:
def __init__(self, name, server_port, camera_num):
self.name = name
self.server_port = server_port
self.camera_num = camera_num |
pregdata = {
7 : "You need to have an ultrasound to determine the location of the pregnancy sac, size and vitality (heartbeat) of the fetus.",
8 : "You need to have an ultrasound to determine the location of the pregnancy sac, size and vitality (heartbeat) of the fetus.",
9 : "You need to have an ultrasound to determine the location of the pregnancy sac, size and vitality (heartbeat) of the fetus.",
10 : "You need to take the following test :Blood count, fasting glucose, urine culture, blood type (and RH antibodies level if negative), rubella antibodies, VDRL, CMV, antibodies, toxoplasma and HBsAG and if necessary an HIV test.",
11 : "You need to take the following test :Blood count, fasting glucose, urine culture, blood type (and RH antibodies level if negative), rubella antibodies, VDRL, CMV, antibodies, toxoplasma and HBsAG and if necessary an HIV test.",
12 : "Placental structure (chorionic placenta) and early chromosomal genetic diagnostic testing has to be done.",
13 : "Placental structure (chorionic placenta) and early chromosomal genetic diagnostic testing has to be done.",
14 : "You need have an ultrasound, nuchal translucency or fetal development test performed." ,
15 : "Ultrasound screening exam needs to be done.",
16 : "Ultrasound screening exam needs to be done.",
17 : "Triple screen test, fetoprotein or amniocentesis and blood count has to be done.",
18 : "Triple screen test, fetoprotein or amniocentesis and blood count has to be done.",
19 : "Triple screen test, fetoprotein or amniocentesis and blood count has to be done.",
20 : "Triple screen test, fetoprotein or amniocentesis and blood count has to be done.",
21 : "Triple screen test, fetoprotein or amniocentesis and blood count has to be done.",
22 : "Late ultrasound anomaly scan has to be done.",
23 : "Late ultrasound anomaly scan has to be done.",
24 : "Late ultrasound anomaly scan has to be done.",
25 : "Late ultrasound anomaly scan has to be done.",
26 : "You need have glucose tolerance test, blood count and RH antibody levels for those with negative blood type.",
27 : "You need have glucose tolerance test, blood count and RH antibody levels for those with negative blood type.",
28 : "You need have a visit to the physician to discuss glucose test results and talk about receiving RH immune globulin if RH negative",
29 : "You need have a visit to the physician to discuss glucose test results and talk about receiving RH immune globulin if RH negative",
30 : "You need have a visit to the physician to discuss glucose test results and talk about receiving RH immune globulin if RH negative",
31 : "Review of fetal growth has to be now!",
32 : "Review of fetal growth has to be now!",
33 : "Follow-up visit has to be done.",
34 : "Weekly tracking of fetal growth weight needs to be done.",
35 : "Weekly tracking of fetal growth weight needs to be done.",
36 : "Weekly tracking of fetal growth weight needs to be done.",
37 : "Weekly tracking of fetal growth weight needs to be done.",
38 : "Weekly tracking of fetal growth weight needs to be done.",
39 : "Weekly tracking of fetal growth weight needs to be done.",
40 : "Follow-up with doctor, ultrasound, monitoring biophysical profile every 2-4 days should be done."
}
babydata = {
0 : "Baby's dose for BCG vaccine for the prevention of TB and bladder cancer, first dose of HEPB vaccine for the prevention of Hepatitis B and first dose for POLIOVIRUS vaccine for the prevention of polio is due.",
1 : "No vaccination is pending.",
2 : "No vaccination is pending.",
3 : "No vaccination is pending.",
4 : "Baby's second dose of HEPB vaccine for the prevention of Hepatitis B and second dose of POLIOVIRUS vaccine for the prevenion of polio is due.",
5 : "No vaccination is pending.",
6 : "Baby's first dose of DTP vaccine for the prevention of Dipther ia, Tetanus and Pertussis, first dose of Hib vaccine for the prevention of infections, first dose of PCV vaccine for the prevention of Pneumonia, first dose of RV vaccine for the prevention of Diarrhea is due.",
7 : "Baby's first dose of DTP vaccine for the prevention of Dipther ia, Tetanus and Pertussis, first dose of Hib vaccine for the prevention of infections, first dose of PCV vaccine for the prevention of Pneumonia, first dose of RV vaccine for the prevention of Diarrhea is due.",
8 : "Baby's third dose of POLIOVIRUS for the prevention of polio is due.",
9 : "Baby's third dose of POLIOVIRUS for the prevention of polio is due.",
10 :"Baby's second dose of DTP vaccine for the prevention of Dipther ia, Tetanus and Pertussis, second dose of Hib vaccine for the prevention of infections, second dose of PCV vaccine for the prevention of Pneumonia, second dose of RV vaccine for the prevention of Diarrhea is due.",
11 : "Baby's second dose of DTP vaccine for the prevention of Dipther ia, Tetanus and Pertussis, second dose of Hib vaccine for the prevention of infections, second dose of PCV vaccine for the prevention of Pneumonia, second dose of RV vaccine for the prevention of Diarrhea is due.",
12 : "Baby's third dose of HEPB vaccine for the prevention of Hepatitis B is due.",
13 : "Baby's third dose of HEPB vaccine for the prevention of Hepatitis B is due.",
14 : "Baby's third dose of DTP vaccine for the prevention of Dipther ia, Tetanus and Pertussis, third dose of Hib vaccine for the prevention of infections, third dose of PCV vaccine for the prevention of Pneumonia, third dose of RV vaccine for the prevention of Diarrhea is due.",
15 : "Baby's third dose of DTP vaccine for the prevention of Dipther ia, Tetanus and Pertussis, third dose of Hib vaccine for the prevention of infections, third dose of PCV vaccine for the prevention of Pneumonia, third dose of RV vaccine for the prevention of Diarrhea is due.",
16 : "Baby's third dose of DTP vaccine for the prevention of Dipther ia, Tetanus and Pertussis, third dose of Hib vaccine for the prevention of infections, third dose of PCV vaccine for the prevention of Pneumonia, third dose of RV vaccine for the prevention of Diarrhea is due.",
36 : "Baby's first dose of TYPHOID vaccine for the prevention of Typhoid fever and Diarrhea and first dose of MMR vaccine for the prevention of Mumps and Rubella is due.",
38 : "Baby's fourth dose of DTP vaccine for the prevention of Dipther ia, Tetanus and Pertussis, fourth dose of Hib vaccine for the prevention of infections, fourth dose of PCV vaccine for the prevention of Pneumonia is due.",
52 : "Baby's first dose of Varicella vaccine for the prevention of Chicken pox and HepA vaccine for the prevention of the Liver disease.",
55 : "Baby's second dose of MMR vaccine for the prevention of Measles, Mumps and Rubella and Varicella vaccine for the prevention of Chicken pox.",
58 : "Baby's second dose of HepA for the prevention of Liver disease is due.",
104 : "Baby's second dose of Typhoid vaccine for the prevention of Typhoid Fever and Diarrhea is due.",
364 : "Baby's Tdap vaccine for the prevention of the Dipther ia, tetanus, and pertuassis is due.",
468 : "Baby's dose of HPV vaccine for the prevention of cancer and warts is due.",
}
| pregdata = {7: 'You need to have an ultrasound to determine the location of the pregnancy sac, size and vitality (heartbeat) of the fetus.', 8: 'You need to have an ultrasound to determine the location of the pregnancy sac, size and vitality (heartbeat) of the fetus.', 9: 'You need to have an ultrasound to determine the location of the pregnancy sac, size and vitality (heartbeat) of the fetus.', 10: 'You need to take the following test :Blood count, fasting glucose, urine culture, blood type (and RH antibodies level if negative), rubella antibodies, VDRL, CMV, antibodies, toxoplasma and HBsAG and if necessary an HIV test.', 11: 'You need to take the following test :Blood count, fasting glucose, urine culture, blood type (and RH antibodies level if negative), rubella antibodies, VDRL, CMV, antibodies, toxoplasma and HBsAG and if necessary an HIV test.', 12: 'Placental structure (chorionic placenta) and early chromosomal genetic diagnostic testing has to be done.', 13: 'Placental structure (chorionic placenta) and early chromosomal genetic diagnostic testing has to be done.', 14: 'You need have an ultrasound, nuchal translucency or fetal development test performed.', 15: 'Ultrasound screening exam needs to be done.', 16: 'Ultrasound screening exam needs to be done.', 17: 'Triple screen test, fetoprotein or amniocentesis and blood count has to be done.', 18: 'Triple screen test, fetoprotein or amniocentesis and blood count has to be done.', 19: 'Triple screen test, fetoprotein or amniocentesis and blood count has to be done.', 20: 'Triple screen test, fetoprotein or amniocentesis and blood count has to be done.', 21: 'Triple screen test, fetoprotein or amniocentesis and blood count has to be done.', 22: 'Late ultrasound anomaly scan has to be done.', 23: 'Late ultrasound anomaly scan has to be done.', 24: 'Late ultrasound anomaly scan has to be done.', 25: 'Late ultrasound anomaly scan has to be done.', 26: 'You need have glucose tolerance test, blood count and RH antibody levels for those with negative blood type.', 27: 'You need have glucose tolerance test, blood count and RH antibody levels for those with negative blood type.', 28: 'You need have a visit to the physician to discuss glucose test results and talk about receiving RH immune globulin if RH negative', 29: 'You need have a visit to the physician to discuss glucose test results and talk about receiving RH immune globulin if RH negative', 30: 'You need have a visit to the physician to discuss glucose test results and talk about receiving RH immune globulin if RH negative', 31: 'Review of fetal growth has to be now!', 32: 'Review of fetal growth has to be now!', 33: 'Follow-up visit has to be done.', 34: 'Weekly tracking of fetal growth weight needs to be done.', 35: 'Weekly tracking of fetal growth weight needs to be done.', 36: 'Weekly tracking of fetal growth weight needs to be done.', 37: 'Weekly tracking of fetal growth weight needs to be done.', 38: 'Weekly tracking of fetal growth weight needs to be done.', 39: 'Weekly tracking of fetal growth weight needs to be done.', 40: 'Follow-up with doctor, ultrasound, monitoring biophysical profile every 2-4 days should be done.'}
babydata = {0: "Baby's dose for BCG vaccine for the prevention of TB and bladder cancer, first dose of HEPB vaccine for the prevention of Hepatitis B and first dose for POLIOVIRUS vaccine for the prevention of polio is due.", 1: 'No vaccination is pending.', 2: 'No vaccination is pending.', 3: 'No vaccination is pending.', 4: "Baby's second dose of HEPB vaccine for the prevention of Hepatitis B and second dose of POLIOVIRUS vaccine for the prevenion of polio is due.", 5: 'No vaccination is pending.', 6: "Baby's first dose of DTP vaccine for the prevention of Dipther ia, Tetanus and Pertussis, first dose of Hib vaccine for the prevention of infections, first dose of PCV vaccine for the prevention of Pneumonia, first dose of RV vaccine for the prevention of Diarrhea is due.", 7: "Baby's first dose of DTP vaccine for the prevention of Dipther ia, Tetanus and Pertussis, first dose of Hib vaccine for the prevention of infections, first dose of PCV vaccine for the prevention of Pneumonia, first dose of RV vaccine for the prevention of Diarrhea is due.", 8: "Baby's third dose of POLIOVIRUS for the prevention of polio is due.", 9: "Baby's third dose of POLIOVIRUS for the prevention of polio is due.", 10: "Baby's second dose of DTP vaccine for the prevention of Dipther ia, Tetanus and Pertussis, second dose of Hib vaccine for the prevention of infections, second dose of PCV vaccine for the prevention of Pneumonia, second dose of RV vaccine for the prevention of Diarrhea is due.", 11: "Baby's second dose of DTP vaccine for the prevention of Dipther ia, Tetanus and Pertussis, second dose of Hib vaccine for the prevention of infections, second dose of PCV vaccine for the prevention of Pneumonia, second dose of RV vaccine for the prevention of Diarrhea is due.", 12: "Baby's third dose of HEPB vaccine for the prevention of Hepatitis B is due.", 13: "Baby's third dose of HEPB vaccine for the prevention of Hepatitis B is due.", 14: "Baby's third dose of DTP vaccine for the prevention of Dipther ia, Tetanus and Pertussis, third dose of Hib vaccine for the prevention of infections, third dose of PCV vaccine for the prevention of Pneumonia, third dose of RV vaccine for the prevention of Diarrhea is due.", 15: "Baby's third dose of DTP vaccine for the prevention of Dipther ia, Tetanus and Pertussis, third dose of Hib vaccine for the prevention of infections, third dose of PCV vaccine for the prevention of Pneumonia, third dose of RV vaccine for the prevention of Diarrhea is due.", 16: "Baby's third dose of DTP vaccine for the prevention of Dipther ia, Tetanus and Pertussis, third dose of Hib vaccine for the prevention of infections, third dose of PCV vaccine for the prevention of Pneumonia, third dose of RV vaccine for the prevention of Diarrhea is due.", 36: "Baby's first dose of TYPHOID vaccine for the prevention of Typhoid fever and Diarrhea and first dose of MMR vaccine for the prevention of Mumps and Rubella is due.", 38: "Baby's fourth dose of DTP vaccine for the prevention of Dipther ia, Tetanus and Pertussis, fourth dose of Hib vaccine for the prevention of infections, fourth dose of PCV vaccine for the prevention of Pneumonia is due.", 52: "Baby's first dose of Varicella vaccine for the prevention of Chicken pox and HepA vaccine for the prevention of the Liver disease.", 55: "Baby's second dose of MMR vaccine for the prevention of Measles, Mumps and Rubella and Varicella vaccine for the prevention of Chicken pox.", 58: "Baby's second dose of HepA for the prevention of Liver disease is due.", 104: "Baby's second dose of Typhoid vaccine for the prevention of Typhoid Fever and Diarrhea is due.", 364: "Baby's Tdap vaccine for the prevention of the Dipther ia, tetanus, and pertuassis is due.", 468: "Baby's dose of HPV vaccine for the prevention of cancer and warts is due."} |
a = 999
b = 999999999999999
b = 111
c = 3333333
c = 0000000
d = ieuwoidjfds
| a = 999
b = 999999999999999
b = 111
c = 3333333
c = 0
d = ieuwoidjfds |
def includeme(config):
config.add_static_view('static', 'static', cache_max_age=3600)
config.add_route('home', '/')
config.add_route('login', '/login')
config.add_route('auth', '/auth/{action}')
config.add_route('register', '/register')
config.add_route('courses', '/courses')
config.add_route('createcourse', '/createcourse')
config.add_route('createscore', '/createscore')
config.add_route('signscore', '/signscore/{id}')
config.add_route('profile', '/user/{name}')
config.scan()
| def includeme(config):
config.add_static_view('static', 'static', cache_max_age=3600)
config.add_route('home', '/')
config.add_route('login', '/login')
config.add_route('auth', '/auth/{action}')
config.add_route('register', '/register')
config.add_route('courses', '/courses')
config.add_route('createcourse', '/createcourse')
config.add_route('createscore', '/createscore')
config.add_route('signscore', '/signscore/{id}')
config.add_route('profile', '/user/{name}')
config.scan() |
class ISOLATION_LEVEL:
READ_COMMITTED = 'READ COMMITTED'
READ_UNCOMMITTED = 'READ UNCOMMITTED'
REPEATABLE_READ = 'REPEATABLE READ'
SERIALIZABLE = 'SERIALIZABLE'
AUTOCOMMIT = 'AUTOCOMMIT'
| class Isolation_Level:
read_committed = 'READ COMMITTED'
read_uncommitted = 'READ UNCOMMITTED'
repeatable_read = 'REPEATABLE READ'
serializable = 'SERIALIZABLE'
autocommit = 'AUTOCOMMIT' |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
ADMIN = 1
USER = 2
ROLES = {ADMIN: (ADMIN, 'Administrator'), USER: (USER, 'User')}
administrators = {'Donovan du Plessis': 'donovan@verifaction.co.za'}
error_messages = {
400: 'Bad request',
403: 'Forbidden resource requested',
404: [
'Oops, page not found.', 'We\'re sorry', 'Uh Oh!', 'Nope, not here.'
],
500: 'Something went wrong',
}
| admin = 1
user = 2
roles = {ADMIN: (ADMIN, 'Administrator'), USER: (USER, 'User')}
administrators = {'Donovan du Plessis': 'donovan@verifaction.co.za'}
error_messages = {400: 'Bad request', 403: 'Forbidden resource requested', 404: ['Oops, page not found.', "We're sorry", 'Uh Oh!', 'Nope, not here.'], 500: 'Something went wrong'} |
class Solution:
def strStr(self, haystack: str, needle: str) -> int:
if not needle: return 0
m, n = len(haystack), len(needle)
for i in range(m-n+1):
j = n +i
if haystack[i:j] == needle:
return i
return -1 | class Solution:
def str_str(self, haystack: str, needle: str) -> int:
if not needle:
return 0
(m, n) = (len(haystack), len(needle))
for i in range(m - n + 1):
j = n + i
if haystack[i:j] == needle:
return i
return -1 |
for _ in range(int(input())):
s=input()
o,e,c1,c2=0,0,0,0
flag=0
for i in range(len(s)):
if i%2==0:
if s[i]=='1':
e+=1
elif s[i]=='?':
c1+=1
else:
if s[i]=='1':
o+=1
elif s[i]=='?':
c2+=1
if o+c2 > e + (9-i)//2:
print(i+1)
flag=1
break
if e+c1 > o + (10-i)//2:
print(i+1)
flag=1
break
if not flag:
print(10) | for _ in range(int(input())):
s = input()
(o, e, c1, c2) = (0, 0, 0, 0)
flag = 0
for i in range(len(s)):
if i % 2 == 0:
if s[i] == '1':
e += 1
elif s[i] == '?':
c1 += 1
elif s[i] == '1':
o += 1
elif s[i] == '?':
c2 += 1
if o + c2 > e + (9 - i) // 2:
print(i + 1)
flag = 1
break
if e + c1 > o + (10 - i) // 2:
print(i + 1)
flag = 1
break
if not flag:
print(10) |
def header_option():
return {'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Headers': '*', 'Access-Control-Allow-Methods': '*'}
def check_session(header):
session = header.get('session') or header.get('Session')
if session:
return session
| def header_option():
return {'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Headers': '*', 'Access-Control-Allow-Methods': '*'}
def check_session(header):
session = header.get('session') or header.get('Session')
if session:
return session |
def fib(n):
if (n==1 or n==0):
return n
print("we are trying to calculate fib(",n,") we will call fib(",n-1,") fib(",n-2,")")
return fib(n-1) + fib(n-2)
for i in range(1,10):
print (fib(i))
| def fib(n):
if n == 1 or n == 0:
return n
print('we are trying to calculate fib(', n, ') we will call fib(', n - 1, ') fib(', n - 2, ')')
return fib(n - 1) + fib(n - 2)
for i in range(1, 10):
print(fib(i)) |
n1= int(input('Digite o primeiro numero '))
n2= int(input('digite o segundo numero '))
resultado = n1+n2
print ('O resultado de {} + {} = {}'.format(n1,n2,resultado)) | n1 = int(input('Digite o primeiro numero '))
n2 = int(input('digite o segundo numero '))
resultado = n1 + n2
print('O resultado de {} + {} = {}'.format(n1, n2, resultado)) |
class DatabaseSeeder:
seeds = [
#
]
| class Databaseseeder:
seeds = [] |
YOUTUBE_API_KEY = [ ""]
YOUTUBE_KEY_NUMBER = 0
SPOTIFY_CLIENT_ID = ""
SPOTIFY_CLIENT_SECRET = ""
MONGO_ATLAS_USER = ""
MONGO_ATLAS_PASSWORD = "" | youtube_api_key = ['']
youtube_key_number = 0
spotify_client_id = ''
spotify_client_secret = ''
mongo_atlas_user = ''
mongo_atlas_password = '' |
# Time: O(n), where n=len(A)+len(B)
# Space: O(n)
class Solution:
def intervalIntersection(self, A: List[List[int]], B: List[List[int]]) -> List[List[int]]:
a = 0
b = 0
ans = []
while a<len(A) and b<len(B):
start = max(A[a][0], B[b][0])
end = min(A[a][1], B[b][1])
if start<=end:
ans.append([start, end])
if end==A[a][1]:
a+=1
else:
b+=1
return ans
| class Solution:
def interval_intersection(self, A: List[List[int]], B: List[List[int]]) -> List[List[int]]:
a = 0
b = 0
ans = []
while a < len(A) and b < len(B):
start = max(A[a][0], B[b][0])
end = min(A[a][1], B[b][1])
if start <= end:
ans.append([start, end])
if end == A[a][1]:
a += 1
else:
b += 1
return ans |
# -*- coding: utf-8 -*-
def main():
employer_number = int(input())
worked_hours = int(input())
amount_per_hour = float(input())
salary = worked_hours * amount_per_hour
print('NUMBER =', employer_number)
print('SALARY = U$ %.2f' % salary)
if __name__ == '__main__':
main() | def main():
employer_number = int(input())
worked_hours = int(input())
amount_per_hour = float(input())
salary = worked_hours * amount_per_hour
print('NUMBER =', employer_number)
print('SALARY = U$ %.2f' % salary)
if __name__ == '__main__':
main() |
# Self powers
# Answer: 9110846700
def self_powers(limit=1001):
total = 0
for x in range(1, limit):
total += x ** x
return str(total)[-10:]
if __name__ == "__main__":
print(self_powers())
| def self_powers(limit=1001):
total = 0
for x in range(1, limit):
total += x ** x
return str(total)[-10:]
if __name__ == '__main__':
print(self_powers()) |
# In this game basiclly I am going to let you input a bruch of
# words and put them into my text, that makes a funny story.
# A few ways to do this:
# youtuber = 'Chanling'
# print('subscribe to ' + youtuber)
# print('subscribe to {}'.format(youtuber))
# print(f'subscribe to {youtuber}')
color = input('Enter a color you love ')
plural_noun = input('Enter a plural noun ')
celebrity = input('Enter a celebrity ')
print('Roses are ' + color)
print(plural_noun + ' are blue')
print('I love ' + celebrity) | color = input('Enter a color you love ')
plural_noun = input('Enter a plural noun ')
celebrity = input('Enter a celebrity ')
print('Roses are ' + color)
print(plural_noun + ' are blue')
print('I love ' + celebrity) |
{
"targets": [
{
"target_name": "<(module_name)",
"sources": [
"src/node-aes-ccm.cc",
"src/node-aes-gcm.cc",
"src/addon.cc"
],
'conditions': [
[
'OS=="win"',
{
'conditions': [
# "openssl_root" is the directory on Windows of the OpenSSL files
[
'target_arch=="x64"',
{
'variables': {
'openssl_root%': 'C:/OpenSSL-Win64'
},
#'libraries': [ '<(openssl_root)/lib/<!@(dir /B C:\OpenSSL-Win64\lib\libeay32.lib C:\OpenSSL-Win64\lib\libcrypto.lib)' ],
},
{
'variables': {
'openssl_root%': 'C:/OpenSSL-Win32'
},
#'libraries': [ '<(openssl_root)/lib/<!@(dir /B C:\OpenSSL-Win32\lib\libeay32.lib C:\OpenSSL-Win32\lib\libcrypto.lib)' ],
}
],
],
'defines': [
'uint=unsigned int',
],
'include_dirs': [
'<(openssl_root)/include',
'<!(node -e "require(\'nan\')")',
],
},
{ # OS!="win"
'include_dirs': [
# use node's bundled openssl headers on Unix platforms
'<(node_root_dir)/deps/openssl/openssl/include',
'<!(node -e "require(\'nan\')")',
],
}
],
],
},
{
"target_name": "action_after_build",
"type": "none",
"dependencies": [ "<(module_name)" ],
"copies": [
{
"files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
"destination": "<(module_path)"
}
]
}
]
}
| {'targets': [{'target_name': '<(module_name)', 'sources': ['src/node-aes-ccm.cc', 'src/node-aes-gcm.cc', 'src/addon.cc'], 'conditions': [['OS=="win"', {'conditions': [['target_arch=="x64"', {'variables': {'openssl_root%': 'C:/OpenSSL-Win64'}}, {'variables': {'openssl_root%': 'C:/OpenSSL-Win32'}}]], 'defines': ['uint=unsigned int'], 'include_dirs': ['<(openssl_root)/include', '<!(node -e "require(\'nan\')")']}, {'include_dirs': ['<(node_root_dir)/deps/openssl/openssl/include', '<!(node -e "require(\'nan\')")']}]]}, {'target_name': 'action_after_build', 'type': 'none', 'dependencies': ['<(module_name)'], 'copies': [{'files': ['<(PRODUCT_DIR)/<(module_name).node'], 'destination': '<(module_path)'}]}]} |
N = int(input())
w = input()
d = {'b': 1, 'c': 1, 'd': 2, 'w': 2, 't': 3, 'j': 3, 'f': 4, 'q': 4, 'l': 5, 'v': 5,
's': 6, 'x': 6, 'p': 7, 'm': 7, 'h': 8, 'k': 8, 'n': 9, 'g': 9, 'z': 0, 'r': 0}
result = []
for s in w.split():
t = ''.join(str(d[c]) for c in s.lower() if c in d).strip()
if t != '':
result.append(t)
print(*result)
| n = int(input())
w = input()
d = {'b': 1, 'c': 1, 'd': 2, 'w': 2, 't': 3, 'j': 3, 'f': 4, 'q': 4, 'l': 5, 'v': 5, 's': 6, 'x': 6, 'p': 7, 'm': 7, 'h': 8, 'k': 8, 'n': 9, 'g': 9, 'z': 0, 'r': 0}
result = []
for s in w.split():
t = ''.join((str(d[c]) for c in s.lower() if c in d)).strip()
if t != '':
result.append(t)
print(*result) |
class BotProcessorFactory(object):
'''
Factory class to give the appropriate processor based on action
'''
def __init__(self):
pass
def getProcessor(self,action):
'''
Returns an object of Processor
'''
pass
class BaseProcessor(object):
'''
BaseProcessor class to process actions
Input: Structured JSON data
returns response
'''
def process(self,input):
pass
| class Botprocessorfactory(object):
"""
Factory class to give the appropriate processor based on action
"""
def __init__(self):
pass
def get_processor(self, action):
"""
Returns an object of Processor
"""
pass
class Baseprocessor(object):
"""
BaseProcessor class to process actions
Input: Structured JSON data
returns response
"""
def process(self, input):
pass |
# Basic settings for test project
# Database settings. This assumes that the default user and empty
# password will work.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'django_pg_agefilter',
'USER': '',
'PASSWORD': '',
'HOST': 'localhost',
}
}
SECRET_KEY = 'secret'
INSTALLED_APPS = (
'tests.app',
)
SILENCED_SYSTEM_CHECKS = [
'1_7.W001',
]
| databases = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'django_pg_agefilter', 'USER': '', 'PASSWORD': '', 'HOST': 'localhost'}}
secret_key = 'secret'
installed_apps = ('tests.app',)
silenced_system_checks = ['1_7.W001'] |
#Unchanged Magicians:
listOfMagicians = ['Dynamo','david blain','karan singh magic']
newListOfMagicians = []
def show_magicians(listOfMagicians):
for magician in listOfMagicians:
print(magician)
def make_great(listofnames):
for name in listofnames:
newListOfMagicians.append("The Great "+name)
show_magicians(listOfMagicians)
make_great(listOfMagicians)
show_magicians(newListOfMagicians) | list_of_magicians = ['Dynamo', 'david blain', 'karan singh magic']
new_list_of_magicians = []
def show_magicians(listOfMagicians):
for magician in listOfMagicians:
print(magician)
def make_great(listofnames):
for name in listofnames:
newListOfMagicians.append('The Great ' + name)
show_magicians(listOfMagicians)
make_great(listOfMagicians)
show_magicians(newListOfMagicians) |
#
# author: redleaf
# email: redleaf@gapp.nthu.edu.tw
#
def solve1(A, B, C):
a, b, c, ans = 0, 0, 0, 0
while a < len(A) and b < len(B) and c < len(C):
if B[b] < A[a] and B[b] < C[c]:
ans += (len(A) - a) * (len(C) - c)
b += 1
elif A[a] < C[c]:
a += 1
else:
c += 1
return ans
if __name__ == '__main__':
na, nb, nc = map(int, input().split())
A = sorted(list(map(int, input().split())))
B = sorted(list(map(int, input().split())))
C = sorted(list(map(int, input().split())))
print(solve1(A, B, C)) | def solve1(A, B, C):
(a, b, c, ans) = (0, 0, 0, 0)
while a < len(A) and b < len(B) and (c < len(C)):
if B[b] < A[a] and B[b] < C[c]:
ans += (len(A) - a) * (len(C) - c)
b += 1
elif A[a] < C[c]:
a += 1
else:
c += 1
return ans
if __name__ == '__main__':
(na, nb, nc) = map(int, input().split())
a = sorted(list(map(int, input().split())))
b = sorted(list(map(int, input().split())))
c = sorted(list(map(int, input().split())))
print(solve1(A, B, C)) |
def screen(int):
size = str(int)
return str(size+"%")
def vh(int):
size = str(int)
return str(size+"vh")
def vw(int):
size = str(int)
return str(size+"vw")
def px(int):
size = str(int)
return str(size+"px") | def screen(int):
size = str(int)
return str(size + '%')
def vh(int):
size = str(int)
return str(size + 'vh')
def vw(int):
size = str(int)
return str(size + 'vw')
def px(int):
size = str(int)
return str(size + 'px') |
def bubble_sort(data, size):
swap = False
for x in range(0, size-1):
if data[x] > data[x+1]:
data[x], data[x+1] = data[x+1], data[x]
swap = True
if swap:
bubble_sort(data, size-1)
if __name__ == '__main__':
data = [2, 9, 8, 0, 1, 3, 5, 4, 6, 7]
print(data)
bubble_sort(data, len(data))
print(data)
| def bubble_sort(data, size):
swap = False
for x in range(0, size - 1):
if data[x] > data[x + 1]:
(data[x], data[x + 1]) = (data[x + 1], data[x])
swap = True
if swap:
bubble_sort(data, size - 1)
if __name__ == '__main__':
data = [2, 9, 8, 0, 1, 3, 5, 4, 6, 7]
print(data)
bubble_sort(data, len(data))
print(data) |
#coding=utf-8
#!encoding=utf-8
'''
Created on 2013-12-30
@author: ETHAN
'''
class AutomationTaskDBRouter(object):
'''
db router for automationtesting
'''
def db_for_read(self,model,**hints):
''' read data from db automationtask
'''
if model._meta.app_label=='automationtesting':
return 'automationtesting'
def db_for_write(self,model,**hints):
''' write data to db automationtask
'''
if model._meta.app_label=='automationtesting':
return 'automationtesting'
def allow_syncdb(self,db,model):
''' make sure doraemon.automationtask just in db dorameon_automationtask
'''
if db=='automationtesting':
return model._meta.app_label=="automationtesting"
elif model._meta.app_label=="automationtesting":
return False
def allwo_relation(self,obj1,obj2,**hints):
if obj1._meta.app_label == 'automationtesting' or obj2._meta.app_label == 'automationtesting':
return True
return None | """
Created on 2013-12-30
@author: ETHAN
"""
class Automationtaskdbrouter(object):
"""
db router for automationtesting
"""
def db_for_read(self, model, **hints):
""" read data from db automationtask
"""
if model._meta.app_label == 'automationtesting':
return 'automationtesting'
def db_for_write(self, model, **hints):
""" write data to db automationtask
"""
if model._meta.app_label == 'automationtesting':
return 'automationtesting'
def allow_syncdb(self, db, model):
""" make sure doraemon.automationtask just in db dorameon_automationtask
"""
if db == 'automationtesting':
return model._meta.app_label == 'automationtesting'
elif model._meta.app_label == 'automationtesting':
return False
def allwo_relation(self, obj1, obj2, **hints):
if obj1._meta.app_label == 'automationtesting' or obj2._meta.app_label == 'automationtesting':
return True
return None |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.