content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
#GCD a = int(input("Enter a: ")) b = int(input('Enter b: ')) gcd = 1 #initial gcd k = 2 #possible gcd while k <= a and k <= b: if a%k == 0 and b%k == 0: gcd = k k += 1 print(gcd)
a = int(input('Enter a: ')) b = int(input('Enter b: ')) gcd = 1 k = 2 while k <= a and k <= b: if a % k == 0 and b % k == 0: gcd = k k += 1 print(gcd)
ABCDE = list(map(int, input().split())) t = [] for i in range(3): for j in range(i + 1, 4): for k in range(j + 1, 5): t.append(ABCDE[i] + ABCDE[j] + ABCDE[k]) t.sort() print(t[-3])
abcde = list(map(int, input().split())) t = [] for i in range(3): for j in range(i + 1, 4): for k in range(j + 1, 5): t.append(ABCDE[i] + ABCDE[j] + ABCDE[k]) t.sort() print(t[-3])
class CredentialsError(Exception): pass class InvalidSetup(Exception): pass
class Credentialserror(Exception): pass class Invalidsetup(Exception): pass
number_of_test_cases = int(input()) for i in range(number_of_test_cases): number_of_candies = int(input()) one_gram_candies_number = 0 two_grams_candies_number = 0 for weight in map(int, input().split()): if weight == 1: one_gram_candies_number += 1 else: two_grams_candies_number += 1 if one_gram_candies_number == 0 and two_grams_candies_number % 2 == 0: print('YES') elif one_gram_candies_number != 0 and one_gram_candies_number % 2 == 0: print('YES') else: print('NO')
number_of_test_cases = int(input()) for i in range(number_of_test_cases): number_of_candies = int(input()) one_gram_candies_number = 0 two_grams_candies_number = 0 for weight in map(int, input().split()): if weight == 1: one_gram_candies_number += 1 else: two_grams_candies_number += 1 if one_gram_candies_number == 0 and two_grams_candies_number % 2 == 0: print('YES') elif one_gram_candies_number != 0 and one_gram_candies_number % 2 == 0: print('YES') else: print('NO')
"""Roman numerals """ def convert_roman_to_int(rn): mapping = { "I": 1, "IV": 4, "V": 5, "IX": 9, "X": 10, "XL": 40, "L": 50, "XC": 90, "C": 100, "CD": 400, "D": 500, "CM": 900, "M": 1000 } prev_digit = mapping[rn[0]] s = prev_digit for i in range(1, len(rn)): val = mapping[rn[i]] if val > prev_digit: s -= prev_digit s += mapping[rn[i-1:i+1]] prev_digit = mapping[rn[i-1:i+1]] else: s += val prev_digit = val return s def convert_int_to_roman(i): mapping = { 1: 'I', 4: 'IV', 5: 'V', 9: 'IX', 10: 'X', 40: 'XL', 50: 'L', 90: 'XC', 100: 'C', 400: 'CD', 500: 'D', 900: 'CM', 1000: 'M' } c = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1] rn = "" while i > 0: if i >= c[0]: rn += mapping[c[0]] i -= c[0] else: c.pop(0) return rn counter = 0 with open("data/p089_roman.txt", "r") as f: for line in f: line = line.strip() original_length = len(line) new_length = len(convert_int_to_roman(convert_roman_to_int(line))) counter += original_length - new_length print(counter)
"""Roman numerals """ def convert_roman_to_int(rn): mapping = {'I': 1, 'IV': 4, 'V': 5, 'IX': 9, 'X': 10, 'XL': 40, 'L': 50, 'XC': 90, 'C': 100, 'CD': 400, 'D': 500, 'CM': 900, 'M': 1000} prev_digit = mapping[rn[0]] s = prev_digit for i in range(1, len(rn)): val = mapping[rn[i]] if val > prev_digit: s -= prev_digit s += mapping[rn[i - 1:i + 1]] prev_digit = mapping[rn[i - 1:i + 1]] else: s += val prev_digit = val return s def convert_int_to_roman(i): mapping = {1: 'I', 4: 'IV', 5: 'V', 9: 'IX', 10: 'X', 40: 'XL', 50: 'L', 90: 'XC', 100: 'C', 400: 'CD', 500: 'D', 900: 'CM', 1000: 'M'} c = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1] rn = '' while i > 0: if i >= c[0]: rn += mapping[c[0]] i -= c[0] else: c.pop(0) return rn counter = 0 with open('data/p089_roman.txt', 'r') as f: for line in f: line = line.strip() original_length = len(line) new_length = len(convert_int_to_roman(convert_roman_to_int(line))) counter += original_length - new_length print(counter)
# Project Euler Problem 3 ############################### # Find the largest prime factor # of the number 600851475143 ############################### #checks if a natural number n is prime #returns boolean def prime_check(n): assert type(n) is int, "Non int passed" assert n > 0, "No negative values allowed, or zero" if n == 1: return False i = 2 while i*i < n + 1: if n != i and n % i == 0: return False i += 1 return True #generate a list of primes less than a given value n def generate_primes(n): assert type(n) is int, "Non int passed" primes = [] if n < 0: n *= -1 if n == 0 or n == 1: return primes for i in range(1, n): if prime_check(i): primes.append(i) return primes # Just going to do a simple trial run def trial_factor(n): assert type(n) is int, "Non-integer passed" assert n >= 0, "No negative values allowed" largest_prime_factor = 0 primes = generate_primes(int(n**.5) + 1) for p in primes: if n % p == 0: if p > largest_prime_factor: largest_prime_factor = p return largest_prime_factor # test def main(): print(trial_factor(600851475143)) return main()
def prime_check(n): assert type(n) is int, 'Non int passed' assert n > 0, 'No negative values allowed, or zero' if n == 1: return False i = 2 while i * i < n + 1: if n != i and n % i == 0: return False i += 1 return True def generate_primes(n): assert type(n) is int, 'Non int passed' primes = [] if n < 0: n *= -1 if n == 0 or n == 1: return primes for i in range(1, n): if prime_check(i): primes.append(i) return primes def trial_factor(n): assert type(n) is int, 'Non-integer passed' assert n >= 0, 'No negative values allowed' largest_prime_factor = 0 primes = generate_primes(int(n ** 0.5) + 1) for p in primes: if n % p == 0: if p > largest_prime_factor: largest_prime_factor = p return largest_prime_factor def main(): print(trial_factor(600851475143)) return main()
#!/usr/bin/env python # coding=utf-8 ''' Author: John Email: johnjim0816@gmail.com Date: 2020-08-09 08:40:38 LastEditor: John LastEditTime: 2020-08-10 10:38:59 Discription: Environment: ''' # Source : https://leetcode.com/problems/as-far-from-land-as-possible/ # Author : JohnJim0816 # Date : 2020-08-09 ##################################################################################################### # # Given an N x N grid containing only values 0 and 1, where 0 represents water and 1 represents land, # find a water cell such that its distance to the nearest land cell is maximized and return the # distance. # # The distance used in this problem is the Manhattan distance: the distance between two cells (x0, # y0) and (x1, y1) is |x0 - x1| + |y0 - y1|. # # If no land or water exists in the grid, return -1. # # Example 1: # # Input: [[1,0,1],[0,0,0],[1,0,1]] # Output: 2 # Explanation: # The cell (1, 1) is as far as possible from all the land with distance 2. # # Example 2: # # Input: [[1,0,0],[0,0,0],[0,0,0]] # Output: 4 # Explanation: # The cell (2, 2) is as far as possible from all the land with distance 4. # # Note: # # 1 <= grid.length == grid[0].length <= 100 # grid[i][j] is 0 or 1 ##################################################################################################### class Solution: def maxDistance(self, grid: List[List[int]]) -> int: m, n = len(grid), len(grid[0]) steps = -1 island_pos = [(i,j) for i in range(m) for j in range(n) if grid[i][j]==1] if len(island_pos) == 0 or len(island_pos) == n ** 2: return steps q = collections.deque(island_pos) while q: for _ in range(len(q)): x, y = q.popleft() for xi, yj in [(x + 1, y), (x - 1, y), (x, y + 1), (x, y - 1)]: if xi >= 0 and xi < n and yj >= 0 and yj < n and grid[xi][yj] == 0: q.append((xi, yj)) grid[xi][yj] = -1 steps += 1 return steps
""" Author: John Email: johnjim0816@gmail.com Date: 2020-08-09 08:40:38 LastEditor: John LastEditTime: 2020-08-10 10:38:59 Discription: Environment: """ class Solution: def max_distance(self, grid: List[List[int]]) -> int: (m, n) = (len(grid), len(grid[0])) steps = -1 island_pos = [(i, j) for i in range(m) for j in range(n) if grid[i][j] == 1] if len(island_pos) == 0 or len(island_pos) == n ** 2: return steps q = collections.deque(island_pos) while q: for _ in range(len(q)): (x, y) = q.popleft() for (xi, yj) in [(x + 1, y), (x - 1, y), (x, y + 1), (x, y - 1)]: if xi >= 0 and xi < n and (yj >= 0) and (yj < n) and (grid[xi][yj] == 0): q.append((xi, yj)) grid[xi][yj] = -1 steps += 1 return steps
# Given an array of integers arr, return true if and only if it is a valid mountain array. # More info: https://leetcode.com/explore/learn/card/fun-with-arrays/527/searching-for-items-in-an-array/3251/ class Solution: def is_mountain_array(self, arr: list([int])) -> bool: if len(arr) < 3: return False going_down = False going_up = arr[0] < arr[1] if not going_up: return False prev_val = -1 for elem in arr: if elem > prev_val and going_up: prev_val = elem elif elem < prev_val and going_up: going_up = False going_down = True prev_val = elem elif elem < prev_val and going_down: prev_val = elem else: return False return not going_up and going_down sol = Solution() # Tests arr1 = [2, 1] arr2 = [3, 5, 5] arr3 = [0, 3, 2, 1] arr4 = [3, 2, 1, 2] arr5 = [1, 2, 3] print(sol.is_mountain_array(arr1))
class Solution: def is_mountain_array(self, arr: list([int])) -> bool: if len(arr) < 3: return False going_down = False going_up = arr[0] < arr[1] if not going_up: return False prev_val = -1 for elem in arr: if elem > prev_val and going_up: prev_val = elem elif elem < prev_val and going_up: going_up = False going_down = True prev_val = elem elif elem < prev_val and going_down: prev_val = elem else: return False return not going_up and going_down sol = solution() arr1 = [2, 1] arr2 = [3, 5, 5] arr3 = [0, 3, 2, 1] arr4 = [3, 2, 1, 2] arr5 = [1, 2, 3] print(sol.is_mountain_array(arr1))
# # PySNMP MIB module A3COM-SWITCHING-SYSTEMS-ROUTEPOLICY-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-SWITCHING-SYSTEMS-ROUTEPOLICY-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 16:53:41 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") enterprises, Counter64, Bits, iso, ObjectIdentity, Unsigned32, IpAddress, TimeTicks, Counter32, ModuleIdentity, Gauge32, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "enterprises", "Counter64", "Bits", "iso", "ObjectIdentity", "Unsigned32", "IpAddress", "TimeTicks", "Counter32", "ModuleIdentity", "Gauge32", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "NotificationType") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") class RowStatus(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6)) namedValues = NamedValues(("active", 1), ("notInService", 2), ("notReady", 3), ("createAndGo", 4), ("createAndWait", 5), ("destroy", 6)) a3Com = MibIdentifier((1, 3, 6, 1, 4, 1, 43)) switchingSystemsMibs = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 29)) a3ComSwitchingSystemsMib = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 29, 4)) a3ComRoutePolicy = MibIdentifier((1, 3, 6, 1, 4, 1, 43, 29, 4, 23)) a3ComRoutePolicyTable = MibTable((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1), ) if mibBuilder.loadTexts: a3ComRoutePolicyTable.setStatus('mandatory') a3ComRoutePolicyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1), ).setIndexNames((0, "A3COM-SWITCHING-SYSTEMS-ROUTEPOLICY-MIB", "a3ComRoutePolicyIndex")) if mibBuilder.loadTexts: a3ComRoutePolicyEntry.setStatus('mandatory') a3ComRoutePolicyIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: a3ComRoutePolicyIndex.setStatus('mandatory') a3ComRoutePolicyProtocolType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("undefined", 1), ("ip-rip", 2), ("ip-ospf", 3), ("ip-bgp4", 4), ("ipx-rip", 5), ("ipx-sap", 6), ("at-rtmp", 7), ("at-kip", 8), ("at-aurp", 9))).clone('undefined')).setMaxAccess("readwrite") if mibBuilder.loadTexts: a3ComRoutePolicyProtocolType.setStatus('mandatory') a3ComRoutePolicyType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("import", 1), ("export", 2))).clone('import')).setMaxAccess("readwrite") if mibBuilder.loadTexts: a3ComRoutePolicyType.setStatus('mandatory') a3ComRoutePolicyOriginProtocol = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 63))).setMaxAccess("readwrite") if mibBuilder.loadTexts: a3ComRoutePolicyOriginProtocol.setStatus('mandatory') a3ComRoutePolicySourceAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 50))).setMaxAccess("readwrite") if mibBuilder.loadTexts: a3ComRoutePolicySourceAddress.setStatus('mandatory') a3ComRoutePolicyRouteAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 50))).setMaxAccess("readwrite") if mibBuilder.loadTexts: a3ComRoutePolicyRouteAddress.setStatus('mandatory') a3ComRoutePolicyRouteMask = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readwrite") if mibBuilder.loadTexts: a3ComRoutePolicyRouteMask.setStatus('mandatory') a3ComRoutePolicyAction = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("accept", 1), ("reject", 2))).clone('accept')).setMaxAccess("readwrite") if mibBuilder.loadTexts: a3ComRoutePolicyAction.setStatus('mandatory') a3ComRoutePolicyAdjustMetric = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("noop", 1), ("add", 2), ("subtract", 3), ("multiply", 4), ("divide", 5), ("module", 6))).clone('noop')).setMaxAccess("readwrite") if mibBuilder.loadTexts: a3ComRoutePolicyAdjustMetric.setStatus('mandatory') a3ComRoutePolicyMetric = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: a3ComRoutePolicyMetric.setStatus('mandatory') a3ComRoutePolicyWeight = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16)).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: a3ComRoutePolicyWeight.setStatus('mandatory') a3ComRoutePolicyExportType = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("ip-ospf-type1", 1), ("ip-ospf-type2", 2), ("default", 3))).clone('default')).setMaxAccess("readwrite") if mibBuilder.loadTexts: a3ComRoutePolicyExportType.setStatus('mandatory') a3ComRoutePolicyRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 13), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: a3ComRoutePolicyRowStatus.setStatus('mandatory') a3ComRoutePolicyNextFreeIndex = MibScalar((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: a3ComRoutePolicyNextFreeIndex.setStatus('mandatory') a3ComRoutePolicyIpIfTable = MibTable((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 3), ) if mibBuilder.loadTexts: a3ComRoutePolicyIpIfTable.setStatus('mandatory') a3ComRoutePolicyIpIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 3, 1), ).setIndexNames((0, "A3COM-SWITCHING-SYSTEMS-ROUTEPOLICY-MIB", "a3ComRoutePolicyIpIfIndex"), (0, "A3COM-SWITCHING-SYSTEMS-ROUTEPOLICY-MIB", "a3ComRoutePolicyIpIfAddressIndex")) if mibBuilder.loadTexts: a3ComRoutePolicyIpIfEntry.setStatus('mandatory') a3ComRoutePolicyIpIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: a3ComRoutePolicyIpIfIndex.setStatus('mandatory') a3ComRoutePolicyIpIfAddressIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 3, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: a3ComRoutePolicyIpIfAddressIndex.setStatus('mandatory') a3ComRoutePolicyIpIfRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 3, 1, 3), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: a3ComRoutePolicyIpIfRowStatus.setStatus('mandatory') mibBuilder.exportSymbols("A3COM-SWITCHING-SYSTEMS-ROUTEPOLICY-MIB", switchingSystemsMibs=switchingSystemsMibs, a3Com=a3Com, a3ComRoutePolicyAction=a3ComRoutePolicyAction, a3ComRoutePolicyIpIfEntry=a3ComRoutePolicyIpIfEntry, a3ComSwitchingSystemsMib=a3ComSwitchingSystemsMib, a3ComRoutePolicyRouteAddress=a3ComRoutePolicyRouteAddress, a3ComRoutePolicyIpIfAddressIndex=a3ComRoutePolicyIpIfAddressIndex, RowStatus=RowStatus, a3ComRoutePolicyExportType=a3ComRoutePolicyExportType, a3ComRoutePolicyRouteMask=a3ComRoutePolicyRouteMask, a3ComRoutePolicyEntry=a3ComRoutePolicyEntry, a3ComRoutePolicyIndex=a3ComRoutePolicyIndex, a3ComRoutePolicyIpIfRowStatus=a3ComRoutePolicyIpIfRowStatus, a3ComRoutePolicyNextFreeIndex=a3ComRoutePolicyNextFreeIndex, a3ComRoutePolicyTable=a3ComRoutePolicyTable, a3ComRoutePolicyIpIfTable=a3ComRoutePolicyIpIfTable, a3ComRoutePolicyType=a3ComRoutePolicyType, a3ComRoutePolicy=a3ComRoutePolicy, a3ComRoutePolicyAdjustMetric=a3ComRoutePolicyAdjustMetric, a3ComRoutePolicyProtocolType=a3ComRoutePolicyProtocolType, a3ComRoutePolicyRowStatus=a3ComRoutePolicyRowStatus, a3ComRoutePolicyMetric=a3ComRoutePolicyMetric, a3ComRoutePolicyOriginProtocol=a3ComRoutePolicyOriginProtocol, a3ComRoutePolicyIpIfIndex=a3ComRoutePolicyIpIfIndex, a3ComRoutePolicySourceAddress=a3ComRoutePolicySourceAddress, a3ComRoutePolicyWeight=a3ComRoutePolicyWeight)
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, value_size_constraint, value_range_constraint, constraints_intersection, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion') (notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance') (enterprises, counter64, bits, iso, object_identity, unsigned32, ip_address, time_ticks, counter32, module_identity, gauge32, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, notification_type) = mibBuilder.importSymbols('SNMPv2-SMI', 'enterprises', 'Counter64', 'Bits', 'iso', 'ObjectIdentity', 'Unsigned32', 'IpAddress', 'TimeTicks', 'Counter32', 'ModuleIdentity', 'Gauge32', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'NotificationType') (display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention') class Rowstatus(Integer32): subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6)) named_values = named_values(('active', 1), ('notInService', 2), ('notReady', 3), ('createAndGo', 4), ('createAndWait', 5), ('destroy', 6)) a3_com = mib_identifier((1, 3, 6, 1, 4, 1, 43)) switching_systems_mibs = mib_identifier((1, 3, 6, 1, 4, 1, 43, 29)) a3_com_switching_systems_mib = mib_identifier((1, 3, 6, 1, 4, 1, 43, 29, 4)) a3_com_route_policy = mib_identifier((1, 3, 6, 1, 4, 1, 43, 29, 4, 23)) a3_com_route_policy_table = mib_table((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1)) if mibBuilder.loadTexts: a3ComRoutePolicyTable.setStatus('mandatory') a3_com_route_policy_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1)).setIndexNames((0, 'A3COM-SWITCHING-SYSTEMS-ROUTEPOLICY-MIB', 'a3ComRoutePolicyIndex')) if mibBuilder.loadTexts: a3ComRoutePolicyEntry.setStatus('mandatory') a3_com_route_policy_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: a3ComRoutePolicyIndex.setStatus('mandatory') a3_com_route_policy_protocol_type = mib_table_column((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=named_values(('undefined', 1), ('ip-rip', 2), ('ip-ospf', 3), ('ip-bgp4', 4), ('ipx-rip', 5), ('ipx-sap', 6), ('at-rtmp', 7), ('at-kip', 8), ('at-aurp', 9))).clone('undefined')).setMaxAccess('readwrite') if mibBuilder.loadTexts: a3ComRoutePolicyProtocolType.setStatus('mandatory') a3_com_route_policy_type = mib_table_column((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('import', 1), ('export', 2))).clone('import')).setMaxAccess('readwrite') if mibBuilder.loadTexts: a3ComRoutePolicyType.setStatus('mandatory') a3_com_route_policy_origin_protocol = mib_table_column((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 63))).setMaxAccess('readwrite') if mibBuilder.loadTexts: a3ComRoutePolicyOriginProtocol.setStatus('mandatory') a3_com_route_policy_source_address = mib_table_column((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 5), display_string().subtype(subtypeSpec=value_size_constraint(0, 50))).setMaxAccess('readwrite') if mibBuilder.loadTexts: a3ComRoutePolicySourceAddress.setStatus('mandatory') a3_com_route_policy_route_address = mib_table_column((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 50))).setMaxAccess('readwrite') if mibBuilder.loadTexts: a3ComRoutePolicyRouteAddress.setStatus('mandatory') a3_com_route_policy_route_mask = mib_table_column((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 16))).setMaxAccess('readwrite') if mibBuilder.loadTexts: a3ComRoutePolicyRouteMask.setStatus('mandatory') a3_com_route_policy_action = mib_table_column((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('accept', 1), ('reject', 2))).clone('accept')).setMaxAccess('readwrite') if mibBuilder.loadTexts: a3ComRoutePolicyAction.setStatus('mandatory') a3_com_route_policy_adjust_metric = mib_table_column((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('noop', 1), ('add', 2), ('subtract', 3), ('multiply', 4), ('divide', 5), ('module', 6))).clone('noop')).setMaxAccess('readwrite') if mibBuilder.loadTexts: a3ComRoutePolicyAdjustMetric.setStatus('mandatory') a3_com_route_policy_metric = mib_table_column((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readwrite') if mibBuilder.loadTexts: a3ComRoutePolicyMetric.setStatus('mandatory') a3_com_route_policy_weight = mib_table_column((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(1, 16)).clone(1)).setMaxAccess('readwrite') if mibBuilder.loadTexts: a3ComRoutePolicyWeight.setStatus('mandatory') a3_com_route_policy_export_type = mib_table_column((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('ip-ospf-type1', 1), ('ip-ospf-type2', 2), ('default', 3))).clone('default')).setMaxAccess('readwrite') if mibBuilder.loadTexts: a3ComRoutePolicyExportType.setStatus('mandatory') a3_com_route_policy_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 1, 1, 13), row_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: a3ComRoutePolicyRowStatus.setStatus('mandatory') a3_com_route_policy_next_free_index = mib_scalar((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: a3ComRoutePolicyNextFreeIndex.setStatus('mandatory') a3_com_route_policy_ip_if_table = mib_table((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 3)) if mibBuilder.loadTexts: a3ComRoutePolicyIpIfTable.setStatus('mandatory') a3_com_route_policy_ip_if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 3, 1)).setIndexNames((0, 'A3COM-SWITCHING-SYSTEMS-ROUTEPOLICY-MIB', 'a3ComRoutePolicyIpIfIndex'), (0, 'A3COM-SWITCHING-SYSTEMS-ROUTEPOLICY-MIB', 'a3ComRoutePolicyIpIfAddressIndex')) if mibBuilder.loadTexts: a3ComRoutePolicyIpIfEntry.setStatus('mandatory') a3_com_route_policy_ip_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4294967295))).setMaxAccess('readonly') if mibBuilder.loadTexts: a3ComRoutePolicyIpIfIndex.setStatus('mandatory') a3_com_route_policy_ip_if_address_index = mib_table_column((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 3, 1, 2), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: a3ComRoutePolicyIpIfAddressIndex.setStatus('mandatory') a3_com_route_policy_ip_if_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 43, 29, 4, 23, 3, 1, 3), row_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: a3ComRoutePolicyIpIfRowStatus.setStatus('mandatory') mibBuilder.exportSymbols('A3COM-SWITCHING-SYSTEMS-ROUTEPOLICY-MIB', switchingSystemsMibs=switchingSystemsMibs, a3Com=a3Com, a3ComRoutePolicyAction=a3ComRoutePolicyAction, a3ComRoutePolicyIpIfEntry=a3ComRoutePolicyIpIfEntry, a3ComSwitchingSystemsMib=a3ComSwitchingSystemsMib, a3ComRoutePolicyRouteAddress=a3ComRoutePolicyRouteAddress, a3ComRoutePolicyIpIfAddressIndex=a3ComRoutePolicyIpIfAddressIndex, RowStatus=RowStatus, a3ComRoutePolicyExportType=a3ComRoutePolicyExportType, a3ComRoutePolicyRouteMask=a3ComRoutePolicyRouteMask, a3ComRoutePolicyEntry=a3ComRoutePolicyEntry, a3ComRoutePolicyIndex=a3ComRoutePolicyIndex, a3ComRoutePolicyIpIfRowStatus=a3ComRoutePolicyIpIfRowStatus, a3ComRoutePolicyNextFreeIndex=a3ComRoutePolicyNextFreeIndex, a3ComRoutePolicyTable=a3ComRoutePolicyTable, a3ComRoutePolicyIpIfTable=a3ComRoutePolicyIpIfTable, a3ComRoutePolicyType=a3ComRoutePolicyType, a3ComRoutePolicy=a3ComRoutePolicy, a3ComRoutePolicyAdjustMetric=a3ComRoutePolicyAdjustMetric, a3ComRoutePolicyProtocolType=a3ComRoutePolicyProtocolType, a3ComRoutePolicyRowStatus=a3ComRoutePolicyRowStatus, a3ComRoutePolicyMetric=a3ComRoutePolicyMetric, a3ComRoutePolicyOriginProtocol=a3ComRoutePolicyOriginProtocol, a3ComRoutePolicyIpIfIndex=a3ComRoutePolicyIpIfIndex, a3ComRoutePolicySourceAddress=a3ComRoutePolicySourceAddress, a3ComRoutePolicyWeight=a3ComRoutePolicyWeight)
#This function prints the initial menu def print_program_menu(): print("\n") print("Welcome to the probability & statistics calculator. Please, choose an option:") print("1. Descripive Statistics") #print("2. ") #print("3. ") #print("4. ") #print("5. ") print("6. Exit") #Checks if option is a number def identify_option(option): if option.isdigit() : # Verify if this is a number numeric_option = int(option) # check if in range if numeric_option >= 1 and numeric_option <= 6: return numeric_option else: return -1 # invalid option else: return -1 # invalid option
def print_program_menu(): print('\n') print('Welcome to the probability & statistics calculator. Please, choose an option:') print('1. Descripive Statistics') print('6. Exit') def identify_option(option): if option.isdigit(): numeric_option = int(option) if numeric_option >= 1 and numeric_option <= 6: return numeric_option else: return -1 else: return -1
# 10. Write a program to check whether an year is leap year or not. year=int(input("Enter an year : ")) if (year%4==0) and (year%100!=0) or (year%400==0): print(f"{year} is a leap year.") else: print(f"{year} is not a leap year.")
year = int(input('Enter an year : ')) if year % 4 == 0 and year % 100 != 0 or year % 400 == 0: print(f'{year} is a leap year.') else: print(f'{year} is not a leap year.')
def findone(L): left = 0 right = len(L) - 1 while left < right: mid = (left+right)// 2 isone = len(L[left:mid]) % 2 if L[mid] != L[mid-1] and L[mid] != L[mid+1]: return L[mid] if isone and L[mid] == L[mid-1]: left = mid + 1 elif isone and L[mid] == L[mid + 1]: right = mid - 1 elif not isone and L[mid] == L[mid-1]: right = mid - 2 elif not isone and L[mid] == L[mid + 1]: left = mid + 2 return L[left] print(findone([3,3,7,7,10,11,11])) print(findone([1,1,2,3,3,4,4,8,8])) print(findone([9,9,1,1,2,3,3,4,4,8,8]))
def findone(L): left = 0 right = len(L) - 1 while left < right: mid = (left + right) // 2 isone = len(L[left:mid]) % 2 if L[mid] != L[mid - 1] and L[mid] != L[mid + 1]: return L[mid] if isone and L[mid] == L[mid - 1]: left = mid + 1 elif isone and L[mid] == L[mid + 1]: right = mid - 1 elif not isone and L[mid] == L[mid - 1]: right = mid - 2 elif not isone and L[mid] == L[mid + 1]: left = mid + 2 return L[left] print(findone([3, 3, 7, 7, 10, 11, 11])) print(findone([1, 1, 2, 3, 3, 4, 4, 8, 8])) print(findone([9, 9, 1, 1, 2, 3, 3, 4, 4, 8, 8]))
class BinarySearch: def search(self, array, element): first = 0 last = len(array) - 1 while first <= last: mid = (first + last)//2 if array[mid] == element: return mid else: if element < array[mid]: last = mid - 1 else: first = mid + 1 return False
class Binarysearch: def search(self, array, element): first = 0 last = len(array) - 1 while first <= last: mid = (first + last) // 2 if array[mid] == element: return mid elif element < array[mid]: last = mid - 1 else: first = mid + 1 return False
""" Given a singly linked list of n nodes and find the smallest and largest elements in linked list. """ class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next def print_list(head): while head: print(f" {head.val} ->", end=" ") head = head.next print() def min_max(head): minVal, maxVal = 0, 0 while head: minVal = min(minVal, head.val) maxVal = max(maxVal, head.val) head = head.next return [minVal, maxVal] def min_max_2(head): minVal, maxVal = 0, 0 while head: minVal = minVal if head.val > minVal else head.val maxVal = maxVal if head.val < maxVal else head.val head = head.next return [minVal, maxVal] def main(): nums = [8, 2, 4, 5, 7, 9, 12, 2, 1] head = ListNode(10) for num in nums: node = ListNode(num, head) head = node print_list(head) print(min_max(head)) print(min_max_2(head)) if __name__ == '__main__': main()
""" Given a singly linked list of n nodes and find the smallest and largest elements in linked list. """ class Listnode: def __init__(self, val=0, next=None): self.val = val self.next = next def print_list(head): while head: print(f' {head.val} ->', end=' ') head = head.next print() def min_max(head): (min_val, max_val) = (0, 0) while head: min_val = min(minVal, head.val) max_val = max(maxVal, head.val) head = head.next return [minVal, maxVal] def min_max_2(head): (min_val, max_val) = (0, 0) while head: min_val = minVal if head.val > minVal else head.val max_val = maxVal if head.val < maxVal else head.val head = head.next return [minVal, maxVal] def main(): nums = [8, 2, 4, 5, 7, 9, 12, 2, 1] head = list_node(10) for num in nums: node = list_node(num, head) head = node print_list(head) print(min_max(head)) print(min_max_2(head)) if __name__ == '__main__': main()
MAX_RESULTS = '50' CHANNELS_PART = 'brandingSettings,contentDetails,contentOwnerDetails,id,localizations,snippet,statistics,status,topicDetails' VIDEOS_PART = 'contentDetails,id,liveStreamingDetails,localizations,player,recordingDetails,snippet,statistics,status,topicDetails' SEARCH_PARTS = 'snippet' COMMENT_THREADS_PARTS = 'id,snippet,replies' COMMENTS_PARTS = 'id,snippet' PLAYLIST_ITEMS_PARTS = 'id,snippet,contentDetails,status' PLAYLISTS_PARTS = 'id,snippet,contentDetails,status,player,localizations' BASE_URL = 'https://www.googleapis.com/youtube/v3'
max_results = '50' channels_part = 'brandingSettings,contentDetails,contentOwnerDetails,id,localizations,snippet,statistics,status,topicDetails' videos_part = 'contentDetails,id,liveStreamingDetails,localizations,player,recordingDetails,snippet,statistics,status,topicDetails' search_parts = 'snippet' comment_threads_parts = 'id,snippet,replies' comments_parts = 'id,snippet' playlist_items_parts = 'id,snippet,contentDetails,status' playlists_parts = 'id,snippet,contentDetails,status,player,localizations' base_url = 'https://www.googleapis.com/youtube/v3'
# -*- coding: utf-8 -*- """db/tests/collection_test.py By David J. Thomas, thePortus.com, dave.a.base@gmail.com Unit test for the Collection, Publisher, Subject, and many-to-many tables that join them """
"""db/tests/collection_test.py By David J. Thomas, thePortus.com, dave.a.base@gmail.com Unit test for the Collection, Publisher, Subject, and many-to-many tables that join them """
heroes = { "*Adagio*": "Adagio", "*Alpha*": "Alpha", "*Ardan*": "Ardan", "*Baron*": "Baron", "*Blackfeather*": "Blackfeather", "*Catherine*": "Catherine", "*Celeste*": "Celeste", "*Flicker*": "Flicker", "*Fortress*": "Fortress", "*Glaive*": "Glaive", "*Gwen*": "Gwen", "*Krul*": "Krul", "*Hero009*": "Krul", "*Skaarf*": "Skaarf", "*Hero010*": "Skaarf", "*Rona*": "Rona", "*Hero016*": "Rona", "*Idris*": "Idris", "*Joule*": "Joule", "*Kestrel*": "Kestrel", "*Koshka*": "Koshka", "*Lance*": "Lance", "*Lyra*": "Lyra", "*Ozo*": "Ozo", "*Petal*": "Petal", "*Phinn*": "Phinn", "*Reim*": "Reim", "*Ringo*": "Ringo", "*Samuel*": "Samuel", "*SAW*": "SAW", "*Taka*": "Taka", "*Sayoc*": "Taka", "*Skye*": "Skye", "*Vox*": "Vox", "*Grumpjaw*": "Grumpjaw", "*Baptiste*": "Baptiste" }
heroes = {'*Adagio*': 'Adagio', '*Alpha*': 'Alpha', '*Ardan*': 'Ardan', '*Baron*': 'Baron', '*Blackfeather*': 'Blackfeather', '*Catherine*': 'Catherine', '*Celeste*': 'Celeste', '*Flicker*': 'Flicker', '*Fortress*': 'Fortress', '*Glaive*': 'Glaive', '*Gwen*': 'Gwen', '*Krul*': 'Krul', '*Hero009*': 'Krul', '*Skaarf*': 'Skaarf', '*Hero010*': 'Skaarf', '*Rona*': 'Rona', '*Hero016*': 'Rona', '*Idris*': 'Idris', '*Joule*': 'Joule', '*Kestrel*': 'Kestrel', '*Koshka*': 'Koshka', '*Lance*': 'Lance', '*Lyra*': 'Lyra', '*Ozo*': 'Ozo', '*Petal*': 'Petal', '*Phinn*': 'Phinn', '*Reim*': 'Reim', '*Ringo*': 'Ringo', '*Samuel*': 'Samuel', '*SAW*': 'SAW', '*Taka*': 'Taka', '*Sayoc*': 'Taka', '*Skye*': 'Skye', '*Vox*': 'Vox', '*Grumpjaw*': 'Grumpjaw', '*Baptiste*': 'Baptiste'}
# Generated by h2py from /usr/include/netinet/in.h # Included from net/nh.h # Included from sys/machine.h LITTLE_ENDIAN = 1234 BIG_ENDIAN = 4321 PDP_ENDIAN = 3412 BYTE_ORDER = BIG_ENDIAN DEFAULT_GPR = 0xDEADBEEF MSR_EE = 0x8000 MSR_PR = 0x4000 MSR_FP = 0x2000 MSR_ME = 0x1000 MSR_FE = 0x0800 MSR_FE0 = 0x0800 MSR_SE = 0x0400 MSR_BE = 0x0200 MSR_IE = 0x0100 MSR_FE1 = 0x0100 MSR_AL = 0x0080 MSR_IP = 0x0040 MSR_IR = 0x0020 MSR_DR = 0x0010 MSR_PM = 0x0004 DEFAULT_MSR = (MSR_EE | MSR_ME | MSR_AL | MSR_IR | MSR_DR) DEFAULT_USER_MSR = (DEFAULT_MSR | MSR_PR) CR_LT = 0x80000000 CR_GT = 0x40000000 CR_EQ = 0x20000000 CR_SO = 0x10000000 CR_FX = 0x08000000 CR_FEX = 0x04000000 CR_VX = 0x02000000 CR_OX = 0x01000000 XER_SO = 0x80000000 XER_OV = 0x40000000 XER_CA = 0x20000000 def XER_COMP_BYTE(xer): return ((xer >> 8) & 0x000000FF) def XER_LENGTH(xer): return (xer & 0x0000007F) DSISR_IO = 0x80000000 DSISR_PFT = 0x40000000 DSISR_LOCK = 0x20000000 DSISR_FPIO = 0x10000000 DSISR_PROT = 0x08000000 DSISR_LOOP = 0x04000000 DSISR_DRST = 0x04000000 DSISR_ST = 0x02000000 DSISR_SEGB = 0x01000000 DSISR_DABR = 0x00400000 DSISR_EAR = 0x00100000 SRR_IS_PFT = 0x40000000 SRR_IS_ISPEC = 0x20000000 SRR_IS_IIO = 0x10000000 SRR_IS_GUARD = 0x10000000 SRR_IS_PROT = 0x08000000 SRR_IS_LOOP = 0x04000000 SRR_PR_FPEN = 0x00100000 SRR_PR_INVAL = 0x00080000 SRR_PR_PRIV = 0x00040000 SRR_PR_TRAP = 0x00020000 SRR_PR_IMPRE = 0x00010000 def BUID_7F_SRVAL(raddr): return (0x87F00000 | (((uint)(raddr)) >> 28)) BT_256M = 0x1FFC BT_128M = 0x0FFC BT_64M = 0x07FC BT_32M = 0x03FC BT_16M = 0x01FC BT_8M = 0x00FC BT_4M = 0x007C BT_2M = 0x003C BT_1M = 0x001C BT_512K = 0x000C BT_256K = 0x0004 BT_128K = 0x0000 BT_NOACCESS = 0x0 BT_RDONLY = 0x1 BT_WRITE = 0x2 BT_VS = 0x2 BT_VP = 0x1 def BAT_ESEG(dbatu): return (((uint)(dbatu) >> 28)) MIN_BAT_SIZE = 0x00020000 MAX_BAT_SIZE = 0x10000000 def ntohl(x): return (x) def ntohs(x): return (x) def htonl(x): return (x) def htons(x): return (x) IPPROTO_IP = 0 IPPROTO_ICMP = 1 IPPROTO_IGMP = 2 IPPROTO_GGP = 3 IPPROTO_TCP = 6 IPPROTO_EGP = 8 IPPROTO_PUP = 12 IPPROTO_UDP = 17 IPPROTO_IDP = 22 IPPROTO_TP = 29 IPPROTO_LOCAL = 63 IPPROTO_EON = 80 IPPROTO_BIP = 0x53 IPPROTO_RAW = 255 IPPROTO_MAX = 256 IPPORT_RESERVED = 1024 IPPORT_USERRESERVED = 5000 IPPORT_TIMESERVER = 37 def IN_CLASSA(i): return (((int)(i) & 0x80000000) == 0) IN_CLASSA_NET = 0xff000000 IN_CLASSA_NSHIFT = 24 IN_CLASSA_HOST = 0x00ffffff IN_CLASSA_MAX = 128 def IN_CLASSB(i): return (((int)(i) & 0xc0000000) == 0x80000000) IN_CLASSB_NET = 0xffff0000 IN_CLASSB_NSHIFT = 16 IN_CLASSB_HOST = 0x0000ffff IN_CLASSB_MAX = 65536 def IN_CLASSC(i): return (((int)(i) & 0xe0000000) == 0xc0000000) IN_CLASSC_NET = 0xffffff00 IN_CLASSC_NSHIFT = 8 IN_CLASSC_HOST = 0x000000ff def IN_CLASSD(i): return (((int)(i) & 0xf0000000) == 0xe0000000) def IN_MULTICAST(i): return IN_CLASSD(i) IN_CLASSD_NET = 0xf0000000 IN_CLASSD_NSHIFT = 28 IN_CLASSD_HOST = 0x0fffffff INADDR_UNSPEC_GROUP = 0xe0000000 INADDR_ALLHOSTS_GROUP = 0xe0000001 INADDR_MAX_LOCAL_GROUP = 0xe00000ff def IN_EXPERIMENTAL(i): return (((int)(i) & 0xe0000000) == 0xe0000000) def IN_BADCLASS(i): return (((int)(i) & 0xf0000000) == 0xf0000000) INADDR_ANY = 0x00000000 INADDR_BROADCAST = 0xffffffff INADDR_LOOPBACK = 0x7f000001 INADDR_NONE = 0xffffffff IN_LOOPBACKNET = 127 IP_OPTIONS = 1 IP_HDRINCL = 2 IP_TOS = 3 IP_TTL = 4 IP_RECVOPTS = 5 IP_RECVRETOPTS = 6 IP_RECVDSTADDR = 7 IP_RETOPTS = 8 IP_MULTICAST_IF = 9 IP_MULTICAST_TTL = 10 IP_MULTICAST_LOOP = 11 IP_ADD_MEMBERSHIP = 12 IP_DROP_MEMBERSHIP = 13 IP_DEFAULT_MULTICAST_TTL = 1 IP_DEFAULT_MULTICAST_LOOP = 1 IP_MAX_MEMBERSHIPS = 20
little_endian = 1234 big_endian = 4321 pdp_endian = 3412 byte_order = BIG_ENDIAN default_gpr = 3735928559 msr_ee = 32768 msr_pr = 16384 msr_fp = 8192 msr_me = 4096 msr_fe = 2048 msr_fe0 = 2048 msr_se = 1024 msr_be = 512 msr_ie = 256 msr_fe1 = 256 msr_al = 128 msr_ip = 64 msr_ir = 32 msr_dr = 16 msr_pm = 4 default_msr = MSR_EE | MSR_ME | MSR_AL | MSR_IR | MSR_DR default_user_msr = DEFAULT_MSR | MSR_PR cr_lt = 2147483648 cr_gt = 1073741824 cr_eq = 536870912 cr_so = 268435456 cr_fx = 134217728 cr_fex = 67108864 cr_vx = 33554432 cr_ox = 16777216 xer_so = 2147483648 xer_ov = 1073741824 xer_ca = 536870912 def xer_comp_byte(xer): return xer >> 8 & 255 def xer_length(xer): return xer & 127 dsisr_io = 2147483648 dsisr_pft = 1073741824 dsisr_lock = 536870912 dsisr_fpio = 268435456 dsisr_prot = 134217728 dsisr_loop = 67108864 dsisr_drst = 67108864 dsisr_st = 33554432 dsisr_segb = 16777216 dsisr_dabr = 4194304 dsisr_ear = 1048576 srr_is_pft = 1073741824 srr_is_ispec = 536870912 srr_is_iio = 268435456 srr_is_guard = 268435456 srr_is_prot = 134217728 srr_is_loop = 67108864 srr_pr_fpen = 1048576 srr_pr_inval = 524288 srr_pr_priv = 262144 srr_pr_trap = 131072 srr_pr_impre = 65536 def buid_7_f_srval(raddr): return 2280652800 | uint(raddr) >> 28 bt_256_m = 8188 bt_128_m = 4092 bt_64_m = 2044 bt_32_m = 1020 bt_16_m = 508 bt_8_m = 252 bt_4_m = 124 bt_2_m = 60 bt_1_m = 28 bt_512_k = 12 bt_256_k = 4 bt_128_k = 0 bt_noaccess = 0 bt_rdonly = 1 bt_write = 2 bt_vs = 2 bt_vp = 1 def bat_eseg(dbatu): return uint(dbatu) >> 28 min_bat_size = 131072 max_bat_size = 268435456 def ntohl(x): return x def ntohs(x): return x def htonl(x): return x def htons(x): return x ipproto_ip = 0 ipproto_icmp = 1 ipproto_igmp = 2 ipproto_ggp = 3 ipproto_tcp = 6 ipproto_egp = 8 ipproto_pup = 12 ipproto_udp = 17 ipproto_idp = 22 ipproto_tp = 29 ipproto_local = 63 ipproto_eon = 80 ipproto_bip = 83 ipproto_raw = 255 ipproto_max = 256 ipport_reserved = 1024 ipport_userreserved = 5000 ipport_timeserver = 37 def in_classa(i): return int(i) & 2147483648 == 0 in_classa_net = 4278190080 in_classa_nshift = 24 in_classa_host = 16777215 in_classa_max = 128 def in_classb(i): return int(i) & 3221225472 == 2147483648 in_classb_net = 4294901760 in_classb_nshift = 16 in_classb_host = 65535 in_classb_max = 65536 def in_classc(i): return int(i) & 3758096384 == 3221225472 in_classc_net = 4294967040 in_classc_nshift = 8 in_classc_host = 255 def in_classd(i): return int(i) & 4026531840 == 3758096384 def in_multicast(i): return in_classd(i) in_classd_net = 4026531840 in_classd_nshift = 28 in_classd_host = 268435455 inaddr_unspec_group = 3758096384 inaddr_allhosts_group = 3758096385 inaddr_max_local_group = 3758096639 def in_experimental(i): return int(i) & 3758096384 == 3758096384 def in_badclass(i): return int(i) & 4026531840 == 4026531840 inaddr_any = 0 inaddr_broadcast = 4294967295 inaddr_loopback = 2130706433 inaddr_none = 4294967295 in_loopbacknet = 127 ip_options = 1 ip_hdrincl = 2 ip_tos = 3 ip_ttl = 4 ip_recvopts = 5 ip_recvretopts = 6 ip_recvdstaddr = 7 ip_retopts = 8 ip_multicast_if = 9 ip_multicast_ttl = 10 ip_multicast_loop = 11 ip_add_membership = 12 ip_drop_membership = 13 ip_default_multicast_ttl = 1 ip_default_multicast_loop = 1 ip_max_memberships = 20
characterMapNurse = { "nurse_be1_001": "nurse_be1_001", # Auto: Same "nurse_be1_002": "nurse_be1_002", # Auto: Same "nurse_be1_003": "nurse_be1_003", # Auto: Same "nurse_be1_full_001": "nurse_be1_full_001", # Auto: Same "nurse_be1_full_002": "nurse_be1_full_002", # Auto: Same "nurse_be1_full_003": "nurse_be1_full_003", # Auto: Same "nurse_be1_full_naked_001": "nurse_be1_full_naked_001", # Auto: Same "nurse_be1_full_naked_002": "nurse_be1_full_naked_002", # Auto: Same "nurse_be1_full_naked_003": "nurse_be1_full_naked_003", # Auto: Same "nurse_be1_full_skimp_001": "nurse_be1_full_skimp_001", # Auto: Same "nurse_be1_full_skimp_002": "nurse_be1_full_skimp_002", # Auto: Same "nurse_be1_full_skimp_003": "nurse_be1_full_skimp_003", # Auto: Same "nurse_be1_full_under_001": "nurse_be1_full_under_001", # Auto: Same "nurse_be1_full_under_002": "nurse_be1_full_under_002", # Auto: Same "nurse_be1_full_under_003": "nurse_be1_full_under_003", # Auto: Same "nurse_be1_naked_001": "nurse_be1_naked_001", # Auto: Same "nurse_be1_naked_002": "nurse_be1_naked_002", # Auto: Same "nurse_be1_naked_003": "nurse_be1_naked_003", # Auto: Same "nurse_be1_skimp_001": "nurse_be1_skimp_001", # Auto: Same "nurse_be1_skimp_002": "nurse_be1_skimp_002", # Auto: Same "nurse_be1_skimp_003": "nurse_be1_skimp_003", # Auto: Same "nurse_be1_under_001": "nurse_be1_under_001", # Auto: Same "nurse_be1_under_002": "nurse_be1_under_002", # Auto: Same "nurse_be1_under_003": "nurse_be1_under_003", # Auto: Same "nurse_base_001": "nurse_base_001", # Auto: Edited "nurse_base_002": "nurse_base_002", # Auto: Edited "nurse_base_003": "nurse_base_003", # Auto: Edited "nurse_base_full_001": "nurse_base_full_001", # Auto: Same "nurse_base_full_002": "nurse_base_full_002", # Auto: Same "nurse_base_full_003": "nurse_base_full_003", # Auto: Same "nurse_base_full_naked_001": "nurse_base_full_naked_001", # Auto: Same "nurse_base_full_naked_002": "nurse_base_full_naked_002", # Auto: Same "nurse_base_full_naked_003": "nurse_base_full_naked_003", # Auto: Same "nurse_base_full_skimp_001": "nurse_base_full_skimp_001", # Auto: Same "nurse_base_full_skimp_002": "nurse_base_full_skimp_002", # Auto: Same "nurse_base_full_skimp_003": "nurse_base_full_skimp_003", # Auto: Same "nurse_base_full_under_001": "nurse_base_full_under_001", # Auto: Same "nurse_base_full_under_002": "nurse_base_full_under_002", # Auto: Same "nurse_base_full_under_003": "nurse_base_full_under_003", # Auto: Same "nurse_base_naked_001": "nurse_base_naked_001", # Auto: Edited "nurse_base_naked_002": "nurse_base_naked_002", # Auto: Edited "nurse_base_naked_003": "nurse_base_naked_003", # Auto: Edited "nurse_base_skimp_001": "nurse_base_skimp_001", # Auto: Edited "nurse_base_skimp_002": "nurse_base_skimp_002", # Auto: Edited "nurse_base_skimp_003": "nurse_base_skimp_003", # Auto: Edited "nurse_base_under_001": "nurse_base_under_001", # Auto: Edited "nurse_base_under_002": "nurse_base_under_002", # Auto: Edited "nurse_base_under_003": "nurse_base_under_003", # Auto: Edited "nurse_ex_001_001": "nurse_ex_001_001", # Auto: Same "nurse_ex_001_neutral_001": "nurse_ex_001_neutral_001", # Auto: Same "nurse_ex_001_smile_001": "nurse_ex_001_smile_001", # Auto: Same "nurse_ex_002_001": "nurse_ex_002_smile_001", # Auto: Renamed "nurse_ex_002_smile_001": "nurse_ex_002_001", # Auto: Renamed "nurse_ex_003_001": "nurse_ex_003_irked_001", # Auto: Renamed "nurse_ex_003_grin2_001": "nurse_ex_003_smile2_001", # Auto: Renamed "nurse_ex_003_grin_001": "", # Auto: Deleted "nurse_ex_003_open2_002": "nurse_ex_003_open2_002", # Auto: Same "nurse_ex_003_open_001": "nurse_ex_003_irked2_001", # Auto: Renamed "nurse_ex_004_001": "nurse_ex_004_open_001", # Auto: Renamed "nurse_ex_004_closed_001": "nurse_ex_004_001", # Auto: Renamed "nurse_ex_004_smile_001": "nurse_ex_004_smile_001", # Auto: Edited "nurse_ex_005_001": "nurse_ex_005_001", # Auto: Same "nurse_ex_005_open_001": "nurse_ex_005_open_001", # Auto: Same "nurse_ex_005_smile2_001": "nurse_ex_005_smile2_001", # Auto: Same "nurse_ex_005_smile_001": "nurse_ex_005_smile_001", # Auto: Same "nurse_ex_006_001": "nurse_ex_006_001", # Auto: Same "nurse_ex_006_open_001": "nurse_ex_006_open_001", # Auto: Same "nurse_ex_006_smile2_001": "nurse_ex_006_smile2_001", # Auto: Same "nurse_ex_006_smile_001": "nurse_ex_006_smile_001", # Auto: Same "nurse_ex_007_001": "nurse_ex_005_aroused2_001", # Auto: Renamed "nurse_ex_008_002": "", # Auto: Deleted "nurse_ex_009_002": "nurse_ex_003_grin_002", # Auto: Renamed "nurse_ex_010_002": "nurse_ex_012_002", # Auto: Renamed "nurse_ex_011_003": "nurse_ex_007_003", # Auto: Renamed "nurse_ex_012_003": "nurse_ex_008_003", # Auto: Renamed "nurse_ex_013_003": "nurse_ex_013_003", # Auto: Same "nurse_ex_full_001_001": "nurse_ex_full_001_001", # Auto: Same "nurse_ex_full_001_neutral_001": "nurse_ex_full_001_neutral_001", # Auto: Same "nurse_ex_full_001_smile_001": "nurse_ex_full_001_smile_001", # Auto: Same "nurse_ex_full_002_001": "nurse_ex_full_002_smile_001", # Auto: Renamed "nurse_ex_full_002_smile_001": "nurse_ex_full_002_001", # Auto: Renamed "nurse_ex_full_003_001": "nurse_ex_full_003_irked_001", # Auto: Renamed "nurse_ex_full_003_grin2_001": "nurse_ex_full_003_smile2_001", # Auto: Renamed "nurse_ex_full_003_grin_001": "", # Auto: Deleted "nurse_ex_full_003_open2_002": "nurse_ex_full_003_open2_002", # Auto: Same "nurse_ex_full_003_open_001": "nurse_ex_full_003_irked2_001", # Auto: Renamed "nurse_ex_full_004_001": "nurse_ex_full_004_open_001", # Auto: Renamed "nurse_ex_full_004_closed_001": "nurse_ex_full_004_001", # Auto: Renamed "nurse_ex_full_004_smile_001": "nurse_ex_full_004_smile_001", # Auto: Edited "nurse_ex_full_005_001": "nurse_ex_full_005_001", # Auto: Same "nurse_ex_full_005_open_001": "nurse_ex_full_005_open_001", # Auto: Same "nurse_ex_full_005_smile2_001": "nurse_ex_full_005_smile2_001", # Auto: Same "nurse_ex_full_005_smile_001": "nurse_ex_full_005_smile_001", # Auto: Same "nurse_ex_full_006_001": "nurse_ex_full_006_001", # Auto: Same "nurse_ex_full_006_open_001": "nurse_ex_full_006_open_001", # Auto: Same "nurse_ex_full_006_smile2_001": "nurse_ex_full_006_smile2_001", # Auto: Same "nurse_ex_full_006_smile_001": "nurse_ex_full_006_smile_001", # Auto: Same "nurse_ex_full_007_001": "nurse_ex_full_005_aroused2_001", # Auto: Renamed "nurse_ex_full_008_002": "", # Auto: Deleted "nurse_ex_full_009_002": "nurse_ex_full_003_grin_002", # Auto: Renamed "nurse_ex_full_010_002": "nurse_ex_full_012_002", # Auto: Renamed "nurse_ex_full_011_003": "nurse_ex_full_007_003", # Auto: Renamed "nurse_ex_full_012_003": "nurse_ex_full_008_003", # Auto: Renamed "nurse_ex_full_013_003": "nurse_ex_full_013_003", # Auto: Same }
character_map_nurse = {'nurse_be1_001': 'nurse_be1_001', 'nurse_be1_002': 'nurse_be1_002', 'nurse_be1_003': 'nurse_be1_003', 'nurse_be1_full_001': 'nurse_be1_full_001', 'nurse_be1_full_002': 'nurse_be1_full_002', 'nurse_be1_full_003': 'nurse_be1_full_003', 'nurse_be1_full_naked_001': 'nurse_be1_full_naked_001', 'nurse_be1_full_naked_002': 'nurse_be1_full_naked_002', 'nurse_be1_full_naked_003': 'nurse_be1_full_naked_003', 'nurse_be1_full_skimp_001': 'nurse_be1_full_skimp_001', 'nurse_be1_full_skimp_002': 'nurse_be1_full_skimp_002', 'nurse_be1_full_skimp_003': 'nurse_be1_full_skimp_003', 'nurse_be1_full_under_001': 'nurse_be1_full_under_001', 'nurse_be1_full_under_002': 'nurse_be1_full_under_002', 'nurse_be1_full_under_003': 'nurse_be1_full_under_003', 'nurse_be1_naked_001': 'nurse_be1_naked_001', 'nurse_be1_naked_002': 'nurse_be1_naked_002', 'nurse_be1_naked_003': 'nurse_be1_naked_003', 'nurse_be1_skimp_001': 'nurse_be1_skimp_001', 'nurse_be1_skimp_002': 'nurse_be1_skimp_002', 'nurse_be1_skimp_003': 'nurse_be1_skimp_003', 'nurse_be1_under_001': 'nurse_be1_under_001', 'nurse_be1_under_002': 'nurse_be1_under_002', 'nurse_be1_under_003': 'nurse_be1_under_003', 'nurse_base_001': 'nurse_base_001', 'nurse_base_002': 'nurse_base_002', 'nurse_base_003': 'nurse_base_003', 'nurse_base_full_001': 'nurse_base_full_001', 'nurse_base_full_002': 'nurse_base_full_002', 'nurse_base_full_003': 'nurse_base_full_003', 'nurse_base_full_naked_001': 'nurse_base_full_naked_001', 'nurse_base_full_naked_002': 'nurse_base_full_naked_002', 'nurse_base_full_naked_003': 'nurse_base_full_naked_003', 'nurse_base_full_skimp_001': 'nurse_base_full_skimp_001', 'nurse_base_full_skimp_002': 'nurse_base_full_skimp_002', 'nurse_base_full_skimp_003': 'nurse_base_full_skimp_003', 'nurse_base_full_under_001': 'nurse_base_full_under_001', 'nurse_base_full_under_002': 'nurse_base_full_under_002', 'nurse_base_full_under_003': 'nurse_base_full_under_003', 'nurse_base_naked_001': 'nurse_base_naked_001', 'nurse_base_naked_002': 'nurse_base_naked_002', 'nurse_base_naked_003': 'nurse_base_naked_003', 'nurse_base_skimp_001': 'nurse_base_skimp_001', 'nurse_base_skimp_002': 'nurse_base_skimp_002', 'nurse_base_skimp_003': 'nurse_base_skimp_003', 'nurse_base_under_001': 'nurse_base_under_001', 'nurse_base_under_002': 'nurse_base_under_002', 'nurse_base_under_003': 'nurse_base_under_003', 'nurse_ex_001_001': 'nurse_ex_001_001', 'nurse_ex_001_neutral_001': 'nurse_ex_001_neutral_001', 'nurse_ex_001_smile_001': 'nurse_ex_001_smile_001', 'nurse_ex_002_001': 'nurse_ex_002_smile_001', 'nurse_ex_002_smile_001': 'nurse_ex_002_001', 'nurse_ex_003_001': 'nurse_ex_003_irked_001', 'nurse_ex_003_grin2_001': 'nurse_ex_003_smile2_001', 'nurse_ex_003_grin_001': '', 'nurse_ex_003_open2_002': 'nurse_ex_003_open2_002', 'nurse_ex_003_open_001': 'nurse_ex_003_irked2_001', 'nurse_ex_004_001': 'nurse_ex_004_open_001', 'nurse_ex_004_closed_001': 'nurse_ex_004_001', 'nurse_ex_004_smile_001': 'nurse_ex_004_smile_001', 'nurse_ex_005_001': 'nurse_ex_005_001', 'nurse_ex_005_open_001': 'nurse_ex_005_open_001', 'nurse_ex_005_smile2_001': 'nurse_ex_005_smile2_001', 'nurse_ex_005_smile_001': 'nurse_ex_005_smile_001', 'nurse_ex_006_001': 'nurse_ex_006_001', 'nurse_ex_006_open_001': 'nurse_ex_006_open_001', 'nurse_ex_006_smile2_001': 'nurse_ex_006_smile2_001', 'nurse_ex_006_smile_001': 'nurse_ex_006_smile_001', 'nurse_ex_007_001': 'nurse_ex_005_aroused2_001', 'nurse_ex_008_002': '', 'nurse_ex_009_002': 'nurse_ex_003_grin_002', 'nurse_ex_010_002': 'nurse_ex_012_002', 'nurse_ex_011_003': 'nurse_ex_007_003', 'nurse_ex_012_003': 'nurse_ex_008_003', 'nurse_ex_013_003': 'nurse_ex_013_003', 'nurse_ex_full_001_001': 'nurse_ex_full_001_001', 'nurse_ex_full_001_neutral_001': 'nurse_ex_full_001_neutral_001', 'nurse_ex_full_001_smile_001': 'nurse_ex_full_001_smile_001', 'nurse_ex_full_002_001': 'nurse_ex_full_002_smile_001', 'nurse_ex_full_002_smile_001': 'nurse_ex_full_002_001', 'nurse_ex_full_003_001': 'nurse_ex_full_003_irked_001', 'nurse_ex_full_003_grin2_001': 'nurse_ex_full_003_smile2_001', 'nurse_ex_full_003_grin_001': '', 'nurse_ex_full_003_open2_002': 'nurse_ex_full_003_open2_002', 'nurse_ex_full_003_open_001': 'nurse_ex_full_003_irked2_001', 'nurse_ex_full_004_001': 'nurse_ex_full_004_open_001', 'nurse_ex_full_004_closed_001': 'nurse_ex_full_004_001', 'nurse_ex_full_004_smile_001': 'nurse_ex_full_004_smile_001', 'nurse_ex_full_005_001': 'nurse_ex_full_005_001', 'nurse_ex_full_005_open_001': 'nurse_ex_full_005_open_001', 'nurse_ex_full_005_smile2_001': 'nurse_ex_full_005_smile2_001', 'nurse_ex_full_005_smile_001': 'nurse_ex_full_005_smile_001', 'nurse_ex_full_006_001': 'nurse_ex_full_006_001', 'nurse_ex_full_006_open_001': 'nurse_ex_full_006_open_001', 'nurse_ex_full_006_smile2_001': 'nurse_ex_full_006_smile2_001', 'nurse_ex_full_006_smile_001': 'nurse_ex_full_006_smile_001', 'nurse_ex_full_007_001': 'nurse_ex_full_005_aroused2_001', 'nurse_ex_full_008_002': '', 'nurse_ex_full_009_002': 'nurse_ex_full_003_grin_002', 'nurse_ex_full_010_002': 'nurse_ex_full_012_002', 'nurse_ex_full_011_003': 'nurse_ex_full_007_003', 'nurse_ex_full_012_003': 'nurse_ex_full_008_003', 'nurse_ex_full_013_003': 'nurse_ex_full_013_003'}
nombre="roberto" edad=25 persona=["jorge","peralta",34256643,1987,0] print(persona) clave_personal=persona[2] * persona[-2] print(clave_personal) persona[-1]=clave_personal print(persona)
nombre = 'roberto' edad = 25 persona = ['jorge', 'peralta', 34256643, 1987, 0] print(persona) clave_personal = persona[2] * persona[-2] print(clave_personal) persona[-1] = clave_personal print(persona)
Mystring = "Castlevania" Mystring2 = "C a s t l e v a n i a" Otherstring = "Mankind" # Comando dir -> Sacar Metodos # print(dir(Mystring)) # print(Mystring.title()) # print(Mystring.upper()) # print(Otherstring.lower()) # print(Mystring.lower()) # print(Mystring.swapcase()) # print(Otherstring.replace("Mankind", "Pale")) # print(Mystring.count("a")) # print(Otherstring.count("n")) # print(Mystring.startswith("C")) # print(Mystring.endswith("C")) # print(Mystring2.split()) # print(Mystring.split("a")) # print(Mystring.find("C")) # print(len(Mystring)) # print(Mystring[0]) # print(Mystring[1]) # print(Mystring[2]) # print(Mystring[3]) # print(Mystring[4]) # print(Mystring[5]) # print(Mystring[6]) # print(Mystring[7]) # print(Mystring[8]) # print(Mystring[9]) # print(Mystring[10]) # Formas de concatenar print(f"My favorite game is {Mystring}") # 3.6 -> Version mas actual print("My favorite game is " + Mystring) print("My favorite game is {0}".format(Mystring)) print(f"{Otherstring} in spanish is Humanidad")
mystring = 'Castlevania' mystring2 = 'C a s t l e v a n i a' otherstring = 'Mankind' print(f'My favorite game is {Mystring}') print('My favorite game is ' + Mystring) print('My favorite game is {0}'.format(Mystring)) print(f'{Otherstring} in spanish is Humanidad')
# define the paths to the image directory IMAGES_PATH = "../dataset/kaggle_dogs_vs_cats/train" # since we do not have the validation data or acces to the testing # labels we need to take a number of images from the training # data and use them instead NUM_CLASSES = 2 NUM_VALIDATION_IMAGES = 1250 * NUM_CLASSES NUM_TEST_IMAGES = 1250 * NUM_CLASSES # define the path to the output training, validation, and testing # HDF5 files TRAIN_HDF5 = "../dataset/kaggle_dogs_vs_cats/hdf5/train.hdf5" VALIDATION_HDF5 = "../dataset/kaggle_dogs_vs_cats/hdf5/validation.hdf5" TEST_HDF5 = "../dataset/kaggle_dogs_vs_cats/hdf5/test.hdf5" # path to the output model file MODEL_PATH = "output/alexnet_dogs_vs_cats.model" # define the path to the dataset mean DATASET_MEAN = "output/dogs_vs_cats_mean.json" # define the path to the output directory used for storing plots, # classification reports, etc OUTPUT_PATH = "output"
images_path = '../dataset/kaggle_dogs_vs_cats/train' num_classes = 2 num_validation_images = 1250 * NUM_CLASSES num_test_images = 1250 * NUM_CLASSES train_hdf5 = '../dataset/kaggle_dogs_vs_cats/hdf5/train.hdf5' validation_hdf5 = '../dataset/kaggle_dogs_vs_cats/hdf5/validation.hdf5' test_hdf5 = '../dataset/kaggle_dogs_vs_cats/hdf5/test.hdf5' model_path = 'output/alexnet_dogs_vs_cats.model' dataset_mean = 'output/dogs_vs_cats_mean.json' output_path = 'output'
## ## code ## pmLookup = { b'00': 'Film', b'01': 'Cinema', b'02': 'Animation', b'03': 'Natural', b'04': 'HDR10', b'06': 'THX', b'0B': 'FrameAdaptHDR', b'0C': 'User1', b'0D': 'User2', b'0E': 'User3', b'0F': 'User4', b'10': 'User5', b'11': 'User6', b'14': 'HLG', b'16': 'PanaPQ' } def getPictureMode(bin): if bin in pmLookup: return pmLookup[bin] else: return 'Unknown' + bin.decode('ascii')
pm_lookup = {b'00': 'Film', b'01': 'Cinema', b'02': 'Animation', b'03': 'Natural', b'04': 'HDR10', b'06': 'THX', b'0B': 'FrameAdaptHDR', b'0C': 'User1', b'0D': 'User2', b'0E': 'User3', b'0F': 'User4', b'10': 'User5', b'11': 'User6', b'14': 'HLG', b'16': 'PanaPQ'} def get_picture_mode(bin): if bin in pmLookup: return pmLookup[bin] else: return 'Unknown' + bin.decode('ascii')
# Copyright 2019 The Vearch Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # ============================================================================== #Definition of parameters # Define which port the web runs on # you can view the result of searching by # inputting http://yourIP:show_port in your web browse port = 4101 # Batch Extraction Features, you can modify batch_size by # your GPU Memory batch_size = 16 # The name of model for web platform, Currently only one model is supported detect_model = "yolo3" extract_model = "vgg16" # Define gpu parameters, gpu = "0" # Define deployment address of vearch ip_address = "http://****" ip_scheme = ip_address + ":443/space" ip_insert = ip_address + ":80" database_name = "test" table_name = "test"
port = 4101 batch_size = 16 detect_model = 'yolo3' extract_model = 'vgg16' gpu = '0' ip_address = 'http://****' ip_scheme = ip_address + ':443/space' ip_insert = ip_address + ':80' database_name = 'test' table_name = 'test'
class Test_2020(object): def __init__(self): self.a = 1 print(f'success') def add_a(self): self.a += 1
class Test_2020(object): def __init__(self): self.a = 1 print(f'success') def add_a(self): self.a += 1
# # PySNMP MIB module ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:01:40 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) # softentIND1Vfc, = mibBuilder.importSymbols("ALCATEL-IND1-BASE", "softentIND1Vfc") ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "SingleValueConstraint") InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup") Integer32, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, Bits, ModuleIdentity, TimeTicks, Counter64, Unsigned32, Counter32, NotificationType, ObjectIdentity, Gauge32, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "Bits", "ModuleIdentity", "TimeTicks", "Counter64", "Unsigned32", "Counter32", "NotificationType", "ObjectIdentity", "Gauge32", "iso") TextualConvention, RowStatus, DisplayString, DateAndTime = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "RowStatus", "DisplayString", "DateAndTime") alcatelIND1VfcMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1)) alcatelIND1VfcMIB.setRevisions(('2010-03-15 00:00',)) if mibBuilder.loadTexts: alcatelIND1VfcMIB.setLastUpdated('201003150000Z') if mibBuilder.loadTexts: alcatelIND1VfcMIB.setOrganization('Alcatel-Lucent') alcatelIND1VfcMIBObjects = ObjectIdentity((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1)) if mibBuilder.loadTexts: alcatelIND1VfcMIBObjects.setStatus('current') alcatelIND1VfcMIBConformance = ObjectIdentity((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2)) if mibBuilder.loadTexts: alcatelIND1VfcMIBConformance.setStatus('current') alcatelIND1VfcMIBGroups = ObjectIdentity((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1)) if mibBuilder.loadTexts: alcatelIND1VfcMIBGroups.setStatus('current') alcatelIND1VfcMIBCompliances = ObjectIdentity((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 2)) if mibBuilder.loadTexts: alcatelIND1VfcMIBCompliances.setStatus('current') alaVfcConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1)) alaVfcConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 2)) class VfcEnableState(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1)) namedValues = NamedValues(("disabled", 0), ("enabled", 1)) class VfcBwLimitType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("mbits", 1), ("percentage", 2)) class VfcProfileType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("wredProfile", 1), ("qsetProfile", 2), ("qProfile", 3)) class VfcQueueType(TextualConvention, Integer32): status = 'current' class VfcQsetAction(TextualConvention, Integer32): status = 'deprecated' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3)) namedValues = NamedValues(("default", 0), ("override", 1), ("detach", 2), ("revert", 3)) class VfcQsapList(TextualConvention, OctetString): status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 128) class VfcQsapType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8)) namedValues = NamedValues(("all", 1), ("slot", 2), ("slotport", 3), ("lag", 4), ("ipif", 5), ("lsp", 6), ("sbind", 7), ("sap", 8)) class VfcSchedulingMethod(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("strictPriority", 1), ("queueSpecified", 2)) class VfcWfqMode(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("werr", 1), ("wrr", 2)) class VfcProfileMode(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("nonDcb", 1), ("dcb", 2)) alaVfcWREDProfileTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1), ) if mibBuilder.loadTexts: alaVfcWREDProfileTable.setStatus('current') alaVfcWREDProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1), ).setIndexNames((0, "ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPId")) if mibBuilder.loadTexts: alaVfcWREDProfileEntry.setStatus('current') alaVfcWRPId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))) if mibBuilder.loadTexts: alaVfcWRPId.setStatus('current') alaVfcWRPAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 2), VfcEnableState().clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: alaVfcWRPAdminState.setStatus('deprecated') alaVfcWRPName = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 3), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPName.setStatus('current') alaVfcWRPGreenMinThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 100)).clone(90)).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPGreenMinThreshold.setStatus('current') alaVfcWRPGreenMaxThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 100)).clone(90)).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPGreenMaxThreshold.setStatus('current') alaVfcWRPGreenMaxDropProbability = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 6), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 100)).clone(10)).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPGreenMaxDropProbability.setStatus('current') alaVfcWRPGreenGain = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 7), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 15)).clone(7)).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPGreenGain.setStatus('current') alaVfcWRPYellowMinThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 8), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 100)).clone(90)).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPYellowMinThreshold.setStatus('current') alaVfcWRPYellowMaxThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 9), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 100)).clone(90)).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPYellowMaxThreshold.setStatus('current') alaVfcWRPYellowMaxDropProbability = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 10), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 100)).clone(10)).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPYellowMaxDropProbability.setStatus('current') alaVfcWRPYellowGain = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 11), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 15)).clone(7)).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPYellowGain.setStatus('current') alaVfcWRPRedMinThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 12), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 100)).clone(90)).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPRedMinThreshold.setStatus('current') alaVfcWRPRedMaxThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 13), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 100)).clone(90)).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPRedMaxThreshold.setStatus('current') alaVfcWRPRedMaxDropProbability = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 14), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 100)).clone(10)).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPRedMaxDropProbability.setStatus('current') alaVfcWRPRedGain = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 15), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 15)).clone(7)).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPRedGain.setStatus('current') alaVfcWRPStatsAdmin = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 16), VfcEnableState().clone('disabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPStatsAdmin.setStatus('deprecated') alaVfcWRPAttachmentCount = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 17), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 16384))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPAttachmentCount.setStatus('current') alaVfcWRPMTU = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 18), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 16384))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPMTU.setStatus('current') alaVfcWRPLastChange = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 19), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPLastChange.setStatus('current') alaVfcWRPRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 20), RowStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcWRPRowStatus.setStatus('current') alaVfcQsetProfileTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2), ) if mibBuilder.loadTexts: alaVfcQsetProfileTable.setStatus('current') alaVfcQsetProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1), ).setIndexNames((0, "ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSPId")) if mibBuilder.loadTexts: alaVfcQsetProfileEntry.setStatus('current') alaVfcQSPId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 8))) if mibBuilder.loadTexts: alaVfcQSPId.setStatus('current') alaVfcQSPAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 2), VfcEnableState().clone('enabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQSPAdminState.setStatus('deprecated') alaVfcQSPName = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 3), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQSPName.setStatus('current') alaVfcQSPType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("static", 1), ("dynamic", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQSPType.setStatus('current') alaVfcQSPTemplateId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 8))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQSPTemplateId.setStatus('current') alaVfcQSPTemplateName = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 6), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQSPTemplateName.setStatus('current') alaVfcQSPBandwidthLimitType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 7), VfcBwLimitType().clone('percentage')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQSPBandwidthLimitType.setStatus('current') alaVfcQSPBandwidthLimitValue = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 8), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQSPBandwidthLimitValue.setStatus('current') alaVfcQSPQueueCount = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 9), Unsigned32().clone(8)).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQSPQueueCount.setStatus('current') alaVfcQSPWRPId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 10), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQSPWRPId.setStatus('current') alaVfcQSPWRPName = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 11), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQSPWRPName.setStatus('current') alaVfcQSPWRPAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 12), VfcEnableState().clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: alaVfcQSPWRPAdminState.setStatus('deprecated') alaVfcQSPSchedulingMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 13), VfcSchedulingMethod().clone('strictPriority')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQSPSchedulingMethod.setStatus('current') alaVfcQSPStatsAdmin = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 14), VfcEnableState().clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: alaVfcQSPStatsAdmin.setStatus('deprecated') alaVfcQSPAttachmentCount = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 15), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQSPAttachmentCount.setStatus('current') alaVfcQSPLastChange = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 16), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQSPLastChange.setStatus('current') alaVfcQSPRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 17), RowStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQSPRowStatus.setStatus('current') alaVfcQsetInstanceTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3), ) if mibBuilder.loadTexts: alaVfcQsetInstanceTable.setStatus('current') alaVfcQsetInstanceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1), ).setIndexNames((0, "ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetId")) if mibBuilder.loadTexts: alaVfcQsetInstanceEntry.setStatus('current') alaVfcQsetId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 1), Unsigned32()) if mibBuilder.loadTexts: alaVfcQsetId.setStatus('current') alaVfcQsetQsapId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 2), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsetQsapId.setStatus('current') alaVfcQsetAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 3), VfcEnableState().clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQsetAdminState.setStatus('deprecated') alaVfcQsetOperState = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 4), VfcEnableState().clone('enabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsetOperState.setStatus('deprecated') alaVfcQsetQSPId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 128))).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQsetQSPId.setStatus('current') alaVfcQsetQSPName = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 6), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQsetQSPName.setStatus('current') alaVfcQsetOperBandwidthLimitType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 7), VfcBwLimitType().clone('percentage')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsetOperBandwidthLimitType.setStatus('current') alaVfcQsetOperBandwidthLimitValue = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 8), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsetOperBandwidthLimitValue.setStatus('current') alaVfcQsetBandwidthLimitType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 9), VfcBwLimitType().clone('percentage')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsetBandwidthLimitType.setStatus('deprecated') alaVfcQsetBandwidthLimitValue = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 10), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsetBandwidthLimitValue.setStatus('deprecated') alaVfcQsetQueueCount = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 11), Unsigned32().clone(8)).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsetQueueCount.setStatus('deprecated') alaVfcQsetWRPId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 12), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsetWRPId.setStatus('deprecated') alaVfcQsetWRPName = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 13), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsetWRPName.setStatus('deprecated') alaVfcQsetWRPAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 14), VfcEnableState().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQsetWRPAdminState.setStatus('current') alaVfcQsetWRPOperState = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 15), VfcEnableState().clone('disabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsetWRPOperState.setStatus('current') alaVfcQsetSchedulingMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 16), VfcSchedulingMethod().clone('strictPriority')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsetSchedulingMethod.setStatus('deprecated') alaVfcQsetStatsAdmin = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 17), VfcEnableState().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQsetStatsAdmin.setStatus('current') alaVfcQsetStatsOper = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 18), VfcEnableState().clone('disabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsetStatsOper.setStatus('current') alaVfcQsetLastChange = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 19), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsetLastChange.setStatus('current') alaVfcQsetStatsClear = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 20), VfcEnableState().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQsetStatsClear.setStatus('current') alaVfcQsetStatsInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 21), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(10, 300))).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQsetStatsInterval.setStatus('current') alaVfcQsetMisconfigured = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 22), VfcEnableState().clone('disabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsetMisconfigured.setStatus('current') alaVfcQsetMode = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 23), VfcProfileMode()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsetMode.setStatus('current') alaVfcQProfileTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4), ) if mibBuilder.loadTexts: alaVfcQProfileTable.setStatus('current') alaVfcQProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1), ).setIndexNames((0, "ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPQSPId"), (0, "ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPQId")) if mibBuilder.loadTexts: alaVfcQProfileEntry.setStatus('current') alaVfcQPQSPId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 8))) if mibBuilder.loadTexts: alaVfcQPQSPId.setStatus('current') alaVfcQPQId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 8))) if mibBuilder.loadTexts: alaVfcQPQId.setStatus('current') alaVfcQPAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 3), VfcEnableState().clone('disabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQPAdminState.setStatus('deprecated') alaVfcQPWRPId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQPWRPId.setStatus('current') alaVfcQPWRPName = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 5), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQPWRPName.setStatus('current') alaVfcQPWRPAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 6), VfcEnableState().clone('disabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQPWRPAdminState.setStatus('deprecated') alaVfcQPQSPName = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 7), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQPQSPName.setStatus('current') alaVfcQPTrafficClass = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 8), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 7))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQPTrafficClass.setStatus('current') alaVfcQPQType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 9), VfcQueueType()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQPQType.setStatus('current') alaVfcQPCIRBandwidthLimitType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 10), VfcBwLimitType()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQPCIRBandwidthLimitType.setStatus('current') alaVfcQPCIRBandwidthLimitValue = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 11), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQPCIRBandwidthLimitValue.setStatus('current') alaVfcQPPIRBandwidthLimitType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 12), VfcBwLimitType()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQPPIRBandwidthLimitType.setStatus('current') alaVfcQPPIRBandwidthLimitValue = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 13), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQPPIRBandwidthLimitValue.setStatus('current') alaVfcQPStatsAdmin = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 14), VfcEnableState().clone('disabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQPStatsAdmin.setStatus('deprecated') alaVfcQPCbs = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 15), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQPCbs.setStatus('current') alaVfcQPMbs = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 16), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQPMbs.setStatus('current') alaVfcQPLastChange = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 17), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQPLastChange.setStatus('current') alaVfcQPWfqWeight = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 18), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQPWfqWeight.setStatus('current') alaVfcQPWfqMode = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 19), VfcWfqMode()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQPWfqMode.setStatus('current') alaVfcQInstanceTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5), ) if mibBuilder.loadTexts: alaVfcQInstanceTable.setStatus('current') alaVfcQInstanceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1), ).setIndexNames((0, "ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceQsiId"), (0, "ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceQId")) if mibBuilder.loadTexts: alaVfcQInstanceEntry.setStatus('current') alaVfcQInstanceQsiId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 1), Unsigned32()) if mibBuilder.loadTexts: alaVfcQInstanceQsiId.setStatus('current') alaVfcQInstanceQId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 8))) if mibBuilder.loadTexts: alaVfcQInstanceQId.setStatus('current') alaVfcQInstanceQsapId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 3), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceQsapId.setStatus('deprecated') alaVfcQInstanceQSPId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 8))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceQSPId.setStatus('deprecated') alaVfcQInstanceQSPName = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 5), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceQSPName.setStatus('deprecated') alaVfcQInstanceAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 6), VfcEnableState().clone('enabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQInstanceAdminState.setStatus('deprecated') alaVfcQInstanceOperState = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 7), VfcEnableState().clone('enabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceOperState.setStatus('deprecated') alaVfcQInstanceWRPAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 8), VfcEnableState().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQInstanceWRPAdminState.setStatus('current') alaVfcQInstanceWRPOperState = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 9), VfcEnableState().clone('disabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceWRPOperState.setStatus('current') alaVfcQInstanceWRPId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 10), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceWRPId.setStatus('deprecated') alaVfcQInstanceWRPName = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 11), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceWRPName.setStatus('deprecated') alaVfcQInstanceCIRBandwidthLimitType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 12), VfcBwLimitType()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceCIRBandwidthLimitType.setStatus('deprecated') alaVfcQInstanceCIRBandwidthLimitValue = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 13), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceCIRBandwidthLimitValue.setStatus('deprecated') alaVfcQInstancePIRBandwidthLimitType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 14), VfcBwLimitType()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstancePIRBandwidthLimitType.setStatus('deprecated') alaVfcQInstancePIRBandwidthLimitValue = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 15), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstancePIRBandwidthLimitValue.setStatus('deprecated') alaVfcQInstanceCIROperationalBandwidthLimitType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 16), VfcBwLimitType()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceCIROperationalBandwidthLimitType.setStatus('current') alaVfcQInstanceCIROperationalBandwidthLimitValue = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 17), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceCIROperationalBandwidthLimitValue.setStatus('current') alaVfcQInstancePIROperationalBandwidthLimitType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 18), VfcBwLimitType()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstancePIROperationalBandwidthLimitType.setStatus('current') alaVfcQInstancePIROperationalBandwidthLimitValue = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 19), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstancePIROperationalBandwidthLimitValue.setStatus('current') alaVfcQInstanceStatsAdmin = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 20), VfcEnableState().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQInstanceStatsAdmin.setStatus('deprecated') alaVfcQInstanceStatsOper = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 21), VfcEnableState().clone('disabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceStatsOper.setStatus('deprecated') alaVfcQInstancePacketsEnqueued = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 22), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstancePacketsEnqueued.setStatus('current') alaVfcQInstanceBytesEnqueued = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 23), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceBytesEnqueued.setStatus('current') alaVfcQInstancePacketsDequeued = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 24), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstancePacketsDequeued.setStatus('deprecated') alaVfcQInstanceBytesDequeued = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 25), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceBytesDequeued.setStatus('deprecated') alaVfcQInstancePacketsDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 26), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstancePacketsDropped.setStatus('current') alaVfcQInstanceBytesDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 27), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceBytesDropped.setStatus('current') alaVfcQInstanceGreenPacketsAccepted = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 28), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceGreenPacketsAccepted.setStatus('current') alaVfcQInstanceGreenBytesAccepted = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 29), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceGreenBytesAccepted.setStatus('current') alaVfcQInstanceGreenPacketsDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 30), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceGreenPacketsDropped.setStatus('current') alaVfcQInstanceGreenBytesDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 31), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceGreenBytesDropped.setStatus('current') alaVfcQInstanceYellowPacketsAccepted = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 32), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceYellowPacketsAccepted.setStatus('current') alaVfcQInstanceYellowBytesAccepted = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 33), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceYellowBytesAccepted.setStatus('current') alaVfcQInstanceYellowPacketsDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 34), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceYellowPacketsDropped.setStatus('current') alaVfcQInstanceYellowBytesDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 35), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceYellowBytesDropped.setStatus('current') alaVfcQInstanceRedPacketsAccepted = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 36), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceRedPacketsAccepted.setStatus('current') alaVfcQInstanceRedBytesAccepted = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 37), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceRedBytesAccepted.setStatus('current') alaVfcQInstanceRedPacketsDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 38), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceRedPacketsDropped.setStatus('current') alaVfcQInstanceRedBytesDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 39), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceRedBytesDropped.setStatus('current') alaVfcQInstanceLastChange = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 40), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQInstanceLastChange.setStatus('current') alaVfcQInstanceStatsClear = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 41), VfcEnableState().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQInstanceStatsClear.setStatus('deprecated') alaVfcQsapTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6), ) if mibBuilder.loadTexts: alaVfcQsapTable.setStatus('current') alaVfcQsapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1), ).setIndexNames((0, "ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsapId")) if mibBuilder.loadTexts: alaVfcQsapEntry.setStatus('current') alaVfcQsapId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 1), Unsigned32()) if mibBuilder.loadTexts: alaVfcQsapId.setStatus('current') alaVfcQsapAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 2), VfcEnableState().clone('enabled')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsapAdminState.setStatus('deprecated') alaVfcQsapType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 3), VfcQsapType()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsapType.setStatus('current') alaVfcQsapValue = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsapValue.setStatus('current') alaVfcQsapQSPId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 8))).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQsapQSPId.setStatus('deprecated') alaVfcQsapQSPName = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 6), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 32))).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQsapQSPName.setStatus('deprecated') alaVfcQsapWRPAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 7), VfcEnableState().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQsapWRPAdminState.setStatus('deprecated') alaVfcQsapStatsAdmin = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 8), VfcEnableState().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQsapStatsAdmin.setStatus('deprecated') alaVfcQsapBandwidthLimitType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 9), VfcBwLimitType().clone('percentage')).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsapBandwidthLimitType.setStatus('current') alaVfcQsapBandwidthLimitValue = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 10), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsapBandwidthLimitValue.setStatus('current') alaVfcQsapClearStats = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("default", 0), ("reset", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQsapClearStats.setStatus('deprecated') alaVfcQsapQpId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 12), Unsigned32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQsapQpId.setStatus('deprecated') alaVfcQsapAction = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 13), VfcQsetAction()).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaVfcQsapAction.setStatus('deprecated') alaVfcQsapLastChange = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 14), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsapLastChange.setStatus('current') alaVfcQsapParent = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 15), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQsapParent.setStatus('current') alaVfcProfileIndexLookupTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 7), ) if mibBuilder.loadTexts: alaVfcProfileIndexLookupTable.setStatus('current') alaVfcProfileIndexLookupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 7, 1), ).setIndexNames((0, "ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcProfileType"), (1, "ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcProfileName")) if mibBuilder.loadTexts: alaVfcProfileIndexLookupEntry.setStatus('current') alaVfcProfileType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 7, 1, 1), VfcProfileType()) if mibBuilder.loadTexts: alaVfcProfileType.setStatus('current') alaVfcProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 7, 1, 2), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))) if mibBuilder.loadTexts: alaVfcProfileName.setStatus('current') alaVfcProfileId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 7, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcProfileId.setStatus('current') alaVfcProfileQsapLookupTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 8), ) if mibBuilder.loadTexts: alaVfcProfileQsapLookupTable.setStatus('current') alaVfcProfileQsapLookupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 8, 1), ).setIndexNames((0, "ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcProfileQsapLookupType"), (0, "ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcProfileQsapLookupId"), (0, "ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcProfileQsapLookupValue")) if mibBuilder.loadTexts: alaVfcProfileQsapLookupEntry.setStatus('current') alaVfcProfileQsapLookupType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 8, 1, 1), VfcProfileType()) if mibBuilder.loadTexts: alaVfcProfileQsapLookupType.setStatus('current') alaVfcProfileQsapLookupId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 8, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))) if mibBuilder.loadTexts: alaVfcProfileQsapLookupId.setStatus('current') alaVfcProfileQsapLookupValue = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 8, 1, 3), Unsigned32()) if mibBuilder.loadTexts: alaVfcProfileQsapLookupValue.setStatus('current') alaVfcProfileQsapLookupList = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 8, 1, 4), VfcQsapList()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcProfileQsapLookupList.setStatus('current') alaVfcQSIQsapLookupTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 9), ) if mibBuilder.loadTexts: alaVfcQSIQsapLookupTable.setStatus('current') alaVfcQSIQsapLookupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 9, 1), ).setIndexNames((0, "ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSIQsapLookupQsetId"), (0, "ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSIQsapLookupValue")) if mibBuilder.loadTexts: alaVfcQSIQsapLookupEntry.setStatus('current') alaVfcQSIQsapLookupQsetId = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 9, 1, 1), Unsigned32()) if mibBuilder.loadTexts: alaVfcQSIQsapLookupQsetId.setStatus('current') alaVfcQSIQsapLookupValue = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 9, 1, 2), Unsigned32()) if mibBuilder.loadTexts: alaVfcQSIQsapLookupValue.setStatus('current') alaVfcQSIQsapLookupList = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 9, 1, 3), VfcQsapList()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcQSIQsapLookupList.setStatus('current') alaVfcStatisticsCollectionInterval = MibScalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 10), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcStatisticsCollectionInterval.setStatus('deprecated') alaVfcStatisticsCollectionDuration = MibScalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 11), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaVfcStatisticsCollectionDuration.setStatus('deprecated') alcatelIND1VfcMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 2, 1)).setObjects(("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWREDProfileGroup"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetProfileGroup"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetInstanceGroup"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQProfileGroup"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceGroup"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsapGroup"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcProfileIndexLookupGroup"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcProfileQsapLookupGroup"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSIQsapLookupGroup"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcStatsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alcatelIND1VfcMIBCompliance = alcatelIND1VfcMIBCompliance.setStatus('current') alaVfcWREDProfileGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 1)).setObjects(("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPAdminState"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPName"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPGreenMinThreshold"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPGreenMaxThreshold"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPGreenMaxDropProbability"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPGreenGain"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPYellowMinThreshold"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPYellowMaxThreshold"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPYellowMaxDropProbability"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPYellowGain"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPRedMinThreshold"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPRedMaxThreshold"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPRedMaxDropProbability"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPRedGain"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPStatsAdmin"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPAttachmentCount"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPMTU"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPLastChange"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcWRPRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaVfcWREDProfileGroup = alaVfcWREDProfileGroup.setStatus('current') alaVfcQsetProfileGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 2)).setObjects(("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSPAdminState"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSPName"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSPType"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSPTemplateId"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSPTemplateName"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSPBandwidthLimitType"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSPBandwidthLimitValue"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSPQueueCount"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSPWRPId"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSPWRPName"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSPWRPAdminState"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSPSchedulingMethod"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSPStatsAdmin"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSPAttachmentCount"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSPLastChange"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSPRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaVfcQsetProfileGroup = alaVfcQsetProfileGroup.setStatus('current') alaVfcQsetInstanceGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 3)).setObjects(("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetQsapId"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetAdminState"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetOperState"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetQSPId"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetQSPName"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetBandwidthLimitType"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetBandwidthLimitValue"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetOperBandwidthLimitType"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetOperBandwidthLimitValue"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetQueueCount"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetWRPId"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetWRPName"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetWRPAdminState"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetWRPOperState"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetSchedulingMethod"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetStatsAdmin"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetStatsOper"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetLastChange"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetStatsClear"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetStatsInterval"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetMisconfigured"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsetMode")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaVfcQsetInstanceGroup = alaVfcQsetInstanceGroup.setStatus('current') alaVfcQProfileGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 4)).setObjects(("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPAdminState"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPWRPId"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPWRPName"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPWRPAdminState"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPQSPName"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPTrafficClass"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPQType"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPCIRBandwidthLimitType"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPCIRBandwidthLimitValue"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPPIRBandwidthLimitType"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPPIRBandwidthLimitValue"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPStatsAdmin"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPCbs"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPMbs"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPLastChange"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPWfqWeight"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQPWfqMode")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaVfcQProfileGroup = alaVfcQProfileGroup.setStatus('current') alaVfcQInstanceGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 5)).setObjects(("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceQsapId"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceQSPId"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceQSPName"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceAdminState"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceOperState"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceWRPAdminState"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceWRPOperState"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceWRPId"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceWRPName"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceCIRBandwidthLimitType"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceCIRBandwidthLimitValue"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstancePIRBandwidthLimitType"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstancePIRBandwidthLimitValue"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceCIROperationalBandwidthLimitType"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceCIROperationalBandwidthLimitValue"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstancePIROperationalBandwidthLimitType"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstancePIROperationalBandwidthLimitValue"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceStatsAdmin"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceStatsOper"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstancePacketsEnqueued"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceBytesEnqueued"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstancePacketsDequeued"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceBytesDequeued"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstancePacketsDropped"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceBytesDropped"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceGreenPacketsAccepted"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceGreenBytesAccepted"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceGreenPacketsDropped"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceGreenBytesDropped"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceYellowPacketsAccepted"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceYellowBytesAccepted"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceYellowPacketsDropped"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceYellowBytesDropped"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceRedPacketsAccepted"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceRedBytesAccepted"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceRedPacketsDropped"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceRedBytesDropped"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceLastChange"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQInstanceStatsClear")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaVfcQInstanceGroup = alaVfcQInstanceGroup.setStatus('current') alaVfcQsapGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 6)).setObjects(("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsapAdminState"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsapType"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsapValue"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsapQSPId"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsapQSPName"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsapWRPAdminState"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsapStatsAdmin"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsapBandwidthLimitType"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsapBandwidthLimitValue"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsapClearStats"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsapQpId"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsapAction"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsapLastChange"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQsapParent")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaVfcQsapGroup = alaVfcQsapGroup.setStatus('current') alaVfcProfileIndexLookupGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 7)).setObjects(("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcProfileId")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaVfcProfileIndexLookupGroup = alaVfcProfileIndexLookupGroup.setStatus('current') alaVfcProfileQsapLookupGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 8)).setObjects(("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcProfileQsapLookupList")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaVfcProfileQsapLookupGroup = alaVfcProfileQsapLookupGroup.setStatus('current') alaVfcQSIQsapLookupGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 9)).setObjects(("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcQSIQsapLookupList")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaVfcQSIQsapLookupGroup = alaVfcQSIQsapLookupGroup.setStatus('current') alaVfcStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 10)).setObjects(("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcStatisticsCollectionInterval"), ("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", "alaVfcStatisticsCollectionDuration")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaVfcStatsGroup = alaVfcStatsGroup.setStatus('deprecated') mibBuilder.exportSymbols("ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB", alaVfcQPWfqMode=alaVfcQPWfqMode, alcatelIND1VfcMIBCompliances=alcatelIND1VfcMIBCompliances, alaVfcConfig=alaVfcConfig, alaVfcQInstanceYellowPacketsDropped=alaVfcQInstanceYellowPacketsDropped, alaVfcQSPTemplateId=alaVfcQSPTemplateId, alaVfcQPTrafficClass=alaVfcQPTrafficClass, alaVfcQInstanceQId=alaVfcQInstanceQId, alaVfcQInstanceGreenPacketsDropped=alaVfcQInstanceGreenPacketsDropped, alaVfcWRPMTU=alaVfcWRPMTU, alaVfcQInstanceYellowPacketsAccepted=alaVfcQInstanceYellowPacketsAccepted, VfcEnableState=VfcEnableState, alaVfcQsetProfileEntry=alaVfcQsetProfileEntry, alaVfcWRPRedMinThreshold=alaVfcWRPRedMinThreshold, alaVfcQInstanceGreenBytesAccepted=alaVfcQInstanceGreenBytesAccepted, alaVfcQInstanceStatsClear=alaVfcQInstanceStatsClear, alaVfcQsapId=alaVfcQsapId, alaVfcQSPLastChange=alaVfcQSPLastChange, VfcQsetAction=VfcQsetAction, alaVfcQsapGroup=alaVfcQsapGroup, alaVfcQPWfqWeight=alaVfcQPWfqWeight, alaVfcQsetStatsInterval=alaVfcQsetStatsInterval, alaVfcProfileType=alaVfcProfileType, alaVfcQsapStatsAdmin=alaVfcQsapStatsAdmin, alaVfcWRPYellowMaxDropProbability=alaVfcWRPYellowMaxDropProbability, alaVfcQPStatsAdmin=alaVfcQPStatsAdmin, alaVfcQsetProfileGroup=alaVfcQsetProfileGroup, alaVfcQsetBandwidthLimitType=alaVfcQsetBandwidthLimitType, alaVfcProfileIndexLookupEntry=alaVfcProfileIndexLookupEntry, alaVfcQPAdminState=alaVfcQPAdminState, alaVfcWRPGreenGain=alaVfcWRPGreenGain, alaVfcQInstanceWRPOperState=alaVfcQInstanceWRPOperState, alaVfcQInstanceCIROperationalBandwidthLimitValue=alaVfcQInstanceCIROperationalBandwidthLimitValue, alaVfcQInstanceBytesDropped=alaVfcQInstanceBytesDropped, alaVfcQPPIRBandwidthLimitType=alaVfcQPPIRBandwidthLimitType, alaVfcQsapBandwidthLimitType=alaVfcQsapBandwidthLimitType, alaVfcQSPId=alaVfcQSPId, alaVfcProfileQsapLookupType=alaVfcProfileQsapLookupType, alaVfcQInstanceLastChange=alaVfcQInstanceLastChange, alaVfcQInstanceCIRBandwidthLimitValue=alaVfcQInstanceCIRBandwidthLimitValue, alaVfcQInstanceOperState=alaVfcQInstanceOperState, alaVfcQSIQsapLookupEntry=alaVfcQSIQsapLookupEntry, alaVfcQInstancePIROperationalBandwidthLimitType=alaVfcQInstancePIROperationalBandwidthLimitType, alaVfcQSPName=alaVfcQSPName, alaVfcQInstanceWRPId=alaVfcQInstanceWRPId, alcatelIND1VfcMIBConformance=alcatelIND1VfcMIBConformance, alaVfcWREDProfileGroup=alaVfcWREDProfileGroup, alaVfcQPPIRBandwidthLimitValue=alaVfcQPPIRBandwidthLimitValue, alaVfcQPQSPName=alaVfcQPQSPName, alaVfcQInstancePIROperationalBandwidthLimitValue=alaVfcQInstancePIROperationalBandwidthLimitValue, alaVfcProfileId=alaVfcProfileId, alaVfcWRPAttachmentCount=alaVfcWRPAttachmentCount, alaVfcQsetMisconfigured=alaVfcQsetMisconfigured, alaVfcQInstanceGreenBytesDropped=alaVfcQInstanceGreenBytesDropped, alaVfcWRPGreenMaxDropProbability=alaVfcWRPGreenMaxDropProbability, alaVfcQsapEntry=alaVfcQsapEntry, alaVfcQSIQsapLookupList=alaVfcQSIQsapLookupList, alaVfcQProfileEntry=alaVfcQProfileEntry, alaVfcQInstanceEntry=alaVfcQInstanceEntry, alaVfcWRPGreenMinThreshold=alaVfcWRPGreenMinThreshold, alaVfcQSPWRPName=alaVfcQSPWRPName, alaVfcQsetQSPName=alaVfcQsetQSPName, VfcProfileMode=VfcProfileMode, alaVfcWRPRedMaxThreshold=alaVfcWRPRedMaxThreshold, alaVfcQInstancePacketsDropped=alaVfcQInstancePacketsDropped, alaVfcWRPLastChange=alaVfcWRPLastChange, alaVfcQsapType=alaVfcQsapType, alaVfcQSPWRPId=alaVfcQSPWRPId, alaVfcQsetWRPAdminState=alaVfcQsetWRPAdminState, alaVfcProfileQsapLookupEntry=alaVfcProfileQsapLookupEntry, alaVfcStatsGroup=alaVfcStatsGroup, alaVfcWREDProfileTable=alaVfcWREDProfileTable, alaVfcQsetQsapId=alaVfcQsetQsapId, alaVfcQInstanceGreenPacketsAccepted=alaVfcQInstanceGreenPacketsAccepted, alaVfcQsetBandwidthLimitValue=alaVfcQsetBandwidthLimitValue, alaVfcQsetInstanceGroup=alaVfcQsetInstanceGroup, alaVfcQSPRowStatus=alaVfcQSPRowStatus, alaVfcQsetQSPId=alaVfcQsetQSPId, alaVfcQSPWRPAdminState=alaVfcQSPWRPAdminState, alaVfcQInstanceYellowBytesAccepted=alaVfcQInstanceYellowBytesAccepted, alcatelIND1VfcMIBGroups=alcatelIND1VfcMIBGroups, alaVfcProfileQsapLookupId=alaVfcProfileQsapLookupId, alaVfcQsetQueueCount=alaVfcQsetQueueCount, alaVfcQPWRPAdminState=alaVfcQPWRPAdminState, alaVfcQInstanceRedBytesAccepted=alaVfcQInstanceRedBytesAccepted, alaVfcQInstanceAdminState=alaVfcQInstanceAdminState, alaVfcQsapWRPAdminState=alaVfcQsapWRPAdminState, alaVfcQsetOperState=alaVfcQsetOperState, alaVfcQSPQueueCount=alaVfcQSPQueueCount, alaVfcQsetOperBandwidthLimitValue=alaVfcQsetOperBandwidthLimitValue, alaVfcQInstancePIRBandwidthLimitType=alaVfcQInstancePIRBandwidthLimitType, alaVfcQSIQsapLookupTable=alaVfcQSIQsapLookupTable, alaVfcProfileQsapLookupList=alaVfcProfileQsapLookupList, alaVfcQSPAdminState=alaVfcQSPAdminState, alaVfcQsetStatsOper=alaVfcQsetStatsOper, alaVfcQsetInstanceEntry=alaVfcQsetInstanceEntry, alaVfcQsetStatsAdmin=alaVfcQsetStatsAdmin, VfcProfileType=VfcProfileType, alaVfcQSPBandwidthLimitType=alaVfcQSPBandwidthLimitType, alaVfcQPCbs=alaVfcQPCbs, alaVfcQsapQSPName=alaVfcQsapQSPName, alaVfcWRPAdminState=alaVfcWRPAdminState, alaVfcQsapLastChange=alaVfcQsapLastChange, VfcQueueType=VfcQueueType, alaVfcWREDProfileEntry=alaVfcWREDProfileEntry, alaVfcQSPBandwidthLimitValue=alaVfcQSPBandwidthLimitValue, alaVfcQPWRPId=alaVfcQPWRPId, alaVfcQsapValue=alaVfcQsapValue, alaVfcQInstanceGroup=alaVfcQInstanceGroup, alaVfcQInstanceQSPName=alaVfcQInstanceQSPName, alaVfcQInstanceStatsAdmin=alaVfcQInstanceStatsAdmin, alaVfcQInstancePacketsEnqueued=alaVfcQInstancePacketsEnqueued, VfcSchedulingMethod=VfcSchedulingMethod, alaVfcQSIQsapLookupQsetId=alaVfcQSIQsapLookupQsetId, alaVfcQSPAttachmentCount=alaVfcQSPAttachmentCount, alaVfcQSIQsapLookupGroup=alaVfcQSIQsapLookupGroup, alaVfcQInstanceStatsOper=alaVfcQInstanceStatsOper, alaVfcWRPRedMaxDropProbability=alaVfcWRPRedMaxDropProbability, alaVfcQInstanceBytesEnqueued=alaVfcQInstanceBytesEnqueued, alaVfcQsapParent=alaVfcQsapParent, alaVfcWRPRedGain=alaVfcWRPRedGain, alaVfcQPLastChange=alaVfcQPLastChange, alaVfcQsetId=alaVfcQsetId, alaVfcQSPTemplateName=alaVfcQSPTemplateName, VfcQsapType=VfcQsapType, alaVfcStatisticsCollectionDuration=alaVfcStatisticsCollectionDuration, alaVfcQInstanceRedBytesDropped=alaVfcQInstanceRedBytesDropped, alaVfcProfileQsapLookupGroup=alaVfcProfileQsapLookupGroup, alaVfcQPQId=alaVfcQPQId, alaVfcQPCIRBandwidthLimitType=alaVfcQPCIRBandwidthLimitType, alaVfcQsetProfileTable=alaVfcQsetProfileTable, alaVfcQsetStatsClear=alaVfcQsetStatsClear, alaVfcQsetAdminState=alaVfcQsetAdminState, alaVfcQsetWRPOperState=alaVfcQsetWRPOperState, alaVfcProfileQsapLookupTable=alaVfcProfileQsapLookupTable, alaVfcQInstanceYellowBytesDropped=alaVfcQInstanceYellowBytesDropped, alcatelIND1VfcMIB=alcatelIND1VfcMIB, alaVfcQsapQSPId=alaVfcQsapQSPId, alaVfcQPMbs=alaVfcQPMbs, alaVfcQsetSchedulingMethod=alaVfcQsetSchedulingMethod, alaVfcProfileIndexLookupGroup=alaVfcProfileIndexLookupGroup, alcatelIND1VfcMIBObjects=alcatelIND1VfcMIBObjects, alaVfcWRPYellowGain=alaVfcWRPYellowGain, alaVfcWRPGreenMaxThreshold=alaVfcWRPGreenMaxThreshold, alaVfcWRPYellowMaxThreshold=alaVfcWRPYellowMaxThreshold, alaVfcQsetWRPName=alaVfcQsetWRPName, alaVfcQPQType=alaVfcQPQType, alaVfcQPWRPName=alaVfcQPWRPName, alaVfcQInstanceWRPName=alaVfcQInstanceWRPName, alaVfcQInstanceCIRBandwidthLimitType=alaVfcQInstanceCIRBandwidthLimitType, alaVfcQInstanceCIROperationalBandwidthLimitType=alaVfcQInstanceCIROperationalBandwidthLimitType, alaVfcWRPName=alaVfcWRPName, alaVfcQPCIRBandwidthLimitValue=alaVfcQPCIRBandwidthLimitValue, alaVfcQsetOperBandwidthLimitType=alaVfcQsetOperBandwidthLimitType, alaVfcQSIQsapLookupValue=alaVfcQSIQsapLookupValue, alaVfcQInstanceRedPacketsAccepted=alaVfcQInstanceRedPacketsAccepted, alcatelIND1VfcMIBCompliance=alcatelIND1VfcMIBCompliance, alaVfcQInstanceTable=alaVfcQInstanceTable, alaVfcWRPId=alaVfcWRPId, alaVfcQSPSchedulingMethod=alaVfcQSPSchedulingMethod, alaVfcQSPStatsAdmin=alaVfcQSPStatsAdmin, alaVfcStatisticsCollectionInterval=alaVfcStatisticsCollectionInterval, alaVfcQInstancePIRBandwidthLimitValue=alaVfcQInstancePIRBandwidthLimitValue, VfcQsapList=VfcQsapList, alaVfcProfileQsapLookupValue=alaVfcProfileQsapLookupValue, alaVfcQsapQpId=alaVfcQsapQpId, alaVfcQsapTable=alaVfcQsapTable, VfcWfqMode=VfcWfqMode, alaVfcQsetMode=alaVfcQsetMode, alaVfcWRPStatsAdmin=alaVfcWRPStatsAdmin, alaVfcQsetWRPId=alaVfcQsetWRPId, alaVfcQPQSPId=alaVfcQPQSPId, alaVfcQInstanceQSPId=alaVfcQInstanceQSPId, alaVfcQsapClearStats=alaVfcQsapClearStats, alaVfcQSPType=alaVfcQSPType, alaVfcWRPYellowMinThreshold=alaVfcWRPYellowMinThreshold, alaVfcProfileIndexLookupTable=alaVfcProfileIndexLookupTable, alaVfcQInstanceQsapId=alaVfcQInstanceQsapId, alaVfcQsetInstanceTable=alaVfcQsetInstanceTable, alaVfcQsapAction=alaVfcQsapAction, alaVfcConformance=alaVfcConformance, alaVfcQsapAdminState=alaVfcQsapAdminState, alaVfcQInstanceQsiId=alaVfcQInstanceQsiId, alaVfcProfileName=alaVfcProfileName, alaVfcQInstanceWRPAdminState=alaVfcQInstanceWRPAdminState, alaVfcQInstanceBytesDequeued=alaVfcQInstanceBytesDequeued, alaVfcQProfileTable=alaVfcQProfileTable, alaVfcQInstancePacketsDequeued=alaVfcQInstancePacketsDequeued, VfcBwLimitType=VfcBwLimitType, alaVfcQsapBandwidthLimitValue=alaVfcQsapBandwidthLimitValue, alaVfcWRPRowStatus=alaVfcWRPRowStatus, PYSNMP_MODULE_ID=alcatelIND1VfcMIB, alaVfcQProfileGroup=alaVfcQProfileGroup, alaVfcQInstanceRedPacketsDropped=alaVfcQInstanceRedPacketsDropped, alaVfcQsetLastChange=alaVfcQsetLastChange)
(softent_ind1_vfc,) = mibBuilder.importSymbols('ALCATEL-IND1-BASE', 'softentIND1Vfc') (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, value_range_constraint, value_size_constraint, constraints_intersection, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint') (interface_index,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex') (snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString') (notification_group, module_compliance, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance', 'ObjectGroup') (integer32, ip_address, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier, bits, module_identity, time_ticks, counter64, unsigned32, counter32, notification_type, object_identity, gauge32, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'Integer32', 'IpAddress', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier', 'Bits', 'ModuleIdentity', 'TimeTicks', 'Counter64', 'Unsigned32', 'Counter32', 'NotificationType', 'ObjectIdentity', 'Gauge32', 'iso') (textual_convention, row_status, display_string, date_and_time) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'RowStatus', 'DisplayString', 'DateAndTime') alcatel_ind1_vfc_mib = module_identity((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1)) alcatelIND1VfcMIB.setRevisions(('2010-03-15 00:00',)) if mibBuilder.loadTexts: alcatelIND1VfcMIB.setLastUpdated('201003150000Z') if mibBuilder.loadTexts: alcatelIND1VfcMIB.setOrganization('Alcatel-Lucent') alcatel_ind1_vfc_mib_objects = object_identity((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1)) if mibBuilder.loadTexts: alcatelIND1VfcMIBObjects.setStatus('current') alcatel_ind1_vfc_mib_conformance = object_identity((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2)) if mibBuilder.loadTexts: alcatelIND1VfcMIBConformance.setStatus('current') alcatel_ind1_vfc_mib_groups = object_identity((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1)) if mibBuilder.loadTexts: alcatelIND1VfcMIBGroups.setStatus('current') alcatel_ind1_vfc_mib_compliances = object_identity((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 2)) if mibBuilder.loadTexts: alcatelIND1VfcMIBCompliances.setStatus('current') ala_vfc_config = mib_identifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1)) ala_vfc_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 2)) class Vfcenablestate(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1)) named_values = named_values(('disabled', 0), ('enabled', 1)) class Vfcbwlimittype(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('mbits', 1), ('percentage', 2)) class Vfcprofiletype(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3)) named_values = named_values(('wredProfile', 1), ('qsetProfile', 2), ('qProfile', 3)) class Vfcqueuetype(TextualConvention, Integer32): status = 'current' class Vfcqsetaction(TextualConvention, Integer32): status = 'deprecated' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3)) named_values = named_values(('default', 0), ('override', 1), ('detach', 2), ('revert', 3)) class Vfcqsaplist(TextualConvention, OctetString): status = 'current' subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 128) class Vfcqsaptype(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8)) named_values = named_values(('all', 1), ('slot', 2), ('slotport', 3), ('lag', 4), ('ipif', 5), ('lsp', 6), ('sbind', 7), ('sap', 8)) class Vfcschedulingmethod(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('strictPriority', 1), ('queueSpecified', 2)) class Vfcwfqmode(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('werr', 1), ('wrr', 2)) class Vfcprofilemode(TextualConvention, Integer32): status = 'current' subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2)) named_values = named_values(('nonDcb', 1), ('dcb', 2)) ala_vfc_wred_profile_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1)) if mibBuilder.loadTexts: alaVfcWREDProfileTable.setStatus('current') ala_vfc_wred_profile_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1)).setIndexNames((0, 'ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPId')) if mibBuilder.loadTexts: alaVfcWREDProfileEntry.setStatus('current') ala_vfc_wrp_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 16))) if mibBuilder.loadTexts: alaVfcWRPId.setStatus('current') ala_vfc_wrp_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 2), vfc_enable_state().clone('disabled')).setMaxAccess('readcreate') if mibBuilder.loadTexts: alaVfcWRPAdminState.setStatus('deprecated') ala_vfc_wrp_name = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 3), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPName.setStatus('current') ala_vfc_wrp_green_min_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 100)).clone(90)).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPGreenMinThreshold.setStatus('current') ala_vfc_wrp_green_max_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 100)).clone(90)).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPGreenMaxThreshold.setStatus('current') ala_vfc_wrp_green_max_drop_probability = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 6), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 100)).clone(10)).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPGreenMaxDropProbability.setStatus('current') ala_vfc_wrp_green_gain = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 7), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 15)).clone(7)).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPGreenGain.setStatus('current') ala_vfc_wrp_yellow_min_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 8), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 100)).clone(90)).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPYellowMinThreshold.setStatus('current') ala_vfc_wrp_yellow_max_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 9), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 100)).clone(90)).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPYellowMaxThreshold.setStatus('current') ala_vfc_wrp_yellow_max_drop_probability = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 10), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 100)).clone(10)).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPYellowMaxDropProbability.setStatus('current') ala_vfc_wrp_yellow_gain = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 11), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 15)).clone(7)).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPYellowGain.setStatus('current') ala_vfc_wrp_red_min_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 12), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 100)).clone(90)).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPRedMinThreshold.setStatus('current') ala_vfc_wrp_red_max_threshold = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 13), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 100)).clone(90)).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPRedMaxThreshold.setStatus('current') ala_vfc_wrp_red_max_drop_probability = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 14), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 100)).clone(10)).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPRedMaxDropProbability.setStatus('current') ala_vfc_wrp_red_gain = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 15), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 15)).clone(7)).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPRedGain.setStatus('current') ala_vfc_wrp_stats_admin = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 16), vfc_enable_state().clone('disabled')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPStatsAdmin.setStatus('deprecated') ala_vfc_wrp_attachment_count = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 17), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 16384))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPAttachmentCount.setStatus('current') ala_vfc_wrpmtu = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 18), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 16384))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPMTU.setStatus('current') ala_vfc_wrp_last_change = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 19), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPLastChange.setStatus('current') ala_vfc_wrp_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 1, 1, 20), row_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcWRPRowStatus.setStatus('current') ala_vfc_qset_profile_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2)) if mibBuilder.loadTexts: alaVfcQsetProfileTable.setStatus('current') ala_vfc_qset_profile_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1)).setIndexNames((0, 'ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSPId')) if mibBuilder.loadTexts: alaVfcQsetProfileEntry.setStatus('current') ala_vfc_qsp_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 8))) if mibBuilder.loadTexts: alaVfcQSPId.setStatus('current') ala_vfc_qsp_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 2), vfc_enable_state().clone('enabled')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQSPAdminState.setStatus('deprecated') ala_vfc_qsp_name = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 3), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQSPName.setStatus('current') ala_vfc_qsp_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('static', 1), ('dynamic', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQSPType.setStatus('current') ala_vfc_qsp_template_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 8))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQSPTemplateId.setStatus('current') ala_vfc_qsp_template_name = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 6), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQSPTemplateName.setStatus('current') ala_vfc_qsp_bandwidth_limit_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 7), vfc_bw_limit_type().clone('percentage')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQSPBandwidthLimitType.setStatus('current') ala_vfc_qsp_bandwidth_limit_value = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 8), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQSPBandwidthLimitValue.setStatus('current') ala_vfc_qsp_queue_count = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 9), unsigned32().clone(8)).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQSPQueueCount.setStatus('current') ala_vfc_qspwrp_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 10), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQSPWRPId.setStatus('current') ala_vfc_qspwrp_name = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 11), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQSPWRPName.setStatus('current') ala_vfc_qspwrp_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 12), vfc_enable_state().clone('disabled')).setMaxAccess('readcreate') if mibBuilder.loadTexts: alaVfcQSPWRPAdminState.setStatus('deprecated') ala_vfc_qsp_scheduling_method = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 13), vfc_scheduling_method().clone('strictPriority')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQSPSchedulingMethod.setStatus('current') ala_vfc_qsp_stats_admin = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 14), vfc_enable_state().clone('disabled')).setMaxAccess('readcreate') if mibBuilder.loadTexts: alaVfcQSPStatsAdmin.setStatus('deprecated') ala_vfc_qsp_attachment_count = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 15), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQSPAttachmentCount.setStatus('current') ala_vfc_qsp_last_change = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 16), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQSPLastChange.setStatus('current') ala_vfc_qsp_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 2, 1, 17), row_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQSPRowStatus.setStatus('current') ala_vfc_qset_instance_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3)) if mibBuilder.loadTexts: alaVfcQsetInstanceTable.setStatus('current') ala_vfc_qset_instance_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1)).setIndexNames((0, 'ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetId')) if mibBuilder.loadTexts: alaVfcQsetInstanceEntry.setStatus('current') ala_vfc_qset_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 1), unsigned32()) if mibBuilder.loadTexts: alaVfcQsetId.setStatus('current') ala_vfc_qset_qsap_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 2), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsetQsapId.setStatus('current') ala_vfc_qset_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 3), vfc_enable_state().clone('enabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQsetAdminState.setStatus('deprecated') ala_vfc_qset_oper_state = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 4), vfc_enable_state().clone('enabled')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsetOperState.setStatus('deprecated') ala_vfc_qset_qsp_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 128))).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQsetQSPId.setStatus('current') ala_vfc_qset_qsp_name = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 6), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQsetQSPName.setStatus('current') ala_vfc_qset_oper_bandwidth_limit_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 7), vfc_bw_limit_type().clone('percentage')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsetOperBandwidthLimitType.setStatus('current') ala_vfc_qset_oper_bandwidth_limit_value = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 8), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsetOperBandwidthLimitValue.setStatus('current') ala_vfc_qset_bandwidth_limit_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 9), vfc_bw_limit_type().clone('percentage')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsetBandwidthLimitType.setStatus('deprecated') ala_vfc_qset_bandwidth_limit_value = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 10), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsetBandwidthLimitValue.setStatus('deprecated') ala_vfc_qset_queue_count = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 11), unsigned32().clone(8)).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsetQueueCount.setStatus('deprecated') ala_vfc_qset_wrp_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 12), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsetWRPId.setStatus('deprecated') ala_vfc_qset_wrp_name = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 13), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsetWRPName.setStatus('deprecated') ala_vfc_qset_wrp_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 14), vfc_enable_state().clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQsetWRPAdminState.setStatus('current') ala_vfc_qset_wrp_oper_state = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 15), vfc_enable_state().clone('disabled')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsetWRPOperState.setStatus('current') ala_vfc_qset_scheduling_method = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 16), vfc_scheduling_method().clone('strictPriority')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsetSchedulingMethod.setStatus('deprecated') ala_vfc_qset_stats_admin = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 17), vfc_enable_state().clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQsetStatsAdmin.setStatus('current') ala_vfc_qset_stats_oper = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 18), vfc_enable_state().clone('disabled')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsetStatsOper.setStatus('current') ala_vfc_qset_last_change = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 19), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsetLastChange.setStatus('current') ala_vfc_qset_stats_clear = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 20), vfc_enable_state().clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQsetStatsClear.setStatus('current') ala_vfc_qset_stats_interval = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 21), unsigned32().subtype(subtypeSpec=value_range_constraint(10, 300))).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQsetStatsInterval.setStatus('current') ala_vfc_qset_misconfigured = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 22), vfc_enable_state().clone('disabled')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsetMisconfigured.setStatus('current') ala_vfc_qset_mode = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 3, 1, 23), vfc_profile_mode()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsetMode.setStatus('current') ala_vfc_q_profile_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4)) if mibBuilder.loadTexts: alaVfcQProfileTable.setStatus('current') ala_vfc_q_profile_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1)).setIndexNames((0, 'ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPQSPId'), (0, 'ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPQId')) if mibBuilder.loadTexts: alaVfcQProfileEntry.setStatus('current') ala_vfc_qpqsp_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 8))) if mibBuilder.loadTexts: alaVfcQPQSPId.setStatus('current') ala_vfc_qpq_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 8))) if mibBuilder.loadTexts: alaVfcQPQId.setStatus('current') ala_vfc_qp_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 3), vfc_enable_state().clone('disabled')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQPAdminState.setStatus('deprecated') ala_vfc_qpwrp_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQPWRPId.setStatus('current') ala_vfc_qpwrp_name = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 5), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQPWRPName.setStatus('current') ala_vfc_qpwrp_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 6), vfc_enable_state().clone('disabled')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQPWRPAdminState.setStatus('deprecated') ala_vfc_qpqsp_name = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 7), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQPQSPName.setStatus('current') ala_vfc_qp_traffic_class = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 8), unsigned32().subtype(subtypeSpec=value_range_constraint(0, 7))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQPTrafficClass.setStatus('current') ala_vfc_qpq_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 9), vfc_queue_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQPQType.setStatus('current') ala_vfc_qpcir_bandwidth_limit_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 10), vfc_bw_limit_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQPCIRBandwidthLimitType.setStatus('current') ala_vfc_qpcir_bandwidth_limit_value = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 11), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQPCIRBandwidthLimitValue.setStatus('current') ala_vfc_qppir_bandwidth_limit_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 12), vfc_bw_limit_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQPPIRBandwidthLimitType.setStatus('current') ala_vfc_qppir_bandwidth_limit_value = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 13), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQPPIRBandwidthLimitValue.setStatus('current') ala_vfc_qp_stats_admin = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 14), vfc_enable_state().clone('disabled')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQPStatsAdmin.setStatus('deprecated') ala_vfc_qp_cbs = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 15), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQPCbs.setStatus('current') ala_vfc_qp_mbs = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 16), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQPMbs.setStatus('current') ala_vfc_qp_last_change = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 17), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQPLastChange.setStatus('current') ala_vfc_qp_wfq_weight = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 18), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQPWfqWeight.setStatus('current') ala_vfc_qp_wfq_mode = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 4, 1, 19), vfc_wfq_mode()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQPWfqMode.setStatus('current') ala_vfc_q_instance_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5)) if mibBuilder.loadTexts: alaVfcQInstanceTable.setStatus('current') ala_vfc_q_instance_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1)).setIndexNames((0, 'ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceQsiId'), (0, 'ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceQId')) if mibBuilder.loadTexts: alaVfcQInstanceEntry.setStatus('current') ala_vfc_q_instance_qsi_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 1), unsigned32()) if mibBuilder.loadTexts: alaVfcQInstanceQsiId.setStatus('current') ala_vfc_q_instance_q_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 8))) if mibBuilder.loadTexts: alaVfcQInstanceQId.setStatus('current') ala_vfc_q_instance_qsap_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 3), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceQsapId.setStatus('deprecated') ala_vfc_q_instance_qsp_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 4), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 8))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceQSPId.setStatus('deprecated') ala_vfc_q_instance_qsp_name = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 5), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceQSPName.setStatus('deprecated') ala_vfc_q_instance_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 6), vfc_enable_state().clone('enabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQInstanceAdminState.setStatus('deprecated') ala_vfc_q_instance_oper_state = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 7), vfc_enable_state().clone('enabled')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceOperState.setStatus('deprecated') ala_vfc_q_instance_wrp_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 8), vfc_enable_state().clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQInstanceWRPAdminState.setStatus('current') ala_vfc_q_instance_wrp_oper_state = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 9), vfc_enable_state().clone('disabled')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceWRPOperState.setStatus('current') ala_vfc_q_instance_wrp_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 10), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 16))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceWRPId.setStatus('deprecated') ala_vfc_q_instance_wrp_name = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 11), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceWRPName.setStatus('deprecated') ala_vfc_q_instance_cir_bandwidth_limit_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 12), vfc_bw_limit_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceCIRBandwidthLimitType.setStatus('deprecated') ala_vfc_q_instance_cir_bandwidth_limit_value = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 13), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceCIRBandwidthLimitValue.setStatus('deprecated') ala_vfc_q_instance_pir_bandwidth_limit_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 14), vfc_bw_limit_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstancePIRBandwidthLimitType.setStatus('deprecated') ala_vfc_q_instance_pir_bandwidth_limit_value = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 15), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstancePIRBandwidthLimitValue.setStatus('deprecated') ala_vfc_q_instance_cir_operational_bandwidth_limit_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 16), vfc_bw_limit_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceCIROperationalBandwidthLimitType.setStatus('current') ala_vfc_q_instance_cir_operational_bandwidth_limit_value = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 17), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceCIROperationalBandwidthLimitValue.setStatus('current') ala_vfc_q_instance_pir_operational_bandwidth_limit_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 18), vfc_bw_limit_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstancePIROperationalBandwidthLimitType.setStatus('current') ala_vfc_q_instance_pir_operational_bandwidth_limit_value = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 19), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstancePIROperationalBandwidthLimitValue.setStatus('current') ala_vfc_q_instance_stats_admin = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 20), vfc_enable_state().clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQInstanceStatsAdmin.setStatus('deprecated') ala_vfc_q_instance_stats_oper = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 21), vfc_enable_state().clone('disabled')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceStatsOper.setStatus('deprecated') ala_vfc_q_instance_packets_enqueued = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 22), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstancePacketsEnqueued.setStatus('current') ala_vfc_q_instance_bytes_enqueued = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 23), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceBytesEnqueued.setStatus('current') ala_vfc_q_instance_packets_dequeued = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 24), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstancePacketsDequeued.setStatus('deprecated') ala_vfc_q_instance_bytes_dequeued = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 25), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceBytesDequeued.setStatus('deprecated') ala_vfc_q_instance_packets_dropped = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 26), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstancePacketsDropped.setStatus('current') ala_vfc_q_instance_bytes_dropped = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 27), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceBytesDropped.setStatus('current') ala_vfc_q_instance_green_packets_accepted = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 28), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceGreenPacketsAccepted.setStatus('current') ala_vfc_q_instance_green_bytes_accepted = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 29), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceGreenBytesAccepted.setStatus('current') ala_vfc_q_instance_green_packets_dropped = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 30), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceGreenPacketsDropped.setStatus('current') ala_vfc_q_instance_green_bytes_dropped = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 31), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceGreenBytesDropped.setStatus('current') ala_vfc_q_instance_yellow_packets_accepted = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 32), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceYellowPacketsAccepted.setStatus('current') ala_vfc_q_instance_yellow_bytes_accepted = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 33), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceYellowBytesAccepted.setStatus('current') ala_vfc_q_instance_yellow_packets_dropped = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 34), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceYellowPacketsDropped.setStatus('current') ala_vfc_q_instance_yellow_bytes_dropped = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 35), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceYellowBytesDropped.setStatus('current') ala_vfc_q_instance_red_packets_accepted = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 36), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceRedPacketsAccepted.setStatus('current') ala_vfc_q_instance_red_bytes_accepted = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 37), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceRedBytesAccepted.setStatus('current') ala_vfc_q_instance_red_packets_dropped = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 38), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceRedPacketsDropped.setStatus('current') ala_vfc_q_instance_red_bytes_dropped = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 39), counter64()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceRedBytesDropped.setStatus('current') ala_vfc_q_instance_last_change = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 40), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQInstanceLastChange.setStatus('current') ala_vfc_q_instance_stats_clear = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 5, 1, 41), vfc_enable_state().clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQInstanceStatsClear.setStatus('deprecated') ala_vfc_qsap_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6)) if mibBuilder.loadTexts: alaVfcQsapTable.setStatus('current') ala_vfc_qsap_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1)).setIndexNames((0, 'ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsapId')) if mibBuilder.loadTexts: alaVfcQsapEntry.setStatus('current') ala_vfc_qsap_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 1), unsigned32()) if mibBuilder.loadTexts: alaVfcQsapId.setStatus('current') ala_vfc_qsap_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 2), vfc_enable_state().clone('enabled')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsapAdminState.setStatus('deprecated') ala_vfc_qsap_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 3), vfc_qsap_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsapType.setStatus('current') ala_vfc_qsap_value = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsapValue.setStatus('current') ala_vfc_qsap_qsp_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 8))).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQsapQSPId.setStatus('deprecated') ala_vfc_qsap_qsp_name = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 6), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(0, 32))).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQsapQSPName.setStatus('deprecated') ala_vfc_qsap_wrp_admin_state = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 7), vfc_enable_state().clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQsapWRPAdminState.setStatus('deprecated') ala_vfc_qsap_stats_admin = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 8), vfc_enable_state().clone('disabled')).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQsapStatsAdmin.setStatus('deprecated') ala_vfc_qsap_bandwidth_limit_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 9), vfc_bw_limit_type().clone('percentage')).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsapBandwidthLimitType.setStatus('current') ala_vfc_qsap_bandwidth_limit_value = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 10), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsapBandwidthLimitValue.setStatus('current') ala_vfc_qsap_clear_stats = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('default', 0), ('reset', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQsapClearStats.setStatus('deprecated') ala_vfc_qsap_qp_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 12), unsigned32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQsapQpId.setStatus('deprecated') ala_vfc_qsap_action = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 13), vfc_qset_action()).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaVfcQsapAction.setStatus('deprecated') ala_vfc_qsap_last_change = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 14), date_and_time()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsapLastChange.setStatus('current') ala_vfc_qsap_parent = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 6, 1, 15), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQsapParent.setStatus('current') ala_vfc_profile_index_lookup_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 7)) if mibBuilder.loadTexts: alaVfcProfileIndexLookupTable.setStatus('current') ala_vfc_profile_index_lookup_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 7, 1)).setIndexNames((0, 'ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcProfileType'), (1, 'ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcProfileName')) if mibBuilder.loadTexts: alaVfcProfileIndexLookupEntry.setStatus('current') ala_vfc_profile_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 7, 1, 1), vfc_profile_type()) if mibBuilder.loadTexts: alaVfcProfileType.setStatus('current') ala_vfc_profile_name = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 7, 1, 2), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(1, 32))) if mibBuilder.loadTexts: alaVfcProfileName.setStatus('current') ala_vfc_profile_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 7, 1, 3), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 64))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcProfileId.setStatus('current') ala_vfc_profile_qsap_lookup_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 8)) if mibBuilder.loadTexts: alaVfcProfileQsapLookupTable.setStatus('current') ala_vfc_profile_qsap_lookup_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 8, 1)).setIndexNames((0, 'ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcProfileQsapLookupType'), (0, 'ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcProfileQsapLookupId'), (0, 'ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcProfileQsapLookupValue')) if mibBuilder.loadTexts: alaVfcProfileQsapLookupEntry.setStatus('current') ala_vfc_profile_qsap_lookup_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 8, 1, 1), vfc_profile_type()) if mibBuilder.loadTexts: alaVfcProfileQsapLookupType.setStatus('current') ala_vfc_profile_qsap_lookup_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 8, 1, 2), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 64))) if mibBuilder.loadTexts: alaVfcProfileQsapLookupId.setStatus('current') ala_vfc_profile_qsap_lookup_value = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 8, 1, 3), unsigned32()) if mibBuilder.loadTexts: alaVfcProfileQsapLookupValue.setStatus('current') ala_vfc_profile_qsap_lookup_list = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 8, 1, 4), vfc_qsap_list()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcProfileQsapLookupList.setStatus('current') ala_vfc_qsi_qsap_lookup_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 9)) if mibBuilder.loadTexts: alaVfcQSIQsapLookupTable.setStatus('current') ala_vfc_qsi_qsap_lookup_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 9, 1)).setIndexNames((0, 'ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSIQsapLookupQsetId'), (0, 'ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSIQsapLookupValue')) if mibBuilder.loadTexts: alaVfcQSIQsapLookupEntry.setStatus('current') ala_vfc_qsi_qsap_lookup_qset_id = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 9, 1, 1), unsigned32()) if mibBuilder.loadTexts: alaVfcQSIQsapLookupQsetId.setStatus('current') ala_vfc_qsi_qsap_lookup_value = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 9, 1, 2), unsigned32()) if mibBuilder.loadTexts: alaVfcQSIQsapLookupValue.setStatus('current') ala_vfc_qsi_qsap_lookup_list = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 9, 1, 3), vfc_qsap_list()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcQSIQsapLookupList.setStatus('current') ala_vfc_statistics_collection_interval = mib_scalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 10), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcStatisticsCollectionInterval.setStatus('deprecated') ala_vfc_statistics_collection_duration = mib_scalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 1, 1, 11), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaVfcStatisticsCollectionDuration.setStatus('deprecated') alcatel_ind1_vfc_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 2, 1)).setObjects(('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWREDProfileGroup'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetProfileGroup'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetInstanceGroup'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQProfileGroup'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceGroup'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsapGroup'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcProfileIndexLookupGroup'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcProfileQsapLookupGroup'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSIQsapLookupGroup'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcStatsGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alcatel_ind1_vfc_mib_compliance = alcatelIND1VfcMIBCompliance.setStatus('current') ala_vfc_wred_profile_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 1)).setObjects(('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPAdminState'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPName'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPGreenMinThreshold'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPGreenMaxThreshold'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPGreenMaxDropProbability'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPGreenGain'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPYellowMinThreshold'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPYellowMaxThreshold'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPYellowMaxDropProbability'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPYellowGain'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPRedMinThreshold'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPRedMaxThreshold'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPRedMaxDropProbability'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPRedGain'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPStatsAdmin'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPAttachmentCount'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPMTU'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPLastChange'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcWRPRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_vfc_wred_profile_group = alaVfcWREDProfileGroup.setStatus('current') ala_vfc_qset_profile_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 2)).setObjects(('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSPAdminState'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSPName'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSPType'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSPTemplateId'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSPTemplateName'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSPBandwidthLimitType'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSPBandwidthLimitValue'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSPQueueCount'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSPWRPId'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSPWRPName'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSPWRPAdminState'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSPSchedulingMethod'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSPStatsAdmin'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSPAttachmentCount'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSPLastChange'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSPRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_vfc_qset_profile_group = alaVfcQsetProfileGroup.setStatus('current') ala_vfc_qset_instance_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 3)).setObjects(('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetQsapId'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetAdminState'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetOperState'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetQSPId'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetQSPName'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetBandwidthLimitType'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetBandwidthLimitValue'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetOperBandwidthLimitType'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetOperBandwidthLimitValue'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetQueueCount'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetWRPId'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetWRPName'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetWRPAdminState'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetWRPOperState'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetSchedulingMethod'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetStatsAdmin'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetStatsOper'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetLastChange'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetStatsClear'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetStatsInterval'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetMisconfigured'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsetMode')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_vfc_qset_instance_group = alaVfcQsetInstanceGroup.setStatus('current') ala_vfc_q_profile_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 4)).setObjects(('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPAdminState'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPWRPId'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPWRPName'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPWRPAdminState'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPQSPName'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPTrafficClass'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPQType'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPCIRBandwidthLimitType'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPCIRBandwidthLimitValue'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPPIRBandwidthLimitType'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPPIRBandwidthLimitValue'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPStatsAdmin'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPCbs'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPMbs'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPLastChange'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPWfqWeight'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQPWfqMode')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_vfc_q_profile_group = alaVfcQProfileGroup.setStatus('current') ala_vfc_q_instance_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 5)).setObjects(('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceQsapId'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceQSPId'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceQSPName'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceAdminState'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceOperState'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceWRPAdminState'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceWRPOperState'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceWRPId'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceWRPName'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceCIRBandwidthLimitType'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceCIRBandwidthLimitValue'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstancePIRBandwidthLimitType'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstancePIRBandwidthLimitValue'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceCIROperationalBandwidthLimitType'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceCIROperationalBandwidthLimitValue'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstancePIROperationalBandwidthLimitType'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstancePIROperationalBandwidthLimitValue'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceStatsAdmin'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceStatsOper'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstancePacketsEnqueued'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceBytesEnqueued'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstancePacketsDequeued'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceBytesDequeued'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstancePacketsDropped'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceBytesDropped'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceGreenPacketsAccepted'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceGreenBytesAccepted'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceGreenPacketsDropped'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceGreenBytesDropped'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceYellowPacketsAccepted'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceYellowBytesAccepted'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceYellowPacketsDropped'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceYellowBytesDropped'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceRedPacketsAccepted'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceRedBytesAccepted'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceRedPacketsDropped'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceRedBytesDropped'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceLastChange'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQInstanceStatsClear')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_vfc_q_instance_group = alaVfcQInstanceGroup.setStatus('current') ala_vfc_qsap_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 6)).setObjects(('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsapAdminState'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsapType'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsapValue'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsapQSPId'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsapQSPName'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsapWRPAdminState'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsapStatsAdmin'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsapBandwidthLimitType'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsapBandwidthLimitValue'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsapClearStats'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsapQpId'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsapAction'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsapLastChange'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQsapParent')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_vfc_qsap_group = alaVfcQsapGroup.setStatus('current') ala_vfc_profile_index_lookup_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 7)).setObjects(('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcProfileId')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_vfc_profile_index_lookup_group = alaVfcProfileIndexLookupGroup.setStatus('current') ala_vfc_profile_qsap_lookup_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 8)).setObjects(('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcProfileQsapLookupList')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_vfc_profile_qsap_lookup_group = alaVfcProfileQsapLookupGroup.setStatus('current') ala_vfc_qsi_qsap_lookup_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 9)).setObjects(('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcQSIQsapLookupList')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_vfc_qsi_qsap_lookup_group = alaVfcQSIQsapLookupGroup.setStatus('current') ala_vfc_stats_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 61, 1, 2, 1, 10)).setObjects(('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcStatisticsCollectionInterval'), ('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', 'alaVfcStatisticsCollectionDuration')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_vfc_stats_group = alaVfcStatsGroup.setStatus('deprecated') mibBuilder.exportSymbols('ALCATEL-IND1-VIRTUAL-FLOW-CONTROL-MIB', alaVfcQPWfqMode=alaVfcQPWfqMode, alcatelIND1VfcMIBCompliances=alcatelIND1VfcMIBCompliances, alaVfcConfig=alaVfcConfig, alaVfcQInstanceYellowPacketsDropped=alaVfcQInstanceYellowPacketsDropped, alaVfcQSPTemplateId=alaVfcQSPTemplateId, alaVfcQPTrafficClass=alaVfcQPTrafficClass, alaVfcQInstanceQId=alaVfcQInstanceQId, alaVfcQInstanceGreenPacketsDropped=alaVfcQInstanceGreenPacketsDropped, alaVfcWRPMTU=alaVfcWRPMTU, alaVfcQInstanceYellowPacketsAccepted=alaVfcQInstanceYellowPacketsAccepted, VfcEnableState=VfcEnableState, alaVfcQsetProfileEntry=alaVfcQsetProfileEntry, alaVfcWRPRedMinThreshold=alaVfcWRPRedMinThreshold, alaVfcQInstanceGreenBytesAccepted=alaVfcQInstanceGreenBytesAccepted, alaVfcQInstanceStatsClear=alaVfcQInstanceStatsClear, alaVfcQsapId=alaVfcQsapId, alaVfcQSPLastChange=alaVfcQSPLastChange, VfcQsetAction=VfcQsetAction, alaVfcQsapGroup=alaVfcQsapGroup, alaVfcQPWfqWeight=alaVfcQPWfqWeight, alaVfcQsetStatsInterval=alaVfcQsetStatsInterval, alaVfcProfileType=alaVfcProfileType, alaVfcQsapStatsAdmin=alaVfcQsapStatsAdmin, alaVfcWRPYellowMaxDropProbability=alaVfcWRPYellowMaxDropProbability, alaVfcQPStatsAdmin=alaVfcQPStatsAdmin, alaVfcQsetProfileGroup=alaVfcQsetProfileGroup, alaVfcQsetBandwidthLimitType=alaVfcQsetBandwidthLimitType, alaVfcProfileIndexLookupEntry=alaVfcProfileIndexLookupEntry, alaVfcQPAdminState=alaVfcQPAdminState, alaVfcWRPGreenGain=alaVfcWRPGreenGain, alaVfcQInstanceWRPOperState=alaVfcQInstanceWRPOperState, alaVfcQInstanceCIROperationalBandwidthLimitValue=alaVfcQInstanceCIROperationalBandwidthLimitValue, alaVfcQInstanceBytesDropped=alaVfcQInstanceBytesDropped, alaVfcQPPIRBandwidthLimitType=alaVfcQPPIRBandwidthLimitType, alaVfcQsapBandwidthLimitType=alaVfcQsapBandwidthLimitType, alaVfcQSPId=alaVfcQSPId, alaVfcProfileQsapLookupType=alaVfcProfileQsapLookupType, alaVfcQInstanceLastChange=alaVfcQInstanceLastChange, alaVfcQInstanceCIRBandwidthLimitValue=alaVfcQInstanceCIRBandwidthLimitValue, alaVfcQInstanceOperState=alaVfcQInstanceOperState, alaVfcQSIQsapLookupEntry=alaVfcQSIQsapLookupEntry, alaVfcQInstancePIROperationalBandwidthLimitType=alaVfcQInstancePIROperationalBandwidthLimitType, alaVfcQSPName=alaVfcQSPName, alaVfcQInstanceWRPId=alaVfcQInstanceWRPId, alcatelIND1VfcMIBConformance=alcatelIND1VfcMIBConformance, alaVfcWREDProfileGroup=alaVfcWREDProfileGroup, alaVfcQPPIRBandwidthLimitValue=alaVfcQPPIRBandwidthLimitValue, alaVfcQPQSPName=alaVfcQPQSPName, alaVfcQInstancePIROperationalBandwidthLimitValue=alaVfcQInstancePIROperationalBandwidthLimitValue, alaVfcProfileId=alaVfcProfileId, alaVfcWRPAttachmentCount=alaVfcWRPAttachmentCount, alaVfcQsetMisconfigured=alaVfcQsetMisconfigured, alaVfcQInstanceGreenBytesDropped=alaVfcQInstanceGreenBytesDropped, alaVfcWRPGreenMaxDropProbability=alaVfcWRPGreenMaxDropProbability, alaVfcQsapEntry=alaVfcQsapEntry, alaVfcQSIQsapLookupList=alaVfcQSIQsapLookupList, alaVfcQProfileEntry=alaVfcQProfileEntry, alaVfcQInstanceEntry=alaVfcQInstanceEntry, alaVfcWRPGreenMinThreshold=alaVfcWRPGreenMinThreshold, alaVfcQSPWRPName=alaVfcQSPWRPName, alaVfcQsetQSPName=alaVfcQsetQSPName, VfcProfileMode=VfcProfileMode, alaVfcWRPRedMaxThreshold=alaVfcWRPRedMaxThreshold, alaVfcQInstancePacketsDropped=alaVfcQInstancePacketsDropped, alaVfcWRPLastChange=alaVfcWRPLastChange, alaVfcQsapType=alaVfcQsapType, alaVfcQSPWRPId=alaVfcQSPWRPId, alaVfcQsetWRPAdminState=alaVfcQsetWRPAdminState, alaVfcProfileQsapLookupEntry=alaVfcProfileQsapLookupEntry, alaVfcStatsGroup=alaVfcStatsGroup, alaVfcWREDProfileTable=alaVfcWREDProfileTable, alaVfcQsetQsapId=alaVfcQsetQsapId, alaVfcQInstanceGreenPacketsAccepted=alaVfcQInstanceGreenPacketsAccepted, alaVfcQsetBandwidthLimitValue=alaVfcQsetBandwidthLimitValue, alaVfcQsetInstanceGroup=alaVfcQsetInstanceGroup, alaVfcQSPRowStatus=alaVfcQSPRowStatus, alaVfcQsetQSPId=alaVfcQsetQSPId, alaVfcQSPWRPAdminState=alaVfcQSPWRPAdminState, alaVfcQInstanceYellowBytesAccepted=alaVfcQInstanceYellowBytesAccepted, alcatelIND1VfcMIBGroups=alcatelIND1VfcMIBGroups, alaVfcProfileQsapLookupId=alaVfcProfileQsapLookupId, alaVfcQsetQueueCount=alaVfcQsetQueueCount, alaVfcQPWRPAdminState=alaVfcQPWRPAdminState, alaVfcQInstanceRedBytesAccepted=alaVfcQInstanceRedBytesAccepted, alaVfcQInstanceAdminState=alaVfcQInstanceAdminState, alaVfcQsapWRPAdminState=alaVfcQsapWRPAdminState, alaVfcQsetOperState=alaVfcQsetOperState, alaVfcQSPQueueCount=alaVfcQSPQueueCount, alaVfcQsetOperBandwidthLimitValue=alaVfcQsetOperBandwidthLimitValue, alaVfcQInstancePIRBandwidthLimitType=alaVfcQInstancePIRBandwidthLimitType, alaVfcQSIQsapLookupTable=alaVfcQSIQsapLookupTable, alaVfcProfileQsapLookupList=alaVfcProfileQsapLookupList, alaVfcQSPAdminState=alaVfcQSPAdminState, alaVfcQsetStatsOper=alaVfcQsetStatsOper, alaVfcQsetInstanceEntry=alaVfcQsetInstanceEntry, alaVfcQsetStatsAdmin=alaVfcQsetStatsAdmin, VfcProfileType=VfcProfileType, alaVfcQSPBandwidthLimitType=alaVfcQSPBandwidthLimitType, alaVfcQPCbs=alaVfcQPCbs, alaVfcQsapQSPName=alaVfcQsapQSPName, alaVfcWRPAdminState=alaVfcWRPAdminState, alaVfcQsapLastChange=alaVfcQsapLastChange, VfcQueueType=VfcQueueType, alaVfcWREDProfileEntry=alaVfcWREDProfileEntry, alaVfcQSPBandwidthLimitValue=alaVfcQSPBandwidthLimitValue, alaVfcQPWRPId=alaVfcQPWRPId, alaVfcQsapValue=alaVfcQsapValue, alaVfcQInstanceGroup=alaVfcQInstanceGroup, alaVfcQInstanceQSPName=alaVfcQInstanceQSPName, alaVfcQInstanceStatsAdmin=alaVfcQInstanceStatsAdmin, alaVfcQInstancePacketsEnqueued=alaVfcQInstancePacketsEnqueued, VfcSchedulingMethod=VfcSchedulingMethod, alaVfcQSIQsapLookupQsetId=alaVfcQSIQsapLookupQsetId, alaVfcQSPAttachmentCount=alaVfcQSPAttachmentCount, alaVfcQSIQsapLookupGroup=alaVfcQSIQsapLookupGroup, alaVfcQInstanceStatsOper=alaVfcQInstanceStatsOper, alaVfcWRPRedMaxDropProbability=alaVfcWRPRedMaxDropProbability, alaVfcQInstanceBytesEnqueued=alaVfcQInstanceBytesEnqueued, alaVfcQsapParent=alaVfcQsapParent, alaVfcWRPRedGain=alaVfcWRPRedGain, alaVfcQPLastChange=alaVfcQPLastChange, alaVfcQsetId=alaVfcQsetId, alaVfcQSPTemplateName=alaVfcQSPTemplateName, VfcQsapType=VfcQsapType, alaVfcStatisticsCollectionDuration=alaVfcStatisticsCollectionDuration, alaVfcQInstanceRedBytesDropped=alaVfcQInstanceRedBytesDropped, alaVfcProfileQsapLookupGroup=alaVfcProfileQsapLookupGroup, alaVfcQPQId=alaVfcQPQId, alaVfcQPCIRBandwidthLimitType=alaVfcQPCIRBandwidthLimitType, alaVfcQsetProfileTable=alaVfcQsetProfileTable, alaVfcQsetStatsClear=alaVfcQsetStatsClear, alaVfcQsetAdminState=alaVfcQsetAdminState, alaVfcQsetWRPOperState=alaVfcQsetWRPOperState, alaVfcProfileQsapLookupTable=alaVfcProfileQsapLookupTable, alaVfcQInstanceYellowBytesDropped=alaVfcQInstanceYellowBytesDropped, alcatelIND1VfcMIB=alcatelIND1VfcMIB, alaVfcQsapQSPId=alaVfcQsapQSPId, alaVfcQPMbs=alaVfcQPMbs, alaVfcQsetSchedulingMethod=alaVfcQsetSchedulingMethod, alaVfcProfileIndexLookupGroup=alaVfcProfileIndexLookupGroup, alcatelIND1VfcMIBObjects=alcatelIND1VfcMIBObjects, alaVfcWRPYellowGain=alaVfcWRPYellowGain, alaVfcWRPGreenMaxThreshold=alaVfcWRPGreenMaxThreshold, alaVfcWRPYellowMaxThreshold=alaVfcWRPYellowMaxThreshold, alaVfcQsetWRPName=alaVfcQsetWRPName, alaVfcQPQType=alaVfcQPQType, alaVfcQPWRPName=alaVfcQPWRPName, alaVfcQInstanceWRPName=alaVfcQInstanceWRPName, alaVfcQInstanceCIRBandwidthLimitType=alaVfcQInstanceCIRBandwidthLimitType, alaVfcQInstanceCIROperationalBandwidthLimitType=alaVfcQInstanceCIROperationalBandwidthLimitType, alaVfcWRPName=alaVfcWRPName, alaVfcQPCIRBandwidthLimitValue=alaVfcQPCIRBandwidthLimitValue, alaVfcQsetOperBandwidthLimitType=alaVfcQsetOperBandwidthLimitType, alaVfcQSIQsapLookupValue=alaVfcQSIQsapLookupValue, alaVfcQInstanceRedPacketsAccepted=alaVfcQInstanceRedPacketsAccepted, alcatelIND1VfcMIBCompliance=alcatelIND1VfcMIBCompliance, alaVfcQInstanceTable=alaVfcQInstanceTable, alaVfcWRPId=alaVfcWRPId, alaVfcQSPSchedulingMethod=alaVfcQSPSchedulingMethod, alaVfcQSPStatsAdmin=alaVfcQSPStatsAdmin, alaVfcStatisticsCollectionInterval=alaVfcStatisticsCollectionInterval, alaVfcQInstancePIRBandwidthLimitValue=alaVfcQInstancePIRBandwidthLimitValue, VfcQsapList=VfcQsapList, alaVfcProfileQsapLookupValue=alaVfcProfileQsapLookupValue, alaVfcQsapQpId=alaVfcQsapQpId, alaVfcQsapTable=alaVfcQsapTable, VfcWfqMode=VfcWfqMode, alaVfcQsetMode=alaVfcQsetMode, alaVfcWRPStatsAdmin=alaVfcWRPStatsAdmin, alaVfcQsetWRPId=alaVfcQsetWRPId, alaVfcQPQSPId=alaVfcQPQSPId, alaVfcQInstanceQSPId=alaVfcQInstanceQSPId, alaVfcQsapClearStats=alaVfcQsapClearStats, alaVfcQSPType=alaVfcQSPType, alaVfcWRPYellowMinThreshold=alaVfcWRPYellowMinThreshold, alaVfcProfileIndexLookupTable=alaVfcProfileIndexLookupTable, alaVfcQInstanceQsapId=alaVfcQInstanceQsapId, alaVfcQsetInstanceTable=alaVfcQsetInstanceTable, alaVfcQsapAction=alaVfcQsapAction, alaVfcConformance=alaVfcConformance, alaVfcQsapAdminState=alaVfcQsapAdminState, alaVfcQInstanceQsiId=alaVfcQInstanceQsiId, alaVfcProfileName=alaVfcProfileName, alaVfcQInstanceWRPAdminState=alaVfcQInstanceWRPAdminState, alaVfcQInstanceBytesDequeued=alaVfcQInstanceBytesDequeued, alaVfcQProfileTable=alaVfcQProfileTable, alaVfcQInstancePacketsDequeued=alaVfcQInstancePacketsDequeued, VfcBwLimitType=VfcBwLimitType, alaVfcQsapBandwidthLimitValue=alaVfcQsapBandwidthLimitValue, alaVfcWRPRowStatus=alaVfcWRPRowStatus, PYSNMP_MODULE_ID=alcatelIND1VfcMIB, alaVfcQProfileGroup=alaVfcQProfileGroup, alaVfcQInstanceRedPacketsDropped=alaVfcQInstanceRedPacketsDropped, alaVfcQsetLastChange=alaVfcQsetLastChange)
## While loop # like if but it indicates the sequence of statements might be executed many times as long as the condition remains true theSum = 0 data = input("Enter a number: ") while (data!= ""): number = float(data) theSum += number data = input("Enter a number or enter to quit: ") print(f"the sum is: {theSum:,.2f}") ## Summation using for loop theSum = 0 for number in range(1,10001): theSum += number print(theSum) ## Summation using while loop theSum = 0 number = 1 # must explicitly initialize before the loop while (number < 10001): theSum += number number += 1 print(theSum) ## Count down with for loop for count in range(10): print(count, end = " ") ## Count down with while loop count = 10 while (count > 0): print(count, end = " ") count -= 1
the_sum = 0 data = input('Enter a number: ') while data != '': number = float(data) the_sum += number data = input('Enter a number or enter to quit: ') print(f'the sum is: {theSum:,.2f}') the_sum = 0 for number in range(1, 10001): the_sum += number print(theSum) the_sum = 0 number = 1 while number < 10001: the_sum += number number += 1 print(theSum) for count in range(10): print(count, end=' ') count = 10 while count > 0: print(count, end=' ') count -= 1
# -*- coding: utf-8 -*- API_BASE_URL = 'https://b-api.cardioqvark.ru:1443/' API_PORT = 1443 CLIENT_CERT_PATH = '/tmp/' QVARK_CA_CERT_NAME = 'qvark_ca.pem'
api_base_url = 'https://b-api.cardioqvark.ru:1443/' api_port = 1443 client_cert_path = '/tmp/' qvark_ca_cert_name = 'qvark_ca.pem'
def dynamically_import(): mod = __import__('my_package.my_module', fromlist=['my_class']) klass = getattr(mod, 'my_class') if '__main__' == __name__: dynamically_import()
def dynamically_import(): mod = __import__('my_package.my_module', fromlist=['my_class']) klass = getattr(mod, 'my_class') if '__main__' == __name__: dynamically_import()
class Mandatory: def __init__(self, mandatory1, mandatory2): self.mandatory1 = mandatory1 self.mandatory2 = mandatory2 def get_args(self): return self.mandatory1, self.mandatory2 class Defaults: def __init__(self, mandatory, default1='value', default2=None): self.mandatory = mandatory self.default1 = default1 self.default2 = default2 def get_args(self): return self.mandatory, self.default1, self.default2 class Varargs(Mandatory): def __init__(self, mandatory, *varargs): Mandatory.__init__(self, mandatory, ' '.join(str(a) for a in varargs)) class Mixed(Defaults): def __init__(self, mandatory, default=42, *extra): Defaults.__init__(self, mandatory, default, ' '.join(str(a) for a in extra))
class Mandatory: def __init__(self, mandatory1, mandatory2): self.mandatory1 = mandatory1 self.mandatory2 = mandatory2 def get_args(self): return (self.mandatory1, self.mandatory2) class Defaults: def __init__(self, mandatory, default1='value', default2=None): self.mandatory = mandatory self.default1 = default1 self.default2 = default2 def get_args(self): return (self.mandatory, self.default1, self.default2) class Varargs(Mandatory): def __init__(self, mandatory, *varargs): Mandatory.__init__(self, mandatory, ' '.join((str(a) for a in varargs))) class Mixed(Defaults): def __init__(self, mandatory, default=42, *extra): Defaults.__init__(self, mandatory, default, ' '.join((str(a) for a in extra)))
#!/usr/bin/env python3 def apples_and_oranges(pair): first, second = pair if first == "apples": return True elif second == "oranges": return True else: return False
def apples_and_oranges(pair): (first, second) = pair if first == 'apples': return True elif second == 'oranges': return True else: return False
# 1) a = [1, 4, 5, 7, 8, -2, 0, -1] # 2) print('At index 3:', a[3]) print('At index 5:', a[5]) # 3) a_sorted = sorted(a, reverse = True) print('Sorted a:', a_sorted) # 4) print('1...3:', a_sorted[1:4]) print('2...6:', a_sorted[2:7]) # 5) del a_sorted[2:4] # 6) print('Sorted a:', a_sorted) # 7) b = ['grapes', 'Potatoes', 'tomatoes', 'Orange', 'Lemon', 'Broccoli', 'Carrot', 'Sausages'] # 8) b_sorted = sorted(b) print('Sorted b:', b_sorted) # 9) c = a[1:4] + b[4:7] # 10 print('c:', c)
a = [1, 4, 5, 7, 8, -2, 0, -1] print('At index 3:', a[3]) print('At index 5:', a[5]) a_sorted = sorted(a, reverse=True) print('Sorted a:', a_sorted) print('1...3:', a_sorted[1:4]) print('2...6:', a_sorted[2:7]) del a_sorted[2:4] print('Sorted a:', a_sorted) b = ['grapes', 'Potatoes', 'tomatoes', 'Orange', 'Lemon', 'Broccoli', 'Carrot', 'Sausages'] b_sorted = sorted(b) print('Sorted b:', b_sorted) c = a[1:4] + b[4:7] print('c:', c)
#encoding:utf-8 subreddit = 'PolHumor' t_channel = '@r_PolHumor' def send_post(submission, r2t): return r2t.send_simple(submission)
subreddit = 'PolHumor' t_channel = '@r_PolHumor' def send_post(submission, r2t): return r2t.send_simple(submission)
""" Tools for validating inputs or variables according to specifications detailing what format, datatype, etc. the data must be. TODO: - Add common specifications already created - Change date, time and datetime to use isValid date, time and datetime methods so can call externally - Change true_false to error if not one of the possibilities """ def _round(num, digits): """ Private rounding method which uses the built-in round function but fixes a problem: If you call it with the number of digits as 0, it will round to 0 decimal places but leave as a float (so it has a .0 at the end) Whereas if you call it without the number of digits, it will round to 0 decimal places but convert to an integer But as I dynamically work out digits, I always provide the number of digits even if it is 0 and if it is 0, I want it to be an int So I just check this and potentially call it with no arguments accordingly """ return round(num, digits) if digits != 0 else round(num) class Spec: """ Specifies the format of data in general :param type_: The datatype the data must be :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ def __init__(self, type_, extra_values=None): """ Specifies the format of data :param type_: The datatype the data must be :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ assert isinstance(type_, type), "param type_ must be a datatype" self.type = type_ self.extra_values = extra_values self.msg = "Must be type {}".format(str(type_)[8:-2]) if extra_values: self.msg += " or one of the following: " + ", ".join(["'{}'".format(value) for value in extra_values]) def __repr__(self): return "Spec({})".format(self.msg) class SpecStr(Spec): """ Specifies the format of a string :param allowed_strings: A list of allowed strings. None allows any. Default: None. :param allowed_chars: A list of allowed characters. None allows any. Default: None. :param to_lower: Whether or not to lower the string before checking. Default: True :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ def __init__(self, allowed_strings=None, allowed_chars=None, to_lower=True, extra_values=None): """ Specifies the format of a string :param allowed_strings: A list of allowed strings. None allows any. Default: None. :param allowed_chars: A list of allowed characters. None allows any. Default: None. :param to_lower: Whether or not to lower the string before checking. Default: True :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ assert isinstance(allowed_strings, list) or allowed_strings is None, "param allowed_strings must be a list or None" if allowed_strings is not None: assert all([isinstance(item, str) for item in allowed_strings]), "all items in param allowed_strings must be strings" assert isinstance(allowed_chars, list) or allowed_chars is None, "param allowed_chars must be a list or None" if allowed_chars is not None: assert all([isinstance(item, str) and len(item) == 1 for item in allowed_chars]), "all items in param allowed_chars must be strings of length 1" super().__init__(str, extra_values) self.allowed_strings = [item.lower() for item in allowed_strings] if to_lower and allowed_strings is not None else allowed_strings self.allowed_chars = [item.lower() for item in allowed_chars] if to_lower and allowed_chars is not None else allowed_chars self.to_lower = to_lower if allowed_strings is not None: if to_lower: self.msg += " and once converted to lower case, must be one of the following: " else: self.msg += " and must be one of the following: " self.msg += ", ".join(["'{}'".format(item) for item in allowed_strings]) if allowed_chars is not None: if to_lower: self.msg += " and once converted to lower case, every character must be one of the following: " else: self.msg += " and every character must be one of the following: " self.msg += ", ".join(["'{}'".format(item) for item in allowed_chars]) class SpecNum(Spec): """ Specifies the format of a number :param round_digits: The number of digits to round to before checking. None means don't round. Default: None :param restrict_to_int: Whether or not to only allow integers. Default: False :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ def __init__(self, round_digits=None, restrict_to_int=False, extra_values=None): """ Specifies the format of a number :param round_digits: The number of digits to round to before checking. None means don't round. Default: None :param restrict_to_int: Whether or not to only allow integers. Default: False :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ assert round_digits is None or isinstance(round_digits, int), "param round_digits must be an integer or None" super().__init__(int if restrict_to_int else float, extra_values) self.round_digits = round_digits if restrict_to_int: self.msg = "Must be an integer" else: self.msg = "Must be a number" if round_digits is not None: self.msg = "Once rounded to {} decimal places, m".format(round_digits) + self.msg[1:] if extra_values: self.msg += " or leave blank" class SpecNumRange(SpecNum): """ Specifies the format of a number in a range :param min_: The minimum valid value. None means there is no minimum. Default: None :param max_: The maximum valid value. None means there is no maximum. Default: None :param round_digits: The number of digits to round to before checking. None means don't round. Default: None :param restrict_to_int: Whether or not to only allow integers. Default: False :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ def __init__(self, min_=None, max_=None, round_digits=None, restrict_to_int=False, extra_values=None): """ Specifies the format of a number in a range :param min_: The minimum valid value. None means there is no minimum. Default: None :param max_: The maximum valid value. None means there is no maximum. Default: None :param round_digits: The number of digits to round to before checking. None means don't round. Default: None :param restrict_to_int: Whether or not to only allow integers. Default: False :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ assert isinstance(min_, (int, float)) or min_ is None, "param min_ must be a number or None" assert isinstance(max_, (int, float)) or max_ is None, "param max_ must be a number or None" super().__init__(round_digits, restrict_to_int, extra_values) self.min = min_ self.max = max_ if min_ is not None: self.msg += ", minimum {}".format(min_) if max_ is not None: self.msg += ", maximum {}".format(max_) class SpecNumList(SpecNum): """ Specifies the format of a number from a list of allowed numbers :param list_of_allowed: A list of allowed numbers :param round_digits: The number of digits to round to before checking. None means don't round. Default: None :param restrict_to_int: Whether or not to only allow integers. Default: False :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ def __init__(self, list_of_allowed, round_digits=None, restrict_to_int=False, extra_values=None): """ Specifies the format of a number from a list of allowed numbers :param list_of_allowed: A list of allowed numbers :param round_digits: The number of digits to round to before checking. None means don't round. Default: None :param restrict_to_int: Whether or not to only allow integers. Default: False :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ assert isinstance(list_of_allowed, (list, tuple)), "param list_of_allowed must be a list or tuple" assert all([isinstance(item, int if restrict_to_int else (int, float)) for item in list_of_allowed]), "all items in param list_of_allowed must be numbers" super().__init__(round_digits, restrict_to_int, extra_values) self.list_of_allowed = list_of_allowed self.msg += " that is one of the following: " + ", ".join(["'{}'".format(item) for item in list_of_allowed]) def is_valid(value, spec): """ Return whether or not 'value' is valid according to 'spec' and the validated 'value' :param value: The value to validate :param spec: A descendant of the 'Spec' class, containing information on how to validate :return: Whether or not the value was valid according to the specification :return: The value after validation (converted to the right type, lowered if applicable, etc.). This is only valid if the first return value is True. """ assert isinstance(spec, Spec), "param spec must be an object of a 'Spec' class" if spec.extra_values and value in spec.extra_values: return True, value if isinstance(value, str): value = value.strip() if isinstance(spec, SpecNum): # rounds before converting as if it is meant to be an int but it is a float but they have # allowed rounding to the nearest whole number, it would error but not when doing this try: value = float(value) except (ValueError, TypeError): return False, value else: if spec.round_digits is not None: value = _round(value, spec.round_digits) try: value = spec.type(value) except ValueError: return False, value else: if isinstance(spec, SpecStr) and spec.to_lower: value = value.lower() if isinstance(spec, SpecNum) and spec.round_digits is not None: value = _round(value, spec.round_digits) if hasattr(spec, "allowed_strings") and spec.allowed_strings is not None: return value in spec.allowed_strings, value if hasattr(spec, "list_of_allowed") and spec.list_of_allowed is not None: return value in spec.list_of_allowed, value if hasattr(spec, "allowed_chars") and spec.allowed_chars is not None: return all([char in spec.allowed_chars for char in value]), value if isinstance(spec, SpecNumRange): if spec.min is not None and spec.max is not None: return spec.min <= value <= spec.max, value if spec.min is not None: return spec.min <= value, value if spec.max is not None: return value <= spec.max, value return True, value def validate_input(spec, prompt=None): """ Repeatedly ask the user for input until their input is valid according to 'spec' and return their validated input :param spec: A descendant of the 'Spec' class, containing information on how to validate :param prompt: The prompt to display to the user before asking them to input. None displays nothing. Default: None :return: The valid value the user input """ acceptable = False while not acceptable: acceptable, value = is_valid(input(prompt) if prompt is not None else input(), spec) if not acceptable: print(spec.msg) return value def assert_valid(value, spec, name=None): """ Throw an assertion error if 'value' is invalid according to 'spec', otherwise return it :param value: The value to validate :param spec: A descendant of the 'Spec' class, containing information on how to validate :param name: The name to reference the value so it is clear what is invalid in error messages. None just displays the error message. Default: None :return value: If it hasn't thrown an assertion error, returns the valid value after normalisation """ valid, value = is_valid(value, spec) assert valid, spec.msg if name is None else str(name).strip().lower() + ": " + spec.msg return value def true_false(prompt=None, extra_values=None): """ Repeatedly ask the user for an input until they input a boolean-like value and return the boolean version :param prompt: The prompt to display to the user before asking them to input. None will not display anything. Default: None :param extra_values: A list of extra values it can take to be None. Default: None :return: True or False depending on the user's input or None if extra_values and they input one of these """ value = validate_input(specTrueFalse, prompt) if extra_values is not None and value in extra_values: return None if value in ["f", "false", "n", "no", "0", "off", "disabled", "disable"]: return False return True def date(prompt=None, enforce=True, form="exact", fill_0s=True): """ Repeatedly ask the user for a year, month and day until they input valid values and return this in a defined format :param prompt: Message to display to the user before asking them for inputs. Default: None :param enforce: Whether or not to enforce valid dates. If False, will allow empty inputs. Default: True :param form: The form to output the date in. Default: 'exact'. Must be one of the following: - 'exact': year-month-day - 'uk': day/month/year - 'us': month/day/year - 'long': day_with_suffix month_as_word, year :param fill_0s: Whether or not to fill numerical dates with leading 0s. Doesn't apply to 'long' form """ extras = None if enforce else [""] form = assert_valid(form, SpecStr(["exact", "uk", "us", "long"]), "param form") if prompt is not None: print(prompt, "\n") year = validate_input(SpecNumRange(restrict_to_int=True, extra_values=extras), "Year: " if enforce else "Year (can leave blank): ") if enforce: if year % 4 == 0 and (year % 100 != 0 or year % 400 == 0): leap_year = True else: leap_year = False months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"] allowed = months.copy() allowed.extend(["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]) month = validate_input(SpecStr(allowed, extra_values=extras), "Month: " if enforce else "Month (can leave blank): ") if month in months: month = months.index(month) + 1 elif month in allowed: month = int(month) days = 28 if month == 2 and (not enforce or not leap_year) else \ 29 if month == 2 and (not enforce or leap_year) else \ 30 if month == 4 or month == 6 or month == 9 or month == 11 else \ 31 day = validate_input(SpecNumRange(1, days, None, True, extras), "Date/day: " if enforce else "Date/day (can leave blank): ") if year is None: year = "?" if month is None: month = "?" if day is None: day = "?" if form == "long": suffix = "st" if day % 10 == 1 else "nd" if day % 10 == 2 else "rd" if day % 10 == 3 else "th" month = months[month - 1] month = "".join([month[i].upper() if i == 0 else month[i] for i in range(len(month))]) return "{}{} {}, {}".format(day, suffix, month, year) if fill_0s and month != "?" and day != "?": if month < 10: month = "0" + str(month) if day < 10: day = "0" + str(day) if form == "exact": return "{}-{}-{}".format(year, month, day) if form == "us": return "{}/{}/{}".format(month, day, year) return "{}/{}/{}".format(day, month, year) def time(prompt=None, output_hour_clock=24, milli_seconds=False, fill_0s=True, allow_na=False): """ Repeatedly ask the user to input hours, minutes and seconds until they input valid values and return this in a defined format :param prompt: Message to display to the user before asking them for inputs. Default: None :param output_hour_clock: Whether to output in 24 hour clock or in 12 hour clock with AM/PM. Default: 24 :param milli_seconds: Whether or not to allow more accuracy in seconds. Default: False :param fill_0s: Whether or not to fill numerical times with leading 0s. Default: False :param allow_na: Whether or not to allow empty inputs too. Default: False """ extras = None if allow_na else [""] output_hour_clock = assert_valid(output_hour_clock, SpecNumList([12, 24], None, True), "param output_hour_clock") if prompt is not None: print(prompt, "\n") input_hour_clock = validate_input(SpecNumList([12, 24], None, True), "Input hour clock (12/24): ") if input_hour_clock == 12: hours = validate_input(SpecNumRange(1, 12, None, True, extras), "Hours (12 hour clock): ") period = validate_input(SpecStr(["am", "pm"], extra_values=extras), "AM or PM? ") if hours == 12: hours = 0 if period == "pm": hours += 12 else: hours = validate_input(SpecNumRange(0, 23, None, True, extras), "Hours (24 hour clock): ") minutes = validate_input(SpecNumRange(0, 59, None, True, extras), "Minutes: ") if milli_seconds: seconds = validate_input(SpecNumRange(0, 59.999999, 6, False, extras), "Seconds including decimal: ") else: seconds = validate_input(SpecNumRange(0, 59, 0, True, extras), "Seconds: ") if hours is not None and output_hour_clock == 12: if hours < 12: period = "AM" else: period = "PM" hours %= 12 if hours == 0: hours = 12 if fill_0s: if hours is not None and hours < 10: hours = "0" + str(hours) if minutes is not None and minutes < 10: minutes = "0" + str(minutes) if seconds is not None and seconds < 10: seconds = "0" + str(seconds) to_return = "{}:{}:{}".format(hours, minutes, seconds) if output_hour_clock == 12: to_return += " {}".format(period) return to_return def datetime(prompt=None, enforce=True, form="exact", milli_seconds=False, fill_0s=True): """ Repeatedly ask the user to input a year, month, day, hours, minutes and seconds until they input valid values and return this in a defined format :param prompt: Message to display to the user before asking them for inputs. Default: None :param enforce: Whether or not to enforce valid dates. If False, will allow empty inputs. Default: True :param form: The form to output the datetime in. Default: exact - 'exact': year-month-day hour_in_24_hour_clock:minute:second - 'long': day_with_suffix month_as_word, year hour_in_12_hour_clock:minute:second AM_or_PM :param milli_seconds: Whether or not to allow more accuracy when inputting seconds. Default: False :param fill_0s: Whether or not to fill numerical datetimes with leading 0s. Default: True """ form = assert_valid(form, SpecStr(["exact", "long"]), "param form") if prompt is not None: print(prompt, "\n") date_ = date(None, enforce, form, fill_0s) time_ = time(None, 24 if form == "exact" else 12, milli_seconds, fill_0s, not enforce) return "{} {}".format(date_, time_) specTrueFalse = SpecStr(["t", "true", "f", "false", "y", "yes", "n", "no", "0", "1", "on", "off", "enabled", "enable", "disabled", "disable"]) specDay = SpecNumRange(1, 31, restrict_to_int=True) specMonth = SpecNumRange(1, 12, restrict_to_int=True) specYear = SpecNumRange(1, restrict_to_int=True) specHour = SpecNumRange(0, 23, restrict_to_int=True) specMinuteSecond = SpecNumRange(0, 59, restrict_to_int=True)
""" Tools for validating inputs or variables according to specifications detailing what format, datatype, etc. the data must be. TODO: - Add common specifications already created - Change date, time and datetime to use isValid date, time and datetime methods so can call externally - Change true_false to error if not one of the possibilities """ def _round(num, digits): """ Private rounding method which uses the built-in round function but fixes a problem: If you call it with the number of digits as 0, it will round to 0 decimal places but leave as a float (so it has a .0 at the end) Whereas if you call it without the number of digits, it will round to 0 decimal places but convert to an integer But as I dynamically work out digits, I always provide the number of digits even if it is 0 and if it is 0, I want it to be an int So I just check this and potentially call it with no arguments accordingly """ return round(num, digits) if digits != 0 else round(num) class Spec: """ Specifies the format of data in general :param type_: The datatype the data must be :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ def __init__(self, type_, extra_values=None): """ Specifies the format of data :param type_: The datatype the data must be :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ assert isinstance(type_, type), 'param type_ must be a datatype' self.type = type_ self.extra_values = extra_values self.msg = 'Must be type {}'.format(str(type_)[8:-2]) if extra_values: self.msg += ' or one of the following: ' + ', '.join(["'{}'".format(value) for value in extra_values]) def __repr__(self): return 'Spec({})'.format(self.msg) class Specstr(Spec): """ Specifies the format of a string :param allowed_strings: A list of allowed strings. None allows any. Default: None. :param allowed_chars: A list of allowed characters. None allows any. Default: None. :param to_lower: Whether or not to lower the string before checking. Default: True :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ def __init__(self, allowed_strings=None, allowed_chars=None, to_lower=True, extra_values=None): """ Specifies the format of a string :param allowed_strings: A list of allowed strings. None allows any. Default: None. :param allowed_chars: A list of allowed characters. None allows any. Default: None. :param to_lower: Whether or not to lower the string before checking. Default: True :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ assert isinstance(allowed_strings, list) or allowed_strings is None, 'param allowed_strings must be a list or None' if allowed_strings is not None: assert all([isinstance(item, str) for item in allowed_strings]), 'all items in param allowed_strings must be strings' assert isinstance(allowed_chars, list) or allowed_chars is None, 'param allowed_chars must be a list or None' if allowed_chars is not None: assert all([isinstance(item, str) and len(item) == 1 for item in allowed_chars]), 'all items in param allowed_chars must be strings of length 1' super().__init__(str, extra_values) self.allowed_strings = [item.lower() for item in allowed_strings] if to_lower and allowed_strings is not None else allowed_strings self.allowed_chars = [item.lower() for item in allowed_chars] if to_lower and allowed_chars is not None else allowed_chars self.to_lower = to_lower if allowed_strings is not None: if to_lower: self.msg += ' and once converted to lower case, must be one of the following: ' else: self.msg += ' and must be one of the following: ' self.msg += ', '.join(["'{}'".format(item) for item in allowed_strings]) if allowed_chars is not None: if to_lower: self.msg += ' and once converted to lower case, every character must be one of the following: ' else: self.msg += ' and every character must be one of the following: ' self.msg += ', '.join(["'{}'".format(item) for item in allowed_chars]) class Specnum(Spec): """ Specifies the format of a number :param round_digits: The number of digits to round to before checking. None means don't round. Default: None :param restrict_to_int: Whether or not to only allow integers. Default: False :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ def __init__(self, round_digits=None, restrict_to_int=False, extra_values=None): """ Specifies the format of a number :param round_digits: The number of digits to round to before checking. None means don't round. Default: None :param restrict_to_int: Whether or not to only allow integers. Default: False :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ assert round_digits is None or isinstance(round_digits, int), 'param round_digits must be an integer or None' super().__init__(int if restrict_to_int else float, extra_values) self.round_digits = round_digits if restrict_to_int: self.msg = 'Must be an integer' else: self.msg = 'Must be a number' if round_digits is not None: self.msg = 'Once rounded to {} decimal places, m'.format(round_digits) + self.msg[1:] if extra_values: self.msg += ' or leave blank' class Specnumrange(SpecNum): """ Specifies the format of a number in a range :param min_: The minimum valid value. None means there is no minimum. Default: None :param max_: The maximum valid value. None means there is no maximum. Default: None :param round_digits: The number of digits to round to before checking. None means don't round. Default: None :param restrict_to_int: Whether or not to only allow integers. Default: False :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ def __init__(self, min_=None, max_=None, round_digits=None, restrict_to_int=False, extra_values=None): """ Specifies the format of a number in a range :param min_: The minimum valid value. None means there is no minimum. Default: None :param max_: The maximum valid value. None means there is no maximum. Default: None :param round_digits: The number of digits to round to before checking. None means don't round. Default: None :param restrict_to_int: Whether or not to only allow integers. Default: False :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ assert isinstance(min_, (int, float)) or min_ is None, 'param min_ must be a number or None' assert isinstance(max_, (int, float)) or max_ is None, 'param max_ must be a number or None' super().__init__(round_digits, restrict_to_int, extra_values) self.min = min_ self.max = max_ if min_ is not None: self.msg += ', minimum {}'.format(min_) if max_ is not None: self.msg += ', maximum {}'.format(max_) class Specnumlist(SpecNum): """ Specifies the format of a number from a list of allowed numbers :param list_of_allowed: A list of allowed numbers :param round_digits: The number of digits to round to before checking. None means don't round. Default: None :param restrict_to_int: Whether or not to only allow integers. Default: False :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ def __init__(self, list_of_allowed, round_digits=None, restrict_to_int=False, extra_values=None): """ Specifies the format of a number from a list of allowed numbers :param list_of_allowed: A list of allowed numbers :param round_digits: The number of digits to round to before checking. None means don't round. Default: None :param restrict_to_int: Whether or not to only allow integers. Default: False :param extra_values: A list of extra values it can take to always be true, even if not the datatype. Default: None """ assert isinstance(list_of_allowed, (list, tuple)), 'param list_of_allowed must be a list or tuple' assert all([isinstance(item, int if restrict_to_int else (int, float)) for item in list_of_allowed]), 'all items in param list_of_allowed must be numbers' super().__init__(round_digits, restrict_to_int, extra_values) self.list_of_allowed = list_of_allowed self.msg += ' that is one of the following: ' + ', '.join(["'{}'".format(item) for item in list_of_allowed]) def is_valid(value, spec): """ Return whether or not 'value' is valid according to 'spec' and the validated 'value' :param value: The value to validate :param spec: A descendant of the 'Spec' class, containing information on how to validate :return: Whether or not the value was valid according to the specification :return: The value after validation (converted to the right type, lowered if applicable, etc.). This is only valid if the first return value is True. """ assert isinstance(spec, Spec), "param spec must be an object of a 'Spec' class" if spec.extra_values and value in spec.extra_values: return (True, value) if isinstance(value, str): value = value.strip() if isinstance(spec, SpecNum): try: value = float(value) except (ValueError, TypeError): return (False, value) else: if spec.round_digits is not None: value = _round(value, spec.round_digits) try: value = spec.type(value) except ValueError: return (False, value) else: if isinstance(spec, SpecStr) and spec.to_lower: value = value.lower() if isinstance(spec, SpecNum) and spec.round_digits is not None: value = _round(value, spec.round_digits) if hasattr(spec, 'allowed_strings') and spec.allowed_strings is not None: return (value in spec.allowed_strings, value) if hasattr(spec, 'list_of_allowed') and spec.list_of_allowed is not None: return (value in spec.list_of_allowed, value) if hasattr(spec, 'allowed_chars') and spec.allowed_chars is not None: return (all([char in spec.allowed_chars for char in value]), value) if isinstance(spec, SpecNumRange): if spec.min is not None and spec.max is not None: return (spec.min <= value <= spec.max, value) if spec.min is not None: return (spec.min <= value, value) if spec.max is not None: return (value <= spec.max, value) return (True, value) def validate_input(spec, prompt=None): """ Repeatedly ask the user for input until their input is valid according to 'spec' and return their validated input :param spec: A descendant of the 'Spec' class, containing information on how to validate :param prompt: The prompt to display to the user before asking them to input. None displays nothing. Default: None :return: The valid value the user input """ acceptable = False while not acceptable: (acceptable, value) = is_valid(input(prompt) if prompt is not None else input(), spec) if not acceptable: print(spec.msg) return value def assert_valid(value, spec, name=None): """ Throw an assertion error if 'value' is invalid according to 'spec', otherwise return it :param value: The value to validate :param spec: A descendant of the 'Spec' class, containing information on how to validate :param name: The name to reference the value so it is clear what is invalid in error messages. None just displays the error message. Default: None :return value: If it hasn't thrown an assertion error, returns the valid value after normalisation """ (valid, value) = is_valid(value, spec) assert valid, spec.msg if name is None else str(name).strip().lower() + ': ' + spec.msg return value def true_false(prompt=None, extra_values=None): """ Repeatedly ask the user for an input until they input a boolean-like value and return the boolean version :param prompt: The prompt to display to the user before asking them to input. None will not display anything. Default: None :param extra_values: A list of extra values it can take to be None. Default: None :return: True or False depending on the user's input or None if extra_values and they input one of these """ value = validate_input(specTrueFalse, prompt) if extra_values is not None and value in extra_values: return None if value in ['f', 'false', 'n', 'no', '0', 'off', 'disabled', 'disable']: return False return True def date(prompt=None, enforce=True, form='exact', fill_0s=True): """ Repeatedly ask the user for a year, month and day until they input valid values and return this in a defined format :param prompt: Message to display to the user before asking them for inputs. Default: None :param enforce: Whether or not to enforce valid dates. If False, will allow empty inputs. Default: True :param form: The form to output the date in. Default: 'exact'. Must be one of the following: - 'exact': year-month-day - 'uk': day/month/year - 'us': month/day/year - 'long': day_with_suffix month_as_word, year :param fill_0s: Whether or not to fill numerical dates with leading 0s. Doesn't apply to 'long' form """ extras = None if enforce else [''] form = assert_valid(form, spec_str(['exact', 'uk', 'us', 'long']), 'param form') if prompt is not None: print(prompt, '\n') year = validate_input(spec_num_range(restrict_to_int=True, extra_values=extras), 'Year: ' if enforce else 'Year (can leave blank): ') if enforce: if year % 4 == 0 and (year % 100 != 0 or year % 400 == 0): leap_year = True else: leap_year = False months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'] allowed = months.copy() allowed.extend(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']) month = validate_input(spec_str(allowed, extra_values=extras), 'Month: ' if enforce else 'Month (can leave blank): ') if month in months: month = months.index(month) + 1 elif month in allowed: month = int(month) days = 28 if month == 2 and (not enforce or not leap_year) else 29 if month == 2 and (not enforce or leap_year) else 30 if month == 4 or month == 6 or month == 9 or (month == 11) else 31 day = validate_input(spec_num_range(1, days, None, True, extras), 'Date/day: ' if enforce else 'Date/day (can leave blank): ') if year is None: year = '?' if month is None: month = '?' if day is None: day = '?' if form == 'long': suffix = 'st' if day % 10 == 1 else 'nd' if day % 10 == 2 else 'rd' if day % 10 == 3 else 'th' month = months[month - 1] month = ''.join([month[i].upper() if i == 0 else month[i] for i in range(len(month))]) return '{}{} {}, {}'.format(day, suffix, month, year) if fill_0s and month != '?' and (day != '?'): if month < 10: month = '0' + str(month) if day < 10: day = '0' + str(day) if form == 'exact': return '{}-{}-{}'.format(year, month, day) if form == 'us': return '{}/{}/{}'.format(month, day, year) return '{}/{}/{}'.format(day, month, year) def time(prompt=None, output_hour_clock=24, milli_seconds=False, fill_0s=True, allow_na=False): """ Repeatedly ask the user to input hours, minutes and seconds until they input valid values and return this in a defined format :param prompt: Message to display to the user before asking them for inputs. Default: None :param output_hour_clock: Whether to output in 24 hour clock or in 12 hour clock with AM/PM. Default: 24 :param milli_seconds: Whether or not to allow more accuracy in seconds. Default: False :param fill_0s: Whether or not to fill numerical times with leading 0s. Default: False :param allow_na: Whether or not to allow empty inputs too. Default: False """ extras = None if allow_na else [''] output_hour_clock = assert_valid(output_hour_clock, spec_num_list([12, 24], None, True), 'param output_hour_clock') if prompt is not None: print(prompt, '\n') input_hour_clock = validate_input(spec_num_list([12, 24], None, True), 'Input hour clock (12/24): ') if input_hour_clock == 12: hours = validate_input(spec_num_range(1, 12, None, True, extras), 'Hours (12 hour clock): ') period = validate_input(spec_str(['am', 'pm'], extra_values=extras), 'AM or PM? ') if hours == 12: hours = 0 if period == 'pm': hours += 12 else: hours = validate_input(spec_num_range(0, 23, None, True, extras), 'Hours (24 hour clock): ') minutes = validate_input(spec_num_range(0, 59, None, True, extras), 'Minutes: ') if milli_seconds: seconds = validate_input(spec_num_range(0, 59.999999, 6, False, extras), 'Seconds including decimal: ') else: seconds = validate_input(spec_num_range(0, 59, 0, True, extras), 'Seconds: ') if hours is not None and output_hour_clock == 12: if hours < 12: period = 'AM' else: period = 'PM' hours %= 12 if hours == 0: hours = 12 if fill_0s: if hours is not None and hours < 10: hours = '0' + str(hours) if minutes is not None and minutes < 10: minutes = '0' + str(minutes) if seconds is not None and seconds < 10: seconds = '0' + str(seconds) to_return = '{}:{}:{}'.format(hours, minutes, seconds) if output_hour_clock == 12: to_return += ' {}'.format(period) return to_return def datetime(prompt=None, enforce=True, form='exact', milli_seconds=False, fill_0s=True): """ Repeatedly ask the user to input a year, month, day, hours, minutes and seconds until they input valid values and return this in a defined format :param prompt: Message to display to the user before asking them for inputs. Default: None :param enforce: Whether or not to enforce valid dates. If False, will allow empty inputs. Default: True :param form: The form to output the datetime in. Default: exact - 'exact': year-month-day hour_in_24_hour_clock:minute:second - 'long': day_with_suffix month_as_word, year hour_in_12_hour_clock:minute:second AM_or_PM :param milli_seconds: Whether or not to allow more accuracy when inputting seconds. Default: False :param fill_0s: Whether or not to fill numerical datetimes with leading 0s. Default: True """ form = assert_valid(form, spec_str(['exact', 'long']), 'param form') if prompt is not None: print(prompt, '\n') date_ = date(None, enforce, form, fill_0s) time_ = time(None, 24 if form == 'exact' else 12, milli_seconds, fill_0s, not enforce) return '{} {}'.format(date_, time_) spec_true_false = spec_str(['t', 'true', 'f', 'false', 'y', 'yes', 'n', 'no', '0', '1', 'on', 'off', 'enabled', 'enable', 'disabled', 'disable']) spec_day = spec_num_range(1, 31, restrict_to_int=True) spec_month = spec_num_range(1, 12, restrict_to_int=True) spec_year = spec_num_range(1, restrict_to_int=True) spec_hour = spec_num_range(0, 23, restrict_to_int=True) spec_minute_second = spec_num_range(0, 59, restrict_to_int=True)
""" LC 775 You are given an integer array nums of length n which represents a permutation of all the integers in the range [0, n - 1]. The number of global inversions is the number of the different pairs (i, j) where: 0 <= i < j < n nums[i] > nums[j] The number of local inversions is the number of indices i where: 0 <= i < n - 1 nums[i] > nums[i + 1] Return true if the number of global inversions is equal to the number of local inversions. Example 1: Input: nums = [1,0,2] Output: true Explanation: There is 1 global inversion and 1 local inversion. Example 2: Input: nums = [1,2,0] Output: false Explanation: There are 2 global inversions and 1 local inversion. """ class Solution: def isIdealPermutation(self, nums: List[int]) -> bool: running_min = nums[-1] # check value pairs whose indices have difference of 2 for i in range(len(nums) - 1, 1, -1): running_min = min(nums[i], running_min) if nums[i - 2] > running_min: return False return True """ Time O(N) Space O(1) """
""" LC 775 You are given an integer array nums of length n which represents a permutation of all the integers in the range [0, n - 1]. The number of global inversions is the number of the different pairs (i, j) where: 0 <= i < j < n nums[i] > nums[j] The number of local inversions is the number of indices i where: 0 <= i < n - 1 nums[i] > nums[i + 1] Return true if the number of global inversions is equal to the number of local inversions. Example 1: Input: nums = [1,0,2] Output: true Explanation: There is 1 global inversion and 1 local inversion. Example 2: Input: nums = [1,2,0] Output: false Explanation: There are 2 global inversions and 1 local inversion. """ class Solution: def is_ideal_permutation(self, nums: List[int]) -> bool: running_min = nums[-1] for i in range(len(nums) - 1, 1, -1): running_min = min(nums[i], running_min) if nums[i - 2] > running_min: return False return True '\nTime O(N)\nSpace O(1)\n'
print("this is a test for branching") print("this is on loopbranch") #this will be added on the new file with out modifing the code before l = list() for i in range(6): l.append(i) print(l)
print('this is a test for branching') print('this is on loopbranch') l = list() for i in range(6): l.append(i) print(l)
"""Exceptions used by the FlickrAPI module.""" class IllegalArgumentException(ValueError): """Raised when a method is passed an illegal argument. More specific details will be included in the exception message when thrown. """ class FlickrError(Exception): """Raised when a Flickr method fails. More specific details will be included in the exception message when thrown. """ def __init__(self, message, code=None): Exception.__init__(self, message) if code is None: self.code = None else: self.code = int(code) class CancelUpload(Exception): """Raise this exception in an upload/replace callback function to abort the upload. """ class LockingError(Exception): """Raised when TokenCache cannot acquire a lock within the timeout period, or when a lock release is attempted when the lock does not belong to this process. """ class CacheDatabaseError(FlickrError): """Raised when the OAuth token cache database is corrupted or otherwise unusable. """
"""Exceptions used by the FlickrAPI module.""" class Illegalargumentexception(ValueError): """Raised when a method is passed an illegal argument. More specific details will be included in the exception message when thrown. """ class Flickrerror(Exception): """Raised when a Flickr method fails. More specific details will be included in the exception message when thrown. """ def __init__(self, message, code=None): Exception.__init__(self, message) if code is None: self.code = None else: self.code = int(code) class Cancelupload(Exception): """Raise this exception in an upload/replace callback function to abort the upload. """ class Lockingerror(Exception): """Raised when TokenCache cannot acquire a lock within the timeout period, or when a lock release is attempted when the lock does not belong to this process. """ class Cachedatabaseerror(FlickrError): """Raised when the OAuth token cache database is corrupted or otherwise unusable. """
# -*- coding: utf-8 -*- """Top-level package for napari-aicsimageio.""" __author__ = "Jackson Maxfield Brown" __email__ = "jacksonb@alleninstitute.org" # Do not edit this string manually, always use bumpversion # Details in CONTRIBUTING.md __version__ = "0.4.0" def get_module_version() -> str: return __version__
"""Top-level package for napari-aicsimageio.""" __author__ = 'Jackson Maxfield Brown' __email__ = 'jacksonb@alleninstitute.org' __version__ = '0.4.0' def get_module_version() -> str: return __version__
def show_dict(D): for i,j in D.items(): print(f"{i}: {j}") def sort_by_values(D): L = sorted(D.items(), key=lambda kv: kv[1]) return L
def show_dict(D): for (i, j) in D.items(): print(f'{i}: {j}') def sort_by_values(D): l = sorted(D.items(), key=lambda kv: kv[1]) return L
# coding = utf-8 # Create date: 2018-10-29 # Author :Bowen Lee def test_dhcp_hostname(ros_kvm_init, cloud_config_url): command = 'hostname' feed_back = 'rancher' kwargs = dict(cloud_config='{url}test_dncp_hostname.yml'.format(url=cloud_config_url), is_install_to_hard_drive=True) tuple_return = ros_kvm_init(**kwargs) client = tuple_return[0] stdin, stdout, stderr = client.exec_command(command, timeout=60) output = stdout.read().decode('utf-8') assert (feed_back in output) command_etc = 'cat /etc/hosts' stdin, stdout, stderr = client.exec_command(command_etc, timeout=60) output_etc = stdout.read().decode('utf-8') client.close() assert (output_etc in output_etc)
def test_dhcp_hostname(ros_kvm_init, cloud_config_url): command = 'hostname' feed_back = 'rancher' kwargs = dict(cloud_config='{url}test_dncp_hostname.yml'.format(url=cloud_config_url), is_install_to_hard_drive=True) tuple_return = ros_kvm_init(**kwargs) client = tuple_return[0] (stdin, stdout, stderr) = client.exec_command(command, timeout=60) output = stdout.read().decode('utf-8') assert feed_back in output command_etc = 'cat /etc/hosts' (stdin, stdout, stderr) = client.exec_command(command_etc, timeout=60) output_etc = stdout.read().decode('utf-8') client.close() assert output_etc in output_etc
condition = 1 while condition < 10: print(condition) condition += 1 while True: print('santhosh')
condition = 1 while condition < 10: print(condition) condition += 1 while True: print('santhosh')
class ParsingError(Exception): pass class CastError(Exception): original_exception = None def __init__(self, exception): if isinstance(exception, Exception): message = str(exception) self.original_exception = exception else: message = str(exception) self.original_exception = None super().__init__(message)
class Parsingerror(Exception): pass class Casterror(Exception): original_exception = None def __init__(self, exception): if isinstance(exception, Exception): message = str(exception) self.original_exception = exception else: message = str(exception) self.original_exception = None super().__init__(message)
"""Python library for Lyapunov Estimation and Policy Augmentation (LEAP). controllers - All controller classes. examples - Example implementations, simulations, and plotting code. learning - Learning utilities. lyapunov_functions - All Lyapunov function classes. outputs - All output classes. systems - All system classes. """ name = 'lyapy'
"""Python library for Lyapunov Estimation and Policy Augmentation (LEAP). controllers - All controller classes. examples - Example implementations, simulations, and plotting code. learning - Learning utilities. lyapunov_functions - All Lyapunov function classes. outputs - All output classes. systems - All system classes. """ name = 'lyapy'
# dataset settings dataset_type = 'S3DISSegDataset' data_root = './data/s3dis/' class_names = ('ceiling', 'floor', 'wall', 'beam', 'column', 'window', 'door', 'table', 'chair', 'sofa', 'bookcase', 'board', 'clutter') num_points = 4096 train_area = [1, 2, 3, 4, 6] test_area = 5 train_pipeline = [ dict( type='LoadPointsFromFile', coord_type='DEPTH', shift_height=False, use_color=True, load_dim=6, use_dim=[0, 1, 2, 3, 4, 5]), dict( type='LoadAnnotations3D', with_bbox_3d=False, with_label_3d=False, with_mask_3d=False, with_seg_3d=True), dict( type='PointSegClassMapping', valid_cat_ids=tuple(range(len(class_names))), max_cat_id=13), dict( type='IndoorPatchPointSample', num_points=num_points, block_size=1.0, sample_rate=1.0, ignore_index=len(class_names), use_normalized_coord=True), dict(type='NormalizePointsColor', color_mean=None), dict(type='DefaultFormatBundle3D', class_names=class_names), dict(type='Collect3D', keys=['points', 'pts_semantic_mask']) ] test_pipeline = [ dict( type='LoadPointsFromFile', coord_type='DEPTH', shift_height=False, use_color=True, load_dim=6, use_dim=[0, 1, 2, 3, 4, 5]), dict(type='NormalizePointsColor', color_mean=None), dict( # a wrapper in order to successfully call test function # actually we don't perform test-time-aug type='MultiScaleFlipAug3D', img_scale=(1333, 800), pts_scale_ratio=1, flip=False, transforms=[ dict( type='GlobalRotScaleTrans', rot_range=[0, 0], scale_ratio_range=[1., 1.], translation_std=[0, 0, 0]), dict( type='RandomFlip3D', sync_2d=False, flip_ratio_bev_horizontal=0.0, flip_ratio_bev_vertical=0.0), dict( type='DefaultFormatBundle3D', class_names=class_names, with_label=False), dict(type='Collect3D', keys=['points']) ]) ] # construct a pipeline for data and gt loading in show function # please keep its loading function consistent with test_pipeline (e.g. client) # we need to load gt seg_mask! eval_pipeline = [ dict( type='LoadPointsFromFile', coord_type='DEPTH', shift_height=False, use_color=True, load_dim=6, use_dim=[0, 1, 2, 3, 4, 5]), dict( type='LoadAnnotations3D', with_bbox_3d=False, with_label_3d=False, with_mask_3d=False, with_seg_3d=True), dict( type='PointSegClassMapping', valid_cat_ids=tuple(range(len(class_names))), max_cat_id=13), dict( type='DefaultFormatBundle3D', with_label=False, class_names=class_names), dict(type='Collect3D', keys=['points', 'pts_semantic_mask']) ] data = dict( samples_per_gpu=8, workers_per_gpu=4, # train on area 1, 2, 3, 4, 6 # test on area 5 train=dict( type=dataset_type, data_root=data_root, ann_files=[ data_root + f's3dis_infos_Area_{i}.pkl' for i in train_area ], pipeline=train_pipeline, classes=class_names, test_mode=False, ignore_index=len(class_names), scene_idxs=[ data_root + f'seg_info/Area_{i}_resampled_scene_idxs.npy' for i in train_area ], label_weights=[ data_root + f'seg_info/Area_{i}_label_weight.npy' for i in train_area ]), val=dict( type=dataset_type, data_root=data_root, ann_files=data_root + f's3dis_infos_Area_{test_area}.pkl', pipeline=test_pipeline, classes=class_names, test_mode=True, ignore_index=len(class_names), scene_idxs=data_root + f'seg_info/Area_{test_area}_resampled_scene_idxs.npy'), test=dict( type=dataset_type, data_root=data_root, ann_files=data_root + f's3dis_infos_Area_{test_area}.pkl', pipeline=test_pipeline, classes=class_names, test_mode=True, ignore_index=len(class_names))) evaluation = dict(pipeline=eval_pipeline)
dataset_type = 'S3DISSegDataset' data_root = './data/s3dis/' class_names = ('ceiling', 'floor', 'wall', 'beam', 'column', 'window', 'door', 'table', 'chair', 'sofa', 'bookcase', 'board', 'clutter') num_points = 4096 train_area = [1, 2, 3, 4, 6] test_area = 5 train_pipeline = [dict(type='LoadPointsFromFile', coord_type='DEPTH', shift_height=False, use_color=True, load_dim=6, use_dim=[0, 1, 2, 3, 4, 5]), dict(type='LoadAnnotations3D', with_bbox_3d=False, with_label_3d=False, with_mask_3d=False, with_seg_3d=True), dict(type='PointSegClassMapping', valid_cat_ids=tuple(range(len(class_names))), max_cat_id=13), dict(type='IndoorPatchPointSample', num_points=num_points, block_size=1.0, sample_rate=1.0, ignore_index=len(class_names), use_normalized_coord=True), dict(type='NormalizePointsColor', color_mean=None), dict(type='DefaultFormatBundle3D', class_names=class_names), dict(type='Collect3D', keys=['points', 'pts_semantic_mask'])] test_pipeline = [dict(type='LoadPointsFromFile', coord_type='DEPTH', shift_height=False, use_color=True, load_dim=6, use_dim=[0, 1, 2, 3, 4, 5]), dict(type='NormalizePointsColor', color_mean=None), dict(type='MultiScaleFlipAug3D', img_scale=(1333, 800), pts_scale_ratio=1, flip=False, transforms=[dict(type='GlobalRotScaleTrans', rot_range=[0, 0], scale_ratio_range=[1.0, 1.0], translation_std=[0, 0, 0]), dict(type='RandomFlip3D', sync_2d=False, flip_ratio_bev_horizontal=0.0, flip_ratio_bev_vertical=0.0), dict(type='DefaultFormatBundle3D', class_names=class_names, with_label=False), dict(type='Collect3D', keys=['points'])])] eval_pipeline = [dict(type='LoadPointsFromFile', coord_type='DEPTH', shift_height=False, use_color=True, load_dim=6, use_dim=[0, 1, 2, 3, 4, 5]), dict(type='LoadAnnotations3D', with_bbox_3d=False, with_label_3d=False, with_mask_3d=False, with_seg_3d=True), dict(type='PointSegClassMapping', valid_cat_ids=tuple(range(len(class_names))), max_cat_id=13), dict(type='DefaultFormatBundle3D', with_label=False, class_names=class_names), dict(type='Collect3D', keys=['points', 'pts_semantic_mask'])] data = dict(samples_per_gpu=8, workers_per_gpu=4, train=dict(type=dataset_type, data_root=data_root, ann_files=[data_root + f's3dis_infos_Area_{i}.pkl' for i in train_area], pipeline=train_pipeline, classes=class_names, test_mode=False, ignore_index=len(class_names), scene_idxs=[data_root + f'seg_info/Area_{i}_resampled_scene_idxs.npy' for i in train_area], label_weights=[data_root + f'seg_info/Area_{i}_label_weight.npy' for i in train_area]), val=dict(type=dataset_type, data_root=data_root, ann_files=data_root + f's3dis_infos_Area_{test_area}.pkl', pipeline=test_pipeline, classes=class_names, test_mode=True, ignore_index=len(class_names), scene_idxs=data_root + f'seg_info/Area_{test_area}_resampled_scene_idxs.npy'), test=dict(type=dataset_type, data_root=data_root, ann_files=data_root + f's3dis_infos_Area_{test_area}.pkl', pipeline=test_pipeline, classes=class_names, test_mode=True, ignore_index=len(class_names))) evaluation = dict(pipeline=eval_pipeline)
# my_module.py is about the use of modules in python # I did random things that came to mind # makes use of the type function # returns the type as expected from the type function # # put the bracket around a sequence of numbers before you cast, # when you are looking for the type of the casted obj # that is, pass it as a tuple # sample: get_obj_type((1,2,3,4)), get_obj_type takes on positional argument def get_obj_type(obj): """ returns the type of an object """ return type(obj) # makes use of the len function # this works on any sequence i know off as at now # i changed the length of True to 1 and False to 0 # for numbers such as int and float # it returns the length of the number when casted # for the float the dot, "." is also counted def get_obj_len(obj): """ returns the length of an object """ number_types = [int, float] if get_obj_type(obj) in number_types: return len(str(obj)) elif get_obj_type(obj) == bool: return 1 if obj == True else 0 elif get_obj_type(obj) == type: return 0 else: return len(obj) # check if an object is a sequence (an iterable) def is_obj_sequence(obj): """ checks if an object is a sequence (an iterable) and returns a boolean\r\n """ sequence = [set, list, tuple, str, dict] return True if obj in sequence or get_obj_type(obj) in sequence else False # calls the above functions on the object def display_obj_stats(obj): """ makes call to get_obj_type, get_obj_len and is_obj_sequence, passes obj as argument and prints the result\r\n sample use case: \r\n display_obj_stats("python") -> arg: python type: < class 'str' > size: 6 sequential: True\r\n display_obj_stats("Afro circus") -> arg: Afro circus type: < class 'str' > size: 11 sequential: True """ print("arg:", obj, "type:", get_obj_type(obj), "size:", get_obj_len(obj), "sequential:", is_obj_sequence(obj)) # test cases as a module display_obj_stats(0) display_obj_stats(-3143) display_obj_stats(int()) display_obj_stats(int('123')) display_obj_stats(int) display_obj_stats(3.143) display_obj_stats("") display_obj_stats("python") display_obj_stats(True) display_obj_stats(False) display_obj_stats((1, 2, 3, 4)) display_obj_stats({1, 2, 2, 3, 4}) display_obj_stats(set) display_obj_stats(set((2, 3, 4))) display_obj_stats(list((2, 3, 4))) display_obj_stats(dict([('c', 0), ('python', 1), ('cotu', 2)])) # this part isn't working as i thought it would # i hope i get it later # if __name__ == "__main__": # from sys import argv # obj = argv[1] # print(get_obj_type(obj)) # print(get_obj_len(obj)) # print(is_obj_sequence(obj)) # from tier2.my_module import get_obj_type as _type, get_obj_len as _len, is_obj_sequence as _seq # my_module was in tier2 on my pc # from my_module import get_obj_type as _type, get_obj_len as _len, is_obj_sequence as _seq # if you have my_module in same directory as the command line # from path.to.my_module.my_module import get_obj_type as _type, get_obj_len as _len, is_obj_sequence as _seq # it will be better if a try and catch is added
def get_obj_type(obj): """ returns the type of an object """ return type(obj) def get_obj_len(obj): """ returns the length of an object """ number_types = [int, float] if get_obj_type(obj) in number_types: return len(str(obj)) elif get_obj_type(obj) == bool: return 1 if obj == True else 0 elif get_obj_type(obj) == type: return 0 else: return len(obj) def is_obj_sequence(obj): """ checks if an object is a sequence (an iterable) and returns a boolean\r """ sequence = [set, list, tuple, str, dict] return True if obj in sequence or get_obj_type(obj) in sequence else False def display_obj_stats(obj): """ makes call to get_obj_type, get_obj_len and is_obj_sequence, passes obj as argument and prints the result\r sample use case: \r display_obj_stats("python") -> arg: python type: < class 'str' > size: 6 sequential: True\r display_obj_stats("Afro circus") -> arg: Afro circus type: < class 'str' > size: 11 sequential: True """ print('arg:', obj, 'type:', get_obj_type(obj), 'size:', get_obj_len(obj), 'sequential:', is_obj_sequence(obj)) display_obj_stats(0) display_obj_stats(-3143) display_obj_stats(int()) display_obj_stats(int('123')) display_obj_stats(int) display_obj_stats(3.143) display_obj_stats('') display_obj_stats('python') display_obj_stats(True) display_obj_stats(False) display_obj_stats((1, 2, 3, 4)) display_obj_stats({1, 2, 2, 3, 4}) display_obj_stats(set) display_obj_stats(set((2, 3, 4))) display_obj_stats(list((2, 3, 4))) display_obj_stats(dict([('c', 0), ('python', 1), ('cotu', 2)]))
def wind_stress_curl(Tx, Ty, x, y): """Calculate the curl of wind stress (Tx, Ty). Args: Tx, Ty: Wind stress components (N/m^2), 3d x, y: Coordinates in lon, lat (degrees), 1d. Notes: Curl(Tx,Ty) = dTy/dx - dTx/dy The different constants come from oblateness of the ellipsoid. Ensure the coordinates follow tdim=0, ydim=1, xdim=2 """ dy = np.abs(y[1] - y[0]) # scalar in deg dx = np.abs(x[1] - x[0]) dy *= 110575. # scalar in m dx *= 111303. * np.cos(y * np.pi/180) # array in m (varies w/lat) dTxdy = np.gradient(Tx, dy, axis=1) # (N/m^3) dTydx = np.ndarray(Ty.shape) for i in range(len(y)): dTydx[:,i,:] = np.gradient(Ty[:,i,:], dx[i], axis=1) curl_tau = dTydx - dTxdy # (N/m^3) return curl_tau
def wind_stress_curl(Tx, Ty, x, y): """Calculate the curl of wind stress (Tx, Ty). Args: Tx, Ty: Wind stress components (N/m^2), 3d x, y: Coordinates in lon, lat (degrees), 1d. Notes: Curl(Tx,Ty) = dTy/dx - dTx/dy The different constants come from oblateness of the ellipsoid. Ensure the coordinates follow tdim=0, ydim=1, xdim=2 """ dy = np.abs(y[1] - y[0]) dx = np.abs(x[1] - x[0]) dy *= 110575.0 dx *= 111303.0 * np.cos(y * np.pi / 180) d_txdy = np.gradient(Tx, dy, axis=1) d_tydx = np.ndarray(Ty.shape) for i in range(len(y)): dTydx[:, i, :] = np.gradient(Ty[:, i, :], dx[i], axis=1) curl_tau = dTydx - dTxdy return curl_tau
p = int(input("Enter a number: ")) def expand_x_1(p): if p == 1: print('Neither composite nor prime') exit() elif p < 1 or (p - int(p)) != 0: print('Invalid Input') exit() coefficient = [1] for i in range(p): coefficient.append(coefficient[-1] * -(p - i) / (i + 1)) coefficients = coefficient[1: p] #print(coefficients) sum = 0 # Finding the sum of all the numbers in the coefficients for number in coefficients: int_value = int(number) abs_number = abs(int_value) #print(abs_number) sum += abs_number #print("Sum:",sum) if sum % p == 0: # checking whether the number is prime or not print("{} is a prime".format(p)) else: print("{} is not a prime".format(p)) expand_x_1(p)
p = int(input('Enter a number: ')) def expand_x_1(p): if p == 1: print('Neither composite nor prime') exit() elif p < 1 or p - int(p) != 0: print('Invalid Input') exit() coefficient = [1] for i in range(p): coefficient.append(coefficient[-1] * -(p - i) / (i + 1)) coefficients = coefficient[1:p] sum = 0 for number in coefficients: int_value = int(number) abs_number = abs(int_value) sum += abs_number if sum % p == 0: print('{} is a prime'.format(p)) else: print('{} is not a prime'.format(p)) expand_x_1(p)
class CFG: random_state = 42 shuffle = True test_size = 0.3 no_of_fold = 5 use_gpu = False
class Cfg: random_state = 42 shuffle = True test_size = 0.3 no_of_fold = 5 use_gpu = False
def extractJapmtlWordpressCom(item): ''' Parser for 'japmtl.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('one day, the engagement was suddenly cancelled. ......my little sister\'s.', 'one day, the engagement was suddenly cancelled. ......my little sister\'s.', 'translated'), ('villainess (?) and my engagement cancellation', 'villainess (?) and my engagement cancellation', 'translated'), ('beloved villain flips the skies', 'beloved villain flips the skies', 'translated'), ('slow life villainess doesn\'t notice the prince\'s fondness', 'slow life villainess doesn\'t notice the prince\'s fondness', 'translated'), ('is the villain not allowed to fall in love?', 'is the villain not allowed to fall in love?', 'translated'), ('PRC', 'PRC', 'translated'), ('Loiterous', 'Loiterous', 'oel'), ] for tagname, name, tl_type in tagmap: if tagname in item['tags']: return buildReleaseMessageWithType(item, name, vol, chp, frag=frag, postfix=postfix, tl_type=tl_type) return False
def extract_japmtl_wordpress_com(item): """ Parser for 'japmtl.wordpress.com' """ (vol, chp, frag, postfix) = extract_vol_chapter_fragment_postfix(item['title']) if not (chp or vol) or 'preview' in item['title'].lower(): return None tagmap = [("one day, the engagement was suddenly cancelled. ......my little sister's.", "one day, the engagement was suddenly cancelled. ......my little sister's.", 'translated'), ('villainess (?) and my engagement cancellation', 'villainess (?) and my engagement cancellation', 'translated'), ('beloved villain flips the skies', 'beloved villain flips the skies', 'translated'), ("slow life villainess doesn't notice the prince's fondness", "slow life villainess doesn't notice the prince's fondness", 'translated'), ('is the villain not allowed to fall in love?', 'is the villain not allowed to fall in love?', 'translated'), ('PRC', 'PRC', 'translated'), ('Loiterous', 'Loiterous', 'oel')] for (tagname, name, tl_type) in tagmap: if tagname in item['tags']: return build_release_message_with_type(item, name, vol, chp, frag=frag, postfix=postfix, tl_type=tl_type) return False
"""\ Imposer ======= Main promise class for use of barriers/shared states. """ class Imposer: def __init__(self, env): self.env = env return def resolve(self): """Notify the states are ready""" return def reject(self): """Notify its rejection with exceptions""" return def wait(self): """Block to wait for the returning states""" return def wait_for(self): """Wait but with a timeout""" return
"""Imposer ======= Main promise class for use of barriers/shared states. """ class Imposer: def __init__(self, env): self.env = env return def resolve(self): """Notify the states are ready""" return def reject(self): """Notify its rejection with exceptions""" return def wait(self): """Block to wait for the returning states""" return def wait_for(self): """Wait but with a timeout""" return
class DataGridViewCellPaintingEventArgs(HandledEventArgs): """ Provides data for the System.Windows.Forms.DataGridView.CellPainting event. DataGridViewCellPaintingEventArgs(dataGridView: DataGridView,graphics: Graphics,clipBounds: Rectangle,cellBounds: Rectangle,rowIndex: int,columnIndex: int,cellState: DataGridViewElementStates,value: object,formattedValue: object,errorText: str,cellStyle: DataGridViewCellStyle,advancedBorderStyle: DataGridViewAdvancedBorderStyle,paintParts: DataGridViewPaintParts) """ def Instance(self): """ This function has been arbitrarily put into the stubs""" return DataGridViewCellPaintingEventArgs() def Paint(self,clipBounds,paintParts): """ Paint(self: DataGridViewCellPaintingEventArgs,clipBounds: Rectangle,paintParts: DataGridViewPaintParts) Paints the specified parts of the cell for the area in the specified bounds. clipBounds: A System.Drawing.Rectangle that specifies the area of the System.Windows.Forms.DataGridView to be painted. paintParts: A bitwise combination of System.Windows.Forms.DataGridViewPaintParts values specifying the parts to paint. """ pass def PaintBackground(self,clipBounds,cellsPaintSelectionBackground): """ PaintBackground(self: DataGridViewCellPaintingEventArgs,clipBounds: Rectangle,cellsPaintSelectionBackground: bool) Paints the cell background for the area in the specified bounds. clipBounds: A System.Drawing.Rectangle that specifies the area of the System.Windows.Forms.DataGridView to be painted. cellsPaintSelectionBackground: true to paint the background of the specified bounds with the color of the System.Windows.Forms.DataGridViewCellStyle.SelectionBackColor property of the System.Windows.Forms.DataGridViewCell.InheritedStyle; false to paint the background of the specified bounds with the color of the System.Windows.Forms.DataGridViewCellStyle.BackColor property of the System.Windows.Forms.DataGridViewCell.InheritedStyle. """ pass def PaintContent(self,clipBounds): """ PaintContent(self: DataGridViewCellPaintingEventArgs,clipBounds: Rectangle) Paints the cell content for the area in the specified bounds. clipBounds: A System.Drawing.Rectangle that specifies the area of the System.Windows.Forms.DataGridView to be painted. """ pass @staticmethod def __new__(self,dataGridView,graphics,clipBounds,cellBounds,rowIndex,columnIndex,cellState,value,formattedValue,errorText,cellStyle,advancedBorderStyle,paintParts): """ __new__(cls: type,dataGridView: DataGridView,graphics: Graphics,clipBounds: Rectangle,cellBounds: Rectangle,rowIndex: int,columnIndex: int,cellState: DataGridViewElementStates,value: object,formattedValue: object,errorText: str,cellStyle: DataGridViewCellStyle,advancedBorderStyle: DataGridViewAdvancedBorderStyle,paintParts: DataGridViewPaintParts) """ pass AdvancedBorderStyle=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the border style of the current System.Windows.Forms.DataGridViewCell. Get: AdvancedBorderStyle(self: DataGridViewCellPaintingEventArgs) -> DataGridViewAdvancedBorderStyle """ CellBounds=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get the bounds of the current System.Windows.Forms.DataGridViewCell. Get: CellBounds(self: DataGridViewCellPaintingEventArgs) -> Rectangle """ CellStyle=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the cell style of the current System.Windows.Forms.DataGridViewCell. Get: CellStyle(self: DataGridViewCellPaintingEventArgs) -> DataGridViewCellStyle """ ClipBounds=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the area of the System.Windows.Forms.DataGridView that needs to be repainted. Get: ClipBounds(self: DataGridViewCellPaintingEventArgs) -> Rectangle """ ColumnIndex=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the column index of the current System.Windows.Forms.DataGridViewCell. Get: ColumnIndex(self: DataGridViewCellPaintingEventArgs) -> int """ ErrorText=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets a string that represents an error message for the current System.Windows.Forms.DataGridViewCell. Get: ErrorText(self: DataGridViewCellPaintingEventArgs) -> str """ FormattedValue=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the formatted value of the current System.Windows.Forms.DataGridViewCell. Get: FormattedValue(self: DataGridViewCellPaintingEventArgs) -> object """ Graphics=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the System.Drawing.Graphics used to paint the current System.Windows.Forms.DataGridViewCell. Get: Graphics(self: DataGridViewCellPaintingEventArgs) -> Graphics """ PaintParts=property(lambda self: object(),lambda self,v: None,lambda self: None) """The cell parts that are to be painted. Get: PaintParts(self: DataGridViewCellPaintingEventArgs) -> DataGridViewPaintParts """ RowIndex=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the row index of the current System.Windows.Forms.DataGridViewCell. Get: RowIndex(self: DataGridViewCellPaintingEventArgs) -> int """ State=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the state of the current System.Windows.Forms.DataGridViewCell. Get: State(self: DataGridViewCellPaintingEventArgs) -> DataGridViewElementStates """ Value=property(lambda self: object(),lambda self,v: None,lambda self: None) """Gets the value of the current System.Windows.Forms.DataGridViewCell. Get: Value(self: DataGridViewCellPaintingEventArgs) -> object """
class Datagridviewcellpaintingeventargs(HandledEventArgs): """ Provides data for the System.Windows.Forms.DataGridView.CellPainting event. DataGridViewCellPaintingEventArgs(dataGridView: DataGridView,graphics: Graphics,clipBounds: Rectangle,cellBounds: Rectangle,rowIndex: int,columnIndex: int,cellState: DataGridViewElementStates,value: object,formattedValue: object,errorText: str,cellStyle: DataGridViewCellStyle,advancedBorderStyle: DataGridViewAdvancedBorderStyle,paintParts: DataGridViewPaintParts) """ def instance(self): """ This function has been arbitrarily put into the stubs""" return data_grid_view_cell_painting_event_args() def paint(self, clipBounds, paintParts): """ Paint(self: DataGridViewCellPaintingEventArgs,clipBounds: Rectangle,paintParts: DataGridViewPaintParts) Paints the specified parts of the cell for the area in the specified bounds. clipBounds: A System.Drawing.Rectangle that specifies the area of the System.Windows.Forms.DataGridView to be painted. paintParts: A bitwise combination of System.Windows.Forms.DataGridViewPaintParts values specifying the parts to paint. """ pass def paint_background(self, clipBounds, cellsPaintSelectionBackground): """ PaintBackground(self: DataGridViewCellPaintingEventArgs,clipBounds: Rectangle,cellsPaintSelectionBackground: bool) Paints the cell background for the area in the specified bounds. clipBounds: A System.Drawing.Rectangle that specifies the area of the System.Windows.Forms.DataGridView to be painted. cellsPaintSelectionBackground: true to paint the background of the specified bounds with the color of the System.Windows.Forms.DataGridViewCellStyle.SelectionBackColor property of the System.Windows.Forms.DataGridViewCell.InheritedStyle; false to paint the background of the specified bounds with the color of the System.Windows.Forms.DataGridViewCellStyle.BackColor property of the System.Windows.Forms.DataGridViewCell.InheritedStyle. """ pass def paint_content(self, clipBounds): """ PaintContent(self: DataGridViewCellPaintingEventArgs,clipBounds: Rectangle) Paints the cell content for the area in the specified bounds. clipBounds: A System.Drawing.Rectangle that specifies the area of the System.Windows.Forms.DataGridView to be painted. """ pass @staticmethod def __new__(self, dataGridView, graphics, clipBounds, cellBounds, rowIndex, columnIndex, cellState, value, formattedValue, errorText, cellStyle, advancedBorderStyle, paintParts): """ __new__(cls: type,dataGridView: DataGridView,graphics: Graphics,clipBounds: Rectangle,cellBounds: Rectangle,rowIndex: int,columnIndex: int,cellState: DataGridViewElementStates,value: object,formattedValue: object,errorText: str,cellStyle: DataGridViewCellStyle,advancedBorderStyle: DataGridViewAdvancedBorderStyle,paintParts: DataGridViewPaintParts) """ pass advanced_border_style = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Gets the border style of the current System.Windows.Forms.DataGridViewCell.\n\n\n\nGet: AdvancedBorderStyle(self: DataGridViewCellPaintingEventArgs) -> DataGridViewAdvancedBorderStyle\n\n\n\n' cell_bounds = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Get the bounds of the current System.Windows.Forms.DataGridViewCell.\n\n\n\nGet: CellBounds(self: DataGridViewCellPaintingEventArgs) -> Rectangle\n\n\n\n' cell_style = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Gets the cell style of the current System.Windows.Forms.DataGridViewCell.\n\n\n\nGet: CellStyle(self: DataGridViewCellPaintingEventArgs) -> DataGridViewCellStyle\n\n\n\n' clip_bounds = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Gets the area of the System.Windows.Forms.DataGridView that needs to be repainted.\n\n\n\nGet: ClipBounds(self: DataGridViewCellPaintingEventArgs) -> Rectangle\n\n\n\n' column_index = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Gets the column index of the current System.Windows.Forms.DataGridViewCell.\n\n\n\nGet: ColumnIndex(self: DataGridViewCellPaintingEventArgs) -> int\n\n\n\n' error_text = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Gets a string that represents an error message for the current System.Windows.Forms.DataGridViewCell.\n\n\n\nGet: ErrorText(self: DataGridViewCellPaintingEventArgs) -> str\n\n\n\n' formatted_value = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Gets the formatted value of the current System.Windows.Forms.DataGridViewCell.\n\n\n\nGet: FormattedValue(self: DataGridViewCellPaintingEventArgs) -> object\n\n\n\n' graphics = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Gets the System.Drawing.Graphics used to paint the current System.Windows.Forms.DataGridViewCell.\n\n\n\nGet: Graphics(self: DataGridViewCellPaintingEventArgs) -> Graphics\n\n\n\n' paint_parts = property(lambda self: object(), lambda self, v: None, lambda self: None) 'The cell parts that are to be painted.\n\n\n\nGet: PaintParts(self: DataGridViewCellPaintingEventArgs) -> DataGridViewPaintParts\n\n\n\n' row_index = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Gets the row index of the current System.Windows.Forms.DataGridViewCell.\n\n\n\nGet: RowIndex(self: DataGridViewCellPaintingEventArgs) -> int\n\n\n\n' state = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Gets the state of the current System.Windows.Forms.DataGridViewCell.\n\n\n\nGet: State(self: DataGridViewCellPaintingEventArgs) -> DataGridViewElementStates\n\n\n\n' value = property(lambda self: object(), lambda self, v: None, lambda self: None) 'Gets the value of the current System.Windows.Forms.DataGridViewCell.\n\n\n\nGet: Value(self: DataGridViewCellPaintingEventArgs) -> object\n\n\n\n'
# # PySNMP MIB module HPN-ICF-DHCPR-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPN-ICF-DHCPR-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:25:26 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ConstraintsUnion") hpnicfRhw, = mibBuilder.importSymbols("HPN-ICF-OID-MIB", "hpnicfRhw") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") ObjectIdentity, Integer32, NotificationType, Unsigned32, Bits, ModuleIdentity, Gauge32, IpAddress, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, TimeTicks, MibIdentifier, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "Integer32", "NotificationType", "Unsigned32", "Bits", "ModuleIdentity", "Gauge32", "IpAddress", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "TimeTicks", "MibIdentifier", "Counter32") TextualConvention, DisplayString, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "RowStatus") hpnicfDHCPRelayMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1)) hpnicfDHCPRelayMib.setRevisions(('2003-02-12 00:00',)) if mibBuilder.loadTexts: hpnicfDHCPRelayMib.setLastUpdated('200303010000Z') if mibBuilder.loadTexts: hpnicfDHCPRelayMib.setOrganization('') hpnicfDHCPRelayMibObject = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1)) hpnicfDHCPRIPTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 1), ) if mibBuilder.loadTexts: hpnicfDHCPRIPTable.setStatus('current') hpnicfDHCPRIPEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "HPN-ICF-DHCPR-MIB", "hpnicfDHCPRIPAddr")) if mibBuilder.loadTexts: hpnicfDHCPRIPEntry.setStatus('current') hpnicfDHCPRIPAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 1, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRIPAddr.setStatus('current') hpnicfDHCPRIPRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 1, 1, 2), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hpnicfDHCPRIPRowStatus.setStatus('current') hpnicfDHCPRSeletAllocateModeTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 2), ) if mibBuilder.loadTexts: hpnicfDHCPRSeletAllocateModeTable.setStatus('current') hpnicfDHCPRSeletAllocateModeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: hpnicfDHCPRSeletAllocateModeEntry.setStatus('current') hpnicfDHCPRSelectAllocateMode = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("global", 0), ("interface", 1), ("relay", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfDHCPRSelectAllocateMode.setStatus('current') hpnicfDHCPRelayCycleStatus = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("on", 0), ("off", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfDHCPRelayCycleStatus.setStatus('current') hpnicfDHCPRRxBadPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRRxBadPktNum.setStatus('current') hpnicfDHCPRRxServerPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRRxServerPktNum.setStatus('current') hpnicfDHCPRTxServerPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRTxServerPktNum.setStatus('current') hpnicfDHCPRRxClientPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRRxClientPktNum.setStatus('current') hpnicfDHCPRTxClientPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRTxClientPktNum.setStatus('current') hpnicfDHCPRTxClientUniPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 9), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRTxClientUniPktNum.setStatus('current') hpnicfDHCPRTxClientBroPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRTxClientBroPktNum.setStatus('current') hpnicfDHCPRelayDiscoverPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRelayDiscoverPktNum.setStatus('current') hpnicfDHCPRelayRequestPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRelayRequestPktNum.setStatus('current') hpnicfDHCPRelayDeclinePktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRelayDeclinePktNum.setStatus('current') hpnicfDHCPRelayReleasePktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRelayReleasePktNum.setStatus('current') hpnicfDHCPRelayInformPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 15), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRelayInformPktNum.setStatus('current') hpnicfDHCPRelayOfferPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 16), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRelayOfferPktNum.setStatus('current') hpnicfDHCPRelayAckPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 17), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRelayAckPktNum.setStatus('current') hpnicfDHCPRelayNakPktNum = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 18), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hpnicfDHCPRelayNakPktNum.setStatus('current') hpnicfDHCPRelayStatisticsReset = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("invalid", 0), ("reset", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hpnicfDHCPRelayStatisticsReset.setStatus('current') hpnicfDHCPRelayMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 2)) hpnicfDHCPRelayMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 2, 1)) hpnicfDHCPRelayMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 2, 2)) hpnicfDHCPRelayMIBGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 2, 2, 1)).setObjects(("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRIPAddr"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRIPRowStatus"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRSelectAllocateMode"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRelayCycleStatus"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRRxBadPktNum"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRRxServerPktNum"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRTxServerPktNum"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRRxClientPktNum"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRTxClientPktNum"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRTxClientUniPktNum"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRTxClientBroPktNum"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRelayDiscoverPktNum"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRelayRequestPktNum"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRelayDeclinePktNum"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRelayReleasePktNum"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRelayInformPktNum"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRelayOfferPktNum"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRelayAckPktNum"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRelayNakPktNum"), ("HPN-ICF-DHCPR-MIB", "hpnicfDHCPRelayStatisticsReset")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpnicfDHCPRelayMIBGroup = hpnicfDHCPRelayMIBGroup.setStatus('current') mibBuilder.exportSymbols("HPN-ICF-DHCPR-MIB", hpnicfDHCPRIPEntry=hpnicfDHCPRIPEntry, hpnicfDHCPRelayMibObject=hpnicfDHCPRelayMibObject, hpnicfDHCPRelayMIBGroup=hpnicfDHCPRelayMIBGroup, hpnicfDHCPRelayMIBConformance=hpnicfDHCPRelayMIBConformance, hpnicfDHCPRRxServerPktNum=hpnicfDHCPRRxServerPktNum, hpnicfDHCPRelayMIBCompliances=hpnicfDHCPRelayMIBCompliances, hpnicfDHCPRelayDiscoverPktNum=hpnicfDHCPRelayDiscoverPktNum, hpnicfDHCPRIPAddr=hpnicfDHCPRIPAddr, PYSNMP_MODULE_ID=hpnicfDHCPRelayMib, hpnicfDHCPRelayAckPktNum=hpnicfDHCPRelayAckPktNum, hpnicfDHCPRRxClientPktNum=hpnicfDHCPRRxClientPktNum, hpnicfDHCPRSeletAllocateModeEntry=hpnicfDHCPRSeletAllocateModeEntry, hpnicfDHCPRelayRequestPktNum=hpnicfDHCPRelayRequestPktNum, hpnicfDHCPRelayMIBGroups=hpnicfDHCPRelayMIBGroups, hpnicfDHCPRelayReleasePktNum=hpnicfDHCPRelayReleasePktNum, hpnicfDHCPRSelectAllocateMode=hpnicfDHCPRSelectAllocateMode, hpnicfDHCPRIPRowStatus=hpnicfDHCPRIPRowStatus, hpnicfDHCPRelayOfferPktNum=hpnicfDHCPRelayOfferPktNum, hpnicfDHCPRTxServerPktNum=hpnicfDHCPRTxServerPktNum, hpnicfDHCPRelayDeclinePktNum=hpnicfDHCPRelayDeclinePktNum, hpnicfDHCPRIPTable=hpnicfDHCPRIPTable, hpnicfDHCPRTxClientBroPktNum=hpnicfDHCPRTxClientBroPktNum, hpnicfDHCPRelayCycleStatus=hpnicfDHCPRelayCycleStatus, hpnicfDHCPRRxBadPktNum=hpnicfDHCPRRxBadPktNum, hpnicfDHCPRelayInformPktNum=hpnicfDHCPRelayInformPktNum, hpnicfDHCPRelayNakPktNum=hpnicfDHCPRelayNakPktNum, hpnicfDHCPRelayMib=hpnicfDHCPRelayMib, hpnicfDHCPRelayStatisticsReset=hpnicfDHCPRelayStatisticsReset, hpnicfDHCPRSeletAllocateModeTable=hpnicfDHCPRSeletAllocateModeTable, hpnicfDHCPRTxClientUniPktNum=hpnicfDHCPRTxClientUniPktNum, hpnicfDHCPRTxClientPktNum=hpnicfDHCPRTxClientPktNum)
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, value_size_constraint, constraints_intersection, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint', 'ConstraintsUnion') (hpnicf_rhw,) = mibBuilder.importSymbols('HPN-ICF-OID-MIB', 'hpnicfRhw') (if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex') (module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup') (object_identity, integer32, notification_type, unsigned32, bits, module_identity, gauge32, ip_address, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64, time_ticks, mib_identifier, counter32) = mibBuilder.importSymbols('SNMPv2-SMI', 'ObjectIdentity', 'Integer32', 'NotificationType', 'Unsigned32', 'Bits', 'ModuleIdentity', 'Gauge32', 'IpAddress', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64', 'TimeTicks', 'MibIdentifier', 'Counter32') (textual_convention, display_string, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString', 'RowStatus') hpnicf_dhcp_relay_mib = module_identity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1)) hpnicfDHCPRelayMib.setRevisions(('2003-02-12 00:00',)) if mibBuilder.loadTexts: hpnicfDHCPRelayMib.setLastUpdated('200303010000Z') if mibBuilder.loadTexts: hpnicfDHCPRelayMib.setOrganization('') hpnicf_dhcp_relay_mib_object = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1)) hpnicf_dhcprip_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 1)) if mibBuilder.loadTexts: hpnicfDHCPRIPTable.setStatus('current') hpnicf_dhcprip_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRIPAddr')) if mibBuilder.loadTexts: hpnicfDHCPRIPEntry.setStatus('current') hpnicf_dhcprip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 1, 1, 1), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRIPAddr.setStatus('current') hpnicf_dhcprip_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 1, 1, 2), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: hpnicfDHCPRIPRowStatus.setStatus('current') hpnicf_dhcpr_selet_allocate_mode_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 2)) if mibBuilder.loadTexts: hpnicfDHCPRSeletAllocateModeTable.setStatus('current') hpnicf_dhcpr_selet_allocate_mode_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex')) if mibBuilder.loadTexts: hpnicfDHCPRSeletAllocateModeEntry.setStatus('current') hpnicf_dhcpr_select_allocate_mode = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('global', 0), ('interface', 1), ('relay', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfDHCPRSelectAllocateMode.setStatus('current') hpnicf_dhcp_relay_cycle_status = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('on', 0), ('off', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfDHCPRelayCycleStatus.setStatus('current') hpnicf_dhcpr_rx_bad_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRRxBadPktNum.setStatus('current') hpnicf_dhcpr_rx_server_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRRxServerPktNum.setStatus('current') hpnicf_dhcpr_tx_server_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRTxServerPktNum.setStatus('current') hpnicf_dhcpr_rx_client_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRRxClientPktNum.setStatus('current') hpnicf_dhcpr_tx_client_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRTxClientPktNum.setStatus('current') hpnicf_dhcpr_tx_client_uni_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 9), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRTxClientUniPktNum.setStatus('current') hpnicf_dhcpr_tx_client_bro_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 10), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRTxClientBroPktNum.setStatus('current') hpnicf_dhcp_relay_discover_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 11), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRelayDiscoverPktNum.setStatus('current') hpnicf_dhcp_relay_request_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 12), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRelayRequestPktNum.setStatus('current') hpnicf_dhcp_relay_decline_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 13), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRelayDeclinePktNum.setStatus('current') hpnicf_dhcp_relay_release_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 14), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRelayReleasePktNum.setStatus('current') hpnicf_dhcp_relay_inform_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 15), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRelayInformPktNum.setStatus('current') hpnicf_dhcp_relay_offer_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 16), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRelayOfferPktNum.setStatus('current') hpnicf_dhcp_relay_ack_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 17), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRelayAckPktNum.setStatus('current') hpnicf_dhcp_relay_nak_pkt_num = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 18), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: hpnicfDHCPRelayNakPktNum.setStatus('current') hpnicf_dhcp_relay_statistics_reset = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('invalid', 0), ('reset', 1)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: hpnicfDHCPRelayStatisticsReset.setStatus('current') hpnicf_dhcp_relay_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 2)) hpnicf_dhcp_relay_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 2, 1)) hpnicf_dhcp_relay_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 2, 2)) hpnicf_dhcp_relay_mib_group = object_group((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 1, 2, 2, 1)).setObjects(('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRIPAddr'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRIPRowStatus'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRSelectAllocateMode'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRelayCycleStatus'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRRxBadPktNum'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRRxServerPktNum'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRTxServerPktNum'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRRxClientPktNum'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRTxClientPktNum'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRTxClientUniPktNum'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRTxClientBroPktNum'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRelayDiscoverPktNum'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRelayRequestPktNum'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRelayDeclinePktNum'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRelayReleasePktNum'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRelayInformPktNum'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRelayOfferPktNum'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRelayAckPktNum'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRelayNakPktNum'), ('HPN-ICF-DHCPR-MIB', 'hpnicfDHCPRelayStatisticsReset')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hpnicf_dhcp_relay_mib_group = hpnicfDHCPRelayMIBGroup.setStatus('current') mibBuilder.exportSymbols('HPN-ICF-DHCPR-MIB', hpnicfDHCPRIPEntry=hpnicfDHCPRIPEntry, hpnicfDHCPRelayMibObject=hpnicfDHCPRelayMibObject, hpnicfDHCPRelayMIBGroup=hpnicfDHCPRelayMIBGroup, hpnicfDHCPRelayMIBConformance=hpnicfDHCPRelayMIBConformance, hpnicfDHCPRRxServerPktNum=hpnicfDHCPRRxServerPktNum, hpnicfDHCPRelayMIBCompliances=hpnicfDHCPRelayMIBCompliances, hpnicfDHCPRelayDiscoverPktNum=hpnicfDHCPRelayDiscoverPktNum, hpnicfDHCPRIPAddr=hpnicfDHCPRIPAddr, PYSNMP_MODULE_ID=hpnicfDHCPRelayMib, hpnicfDHCPRelayAckPktNum=hpnicfDHCPRelayAckPktNum, hpnicfDHCPRRxClientPktNum=hpnicfDHCPRRxClientPktNum, hpnicfDHCPRSeletAllocateModeEntry=hpnicfDHCPRSeletAllocateModeEntry, hpnicfDHCPRelayRequestPktNum=hpnicfDHCPRelayRequestPktNum, hpnicfDHCPRelayMIBGroups=hpnicfDHCPRelayMIBGroups, hpnicfDHCPRelayReleasePktNum=hpnicfDHCPRelayReleasePktNum, hpnicfDHCPRSelectAllocateMode=hpnicfDHCPRSelectAllocateMode, hpnicfDHCPRIPRowStatus=hpnicfDHCPRIPRowStatus, hpnicfDHCPRelayOfferPktNum=hpnicfDHCPRelayOfferPktNum, hpnicfDHCPRTxServerPktNum=hpnicfDHCPRTxServerPktNum, hpnicfDHCPRelayDeclinePktNum=hpnicfDHCPRelayDeclinePktNum, hpnicfDHCPRIPTable=hpnicfDHCPRIPTable, hpnicfDHCPRTxClientBroPktNum=hpnicfDHCPRTxClientBroPktNum, hpnicfDHCPRelayCycleStatus=hpnicfDHCPRelayCycleStatus, hpnicfDHCPRRxBadPktNum=hpnicfDHCPRRxBadPktNum, hpnicfDHCPRelayInformPktNum=hpnicfDHCPRelayInformPktNum, hpnicfDHCPRelayNakPktNum=hpnicfDHCPRelayNakPktNum, hpnicfDHCPRelayMib=hpnicfDHCPRelayMib, hpnicfDHCPRelayStatisticsReset=hpnicfDHCPRelayStatisticsReset, hpnicfDHCPRSeletAllocateModeTable=hpnicfDHCPRSeletAllocateModeTable, hpnicfDHCPRTxClientUniPktNum=hpnicfDHCPRTxClientUniPktNum, hpnicfDHCPRTxClientPktNum=hpnicfDHCPRTxClientPktNum)
def sort_contacts(contacts): newcontacts=[] keys = contacts.keys() for key in sorted(keys): data = (key, contacts[key][0], contacts[key][1]) newcontacts.append(data) return newcontacts contacts = input("Please input the contacts.") print(sort_contacts(contacts))
def sort_contacts(contacts): newcontacts = [] keys = contacts.keys() for key in sorted(keys): data = (key, contacts[key][0], contacts[key][1]) newcontacts.append(data) return newcontacts contacts = input('Please input the contacts.') print(sort_contacts(contacts))
color = input("Enter a color: ") plural_noun = input("Enter a plural noun: ") celebrity = input("Enter the name of a Celebrity: ") print("Roses are " + color) print(plural_noun + " are blue") print("I love " + celebrity) ## Mad Lib 1 date = input("Enter a date: ") full_name = input("Enter a full name: ") a_place = input("Enter the name of a place: ") class_noun = input("Enter a class subject: ") signature = input("Enter a signature: ") print("Date: " + date) print(full_name + " is authorized"), print("to be at " + a_place) print("instead of " + class_noun), print("class.") print("SIGNED: " + signature) ## Mad Lib 2 noun = input("Enter a noun: ") object = input("Enter an object: ") food = input("Enter your least favorite food: ") bad_things = input("Enter the funniest thing that comes to mind: ") verb = input("Enter a verb: ") print(" We Are The Champions") print("I've taken my " + noun + " out.") print("And my " + object + " calls") print("You brought me " + food + " and " + bad_things + " and everything that comes with it") print("I " + verb + " you all.") ## Mad Lib 3 adjective = input("Enter an adjective: ") object = input("Enter an object: ") imaginary_friend = input("Enter the name of an imaginary friend: ") adjective = input("Enter another adjective: ") verb = input("Enter a verb: ") print(" Under The Bridge") print("Sometimes I feel like " + adjective ) print("I don't have a " + object ) print("Sometimes I feel like my only friend is " + imaginary_friend ) print("The " + adjective + " city ") print("Lonely as I am, together we " + verb ) ## Mad Lib 4 adjective = input("Enter an adjective: ") adjective = input("Enter another adjective: ") noun = input("Enter a noun: ") noun = input("Enter another noun: ") plural_noun = input("Enter a plural noun: ") game = input("Enter a game: ") plural_noun = input("Enter another plural noun: ") verb = input("Enter a verb ending in 'ing': ") verb = input("Enter another verb ending in 'ing': ") plural_noun = input("Enter another plural noun: ") verb = input("Enter another verb ending in 'ing': ") noun = input("Enter another noun: ") plant = input("Enter a plant; ") body_part = input("Enter a part of the body: ") place = input("Enter a place: ") verb = input("Enter another verb ending in 'ing': ") adjective = input("Enter another adjective: ") number = input("Enter a number <100: ") plural_noun = input("Enter another plural noun: ") print("A vacation is when you take a trip to some " + adjective + " place"), print(" with you " + adjective + " family.") print("Usually you go to some place thatis near a/an " + noun ), print(" or up on a/an " + noun + ".") print("A good vacation place is one where you can ride " + plural_noun ), print(" or play " + game + " or go hunting for " + plural_noun + ".") print("I like to spend my time " + verb + " or " + verb + ".") print("When parents go on a vacation, they spend their time eating three " + plural_noun + " a day,") print(" and fathers play golf, and mothers sit around " + verb + ".") print("Last summer, my little brother fell in a/an " + noun + " and got poison " + plant ), print(" all over his " + body_part + ".") print("My family is going to go to (the) " + place + ", and I will practice " + verb + ".") print("Parents need vacations more than kids because parents are always very " + adjective + " and because they have to work " + number + " hours every day all year making enough " + plural_noun + " to pay for the vacation.") ## Mad Lib 5 name = input("Enter your name: ") date = input("Enter a date: ") adjective = input("Enter an adjective: ") noun = input("Enter a noun: ") verb = input("Enter a verb in past tense: ") adverb = input("Enter an adverb: ") adjective = input("Enter another adjective: ") noun = input("Enter another noun: ") noun = input("Enter another noun: ") adjective = input("Enter another adjective: ") verb = input("Enter a verb: ") adverb = input("Enter another adverb: ") verb = input("Enter another verb in past tense: ") adjective = input("Enter another adjective: ") print("Name: " + name + " Date: " + date ) print("Today I went to the zoo. I saw a " + adjective + " " + noun + " jumping up and down in its tree.") print("He " + verb + " " + adverb + " through the large tunnel that led to its " + adjective + " " + noun + ".") print("I got some peanuts and passed them through the cage to a gigantic gray " + noun + " towering above my head.") print("Feeding the animals made me hungry. I went to get a " + adjective + " scoop of ice cream. It filled my stomach.") print("Afterwards I had to " + verb + " " + adverb + " to catch our bus.") print("When I got home I " + verb + " my mom for a " + adjective + " day at the zoo.") ## Mad Lib 6 adjective = input("Enter an adjective: ") adjective = input("Enter another adjective: ") noun = input("Enter a noun: ") verb = input("Enter a verb in singular present form: ") fruit = input("Enter a fruit: ") noun = input("Enter another noun: ") fruit = input("Enter another fruit: ") object = input("Enter an object: ") animal = input("Enter an animal: ") adjective = input("Enter another adjective: ") plural_noun = input("Enter a plural noun: ") print(" The Rose Family") print("The rose is a " + adjective + ",") print("And was always a " + adjective + ".") print("But the " + noun + " now " + verb ) print("That the " + fruit + " is a " + noun + ",") print("And the " + fruit + " is, and so is ") print("The " + object + ", I suppose.") print("The " + animal + " only knows") print("What will next prove a rose " + adjective + ".") print(plural_noun + " , of course, are a rose -") print("But were always a rose.") ## Mad Lib 7 name = input("Enter a name: ") date = input("Enter a date: ") plural_noun = input("Enter a plural noun: ") plural_noun = input("Enter another plural noun: ") verb = input("Enter a verb: ") celebrity = ("Enter the name of a celebrity: ") noun = input("Enter a noun: ") ing = input("Enter a verb ending in 'ing': ") plural_noun = input("Enter another plural noun: ") noun = input("Enter another noun: ") plural_noun = input("Enter another plural noun: ") print("Name: " + name) print("Date: " + date) print(" At The Arcade!") print("When I go to the arcade with my " + plural_noun + " there are lots of games to play.") print("I spend lots of time there with my friends. In 'Xmen' you can be different " + plural_noun + ".") print("The point of the game is to " + verb + " every robot.") print("You also need to save people, and then you can go to the next level. In 'Star Wars' you are " + celebrity + " and you try to destroy every " + noun + ".") print("In a car racing / motorcycle racing game you need to beat every computerized vehicle that you are " + ing + " against.") print("There are a whole lot of other cool games. When you play some games you win " + plural_noun + " for certain scores.") print("Once you're done you can cash in your tickets to get a big " + noun + ".") print("You can save your " + plural_noun + " for another time.") print("When I went to this arcade I didn't believe how much fun it would be. You might annoy your parents by asking them over and over if you can go back to there. So far I have had a lot of fun every time I've been to this great arcade!") ## Mad Lib 8 name = input("Enter your name: ") date = input("Enter a date: ") last_name = input("Enter a last name: ") noun = input("Enter a noun: ") letter = input("Enter a letter: ") noun = input("Enter a 3 letter noun: ") letter = input("Enter another letter: ") noun = input("Enter another 3 letter noun: ") noun = input("Enter a noun: ") plural_noun = input("Enter a plural noun: ") letter = input("Enter another letter: ") noun = input("Enter another 3 letter noun: ") letter = input("Enter another letter: ") noun = input("Enter another 3 letter noun: ") sound = input("Enter a sound: ") sound = input("Enter a sound: ") sound = input("Enter a sound: ") sound = input("Enter a sound: ") sound = input("Enter a sound: ") sound = input("Enter a sound: ") letter = input("Enter another letter: ") noun = input("Enter another 3 letter noun: ") letter = input("Enter another letter: ") noun = input("Enter another 3 letter noun: ") print("Name: " + name ) print("Date: " + date ) print( "Big Mac Who?") print("Big Mc " + last_name + " had a " + noun + ",") print(letter + "- " + noun + ", " + letter + "- " + noun + " O.") print("On this " + noun + " he had some " + plural_noun + ", " + letter + " -3 " + noun + ", " + letter + "- " + noun + " O.") print("With a " + sound + ", " + sound + " here, and a " + sound + " " + sound + " there, everywhere a " + sound + "- " + sound + " " + letter + "- " + noun + ", " + letter + "- " + noun + " O.") ## Mad Lib 9 object = input("Enter an object: ") adjective = input("Enter an adjective: ") adjective = input("Enter another adjective: ") place = input("Enter a place: ") hobby = input("Enter a hobby: ") president = input("Enter the name of a president: ") food = input("Enter your fav food: ") print("Send up a signal throw me a/an " + object ) print("It might not be " + adjective + " but it sure ain't " + adjective ) print("I'm one step from " + place + " and two steps behind") print("I picked up " + hobby + " I called " + president + " who said " + food + " was the new national meal") ## Mad Lib 10 print(" Life In Technicolor") adjective = input("Enter an adjective: ") verb = input("Enter a verb in ing form: ") thing = input("Enter an interesting happening: ") celebrity = input("Enter a celebrity: ") adjective = input("Enter an adjective: ") print("There's a " + adjective + " wind blowing") print("Every night there, the headlights are " + verb ) print("There's a " + thing + " coming") print("On the radio I heard " + celebrity + " talking about their pet's addiction to snickers") print("Baby, it's a " + adjective + " world")
color = input('Enter a color: ') plural_noun = input('Enter a plural noun: ') celebrity = input('Enter the name of a Celebrity: ') print('Roses are ' + color) print(plural_noun + ' are blue') print('I love ' + celebrity) date = input('Enter a date: ') full_name = input('Enter a full name: ') a_place = input('Enter the name of a place: ') class_noun = input('Enter a class subject: ') signature = input('Enter a signature: ') print('Date: ' + date) (print(full_name + ' is authorized'),) print('to be at ' + a_place) (print('instead of ' + class_noun),) print('class.') print('SIGNED: ' + signature) noun = input('Enter a noun: ') object = input('Enter an object: ') food = input('Enter your least favorite food: ') bad_things = input('Enter the funniest thing that comes to mind: ') verb = input('Enter a verb: ') print(' We Are The Champions') print("I've taken my " + noun + ' out.') print('And my ' + object + ' calls') print('You brought me ' + food + ' and ' + bad_things + ' and everything that comes with it') print('I ' + verb + ' you all.') adjective = input('Enter an adjective: ') object = input('Enter an object: ') imaginary_friend = input('Enter the name of an imaginary friend: ') adjective = input('Enter another adjective: ') verb = input('Enter a verb: ') print(' Under The Bridge') print('Sometimes I feel like ' + adjective) print("I don't have a " + object) print('Sometimes I feel like my only friend is ' + imaginary_friend) print('The ' + adjective + ' city ') print('Lonely as I am, together we ' + verb) adjective = input('Enter an adjective: ') adjective = input('Enter another adjective: ') noun = input('Enter a noun: ') noun = input('Enter another noun: ') plural_noun = input('Enter a plural noun: ') game = input('Enter a game: ') plural_noun = input('Enter another plural noun: ') verb = input("Enter a verb ending in 'ing': ") verb = input("Enter another verb ending in 'ing': ") plural_noun = input('Enter another plural noun: ') verb = input("Enter another verb ending in 'ing': ") noun = input('Enter another noun: ') plant = input('Enter a plant; ') body_part = input('Enter a part of the body: ') place = input('Enter a place: ') verb = input("Enter another verb ending in 'ing': ") adjective = input('Enter another adjective: ') number = input('Enter a number <100: ') plural_noun = input('Enter another plural noun: ') (print('A vacation is when you take a trip to some ' + adjective + ' place'),) print(' with you ' + adjective + ' family.') (print('Usually you go to some place thatis near a/an ' + noun),) print(' or up on a/an ' + noun + '.') (print('A good vacation place is one where you can ride ' + plural_noun),) print(' or play ' + game + ' or go hunting for ' + plural_noun + '.') print('I like to spend my time ' + verb + ' or ' + verb + '.') print('When parents go on a vacation, they spend their time eating three ' + plural_noun + ' a day,') print(' and fathers play golf, and mothers sit around ' + verb + '.') (print('Last summer, my little brother fell in a/an ' + noun + ' and got poison ' + plant),) print(' all over his ' + body_part + '.') print('My family is going to go to (the) ' + place + ', and I will practice ' + verb + '.') print('Parents need vacations more than kids because parents are always very ' + adjective + ' and because they have to work ' + number + ' hours every day all year making enough ' + plural_noun + ' to pay for the vacation.') name = input('Enter your name: ') date = input('Enter a date: ') adjective = input('Enter an adjective: ') noun = input('Enter a noun: ') verb = input('Enter a verb in past tense: ') adverb = input('Enter an adverb: ') adjective = input('Enter another adjective: ') noun = input('Enter another noun: ') noun = input('Enter another noun: ') adjective = input('Enter another adjective: ') verb = input('Enter a verb: ') adverb = input('Enter another adverb: ') verb = input('Enter another verb in past tense: ') adjective = input('Enter another adjective: ') print('Name: ' + name + ' Date: ' + date) print('Today I went to the zoo. I saw a ' + adjective + ' ' + noun + ' jumping up and down in its tree.') print('He ' + verb + ' ' + adverb + ' through the large tunnel that led to its ' + adjective + ' ' + noun + '.') print('I got some peanuts and passed them through the cage to a gigantic gray ' + noun + ' towering above my head.') print('Feeding the animals made me hungry. I went to get a ' + adjective + ' scoop of ice cream. It filled my stomach.') print('Afterwards I had to ' + verb + ' ' + adverb + ' to catch our bus.') print('When I got home I ' + verb + ' my mom for a ' + adjective + ' day at the zoo.') adjective = input('Enter an adjective: ') adjective = input('Enter another adjective: ') noun = input('Enter a noun: ') verb = input('Enter a verb in singular present form: ') fruit = input('Enter a fruit: ') noun = input('Enter another noun: ') fruit = input('Enter another fruit: ') object = input('Enter an object: ') animal = input('Enter an animal: ') adjective = input('Enter another adjective: ') plural_noun = input('Enter a plural noun: ') print(' The Rose Family') print('The rose is a ' + adjective + ',') print('And was always a ' + adjective + '.') print('But the ' + noun + ' now ' + verb) print('That the ' + fruit + ' is a ' + noun + ',') print('And the ' + fruit + ' is, and so is ') print('The ' + object + ', I suppose.') print('The ' + animal + ' only knows') print('What will next prove a rose ' + adjective + '.') print(plural_noun + ' , of course, are a rose -') print('But were always a rose.') name = input('Enter a name: ') date = input('Enter a date: ') plural_noun = input('Enter a plural noun: ') plural_noun = input('Enter another plural noun: ') verb = input('Enter a verb: ') celebrity = 'Enter the name of a celebrity: ' noun = input('Enter a noun: ') ing = input("Enter a verb ending in 'ing': ") plural_noun = input('Enter another plural noun: ') noun = input('Enter another noun: ') plural_noun = input('Enter another plural noun: ') print('Name: ' + name) print('Date: ' + date) print(' At The Arcade!') print('When I go to the arcade with my ' + plural_noun + ' there are lots of games to play.') print("I spend lots of time there with my friends. In 'Xmen' you can be different " + plural_noun + '.') print('The point of the game is to ' + verb + ' every robot.') print("You also need to save people, and then you can go to the next level. In 'Star Wars' you are " + celebrity + ' and you try to destroy every ' + noun + '.') print('In a car racing / motorcycle racing game you need to beat every computerized vehicle that you are ' + ing + ' against.') print('There are a whole lot of other cool games. When you play some games you win ' + plural_noun + ' for certain scores.') print("Once you're done you can cash in your tickets to get a big " + noun + '.') print('You can save your ' + plural_noun + ' for another time.') print("When I went to this arcade I didn't believe how much fun it would be. You might annoy your parents by asking them over and over if you can go back to there. So far I have had a lot of fun every time I've been to this great arcade!") name = input('Enter your name: ') date = input('Enter a date: ') last_name = input('Enter a last name: ') noun = input('Enter a noun: ') letter = input('Enter a letter: ') noun = input('Enter a 3 letter noun: ') letter = input('Enter another letter: ') noun = input('Enter another 3 letter noun: ') noun = input('Enter a noun: ') plural_noun = input('Enter a plural noun: ') letter = input('Enter another letter: ') noun = input('Enter another 3 letter noun: ') letter = input('Enter another letter: ') noun = input('Enter another 3 letter noun: ') sound = input('Enter a sound: ') sound = input('Enter a sound: ') sound = input('Enter a sound: ') sound = input('Enter a sound: ') sound = input('Enter a sound: ') sound = input('Enter a sound: ') letter = input('Enter another letter: ') noun = input('Enter another 3 letter noun: ') letter = input('Enter another letter: ') noun = input('Enter another 3 letter noun: ') print('Name: ' + name) print('Date: ' + date) print('Big Mac Who?') print('Big Mc ' + last_name + ' had a ' + noun + ',') print(letter + '- ' + noun + ', ' + letter + '- ' + noun + ' O.') print('On this ' + noun + ' he had some ' + plural_noun + ', ' + letter + ' -3 ' + noun + ', ' + letter + '- ' + noun + ' O.') print('With a ' + sound + ', ' + sound + ' here, and a ' + sound + ' ' + sound + ' there, everywhere a ' + sound + '- ' + sound + ' ' + letter + '- ' + noun + ', ' + letter + '- ' + noun + ' O.') object = input('Enter an object: ') adjective = input('Enter an adjective: ') adjective = input('Enter another adjective: ') place = input('Enter a place: ') hobby = input('Enter a hobby: ') president = input('Enter the name of a president: ') food = input('Enter your fav food: ') print('Send up a signal throw me a/an ' + object) print('It might not be ' + adjective + " but it sure ain't " + adjective) print("I'm one step from " + place + ' and two steps behind') print('I picked up ' + hobby + ' I called ' + president + ' who said ' + food + ' was the new national meal') print(' Life In Technicolor') adjective = input('Enter an adjective: ') verb = input('Enter a verb in ing form: ') thing = input('Enter an interesting happening: ') celebrity = input('Enter a celebrity: ') adjective = input('Enter an adjective: ') print("There's a " + adjective + ' wind blowing') print('Every night there, the headlights are ' + verb) print("There's a " + thing + ' coming') print('On the radio I heard ' + celebrity + " talking about their pet's addiction to snickers") print("Baby, it's a " + adjective + ' world')
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'flapper_version_h_file%': 'flapper_version.h', 'flapper_binary_files%': [], 'conditions': [ [ 'branding == "Chrome"', { 'conditions': [ [ 'OS == "linux" and target_arch == "ia32"', { 'flapper_version_h_file%': 'symbols/ppapi/linux/flapper_version.h', 'flapper_binary_files%': [ 'binaries/ppapi/linux/libpepflashplayer.so', 'binaries/ppapi/linux/manifest.json', ], }], [ 'OS == "linux" and target_arch == "x64"', { 'flapper_version_h_file%': 'symbols/ppapi/linux_x64/flapper_version.h', 'flapper_binary_files%': [ 'binaries/ppapi/linux_x64/libpepflashplayer.so', 'binaries/ppapi/linux_x64/manifest.json', ], }], [ 'OS == "mac" and target_arch == "ia32"', { 'flapper_version_h_file%': 'symbols/ppapi/mac/flapper_version.h', 'flapper_binary_files%': [ 'binaries/ppapi/mac/PepperFlashPlayer.plugin', 'binaries/ppapi/mac/manifest.json', ], }], [ 'OS == "mac" and target_arch == "x64"', { 'flapper_version_h_file%': 'symbols/ppapi/mac_64/flapper_version.h', 'flapper_binary_files%': [ 'binaries/ppapi/mac_64/PepperFlashPlayer.plugin', 'binaries/ppapi/mac_64/manifest.json', ], }], [ 'OS == "win" and target_arch == "ia32"', { 'flapper_version_h_file%': 'symbols/ppapi/win/flapper_version.h', 'flapper_binary_files%': [ 'binaries/ppapi/win/pepflashplayer.dll', 'binaries/ppapi/win/manifest.json', ], }], [ 'OS == "win" and target_arch == "x64"', { 'flapper_version_h_file%': 'symbols/ppapi/win_x64/flapper_version.h', 'flapper_binary_files%': [ 'binaries/ppapi/win_x64/pepflashplayer.dll', 'binaries/ppapi/win_x64/manifest.json', ], }], ], }], ], }, # Always provide a target, so we can put the logic about whether there's # anything to be done in this file (instead of a higher-level .gyp file). 'targets': [ { # GN version: //third_party/adobe/flash:flapper_version_h 'target_name': 'flapper_version_h', 'type': 'none', 'copies': [{ 'destination': '<(SHARED_INTERMEDIATE_DIR)', 'files': [ '<(flapper_version_h_file)' ], }], }, { # GN version: //third_party/adobe/flash:flapper_binaries 'target_name': 'flapper_binaries', 'type': 'none', 'copies': [{ 'destination': '<(PRODUCT_DIR)/PepperFlash', 'files': [ '<@(flapper_binary_files)' ], }], }, ], }
{'variables': {'flapper_version_h_file%': 'flapper_version.h', 'flapper_binary_files%': [], 'conditions': [['branding == "Chrome"', {'conditions': [['OS == "linux" and target_arch == "ia32"', {'flapper_version_h_file%': 'symbols/ppapi/linux/flapper_version.h', 'flapper_binary_files%': ['binaries/ppapi/linux/libpepflashplayer.so', 'binaries/ppapi/linux/manifest.json']}], ['OS == "linux" and target_arch == "x64"', {'flapper_version_h_file%': 'symbols/ppapi/linux_x64/flapper_version.h', 'flapper_binary_files%': ['binaries/ppapi/linux_x64/libpepflashplayer.so', 'binaries/ppapi/linux_x64/manifest.json']}], ['OS == "mac" and target_arch == "ia32"', {'flapper_version_h_file%': 'symbols/ppapi/mac/flapper_version.h', 'flapper_binary_files%': ['binaries/ppapi/mac/PepperFlashPlayer.plugin', 'binaries/ppapi/mac/manifest.json']}], ['OS == "mac" and target_arch == "x64"', {'flapper_version_h_file%': 'symbols/ppapi/mac_64/flapper_version.h', 'flapper_binary_files%': ['binaries/ppapi/mac_64/PepperFlashPlayer.plugin', 'binaries/ppapi/mac_64/manifest.json']}], ['OS == "win" and target_arch == "ia32"', {'flapper_version_h_file%': 'symbols/ppapi/win/flapper_version.h', 'flapper_binary_files%': ['binaries/ppapi/win/pepflashplayer.dll', 'binaries/ppapi/win/manifest.json']}], ['OS == "win" and target_arch == "x64"', {'flapper_version_h_file%': 'symbols/ppapi/win_x64/flapper_version.h', 'flapper_binary_files%': ['binaries/ppapi/win_x64/pepflashplayer.dll', 'binaries/ppapi/win_x64/manifest.json']}]]}]]}, 'targets': [{'target_name': 'flapper_version_h', 'type': 'none', 'copies': [{'destination': '<(SHARED_INTERMEDIATE_DIR)', 'files': ['<(flapper_version_h_file)']}]}, {'target_name': 'flapper_binaries', 'type': 'none', 'copies': [{'destination': '<(PRODUCT_DIR)/PepperFlash', 'files': ['<@(flapper_binary_files)']}]}]}
# 204. Count Primes # Runtime: 4512 ms, faster than 43.85% of Python3 online submissions for Count Primes. # Memory Usage: 52.8 MB, less than 90.72% of Python3 online submissions for Count Primes. class Solution: # Sieve of Eratosthenes def countPrimes(self, n: int) -> int: if n <= 2: return 0 is_prime = [True] * n count = 0 for i in range(2, n): if is_prime[i]: count += 1 for j in range(i * i, n, i): is_prime[j] = False return count
class Solution: def count_primes(self, n: int) -> int: if n <= 2: return 0 is_prime = [True] * n count = 0 for i in range(2, n): if is_prime[i]: count += 1 for j in range(i * i, n, i): is_prime[j] = False return count
""" Asked by: Google [Hard]. Given a string, split it into as few strings as possible such that each string is a palindrome. For example, given the input string racecarannakayak, return ["racecar", "anna", "kayak"]. Given the input string abc, return ["a", "b", "c"]. """
""" Asked by: Google [Hard]. Given a string, split it into as few strings as possible such that each string is a palindrome. For example, given the input string racecarannakayak, return ["racecar", "anna", "kayak"]. Given the input string abc, return ["a", "b", "c"]. """
def ErrorHandler(function): def wrapper(*args, **kwargs): try: return function(*args, **kwargs) except Exception as e: # pragma: no cover pass return wrapper
def error_handler(function): def wrapper(*args, **kwargs): try: return function(*args, **kwargs) except Exception as e: pass return wrapper
# # # Copyright 2016 Kirk A Jackson DBA bristoSOFT all rights reserved. All methods, # techniques, algorithms are confidential trade secrets under Ohio and U.S. # Federal law owned by bristoSOFT. # # Kirk A Jackson dba bristoSOFT # 4100 Executive Park Drive # Suite 11 # Cincinnati, OH 45241 # Phone (513) 401-9114 # email jacksonkirka@bristosoft.com # # The trade name bristoSOFT is a registered trade name with the State of Ohio # document No. 201607803210. # ''' This control package includes all the modules needed for bristoSOFT Contacts. '''
""" This control package includes all the modules needed for bristoSOFT Contacts. """
"""Top-level package for investment_tracker.""" __author__ = """Ranko Liang""" __email__ = "rankoliang@gmail.com" __version__ = "0.1.0"
"""Top-level package for investment_tracker.""" __author__ = 'Ranko Liang' __email__ = 'rankoliang@gmail.com' __version__ = '0.1.0'
class Metadata: def __init__(self, network, code, position, name, source=None): self.network = network self.code = code self.position = position self.name = name self.source = source self.enabled = True class Polarization: def __init__(self): self.azimuth = [] self.azimuth_error = [] self.time = [] def __str__(self): return "Polarization object with azimuth = {:} +/- {:}".format(self.azimuth, self.azimuth_error) class AnnotationList: def __init__(self): self.annotation_list = [] def __str__(self): A = "" if len(self.annotation_list) > 0: for item in self.annotation_list: A += "{:}\n".format(item.title) else: A = "No annotations" return A def add(self, an): self.annotation_list.append(an) def overwrite(self, an): new_list = [] for annote in self.annotation_list: if annote.title != an.title: new_list.append(annote) new_list.append(an) self.annotation_list = new_list def remove(self, an): new_list = [] for annote in self.annotation_list: if annote.title != an.title: new_list.append(annote) self.annotation_list = new_list class Station: """ A station object containing information and position of the station """ def __init__(self, metadata, stream, edits=None, response=None): """ Arguments: network: [String] the network of the station code: [String] the code of the station position: [position Obj] a position object of the station containing the lat/lon/elev of the station channel: [String] the channel of the station (BHZ, HHZ, BDF, etc.) name: [String] A string describing the station's name or location (for display purposes only) file_name: [String] Location of the .mseed file inside the working directory """ self.metadata = metadata self.stream = stream self.edits = edits self.response = response self.polarization = Polarization() self.annotation = AnnotationList() self.bandpass = None def __str__(self): A = "Station: {:}\n".format(self.metadata.name) B = str(self.metadata.position) + "\n" try: C = "Ground Distance: {:} \n".format(self.ground_distance) except: C = '' if self.response is not None: D = "Response Attatched" else: D = "No Response Found" return A + B + C + D def hasResponse(self): if not hasattr(self, "response"): return False if self.response is None: return False return True def hasSeismic(self): st = self.stream a = st.select(component="Z") if len(a) > 0: return True else: return False def hasInfrasound(self): st = self.stream a = st.select(component="F") if len(a) > 0: return True else: return False def stn_distance(self, ref_pos): self.distance = self.metadata.position.pos_distance(ref_pos) return self.distance def stn_ground_distance(self, ref_pos): self.ground_distance = self.metadata.position.ground_distance(ref_pos)
class Metadata: def __init__(self, network, code, position, name, source=None): self.network = network self.code = code self.position = position self.name = name self.source = source self.enabled = True class Polarization: def __init__(self): self.azimuth = [] self.azimuth_error = [] self.time = [] def __str__(self): return 'Polarization object with azimuth = {:} +/- {:}'.format(self.azimuth, self.azimuth_error) class Annotationlist: def __init__(self): self.annotation_list = [] def __str__(self): a = '' if len(self.annotation_list) > 0: for item in self.annotation_list: a += '{:}\n'.format(item.title) else: a = 'No annotations' return A def add(self, an): self.annotation_list.append(an) def overwrite(self, an): new_list = [] for annote in self.annotation_list: if annote.title != an.title: new_list.append(annote) new_list.append(an) self.annotation_list = new_list def remove(self, an): new_list = [] for annote in self.annotation_list: if annote.title != an.title: new_list.append(annote) self.annotation_list = new_list class Station: """ A station object containing information and position of the station """ def __init__(self, metadata, stream, edits=None, response=None): """ Arguments: network: [String] the network of the station code: [String] the code of the station position: [position Obj] a position object of the station containing the lat/lon/elev of the station channel: [String] the channel of the station (BHZ, HHZ, BDF, etc.) name: [String] A string describing the station's name or location (for display purposes only) file_name: [String] Location of the .mseed file inside the working directory """ self.metadata = metadata self.stream = stream self.edits = edits self.response = response self.polarization = polarization() self.annotation = annotation_list() self.bandpass = None def __str__(self): a = 'Station: {:}\n'.format(self.metadata.name) b = str(self.metadata.position) + '\n' try: c = 'Ground Distance: {:} \n'.format(self.ground_distance) except: c = '' if self.response is not None: d = 'Response Attatched' else: d = 'No Response Found' return A + B + C + D def has_response(self): if not hasattr(self, 'response'): return False if self.response is None: return False return True def has_seismic(self): st = self.stream a = st.select(component='Z') if len(a) > 0: return True else: return False def has_infrasound(self): st = self.stream a = st.select(component='F') if len(a) > 0: return True else: return False def stn_distance(self, ref_pos): self.distance = self.metadata.position.pos_distance(ref_pos) return self.distance def stn_ground_distance(self, ref_pos): self.ground_distance = self.metadata.position.ground_distance(ref_pos)
class CommandNotFound(Exception): def __init__(self, command_name): self.name = command_name def __str__(self): return f"Command with name {self.name} not found"
class Commandnotfound(Exception): def __init__(self, command_name): self.name = command_name def __str__(self): return f'Command with name {self.name} not found'
def _merge(left, right, cmp): res = [] leftI , rightI = 0, 0 while leftI<len(left) and rightI<len(right): if cmp(left[leftI], right[rightI])<=0: res.append(left[leftI]) leftI += 1 else: res.append(right[rightI]) rightI += 1 while leftI<len(left): res.append(left[leftI]) leftI += 1 while rightI<len(right): res.append(right[rightI]) rightI += 1 return res def _merge2(left, right, cmp): result = [] while len(left)>0 or len(right)>0: if cmp(left[0],right[0])<=0: result.append(left.pop(0)) else: result.append(right.pop(0)) while len(left)>0: result.append(left.pop(0)) while len(right)>0: result.append(right.pop(0)) return result def mergeSort(items, cmp = None): cmp = cmp if cmp != None else (lambda a,b: a-b) n = len(items) if n<=1: return items left = mergeSort(items[:int(n/2)],cmp) right = mergeSort(items[int(n/2):],cmp) res = _merge(left, right, cmp) return res if __name__ == "__main__": pass
def _merge(left, right, cmp): res = [] (left_i, right_i) = (0, 0) while leftI < len(left) and rightI < len(right): if cmp(left[leftI], right[rightI]) <= 0: res.append(left[leftI]) left_i += 1 else: res.append(right[rightI]) right_i += 1 while leftI < len(left): res.append(left[leftI]) left_i += 1 while rightI < len(right): res.append(right[rightI]) right_i += 1 return res def _merge2(left, right, cmp): result = [] while len(left) > 0 or len(right) > 0: if cmp(left[0], right[0]) <= 0: result.append(left.pop(0)) else: result.append(right.pop(0)) while len(left) > 0: result.append(left.pop(0)) while len(right) > 0: result.append(right.pop(0)) return result def merge_sort(items, cmp=None): cmp = cmp if cmp != None else lambda a, b: a - b n = len(items) if n <= 1: return items left = merge_sort(items[:int(n / 2)], cmp) right = merge_sort(items[int(n / 2):], cmp) res = _merge(left, right, cmp) return res if __name__ == '__main__': pass
tokentype = { 'INT': 'INT', 'FLOAT': 'FLOAT', 'STRING': 'STRING', 'CHAR': 'CHAR', '+': 'PLUS', '-': 'MINUS', '*': 'MUL', '/': 'DIV', '=': 'ASSIGN', '%': 'MODULO', ':': 'COLON', ';': 'SEMICOLON', '<': 'LT', '>': 'GT', '[': 'O_BRACKET', ']': 'C_BRACKET', '(': 'O_PAREN', ')': 'C_PAREN', '{': 'O_BRACE', '}': 'C_BRACE', '&': 'AND', '|': 'OR', '!': 'NOT', '^': 'EXPO', 'ID': 'ID', 'EOF': 'EOF' } class Token: def __init__(self, type, value): self.type = type self.value = value def __str__(self): return f'<{self.type}: {self.value}>' __repr__ = __str__
tokentype = {'INT': 'INT', 'FLOAT': 'FLOAT', 'STRING': 'STRING', 'CHAR': 'CHAR', '+': 'PLUS', '-': 'MINUS', '*': 'MUL', '/': 'DIV', '=': 'ASSIGN', '%': 'MODULO', ':': 'COLON', ';': 'SEMICOLON', '<': 'LT', '>': 'GT', '[': 'O_BRACKET', ']': 'C_BRACKET', '(': 'O_PAREN', ')': 'C_PAREN', '{': 'O_BRACE', '}': 'C_BRACE', '&': 'AND', '|': 'OR', '!': 'NOT', '^': 'EXPO', 'ID': 'ID', 'EOF': 'EOF'} class Token: def __init__(self, type, value): self.type = type self.value = value def __str__(self): return f'<{self.type}: {self.value}>' __repr__ = __str__
''' Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element is distinct. ''' class Solution: def containsDuplicate(self, nums): """ :type nums: List[int] :rtype: bool """ ''' if(len(nums)==0 or len(nums)==1): return(False) new_nums=sorted(nums) for i in range(1,len(nums)): if(new_nums[i] == new_nums[i-1]): return(True) return(False) ''' new_list=list(set(nums)) if(len(new_list)==len(nums)): return(False) else: return(True)
""" Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element is distinct. """ class Solution: def contains_duplicate(self, nums): """ :type nums: List[int] :rtype: bool """ '\n if(len(nums)==0 or len(nums)==1):\n return(False)\n new_nums=sorted(nums)\n \n for i in range(1,len(nums)):\n if(new_nums[i] == new_nums[i-1]):\n return(True)\n return(False)\n ' new_list = list(set(nums)) if len(new_list) == len(nums): return False else: return True
# Takes the following input :- number of items, a weights array, a value array, and the capacity of knap_sack def knap_sack(n, w, v, c): if n == 0 or w == 0: return 0 if w[n - 1] > c: return knap_sack(n - 1, w, v, c) else: return max(v[n - 1] + knap_sack(n - 1, w, v, c - w[n - 1]), knap_sack(n - 1, w, v, c)) val = [60, 100, 120] wt = [10, 20, 30] W = 50 n = len(val) print(knap_sack(n, wt, val, W))
def knap_sack(n, w, v, c): if n == 0 or w == 0: return 0 if w[n - 1] > c: return knap_sack(n - 1, w, v, c) else: return max(v[n - 1] + knap_sack(n - 1, w, v, c - w[n - 1]), knap_sack(n - 1, w, v, c)) val = [60, 100, 120] wt = [10, 20, 30] w = 50 n = len(val) print(knap_sack(n, wt, val, W))
def maxXorSum(n, k): if k == 1: return n res = 1 l = [1] while res <= n: res <<= 1 l.append(res) print(l) # return res - 1 n, k = map(int, input().split()) maxXorSum(n, k)
def max_xor_sum(n, k): if k == 1: return n res = 1 l = [1] while res <= n: res <<= 1 l.append(res) print(l) (n, k) = map(int, input().split()) max_xor_sum(n, k)
#Gasolina t=float(input()) v=float(input()) l=(t*v) /12 print("{:.3f}".format(l) )
t = float(input()) v = float(input()) l = t * v / 12 print('{:.3f}'.format(l))
# Code Listing #5 """ Borg - Pattern which allows class instances to share state without the strict requirement of Singletons """ class Borg(object): """ I ain't a Singleton """ __shared_state = {} def __init__(self): print("self: ", self) self.__dict__ = self.__shared_state class IBorg(Borg): """ I am a Borg """ def __init__(self): self.state = 'init' Borg.__init__(self) # print("Hello1") # def __str__(self): # # print("Hello2") # return self.state # class ABorg(Borg): pass # class BBorg(Borg): pass # class A1Borg(ABorg): pass if __name__ == "__main__": # a = ABorg() # a1 = A1Borg() # b = BBorg() # a.x = 100 # print('a.x =>',a.x) # print('a1.x =>',a1.x) # print('b.x =>',b.x) x = IBorg() y = IBorg() # x.state = "running" print(x.__dict__, y, x == y, x is y)
""" Borg - Pattern which allows class instances to share state without the strict requirement of Singletons """ class Borg(object): """ I ain't a Singleton """ __shared_state = {} def __init__(self): print('self: ', self) self.__dict__ = self.__shared_state class Iborg(Borg): """ I am a Borg """ def __init__(self): self.state = 'init' Borg.__init__(self) if __name__ == '__main__': x = i_borg() y = i_borg() print(x.__dict__, y, x == y, x is y)
# Copyright 2021 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. register_npcx_project( project_name="volteer", zephyr_board="volteer", dts_overlays=[ "bb_retimer.dts", "cbi_eeprom.dts", "fan.dts", "gpio.dts", "keyboard.dts", "motionsense.dts", "pwm.dts", "pwm_leds.dts", "usbc.dts", ], )
register_npcx_project(project_name='volteer', zephyr_board='volteer', dts_overlays=['bb_retimer.dts', 'cbi_eeprom.dts', 'fan.dts', 'gpio.dts', 'keyboard.dts', 'motionsense.dts', 'pwm.dts', 'pwm_leds.dts', 'usbc.dts'])
# We could use f'' string but it is lunched after version 3.5 # So before f'' string developers are used format specifier. name = 'Amresh' channel = 'TechieDuo' # a = f'Good morning, {name}' # a = 'Good morning, {}\nWelcome to {}, Chief'.format(name, channel) # customize the position a = 'Good morning, {1}\nWelcome to {0}, Chief'.format(name, channel) print (a)
name = 'Amresh' channel = 'TechieDuo' a = 'Good morning, {1}\nWelcome to {0}, Chief'.format(name, channel) print(a)
class Solution: def romanToInt(self, s: str) -> int: roman_dict = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000} temp = roman_dict[s[-1]] summation = temp for i in s[:-1][::-1]: value = roman_dict[i] if value >= temp: summation += value temp = value else: summation -= value return summation sol = Solution() print(sol.romanToInt("LVIII")) print(sol.romanToInt("MCMXCIV")) # 1000 = M + 900 = CM + 90 = XC + IV = 4 print(sol.romanToInt("III"))
class Solution: def roman_to_int(self, s: str) -> int: roman_dict = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000} temp = roman_dict[s[-1]] summation = temp for i in s[:-1][::-1]: value = roman_dict[i] if value >= temp: summation += value temp = value else: summation -= value return summation sol = solution() print(sol.romanToInt('LVIII')) print(sol.romanToInt('MCMXCIV')) print(sol.romanToInt('III'))
np.random.seed(2020) # set random seed # sweep through values for lambda lambdas = np.arange(0.05, 0.95, 0.01) empirical_variances = np.zeros_like(lambdas) analytical_variances = np.zeros_like(lambdas) sig = 0.87 # compute empirical equilibrium variance for i, lam in enumerate(lambdas): empirical_variances[i] = ddm_eq_var(5000, x0, xinfty, lambdas[i], sig) # Hint: you can also do this in one line outside the loop! analytical_variances = sig**2 / (1 - lambdas**2) with plt.xkcd(): var_comparison_plot(empirical_variances, analytical_variances)
np.random.seed(2020) lambdas = np.arange(0.05, 0.95, 0.01) empirical_variances = np.zeros_like(lambdas) analytical_variances = np.zeros_like(lambdas) sig = 0.87 for (i, lam) in enumerate(lambdas): empirical_variances[i] = ddm_eq_var(5000, x0, xinfty, lambdas[i], sig) analytical_variances = sig ** 2 / (1 - lambdas ** 2) with plt.xkcd(): var_comparison_plot(empirical_variances, analytical_variances)
class SubscriptionSubstitutionTag(object): """The subscription substitution tag of an SubscriptionTracking.""" def __init__(self, subscription_substitution_tag=None): """Create a SubscriptionSubstitutionTag object :param subscription_substitution_tag: A tag that will be replaced with the unsubscribe URL. for example: [unsubscribe_url]. If this parameter is used, it will override both the text and html parameters. The URL of the link will be placed at the substitution tag's location, with no additional formatting. :type subscription_substitution_tag: string, optional """ self._subscription_substitution_tag = None if subscription_substitution_tag is not None: self.subscription_substitution_tag = subscription_substitution_tag @property def subscription_substitution_tag(self): """A tag that will be replaced with the unsubscribe URL. for example: [unsubscribe_url]. If this parameter is used, it will override both the text and html parameters. The URL of the link will be placed at the substitution tag's location, with no additional formatting. :rtype: string """ return self._subscription_substitution_tag @subscription_substitution_tag.setter def subscription_substitution_tag(self, value): """A tag that will be replaced with the unsubscribe URL. for example: [unsubscribe_url]. If this parameter is used, it will override both the text and html parameters. The URL of the link will be placed at the substitution tag's location, with no additional formatting. :param value: A tag that will be replaced with the unsubscribe URL. for example: [unsubscribe_url]. If this parameter is used, it will override both the text and html parameters. The URL of the link will be placed at the substitution tag's location, with no additional formatting. :type value: string """ self._subscription_substitution_tag = value def get(self): """ Get a JSON-ready representation of this SubscriptionSubstitutionTag. :returns: This SubscriptionSubstitutionTag, ready for use in a request body. :rtype: string """ return self.subscription_substitution_tag
class Subscriptionsubstitutiontag(object): """The subscription substitution tag of an SubscriptionTracking.""" def __init__(self, subscription_substitution_tag=None): """Create a SubscriptionSubstitutionTag object :param subscription_substitution_tag: A tag that will be replaced with the unsubscribe URL. for example: [unsubscribe_url]. If this parameter is used, it will override both the text and html parameters. The URL of the link will be placed at the substitution tag's location, with no additional formatting. :type subscription_substitution_tag: string, optional """ self._subscription_substitution_tag = None if subscription_substitution_tag is not None: self.subscription_substitution_tag = subscription_substitution_tag @property def subscription_substitution_tag(self): """A tag that will be replaced with the unsubscribe URL. for example: [unsubscribe_url]. If this parameter is used, it will override both the text and html parameters. The URL of the link will be placed at the substitution tag's location, with no additional formatting. :rtype: string """ return self._subscription_substitution_tag @subscription_substitution_tag.setter def subscription_substitution_tag(self, value): """A tag that will be replaced with the unsubscribe URL. for example: [unsubscribe_url]. If this parameter is used, it will override both the text and html parameters. The URL of the link will be placed at the substitution tag's location, with no additional formatting. :param value: A tag that will be replaced with the unsubscribe URL. for example: [unsubscribe_url]. If this parameter is used, it will override both the text and html parameters. The URL of the link will be placed at the substitution tag's location, with no additional formatting. :type value: string """ self._subscription_substitution_tag = value def get(self): """ Get a JSON-ready representation of this SubscriptionSubstitutionTag. :returns: This SubscriptionSubstitutionTag, ready for use in a request body. :rtype: string """ return self.subscription_substitution_tag
# No Copyright @u@ TaskType={ "classification":0, "SANclassification":1 } TaskID = { "csqa":0, "mcscript2":1, "cosmosqa":2 } TaskName = ["csqa","mcscript2","cosmosqa"]
task_type = {'classification': 0, 'SANclassification': 1} task_id = {'csqa': 0, 'mcscript2': 1, 'cosmosqa': 2} task_name = ['csqa', 'mcscript2', 'cosmosqa']
def open_file(): while True: file_name = input("Enter input file name>>> ") try: fhand = open(file_name, "r") break except FileNotFoundError: print("Couldn't open file, Invalid name or file doesn't exist!") continue return fhand def process_file(fhand): while True: year = input("Enter year>>> ") if len(year) == 4: # the entered year must have 4 characters. break else: # When the user enters a wrong year, he is re-prompted until a valid year is entered print("Year must be four digits,please enter a valid year!!") continue while True: # Prompt the user for income level print("Income levels;\n Input 1 for WB_LI\n Input 2 for WB_LMI\n Input 3 for WB_UMI\n Input 4 for WB_HI") income = input("Enter income level>> ") if income == "1": income = "WB_LI" break elif income == "2": income = "WB_LMI" break elif income == "3": income = "WB_UMI" break elif income == "4": income = "WB_HI" break else: print("Invalid income level!!") # if an income level other than (1,2,3,4) is input continue count = 0 percentages = [] countries = [] for line in fhand: if (line[88:92] == year) and (line[51:56] == income or line[51:57] == income): count += 1 percentages.append(int(line[59:61])) # For each line met,add percentages to the percentages list. country = ((str(line[0:51])).strip()) countries.append(country) # adds percentages to the list of countries continue # A dictionary with country as the key and percentages as the value. country_percentage = dict(zip(countries, percentages)) if count > 0: percent_sum = sum(percentages) average = percent_sum / count maximum = max(percentages) minimum = min(percentages) # this gets countries for maximum percentages to this list country_max = [country for country, percentage in country_percentage.items() if percentage == maximum] # this gets countries for minimum percentages to this list country_min = [country for country, percentage in country_percentage.items() if percentage == minimum] print(f"Number of countries in the record: {count}") print(f"Average percentage for {year} with {income} is {average:.1f}%") print(f"The following countries have the maximum percentage in {year} with {income} of {maximum}%") for i in country_max: print(" -", i) # This prints the countries with maximum percentage. print(f"The following countries have the minimum percentage in {year} with {income} of {minimum}%") for i in country_min: print(" -", i) # This prints the countries with minimum percentage. else: print(f"There are no records for the year {year} in the file") # in case there are no items in the list def main(): fhand = open_file() process_file(fhand) fhand.close() main()
def open_file(): while True: file_name = input('Enter input file name>>> ') try: fhand = open(file_name, 'r') break except FileNotFoundError: print("Couldn't open file, Invalid name or file doesn't exist!") continue return fhand def process_file(fhand): while True: year = input('Enter year>>> ') if len(year) == 4: break else: print('Year must be four digits,please enter a valid year!!') continue while True: print('Income levels;\n Input 1 for WB_LI\n Input 2 for WB_LMI\n Input 3 for WB_UMI\n Input 4 for WB_HI') income = input('Enter income level>> ') if income == '1': income = 'WB_LI' break elif income == '2': income = 'WB_LMI' break elif income == '3': income = 'WB_UMI' break elif income == '4': income = 'WB_HI' break else: print('Invalid income level!!') continue count = 0 percentages = [] countries = [] for line in fhand: if line[88:92] == year and (line[51:56] == income or line[51:57] == income): count += 1 percentages.append(int(line[59:61])) country = str(line[0:51]).strip() countries.append(country) continue country_percentage = dict(zip(countries, percentages)) if count > 0: percent_sum = sum(percentages) average = percent_sum / count maximum = max(percentages) minimum = min(percentages) country_max = [country for (country, percentage) in country_percentage.items() if percentage == maximum] country_min = [country for (country, percentage) in country_percentage.items() if percentage == minimum] print(f'Number of countries in the record: {count}') print(f'Average percentage for {year} with {income} is {average:.1f}%') print(f'The following countries have the maximum percentage in {year} with {income} of {maximum}%') for i in country_max: print(' -', i) print(f'The following countries have the minimum percentage in {year} with {income} of {minimum}%') for i in country_min: print(' -', i) else: print(f'There are no records for the year {year} in the file') def main(): fhand = open_file() process_file(fhand) fhand.close() main()
data = [[0,1.5],[2,1.7],[3,2.1],[5,2.2],[6,2.8],[7,2.9],[9,3.2],[11,3.7]] def dEa(a, b): sum = 0 for i in data: sum += i[0] * (i[0]*a + b - i[1]) return sum def dEb(a, b): sum = 0 for i in data: sum += i[0]*a + b - i[1] return sum eta = 0.006 # study rate a, b = 2,1 # start for i in range(0,200): a += -eta *dEa(a,b) b += -eta *dEb(a,b) print([a,b])
data = [[0, 1.5], [2, 1.7], [3, 2.1], [5, 2.2], [6, 2.8], [7, 2.9], [9, 3.2], [11, 3.7]] def d_ea(a, b): sum = 0 for i in data: sum += i[0] * (i[0] * a + b - i[1]) return sum def d_eb(a, b): sum = 0 for i in data: sum += i[0] * a + b - i[1] return sum eta = 0.006 (a, b) = (2, 1) for i in range(0, 200): a += -eta * d_ea(a, b) b += -eta * d_eb(a, b) print([a, b])
print('hi all') print ('hello world') print('hi') print('hii') print('hello2')
print('hi all') print('hello world') print('hi') print('hii') print('hello2')
grocery = ["rice", "water", "tomato", "onion", "ginger"] for i in range(2, len(grocery), 2): print(grocery[i])
grocery = ['rice', 'water', 'tomato', 'onion', 'ginger'] for i in range(2, len(grocery), 2): print(grocery[i])
# coding: utf-8 # author: Fei Gao <leetcode.com@feigao.xyz> # Problem: verify preorder serialization of a binary tree # # One way to serialize a binary tree is to use pre-order traversal. When we # encounter a non-null node, we record the node's value. If it is a null node, # we record using a sentinel value such as #. # # _9_ # / \ # 3 2 # / \ / \ # 4 1 # 6 # / \ / \ / \ # # # # # # # # # For example, the above binary tree can be serialized to the string # "9,3,4,#,#,1,#,#,2,#,6,#,#", where # represents a null node. # # Given a string of comma separated values, verify whether it is a correct # preorder traversal serialization of a binary tree. Find an algorithm without # reconstructing the tree. # Each comma separated value in the string must be either an integer or a # character '#' representing null pointer. # You may assume that the input format is always valid, for example it could # never contain two consecutive commas such as "1,,3". # Example 1: # "9,3,4,#,#,1,#,#,2,#,6,#,#" # Return true # Example 2: # "1,#" # Return false # Example 3: # "9,#,#,1" # Return false # Credits:Special thanks to @dietpepsi for adding this problem and creating # all test cases. # # Subscribe to see which companies asked this question # # Show Tags # # Stack class Solution(object): def isValidSerialization(self, preorder): """ :type preorder: str :rtype: bool """ tree = ''.join('n' if c != '#' else '#' for c in preorder.split(',')) while tree.count('n##'): tree = tree.replace('n##', '#') return tree == '#' def main(): solver = Solution() tests = [ (("9,3,4,#,#,1,#,#,2,#,6,#,#",), 1), (("1,#",), 0), (("1,#,#,1",), 0) ] for params, expect in tests: print('-' * 5 + 'TEST' + '-' * 5) print('Input: ' + str(params)) print('Expect: ' + str(expect)) result = solver.isValidSerialization(*params) print('Result: ' + str(result)) pass if __name__ == '__main__': main() pass
class Solution(object): def is_valid_serialization(self, preorder): """ :type preorder: str :rtype: bool """ tree = ''.join(('n' if c != '#' else '#' for c in preorder.split(','))) while tree.count('n##'): tree = tree.replace('n##', '#') return tree == '#' def main(): solver = solution() tests = [(('9,3,4,#,#,1,#,#,2,#,6,#,#',), 1), (('1,#',), 0), (('1,#,#,1',), 0)] for (params, expect) in tests: print('-' * 5 + 'TEST' + '-' * 5) print('Input: ' + str(params)) print('Expect: ' + str(expect)) result = solver.isValidSerialization(*params) print('Result: ' + str(result)) pass if __name__ == '__main__': main() pass
#!/usr/bin/env python3.4 class Board: """Represents one board to a Tic-Tac-Toe game.""" def __init__(self): """Initializes a new board. A board is a dictionary which the key is the position in the board and the value can be 'X', 'O' or ' ' (representing an empty position in the board.)""" self.board =[' ',' ',' ',' ',' ',' ',' ',' ',' ',' '] def print_board(self): """Prints the board.""" print(" %c | %c | %c " % (self.board[1],self.board[2],self.board[3])) print("___|___|___") print(" %c | %c | %c " % (self.board[4],self.board[5],self.board[6])) print("___|___|___") print(" %c | %c | %c " % (self.board[7],self.board[8],self.board[9])) print(" | | ") def _is_valid_move(self, position): if self.board[position] is " ": return True return False def change_board(self, position, type): """Receive a position and if the player is 'X' or 'O'. Checks if the position is valid, modifies the board and returns the modified board. Returns None if the move is not valid.""" if self._is_valid_move(position): return None def is_winner(self, player): """Returns True if the player won and False otherwise.""" if self.board[1] == player.type and self.board[2] == player.type and self.board[3] == player.type or \ self.board[4] == player.type and self.board[5] == player.type and self.board[6] == player.type or \ self.board[7] == player.type and self.board[8] == player.type and self.board[9] == player.type or \ self.board[1] == player.type and self.board[4] == player.type and self.board[7] == player.type or \ self.board[2] == player.type and self.board[5] == player.type and self.board[8] == player.type or \ self.board[3] == player.type and self.board[6] == player.type and self.board[9] == player.type or \ self.board[1] == player.type and self.board[5] == player.type and self.board[9] == player.type or \ self.board[7] == player.type and self.board[5] == player.type and self.board[3] == player.type: return True return False def get_free_positions(self): '''Get the list of available positions''' moves = [] for i,v in enumerate(self.board): if v==' ': moves.append(i) return moves
class Board: """Represents one board to a Tic-Tac-Toe game.""" def __init__(self): """Initializes a new board. A board is a dictionary which the key is the position in the board and the value can be 'X', 'O' or ' ' (representing an empty position in the board.)""" self.board = [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '] def print_board(self): """Prints the board.""" print(' %c | %c | %c ' % (self.board[1], self.board[2], self.board[3])) print('___|___|___') print(' %c | %c | %c ' % (self.board[4], self.board[5], self.board[6])) print('___|___|___') print(' %c | %c | %c ' % (self.board[7], self.board[8], self.board[9])) print(' | | ') def _is_valid_move(self, position): if self.board[position] is ' ': return True return False def change_board(self, position, type): """Receive a position and if the player is 'X' or 'O'. Checks if the position is valid, modifies the board and returns the modified board. Returns None if the move is not valid.""" if self._is_valid_move(position): return None def is_winner(self, player): """Returns True if the player won and False otherwise.""" if self.board[1] == player.type and self.board[2] == player.type and (self.board[3] == player.type) or (self.board[4] == player.type and self.board[5] == player.type and (self.board[6] == player.type)) or (self.board[7] == player.type and self.board[8] == player.type and (self.board[9] == player.type)) or (self.board[1] == player.type and self.board[4] == player.type and (self.board[7] == player.type)) or (self.board[2] == player.type and self.board[5] == player.type and (self.board[8] == player.type)) or (self.board[3] == player.type and self.board[6] == player.type and (self.board[9] == player.type)) or (self.board[1] == player.type and self.board[5] == player.type and (self.board[9] == player.type)) or (self.board[7] == player.type and self.board[5] == player.type and (self.board[3] == player.type)): return True return False def get_free_positions(self): """Get the list of available positions""" moves = [] for (i, v) in enumerate(self.board): if v == ' ': moves.append(i) return moves
class FMSAPIEventRankingsParser(object): def parse(self, response): """ This currently only works for the 2015 game. """ rankings = [['Rank', 'Team', 'Qual Avg', 'Auto', 'Container', 'Coopertition', 'Litter', 'Tote', 'Played']] for team in response['Rankings']: rankings.append([ team['rank'], team['teamNumber'], team['qualAverage'], team['autoPoints'], team['containerPoints'], team['coopertitionPoints'], team['litterPoints'], team['totePoints'], team['matchesPlayed']]) return rankings if len(rankings) > 1 else None
class Fmsapieventrankingsparser(object): def parse(self, response): """ This currently only works for the 2015 game. """ rankings = [['Rank', 'Team', 'Qual Avg', 'Auto', 'Container', 'Coopertition', 'Litter', 'Tote', 'Played']] for team in response['Rankings']: rankings.append([team['rank'], team['teamNumber'], team['qualAverage'], team['autoPoints'], team['containerPoints'], team['coopertitionPoints'], team['litterPoints'], team['totePoints'], team['matchesPlayed']]) return rankings if len(rankings) > 1 else None
class Database(): def __init__(self, connector, id): self.connector = connector self.id = id self.base_url = 'https://api.devicemagic.com/api/forms' \ '/{0}/device_magic_database.json'.format(self.id) def json(self, *args): return self._filtered_query(args) if args else self._basic_query() def _basic_query(self): path = self.base_url request = self.connector.execute_request(path, 'GET') return request def _join_params(self, parameters): params = [param.strip() for param in parameters] params_for_url = '?' + '&'.join(params) return params_for_url def _filtered_query(self, parameters): params = self._join_params(parameters) path = self.base_url + params request = self.connector.execute_request(path, 'GET') return request
class Database: def __init__(self, connector, id): self.connector = connector self.id = id self.base_url = 'https://api.devicemagic.com/api/forms/{0}/device_magic_database.json'.format(self.id) def json(self, *args): return self._filtered_query(args) if args else self._basic_query() def _basic_query(self): path = self.base_url request = self.connector.execute_request(path, 'GET') return request def _join_params(self, parameters): params = [param.strip() for param in parameters] params_for_url = '?' + '&'.join(params) return params_for_url def _filtered_query(self, parameters): params = self._join_params(parameters) path = self.base_url + params request = self.connector.execute_request(path, 'GET') return request
description = """ Adds Oracle database settings to your project. For more information, visit: http://cx-oracle.sourceforge.net/ """
description = '\nAdds Oracle database settings to your project.\n\nFor more information, visit:\nhttp://cx-oracle.sourceforge.net/\n'
expected_output = { "program": { "rcp_fs": { "instance": { "default": { "active": "0/0/CPU0", "active_state": "RUNNING", "group": "central-services", "jid": "1168", "standby": "NONE", "standby_state": "NOT_SPAWNED", } } }, "ospf": { "instance": { "1": { "active": "0/0/CPU0", "active_state": "RUNNING", "group": "v4-routing", "jid": "1018", "standby": "NONE", "standby_state": "NOT_SPAWNED", } } }, "bgp": { "instance": { "default": { "active": "0/0/CPU0", "active_state": "RUNNING", "group": "v4-routing", "jid": "1018", "standby": "NONE", "standby_state": "NOT_SPAWNED", } } }, "statsd_manager_g": { "instance": { "default": { "active": "0/0/CPU0", "active_state": "RUNNING", "group": "netmgmt", "jid": "1141", "standby": "NONE", "standby_state": "NOT_SPAWNED", } } }, "pim": { "instance": { "default": { "active": "0/0/CPU0", "active_state": "RUNNING", "group": "mcast-routing", "jid": "1158", "standby": "NONE", "standby_state": "NOT_SPAWNED", } } }, "ipv6_local": { "instance": { "default": { "active": "0/0/CPU0", "active_state": "RUNNING", "group": "v6-routing", "jid": "1156", "standby": "NONE", "standby_state": "NOT_SPAWNED", } } }, } }
expected_output = {'program': {'rcp_fs': {'instance': {'default': {'active': '0/0/CPU0', 'active_state': 'RUNNING', 'group': 'central-services', 'jid': '1168', 'standby': 'NONE', 'standby_state': 'NOT_SPAWNED'}}}, 'ospf': {'instance': {'1': {'active': '0/0/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1018', 'standby': 'NONE', 'standby_state': 'NOT_SPAWNED'}}}, 'bgp': {'instance': {'default': {'active': '0/0/CPU0', 'active_state': 'RUNNING', 'group': 'v4-routing', 'jid': '1018', 'standby': 'NONE', 'standby_state': 'NOT_SPAWNED'}}}, 'statsd_manager_g': {'instance': {'default': {'active': '0/0/CPU0', 'active_state': 'RUNNING', 'group': 'netmgmt', 'jid': '1141', 'standby': 'NONE', 'standby_state': 'NOT_SPAWNED'}}}, 'pim': {'instance': {'default': {'active': '0/0/CPU0', 'active_state': 'RUNNING', 'group': 'mcast-routing', 'jid': '1158', 'standby': 'NONE', 'standby_state': 'NOT_SPAWNED'}}}, 'ipv6_local': {'instance': {'default': {'active': '0/0/CPU0', 'active_state': 'RUNNING', 'group': 'v6-routing', 'jid': '1156', 'standby': 'NONE', 'standby_state': 'NOT_SPAWNED'}}}}}
number = 5 def summation(first, second): total = first + second + number return total outer_total = summation(10, 20) print("The first number we initialised was " + str(number)) print("The total after summation s " + str(outer_total))
number = 5 def summation(first, second): total = first + second + number return total outer_total = summation(10, 20) print('The first number we initialised was ' + str(number)) print('The total after summation s ' + str(outer_total))
"""Tests for CharLSTM class.""" def test_forward(char_cnn, vocab_dataset): """Test `CharLSTM.forward()` method.""" _, dataset = vocab_dataset for src, tgt in dataset: res = char_cnn(*src[:-2]) n_words, dim = res.size() assert n_words == tgt.size()[0] assert dim == char_cnn.output_size
"""Tests for CharLSTM class.""" def test_forward(char_cnn, vocab_dataset): """Test `CharLSTM.forward()` method.""" (_, dataset) = vocab_dataset for (src, tgt) in dataset: res = char_cnn(*src[:-2]) (n_words, dim) = res.size() assert n_words == tgt.size()[0] assert dim == char_cnn.output_size
def checkio(number): result = [] if number % 3 == 0: result.append('Fizz') if number % 5 == 0: result.append('Buzz') if result: return ' '.join(result) return str(number) # These "asserts" using only for self-checking and not necessary for # auto-testing if __name__ == '__main__': # pragma: no cover assert checkio(15) == "Fizz Buzz", "15 is divisible by 3 and 5" assert checkio(6) == "Fizz", "6 is divisible by 3" assert checkio(5) == "Buzz", "5 is divisible by 5" assert checkio(7) == "7", "7 is not divisible by 3 or 5"
def checkio(number): result = [] if number % 3 == 0: result.append('Fizz') if number % 5 == 0: result.append('Buzz') if result: return ' '.join(result) return str(number) if __name__ == '__main__': assert checkio(15) == 'Fizz Buzz', '15 is divisible by 3 and 5' assert checkio(6) == 'Fizz', '6 is divisible by 3' assert checkio(5) == 'Buzz', '5 is divisible by 5' assert checkio(7) == '7', '7 is not divisible by 3 or 5'
# By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, # we can see that the 6th prime is 13. # What is the 10 001st prime number? def is_prime(n: int) -> bool: if n <= 3: return n > 1 elif not(n%2 and n%3): return False i = 5 while i**2 <= n: if not(n%i and n%(i+2)): return False i += 6 return True def solution(number: int) -> int: i, count = 1, 0 while count != number: if is_prime(i): count += 1 prime = i i += 2 return prime if __name__ == '__main__': print(solution(10001))
def is_prime(n: int) -> bool: if n <= 3: return n > 1 elif not (n % 2 and n % 3): return False i = 5 while i ** 2 <= n: if not (n % i and n % (i + 2)): return False i += 6 return True def solution(number: int) -> int: (i, count) = (1, 0) while count != number: if is_prime(i): count += 1 prime = i i += 2 return prime if __name__ == '__main__': print(solution(10001))
"""dloud_ads - Abstract Data Structures commonly used in CS scenarios. Implemented by Data Loud Labs!""" __version__ = '0.0.2' __author__ = 'Pedro Sousa <pjgs.sousa@gmail.com>' __all__ = []
"""dloud_ads - Abstract Data Structures commonly used in CS scenarios. Implemented by Data Loud Labs!""" __version__ = '0.0.2' __author__ = 'Pedro Sousa <pjgs.sousa@gmail.com>' __all__ = []
class Regularizer(object): """Regularizer base class.""" def __call__(self, x): return self.call(x) def call(self, x): """Invokes the `Regularizer` instance.""" return 0.0 def gradient(self, x): """Compute gradient for the `Regularizer` instance.""" return 0.0
class Regularizer(object): """Regularizer base class.""" def __call__(self, x): return self.call(x) def call(self, x): """Invokes the `Regularizer` instance.""" return 0.0 def gradient(self, x): """Compute gradient for the `Regularizer` instance.""" return 0.0
data1 = "10" # String data2 = 5 # Int data3 = 5.23 # Float data4 = False # Bool print(data1) print(data2) print(data3) print(data4)
data1 = '10' data2 = 5 data3 = 5.23 data4 = False print(data1) print(data2) print(data3) print(data4)
def setup_module(module): pass def teardown_module(module): print("TD MO") def test_passing(): assert True def test_failing(): assert False class TestClassPassing(object): def setup_method(self, method): pass def teardown_method(self, method): pass def test_passing(self): assert True class TestClassFailing(object): def setup_method(self, method): pass def teardown_method(self, method): print("TD M") def test_failing(self): assert False
def setup_module(module): pass def teardown_module(module): print('TD MO') def test_passing(): assert True def test_failing(): assert False class Testclasspassing(object): def setup_method(self, method): pass def teardown_method(self, method): pass def test_passing(self): assert True class Testclassfailing(object): def setup_method(self, method): pass def teardown_method(self, method): print('TD M') def test_failing(self): assert False
#!/usr/bin/python35 s1 = '12345' s2 = 'abcde' print('s1 = %s, id(s1) = %d' %(s1, id(s1))) print('s2 = %s, id(s2) = %d' %(s2, id(s2))) s2 = '12345' print('') print('s1 = %s, id(s1) = %d' %(s1, id(s1))) print('s2 = %s, id(s2) = %d' %(s2, id(s2)))
s1 = '12345' s2 = 'abcde' print('s1 = %s, id(s1) = %d' % (s1, id(s1))) print('s2 = %s, id(s2) = %d' % (s2, id(s2))) s2 = '12345' print('') print('s1 = %s, id(s1) = %d' % (s1, id(s1))) print('s2 = %s, id(s2) = %d' % (s2, id(s2)))
# MIT License # (C) Copyright 2021 Hewlett Packard Enterprise Development LP. # # pauseOrchestration : Set or get appliances nePks which are paused from # orchestration def get_pause_orchestration(self) -> dict: """Get appliances currently paused for orchestration .. list-table:: :header-rows: 1 * - Swagger Section - Method - Endpoint * - pauseOrchestration - GET - /pauseOrchestration :return: Returns dictionary of appliances in nePk format :rtype: dict """ return self._get("/pauseOrchestration") def set_pause_orchestration( self, ne_pk_list: list[str], ) -> bool: """Set appliances to pause orchestration .. list-table:: :header-rows: 1 * - Swagger Section - Method - Endpoint * - pauseOrchestration - POST - /pauseOrchestration :param ne_pk_list: List of appliances in the format of integer.NE e.g. ``["3.NE","5.NE"]`` :type ne_pk_list: list[str] :return: Returns True/False based on successful call :rtype: bool """ return self._post( "/pauseOrchestration", data=ne_pk_list, expected_status=[204], return_type="bool", )
def get_pause_orchestration(self) -> dict: """Get appliances currently paused for orchestration .. list-table:: :header-rows: 1 * - Swagger Section - Method - Endpoint * - pauseOrchestration - GET - /pauseOrchestration :return: Returns dictionary of appliances in nePk format :rtype: dict """ return self._get('/pauseOrchestration') def set_pause_orchestration(self, ne_pk_list: list[str]) -> bool: """Set appliances to pause orchestration .. list-table:: :header-rows: 1 * - Swagger Section - Method - Endpoint * - pauseOrchestration - POST - /pauseOrchestration :param ne_pk_list: List of appliances in the format of integer.NE e.g. ``["3.NE","5.NE"]`` :type ne_pk_list: list[str] :return: Returns True/False based on successful call :rtype: bool """ return self._post('/pauseOrchestration', data=ne_pk_list, expected_status=[204], return_type='bool')
"""Generated definition of rust_grpc_library.""" load("//rust:rust_grpc_compile.bzl", "rust_grpc_compile") load("//internal:compile.bzl", "proto_compile_attrs") load("//rust:rust_proto_lib.bzl", "rust_proto_lib") load("@rules_rust//rust:defs.bzl", "rust_library") def rust_grpc_library(name, **kwargs): # buildifier: disable=function-docstring # Compile protos name_pb = name + "_pb" name_lib = name + "_lib" rust_grpc_compile( name = name_pb, **{ k: v for (k, v) in kwargs.items() if k in proto_compile_attrs.keys() } # Forward args ) # Create lib file rust_proto_lib( name = name_lib, compilation = name_pb, externs = ["protobuf", "grpc", "grpc_protobuf"], ) # Create rust library rust_library( name = name, srcs = [name_pb, name_lib], deps = GRPC_DEPS + kwargs.get("deps", []), visibility = kwargs.get("visibility"), tags = kwargs.get("tags"), ) GRPC_DEPS = [ Label("//rust/raze:futures"), Label("//rust/raze:grpc"), Label("//rust/raze:grpc_protobuf"), Label("//rust/raze:protobuf"), ]
"""Generated definition of rust_grpc_library.""" load('//rust:rust_grpc_compile.bzl', 'rust_grpc_compile') load('//internal:compile.bzl', 'proto_compile_attrs') load('//rust:rust_proto_lib.bzl', 'rust_proto_lib') load('@rules_rust//rust:defs.bzl', 'rust_library') def rust_grpc_library(name, **kwargs): name_pb = name + '_pb' name_lib = name + '_lib' rust_grpc_compile(name=name_pb, **{k: v for (k, v) in kwargs.items() if k in proto_compile_attrs.keys()}) rust_proto_lib(name=name_lib, compilation=name_pb, externs=['protobuf', 'grpc', 'grpc_protobuf']) rust_library(name=name, srcs=[name_pb, name_lib], deps=GRPC_DEPS + kwargs.get('deps', []), visibility=kwargs.get('visibility'), tags=kwargs.get('tags')) grpc_deps = [label('//rust/raze:futures'), label('//rust/raze:grpc'), label('//rust/raze:grpc_protobuf'), label('//rust/raze:protobuf')]
if __name__ == "__main__": with open('input.txt') as data: numbers = [int(number) for number in data.readlines()] current_freq = 0 idx = 0 past_frequencies = set() while True: if idx == len(numbers): idx = 0 if current_freq in past_frequencies: break past_frequencies.add(current_freq) current_freq += numbers[idx] idx += 1 print(f"The first repeated frequency is {current_freq}")
if __name__ == '__main__': with open('input.txt') as data: numbers = [int(number) for number in data.readlines()] current_freq = 0 idx = 0 past_frequencies = set() while True: if idx == len(numbers): idx = 0 if current_freq in past_frequencies: break past_frequencies.add(current_freq) current_freq += numbers[idx] idx += 1 print(f'The first repeated frequency is {current_freq}')
test = { 'name': 'q42', 'points': 3, 'suites': [ { 'cases': [ { 'code': '>>> ' 'print(np.round(model.coef_, ' '3))\n' '[ 0.024 0.023 -0.073 0.001 ' '-0.263 -0.016 0.289 0.011 ' '-0.438 0.066\n' ' -0.274 -0.026 0.126 -0.019 ' '-0.276 -0.418 0.223 -0.022 ' '-0.215 -0.997\n' ' 0.946 0.21 -0.021 -0.366 ' '-0.121 -0.399 0.823 -0.282 ' '-0.229 -0.392\n' ' -0.227 -0.147 -0.497 -0.701 ' '-0.514 0.637 -0.514]\n', 'hidden': False, 'locked': False}], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest'}]}
test = {'name': 'q42', 'points': 3, 'suites': [{'cases': [{'code': '>>> print(np.round(model.coef_, 3))\n[ 0.024 0.023 -0.073 0.001 -0.263 -0.016 0.289 0.011 -0.438 0.066\n -0.274 -0.026 0.126 -0.019 -0.276 -0.418 0.223 -0.022 -0.215 -0.997\n 0.946 0.21 -0.021 -0.366 -0.121 -0.399 0.823 -0.282 -0.229 -0.392\n -0.227 -0.147 -0.497 -0.701 -0.514 0.637 -0.514]\n', 'hidden': False, 'locked': False}], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest'}]}
def main(j, args, params, tags, tasklet): doc = params.doc e = params.requestContext.env addr = j.core.portal.runningPortal.ipaddr querystr = e["QUERY_STRING"] querystr = querystr.replace("&format=text", "") querystr = querystr.replace("&key=,", "") querystr = querystr.replace("&key=", "") querystr = querystr.replace("key=,", "") querystr = querystr.replace("key=", "") querystr += "key=%s" % j.apps.system.usermanager.extensions.usermanager.getUserFromCTX(params.requestContext).secret if "machine" in params: url = "http://" + addr +\ e["PATH_INFO"].strip("/") + "?" + querystr params.page.addLink(url, url) else: url = "http://" + addr + "/restmachine/" +\ e["PATH_INFO"].replace("/rest/", "").strip("/") + "?" + querystr params.page.addLink(url, url) params.page.addMessage("Be careful generated key above has been generated for you as administrator.") return params def match(j, args, params, tags, tasklet): return True
def main(j, args, params, tags, tasklet): doc = params.doc e = params.requestContext.env addr = j.core.portal.runningPortal.ipaddr querystr = e['QUERY_STRING'] querystr = querystr.replace('&format=text', '') querystr = querystr.replace('&key=,', '') querystr = querystr.replace('&key=', '') querystr = querystr.replace('key=,', '') querystr = querystr.replace('key=', '') querystr += 'key=%s' % j.apps.system.usermanager.extensions.usermanager.getUserFromCTX(params.requestContext).secret if 'machine' in params: url = 'http://' + addr + e['PATH_INFO'].strip('/') + '?' + querystr params.page.addLink(url, url) else: url = 'http://' + addr + '/restmachine/' + e['PATH_INFO'].replace('/rest/', '').strip('/') + '?' + querystr params.page.addLink(url, url) params.page.addMessage('Be careful generated key above has been generated for you as administrator.') return params def match(j, args, params, tags, tasklet): return True
# Title : Number of tuple equal to a user specified value # Author : Kiran raj R. # Date : 31:10:2020 def find_tuple(list_in, sum_in): length = len(list_in) count_tup = 0 list_tuples = [] if(sum(list_in) < sum_in) | length < 1: print(f"Cannot find any combination of sum {sum_in}") for i in range(length-2): tuple_with_sum = set() current_sum = sum_in - list_in[i] for j in range(i+1, length): if(current_sum - list_in[j]) in tuple_with_sum: count_tup += 1 tuple_with_sum.add(list_in[j]) for k in range(j+1, length): sub = [list_in[i], list_in[j], list_in[k]] if sum(sub) == sum_in: list_tuples.append(sub) print(f"The number of tuples with sum {sum_in} is: {count_tup}") print(f"The tuples are: {list_tuples}") find_tuple([1, 2, 3, 4, 7, 6], 7) find_tuple([1, 2, 3, 4, 5, 6, 7, 8, 9], 9) find_tuple([1, 3, 4, 5, 2], 9) find_tuple([1, 2, 3, 4, 5, 6, 7, 8, 9], 8)
def find_tuple(list_in, sum_in): length = len(list_in) count_tup = 0 list_tuples = [] if (sum(list_in) < sum_in) | length < 1: print(f'Cannot find any combination of sum {sum_in}') for i in range(length - 2): tuple_with_sum = set() current_sum = sum_in - list_in[i] for j in range(i + 1, length): if current_sum - list_in[j] in tuple_with_sum: count_tup += 1 tuple_with_sum.add(list_in[j]) for k in range(j + 1, length): sub = [list_in[i], list_in[j], list_in[k]] if sum(sub) == sum_in: list_tuples.append(sub) print(f'The number of tuples with sum {sum_in} is: {count_tup}') print(f'The tuples are: {list_tuples}') find_tuple([1, 2, 3, 4, 7, 6], 7) find_tuple([1, 2, 3, 4, 5, 6, 7, 8, 9], 9) find_tuple([1, 3, 4, 5, 2], 9) find_tuple([1, 2, 3, 4, 5, 6, 7, 8, 9], 8)