content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
#Task https://adventofcode.com/2020/day/2 inputExample = [['2-3','r','rrnr'], ['5-10','n','ltnnnknnvcnnn'], ['7-9','p','jtpptpllpj'], ['2-5','s','slssssszssssssss'], ['16-17','d','dddddddddddddddlp'], ['2-5','q','bbwqqbkmdhqmjhn'], ['7-10','m','qmpgmmsmmmmkmmkj'], ['1-3','a','abcde'], ['4-7','g','vczggdgbgxgg']] def getValidPasswords(inputL): validPasswords = 0 for row in inputL: ic = 0 rule = row[0].split('-') #client has a last minute change request #occurence = row[2].count(row[1]) #if occurence >= int(rule[0]) and occurence <= int(rule[1]): # validPasswords += 1 for idx, c in enumerate(row[2]): if(row[1] == c): if(idx == int(rule[0])-1): ic += 1 if(idx == int(rule[1])-1): ic += 1 if(ic == 1): validPasswords += 1 return validPasswords print(getValidPasswords(inputExample))
input_example = [['2-3', 'r', 'rrnr'], ['5-10', 'n', 'ltnnnknnvcnnn'], ['7-9', 'p', 'jtpptpllpj'], ['2-5', 's', 'slssssszssssssss'], ['16-17', 'd', 'dddddddddddddddlp'], ['2-5', 'q', 'bbwqqbkmdhqmjhn'], ['7-10', 'm', 'qmpgmmsmmmmkmmkj'], ['1-3', 'a', 'abcde'], ['4-7', 'g', 'vczggdgbgxgg']] def get_valid_passwords(inputL): valid_passwords = 0 for row in inputL: ic = 0 rule = row[0].split('-') for (idx, c) in enumerate(row[2]): if row[1] == c: if idx == int(rule[0]) - 1: ic += 1 if idx == int(rule[1]) - 1: ic += 1 if ic == 1: valid_passwords += 1 return validPasswords print(get_valid_passwords(inputExample))
#!/usr/bin/env python # coding: utf-8 class tokenargs(object): '''Wraps builtin list with checks for illegal characters in token arguments.''' # Disallow these characters inside token arguments illegal = '[]:' # Replace simple inputs with illegal characters with their legal equivalents replace = { "':'": '58', "'['": '91', "']'": '93' } def __init__(self, items=None): '''Construct a new list of token arguments.''' self.list = list() if items is not None: self.reset(items) def __setitem__(self, item, value): '''Set an item in the list.''' self.list[item] = self.sanitize(value) def __getitem__(self, item): '''Get an item from the list.''' result = self.list[item] if isinstance(result, list): return tokenargs(result) else: return result def __delitem__(self, item): '''Remove an item from the list.''' del self.list[item] def __str__(self): '''Get a string representation.''' return ':'.join(self.list) def __add__(self, items): '''Concatenate two lists of arguments.''' result = tokenargs(self.list) result.add(tokenargs(items)) return result def __radd__(self, items): '''Concatenate two lists of arguments.''' return tokenargs(tokenargs(items) + self.list) def __iadd__(self, item): '''Add an item or items to the end of the list.''' self.add(item) return self def __isub__(self, item): '''Remove some number of items from the end of the list.''' self.sub(item) return self def __contains__(self, item): '''Check if the list contains an item.''' try: item = self.sanitize(item) except: return False else: return item in self.list def __iter__(self): '''Iterate through items in the list.''' return self.list.__iter__() def __len__(self): '''Get the number of items in the list.''' return self.list.__len__() def __mul__(self, count): '''Concatenate the list with itself some number of times.''' return tokenargs(self.list * count) def __imul__(self, count): '''Concatenate the list with itself some number of times.''' self.list *= count return self def __eq__(self, other): '''Check equivalency with another list of arguments.''' return len(self.list) == len(other) and all(self.list[index] == str(item) for index, item in enumerate(other)) def copy(self): '''Make a copy of the argument list.''' return tokenargs(self.list) def reset(self, items): '''Reset list to contain specified items.''' if items is None: self.clear() elif isinstance(items, basestring): self.reset(items.split(':')) else: self.list[:] = self.sanitize(items) def set(self, index, item=None): ''' Set a single argument given an index or, if no index is given, set the argument at index 0. ''' if item is None: item = index index = 0 self.list[index] = self.sanitize(item) def clear(self): '''Remove all items from the list.''' del self.list[:] def sanitize(self, value, replace=True): ''' Internal: Utility method for sanitizing a string intended to be evaluated as an arugment for a token. ''' if isinstance(value, basestring): value = str(value) if replace and value in tokenargs.replace: value = tokenargs.replace[value] else: if any([char in value for char in tokenargs.illegal]): raise ValueError('Illegal character in argument %s.' % value) return value else: try: return (self.sanitize(item, replace) for item in value) except: return self.sanitize(str(value), replace) def append(self, item): '''Append a single item to the list.''' self.list.append(self.sanitize(item)) def extend(self, items): '''Append multiple items to the list.''' if isinstance(items, basestring): self.extend(items.split(':')) else: self.list.extend(self.sanitize(items)) def insert(self, index, item): '''Insert an item at some index.''' self.list.insert(index, self.sanitize(item)) def add(self, item, *args): '''Add an item or items to the end of the list.''' if isinstance(item, basestring): self.extend(item.split(':')) elif hasattr(item, '__iter__') or hasattr(item, '__getitem__'): self.extend(item) else: self.add(str(item)) if args: self.add(args) def remove(self, item): self.list.remove(self.sanitize(item)) def sub(self, item): '''Remove some number of items from the end of the list.''' try: self.list[:] = self.list[:-item] except: self.remove(item)
class Tokenargs(object): """Wraps builtin list with checks for illegal characters in token arguments.""" illegal = '[]:' replace = {"':'": '58', "'['": '91', "']'": '93'} def __init__(self, items=None): """Construct a new list of token arguments.""" self.list = list() if items is not None: self.reset(items) def __setitem__(self, item, value): """Set an item in the list.""" self.list[item] = self.sanitize(value) def __getitem__(self, item): """Get an item from the list.""" result = self.list[item] if isinstance(result, list): return tokenargs(result) else: return result def __delitem__(self, item): """Remove an item from the list.""" del self.list[item] def __str__(self): """Get a string representation.""" return ':'.join(self.list) def __add__(self, items): """Concatenate two lists of arguments.""" result = tokenargs(self.list) result.add(tokenargs(items)) return result def __radd__(self, items): """Concatenate two lists of arguments.""" return tokenargs(tokenargs(items) + self.list) def __iadd__(self, item): """Add an item or items to the end of the list.""" self.add(item) return self def __isub__(self, item): """Remove some number of items from the end of the list.""" self.sub(item) return self def __contains__(self, item): """Check if the list contains an item.""" try: item = self.sanitize(item) except: return False else: return item in self.list def __iter__(self): """Iterate through items in the list.""" return self.list.__iter__() def __len__(self): """Get the number of items in the list.""" return self.list.__len__() def __mul__(self, count): """Concatenate the list with itself some number of times.""" return tokenargs(self.list * count) def __imul__(self, count): """Concatenate the list with itself some number of times.""" self.list *= count return self def __eq__(self, other): """Check equivalency with another list of arguments.""" return len(self.list) == len(other) and all((self.list[index] == str(item) for (index, item) in enumerate(other))) def copy(self): """Make a copy of the argument list.""" return tokenargs(self.list) def reset(self, items): """Reset list to contain specified items.""" if items is None: self.clear() elif isinstance(items, basestring): self.reset(items.split(':')) else: self.list[:] = self.sanitize(items) def set(self, index, item=None): """ Set a single argument given an index or, if no index is given, set the argument at index 0. """ if item is None: item = index index = 0 self.list[index] = self.sanitize(item) def clear(self): """Remove all items from the list.""" del self.list[:] def sanitize(self, value, replace=True): """ Internal: Utility method for sanitizing a string intended to be evaluated as an arugment for a token. """ if isinstance(value, basestring): value = str(value) if replace and value in tokenargs.replace: value = tokenargs.replace[value] elif any([char in value for char in tokenargs.illegal]): raise value_error('Illegal character in argument %s.' % value) return value else: try: return (self.sanitize(item, replace) for item in value) except: return self.sanitize(str(value), replace) def append(self, item): """Append a single item to the list.""" self.list.append(self.sanitize(item)) def extend(self, items): """Append multiple items to the list.""" if isinstance(items, basestring): self.extend(items.split(':')) else: self.list.extend(self.sanitize(items)) def insert(self, index, item): """Insert an item at some index.""" self.list.insert(index, self.sanitize(item)) def add(self, item, *args): """Add an item or items to the end of the list.""" if isinstance(item, basestring): self.extend(item.split(':')) elif hasattr(item, '__iter__') or hasattr(item, '__getitem__'): self.extend(item) else: self.add(str(item)) if args: self.add(args) def remove(self, item): self.list.remove(self.sanitize(item)) def sub(self, item): """Remove some number of items from the end of the list.""" try: self.list[:] = self.list[:-item] except: self.remove(item)
# # PySNMP MIB module SAF-IPRADIO (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SAF-IPRADIO # Produced by pysmi-0.3.4 at Wed May 1 14:59:57 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection") ifEntry, = mibBuilder.importSymbols("IF-MIB", "ifEntry") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") Counter32, Integer32, Gauge32, MibIdentifier, TimeTicks, IpAddress, Bits, Counter64, ObjectIdentity, iso, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, Unsigned32, enterprises = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "Integer32", "Gauge32", "MibIdentifier", "TimeTicks", "IpAddress", "Bits", "Counter64", "ObjectIdentity", "iso", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "Unsigned32", "enterprises") DisplayString, TextualConvention, DateAndTime = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "DateAndTime") saf = MibIdentifier((1, 3, 6, 1, 4, 1, 7571)) tehnika = MibIdentifier((1, 3, 6, 1, 4, 1, 7571, 100)) microwaveRadio = MibIdentifier((1, 3, 6, 1, 4, 1, 7571, 100, 1)) pointToPoint = MibIdentifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1)) safip = MibIdentifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5)) ipRadio = MibIdentifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1)) ipRadioCfg = MibIdentifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1)) ipRadioMgmt = MibIdentifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 2)) ipRadioStat = MibIdentifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3)) ipRadioCfgGeneral = MibIdentifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1)) ipRadioCfgNetwork = MibIdentifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 2)) ipRadioStatEth = MibIdentifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2)) modemStatistics = MibIdentifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4)) product = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: product.setStatus('mandatory') if mibBuilder.loadTexts: product.setDescription('Name of the model.') description = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: description.setStatus('mandatory') if mibBuilder.loadTexts: description.setDescription('Description of the model.') radioName = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 16))).setMaxAccess("readwrite") if mibBuilder.loadTexts: radioName.setStatus('mandatory') if mibBuilder.loadTexts: radioName.setDescription('(same as PROMPT>).') sysDateAndTime = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 4), DateAndTime()).setMaxAccess("readwrite") if mibBuilder.loadTexts: sysDateAndTime.setStatus('mandatory') if mibBuilder.loadTexts: sysDateAndTime.setDescription('Current date and time set. For SET tenths of seconds ignored.') sysTemperature = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysTemperature.setStatus('mandatory') if mibBuilder.loadTexts: sysTemperature.setDescription('Unit temperature in degrees by Celsius. NB - sw before 2009.03.18 shows in *10 degrees') license = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: license.setStatus('mandatory') if mibBuilder.loadTexts: license.setDescription("To set license information. Read allways 'OK'.") licenseMask = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: licenseMask.setStatus('mandatory') if mibBuilder.loadTexts: licenseMask.setDescription('Read license mask.') writeConfig = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 2, 1), Integer32()).setMaxAccess("writeonly") if mibBuilder.loadTexts: writeConfig.setStatus('mandatory') if mibBuilder.loadTexts: writeConfig.setDescription('Write Config') restartcpu = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 2, 2), Integer32()).setMaxAccess("writeonly") if mibBuilder.loadTexts: restartcpu.setStatus('mandatory') if mibBuilder.loadTexts: restartcpu.setDescription("Restart of Mng CPU. Values: 1 - 'cold' restart; 3 - sw") loopbacks = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 2, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 4, 5, 12))).clone(namedValues=NamedValues(("error", 1), ("off", 2), ("if", 4), ("modem", 5), ("multi", 12)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: loopbacks.setStatus('mandatory') if mibBuilder.loadTexts: loopbacks.setDescription("Set loopback for 1 minute. value error(1) is not writable. Status of loopbacks. Values: 1 - 'error' (not writable); 2 - 'off'; 3 - 'rf' (radio frequency loopback); N/A 2008.10.21 4 - 'if' (intermediate frequency loopback); 5 - 'modem' (modem loopback); 6 - 'far' (far end loopback); N/A 2008.10.21 7 - 'ethernet' (Ethernet loopback); N/A 2008.10.21 8 - 'e1t1-1' (E1/T1 channel 1 loopback); N/A from firmware 1.51 9 - 'e1t1-2' (E1/T1 channel 2 loopback); N/A from firmware 1.51 10 - 'e1t1-3' (E1/T1 channel 3 loopback); N/A from firmware 1.51 11 - 'e1t1-4' (E1/T1 channel 4 loopback); N/A from firmware 1.51 12 - 'multi' (E1/T1 multi - look channel tributary mask)") loopback_tributary_mask = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 2, 4), Integer32()).setLabel("loopback-tributary-mask").setMaxAccess("readonly") if mibBuilder.loadTexts: loopback_tributary_mask.setStatus('mandatory') if mibBuilder.loadTexts: loopback_tributary_mask.setDescription('Loopback mask for E1/T1 channels') localIp = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 2, 1), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: localIp.setStatus('mandatory') if mibBuilder.loadTexts: localIp.setDescription('IPv4 Ethernet address of the local unit in a number format(XXX.XXX.XXX.XXX)') localIpMask = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 2, 2), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: localIpMask.setStatus('mandatory') if mibBuilder.loadTexts: localIpMask.setDescription('IPv4 Ethernet mask of the local unit in a number format (XXX.XXX.XXX.XXX)') remoteIp = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 2, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: remoteIp.setStatus('mandatory') if mibBuilder.loadTexts: remoteIp.setDescription('IPv4 Ethernet address of the remote unit in a number format (XXX.XXX.XXX.XXX).') radioTable = MibTable((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10), ) if mibBuilder.loadTexts: radioTable.setStatus('mandatory') if mibBuilder.loadTexts: radioTable.setDescription('Radio table.') radioEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1), ).setIndexNames((0, "SAF-IPRADIO", "radioIndex")) if mibBuilder.loadTexts: radioEntry.setStatus('mandatory') if mibBuilder.loadTexts: radioEntry.setDescription('Entry containing objects in radio table.') radioIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("local", 1), ("remote", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: radioIndex.setStatus('mandatory') if mibBuilder.loadTexts: radioIndex.setDescription("A unique value for each radio. Its value represents UNIT: 1 - for 'local'; 2 - for 'remote'") radioGenStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: radioGenStatus.setStatus('mandatory') if mibBuilder.loadTexts: radioGenStatus.setDescription("A General status of each radio: 1 - 'OK'; 2 - 'error'") radioSide = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("high", 1), ("low", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: radioSide.setStatus('mandatory') if mibBuilder.loadTexts: radioSide.setDescription('Side for duplex communication.') radioTxPower = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: radioTxPower.setStatus('mandatory') if mibBuilder.loadTexts: radioTxPower.setDescription('Tx power of radio transmitter in dBm.') radioRxLevel = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: radioRxLevel.setStatus('mandatory') if mibBuilder.loadTexts: radioRxLevel.setDescription('Received signal level in dBm.') radioDuplexShift = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: radioDuplexShift.setStatus('mandatory') if mibBuilder.loadTexts: radioDuplexShift.setDescription('Utilized duplex shift in KHz.') radioLoopback = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: radioLoopback.setStatus('mandatory') if mibBuilder.loadTexts: radioLoopback.setDescription('Radio loopback on/off. To set use loopback command.') radioTxMute = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: radioTxMute.setStatus('mandatory') if mibBuilder.loadTexts: radioTxMute.setDescription("Status of 'Tx mute': 1 - Tx is muted; 2 - Tx is not muted.") radioTxFrequency = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: radioTxFrequency.setStatus('mandatory') if mibBuilder.loadTexts: radioTxFrequency.setDescription('Tx frequency in kHz.') radioRxFrequency = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: radioRxFrequency.setStatus('mandatory') if mibBuilder.loadTexts: radioRxFrequency.setDescription('Rx frequency in kHz.') aTPCTable = MibTable((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 11), ) if mibBuilder.loadTexts: aTPCTable.setStatus('mandatory') if mibBuilder.loadTexts: aTPCTable.setDescription('ATPC table') aTPCEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 11, 1), ).setIndexNames((0, "SAF-IPRADIO", "atpcIndex")) if mibBuilder.loadTexts: aTPCEntry.setStatus('mandatory') if mibBuilder.loadTexts: aTPCEntry.setDescription('Entry containing objects in ATPC table.') atpcIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 11, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("local", 1), ("remote", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: atpcIndex.setStatus('mandatory') if mibBuilder.loadTexts: atpcIndex.setDescription("Its value represents UNIT 1 for 'local'; 2 for 'remote'.") atpcEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 11, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: atpcEnabled.setStatus('mandatory') if mibBuilder.loadTexts: atpcEnabled.setDescription("ATPC status: 1 for 'on'; 2 for 'off'.") atpcTxPowerCorrection = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 11, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: atpcTxPowerCorrection.setStatus('mandatory') if mibBuilder.loadTexts: atpcTxPowerCorrection.setDescription('ATPC Tx power correction in dBm.') modemTable = MibTable((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12), ) if mibBuilder.loadTexts: modemTable.setStatus('mandatory') if mibBuilder.loadTexts: modemTable.setDescription('CFIP modem table.') modemEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1), ).setIndexNames((0, "SAF-IPRADIO", "modemIndex")) if mibBuilder.loadTexts: modemEntry.setStatus('mandatory') if mibBuilder.loadTexts: modemEntry.setDescription('Entry containing objects in modem table.') modemIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("local", 1), ("remote", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: modemIndex.setStatus('mandatory') if mibBuilder.loadTexts: modemIndex.setDescription('Value represents UNIT: 1 for local; 2 for remote.') modemGeneralStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemGeneralStatus.setStatus('mandatory') if mibBuilder.loadTexts: modemGeneralStatus.setDescription("A General status of each modem: 1 - 'OK'; 2 - 'error'") modemBandwith = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: modemBandwith.setStatus('mandatory') if mibBuilder.loadTexts: modemBandwith.setDescription('Modem bandwidth set in KHz.') modemE1T1Channels = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: modemE1T1Channels.setStatus('mandatory') if mibBuilder.loadTexts: modemE1T1Channels.setDescription('Number of E1 or T1 channels set.') modemModulation = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 40, 41, 42, 49, 50, 57, 58))).clone(namedValues=NamedValues(("qpsk", 1), ("psk8", 2), ("qam16", 3), ("qam32", 4), ("qam64", 5), ("qam128", 6), ("qam256", 7), ("qpsklimited", 8), ("wqpsk", 9), ("wpsk8", 10), ("wqam16", 11), ("wqam32", 12), ("wqam64", 13), ("wqam128", 14), ("wqam256", 15), ("acmqpsk", 17), ("acmpsk8", 18), ("acmqam16", 19), ("acmqam32", 20), ("acmqam64", 21), ("acmqam128", 22), ("acmqam256", 23), ("acmwqpsk", 25), ("acmwpsk8", 26), ("acmwqam16", 27), ("acmwqam32", 28), ("acmwqam64", 29), ("acmwqam128", 30), ("acmwqam256", 31), ("qam4", 33), ("qam8", 34), ("qam4limited", 40), ("wqam4", 41), ("wqam8", 42), ("acmqam4", 49), ("acmqam8", 50), ("acmwqam4", 57), ("acmwqam8", 58)))).setMaxAccess("readonly") if mibBuilder.loadTexts: modemModulation.setStatus('mandatory') if mibBuilder.loadTexts: modemModulation.setDescription('Modem modulation set. Modulution values are following: QPSK - 1, 8PSK - 2, 16QAM - 3, 32QAM - 4, 64QAM - 5, 128QAM - 6, 256QAM - 7. The combination of wide band and ACM calculates as (modulation + 8*is_wide + 16*is_ACM). Note: not all of listed modulations supported by hardware. Plese check manual.') modemTotalCapacity = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemTotalCapacity.setStatus('mandatory') if mibBuilder.loadTexts: modemTotalCapacity.setDescription('Total capacity set in Kbps.') modemEthernetCapacity = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 7), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemEthernetCapacity.setStatus('mandatory') if mibBuilder.loadTexts: modemEthernetCapacity.setDescription('Ethernet capacity set in Kbps.') modemAcqStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemAcqStatus.setStatus('mandatory') if mibBuilder.loadTexts: modemAcqStatus.setDescription(' ') modemLastAcqError = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=NamedValues(("success", 1), ("erragc", 2), ("errtiming", 3), ("errfreqsweep", 4), ("errmse", 5), ("errbit", 6), ("errservice", 7), ("errblind", 8), ("errtimeout", 9), ("errstopped", 10), ("errfatal", 11)))).setMaxAccess("readonly") if mibBuilder.loadTexts: modemLastAcqError.setStatus('mandatory') if mibBuilder.loadTexts: modemLastAcqError.setDescription(' ') modemRadialMSE = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 10), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemRadialMSE.setStatus('mandatory') if mibBuilder.loadTexts: modemRadialMSE.setDescription("Radial mean square error value *10 in dB. Radial MSE is a method for estimating the signal to noise ratio. ACM engine uses normalized MSE, which is the inverse of SNR. It is calculated by dividing the estimated MSE level with the energy of the received constellation. Radial MSE peak value threshold is dependent on modulation used and LDPC code rate. In case of QPSK it is -8 dB (-10.5 for 'wide'), 16APSK - -13 dB (-18 for 'wide') and 32APSK - -15.5 dB (-21.5 for 'wide'). If the value trespasses this threshold, BER at the output of LDPC decoder will reach the value of 1.0e-06.") modemInternalAGCgain = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 11), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemInternalAGCgain.setStatus('mandatory') if mibBuilder.loadTexts: modemInternalAGCgain.setDescription(' dBm ') modemCarrierOffset = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemCarrierOffset.setStatus('mandatory') if mibBuilder.loadTexts: modemCarrierOffset.setDescription('Carrier frequency offset in Hz.') modemSymbolRateTx = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemSymbolRateTx.setStatus('mandatory') if mibBuilder.loadTexts: modemSymbolRateTx.setDescription(' kHz ') modemSymbolRateRx = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemSymbolRateRx.setStatus('mandatory') if mibBuilder.loadTexts: modemSymbolRateRx.setDescription(' kHz ') modemLDPCdecoderStress = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 15), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: modemLDPCdecoderStress.setStatus('mandatory') if mibBuilder.loadTexts: modemLDPCdecoderStress.setDescription("The load of LDPC (low-density parity-check code) decoder. The LDPC is monitored for the number of errors being corrected on the input of LDPC decoder. LDPC stress value thresholds @ BER 1.0e-06: - for standard settings ~4.0e-02; - for 'wide' option ~ 1.0e-03. As long as LDPC stress value is under the specified thresholds, amount of errors (and BER itself) on the output of LDPC remains at zero level.") modemACMengine = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: modemACMengine.setStatus('mandatory') if mibBuilder.loadTexts: modemACMengine.setDescription("Status of ACM engine. When 'on', value '1' is shown, when 'off' - value is '2'.") modemACMmodulationMin = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 40, 41, 42, 49, 50, 57, 58))).clone(namedValues=NamedValues(("qpsk", 1), ("psk8", 2), ("qam16", 3), ("qam32", 4), ("qam64", 5), ("qam128", 6), ("qam256", 7), ("qpsklimited", 8), ("wqpsk", 9), ("wpsk8", 10), ("wqam16", 11), ("wqam32", 12), ("wqam64", 13), ("wqam128", 14), ("wqam256", 15), ("acmqpsk", 17), ("acmpsk8", 18), ("acmqam16", 19), ("acmqam32", 20), ("acmqam64", 21), ("acmqam128", 22), ("acmqam256", 23), ("acmwqpsk", 25), ("acmwpsk8", 26), ("acmwqam16", 27), ("acmwqam32", 28), ("acmwqam64", 29), ("acmwqam128", 30), ("acmwqam256", 31), ("qam4", 33), ("qam8", 34), ("qam4limited", 40), ("wqam4", 41), ("wqam8", 42), ("acmqam4", 49), ("acmqam8", 50), ("acmwqam4", 57), ("acmwqam8", 58)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: modemACMmodulationMin.setStatus('mandatory') if mibBuilder.loadTexts: modemACMmodulationMin.setDescription('Modem modulation set. Modulution values are following: QPSK - 1, 8PSK - 2, 16QAM - 3, 32QAM - 4, 64QAM - 5, 128QAM - 6, 256QAM - 7. The combination of wide band and ACM calculates as (modulation + 8*is_wide + 16*is_ACM). Note: not all of listed modulations supported by hardware. Plese check manual.') modemACMtotalCapacity = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 18), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemACMtotalCapacity.setStatus('mandatory') if mibBuilder.loadTexts: modemACMtotalCapacity.setDescription('Total capacity in Kbps set by ACM.') modemACMethernetCapacity = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 19), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemACMethernetCapacity.setStatus('mandatory') if mibBuilder.loadTexts: modemACMethernetCapacity.setDescription('Ethernet capacity in Kbps set by ACM.') modemStandard = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("etsi", 1), ("ansi", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: modemStandard.setStatus('mandatory') if mibBuilder.loadTexts: modemStandard.setDescription('Modem operational standard ETSI or ANSI') modemE1T1ChannelMask = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 21), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: modemE1T1ChannelMask.setStatus('mandatory') if mibBuilder.loadTexts: modemE1T1ChannelMask.setDescription('E1 or T1 channel mask 0x00 - 0x0f') modemACMmodulationMax = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 40, 41, 42, 49, 50, 57, 58))).clone(namedValues=NamedValues(("qpsk", 1), ("psk8", 2), ("qam16", 3), ("qam32", 4), ("qam64", 5), ("qam128", 6), ("qam256", 7), ("qpsklimited", 8), ("wqpsk", 9), ("wpsk8", 10), ("wqam16", 11), ("wqam32", 12), ("wqam64", 13), ("wqam128", 14), ("wqam256", 15), ("acmqpsk", 17), ("acmpsk8", 18), ("acmqam16", 19), ("acmqam32", 20), ("acmqam64", 21), ("acmqam128", 22), ("acmqam256", 23), ("acmwqpsk", 25), ("acmwpsk8", 26), ("acmwqam16", 27), ("acmwqam32", 28), ("acmwqam64", 29), ("acmwqam128", 30), ("acmwqam256", 31), ("qam4", 33), ("qam8", 34), ("qam4limited", 40), ("wqam4", 41), ("wqam8", 42), ("acmqam4", 49), ("acmqam8", 50), ("acmwqam4", 57), ("acmwqam8", 58)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: modemACMmodulationMax.setStatus('mandatory') if mibBuilder.loadTexts: modemACMmodulationMax.setDescription('Modem modulation set. Modulution values are following: QPSK - 1, 8PSK - 2, 16QAM - 3, 32QAM - 4, 64QAM - 5, 128QAM - 6, 256QAM - 7. The combination of wide band and ACM calculates as (modulation + 8*is_wide + 16*is_ACM). Note: as PSK modulations are now physicaly deprecated, theese are replased with QAM, so for new QAM modulations there are modificatior +32. Note: not all of listed modulations supported by hardware. Plese check manual.') modemRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 3, 4))).clone(namedValues=NamedValues(("active", 1), ("notReady", 3), ("undo", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: modemRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: modemRowStatus.setDescription('Row status - to update written data for modemBandwith, modemACMmodulationMin, modemACMmodulationMax, modemE1T1ChannelMask. ') vlansEnabled = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2), ("reset", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: vlansEnabled.setStatus('mandatory') if mibBuilder.loadTexts: vlansEnabled.setDescription('unit temperature *10 degrees Celsius') vlanTable = MibTable((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 14), ) if mibBuilder.loadTexts: vlanTable.setStatus('mandatory') if mibBuilder.loadTexts: vlanTable.setDescription('Vlan table') vlanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 14, 1), ) ifEntry.registerAugmentions(("SAF-IPRADIO", "vlanEntry")) vlanEntry.setIndexNames(*ifEntry.getIndexNames()) if mibBuilder.loadTexts: vlanEntry.setStatus('mandatory') if mibBuilder.loadTexts: vlanEntry.setDescription('entry containing vlan objects') vlanNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 14, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: vlanNumber.setStatus('mandatory') if mibBuilder.loadTexts: vlanNumber.setDescription('A unique value for each vlan. ') vlanPortType = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 14, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("management", 1), ("none", 2), ("traffic", 3), ("endpoint", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: vlanPortType.setStatus('mandatory') if mibBuilder.loadTexts: vlanPortType.setDescription('VLAN port type management, traffic or endpoint ') vlanPortmap = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 14, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: vlanPortmap.setStatus('mandatory') if mibBuilder.loadTexts: vlanPortmap.setDescription('display port bindings bitfield 111(bin) ') vlanFid = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 14, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: vlanFid.setStatus('optional') if mibBuilder.loadTexts: vlanFid.setDescription('a filtering identifier (assigned automagically)') vlanCfgStat = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 14, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2), ("clear", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: vlanCfgStat.setStatus('mandatory') if mibBuilder.loadTexts: vlanCfgStat.setDescription('enable/disable vlan # or clear row data') vlanRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 14, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 3, 4))).clone(namedValues=NamedValues(("active", 1), ("notReady", 3), ("undo", 4)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: vlanRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: vlanRowStatus.setDescription('Row status (execute configuration on active) Changing any table value sets this value into state notReady. To update row status write value active(1) into this variable.') ethRXTruncatedFrames = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXTruncatedFrames.setStatus('mandatory') if mibBuilder.loadTexts: ethRXTruncatedFrames.setDescription('Number of truncated received frames since unit start or statistics reset. ') ethRXLongEvents = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXLongEvents.setStatus('mandatory') if mibBuilder.loadTexts: ethRXLongEvents.setDescription('Number of frames having byte count greater than MAXIMUM FRAME SIZE parameter (1518, 1536 or 1916 bytes) since unit start or statistics reset.') ethRXVlanTagsDetected = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXVlanTagsDetected.setStatus('mandatory') if mibBuilder.loadTexts: ethRXVlanTagsDetected.setDescription('Number of VLAN Tags detected since unit start or statistics reset.') ethRXUnsupOpcodes = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXUnsupOpcodes.setStatus('mandatory') if mibBuilder.loadTexts: ethRXUnsupOpcodes.setDescription('Number of frames recognized as control frames but contained an Unknown Opcode since unit start or statistics reset.') ethRXPauseFrames = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXPauseFrames.setStatus('mandatory') if mibBuilder.loadTexts: ethRXPauseFrames.setDescription('Number of frames received as control frames with valid PAUSE opcodes since unit start or statistics reset.') ethRXControlFrames = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXControlFrames.setStatus('mandatory') if mibBuilder.loadTexts: ethRXControlFrames.setDescription('Number of frames received as control frames since unit start or statistics reset.') ethRXDribleNibbles = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXDribleNibbles.setStatus('mandatory') if mibBuilder.loadTexts: ethRXDribleNibbles.setDescription('Indicates that following the end of the packet additional 1 to 7 bits are received. A single nibble, named the dribble nibble, is formed but not sent to the system;') ethRXBroadcasts = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXBroadcasts.setStatus('mandatory') if mibBuilder.loadTexts: ethRXBroadcasts.setDescription('Number of packets, which destination address contained broadcast address, since unit start or statiistics reset.') ethRXMulticasts = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXMulticasts.setStatus('mandatory') if mibBuilder.loadTexts: ethRXMulticasts.setDescription('Number of packets, which destination address contained multicast address since unit start or statistics reset.') ethRXDones = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXDones.setStatus('mandatory') if mibBuilder.loadTexts: ethRXDones.setDescription('Reception of packets successfully completed. Number of completed packets since unit start or statistics reset.') ethRXOutOfRangeErrors = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXOutOfRangeErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethRXOutOfRangeErrors.setDescription('Number of frames where Type/Length field larger than 1518 (Type Field) bytes since unit start or statistics reset.') ethRXLengthCheckerrorsErrors = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXLengthCheckerrorsErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethRXLengthCheckerrorsErrors.setDescription('Number of frames where frame length field in the packet does not match the actual data byte length and is not a Type Field since unit start or statistics reset.') ethRXCRCErrors = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXCRCErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethRXCRCErrors.setDescription('Number of frames where frame CRC do not match the internally generated CRC since unit start or statistics reset') ethRXCodeErrors = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXCodeErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethRXCodeErrors.setDescription('Number of packets where one or more nibbles are signalled as errors during reception of the packet since unit start or statistics reset.') ethRXFalseCarrierErrors = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXFalseCarrierErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethRXFalseCarrierErrors.setDescription('Indicates that following the last receive statistics vector, a false carrier was detected, noted and reported with this the next receive statistics. The false carrier is not associated with this packet. False carrier is activated on the receive channel that does not result in a packet receive attempt being made;') ethRXDvEvent = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXDvEvent.setStatus('mandatory') if mibBuilder.loadTexts: ethRXDvEvent.setDescription('Number of the last receive (Rx) events seen being too short to be valid packets since the last unit (re)start or purification of statistics.') ethRXPrevPktDropped = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXPrevPktDropped.setStatus('mandatory') if mibBuilder.loadTexts: ethRXPrevPktDropped.setDescription('Indicates that since the last receive (Rx), a packet is dropped (i.e. interframe gap too small).') ethRXByteCounterHi = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXByteCounterHi.setStatus('mandatory') if mibBuilder.loadTexts: ethRXByteCounterHi.setDescription('Total number of bytes received (Rx) on the wire since the last unit (re)start or purification of statistics, not counting collided bytes (bits 31:0).') ethRXByteCounterLow = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethRXByteCounterLow.setStatus('mandatory') if mibBuilder.loadTexts: ethRXByteCounterLow.setDescription('Total number of bytes received (Rx) on the wire since the last unit (re)start or purification of statistics, not counting collided bytes (bits 62:32).') ethTXVlanTags = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXVlanTags.setStatus('mandatory') if mibBuilder.loadTexts: ethTXVlanTags.setDescription('Number of VLAN tagged Tx packets since the last unit (re)start or purification of statistics. 32-bit counter.') ethTXBackpresEvents = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXBackpresEvents.setStatus('mandatory') if mibBuilder.loadTexts: ethTXBackpresEvents.setDescription('Number of times Tx carrier-sense-method backpressure was previously applied since the last unit (re)start or purification of statistics.') ethTXPauseFrames = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXPauseFrames.setStatus('mandatory') if mibBuilder.loadTexts: ethTXPauseFrames.setDescription('Number of frames transmitted (Tx) as control frames with valid PAUSE opcodes since the last unit (re)start or purification of statistics.') ethTXControlFrames = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXControlFrames.setStatus('mandatory') if mibBuilder.loadTexts: ethTXControlFrames.setDescription('Number of frames transmitted (Tx) as control frames since the last unit (re)start or purification of statistics.') ethTXWireByteCounterHi = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXWireByteCounterHi.setStatus('mandatory') if mibBuilder.loadTexts: ethTXWireByteCounterHi.setDescription('Total number of bytes transmitted (Tx) on the wire since the last unit (re)start or purification of statistics, including all bytes from collided attempts (bits 31:0).') ethTXWireByteCounterLow = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXWireByteCounterLow.setStatus('mandatory') if mibBuilder.loadTexts: ethTXWireByteCounterLow.setDescription('Total number of bytes transmitted (Tx) on the wire since the last unit (re)start or purification of statistics, including all bytes from collided attempts (bits 62:32).') ethTXUnderruns = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXUnderruns.setStatus('mandatory') if mibBuilder.loadTexts: ethTXUnderruns.setDescription('Number of underruns occured during frame transmission (Tx) since the last unit (re)start or purification of statistics.') ethTXGiants = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXGiants.setStatus('mandatory') if mibBuilder.loadTexts: ethTXGiants.setDescription('Number of Tx frames having byte count greater than the MAXIMUM FRAME SIZE parameter (1516, 1536 or 1916 bytes) since the last unit (re)start or purification of statistics.') ethTXLateCollisions = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 30), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXLateCollisions.setStatus('mandatory') if mibBuilder.loadTexts: ethTXLateCollisions.setDescription('Number of Tx collisions occurred beyond the collision window (512 bit times) since the last unit (re)start or purification of statistics.') ethTXMaxCollisions = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 31), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXMaxCollisions.setStatus('mandatory') if mibBuilder.loadTexts: ethTXMaxCollisions.setDescription('Number of Tx packets aborted after number of collisions exceeded the RETRANSMISSION MAXIMUM parameter since the last unit (re)start or purification of statistics.') ethTXExcessiveDefers = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 32), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXExcessiveDefers.setStatus('mandatory') if mibBuilder.loadTexts: ethTXExcessiveDefers.setDescription('Number of Tx packets deferred in excess of 6,071 nibble times in 100 Mbps mode, or 24,287 bit-times in 10 Mbps mode since the last unit (re)start or purification of statistics.') ethTXNonExcessiveDefers = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 33), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXNonExcessiveDefers.setStatus('mandatory') if mibBuilder.loadTexts: ethTXNonExcessiveDefers.setDescription('Number of Tx packets deferred for at least one attempt, but less than an excessive defer since the last unit (re)start or purification of statistics.') ethTXBroadcasts = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 34), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXBroadcasts.setStatus('mandatory') if mibBuilder.loadTexts: ethTXBroadcasts.setDescription('Number of Tx packets since the last unit (re)start or purification of statistics, which destination address contained broadcast address.') ethTXMulticasts = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 35), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXMulticasts.setStatus('mandatory') if mibBuilder.loadTexts: ethTXMulticasts.setDescription('Number of Tx packets since the last unit (re)start or purification of statistics, which destination address contained multicast address.') ethTXDones = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 36), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXDones.setStatus('mandatory') if mibBuilder.loadTexts: ethTXDones.setDescription('Number of packets successfully transmitted (Tx) since the last unit (re)start or purification of statistics.') ethTXLengthCheckErrors = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 38), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXLengthCheckErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethTXLengthCheckErrors.setDescription('Number of Tx frames since the last unit (re)start or purification of statistics, where length field in the packet does not match the actual data byte length and is not a Type Field') ethTXCRCErrors = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 39), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXCRCErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethTXCRCErrors.setDescription('Number of Tx frames since the last unit (re)start or purification of statistics, where CRC does not match the internally generated CRC.') ethTXCollisions = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 40), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXCollisions.setStatus('mandatory') if mibBuilder.loadTexts: ethTXCollisions.setDescription('Number of collisions the current packet incurred during transmission (Tx) attempts. Note: Bits 19 through 16 are the collision count on any successfully transmitted packet and as such will not show the possible maximum count of 16 collisions.') ethTXByteCounterHi = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 41), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXByteCounterHi.setStatus('mandatory') if mibBuilder.loadTexts: ethTXByteCounterHi.setDescription('Total count of bytes transmitted (Tx) on the wire not including collided bytes (bits 31:0) since the last unit (re)start or purification of statistics.') ethTXByteCounterLow = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 42), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethTXByteCounterLow.setStatus('mandatory') if mibBuilder.loadTexts: ethTXByteCounterLow.setDescription('Total count of bytes transmitted (Tx) on the wire not including collided bytes (bits 62:32) since the last unit (re)start or purification of statistics.') ethGFPFCSErrors = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 44), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethGFPFCSErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethGFPFCSErrors.setDescription('Number of generic framing procedure (GFP) frames with CRC errors received by the de-encapsulation block since the last unit (re)start or purification of statistics.') ethGFPCHECErrors = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 45), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethGFPCHECErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethGFPCHECErrors.setDescription('Number of generic framing procedure (GFP) frames with CHEC errors received by the de-encapsulation block since the last unit (re)start or purification of statistics.') ethGFPDropedFrames = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 46), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethGFPDropedFrames.setStatus('mandatory') if mibBuilder.loadTexts: ethGFPDropedFrames.setDescription('Number of generic framing procedure (GFP) frames that were dropped in the de-encapsulation block since the last unit (re)start or purification of statistics.') ethGFPDelineationErrors = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 47), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethGFPDelineationErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethGFPDelineationErrors.setDescription("Number of 'lost of synchronization' events since the last unit (re)start or purification of statistics.") ethQOSRXQ1Frames = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 48), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethQOSRXQ1Frames.setStatus('mandatory') if mibBuilder.loadTexts: ethQOSRXQ1Frames.setDescription('Number of frames received on Q1 since the last unit (re)start or purification of statistics.') ethQOSRXQ1Dropped = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 49), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethQOSRXQ1Dropped.setStatus('mandatory') if mibBuilder.loadTexts: ethQOSRXQ1Dropped.setDescription('Number of frames dropped on Q1 since the last unit (re)start or purification of statistics.') ethQOSRXQ2Frames = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 50), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethQOSRXQ2Frames.setStatus('mandatory') if mibBuilder.loadTexts: ethQOSRXQ2Frames.setDescription('Number of frames received on Q2 since the last unit (re)start or purification of statistics.') ethQOSRXQ2Dropped = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 51), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethQOSRXQ2Dropped.setStatus('mandatory') if mibBuilder.loadTexts: ethQOSRXQ2Dropped.setDescription('Number of frames dropped on Q2 since the last unit (re)start or purification of statistics.') ethQOSTXFrames = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 52), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethQOSTXFrames.setStatus('mandatory') if mibBuilder.loadTexts: ethQOSTXFrames.setDescription('Number of frames passed through TX FIFO since the last unit (re)start or purification of statistics.') ethQOSTXDropped = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 53), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ethQOSTXDropped.setStatus('mandatory') if mibBuilder.loadTexts: ethQOSTXDropped.setDescription('Number of frames dropped in TX FIFO since the last unit (re)start or purification of statistics.') e1t1StatTable = MibTable((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 3), ) if mibBuilder.loadTexts: e1t1StatTable.setStatus('mandatory') if mibBuilder.loadTexts: e1t1StatTable.setDescription('E1 (T1) status Table.') e1t1StatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 3, 1), ) ifEntry.registerAugmentions(("SAF-IPRADIO", "e1t1StatEntry")) e1t1StatEntry.setIndexNames(*ifEntry.getIndexNames()) if mibBuilder.loadTexts: e1t1StatEntry.setStatus('mandatory') if mibBuilder.loadTexts: e1t1StatEntry.setDescription('Entry containing objects in E1 (T1) table') e1t1LOS = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: e1t1LOS.setStatus('mandatory') if mibBuilder.loadTexts: e1t1LOS.setDescription('if signal loss present') e1t1AIS = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("on", 1), ("off", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: e1t1AIS.setStatus('mandatory') if mibBuilder.loadTexts: e1t1AIS.setDescription('if AIS present') e1t1ChannelNr = MibTableColumn((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 3, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: e1t1ChannelNr.setStatus('mandatory') if mibBuilder.loadTexts: e1t1ChannelNr.setDescription('e1 channel number (it is not associated with interface number - ifEntry)') modemCountTime = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemCountTime.setStatus('mandatory') if mibBuilder.loadTexts: modemCountTime.setDescription('Count time in seconds') modemErroredBlock = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemErroredBlock.setStatus('mandatory') if mibBuilder.loadTexts: modemErroredBlock.setDescription('Errored block') modemErroredSecond = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemErroredSecond.setStatus('mandatory') if mibBuilder.loadTexts: modemErroredSecond.setDescription('Errored second') modemSeverelyErroredSecond = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemSeverelyErroredSecond.setStatus('mandatory') if mibBuilder.loadTexts: modemSeverelyErroredSecond.setDescription('Severely errored second') modemBackgroundBlockErrror = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemBackgroundBlockErrror.setStatus('mandatory') if mibBuilder.loadTexts: modemBackgroundBlockErrror.setDescription('Background Block Error') modemTotalBlockNumber = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemTotalBlockNumber.setStatus('mandatory') if mibBuilder.loadTexts: modemTotalBlockNumber.setDescription('Total Block Number') modemErroredSecondRatio = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemErroredSecondRatio.setStatus('mandatory') if mibBuilder.loadTexts: modemErroredSecondRatio.setDescription('Errorred Second Ratio') modemSeverelyErroredSecondRatio = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 8), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemSeverelyErroredSecondRatio.setStatus('mandatory') if mibBuilder.loadTexts: modemSeverelyErroredSecondRatio.setDescription('Severely Errorred Second Ratio') modemBackgroundBlockErrorRatio = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 9), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemBackgroundBlockErrorRatio.setStatus('mandatory') if mibBuilder.loadTexts: modemBackgroundBlockErrorRatio.setDescription('Background Block Error Ratio') modemUptime = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemUptime.setStatus('mandatory') if mibBuilder.loadTexts: modemUptime.setDescription('Uptime (s)') modemUnavailtime = MibScalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: modemUnavailtime.setStatus('mandatory') if mibBuilder.loadTexts: modemUnavailtime.setDescription('Unavailtime (s)') mibBuilder.exportSymbols("SAF-IPRADIO", ethTXByteCounterLow=ethTXByteCounterLow, aTPCEntry=aTPCEntry, radioRxFrequency=radioRxFrequency, ethGFPCHECErrors=ethGFPCHECErrors, e1t1LOS=e1t1LOS, vlanPortmap=vlanPortmap, vlanRowStatus=vlanRowStatus, modemTable=modemTable, ipRadioCfgNetwork=ipRadioCfgNetwork, radioTxFrequency=radioTxFrequency, vlanEntry=vlanEntry, radioName=radioName, modemInternalAGCgain=modemInternalAGCgain, modemACMtotalCapacity=modemACMtotalCapacity, sysTemperature=sysTemperature, safip=safip, ethRXDones=ethRXDones, ethRXCRCErrors=ethRXCRCErrors, ethRXDvEvent=ethRXDvEvent, ethRXPrevPktDropped=ethRXPrevPktDropped, radioTxMute=radioTxMute, ethTXMulticasts=ethTXMulticasts, modemLastAcqError=modemLastAcqError, ethQOSRXQ1Dropped=ethQOSRXQ1Dropped, ethTXNonExcessiveDefers=ethTXNonExcessiveDefers, modemIndex=modemIndex, ethQOSTXFrames=ethQOSTXFrames, modemBandwith=modemBandwith, radioDuplexShift=radioDuplexShift, vlanCfgStat=vlanCfgStat, ipRadioCfgGeneral=ipRadioCfgGeneral, ethQOSRXQ1Frames=ethQOSRXQ1Frames, radioEntry=radioEntry, vlansEnabled=vlansEnabled, ethTXBackpresEvents=ethTXBackpresEvents, ethTXCollisions=ethTXCollisions, ethRXLengthCheckerrorsErrors=ethRXLengthCheckerrorsErrors, product=product, ethRXFalseCarrierErrors=ethRXFalseCarrierErrors, radioSide=radioSide, saf=saf, modemACMmodulationMax=modemACMmodulationMax, ethTXControlFrames=ethTXControlFrames, restartcpu=restartcpu, e1t1StatEntry=e1t1StatEntry, vlanNumber=vlanNumber, vlanPortType=vlanPortType, modemSeverelyErroredSecond=modemSeverelyErroredSecond, localIp=localIp, ipRadioCfg=ipRadioCfg, ethRXByteCounterLow=ethRXByteCounterLow, modemTotalCapacity=modemTotalCapacity, radioRxLevel=radioRxLevel, atpcTxPowerCorrection=atpcTxPowerCorrection, loopback_tributary_mask=loopback_tributary_mask, localIpMask=localIpMask, modemEthernetCapacity=modemEthernetCapacity, modemBackgroundBlockErrror=modemBackgroundBlockErrror, ipRadioMgmt=ipRadioMgmt, ethTXLateCollisions=ethTXLateCollisions, ethRXControlFrames=ethRXControlFrames, tehnika=tehnika, ethRXVlanTagsDetected=ethRXVlanTagsDetected, modemUnavailtime=modemUnavailtime, e1t1StatTable=e1t1StatTable, modemCarrierOffset=modemCarrierOffset, modemSymbolRateRx=modemSymbolRateRx, ethTXGiants=ethTXGiants, description=description, ethRXOutOfRangeErrors=ethRXOutOfRangeErrors, vlanFid=vlanFid, radioTable=radioTable, ethRXUnsupOpcodes=ethRXUnsupOpcodes, e1t1ChannelNr=e1t1ChannelNr, ethTXByteCounterHi=ethTXByteCounterHi, modemUptime=modemUptime, ethTXWireByteCounterLow=ethTXWireByteCounterLow, aTPCTable=aTPCTable, atpcIndex=atpcIndex, ethTXVlanTags=ethTXVlanTags, ethRXTruncatedFrames=ethRXTruncatedFrames, pointToPoint=pointToPoint, remoteIp=remoteIp, vlanTable=vlanTable, ipRadio=ipRadio, sysDateAndTime=sysDateAndTime, modemRowStatus=modemRowStatus, writeConfig=writeConfig, ethRXBroadcasts=ethRXBroadcasts, ethRXMulticasts=ethRXMulticasts, ethRXDribleNibbles=ethRXDribleNibbles, ethTXDones=ethTXDones, ethRXPauseFrames=ethRXPauseFrames, modemSymbolRateTx=modemSymbolRateTx, loopbacks=loopbacks, radioGenStatus=radioGenStatus, modemLDPCdecoderStress=modemLDPCdecoderStress, modemStandard=modemStandard, licenseMask=licenseMask, ethGFPDelineationErrors=ethGFPDelineationErrors, ipRadioStat=ipRadioStat, e1t1AIS=e1t1AIS, modemErroredBlock=modemErroredBlock, modemAcqStatus=modemAcqStatus, modemGeneralStatus=modemGeneralStatus, modemSeverelyErroredSecondRatio=modemSeverelyErroredSecondRatio, modemACMethernetCapacity=modemACMethernetCapacity, modemErroredSecondRatio=modemErroredSecondRatio, modemACMmodulationMin=modemACMmodulationMin, ethRXCodeErrors=ethRXCodeErrors, modemBackgroundBlockErrorRatio=modemBackgroundBlockErrorRatio, ethTXWireByteCounterHi=ethTXWireByteCounterHi, ipRadioStatEth=ipRadioStatEth, modemCountTime=modemCountTime, ethTXLengthCheckErrors=ethTXLengthCheckErrors, modemStatistics=modemStatistics, ethTXBroadcasts=ethTXBroadcasts, modemTotalBlockNumber=modemTotalBlockNumber, microwaveRadio=microwaveRadio, radioIndex=radioIndex, ethTXUnderruns=ethTXUnderruns, modemE1T1ChannelMask=modemE1T1ChannelMask, modemACMengine=modemACMengine, modemEntry=modemEntry, ethRXLongEvents=ethRXLongEvents, ethTXMaxCollisions=ethTXMaxCollisions, ethQOSRXQ2Frames=ethQOSRXQ2Frames, ethTXExcessiveDefers=ethTXExcessiveDefers, ethTXCRCErrors=ethTXCRCErrors, ethRXByteCounterHi=ethRXByteCounterHi, modemE1T1Channels=modemE1T1Channels, ethQOSTXDropped=ethQOSTXDropped, ethGFPDropedFrames=ethGFPDropedFrames, radioTxPower=radioTxPower, modemModulation=modemModulation, modemErroredSecond=modemErroredSecond, license=license, atpcEnabled=atpcEnabled, ethQOSRXQ2Dropped=ethQOSRXQ2Dropped, ethGFPFCSErrors=ethGFPFCSErrors, radioLoopback=radioLoopback, ethTXPauseFrames=ethTXPauseFrames, modemRadialMSE=modemRadialMSE)
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, single_value_constraint, value_size_constraint, value_range_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection') (if_entry,) = mibBuilder.importSymbols('IF-MIB', 'ifEntry') (module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup') (counter32, integer32, gauge32, mib_identifier, time_ticks, ip_address, bits, counter64, object_identity, iso, module_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, notification_type, unsigned32, enterprises) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'Integer32', 'Gauge32', 'MibIdentifier', 'TimeTicks', 'IpAddress', 'Bits', 'Counter64', 'ObjectIdentity', 'iso', 'ModuleIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'NotificationType', 'Unsigned32', 'enterprises') (display_string, textual_convention, date_and_time) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention', 'DateAndTime') saf = mib_identifier((1, 3, 6, 1, 4, 1, 7571)) tehnika = mib_identifier((1, 3, 6, 1, 4, 1, 7571, 100)) microwave_radio = mib_identifier((1, 3, 6, 1, 4, 1, 7571, 100, 1)) point_to_point = mib_identifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1)) safip = mib_identifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5)) ip_radio = mib_identifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1)) ip_radio_cfg = mib_identifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1)) ip_radio_mgmt = mib_identifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 2)) ip_radio_stat = mib_identifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3)) ip_radio_cfg_general = mib_identifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1)) ip_radio_cfg_network = mib_identifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 2)) ip_radio_stat_eth = mib_identifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2)) modem_statistics = mib_identifier((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4)) product = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: product.setStatus('mandatory') if mibBuilder.loadTexts: product.setDescription('Name of the model.') description = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: description.setStatus('mandatory') if mibBuilder.loadTexts: description.setDescription('Description of the model.') radio_name = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 16))).setMaxAccess('readwrite') if mibBuilder.loadTexts: radioName.setStatus('mandatory') if mibBuilder.loadTexts: radioName.setDescription('(same as PROMPT>).') sys_date_and_time = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 4), date_and_time()).setMaxAccess('readwrite') if mibBuilder.loadTexts: sysDateAndTime.setStatus('mandatory') if mibBuilder.loadTexts: sysDateAndTime.setDescription('Current date and time set. For SET tenths of seconds ignored.') sys_temperature = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: sysTemperature.setStatus('mandatory') if mibBuilder.loadTexts: sysTemperature.setDescription('Unit temperature in degrees by Celsius. NB - sw before 2009.03.18 shows in *10 degrees') license = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 6), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readwrite') if mibBuilder.loadTexts: license.setStatus('mandatory') if mibBuilder.loadTexts: license.setDescription("To set license information. Read allways 'OK'.") license_mask = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: licenseMask.setStatus('mandatory') if mibBuilder.loadTexts: licenseMask.setDescription('Read license mask.') write_config = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 2, 1), integer32()).setMaxAccess('writeonly') if mibBuilder.loadTexts: writeConfig.setStatus('mandatory') if mibBuilder.loadTexts: writeConfig.setDescription('Write Config') restartcpu = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 2, 2), integer32()).setMaxAccess('writeonly') if mibBuilder.loadTexts: restartcpu.setStatus('mandatory') if mibBuilder.loadTexts: restartcpu.setDescription("Restart of Mng CPU. Values: 1 - 'cold' restart; 3 - sw") loopbacks = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 2, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 4, 5, 12))).clone(namedValues=named_values(('error', 1), ('off', 2), ('if', 4), ('modem', 5), ('multi', 12)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: loopbacks.setStatus('mandatory') if mibBuilder.loadTexts: loopbacks.setDescription("Set loopback for 1 minute. value error(1) is not writable. Status of loopbacks. Values: 1 - 'error' (not writable); 2 - 'off'; 3 - 'rf' (radio frequency loopback); N/A 2008.10.21 4 - 'if' (intermediate frequency loopback); 5 - 'modem' (modem loopback); 6 - 'far' (far end loopback); N/A 2008.10.21 7 - 'ethernet' (Ethernet loopback); N/A 2008.10.21 8 - 'e1t1-1' (E1/T1 channel 1 loopback); N/A from firmware 1.51 9 - 'e1t1-2' (E1/T1 channel 2 loopback); N/A from firmware 1.51 10 - 'e1t1-3' (E1/T1 channel 3 loopback); N/A from firmware 1.51 11 - 'e1t1-4' (E1/T1 channel 4 loopback); N/A from firmware 1.51 12 - 'multi' (E1/T1 multi - look channel tributary mask)") loopback_tributary_mask = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 2, 4), integer32()).setLabel('loopback-tributary-mask').setMaxAccess('readonly') if mibBuilder.loadTexts: loopback_tributary_mask.setStatus('mandatory') if mibBuilder.loadTexts: loopback_tributary_mask.setDescription('Loopback mask for E1/T1 channels') local_ip = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 2, 1), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: localIp.setStatus('mandatory') if mibBuilder.loadTexts: localIp.setDescription('IPv4 Ethernet address of the local unit in a number format(XXX.XXX.XXX.XXX)') local_ip_mask = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 2, 2), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: localIpMask.setStatus('mandatory') if mibBuilder.loadTexts: localIpMask.setDescription('IPv4 Ethernet mask of the local unit in a number format (XXX.XXX.XXX.XXX)') remote_ip = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 2, 3), ip_address()).setMaxAccess('readwrite') if mibBuilder.loadTexts: remoteIp.setStatus('mandatory') if mibBuilder.loadTexts: remoteIp.setDescription('IPv4 Ethernet address of the remote unit in a number format (XXX.XXX.XXX.XXX).') radio_table = mib_table((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10)) if mibBuilder.loadTexts: radioTable.setStatus('mandatory') if mibBuilder.loadTexts: radioTable.setDescription('Radio table.') radio_entry = mib_table_row((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1)).setIndexNames((0, 'SAF-IPRADIO', 'radioIndex')) if mibBuilder.loadTexts: radioEntry.setStatus('mandatory') if mibBuilder.loadTexts: radioEntry.setDescription('Entry containing objects in radio table.') radio_index = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('local', 1), ('remote', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: radioIndex.setStatus('mandatory') if mibBuilder.loadTexts: radioIndex.setDescription("A unique value for each radio. Its value represents UNIT: 1 - for 'local'; 2 - for 'remote'") radio_gen_status = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: radioGenStatus.setStatus('mandatory') if mibBuilder.loadTexts: radioGenStatus.setDescription("A General status of each radio: 1 - 'OK'; 2 - 'error'") radio_side = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('high', 1), ('low', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: radioSide.setStatus('mandatory') if mibBuilder.loadTexts: radioSide.setDescription('Side for duplex communication.') radio_tx_power = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 4), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: radioTxPower.setStatus('mandatory') if mibBuilder.loadTexts: radioTxPower.setDescription('Tx power of radio transmitter in dBm.') radio_rx_level = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: radioRxLevel.setStatus('mandatory') if mibBuilder.loadTexts: radioRxLevel.setDescription('Received signal level in dBm.') radio_duplex_shift = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 6), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: radioDuplexShift.setStatus('mandatory') if mibBuilder.loadTexts: radioDuplexShift.setDescription('Utilized duplex shift in KHz.') radio_loopback = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: radioLoopback.setStatus('mandatory') if mibBuilder.loadTexts: radioLoopback.setDescription('Radio loopback on/off. To set use loopback command.') radio_tx_mute = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: radioTxMute.setStatus('mandatory') if mibBuilder.loadTexts: radioTxMute.setDescription("Status of 'Tx mute': 1 - Tx is muted; 2 - Tx is not muted.") radio_tx_frequency = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 9), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: radioTxFrequency.setStatus('mandatory') if mibBuilder.loadTexts: radioTxFrequency.setDescription('Tx frequency in kHz.') radio_rx_frequency = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 10, 1, 10), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: radioRxFrequency.setStatus('mandatory') if mibBuilder.loadTexts: radioRxFrequency.setDescription('Rx frequency in kHz.') a_tpc_table = mib_table((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 11)) if mibBuilder.loadTexts: aTPCTable.setStatus('mandatory') if mibBuilder.loadTexts: aTPCTable.setDescription('ATPC table') a_tpc_entry = mib_table_row((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 11, 1)).setIndexNames((0, 'SAF-IPRADIO', 'atpcIndex')) if mibBuilder.loadTexts: aTPCEntry.setStatus('mandatory') if mibBuilder.loadTexts: aTPCEntry.setDescription('Entry containing objects in ATPC table.') atpc_index = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 11, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('local', 1), ('remote', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: atpcIndex.setStatus('mandatory') if mibBuilder.loadTexts: atpcIndex.setDescription("Its value represents UNIT 1 for 'local'; 2 for 'remote'.") atpc_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 11, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: atpcEnabled.setStatus('mandatory') if mibBuilder.loadTexts: atpcEnabled.setDescription("ATPC status: 1 for 'on'; 2 for 'off'.") atpc_tx_power_correction = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 11, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: atpcTxPowerCorrection.setStatus('mandatory') if mibBuilder.loadTexts: atpcTxPowerCorrection.setDescription('ATPC Tx power correction in dBm.') modem_table = mib_table((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12)) if mibBuilder.loadTexts: modemTable.setStatus('mandatory') if mibBuilder.loadTexts: modemTable.setDescription('CFIP modem table.') modem_entry = mib_table_row((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1)).setIndexNames((0, 'SAF-IPRADIO', 'modemIndex')) if mibBuilder.loadTexts: modemEntry.setStatus('mandatory') if mibBuilder.loadTexts: modemEntry.setDescription('Entry containing objects in modem table.') modem_index = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('local', 1), ('remote', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: modemIndex.setStatus('mandatory') if mibBuilder.loadTexts: modemIndex.setDescription('Value represents UNIT: 1 for local; 2 for remote.') modem_general_status = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemGeneralStatus.setStatus('mandatory') if mibBuilder.loadTexts: modemGeneralStatus.setDescription("A General status of each modem: 1 - 'OK'; 2 - 'error'") modem_bandwith = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 3), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: modemBandwith.setStatus('mandatory') if mibBuilder.loadTexts: modemBandwith.setDescription('Modem bandwidth set in KHz.') modem_e1_t1_channels = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 4), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: modemE1T1Channels.setStatus('mandatory') if mibBuilder.loadTexts: modemE1T1Channels.setDescription('Number of E1 or T1 channels set.') modem_modulation = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 40, 41, 42, 49, 50, 57, 58))).clone(namedValues=named_values(('qpsk', 1), ('psk8', 2), ('qam16', 3), ('qam32', 4), ('qam64', 5), ('qam128', 6), ('qam256', 7), ('qpsklimited', 8), ('wqpsk', 9), ('wpsk8', 10), ('wqam16', 11), ('wqam32', 12), ('wqam64', 13), ('wqam128', 14), ('wqam256', 15), ('acmqpsk', 17), ('acmpsk8', 18), ('acmqam16', 19), ('acmqam32', 20), ('acmqam64', 21), ('acmqam128', 22), ('acmqam256', 23), ('acmwqpsk', 25), ('acmwpsk8', 26), ('acmwqam16', 27), ('acmwqam32', 28), ('acmwqam64', 29), ('acmwqam128', 30), ('acmwqam256', 31), ('qam4', 33), ('qam8', 34), ('qam4limited', 40), ('wqam4', 41), ('wqam8', 42), ('acmqam4', 49), ('acmqam8', 50), ('acmwqam4', 57), ('acmwqam8', 58)))).setMaxAccess('readonly') if mibBuilder.loadTexts: modemModulation.setStatus('mandatory') if mibBuilder.loadTexts: modemModulation.setDescription('Modem modulation set. Modulution values are following: QPSK - 1, 8PSK - 2, 16QAM - 3, 32QAM - 4, 64QAM - 5, 128QAM - 6, 256QAM - 7. The combination of wide band and ACM calculates as (modulation + 8*is_wide + 16*is_ACM). Note: not all of listed modulations supported by hardware. Plese check manual.') modem_total_capacity = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemTotalCapacity.setStatus('mandatory') if mibBuilder.loadTexts: modemTotalCapacity.setDescription('Total capacity set in Kbps.') modem_ethernet_capacity = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 7), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemEthernetCapacity.setStatus('mandatory') if mibBuilder.loadTexts: modemEthernetCapacity.setDescription('Ethernet capacity set in Kbps.') modem_acq_status = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemAcqStatus.setStatus('mandatory') if mibBuilder.loadTexts: modemAcqStatus.setDescription(' ') modem_last_acq_error = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=named_values(('success', 1), ('erragc', 2), ('errtiming', 3), ('errfreqsweep', 4), ('errmse', 5), ('errbit', 6), ('errservice', 7), ('errblind', 8), ('errtimeout', 9), ('errstopped', 10), ('errfatal', 11)))).setMaxAccess('readonly') if mibBuilder.loadTexts: modemLastAcqError.setStatus('mandatory') if mibBuilder.loadTexts: modemLastAcqError.setDescription(' ') modem_radial_mse = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 10), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemRadialMSE.setStatus('mandatory') if mibBuilder.loadTexts: modemRadialMSE.setDescription("Radial mean square error value *10 in dB. Radial MSE is a method for estimating the signal to noise ratio. ACM engine uses normalized MSE, which is the inverse of SNR. It is calculated by dividing the estimated MSE level with the energy of the received constellation. Radial MSE peak value threshold is dependent on modulation used and LDPC code rate. In case of QPSK it is -8 dB (-10.5 for 'wide'), 16APSK - -13 dB (-18 for 'wide') and 32APSK - -15.5 dB (-21.5 for 'wide'). If the value trespasses this threshold, BER at the output of LDPC decoder will reach the value of 1.0e-06.") modem_internal_ag_cgain = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 11), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemInternalAGCgain.setStatus('mandatory') if mibBuilder.loadTexts: modemInternalAGCgain.setDescription(' dBm ') modem_carrier_offset = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 12), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemCarrierOffset.setStatus('mandatory') if mibBuilder.loadTexts: modemCarrierOffset.setDescription('Carrier frequency offset in Hz.') modem_symbol_rate_tx = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 13), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemSymbolRateTx.setStatus('mandatory') if mibBuilder.loadTexts: modemSymbolRateTx.setDescription(' kHz ') modem_symbol_rate_rx = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 14), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemSymbolRateRx.setStatus('mandatory') if mibBuilder.loadTexts: modemSymbolRateRx.setDescription(' kHz ') modem_ldp_cdecoder_stress = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 15), display_string().subtype(subtypeSpec=value_size_constraint(0, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: modemLDPCdecoderStress.setStatus('mandatory') if mibBuilder.loadTexts: modemLDPCdecoderStress.setDescription("The load of LDPC (low-density parity-check code) decoder. The LDPC is monitored for the number of errors being corrected on the input of LDPC decoder. LDPC stress value thresholds @ BER 1.0e-06: - for standard settings ~4.0e-02; - for 'wide' option ~ 1.0e-03. As long as LDPC stress value is under the specified thresholds, amount of errors (and BER itself) on the output of LDPC remains at zero level.") modem_ac_mengine = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: modemACMengine.setStatus('mandatory') if mibBuilder.loadTexts: modemACMengine.setDescription("Status of ACM engine. When 'on', value '1' is shown, when 'off' - value is '2'.") modem_ac_mmodulation_min = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 40, 41, 42, 49, 50, 57, 58))).clone(namedValues=named_values(('qpsk', 1), ('psk8', 2), ('qam16', 3), ('qam32', 4), ('qam64', 5), ('qam128', 6), ('qam256', 7), ('qpsklimited', 8), ('wqpsk', 9), ('wpsk8', 10), ('wqam16', 11), ('wqam32', 12), ('wqam64', 13), ('wqam128', 14), ('wqam256', 15), ('acmqpsk', 17), ('acmpsk8', 18), ('acmqam16', 19), ('acmqam32', 20), ('acmqam64', 21), ('acmqam128', 22), ('acmqam256', 23), ('acmwqpsk', 25), ('acmwpsk8', 26), ('acmwqam16', 27), ('acmwqam32', 28), ('acmwqam64', 29), ('acmwqam128', 30), ('acmwqam256', 31), ('qam4', 33), ('qam8', 34), ('qam4limited', 40), ('wqam4', 41), ('wqam8', 42), ('acmqam4', 49), ('acmqam8', 50), ('acmwqam4', 57), ('acmwqam8', 58)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: modemACMmodulationMin.setStatus('mandatory') if mibBuilder.loadTexts: modemACMmodulationMin.setDescription('Modem modulation set. Modulution values are following: QPSK - 1, 8PSK - 2, 16QAM - 3, 32QAM - 4, 64QAM - 5, 128QAM - 6, 256QAM - 7. The combination of wide band and ACM calculates as (modulation + 8*is_wide + 16*is_ACM). Note: not all of listed modulations supported by hardware. Plese check manual.') modem_ac_mtotal_capacity = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 18), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemACMtotalCapacity.setStatus('mandatory') if mibBuilder.loadTexts: modemACMtotalCapacity.setDescription('Total capacity in Kbps set by ACM.') modem_ac_methernet_capacity = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 19), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemACMethernetCapacity.setStatus('mandatory') if mibBuilder.loadTexts: modemACMethernetCapacity.setDescription('Ethernet capacity in Kbps set by ACM.') modem_standard = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 20), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('etsi', 1), ('ansi', 2)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: modemStandard.setStatus('mandatory') if mibBuilder.loadTexts: modemStandard.setDescription('Modem operational standard ETSI or ANSI') modem_e1_t1_channel_mask = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 21), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: modemE1T1ChannelMask.setStatus('mandatory') if mibBuilder.loadTexts: modemE1T1ChannelMask.setDescription('E1 or T1 channel mask 0x00 - 0x0f') modem_ac_mmodulation_max = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 22), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 40, 41, 42, 49, 50, 57, 58))).clone(namedValues=named_values(('qpsk', 1), ('psk8', 2), ('qam16', 3), ('qam32', 4), ('qam64', 5), ('qam128', 6), ('qam256', 7), ('qpsklimited', 8), ('wqpsk', 9), ('wpsk8', 10), ('wqam16', 11), ('wqam32', 12), ('wqam64', 13), ('wqam128', 14), ('wqam256', 15), ('acmqpsk', 17), ('acmpsk8', 18), ('acmqam16', 19), ('acmqam32', 20), ('acmqam64', 21), ('acmqam128', 22), ('acmqam256', 23), ('acmwqpsk', 25), ('acmwpsk8', 26), ('acmwqam16', 27), ('acmwqam32', 28), ('acmwqam64', 29), ('acmwqam128', 30), ('acmwqam256', 31), ('qam4', 33), ('qam8', 34), ('qam4limited', 40), ('wqam4', 41), ('wqam8', 42), ('acmqam4', 49), ('acmqam8', 50), ('acmwqam4', 57), ('acmwqam8', 58)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: modemACMmodulationMax.setStatus('mandatory') if mibBuilder.loadTexts: modemACMmodulationMax.setDescription('Modem modulation set. Modulution values are following: QPSK - 1, 8PSK - 2, 16QAM - 3, 32QAM - 4, 64QAM - 5, 128QAM - 6, 256QAM - 7. The combination of wide band and ACM calculates as (modulation + 8*is_wide + 16*is_ACM). Note: as PSK modulations are now physicaly deprecated, theese are replased with QAM, so for new QAM modulations there are modificatior +32. Note: not all of listed modulations supported by hardware. Plese check manual.') modem_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 12, 1, 23), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 3, 4))).clone(namedValues=named_values(('active', 1), ('notReady', 3), ('undo', 4)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: modemRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: modemRowStatus.setDescription('Row status - to update written data for modemBandwith, modemACMmodulationMin, modemACMmodulationMax, modemE1T1ChannelMask. ') vlans_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2), ('reset', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: vlansEnabled.setStatus('mandatory') if mibBuilder.loadTexts: vlansEnabled.setDescription('unit temperature *10 degrees Celsius') vlan_table = mib_table((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 14)) if mibBuilder.loadTexts: vlanTable.setStatus('mandatory') if mibBuilder.loadTexts: vlanTable.setDescription('Vlan table') vlan_entry = mib_table_row((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 14, 1)) ifEntry.registerAugmentions(('SAF-IPRADIO', 'vlanEntry')) vlanEntry.setIndexNames(*ifEntry.getIndexNames()) if mibBuilder.loadTexts: vlanEntry.setStatus('mandatory') if mibBuilder.loadTexts: vlanEntry.setDescription('entry containing vlan objects') vlan_number = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 14, 1, 1), integer32()).setMaxAccess('readwrite') if mibBuilder.loadTexts: vlanNumber.setStatus('mandatory') if mibBuilder.loadTexts: vlanNumber.setDescription('A unique value for each vlan. ') vlan_port_type = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 14, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('management', 1), ('none', 2), ('traffic', 3), ('endpoint', 4)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: vlanPortType.setStatus('mandatory') if mibBuilder.loadTexts: vlanPortType.setDescription('VLAN port type management, traffic or endpoint ') vlan_portmap = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 14, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: vlanPortmap.setStatus('mandatory') if mibBuilder.loadTexts: vlanPortmap.setDescription('display port bindings bitfield 111(bin) ') vlan_fid = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 14, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: vlanFid.setStatus('optional') if mibBuilder.loadTexts: vlanFid.setDescription('a filtering identifier (assigned automagically)') vlan_cfg_stat = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 14, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('enable', 1), ('disable', 2), ('clear', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: vlanCfgStat.setStatus('mandatory') if mibBuilder.loadTexts: vlanCfgStat.setDescription('enable/disable vlan # or clear row data') vlan_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 1, 1, 14, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 3, 4))).clone(namedValues=named_values(('active', 1), ('notReady', 3), ('undo', 4)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: vlanRowStatus.setStatus('mandatory') if mibBuilder.loadTexts: vlanRowStatus.setDescription('Row status (execute configuration on active) Changing any table value sets this value into state notReady. To update row status write value active(1) into this variable.') eth_rx_truncated_frames = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXTruncatedFrames.setStatus('mandatory') if mibBuilder.loadTexts: ethRXTruncatedFrames.setDescription('Number of truncated received frames since unit start or statistics reset. ') eth_rx_long_events = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXLongEvents.setStatus('mandatory') if mibBuilder.loadTexts: ethRXLongEvents.setDescription('Number of frames having byte count greater than MAXIMUM FRAME SIZE parameter (1518, 1536 or 1916 bytes) since unit start or statistics reset.') eth_rx_vlan_tags_detected = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXVlanTagsDetected.setStatus('mandatory') if mibBuilder.loadTexts: ethRXVlanTagsDetected.setDescription('Number of VLAN Tags detected since unit start or statistics reset.') eth_rx_unsup_opcodes = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXUnsupOpcodes.setStatus('mandatory') if mibBuilder.loadTexts: ethRXUnsupOpcodes.setDescription('Number of frames recognized as control frames but contained an Unknown Opcode since unit start or statistics reset.') eth_rx_pause_frames = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXPauseFrames.setStatus('mandatory') if mibBuilder.loadTexts: ethRXPauseFrames.setDescription('Number of frames received as control frames with valid PAUSE opcodes since unit start or statistics reset.') eth_rx_control_frames = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXControlFrames.setStatus('mandatory') if mibBuilder.loadTexts: ethRXControlFrames.setDescription('Number of frames received as control frames since unit start or statistics reset.') eth_rx_drible_nibbles = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 7), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXDribleNibbles.setStatus('mandatory') if mibBuilder.loadTexts: ethRXDribleNibbles.setDescription('Indicates that following the end of the packet additional 1 to 7 bits are received. A single nibble, named the dribble nibble, is formed but not sent to the system;') eth_rx_broadcasts = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 8), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXBroadcasts.setStatus('mandatory') if mibBuilder.loadTexts: ethRXBroadcasts.setDescription('Number of packets, which destination address contained broadcast address, since unit start or statiistics reset.') eth_rx_multicasts = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 9), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXMulticasts.setStatus('mandatory') if mibBuilder.loadTexts: ethRXMulticasts.setDescription('Number of packets, which destination address contained multicast address since unit start or statistics reset.') eth_rx_dones = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXDones.setStatus('mandatory') if mibBuilder.loadTexts: ethRXDones.setDescription('Reception of packets successfully completed. Number of completed packets since unit start or statistics reset.') eth_rx_out_of_range_errors = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXOutOfRangeErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethRXOutOfRangeErrors.setDescription('Number of frames where Type/Length field larger than 1518 (Type Field) bytes since unit start or statistics reset.') eth_rx_length_checkerrors_errors = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 12), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXLengthCheckerrorsErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethRXLengthCheckerrorsErrors.setDescription('Number of frames where frame length field in the packet does not match the actual data byte length and is not a Type Field since unit start or statistics reset.') eth_rxcrc_errors = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 13), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXCRCErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethRXCRCErrors.setDescription('Number of frames where frame CRC do not match the internally generated CRC since unit start or statistics reset') eth_rx_code_errors = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 14), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXCodeErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethRXCodeErrors.setDescription('Number of packets where one or more nibbles are signalled as errors during reception of the packet since unit start or statistics reset.') eth_rx_false_carrier_errors = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 15), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXFalseCarrierErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethRXFalseCarrierErrors.setDescription('Indicates that following the last receive statistics vector, a false carrier was detected, noted and reported with this the next receive statistics. The false carrier is not associated with this packet. False carrier is activated on the receive channel that does not result in a packet receive attempt being made;') eth_rx_dv_event = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 16), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXDvEvent.setStatus('mandatory') if mibBuilder.loadTexts: ethRXDvEvent.setDescription('Number of the last receive (Rx) events seen being too short to be valid packets since the last unit (re)start or purification of statistics.') eth_rx_prev_pkt_dropped = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 17), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXPrevPktDropped.setStatus('mandatory') if mibBuilder.loadTexts: ethRXPrevPktDropped.setDescription('Indicates that since the last receive (Rx), a packet is dropped (i.e. interframe gap too small).') eth_rx_byte_counter_hi = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 18), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXByteCounterHi.setStatus('mandatory') if mibBuilder.loadTexts: ethRXByteCounterHi.setDescription('Total number of bytes received (Rx) on the wire since the last unit (re)start or purification of statistics, not counting collided bytes (bits 31:0).') eth_rx_byte_counter_low = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 19), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethRXByteCounterLow.setStatus('mandatory') if mibBuilder.loadTexts: ethRXByteCounterLow.setDescription('Total number of bytes received (Rx) on the wire since the last unit (re)start or purification of statistics, not counting collided bytes (bits 62:32).') eth_tx_vlan_tags = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 21), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXVlanTags.setStatus('mandatory') if mibBuilder.loadTexts: ethTXVlanTags.setDescription('Number of VLAN tagged Tx packets since the last unit (re)start or purification of statistics. 32-bit counter.') eth_tx_backpres_events = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 22), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXBackpresEvents.setStatus('mandatory') if mibBuilder.loadTexts: ethTXBackpresEvents.setDescription('Number of times Tx carrier-sense-method backpressure was previously applied since the last unit (re)start or purification of statistics.') eth_tx_pause_frames = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 23), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXPauseFrames.setStatus('mandatory') if mibBuilder.loadTexts: ethTXPauseFrames.setDescription('Number of frames transmitted (Tx) as control frames with valid PAUSE opcodes since the last unit (re)start or purification of statistics.') eth_tx_control_frames = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 24), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXControlFrames.setStatus('mandatory') if mibBuilder.loadTexts: ethTXControlFrames.setDescription('Number of frames transmitted (Tx) as control frames since the last unit (re)start or purification of statistics.') eth_tx_wire_byte_counter_hi = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 25), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXWireByteCounterHi.setStatus('mandatory') if mibBuilder.loadTexts: ethTXWireByteCounterHi.setDescription('Total number of bytes transmitted (Tx) on the wire since the last unit (re)start or purification of statistics, including all bytes from collided attempts (bits 31:0).') eth_tx_wire_byte_counter_low = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 26), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXWireByteCounterLow.setStatus('mandatory') if mibBuilder.loadTexts: ethTXWireByteCounterLow.setDescription('Total number of bytes transmitted (Tx) on the wire since the last unit (re)start or purification of statistics, including all bytes from collided attempts (bits 62:32).') eth_tx_underruns = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 28), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXUnderruns.setStatus('mandatory') if mibBuilder.loadTexts: ethTXUnderruns.setDescription('Number of underruns occured during frame transmission (Tx) since the last unit (re)start or purification of statistics.') eth_tx_giants = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 29), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXGiants.setStatus('mandatory') if mibBuilder.loadTexts: ethTXGiants.setDescription('Number of Tx frames having byte count greater than the MAXIMUM FRAME SIZE parameter (1516, 1536 or 1916 bytes) since the last unit (re)start or purification of statistics.') eth_tx_late_collisions = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 30), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXLateCollisions.setStatus('mandatory') if mibBuilder.loadTexts: ethTXLateCollisions.setDescription('Number of Tx collisions occurred beyond the collision window (512 bit times) since the last unit (re)start or purification of statistics.') eth_tx_max_collisions = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 31), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXMaxCollisions.setStatus('mandatory') if mibBuilder.loadTexts: ethTXMaxCollisions.setDescription('Number of Tx packets aborted after number of collisions exceeded the RETRANSMISSION MAXIMUM parameter since the last unit (re)start or purification of statistics.') eth_tx_excessive_defers = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 32), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXExcessiveDefers.setStatus('mandatory') if mibBuilder.loadTexts: ethTXExcessiveDefers.setDescription('Number of Tx packets deferred in excess of 6,071 nibble times in 100 Mbps mode, or 24,287 bit-times in 10 Mbps mode since the last unit (re)start or purification of statistics.') eth_tx_non_excessive_defers = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 33), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXNonExcessiveDefers.setStatus('mandatory') if mibBuilder.loadTexts: ethTXNonExcessiveDefers.setDescription('Number of Tx packets deferred for at least one attempt, but less than an excessive defer since the last unit (re)start or purification of statistics.') eth_tx_broadcasts = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 34), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXBroadcasts.setStatus('mandatory') if mibBuilder.loadTexts: ethTXBroadcasts.setDescription('Number of Tx packets since the last unit (re)start or purification of statistics, which destination address contained broadcast address.') eth_tx_multicasts = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 35), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXMulticasts.setStatus('mandatory') if mibBuilder.loadTexts: ethTXMulticasts.setDescription('Number of Tx packets since the last unit (re)start or purification of statistics, which destination address contained multicast address.') eth_tx_dones = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 36), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXDones.setStatus('mandatory') if mibBuilder.loadTexts: ethTXDones.setDescription('Number of packets successfully transmitted (Tx) since the last unit (re)start or purification of statistics.') eth_tx_length_check_errors = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 38), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXLengthCheckErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethTXLengthCheckErrors.setDescription('Number of Tx frames since the last unit (re)start or purification of statistics, where length field in the packet does not match the actual data byte length and is not a Type Field') eth_txcrc_errors = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 39), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXCRCErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethTXCRCErrors.setDescription('Number of Tx frames since the last unit (re)start or purification of statistics, where CRC does not match the internally generated CRC.') eth_tx_collisions = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 40), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXCollisions.setStatus('mandatory') if mibBuilder.loadTexts: ethTXCollisions.setDescription('Number of collisions the current packet incurred during transmission (Tx) attempts. Note: Bits 19 through 16 are the collision count on any successfully transmitted packet and as such will not show the possible maximum count of 16 collisions.') eth_tx_byte_counter_hi = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 41), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXByteCounterHi.setStatus('mandatory') if mibBuilder.loadTexts: ethTXByteCounterHi.setDescription('Total count of bytes transmitted (Tx) on the wire not including collided bytes (bits 31:0) since the last unit (re)start or purification of statistics.') eth_tx_byte_counter_low = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 42), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethTXByteCounterLow.setStatus('mandatory') if mibBuilder.loadTexts: ethTXByteCounterLow.setDescription('Total count of bytes transmitted (Tx) on the wire not including collided bytes (bits 62:32) since the last unit (re)start or purification of statistics.') eth_gfpfcs_errors = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 44), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethGFPFCSErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethGFPFCSErrors.setDescription('Number of generic framing procedure (GFP) frames with CRC errors received by the de-encapsulation block since the last unit (re)start or purification of statistics.') eth_gfpchec_errors = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 45), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethGFPCHECErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethGFPCHECErrors.setDescription('Number of generic framing procedure (GFP) frames with CHEC errors received by the de-encapsulation block since the last unit (re)start or purification of statistics.') eth_gfp_droped_frames = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 46), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethGFPDropedFrames.setStatus('mandatory') if mibBuilder.loadTexts: ethGFPDropedFrames.setDescription('Number of generic framing procedure (GFP) frames that were dropped in the de-encapsulation block since the last unit (re)start or purification of statistics.') eth_gfp_delineation_errors = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 47), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethGFPDelineationErrors.setStatus('mandatory') if mibBuilder.loadTexts: ethGFPDelineationErrors.setDescription("Number of 'lost of synchronization' events since the last unit (re)start or purification of statistics.") eth_qosrxq1_frames = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 48), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethQOSRXQ1Frames.setStatus('mandatory') if mibBuilder.loadTexts: ethQOSRXQ1Frames.setDescription('Number of frames received on Q1 since the last unit (re)start or purification of statistics.') eth_qosrxq1_dropped = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 49), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethQOSRXQ1Dropped.setStatus('mandatory') if mibBuilder.loadTexts: ethQOSRXQ1Dropped.setDescription('Number of frames dropped on Q1 since the last unit (re)start or purification of statistics.') eth_qosrxq2_frames = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 50), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethQOSRXQ2Frames.setStatus('mandatory') if mibBuilder.loadTexts: ethQOSRXQ2Frames.setDescription('Number of frames received on Q2 since the last unit (re)start or purification of statistics.') eth_qosrxq2_dropped = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 51), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethQOSRXQ2Dropped.setStatus('mandatory') if mibBuilder.loadTexts: ethQOSRXQ2Dropped.setDescription('Number of frames dropped on Q2 since the last unit (re)start or purification of statistics.') eth_qostx_frames = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 52), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethQOSTXFrames.setStatus('mandatory') if mibBuilder.loadTexts: ethQOSTXFrames.setDescription('Number of frames passed through TX FIFO since the last unit (re)start or purification of statistics.') eth_qostx_dropped = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 2, 53), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: ethQOSTXDropped.setStatus('mandatory') if mibBuilder.loadTexts: ethQOSTXDropped.setDescription('Number of frames dropped in TX FIFO since the last unit (re)start or purification of statistics.') e1t1_stat_table = mib_table((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 3)) if mibBuilder.loadTexts: e1t1StatTable.setStatus('mandatory') if mibBuilder.loadTexts: e1t1StatTable.setDescription('E1 (T1) status Table.') e1t1_stat_entry = mib_table_row((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 3, 1)) ifEntry.registerAugmentions(('SAF-IPRADIO', 'e1t1StatEntry')) e1t1StatEntry.setIndexNames(*ifEntry.getIndexNames()) if mibBuilder.loadTexts: e1t1StatEntry.setStatus('mandatory') if mibBuilder.loadTexts: e1t1StatEntry.setDescription('Entry containing objects in E1 (T1) table') e1t1_los = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 3, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: e1t1LOS.setStatus('mandatory') if mibBuilder.loadTexts: e1t1LOS.setDescription('if signal loss present') e1t1_ais = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 3, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('on', 1), ('off', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: e1t1AIS.setStatus('mandatory') if mibBuilder.loadTexts: e1t1AIS.setDescription('if AIS present') e1t1_channel_nr = mib_table_column((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 3, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: e1t1ChannelNr.setStatus('mandatory') if mibBuilder.loadTexts: e1t1ChannelNr.setDescription('e1 channel number (it is not associated with interface number - ifEntry)') modem_count_time = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 1), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemCountTime.setStatus('mandatory') if mibBuilder.loadTexts: modemCountTime.setDescription('Count time in seconds') modem_errored_block = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 2), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemErroredBlock.setStatus('mandatory') if mibBuilder.loadTexts: modemErroredBlock.setDescription('Errored block') modem_errored_second = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 3), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemErroredSecond.setStatus('mandatory') if mibBuilder.loadTexts: modemErroredSecond.setDescription('Errored second') modem_severely_errored_second = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 4), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemSeverelyErroredSecond.setStatus('mandatory') if mibBuilder.loadTexts: modemSeverelyErroredSecond.setDescription('Severely errored second') modem_background_block_errror = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 5), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemBackgroundBlockErrror.setStatus('mandatory') if mibBuilder.loadTexts: modemBackgroundBlockErrror.setDescription('Background Block Error') modem_total_block_number = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 6), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemTotalBlockNumber.setStatus('mandatory') if mibBuilder.loadTexts: modemTotalBlockNumber.setDescription('Total Block Number') modem_errored_second_ratio = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 7), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemErroredSecondRatio.setStatus('mandatory') if mibBuilder.loadTexts: modemErroredSecondRatio.setDescription('Errorred Second Ratio') modem_severely_errored_second_ratio = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 8), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemSeverelyErroredSecondRatio.setStatus('mandatory') if mibBuilder.loadTexts: modemSeverelyErroredSecondRatio.setDescription('Severely Errorred Second Ratio') modem_background_block_error_ratio = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 9), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemBackgroundBlockErrorRatio.setStatus('mandatory') if mibBuilder.loadTexts: modemBackgroundBlockErrorRatio.setDescription('Background Block Error Ratio') modem_uptime = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 10), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemUptime.setStatus('mandatory') if mibBuilder.loadTexts: modemUptime.setDescription('Uptime (s)') modem_unavailtime = mib_scalar((1, 3, 6, 1, 4, 1, 7571, 100, 1, 1, 5, 1, 3, 4, 11), counter32()).setMaxAccess('readonly') if mibBuilder.loadTexts: modemUnavailtime.setStatus('mandatory') if mibBuilder.loadTexts: modemUnavailtime.setDescription('Unavailtime (s)') mibBuilder.exportSymbols('SAF-IPRADIO', ethTXByteCounterLow=ethTXByteCounterLow, aTPCEntry=aTPCEntry, radioRxFrequency=radioRxFrequency, ethGFPCHECErrors=ethGFPCHECErrors, e1t1LOS=e1t1LOS, vlanPortmap=vlanPortmap, vlanRowStatus=vlanRowStatus, modemTable=modemTable, ipRadioCfgNetwork=ipRadioCfgNetwork, radioTxFrequency=radioTxFrequency, vlanEntry=vlanEntry, radioName=radioName, modemInternalAGCgain=modemInternalAGCgain, modemACMtotalCapacity=modemACMtotalCapacity, sysTemperature=sysTemperature, safip=safip, ethRXDones=ethRXDones, ethRXCRCErrors=ethRXCRCErrors, ethRXDvEvent=ethRXDvEvent, ethRXPrevPktDropped=ethRXPrevPktDropped, radioTxMute=radioTxMute, ethTXMulticasts=ethTXMulticasts, modemLastAcqError=modemLastAcqError, ethQOSRXQ1Dropped=ethQOSRXQ1Dropped, ethTXNonExcessiveDefers=ethTXNonExcessiveDefers, modemIndex=modemIndex, ethQOSTXFrames=ethQOSTXFrames, modemBandwith=modemBandwith, radioDuplexShift=radioDuplexShift, vlanCfgStat=vlanCfgStat, ipRadioCfgGeneral=ipRadioCfgGeneral, ethQOSRXQ1Frames=ethQOSRXQ1Frames, radioEntry=radioEntry, vlansEnabled=vlansEnabled, ethTXBackpresEvents=ethTXBackpresEvents, ethTXCollisions=ethTXCollisions, ethRXLengthCheckerrorsErrors=ethRXLengthCheckerrorsErrors, product=product, ethRXFalseCarrierErrors=ethRXFalseCarrierErrors, radioSide=radioSide, saf=saf, modemACMmodulationMax=modemACMmodulationMax, ethTXControlFrames=ethTXControlFrames, restartcpu=restartcpu, e1t1StatEntry=e1t1StatEntry, vlanNumber=vlanNumber, vlanPortType=vlanPortType, modemSeverelyErroredSecond=modemSeverelyErroredSecond, localIp=localIp, ipRadioCfg=ipRadioCfg, ethRXByteCounterLow=ethRXByteCounterLow, modemTotalCapacity=modemTotalCapacity, radioRxLevel=radioRxLevel, atpcTxPowerCorrection=atpcTxPowerCorrection, loopback_tributary_mask=loopback_tributary_mask, localIpMask=localIpMask, modemEthernetCapacity=modemEthernetCapacity, modemBackgroundBlockErrror=modemBackgroundBlockErrror, ipRadioMgmt=ipRadioMgmt, ethTXLateCollisions=ethTXLateCollisions, ethRXControlFrames=ethRXControlFrames, tehnika=tehnika, ethRXVlanTagsDetected=ethRXVlanTagsDetected, modemUnavailtime=modemUnavailtime, e1t1StatTable=e1t1StatTable, modemCarrierOffset=modemCarrierOffset, modemSymbolRateRx=modemSymbolRateRx, ethTXGiants=ethTXGiants, description=description, ethRXOutOfRangeErrors=ethRXOutOfRangeErrors, vlanFid=vlanFid, radioTable=radioTable, ethRXUnsupOpcodes=ethRXUnsupOpcodes, e1t1ChannelNr=e1t1ChannelNr, ethTXByteCounterHi=ethTXByteCounterHi, modemUptime=modemUptime, ethTXWireByteCounterLow=ethTXWireByteCounterLow, aTPCTable=aTPCTable, atpcIndex=atpcIndex, ethTXVlanTags=ethTXVlanTags, ethRXTruncatedFrames=ethRXTruncatedFrames, pointToPoint=pointToPoint, remoteIp=remoteIp, vlanTable=vlanTable, ipRadio=ipRadio, sysDateAndTime=sysDateAndTime, modemRowStatus=modemRowStatus, writeConfig=writeConfig, ethRXBroadcasts=ethRXBroadcasts, ethRXMulticasts=ethRXMulticasts, ethRXDribleNibbles=ethRXDribleNibbles, ethTXDones=ethTXDones, ethRXPauseFrames=ethRXPauseFrames, modemSymbolRateTx=modemSymbolRateTx, loopbacks=loopbacks, radioGenStatus=radioGenStatus, modemLDPCdecoderStress=modemLDPCdecoderStress, modemStandard=modemStandard, licenseMask=licenseMask, ethGFPDelineationErrors=ethGFPDelineationErrors, ipRadioStat=ipRadioStat, e1t1AIS=e1t1AIS, modemErroredBlock=modemErroredBlock, modemAcqStatus=modemAcqStatus, modemGeneralStatus=modemGeneralStatus, modemSeverelyErroredSecondRatio=modemSeverelyErroredSecondRatio, modemACMethernetCapacity=modemACMethernetCapacity, modemErroredSecondRatio=modemErroredSecondRatio, modemACMmodulationMin=modemACMmodulationMin, ethRXCodeErrors=ethRXCodeErrors, modemBackgroundBlockErrorRatio=modemBackgroundBlockErrorRatio, ethTXWireByteCounterHi=ethTXWireByteCounterHi, ipRadioStatEth=ipRadioStatEth, modemCountTime=modemCountTime, ethTXLengthCheckErrors=ethTXLengthCheckErrors, modemStatistics=modemStatistics, ethTXBroadcasts=ethTXBroadcasts, modemTotalBlockNumber=modemTotalBlockNumber, microwaveRadio=microwaveRadio, radioIndex=radioIndex, ethTXUnderruns=ethTXUnderruns, modemE1T1ChannelMask=modemE1T1ChannelMask, modemACMengine=modemACMengine, modemEntry=modemEntry, ethRXLongEvents=ethRXLongEvents, ethTXMaxCollisions=ethTXMaxCollisions, ethQOSRXQ2Frames=ethQOSRXQ2Frames, ethTXExcessiveDefers=ethTXExcessiveDefers, ethTXCRCErrors=ethTXCRCErrors, ethRXByteCounterHi=ethRXByteCounterHi, modemE1T1Channels=modemE1T1Channels, ethQOSTXDropped=ethQOSTXDropped, ethGFPDropedFrames=ethGFPDropedFrames, radioTxPower=radioTxPower, modemModulation=modemModulation, modemErroredSecond=modemErroredSecond, license=license, atpcEnabled=atpcEnabled, ethQOSRXQ2Dropped=ethQOSRXQ2Dropped, ethGFPFCSErrors=ethGFPFCSErrors, radioLoopback=radioLoopback, ethTXPauseFrames=ethTXPauseFrames, modemRadialMSE=modemRadialMSE)
gopen = open('namecheck.txt' , 'w') for i in range(1,54): fopen = open('%d' % i, 'r') for z in range(100): rline = fopen.readline() if rline: rlist = rline.split('$') name = rlist[0].strip() clg = rlist[1].strip() nlist = name.split(' ') if len(nlist)==1: gopen.write('%s, %s \n' % (name,clg)) else: break fopen.close() gopen.close()
gopen = open('namecheck.txt', 'w') for i in range(1, 54): fopen = open('%d' % i, 'r') for z in range(100): rline = fopen.readline() if rline: rlist = rline.split('$') name = rlist[0].strip() clg = rlist[1].strip() nlist = name.split(' ') if len(nlist) == 1: gopen.write('%s, %s \n' % (name, clg)) else: break fopen.close() gopen.close()
class RectCoordinates: def __init__(self, x, y, w, h): self.startX = int(x) self.startY = int(y) self.w = int(w) self.h = int(h) self.endY = int(y + h) self.endX = int(x + w) def get_frame(self, frame): return frame[self.startY:self.endY, self.startX:self.endX]
class Rectcoordinates: def __init__(self, x, y, w, h): self.startX = int(x) self.startY = int(y) self.w = int(w) self.h = int(h) self.endY = int(y + h) self.endX = int(x + w) def get_frame(self, frame): return frame[self.startY:self.endY, self.startX:self.endX]
# Reading lines from file and putting from a list to a dict dna = dict() contents = [] for line in open('rosalind_gc.txt', 'r').readlines(): contents.append(line.strip('\n')) if line[0] == '>': header = line[1:].rstrip() dna[header] = '' else: dna[header] = dna.get(header) + line.rstrip() # Using the rstrip method above to remove text format fragments (like \n or \t) # and the list greather will receive our final result greather = ['', 0, ''] for key in dna: gc_qtd = 0 for i in range(len(dna.get(key))): if dna.get(key)[i] == 'G' or dna.get(key)[i] == 'C': gc_qtd += 1 gc_percent = 100*gc_qtd/(len(dna.get(key))) if gc_percent > greather[1]: greather[0] = key greather[1] = gc_percent greather[2] = dna.get(key) print(greather[0], '\n', greather[1])
dna = dict() contents = [] for line in open('rosalind_gc.txt', 'r').readlines(): contents.append(line.strip('\n')) if line[0] == '>': header = line[1:].rstrip() dna[header] = '' else: dna[header] = dna.get(header) + line.rstrip() greather = ['', 0, ''] for key in dna: gc_qtd = 0 for i in range(len(dna.get(key))): if dna.get(key)[i] == 'G' or dna.get(key)[i] == 'C': gc_qtd += 1 gc_percent = 100 * gc_qtd / len(dna.get(key)) if gc_percent > greather[1]: greather[0] = key greather[1] = gc_percent greather[2] = dna.get(key) print(greather[0], '\n', greather[1])
#!/usr/bin/python # Filename: func_default.py def say(message='3',times=1): print (message * times) say(); say(times=11) say('Hello') say('World',5) say(2,4)
def say(message='3', times=1): print(message * times) say() say(times=11) say('Hello') say('World', 5) say(2, 4)
def negate_condition(condition: callable): def _f(context): return not condition(context) return _f def dummy(context: dict) -> dict: return context class Transition: def __init__(self, next_state: object, condition: callable, callback: callable = dummy): self.next_state = next_state self.condition = condition self.callback = callback def check_condition(self, context): transition = self.condition(context) if not isinstance(transition, bool): raise RuntimeError(f"Wrong transition return type. " f"Next state: {self.next_state} " f"Returned: {transition} " f"Return type: {type(transition)} " f"Expected: Bool") return transition
def negate_condition(condition: callable): def _f(context): return not condition(context) return _f def dummy(context: dict) -> dict: return context class Transition: def __init__(self, next_state: object, condition: callable, callback: callable=dummy): self.next_state = next_state self.condition = condition self.callback = callback def check_condition(self, context): transition = self.condition(context) if not isinstance(transition, bool): raise runtime_error(f'Wrong transition return type. Next state: {self.next_state} Returned: {transition} Return type: {type(transition)} Expected: Bool') return transition
# python3 def compute_min_number_of_refills(d, m, stops): assert 1 <= d <= 10 ** 5 assert 1 <= m <= 400 assert 1 <= len(stops) <= 300 assert 0 < stops[0] and all(stops[i] < stops[i + 1] for i in range(len(stops) - 1)) and stops[-1] < d count = 0 curr = 0 stops.insert(0, 0) stops.append(d) n = len(stops) - 2 while curr <= n: last = curr while curr <= n and stops[curr + 1] - stops[last] <= m: curr += 1 if curr == last: return -1 elif curr <= n: count += 1 return count if __name__ == '__main__': input_d = int(input()) input_m = int(input()) input_n = int(input()) input_stops = list(map(int, input().split())) assert len(input_stops) == input_n print(compute_min_number_of_refills(input_d, input_m, input_stops))
def compute_min_number_of_refills(d, m, stops): assert 1 <= d <= 10 ** 5 assert 1 <= m <= 400 assert 1 <= len(stops) <= 300 assert 0 < stops[0] and all((stops[i] < stops[i + 1] for i in range(len(stops) - 1))) and (stops[-1] < d) count = 0 curr = 0 stops.insert(0, 0) stops.append(d) n = len(stops) - 2 while curr <= n: last = curr while curr <= n and stops[curr + 1] - stops[last] <= m: curr += 1 if curr == last: return -1 elif curr <= n: count += 1 return count if __name__ == '__main__': input_d = int(input()) input_m = int(input()) input_n = int(input()) input_stops = list(map(int, input().split())) assert len(input_stops) == input_n print(compute_min_number_of_refills(input_d, input_m, input_stops))
def applicant_selector(gpa,ps_score,ec_count): message = "This applicant should be rejected." if (gpa >= 3): if (ps_score >= 90): if (ec_count >= 3): message = "This applicant should be accepted." else: message = "This applicant should be given an in-person interview." return message
def applicant_selector(gpa, ps_score, ec_count): message = 'This applicant should be rejected.' if gpa >= 3: if ps_score >= 90: if ec_count >= 3: message = 'This applicant should be accepted.' else: message = 'This applicant should be given an in-person interview.' return message
# lc551.py # LeetCode 551. Student Attendance Record I `E` # acc | 91% | 13' # A~0f27 class Solution: def checkRecord(self, s: str) -> bool: a = 0 l = 0 for c in s: if c == "L": l += 1 if l > 2: return False else: l = 0 if c == "A": a += 1 if a > 1: return False return True
class Solution: def check_record(self, s: str) -> bool: a = 0 l = 0 for c in s: if c == 'L': l += 1 if l > 2: return False else: l = 0 if c == 'A': a += 1 if a > 1: return False return True
inp = input() def palin(inp): if len(inp)==1: return True elif len(inp)==2: return inp[0]==inp[1] else: return inp[0]==inp[-1] and palin(inp[1:-1]) if palin(inp): print('PALINDROME') else: print('NOT PALINDROME')
inp = input() def palin(inp): if len(inp) == 1: return True elif len(inp) == 2: return inp[0] == inp[1] else: return inp[0] == inp[-1] and palin(inp[1:-1]) if palin(inp): print('PALINDROME') else: print('NOT PALINDROME')
def bazel_toolchains_repositories(): org_chromium_clang_mac() org_chromium_clang_linux_x64() org_chromium_sysroot_linux_x64() org_chromium_binutils_linux_x64() org_chromium_libcxx() org_chromium_libcxxabi() def org_chromium_clang_mac(): native.new_http_archive( name = 'org_chromium_clang_mac', build_file = str(Label('//build_files:org_chromium_clang_mac.BUILD')), sha256 = '4f0aca6ec66281be94c3045550ae15a73befa59c32396112abda0030ef22e9b6', urls = ['http://172.16.52.102/clang/mac/clang-318667-1.tgz'], ) def org_chromium_clang_linux_x64(): native.new_http_archive( name = 'org_chromium_clang_linux_x64', build_file = str(Label('//build_files:org_chromium_clang_linux_x64.BUILD')), sha256 = 'e63e5fe3ec8eee4779812cd16aae0ddaf1256d2e8e93cdd5914a3d3e01355dc1', urls = ['http://172.16.52.102/clang/linux/clang-318667-1.tgz'], ) def org_chromium_sysroot_linux_x64(): native.new_http_archive( name = 'org_chromium_sysroot_linux_x64', build_file = str(Label('//build_files:org_chromium_sysroot_linux_x64.BUILD')), sha256 = '84656a6df544ecef62169cfe3ab6e41bb4346a62d3ba2a045dc5a0a2ecea94a3', urls = ['http://172.16.52.102/clang/linux/debian_stretch_amd64_sysroot.tar.xz'], ) def org_chromium_binutils_linux_x64(): native.new_http_archive( name = 'org_chromium_binutils_linux_x64', build_file = str(Label('//build_files:org_chromium_binutils_linux_x64.BUILD')), sha256 = '24c3df44af5bd377c701ee31b9b704f2ea23456f20e63652c8235a10d7cf1be7', type = 'tar.bz2', urls = ['http://172.16.52.102/clang/linux/binutils.tar.bz2'], ) def org_chromium_libcxx(): native.new_http_archive( name = 'org_chromium_libcxx', build_file = str(Label('//build_files:org_chromium_libcxx.BUILD')), sha256 = '0d86a5ad81ada4a1c80e81a69ae99116d7d0452c85f414d01899500bc4c1eeb8', urls = ['http://172.16.52.102/clang/linux/libcxx-f56f1bba1ade4a408d403ff050d50e837bae47df.tar.gz'], ) def org_chromium_libcxxabi(): native.new_http_archive( name = 'org_chromium_libcxxabi', build_file = str(Label('//build_files:org_chromium_libcxxabi.BUILD')), sha256 = '27fb5d944665ad2985110916fffab079aa07bf13191286587516442d52efd235', urls = ['http://172.16.52.102/clang/linux/libcxxabi-05ba3281482304ae8de31123a594972a495da06d.tar.gz'], )
def bazel_toolchains_repositories(): org_chromium_clang_mac() org_chromium_clang_linux_x64() org_chromium_sysroot_linux_x64() org_chromium_binutils_linux_x64() org_chromium_libcxx() org_chromium_libcxxabi() def org_chromium_clang_mac(): native.new_http_archive(name='org_chromium_clang_mac', build_file=str(label('//build_files:org_chromium_clang_mac.BUILD')), sha256='4f0aca6ec66281be94c3045550ae15a73befa59c32396112abda0030ef22e9b6', urls=['http://172.16.52.102/clang/mac/clang-318667-1.tgz']) def org_chromium_clang_linux_x64(): native.new_http_archive(name='org_chromium_clang_linux_x64', build_file=str(label('//build_files:org_chromium_clang_linux_x64.BUILD')), sha256='e63e5fe3ec8eee4779812cd16aae0ddaf1256d2e8e93cdd5914a3d3e01355dc1', urls=['http://172.16.52.102/clang/linux/clang-318667-1.tgz']) def org_chromium_sysroot_linux_x64(): native.new_http_archive(name='org_chromium_sysroot_linux_x64', build_file=str(label('//build_files:org_chromium_sysroot_linux_x64.BUILD')), sha256='84656a6df544ecef62169cfe3ab6e41bb4346a62d3ba2a045dc5a0a2ecea94a3', urls=['http://172.16.52.102/clang/linux/debian_stretch_amd64_sysroot.tar.xz']) def org_chromium_binutils_linux_x64(): native.new_http_archive(name='org_chromium_binutils_linux_x64', build_file=str(label('//build_files:org_chromium_binutils_linux_x64.BUILD')), sha256='24c3df44af5bd377c701ee31b9b704f2ea23456f20e63652c8235a10d7cf1be7', type='tar.bz2', urls=['http://172.16.52.102/clang/linux/binutils.tar.bz2']) def org_chromium_libcxx(): native.new_http_archive(name='org_chromium_libcxx', build_file=str(label('//build_files:org_chromium_libcxx.BUILD')), sha256='0d86a5ad81ada4a1c80e81a69ae99116d7d0452c85f414d01899500bc4c1eeb8', urls=['http://172.16.52.102/clang/linux/libcxx-f56f1bba1ade4a408d403ff050d50e837bae47df.tar.gz']) def org_chromium_libcxxabi(): native.new_http_archive(name='org_chromium_libcxxabi', build_file=str(label('//build_files:org_chromium_libcxxabi.BUILD')), sha256='27fb5d944665ad2985110916fffab079aa07bf13191286587516442d52efd235', urls=['http://172.16.52.102/clang/linux/libcxxabi-05ba3281482304ae8de31123a594972a495da06d.tar.gz'])
# This file contains the set of rules of basic # defining the constants DIGITS = '0123456789' # defining the token types TOKEN_INT = 'INT' TOKEN_FLOAT = 'FLOAT' TOKEN_PLUS = 'PLUS' TOKEN_MULTI = 'MUL' TOKEN_MINUS = 'MINUS' TOKEN_DIVIDE = 'DIV' TOKEN_LPAREN = 'LPAREN' # left parenthesis TOKEN_RPAREN = 'RPAREN' # right parenthesis # positions class class Position: def __init__(self, indx, line, column, file_name, file_txt): self.indx = indx self.line = line self.column = column self.file_name = file_name self.file_txt = file_txt def go_through(self, current_char): self.indx += 1 self.column += 1 if(current_char == '\n'): self.line += 1 self.column = 0 return self def copy(self): return Position(self.indx, self.line, self.column, self.file_name, self.file_txt) # error class class Error: def __init__(self, position_start, position_end, name, description): self.position_start = position_start self.position_end = position_end self.name = name # name of the error self.description = description # description for you to know how to fix it def error_message(self): message = f'{self.name}: {self.description}' message += f'File {self.position_start.file_name}, line {self.position_start.line + 1}' return message # class to define the illegal character error class IllegalCharError(Error): # usging inheritance here for better organization def __init__(self, position_start, position_end, description): super().__init__(position_start, position_end, 'Illegal Character', description) # defining the architecture of the token and how it's gonna be handled class Token: def __init__(self, the_type, value=None): # type is a reserved word, so make to not put exactly type here self.type = the_type self.value = value def __repr__(self): if self.value: return str(f'{self.type}:{self.value}') return f'{self.type}' # defining the lexer, they give meaning to the tokens through the programming language's set of rules class Lexer: def __init__(self, file_name, txt): self.file_name = file_name self.txt = txt self.position = Position(-1, 0, -1, file_name, txt) # we start at -1, because the advance function is gonna increment the index immediatly self.current_char = None self.next_char() # defining function to iterate through every character def next_char(self): self.position.go_through(self.current_char) self.current_char = self.txt[self.position.indx] if self.position.indx < len(self.txt) else None # defining function to create token based on the rules of basic def create_tokens(self): tokens = [] # list of tokens while self.current_char != None: if (self.current_char in '\t'): self.next_char() elif(self.current_char in DIGITS): tokens.append(self.create_num()) # giving identity to the arithmetic operators # from here elif(self.current_char == '+'): tokens.append(Token(TOKEN_PLUS)) self.next_char() elif(self.current_char == '-'): tokens.append(Token(TOKEN_MINUS)) self.next_char() elif(self.current_char == '*'): tokens.append(Token(TOKEN_MULTI)) self.next_char() elif(self.current_char == '/'): tokens.append(Token(TOKEN_DIVIDE)) self.next_char() elif(self.current_char == '('): tokens.append(Token(TOKEN_LPAREN)) self.next_char() elif(self.current_char == ')'): tokens.append(Token(TOKEN_RPAREN)) self.next_char() # to here elif(self.current_char == ' '): # making it possible to use spaces self.next_char() else: # Throwing error position_start = self.position.copy() illegal_char = self.current_char self.next_char() return [], IllegalCharError(position_start, self.position, "'" + illegal_char + "'") return tokens, None # set of rules to deal with numbers def create_num (self): num_string = '' has_dot = False # has_dot is to define the number as an integer or float while self.current_char != None and self.current_char in DIGITS + '.': if(self.current_char == '.'): if(has_dot): break has_dot = True num_string += '.' else: num_string += self.current_char self.next_char() if(not has_dot): return Token(TOKEN_INT, int(num_string)) else: return Token(TOKEN_FLOAT, float(num_string)) def run(file_name, txt): lexer = Lexer(file_name, txt) tokens, error = lexer.create_tokens() return tokens, error
digits = '0123456789' token_int = 'INT' token_float = 'FLOAT' token_plus = 'PLUS' token_multi = 'MUL' token_minus = 'MINUS' token_divide = 'DIV' token_lparen = 'LPAREN' token_rparen = 'RPAREN' class Position: def __init__(self, indx, line, column, file_name, file_txt): self.indx = indx self.line = line self.column = column self.file_name = file_name self.file_txt = file_txt def go_through(self, current_char): self.indx += 1 self.column += 1 if current_char == '\n': self.line += 1 self.column = 0 return self def copy(self): return position(self.indx, self.line, self.column, self.file_name, self.file_txt) class Error: def __init__(self, position_start, position_end, name, description): self.position_start = position_start self.position_end = position_end self.name = name self.description = description def error_message(self): message = f'{self.name}: {self.description}' message += f'File {self.position_start.file_name}, line {self.position_start.line + 1}' return message class Illegalcharerror(Error): def __init__(self, position_start, position_end, description): super().__init__(position_start, position_end, 'Illegal Character', description) class Token: def __init__(self, the_type, value=None): self.type = the_type self.value = value def __repr__(self): if self.value: return str(f'{self.type}:{self.value}') return f'{self.type}' class Lexer: def __init__(self, file_name, txt): self.file_name = file_name self.txt = txt self.position = position(-1, 0, -1, file_name, txt) self.current_char = None self.next_char() def next_char(self): self.position.go_through(self.current_char) self.current_char = self.txt[self.position.indx] if self.position.indx < len(self.txt) else None def create_tokens(self): tokens = [] while self.current_char != None: if self.current_char in '\t': self.next_char() elif self.current_char in DIGITS: tokens.append(self.create_num()) elif self.current_char == '+': tokens.append(token(TOKEN_PLUS)) self.next_char() elif self.current_char == '-': tokens.append(token(TOKEN_MINUS)) self.next_char() elif self.current_char == '*': tokens.append(token(TOKEN_MULTI)) self.next_char() elif self.current_char == '/': tokens.append(token(TOKEN_DIVIDE)) self.next_char() elif self.current_char == '(': tokens.append(token(TOKEN_LPAREN)) self.next_char() elif self.current_char == ')': tokens.append(token(TOKEN_RPAREN)) self.next_char() elif self.current_char == ' ': self.next_char() else: position_start = self.position.copy() illegal_char = self.current_char self.next_char() return ([], illegal_char_error(position_start, self.position, "'" + illegal_char + "'")) return (tokens, None) def create_num(self): num_string = '' has_dot = False while self.current_char != None and self.current_char in DIGITS + '.': if self.current_char == '.': if has_dot: break has_dot = True num_string += '.' else: num_string += self.current_char self.next_char() if not has_dot: return token(TOKEN_INT, int(num_string)) else: return token(TOKEN_FLOAT, float(num_string)) def run(file_name, txt): lexer = lexer(file_name, txt) (tokens, error) = lexer.create_tokens() return (tokens, error)
{ "targets": [{ "target_name": "ui", "include_dirs": ["<(module_root_dir)/src/includes", "<(module_root_dir)"], "sources": [ '<!@(node tools/list-sources.js)' ], "conditions": [ ["OS=='win'", { "libraries": [ "<(module_root_dir)/libui.lib" ] }], ["OS=='linux'", { "cflags": ["-fvisibility=hidden" ,"-std=gnu11"], 'ldflags': [ "-Wl,-rpath,'$$ORIGIN',-rpath,<(module_root_dir)", ], "libraries": [ "<(module_root_dir)/libui.so" ], 'include_dirs': [ '<!@(pkg-config gtk+-3.0 --cflags-only-I | sed s/-I//g)' ] }], ["OS=='mac'", { "xcode_settings": { "OTHER_LDFLAGS": [ "-fvisibility=hidden", "-L<(module_root_dir)", "-lui", "-rpath", "'@loader_path'", "-rpath", "<(module_root_dir)" ] } }], ] }, { "target_name": "copy_binary", "type":"none", "dependencies": [ "ui" ], "copies": [ { 'destination': '<(module_root_dir)', 'files': ['<(module_root_dir)/build/Release/ui.node'] } ] }] }
{'targets': [{'target_name': 'ui', 'include_dirs': ['<(module_root_dir)/src/includes', '<(module_root_dir)'], 'sources': ['<!@(node tools/list-sources.js)'], 'conditions': [["OS=='win'", {'libraries': ['<(module_root_dir)/libui.lib']}], ["OS=='linux'", {'cflags': ['-fvisibility=hidden', '-std=gnu11'], 'ldflags': ["-Wl,-rpath,'$$ORIGIN',-rpath,<(module_root_dir)"], 'libraries': ['<(module_root_dir)/libui.so'], 'include_dirs': ['<!@(pkg-config gtk+-3.0 --cflags-only-I | sed s/-I//g)']}], ["OS=='mac'", {'xcode_settings': {'OTHER_LDFLAGS': ['-fvisibility=hidden', '-L<(module_root_dir)', '-lui', '-rpath', "'@loader_path'", '-rpath', '<(module_root_dir)']}}]]}, {'target_name': 'copy_binary', 'type': 'none', 'dependencies': ['ui'], 'copies': [{'destination': '<(module_root_dir)', 'files': ['<(module_root_dir)/build/Release/ui.node']}]}]}
class Solution: # Sorting key function (Accepted), O(n log n) time, O(n) space def sortByBits(self, arr: List[int]) -> List[int]: def tup(n): return (bin(n).count('1'), n) return sorted(arr, key=tup) # One Liner (Top Voted), O(n log n) time, O(n) space def sortByBits(self, A): return sorted(A, key=lambda a: (bin(a).count('1'), a))
class Solution: def sort_by_bits(self, arr: List[int]) -> List[int]: def tup(n): return (bin(n).count('1'), n) return sorted(arr, key=tup) def sort_by_bits(self, A): return sorted(A, key=lambda a: (bin(a).count('1'), a))
# # PySNMP MIB module STN-CHASSIS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/STN-CHASSIS-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:03:23 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueRangeConstraint", "ValueSizeConstraint") ObjectGroup, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup") iso, Gauge32, TimeTicks, Integer32, Counter64, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, ObjectIdentity, Bits, IpAddress, Unsigned32, ModuleIdentity, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "Gauge32", "TimeTicks", "Integer32", "Counter64", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "ObjectIdentity", "Bits", "IpAddress", "Unsigned32", "ModuleIdentity", "NotificationType") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") stnNotification, stnSystems = mibBuilder.importSymbols("SPRING-TIDE-NETWORKS-SMI", "stnNotification", "stnSystems") StnHardwareSubModuleType, StnPowerStatus, StnEngineOperStatus, StnEngineAdminStatus, StnResourceStatus, StnModuleAdminStatus, StnModuleOperStatus, StnBatteryStatus, StnFlashStatus, StnHardwareModuleType, StnLedStatus = mibBuilder.importSymbols("SPRING-TIDE-NETWORKS-TC", "StnHardwareSubModuleType", "StnPowerStatus", "StnEngineOperStatus", "StnEngineAdminStatus", "StnResourceStatus", "StnModuleAdminStatus", "StnModuleOperStatus", "StnBatteryStatus", "StnFlashStatus", "StnHardwareModuleType", "StnLedStatus") stnChassis = ModuleIdentity((1, 3, 6, 1, 4, 1, 3551, 2, 1)) if mibBuilder.loadTexts: stnChassis.setLastUpdated('0002160000Z') if mibBuilder.loadTexts: stnChassis.setOrganization('Spring Tide Networks, Inc.') stnChassisObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1)) stnChassisMibConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 2)) stnChassisVars = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 1)) stnModules = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2)) stnLeds = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3)) stnPower = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4)) stnResource = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5)) stnChassisTrapVars = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 100)) stnChassisSysType = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("other", 1), ("stn5000", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: stnChassisSysType.setStatus('current') stnChassisSysDescr = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnChassisSysDescr.setStatus('current') stnChassisId = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnChassisId.setStatus('current') stnSlotTable = MibTable((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1), ) if mibBuilder.loadTexts: stnSlotTable.setStatus('current') stnSlotEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1), ).setIndexNames((0, "STN-CHASSIS-MIB", "stnSlotIndex")) if mibBuilder.loadTexts: stnSlotEntry.setStatus('current') stnSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnSlotIndex.setStatus('current') stnModuleType = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1, 2), StnHardwareModuleType()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnModuleType.setStatus('current') stnModulePeer = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnModulePeer.setStatus('current') stnModuleAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1, 4), StnModuleAdminStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnModuleAdminStatus.setStatus('current') stnModuleOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1, 5), StnModuleOperStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnModuleOperStatus.setStatus('current') stnModuleDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnModuleDescr.setStatus('current') stnModuleLed = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1, 7), StnLedStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnModuleLed.setStatus('current') stnSubModules = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1, 8), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnSubModules.setStatus('current') stnSubModuleTable = MibTable((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2), ) if mibBuilder.loadTexts: stnSubModuleTable.setStatus('current') stnSubModuleEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2, 1), ).setIndexNames((0, "STN-CHASSIS-MIB", "stnSubModuleSlot"), (0, "STN-CHASSIS-MIB", "stnSubModuleIndex")) if mibBuilder.loadTexts: stnSubModuleEntry.setStatus('current') stnSubModuleSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnSubModuleSlot.setStatus('current') stnSubModuleIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnSubModuleIndex.setStatus('current') stnSubModuleType = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2, 1, 3), StnHardwareSubModuleType()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnSubModuleType.setStatus('current') stnSubModulePeer = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnSubModulePeer.setStatus('current') stnSubModuleAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2, 1, 5), StnModuleAdminStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnSubModuleAdminStatus.setStatus('current') stnSubModuleOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2, 1, 6), StnModuleOperStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnSubModuleOperStatus.setStatus('current') stnSubModuleDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2, 1, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnSubModuleDescr.setStatus('current') stnEngineTable = MibTable((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3), ) if mibBuilder.loadTexts: stnEngineTable.setStatus('current') stnEngineEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1), ).setIndexNames((0, "STN-CHASSIS-MIB", "stnEngineIndex")) if mibBuilder.loadTexts: stnEngineEntry.setStatus('current') stnEngineIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnEngineIndex.setStatus('current') stnEngineSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnEngineSlot.setStatus('current') stnEngineCpu = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnEngineCpu.setStatus('current') stnEngineType = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 1), ("swc", 2), ("rpe", 3), ("ecf", 4), ("ecf2", 5)))).setMaxAccess("readonly") if mibBuilder.loadTexts: stnEngineType.setStatus('current') stnEnginePeer = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnEnginePeer.setStatus('current') stnEngineAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1, 6), StnEngineAdminStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnEngineAdminStatus.setStatus('current') stnEngineOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1, 7), StnEngineOperStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnEngineOperStatus.setStatus('current') stnEngineDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1, 8), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnEngineDescr.setStatus('current') stnLedFanTray = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 1), StnLedStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnLedFanTray.setStatus('current') stnLedPowerA = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 2), StnLedStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnLedPowerA.setStatus('current') stnLedPowerB = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 3), StnLedStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnLedPowerB.setStatus('current') stnLedAlarm = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 4), StnLedStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnLedAlarm.setStatus('current') stnFanTrayLedTable = MibTable((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 5), ) if mibBuilder.loadTexts: stnFanTrayLedTable.setStatus('current') stnFanTrayLedEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 5, 1), ).setIndexNames((0, "STN-CHASSIS-MIB", "stnFanTrayLedIndex")) if mibBuilder.loadTexts: stnFanTrayLedEntry.setStatus('current') stnFanTrayLedIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 5, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnFanTrayLedIndex.setStatus('current') stnFanTrayLedSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 5, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnFanTrayLedSlotIndex.setStatus('current') stnFanTrayLedStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 5, 1, 3), StnLedStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnFanTrayLedStatus.setStatus('current') stnPortLedTable = MibTable((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 6), ) if mibBuilder.loadTexts: stnPortLedTable.setStatus('current') stnPortLedEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 6, 1), ).setIndexNames((0, "STN-CHASSIS-MIB", "stnPortLedSlotIndex"), (0, "STN-CHASSIS-MIB", "stnPortLedPortIndex"), (0, "STN-CHASSIS-MIB", "stnPortLedIndex")) if mibBuilder.loadTexts: stnPortLedEntry.setStatus('current') stnPortLedSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 6, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnPortLedSlotIndex.setStatus('current') stnPortLedPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 6, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnPortLedPortIndex.setStatus('current') stnPortLedIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 6, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnPortLedIndex.setStatus('current') stnPortLedStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 6, 1, 4), StnLedStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnPortLedStatus.setStatus('current') stnPortLedDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 6, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnPortLedDescr.setStatus('current') stnPowerTable = MibTable((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 1), ) if mibBuilder.loadTexts: stnPowerTable.setStatus('current') stnPowerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 1, 1), ).setIndexNames((0, "STN-CHASSIS-MIB", "stnPowerIndex")) if mibBuilder.loadTexts: stnPowerEntry.setStatus('current') stnPowerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnPowerIndex.setStatus('current') stnPowerStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 1, 1, 2), StnPowerStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnPowerStatus.setStatus('current') stnPowerDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 1, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnPowerDescr.setStatus('current') stnBatteryTable = MibTable((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 2), ) if mibBuilder.loadTexts: stnBatteryTable.setStatus('current') stnBatteryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 2, 1), ).setIndexNames((0, "STN-CHASSIS-MIB", "stnBatterySlotIndex")) if mibBuilder.loadTexts: stnBatteryEntry.setStatus('current') stnBatterySlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnBatterySlotIndex.setStatus('current') stnBatteryType = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnBatteryType.setStatus('current') stnBatteryStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 2, 1, 3), StnBatteryStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnBatteryStatus.setStatus('current') stnBatteryDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 2, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnBatteryDescr.setStatus('current') stnCpuUtilizationTable = MibTable((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 1), ) if mibBuilder.loadTexts: stnCpuUtilizationTable.setStatus('current') stnCpuUtilizationEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 1, 1), ).setIndexNames((0, "STN-CHASSIS-MIB", "stnCpuUtilizationIndex")) if mibBuilder.loadTexts: stnCpuUtilizationEntry.setStatus('current') stnCpuUtilizationIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnCpuUtilizationIndex.setStatus('current') stnCpuUtilizationCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnCpuUtilizationCurrent.setStatus('current') stnCpuUtilization5Min = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 1, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnCpuUtilization5Min.setStatus('current') stnCpuUtilization15Min = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 1, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnCpuUtilization15Min.setStatus('current') stnCpuUtilization30Min = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 1, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnCpuUtilization30Min.setStatus('current') stnCpuIpTable = MibTable((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 2), ) if mibBuilder.loadTexts: stnCpuIpTable.setStatus('current') stnCpuIpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 2, 1), ).setIndexNames((0, "STN-CHASSIS-MIB", "stnCpuIpIndex")) if mibBuilder.loadTexts: stnCpuIpEntry.setStatus('current') stnCpuIpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnCpuIpIndex.setStatus('current') stnCpuIpRouteLimit = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnCpuIpRouteLimit.setStatus('current') stnCpuIpRoutesInUse = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnCpuIpRoutesInUse.setStatus('current') stnCpuIpRoutesBooked = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnCpuIpRoutesBooked.setStatus('current') stnCpuIpFwdProcesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 2, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnCpuIpFwdProcesses.setStatus('current') stnCpuIpRoutingProcesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 2, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnCpuIpRoutingProcesses.setStatus('current') stnNotificationCfgChangeTime = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 100, 1), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnNotificationCfgChangeTime.setStatus('current') stnNotificationFlashStatus = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 100, 2), StnFlashStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnNotificationFlashStatus.setStatus('current') stnNotificationModuleTemperature = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 100, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnNotificationModuleTemperature.setStatus('current') stnNotificationResourceStatus = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 100, 4), StnResourceStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: stnNotificationResourceStatus.setStatus('current') stnRedundant = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 1)).setObjects(("STN-CHASSIS-MIB", "stnSlotIndex"), ("STN-CHASSIS-MIB", "stnModuleType"), ("STN-CHASSIS-MIB", "stnModuleOperStatus")) if mibBuilder.loadTexts: stnRedundant.setStatus('current') stnNotRedundant = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 2)).setObjects(("STN-CHASSIS-MIB", "stnSlotIndex"), ("STN-CHASSIS-MIB", "stnModuleType"), ("STN-CHASSIS-MIB", "stnModuleOperStatus")) if mibBuilder.loadTexts: stnNotRedundant.setStatus('current') stnModuleUp = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 3)).setObjects(("STN-CHASSIS-MIB", "stnSlotIndex"), ("STN-CHASSIS-MIB", "stnModuleType"), ("STN-CHASSIS-MIB", "stnModuleOperStatus"), ("STN-CHASSIS-MIB", "stnModuleDescr"), ("STN-CHASSIS-MIB", "stnSubModules")) if mibBuilder.loadTexts: stnModuleUp.setStatus('current') stnModuleDown = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 4)).setObjects(("STN-CHASSIS-MIB", "stnSlotIndex"), ("STN-CHASSIS-MIB", "stnModuleType"), ("STN-CHASSIS-MIB", "stnModuleOperStatus"), ("STN-CHASSIS-MIB", "stnModuleDescr"), ("STN-CHASSIS-MIB", "stnSubModules")) if mibBuilder.loadTexts: stnModuleDown.setStatus('current') stnSubModuleUp = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 5)).setObjects(("STN-CHASSIS-MIB", "stnSubModuleSlot"), ("STN-CHASSIS-MIB", "stnSubModuleIndex"), ("STN-CHASSIS-MIB", "stnSubModuleType"), ("STN-CHASSIS-MIB", "stnSubModuleOperStatus"), ("STN-CHASSIS-MIB", "stnSubModuleDescr")) if mibBuilder.loadTexts: stnSubModuleUp.setStatus('current') stnSubModuleDown = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 6)).setObjects(("STN-CHASSIS-MIB", "stnSubModuleSlot"), ("STN-CHASSIS-MIB", "stnSubModuleIndex"), ("STN-CHASSIS-MIB", "stnSubModuleType"), ("STN-CHASSIS-MIB", "stnSubModuleOperStatus"), ("STN-CHASSIS-MIB", "stnSubModuleDescr")) if mibBuilder.loadTexts: stnSubModuleDown.setStatus('current') stnEngineUp = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 7)).setObjects(("STN-CHASSIS-MIB", "stnEngineIndex"), ("STN-CHASSIS-MIB", "stnEngineSlot"), ("STN-CHASSIS-MIB", "stnEngineCpu"), ("STN-CHASSIS-MIB", "stnEngineType"), ("STN-CHASSIS-MIB", "stnEngineOperStatus")) if mibBuilder.loadTexts: stnEngineUp.setStatus('current') stnEngineDown = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 8)).setObjects(("STN-CHASSIS-MIB", "stnEngineIndex"), ("STN-CHASSIS-MIB", "stnEngineSlot"), ("STN-CHASSIS-MIB", "stnEngineCpu"), ("STN-CHASSIS-MIB", "stnEngineType"), ("STN-CHASSIS-MIB", "stnEngineOperStatus")) if mibBuilder.loadTexts: stnEngineDown.setStatus('current') stnBatteryLow = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 9)).setObjects(("STN-CHASSIS-MIB", "stnBatterySlotIndex"), ("STN-CHASSIS-MIB", "stnBatteryType"), ("STN-CHASSIS-MIB", "stnBatteryStatus")) if mibBuilder.loadTexts: stnBatteryLow.setStatus('current') stnFlashFailure = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 10)).setObjects(("STN-CHASSIS-MIB", "stnNotificationFlashStatus")) if mibBuilder.loadTexts: stnFlashFailure.setStatus('current') stnResourceFailure = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 11)).setObjects(("STN-CHASSIS-MIB", "stnNotificationResourceStatus")) if mibBuilder.loadTexts: stnResourceFailure.setStatus('current') stnFailover = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 12)).setObjects(("STN-CHASSIS-MIB", "stnSlotIndex"), ("STN-CHASSIS-MIB", "stnModuleType")) if mibBuilder.loadTexts: stnFailover.setStatus('current') stnCfgChange = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 19)).setObjects(("STN-CHASSIS-MIB", "stnNotificationCfgChangeTime")) if mibBuilder.loadTexts: stnCfgChange.setStatus('current') stnPowerFailure = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 55)).setObjects(("STN-CHASSIS-MIB", "stnPowerIndex"), ("STN-CHASSIS-MIB", "stnPowerStatus")) if mibBuilder.loadTexts: stnPowerFailure.setStatus('current') stnTemperatureFailure = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 56)).setObjects(("STN-CHASSIS-MIB", "stnSlotIndex"), ("STN-CHASSIS-MIB", "stnModuleType"), ("STN-CHASSIS-MIB", "stnSubModuleType"), ("STN-CHASSIS-MIB", "stnNotificationModuleTemperature")) if mibBuilder.loadTexts: stnTemperatureFailure.setStatus('current') stnChassisMibCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 2, 1)) stnChassisMibGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 2, 2)) stnChassisMibComplianceRev1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 3551, 2, 1, 2, 1, 1)).setObjects(("STN-CHASSIS-MIB", "stnChassisMibGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): stnChassisMibComplianceRev1 = stnChassisMibComplianceRev1.setStatus('current') stnChassisMibGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 3551, 2, 1, 2, 2, 1)).setObjects(("STN-CHASSIS-MIB", "stnChassisSysType"), ("STN-CHASSIS-MIB", "stnChassisSysDescr"), ("STN-CHASSIS-MIB", "stnChassisId"), ("STN-CHASSIS-MIB", "stnSlotIndex"), ("STN-CHASSIS-MIB", "stnModuleType"), ("STN-CHASSIS-MIB", "stnModulePeer"), ("STN-CHASSIS-MIB", "stnModuleAdminStatus"), ("STN-CHASSIS-MIB", "stnModuleOperStatus"), ("STN-CHASSIS-MIB", "stnModuleDescr"), ("STN-CHASSIS-MIB", "stnModuleLed"), ("STN-CHASSIS-MIB", "stnSubModules"), ("STN-CHASSIS-MIB", "stnSubModuleSlot"), ("STN-CHASSIS-MIB", "stnSubModuleIndex"), ("STN-CHASSIS-MIB", "stnSubModuleType"), ("STN-CHASSIS-MIB", "stnSubModulePeer"), ("STN-CHASSIS-MIB", "stnSubModuleAdminStatus"), ("STN-CHASSIS-MIB", "stnSubModuleOperStatus"), ("STN-CHASSIS-MIB", "stnSubModuleDescr"), ("STN-CHASSIS-MIB", "stnEngineIndex"), ("STN-CHASSIS-MIB", "stnEngineSlot"), ("STN-CHASSIS-MIB", "stnEngineCpu"), ("STN-CHASSIS-MIB", "stnEngineType"), ("STN-CHASSIS-MIB", "stnEnginePeer"), ("STN-CHASSIS-MIB", "stnEngineAdminStatus"), ("STN-CHASSIS-MIB", "stnEngineOperStatus"), ("STN-CHASSIS-MIB", "stnEngineDescr"), ("STN-CHASSIS-MIB", "stnLedFanTray"), ("STN-CHASSIS-MIB", "stnLedPowerA"), ("STN-CHASSIS-MIB", "stnLedPowerB"), ("STN-CHASSIS-MIB", "stnLedAlarm"), ("STN-CHASSIS-MIB", "stnFanTrayLedIndex"), ("STN-CHASSIS-MIB", "stnFanTrayLedSlotIndex"), ("STN-CHASSIS-MIB", "stnFanTrayLedStatus"), ("STN-CHASSIS-MIB", "stnPortLedSlotIndex"), ("STN-CHASSIS-MIB", "stnPortLedPortIndex"), ("STN-CHASSIS-MIB", "stnPortLedIndex"), ("STN-CHASSIS-MIB", "stnPortLedStatus"), ("STN-CHASSIS-MIB", "stnPortLedDescr"), ("STN-CHASSIS-MIB", "stnPowerIndex"), ("STN-CHASSIS-MIB", "stnPowerStatus"), ("STN-CHASSIS-MIB", "stnPowerDescr"), ("STN-CHASSIS-MIB", "stnBatterySlotIndex"), ("STN-CHASSIS-MIB", "stnBatteryType"), ("STN-CHASSIS-MIB", "stnBatteryStatus"), ("STN-CHASSIS-MIB", "stnBatteryDescr")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): stnChassisMibGroup = stnChassisMibGroup.setStatus('current') mibBuilder.exportSymbols("STN-CHASSIS-MIB", stnBatteryTable=stnBatteryTable, stnCpuUtilizationEntry=stnCpuUtilizationEntry, stnSubModuleSlot=stnSubModuleSlot, stnCfgChange=stnCfgChange, stnFanTrayLedEntry=stnFanTrayLedEntry, stnPortLedTable=stnPortLedTable, stnChassis=stnChassis, stnPowerStatus=stnPowerStatus, stnPowerFailure=stnPowerFailure, stnLeds=stnLeds, stnBatteryStatus=stnBatteryStatus, stnSlotIndex=stnSlotIndex, stnNotRedundant=stnNotRedundant, stnChassisTrapVars=stnChassisTrapVars, stnSubModuleDescr=stnSubModuleDescr, stnNotificationCfgChangeTime=stnNotificationCfgChangeTime, stnEngineDescr=stnEngineDescr, stnCpuIpRoutingProcesses=stnCpuIpRoutingProcesses, stnBatterySlotIndex=stnBatterySlotIndex, stnChassisSysDescr=stnChassisSysDescr, stnSubModuleAdminStatus=stnSubModuleAdminStatus, stnChassisVars=stnChassisVars, stnSubModuleEntry=stnSubModuleEntry, stnFanTrayLedTable=stnFanTrayLedTable, stnCpuUtilization5Min=stnCpuUtilization5Min, stnSubModules=stnSubModules, stnPowerIndex=stnPowerIndex, stnChassisSysType=stnChassisSysType, stnCpuUtilization15Min=stnCpuUtilization15Min, stnResourceFailure=stnResourceFailure, stnCpuIpRouteLimit=stnCpuIpRouteLimit, stnCpuIpRoutesInUse=stnCpuIpRoutesInUse, stnSubModuleType=stnSubModuleType, stnLedFanTray=stnLedFanTray, stnResource=stnResource, stnChassisMibGroups=stnChassisMibGroups, stnEngineEntry=stnEngineEntry, stnPortLedDescr=stnPortLedDescr, stnEngineDown=stnEngineDown, stnFanTrayLedSlotIndex=stnFanTrayLedSlotIndex, stnChassisObjects=stnChassisObjects, stnModules=stnModules, stnCpuUtilization30Min=stnCpuUtilization30Min, stnSlotEntry=stnSlotEntry, stnFanTrayLedStatus=stnFanTrayLedStatus, stnBatteryDescr=stnBatteryDescr, stnSubModuleUp=stnSubModuleUp, stnSubModulePeer=stnSubModulePeer, stnPortLedEntry=stnPortLedEntry, PYSNMP_MODULE_ID=stnChassis, stnSubModuleDown=stnSubModuleDown, stnCpuIpRoutesBooked=stnCpuIpRoutesBooked, stnRedundant=stnRedundant, stnEngineAdminStatus=stnEngineAdminStatus, stnEngineTable=stnEngineTable, stnChassisMibConformance=stnChassisMibConformance, stnEngineSlot=stnEngineSlot, stnBatteryType=stnBatteryType, stnLedPowerB=stnLedPowerB, stnCpuIpFwdProcesses=stnCpuIpFwdProcesses, stnPortLedIndex=stnPortLedIndex, stnCpuUtilizationCurrent=stnCpuUtilizationCurrent, stnFlashFailure=stnFlashFailure, stnChassisMibComplianceRev1=stnChassisMibComplianceRev1, stnModuleLed=stnModuleLed, stnPortLedStatus=stnPortLedStatus, stnChassisId=stnChassisId, stnCpuIpIndex=stnCpuIpIndex, stnModuleUp=stnModuleUp, stnFailover=stnFailover, stnCpuIpTable=stnCpuIpTable, stnSubModuleOperStatus=stnSubModuleOperStatus, stnEngineCpu=stnEngineCpu, stnEngineOperStatus=stnEngineOperStatus, stnEnginePeer=stnEnginePeer, stnBatteryEntry=stnBatteryEntry, stnNotificationResourceStatus=stnNotificationResourceStatus, stnNotificationFlashStatus=stnNotificationFlashStatus, stnSlotTable=stnSlotTable, stnSubModuleIndex=stnSubModuleIndex, stnModuleAdminStatus=stnModuleAdminStatus, stnBatteryLow=stnBatteryLow, stnModuleType=stnModuleType, stnEngineIndex=stnEngineIndex, stnModuleDescr=stnModuleDescr, stnPowerDescr=stnPowerDescr, stnSubModuleTable=stnSubModuleTable, stnModuleOperStatus=stnModuleOperStatus, stnCpuUtilizationTable=stnCpuUtilizationTable, stnPortLedPortIndex=stnPortLedPortIndex, stnChassisMibCompliances=stnChassisMibCompliances, stnModulePeer=stnModulePeer, stnEngineUp=stnEngineUp, stnPowerEntry=stnPowerEntry, stnModuleDown=stnModuleDown, stnNotificationModuleTemperature=stnNotificationModuleTemperature, stnLedPowerA=stnLedPowerA, stnChassisMibGroup=stnChassisMibGroup, stnCpuIpEntry=stnCpuIpEntry, stnPortLedSlotIndex=stnPortLedSlotIndex, stnFanTrayLedIndex=stnFanTrayLedIndex, stnCpuUtilizationIndex=stnCpuUtilizationIndex, stnPowerTable=stnPowerTable, stnPower=stnPower, stnEngineType=stnEngineType, stnLedAlarm=stnLedAlarm, stnTemperatureFailure=stnTemperatureFailure)
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_union, single_value_constraint, constraints_intersection, value_range_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ValueSizeConstraint') (object_group, module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'ModuleCompliance', 'NotificationGroup') (iso, gauge32, time_ticks, integer32, counter64, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, object_identity, bits, ip_address, unsigned32, module_identity, notification_type) = mibBuilder.importSymbols('SNMPv2-SMI', 'iso', 'Gauge32', 'TimeTicks', 'Integer32', 'Counter64', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'ObjectIdentity', 'Bits', 'IpAddress', 'Unsigned32', 'ModuleIdentity', 'NotificationType') (textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString') (stn_notification, stn_systems) = mibBuilder.importSymbols('SPRING-TIDE-NETWORKS-SMI', 'stnNotification', 'stnSystems') (stn_hardware_sub_module_type, stn_power_status, stn_engine_oper_status, stn_engine_admin_status, stn_resource_status, stn_module_admin_status, stn_module_oper_status, stn_battery_status, stn_flash_status, stn_hardware_module_type, stn_led_status) = mibBuilder.importSymbols('SPRING-TIDE-NETWORKS-TC', 'StnHardwareSubModuleType', 'StnPowerStatus', 'StnEngineOperStatus', 'StnEngineAdminStatus', 'StnResourceStatus', 'StnModuleAdminStatus', 'StnModuleOperStatus', 'StnBatteryStatus', 'StnFlashStatus', 'StnHardwareModuleType', 'StnLedStatus') stn_chassis = module_identity((1, 3, 6, 1, 4, 1, 3551, 2, 1)) if mibBuilder.loadTexts: stnChassis.setLastUpdated('0002160000Z') if mibBuilder.loadTexts: stnChassis.setOrganization('Spring Tide Networks, Inc.') stn_chassis_objects = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1)) stn_chassis_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 2)) stn_chassis_vars = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 1)) stn_modules = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2)) stn_leds = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3)) stn_power = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4)) stn_resource = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5)) stn_chassis_trap_vars = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 100)) stn_chassis_sys_type = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('other', 1), ('stn5000', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: stnChassisSysType.setStatus('current') stn_chassis_sys_descr = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 1, 2), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnChassisSysDescr.setStatus('current') stn_chassis_id = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 1, 3), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnChassisId.setStatus('current') stn_slot_table = mib_table((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1)) if mibBuilder.loadTexts: stnSlotTable.setStatus('current') stn_slot_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1)).setIndexNames((0, 'STN-CHASSIS-MIB', 'stnSlotIndex')) if mibBuilder.loadTexts: stnSlotEntry.setStatus('current') stn_slot_index = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnSlotIndex.setStatus('current') stn_module_type = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1, 2), stn_hardware_module_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnModuleType.setStatus('current') stn_module_peer = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnModulePeer.setStatus('current') stn_module_admin_status = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1, 4), stn_module_admin_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnModuleAdminStatus.setStatus('current') stn_module_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1, 5), stn_module_oper_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnModuleOperStatus.setStatus('current') stn_module_descr = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1, 6), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnModuleDescr.setStatus('current') stn_module_led = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1, 7), stn_led_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnModuleLed.setStatus('current') stn_sub_modules = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 1, 1, 8), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnSubModules.setStatus('current') stn_sub_module_table = mib_table((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2)) if mibBuilder.loadTexts: stnSubModuleTable.setStatus('current') stn_sub_module_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2, 1)).setIndexNames((0, 'STN-CHASSIS-MIB', 'stnSubModuleSlot'), (0, 'STN-CHASSIS-MIB', 'stnSubModuleIndex')) if mibBuilder.loadTexts: stnSubModuleEntry.setStatus('current') stn_sub_module_slot = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnSubModuleSlot.setStatus('current') stn_sub_module_index = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnSubModuleIndex.setStatus('current') stn_sub_module_type = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2, 1, 3), stn_hardware_sub_module_type()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnSubModuleType.setStatus('current') stn_sub_module_peer = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnSubModulePeer.setStatus('current') stn_sub_module_admin_status = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2, 1, 5), stn_module_admin_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnSubModuleAdminStatus.setStatus('current') stn_sub_module_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2, 1, 6), stn_module_oper_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnSubModuleOperStatus.setStatus('current') stn_sub_module_descr = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 2, 1, 7), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnSubModuleDescr.setStatus('current') stn_engine_table = mib_table((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3)) if mibBuilder.loadTexts: stnEngineTable.setStatus('current') stn_engine_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1)).setIndexNames((0, 'STN-CHASSIS-MIB', 'stnEngineIndex')) if mibBuilder.loadTexts: stnEngineEntry.setStatus('current') stn_engine_index = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnEngineIndex.setStatus('current') stn_engine_slot = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnEngineSlot.setStatus('current') stn_engine_cpu = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnEngineCpu.setStatus('current') stn_engine_type = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 1), ('swc', 2), ('rpe', 3), ('ecf', 4), ('ecf2', 5)))).setMaxAccess('readonly') if mibBuilder.loadTexts: stnEngineType.setStatus('current') stn_engine_peer = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnEnginePeer.setStatus('current') stn_engine_admin_status = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1, 6), stn_engine_admin_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnEngineAdminStatus.setStatus('current') stn_engine_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1, 7), stn_engine_oper_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnEngineOperStatus.setStatus('current') stn_engine_descr = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 2, 3, 1, 8), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnEngineDescr.setStatus('current') stn_led_fan_tray = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 1), stn_led_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnLedFanTray.setStatus('current') stn_led_power_a = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 2), stn_led_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnLedPowerA.setStatus('current') stn_led_power_b = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 3), stn_led_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnLedPowerB.setStatus('current') stn_led_alarm = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 4), stn_led_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnLedAlarm.setStatus('current') stn_fan_tray_led_table = mib_table((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 5)) if mibBuilder.loadTexts: stnFanTrayLedTable.setStatus('current') stn_fan_tray_led_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 5, 1)).setIndexNames((0, 'STN-CHASSIS-MIB', 'stnFanTrayLedIndex')) if mibBuilder.loadTexts: stnFanTrayLedEntry.setStatus('current') stn_fan_tray_led_index = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 5, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnFanTrayLedIndex.setStatus('current') stn_fan_tray_led_slot_index = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 5, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnFanTrayLedSlotIndex.setStatus('current') stn_fan_tray_led_status = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 5, 1, 3), stn_led_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnFanTrayLedStatus.setStatus('current') stn_port_led_table = mib_table((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 6)) if mibBuilder.loadTexts: stnPortLedTable.setStatus('current') stn_port_led_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 6, 1)).setIndexNames((0, 'STN-CHASSIS-MIB', 'stnPortLedSlotIndex'), (0, 'STN-CHASSIS-MIB', 'stnPortLedPortIndex'), (0, 'STN-CHASSIS-MIB', 'stnPortLedIndex')) if mibBuilder.loadTexts: stnPortLedEntry.setStatus('current') stn_port_led_slot_index = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 6, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnPortLedSlotIndex.setStatus('current') stn_port_led_port_index = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 6, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnPortLedPortIndex.setStatus('current') stn_port_led_index = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 6, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnPortLedIndex.setStatus('current') stn_port_led_status = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 6, 1, 4), stn_led_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnPortLedStatus.setStatus('current') stn_port_led_descr = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 3, 6, 1, 5), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnPortLedDescr.setStatus('current') stn_power_table = mib_table((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 1)) if mibBuilder.loadTexts: stnPowerTable.setStatus('current') stn_power_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 1, 1)).setIndexNames((0, 'STN-CHASSIS-MIB', 'stnPowerIndex')) if mibBuilder.loadTexts: stnPowerEntry.setStatus('current') stn_power_index = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 1, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnPowerIndex.setStatus('current') stn_power_status = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 1, 1, 2), stn_power_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnPowerStatus.setStatus('current') stn_power_descr = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 1, 1, 3), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnPowerDescr.setStatus('current') stn_battery_table = mib_table((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 2)) if mibBuilder.loadTexts: stnBatteryTable.setStatus('current') stn_battery_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 2, 1)).setIndexNames((0, 'STN-CHASSIS-MIB', 'stnBatterySlotIndex')) if mibBuilder.loadTexts: stnBatteryEntry.setStatus('current') stn_battery_slot_index = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 2, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnBatterySlotIndex.setStatus('current') stn_battery_type = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 2, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnBatteryType.setStatus('current') stn_battery_status = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 2, 1, 3), stn_battery_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnBatteryStatus.setStatus('current') stn_battery_descr = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 4, 2, 1, 4), display_string()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnBatteryDescr.setStatus('current') stn_cpu_utilization_table = mib_table((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 1)) if mibBuilder.loadTexts: stnCpuUtilizationTable.setStatus('current') stn_cpu_utilization_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 1, 1)).setIndexNames((0, 'STN-CHASSIS-MIB', 'stnCpuUtilizationIndex')) if mibBuilder.loadTexts: stnCpuUtilizationEntry.setStatus('current') stn_cpu_utilization_index = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 1, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnCpuUtilizationIndex.setStatus('current') stn_cpu_utilization_current = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 1, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnCpuUtilizationCurrent.setStatus('current') stn_cpu_utilization5_min = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 1, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnCpuUtilization5Min.setStatus('current') stn_cpu_utilization15_min = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 1, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnCpuUtilization15Min.setStatus('current') stn_cpu_utilization30_min = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 1, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnCpuUtilization30Min.setStatus('current') stn_cpu_ip_table = mib_table((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 2)) if mibBuilder.loadTexts: stnCpuIpTable.setStatus('current') stn_cpu_ip_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 2, 1)).setIndexNames((0, 'STN-CHASSIS-MIB', 'stnCpuIpIndex')) if mibBuilder.loadTexts: stnCpuIpEntry.setStatus('current') stn_cpu_ip_index = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 2, 1, 1), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnCpuIpIndex.setStatus('current') stn_cpu_ip_route_limit = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 2, 1, 2), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnCpuIpRouteLimit.setStatus('current') stn_cpu_ip_routes_in_use = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 2, 1, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnCpuIpRoutesInUse.setStatus('current') stn_cpu_ip_routes_booked = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 2, 1, 4), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnCpuIpRoutesBooked.setStatus('current') stn_cpu_ip_fwd_processes = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 2, 1, 5), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnCpuIpFwdProcesses.setStatus('current') stn_cpu_ip_routing_processes = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 5, 2, 1, 6), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnCpuIpRoutingProcesses.setStatus('current') stn_notification_cfg_change_time = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 100, 1), time_ticks()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnNotificationCfgChangeTime.setStatus('current') stn_notification_flash_status = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 100, 2), stn_flash_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnNotificationFlashStatus.setStatus('current') stn_notification_module_temperature = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 100, 3), integer32()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnNotificationModuleTemperature.setStatus('current') stn_notification_resource_status = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 1, 1, 100, 4), stn_resource_status()).setMaxAccess('readonly') if mibBuilder.loadTexts: stnNotificationResourceStatus.setStatus('current') stn_redundant = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 1)).setObjects(('STN-CHASSIS-MIB', 'stnSlotIndex'), ('STN-CHASSIS-MIB', 'stnModuleType'), ('STN-CHASSIS-MIB', 'stnModuleOperStatus')) if mibBuilder.loadTexts: stnRedundant.setStatus('current') stn_not_redundant = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 2)).setObjects(('STN-CHASSIS-MIB', 'stnSlotIndex'), ('STN-CHASSIS-MIB', 'stnModuleType'), ('STN-CHASSIS-MIB', 'stnModuleOperStatus')) if mibBuilder.loadTexts: stnNotRedundant.setStatus('current') stn_module_up = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 3)).setObjects(('STN-CHASSIS-MIB', 'stnSlotIndex'), ('STN-CHASSIS-MIB', 'stnModuleType'), ('STN-CHASSIS-MIB', 'stnModuleOperStatus'), ('STN-CHASSIS-MIB', 'stnModuleDescr'), ('STN-CHASSIS-MIB', 'stnSubModules')) if mibBuilder.loadTexts: stnModuleUp.setStatus('current') stn_module_down = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 4)).setObjects(('STN-CHASSIS-MIB', 'stnSlotIndex'), ('STN-CHASSIS-MIB', 'stnModuleType'), ('STN-CHASSIS-MIB', 'stnModuleOperStatus'), ('STN-CHASSIS-MIB', 'stnModuleDescr'), ('STN-CHASSIS-MIB', 'stnSubModules')) if mibBuilder.loadTexts: stnModuleDown.setStatus('current') stn_sub_module_up = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 5)).setObjects(('STN-CHASSIS-MIB', 'stnSubModuleSlot'), ('STN-CHASSIS-MIB', 'stnSubModuleIndex'), ('STN-CHASSIS-MIB', 'stnSubModuleType'), ('STN-CHASSIS-MIB', 'stnSubModuleOperStatus'), ('STN-CHASSIS-MIB', 'stnSubModuleDescr')) if mibBuilder.loadTexts: stnSubModuleUp.setStatus('current') stn_sub_module_down = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 6)).setObjects(('STN-CHASSIS-MIB', 'stnSubModuleSlot'), ('STN-CHASSIS-MIB', 'stnSubModuleIndex'), ('STN-CHASSIS-MIB', 'stnSubModuleType'), ('STN-CHASSIS-MIB', 'stnSubModuleOperStatus'), ('STN-CHASSIS-MIB', 'stnSubModuleDescr')) if mibBuilder.loadTexts: stnSubModuleDown.setStatus('current') stn_engine_up = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 7)).setObjects(('STN-CHASSIS-MIB', 'stnEngineIndex'), ('STN-CHASSIS-MIB', 'stnEngineSlot'), ('STN-CHASSIS-MIB', 'stnEngineCpu'), ('STN-CHASSIS-MIB', 'stnEngineType'), ('STN-CHASSIS-MIB', 'stnEngineOperStatus')) if mibBuilder.loadTexts: stnEngineUp.setStatus('current') stn_engine_down = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 8)).setObjects(('STN-CHASSIS-MIB', 'stnEngineIndex'), ('STN-CHASSIS-MIB', 'stnEngineSlot'), ('STN-CHASSIS-MIB', 'stnEngineCpu'), ('STN-CHASSIS-MIB', 'stnEngineType'), ('STN-CHASSIS-MIB', 'stnEngineOperStatus')) if mibBuilder.loadTexts: stnEngineDown.setStatus('current') stn_battery_low = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 9)).setObjects(('STN-CHASSIS-MIB', 'stnBatterySlotIndex'), ('STN-CHASSIS-MIB', 'stnBatteryType'), ('STN-CHASSIS-MIB', 'stnBatteryStatus')) if mibBuilder.loadTexts: stnBatteryLow.setStatus('current') stn_flash_failure = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 10)).setObjects(('STN-CHASSIS-MIB', 'stnNotificationFlashStatus')) if mibBuilder.loadTexts: stnFlashFailure.setStatus('current') stn_resource_failure = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 11)).setObjects(('STN-CHASSIS-MIB', 'stnNotificationResourceStatus')) if mibBuilder.loadTexts: stnResourceFailure.setStatus('current') stn_failover = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 12)).setObjects(('STN-CHASSIS-MIB', 'stnSlotIndex'), ('STN-CHASSIS-MIB', 'stnModuleType')) if mibBuilder.loadTexts: stnFailover.setStatus('current') stn_cfg_change = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 19)).setObjects(('STN-CHASSIS-MIB', 'stnNotificationCfgChangeTime')) if mibBuilder.loadTexts: stnCfgChange.setStatus('current') stn_power_failure = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 55)).setObjects(('STN-CHASSIS-MIB', 'stnPowerIndex'), ('STN-CHASSIS-MIB', 'stnPowerStatus')) if mibBuilder.loadTexts: stnPowerFailure.setStatus('current') stn_temperature_failure = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 56)).setObjects(('STN-CHASSIS-MIB', 'stnSlotIndex'), ('STN-CHASSIS-MIB', 'stnModuleType'), ('STN-CHASSIS-MIB', 'stnSubModuleType'), ('STN-CHASSIS-MIB', 'stnNotificationModuleTemperature')) if mibBuilder.loadTexts: stnTemperatureFailure.setStatus('current') stn_chassis_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 2, 1)) stn_chassis_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 1, 2, 2)) stn_chassis_mib_compliance_rev1 = module_compliance((1, 3, 6, 1, 4, 1, 3551, 2, 1, 2, 1, 1)).setObjects(('STN-CHASSIS-MIB', 'stnChassisMibGroup')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): stn_chassis_mib_compliance_rev1 = stnChassisMibComplianceRev1.setStatus('current') stn_chassis_mib_group = object_group((1, 3, 6, 1, 4, 1, 3551, 2, 1, 2, 2, 1)).setObjects(('STN-CHASSIS-MIB', 'stnChassisSysType'), ('STN-CHASSIS-MIB', 'stnChassisSysDescr'), ('STN-CHASSIS-MIB', 'stnChassisId'), ('STN-CHASSIS-MIB', 'stnSlotIndex'), ('STN-CHASSIS-MIB', 'stnModuleType'), ('STN-CHASSIS-MIB', 'stnModulePeer'), ('STN-CHASSIS-MIB', 'stnModuleAdminStatus'), ('STN-CHASSIS-MIB', 'stnModuleOperStatus'), ('STN-CHASSIS-MIB', 'stnModuleDescr'), ('STN-CHASSIS-MIB', 'stnModuleLed'), ('STN-CHASSIS-MIB', 'stnSubModules'), ('STN-CHASSIS-MIB', 'stnSubModuleSlot'), ('STN-CHASSIS-MIB', 'stnSubModuleIndex'), ('STN-CHASSIS-MIB', 'stnSubModuleType'), ('STN-CHASSIS-MIB', 'stnSubModulePeer'), ('STN-CHASSIS-MIB', 'stnSubModuleAdminStatus'), ('STN-CHASSIS-MIB', 'stnSubModuleOperStatus'), ('STN-CHASSIS-MIB', 'stnSubModuleDescr'), ('STN-CHASSIS-MIB', 'stnEngineIndex'), ('STN-CHASSIS-MIB', 'stnEngineSlot'), ('STN-CHASSIS-MIB', 'stnEngineCpu'), ('STN-CHASSIS-MIB', 'stnEngineType'), ('STN-CHASSIS-MIB', 'stnEnginePeer'), ('STN-CHASSIS-MIB', 'stnEngineAdminStatus'), ('STN-CHASSIS-MIB', 'stnEngineOperStatus'), ('STN-CHASSIS-MIB', 'stnEngineDescr'), ('STN-CHASSIS-MIB', 'stnLedFanTray'), ('STN-CHASSIS-MIB', 'stnLedPowerA'), ('STN-CHASSIS-MIB', 'stnLedPowerB'), ('STN-CHASSIS-MIB', 'stnLedAlarm'), ('STN-CHASSIS-MIB', 'stnFanTrayLedIndex'), ('STN-CHASSIS-MIB', 'stnFanTrayLedSlotIndex'), ('STN-CHASSIS-MIB', 'stnFanTrayLedStatus'), ('STN-CHASSIS-MIB', 'stnPortLedSlotIndex'), ('STN-CHASSIS-MIB', 'stnPortLedPortIndex'), ('STN-CHASSIS-MIB', 'stnPortLedIndex'), ('STN-CHASSIS-MIB', 'stnPortLedStatus'), ('STN-CHASSIS-MIB', 'stnPortLedDescr'), ('STN-CHASSIS-MIB', 'stnPowerIndex'), ('STN-CHASSIS-MIB', 'stnPowerStatus'), ('STN-CHASSIS-MIB', 'stnPowerDescr'), ('STN-CHASSIS-MIB', 'stnBatterySlotIndex'), ('STN-CHASSIS-MIB', 'stnBatteryType'), ('STN-CHASSIS-MIB', 'stnBatteryStatus'), ('STN-CHASSIS-MIB', 'stnBatteryDescr')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): stn_chassis_mib_group = stnChassisMibGroup.setStatus('current') mibBuilder.exportSymbols('STN-CHASSIS-MIB', stnBatteryTable=stnBatteryTable, stnCpuUtilizationEntry=stnCpuUtilizationEntry, stnSubModuleSlot=stnSubModuleSlot, stnCfgChange=stnCfgChange, stnFanTrayLedEntry=stnFanTrayLedEntry, stnPortLedTable=stnPortLedTable, stnChassis=stnChassis, stnPowerStatus=stnPowerStatus, stnPowerFailure=stnPowerFailure, stnLeds=stnLeds, stnBatteryStatus=stnBatteryStatus, stnSlotIndex=stnSlotIndex, stnNotRedundant=stnNotRedundant, stnChassisTrapVars=stnChassisTrapVars, stnSubModuleDescr=stnSubModuleDescr, stnNotificationCfgChangeTime=stnNotificationCfgChangeTime, stnEngineDescr=stnEngineDescr, stnCpuIpRoutingProcesses=stnCpuIpRoutingProcesses, stnBatterySlotIndex=stnBatterySlotIndex, stnChassisSysDescr=stnChassisSysDescr, stnSubModuleAdminStatus=stnSubModuleAdminStatus, stnChassisVars=stnChassisVars, stnSubModuleEntry=stnSubModuleEntry, stnFanTrayLedTable=stnFanTrayLedTable, stnCpuUtilization5Min=stnCpuUtilization5Min, stnSubModules=stnSubModules, stnPowerIndex=stnPowerIndex, stnChassisSysType=stnChassisSysType, stnCpuUtilization15Min=stnCpuUtilization15Min, stnResourceFailure=stnResourceFailure, stnCpuIpRouteLimit=stnCpuIpRouteLimit, stnCpuIpRoutesInUse=stnCpuIpRoutesInUse, stnSubModuleType=stnSubModuleType, stnLedFanTray=stnLedFanTray, stnResource=stnResource, stnChassisMibGroups=stnChassisMibGroups, stnEngineEntry=stnEngineEntry, stnPortLedDescr=stnPortLedDescr, stnEngineDown=stnEngineDown, stnFanTrayLedSlotIndex=stnFanTrayLedSlotIndex, stnChassisObjects=stnChassisObjects, stnModules=stnModules, stnCpuUtilization30Min=stnCpuUtilization30Min, stnSlotEntry=stnSlotEntry, stnFanTrayLedStatus=stnFanTrayLedStatus, stnBatteryDescr=stnBatteryDescr, stnSubModuleUp=stnSubModuleUp, stnSubModulePeer=stnSubModulePeer, stnPortLedEntry=stnPortLedEntry, PYSNMP_MODULE_ID=stnChassis, stnSubModuleDown=stnSubModuleDown, stnCpuIpRoutesBooked=stnCpuIpRoutesBooked, stnRedundant=stnRedundant, stnEngineAdminStatus=stnEngineAdminStatus, stnEngineTable=stnEngineTable, stnChassisMibConformance=stnChassisMibConformance, stnEngineSlot=stnEngineSlot, stnBatteryType=stnBatteryType, stnLedPowerB=stnLedPowerB, stnCpuIpFwdProcesses=stnCpuIpFwdProcesses, stnPortLedIndex=stnPortLedIndex, stnCpuUtilizationCurrent=stnCpuUtilizationCurrent, stnFlashFailure=stnFlashFailure, stnChassisMibComplianceRev1=stnChassisMibComplianceRev1, stnModuleLed=stnModuleLed, stnPortLedStatus=stnPortLedStatus, stnChassisId=stnChassisId, stnCpuIpIndex=stnCpuIpIndex, stnModuleUp=stnModuleUp, stnFailover=stnFailover, stnCpuIpTable=stnCpuIpTable, stnSubModuleOperStatus=stnSubModuleOperStatus, stnEngineCpu=stnEngineCpu, stnEngineOperStatus=stnEngineOperStatus, stnEnginePeer=stnEnginePeer, stnBatteryEntry=stnBatteryEntry, stnNotificationResourceStatus=stnNotificationResourceStatus, stnNotificationFlashStatus=stnNotificationFlashStatus, stnSlotTable=stnSlotTable, stnSubModuleIndex=stnSubModuleIndex, stnModuleAdminStatus=stnModuleAdminStatus, stnBatteryLow=stnBatteryLow, stnModuleType=stnModuleType, stnEngineIndex=stnEngineIndex, stnModuleDescr=stnModuleDescr, stnPowerDescr=stnPowerDescr, stnSubModuleTable=stnSubModuleTable, stnModuleOperStatus=stnModuleOperStatus, stnCpuUtilizationTable=stnCpuUtilizationTable, stnPortLedPortIndex=stnPortLedPortIndex, stnChassisMibCompliances=stnChassisMibCompliances, stnModulePeer=stnModulePeer, stnEngineUp=stnEngineUp, stnPowerEntry=stnPowerEntry, stnModuleDown=stnModuleDown, stnNotificationModuleTemperature=stnNotificationModuleTemperature, stnLedPowerA=stnLedPowerA, stnChassisMibGroup=stnChassisMibGroup, stnCpuIpEntry=stnCpuIpEntry, stnPortLedSlotIndex=stnPortLedSlotIndex, stnFanTrayLedIndex=stnFanTrayLedIndex, stnCpuUtilizationIndex=stnCpuUtilizationIndex, stnPowerTable=stnPowerTable, stnPower=stnPower, stnEngineType=stnEngineType, stnLedAlarm=stnLedAlarm, stnTemperatureFailure=stnTemperatureFailure)
# Python returning values def withdraw_money(current_bal, amount): if(current_bal >= amount): current_bal -= amount return current_bal balance = withdraw_money(100, 20) if (balance >= 50): print(f"The balance is {balance}.") else: print("You need to make a deposit.")
def withdraw_money(current_bal, amount): if current_bal >= amount: current_bal -= amount return current_bal balance = withdraw_money(100, 20) if balance >= 50: print(f'The balance is {balance}.') else: print('You need to make a deposit.')
while True: n = int(input("Height: ")) width = n if n > 0 and n <= 8: break for num_of_hashes in range(1, n + 1): num_of_spaces = n - num_of_hashes print(" " * num_of_spaces, end="") print("#" * num_of_hashes, end="") print(" ", end="") print("#" * num_of_hashes)
while True: n = int(input('Height: ')) width = n if n > 0 and n <= 8: break for num_of_hashes in range(1, n + 1): num_of_spaces = n - num_of_hashes print(' ' * num_of_spaces, end='') print('#' * num_of_hashes, end='') print(' ', end='') print('#' * num_of_hashes)
class Events: # REPL to USER EVENTS INP = 'inp' OUT = 'out' ERR = 'err' HTML = 'html' EXC = 'exc' PONG = 'pong' PATH = 'path' DONE = 'ended' STARTED = 'started' FORKED = 'forked' # REPL <-> USER EVENTS NOINT = 'noint' # USER to REPL EVENTS WRT = 'wrt' RUN = 'run' PING = 'ping' FORK = 'fork' def encode(event, data=''): return event + ' ' + data.replace('\n', '\\n') def decode(message): msg = message.split(' ', 1) if len(msg) == 1: return msg[0].rstrip(), '' event, data = msg return event, data.replace('\\n', '\n')
class Events: inp = 'inp' out = 'out' err = 'err' html = 'html' exc = 'exc' pong = 'pong' path = 'path' done = 'ended' started = 'started' forked = 'forked' noint = 'noint' wrt = 'wrt' run = 'run' ping = 'ping' fork = 'fork' def encode(event, data=''): return event + ' ' + data.replace('\n', '\\n') def decode(message): msg = message.split(' ', 1) if len(msg) == 1: return (msg[0].rstrip(), '') (event, data) = msg return (event, data.replace('\\n', '\n'))
def test(): # Here we can either check objects created in the solution code, or the # string value of the solution, available as __solution__. A helper for # printing formatted messages is available as __msg__. See the testTemplate # in the meta.json for details. # If an assertion fails, the message will be displayed assert "junk_drawer" in __solution__, "Make sure you are naming your object 'junk_drawer'" assert "drawer_length" in __solution__, "Make sure you are naming your object 'drawer_length'" assert "cleaned_junk_drawer" in __solution__, "Make sure you are naming your object 'cleaned_junk_drawer'" assert "junk_set" in __solution__, "Make sure you are naming your object 'junk_set'" assert len( set(junk_drawer).intersection({3, 4, 7.3, True, 'pen', 'scrap paper'}) ) == 6, "Some items are missing from 'junk_drawer'. Did you add everything?" assert drawer_length == 6, "The length of 'junk_drawer' is incorrect. Did you add everthing?" assert len( cleaned_junk_drawer ) == 3, "The length of 'cleaned_junk_drawer' is incorrect. Are you slicing properly?" assert len( set(junk_set).intersection({4, 'pen', 'scrap paper'}) ) == 3, "Some items are missing from 'junk_set'. Are you slicing properly?" __msg__.good("Nice work, well done!")
def test(): assert 'junk_drawer' in __solution__, "Make sure you are naming your object 'junk_drawer'" assert 'drawer_length' in __solution__, "Make sure you are naming your object 'drawer_length'" assert 'cleaned_junk_drawer' in __solution__, "Make sure you are naming your object 'cleaned_junk_drawer'" assert 'junk_set' in __solution__, "Make sure you are naming your object 'junk_set'" assert len(set(junk_drawer).intersection({3, 4, 7.3, True, 'pen', 'scrap paper'})) == 6, "Some items are missing from 'junk_drawer'. Did you add everything?" assert drawer_length == 6, "The length of 'junk_drawer' is incorrect. Did you add everthing?" assert len(cleaned_junk_drawer) == 3, "The length of 'cleaned_junk_drawer' is incorrect. Are you slicing properly?" assert len(set(junk_set).intersection({4, 'pen', 'scrap paper'})) == 3, "Some items are missing from 'junk_set'. Are you slicing properly?" __msg__.good('Nice work, well done!')
# Runtime Average-case: Theta(n^2) # Runtime Best-case (already sorted): O(n) # Runtime Worst-case (reserve sorted): Theta(n^2) # In Place: Yes # Stable: Yes def insertion_sort(a): for j in range(1, len(a)): key = a[j] # start with element before and keep going back i = j - 1 while i >= 0 and key < a[i]: # keep shifting the elements to the right a[i+1] = a[i] i = i - 1 # place the current element in the right place # we need to add i + 1 because when we break the loop it would be after an extra i - 1 a[i+1] = key a = [4,6,8,9,3,5,1] insertion_sort(a) print(a)
def insertion_sort(a): for j in range(1, len(a)): key = a[j] i = j - 1 while i >= 0 and key < a[i]: a[i + 1] = a[i] i = i - 1 a[i + 1] = key a = [4, 6, 8, 9, 3, 5, 1] insertion_sort(a) print(a)
# Definition for a undirected graph node # class UndirectedGraphNode: # def __init__(self, x): # self.label = x # self.neighbors = [] class Solution: # @param node, a undirected graph node # @return a undirected graph node def cloneGraph(self, node): if not node: return None res = UndirectedGraphNode(node.label) seen = {node.label: res} self.helper(node, res, seen) return res def helper(self, node, answer, seen): seen[answer.label] = answer for i in node.neighbors: if i.label not in seen: nex = UndirectedGraphNode(i.label) answer.neighbors.append(nex) self.helper(i, nex, seen) else: answer.neighbors.append(seen[i.label])
class Solution: def clone_graph(self, node): if not node: return None res = undirected_graph_node(node.label) seen = {node.label: res} self.helper(node, res, seen) return res def helper(self, node, answer, seen): seen[answer.label] = answer for i in node.neighbors: if i.label not in seen: nex = undirected_graph_node(i.label) answer.neighbors.append(nex) self.helper(i, nex, seen) else: answer.neighbors.append(seen[i.label])
squares = [1, 4, 9, 16, 25] print(squares) print(squares[0]) #Get first value; remember index offset print(squares[-1]) #Get last value in sequence print(squares[2:4]) #Return slice of list squares.append(54) #Add new value print(squares) squares[3] = 88 #Insert new value print(squares)
squares = [1, 4, 9, 16, 25] print(squares) print(squares[0]) print(squares[-1]) print(squares[2:4]) squares.append(54) print(squares) squares[3] = 88 print(squares)
# ### Problem 3 # Given 2 lists of claim numbers, write the code to merge the 2 lists provided to produce a new list by alternating values between the 2 lists. Once the merge has been completed, print the new list of claim numbers (DO NOT just print the array variable!) # ``` # # Start with these lists # list_of_claim_nums_1 = [2, 4, 6, 8, 10] # list_of_claim_nums_2 = [1, 3, 5, 7, 9] # ``` # Example Output: # ``` # The newly created list contains: 2 1 4 3 6 5 8 7 10 9 # ``` # Starting variables nums1 = [2, 4, 6, 8, 10] nums2 = [1, 3, 5, 7, 9] numall=[] # adding to Array for x in range(0,len(nums1)): numall.append(nums1[x]) numall.append(nums2[x]) # Printing Array print(numall)
nums1 = [2, 4, 6, 8, 10] nums2 = [1, 3, 5, 7, 9] numall = [] for x in range(0, len(nums1)): numall.append(nums1[x]) numall.append(nums2[x]) print(numall)
class OffsetMissingInIndex(Exception): pass class CouldNotFindOffset(Exception): pass class LogSizeExceeded(Exception): pass
class Offsetmissinginindex(Exception): pass class Couldnotfindoffset(Exception): pass class Logsizeexceeded(Exception): pass
print("Welcome to the F.A.T C.A.T program, this program encrypts messages using the reverse cipher method") #Prints whats in the parenteses sentence = input("What do you want to encrypt? ") #Declares a varible and stores what the user inputs final = "" i = len(sentence) -1 while(i != -1): final+= sentence[i]; i -= 1 print(final)
print('Welcome to the F.A.T C.A.T program, this program encrypts messages using the reverse cipher method') sentence = input('What do you want to encrypt? ') final = '' i = len(sentence) - 1 while i != -1: final += sentence[i] i -= 1 print(final)
def sum_series(generator, n): return sum(generator(i) for i in range(n)) def series(generator, n): return [generator(i) for i in range(n)] def search_bordered_sum_series(generator_fabric, n, left_x, right_x, border, epsilon=0.01**5): left_y = sum_series(generator_fabric(left_x), n) right_y = sum_series(generator_fabric(right_x), n) if not (left_y < border < right_y): raise NotImplementedError while True: if right_y - left_y < epsilon: break if right_x - left_x < epsilon: break new_x = (left_x + right_x) / 2 new_y = sum_series(generator_fabric(new_x), n) if new_y < border: left_x = new_x left_y = new_y continue if border < new_y: right_x = new_x right_y = new_y continue raise NotImplementedError return series(generator_fabric(left_x), n) class ExponentialSeriesGenerator: __slots__ = ('base', 'left_x', 'right_x') def __init__(self, base, left_x=0, right_x=2**8): self.base = base self.left_x = left_x self.right_x = right_x def generator_fabric(self, k): def generator(i): return self.base * k ** i return generator def series(self, n, border): return search_bordered_sum_series(generator_fabric=self.generator_fabric, n=n, left_x=self.left_x, right_x=self.right_x, border=border) def time_series_to_values(time_series, start_speed, end_speed, rounder): total_time = sum(time_series) speed_delta = (end_speed - start_speed) / total_time values = [] prev_time = 0 prev_experience = 0 for time in time_series: next_time = prev_time + time next_experience = next_time * (start_speed + (start_speed + next_time * speed_delta)) / 2 values.append(next_experience - prev_experience) prev_time = next_time prev_experience = next_experience return [rounder(value) for value in values]
def sum_series(generator, n): return sum((generator(i) for i in range(n))) def series(generator, n): return [generator(i) for i in range(n)] def search_bordered_sum_series(generator_fabric, n, left_x, right_x, border, epsilon=0.01 ** 5): left_y = sum_series(generator_fabric(left_x), n) right_y = sum_series(generator_fabric(right_x), n) if not left_y < border < right_y: raise NotImplementedError while True: if right_y - left_y < epsilon: break if right_x - left_x < epsilon: break new_x = (left_x + right_x) / 2 new_y = sum_series(generator_fabric(new_x), n) if new_y < border: left_x = new_x left_y = new_y continue if border < new_y: right_x = new_x right_y = new_y continue raise NotImplementedError return series(generator_fabric(left_x), n) class Exponentialseriesgenerator: __slots__ = ('base', 'left_x', 'right_x') def __init__(self, base, left_x=0, right_x=2 ** 8): self.base = base self.left_x = left_x self.right_x = right_x def generator_fabric(self, k): def generator(i): return self.base * k ** i return generator def series(self, n, border): return search_bordered_sum_series(generator_fabric=self.generator_fabric, n=n, left_x=self.left_x, right_x=self.right_x, border=border) def time_series_to_values(time_series, start_speed, end_speed, rounder): total_time = sum(time_series) speed_delta = (end_speed - start_speed) / total_time values = [] prev_time = 0 prev_experience = 0 for time in time_series: next_time = prev_time + time next_experience = next_time * (start_speed + (start_speed + next_time * speed_delta)) / 2 values.append(next_experience - prev_experience) prev_time = next_time prev_experience = next_experience return [rounder(value) for value in values]
computation_config = { 'Variable': 'GV1', 'From': ['WB API'], 'files': ['GV1_WB.csv'], 'function': lambda df, var: df.groupby(['ISO']).transform(lambda x: x.rolling(5, 1).mean()),#.mean(axis=1), 'sub_variables': [ 'Adjusted net savings, including particulate emission damage (% of GNI)', ], 'Description': lambda var: f"{var[0]} 5 years rolling average " }
computation_config = {'Variable': 'GV1', 'From': ['WB API'], 'files': ['GV1_WB.csv'], 'function': lambda df, var: df.groupby(['ISO']).transform(lambda x: x.rolling(5, 1).mean()), 'sub_variables': ['Adjusted net savings, including particulate emission damage (% of GNI)'], 'Description': lambda var: f'{var[0]} 5 years rolling average '}
# DomirScire class Animal: def __init__(self, color, number_of_legs): self.species = self.__class__.__name__ self.color = color self.number_of_legs = number_of_legs def __repr__(self): return f'{self.color} {self.species}, {self.number_of_legs} legs' class Wolf(Animal): def __init__(self, color): super().__init__(color, 4) class Sheep(Animal): def __init__(self, color): super().__init__(color, 4) class Snake(Animal): def __init__(self, color): super().__init__(color, 0) class Parrot(Animal): def __init__(self, color): super().__init__(color, 2) if __name__ == "__main__": wolf = Wolf('Black') sheep = Sheep('White') snake = Snake('Brown') parrot = Parrot('Green') print(wolf) print(sheep) print(snake) print(parrot)
class Animal: def __init__(self, color, number_of_legs): self.species = self.__class__.__name__ self.color = color self.number_of_legs = number_of_legs def __repr__(self): return f'{self.color} {self.species}, {self.number_of_legs} legs' class Wolf(Animal): def __init__(self, color): super().__init__(color, 4) class Sheep(Animal): def __init__(self, color): super().__init__(color, 4) class Snake(Animal): def __init__(self, color): super().__init__(color, 0) class Parrot(Animal): def __init__(self, color): super().__init__(color, 2) if __name__ == '__main__': wolf = wolf('Black') sheep = sheep('White') snake = snake('Brown') parrot = parrot('Green') print(wolf) print(sheep) print(snake) print(parrot)
TRAIN = False USERS = { 'yuncam':'aBc1to3' }
train = False users = {'yuncam': 'aBc1to3'}
##function 'return_list' goes here def return_list(the_string): new_list = [] the_string = the_string.replace(" ",",") the_string = the_string.split(",") if len(the_string) == 1: return the_string[0] else: for x in range(len(the_string)): new_list.append(the_string[x]) return new_list def main(): the_string = input("Enter the string: ") result = return_list(the_string) print(result) main()
def return_list(the_string): new_list = [] the_string = the_string.replace(' ', ',') the_string = the_string.split(',') if len(the_string) == 1: return the_string[0] else: for x in range(len(the_string)): new_list.append(the_string[x]) return new_list def main(): the_string = input('Enter the string: ') result = return_list(the_string) print(result) main()
class Option: OPTION_ENABLE = 256 OPTION_TX_ABORT = 1024 OPTION_HIGH_PRIORITY = 2048
class Option: option_enable = 256 option_tx_abort = 1024 option_high_priority = 2048
#BFS or Breadth First Search is a traversal algorithm for a tree or graph, where we start from the root node(for a tree) #And visit all the nodes level by level from left to right. It requires us to keep track of the chiildren of each node we visit #In a queue, so that after traversal through a level is complete, our algorithm knows which node to visit next. #Time complexity is O(n) but the space complexity can become a problem in some cases. #To implement BFS, we'll need a Binary Search Tree, which we have already coded. So we'll use that. class Node(): def __init__(self, data): self.data = data self.left = None self.right = None class BST(): def __init__(self): self.root = None self.number_of_nodes = 0 #For the insert method, we check if the root node is None, then we make the root node point to the new node #Otherwise, we create a temporary pointer which points to the root node at first. #Then we compare the data of the new node to the data of the node pointed by the temporary node. #If it is greater then first we check if the right child of the temporary node exists, if it does, then we update the temporary node to its right child #Otherwise we make the new node the right child of the temporary node #And if the new node data is less than the temporary node data, we follow the same procedure as above this time with the left child. #The complexity is O(log N) in avg case and O(n) in worst case. def insert(self, data): new_node = Node(data) if self.root == None: self.root = new_node self.number_of_nodes += 1 return else: current_node = self.root while(current_node.left != new_node) and (current_node.right != new_node): if new_node.data > current_node.data: if current_node.right == None: current_node.right = new_node else: current_node = current_node.right elif new_node.data < current_node.data: if current_node.left == None: current_node.left = new_node else: current_node = current_node.left self.number_of_nodes += 1 return #Now we will implement the lookup method. #It will follow similar logic as to the insert method to reach the correct position. #Only instead of inserting a new node we will return "Found" if the node pointed by the temporary node contains the same value we are looking for def search(self,data): if self.root == None: return "Tree Is Empty" else: current_node = self.root while True: if current_node == None: return "Not Found" if current_node.data == data: return "Found" elif current_node.data > data: current_node = current_node.left elif current_node.data < data: current_node = current_node.right #Finally comes the very complicated remove method. #This one is too complicated for me to explain while writing. So I'll just write the code down with some comments #explaining which conditions are being checked def remove(self, data): if self.root == None: #Tree is empty return "Tree Is Empty" current_node = self.root parent_node = None while current_node!=None: #Traversing the tree to reach the desired node or the end of the tree if current_node.data > data: parent_node = current_node current_node = current_node.left elif current_node.data < data: parent_node = current_node current_node = current_node.right else: #Match is found. Different cases to be checked #Node has left child only if current_node.right == None: if parent_node == None: self.root = current_node.left return else: if parent_node.data > current_node.data: parent_node.left = current_node.left return else: parent_node.right = current_node.left return #Node has right child only elif current_node.left == None: if parent_node == None: self.root = current_node.right return else: if parent_node.data > current_node.data: parent_node.left = current_node.right return else: parent_node.right = current_node.left return #Node has neither left nor right child elif current_node.left == None and current_node.right == None: if parent_node == None: #Node to be deleted is root current_node = None return if parent_node.data > current_node.data: parent_node.left = None return else: parent_node.right = None return #Node has both left and right child elif current_node.left != None and current_node.right != None: del_node = current_node.right del_node_parent = current_node.right while del_node.left != None: #Loop to reach the leftmost node of the right subtree of the current node del_node_parent = del_node del_node = del_node.left current_node.data = del_node.data #The value to be replaced is copied if del_node == del_node_parent: #If the node to be deleted is the exact right child of the current node current_node.right = del_node.right return if del_node.right == None: #If the leftmost node of the right subtree of the current node has no right subtree del_node_parent.left = None return else: #If it has a right subtree, we simply link it to the parent of the del_node del_node_parent.left = del_node.right return return "Not Found" #Now we implement the BFS method. def BFS(self): current_node = self.root #We start with the root node BFS_result = [] #This will store the result of the BFS queue = [] #Queue to keep track of the children of each node queue.append(current_node) #We add the root to the queue first while len(queue) > 0: current_node = queue.pop(0) #We extract the first element of the queue and make it the current node BFS_result.append(current_node.data) #We push the data of the current node to the result list as we are currently visiting the current node if current_node.left: #If left child of the current node exists, we append it to the queue queue.append(current_node.left) if current_node.right: #Similarly, if right child exists, we append it to the queue queue.append(current_node.right) return BFS_result #Finally, we will implement the Recursive version of the BFS. def Recursive_BFS(self, queue, BFS_list): if len(queue) == 0: return BFS_list current_node = queue.pop(0) BFS_list.append(current_node.data) if current_node.left: queue.append(current_node.left) if current_node.right: queue.append(current_node.right) return self.Recursive_BFS(queue, BFS_list) my_bst = BST() my_bst.insert(5) my_bst.insert(3) my_bst.insert(7) my_bst.insert(1) my_bst.insert(13) my_bst.insert(65) my_bst.insert(0) my_bst.insert(10) ''' 5 3 7 1 13 0 10 65 ''' #The BFS Traversal for this tree should be : [5,3,7,1,13,0,10,65] print(my_bst.BFS()) #[5, 3, 7, 1, 13, 0, 10, 65] print(my_bst.Recursive_BFS([my_bst.root],[])) #We need to pass the root node as an array and an empty array for the result #[5, 3, 7, 1, 13, 0, 10, 65]
class Node: def __init__(self, data): self.data = data self.left = None self.right = None class Bst: def __init__(self): self.root = None self.number_of_nodes = 0 def insert(self, data): new_node = node(data) if self.root == None: self.root = new_node self.number_of_nodes += 1 return else: current_node = self.root while current_node.left != new_node and current_node.right != new_node: if new_node.data > current_node.data: if current_node.right == None: current_node.right = new_node else: current_node = current_node.right elif new_node.data < current_node.data: if current_node.left == None: current_node.left = new_node else: current_node = current_node.left self.number_of_nodes += 1 return def search(self, data): if self.root == None: return 'Tree Is Empty' else: current_node = self.root while True: if current_node == None: return 'Not Found' if current_node.data == data: return 'Found' elif current_node.data > data: current_node = current_node.left elif current_node.data < data: current_node = current_node.right def remove(self, data): if self.root == None: return 'Tree Is Empty' current_node = self.root parent_node = None while current_node != None: if current_node.data > data: parent_node = current_node current_node = current_node.left elif current_node.data < data: parent_node = current_node current_node = current_node.right elif current_node.right == None: if parent_node == None: self.root = current_node.left return elif parent_node.data > current_node.data: parent_node.left = current_node.left return else: parent_node.right = current_node.left return elif current_node.left == None: if parent_node == None: self.root = current_node.right return elif parent_node.data > current_node.data: parent_node.left = current_node.right return else: parent_node.right = current_node.left return elif current_node.left == None and current_node.right == None: if parent_node == None: current_node = None return if parent_node.data > current_node.data: parent_node.left = None return else: parent_node.right = None return elif current_node.left != None and current_node.right != None: del_node = current_node.right del_node_parent = current_node.right while del_node.left != None: del_node_parent = del_node del_node = del_node.left current_node.data = del_node.data if del_node == del_node_parent: current_node.right = del_node.right return if del_node.right == None: del_node_parent.left = None return else: del_node_parent.left = del_node.right return return 'Not Found' def bfs(self): current_node = self.root bfs_result = [] queue = [] queue.append(current_node) while len(queue) > 0: current_node = queue.pop(0) BFS_result.append(current_node.data) if current_node.left: queue.append(current_node.left) if current_node.right: queue.append(current_node.right) return BFS_result def recursive_bfs(self, queue, BFS_list): if len(queue) == 0: return BFS_list current_node = queue.pop(0) BFS_list.append(current_node.data) if current_node.left: queue.append(current_node.left) if current_node.right: queue.append(current_node.right) return self.Recursive_BFS(queue, BFS_list) my_bst = bst() my_bst.insert(5) my_bst.insert(3) my_bst.insert(7) my_bst.insert(1) my_bst.insert(13) my_bst.insert(65) my_bst.insert(0) my_bst.insert(10) '\n 5\n 3 7\n 1 13\n0 10 65\n' print(my_bst.BFS()) print(my_bst.Recursive_BFS([my_bst.root], []))
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def getTargetCopy(self, original: TreeNode, cloned: TreeNode, target: TreeNode) -> TreeNode: curr_level = [cloned] while curr_level: next_level = [] for node in curr_level: if node.val == target.val: return node if node.left: next_level.append(node.left) if node.right: next_level.append(node.right) curr_level = next_level return None
class Solution: def get_target_copy(self, original: TreeNode, cloned: TreeNode, target: TreeNode) -> TreeNode: curr_level = [cloned] while curr_level: next_level = [] for node in curr_level: if node.val == target.val: return node if node.left: next_level.append(node.left) if node.right: next_level.append(node.right) curr_level = next_level return None
# Demo Python Tuples ''' Create Tuple With One Item To create a tuple with only one item, you have add a comma after the item, unless Python will not recognize the variable as a tuple. ''' # One item tuple, remember the commma: thistuple = ("apple",) print(type(thistuple)) #NOT a tuple thistuple = ("apple") print(type(thistuple))
""" Create Tuple With One Item To create a tuple with only one item, you have add a comma after the item, unless Python will not recognize the variable as a tuple. """ thistuple = ('apple',) print(type(thistuple)) thistuple = 'apple' print(type(thistuple))
# Copyright 2017 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. DEPS = [ 'properties', 'step', 'url', ] def RunSteps(api): api.url.validate_url(api.properties['url_to_validate']) def GenTests(api): yield (api.test('basic') + api.properties(url_to_validate='https://example.com')) yield (api.test('no_scheme') + api.properties(url_to_validate='example.com') + api.expect_exception('ValueError')) yield (api.test('invalid_scheme') + api.properties(url_to_validate='ftp://example.com') + api.expect_exception('ValueError')) yield (api.test('no_host') + api.properties(url_to_validate='https://') + api.expect_exception('ValueError'))
deps = ['properties', 'step', 'url'] def run_steps(api): api.url.validate_url(api.properties['url_to_validate']) def gen_tests(api): yield (api.test('basic') + api.properties(url_to_validate='https://example.com')) yield (api.test('no_scheme') + api.properties(url_to_validate='example.com') + api.expect_exception('ValueError')) yield (api.test('invalid_scheme') + api.properties(url_to_validate='ftp://example.com') + api.expect_exception('ValueError')) yield (api.test('no_host') + api.properties(url_to_validate='https://') + api.expect_exception('ValueError'))
#!/usr/bin/env python def plain_merge(array_a: list, array_b: list) -> list: pointer_a, pointer_b = 0, 0 length_a, length_b = len(array_a), len(array_b) result = [] while pointer_a < length_a and pointer_b < length_b: if array_a[pointer_a] <= array_b[pointer_b]: result.append(array_a[pointer_a]) pointer_a += 1 else: result.append(array_b[pointer_b]) pointer_b += 1 if pointer_a != length_a: result += array_a[pointer_a:] elif pointer_b != length_b: result += array_b[pointer_b:] return result
def plain_merge(array_a: list, array_b: list) -> list: (pointer_a, pointer_b) = (0, 0) (length_a, length_b) = (len(array_a), len(array_b)) result = [] while pointer_a < length_a and pointer_b < length_b: if array_a[pointer_a] <= array_b[pointer_b]: result.append(array_a[pointer_a]) pointer_a += 1 else: result.append(array_b[pointer_b]) pointer_b += 1 if pointer_a != length_a: result += array_a[pointer_a:] elif pointer_b != length_b: result += array_b[pointer_b:] return result
x={"a","b","c"} y=(1,2,3) z=[4,5,2] print(type(x)); print(type(y)); print(type(z)); x.add("d") print(x) z.append(5) print(y) print(z) for i in x: print (i) if 5 in z: print("yes") x.remove("b") print(x) z.remove(4) print(z) z.insert(1,7) print(z) z.extend(y) print(z) print(z.count(2)) del y print(y)
x = {'a', 'b', 'c'} y = (1, 2, 3) z = [4, 5, 2] print(type(x)) print(type(y)) print(type(z)) x.add('d') print(x) z.append(5) print(y) print(z) for i in x: print(i) if 5 in z: print('yes') x.remove('b') print(x) z.remove(4) print(z) z.insert(1, 7) print(z) z.extend(y) print(z) print(z.count(2)) del y print(y)
first = ord('A') last = ord('Z') for i in range(first, last + 1): for j in range(last, first - 1, -1): if j <= i: print(chr(i), end=' ') else: print('', end=' ') print()
first = ord('A') last = ord('Z') for i in range(first, last + 1): for j in range(last, first - 1, -1): if j <= i: print(chr(i), end=' ') else: print('', end=' ') print()
coordinates_01EE00 = ((123, 116), (123, 124), (123, 127), (123, 128), (123, 136), (123, 137), (124, 115), (124, 117), (124, 119), (124, 120), (124, 121), (124, 122), (124, 130), (124, 134), (124, 135), (124, 138), (125, 114), (125, 116), (125, 124), (125, 125), (125, 126), (125, 127), (125, 128), (125, 131), (125, 132), (125, 136), (125, 138), (126, 114), (126, 116), (126, 117), (126, 118), (126, 119), (126, 120), (126, 121), (126, 122), (126, 123), (126, 124), (126, 125), (126, 126), (126, 127), (126, 128), (126, 129), (126, 130), (126, 133), (126, 134), (126, 135), (126, 137), (127, 115), (127, 117), (127, 118), (127, 119), (127, 120), (127, 121), (127, 122), (127, 123), (127, 124), (127, 125), (127, 126), (127, 127), (127, 128), (127, 129), (127, 130), (127, 131), (127, 132), (127, 133), (127, 134), (127, 135), (127, 137), (128, 115), (128, 117), (128, 118), (128, 119), (128, 120), (128, 121), (128, 122), (128, 123), (128, 124), (128, 125), (128, 126), (128, 127), (128, 128), (128, 129), (128, 130), (128, 131), (128, 132), (128, 133), (128, 134), (128, 136), (129, 115), (129, 117), (129, 118), (129, 119), (129, 120), (129, 121), (129, 122), (129, 123), (129, 124), (129, 125), (129, 126), (129, 127), (129, 128), (129, 129), (129, 130), (129, 131), (129, 132), (129, 133), (129, 134), (129, 136), (130, 115), (130, 117), (130, 118), (130, 119), (130, 120), (130, 121), (130, 122), (130, 123), (130, 124), (130, 125), (130, 126), (130, 127), (130, 128), (130, 129), (130, 130), (130, 131), (130, 132), (130, 133), (130, 135), (131, 116), (131, 118), (131, 119), (131, 120), (131, 121), (131, 122), (131, 123), (131, 124), (131, 125), (131, 126), (131, 127), (131, 128), (131, 129), (131, 130), (131, 131), (131, 132), (131, 134), (132, 117), (132, 119), (132, 120), (132, 121), (132, 122), (132, 123), (132, 124), (132, 125), (132, 126), (132, 127), (132, 128), (132, 129), (132, 130), (132, 131), (132, 133), (133, 118), (133, 120), (133, 121), (133, 122), (133, 123), (133, 124), (133, 125), (133, 126), (133, 127), (133, 128), (133, 129), (133, 130), (133, 132), (134, 119), (134, 121), (134, 122), (134, 123), (134, 126), (134, 127), (134, 128), (134, 129), (134, 131), (135, 120), (135, 122), (135, 123), (135, 125), (135, 126), (135, 127), (135, 128), (135, 130), (136, 120), (136, 123), (136, 126), (136, 129), (137, 119), (137, 121), (137, 123), (137, 126), (137, 128), (138, 119), (138, 122), (138, 126), (138, 128), (139, 119), (139, 122), (139, 126), (140, 120), (140, 122), (140, 126), (140, 127), ) coordinates_00EE00 = ((107, 122), (108, 122), (108, 124), (109, 122), (109, 125), (110, 114), (110, 122), (110, 124), (110, 126), (111, 113), (111, 122), (111, 124), (111, 125), (111, 127), (112, 112), (112, 115), (112, 123), (112, 127), (113, 112), (113, 114), (113, 118), (113, 124), (113, 127), (114, 118), (115, 116), (115, 117), ) coordinates_E0E1E1 = ()
coordinates_01_ee00 = ((123, 116), (123, 124), (123, 127), (123, 128), (123, 136), (123, 137), (124, 115), (124, 117), (124, 119), (124, 120), (124, 121), (124, 122), (124, 130), (124, 134), (124, 135), (124, 138), (125, 114), (125, 116), (125, 124), (125, 125), (125, 126), (125, 127), (125, 128), (125, 131), (125, 132), (125, 136), (125, 138), (126, 114), (126, 116), (126, 117), (126, 118), (126, 119), (126, 120), (126, 121), (126, 122), (126, 123), (126, 124), (126, 125), (126, 126), (126, 127), (126, 128), (126, 129), (126, 130), (126, 133), (126, 134), (126, 135), (126, 137), (127, 115), (127, 117), (127, 118), (127, 119), (127, 120), (127, 121), (127, 122), (127, 123), (127, 124), (127, 125), (127, 126), (127, 127), (127, 128), (127, 129), (127, 130), (127, 131), (127, 132), (127, 133), (127, 134), (127, 135), (127, 137), (128, 115), (128, 117), (128, 118), (128, 119), (128, 120), (128, 121), (128, 122), (128, 123), (128, 124), (128, 125), (128, 126), (128, 127), (128, 128), (128, 129), (128, 130), (128, 131), (128, 132), (128, 133), (128, 134), (128, 136), (129, 115), (129, 117), (129, 118), (129, 119), (129, 120), (129, 121), (129, 122), (129, 123), (129, 124), (129, 125), (129, 126), (129, 127), (129, 128), (129, 129), (129, 130), (129, 131), (129, 132), (129, 133), (129, 134), (129, 136), (130, 115), (130, 117), (130, 118), (130, 119), (130, 120), (130, 121), (130, 122), (130, 123), (130, 124), (130, 125), (130, 126), (130, 127), (130, 128), (130, 129), (130, 130), (130, 131), (130, 132), (130, 133), (130, 135), (131, 116), (131, 118), (131, 119), (131, 120), (131, 121), (131, 122), (131, 123), (131, 124), (131, 125), (131, 126), (131, 127), (131, 128), (131, 129), (131, 130), (131, 131), (131, 132), (131, 134), (132, 117), (132, 119), (132, 120), (132, 121), (132, 122), (132, 123), (132, 124), (132, 125), (132, 126), (132, 127), (132, 128), (132, 129), (132, 130), (132, 131), (132, 133), (133, 118), (133, 120), (133, 121), (133, 122), (133, 123), (133, 124), (133, 125), (133, 126), (133, 127), (133, 128), (133, 129), (133, 130), (133, 132), (134, 119), (134, 121), (134, 122), (134, 123), (134, 126), (134, 127), (134, 128), (134, 129), (134, 131), (135, 120), (135, 122), (135, 123), (135, 125), (135, 126), (135, 127), (135, 128), (135, 130), (136, 120), (136, 123), (136, 126), (136, 129), (137, 119), (137, 121), (137, 123), (137, 126), (137, 128), (138, 119), (138, 122), (138, 126), (138, 128), (139, 119), (139, 122), (139, 126), (140, 120), (140, 122), (140, 126), (140, 127)) coordinates_00_ee00 = ((107, 122), (108, 122), (108, 124), (109, 122), (109, 125), (110, 114), (110, 122), (110, 124), (110, 126), (111, 113), (111, 122), (111, 124), (111, 125), (111, 127), (112, 112), (112, 115), (112, 123), (112, 127), (113, 112), (113, 114), (113, 118), (113, 124), (113, 127), (114, 118), (115, 116), (115, 117)) coordinates_e0_e1_e1 = ()
# -*- coding: utf-8 -*- Consent_form_Out = { # From Operator_CR to UI "source": { "service_id": "String", "rs_id": "String", "dataset": [ { "dataset_id": "String", "title": "String", "description": "String", "keyword": [], "publisher": "String", "distribution": { "distribution_id": "String", "access_url": "String" }, "component_specification_label": "String", "selected": True } ] }, "sink": { "service_id": "String", "dataset": [ { "datase_id": "String", "title": "String", "description": "String", "keyword": [], "publisher": "String", "purposes": [ { "title": "All your cats are belong to us", "selected": True, "required": True }, { "title": "Something random", "selected": True, "required": True } ] } ] } }
consent_form__out = {'source': {'service_id': 'String', 'rs_id': 'String', 'dataset': [{'dataset_id': 'String', 'title': 'String', 'description': 'String', 'keyword': [], 'publisher': 'String', 'distribution': {'distribution_id': 'String', 'access_url': 'String'}, 'component_specification_label': 'String', 'selected': True}]}, 'sink': {'service_id': 'String', 'dataset': [{'datase_id': 'String', 'title': 'String', 'description': 'String', 'keyword': [], 'publisher': 'String', 'purposes': [{'title': 'All your cats are belong to us', 'selected': True, 'required': True}, {'title': 'Something random', 'selected': True, 'required': True}]}]}}
class Adapter(object): def __init__(self): self.interfaces = []
class Adapter(object): def __init__(self): self.interfaces = []
with open("10.in") as file: lines = file.readlines() lines = [line.rstrip() for line in lines] # Part 1 luc = {"(": ")", ")": "(", "[": "]", "]": "[", "{": "}", "}": "{", "<": ">", ">": "<"} lup = {")": 3, "]": 57, "}": 1197, ">": 25137} score = 0 for line in lines: stack = [] for i in range(0, len(line)): if line[i] in ["(", "[", "{", "<"]: stack.append(line[i]) elif len(stack) > 0 and luc[line[i]] == stack[len(stack)-1]: stack.pop(len(stack)-1) else: score += lup[line[i]] break print(score) # Part 2 lup = {")": 1, "]": 2, "}": 3, ">": 4} scores = [] for line in lines: stack = [] score = 0 for i in range(0, len(line)): if line[i] in ["(", "[", "{", "<"]: stack.append(line[i]) elif len(stack) > 0 and luc[line[i]] == stack[len(stack)-1]: stack.pop(len(stack)-1) else: break if i == len(line)-1: for i in range(len(stack)-1, -1, -1): score = score * 5 + lup[luc[stack[i]]] scores.append(score) scores.sort() print(scores[int((len(scores) - 1)/2)])
with open('10.in') as file: lines = file.readlines() lines = [line.rstrip() for line in lines] luc = {'(': ')', ')': '(', '[': ']', ']': '[', '{': '}', '}': '{', '<': '>', '>': '<'} lup = {')': 3, ']': 57, '}': 1197, '>': 25137} score = 0 for line in lines: stack = [] for i in range(0, len(line)): if line[i] in ['(', '[', '{', '<']: stack.append(line[i]) elif len(stack) > 0 and luc[line[i]] == stack[len(stack) - 1]: stack.pop(len(stack) - 1) else: score += lup[line[i]] break print(score) lup = {')': 1, ']': 2, '}': 3, '>': 4} scores = [] for line in lines: stack = [] score = 0 for i in range(0, len(line)): if line[i] in ['(', '[', '{', '<']: stack.append(line[i]) elif len(stack) > 0 and luc[line[i]] == stack[len(stack) - 1]: stack.pop(len(stack) - 1) else: break if i == len(line) - 1: for i in range(len(stack) - 1, -1, -1): score = score * 5 + lup[luc[stack[i]]] scores.append(score) scores.sort() print(scores[int((len(scores) - 1) / 2)])
__all__ = [ 'config_enums', 'feed_enums', 'file_enums' ]
__all__ = ['config_enums', 'feed_enums', 'file_enums']
#Flag #Use a flag that stores on the nodes to know if we visited or not. #time: O(N). #space: O(N), for each node we use O(1) and there are N nodes. class Solution(object): def detectCycle(self, head): curr = head while curr: if hasattr(curr, 'visited') and curr.visited: return curr curr.visited = True curr = curr.next return None #HashSet #Use a hash-set to store the visited nodes #time: O(N). #space: O(N). class Solution(object): def detectCycle(self, head): visited = set() curr = head while curr: if curr in visited: return curr visited.add(curr) curr = curr.next return None
class Solution(object): def detect_cycle(self, head): curr = head while curr: if hasattr(curr, 'visited') and curr.visited: return curr curr.visited = True curr = curr.next return None class Solution(object): def detect_cycle(self, head): visited = set() curr = head while curr: if curr in visited: return curr visited.add(curr) curr = curr.next return None
class Solution: def binarySearchableNumbers(self, nums: List[int]) -> int: maximums = [nums[0]] # from the left minimums = [0] * len(nums) # from the right min_n = nums[-1] result = 0 for n in nums[1::]: maximums.append(max(maximums[-1], n)) for idx in range(len(nums)-1, -1, -1): min_n = min(min_n, nums[idx]) minimums[idx] = min_n if nums[idx] == maximums[idx] and nums[idx] == minimums[idx]: result += 1 return result
class Solution: def binary_searchable_numbers(self, nums: List[int]) -> int: maximums = [nums[0]] minimums = [0] * len(nums) min_n = nums[-1] result = 0 for n in nums[1:]: maximums.append(max(maximums[-1], n)) for idx in range(len(nums) - 1, -1, -1): min_n = min(min_n, nums[idx]) minimums[idx] = min_n if nums[idx] == maximums[idx] and nums[idx] == minimums[idx]: result += 1 return result
# def candies(s): # worst case = three passes of 's', len, max, sum # length = len(s) # if length <= 1: # return -1 # return max(s) * length - sum(s) def candies(seq): length = 0 maximum = 0 total = 0 for i, a in enumerate(seq): try: current = int(a) except TypeError: return -1 length += 1 total += current if current > maximum: maximum = current return maximum * length - total if length > 1 else -1
def candies(seq): length = 0 maximum = 0 total = 0 for (i, a) in enumerate(seq): try: current = int(a) except TypeError: return -1 length += 1 total += current if current > maximum: maximum = current return maximum * length - total if length > 1 else -1
def convert2meter(s, input_unit="in"): ''' Function to convert inches, feet and cubic feet to meters and cubic meters ''' if input_unit == "in": return s*0.0254 elif input_unit == "ft": return s*0.3048 elif input_unit == "cft": return s*0.0283168 else: print("Error: Input unit is unknown.") ## Apply function measurement_unit = {"Girth":"in", "Height":"ft", "Volume":"cft"} trees = trees_raw.copy() for feature in ["Girth", "Height", "Volume"]: trees[feature] = trees_raw[feature].apply(lambda x: convert2meter(s=x, input_unit=measurement_unit.get(feature)))
def convert2meter(s, input_unit='in'): """ Function to convert inches, feet and cubic feet to meters and cubic meters """ if input_unit == 'in': return s * 0.0254 elif input_unit == 'ft': return s * 0.3048 elif input_unit == 'cft': return s * 0.0283168 else: print('Error: Input unit is unknown.') measurement_unit = {'Girth': 'in', 'Height': 'ft', 'Volume': 'cft'} trees = trees_raw.copy() for feature in ['Girth', 'Height', 'Volume']: trees[feature] = trees_raw[feature].apply(lambda x: convert2meter(s=x, input_unit=measurement_unit.get(feature)))
# [Stone Colusses] It Ain't Natural CHIEF_TATOMO = 2081000 sm.setSpeakerID(CHIEF_TATOMO) sm.sendNext("Well, you don't look like you just spoke to an ancient nature spirit, but I suppose we'll know soon enough. " "Are you ready for a little adventure?\r\n\r\n" "#bYou know it! How do I get to the Stone Colossus?") sm.sendSay("Ah, humans. No patience, and not enough hair. " "I would advise you to seek out the Halflinger expedition that has already traveled to the area. " "They could help you.\r\n\r\n" "#bThese are Halflinger explorers?") response = sm.sendAskYesNo("Don't act so surprised! " "Our people are peaceful home-bodies for the most part, but the blood of the explorer can show up where you least expect it. " "What kind of chief would I be if I held them back?\r\n" "If you'd like, I can send you to their camp right away.") if response: sm.sendNext("That's the spirit. Do an old-timer a favour and check on my villagers for me.") sm.completeQuest(parentID) sm.warp(240090000) # Stone Colossus Exploration Site else: sm.sendNext("Oh.. Okay.. I mean.. I thought you were all about adventures.. I guess I was wrong..\r\n\r\n" "This is so sad.\r\n" "Alexa, play Despacito 5!")
chief_tatomo = 2081000 sm.setSpeakerID(CHIEF_TATOMO) sm.sendNext("Well, you don't look like you just spoke to an ancient nature spirit, but I suppose we'll know soon enough. Are you ready for a little adventure?\r\n\r\n#bYou know it! How do I get to the Stone Colossus?") sm.sendSay('Ah, humans. No patience, and not enough hair. I would advise you to seek out the Halflinger expedition that has already traveled to the area. They could help you.\r\n\r\n#bThese are Halflinger explorers?') response = sm.sendAskYesNo("Don't act so surprised! Our people are peaceful home-bodies for the most part, but the blood of the explorer can show up where you least expect it. What kind of chief would I be if I held them back?\r\nIf you'd like, I can send you to their camp right away.") if response: sm.sendNext("That's the spirit. Do an old-timer a favour and check on my villagers for me.") sm.completeQuest(parentID) sm.warp(240090000) else: sm.sendNext('Oh.. Okay.. I mean.. I thought you were all about adventures.. I guess I was wrong..\r\n\r\nThis is so sad.\r\nAlexa, play Despacito 5!')
# a = [1,2,2,3,4,5] # # print(list(set(a))) # def correct_list(a): # return(list(set(a))) # print(correct_list(a)) a = [1,2,2,3,4,5] def correct_list(a): s = [] for i in a: if i not in s: s.append(i) return(s) print(correct_list(a))
a = [1, 2, 2, 3, 4, 5] def correct_list(a): s = [] for i in a: if i not in s: s.append(i) return s print(correct_list(a))
''' Title: %s Given: %s Return %s Sample Dataset: %s Sample Output: %s ''' def compute(): pass if __name__ == "__main__": pass
""" Title: %s Given: %s Return %s Sample Dataset: %s Sample Output: %s """ def compute(): pass if __name__ == '__main__': pass
# encoding: utf-8 ################################################## # This script shows an example of a header section. This sections is a group of commented lines (lines starting with # the "#" character) that describes general features of the script such as the type of licence (defined by the # developer), authors, credits, versions among others ################################################## # ################################################## # Author: Soroush Garivani # Copyright: Copyright 2019, IAAC # Credits: [Institute for Advanced Architecture of Catalonia - IAAC, Advanced Architecture group] # License: Apache License Version 2.0 # Version: 1.0.0 # Maintainer: Soroush Garivani # Email: soroush.garivani@iaac.net # Status: development ################################################## # End of header section # tuples print("tuples are very similar to lists") print("the are defined by ()") my_tuple = (1, 2, 3) print(my_tuple) data_type = type(my_tuple) print(data_type, '\n') print("tuples can have different data types as items") my_tuple = ('One', 'Two', 3) print(my_tuple, '\n') print("you can use indexing and slicing for tuples") print(my_tuple[0]) print(my_tuple[-1]) print(my_tuple[0:2], '\n') # print ("the difference between tuples and lists is that tuples are 'immutable'. This means once they are assigned they cannot be reassigned.") # my_list = [1,2,3,4] # my_tuple = (1,2,3,4) # my_list[0] = 'ONE' # print (my_list) # my_tuple[0] = 'ONE' # print (my_tuple) # # tuples are useful when you want to make sure your elements will not change during the program
print('tuples are very similar to lists') print('the are defined by ()') my_tuple = (1, 2, 3) print(my_tuple) data_type = type(my_tuple) print(data_type, '\n') print('tuples can have different data types as items') my_tuple = ('One', 'Two', 3) print(my_tuple, '\n') print('you can use indexing and slicing for tuples') print(my_tuple[0]) print(my_tuple[-1]) print(my_tuple[0:2], '\n')
def result(text): count=0 for i in range(len(metin)): if(ord(metin[i])>=65 and ord(metin[i])<=90): count=count+1 return count
def result(text): count = 0 for i in range(len(metin)): if ord(metin[i]) >= 65 and ord(metin[i]) <= 90: count = count + 1 return count
def genTest(): print('Block of code before first yield statement') yield 1 print('Block of code after first yield statement and before second yield statement') yield 2 print('Block of code after all yield statements') # foo = genTest returns <function gen at 0x101faf400> foo = genTest() # returns <generator object gen at 0x101f9f408> print(foo.__next__()) print() print(foo.__next__()) print('\n') for f in foo: print(f) # **OUTPUT** # Block of code before first yield statement # 1 # Block of code after first yield statement and before second yield statement # 2 # # # Block of code after all yield statements
def gen_test(): print('Block of code before first yield statement') yield 1 print('Block of code after first yield statement and before second yield statement') yield 2 print('Block of code after all yield statements') foo = gen_test() print(foo.__next__()) print() print(foo.__next__()) print('\n') for f in foo: print(f)
class PropertyReference: def __init__(self, var_name, property_name): self.var_name = var_name self.property_name = property_name def __str__(self): return f'{self.var_name}.{self.property_name}' def code_gen_string(self): return str(self) class FunctionCallArgument: def __init__(self, arg_type, value): self.arg_type = arg_type self.value = value def __str__(self): return f'{self.arg_type}: {self.value}' def code_gen_string(self): if isinstance(self.value, str) or isinstance(self.value, int) or isinstance(self.value, float): return f'{self.value}' return self.value.code_gen_string() class FunctionCall: def __init__(self, name, args, result): self.name = name self.args = args self.result = result def __str__(self): return_str = '' args = ', '.join(map(str, self.args)) return f'{return_str}{self.name}({args})' def code_gen_string(self): args = ', '.join(map(lambda x: x.code_gen_string(), self.args)) return f'{self.name}({args})' class AssignVariable: def __init__(self, var_name, var_type, value): self.var_name = var_name self.var_type = var_type self.value = value def __str__(self): val = self.value if isinstance(val, list): val = ', '.join(map(str, self.value)) return f'{self.var_type}: {self.var_name} = {val}' def code_gen_string(self): if isinstance(self.value, list): val = f"[{', '.join(map(lambda x: x.code_gen_string(), self.value))}]" elif isinstance(self.value, str): val = self.value else: val = self.value.code_gen_string() return f'{self.var_name} = {val}' class ModifyString: def __init__(self, insert_mode, int_val, str_val, obj): self.insert_mode = insert_mode self.int_val = int_val self.str_val = str_val self.obj = obj def __str__(self): return f'modify_string_59({self.insert_mode}, {self.int_val}, {self.str_val}, {self.obj})' def code_gen_string(self): return str(self) class BinaryIntermediate: def __init__(self, op, left, right): self.op = op self.left = left self.right = right def __str__(self): return f'{self.left} {self.op} {self.right}' def code_gen_string(self): return f'{self.left.code_gen_string()} {self.op} {self.right.code_gen_string()}' class UnaryIntermediate: def __init__(self, operator, operand): self.operator = operator self.operand = operand def __str__(self): return f'{self.operator} {self.operand}' def code_gen_string(self): return f'{self.operator} {self.operand.code_gen_string()}' class EndControlStatement: def __init__(self, control_statement): self.control_statement = control_statement def __str__(self): return f'end{self.control_statement}' def code_gen_string(self): return str(self) class BreakStatement: def __str__(self): return 'break' def code_gen_string(self): return str(self) class LoopOpenStatement: def __init__(self, cond): self.cond = cond def __str__(self): return f'loop while( {self.cond} )' def code_gen_string(self): return f'repeat while ( {self.cond.code_gen_string()} )' class LoopEndStatement(EndControlStatement): def __init__(self): super().__init__('repeat') class LoopCounterIncrement: def __init__(self, var): self.var = var def __str__(self): return f'increment( {self.var.name} )' def code_gen_string(self): return f'{self.var.name}++' class IfEndStatement(EndControlStatement): def __init__(self): super().__init__('if') class IfControlStatement: def __init__(self, expr): self.expr = expr def __str__(self): return f'if( {self.expr} )' def code_gen_string(self): return f'if ({self.expr.code_gen_string()})' class ElseifControlStatement: def __init__(self, expr): self.expr = expr def __str__(self): return f'elseif( {self.expr} )' def code_gen_string(self): return f'elseif ({self.expr.code_gen_string()})' class ElseControlStatement: def __str__(self): return 'else' def code_gen_string(self): return str(self) class SwitchOpenStatement: def __init__(self, cond): self.cond = cond def __str__(self): return f'switch ( {self.cond} ):' def code_gen_string(self): if isinstance(self.cond, str): val = self.cond else: val = self.cond.code_gen_string() return f'switch ({val})' class SwitchCaseStatement: def __init__(self, case_opt): self.case_opt = case_opt def __str__(self): return f'case {self.case_opt.code_gen_string()}:' def code_gen_string(self): return str(self) class SwitchEndStatement(EndControlStatement): def __init__(self): super().__init__('switch') class SwitchBreakStatement(BreakStatement): pass class ReturnStatement: def __str__(self): return 'return' def code_gen_string(self): return str(self) class GotoStatement: def __init__(self, label): self.label = label def __str__(self): return f'goto {self.label}' def code_gen_string(self): return str(self)
class Propertyreference: def __init__(self, var_name, property_name): self.var_name = var_name self.property_name = property_name def __str__(self): return f'{self.var_name}.{self.property_name}' def code_gen_string(self): return str(self) class Functioncallargument: def __init__(self, arg_type, value): self.arg_type = arg_type self.value = value def __str__(self): return f'{self.arg_type}: {self.value}' def code_gen_string(self): if isinstance(self.value, str) or isinstance(self.value, int) or isinstance(self.value, float): return f'{self.value}' return self.value.code_gen_string() class Functioncall: def __init__(self, name, args, result): self.name = name self.args = args self.result = result def __str__(self): return_str = '' args = ', '.join(map(str, self.args)) return f'{return_str}{self.name}({args})' def code_gen_string(self): args = ', '.join(map(lambda x: x.code_gen_string(), self.args)) return f'{self.name}({args})' class Assignvariable: def __init__(self, var_name, var_type, value): self.var_name = var_name self.var_type = var_type self.value = value def __str__(self): val = self.value if isinstance(val, list): val = ', '.join(map(str, self.value)) return f'{self.var_type}: {self.var_name} = {val}' def code_gen_string(self): if isinstance(self.value, list): val = f"[{', '.join(map(lambda x: x.code_gen_string(), self.value))}]" elif isinstance(self.value, str): val = self.value else: val = self.value.code_gen_string() return f'{self.var_name} = {val}' class Modifystring: def __init__(self, insert_mode, int_val, str_val, obj): self.insert_mode = insert_mode self.int_val = int_val self.str_val = str_val self.obj = obj def __str__(self): return f'modify_string_59({self.insert_mode}, {self.int_val}, {self.str_val}, {self.obj})' def code_gen_string(self): return str(self) class Binaryintermediate: def __init__(self, op, left, right): self.op = op self.left = left self.right = right def __str__(self): return f'{self.left} {self.op} {self.right}' def code_gen_string(self): return f'{self.left.code_gen_string()} {self.op} {self.right.code_gen_string()}' class Unaryintermediate: def __init__(self, operator, operand): self.operator = operator self.operand = operand def __str__(self): return f'{self.operator} {self.operand}' def code_gen_string(self): return f'{self.operator} {self.operand.code_gen_string()}' class Endcontrolstatement: def __init__(self, control_statement): self.control_statement = control_statement def __str__(self): return f'end{self.control_statement}' def code_gen_string(self): return str(self) class Breakstatement: def __str__(self): return 'break' def code_gen_string(self): return str(self) class Loopopenstatement: def __init__(self, cond): self.cond = cond def __str__(self): return f'loop while( {self.cond} )' def code_gen_string(self): return f'repeat while ( {self.cond.code_gen_string()} )' class Loopendstatement(EndControlStatement): def __init__(self): super().__init__('repeat') class Loopcounterincrement: def __init__(self, var): self.var = var def __str__(self): return f'increment( {self.var.name} )' def code_gen_string(self): return f'{self.var.name}++' class Ifendstatement(EndControlStatement): def __init__(self): super().__init__('if') class Ifcontrolstatement: def __init__(self, expr): self.expr = expr def __str__(self): return f'if( {self.expr} )' def code_gen_string(self): return f'if ({self.expr.code_gen_string()})' class Elseifcontrolstatement: def __init__(self, expr): self.expr = expr def __str__(self): return f'elseif( {self.expr} )' def code_gen_string(self): return f'elseif ({self.expr.code_gen_string()})' class Elsecontrolstatement: def __str__(self): return 'else' def code_gen_string(self): return str(self) class Switchopenstatement: def __init__(self, cond): self.cond = cond def __str__(self): return f'switch ( {self.cond} ):' def code_gen_string(self): if isinstance(self.cond, str): val = self.cond else: val = self.cond.code_gen_string() return f'switch ({val})' class Switchcasestatement: def __init__(self, case_opt): self.case_opt = case_opt def __str__(self): return f'case {self.case_opt.code_gen_string()}:' def code_gen_string(self): return str(self) class Switchendstatement(EndControlStatement): def __init__(self): super().__init__('switch') class Switchbreakstatement(BreakStatement): pass class Returnstatement: def __str__(self): return 'return' def code_gen_string(self): return str(self) class Gotostatement: def __init__(self, label): self.label = label def __str__(self): return f'goto {self.label}' def code_gen_string(self): return str(self)
##Retrieve region of sequences delimited by a forward and reverse pattern #v0.0.1 f = [ [x.split('\n')[0], ''.join(x.split('\n')[1:])] for x in open('gg-13-8-99.fasta', 'r').read().rstrip('\n').split('>') ][1:] fw = ['AGAGTTTGATCMTGGCTCAG'] rv = ['GWATTACCGCGGCKGCTG'] mtol = 1 endstr = 3 w = open('ggmb.fa', 'w') nl = [] print('Forward:' + fw[0]) print('Reverse:' + rv[0]) print('Mismatches tolerated:' + str(mtol)) print('3\' end stringency length:' + str(endstr)) def degenerate(primer): r = [] for it in primer: p = list(it) for i in range(len(p)): if p[i] == 'R': r.append(''.join([p[x] if x!=i else 'A' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'G' for x in range(len(p))])) break if p[i] == 'Y': r.append(''.join([p[x] if x!=i else 'C' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'T' for x in range(len(p))])) break if p[i] == 'S': r.append(''.join([p[x] if x!=i else 'G' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'C' for x in range(len(p))])) break if p[i] == 'W': r.append(''.join([p[x] if x!=i else 'A' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'T' for x in range(len(p))])) break if p[i] == 'K': r.append(''.join([p[x] if x!=i else 'G' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'T' for x in range(len(p))])) break if p[i] == 'M': r.append(''.join([p[x] if x!=i else 'A' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'C' for x in range(len(p))])) break if p[i] == 'B': r.append(''.join([p[x] if x!=i else 'C' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'G' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'T' for x in range(len(p))])) break if p[i] == 'D': r.append(''.join([p[x] if x!=i else 'A' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'G' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'T' for x in range(len(p))])) break if p[i] == 'H': r.append(''.join([p[x] if x!=i else 'A' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'C' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'T' for x in range(len(p))])) break if p[i] == 'V': r.append(''.join([p[x] if x!=i else 'A' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'C' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'G' for x in range(len(p))])) break if p[i] == 'N': r.append(''.join([p[x] if x!=i else 'A' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'C' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'G' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'T' for x in range(len(p))])) break return r def mismatch(primer): r = [] for it in primer: p = list(it) for i in range(len(p) - endstr): r.append(''.join([p[x] if x!=i else 'A' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'C' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'G' for x in range(len(p))])) r.append(''.join([p[x] if x!=i else 'T' for x in range(len(p))])) return r a = ['A','C','G','T'] fwndeg = len([x for x in list(fw[0])if x not in a]) rvndeg = len([x for x in list(rv[0])if x not in a]) for i in range(fwndeg): fw = degenerate(fw) for i in range(rvndeg): rv = degenerate(rv) for i in range(mtol): fw = mismatch(fw) rv = mismatch(rv) rv = [ x[::-1].replace('A','t').replace('C','g').replace('G','c').replace('T','a').upper() for x in rv ] for it in f: rt = '' cut = 0 for i in range(len(it[1])-len(fw[0])): if it[1][i:i+len(fw[0])] in fw: rt = it[1][i:] cut += 0 break for i in range(len(rt)-len(rv[0])): if rt[i:i+len(rv[0])] in rv: rt = rt[:i+len(rv[0])] cut += 2 break if cut == 2: nl.append([it[0], rt]) lnl = [len(x[1]) for x in nl] print('Matches:' + str(len(nl))+ '/' + str(len(f))) print('Min:' + str(min(lnl))) print('Max:' + str(max(lnl))) print('Mean:' + str(sum(lnl) / len(nl))) print('Matches shorter than 300:' + str(len([x for x in lnl if x < 300]))) print('Matches longer than 580:' + str(len([x for x in lnl if x > 580]))) w.write('\n'.join(['>' + '\n'.join(x) for x in nl])) w.close()
f = [[x.split('\n')[0], ''.join(x.split('\n')[1:])] for x in open('gg-13-8-99.fasta', 'r').read().rstrip('\n').split('>')][1:] fw = ['AGAGTTTGATCMTGGCTCAG'] rv = ['GWATTACCGCGGCKGCTG'] mtol = 1 endstr = 3 w = open('ggmb.fa', 'w') nl = [] print('Forward:' + fw[0]) print('Reverse:' + rv[0]) print('Mismatches tolerated:' + str(mtol)) print("3' end stringency length:" + str(endstr)) def degenerate(primer): r = [] for it in primer: p = list(it) for i in range(len(p)): if p[i] == 'R': r.append(''.join([p[x] if x != i else 'A' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'G' for x in range(len(p))])) break if p[i] == 'Y': r.append(''.join([p[x] if x != i else 'C' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'T' for x in range(len(p))])) break if p[i] == 'S': r.append(''.join([p[x] if x != i else 'G' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'C' for x in range(len(p))])) break if p[i] == 'W': r.append(''.join([p[x] if x != i else 'A' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'T' for x in range(len(p))])) break if p[i] == 'K': r.append(''.join([p[x] if x != i else 'G' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'T' for x in range(len(p))])) break if p[i] == 'M': r.append(''.join([p[x] if x != i else 'A' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'C' for x in range(len(p))])) break if p[i] == 'B': r.append(''.join([p[x] if x != i else 'C' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'G' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'T' for x in range(len(p))])) break if p[i] == 'D': r.append(''.join([p[x] if x != i else 'A' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'G' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'T' for x in range(len(p))])) break if p[i] == 'H': r.append(''.join([p[x] if x != i else 'A' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'C' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'T' for x in range(len(p))])) break if p[i] == 'V': r.append(''.join([p[x] if x != i else 'A' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'C' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'G' for x in range(len(p))])) break if p[i] == 'N': r.append(''.join([p[x] if x != i else 'A' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'C' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'G' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'T' for x in range(len(p))])) break return r def mismatch(primer): r = [] for it in primer: p = list(it) for i in range(len(p) - endstr): r.append(''.join([p[x] if x != i else 'A' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'C' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'G' for x in range(len(p))])) r.append(''.join([p[x] if x != i else 'T' for x in range(len(p))])) return r a = ['A', 'C', 'G', 'T'] fwndeg = len([x for x in list(fw[0]) if x not in a]) rvndeg = len([x for x in list(rv[0]) if x not in a]) for i in range(fwndeg): fw = degenerate(fw) for i in range(rvndeg): rv = degenerate(rv) for i in range(mtol): fw = mismatch(fw) rv = mismatch(rv) rv = [x[::-1].replace('A', 't').replace('C', 'g').replace('G', 'c').replace('T', 'a').upper() for x in rv] for it in f: rt = '' cut = 0 for i in range(len(it[1]) - len(fw[0])): if it[1][i:i + len(fw[0])] in fw: rt = it[1][i:] cut += 0 break for i in range(len(rt) - len(rv[0])): if rt[i:i + len(rv[0])] in rv: rt = rt[:i + len(rv[0])] cut += 2 break if cut == 2: nl.append([it[0], rt]) lnl = [len(x[1]) for x in nl] print('Matches:' + str(len(nl)) + '/' + str(len(f))) print('Min:' + str(min(lnl))) print('Max:' + str(max(lnl))) print('Mean:' + str(sum(lnl) / len(nl))) print('Matches shorter than 300:' + str(len([x for x in lnl if x < 300]))) print('Matches longer than 580:' + str(len([x for x in lnl if x > 580]))) w.write('\n'.join(['>' + '\n'.join(x) for x in nl])) w.close()
def say(message, times = 1): print(message * times) say('Hello', 4) say('World', 4) def func(a, b=5, c=10): print('a is', a, 'and b is', b, 'and c is', c) func(3) func(3, c=13) def maximum(x, y): if x > y: return x elif x == y: return 'The numbers are equal' else: return y a = maximum(2, 3) + 5 print(a)
def say(message, times=1): print(message * times) say('Hello', 4) say('World', 4) def func(a, b=5, c=10): print('a is', a, 'and b is', b, 'and c is', c) func(3) func(3, c=13) def maximum(x, y): if x > y: return x elif x == y: return 'The numbers are equal' else: return y a = maximum(2, 3) + 5 print(a)
# write program reading an integer from standard input - a # printing sum of squares of natural numbers smaller than a # for example, for a=4, result = 1*1 + 2*2 + 3*3 = 14 a = int(input("pass a - ")) element = 1 result = 0 while element < a: result = result + element * element element = element + 1 print("result = " + str(result))
a = int(input('pass a - ')) element = 1 result = 0 while element < a: result = result + element * element element = element + 1 print('result = ' + str(result))
# implement strip() to remove the white spaces in the head and tail of a string. def strip(s): while len(s) != 0 and (s[0] == ' ' or s[-1] == ' '): s = s[1:] if s[0] == ' ' else s s = s[:-1] if s[-1] == ' ' else s return s if __name__ == "__main__": if strip('hello ') != 'hello': print('fail!') elif strip(' hello') != 'hello': print('fail!') elif strip(' hello ') != 'hello': print('fail!') elif strip(' hello world ') != 'hello world': print('fail!') elif strip('') != '': print('fail!') elif strip(' ') != '': print('fail!') else: print('success!')
def strip(s): while len(s) != 0 and (s[0] == ' ' or s[-1] == ' '): s = s[1:] if s[0] == ' ' else s s = s[:-1] if s[-1] == ' ' else s return s if __name__ == '__main__': if strip('hello ') != 'hello': print('fail!') elif strip(' hello') != 'hello': print('fail!') elif strip(' hello ') != 'hello': print('fail!') elif strip(' hello world ') != 'hello world': print('fail!') elif strip('') != '': print('fail!') elif strip(' ') != '': print('fail!') else: print('success!')
a = [1,2,3,4,5] k =2 del a[0] for i in range(0,len(a)): print(a[i])
a = [1, 2, 3, 4, 5] k = 2 del a[0] for i in range(0, len(a)): print(a[i])
# Copyright (c) 2018 Lotus Load # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. load("@io_bazel_rules_docker//go:image.bzl", "go_image") load("@io_bazel_rules_docker//container:container.bzl", "container_bundle") load("@io_bazel_rules_docker//contrib:push-all.bzl", "docker_push") def app_image(name, binary, repository, **kwargs): go_image( name = "image", binary = binary, **kwargs) container_bundle( name = "bundle", images = { "$(DOCKER_REGISTRY)/%s:{STABLE_GIT_COMMIT}" % repository: ":image", "$(DOCKER_REGISTRY)/%s:{STABLE_GIT_COMMIT_FULL}" % repository: ":image", }, ) docker_push( name = "push", bundle = ":bundle", **kwargs)
load('@io_bazel_rules_docker//go:image.bzl', 'go_image') load('@io_bazel_rules_docker//container:container.bzl', 'container_bundle') load('@io_bazel_rules_docker//contrib:push-all.bzl', 'docker_push') def app_image(name, binary, repository, **kwargs): go_image(name='image', binary=binary, **kwargs) container_bundle(name='bundle', images={'$(DOCKER_REGISTRY)/%s:{STABLE_GIT_COMMIT}' % repository: ':image', '$(DOCKER_REGISTRY)/%s:{STABLE_GIT_COMMIT_FULL}' % repository: ':image'}) docker_push(name='push', bundle=':bundle', **kwargs)
# working-with-Data-structure #union def union(set1,set2): return set(set1)&(set2) # driver code Set1={0,2,3,4,5,6,8} Set2={1,2,3,4,5} Print(union(set1,set2)) #intersection def intersection(set1,set2): return set(set1)&(set2) #driver code Set1={0,2,4,6,8} Set2={1,2,4,4,5} Print(intersection(set1,set2)) #difference Set1={0,2,3,4,5,6,8} Set2={1,2,3,4,5} Set_difference=(set1)-(set2) Set_difference=set(set_difference) Print(set_difference) #python code to find the symmetric_difference #use of symmetric_difference()method Set_A={0,2,4,6,8} Set_B={1,2,3,4,5} Print(set_A,symmetric_difference(set_B))
def union(set1, set2): return set(set1) & set2 set1 = {0, 2, 3, 4, 5, 6, 8} set2 = {1, 2, 3, 4, 5} print(union(set1, set2)) def intersection(set1, set2): return set(set1) & set2 set1 = {0, 2, 4, 6, 8} set2 = {1, 2, 4, 4, 5} print(intersection(set1, set2)) set1 = {0, 2, 3, 4, 5, 6, 8} set2 = {1, 2, 3, 4, 5} set_difference = set1 - set2 set_difference = set(set_difference) print(set_difference) set_a = {0, 2, 4, 6, 8} set_b = {1, 2, 3, 4, 5} print(set_A, symmetric_difference(set_B))
class Qint(int): def __init__(self, num): self.qkey = None self.parent = None self.parental_id = None self.name = None self._qint = True
class Qint(int): def __init__(self, num): self.qkey = None self.parent = None self.parental_id = None self.name = None self._qint = True
#!/usr/bin/env python # Analyse des accidents corporels de la circulation a partir des fichiers csv open data # - telecharger les fichiers csv depuis : # https://www.data.gouv.fr/en/datasets/bases-de-donnees-annuelles-des-accidents-corporels-de-la-circulation-routiere-annees-de-2005-a-2019/ # - changer la commune et l'annee : commune = '92012' annee = 2019 id_acc = [] accidents = {} gravite = {'1' : 'indemne', '2' : 'tue', '3' : 'grave', '4' : 'leger'} def get_header(line): h = line.rstrip().replace('"', '').split(';') h = dict(zip(h, range(len(h)))) return h with open('caracteristiques-' + str(annee) + '.csv') as f: head = get_header(f.readline()) for l in f: data = l.rstrip().replace('"', '').split(';') try: com = data[head['com']] except: break if com == commune: Num_Acc = data[head['Num_Acc']] id_acc.append(Num_Acc) accidents[Num_Acc] = {} accidents[Num_Acc]['lat'] = data[head['lat']].replace(',','.') accidents[Num_Acc]['long'] = data[head['long']].replace(',','.') accidents[Num_Acc]['usagers'] = [] accidents[Num_Acc]['catv'] = [] #print id_acc velos = [] with open('vehicules-' + str(annee) + '.csv') as f: head = get_header(f.readline()) for l in f: data = l.rstrip().replace('"', '').split(';') try: Num_Acc = data[head['Num_Acc']] except: break if not Num_Acc in id_acc: continue catv = data[head['catv']] id_vehicule = data[head['id_vehicule']] accidents[Num_Acc]['catv'].append(catv) if catv == '1' or catv == '80': velos.append(id_vehicule) cyclistes = [] with open('usagers-' + str(annee) + '.csv') as f: head = get_header(f.readline()) for l in f: data = l.rstrip().replace('"', '').split(';') try: Num_Acc = data[head['Num_Acc']] except: break if not Num_Acc in id_acc: continue catu = data[head['catu']] grav = gravite[data[head['grav']]] id_vehicule = data[head['id_vehicule']] accidents[Num_Acc]['usagers'].append([catu, grav]) if id_vehicule in velos and catu != '3': cyclistes.append([Num_Acc, grav]) #print accidents with open('pietons.csv', 'w') as f: f.write("lat,long,grav,catv\n") for v in accidents.values(): catv = v['catv'] if '1' in catv or '80' in catv: catv = 'velo' else: catv = 'vehicule' for u in v['usagers']: if u[0] == '3': f.write('%s,%s,%s,%s\n' % (v['lat'], v['long'],u[1],catv)) with open('cyclistes.csv', 'w') as f: f.write("lat,long,grav\n") for Num_Acc, grav in cyclistes: v = accidents[Num_Acc] f.write('%s,%s,%s\n' % (v['lat'], v['long'],grav))
commune = '92012' annee = 2019 id_acc = [] accidents = {} gravite = {'1': 'indemne', '2': 'tue', '3': 'grave', '4': 'leger'} def get_header(line): h = line.rstrip().replace('"', '').split(';') h = dict(zip(h, range(len(h)))) return h with open('caracteristiques-' + str(annee) + '.csv') as f: head = get_header(f.readline()) for l in f: data = l.rstrip().replace('"', '').split(';') try: com = data[head['com']] except: break if com == commune: num__acc = data[head['Num_Acc']] id_acc.append(Num_Acc) accidents[Num_Acc] = {} accidents[Num_Acc]['lat'] = data[head['lat']].replace(',', '.') accidents[Num_Acc]['long'] = data[head['long']].replace(',', '.') accidents[Num_Acc]['usagers'] = [] accidents[Num_Acc]['catv'] = [] velos = [] with open('vehicules-' + str(annee) + '.csv') as f: head = get_header(f.readline()) for l in f: data = l.rstrip().replace('"', '').split(';') try: num__acc = data[head['Num_Acc']] except: break if not Num_Acc in id_acc: continue catv = data[head['catv']] id_vehicule = data[head['id_vehicule']] accidents[Num_Acc]['catv'].append(catv) if catv == '1' or catv == '80': velos.append(id_vehicule) cyclistes = [] with open('usagers-' + str(annee) + '.csv') as f: head = get_header(f.readline()) for l in f: data = l.rstrip().replace('"', '').split(';') try: num__acc = data[head['Num_Acc']] except: break if not Num_Acc in id_acc: continue catu = data[head['catu']] grav = gravite[data[head['grav']]] id_vehicule = data[head['id_vehicule']] accidents[Num_Acc]['usagers'].append([catu, grav]) if id_vehicule in velos and catu != '3': cyclistes.append([Num_Acc, grav]) with open('pietons.csv', 'w') as f: f.write('lat,long,grav,catv\n') for v in accidents.values(): catv = v['catv'] if '1' in catv or '80' in catv: catv = 'velo' else: catv = 'vehicule' for u in v['usagers']: if u[0] == '3': f.write('%s,%s,%s,%s\n' % (v['lat'], v['long'], u[1], catv)) with open('cyclistes.csv', 'w') as f: f.write('lat,long,grav\n') for (num__acc, grav) in cyclistes: v = accidents[Num_Acc] f.write('%s,%s,%s\n' % (v['lat'], v['long'], grav))
# n = int(input('Enter the number of time you want to display Hello World!')) # i = 0 ##While Loop # while i < n : # print('Hello World\n') # x += 1 n = input('Enter a number: ') #Check if the input is empty if n == "": print('Nothing to display') else: #For Loop for i in range(int(n)): print('Hello World!')
n = input('Enter a number: ') if n == '': print('Nothing to display') else: for i in range(int(n)): print('Hello World!')
class MenuItem: pass # Buat instance untuk class MenuItem menu_item1 = MenuItem()
class Menuitem: pass menu_item1 = menu_item()
class FederationClientServiceVariables: def __init__(self): self.FederationClientServiceStatus = '' self.FederationClientServicePort = 9000 self.FederationClientServiceIP = None
class Federationclientservicevariables: def __init__(self): self.FederationClientServiceStatus = '' self.FederationClientServicePort = 9000 self.FederationClientServiceIP = None
class Format: def skip(self, line): False def before(self, line): return s, None def after(self, line, data): return s class fastText(Format): LABEL_PREFIX = '__label__' def before(self, line): labels = [] _ = [] for w in line.split(' '): if w.startswith(fastText.LABEL_PREFIX): labels.append(w) else: _.append(w) return ' '.join(_), labels def after(self, line, data): return ' '.join(data) + ' ' + line
class Format: def skip(self, line): False def before(self, line): return (s, None) def after(self, line, data): return s class Fasttext(Format): label_prefix = '__label__' def before(self, line): labels = [] _ = [] for w in line.split(' '): if w.startswith(fastText.LABEL_PREFIX): labels.append(w) else: _.append(w) return (' '.join(_), labels) def after(self, line, data): return ' '.join(data) + ' ' + line
# Time complexity: O(n) # Approach: Backtracking. Similar to DP 2D array solution. class Solution: def findIp(self, s, index, i, tmp, ans): if i==4: if index >= len(s): ans.append(tmp[1:]) return if index >= len(s): return if s[index]=='0': self.findIp(s, index+1, i+1, tmp+'.'+s[index], ans) else: if int(s[index])>=0 and int(s[index])<=255: self.findIp(s, index+1, i+1, tmp+'.'+s[index], ans) if index+2<=len(s) and int(s[index:index+2])>=0 and int(s[index:index+2])<=255: self.findIp(s, index+2, i+1, tmp+'.'+s[index:index+2], ans) if index+3<=len(s) and int(s[index:index+3])>=0 and int(s[index:index+3])<=255: self.findIp(s, index+3, i+1, tmp+'.'+s[index:index+3], ans) def restoreIpAddresses(self, s: str) -> List[str]: ans = [] self.findIp(s, 0, 0, "", ans) return ans
class Solution: def find_ip(self, s, index, i, tmp, ans): if i == 4: if index >= len(s): ans.append(tmp[1:]) return if index >= len(s): return if s[index] == '0': self.findIp(s, index + 1, i + 1, tmp + '.' + s[index], ans) else: if int(s[index]) >= 0 and int(s[index]) <= 255: self.findIp(s, index + 1, i + 1, tmp + '.' + s[index], ans) if index + 2 <= len(s) and int(s[index:index + 2]) >= 0 and (int(s[index:index + 2]) <= 255): self.findIp(s, index + 2, i + 1, tmp + '.' + s[index:index + 2], ans) if index + 3 <= len(s) and int(s[index:index + 3]) >= 0 and (int(s[index:index + 3]) <= 255): self.findIp(s, index + 3, i + 1, tmp + '.' + s[index:index + 3], ans) def restore_ip_addresses(self, s: str) -> List[str]: ans = [] self.findIp(s, 0, 0, '', ans) return ans
# Just to implement while loop answer = 'no' while answer != 'yes': answer = input( 'Are you done?' ) print( 'Finally Exited.' );
answer = 'no' while answer != 'yes': answer = input('Are you done?') print('Finally Exited.')
base_tree = [{ 'url_delete': 'http://example.com/adminpages/delete/id/1', 'list_of_pk': ('["id", 1]', ), 'id': 1, 'label': u'Hello Traversal World!', 'url_update': 'http://example.com/adminpages/update/id/1', 'children': [{ 'url_delete': 'http://example.com/adminpages/delete/id/2', 'list_of_pk': ('["id", 2]', ), 'id': 2, 'label': u'We \u2665 gevent', 'url_update': 'http://example.com/adminpages/update/id/2', 'children': [{ 'url_delete': 'http://example.com/adminpages/delete/id/3', 'list_of_pk': ('["id", 3]', ), 'id': 3, 'label': u'And Pyramid', 'url_update': 'http://example.com/adminpages/update/id/3', 'children': [{ 'url_delete': 'http://example.com/adminpages/delete/id/12', 'list_of_pk': ('["id", 12]', ), 'id': 12, 'label': u'and aiohttp!', 'url_update': 'http://example.com/adminpages/update/id/12', 'children': [{ 'url_delete': 'http://example.com/adminpages/delete/id/14', 'list_of_pk': ('["id", 14]', ), 'id': 14, 'label': u'and beer!', 'url_update': 'http://example.com/adminpages/update/id/14', 'children': [{ 'url_delete': 'http://example.com/adminpages/delete/id/15', 'url_update': 'http://example.com/adminpages/update/id/15', 'id': 15, 'list_of_pk': ('["id", 15]', ), 'label': u'and bear to!' }] }] }, { 'url_delete': 'http://example.com/adminpages/delete/id/13', 'url_update': 'http://example.com/adminpages/update/id/13', 'id': 13, 'list_of_pk': ('["id", 13]', ), 'label': u'and asyncio!' }] }] }, { 'url_delete': 'http://example.com/adminpages/delete/id/4', 'list_of_pk': ('["id", 4]', ), 'id': 4, 'label': u'Redirect 301 to we-love-gevent', 'url_update': 'http://example.com/adminpages/update/id/4', 'children': [{ 'url_delete': 'http://example.com/adminpages/delete/id/5', 'url_update': 'http://example.com/adminpages/update/id/5', 'id': 5, 'list_of_pk': ('["id", 5]', ), 'label': u'Redirect 200 to about-company' }, { 'url_delete': 'http://example.com/adminpages/delete/id/6', 'url_update': 'http://example.com/adminpages/update/id/6', 'id': 6, 'list_of_pk': ('["id", 6]', ), 'label': u'\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f ITCase' }] }, { 'url_delete': 'http://example.com/adminpages/delete/id/7', 'list_of_pk': ('["id", 7]', ), 'id': 7, 'label': u'Our strategy', 'url_update': 'http://example.com/adminpages/update/id/7', 'children': [{ 'url_delete': 'http://example.com/adminpages/delete/id/8', 'list_of_pk': ('["id", 8]', ), 'id': 8, 'label': u'Wordwide', 'url_update': 'http://example.com/adminpages/update/id/8', 'children': [{ 'url_delete': 'http://example.com/adminpages/delete/id/9', 'url_update': 'http://example.com/adminpages/update/id/9', 'id': 9, 'list_of_pk': ('["id", 9]', ), 'label': u'Technology' }] }, { 'url_delete': 'http://example.com/adminpages/delete/id/10', 'list_of_pk': ('["id", 10]', ), 'id': 10, 'label': u'What we do', 'url_update': 'http://example.com/adminpages/update/id/10', 'children': [{ 'url_delete': 'http://example.com/adminpages/delete/id/11', 'url_update': 'http://example.com/adminpages/update/id/11', 'id': 11, 'list_of_pk': ('["id", 11]', ), 'label': u'at a glance' }] }] }] }, { 'url_delete': 'http://example.com/adminpages/delete/id/100', 'list_of_pk': ('["id", 100]', ), 'id': 100, 'label': u'Countries', 'url_update': 'http://example.com/adminpages/update/id/100', 'children': [{ 'url_delete': 'http://example.com/adminpages/delete/id/101', 'list_of_pk': ('["id", 101]', ), 'id': 101, 'label': u'Africa', 'url_update': 'http://example.com/adminpages/update/id/101', 'children': [{ 'url_delete': 'http://example.com/adminpages/delete/id/102', 'url_update': 'http://example.com/adminpages/update/id/102', 'id': 102, 'list_of_pk': ('["id", 102]', ), 'label': u'Algeria' }, { 'url_delete': 'http://example.com/adminpages/delete/id/103', 'url_update': 'http://example.com/adminpages/update/id/103', 'id': 103, 'list_of_pk': ('["id", 103]', ), 'label': u'Marocco' }, { 'url_delete': 'http://example.com/adminpages/delete/id/104', 'url_update': 'http://example.com/adminpages/update/id/104', 'id': 104, 'list_of_pk': ('["id", 104]', ), 'label': u'Libya' }, { 'url_delete': 'http://example.com/adminpages/delete/id/105', 'url_update': 'http://example.com/adminpages/update/id/105', 'id': 105, 'list_of_pk': ('["id", 105]', ), 'label': u'Somalia' }, { 'url_delete': 'http://example.com/adminpages/delete/id/106', 'url_update': 'http://example.com/adminpages/update/id/106', 'id': 106, 'list_of_pk': ('["id", 106]', ), 'label': u'Kenya' }, { 'url_delete': 'http://example.com/adminpages/delete/id/107', 'url_update': 'http://example.com/adminpages/update/id/107', 'id': 107, 'list_of_pk': ('["id", 107]', ), 'label': u'Mauritania' }, { 'url_delete': 'http://example.com/adminpages/delete/id/108', 'url_update': 'http://example.com/adminpages/update/id/108', 'id': 108, 'list_of_pk': ('["id", 108]', ), 'label': u'South Africa' }] }, { 'url_delete': 'http://example.com/adminpages/delete/id/200', 'list_of_pk': ('["id", 200]', ), 'id': 200, 'label': u'America', 'url_update': 'http://example.com/adminpages/update/id/200', 'children': [{ 'url_delete': 'http://example.com/adminpages/delete/id/201', 'list_of_pk': ('["id", 201]', ), 'id': 201, 'label': u'North-America', 'url_update': 'http://example.com/adminpages/update/id/201', 'children': [{ 'url_delete': 'http://example.com/adminpages/delete/id/202', 'url_update': 'http://example.com/adminpages/update/id/202', 'id': 202, 'list_of_pk': ('["id", 202]', ), 'label': u'Canada' }, { 'url_delete': 'http://example.com/adminpages/delete/id/203', 'url_update': 'http://example.com/adminpages/update/id/203', 'id': 203, 'list_of_pk': ('["id", 203]', ), 'label': u'USA' }] }, { 'url_delete': 'http://example.com/adminpages/delete/id/300', 'list_of_pk': ('["id", 300]', ), 'id': 300, 'label': u'Middle-America', 'url_update': 'http://example.com/adminpages/update/id/300', 'children': [{ 'url_delete': 'http://example.com/adminpages/delete/id/301', 'url_update': 'http://example.com/adminpages/update/id/301', 'id': 301, 'list_of_pk': ('["id", 301]', ), 'label': u'Mexico' }, { 'url_delete': 'http://example.com/adminpages/delete/id/302', 'url_update': 'http://example.com/adminpages/update/id/302', 'id': 302, 'list_of_pk': ('["id", 302]', ), 'label': u'Honduras' }, { 'url_delete': 'http://example.com/adminpages/delete/id/303', 'url_update': 'http://example.com/adminpages/update/id/303', 'id': 303, 'list_of_pk': ('["id", 303]', ), 'label': u'Guatemala' }] }, { 'url_delete': 'http://example.com/adminpages/delete/id/400', 'list_of_pk': ('["id", 400]', ), 'id': 400, 'label': u'South-America', 'url_update': 'http://example.com/adminpages/update/id/400', 'children': [{ 'url_delete': 'http://example.com/adminpages/delete/id/401', 'url_update': 'http://example.com/adminpages/update/id/401', 'id': 401, 'list_of_pk': ('["id", 401]', ), 'label': u'Brazil' }, { 'url_delete': 'http://example.com/adminpages/delete/id/402', 'url_update': 'http://example.com/adminpages/update/id/402', 'id': 402, 'list_of_pk': ('["id", 402]', ), 'label': u'Argentina' }, { 'url_delete': 'http://example.com/adminpages/delete/id/403', 'url_update': 'http://example.com/adminpages/update/id/403', 'id': 403, 'list_of_pk': ('["id", 403]', ), 'label': u'Uruguay' }, { 'url_delete': 'http://example.com/adminpages/delete/id/404', 'url_update': 'http://example.com/adminpages/update/id/404', 'id': 404, 'list_of_pk': ('["id", 404]', ), 'label': u'Chile' }] }] }, { 'url_delete': 'http://example.com/adminpages/delete/id/500', 'list_of_pk': ('["id", 500]', ), 'id': 500, 'label': u'Asia', 'url_update': 'http://example.com/adminpages/update/id/500', 'children': [{ 'url_delete': 'http://example.com/adminpages/delete/id/501', 'url_update': 'http://example.com/adminpages/update/id/501', 'id': 501, 'list_of_pk': ('["id", 501]', ), 'label': u'China' }, { 'url_delete': 'http://example.com/adminpages/delete/id/502', 'url_update': 'http://example.com/adminpages/update/id/502', 'id': 502, 'list_of_pk': ('["id", 502]', ), 'label': u'India' }, { 'url_delete': 'http://example.com/adminpages/delete/id/503', 'url_update': 'http://example.com/adminpages/update/id/503', 'id': 503, 'list_of_pk': ('["id", 503]', ), 'label': u'Malaysia' }, { 'url_delete': 'http://example.com/adminpages/delete/id/504', 'url_update': 'http://example.com/adminpages/update/id/504', 'id': 504, 'list_of_pk': ('["id", 504]', ), 'label': u'Thailand' }, { 'url_delete': 'http://example.com/adminpages/delete/id/505', 'url_update': 'http://example.com/adminpages/update/id/505', 'id': 505, 'list_of_pk': ('["id", 505]', ), 'label': u'Vietnam' }, { 'url_delete': 'http://example.com/adminpages/delete/id/506', 'url_update': 'http://example.com/adminpages/update/id/506', 'id': 506, 'list_of_pk': ('["id", 506]', ), 'label': u'Singapore' }, { 'url_delete': 'http://example.com/adminpages/delete/id/507', 'url_update': 'http://example.com/adminpages/update/id/507', 'id': 507, 'list_of_pk': ('["id", 507]', ), 'label': u'Indonesia' }, { 'url_delete': 'http://example.com/adminpages/delete/id/508', 'url_update': 'http://example.com/adminpages/update/id/508', 'id': 508, 'list_of_pk': ('["id", 508]', ), 'label': u'Mongolia' }] }] }]
base_tree = [{'url_delete': 'http://example.com/adminpages/delete/id/1', 'list_of_pk': ('["id", 1]',), 'id': 1, 'label': u'Hello Traversal World!', 'url_update': 'http://example.com/adminpages/update/id/1', 'children': [{'url_delete': 'http://example.com/adminpages/delete/id/2', 'list_of_pk': ('["id", 2]',), 'id': 2, 'label': u'We ♥ gevent', 'url_update': 'http://example.com/adminpages/update/id/2', 'children': [{'url_delete': 'http://example.com/adminpages/delete/id/3', 'list_of_pk': ('["id", 3]',), 'id': 3, 'label': u'And Pyramid', 'url_update': 'http://example.com/adminpages/update/id/3', 'children': [{'url_delete': 'http://example.com/adminpages/delete/id/12', 'list_of_pk': ('["id", 12]',), 'id': 12, 'label': u'and aiohttp!', 'url_update': 'http://example.com/adminpages/update/id/12', 'children': [{'url_delete': 'http://example.com/adminpages/delete/id/14', 'list_of_pk': ('["id", 14]',), 'id': 14, 'label': u'and beer!', 'url_update': 'http://example.com/adminpages/update/id/14', 'children': [{'url_delete': 'http://example.com/adminpages/delete/id/15', 'url_update': 'http://example.com/adminpages/update/id/15', 'id': 15, 'list_of_pk': ('["id", 15]',), 'label': u'and bear to!'}]}]}, {'url_delete': 'http://example.com/adminpages/delete/id/13', 'url_update': 'http://example.com/adminpages/update/id/13', 'id': 13, 'list_of_pk': ('["id", 13]',), 'label': u'and asyncio!'}]}]}, {'url_delete': 'http://example.com/adminpages/delete/id/4', 'list_of_pk': ('["id", 4]',), 'id': 4, 'label': u'Redirect 301 to we-love-gevent', 'url_update': 'http://example.com/adminpages/update/id/4', 'children': [{'url_delete': 'http://example.com/adminpages/delete/id/5', 'url_update': 'http://example.com/adminpages/update/id/5', 'id': 5, 'list_of_pk': ('["id", 5]',), 'label': u'Redirect 200 to about-company'}, {'url_delete': 'http://example.com/adminpages/delete/id/6', 'url_update': 'http://example.com/adminpages/update/id/6', 'id': 6, 'list_of_pk': ('["id", 6]',), 'label': u'Компания ITCase'}]}, {'url_delete': 'http://example.com/adminpages/delete/id/7', 'list_of_pk': ('["id", 7]',), 'id': 7, 'label': u'Our strategy', 'url_update': 'http://example.com/adminpages/update/id/7', 'children': [{'url_delete': 'http://example.com/adminpages/delete/id/8', 'list_of_pk': ('["id", 8]',), 'id': 8, 'label': u'Wordwide', 'url_update': 'http://example.com/adminpages/update/id/8', 'children': [{'url_delete': 'http://example.com/adminpages/delete/id/9', 'url_update': 'http://example.com/adminpages/update/id/9', 'id': 9, 'list_of_pk': ('["id", 9]',), 'label': u'Technology'}]}, {'url_delete': 'http://example.com/adminpages/delete/id/10', 'list_of_pk': ('["id", 10]',), 'id': 10, 'label': u'What we do', 'url_update': 'http://example.com/adminpages/update/id/10', 'children': [{'url_delete': 'http://example.com/adminpages/delete/id/11', 'url_update': 'http://example.com/adminpages/update/id/11', 'id': 11, 'list_of_pk': ('["id", 11]',), 'label': u'at a glance'}]}]}]}, {'url_delete': 'http://example.com/adminpages/delete/id/100', 'list_of_pk': ('["id", 100]',), 'id': 100, 'label': u'Countries', 'url_update': 'http://example.com/adminpages/update/id/100', 'children': [{'url_delete': 'http://example.com/adminpages/delete/id/101', 'list_of_pk': ('["id", 101]',), 'id': 101, 'label': u'Africa', 'url_update': 'http://example.com/adminpages/update/id/101', 'children': [{'url_delete': 'http://example.com/adminpages/delete/id/102', 'url_update': 'http://example.com/adminpages/update/id/102', 'id': 102, 'list_of_pk': ('["id", 102]',), 'label': u'Algeria'}, {'url_delete': 'http://example.com/adminpages/delete/id/103', 'url_update': 'http://example.com/adminpages/update/id/103', 'id': 103, 'list_of_pk': ('["id", 103]',), 'label': u'Marocco'}, {'url_delete': 'http://example.com/adminpages/delete/id/104', 'url_update': 'http://example.com/adminpages/update/id/104', 'id': 104, 'list_of_pk': ('["id", 104]',), 'label': u'Libya'}, {'url_delete': 'http://example.com/adminpages/delete/id/105', 'url_update': 'http://example.com/adminpages/update/id/105', 'id': 105, 'list_of_pk': ('["id", 105]',), 'label': u'Somalia'}, {'url_delete': 'http://example.com/adminpages/delete/id/106', 'url_update': 'http://example.com/adminpages/update/id/106', 'id': 106, 'list_of_pk': ('["id", 106]',), 'label': u'Kenya'}, {'url_delete': 'http://example.com/adminpages/delete/id/107', 'url_update': 'http://example.com/adminpages/update/id/107', 'id': 107, 'list_of_pk': ('["id", 107]',), 'label': u'Mauritania'}, {'url_delete': 'http://example.com/adminpages/delete/id/108', 'url_update': 'http://example.com/adminpages/update/id/108', 'id': 108, 'list_of_pk': ('["id", 108]',), 'label': u'South Africa'}]}, {'url_delete': 'http://example.com/adminpages/delete/id/200', 'list_of_pk': ('["id", 200]',), 'id': 200, 'label': u'America', 'url_update': 'http://example.com/adminpages/update/id/200', 'children': [{'url_delete': 'http://example.com/adminpages/delete/id/201', 'list_of_pk': ('["id", 201]',), 'id': 201, 'label': u'North-America', 'url_update': 'http://example.com/adminpages/update/id/201', 'children': [{'url_delete': 'http://example.com/adminpages/delete/id/202', 'url_update': 'http://example.com/adminpages/update/id/202', 'id': 202, 'list_of_pk': ('["id", 202]',), 'label': u'Canada'}, {'url_delete': 'http://example.com/adminpages/delete/id/203', 'url_update': 'http://example.com/adminpages/update/id/203', 'id': 203, 'list_of_pk': ('["id", 203]',), 'label': u'USA'}]}, {'url_delete': 'http://example.com/adminpages/delete/id/300', 'list_of_pk': ('["id", 300]',), 'id': 300, 'label': u'Middle-America', 'url_update': 'http://example.com/adminpages/update/id/300', 'children': [{'url_delete': 'http://example.com/adminpages/delete/id/301', 'url_update': 'http://example.com/adminpages/update/id/301', 'id': 301, 'list_of_pk': ('["id", 301]',), 'label': u'Mexico'}, {'url_delete': 'http://example.com/adminpages/delete/id/302', 'url_update': 'http://example.com/adminpages/update/id/302', 'id': 302, 'list_of_pk': ('["id", 302]',), 'label': u'Honduras'}, {'url_delete': 'http://example.com/adminpages/delete/id/303', 'url_update': 'http://example.com/adminpages/update/id/303', 'id': 303, 'list_of_pk': ('["id", 303]',), 'label': u'Guatemala'}]}, {'url_delete': 'http://example.com/adminpages/delete/id/400', 'list_of_pk': ('["id", 400]',), 'id': 400, 'label': u'South-America', 'url_update': 'http://example.com/adminpages/update/id/400', 'children': [{'url_delete': 'http://example.com/adminpages/delete/id/401', 'url_update': 'http://example.com/adminpages/update/id/401', 'id': 401, 'list_of_pk': ('["id", 401]',), 'label': u'Brazil'}, {'url_delete': 'http://example.com/adminpages/delete/id/402', 'url_update': 'http://example.com/adminpages/update/id/402', 'id': 402, 'list_of_pk': ('["id", 402]',), 'label': u'Argentina'}, {'url_delete': 'http://example.com/adminpages/delete/id/403', 'url_update': 'http://example.com/adminpages/update/id/403', 'id': 403, 'list_of_pk': ('["id", 403]',), 'label': u'Uruguay'}, {'url_delete': 'http://example.com/adminpages/delete/id/404', 'url_update': 'http://example.com/adminpages/update/id/404', 'id': 404, 'list_of_pk': ('["id", 404]',), 'label': u'Chile'}]}]}, {'url_delete': 'http://example.com/adminpages/delete/id/500', 'list_of_pk': ('["id", 500]',), 'id': 500, 'label': u'Asia', 'url_update': 'http://example.com/adminpages/update/id/500', 'children': [{'url_delete': 'http://example.com/adminpages/delete/id/501', 'url_update': 'http://example.com/adminpages/update/id/501', 'id': 501, 'list_of_pk': ('["id", 501]',), 'label': u'China'}, {'url_delete': 'http://example.com/adminpages/delete/id/502', 'url_update': 'http://example.com/adminpages/update/id/502', 'id': 502, 'list_of_pk': ('["id", 502]',), 'label': u'India'}, {'url_delete': 'http://example.com/adminpages/delete/id/503', 'url_update': 'http://example.com/adminpages/update/id/503', 'id': 503, 'list_of_pk': ('["id", 503]',), 'label': u'Malaysia'}, {'url_delete': 'http://example.com/adminpages/delete/id/504', 'url_update': 'http://example.com/adminpages/update/id/504', 'id': 504, 'list_of_pk': ('["id", 504]',), 'label': u'Thailand'}, {'url_delete': 'http://example.com/adminpages/delete/id/505', 'url_update': 'http://example.com/adminpages/update/id/505', 'id': 505, 'list_of_pk': ('["id", 505]',), 'label': u'Vietnam'}, {'url_delete': 'http://example.com/adminpages/delete/id/506', 'url_update': 'http://example.com/adminpages/update/id/506', 'id': 506, 'list_of_pk': ('["id", 506]',), 'label': u'Singapore'}, {'url_delete': 'http://example.com/adminpages/delete/id/507', 'url_update': 'http://example.com/adminpages/update/id/507', 'id': 507, 'list_of_pk': ('["id", 507]',), 'label': u'Indonesia'}, {'url_delete': 'http://example.com/adminpages/delete/id/508', 'url_update': 'http://example.com/adminpages/update/id/508', 'id': 508, 'list_of_pk': ('["id", 508]',), 'label': u'Mongolia'}]}]}]
@metadata_reactor def add_backup_key(metadata): return { 'users': { 'root': { 'authorized_keys': { 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDM70gDI1cuIKu15VAEYnlWMFi3zGPf6shtQCzrHBv1nOOkfPdXlXACC4H5+MiTV5foAIA8PUaqOV9gow1w639TnWDL2DwPJ5RsT+P5g4eWszW5xQPo0zAKuvlTMB9JkDXGx1OpOE4e9n3++71yuvF/wVlqYxJwxeWXCdHf2ayx6OrTMcSMUIi+zqD494YBhKt+QJAiRrXGNU82FczJeK3iRMTtd+LUeGtnEoskcDOwhGfOXGsUGt3BMWLiDhGXp4ZvKUhNSTz5Kr9OCQT/uWam3nXciZrx1a2kVFJhd1ur81LRqxxDMGQjS29z6Vpd2vxG/P8mP3w2r7fvoqE33hpv': {} } } } }
@metadata_reactor def add_backup_key(metadata): return {'users': {'root': {'authorized_keys': {'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDM70gDI1cuIKu15VAEYnlWMFi3zGPf6shtQCzrHBv1nOOkfPdXlXACC4H5+MiTV5foAIA8PUaqOV9gow1w639TnWDL2DwPJ5RsT+P5g4eWszW5xQPo0zAKuvlTMB9JkDXGx1OpOE4e9n3++71yuvF/wVlqYxJwxeWXCdHf2ayx6OrTMcSMUIi+zqD494YBhKt+QJAiRrXGNU82FczJeK3iRMTtd+LUeGtnEoskcDOwhGfOXGsUGt3BMWLiDhGXp4ZvKUhNSTz5Kr9OCQT/uWam3nXciZrx1a2kVFJhd1ur81LRqxxDMGQjS29z6Vpd2vxG/P8mP3w2r7fvoqE33hpv': {}}}}}
# This file mainly exists to allow python setup.py test to work. # flake8: noqa def runtests(): pass if __name__ == '__main__': runtests()
def runtests(): pass if __name__ == '__main__': runtests()
line = open("day10.txt", "r").readline() def day10(iterate, sequence): for i in range(iterate): concat = "" first = True second = False sameNumberCounter = 0 secondNum = 0 numCounter = 0 for num in sequence: numCounter += 1 if second and secondNum != num: concat += str(sameNumberCounter) + str(secondNum) first = True second = False if numCounter == len(sequence): sameNumberCounter = 1 concat += str(sameNumberCounter) + str(num) sameNumberCounter = 0 secondNum = 0 elif secondNum == num: sameNumberCounter += 1 continue if first: firstNum = num sameNumberCounter += 1 first = False continue elif firstNum == num: sameNumberCounter += 1 continue else: concat += str(sameNumberCounter) + str(firstNum) secondNum = num second = True sameNumberCounter = 1 if numCounter == len(sequence): concat += str(sameNumberCounter) + str(secondNum) sequence = concat print(len(concat)) print("Part 1:") day10(40, line) print("Part 2:") day10(50, line)
line = open('day10.txt', 'r').readline() def day10(iterate, sequence): for i in range(iterate): concat = '' first = True second = False same_number_counter = 0 second_num = 0 num_counter = 0 for num in sequence: num_counter += 1 if second and secondNum != num: concat += str(sameNumberCounter) + str(secondNum) first = True second = False if numCounter == len(sequence): same_number_counter = 1 concat += str(sameNumberCounter) + str(num) same_number_counter = 0 second_num = 0 elif secondNum == num: same_number_counter += 1 continue if first: first_num = num same_number_counter += 1 first = False continue elif firstNum == num: same_number_counter += 1 continue else: concat += str(sameNumberCounter) + str(firstNum) second_num = num second = True same_number_counter = 1 if numCounter == len(sequence): concat += str(sameNumberCounter) + str(secondNum) sequence = concat print(len(concat)) print('Part 1:') day10(40, line) print('Part 2:') day10(50, line)
# # PySNMP MIB module ALCATEL-IND1-IPMS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ALCATEL-IND1-IPMS-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:02:25 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) # softentIND1Ipms, = mibBuilder.importSymbols("ALCATEL-IND1-BASE", "softentIND1Ipms") OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsIntersection", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint") InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex") ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance") MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, TimeTicks, Counter32, Counter64, MibIdentifier, Bits, Integer32, ObjectIdentity, NotificationType, Gauge32, iso, ModuleIdentity, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "TimeTicks", "Counter32", "Counter64", "MibIdentifier", "Bits", "Integer32", "ObjectIdentity", "NotificationType", "Gauge32", "iso", "ModuleIdentity", "Unsigned32") TextualConvention, RowStatus, DisplayString, MacAddress = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "RowStatus", "DisplayString", "MacAddress") alcatelIND1IPMSMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1)) alcatelIND1IPMSMIB.setRevisions(('2007-04-03 00:00',)) if mibBuilder.loadTexts: alcatelIND1IPMSMIB.setLastUpdated('200704030000Z') if mibBuilder.loadTexts: alcatelIND1IPMSMIB.setOrganization('Alcatel-Lucent') alcatelIND1IPMSMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1)) alaIpmsConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1)) alaIpmsStatus = MibScalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2))).clone('disable')).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaIpmsStatus.setStatus('current') alaIpmsLeaveTimeout = MibScalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 2), Unsigned32().clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaIpmsLeaveTimeout.setStatus('current') alaIpmsQueryInterval = MibScalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 3), Unsigned32().clone(125)).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaIpmsQueryInterval.setStatus('current') alaIpmsNeighborTimer = MibScalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 4), Unsigned32().clone(90)).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaIpmsNeighborTimer.setStatus('current') alaIpmsQuerierTimer = MibScalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 5), Unsigned32().clone(260)).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaIpmsQuerierTimer.setStatus('current') alaIpmsMembershipTimer = MibScalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 6), Unsigned32().clone(260)).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaIpmsMembershipTimer.setStatus('current') alaIpmsPriority = MibScalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(4, 3, 2, 1, 0))).clone(namedValues=NamedValues(("unsupported", 4), ("urgent", 3), ("high", 2), ("medium", 1), ("low", 0))).clone('low')).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaIpmsPriority.setStatus('current') alaIpmsMaxBandwidth = MibScalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 8), Unsigned32().clone(10)).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaIpmsMaxBandwidth.setStatus('current') alaIpmsHardwareRoute = MibScalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("unsupported", 0), ("enable", 1), ("disable", 2))).clone('disable')).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaIpmsHardwareRoute.setStatus('current') alaIpmsIGMPMembershipProxyVersion = MibScalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("igmpv1", 1), ("igmpv2", 2), ("igmpv3", 3))).clone('igmpv2')).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaIpmsIGMPMembershipProxyVersion.setStatus('current') alaIpmsOtherQuerierTimer = MibScalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 11), Unsigned32().clone(255)).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaIpmsOtherQuerierTimer.setStatus('current') alaIpmsGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2)) alaIpmsGroupTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1), ) if mibBuilder.loadTexts: alaIpmsGroupTable.setStatus('current') alaIpmsGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1), ).setIndexNames((0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsGroupDestIpAddr"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsGroupClientIpAddr"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsGroupClientVlan"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsGroupClientIfIndex"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsGroupClientVci"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsGroupIGMPVersion"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsGroupIGMPv3SrcIP"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsGroupIGMPv3SrcType")) if mibBuilder.loadTexts: alaIpmsGroupEntry.setStatus('current') alaIpmsGroupDestIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 1), IpAddress()) if mibBuilder.loadTexts: alaIpmsGroupDestIpAddr.setStatus('current') alaIpmsGroupClientIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 2), IpAddress()) if mibBuilder.loadTexts: alaIpmsGroupClientIpAddr.setStatus('current') alaIpmsGroupClientMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 3), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsGroupClientMacAddr.setStatus('current') alaIpmsGroupClientVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))) if mibBuilder.loadTexts: alaIpmsGroupClientVlan.setStatus('current') alaIpmsGroupClientIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 5), InterfaceIndex()) if mibBuilder.loadTexts: alaIpmsGroupClientIfIndex.setStatus('current') alaIpmsGroupClientVci = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 6), Unsigned32()) if mibBuilder.loadTexts: alaIpmsGroupClientVci.setStatus('current') alaIpmsGroupIGMPVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("igmpv1", 1), ("igmpv2", 2), ("igmpv3", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsGroupIGMPVersion.setStatus('current') alaIpmsGroupIGMPv3SrcIP = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 8), IpAddress()) if mibBuilder.loadTexts: alaIpmsGroupIGMPv3SrcIP.setStatus('current') alaIpmsGroupIGMPv3SrcType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("na", 0), ("include", 1), ("exclude", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsGroupIGMPv3SrcType.setStatus('current') alaIpmsGroupIGMPv3SrcTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 10), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsGroupIGMPv3SrcTimeout.setStatus('current') alaIpmsGroupIGMPv3GroupType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("na", 0), ("include", 1), ("exclude", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsGroupIGMPv3GroupType.setStatus('current') alaIpmsGroupTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 12), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsGroupTimeout.setStatus('current') alaIpmsNeighbor = MibIdentifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3)) alaIpmsNeighborTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3, 1), ) if mibBuilder.loadTexts: alaIpmsNeighborTable.setStatus('current') alaIpmsNeighborEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3, 1, 1), ).setIndexNames((0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsNeighborIpAddr")) if mibBuilder.loadTexts: alaIpmsNeighborEntry.setStatus('current') alaIpmsNeighborIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3, 1, 1, 1), IpAddress()) if mibBuilder.loadTexts: alaIpmsNeighborIpAddr.setStatus('current') alaIpmsNeighborVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsNeighborVlan.setStatus('current') alaIpmsNeighborIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3, 1, 1, 3), InterfaceIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsNeighborIfIndex.setStatus('current') alaIpmsNeighborVci = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3, 1, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsNeighborVci.setStatus('current') alaIpmsNeighborType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("native", 0), ("ipip", 1), ("pim", 2), ("cmm", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsNeighborType.setStatus('current') alaIpmsNeighborTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3, 1, 1, 6), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsNeighborTimeout.setStatus('current') alaIpmsStaticNeighbor = MibIdentifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 4)) alaIpmsStaticNeighborTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 4, 1), ) if mibBuilder.loadTexts: alaIpmsStaticNeighborTable.setStatus('current') alaIpmsStaticNeighborEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 4, 1, 1), ).setIndexNames((0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsStaticNeighborVlan"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsStaticNeighborIfIndex"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsStaticNeighborVci")) if mibBuilder.loadTexts: alaIpmsStaticNeighborEntry.setStatus('current') alaIpmsStaticNeighborVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 4, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))) if mibBuilder.loadTexts: alaIpmsStaticNeighborVlan.setStatus('current') alaIpmsStaticNeighborIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 4, 1, 1, 2), InterfaceIndex()) if mibBuilder.loadTexts: alaIpmsStaticNeighborIfIndex.setStatus('current') alaIpmsStaticNeighborVci = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 4, 1, 1, 3), Unsigned32()) if mibBuilder.loadTexts: alaIpmsStaticNeighborVci.setStatus('current') alaIpmsStaticNeighborIGMPVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 4, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 3))).clone(namedValues=NamedValues(("igmpv2", 2), ("igmpv3", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaIpmsStaticNeighborIGMPVersion.setStatus('current') alaIpmsStaticNeighborRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 4, 1, 1, 5), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaIpmsStaticNeighborRowStatus.setStatus('current') alaIpmsQuerier = MibIdentifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5)) alaIpmsQuerierTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5, 1), ) if mibBuilder.loadTexts: alaIpmsQuerierTable.setStatus('current') alaIpmsQuerierEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5, 1, 1), ).setIndexNames((0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsQuerierIpAddr")) if mibBuilder.loadTexts: alaIpmsQuerierEntry.setStatus('current') alaIpmsQuerierIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5, 1, 1, 1), IpAddress()) if mibBuilder.loadTexts: alaIpmsQuerierIpAddr.setStatus('current') alaIpmsQuerierVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsQuerierVlan.setStatus('current') alaIpmsQuerierIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5, 1, 1, 3), InterfaceIndex()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsQuerierIfIndex.setStatus('current') alaIpmsQuerierVci = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5, 1, 1, 4), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsQuerierVci.setStatus('current') alaIpmsQuerierType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("native", 0), ("ipip", 1), ("pim", 2), ("cmm", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsQuerierType.setStatus('current') alaIpmsQuerierTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5, 1, 1, 6), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsQuerierTimeout.setStatus('current') alaIpmsStaticQuerier = MibIdentifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 6)) alaIpmsStaticQuerierTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 6, 1), ) if mibBuilder.loadTexts: alaIpmsStaticQuerierTable.setStatus('current') alaIpmsStaticQuerierEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 6, 1, 1), ).setIndexNames((0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsStaticQuerierVlan"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsStaticQuerierIfIndex"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsStaticQuerierVci")) if mibBuilder.loadTexts: alaIpmsStaticQuerierEntry.setStatus('current') alaIpmsStaticQuerierVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 6, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))) if mibBuilder.loadTexts: alaIpmsStaticQuerierVlan.setStatus('current') alaIpmsStaticQuerierIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 6, 1, 1, 2), InterfaceIndex()) if mibBuilder.loadTexts: alaIpmsStaticQuerierIfIndex.setStatus('current') alaIpmsStaticQuerierVci = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 6, 1, 1, 3), Unsigned32()) if mibBuilder.loadTexts: alaIpmsStaticQuerierVci.setStatus('current') alaIpmsStaticQuerierIGMPVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 6, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 3))).clone(namedValues=NamedValues(("igmpv2", 2), ("igmpv3", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaIpmsStaticQuerierIGMPVersion.setStatus('current') alaIpmsStaticQuerierRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 6, 1, 1, 5), RowStatus()).setMaxAccess("readwrite") if mibBuilder.loadTexts: alaIpmsStaticQuerierRowStatus.setStatus('current') alaIpmsSource = MibIdentifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7)) alaIpmsSourceTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1), ) if mibBuilder.loadTexts: alaIpmsSourceTable.setStatus('current') alaIpmsSourceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1), ).setIndexNames((0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsSourceDestIpAddr"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsSourceSrcIpAddr"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsSourceSrcVlan"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsSourceSrcIfIndex"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsSourceUniIpAddr"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsSourceSrcVci"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsSourceSrcType")) if mibBuilder.loadTexts: alaIpmsSourceEntry.setStatus('current') alaIpmsSourceDestIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 1), IpAddress()) if mibBuilder.loadTexts: alaIpmsSourceDestIpAddr.setStatus('current') alaIpmsSourceSrcIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 2), IpAddress()) if mibBuilder.loadTexts: alaIpmsSourceSrcIpAddr.setStatus('current') alaIpmsSourceSrcMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 3), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsSourceSrcMacAddr.setStatus('current') alaIpmsSourceSrcVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))) if mibBuilder.loadTexts: alaIpmsSourceSrcVlan.setStatus('current') alaIpmsSourceSrcIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 5), InterfaceIndex()) if mibBuilder.loadTexts: alaIpmsSourceSrcIfIndex.setStatus('current') alaIpmsSourceUniIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 6), IpAddress()) if mibBuilder.loadTexts: alaIpmsSourceUniIpAddr.setStatus('current') alaIpmsSourceSrcVci = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 7), Unsigned32()) if mibBuilder.loadTexts: alaIpmsSourceSrcVci.setStatus('current') alaIpmsSourceSrcType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("native", 0), ("ipip", 1), ("pim", 2), ("cmm", 3)))) if mibBuilder.loadTexts: alaIpmsSourceSrcType.setStatus('current') alaIpmsSourceTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 9), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsSourceTimeout.setStatus('current') alaIpmsForward = MibIdentifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8)) alaIpmsForwardTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1), ) if mibBuilder.loadTexts: alaIpmsForwardTable.setStatus('current') alaIpmsForwardEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1), ).setIndexNames((0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsForwardDestIpAddr"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsForwardSrcIpAddr"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsForwardDestVlan"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsForwardSrcVlan"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsForwardSrcIfIndex"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsForwardUniIpAddr"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsForwardSrcVci"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsForwardDestType"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsForwardSrcType"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsForwardDestIfIndex"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsForwardDestTunIpAddr")) if mibBuilder.loadTexts: alaIpmsForwardEntry.setStatus('current') alaIpmsForwardDestIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 1), IpAddress()) if mibBuilder.loadTexts: alaIpmsForwardDestIpAddr.setStatus('current') alaIpmsForwardSrcIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 2), IpAddress()) if mibBuilder.loadTexts: alaIpmsForwardSrcIpAddr.setStatus('current') alaIpmsForwardDestVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))) if mibBuilder.loadTexts: alaIpmsForwardDestVlan.setStatus('current') alaIpmsForwardSrcVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))) if mibBuilder.loadTexts: alaIpmsForwardSrcVlan.setStatus('current') alaIpmsForwardSrcIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 5), InterfaceIndex()) if mibBuilder.loadTexts: alaIpmsForwardSrcIfIndex.setStatus('current') alaIpmsForwardUniIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 6), IpAddress()) if mibBuilder.loadTexts: alaIpmsForwardUniIpAddr.setStatus('current') alaIpmsForwardSrcVci = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 7), Unsigned32()) if mibBuilder.loadTexts: alaIpmsForwardSrcVci.setStatus('current') alaIpmsForwardDestType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("native", 0), ("ipip", 1), ("pim", 2), ("cmm", 3)))) if mibBuilder.loadTexts: alaIpmsForwardDestType.setStatus('current') alaIpmsForwardSrcType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("native", 0), ("ipip", 1), ("pim", 2), ("cmm", 3)))) if mibBuilder.loadTexts: alaIpmsForwardSrcType.setStatus('current') alaIpmsForwardDestTunIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 10), IpAddress()) if mibBuilder.loadTexts: alaIpmsForwardDestTunIpAddr.setStatus('current') alaIpmsForwardSrcTunIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 11), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsForwardSrcTunIpAddr.setStatus('current') alaIpmsForwardRtrMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 12), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsForwardRtrMacAddr.setStatus('current') alaIpmsForwardRtrTtl = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsForwardRtrTtl.setStatus('current') alaIpmsForwardDestIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 14), InterfaceIndex()) if mibBuilder.loadTexts: alaIpmsForwardDestIfIndex.setStatus('current') alaIpmsPolicy = MibIdentifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9)) alaIpmsPolicyTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1), ) if mibBuilder.loadTexts: alaIpmsPolicyTable.setStatus('current') alaIpmsPolicyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1), ).setIndexNames((0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsPolicyDestIpAddr"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsPolicySrcIpAddr"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsPolicySrcVlan"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsPolicySrcIfIndex"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsPolicyUniIpAddr"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsPolicySrcVci"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsPolicySrcType"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsPolicyPolicy")) if mibBuilder.loadTexts: alaIpmsPolicyEntry.setStatus('current') alaIpmsPolicyDestIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 1), IpAddress()) if mibBuilder.loadTexts: alaIpmsPolicyDestIpAddr.setStatus('current') alaIpmsPolicySrcIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 2), IpAddress()) if mibBuilder.loadTexts: alaIpmsPolicySrcIpAddr.setStatus('current') alaIpmsPolicySrcMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 3), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsPolicySrcMacAddr.setStatus('current') alaIpmsPolicySrcVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))) if mibBuilder.loadTexts: alaIpmsPolicySrcVlan.setStatus('current') alaIpmsPolicySrcIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 5), InterfaceIndex()) if mibBuilder.loadTexts: alaIpmsPolicySrcIfIndex.setStatus('current') alaIpmsPolicyUniIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 6), IpAddress()) if mibBuilder.loadTexts: alaIpmsPolicyUniIpAddr.setStatus('current') alaIpmsPolicySrcVci = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 7), Unsigned32()) if mibBuilder.loadTexts: alaIpmsPolicySrcVci.setStatus('current') alaIpmsPolicySrcType = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("native", 0), ("ipip", 1), ("pim", 2), ("cmm", 3)))) if mibBuilder.loadTexts: alaIpmsPolicySrcType.setStatus('current') alaIpmsPolicyPolicy = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("membership", 1)))) if mibBuilder.loadTexts: alaIpmsPolicyPolicy.setStatus('current') alaIpmsPolicyDisposition = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("drop", 0), ("accept", 1)))).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsPolicyDisposition.setStatus('current') alaIpmsPolicyTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 11), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: alaIpmsPolicyTimeout.setStatus('current') alaIpmsStaticMember = MibIdentifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10)) alaIpmsStaticMemberTable = MibTable((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10, 1), ) if mibBuilder.loadTexts: alaIpmsStaticMemberTable.setStatus('current') alaIpmsStaticMemberEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10, 1, 1), ).setIndexNames((0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsStaticMemberGroupAddr"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsStaticMemberVlan"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsStaticMemberIfIndex"), (0, "ALCATEL-IND1-IPMS-MIB", "alaIpmsStaticMemberVci")) if mibBuilder.loadTexts: alaIpmsStaticMemberEntry.setStatus('current') alaIpmsStaticMemberGroupAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10, 1, 1, 1), IpAddress()) if mibBuilder.loadTexts: alaIpmsStaticMemberGroupAddr.setStatus('current') alaIpmsStaticMemberIGMPVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 3))).clone(namedValues=NamedValues(("igmpv2", 2), ("igmpv3", 3)))) if mibBuilder.loadTexts: alaIpmsStaticMemberIGMPVersion.setStatus('current') alaIpmsStaticMemberVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))) if mibBuilder.loadTexts: alaIpmsStaticMemberVlan.setStatus('current') alaIpmsStaticMemberIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10, 1, 1, 4), InterfaceIndex()) if mibBuilder.loadTexts: alaIpmsStaticMemberIfIndex.setStatus('current') alaIpmsStaticMemberVci = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10, 1, 1, 5), Unsigned32()) if mibBuilder.loadTexts: alaIpmsStaticMemberVci.setStatus('current') alaIpmsStaticMemberRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10, 1, 1, 6), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: alaIpmsStaticMemberRowStatus.setStatus('current') alcatelIND1IPMSMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2)) alcatelIND1IPMSMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 1)) alcatelIND1IPMSMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2)) alaIpmsCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 1, 1)).setObjects(("ALCATEL-IND1-IPMS-MIB", "alaIpmsConfig"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsGroup"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsNeighbor"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsStaticNeighbor"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsQuerier"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsStaticQuerier"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsSource"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsForward"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsPolicy")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaIpmsCompliance = alaIpmsCompliance.setStatus('current') alaIpmsConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 1)).setObjects(("ALCATEL-IND1-IPMS-MIB", "alaIpmsStatus"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsLeaveTimeout"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsQueryInterval"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsNeighborTimer"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsQuerierTimer"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsMembershipTimer"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsOtherQuerierTimer")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaIpmsConfigGroup = alaIpmsConfigGroup.setStatus('current') alaIpmsGroupGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 2)).setObjects(("ALCATEL-IND1-IPMS-MIB", "alaIpmsGroupClientMacAddr"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsGroupTimeout"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsGroupIGMPv3GroupType"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsGroupIGMPv3SrcTimeout")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaIpmsGroupGroup = alaIpmsGroupGroup.setStatus('current') alaIpmsNeighborGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 3)).setObjects(("ALCATEL-IND1-IPMS-MIB", "alaIpmsNeighborVlan"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsNeighborIfIndex"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsNeighborVci"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsNeighborType"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsNeighborTimeout")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaIpmsNeighborGroup = alaIpmsNeighborGroup.setStatus('current') alaIpmsStaticNeighborGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 4)).setObjects(("ALCATEL-IND1-IPMS-MIB", "alaIpmsStaticNeighborRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaIpmsStaticNeighborGroup = alaIpmsStaticNeighborGroup.setStatus('current') alaIpmsQuerierGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 5)).setObjects(("ALCATEL-IND1-IPMS-MIB", "alaIpmsQuerierVlan"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsQuerierIfIndex"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsQuerierVci"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsQuerierType"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsQuerierTimeout")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaIpmsQuerierGroup = alaIpmsQuerierGroup.setStatus('current') alaIpmsStaticQuerierGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 6)).setObjects(("ALCATEL-IND1-IPMS-MIB", "alaIpmsStaticQuerierRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaIpmsStaticQuerierGroup = alaIpmsStaticQuerierGroup.setStatus('current') alaIpmsSourceGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 7)).setObjects(("ALCATEL-IND1-IPMS-MIB", "alaIpmsSourceSrcMacAddr"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsSourceTimeout")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaIpmsSourceGroup = alaIpmsSourceGroup.setStatus('current') alaIpmsForwardGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 8)).setObjects(("ALCATEL-IND1-IPMS-MIB", "alaIpmsForwardSrcTunIpAddr"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsForwardRtrMacAddr"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsForwardRtrTtl")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaIpmsForwardGroup = alaIpmsForwardGroup.setStatus('current') alaIpmsPolicyGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 9)).setObjects(("ALCATEL-IND1-IPMS-MIB", "alaIpmsPolicySrcMacAddr"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsPolicyDisposition"), ("ALCATEL-IND1-IPMS-MIB", "alaIpmsPolicyTimeout")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): alaIpmsPolicyGroup = alaIpmsPolicyGroup.setStatus('current') mibBuilder.exportSymbols("ALCATEL-IND1-IPMS-MIB", alaIpmsStaticNeighborRowStatus=alaIpmsStaticNeighborRowStatus, alaIpmsQuerierVlan=alaIpmsQuerierVlan, alaIpmsStaticQuerier=alaIpmsStaticQuerier, alaIpmsGroupClientMacAddr=alaIpmsGroupClientMacAddr, alaIpmsNeighbor=alaIpmsNeighbor, alaIpmsStaticNeighborVci=alaIpmsStaticNeighborVci, alaIpmsPolicyUniIpAddr=alaIpmsPolicyUniIpAddr, alaIpmsForwardSrcVlan=alaIpmsForwardSrcVlan, alaIpmsGroupDestIpAddr=alaIpmsGroupDestIpAddr, alaIpmsNeighborVci=alaIpmsNeighborVci, alaIpmsStaticNeighbor=alaIpmsStaticNeighbor, alaIpmsGroupGroup=alaIpmsGroupGroup, alaIpmsForwardDestVlan=alaIpmsForwardDestVlan, alaIpmsStaticQuerierIfIndex=alaIpmsStaticQuerierIfIndex, alcatelIND1IPMSMIBCompliances=alcatelIND1IPMSMIBCompliances, alaIpmsSourceSrcVlan=alaIpmsSourceSrcVlan, alaIpmsForwardSrcIfIndex=alaIpmsForwardSrcIfIndex, alaIpmsHardwareRoute=alaIpmsHardwareRoute, alaIpmsNeighborTimeout=alaIpmsNeighborTimeout, alaIpmsStaticMemberIGMPVersion=alaIpmsStaticMemberIGMPVersion, alaIpmsStaticNeighborTable=alaIpmsStaticNeighborTable, alaIpmsNeighborIpAddr=alaIpmsNeighborIpAddr, alaIpmsForwardDestTunIpAddr=alaIpmsForwardDestTunIpAddr, alaIpmsSourceEntry=alaIpmsSourceEntry, alaIpmsPolicySrcVci=alaIpmsPolicySrcVci, alaIpmsForwardSrcType=alaIpmsForwardSrcType, alaIpmsQuerierIpAddr=alaIpmsQuerierIpAddr, alaIpmsOtherQuerierTimer=alaIpmsOtherQuerierTimer, alaIpmsGroupClientIfIndex=alaIpmsGroupClientIfIndex, alaIpmsForwardSrcVci=alaIpmsForwardSrcVci, alaIpmsStaticMember=alaIpmsStaticMember, alaIpmsPolicySrcIpAddr=alaIpmsPolicySrcIpAddr, alaIpmsForwardSrcIpAddr=alaIpmsForwardSrcIpAddr, alaIpmsPolicySrcMacAddr=alaIpmsPolicySrcMacAddr, alaIpmsStaticQuerierGroup=alaIpmsStaticQuerierGroup, alaIpmsStaticMemberVci=alaIpmsStaticMemberVci, alaIpmsPolicyTable=alaIpmsPolicyTable, alaIpmsMembershipTimer=alaIpmsMembershipTimer, alaIpmsStaticNeighborIGMPVersion=alaIpmsStaticNeighborIGMPVersion, alaIpmsSourceSrcVci=alaIpmsSourceSrcVci, alaIpmsForwardUniIpAddr=alaIpmsForwardUniIpAddr, alaIpmsPolicySrcType=alaIpmsPolicySrcType, alaIpmsGroupEntry=alaIpmsGroupEntry, alaIpmsNeighborGroup=alaIpmsNeighborGroup, alaIpmsSourceSrcMacAddr=alaIpmsSourceSrcMacAddr, alaIpmsStaticNeighborVlan=alaIpmsStaticNeighborVlan, alaIpmsStaticNeighborIfIndex=alaIpmsStaticNeighborIfIndex, alaIpmsQueryInterval=alaIpmsQueryInterval, alaIpmsPolicyGroup=alaIpmsPolicyGroup, alaIpmsForwardRtrMacAddr=alaIpmsForwardRtrMacAddr, alaIpmsStaticMemberEntry=alaIpmsStaticMemberEntry, alaIpmsNeighborTimer=alaIpmsNeighborTimer, alaIpmsConfig=alaIpmsConfig, alaIpmsForwardTable=alaIpmsForwardTable, alaIpmsQuerierGroup=alaIpmsQuerierGroup, alaIpmsGroup=alaIpmsGroup, alaIpmsGroupClientVlan=alaIpmsGroupClientVlan, alaIpmsNeighborVlan=alaIpmsNeighborVlan, alaIpmsMaxBandwidth=alaIpmsMaxBandwidth, alaIpmsSourceGroup=alaIpmsSourceGroup, alaIpmsGroupTable=alaIpmsGroupTable, alaIpmsPolicy=alaIpmsPolicy, alaIpmsConfigGroup=alaIpmsConfigGroup, alaIpmsForwardDestIfIndex=alaIpmsForwardDestIfIndex, alaIpmsSourceSrcType=alaIpmsSourceSrcType, alaIpmsSourceDestIpAddr=alaIpmsSourceDestIpAddr, alaIpmsPolicyDisposition=alaIpmsPolicyDisposition, alaIpmsQuerierTimeout=alaIpmsQuerierTimeout, alaIpmsGroupIGMPv3SrcTimeout=alaIpmsGroupIGMPv3SrcTimeout, alaIpmsStaticMemberRowStatus=alaIpmsStaticMemberRowStatus, alcatelIND1IPMSMIBObjects=alcatelIND1IPMSMIBObjects, PYSNMP_MODULE_ID=alcatelIND1IPMSMIB, alaIpmsSourceSrcIfIndex=alaIpmsSourceSrcIfIndex, alaIpmsPolicyEntry=alaIpmsPolicyEntry, alaIpmsPolicyPolicy=alaIpmsPolicyPolicy, alaIpmsStaticQuerierVci=alaIpmsStaticQuerierVci, alaIpmsQuerierEntry=alaIpmsQuerierEntry, alaIpmsSource=alaIpmsSource, alaIpmsGroupClientIpAddr=alaIpmsGroupClientIpAddr, alaIpmsIGMPMembershipProxyVersion=alaIpmsIGMPMembershipProxyVersion, alaIpmsNeighborEntry=alaIpmsNeighborEntry, alaIpmsNeighborType=alaIpmsNeighborType, alaIpmsStaticQuerierVlan=alaIpmsStaticQuerierVlan, alaIpmsGroupTimeout=alaIpmsGroupTimeout, alaIpmsPolicySrcVlan=alaIpmsPolicySrcVlan, alaIpmsForwardEntry=alaIpmsForwardEntry, alaIpmsQuerierTable=alaIpmsQuerierTable, alaIpmsForwardGroup=alaIpmsForwardGroup, alaIpmsGroupIGMPv3SrcIP=alaIpmsGroupIGMPv3SrcIP, alaIpmsSourceSrcIpAddr=alaIpmsSourceSrcIpAddr, alaIpmsGroupIGMPVersion=alaIpmsGroupIGMPVersion, alaIpmsSourceTimeout=alaIpmsSourceTimeout, alcatelIND1IPMSMIBConformance=alcatelIND1IPMSMIBConformance, alaIpmsQuerierTimer=alaIpmsQuerierTimer, alaIpmsStaticNeighborGroup=alaIpmsStaticNeighborGroup, alaIpmsPolicySrcIfIndex=alaIpmsPolicySrcIfIndex, alaIpmsForwardRtrTtl=alaIpmsForwardRtrTtl, alaIpmsPolicyTimeout=alaIpmsPolicyTimeout, alaIpmsStaticMemberTable=alaIpmsStaticMemberTable, alaIpmsStatus=alaIpmsStatus, alaIpmsStaticMemberGroupAddr=alaIpmsStaticMemberGroupAddr, alaIpmsGroupIGMPv3GroupType=alaIpmsGroupIGMPv3GroupType, alaIpmsForwardDestType=alaIpmsForwardDestType, alaIpmsForwardDestIpAddr=alaIpmsForwardDestIpAddr, alaIpmsStaticQuerierTable=alaIpmsStaticQuerierTable, alcatelIND1IPMSMIB=alcatelIND1IPMSMIB, alaIpmsQuerierVci=alaIpmsQuerierVci, alaIpmsStaticQuerierRowStatus=alaIpmsStaticQuerierRowStatus, alaIpmsStaticMemberVlan=alaIpmsStaticMemberVlan, alaIpmsLeaveTimeout=alaIpmsLeaveTimeout, alaIpmsStaticMemberIfIndex=alaIpmsStaticMemberIfIndex, alcatelIND1IPMSMIBGroups=alcatelIND1IPMSMIBGroups, alaIpmsPolicyDestIpAddr=alaIpmsPolicyDestIpAddr, alaIpmsStaticQuerierEntry=alaIpmsStaticQuerierEntry, alaIpmsForward=alaIpmsForward, alaIpmsGroupClientVci=alaIpmsGroupClientVci, alaIpmsGroupIGMPv3SrcType=alaIpmsGroupIGMPv3SrcType, alaIpmsForwardSrcTunIpAddr=alaIpmsForwardSrcTunIpAddr, alaIpmsStaticQuerierIGMPVersion=alaIpmsStaticQuerierIGMPVersion, alaIpmsSourceUniIpAddr=alaIpmsSourceUniIpAddr, alaIpmsQuerier=alaIpmsQuerier, alaIpmsPriority=alaIpmsPriority, alaIpmsQuerierIfIndex=alaIpmsQuerierIfIndex, alaIpmsNeighborIfIndex=alaIpmsNeighborIfIndex, alaIpmsCompliance=alaIpmsCompliance, alaIpmsNeighborTable=alaIpmsNeighborTable, alaIpmsSourceTable=alaIpmsSourceTable, alaIpmsQuerierType=alaIpmsQuerierType, alaIpmsStaticNeighborEntry=alaIpmsStaticNeighborEntry)
(softent_ind1_ipms,) = mibBuilder.importSymbols('ALCATEL-IND1-BASE', 'softentIND1Ipms') (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, constraints_intersection, value_range_constraint, constraints_union, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ConstraintsUnion', 'ValueSizeConstraint') (interface_index,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex') (object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance') (mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, time_ticks, counter32, counter64, mib_identifier, bits, integer32, object_identity, notification_type, gauge32, iso, module_identity, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'TimeTicks', 'Counter32', 'Counter64', 'MibIdentifier', 'Bits', 'Integer32', 'ObjectIdentity', 'NotificationType', 'Gauge32', 'iso', 'ModuleIdentity', 'Unsigned32') (textual_convention, row_status, display_string, mac_address) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'RowStatus', 'DisplayString', 'MacAddress') alcatel_ind1_ipmsmib = module_identity((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1)) alcatelIND1IPMSMIB.setRevisions(('2007-04-03 00:00',)) if mibBuilder.loadTexts: alcatelIND1IPMSMIB.setLastUpdated('200704030000Z') if mibBuilder.loadTexts: alcatelIND1IPMSMIB.setOrganization('Alcatel-Lucent') alcatel_ind1_ipmsmib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1)) ala_ipms_config = mib_identifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1)) ala_ipms_status = mib_scalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2))).clone('disable')).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaIpmsStatus.setStatus('current') ala_ipms_leave_timeout = mib_scalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 2), unsigned32().clone(1)).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaIpmsLeaveTimeout.setStatus('current') ala_ipms_query_interval = mib_scalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 3), unsigned32().clone(125)).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaIpmsQueryInterval.setStatus('current') ala_ipms_neighbor_timer = mib_scalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 4), unsigned32().clone(90)).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaIpmsNeighborTimer.setStatus('current') ala_ipms_querier_timer = mib_scalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 5), unsigned32().clone(260)).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaIpmsQuerierTimer.setStatus('current') ala_ipms_membership_timer = mib_scalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 6), unsigned32().clone(260)).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaIpmsMembershipTimer.setStatus('current') ala_ipms_priority = mib_scalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(4, 3, 2, 1, 0))).clone(namedValues=named_values(('unsupported', 4), ('urgent', 3), ('high', 2), ('medium', 1), ('low', 0))).clone('low')).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaIpmsPriority.setStatus('current') ala_ipms_max_bandwidth = mib_scalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 8), unsigned32().clone(10)).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaIpmsMaxBandwidth.setStatus('current') ala_ipms_hardware_route = mib_scalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('unsupported', 0), ('enable', 1), ('disable', 2))).clone('disable')).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaIpmsHardwareRoute.setStatus('current') ala_ipms_igmp_membership_proxy_version = mib_scalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('igmpv1', 1), ('igmpv2', 2), ('igmpv3', 3))).clone('igmpv2')).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaIpmsIGMPMembershipProxyVersion.setStatus('current') ala_ipms_other_querier_timer = mib_scalar((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 1, 11), unsigned32().clone(255)).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaIpmsOtherQuerierTimer.setStatus('current') ala_ipms_group = mib_identifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2)) ala_ipms_group_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1)) if mibBuilder.loadTexts: alaIpmsGroupTable.setStatus('current') ala_ipms_group_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1)).setIndexNames((0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsGroupDestIpAddr'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsGroupClientIpAddr'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsGroupClientVlan'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsGroupClientIfIndex'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsGroupClientVci'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsGroupIGMPVersion'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsGroupIGMPv3SrcIP'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsGroupIGMPv3SrcType')) if mibBuilder.loadTexts: alaIpmsGroupEntry.setStatus('current') ala_ipms_group_dest_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 1), ip_address()) if mibBuilder.loadTexts: alaIpmsGroupDestIpAddr.setStatus('current') ala_ipms_group_client_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 2), ip_address()) if mibBuilder.loadTexts: alaIpmsGroupClientIpAddr.setStatus('current') ala_ipms_group_client_mac_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 3), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsGroupClientMacAddr.setStatus('current') ala_ipms_group_client_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(1, 4094))) if mibBuilder.loadTexts: alaIpmsGroupClientVlan.setStatus('current') ala_ipms_group_client_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 5), interface_index()) if mibBuilder.loadTexts: alaIpmsGroupClientIfIndex.setStatus('current') ala_ipms_group_client_vci = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 6), unsigned32()) if mibBuilder.loadTexts: alaIpmsGroupClientVci.setStatus('current') ala_ipms_group_igmp_version = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('igmpv1', 1), ('igmpv2', 2), ('igmpv3', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsGroupIGMPVersion.setStatus('current') ala_ipms_group_igm_pv3_src_ip = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 8), ip_address()) if mibBuilder.loadTexts: alaIpmsGroupIGMPv3SrcIP.setStatus('current') ala_ipms_group_igm_pv3_src_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('na', 0), ('include', 1), ('exclude', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsGroupIGMPv3SrcType.setStatus('current') ala_ipms_group_igm_pv3_src_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 10), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsGroupIGMPv3SrcTimeout.setStatus('current') ala_ipms_group_igm_pv3_group_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('na', 0), ('include', 1), ('exclude', 2)))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsGroupIGMPv3GroupType.setStatus('current') ala_ipms_group_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 2, 1, 1, 12), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsGroupTimeout.setStatus('current') ala_ipms_neighbor = mib_identifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3)) ala_ipms_neighbor_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3, 1)) if mibBuilder.loadTexts: alaIpmsNeighborTable.setStatus('current') ala_ipms_neighbor_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3, 1, 1)).setIndexNames((0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsNeighborIpAddr')) if mibBuilder.loadTexts: alaIpmsNeighborEntry.setStatus('current') ala_ipms_neighbor_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3, 1, 1, 1), ip_address()) if mibBuilder.loadTexts: alaIpmsNeighborIpAddr.setStatus('current') ala_ipms_neighbor_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 4094))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsNeighborVlan.setStatus('current') ala_ipms_neighbor_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3, 1, 1, 3), interface_index()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsNeighborIfIndex.setStatus('current') ala_ipms_neighbor_vci = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3, 1, 1, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsNeighborVci.setStatus('current') ala_ipms_neighbor_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('native', 0), ('ipip', 1), ('pim', 2), ('cmm', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsNeighborType.setStatus('current') ala_ipms_neighbor_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 3, 1, 1, 6), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsNeighborTimeout.setStatus('current') ala_ipms_static_neighbor = mib_identifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 4)) ala_ipms_static_neighbor_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 4, 1)) if mibBuilder.loadTexts: alaIpmsStaticNeighborTable.setStatus('current') ala_ipms_static_neighbor_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 4, 1, 1)).setIndexNames((0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsStaticNeighborVlan'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsStaticNeighborIfIndex'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsStaticNeighborVci')) if mibBuilder.loadTexts: alaIpmsStaticNeighborEntry.setStatus('current') ala_ipms_static_neighbor_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 4, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4094))) if mibBuilder.loadTexts: alaIpmsStaticNeighborVlan.setStatus('current') ala_ipms_static_neighbor_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 4, 1, 1, 2), interface_index()) if mibBuilder.loadTexts: alaIpmsStaticNeighborIfIndex.setStatus('current') ala_ipms_static_neighbor_vci = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 4, 1, 1, 3), unsigned32()) if mibBuilder.loadTexts: alaIpmsStaticNeighborVci.setStatus('current') ala_ipms_static_neighbor_igmp_version = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 4, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(2, 3))).clone(namedValues=named_values(('igmpv2', 2), ('igmpv3', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaIpmsStaticNeighborIGMPVersion.setStatus('current') ala_ipms_static_neighbor_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 4, 1, 1, 5), row_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaIpmsStaticNeighborRowStatus.setStatus('current') ala_ipms_querier = mib_identifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5)) ala_ipms_querier_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5, 1)) if mibBuilder.loadTexts: alaIpmsQuerierTable.setStatus('current') ala_ipms_querier_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5, 1, 1)).setIndexNames((0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsQuerierIpAddr')) if mibBuilder.loadTexts: alaIpmsQuerierEntry.setStatus('current') ala_ipms_querier_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5, 1, 1, 1), ip_address()) if mibBuilder.loadTexts: alaIpmsQuerierIpAddr.setStatus('current') ala_ipms_querier_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 4094))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsQuerierVlan.setStatus('current') ala_ipms_querier_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5, 1, 1, 3), interface_index()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsQuerierIfIndex.setStatus('current') ala_ipms_querier_vci = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5, 1, 1, 4), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsQuerierVci.setStatus('current') ala_ipms_querier_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('native', 0), ('ipip', 1), ('pim', 2), ('cmm', 3)))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsQuerierType.setStatus('current') ala_ipms_querier_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 5, 1, 1, 6), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsQuerierTimeout.setStatus('current') ala_ipms_static_querier = mib_identifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 6)) ala_ipms_static_querier_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 6, 1)) if mibBuilder.loadTexts: alaIpmsStaticQuerierTable.setStatus('current') ala_ipms_static_querier_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 6, 1, 1)).setIndexNames((0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsStaticQuerierVlan'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsStaticQuerierIfIndex'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsStaticQuerierVci')) if mibBuilder.loadTexts: alaIpmsStaticQuerierEntry.setStatus('current') ala_ipms_static_querier_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 6, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4094))) if mibBuilder.loadTexts: alaIpmsStaticQuerierVlan.setStatus('current') ala_ipms_static_querier_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 6, 1, 1, 2), interface_index()) if mibBuilder.loadTexts: alaIpmsStaticQuerierIfIndex.setStatus('current') ala_ipms_static_querier_vci = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 6, 1, 1, 3), unsigned32()) if mibBuilder.loadTexts: alaIpmsStaticQuerierVci.setStatus('current') ala_ipms_static_querier_igmp_version = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 6, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(2, 3))).clone(namedValues=named_values(('igmpv2', 2), ('igmpv3', 3)))).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaIpmsStaticQuerierIGMPVersion.setStatus('current') ala_ipms_static_querier_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 6, 1, 1, 5), row_status()).setMaxAccess('readwrite') if mibBuilder.loadTexts: alaIpmsStaticQuerierRowStatus.setStatus('current') ala_ipms_source = mib_identifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7)) ala_ipms_source_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1)) if mibBuilder.loadTexts: alaIpmsSourceTable.setStatus('current') ala_ipms_source_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1)).setIndexNames((0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsSourceDestIpAddr'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsSourceSrcIpAddr'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsSourceSrcVlan'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsSourceSrcIfIndex'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsSourceUniIpAddr'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsSourceSrcVci'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsSourceSrcType')) if mibBuilder.loadTexts: alaIpmsSourceEntry.setStatus('current') ala_ipms_source_dest_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 1), ip_address()) if mibBuilder.loadTexts: alaIpmsSourceDestIpAddr.setStatus('current') ala_ipms_source_src_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 2), ip_address()) if mibBuilder.loadTexts: alaIpmsSourceSrcIpAddr.setStatus('current') ala_ipms_source_src_mac_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 3), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsSourceSrcMacAddr.setStatus('current') ala_ipms_source_src_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(1, 4094))) if mibBuilder.loadTexts: alaIpmsSourceSrcVlan.setStatus('current') ala_ipms_source_src_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 5), interface_index()) if mibBuilder.loadTexts: alaIpmsSourceSrcIfIndex.setStatus('current') ala_ipms_source_uni_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 6), ip_address()) if mibBuilder.loadTexts: alaIpmsSourceUniIpAddr.setStatus('current') ala_ipms_source_src_vci = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 7), unsigned32()) if mibBuilder.loadTexts: alaIpmsSourceSrcVci.setStatus('current') ala_ipms_source_src_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('native', 0), ('ipip', 1), ('pim', 2), ('cmm', 3)))) if mibBuilder.loadTexts: alaIpmsSourceSrcType.setStatus('current') ala_ipms_source_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 7, 1, 1, 9), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsSourceTimeout.setStatus('current') ala_ipms_forward = mib_identifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8)) ala_ipms_forward_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1)) if mibBuilder.loadTexts: alaIpmsForwardTable.setStatus('current') ala_ipms_forward_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1)).setIndexNames((0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsForwardDestIpAddr'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsForwardSrcIpAddr'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsForwardDestVlan'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsForwardSrcVlan'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsForwardSrcIfIndex'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsForwardUniIpAddr'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsForwardSrcVci'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsForwardDestType'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsForwardSrcType'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsForwardDestIfIndex'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsForwardDestTunIpAddr')) if mibBuilder.loadTexts: alaIpmsForwardEntry.setStatus('current') ala_ipms_forward_dest_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 1), ip_address()) if mibBuilder.loadTexts: alaIpmsForwardDestIpAddr.setStatus('current') ala_ipms_forward_src_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 2), ip_address()) if mibBuilder.loadTexts: alaIpmsForwardSrcIpAddr.setStatus('current') ala_ipms_forward_dest_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 4094))) if mibBuilder.loadTexts: alaIpmsForwardDestVlan.setStatus('current') ala_ipms_forward_src_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(1, 4094))) if mibBuilder.loadTexts: alaIpmsForwardSrcVlan.setStatus('current') ala_ipms_forward_src_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 5), interface_index()) if mibBuilder.loadTexts: alaIpmsForwardSrcIfIndex.setStatus('current') ala_ipms_forward_uni_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 6), ip_address()) if mibBuilder.loadTexts: alaIpmsForwardUniIpAddr.setStatus('current') ala_ipms_forward_src_vci = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 7), unsigned32()) if mibBuilder.loadTexts: alaIpmsForwardSrcVci.setStatus('current') ala_ipms_forward_dest_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('native', 0), ('ipip', 1), ('pim', 2), ('cmm', 3)))) if mibBuilder.loadTexts: alaIpmsForwardDestType.setStatus('current') ala_ipms_forward_src_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('native', 0), ('ipip', 1), ('pim', 2), ('cmm', 3)))) if mibBuilder.loadTexts: alaIpmsForwardSrcType.setStatus('current') ala_ipms_forward_dest_tun_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 10), ip_address()) if mibBuilder.loadTexts: alaIpmsForwardDestTunIpAddr.setStatus('current') ala_ipms_forward_src_tun_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 11), ip_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsForwardSrcTunIpAddr.setStatus('current') ala_ipms_forward_rtr_mac_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 12), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsForwardRtrMacAddr.setStatus('current') ala_ipms_forward_rtr_ttl = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(1, 255))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsForwardRtrTtl.setStatus('current') ala_ipms_forward_dest_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 8, 1, 1, 14), interface_index()) if mibBuilder.loadTexts: alaIpmsForwardDestIfIndex.setStatus('current') ala_ipms_policy = mib_identifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9)) ala_ipms_policy_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1)) if mibBuilder.loadTexts: alaIpmsPolicyTable.setStatus('current') ala_ipms_policy_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1)).setIndexNames((0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsPolicyDestIpAddr'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsPolicySrcIpAddr'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsPolicySrcVlan'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsPolicySrcIfIndex'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsPolicyUniIpAddr'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsPolicySrcVci'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsPolicySrcType'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsPolicyPolicy')) if mibBuilder.loadTexts: alaIpmsPolicyEntry.setStatus('current') ala_ipms_policy_dest_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 1), ip_address()) if mibBuilder.loadTexts: alaIpmsPolicyDestIpAddr.setStatus('current') ala_ipms_policy_src_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 2), ip_address()) if mibBuilder.loadTexts: alaIpmsPolicySrcIpAddr.setStatus('current') ala_ipms_policy_src_mac_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 3), mac_address()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsPolicySrcMacAddr.setStatus('current') ala_ipms_policy_src_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(1, 4094))) if mibBuilder.loadTexts: alaIpmsPolicySrcVlan.setStatus('current') ala_ipms_policy_src_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 5), interface_index()) if mibBuilder.loadTexts: alaIpmsPolicySrcIfIndex.setStatus('current') ala_ipms_policy_uni_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 6), ip_address()) if mibBuilder.loadTexts: alaIpmsPolicyUniIpAddr.setStatus('current') ala_ipms_policy_src_vci = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 7), unsigned32()) if mibBuilder.loadTexts: alaIpmsPolicySrcVci.setStatus('current') ala_ipms_policy_src_type = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('native', 0), ('ipip', 1), ('pim', 2), ('cmm', 3)))) if mibBuilder.loadTexts: alaIpmsPolicySrcType.setStatus('current') ala_ipms_policy_policy = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1))).clone(namedValues=named_values(('membership', 1)))) if mibBuilder.loadTexts: alaIpmsPolicyPolicy.setStatus('current') ala_ipms_policy_disposition = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('drop', 0), ('accept', 1)))).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsPolicyDisposition.setStatus('current') ala_ipms_policy_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 9, 1, 1, 11), unsigned32()).setMaxAccess('readonly') if mibBuilder.loadTexts: alaIpmsPolicyTimeout.setStatus('current') ala_ipms_static_member = mib_identifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10)) ala_ipms_static_member_table = mib_table((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10, 1)) if mibBuilder.loadTexts: alaIpmsStaticMemberTable.setStatus('current') ala_ipms_static_member_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10, 1, 1)).setIndexNames((0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsStaticMemberGroupAddr'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsStaticMemberVlan'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsStaticMemberIfIndex'), (0, 'ALCATEL-IND1-IPMS-MIB', 'alaIpmsStaticMemberVci')) if mibBuilder.loadTexts: alaIpmsStaticMemberEntry.setStatus('current') ala_ipms_static_member_group_addr = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10, 1, 1, 1), ip_address()) if mibBuilder.loadTexts: alaIpmsStaticMemberGroupAddr.setStatus('current') ala_ipms_static_member_igmp_version = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(2, 3))).clone(namedValues=named_values(('igmpv2', 2), ('igmpv3', 3)))) if mibBuilder.loadTexts: alaIpmsStaticMemberIGMPVersion.setStatus('current') ala_ipms_static_member_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 4094))) if mibBuilder.loadTexts: alaIpmsStaticMemberVlan.setStatus('current') ala_ipms_static_member_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10, 1, 1, 4), interface_index()) if mibBuilder.loadTexts: alaIpmsStaticMemberIfIndex.setStatus('current') ala_ipms_static_member_vci = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10, 1, 1, 5), unsigned32()) if mibBuilder.loadTexts: alaIpmsStaticMemberVci.setStatus('current') ala_ipms_static_member_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 1, 10, 1, 1, 6), row_status()).setMaxAccess('readcreate') if mibBuilder.loadTexts: alaIpmsStaticMemberRowStatus.setStatus('current') alcatel_ind1_ipmsmib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2)) alcatel_ind1_ipmsmib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 1)) alcatel_ind1_ipmsmib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2)) ala_ipms_compliance = module_compliance((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 1, 1)).setObjects(('ALCATEL-IND1-IPMS-MIB', 'alaIpmsConfig'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsGroup'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsNeighbor'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsStaticNeighbor'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsQuerier'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsStaticQuerier'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsSource'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsForward'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsPolicy')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_ipms_compliance = alaIpmsCompliance.setStatus('current') ala_ipms_config_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 1)).setObjects(('ALCATEL-IND1-IPMS-MIB', 'alaIpmsStatus'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsLeaveTimeout'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsQueryInterval'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsNeighborTimer'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsQuerierTimer'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsMembershipTimer'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsOtherQuerierTimer')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_ipms_config_group = alaIpmsConfigGroup.setStatus('current') ala_ipms_group_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 2)).setObjects(('ALCATEL-IND1-IPMS-MIB', 'alaIpmsGroupClientMacAddr'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsGroupTimeout'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsGroupIGMPv3GroupType'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsGroupIGMPv3SrcTimeout')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_ipms_group_group = alaIpmsGroupGroup.setStatus('current') ala_ipms_neighbor_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 3)).setObjects(('ALCATEL-IND1-IPMS-MIB', 'alaIpmsNeighborVlan'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsNeighborIfIndex'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsNeighborVci'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsNeighborType'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsNeighborTimeout')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_ipms_neighbor_group = alaIpmsNeighborGroup.setStatus('current') ala_ipms_static_neighbor_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 4)).setObjects(('ALCATEL-IND1-IPMS-MIB', 'alaIpmsStaticNeighborRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_ipms_static_neighbor_group = alaIpmsStaticNeighborGroup.setStatus('current') ala_ipms_querier_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 5)).setObjects(('ALCATEL-IND1-IPMS-MIB', 'alaIpmsQuerierVlan'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsQuerierIfIndex'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsQuerierVci'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsQuerierType'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsQuerierTimeout')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_ipms_querier_group = alaIpmsQuerierGroup.setStatus('current') ala_ipms_static_querier_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 6)).setObjects(('ALCATEL-IND1-IPMS-MIB', 'alaIpmsStaticQuerierRowStatus')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_ipms_static_querier_group = alaIpmsStaticQuerierGroup.setStatus('current') ala_ipms_source_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 7)).setObjects(('ALCATEL-IND1-IPMS-MIB', 'alaIpmsSourceSrcMacAddr'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsSourceTimeout')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_ipms_source_group = alaIpmsSourceGroup.setStatus('current') ala_ipms_forward_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 8)).setObjects(('ALCATEL-IND1-IPMS-MIB', 'alaIpmsForwardSrcTunIpAddr'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsForwardRtrMacAddr'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsForwardRtrTtl')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_ipms_forward_group = alaIpmsForwardGroup.setStatus('current') ala_ipms_policy_group = object_group((1, 3, 6, 1, 4, 1, 6486, 801, 1, 2, 1, 18, 1, 2, 2, 9)).setObjects(('ALCATEL-IND1-IPMS-MIB', 'alaIpmsPolicySrcMacAddr'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsPolicyDisposition'), ('ALCATEL-IND1-IPMS-MIB', 'alaIpmsPolicyTimeout')) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ala_ipms_policy_group = alaIpmsPolicyGroup.setStatus('current') mibBuilder.exportSymbols('ALCATEL-IND1-IPMS-MIB', alaIpmsStaticNeighborRowStatus=alaIpmsStaticNeighborRowStatus, alaIpmsQuerierVlan=alaIpmsQuerierVlan, alaIpmsStaticQuerier=alaIpmsStaticQuerier, alaIpmsGroupClientMacAddr=alaIpmsGroupClientMacAddr, alaIpmsNeighbor=alaIpmsNeighbor, alaIpmsStaticNeighborVci=alaIpmsStaticNeighborVci, alaIpmsPolicyUniIpAddr=alaIpmsPolicyUniIpAddr, alaIpmsForwardSrcVlan=alaIpmsForwardSrcVlan, alaIpmsGroupDestIpAddr=alaIpmsGroupDestIpAddr, alaIpmsNeighborVci=alaIpmsNeighborVci, alaIpmsStaticNeighbor=alaIpmsStaticNeighbor, alaIpmsGroupGroup=alaIpmsGroupGroup, alaIpmsForwardDestVlan=alaIpmsForwardDestVlan, alaIpmsStaticQuerierIfIndex=alaIpmsStaticQuerierIfIndex, alcatelIND1IPMSMIBCompliances=alcatelIND1IPMSMIBCompliances, alaIpmsSourceSrcVlan=alaIpmsSourceSrcVlan, alaIpmsForwardSrcIfIndex=alaIpmsForwardSrcIfIndex, alaIpmsHardwareRoute=alaIpmsHardwareRoute, alaIpmsNeighborTimeout=alaIpmsNeighborTimeout, alaIpmsStaticMemberIGMPVersion=alaIpmsStaticMemberIGMPVersion, alaIpmsStaticNeighborTable=alaIpmsStaticNeighborTable, alaIpmsNeighborIpAddr=alaIpmsNeighborIpAddr, alaIpmsForwardDestTunIpAddr=alaIpmsForwardDestTunIpAddr, alaIpmsSourceEntry=alaIpmsSourceEntry, alaIpmsPolicySrcVci=alaIpmsPolicySrcVci, alaIpmsForwardSrcType=alaIpmsForwardSrcType, alaIpmsQuerierIpAddr=alaIpmsQuerierIpAddr, alaIpmsOtherQuerierTimer=alaIpmsOtherQuerierTimer, alaIpmsGroupClientIfIndex=alaIpmsGroupClientIfIndex, alaIpmsForwardSrcVci=alaIpmsForwardSrcVci, alaIpmsStaticMember=alaIpmsStaticMember, alaIpmsPolicySrcIpAddr=alaIpmsPolicySrcIpAddr, alaIpmsForwardSrcIpAddr=alaIpmsForwardSrcIpAddr, alaIpmsPolicySrcMacAddr=alaIpmsPolicySrcMacAddr, alaIpmsStaticQuerierGroup=alaIpmsStaticQuerierGroup, alaIpmsStaticMemberVci=alaIpmsStaticMemberVci, alaIpmsPolicyTable=alaIpmsPolicyTable, alaIpmsMembershipTimer=alaIpmsMembershipTimer, alaIpmsStaticNeighborIGMPVersion=alaIpmsStaticNeighborIGMPVersion, alaIpmsSourceSrcVci=alaIpmsSourceSrcVci, alaIpmsForwardUniIpAddr=alaIpmsForwardUniIpAddr, alaIpmsPolicySrcType=alaIpmsPolicySrcType, alaIpmsGroupEntry=alaIpmsGroupEntry, alaIpmsNeighborGroup=alaIpmsNeighborGroup, alaIpmsSourceSrcMacAddr=alaIpmsSourceSrcMacAddr, alaIpmsStaticNeighborVlan=alaIpmsStaticNeighborVlan, alaIpmsStaticNeighborIfIndex=alaIpmsStaticNeighborIfIndex, alaIpmsQueryInterval=alaIpmsQueryInterval, alaIpmsPolicyGroup=alaIpmsPolicyGroup, alaIpmsForwardRtrMacAddr=alaIpmsForwardRtrMacAddr, alaIpmsStaticMemberEntry=alaIpmsStaticMemberEntry, alaIpmsNeighborTimer=alaIpmsNeighborTimer, alaIpmsConfig=alaIpmsConfig, alaIpmsForwardTable=alaIpmsForwardTable, alaIpmsQuerierGroup=alaIpmsQuerierGroup, alaIpmsGroup=alaIpmsGroup, alaIpmsGroupClientVlan=alaIpmsGroupClientVlan, alaIpmsNeighborVlan=alaIpmsNeighborVlan, alaIpmsMaxBandwidth=alaIpmsMaxBandwidth, alaIpmsSourceGroup=alaIpmsSourceGroup, alaIpmsGroupTable=alaIpmsGroupTable, alaIpmsPolicy=alaIpmsPolicy, alaIpmsConfigGroup=alaIpmsConfigGroup, alaIpmsForwardDestIfIndex=alaIpmsForwardDestIfIndex, alaIpmsSourceSrcType=alaIpmsSourceSrcType, alaIpmsSourceDestIpAddr=alaIpmsSourceDestIpAddr, alaIpmsPolicyDisposition=alaIpmsPolicyDisposition, alaIpmsQuerierTimeout=alaIpmsQuerierTimeout, alaIpmsGroupIGMPv3SrcTimeout=alaIpmsGroupIGMPv3SrcTimeout, alaIpmsStaticMemberRowStatus=alaIpmsStaticMemberRowStatus, alcatelIND1IPMSMIBObjects=alcatelIND1IPMSMIBObjects, PYSNMP_MODULE_ID=alcatelIND1IPMSMIB, alaIpmsSourceSrcIfIndex=alaIpmsSourceSrcIfIndex, alaIpmsPolicyEntry=alaIpmsPolicyEntry, alaIpmsPolicyPolicy=alaIpmsPolicyPolicy, alaIpmsStaticQuerierVci=alaIpmsStaticQuerierVci, alaIpmsQuerierEntry=alaIpmsQuerierEntry, alaIpmsSource=alaIpmsSource, alaIpmsGroupClientIpAddr=alaIpmsGroupClientIpAddr, alaIpmsIGMPMembershipProxyVersion=alaIpmsIGMPMembershipProxyVersion, alaIpmsNeighborEntry=alaIpmsNeighborEntry, alaIpmsNeighborType=alaIpmsNeighborType, alaIpmsStaticQuerierVlan=alaIpmsStaticQuerierVlan, alaIpmsGroupTimeout=alaIpmsGroupTimeout, alaIpmsPolicySrcVlan=alaIpmsPolicySrcVlan, alaIpmsForwardEntry=alaIpmsForwardEntry, alaIpmsQuerierTable=alaIpmsQuerierTable, alaIpmsForwardGroup=alaIpmsForwardGroup, alaIpmsGroupIGMPv3SrcIP=alaIpmsGroupIGMPv3SrcIP, alaIpmsSourceSrcIpAddr=alaIpmsSourceSrcIpAddr, alaIpmsGroupIGMPVersion=alaIpmsGroupIGMPVersion, alaIpmsSourceTimeout=alaIpmsSourceTimeout, alcatelIND1IPMSMIBConformance=alcatelIND1IPMSMIBConformance, alaIpmsQuerierTimer=alaIpmsQuerierTimer, alaIpmsStaticNeighborGroup=alaIpmsStaticNeighborGroup, alaIpmsPolicySrcIfIndex=alaIpmsPolicySrcIfIndex, alaIpmsForwardRtrTtl=alaIpmsForwardRtrTtl, alaIpmsPolicyTimeout=alaIpmsPolicyTimeout, alaIpmsStaticMemberTable=alaIpmsStaticMemberTable, alaIpmsStatus=alaIpmsStatus, alaIpmsStaticMemberGroupAddr=alaIpmsStaticMemberGroupAddr, alaIpmsGroupIGMPv3GroupType=alaIpmsGroupIGMPv3GroupType, alaIpmsForwardDestType=alaIpmsForwardDestType, alaIpmsForwardDestIpAddr=alaIpmsForwardDestIpAddr, alaIpmsStaticQuerierTable=alaIpmsStaticQuerierTable, alcatelIND1IPMSMIB=alcatelIND1IPMSMIB, alaIpmsQuerierVci=alaIpmsQuerierVci, alaIpmsStaticQuerierRowStatus=alaIpmsStaticQuerierRowStatus, alaIpmsStaticMemberVlan=alaIpmsStaticMemberVlan, alaIpmsLeaveTimeout=alaIpmsLeaveTimeout, alaIpmsStaticMemberIfIndex=alaIpmsStaticMemberIfIndex, alcatelIND1IPMSMIBGroups=alcatelIND1IPMSMIBGroups, alaIpmsPolicyDestIpAddr=alaIpmsPolicyDestIpAddr, alaIpmsStaticQuerierEntry=alaIpmsStaticQuerierEntry, alaIpmsForward=alaIpmsForward, alaIpmsGroupClientVci=alaIpmsGroupClientVci, alaIpmsGroupIGMPv3SrcType=alaIpmsGroupIGMPv3SrcType, alaIpmsForwardSrcTunIpAddr=alaIpmsForwardSrcTunIpAddr, alaIpmsStaticQuerierIGMPVersion=alaIpmsStaticQuerierIGMPVersion, alaIpmsSourceUniIpAddr=alaIpmsSourceUniIpAddr, alaIpmsQuerier=alaIpmsQuerier, alaIpmsPriority=alaIpmsPriority, alaIpmsQuerierIfIndex=alaIpmsQuerierIfIndex, alaIpmsNeighborIfIndex=alaIpmsNeighborIfIndex, alaIpmsCompliance=alaIpmsCompliance, alaIpmsNeighborTable=alaIpmsNeighborTable, alaIpmsSourceTable=alaIpmsSourceTable, alaIpmsQuerierType=alaIpmsQuerierType, alaIpmsStaticNeighborEntry=alaIpmsStaticNeighborEntry)
num = int(input( "Digite um valor de 0 a 9999: ")) num1 = str(num) num2 = num1.zfill(4) print('Unidade: {}'.format(num2[3])) print('Dezena: {}'.format(num2[2])) print('Centena: {}'.format(num2[1])) print('Milhar: {}'.format(num2[0]))
num = int(input('Digite um valor de 0 a 9999: ')) num1 = str(num) num2 = num1.zfill(4) print('Unidade: {}'.format(num2[3])) print('Dezena: {}'.format(num2[2])) print('Centena: {}'.format(num2[1])) print('Milhar: {}'.format(num2[0]))
builder_layers = { # P-CAD ASCII layer types: # Signal, Plane, NonSignal -1: "null", # LT_UNDEFINED 0: "Signal", # LT_SIGNAL 1: "Plane", # LT_POWER 2: "NonSignal", # LT_MIXED 3: "Plane" # LT_JUMPER } builder_padshapes = { # P-CAD ASCII padshape types: # padViaShapeType( # Ellipse, Oval, Rect, RndRect, Thrm2, Thrm2_90, # Thrm4, Thrm4_45, Direct, NoConnect, Polygon # ) 0: "Ellipse", # PAD_SHAPE_CIRCLE 1: "Rect", # PAD_SHAPE_RECT 2: "Oval", # PAD_SHAPE_OVAL 3: "", # PAD_SHAPE_TRAPEZOID 4: "RndRect", # PAD_SHAPE_ROUNDRECT 5: "", # PAD_SHAPE_CHAMFERED_RECT 6: "Polygon" # PAD_SHPAE_CUSTOM } builder_fontRenderer_Stroke = 0 builder_fontRenderer_TrueType = 2 builder_fontFamily_Serif = 0 builder_fontFamily_Sanserif = 1 builder_fontFamily_Modern = 2 builder_fontRenderers = { builder_fontRenderer_Stroke: "Stroke", builder_fontRenderer_TrueType: "TrueType" } builder_fontFamilies = { builder_fontFamily_Serif: "Serif", builder_fontFamily_Sanserif: "Sanserif", builder_fontFamily_Modern: "Modern" } class builder_param: is_mm = True used_fontFamily = builder_fontFamily_Sanserif
builder_layers = {-1: 'null', 0: 'Signal', 1: 'Plane', 2: 'NonSignal', 3: 'Plane'} builder_padshapes = {0: 'Ellipse', 1: 'Rect', 2: 'Oval', 3: '', 4: 'RndRect', 5: '', 6: 'Polygon'} builder_font_renderer__stroke = 0 builder_font_renderer__true_type = 2 builder_font_family__serif = 0 builder_font_family__sanserif = 1 builder_font_family__modern = 2 builder_font_renderers = {builder_fontRenderer_Stroke: 'Stroke', builder_fontRenderer_TrueType: 'TrueType'} builder_font_families = {builder_fontFamily_Serif: 'Serif', builder_fontFamily_Sanserif: 'Sanserif', builder_fontFamily_Modern: 'Modern'} class Builder_Param: is_mm = True used_font_family = builder_fontFamily_Sanserif
def calc_no(val): temp = val s = 0 while temp > 0: s += temp%10 temp //= 10 return not(val%s) row = int(input()) arr = [] # storing input values for i in range(row): arr.append(list(map(int,input().split()))) bool_tab = [] # storing their resp boolean value if it is divisible by the sum of digits than True else False for i in range(row): x = [] for j in range(len(arr[0])): x.append(calc_no(arr[i][j])) bool_tab.append(x) res = [] for i in range(row-1): for j in range(len(arr[0])-1): if bool_tab[i][j] and bool_tab[i][j+1] and bool_tab[i+1][j] and bool_tab[i+1][j+1]: res.append([arr[i][j], arr[i][j+1],arr[i+1][j],arr[i+1][j+1]]) if len(res) > 0: for i in res: print(i[0], i[1]) print(i[2], i[3]) print() else: print('No matrix found') ''' Input 3 42 54 2 30 24 27 180 190 40 Output 42 54 30 24 54 2 24 27 30 24 180 190 24 27 190 40'''
def calc_no(val): temp = val s = 0 while temp > 0: s += temp % 10 temp //= 10 return not val % s row = int(input()) arr = [] for i in range(row): arr.append(list(map(int, input().split()))) bool_tab = [] for i in range(row): x = [] for j in range(len(arr[0])): x.append(calc_no(arr[i][j])) bool_tab.append(x) res = [] for i in range(row - 1): for j in range(len(arr[0]) - 1): if bool_tab[i][j] and bool_tab[i][j + 1] and bool_tab[i + 1][j] and bool_tab[i + 1][j + 1]: res.append([arr[i][j], arr[i][j + 1], arr[i + 1][j], arr[i + 1][j + 1]]) if len(res) > 0: for i in res: print(i[0], i[1]) print(i[2], i[3]) print() else: print('No matrix found') ' Input\n 3\n 42 54 2\n 30 24 27\n 180 190 40\n\n Output\n 42 54\n 30 24\n\n 54 2\n 24 27\n\n 30 24\n 180 190\n\n 24 27\n 190 40'
def weather_conditions(temp): if temp > 7: print("Warm") else: print("Cold") x = int(input("Enter a temparature")) weather_conditions(x)
def weather_conditions(temp): if temp > 7: print('Warm') else: print('Cold') x = int(input('Enter a temparature')) weather_conditions(x)
T = int(input()) for kase in range(1, T + 1): n = int(input()) [input() for i in range(0, n + 1)] if n & 1: print(f'Case #{kase}: 1\n0.0') else: print(f'Case #{kase}: 0')
t = int(input()) for kase in range(1, T + 1): n = int(input()) [input() for i in range(0, n + 1)] if n & 1: print(f'Case #{kase}: 1\n0.0') else: print(f'Case #{kase}: 0')
school_class = {} while True: name = input("Enter the student's name: ") if name == '': break score = int(input("Enter the student's score (0-10): ")) if score not in range(0, 11): break if name in school_class: school_class[name] += (score,) else: school_class[name] = (score,) for name in sorted(school_class.keys()): adding = 0 counter = 0 for score in school_class[name]: adding += score counter += 1 print(name, ":", adding / counter) ################ pol_eng_dictionary = { "kwiat": "flower", "woda": "water", "gleba": "soil" } item_1 = pol_eng_dictionary["gleba"] # ex. 1 print(item_1) # outputs: soil item_2 = pol_eng_dictionary.get("woda") print(item_2) # outputs: water ############ phonebook = {} # an empty dictionary phonebook["Adam"] = 3456783958 # create/add a key-value pair print(phonebook) # outputs: {'Adam': 3456783958} del phonebook["Adam"] print(phonebook) # outputs: {} ########## pol_eng_dictionary = { "zamek": "castle", "woda": "water", "gleba": "soil" } copy_dictionary = pol_eng_dictionary.copy()
school_class = {} while True: name = input("Enter the student's name: ") if name == '': break score = int(input("Enter the student's score (0-10): ")) if score not in range(0, 11): break if name in school_class: school_class[name] += (score,) else: school_class[name] = (score,) for name in sorted(school_class.keys()): adding = 0 counter = 0 for score in school_class[name]: adding += score counter += 1 print(name, ':', adding / counter) pol_eng_dictionary = {'kwiat': 'flower', 'woda': 'water', 'gleba': 'soil'} item_1 = pol_eng_dictionary['gleba'] print(item_1) item_2 = pol_eng_dictionary.get('woda') print(item_2) phonebook = {} phonebook['Adam'] = 3456783958 print(phonebook) del phonebook['Adam'] print(phonebook) pol_eng_dictionary = {'zamek': 'castle', 'woda': 'water', 'gleba': 'soil'} copy_dictionary = pol_eng_dictionary.copy()
with open("day6_input") as infile: cycles = [[int(x) for x in infile.readline().split('\t') if x != '\n']] steps = 0 while True: current_cycle = cycles[-1] max_ = max(current_cycle) maxindex = current_cycle.index(max_) new_cycle = current_cycle[:] new_cycle[maxindex] = 0 for i in range(maxindex + 1, maxindex + 1 + max_): new_cycle[i % len(new_cycle)] += 1 cycles.append(new_cycle) steps += 1 if steps > 1 and new_cycle in cycles[:-1]: break print(steps) print(steps - cycles[:-1].index(cycles[-1]))
with open('day6_input') as infile: cycles = [[int(x) for x in infile.readline().split('\t') if x != '\n']] steps = 0 while True: current_cycle = cycles[-1] max_ = max(current_cycle) maxindex = current_cycle.index(max_) new_cycle = current_cycle[:] new_cycle[maxindex] = 0 for i in range(maxindex + 1, maxindex + 1 + max_): new_cycle[i % len(new_cycle)] += 1 cycles.append(new_cycle) steps += 1 if steps > 1 and new_cycle in cycles[:-1]: break print(steps) print(steps - cycles[:-1].index(cycles[-1]))
pattern = [] with open('day_3.txt') as f: for line in f: pattern.append([line.rstrip()]) def count_trees(pattern, right, down): '''Use dictionary to redefine positions outside base pattern, count all trees in pattern (#) which we meet, when we follow defined number of moves to right and down''' # for making dictionary len_line = len(''.join(pattern[0])) border_pos = len_line - right - 1 # border positions - need to be translated keys = [*range(border_pos, len_line)] # keys up to length of line values = [] for key in keys: values.append(key - border_pos - 1) # make dictionary dictionary = dict(zip(keys, values)) # count trees and change current position count = 0 pos = 0 for index, line in enumerate(pattern): if index % down == 0: # count met tree if line[0][pos] == '#': count += 1 # define new position after move if pos > border_pos: # redefine border position, if needed pos = dictionary[pos] else: pos += right return count def follow_instructions(instructions): '''Call function count_trees() for every instruction, return product of multiplication of all trees''' for i, instruction in enumerate(instructions): right, down = instruction if i == 0: total = count_trees(pattern, right, down) else: total *= count_trees(pattern, right, down) return total part1_instructions = [(3, 1)] part2_instructions = [(1, 1), (3, 1), (5, 1), (7, 1), (1, 2)] print(follow_instructions(part1_instructions)) print(follow_instructions(part2_instructions))
pattern = [] with open('day_3.txt') as f: for line in f: pattern.append([line.rstrip()]) def count_trees(pattern, right, down): """Use dictionary to redefine positions outside base pattern, count all trees in pattern (#) which we meet, when we follow defined number of moves to right and down""" len_line = len(''.join(pattern[0])) border_pos = len_line - right - 1 keys = [*range(border_pos, len_line)] values = [] for key in keys: values.append(key - border_pos - 1) dictionary = dict(zip(keys, values)) count = 0 pos = 0 for (index, line) in enumerate(pattern): if index % down == 0: if line[0][pos] == '#': count += 1 if pos > border_pos: pos = dictionary[pos] else: pos += right return count def follow_instructions(instructions): """Call function count_trees() for every instruction, return product of multiplication of all trees""" for (i, instruction) in enumerate(instructions): (right, down) = instruction if i == 0: total = count_trees(pattern, right, down) else: total *= count_trees(pattern, right, down) return total part1_instructions = [(3, 1)] part2_instructions = [(1, 1), (3, 1), (5, 1), (7, 1), (1, 2)] print(follow_instructions(part1_instructions)) print(follow_instructions(part2_instructions))
''' Dictionary that keeps the cost of individual parts of cars. ''' car_body = { 'Honda' : 500, 'Nissan' : 1000, 'Suzuki' : 600, 'Toyota' : 500 } car_tyres = { 'Honda' : 1400, 'Nissan' : 500, 'Suzuki' : 600, 'Toyota' : 1000 } car_doors = { 'Honda' : 400, 'Nissan': 300, 'Suzuki' : 600, 'Toyota' : 800 }
""" Dictionary that keeps the cost of individual parts of cars. """ car_body = {'Honda': 500, 'Nissan': 1000, 'Suzuki': 600, 'Toyota': 500} car_tyres = {'Honda': 1400, 'Nissan': 500, 'Suzuki': 600, 'Toyota': 1000} car_doors = {'Honda': 400, 'Nissan': 300, 'Suzuki': 600, 'Toyota': 800}
class Solution: def findKthPositive(self, arr: List[int], k: int) -> int: missing = [] limit = arr[-1] nums = set(arr) for i in range(1,limit): if i not in nums: missing.append(i) if len(missing) >= k: return missing[k-1] else: return limit + k - len(missing)
class Solution: def find_kth_positive(self, arr: List[int], k: int) -> int: missing = [] limit = arr[-1] nums = set(arr) for i in range(1, limit): if i not in nums: missing.append(i) if len(missing) >= k: return missing[k - 1] else: return limit + k - len(missing)
# mendapatkan tagihan bulanan # selamat satu unit lagi dan anda sudah membuat sebuah program! ketika # kita bilang anda bisa membuat apa saja dengan python, kita bersungguh-sungguh! # batas dari apa yang anda bisa bangun adalah di imajinasi anda # terus belajar ke bab berikutnya dan akhirnya anda akan bisa membuat program yang # lebih keren lagi! ''' instruksi -oke sekarang kita buat variabel total_tagihan yang merupakan jumlah dari sisa_cicilan dan jumlah_bunga -setelahnya kita buat tagihan_bulanan yang merupakan total_tagihan dibagi 12 -jalankan codenya dan lihat tagihan bulananan anda -ubah angkanya sesuasi yang anda mau dan bermain mainlah dengan apa yang telah anda pelajari ''' # harga_laptop = 5000000 # uang_muka = 1000000 # sisa_cicilan = harga_laptop-uang_muka # suku_bunga = 10 # jumlah_bunga = sisa_cicilan * suku_bunga /100 # total_tagihan = sisa_cicilan + jumlah_bunga # tagihan_bulanan = total_tagihan /12 # print(tagihan_bulanan) while True: print(''' menghitung total tagihan''') harga = int(input('harga barang: ')) uang_muka = int(input('uang muka: ')) sisa_cicilan = harga-uang_muka print('sisa cicilan {} - {} = {}'.format(harga,uang_muka,sisa_cicilan)) suku_bunga = int(input('bunga: ')) jumlah_bunga = sisa_cicilan * suku_bunga / 100 total_tagihan = sisa_cicilan + jumlah_bunga tagihan_bulanan = total_tagihan / 12 print('jumlah bunga {} x {} / 100 = {}'.format(sisa_cicilan,suku_bunga,jumlah_bunga)) print('total tagihan: {} + {} = {}'.format(sisa_cicilan,jumlah_bunga,total_tagihan)) print('tagihan bulanan: {} / 12 = %.2f'.format(total_tagihan)%(tagihan_bulanan)) d = input('try again(y/n)? ') if d=='y' or d=='Y': print() elif d=='n' or d=='N': exit()
""" instruksi -oke sekarang kita buat variabel total_tagihan yang merupakan jumlah dari sisa_cicilan dan jumlah_bunga -setelahnya kita buat tagihan_bulanan yang merupakan total_tagihan dibagi 12 -jalankan codenya dan lihat tagihan bulananan anda -ubah angkanya sesuasi yang anda mau dan bermain mainlah dengan apa yang telah anda pelajari """ while True: print('\n menghitung total tagihan') harga = int(input('harga barang: ')) uang_muka = int(input('uang muka: ')) sisa_cicilan = harga - uang_muka print('sisa cicilan {} - {} = {}'.format(harga, uang_muka, sisa_cicilan)) suku_bunga = int(input('bunga: ')) jumlah_bunga = sisa_cicilan * suku_bunga / 100 total_tagihan = sisa_cicilan + jumlah_bunga tagihan_bulanan = total_tagihan / 12 print('jumlah bunga {} x {} / 100 = {}'.format(sisa_cicilan, suku_bunga, jumlah_bunga)) print('total tagihan: {} + {} = {}'.format(sisa_cicilan, jumlah_bunga, total_tagihan)) print('tagihan bulanan: {} / 12 = %.2f'.format(total_tagihan) % tagihan_bulanan) d = input('try again(y/n)? ') if d == 'y' or d == 'Y': print() elif d == 'n' or d == 'N': exit()
def find(n, m, x, y, dx, dy): if x < 0 or x == 20 or y < 0 or y == 20: return -1 elif n == 0: return 1 else: return m[y][x] * find(n - 1, m, x + dx, y + dy, dx, dy) directions = [None] * 8 for i in range(0, 8): if i == 0: directions[i] = [0, 1] elif i == 1: directions[i] = [1, 0] elif i == 2: directions[i] = [0, -1] elif i == 3: directions[i] = [-1, 0] elif i == 4: directions[i] = [1, 1] elif i == 5: directions[i] = [1, -1] elif i == 6: directions[i] = [-1, 1] else: directions[i] = [-1, -1] max0 = 0 m = [list(map(int, input().split())) for i in range(20)] for j in range(0, 8): (dx, dy) = directions[j] for x in range(0, 20): for y in range(0, 20): max0 = max(max0, find(4, m, x, y, dx, dy)) print("%d\n" % max0, end='')
def find(n, m, x, y, dx, dy): if x < 0 or x == 20 or y < 0 or (y == 20): return -1 elif n == 0: return 1 else: return m[y][x] * find(n - 1, m, x + dx, y + dy, dx, dy) directions = [None] * 8 for i in range(0, 8): if i == 0: directions[i] = [0, 1] elif i == 1: directions[i] = [1, 0] elif i == 2: directions[i] = [0, -1] elif i == 3: directions[i] = [-1, 0] elif i == 4: directions[i] = [1, 1] elif i == 5: directions[i] = [1, -1] elif i == 6: directions[i] = [-1, 1] else: directions[i] = [-1, -1] max0 = 0 m = [list(map(int, input().split())) for i in range(20)] for j in range(0, 8): (dx, dy) = directions[j] for x in range(0, 20): for y in range(0, 20): max0 = max(max0, find(4, m, x, y, dx, dy)) print('%d\n' % max0, end='')
cue_words=["call it as", "call this as", "called as the", "call it as", "referred to as", "is defined as", "known as the", "defined as", "known as", "mean by", "concept of", "talk about", "called as", "called the", "called an", "called a", "call as", "called"]
cue_words = ['call it as', 'call this as', 'called as the', 'call it as', 'referred to as', 'is defined as', 'known as the', 'defined as', 'known as', 'mean by', 'concept of', 'talk about', 'called as', 'called the', 'called an', 'called a', 'call as', 'called']
def nonrep(): checklist=[] my_string={"pythonprograming"} for s in my_string: if s in my_string: my_string[s]+=1 else: my_string=1 checklist.appened(my_string[s]) for s in checklist: if s==1: return True else: False result=nonrep() print(result)
def nonrep(): checklist = [] my_string = {'pythonprograming'} for s in my_string: if s in my_string: my_string[s] += 1 else: my_string = 1 checklist.appened(my_string[s]) for s in checklist: if s == 1: return True else: False result = nonrep() print(result)
''' This file contains any primitives for Lyanna that aren't just borrowed from the language. Basically this is Nothing and Undefined, which are singletons. That is, their classes are stuck here and only selected instances are exported through __all__ ''' class NothingType(object): def __str__(self): return "Nothing" class UndefinedType(object): def __str__(self): return "Undefined" Nothing = NothingType() Undefined = UndefinedType() def is_primitive(item): return isinstance(item, (NothingType, UndefinedType, bool, int, basestring)) __all__ = ['Nothing', 'Undefined']
""" This file contains any primitives for Lyanna that aren't just borrowed from the language. Basically this is Nothing and Undefined, which are singletons. That is, their classes are stuck here and only selected instances are exported through __all__ """ class Nothingtype(object): def __str__(self): return 'Nothing' class Undefinedtype(object): def __str__(self): return 'Undefined' nothing = nothing_type() undefined = undefined_type() def is_primitive(item): return isinstance(item, (NothingType, UndefinedType, bool, int, basestring)) __all__ = ['Nothing', 'Undefined']
def settingDecoder(data): # data can be: # raw string # list of strings data = data.strip() if (len(data) > 1) and (data[0] == '[') and (data[-1] == ']'): data = [x.strip() for x in data[1:-1].split(',')] return data def loadSetting(filename = "SETTINGS"): res = dict() with open(filename, 'r') as f: for line in f: sline = line.strip() if sline.startswith('#'): continue if sline.find('=') != -1: eIdx = sline.find('=') res[line[:eIdx]] = settingDecoder(sline[(eIdx + 1):]) return res settings = loadSetting() def getSetting(key, value = None): if key in settings: return settings[key] else: return value if __name__ == '__main__': print(loadSetting())
def setting_decoder(data): data = data.strip() if len(data) > 1 and data[0] == '[' and (data[-1] == ']'): data = [x.strip() for x in data[1:-1].split(',')] return data def load_setting(filename='SETTINGS'): res = dict() with open(filename, 'r') as f: for line in f: sline = line.strip() if sline.startswith('#'): continue if sline.find('=') != -1: e_idx = sline.find('=') res[line[:eIdx]] = setting_decoder(sline[eIdx + 1:]) return res settings = load_setting() def get_setting(key, value=None): if key in settings: return settings[key] else: return value if __name__ == '__main__': print(load_setting())
messages = 'game.apps.core.signals.messages.%s' # user.id planet = 'game.apps.core.signals.planet_details.%s' # planetID_requestID account_data = 'game.apps.core.signals.account_data.%s' building = 'game.apps.core.signals.building.%s' # buildingID task_updated = 'game.apps.core.signals.task_updated.%s' # user.id
messages = 'game.apps.core.signals.messages.%s' planet = 'game.apps.core.signals.planet_details.%s' account_data = 'game.apps.core.signals.account_data.%s' building = 'game.apps.core.signals.building.%s' task_updated = 'game.apps.core.signals.task_updated.%s'
# 39. Combination Sum # Time: O((len(candidates))^(target/avg(candidates))) Review # Space: O(target/avg(candidates))) [depth of recursion tree?]Review class Solution: def combinationSum(self, candidates: List[int], target: int) -> List[List[int]]: result = [] self.util(candidates, target, 0 , [], result) return result def util(self, candidates, target, start, cur_res, result): if target<0: return if target==0: result.append(cur_res) return for i in range(start, len(candidates)): self.util(candidates, target-candidates[i], i, cur_res+[candidates[i]], result)
class Solution: def combination_sum(self, candidates: List[int], target: int) -> List[List[int]]: result = [] self.util(candidates, target, 0, [], result) return result def util(self, candidates, target, start, cur_res, result): if target < 0: return if target == 0: result.append(cur_res) return for i in range(start, len(candidates)): self.util(candidates, target - candidates[i], i, cur_res + [candidates[i]], result)
class audo: def __init__(self, form, data = None): self.form = form self.values = [] if data: self.load(data) def load(self, data): for i in range(data.readUInt32()): while (data.offset & 3) != 0: data.offset += 1 data.push(data.readUInt32()) self.values.append(data.readBytes(data.readUInt32())) data.pop() def __getitem__(self, index): return self.values[index]
class Audo: def __init__(self, form, data=None): self.form = form self.values = [] if data: self.load(data) def load(self, data): for i in range(data.readUInt32()): while data.offset & 3 != 0: data.offset += 1 data.push(data.readUInt32()) self.values.append(data.readBytes(data.readUInt32())) data.pop() def __getitem__(self, index): return self.values[index]
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # implied. # See the License for the specific language governing permissions and # limitations under the License. IPPROTO_IP = 0 IPPROTO_HOPOPTS = 0 IPPROTO_ICMP = 1 IPPROTO_IGMP = 2 IPPROTO_TCP = 6 IPPROTO_UDP = 17 IPPROTO_ROUTING = 43 IPPROTO_FRAGMENT = 44 IPPROTO_GRE = 47 IPPROTO_AH = 51 IPPROTO_ICMPV6 = 58 IPPROTO_NONE = 59 IPPROTO_DSTOPTS = 60 IPPROTO_OSPF = 89 IPPROTO_VRRP = 112 IPPROTO_SCTP = 132
ipproto_ip = 0 ipproto_hopopts = 0 ipproto_icmp = 1 ipproto_igmp = 2 ipproto_tcp = 6 ipproto_udp = 17 ipproto_routing = 43 ipproto_fragment = 44 ipproto_gre = 47 ipproto_ah = 51 ipproto_icmpv6 = 58 ipproto_none = 59 ipproto_dstopts = 60 ipproto_ospf = 89 ipproto_vrrp = 112 ipproto_sctp = 132
lst = [90, 180, 0] empty = [] lst.append(empty) def function_a(): for empty in lst: if empty in lst: print(lst) function_b() function_b() print(lst) def function_b(): for empty in lst: if empty in lst: print(lst) function_b() function_a()
lst = [90, 180, 0] empty = [] lst.append(empty) def function_a(): for empty in lst: if empty in lst: print(lst) function_b() function_b() print(lst) def function_b(): for empty in lst: if empty in lst: print(lst) function_b() function_a()
def options_displ(): print( ''' weather now: Displays the current weather weather today: Displays the weather for this day weather tenday: Displays weather for next ten days detailed tenday: Displays ten day weather with extended info weather -t: Displays current temperature weather -dew: Displays cloud dew point currently weather -prs: Displays precipitation percentage currently weather -par: Displays current atmospheric pressure (bar) weather -mnp: Displays moon phase weather -ws: Displays current wind speed and direction weather -hdu: Displays current humidity percentage weather -vis: Displays current visibility (km) weather -uv: Displays current UV index out of 10 (0 - Minimum, 10 - Maximum) weather -dsc: Displays current weather description weather -tab: Displays startup table again --h or -help: Displays help page --o or -options: Displays options(current) page clear(): clear screen loc -p: Change permanent location loc -t: Change temporary location loc -pr: Return to permanent location --loc: View if location is permanent or temporary settings: Turn toggle on or off exit: Exit application ''' ) _ = input('Press enter to continue >> ') def help_application(): print( ''' Startup: When you first start up the app, it will ask you for your country and location. This is stored permanently and can be changed in the future. This system helps to reduce time when logging in to check the current weather NOTE:You can view all the commands by entering --o or -options in the terminal. Use -help only when needing assistance with the app. ''' ) _ = input('Press enter to read more >> ') print( ''' Command line modifications: When in the MAIN command line you will see a > which denotes an input suggestion. Here you can enter any command from the list below! When in sections like weather ten day or weather today, you will see a >> which means you are in the terminal for that particular weather section. ''' ) _ = input('Press enter to read more >> ') print( ''' Settings: This app currently has a toggle feature which is enabled by default and can be changed later. Toggle helps to change the way the day/hour navigation system works under the weather ten day and weather today sections. If you have settings toggle enabled you can navigate using the letter P(Previous hr/day), N(Next hr/day), E(Extended info), Q(exit to main cli). If you have settings disabled then you can navigate using Enter(next day) or Q(exit to main cli). ''' ) _ = input('Press enter to read more >> ') print( ''' Location change: There are primarily 2 location change commands in this app. loc -p and loc -t Loc -p changes your permanent location, this changes every section in the app from the startup menu weather and the weather sections Loc -t changes your location temporarily, this is useful when you want to view another location temporarily To know if you're in a temporary location or not just scroll up and you'll see your location near the title If there is a text which says 'Temporary Location', it means you're currently not in the permanent selected location, an alternate way to check is by typing the command --loc, this will tell you if you have permanent location selected or not To change back to permanent selected location type the command loc -pr and you'll be taken back. ''' ) _ = input('Press enter to read more >> ') print( ''' Title screen weather: When you load up the app, you will see a dropdown box which displays the hourly weather. This box is dynamic and the amount of information changes according to the size of your terminal. It is recommended to have your terminal on full screen or at least extended beyond the default size. ''' ) _ = input('Press enter to read more >> ') print( ''' Other information: Under the weather hourly section, if toggle is enabled and if it's the last hour of the day. The section will display only the particular weather for the next hour and exit the section Since weather.com uses a separate tag for the current weather, you can view it only by typing the command weather now. Exiting the app: Please try to use only the EXIT command to exit the app, you can use CTRL-Z ent or CTRL-C to exit but these exit methods create issues when in the loc -p section. If CTRL-C or CTRL-Z in pressed in the loc -p section, it leads to a corrupt file issue sometimes. The next time you open the app an error will be displayed on the screen. ''' ) _ = input('Press enter to read more >> ') print( ''' Errors: 1. Port connection: If you try to use the app without access to the internet or have a very slow connection. Sometimes you'll get a port connection error Make sure you're connected to the internet or just wait for sometime for the issue to get resolved 2. File error: As mentioned in the above section (exiting the app), CTRL-Z ent or CTRL-C can produce errors when used in the loc -p section. When this occurs the app will close automatically and the next time you open it, the app will be reset meaning that you'd have to enter your permanent location again. Other than that there's no major issue using CTRL-Z ent or CTRL-C 3. Requests error: This error can only occur if you modify the contents of any of the location files. If this occurs, make sure to delete the gotloc.txt file when launching the application again. ''' ) _ = input('Press enter to exit help >> ')
def options_displ(): print('\n weather now: Displays the current weather\n weather today: Displays the weather for this day\n weather tenday: Displays weather for next ten days\n detailed tenday: Displays ten day weather with extended info\n \n weather -t: Displays current temperature\n weather -dew: Displays cloud dew point currently\n weather -prs: Displays precipitation percentage currently\n weather -par: Displays current atmospheric pressure (bar)\n weather -mnp: Displays moon phase\n weather -ws: Displays current wind speed and direction\n weather -hdu: Displays current humidity percentage \n weather -vis: Displays current visibility (km)\n weather -uv: Displays current UV index out of 10 (0 - Minimum, 10 - Maximum)\n weather -dsc: Displays current weather description\n weather -tab: Displays startup table again\n \n --h or -help: Displays help page\n --o or -options: Displays options(current) page\n \n clear(): clear screen\n loc -p: Change permanent location\n loc -t: Change temporary location\n loc -pr: Return to permanent location\n --loc: View if location is permanent or temporary\n \n settings: Turn toggle on or off\n exit: Exit application\n \n ') _ = input('Press enter to continue >> ') def help_application(): print('\n Startup:\n When you first start up the app, it will ask you for your country and location. This is stored permanently and can be changed in the future.\n This system helps to reduce time when logging in to check the current weather\n\t\n\t NOTE:You can view all the commands by entering --o or -options in the terminal. Use -help only when needing assistance with the app.\n ') _ = input('Press enter to read more >> ') print('\n Command line modifications:\n When in the MAIN command line you will see a > which denotes an input suggestion. Here you can enter any command from the list below!\n When in sections like weather ten day or weather today, you will see a >> which means you are in the terminal for that particular weather section.\n ') _ = input('Press enter to read more >> ') print('\n Settings:\n This app currently has a toggle feature which is enabled by default and can be changed later.\n Toggle helps to change the way the day/hour navigation system works under the weather ten day and weather today sections.\n If you have settings toggle enabled you can navigate using the letter P(Previous hr/day), N(Next hr/day), E(Extended info), Q(exit to main cli).\n If you have settings disabled then you can navigate using Enter(next day) or Q(exit to main cli).\n ') _ = input('Press enter to read more >> ') print("\n Location change:\n There are primarily 2 location change commands in this app. loc -p and loc -t\n Loc -p changes your permanent location, this changes every section in the app from the startup menu weather and the weather sections\n Loc -t changes your location temporarily, this is useful when you want to view another location temporarily\n To know if you're in a temporary location or not just scroll up and you'll see your location near the title\n If there is a text which says 'Temporary Location', it means you're currently not in the permanent selected location, an alternate way to check is by typing the command --loc, \n this will tell you if you have permanent location selected or not\n \n To change back to permanent selected location type the command loc -pr and you'll be taken back.\n ") _ = input('Press enter to read more >> ') print('\n Title screen weather:\n When you load up the app, you will see a dropdown box which displays the hourly weather. This box is dynamic and the amount of information changes according to the size of your terminal.\n It is recommended to have your terminal on full screen or at least extended beyond the default size.\n ') _ = input('Press enter to read more >> ') print("\n Other information:\n Under the weather hourly section, if toggle is enabled and if it's the last hour of the day. The section will display only the particular weather for the next hour and exit the section\n Since weather.com uses a separate tag for the current weather, you can view it only by typing the command weather now.\n \n \n Exiting the app:\n Please try to use only the EXIT command to exit the app, you can use CTRL-Z ent or CTRL-C to exit but these exit methods create issues when in the loc -p section.\n If CTRL-C or CTRL-Z in pressed in the loc -p section, it leads to a corrupt file issue sometimes. The next time you open the app an error will be displayed on the screen.\n ") _ = input('Press enter to read more >> ') print("\n Errors:\n 1. Port connection: \n If you try to use the app without access to the internet or have a very slow connection. Sometimes you'll get a port connection error\n Make sure you're connected to the internet or just wait for sometime for the issue to get resolved\n \n 2. File error:\n As mentioned in the above section (exiting the app), CTRL-Z ent or CTRL-C can produce errors when used in the loc -p section.\n When this occurs the app will close automatically and the next time you open it, the app will be reset meaning that you'd have to enter your permanent location again.\n Other than that there's no major issue using CTRL-Z ent or CTRL-C\n \n 3. Requests error:\n This error can only occur if you modify the contents of any of the location files.\n If this occurs, make sure to delete the gotloc.txt file when launching the application again.\n \n ") _ = input('Press enter to exit help >> ')
class TimelineService(object): @classmethod def get_timeline(cls, officer_allegations): allegations_date = officer_allegations\ .values_list('allegation__incident_date_only', 'start_date')\ .order_by('allegation__incident_date') items = [] for date in allegations_date: if not date[0] and date[1]: items.append(date[1]) elif date[0]: items.append(date[0]) return sorted(items)
class Timelineservice(object): @classmethod def get_timeline(cls, officer_allegations): allegations_date = officer_allegations.values_list('allegation__incident_date_only', 'start_date').order_by('allegation__incident_date') items = [] for date in allegations_date: if not date[0] and date[1]: items.append(date[1]) elif date[0]: items.append(date[0]) return sorted(items)
l = [int(e) for e in input().split()] for i in range(1, len(l), 2): l[i], l[i - 1] = l[i - 1], l[i] [print(n) for n in l]
l = [int(e) for e in input().split()] for i in range(1, len(l), 2): (l[i], l[i - 1]) = (l[i - 1], l[i]) [print(n) for n in l]